@kaddo/cli 3.83.0 → 3.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
7
7
|
Error generating stack: `+e.message+`
|
|
8
8
|
`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(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&-e;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 at(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=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(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 ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ze(n),i=1<<r;t|=e[r],n&=~i}return t}function ct(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 lt(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ft(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-Ze(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&&pt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function pt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ht(e,t){var n=t&-t;return n=n&42?1:gt(n),(n&(e.suspendedLanes|t))===0?n:0}function gt(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 _t(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function vt(){var e=z.p;return e===0?(e=window.event,e===void 0?32:wh(e.type)):e}function yt(e,t){var n=z.p;try{return z.p=e,t()}finally{z.p=n}}var bt=Math.random().toString(36).slice(2),xt=`__reactFiber$`+bt,St=`__reactProps$`+bt,Ct=`__reactContainer$`+bt,wt=`__reactEvents$`+bt,Tt=`__reactListeners$`+bt,Et=`__reactHandles$`+bt,Dt=`__reactResources$`+bt,Ot=`__reactMarker$`+bt,kt=`__reactLoad$`+bt;function At(e){delete e[xt],delete e[St],delete e[Tt],delete e[Et]}function jt(e){var t;if(t=e[xt])return t;for(var n=e.parentNode;n;){if(t=n[Ct]||n[xt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[xt])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[xt]||e[Ct]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Dt];return t||=e[Dt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[Ot]=!0}function It(e){e[kt]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=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]*$`),Ht={},Ut={};function Wt(e){return Pe.call(Ut,e)?!0:Pe.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function qt(e,t,n){if(Wt(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 Jt(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 Yt(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 Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Qt(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 $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function rn(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=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):on(e,Xt(n)):o===`number`&&e.value==t?on(e,Xt(e.value)):on(e,Xt(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=``+Xt(s):e.removeAttribute(`name`)}function an(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)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(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),$t(e)}function on(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function sn(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=``+Xt(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 cn(e,t,n){if(t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Xt(n)}function ln(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(fe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function un(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dn=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 fn(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||dn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function pn(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]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(fn(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&fn(e,o,t[o])}function mn(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 hn=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`],[`maskType`,`mask-type`],[`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`]]),gn=/^[\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 _n(e){return gn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function vn(){}var yn=null;function bn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xn=null,Sn=null;function Cn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[St]||null;a:switch(e=t.stateNode,t.type){case`input`:if(rn(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="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[St]||null;if(!a)throw Error(i(90));rn(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&&en(r)}break a;case`textarea`:cn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&sn(e,!!n.multiple,t,!1)}}}var wn=!1;function Tn(e,t,n){if(wn)return e(t,n);wn=!0;try{return e(t)}finally{if(wn=!1,(xn!==null||Sn!==null)&&(Rd(),xn&&(t=xn,e=Sn,Sn=xn=null,Cn(t),e)))for(t=0;t<e.length;t++)Cn(e[t])}}function En(e,t){var n=e.stateNode;if(n===null)return null;var r=n[St]||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 Dn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,On=!1;if(Dn)try{var kn={};Object.defineProperty(kn,"passive",{get:function(){On=!0}}),window.addEventListener(`test`,kn,kn),window.removeEventListener(`test`,kn,kn)}catch{On=!1}var An=null,jn=null,Mn=null;function Nn(){if(Mn)return Mn;var e,t=jn,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 Mn=i.slice(e,1<r?1-r:void 0)}function Pn(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 Fn(){return!0}function In(){return!1}function Ln(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)?Fn:In,this.isPropagationStopped=In,this}return D(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=Fn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Fn)},persist:function(){},isPersistent:Fn}),t}var Rn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zn=Ln(Rn),Bn=D({},Rn,{view:0,detail:0}),Vn=Ln(Bn),Hn,Un,Wn,Gn=D({},Bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nr,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!==Wn&&(Wn&&e.type===`mousemove`?(Hn=e.screenX-Wn.screenX,Un=e.screenY-Wn.screenY):Un=Hn=0,Wn=e),Hn)},movementY:function(e){return`movementY`in e?e.movementY:Un}}),Kn=Ln(Gn),qn=Ln(D({},Gn,{dataTransfer:0})),Jn=Ln(D({},Bn,{relatedTarget:0})),Yn=Ln(D({},Rn,{animationName:0,elapsedTime:0,pseudoElement:0})),Xn=Ln(D({},Rn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Zn=Ln(D({},Rn,{data:0})),Qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},$n={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`},er={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function tr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=er[e])?!!t[e]:!1}function nr(){return tr}var rr=Ln(D({},Bn,{key:function(e){if(e.key){var t=Qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?$n[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nr,charCode:function(e){return e.type===`keypress`?Pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),ir=Ln(D({},Gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ar=Ln(D({},Rn,{submitter:0})),or=Ln(D({},Bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nr})),sr=Ln(D({},Rn,{propertyName:0,elapsedTime:0,pseudoElement:0})),cr=Ln(D({},Gn,{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})),lr=Ln(D({},Rn,{newState:0,oldState:0,source:0})),ur=[9,13,27,32],dr=Dn&&`CompositionEvent`in window,fr=null;Dn&&`documentMode`in document&&(fr=document.documentMode);var pr=Dn&&`TextEvent`in window&&!fr,mr=Dn&&(!dr||fr&&8<fr&&11>=fr),hr=` `,gr=!1;function _r(e,t){switch(e){case`keyup`:return ur.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function vr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var yr=!1;function br(e,t){switch(e){case`compositionend`:return vr(t);case`keypress`:return t.which===32?(gr=!0,hr):null;case`textInput`:return e=t.data,e===hr&&gr?null:e;default:return null}}function xr(e,t){if(yr)return e===`compositionend`||!dr&&_r(e,t)?(e=Nn(),Mn=jn=An=null,yr=!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 mr&&t.locale!==`ko`?null:t.data;default:return null}}var Sr={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 Cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Sr[e.type]:t===`textarea`}function wr(e,t,n,r){xn?Sn?Sn.push(r):Sn=[r]:xn=r,t=Jf(t,`onChange`),0<t.length&&(n=new zn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Tr=null,Er=null;function Dr(e){Vf(e,0)}function Or(e){if(en(Nt(e)))return e}function kr(e,t){if(e===`change`)return t}var Ar=!1;if(Dn){var jr;if(Dn){var Mr=`oninput`in document;if(!Mr){var Nr=document.createElement(`div`);Nr.setAttribute(`oninput`,`return;`),Mr=typeof Nr.oninput==`function`}jr=Mr}else jr=!1;Ar=jr&&(!document.documentMode||9<document.documentMode)}function Pr(){Tr&&(Tr.detachEvent(`onpropertychange`,Fr),Er=Tr=null)}function Fr(e){if(e.propertyName===`value`&&Or(Er)){var t=[];wr(t,Er,e,bn(e)),Tn(Dr,t)}}function Ir(e,t,n){e===`focusin`?(Pr(),Tr=t,Er=n,Tr.attachEvent(`onpropertychange`,Fr)):e===`focusout`&&Pr()}function Lr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Or(Er)}function Rr(e,t){if(e===`click`)return Or(t)}function zr(e,t){if(e===`input`||e===`change`)return Or(t)}function Br(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Vr=typeof Object.is==`function`?Object.is:Br;function Hr(e,t){if(Vr(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(!Pe.call(t,i)||!Vr(e[i],t[i]))return!1}return!0}function Ur(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gr(e,t){var n=Wr(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=Wr(n)}}function Kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ur(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=Ur(e.document)}return t}function Jr(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=Dn&&`documentMode`in document&&11>=document.documentMode,Xr=null,Zr=null,Qr=null,$r=!1;function ei(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$r||Xr==null||Xr!==Ur(r)||(r=Xr,`selectionStart`in r&&Jr(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}),Qr&&Hr(Qr,r)||(Qr=r,r=Jf(Zr,`onSelect`),0<r.length&&(t=new zn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function ti(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ni={animationend:ti(`Animation`,`AnimationEnd`),animationiteration:ti(`Animation`,`AnimationIteration`),animationstart:ti(`Animation`,`AnimationStart`),transitionrun:ti(`Transition`,`TransitionRun`),transitionstart:ti(`Transition`,`TransitionStart`),transitioncancel:ti(`Transition`,`TransitionCancel`),transitionend:ti(`Transition`,`TransitionEnd`)},ri={},ii={};Dn&&(ii=document.createElement(`div`).style,`AnimationEvent`in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),`TransitionEvent`in window||delete ni.transitionend.transition);function ai(e){if(ri[e])return ri[e];if(!ni[e])return e;var t=ni[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ii)return ri[e]=t[n];return e}var oi=ai(`animationend`),si=ai(`animationiteration`),ci=ai(`animationstart`),li=ai(`transitionrun`),ui=ai(`transitionstart`),di=ai(`transitioncancel`),fi=ai(`transitionend`),pi=new Map,mi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);mi.push(`scrollEnd`);function hi(e,t){pi.set(e,t),zt(t,[e])}var gi=0;function _i(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=yd.identifierPrefix;var n=gi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function vi(e){if(e==null||typeof e==`string`)return e;var t=null,n=Dd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function yi(e,t){return e=vi(e),t=vi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var bi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&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)},xi=[],Si=0,Ci=0;function wi(){for(var e=Si,t=Ci=Si=0;t<e;){var n=xi[t];xi[t++]=null;var r=xi[t];xi[t++]=null;var i=xi[t];xi[t++]=null;var a=xi[t];if(xi[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&&Oi(n,i,a)}}function Ti(e,t,n,r){xi[Si++]=e,xi[Si++]=t,xi[Si++]=n,xi[Si++]=r,Ci|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ei(e,t,n,r){return Ti(e,t,n,r),ki(e)}function Di(e,t){return Ti(e,null,null,t),ki(e)}function Oi(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-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ki(e){if(50<Od)throw Od=0,kd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ai={};function ji(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 Mi(e,t,n,r){return new ji(e,t,n,r)}function Ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pi(e,t){var n=e.alternate;return n===null?(n=Mi(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&1206910976,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 Fi(e,t){e.flags&=1206910978;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 Ii(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ni(r)&&(s=1);else if(typeof r==`string`)s=Jm(e,n,ye.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case re:return e=Mi(31,n,t,a),e.elementType=re,e.lanes=o,e;case j:return Li(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Mi(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case I:return e=Mi(13,n,t,a),e.elementType=I,e.lanes=o,e;case te:return e=Mi(19,n,t,a),e.elementType=te,e.lanes=o,e;case ie:case oe:return e=a|32,e=Mi(30,n,t,e),e.elementType=oe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case F:s=10;break a;case P:s=9;break a;case ee:s=11;break a;case ne:s=14;break a;case L:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Mi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Li(e,t,n,r){return e=Mi(7,e,r,t),e.lanes=n,e}function Ri(e,t,n){return e=Mi(6,e,null,t),e.lanes=n,e}function zi(e){var t=Mi(18,null,null,0);return t.stateNode=e,t}function Bi(e,t,n){return t=Mi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Vi=new WeakMap;function Hi(e,t){if(typeof e==`object`&&e){var n=Vi.get(e);return n===void 0?(t={value:e,source:t,stack:Ne(t)},Vi.set(e,t),t):n}return{value:e,source:t,stack:Ne(t)}}var Ui=[],Wi=0,Gi=null,Ki=0,qi=[],Ji=0,Yi=null,Xi=1,Zi=``;function Qi(e,t){Ui[Wi++]=Ki,Ui[Wi++]=Gi,Gi=e,Ki=t}function $i(e,t,n){qi[Ji++]=Xi,qi[Ji++]=Zi,qi[Ji++]=Yi,Yi=e;var r=Xi;e=Zi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Xi=1<<32-Ze(t)+i|n<<i|r,Zi=a+e}else Xi=1<<a|n<<i|r,Zi=e}function ea(e){e.return!==null&&(Qi(e,1),$i(e,1,0))}function ta(e){for(;e===Gi;)Gi=Ui[--Wi],Ui[Wi]=null,Ki=Ui[--Wi],Ui[Wi]=null;for(;e===Yi;)Yi=qi[--Ji],qi[Ji]=null,Zi=qi[--Ji],qi[Ji]=null,Xi=qi[--Ji],qi[Ji]=null}function na(e,t){qi[Ji++]=Xi,qi[Ji++]=Zi,qi[Ji++]=Yi,Xi=t.id,Zi=t.overflow,Yi=e}var ra=null,ia=null,B=!1,aa=null,oa=!1,sa=Error(i(519));function ca(e){throw ma(Hi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),sa}function la(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[xt]=e,t[St]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Q(zf[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),an(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),ln(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||ep(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=vn),t=!0):t=!1,t||ca(e,!0)}function ua(e){for(ra=e.return;ra;)switch(ra.tag){case 5:case 31:case 13:oa=!1;return;case 27:case 3:oa=!0;return;default:ra=ra.return}}function da(e){if(e!==ra)return!1;if(!B)return ua(e),B=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||mp(e.type,e.memoizedProps)),n=!n),n&&ia&&ca(e),ua(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ia=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ia=fm(e)}else t===27?(t=ia,Cp(e.type)?(e=dm,dm=null,ia=e):ia=t):ia=ra?um(e.stateNode.nextSibling):null;return!0}function fa(){ia=ra=null,B=!1}function pa(){var e=aa;return e!==null&&(dd===null?dd=e:dd.push.apply(dd,e),aa=null),e}function ma(e){aa===null?aa=[e]:aa.push(e)}var ha=ge(null),ga=null,_a=null;function va(e,t,n){ve(ha,t._currentValue),t._currentValue=n}function ya(e){e._currentValue=ha.current,_e(ha)}function ba(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 xa(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),ba(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),ba(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ba(a.return,n,e),s=a.child,s=s===null?null:s.sibling):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 Sa(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;Vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ch]:e.push(ch))}a=a.return}return e!==null&&xa(t,e,n,r),t.flags|=262144,e!==null}function Ca(e){for(e=e.firstContext;e!==null;){if(!Vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wa(e){ga=e,_a=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ta(e){return Da(ga,e)}function Ea(e,t){return ga===null&&wa(e),Da(e,t)}function Da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},_a===null){if(e===null)throw Error(i(308));_a=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _a=_a.next=t;return n}var Oa=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()})}},ka=t.unstable_scheduleCallback,Aa=t.unstable_NormalPriority,ja={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ma(){return{controller:new Oa,data:new Map,refCount:0}}function Na(e){e.refCount--,e.refCount===0&&ka(Aa,function(){e.controller.abort()})}function Pa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Fa=null;function Ia(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var La=null,Ra=0,za=0,Ba=null;function Va(e,t){if(La===null){var n=La=[];Ra=0,za=Pf(),Ba={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ra++,t.then(Ha,Ha),t}function Ha(){if(--Ra===0&&(Fa=null,La!==null)){Ba!==null&&(Ba.status=`fulfilled`);var e=La;La=null,za=0,Ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ua(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 Wa=R.S;R.S=function(e,t){if(md=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Va(e,t),Fa!==null)for(var n=bf;n!==null;)Pa(n,Fa),n=n.next;if(n=e.types,n!==null){for(var r=bf;r!==null;)Pa(r,n),r=r.next;if(za!==0){r=Fa,r===null&&(r=Fa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Wa!==null&&Wa(e,t)};var Ga=ge(null);function Ka(){var e=Ga.current;return e===null?Zu.pooledCache:e}function qa(e,t){t===null?ve(Ga,Ga.current):ve(Ga,t.pool)}function Ja(){var e=Ka();return e===null?null:{parent:ja._currentValue,pool:e}}var Ya=Error(i(460)),Xa=Error(i(474)),Za=Error(i(542)),Qa={then:function(){}};function $a(e){return e=e.status,e===`fulfilled`||e===`rejected`}function eo(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(vn,vn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,io(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(vn,vn);else{if(e=Zu,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,io(e),e}throw no=t,Ya}}function to(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(no=e,Ya):e}}var no=null;function ro(){if(no===null)throw Error(i(459));var e=no;return no=null,e}function io(e){if(e===Ya||e===Za)throw Error(i(483))}var ao=null,oo=0;function so(e){var t=oo;return oo+=1,ao===null&&(ao=[]),eo(ao,e,t)}function co(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function lo(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function uo(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=Pi(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|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ri(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===j?(e=d(e,t,n.props.children,r,n.key),co(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===L&&to(i)===t.type)?(t=a(t,n.props),co(t,n),t.return=e,t):(t=Ii(n.type,n.key,n.props,null,e.mode,r),co(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=Bi(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=Li(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=Ri(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ii(t.type,t.key,t.props,null,e.mode,n),co(n,t),n.return=e,n;case A:return t=Bi(t,e.mode,n),t.return=e,t;case L:return t=to(t),f(e,t,n)}if(fe(t)||le(t))return t=Li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,so(t),n);if(t.$$typeof===F)return f(e,Ea(e,t),n);lo(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 k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case L:return n=to(n),p(e,t,n,r)}if(fe(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,so(n),r);if(n.$$typeof===F)return p(e,t,Ea(e,n),r);lo(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 k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case L:return r=to(r),m(e,t,n,r,i)}if(fe(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,so(r),i);if(r.$$typeof===F)return m(e,t,n,Ea(t,r),i);lo(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),B&&Qi(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 B&&Qi(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(_.key===null?h:_.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)}),B&&Qi(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),B&&Qi(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 B&&Qi(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(_.key===null?g:_.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)}),B&&Qi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),co(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===L&&to(l)===r.type){n(e,r.sibling),c=a(r,o.props),co(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Li(o.props.children,e.mode,c,o.key),co(c,o),c.return=e,e=c):(c=Ii(o.type,o.key,o.props,null,e.mode,c),co(c,o),c.return=e,e=c)}return s(e);case A: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}n(e,r);break}t(e,r),r=r.sibling}c=Bi(o,e.mode,c),c.return=e,e=c}return s(e);case L:return o=to(o),_(e,r,o,c)}if(fe(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,so(o),c);if(o.$$typeof===F)return _(e,r,Ea(e,o),c);lo(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=Ri(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{oo=0;var i=_(e,t,n,r);return ao=null,i}catch(t){if(t===Ya||t===Za)throw t;var a=Mi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var fo=uo(!0),po=uo(!1),mo=!1;function ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function V(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 go(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Xu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ki(e),Oi(e,null,n),t}return Ti(e,r,t,n),ki(e)}function vo(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,mt(e,n)}}function yo(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 bo=!1;function xo(){if(bo){var e=Ba;if(e!==null)throw e}}function So(e,t,n,r){bo=!1;var i=e.updateQueue;mo=!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?(Z&f)===f:(r&f)===f){f!==0&&f===za&&(bo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:mo=!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),ad|=o,e.lanes=o,e.memoizedState=d}}function Co(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function wo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Co(n[e],t)}var To=ge(null),Eo=ge(0);function Do(e,t){e=rd,ve(Eo,e),ve(To,t),rd=e|t.baseLanes}function Oo(){ve(Eo,rd),ve(To,To.current)}function ko(){rd=Eo.current,_e(To),_e(Eo)}var Ao=ge(null),jo=null;function Mo(e){var t=e.alternate;ve(Lo,Lo.current&1),ve(Ao,e),jo===null&&(t===null||To.current!==null||t.memoizedState!==null)&&(jo=e)}function No(e){ve(Lo,Lo.current),ve(Ao,e),jo===null&&(jo=e)}function Po(e){e.tag===22?(ve(Lo,Lo.current),ve(Ao,e),jo===null&&(jo=e)):Fo()}function Fo(){ve(Lo,Lo.current),ve(Ao,Ao.current)}function Io(e){_e(Ao),jo===e&&(jo=null),_e(Lo)}var Lo=ge(0);function Ro(e,t){ve(Ao,Ao.current),ve(Lo,t)}function zo(e){_e(Lo),_e(Ao),jo===e&&(jo=null)}function Bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){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 Vo=0,H=null,Ho=null,Uo=null,Wo=!1,Go=!1,Ko=!1,qo=0,Jo=0,Yo=null,Xo=0;function Zo(){throw Error(i(321))}function Qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Vr(e[n],t[n]))return!1;return!0}function $o(e,t,n,r,i,a){return Vo=a,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=e===null||e.memoizedState===null?pc:mc,Ko=!1,a=n(r,i),Ko=!1,Go&&(a=ts(t,n,r,i)),es(e),a}function es(e){R.H=fc;var t=Ho!==null&&Ho.next!==null;if(Vo=0,Uo=Ho=H=null,Wo=!1,Jo=0,Yo=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&Ca(e)&&(jc=!0))}function ts(e,t,n,r){H=e;var a=0;do{if(Go&&(Yo=null),Jo=0,Go=!1,25<=a)throw Error(i(301));if(a+=1,Uo=Ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}R.H=hc,o=t(n,r)}while(Go);return o}function ns(){var e=R.H,t=e.useState()[0];return t=typeof t.then==`function`?os(t):t,e=e.useState()[0],(Ho===null?null:Ho.memoizedState)!==e&&(H.flags|=1024),t}function U(){var e=qo!==0;return qo=0,e}function rs(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function is(e){if(Wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wo=!1}Vo=0,Uo=Ho=H=null,Go=!1,Jo=qo=0,Yo=null}function W(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Uo===null?H.memoizedState=Uo=e:Uo=Uo.next=e,Uo}function G(){if(Ho===null){var e=H.alternate;e=e===null?null:e.memoizedState}else e=Ho.next;var t=Uo===null?H.memoizedState:Uo.next;if(t!==null)Uo=t,Ho=e;else{if(e===null)throw H.alternate===null?Error(i(467)):Error(i(310));Ho=e,e={memoizedState:Ho.memoizedState,baseState:Ho.baseState,baseQueue:Ho.baseQueue,queue:Ho.queue,next:null},Uo===null?H.memoizedState=Uo=e:Uo=Uo.next=e}return Uo}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=Jo;return Jo+=1,Yo===null&&(Yo=[]),e=eo(Yo,e,t),t=H,(Uo===null?t.memoizedState:Uo.next)===null&&(t=t.alternate,R.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return os(e);if(e.$$typeof===se)return;if(e.$$typeof===F)return Ta(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=H.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=as(),H.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]=ae;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(G(),Ho,e)}function ds(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?(Vo&f)===f:(Z&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===za&&(d=!0);else if((Vo&p)===p){u=u.next,p===za&&(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,H.lanes|=p,ad|=p;f=u.action,Ko&&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,H.lanes|=f,ad|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Vr(o,e.memoizedState)&&(jc=!0,d&&(n=Ba,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 fs(e){var t=G(),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);Vr(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=H,a=G(),o=B;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Vr((Ho||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Uo!==null&&!!(Uo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,Zu===null)throw Error(i(349));o||Vo&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=as(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Vr(e,n)}catch{return!0}}function vs(e){var t=Di(e,2);t!==null&&Nd(t,e,2)}function ys(e){var t=W();if(typeof e==`function`){var n=e;if(e=n(),Ko){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,Ho,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(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)}};R.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=R.T,o={};o.types=a===null?null:a.types,R.T=o;try{var s=n(i,r),c=R.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),R.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(B){var n=Zu.formState;if(n!==null){a:{var r=H;if(B){if(ia){b:{for(var i=ia,a=oa;i.nodeType!==8;){if(!a){i=null;break b}if(i=um(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ia=um(i.nextSibling),r=i.data===`F!`;break a}}ca(r)}r=!1}r&&(t=n[0])}}return n=W(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,H,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,H,!1,r.queue),r=W(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,H,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(G(),Ho,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=os(t)}catch(e){throw e===Ya?Za:e}else r=t;t=G();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=G(),n=Ho;if(n!==null)return As(t,n,e);G(),t=t.memoizedState,n=G();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=H.updateQueue,t===null&&(t=as(),H.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 Ps(){return G().memoizedState}function Fs(e,t,n,r){var i=W();H.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=G();r=r===void 0?null:r;var a=i.memoizedState.inst;Ho!==null&&r!==null&&Qo(r,Ho.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(H.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=as(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=G().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(Xu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(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 Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=G();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=G();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Qo(t,r[1]))return r[0];if(r=e(),Ko){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Vo&1073741824&&!(Z&261930)?e.memoizedState=t:(e.memoizedState=n,e=jd(),H.lanes|=e,ad|=e,n)}function Ys(e,t,n,r){return Vr(n,t)?n:To.current===null?!(Vo&106)||Vo&1073741824&&!(Z&261930)?(jc=!0,e.memoizedState=n):(e=jd(),H.lanes|=e,ad|=e,t):(e=Js(e,n,r),Vr(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=z.p;z.p=a!==0&&8>a?a:8;var o=R.T,s={};s.types=o===null?null:o.types,R.T=s,cc(e,!1,t,n);try{var c=i(),l=R.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ua(c,r),Ad(e)):sc(e,t,r,Ad(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Ad())}finally{z.p=a,o!==null&&s.types!==null&&(o.types=s.types),R.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,pe,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Ad())}function tc(){return Ta(ch)}function nc(){return G().memoizedState}function rc(){return G().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ad();e=go(n);var r=_o(t,e,n);r!==null&&(Nd(r,t,n),vo(r,t,n)),t={cache:Ma()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Ad();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Ei(e,t,n,r),n!==null&&(Nd(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Ad())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(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,Vr(s,o))return Ti(e,t,i,0),Zu===null&&wi(),!1}catch{}if(n=Ei(e,t,i,r),n!==null)return Nd(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=Ei(e,n,r,2),t!==null&&Nd(t,e,2)}function lc(e){var t=e.alternate;return e===H||t!==null&&t===H}function uc(e,t){Go=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,mt(e,n)}}var fc={readContext:Ta,use:ss,useCallback:Zo,useContext:Zo,useEffect:Zo,useImperativeHandle:Zo,useLayoutEffect:Zo,useInsertionEffect:Zo,useMemo:Zo,useReducer:Zo,useRef:Zo,useState:Zo,useDebugValue:Zo,useDeferredValue:Zo,useTransition:Zo,useSyncExternalStore:Zo,useId:Zo,useHostTransitionStatus:Zo,useFormState:Zo,useActionState:Zo,useOptimistic:Zo,useMemoCache:Zo,useCacheRefresh:Zo,useEffectEvent:Zo},pc={readContext:Ta,use:ss,useCallback:function(e,t){return W().memoizedState=[e,t===void 0?null:t],e},useContext:Ta,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=W();t=t===void 0?null:t;var r=e();if(Ko){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=W();if(n!==void 0){var i=n(t);if(Ko){Xe(!0);try{n(t)}finally{Xe(!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=ac.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=W();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(W(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,H,e.queue,!0,!1),W().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=H,a=W();if(B){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Zu===null)throw Error(i(349));Z&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=W(),t=Zu.identifierPrefix;if(B){var n=Zi,r=Xi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=qo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=W();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return W().memoizedState=ic.bind(null,H)},useEffectEvent:function(e){var t=W(),n={impl:e};return t.memoizedState=n,function(){if(Xu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:Ta,use:ss,useCallback:Ks,useContext:Ta,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(G(),Ho.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=G().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(G(),Ho,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:Ta,use:ss,useCallback:Ks,useContext:Ta,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=G();return Ho===null?Js(n,e,t):Ys(n,Ho.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=G().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=G();return Ho===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,Ho,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=go(r);i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Nd(t,e,r),vo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ad(),i=go(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=_o(e,i,r),t!==null&&(Nd(t,e,r),vo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ad(),r=go(n);r.tag=2,t!=null&&(r.callback=t),t=_o(e,r,n),t!==null&&(Nd(t,e,n),vo(t,e,n))}};function vc(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?!Hr(n,r)||!Hr(i,a):!0}function yc(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&&_c.enqueueReplaceState(t,t.state,null)}function bc(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=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){bi(e)}function Sc(e){console.error(e)}function Cc(e){bi(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(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 Ec(e,t,n){return n=go(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=go(e),e.tag=3,e}function Oc(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(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(_d===null?_d=new Set([this]):_d.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Sa(t,n,a,!0),n=Ao.current,n!==null){switch(n.tag){case 31:case 13:case 19:return jo===null?Gd():n.alternate===null&&id===0&&(id=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Qa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),mf(e,r,a)),!1;case 22:return n.flags|=65536,r===Qa?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)),mf(e,r,a)),!1}throw Error(i(435,n.tag))}return mf(e,r,a),Gd(),!1}if(B)return t=Ao.current,t===null?(r!==sa&&(t=Error(i(423),{cause:r}),ma(Hi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Hi(r,n),a=Ec(e.stateNode,r,a),yo(e,a),id!==4&&(id=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==sa&&(e=Error(i(422),{cause:r}),ma(Hi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Hi(o,n),ud===null?ud=[o]:ud.push(o),id!==4&&(id=2),t===null)return!0;r=Hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),yo(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`&&(_d===null||!_d.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),yo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?po(t,null,n,r):fo(t,e.child,n,r)}function Nc(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 wa(t),r=$o(e,t,n,o,a,i),s=U(),e!==null&&!jc?(rs(e,t,i),rl(e,t,i)):(B&&s&&ea(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=Ii(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!il(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Hr:n,n(o,r)&&e.ref===t.ref)return rl(e,t,i)}return t.flags|=1,e=Pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Hr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,il(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,rl(e,t,i)}}return J(e,t,n,r,i)}function Ic(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 Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&qa(t,a===null?null:a.cachePool),a===null?Oo():Do(t,a),Po(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&qa(t,null),Oo(),Fo()):(qa(t,a.cachePool),Do(t,a),Fo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ka();return a=a===null?null:{parent:ja._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&qa(t,null),Oo(),Po(t),e!==null&&Sa(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Jc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return fo(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,Io(t),t.memoizedState=null,e}function K(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(B){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(No(t),(e=ia)?(e=om(e,oa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=zi(e),n.return=t,t.child=n,ra=t,ia=null)):e=null,e===null)throw ca(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(No(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||Sa(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(To.current===null){if(r=Zu,r!==null&&(s=ht(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Di(e,s),Nd(r,e,s),Ac;Gd()}t=Bc(e,t,n)}else e=o.treeContext,ia=um(s.nextSibling),ra=t,B=!0,aa=null,oa=!1,e!==null&&na(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=Pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function q(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 J(e,t,n,r,i){return wa(t),n=$o(e,t,n,r,void 0,i),r=U(),e!==null&&!jc?(rs(e,t,i),rl(e,t,i)):(B&&r&&ea(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Vc(e,t,n,r,i,a){return wa(t),t.updateQueue=null,n=ts(t,r,n,i),es(e),r=U(),e!==null&&!jc?(rs(e,t,a),rl(e,t,a)):(B&&r&&ea(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Hc(e,t,n,r,i){if(wa(t),t.stateNode===null){var a=Ai,o=n.contextType;typeof o==`object`&&o&&(a=Ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ho(t),o=n.contextType,a.context=typeof o==`object`&&o?Ta(o):Ai,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(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&&_c.enqueueReplaceState(a,a.state,null),So(t,r,a,i),xo(),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=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ai,typeof u==`object`&&u&&(o=Ta(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)&&yc(t,a,r,o),mo=!1;var f=t.memoizedState;a.state=f,So(t,r,a,i),xo(),l=t.memoizedState,s||f!==l||mo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=mo||vc(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,V(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ai,typeof l==`object`&&l&&(c=Ta(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)&&yc(t,a,r,c),mo=!1,f=t.memoizedState,a.state=f,So(t,r,a,i),xo();var p=t.memoizedState;o!==d||f!==p||mo||e!==null&&e.dependencies!==null&&Ca(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=mo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ca(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,q(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=fo(t,e.child,null,i),t.child=fo(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=rl(e,t,i),e}function Uc(e,t,n,r){return fa(),t.flags|=256,Mc(e,t,n,r),t.child}var Wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Y(e){return{baseLanes:e,cachePool:Ja()}}function Gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=cd),e}function Kc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Lo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(B){if(i?Mo(t):Fo(),(e=ia)?(e=om(e,oa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Yi===null?null:{id:Xi,overflow:Zi},retryLane:536870912,hydrationErrors:null},n=zi(e),n.return=t,t.child=n,ra=t,ia=null)):e=null,e===null)throw ca(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Fo(),i=t.mode,a=Jc({mode:`hidden`,children:a},i),r=Li(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Y(n),r.childLanes=Gc(e,o,n),t.memoizedState=Wc,Lc(null,r)):(Mo(t),qc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Xc(e,t,a,o,r,c,s,n)}return i?(Fo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Pi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Li(i,a,n,null),i.flags|=2):i=Pi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Y(n):(a=i.cachePool,a===null?a=Ja():(s=ja._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Gc(e,o,n),t.memoizedState=Wc,Lc(e.child,r)):(Mo(t),n=e.child,e=n.sibling,n=Pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function qc(e,t){return t=Jc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Jc(e,t){return e=Mi(22,e,null,t),e.lanes=0,e}function Yc(e,t,n){return fo(t,e.child,null,n),e=qc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Mo(t),t.flags&=-257,Yc(e,t,c)):t.memoizedState===null?(Fo(),o=a.fallback,s=t.mode,a=Jc({mode:`visible`,children:a.children},s),o=Li(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,fo(t,e.child,null,c),a=t.child,a.memoizedState=Y(c),a.childLanes=Gc(e,r,c),t.memoizedState=Wc,Lc(null,a)):(Fo(),t.child=e.child,t.flags|=128,null);if(Mo(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ma({value:a,source:null,stack:null})),Yc(e,t,c)}if(jc||Sa(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(To.current!==null)return Yc(e,t,c);if(r=Zu,r!==null&&(a=ht(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Di(e,a),Nd(r,e,a),Ac;return sm(o)||Gd(),Yc(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ia=um(o.nextSibling),ra=t,B=!0,aa=null,oa=!1,e!==null&&na(t,e),t=qc(t,a.children),t.flags|=134221824,t)}function Zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ba(e.return,t,n)}function Qc(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Bo(n)===null&&(t=e),e=e.sibling}return t}function $c(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 el(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function tl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Lo.current;if(t.flags&128)return Ro(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Ro(t,o),i===`backwards`&&e!==null?(el(e),Mc(e,t,r,n),el(e)):Mc(e,t,r,n),r=B?Ki:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zc(e,n,t);else if(e.tag===19)Zc(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`backwards`:n=Qc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,el(t)),$c(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Bo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$c(t,!0,n,null,a,r);break;case`together`:$c(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Qc(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$c(t,!1,i,n,a,r)}return t.child}function nl(e,t,n){var r=t.pendingProps;return va(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function rl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ad|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Sa(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=Pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function il(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ca(e)))}function al(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),va(t,ja,e.memoizedState.cache),fa();break;case 27:case 5:Te(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:va(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,No(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Mo(t),t.flags|=128,null;r=Sa(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Kc(e,t,n):(Mo(t),e=rl(e,t,n),e===null?null:e.sibling)}Mo(t);break;case 19:if(t.flags&128)return tl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Sa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return tl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ro(t,Lo.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:va(t,ja,e.memoizedState.cache)}return rl(e,t,n)}function ol(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!il(e,n)&&!(t.flags&128))return jc=!1,al(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,B&&t.flags&1048576&&$i(t,Ki,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=to(t.elementType),t.type=e,typeof e==`function`)Ni(e)?(r=bc(e,r),t.tag=1,t=Hc(null,t,e,r,n)):(t.tag=0,t=J(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===ne){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===F){t.tag=10,t.type=e,t=nl(null,t,n);break a}}throw t=de(e)||e,Error(i(306,t,``))}}return t;case 0:return J(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Hc(e,t,r,a,n);case 3:a:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,V(e,t),So(t,r,null,n);var s=t.memoizedState;if(r=s.cache,va(t,ja,r),r!==o.cache&&xa(t,[ja],n,!0),xo(),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=Uc(e,t,r,n);break a}if(r!==a){a=Hi(Error(i(424)),t),ma(a),t=Uc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ia=um(e.firstChild),ra=t,B=!0,aa=null,oa=!0,n=po(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(fa(),r===a){t=rl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return q(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:B||(t.stateNode=pp(t.type,t.pendingProps,xe.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&B&&(r=t.stateNode=gm(t.type,t.pendingProps,xe.current),ra=t,oa=!0,a=ia,Cp(t.type)?(dm=a,ia=um(r.firstChild)):ia=a),Mc(e,t,t.pendingProps.children,n),q(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&B&&((a=r=ia)&&(r=im(r,t.type,t.pendingProps,oa),r===null?a=!1:(t.stateNode=r,ra=t,ia=um(r.firstChild),oa=!1,a=!0)),a||ca(t)),Te(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,mp(a,o)?r=null:s!==null&&mp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=$o(e,t,ns,null,null,n),ch._currentValue=a),q(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&B&&((e=n=ia)&&(n=am(n,t.pendingProps,oa),n===null?e=!1:(t.stateNode=n,ra=t,ia=null,e=!0)),e||ca(t)),null;case 13:return Kc(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fo(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,q(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return nl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,wa(t),a=Ta(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return tl(e,t,n);case 31:return K(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return wa(t),r=Ta(ja),e===null?(a=Ka(),a===null&&(a=Zu,o=Ma(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ho(t),va(t,ja,a)):((e.lanes&n)!==0&&(V(e,t),So(t,null,null,n),xo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,va(t,ja,r),r!==a.cache&&xa(t,[ja],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),va(t,ja,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:B&&ea(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:q(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function sl(e){e.flags|=4}function cl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Ym(t,r):Ym(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Hd())e.flags|=8192;else throw no=Qa,Xa}}else e.flags&=-16777217}function ll(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xm(t)){if(Hd())e.flags|=8192;else throw no=Qa,Xa}}function ul(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:lt(),e.lanes|=t,ld|=t)}function dl(e,t){if(!B)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,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;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function fl(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&1206910976,r|=i.flags&1206910976,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 pl(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fl(t),null;case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ya(ja),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(da(t)?sl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pa())),fl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(sl(t),o===null?(fl(t),cl(t,a,null,r,n)):(fl(t),ll(t,o))):o?o===e.memoizedState?(fl(t),t.flags&=-16777217):(sl(t),fl(t),ll(t,o)):(e=e.memoizedProps,e!==r&&sl(t),fl(t),cl(t,a,e,r,n)),null;case 27:if(Ee(t),n=xe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return fl(t),t.subtreeFlags&=-33554433,null}e=ye.current,da(t)?la(t,e):(e=gm(a,r,n),t.stateNode=e,sl(t))}return fl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return fl(t),t.subtreeFlags&=-33554433,null}if(o=ye.current,da(t))la(t,o);else{var s=up(xe.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[xt]=t,o[St]=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(rp(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&&sl(t)}}return fl(t),t.subtreeFlags&=-33554433,cl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&sl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,da(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ra,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[xt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||ca(t,!0)}else e=up(e).createTextNode(r),e[xt]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=da(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[xt]=t}else fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=pa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Io(t),t):(Io(t),null);if(t.flags&128)throw Error(i(558))}return fl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=da(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[xt]=t}else fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fl(t),a=!1}else a=pa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Io(t),t):(Io(t),null)}return Io(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),ul(t,t.updateQueue),fl(t),null);case 4:return we(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,fl(t),null;case 10:return ya(t.type),fl(t),null;case 19:if(zo(t),r=t.memoizedState,r===null)return fl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)dl(r,!1);else{if(id!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bo(e),o!==null){for(t.flags|=128,dl(r,!1),e=o.updateQueue,t.updateQueue=e,ul(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Fi(n,e),n=n.sibling;return Ro(t,Lo.current&1|2),B&&Qi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>hd&&(t.flags|=128,a=!0,dl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Bo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ul(t,e),dl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!B)return fl(t),null}else 2*ze()-r.renderingStartTime>hd&&n!==536870912&&(t.flags|=128,a=!0,dl(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)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=Lo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||B?Ro(t,o):(n=o,ve(Ao,t),ve(Lo,n),jo===null&&(jo=t)),B&&Qi(t,r.treeForkCount),e}return fl(t),null;case 22:case 23:return Io(t),ko(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(fl(t),t.subtreeFlags&6&&(t.flags|=8192)):fl(t),n=t.updateQueue,n!==null&&ul(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&&_e(Ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ya(ja),fl(t),null;case 25:return null;case 30:return t.flags|=33554432,fl(t),null}throw Error(i(156,t.tag))}function ml(e,t){switch(ta(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(ja),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Io(t),t.alternate===null)throw Error(i(340));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return zo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return ya(t.type),null;case 22:case 23:return Io(t),ko(),e!==null&&_e(Ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(ja),null;case 25:return null;default:return null}}function hl(e,t){switch(ta(t),t.tag){case 3:ya(ja),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Io(t);break;case 13:Io(t);break;case 19:zo(t);break;case 10:ya(t.type);break;case 22:case 23:Io(t),ko(),e!==null&&_e(Ga);break;case 24:ya(ja)}}function gl(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){pf(t,t.return,e)}}function _l(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){pf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){pf(t,t.return,e)}}function vl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wo(t,n)}catch(t){pf(e,e.return,t)}}}function yl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){pf(e,t,n)}}function bl(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:var i=e.stateNode,a=_i(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Fp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Ip(e);m(e.child,!1,$p,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){pf(e,t,n)}}function xl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){pf(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){pf(e,t,n)}else n.current=null}}function Sl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)tm(e.stateNode,t[n])}function Cl(e){for(var t=e.return;t!==null&&(El(t)&&tm(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function wl(e){for(var t=e.return;t!==null&&(El(t)&&nm(e.stateNode,t.stateNode),!Tl(t));)t=t.return}function Tl(e){return e.tag===5||e.tag===3||e.tag===27}function El(e){return e&&e.tag===7&&e.stateNode!==null}function Dl(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){pf(e,e.return,t)}}function Ol(e,t,n){try{var r=e.stateNode;ap(r,e.type,n,t),r[St]=t}catch(t){pf(e,e.return,t)}}function kl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cp(e.type)||e.tag===4}function Al(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||kl(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&&Cp(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 jl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vn)),Sl(e,r),Gt=!0;else if(i!==4&&(i===27&&(Sl(e,r),r=null,Cp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(jl(e,t,n,r),e=e.sibling;e!==null;)jl(e,t,n,r),e=e.sibling}function Ml(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Sl(e,r),Gt=!0;else if(i!==4&&(i===27&&(Sl(e,r),r=null,Cp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Ml(e,t,n,r),e=e.sibling;e!==null;)Ml(e,t,n,r),e=e.sibling}function Nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);rp(t,r,n),t[xt]=e,t[St]=n}catch(t){pf(e,e.return,t)}}var Pl=!1,Fl=null;function Il(e){(e.tag===30||e.subtreeFlags&33554432)&&(Pl=!0)}var Ll=null;function Rl(){var e=Ll;return Ll=null,e}var zl=0;function Bl(e,t,n,r,i){return zl=0,Vl(e.child,t,n,r,i)}function Vl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=kp(o);r.push(s),s.view&&(a=!0)}else a||kp(o).view&&(a=!0);Pl=!0,Ep(o,zl===0?t:t+`_`+zl,n),zl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Vl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Hl(e,t){for(;e!==null;)e.tag===5?Dp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Hl(e.child,t)),e=e.sibling}function Ul(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Ul(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=yi(t.default,t.share),t!==`none`&&(Bl(e,n,t,null,!1)||Hl(e.child,!1))}e=e.sibling}}function Wl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=_i(r,n),a=yi(r.default,n.paired?r.share:r.enter);a===`none`?Ul(e):Bl(e,i,a,null,!1)?(Ul(e),n.paired||t||Md(e,r.onEnter)):Hl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Wl(e,t),e=e.sibling;else Ul(e)}function Gl(e){if(Fl!==null&&Fl.size!==0){var t=Fl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=yi(n.default,n.share);if(a!==`none`&&(Bl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Md(e,n.onShare)):Hl(e.child,!1)),t.delete(r),t.size===0)break}}}Gl(e)}e=e.sibling}}}function Kl(e){if(e.tag===30){var t=e.memoizedProps,n=_i(t,e.stateNode),r=Fl===null?void 0:Fl.get(n),i=yi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Bl(e,n,i,null,!1)?r===void 0?Md(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Fl.delete(n),Md(e,t.onShare)):Hl(e.child,!1)),Fl!==null&&Gl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Kl(e),e=e.sibling;else Fl!==null&&Gl(e)}function ql(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=_i(t,e.stateNode);t=yi(t.default,t.update),e.flags&=-5,t!==`none`&&Bl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&ql(e);e=e.sibling}}function Jl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Hl(e.child,!1))}Jl(e)}e=e.sibling}}function Yl(e){if(e.tag===30)e.stateNode.paired=null,Hl(e.child,!1),Jl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e),e=e.sibling;else Jl(e)}function Xl(e){for(e=e.child;e!==null;)e.tag===30?Hl(e.child,!1):e.subtreeFlags&33554432&&Xl(e),e=e.sibling}function Zl(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&zl<a.length){var l=a[zl],u=kp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Ep(c,zl===0?n:n+`_`+zl,i),s&&e.flags&4||(Ll===null&&(Ll=[]),Ll.push(c,zl===0?r:r+`_`+zl,t.memoizedProps)),zl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Zl(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function Ql(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=_i(n,r),a=yi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Ap)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;zl=0,i=Zl(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Md(e,n.onUpdate))}else e.subtreeFlags&33554432&&Ql(e,t);e=e.sibling}}var $l=!1,eu=!1,tu=!1,nu=!1,ru=typeof WeakSet==`function`?WeakSet:Set,iu=null,au=!1,ou=!1,su=!1,cu=!1;function lu(e,t,n){if(e=e.containerInfo,cp=_h,e=qr(e),Jr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(lp={focusedElem:e,selectionRange:r},_h=!1,n=(n&335544064)===n,iu=t,t=n?9270:1024;iu!==null;){if(e=iu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Kl(r[a]);if(e.alternate===null&&e.flags&2)n&&Il(e),uu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Kl(r),uu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Il(e),uu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,iu=r):(n&&ql(e),uu(n))}}Fl=null}function uu(e){for(;iu!==null;){var t=iu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){pf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=_i(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=yi(a.default,a.update),a!==`none`&&Bl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,iu=r;break}iu=t.return}}function du(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ju(e,n),r&4&&gl(5,n);break;case 1:if(ju(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){pf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){pf(n,n.return,e)}}}r&64&&vl(n),r&512&&bl(n,n.return);break;case 3:if(ju(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{wo(e,t)}catch(e){pf(n,n.return,e)}}break;case 27:t===null&&r&4&&Nl(n);case 26:case 5:ju(e,n),t===null&&r&4&&Dl(n),r&512&&bl(n,n.return);break;case 12:ju(e,n);break;case 31:ju(e,n),r&4&&bu(e,n);break;case 13:ju(e,n),r&4&&xu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_f.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||$l,!r){var a=t!==null&&t.memoizedState!==null||eu;t=$l,i=eu,$l=r,(eu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Nu(e,n,r)):ju(e,n),$l=t,eu=i}break;case 30:ju(e,n),r&512&&bl(n,n.return);break;case 7:r&512&&bl(n,n.return);default:ju(e,n)}}function fu(e,t){for(e=e.child;e!==null;)pu(e,t),e=e.sibling}function pu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){pf(e,e.return,t)}mu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){pf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Tp(s,!0):Tp(e.stateNode,!1)}catch(t){pf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&fu(e,t);break;default:fu(e,t)}}function mu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:pu(n,r);break a;case 22:n.memoizedState===null&&mu(n,r);break a;default:mu(n,r)}}e=e.sibling}}function hu(e){var t=e.alternate;t!==null&&(e.alternate=null,hu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(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 gu=null,_u=!1;function vu(e,t,n){for(n=n.child;n!==null;)yu(e,t,n),n=n.sibling}function yu(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:eu||xl(n,t),vu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!eu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:eu||xl(n,t),wl(n);var r=gu,i=_u;Cp(n.type)&&(gu=n.stateNode,_u=!1),vu(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),gu=r,_u=i;break;case 5:eu||xl(n,t),wl(n);case 6:if(n.tag===6&&wl(n),r=gu,i=_u,gu=null,vu(e,t,n),gu=r,_u=i,gu!==null){if(_u)try{(gu.nodeType===9?gu.body:gu.nodeName===`HTML`?gu.ownerDocument.body:gu).removeChild(n.stateNode),Gt=!0}catch(e){pf(n,t,e)}else try{gu.removeChild(n.stateNode),Gt=!0}catch(e){pf(n,t,e)}}break;case 18:gu!==null&&(_u?(e=gu,wp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Uh(e)):wp(gu,n.stateNode));break;case 4:r=gu,i=_u,gu=n.stateNode.containerInfo,_u=!0,vu(e,t,n),gu=r,_u=i;break;case 0:case 11:case 14:case 15:_l(2,n,t),eu||_l(4,n,t),vu(e,t,n);break;case 1:eu||(xl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&yl(n,t,r)),vu(e,t,n);break;case 21:vu(e,t,n);break;case 22:eu=(r=eu)||n.memoizedState!==null,vu(e,t,n),eu=r;break;case 30:xl(n,t),vu(e,t,n);break;case 7:eu||xl(n,t),vu(e,t,n);break;default:vu(e,t,n)}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Uh(e)}catch(e){pf(t,t.return,e)}}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Uh(e)}catch(e){pf(t,t.return,e)}}function Su(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ru),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ru),t;default:throw Error(i(435,e.tag))}}function Cu(e,t){var n=Su(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=vf.bind(null,e,t);t.then(r,r)}})}function wu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Cp(l.type)){gu=l.stateNode,_u=!1;break a}break;case 5:gu=l.stateNode,_u=!1;break a;case 3:case 4:gu=l.stateNode.containerInfo,_u=!0;break a}l=l.return}if(gu===null)throw Error(i(160));yu(s,c,o),gu=null,_u=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eu(t,e,n),t=t.sibling}var Tu=null;function Eu(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}wu(t,e,n),Du(e),a&4&&(_l(3,e,e.return),gl(3,e),_l(5,e,e.return));break;case 1:wu(t,e,n),Du(e),a&512&&(eu||r===null||xl(r,r.return)),a&64&&$l&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Tu,wu(t,e,n),Du(e),a&512&&(eu||r===null||xl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if($l)e.stateNode=pp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ot]||r[xt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),rp(r,t,n),r[xt]=e,Ft(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[xt]=e,Ft(r),t=r}e.stateNode=t}}else $l||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ol(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||eu||t.parentNode.removeChild(t)):a.count--,n===null?$l||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:wu(t,e,n),Du(e),a&512&&(eu||r===null||xl(r,r.return)),r!==null&&a&4&&Ol(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=tu,tu=!1,wu(t,e,n),tu=o,Du(e),a&512&&(eu||r===null||xl(r,r.return)),e.flags&32){t=e.stateNode;try{un(t,``),Gt=!0}catch(t){pf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ol(e,t,r===null?t:r.memoizedProps)),a&1024&&(nu=!0);break;case 6:if(wu(t,e,n),Du(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){pf(e,e.return,t)}}break;case 3:if(Gt=!1,Gm=null,o=Tu,Tu=xm(t.containerInfo),wu(t,e,n),Tu=o,Du(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Uh(t.containerInfo)}catch(t){pf(e,e.return,t)}nu&&(nu=!1,Ou(e)),Gt=!1;break;case 4:a=tu,tu=$l,r=Kt(),o=Tu,Tu=xm(e.stateNode.containerInfo),wu(t,e,n),Du(e),Tu=o,Gt&&ou&&(su=!0),Gt=r,tu=a;break;case 12:wu(t,e,n),Du(e);break;case 31:wu(t,e,n),Du(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 13:wu(t,e,n),Du(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(pd=ze()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=$l,l=eu,u=tu;$l=c||o,tu=u||o,eu=l||s,wu(t,e,n),eu=l,tu=u,$l=c,Du(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||$l||eu||(t=s||eu,n=$l,r=eu,$l=o||$l,eu=t,Mu(e,2),$l=n,eu=r),!o&&tu||fu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Cu(e,n))));break;case 19:wu(t,e,n),Du(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 30:a&512&&(eu||r===null||xl(r,r.return)),a=Kt(),o=ou,s=(n&335544064)===n,c=e.memoizedProps,ou=s&&yi(c.default,c.update)!==`none`,wu(t,e,n),Du(e),s&&r!==null&&Gt&&(e.flags|=4),ou=o,Gt=a;break;case 21:break;case 7:a&512&&(eu||r===null||xl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:wu(t,e,n),Du(e)}}function Du(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(kl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(El(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Tl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Ml(e,Al(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(un(l,``),n.flags&=-33),Ml(e,Al(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;jl(e,Al(e),u,s);break;default:throw Error(i(161))}}catch(t){pf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ou(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ou(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,_h=!0,t.reset(),_h=!1),e=e.sibling}}function ku(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Au(t,e),t=t.sibling;else Ql(t,!1)}function Au(e,t){var n=e.alternate;if(n===null)Wl(e,!1);else switch(e.tag){case 3:if(cu=au=!1,Rl(),ku(t,e),!au&&!su){if(e=Ll,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Dp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),cu=!0}Ll=null;break;case 5:ku(t,e);break;case 4:r=au,au=!1,ku(t,e),au&&(su=!0),au=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ku(t,e):Wl(e,!1));break;case 30:r=au,i=Rl(),au=!1,ku(t,e),au&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=_i(a,o),o=_i(n.memoizedProps,o);var s=yi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,zl=0,t=Zl(e,n,t,o,s,a,!0),zl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Md(e,e.memoizedProps.onUpdate),Ll=i):i!==null&&(i.push.apply(i,Ll),Ll=i),au=e.flags&32?!0:r;break;default:ku(t,e)}}function ju(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)du(e,t.alternate,t),t=t.sibling}function Mu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:_l(4,n,n.return),Mu(n,r);break;case 1:xl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&yl(n,n.return,i),Mu(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:xl(n,n.return),n.tag!==5&&n.tag!==27||wl(n),Mu(n,r);break;case 6:wl(n);break;case 26:xl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||eu||i.parentNode.removeChild(i),Mu(n,r);break;case 22:n.memoizedState===null&&Mu(n,r);break;case 30:xl(n,n.return),Mu(n,r);break;case 7:xl(n,n.return);default:Mu(n,r)}e=e.sibling}}function Nu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Nu(i,a,n),gl(4,a);break;case 1:if(Nu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){pf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Co(l[i],c)}catch(e){pf(r,r.return,e)}}s&&o&64&&vl(a),bl(a,a.return);break;case 27:n&2&&Nl(a);case 5:a.tag!==5&&a.tag!==27||Cl(a),Nu(i,a,n),s&&r===null&&o&4&&Dl(a),bl(a,a.return);break;case 6:Cl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||$l||qm(xm(c.ownerDocument),a.type,c),Nu(i,a,n),s&&r===null&&o&4&&Dl(a),bl(a,a.return);break;case 12:Nu(i,a,n);break;case 31:Nu(i,a,n),s&&o&4&&bu(i,a);break;case 13:Nu(i,a,n),s&&o&4&&xu(i,a);break;case 22:a.memoizedState===null&&Nu(i,a,n),bl(a,a.return);break;case 30:Nu(i,a,n),bl(a,a.return);break;case 7:bl(a,a.return);default:Nu(i,a,n)}t=t.sibling}}function Pu(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&&Na(n))}function Fu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Na(e))}function Iu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Lu(e,t,n,r),t=t.sibling;else i&&Xl(t)}function Lu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Yl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Iu(e,t,n,r),a&2048&&gl(9,t);break;case 1:Iu(e,t,n,r);break;case 3:Iu(e,t,n,r),i&&cu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Na(a)));break;case 12:if(a&2048){Iu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){pf(t,t.return,e)}}else Iu(e,t,n,r);break;case 31:Iu(e,t,n,r);break;case 13:Iu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Yl(t),o._visibility&2?Iu(e,t,n,r):(o._visibility|=2,Ru(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Yl(s),o._visibility&2?Iu(e,t,n,r):zu(e,t)),a&2048&&Pu(s,t);break;case 24:Iu(e,t,n,r),a&2048&&Fu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Hl(a.child,!0),Hl(t.child,!0))),Iu(e,t,n,r);break;default:Iu(e,t,n,r)}}function Ru(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:Ru(a,o,s,c,i),gl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ru(a,o,s,c,i)):u._visibility&2?Ru(a,o,s,c,i):zu(a,o),i&&l&2048&&Pu(o.alternate,o);break;case 24:Ru(a,o,s,c,i),i&&l&2048&&Fu(o.alternate,o);break;default:Ru(a,o,s,c,i)}t=t.sibling}}function zu(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:zu(n,r),i&2048&&Pu(r.alternate,r);break;case 24:zu(n,r),i&2048&&Fu(r.alternate,r);break;default:zu(n,r)}t=t.sibling}}var Bu=8192;function Vu(e,t,n){if(e.subtreeFlags&Bu)for(e=e.child;e!==null;)Hu(e,t,n),e=e.sibling}function Hu(e,t,n){switch(e.tag){case 26:Vu(e,t,n),e.flags&Bu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Qm(n,e)):$m(n,Tu,e.memoizedState,e.memoizedProps));break;case 5:Vu(e,t,n),e.flags&Bu&&(e=e.stateNode,(t&335544128)===t&&Qm(n,e));break;case 3:case 4:var r=Tu;Tu=xm(e.stateNode.containerInfo),Vu(e,t,n),Tu=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Bu,Bu=16777216,Vu(e,t,n),Bu=r):Vu(e,t,n));break;case 30:if((e.flags&Bu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Fl===null&&(Fl=new Map),Fl.set(r,i)}Vu(e,t,n);break;default:Vu(e,t,n)}}function Uu(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 Wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,qu(r,e)}Uu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gu(e),e=e.sibling}function Gu(e){switch(e.tag){case 0:case 11:case 15:Wu(e),e.flags&2048&&_l(9,e,e.return);break;case 3:Wu(e);break;case 12:Wu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ku(e)):Wu(e);break;default:Wu(e)}}function Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];iu=r,qu(r,e)}Uu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_l(8,t,t.return),Ku(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ku(t));break;default:Ku(t)}e=e.sibling}}function qu(e,t){for(;iu!==null;){var n=iu;switch(n.tag){case 0:case 11:case 15:_l(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:Na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,iu=r;else a:for(n=e;iu!==null;){r=iu;var i=r.sibling,a=r.return;if(hu(r),r===n){iu=null;break a}if(i!==null){i.return=a,iu=i;break a}iu=a}}}var Ju={getCacheForType:function(e){var t=Ta(ja),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ta(ja).controller.signal}},Yu=typeof WeakMap==`function`?WeakMap:Map,Xu=0,Zu=null,X=null,Z=0,Qu=0,$u=null,ed=!1,td=!1,nd=!1,rd=0,id=0,ad=0,od=0,sd=0,cd=0,ld=0,ud=null,dd=null,fd=!1,pd=0,md=0,hd=1/0,gd=null,_d=null,vd=0,yd=null,bd=null,xd=0,Sd=0,Cd=null,wd=null,Td=null,Ed=null,Dd=null,Od=0,kd=null;function Ad(){return Xu&2&&Z!==0?Z&-Z:R.T===null?vt():Pf()}function jd(){if(cd===0){if(!(Z&536870912)||B){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),cd=e}else cd=536870912}return e=Ao.current,e!==null&&(e.flags|=32),cd}function Md(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Fp(_i(e.memoizedProps,n))),Ed===null&&(Ed=[]),Ed.push(t.bind(null,r))}}function Nd(e,t,n){(e===Zu&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)&&(Bd(e,0),Ld(e,Z,cd,!1)),dt(e,n),(!(Xu&2)||e!==Zu)&&(e===Zu&&(!(Xu&2)&&(od|=n),id===4&&Ld(e,Z,cd,!1)),Ef(e))}function Pd(e,t,n){if(Xu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ot(e,t),a=r?Jd(e,t):Kd(e,t,!0),o=r;do{if(a===0){td&&!r&&Ld(e,t,0,!1);break}if(n=e.current.alternate,o&&!Id(n)){a=Kd(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=ud;var l=c.current.memoizedState.isDehydrated;if(l&&(Bd(c,s).flags|=256),s=Kd(c,s,!1),s!==2&&s!==6){if(nd&&!l){c.errorRecoveryDisabledLanes|=o,od|=o,a=4;break a}o=dd,dd=a,o!==null&&(dd===null?dd=o:dd.push.apply(dd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Bd(e,0),Ld(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&&(t&62914560)!==t)break;case 6:Ld(r,t,cd,!ed);break a;case 2:dd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=pd+300-ze(),10<a)){if(Ld(r,t,cd,!ed),at(r,0,!0)!==0)break a;xd=t,r.timeoutHandle=_p(Fd.bind(null,r,n,dd,gd,fd,t,cd,od,ld,ed,o,`Throttled`,-0,0),a);break a}Fd(r,n,dd,gd,fd,t,cd,od,ld,ed,o,null,-0,0)}break}while(1);Ef(e)}function Fd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vn},Fl=null,Hu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=rh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?pd-ze():(a&4194048)===a?md-ze():0,m=th(d,m),m!==null)){xd=a,e.cancelPendingCommit=m(tf.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Ld(e,a,o,!l);return}tf(e,t,a,n,r,i,o,s,c,l,u,d)}function Id(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(!Vr(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 Ld(e,t,n,r){t=st(e,t),t&=~sd,t&=~od,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&pt(e,n,t)}function Rd(){return Xu&6?!0:(Df(0,!1),!1)}function zd(){if(X!==null){if(Qu===0)var e=X.return;else e=X,_a=ga=null,is(e),ao=null,oo=0,e=X;for(;e!==null;)hl(e.alternate,e),e=e.return;X=null}}function Bd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,vp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xd=0,zd(),Zu=e,X=n=Pi(e.current,null),Z=t,Qu=0,$u=null,ed=!1,td=ot(e,t),nd=!1,ld=cd=sd=od=ad=id=0,dd=ud=null,fd=!1,rd=st(e,t),wi(),n}function Vd(e,t){H=null,R.H=fc,t===Ya||t===Za?(t=ro(),Qu=3):t===Xa?(t=ro(),Qu=4):Qu=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,$u=t,X===null&&(id=1,wc(e,Hi(t,e.current)))}function Hd(){var e=Ao.current;return e===null?!0:(Z&4194048)===Z?jo===null:(Z&62914560)===Z||Z&536870912?e===jo:!1}function Ud(){var e=R.H;return R.H=fc,e===null?fc:e}function Wd(){var e=R.A;return R.A=Ju,e}function Gd(){id=4,ed||(Z&4194048)!==Z&&Ao.current!==null||(td=!0),!(ad&134217727)&&!(od&134217727)||Zu===null||Ld(Zu,Z,cd,!1)}function Kd(e,t,n){var r=Xu;Xu|=2;var i=Ud(),a=Wd();(Zu!==e||Z!==t)&&(gd=null,Bd(e,t)),t=!1;var o=id;a:do try{if(Qu!==0&&X!==null){var s=X,c=$u;switch(Qu){case 8:zd(),o=6;break a;case 3:case 2:case 9:case 6:Ao.current===null&&(t=!0);var l=Qu;if(Qu=0,$u=null,Qd(e,s,c,l),n&&td){o=0;break a}break;default:l=Qu,Qu=0,$u=null,Qd(e,s,c,l)}}qd(),o=id;break}catch(t){Vd(e,t)}while(1);return t&&e.shellSuspendCounter++,_a=ga=null,Xu=r,R.H=i,R.A=a,X===null&&(Zu=null,Z=0,wi()),o}function qd(){for(;X!==null;)Xd(X)}function Jd(e,t){var n=Xu;Xu|=2;var r=Ud(),a=Wd();Zu!==e||Z!==t?(gd=null,hd=ze()+500,Bd(e,t)):td=ot(e,t);a:do try{if(Qu!==0&&X!==null){t=X;var o=$u;b:switch(Qu){case 1:Qu=0,$u=null,Qd(e,t,o,1);break;case 2:case 9:if($a(o)){Qu=0,$u=null,Zd(t);break}t=function(){Qu!==2&&Qu!==9||Zu!==e||(Qu=7),Ef(e)},o.then(t,t);break a;case 3:Qu=7;break a;case 4:Qu=5;break a;case 7:$a(o)?(Qu=0,$u=null,Zd(t)):(Qu=0,$u=null,Qd(e,t,o,7));break;case 5:var s=null;switch(X.tag){case 26:s=X.memoizedState;case 5:case 27:var c=X;if(s?Xm(s):c.stateNode.complete){Qu=0,$u=null;var l=c.sibling;if(l!==null)X=l;else{var u=c.return;u===null?X=null:(X=u,$d(u))}break b}}Qu=0,$u=null,Qd(e,t,o,5);break;case 6:Qu=0,$u=null,Qd(e,t,o,6);break;case 8:zd(),id=6;break a;default:throw Error(i(462))}}Yd();break}catch(t){Vd(e,t)}while(1);return _a=ga=null,R.H=r,R.A=a,Xu=n,X===null?(Zu=null,Z=0,wi(),id):0}function Yd(){for(;X!==null&&!Le();)Xd(X)}function Xd(e){var t=ol(e.alternate,e,rd);e.memoizedProps=e.pendingProps,t===null?$d(e):X=t}function Zd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Vc(n,t,t.pendingProps,t.type,void 0,Z);break;case 11:t=Vc(n,t,t.pendingProps,t.type.render,t.ref,Z);break;case 5:is(t);var r=t;r===ra&&(B?(ua(r),r.tag===5&&r.stateNode!=null&&(ia=r.stateNode)):(ua(r),B=!0));default:hl(n,t),t=X=Fi(t,rd),t=ol(n,t,rd)}e.memoizedProps=e.pendingProps,t===null?$d(e):X=t}function Qd(e,t,n,r){_a=ga=null,is(t),ao=null,oo=0;var i=t.return;try{if(kc(e,i,t,n,Z)){id=1,wc(e,Hi(n,e.current)),X=null;return}}catch(t){if(i!==null)throw X=i,t;id=1,wc(e,Hi(n,e.current)),X=null;return}t.flags&32768?(B||r===1?e=!0:td||Z&536870912?e=!1:(ed=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),ef(t,e)):$d(t)}function $d(e){var t=e;do{if(t.flags&32768){ef(t,ed);return}e=t.return;var n=pl(t.alternate,t,rd);if(n!==null){X=n;return}if(t=t.sibling,t!==null){X=t;return}X=t=e}while(t!==null);id===0&&(id=5)}function ef(e,t){do{var n=ml(e.alternate,e);if(n!==null){n.flags&=32767,X=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){X=e;return}X=e=n}while(e!==null);id=6,X=null}function tf(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do uf();while(vd!==0);if(Xu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===Zu&&(X=Zu=null,Z=0),bd=t,yd=e,xd=n,Cd=a,wd=r,nf(e,t,n,s,c,l,f)}}function nf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Sd=s,s|=Ci,ft(e,n,s,r,i,a),Ed=null,(n&335544064)===n?(Dd=Ia(e),r=10262):(Dd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,yf(Ue,function(){return df(),null})):(e.callbackNode=null,e.callbackPriority=0),Pl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=R.T,R.T=null,i=z.p,z.p=2,a=Xu,Xu|=4;try{lu(e,t,n)}finally{Xu=a,z.p=i,R.T=r}}vd=1,Pl?Td=Np(o,e.containerInfo,Dd,of,sf,af,cf,df,rf,null,null):(of(),sf(),cf())}function rf(e){if(vd!==0){var t=yd.onRecoverableError;t(e,{componentStack:null})}}function af(){vd===3&&(vd=0,Au(bd,yd),vd=4)}function of(){if(vd===1){vd=0;var e=yd,t=bd,n=xd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=R.T,R.T=null;var i=z.p;z.p=2;var a=Xu;Xu|=4;try{ou=su=!1,Eu(t,e,n),n=lp;var o=qr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Kr(s.ownerDocument.documentElement,s)){if(c!==null&&Jr(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 _=Gr(s,h),v=Gr(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}}_h=!!cp,lp=cp=null}finally{Xu=a,z.p=i,R.T=r}}e.current=t,vd=2}}function sf(){if(vd===2){vd=0;var e=yd,t=bd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=R.T,R.T=null;var r=z.p;z.p=2;var i=Xu;Xu|=4;try{du(e,t.alternate,t)}finally{Xu=i,z.p=r,R.T=n}}vd=3}}function cf(){if(vd===4||vd===3){vd=0;var e=Td;Td=null,Re();var t=yd,n=bd,r=xd,i=wd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?vd=5:(vd=0,bd=yd=null,lf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(_d=null),_t(r),n=n.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=R.T,a=z.p,z.p=2,R.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{R.T=n,z.p=a}}if(i=Ed,o=Dd,Dd=null,i!==null&&(Ed=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);xd&3&&uf(),Ef(t),a=t.pendingLanes,r&261930&&a&42?t===kd?Od++:(Od=0,kd=t):(Od=0,kd=null),Df(0,!1)}}function lf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Na(t)))}function uf(){return Td!==null&&(Td.skipTransition(),Td=null),of(),sf(),cf(),df()}function df(){if(vd!==5)return!1;var e=yd,t=Sd;Sd=0;var n=_t(xd),r=R.T,a=z.p;try{z.p=32>n?32:n,R.T=null,n=Cd,Cd=null;var o=yd,s=xd;if(vd=0,bd=yd=null,xd=0,Xu&6)throw Error(i(331));var c=Xu;if(Xu|=4,Gu(o.current),Lu(o,o.current,s,n),Xu=c,Df(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{z.p=a,R.T=r,lf(e,t)}}function ff(e,t,n){t=Hi(n,t),t=Ec(e.stateNode,t,2),e=_o(e,t,2),e!==null&&(dt(e,2),Ef(e))}function pf(e,t,n){if(e.tag===3)ff(e,e,n);else for(;t!==null;){if(t.tag===3){ff(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(_d===null||!_d.has(r))){e=Hi(n,e),n=Dc(2),r=_o(t,n,2),r!==null&&(Oc(n,r,t,e),dt(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yu;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)||(nd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Zu===e&&(Z&n)===n&&(id===4||id===3&&(Z&62914560)===Z&&300>ze()-pd?Xu&2?sd|=n:Bd(e,0):sd|=n,ld===Z&&(ld=0)),Ef(e)}function gf(e,t){t===0&&(t=lt()),e=Di(e,t),e!==null&&(dt(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(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),gf(e,n)}function yf(e,t){return Fe(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;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-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Z,a=at(r,r===Zu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&gp()&&(e=Tf);for(var t=ze(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}vd!==0&&vd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ct(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Zu,n=Z,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qu===2||Qu===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),_t(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=jf.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function jf(e,t){if(vd!==0&&vd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uf()&&e.callbackNode!==n)return null;var r=Z;return r=at(e,e===Zu?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Pd(e,r,t),Af(e,ze()),e.callbackNode!=null&&e.callbackNode===n?jf.bind(null,e):null)}function Mf(e,t){if(uf())return null;Pd(e,t,!0)}function Nf(){xp(function(){Xu&6?Fe(Ve,Of):kf()})}function Pf(){if(Tf===0){var e=za;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),Tf=e}return Tf}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:_n(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[St]||null).action),o=r.submitter;o&&(t=(t=o[St]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new zn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Tf!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<mi.length;Lf++){var Rf=mi[Lf];hi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}hi(oi,`onAnimationEnd`),hi(si,`onAnimationIteration`),hi(ci,`onAnimationStart`),hi(`dblclick`,`onDoubleClick`),hi(`focusin`,`onFocus`),hi(`focusout`,`onBlur`),hi(li,`onTransitionRun`),hi(ui,`onTransitionStart`),hi(di,`onTransitionCancel`),hi(fi,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`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(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);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){bi(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){bi(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[wt];n===void 0&&(n=t[wt]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(wh(t)){case 2:var i=vh;break;case 8:i=yh;break;default:i=bh}n=i.bind(null,t,n,e),i=void 0,!On||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 Kf(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=jt(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}Tn(function(){var r=a,i=bn(n),s=[];a:{var c=pi.get(e);if(c!==void 0){var l=zn,u=e;switch(e){case`keypress`:if(Pn(n)===0)break a;case`keydown`:case`keyup`:l=rr;break;case`focusin`:u=`focus`,l=Jn;break;case`focusout`:u=`blur`,l=Jn;break;case`beforeblur`:case`afterblur`:l=Jn;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=Kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=qn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=or;break;case oi:case si:case ci:l=Yn;break;case fi:l=sr;break;case`scroll`:case`scrollend`:l=Vn;break;case`wheel`:l=cr;break;case`copy`:case`cut`:case`paste`:l=Xn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=ir;break;case`submit`:l=ar;break;case`toggle`:case`beforetoggle`:l=lr}var d=!!(t&4),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(qf(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(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==yn&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[Ct]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=ir,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Yf):null,c!==null&&Xf(s,u,c,d,!1),l!==null&&f!==null&&Xf(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=kr;else if(Cr(c)){if(Ar)_=zr;else{_=Lr;var v=Ir}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&mn(r.elementType)&&(_=kr):_=Rr;if(_&&=_(e,r)){wr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(Cr(v)||v.contentEditable===`true`)&&(Xr=v,Zr=r,Qr=null);break;case`focusout`:Qr=Zr=Xr=null;break;case`mousedown`:$r=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:$r=!1,ei(s,n,i);break;case`selectionchange`:if(Yr)break;case`keydown`:case`keyup`:ei(s,n,i)}var y;if(dr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else yr?_r(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(mr&&n.locale!==`ko`&&(yr||b!==`onCompositionStart`?b===`onCompositionEnd`&&yr&&(y=Nn()):(An=i,jn=`value`in An?An.value:An.textContent,yr=!0)),v=Jf(r,b),0<v.length&&(b=new Zn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=vr(n),y!==null&&(b.data=y)))),(y=pr?br(e,n):xr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new Zn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(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(qf(e,i,a)),i=En(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(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(qf(n,l,c))):i||(l=En(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
|
|
9
9
|
`).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function tp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||un(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&un(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:pn(e,r,o);return;case`data`:if(t!==`object`){Jt(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=_n(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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&tp(e,t,`name`,a.name,a,null),tp(e,t,`formEncType`,a.formEncType,a,null),tp(e,t,`formMethod`,a.formMethod,a,null),tp(e,t,`formTarget`,a.formTarget,a,null)):(tp(e,t,`encType`,a.encType,a,null),tp(e,t,`method`,a.method,a,null),tp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=_n(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=vn);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;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));o?.__html!==n&&(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=_n(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`credentialless`: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`:Q(`beforetoggle`,e),Q(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=hn.get(n)||n,qt(e,n,r);else return}Gt=!0}function np(e,t,n,r,a,o){switch(n){case`style`:pn(e,r,o);return;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));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)un(e,r);else if(typeof r==`number`||typeof r==`bigint`)un(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=vn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[St]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!0}function rp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`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:tp(e,t,o,s,n,null)}}a&&tp(e,t,`srcSet`,n.srcSet,n,null),r&&tp(e,t,`src`,n.src,n,null);return;case`input`:Q(`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:tp(e,t,r,d,n,null)}}an(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`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:tp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&sn(e,!!r,n,!0):sn(e,!!r,t,!1);return;case`textarea`:for(s in Q(`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:tp(e,t,s,c,n,null)}ln(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:tp(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Q(zf[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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:tp(e,t,u,r,n,null)}return;default:if(mn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&np(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&tp(e,t,c,r,n,null))}var ip={};function ap(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)||tp(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`:m!==f&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&tp(e,t,p,m,r,f)}}rn(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)||tp(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`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&tp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?sn(e,!!n,n?[]:``,!1):sn(e,!!n,t,!0)):sn(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:tp(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`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&tp(e,t,s,a,r,o)}cn(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:tp(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`:p!==m&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:tp(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)&&tp(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:tp(e,t,u,p,r,m)}return;default:if(mn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&np(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||np(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&tp(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||tp(e,t,f,p,r,m)}function op(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function sp(){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&&op(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&&op(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 cp=null,lp=null;function up(e){return e.nodeType===9?e:e.ownerDocument}function dp(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 fp(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 pp(e,t,n,r){return n=up(n).createElement(e),n[xt]=r,n[St]=t,rp(n,e,t),Ft(n),n}function mp(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 hp=null;function gp(){var e=window.event;return e&&e.type===`popstate`?e!==hp&&(hp=e,!0):(hp=null,!1)}var _p=typeof setTimeout==`function`?setTimeout:void 0,vp=typeof clearTimeout==`function`?clearTimeout:void 0,yp=typeof Promise==`function`?Promise:void 0,bp=typeof requestAnimationFrame==`function`?requestAnimationFrame:_p,xp=typeof queueMicrotask==`function`?queueMicrotask:yp===void 0?_p:function(e){return yp.resolve(null).then(e).catch(Sp)};function Sp(e){setTimeout(function(){throw e})}function Cp(e){return e===`head`}function wp(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),Uh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(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`&&vm(e.ownerDocument.body)}n=i}while(n);Uh(t)}function Tp(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 Ep(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Dp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Op(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function kp(e){return Op(e.getBoundingClientRect(),getComputedStyle(e),e)}function Ap(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Op(t,n,e)}function jp(e){return e.documentElement.clientHeight}function Mp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Np(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(jp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Zm(f),u>eh){s.length=o;break}f=new Promise(Mp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Pp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Pp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Pp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Fp(e){return{name:e,group:new Pp(`group`,e),imagePair:new Pp(`image-pair`,e),old:new Pp(`old`,e),new:new Pp(`new`,e)}}function Ip(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ip.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Vp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,Lp,e,s,r)}this._eventListeners=a}};function Lp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Ip.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Ip.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Ip.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=b(e),mm(e,t))}Ip.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Ip.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=up(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Ip.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Ip.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Ip.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Ip.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Ip.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Up,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Qp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Ip.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Up,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Qp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Qp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=b(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(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`:rm(n),At(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(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=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(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 um(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 dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(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 mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function hm(e){bp(function(){bp(function(t){return e(t)})})}function gm(e,t,n){switch(t=up(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 _m(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&tp(e,t,r,null,ip,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===vn&&(e.onclick=null),At(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=z.d;z.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Rd();return e||t}function wm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),rp(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);rp(o,`link`,e),t===`style`&&(o[kt]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zm(e)}if(!ym.has(a)&&(e=D({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),rp(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=Pt(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);Ft(c),rp(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,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=Pt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Ft(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=Pt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Ft(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=xe.current)?xm(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`?(n=Fm(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,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=Fm(n.href);var o=Pt(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(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,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`?(n=zm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Fm(e){return`href="`+nn(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[kt]){r.loading=1;return}}else t=e.createElement(`link`),t[kt]=!0,t.onload=t.onerror=It.bind(null,t),rp(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function zm(e){return`[src="`+nn(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),rp(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Lm(n),(a=ym.get(a))&&Um(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}),rp(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=ym.get(o))&&(r=D({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),rp(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,Hm(r,n.precedence,e));return t.instance}function Hm(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 Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,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[xt]||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 qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jm(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 Ym(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Xm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Qm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Zm(t),e.suspenseyImages.push(t)),e=ih.bind(e),t.decode().then(e,e))}function $m(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=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),rp(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=rh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var eh=0;function th(e,t){return e.stylesheets&&e.count===0&&oh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&eh===0&&(eh=62500*sp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&oh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>eh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function nh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)oh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function rh(){this.count--,nh(this)}function ih(){this.imgCount--,nh(this)}var ah=null;function oh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ah=new Map,t.forEach(sh,e),ah=null,rh.call(e))}function sh(e,t){if(!(t.state.loading&4)){var n=ah.get(e);if(n)var r=n.get(null);else{n=new Map,ah.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=rh.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 ch={$$typeof:F,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function lh(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=ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ut(0),this.hiddenUpdates=ut(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function uh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new lh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Mi(3,null,null,t),e.current=a,a.stateNode=e,t=Ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ho(a),e}function dh(e){return e?(e=Ai,e):Ai}function fh(e,t,n,r,i,a){i=dh(i),r.context===null?r.context=i:r.pendingContext=i,r=go(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=_o(e,r,t),n!==null&&(Nd(n,e,t),vo(n,e,t))}function ph(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mh(e,t){ph(e,t),(e=e.alternate)&&ph(e,t)}function hh(e){if(e.tag===13||e.tag===31){var t=Di(e,67108864);t!==null&&Nd(t,e,67108864),mh(e,67108864)}}function gh(e){if(e.tag===13||e.tag===31){var t=Ad();t=gt(t);var n=Di(e,t);n!==null&&Nd(n,e,t),mh(e,t)}}var _h=!0;function vh(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=2,bh(e,t,n,r)}finally{z.p=a,R.T=i}}function yh(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=8,bh(e,t,n,r)}finally{z.p=a,R.T=i}}function bh(e,t,n,r){if(_h){var i=xh(r);if(i===null)Kf(e,t,r,Sh,n),Nh(e,r);else if(Fh(i,e,t,n,r))r.stopPropagation();else if(Nh(e,r),t&4&&-1<Mh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}Ef(a),!(Xu&6)&&(hd=ze()+500,Df(0,!1))}}break;case 31:case 13:s=Di(a,2),s!==null&&Nd(s,a,2),Rd(),mh(a,2)}if(a=xh(r),a===null&&Kf(e,t,r,Sh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function xh(e){return e=bn(e),Ch(e)}var Sh=null;function Ch(e){if(Sh=null,e=jt(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 Sh=e,null}function wh(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`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Th=!1,Eh=null,Dh=null,Oh=null,kh=new Map,Ah=new Map,jh=[],Mh=`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 Nh(e,t){switch(e){case`focusin`:case`focusout`:Eh=null;break;case`dragenter`:case`dragleave`:Dh=null;break;case`mouseover`:case`mouseout`:Oh=null;break;case`pointerover`:case`pointerout`:kh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ah.delete(t.pointerId)}}function Ph(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=Mt(t),t!==null&&hh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Fh(e,t,n,r,i){switch(t){case`focusin`:return Eh=Ph(Eh,e,t,n,r,i),!0;case`dragenter`:return Dh=Ph(Dh,e,t,n,r,i),!0;case`mouseover`:return Oh=Ph(Oh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return kh.set(a,Ph(kh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ah.set(a,Ph(Ah.get(a)||null,e,t,n,r,i)),!0}return!1}function Ih(e){var t=jt(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,yt(e.priority,function(){gh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,yt(e.priority,function(){gh(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 Lh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=xh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);yn=r,n.target.dispatchEvent(r),yn=null}else return t=Mt(n),t!==null&&hh(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){Lh(e)&&n.delete(t)}function zh(){Th=!1,Eh!==null&&Lh(Eh)&&(Eh=null),Dh!==null&&Lh(Dh)&&(Dh=null),Oh!==null&&Lh(Oh)&&(Oh=null),kh.forEach(Rh),Ah.forEach(Rh)}function Bh(e,n){e.blockedOn===n&&(e.blockedOn=null,Th||(Th=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zh)))}var Vh=null;function Hh(e){Vh!==e&&(Vh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Vh===e&&(Vh=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(Ch(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Uh(e){function t(t){return Bh(t,e)}Eh!==null&&Bh(Eh,e),Dh!==null&&Bh(Dh,e),Oh!==null&&Bh(Oh,e),kh.forEach(t),Ah.forEach(t);for(var n=0;n<jh.length;n++){var r=jh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<jh.length&&(n=jh[0],n.blockedOn===null);)Ih(n),n.blockedOn===null&&jh.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[St]||null;if(typeof a==`function`)o||Hh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[St]||null)s=o.formAction;else if(Ch(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Hh(n)}}}function Wh(){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 Gh(e){this._internalRoot=e}Kh.prototype.render=Gh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;fh(n,Ad(),e,t,null,null)},Kh.prototype.unmount=Gh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fh(e.current,2,null,e,null,null),Rd(),t[Ct]=null}};function Kh(e){this._internalRoot=e}Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=vt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jh.length&&t!==0&&t<jh[n].priority;n++);jh.splice(n,0,e),n===0&&Ih(e)}};var qh=n.version;if(qh!==`19.3.0`)throw Error(i(527,qh,`19.3.0`));z.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 Jh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:R,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Yh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yh.isDisabled&&Yh.supportsFiber)try{Je=Yh.inject(Jh),Ye=Yh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;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=uh(e,1,!1,null,null,n,r,null,o,s,c,Wh),e[Ct]=t.current,Wf(e),new Gh(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=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})),x=o(((e,t)=>{t.exports=b()}))(),S=v.createContext(void 0),C=e=>{let t=v.useContext(S);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},w=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,x.jsx)(S.Provider,{value:e,children:t})),T={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},E=new class{#e=T;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function D(e){setTimeout(e,0)}var O=typeof window>`u`||`Deno`in globalThis;function k(){}function A(e,t){return typeof e==`function`?e(t):e}function j(e){return typeof e==`number`&&e>=0&&e!==1/0}function M(e,t){return Math.max(e+(t||0)-Date.now(),0)}function N(e,t){return typeof e==`function`?e(t):e}function P(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ee(o,t.options))return!1}else if(!te(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function F(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(I(t.options.mutationKey)!==I(a))return!1}else if(!te(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ee(e,t){return(t?.queryKeyHashFn||I)(e)}function I(e){return JSON.stringify(e,(e,t)=>ae(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function te(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!te(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!te(e[r],t[r]))return!1;return!0}return!1}var ne=Object.prototype.hasOwnProperty;function L(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ie(e)&&ie(t);if(!r&&!(ae(e)&&ae(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ne.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=L(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function re(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ie(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ae(e){if(!oe(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!oe(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function oe(e){return Object.prototype.toString.call(e)===`[object Object]`}function se(e){return new Promise(t=>{E.setTimeout(t,e)})}function ce(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:L(e,t)}function le(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ue(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var de=Symbol();function fe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===de?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function R(e,t){return typeof e==`function`?e(...t):!!e}function z(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var pe=()=>O,me=()=>pe(),he=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ge=new class extends he{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},_e=D;function ve(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=_e,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var ye=ve(),be=new class extends he{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function xe(e){return Math.min(1e3*2**e,3e4)}function Se(e){return(e??`online`)!==`online`||be.isOnline()}var Ce=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function we(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(k);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Ce(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>ge.isFocused()&&(e.networkMode===`always`||be.isOnline())&&e.canRun(),p=()=>Se(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(me()?0:3),a=e.retryDelay??xe,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),se(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var Te=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),j(this.gcTime)&&(this.#e=E.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(me()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(E.clearTimeout(this.#e),this.#e=void 0)}};function Ee(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{z(e,()=>t.signal,()=>n=!0)},u=fe(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?ue:le;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Oe:De,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:De(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function De(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Oe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ke=class extends Te{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Me(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Me(this.options);e.data!==void 0&&(this.setState(je(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ce(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(k).catch(k):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>N(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===de||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>N(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!M(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=fe(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Ee(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=we({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ce&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ce){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ae(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...je(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),ye.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ae(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Se(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function je(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Me(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ne=class extends he{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Fe(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ie(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ie(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof N(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!re(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Le(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||N(this.options.staleTime,this.#t)!==N(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||N(this.options.enabled,this.#t)!==N(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return re(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(k)),t}#h(e){return!me()&&N(this.options.enabled,this.#t)!==!1&&j(e)}#g(){this.#b();let e=N(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=M(this.#r.dataUpdatedAt,e)+1;this.#u=E.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return N(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=E.setInterval(()=>{(this.options.refetchIntervalInBackground||ge.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(E.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(E.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Fe(e,t),o=i&&Le(e,n,t,r);(a||o)&&(l={...l,...Ae(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=ce(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=ce(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Re(e,t),refetch:this.refetch,isEnabled:N(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),re(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();ye.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Pe(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||N(t.retryOnMount,e)!==!1)}function Fe(e,t){return Pe(e,t)||e.state.data!==void 0&&Ie(e,t,t.refetchOnMount)}function Ie(e,t,n){if(N(t.enabled,e)!==!1&&N(t.staleTime,e)!==`static`){let r=N(n,e);return r===`always`||r!==!1&&Re(e,t)}return!1}function Le(e,t,n,r){return(e!==t||N(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Re(e,n)}function Re(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(N(t.staleTime,e))}var ze=class extends Te{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Be(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=we({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),ye.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Be(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ve=class extends he{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new ze({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=He(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=He(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=He(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=He(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ye.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>F(t,e))}findAll(e={}){return this.getAll().filter(t=>F(e,t))}notify(e){ye.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ye.batch(()=>Promise.all(e.map(e=>e.continue().catch(k))))}};function He(e){return e.options.scope?.id}var Ue=class extends he{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),re(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&I(t.mutationKey)!==I(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Be();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){ye.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},We=class extends he{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??ee(r,t),a=this.get(i);return a||(a=new ke({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ye.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>P(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>P(e,t)):t}notify(e){ye.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ye.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ye.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ge=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new We,this.#t=e.mutationCache||new Ve,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ge.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=be.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(N(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=A(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ye.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;ye.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ye.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=ye.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(k).catch(k)}invalidateQueries(e,t={}){return ye.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=ye.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(k)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(k)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(N(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(N(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(k).catch(k)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(k).catch(k)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return be.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(I(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{te(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(I(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{te(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ee(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===de&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ke=v.createContext(!1),qe=()=>v.useContext(Ke);Ke.Provider;function Je(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ye=v.createContext(Je()),Xe=()=>v.useContext(Ye),Ze=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?R(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Qe=e=>{v.useEffect(()=>{e.clearReset()},[e])},$e=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||R(n,[e.error,r])),et=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},tt=(e,t)=>e?.suspense&&t.isPending,nt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rt(e,t,n){let r=qe(),i=Xe(),a=C(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,et(o),Ze(o,i,s),Qe(i);let[l]=v.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(v.useSyncExternalStore(v.useCallback(e=>{let t=d?l.subscribe(ye.batchCalls(e)):k;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(o)},[o,l]),tt(o,u))throw nt(o,l,i);if($e({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function it(e,t){return rt(e,Ne,t)}function at(e,t){let n=C(t),[r]=v.useState(()=>new Ue(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);let i=v.useSyncExternalStore(v.useCallback(e=>r.subscribe(ye.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=v.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(k)},[r]);if(i.error&&R(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var ot=v.useLayoutEffect;function st(e){return e[e.length-1]}function ct(e,t){return typeof e==`function`?e(t):e}var lt=Object.prototype.hasOwnProperty;function ut(e){for(let t in e)if(lt.call(e,t))return!0;return!1}var dt=()=>Object.create(null),ft=(e,t)=>pt(e,t,!0);function pt(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(mt(e)&&mt(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&st(a)!==`${o-1}`||c&&st(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let l=0,u,d,f;if(i){for(;l<c&&(f=l,d=e[f],u=t[f],u=d===u?d:typeof d==`object`?pt(d,u,n,r):u,u===d);l++);if(l===c&&o===c)return e}else{let i=o===c,p=!0;for(;l<c;l++){f=s[l],d=e[f];let o=t[f];u=d===o?d:typeof d==`object`?pt(d,o,n,r):o,i&&=u===d&&(a[l]===f||lt.call(e,f)),p&&=Object.is(u,o),a[l]=u}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(p)return t}let p=i?s.fill(0):n?dt():{};for(let o=0;o<c;o++)f=i?o:s[o],i?(d=e[f],o>l&&(u=t[f],u=d===u?d:typeof d==`object`?pt(d,u,n,r):u),p[f]=o<l?d:u):p[f]=a[o];return p}function mt(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function ht(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!ht(a,o,n,r))return!1}return!0}if(mt(e)&&mt(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!ht(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!ht(e[a],t[a],n,r)))return!1;return i===0}return!1}var gt=/[\x00-\x1f\x7f"<>`{}]/g;function _t(e){return e.replace(gt,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function vt(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return _t(t)}var yt=[`http:`,`https:`,`mailto:`,`tel:`];function bt(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var xt=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function St(e,t){if(!e)return!1;if(xt.test(e))return!0;let n=bt(e);return n?!t.has(n):!1}function Ct(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=vt(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=vt(r?e.slice(r):e)}return t}function wt(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Tt(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Et(){throw Error(`Invariant failed`)}function Dt(e){return e.replace(/\/{2,}/g,`/`)}function Ot(e){return e===`/`?e:e.replace(/^\/+/,``)}function kt(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function At(e){return kt(Ot(e))}function jt(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Mt(e,t,n=`never`,r){if(t.includes(`//`)&&(t=Dt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=Dt(e)),o=e.split(`/`);o.length>1&&st(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(st(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Dt(s):s)||`/`;return a&&r&&r.set(a,c),c}function Nt(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function Pt(e){return e==null||e===``}function Ft(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function It(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&Pt(f)){if(c===`/`&&!d)continue;f=``}o+=c+Ft(s,f,r)+(d||``)}}return o+a||`/`}function Lt(e){return e?.isNotFound===!0}function Rt(){try{return sessionStorage}catch{return}}var zt=`tsr-scroll-restoration-v1_3`,Bt=Rt();function Vt(){try{return JSON.parse(Bt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ht(){try{Bt?.setItem(zt,JSON.stringify(Ut))}catch{}}var Ut=Vt(),Wt=`data-scroll-restoration-id`,Gt=e=>e.state.__TSR_key||e.href;function Kt(e){let t=e.getAttribute(Wt);if(t)return`[${Wt}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var qt=!1,Jt=`window`;function Yt(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Xt(e){let t=new Set;for(let n of e){if(n===Jt)continue;let e=Yt(n);e&&t.add(e)}return t}function Zt(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Gt,a=new Set,o=e=>{let t=Ut[e]||={};for(let e of a)e===document?t[Jt]={scrollX,scrollY}:e.isConnected&&(t[Kt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,qt=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{qt||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ht()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=Ut[d];if(e){let t=Ut[u];for(let n in e){if(n===Jt){if(s)continue}else{let e=Yt(n);if(!e||s&&o&&(l??=Xt(o),l.has(e)))continue}t||=Ut[u]={},t[n]??=e[n]}}}qt=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Xt(o));let t=e&&i&&c,s=r.restoring?Ut[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Jt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Yt(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{qt=!1}}))}function Qt(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function $t(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function en(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=$t(r):Array.isArray(t)?t.push($t(r)):n[e]=[t,$t(r)]}return n}var tn=/^(?:\s|["[{\d-]|fa|nu|tr)/,nn=an(JSON.parse),rn=on(JSON.stringify,JSON.parse);function an(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=en(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!tn.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function on(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!tn.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Qt(e,r);return t?`?${t}`:``}}var sn=`__root__`;function cn(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ln(e){return e instanceof Response&&!!e.options}function un(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var dn=4,fn=5;function pn(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function mn(e,t,n){let r=e.substring(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.substring(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.substring(s,a);return[o?3:c?1:2,c||`_splat`,r.substring(0,i),e.substring(t+a+1,c?n:e.length)]}}return r}function hn(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=st(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=mn(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=_n(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.substring(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=_n(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.substring(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=_n(r,fn);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=_n(r,dn);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function gn(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function _n(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function vn(e,t){let n=_n(),r=[];function i(e,t,n,a){let[o,s,c]=hn(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(gn);t.masksTree=n,t.flatCache=un(1e3)}function yn(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Cn(e,t.masksTree);return t.flatCache.set(e,r),r}function bn(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=_n(),hn(t,{from:e},1,o),i.singleCache.set(a,o)),Cn(r,o,n)}function xn(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Cn(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Tn(a.route)),t.matchCache.set(r,a),a}function Sn(e,t=!1){let n=_n(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&Et(),i[e.id]=e,o!==0&&e.path){let t=kt(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=hn(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(gn);return{processedTree:{segmentTree:n,singleCache:un(1e3),matchCache:un(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Cn(e,t,n=!1){let r=e.split(`/`),i=Dn(e,r,t,n);if(!i)return null;let[a]=wn(e,r,i);return{route:i.node.route,rawParams:a}}function wn(e,t,n){let r=En(n.node),i=n.node.data&&pn(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===dn)break;if(u.kind===fn){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Tn(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function En(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Dn(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!st(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!jn(l,n))continue;if(i.parse){if(!An(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==dn&&jn(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===dn||i.kind===2)&&jn(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(An(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&kn(f,o))return n;jn(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+On(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+On(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+On(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+On(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function On(e,t){return 2**(e-t-1)}function kn(e,t){return e===2**(t-1)-1}function An(e,t,n){let r,i;try{[r,i]=wn(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function jn(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===dn)>(e.node.kind===dn)||t.node.kind===dn==(e.node.kind===dn)&&t.node.depth>e.node.depth)))}function Mn(e,t,n){let r=At(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=Dt(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Nn(n,s.input({url:e})),output:({url:e})=>s.output({url:Pn(n,e)})}:s}function Nn(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Pn(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Fn(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{Tt(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var In=`__TSR_index`,Ln=`popstate`,Rn=`beforeunload`,zn=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Bn(e){let t=zn.exec(e);return t?`/`+e.slice(t[0].length):e}function Vn(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
10
|
-
\r`.includes(e)?``:encodeURIComponent(e))),Bn(e)}function Hn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Gn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[In];i=Un(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[In];i=Un(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[In]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Un(e,t){let n=Kn();return{...t,key:n,__TSR_key:n,[In]:e}}function Wn(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>Vn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Gn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Kn();t.history.replaceState({[In]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Gn(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[In]-l.state[In],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Hn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Rn,x,{capture:!0}),t.removeEventListener(Ln,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Rn,x,{capture:!0}),t.addEventListener(Ln,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Gn(e,t){let n=Vn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Kn();t={[In]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Kn(){return(Math.random()+1).toString(36).substring(7)}function qn(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Jn(e){return e.pathname+e.search+e.hash}function Yn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Xn(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Zn({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Qn(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function $n(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var er=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Wn()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&At(n)?Mn(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Fn(this.latestLocation,e),Zt(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Sn(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&vn(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:un(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Ct(e),external:!1,searchStr:o,search:ft(t?.search,i),hash:Ct(r.slice(1)),state:pt(t?.state,a)}}let o=Nn(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:Ct(Bn(o.pathname)),external:!!this.rewrite&&qn(o,this.origin),searchStr:c,search:ft(t?.search,s),hash:Ct(o.hash.slice(1)),state:pt(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=xn(kt(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Gn(n.href,{});n={...n,to:Nn(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=Mt(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[kt(c)],u=c.includes(`$`),d;if(l)d=l._branch??=Tn(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??hn(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=ar(n.params,e),!ut(p))break;p===e&&(p=Object.assign(dt(),p));try{Object.assign(p,t(p))}catch{}}}p??=ar(n.params,or(n.params,f)?o()[3]:sr);let m=e.leaveParams?c:Bn(Ct(f?It(c,f,p,this.pathParamsDecoder):c)),h=cr(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,ir(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?lr(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||sr,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:sr,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Pn(this.rewrite,e);C=Jn(e),qn(n,t)?(w=n.href,T=!0):w=Bn(Jn(n))}else C=wt(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=yn(r.pathname,this.processedTree);if(t){let i=Object.assign(dt(),t.rawParams),{from:a,params:o,...s}=t.route,c=ar(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return tr(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=kt(this.latestLocation.href)===kt(n.href)&&ht(Zn(n.state),Zn(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?bt(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return tr(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await ti(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Xn(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Yn(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(xt.test(n)||(r=bt(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:qn(e,this.origin)||(n=Jn(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=mr,this.preloadRoute=e=>ni(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Mt(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=bn(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!ht(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?ht(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Nt(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??rn,parseSearch:e.parseSearch??nn,protocolAllowlist:e.protocolAllowlist??yt}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=hn(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:kt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?ur(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=ir(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof nr||(r=new nr(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=dt(),_=i._interpolation?It(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{dr(i,d)}catch(e){if(x=Lt(e)||ln(e)?e:new rr(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:ft(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=Yn(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?ft(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?pt(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?ft(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=st(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=st(a),c={...e.search};for(let e of a)try{Object.assign(c,ir(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{dr(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function tr(e,t,{replace:n,ignoreBlocker:r}){if(!St(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var nr=class extends Error{},rr=class extends Error{};function ir(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new nr(`Async validation not supported`);if(n.issues)throw new nr(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function ar(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function or(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!lt.call(e,t[1]))}var sr=Object.freeze({});function cr(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=ir(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function lr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=ct(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function ur(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return sn}function dr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function fr(e,t){return e.options[t]?.preload?.()}function pr(e,t){let n=fr(e,`component`),r=fr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function mr(e,t,n){let r=()=>t===!1?void 0:t?fr(e,t):pr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function hr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var gr=0,_r=1,vr=2,yr=3,br=[4];function xr(e){return typeof e[0]==`number`}function Sr(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Cr(e,t){return e.routesById[t.routeId]}function wr(e,t,n){return ln(e)?[yr,e]:Lt(e)?(e.routeId||=n,[vr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[_r,e]):[gr,e]}function Tr(e,t){let n=wr(t,!0,e.id);if(n[0]!==_r)return n;try{e.options.onError?.(n[1])}catch(t){n=wr(t,!0,e.id)}return n}function Er(e,t,n,r,i){return i[0].signal.aborted?br:Hr(e,t,n,Tr(n,r),i)}async function Dr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Cr(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return kr(e,r),[i,Er(e,t,u,a,n)]}if(c.aborted)return[i,br];let p=r.paramsError??r.searchError;if(p!==void 0)return kr(e,r),[i,Er(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Mr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Sr(a,c):a);if(c.aborted)return[i,br];let s=Hr(e,t,u,wr(o,!1,u.id),n);if(s[0]!==gr)return kr(e,r),[i,s];r.context={...r.context,...o}}catch(a){return kr(e,r),[i,Er(e,t,u,a,n)]}finally{r.status=h,Mr(e,r,!1,n[0])}}i()}function Or(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function kr(e,t){let n=t._flight;t._flight=void 0,Or(e,t,n)?.abort()}function Ar(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Or(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function jr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Mr(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Nr(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Pr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return br;if(!i)return[gr,void 0];let l=n._flight;Mr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Nr(e,t,n,r,s,a,!!o[3]))).then(e=>wr(e,!1,r.id),e=>wr(e,!0,r.id)).then(t=>(t[0]!==gr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===_r&&l[2]?Tr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Hr(e,t,r,await Sr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return kr(e,n),br}finally{Mr(e,n,!1,s)}}function Fr(e,t,n){t[0]!==yr&&(e.status=`success`,e.error=void 0,t[0]===gr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Ir(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&kr(e,r)}function Lr(e,t){return t[0]===_r||t[0]===vr?{...e,status:t[0]===_r?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Rr(e,t,n,r,i,a,o){let s=t[1][n],c=Cr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Nr(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=br)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,kr(e,s),p=Er(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Or(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Pr(e,t,s,c,g,i,a).then(t=>(Fr(s,t,l),t[0]===gr&&(m&&!a[0].signal.aborted&&Ir(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[gr,s.loaderData]),T=(async()=>{try{let e=mr(c,void 0,C);e&&await Sr(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Er(e,t,c,r,a)]}let r=await w;x&&r[0]===gr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Lr(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=Pr(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Fr(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>Lr(E,e))}async function zr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Cr(e,t[n]);try{let e=mr(i,!1);e&&await Sr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Br(e,t){t[2]&&=(Ar(e,t[2].map(e=>e[3])),void 0)}async function Vr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=yr)throw[a,t];!i&&t[0]!==gr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===yr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Hr(e,t,n,r,i,a){for(;r[0]===yr;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[yr,t]:[yr,t,a]}return[yr,o,n]}catch(e){r=a?[_r,e]:Tr(n,e),a=!0}}return r}async function Ur(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===vr?zr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=yr)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==gr&&t[0]<yr&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=yr){let n=s[1];if(n[0]!==yr||n[1].options.reloadDocument||n[2])return Br(e,t),n;c=!0,s=[0,[_r,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===_r?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Cr(e,u);try{await Sr(i?Promise.resolve().then(()=>mr(m,l===_r?`errorComponent`:`notFoundComponent`)):Promise.all([mr(m),mr(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Br(e,t),br}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Br(e,t),Ar(e,o),p()):u.status=`success`}return t}async function Wr(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Cr(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Sr(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Gr(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await zr(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Rr(e,i,t,u,f,r,l)},m=await Dr(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===vr){let t=await zr(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=yr&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Ur(e,i,u,r[0],Vr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Vr(i[2],void 0,void 0,h.then(e=>xr(e)?0:hr(n).length,()=>0))),o=await h}catch(t){if(Br(e,i),t===a&&a.aborted)return br;throw t}return xr(o)?o:Wr(e,o,a,r[6]===n.length?r[6]:0)}function Kr(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Cr(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>Kr(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function qr(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function Jr(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!hr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Sr(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Yr(e,t){e._committed=t,e.stores.setMatches(t)}function Xr(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=hr(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=Cr(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Qn(n);Yr(e,n),Ar(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),$n(e,i,n,a,l,t)}async function Zr(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Qr(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function $r(e,t,n,r,i){let a=n.map(e=>({...e}));jr(a);for(let t of r)kr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Ur(e,o,r,t[0],i)}catch(t){throw Ar(e,a),t}if(xr(s)){Ar(e,a),s[0]===yr&&e._tx===t&&e._committed===n&&await Qr(e,t,s);return}if(await Wr(e,s,t[0].signal),e._tx!==t||e._committed!==n){Ar(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),kr(e,n))}Yr(e,a),Ar(e,n,a)}async function ei(e,t,n,r,i,a){let o=await Gr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(xr(o)){let n=o[0]===yr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&qr(e,t),Ar(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){qr(e,t);return}await Qr(e,t,o);return}let s=o[1];if(e._tx===t&&await Jr(e,t),e._tx!==t){qr(e,t),Ar(e,s),Br(e,o);return}let c=t[2],l=Xn(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Jr(e,t),e._tx!==t){qr(e,t),Ar(e,s),Br(e,o);return}let n=await e.startTransition(()=>{qr(e,t),Xr(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Br(e,o);return}u?.length&&$r(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function ti(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Xn(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Zr(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});jr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Ar(e,m),await Zr(e,n);return}e._preflight=void 0;let g,_=()=>ei(e,y,f,()=>Kr(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Zr(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Mr(e,t,!1)}n[0].abort(),Ar(e,n[3],y[3],!0)}if(e._tx!==y){Ar(e,y[3]),y[3]=[],g?.(),await Zr(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&Kr(e,y),g?.(_()),await y[5]}async function ni(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),jr(a),o=(e._preloads??=new Map).set(i,a),s=await Gr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Ar(e,a)),i.abort()}if(!xr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Lt(e)||console.error(e);return}}}var ri=`Error preloading route! ☝️`,ii=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=sn:this.parentRoute||Et();let r=n?sn:t?.path;r&&r!==`/`&&(r=Ot(r));let i=t?.id||r,a=n?sn:Dt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:Dt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=kt(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>cn({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ai=class extends ii{constructor(e){super(e)}},oi=class extends v.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?v.createElement(this.props.errorComponent??si,{error:e[0],reset:this.reset}):this.props.children}};function si({error:e}){let[t,n]=v.useState(!1);return(0,x.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,x.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,x.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,x.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,x.jsx)(`div`,{children:(0,x.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,x.jsx)(`code`,{children:e.message}):null})}):null]})}var ci=()=>!0,li=()=>!1;function ui({children:e,fallback:t=null}){return(0,x.jsx)(v.Fragment,{children:di()?e:t})}function di(){return v.useSyncExternalStore(fi,ci,li)}function fi(){return()=>{}}var pi=v.createContext(null);function mi(e){return v.useContext(pi)}var hi=v.createContext(void 0),gi=v.createContext(void 0);function _i({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function vi(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var yi=[],bi=0,{link:xi,unlink:Si,propagate:Ci,checkDirty:wi,shallowPropagate:Ti}=_i({update(e){return e._update()},notify(e){yi[Di++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ji(e))}}),Ei=0,Di=0,Oi,ki=0;function Ai(e){try{++ki,e()}finally{--ki||Mi()}}function ji(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Si(n,e)}function Mi(){if(!(ki>0)){for(;Ei<Di;){let e=yi[Ei];yi[Ei++]=void 0,e.notify()}Ei=0,Di=0}}function Ni(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return Oi!==void 0&&xi(i,Oi,bi),i._snapshot},subscribe(e){let t=vi(e),n={current:!1},r=Pi(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Oi,o=t?.compare??Object.is;if(n)Oi=i,++bi,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Oi=a,n&&(i.flags&=-5),ji(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&wi(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ti(e)}}else e&32&&(i.flags=e&-33);return Oi!==void 0&&xi(i,Oi,bi),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Ci(e),Ti(e),Mi())}},i}function Pi(e){let t=()=>{let t=Oi;Oi=n,++bi,n.depsTail=void 0,n.flags=6;try{return e()}finally{Oi=t,n.flags&=-5,ji(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&wi(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ji(this)}};return t(),n}var Fi=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ii=o(((e,t)=>{t.exports=Fi()})),Li=o((e=>{var t=d(),n=Ii();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Ri=l(o(((e,t)=>{t.exports=Li()}))(),1);function zi(e,t){return e===t}function Bi(e,t=e=>e,n){let r=n?.compare??zi,i=(0,v.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,v.useCallback)(()=>e.get(),[e]);return(0,Ri.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Vi={};function Hi(e,t){let n=v.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=pt(n.current,i):i}}function Ui(e){let t=mi(),n=v.useContext(e.from?gi:hi),r=e.from??n,i=t.stores.getMatchStore(r),a=Hi(e,t),o=Bi(i,e=>e?a(e):Vi);if(o!==Vi)return o;(e.shouldThrow??!0)&&Et()}function Wi(e){return Ui({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Gi(e){let{select:t,...n}=e;return Ui({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Ki(e){return Ui({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function qi(e){return Ui({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ji(e){let t=mi();return v.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Yi(e){let t=mi(),n=Ji(),r=v.useRef(null);return ot(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function Xi(e){return Ui({...e,select:t=>e.select?e.select(t.context):t.context})}function Zi(...e){let t=v.useRef(e),n=t.current;return e.forEach((e,t)=>{ht(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Qi(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(ri)})}var $i={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function ea(e,t){let n=typeof e==`string`&&bt(e);if(n)return t.has(n)?e:null}function ta(e,t,n,r,i){let a=jt(e.pathname,r),o=jt(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!ht(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function na(e,t,n){let r=mi(),i=v.useRef(null),a=v.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:m,ignoreBlocker:h,disabled:g,target:_,onClick:y,onBlur:b,onFocus:x,onMouseEnter:S,onMouseLeave:C,onTouchStart:w}=e,T=di(),[E,D,O]=Zi(e.search,e.params,o),[k,A]=v.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,E,D,e.state,e.mask,e.unsafeRelative]),j=v.useCallback(e=>{let t=ea(s,r.protocolAllowlist);if(t!==void 0)return[t??void 0];k._fromLocation||(A._fromLocation=e);let n=r.buildLocation(A),i=ua(n,r,g);return[i,!g&&(!i||bt(i))?void 0:ta(e,n,O,r.basepath,T)]},[O,g,T,k,A,r,s]),[M,N]=Bi(r.stores.location,j,$i),P=N===void 0?M:void 0,F=g||M===void 0,ee=v.useRef(!1),I=e.reloadDocument||P||F?!1:c??r.options.defaultPreload,te=l??r.options.defaultPreloadDelay??0,ne=v.useCallback(e=>{let t=e?.isIntersecting;if(!(t??I===`intent`)){t===!1&&ca(i);return}if(!te){Qi(r,k);return}sa.has(i)||sa.set(i,setTimeout(()=>{sa.delete(i),Qi(r,k)},te))},[r,k,i,I,te]);v.useEffect(()=>{I===`render`&&!ee.current&&(ee.current=!0,Qi(r,k));let e;return I===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(e=new IntersectionObserver(e=>ne(e.pop()),{rootMargin:`100px`}),e.observe(i.current)),()=>{e?.disconnect(),ca(i)}},[r,k,I,ne,i]);let L=aa(e,n);if(L.ref=t?a:i,P)return L.href=P,L;let re=e=>{let t=_??e.currentTarget.getAttribute(`target`);!F&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...k,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:m,ignoreBlocker:h}))},ie=()=>{I===`intent`&&Qi(r,k)},ae=()=>{I===`intent`&&ca(i)};return L.onClick=la(y,re),L.onBlur=la(b,ae),L.onFocus=la(x,ne),L.onMouseEnter=la(S,ne),L.onMouseLeave=la(C,ae),L.onTouchStart=la(w,ie),oa(L,e,N,M,F,n)}var ra={},ia={className:`active`},B=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function aa(e,t){let n={};for(let r in e)B.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function oa(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=ct(n?o:s,{})??(n?ia:ra);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var sa=new WeakMap,ca=e=>{clearTimeout(sa.get(e)),sa.delete(e)},la=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ua(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!St(i,t.protocolAllowlist))return i}var da=v.memo(v.forwardRef((e,t)=>{let n=e._asChild||`a`,r=na(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return v.createElement(n,r,i)}),fa);function fa(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!B.has(r)||!ht(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var pa=class extends ii{constructor(e){super(e),this.useMatch=e=>Ui({...e,from:this.id}),this.useRouteContext=e=>Xi({...e,from:this.id}),this.useSearch=e=>qi({...e,from:this.id}),this.useParams=e=>Ki({...e,from:this.id}),this.useLoaderDeps=e=>Gi({...e,from:this.id}),this.useLoaderData=e=>Wi({...e,from:this.id}),this.useNavigate=()=>Ji({from:this.fullPath}),this.Link=v.forwardRef((e,t)=>(0,x.jsx)(da,{ref:t,from:this.fullPath,...e}))}};function ma(e){return new pa(e)}var ha=class extends ai{constructor(e){super(e),this.useMatch=e=>Ui({...e,from:this.id}),this.useRouteContext=e=>Xi({...e,from:this.id}),this.useSearch=e=>qi({...e,from:this.id}),this.useParams=e=>Ki({...e,from:this.id}),this.useLoaderDeps=e=>Gi({...e,from:this.id}),this.useLoaderData=e=>Wi({...e,from:this.id}),this.useNavigate=()=>Ji({from:this.fullPath}),this.Link=v.forwardRef((e,t)=>(0,x.jsx)(da,{ref:t,from:this.fullPath,...e}))}};function ga(e){return new ha(e)}function _a(e){let t=mi(),n=`not-found-${Bi(t.stores.location,e=>e.pathname)}-${Bi(t.stores.status)}`;return(0,x.jsx)(oi,{getResetKey:()=>n,onCatch:(t,n)=>{if(Lt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Lt(t))return e.fallback?.(t);throw t},children:e.children})}function va(){return(0,x.jsx)(`p`,{children:`Not Found`})}function ya(e){return(0,x.jsx)(x.Fragment,{children:e.children})}function ba(e,t,n){return t.options.notFoundComponent?(0,x.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,x.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,x.jsx)(va,{})}function xa(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,x.jsx)(n,{}):null}var Sa=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ca=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,wa=v.memo(function({routeId:e}){let t=mi();return(0,x.jsx)(Ta,{router:t,match:Bi(t.stores.getMatchStore(e))})});function Ta({router:e,match:t}){let n=e.routesById[t.routeId],r=xa(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Ca(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?v.Suspense:ya,l=i?oi:ya,u=o?_a:ya;return(0,x.jsxs)(n.isRoot?n.options.shellComponent??ya:ya,{children:[(0,x.jsx)(hi.Provider,{value:t.routeId,children:(0,x.jsx)(c,{fallback:r,children:(0,x.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Lt(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,x.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return v.createElement(o,e)},children:s?(0,x.jsx)(ui,{fallback:r,children:(0,x.jsx)(Ea,{match:t})}):(0,x.jsx)(Ea,{match:t})})})})}),null]})}var Ea=v.memo(function({match:e}){let t=mi(),n=e.routeId,r=t.routesById[n],i=v.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=v.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,x.jsx)(e,{},i):(0,x.jsx)(Da,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ca(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return xa(t,r)}if(e.status===`notFound`)return ba(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Da=v.memo(function(){let e=mi(),t=v.useContext(hi),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Bi(a,e=>[!!e._notFound,e.error],{compare:Sa}),i=Bi(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ba(e,e.routesById[t],r);if(!i)return null;let a=(0,x.jsx)(wa,{routeId:i});return t===`__root__`?(0,x.jsx)(v.Suspense,{fallback:xa(e),children:a}):a});function Oa(e,t){let n=e[1];e.length=0,n?.(t)}function ka({t:e}){let t=mi(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Oa(n,!1),n.push(i,a),e(t),v.startTransition(r)}),ot(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(kt(r.publicHref)!==kt(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Xn(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Aa(){let e=mi(),t=e.routesById[sn],n=xa(e,t),r=e.ssr?ya:v.Suspense,i=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ka,{t:v.useState()[1]}),(0,x.jsx)(r,{fallback:n,children:(0,x.jsx)(ja,{})})]});return e.options.InnerWrap?(0,x.jsx)(e.options.InnerWrap,{children:i}):i}function ja(){let e=mi(),t=e._rendered,n=Bi(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;ot(()=>{t[0]===n&&Oa(t,!0)},[t,n]);let a=i?(0,x.jsx)(wa,{routeId:i}):null;return(0,x.jsx)(hi.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,x.jsx)(oi,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Ma=e=>({createMutableStore:Ni,createReadonlyStore:Ni,batch:Ai}),Na=e=>new Pa(e),Pa=class extends er{constructor(e){super(e,Ma)}};function Fa({router:e,children:t,...n}){ut(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,x.jsx)(pi.Provider,{value:e,children:t});return e.options.Wrap?(0,x.jsx)(e.options.Wrap,{children:r}):r}function Ia({router:e,...t}){return(0,x.jsx)(Fa,{router:e,...t,children:(0,x.jsx)(Aa,{})})}function La(e){let t=mi({warn:e?.router===void 0}),n=e?.router||t;return Bi(n.stores.__store,Hi(e,n))}var Ra={"delivery-completed":{label:`Delivery completed`,tone:`success`},"delivery-completed-release-blocked":{label:`Delivery completed`,tone:`warning`,description:`Release blocked`},ready:{label:`Ready`,tone:`success`},initialized:{label:`Initialized`,tone:`neutral`},"completed-only":{label:`Completed`,tone:`success`,description:`Further workflow steps available`}};function za(e,t){return Ra[e]||(e===`not-applicable`?{label:`Needs attention`,tone:`warning`,description:t??`Additional configuration required`}:e.includes(`blocked`)?{label:Ua(e),tone:`danger`}:e.includes(`completed`)||e.includes(`ready`)?{label:Ua(e),tone:`success`}:e.includes(`missing`)||e.includes(`incomplete`)?{label:Ua(e),tone:`warning`}:{label:Ua(e),tone:`neutral`})}function Ba(e,t){return e===t||t!==`/overview`&&e.startsWith(t+`/`)}var Va={bugfix:`Bug fix`,feature:`Feature`,hotfix:`Hotfix`,spike:`Spike`,chore:`Chore`,maintenance:`Maintenance`,refactor:`Refactor`,docs:`Docs`};function Ha(e){return e?Va[e]??Ua(e):`Unknown`}function Ua(e){return e.replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function Wa(e){return Ua(e)}function Ga(e){return{ready:e.filter(e=>e.status!==`Missing`&&e.status!==`Not applicable`).length,total:e.length}}function Ka(e,t){let n=e.completed??0,r=t-n-(e.archived??0),i=[];return n>0&&i.push(`${n} completed`),r>0&&i.push(`${r} active`),i.length===0&&t===0?`No work items`:i.join(` · `)}function qa(e){return e===0?`No modules registered`:`Registered`}function Ja(e,t,n){let r=e+t+n;if(r===0)return{total:0,label:`No findings`,tone:`success`};let i=[];e>0&&i.push(`${e} blocking`),t>0&&i.push(`${t} warning${t>1?`s`:``}`),n>0&&i.push(`${n} FYI`);let a=e>0?`danger`:t>0?`warning`:`info`;return{total:r,label:i.join(` · `),tone:a}}function Ya(e,t){return{completed:e,total:t,label:`Overall Kaddo workflow coverage`}}function Xa(e){let{recommendedNextStep:t}=e;if(!t.label)return null;let n=t.label.match(/(?:Use |run )?(\S+-agent)/i)?.[1],r=t.label;n&&(r=r.replace(/^Use \S+-agent to /i,``)),r=r.replace(/\(.*?\)\s*\.?$/,``).trim(),r=r.replace(/\b\w/,e=>e.toUpperCase()),r.endsWith(`.`)&&(r=r.slice(0,-1));let i=n?`Use ${n} to ${r.charAt(0).toLowerCase()}${r.slice(1)}.`:void 0;return{title:r,description:i,agent:n,command:t.command}}var Za={"not-started":`neutral`,"in-progress":`info`,completed:`success`,partial:`warning`,blocked:`danger`,passed:`success`,failed:`danger`,"accepted-with-exceptions":`warning`,"not-assessed":`neutral`,ready:`success`,released:`success`,"not-applicable":`neutral`};function Qa(e){return e?{label:Ua(e),tone:Za[e]??`neutral`}:null}var $a={affected:`Affected`,"reviewed-not-affected":`Reviewed — not affected`,unknown:`Unknown`,"not-applicable":`Not applicable`},eo={affected:`info`,"reviewed-not-affected":`neutral`,unknown:`warning`,"not-applicable":`neutral`};function to(e){return{label:$a[e]??Ua(e),tone:eo[e]??`neutral`}}var no={pending:`warning`,passed:`success`,failed:`danger`,blocked:`danger`,waived:`neutral`,"not-applicable":`neutral`};function ro(e){return{label:Ua(e),tone:no[e]??`neutral`}}var io={high:`success`,medium:`warning`,low:`danger`};function ao(e){return e?{label:Ua(e),tone:io[e]??`neutral`}:{label:`Not assessed`,tone:`neutral`}}function oo(e){return e===`affected`||e===`unknown`}function so(e){return e===`neutral`?`muted`:e}var co=[{label:`Overview`,path:`/overview`,icon:`◎`},{label:`Knowledge`,path:`/knowledge`,icon:`📚`},{label:`Work Items`,path:`/work-items`,icon:`📋`},{label:`System`,path:`/system`,icon:`⚙`},{label:`Integrations`,path:`/integrations`,icon:`🔌`}];function lo({projectName:e}){let t=mi(),n=La({select:e=>e.location.pathname});return(0,x.jsxs)(`aside`,{style:{width:220,flexShrink:0,background:`var(--surface)`,borderRight:`1px solid var(--border)`,display:`flex`,flexDirection:`column`},children:[(0,x.jsxs)(`div`,{style:{padding:`20px 16px 16px`,borderBottom:`1px solid var(--border)`},children:[(0,x.jsx)(`div`,{style:{fontSize:16,fontWeight:700,color:`var(--primary)`},children:`Kaddo Admin`}),(0,x.jsx)(`div`,{style:{fontSize:10,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.5,marginTop:10},children:`Project`}),(0,x.jsx)(`div`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e})]}),(0,x.jsx)(`nav`,{style:{padding:`8px 0`,flex:1},children:co.map(e=>{let r=Ba(n,e.path);return(0,x.jsxs)(`button`,{onClick:()=>!e.disabled&&t.navigate({to:e.path}),disabled:e.disabled,"aria-current":r?`page`:void 0,style:{display:`flex`,alignItems:`center`,gap:10,width:`100%`,padding:`10px 16px`,border:`none`,background:r?`var(--surface-muted)`:`transparent`,color:e.disabled?`var(--foreground-muted)`:r?`var(--foreground)`:`var(--foreground-muted)`,fontSize:14,fontWeight:r?600:400,cursor:e.disabled?`default`:`pointer`,opacity:e.disabled?.5:1,textAlign:`left`,borderLeft:r?`3px solid var(--primary)`:`3px solid transparent`,fontFamily:`inherit`},children:[(0,x.jsx)(`span`,{style:{width:20,textAlign:`center`},children:e.icon}),(0,x.jsx)(`span`,{children:e.label}),e.disabled&&(0,x.jsx)(`span`,{style:{fontSize:10,marginLeft:`auto`},children:`Soon`})]},e.path)})})]})}var uo=`/api/v1/admin`,fo=class extends Error{code;status;constructor(e,t,n){super(t),this.name=`ApiError`,this.code=e,this.status=n}};async function po(e){let t=await fetch(`${uo}${e}`,{credentials:`include`});if(!t.ok){let e=await t.json().catch(()=>null);throw new fo(e?.error?.code??`ERROR`,e?.error?.message??`Request failed: ${t.status}`,t.status)}return t.json()}async function mo(e,t,n){let r=await fetch(`${uo}${e}`,{method:t,credentials:`include`,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});if(!r.ok){let e=await r.json().catch(()=>null);throw new fo(e?.error?.code??`ERROR`,e?.error?.message??`Request failed: ${r.status}`,r.status)}return r.json()}function ho(e){let t=new URLSearchParams;e.status&&e.status!==`all`&&t.set(`status`,e.status),e.module&&e.module!==`all`&&t.set(`module`,e.module),e.query&&e.query.trim()&&t.set(`query`,e.query.trim());let n=t.toString();return n?`?${n}`:``}var V={initSession:()=>po(`/session`),getOverview:()=>po(`/overview`),getProject:()=>po(`/project`),getKnowledge:()=>po(`/knowledge`),getModules:()=>po(`/modules`),getReadiness:()=>po(`/readiness`),getRoute:()=>po(`/route`),getFindings:()=>po(`/findings`),getSystemMap:()=>po(`/system`),getTopologyHandoff:()=>po(`/system/topology-handoff`),getKnowledgeInventory:()=>po(`/knowledge/inventory`),getKnowledgeArtifact:e=>po(`/knowledge/artifact/${encodeURIComponent(e)}`),getWorkItemsList:(e={})=>po(`/work-items${ho(e)}`),getWorkItem:e=>po(`/work-items/${encodeURIComponent(e)}`),getCaptureDefinition:()=>po(`/work-items-capture`),createWorkItem:(e,t,n)=>mo(`/work-items`,`POST`,{intent:e,type:t,...n?{answers:n}:{}}),getWorkItemEdit:e=>po(`/work-items/${encodeURIComponent(e)}/edit`),updateWorkItem:(e,t,n)=>mo(`/work-items/${encodeURIComponent(e)}`,`PUT`,{model:t,expectedRevision:n}),validateWorkItem:e=>mo(`/work-items/${encodeURIComponent(e)}/validate`,`POST`),transitionReady:(e,t)=>mo(`/work-items/${encodeURIComponent(e)}/transitions/ready`,`POST`,{expectedRevision:t}),transitionDraft:(e,t)=>mo(`/work-items/${encodeURIComponent(e)}/transitions/draft`,`POST`,{expectedRevision:t}),getRefinementHandoff:e=>po(`/work-items/${encodeURIComponent(e)}/refinement-handoff`),getIntegrations:()=>po(`/integrations`),getIntegrationTypes:()=>po(`/integrations/types`),getIntegrationDetail:e=>po(`/integrations/${encodeURIComponent(e)}`),getIntegrationSecretStatus:e=>po(`/integrations/${encodeURIComponent(e)}/secrets`),getIntegrationStatus:e=>po(`/integrations/${encodeURIComponent(e)}/status`),createIntegration:e=>mo(`/integrations`,`POST`,e),updateIntegration:(e,t)=>mo(`/integrations/${encodeURIComponent(e)}`,`PUT`,t),deleteIntegration:e=>mo(`/integrations/${encodeURIComponent(e)}`,`DELETE`),enableIntegration:e=>mo(`/integrations/${encodeURIComponent(e)}/enable`,`POST`),disableIntegration:e=>mo(`/integrations/${encodeURIComponent(e)}/disable`,`POST`),setIntegrationSecret:(e,t,n)=>mo(`/integrations/${encodeURIComponent(e)}/secrets/${encodeURIComponent(t)}`,`POST`,{value:n}),removeIntegrationSecret:(e,t)=>mo(`/integrations/${encodeURIComponent(e)}/secrets/${encodeURIComponent(t)}`,`DELETE`),getExternalWorkItems:(e,t={})=>{let n=new URLSearchParams;t.cursor&&n.set(`cursor`,t.cursor),t.pageSize&&n.set(`pageSize`,String(t.pageSize));let r=n.toString();return po(`/integrations/${encodeURIComponent(e)}/work-items${r?`?${r}`:``}`)},getExternalWorkItem:(e,t)=>po(`/integrations/${encodeURIComponent(e)}/work-items/${encodeURIComponent(t)}`),getImportPreview:(e,t,n)=>po(`/integrations/${encodeURIComponent(e)}/work-items/${encodeURIComponent(t)}/import-preview${n?`?type=${encodeURIComponent(n)}`:``}`),importExternalWorkItem:(e,t,n)=>mo(`/integrations/${encodeURIComponent(e)}/work-items/${encodeURIComponent(t)}/import`,`POST`,{type:n})};function go(){let{data:e}=it({queryKey:[`project`],queryFn:V.getProject,staleTime:6e4});return(0,x.jsxs)(`div`,{style:{display:`flex`,minHeight:`100vh`,background:`var(--background)`},children:[(0,x.jsx)(lo,{projectName:e?.name??`...`}),(0,x.jsx)(`main`,{style:{flex:1,minWidth:0,overflow:`auto`},children:(0,x.jsx)(Da,{})})]})}var _o={default:{bg:`var(--surface-muted)`,color:`var(--foreground)`},success:{bg:`color-mix(in srgb, var(--success) 15%, transparent)`,color:`var(--success)`},warning:{bg:`color-mix(in srgb, var(--warning) 15%, transparent)`,color:`var(--warning)`},danger:{bg:`color-mix(in srgb, var(--danger) 15%, transparent)`,color:`var(--danger)`},info:{bg:`color-mix(in srgb, var(--info) 15%, transparent)`,color:`var(--info)`},muted:{bg:`var(--surface-muted)`,color:`var(--foreground-muted)`}};function vo({variant:e=`default`,children:t}){let{bg:n,color:r}=_o[e];return(0,x.jsx)(`span`,{style:{display:`inline-flex`,alignItems:`center`,padding:`2px 10px`,borderRadius:`var(--radius)`,fontSize:12,fontWeight:600,background:n,color:r},children:t})}function yo(e){return e===`success`?`success`:e===`warning`?`warning`:e===`danger`?`danger`:`muted`}function bo({status:e}){let t=za(e);return(0,x.jsx)(vo,{variant:yo(t.tone),children:t.label})}var xo={Consolidated:`success`,Structured:`success`,Ready:`success`,Useful:`success`,Weak:`warning`,Placeholder:`warning`,Missing:`danger`,"Not applicable":`muted`,"Managed by core":`muted`};function So({status:e}){return(0,x.jsx)(vo,{variant:xo[e]??`muted`,children:e})}function Co({layer:e,status:t,navigable:n=!1}){let r=mi(),i=e.toLowerCase();return n?(0,x.jsxs)(`button`,{onClick:()=>r.navigate({to:`/knowledge/$layer`,params:{layer:i}}),style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:14,padding:`6px 4px`,width:`100%`,border:`none`,background:`none`,cursor:`pointer`,fontFamily:`inherit`,borderRadius:4,transition:`background 0.1s`},onMouseEnter:e=>e.currentTarget.style.background=`var(--surface-muted)`,onMouseLeave:e=>e.currentTarget.style.background=`none`,children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground)`},children:e}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,x.jsx)(So,{status:t}),(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`,fontSize:14},children:`→`})]})]}):(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:14,padding:`4px 0`},children:[(0,x.jsx)(`span`,{children:e}),(0,x.jsx)(So,{status:t})]})}function wo({role:e,available:t}){return t?e===`core`?(0,x.jsx)(vo,{variant:`info`,children:`Core`}):(0,x.jsx)(vo,{variant:`success`,children:`Module`}):(0,x.jsx)(vo,{variant:`danger`,children:`Unavailable`})}function To({title:e,description:t}){return(0,x.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`48px 24px`,color:`var(--foreground-muted)`,textAlign:`center`},children:[(0,x.jsx)(`p`,{style:{fontSize:16,fontWeight:600,margin:`0 0 4px`},children:e}),t&&(0,x.jsx)(`p`,{style:{fontSize:14,margin:0},children:t})]})}function Eo({readiness:e}){let t=Xa(e);return t?(0,x.jsxs)(`section`,{"aria-labelledby":`next-action-heading`,style:{background:`color-mix(in srgb, var(--primary) 8%, var(--surface))`,border:`1px solid color-mix(in srgb, var(--primary) 25%, var(--border))`,borderRadius:`var(--radius)`,padding:`16px 20px`,marginBottom:20},children:[(0,x.jsx)(`div`,{style:{fontSize:11,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.5,marginBottom:8},children:(0,x.jsx)(`span`,{id:`next-action-heading`,children:`Next action`})}),(0,x.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`var(--foreground)`,marginBottom:t.description||t.agent?6:0},children:t.title}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:13,color:`var(--foreground-muted)`,marginBottom:t.agent||t.command?8:0},children:t.description}),(t.agent||t.command)&&(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[t.agent&&(0,x.jsx)(`span`,{className:`font-mono`,style:{display:`inline-block`,padding:`2px 8px`,background:`color-mix(in srgb, var(--primary) 15%, var(--surface))`,borderRadius:3,fontSize:12,color:`var(--primary)`,fontWeight:500},children:t.agent}),t.command&&(0,x.jsx)(`code`,{className:`font-mono`,style:{display:`inline-block`,padding:`2px 8px`,background:`var(--surface-muted)`,borderRadius:3,fontSize:12,color:`var(--foreground-muted)`},children:t.command})]})]}):null}function Do({title:e,value:t,subtitle:n,icon:r}){return(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`,display:`flex`,alignItems:`center`,gap:14},children:[r&&(0,x.jsx)(`div`,{style:{fontSize:22,flexShrink:0},children:r}),(0,x.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,x.jsx)(`div`,{style:{fontSize:12,fontWeight:500,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.3},children:e}),(0,x.jsx)(`div`,{style:{fontSize:22,fontWeight:700,color:`var(--foreground)`,marginTop:2},children:t}),n&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2},children:n})]})]})}var Oo={done:`✓`,current:`●`,warning:`⚠`,blocked:`✗`,next:`○`,pending:`○`,optional:`○`,skipped:`—`},ko={done:`var(--success)`,current:`var(--primary)`,warning:`var(--warning)`,blocked:`var(--danger)`,next:`var(--foreground-muted)`,pending:`var(--foreground-muted)`,optional:`var(--foreground-muted)`,skipped:`var(--foreground-muted)`};function Ao({completed:e,total:t,progressPercent:n,steps:r}){let[i,a]=(0,v.useState)(!1),o=Ya(e,t);return(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`},children:[(0,x.jsxs)(`button`,{onClick:()=>a(!i),"aria-expanded":i,"aria-label":`Project Route progress: ${e} of ${t} steps completed`,style:{display:`flex`,alignItems:`center`,gap:12,width:`100%`,border:`none`,background:`none`,cursor:`pointer`,padding:0,color:`var(--foreground)`,fontFamily:`inherit`,fontSize:14},children:[(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3},children:`Project Route`}),(0,x.jsx)(`div`,{role:`progressbar`,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":`${e} of ${t} steps completed`,style:{flex:1,height:6,borderRadius:3,background:`var(--surface-muted)`,overflow:`hidden`},children:(0,x.jsx)(`div`,{style:{width:`${n}%`,height:`100%`,borderRadius:3,background:n===100?`var(--success)`:`var(--primary)`,transition:`width 0.3s ease`}})}),(0,x.jsxs)(`span`,{style:{fontSize:13,color:`var(--foreground-muted)`,whiteSpace:`nowrap`},children:[e,`/`,t]}),(0,x.jsx)(`span`,{style:{fontSize:10,color:`var(--foreground-muted)`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0)`},children:`▼`})]}),(0,x.jsx)(`div`,{style:{fontSize:11,color:`var(--foreground-muted)`,marginTop:4,paddingLeft:0},children:o.label}),i&&(0,x.jsx)(`div`,{style:{marginTop:12,display:`flex`,flexDirection:`column`,gap:4,paddingLeft:4},children:r.map(e=>(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:ko[e.status]??`var(--foreground-muted)`,width:16,textAlign:`center`},children:Oo[e.status]??`○`}),(0,x.jsx)(`span`,{style:{color:e.status===`done`?`var(--foreground)`:`var(--foreground-muted)`},children:e.label})]},e.id))})]})}var jo={blocking:`danger`,warning:`warning`,fyi:`muted`};function Mo({level:e,count:t}){return(0,x.jsx)(vo,{variant:jo[e]??`muted`,children:t===void 0?e:`${t} ${e}`})}function No({blocking:e,warning:t,fyi:n,items:r}){let[i,a]=(0,v.useState)(!1),o=Ja(e,t,n);return o.total===0?(0,x.jsxs)(`div`,{role:`status`,style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`,display:`flex`,alignItems:`center`,gap:10},children:[(0,x.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.3},children:`Findings`}),(0,x.jsx)(`span`,{style:{fontSize:13,color:`var(--success)`},children:`✓ No findings`})]}):(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`},children:[(0,x.jsxs)(`button`,{onClick:()=>a(!i),"aria-expanded":i,"aria-label":`Findings: ${o.label}`,style:{display:`flex`,alignItems:`center`,gap:12,width:`100%`,border:`none`,background:`none`,cursor:`pointer`,padding:0,color:`var(--foreground)`,fontFamily:`inherit`},children:[(0,x.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.3},children:`Findings`}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,flex:1},children:[e>0&&(0,x.jsx)(Mo,{level:`blocking`,count:e}),t>0&&(0,x.jsx)(Mo,{level:`warning`,count:t}),n>0&&(0,x.jsx)(Mo,{level:`fyi`,count:n})]}),(0,x.jsx)(`span`,{style:{fontSize:10,color:`var(--foreground-muted)`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0)`},children:`▼`})]}),i&&r.length>0&&(0,x.jsx)(`div`,{style:{marginTop:12,display:`flex`,flexDirection:`column`,gap:4,fontSize:13},children:r.map((e,t)=>(0,x.jsxs)(`div`,{style:{color:`var(--foreground-muted)`},children:[(0,x.jsxs)(`span`,{style:{textTransform:`capitalize`,fontWeight:600,color:`var(--finding-${e.level})`},children:[e.level,`: `]}),e.message]},t))})]})}function Po(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[[1,2,3].map(e=>(0,x.jsx)(`div`,{style:{height:120,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,marginBottom:16,animation:`pulse 1.5s ease-in-out infinite`}},e)),(0,x.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }`})]})}function Fo({title:e,children:t}){return(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:20},children:[(0,x.jsx)(`h3`,{style:{fontSize:12,fontWeight:600,color:`var(--foreground-muted)`,margin:`0 0 12px`,textTransform:`uppercase`,letterSpacing:.3},children:e}),t]})}function Io(){let e=C(),t=mi(),{data:n,isLoading:r,error:i}=it({queryKey:[`overview`],queryFn:V.getOverview,refetchOnWindowFocus:!0});if(r)return(0,x.jsx)(Po,{});if(i)return(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`Error loading project`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 0`,fontSize:14},children:i.message})]})});if(!n)return(0,x.jsx)(To,{title:`No project data`,description:`Could not load project information.`});let{project:a,knowledge:o,workItems:s,modules:c,readiness:l,route:u,findings:d}=n,f=Ga(o.layers),p=Ja(d.blocking,d.warning,d.fyi);return(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:1200,margin:`0 auto`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:`0 0 4px`},children:a.name}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:13,color:`var(--foreground-muted)`},children:Wa(a.structure)}),(0,x.jsx)(`span`,{style:{color:`var(--border-strong)`},children:`·`}),(0,x.jsx)(bo,{status:l.overall})]})]}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`overview`]}),"aria-label":`Refresh overview`,style:{padding:`8px 14px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground-muted)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`},children:`↻ Refresh`})]}),(0,x.jsx)(Eo,{readiness:l}),(0,x.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(200px, 1fr))`,gap:16,marginBottom:20},children:[(0,x.jsx)(`div`,{onClick:()=>t.navigate({to:`/knowledge`}),style:{cursor:`pointer`},children:(0,x.jsx)(Do,{title:`Knowledge`,value:`${f.ready}/${f.total}`,subtitle:`Layers ready`})}),(0,x.jsx)(`div`,{onClick:()=>t.navigate({to:`/work-items`}),style:{cursor:`pointer`},children:(0,x.jsx)(Do,{title:`Work Items`,value:s.total,subtitle:Ka(s.byState,s.total)})}),(0,x.jsx)(Do,{title:`Modules`,value:c.modules.length,subtitle:qa(c.modules.length)}),(0,x.jsx)(Do,{title:`Findings`,value:p.total,subtitle:p.label})]}),(0,x.jsx)(`div`,{style:{marginBottom:16},children:(0,x.jsx)(Ao,{completed:u.completed,total:u.total,progressPercent:u.progressPercent,steps:u.steps})}),(0,x.jsx)(`div`,{style:{marginBottom:16},children:(0,x.jsx)(No,{blocking:d.blocking,warning:d.warning,fyi:d.fyi,items:d.items})}),(0,x.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(380px, 1fr))`,gap:16},children:[(0,x.jsx)(Fo,{title:`Knowledge`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:o.layers.map(e=>(0,x.jsx)(Co,{layer:e.layer,status:e.status,navigable:!0},e.layer))})}),c.modules.length>0&&(0,x.jsx)(Fo,{title:`Modules`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:c.modules.map(e=>(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:14},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontWeight:600},children:e.id}),e.path&&(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`,marginLeft:8,fontSize:12},children:e.path})]}),(0,x.jsx)(wo,{role:e.role,available:e.available})]},e.id))})})]})]})}function Lo(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[[1,2,3,4].map(e=>(0,x.jsx)(`div`,{style:{height:100,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,marginBottom:16,animation:`pulse 1.5s ease-in-out infinite`}},e)),(0,x.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }`})]})}function Ro(){let e=C(),t=mi(),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(`all`),[o,s]=(0,v.useState)(`all`),{data:c,isLoading:l,error:u}=it({queryKey:[`knowledge-inventory`],queryFn:V.getKnowledgeInventory,refetchOnWindowFocus:!0});if(l)return(0,x.jsx)(Lo,{});if(u)return(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`Knowledge could not be loaded`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 8px`,fontSize:14,color:`var(--foreground-muted)`},children:`The project is still available, but the Knowledge inventory could not be read.`}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`knowledge-inventory`]}),style:{padding:`6px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`,color:`var(--foreground)`},children:`Retry`})]})});if(!c||c.layers.length===0)return(0,x.jsxs)(`div`,{style:{padding:`48px 32px`,textAlign:`center`,color:`var(--foreground-muted)`},children:[(0,x.jsx)(`div`,{style:{fontSize:32,marginBottom:12},children:`📚`}),(0,x.jsx)(`h2`,{style:{fontSize:18,fontWeight:600,margin:`0 0 8px`,color:`var(--foreground)`},children:`No knowledge available`}),(0,x.jsx)(`p`,{style:{fontSize:14},children:`This project does not contain knowledge artifacts yet.`}),(0,x.jsx)(`p`,{style:{fontSize:13,marginTop:8},children:`Use the Kaddo workflow to build the project knowledge baseline.`})]});let d=n.toLowerCase(),f=c.layers.filter(e=>i===`all`||e.id===i).map(e=>({...e,artifacts:e.artifacts.filter(e=>!(o!==`all`&&e.status!==o||d&&!e.title.toLowerCase().includes(d)&&!e.path.toLowerCase().includes(d)&&!e.layer.toLowerCase().includes(d)))})),p=[...new Set(c.layers.flatMap(e=>e.artifacts.map(e=>e.status)))];return(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:1200,margin:`0 auto`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:8},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:`0 0 4px`},children:`Knowledge`}),(0,x.jsx)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`,margin:0},children:`Explore the project knowledge used by Kaddo.`})]}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`knowledge-inventory`]}),"aria-label":`Refresh knowledge`,style:{padding:`8px 14px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground-muted)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`},children:`↻ Refresh`})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:20,flexWrap:`wrap`,alignItems:`center`},children:[(0,x.jsx)(`input`,{type:`search`,placeholder:`Search knowledge...`,value:n,onChange:e=>r(e.target.value),"aria-label":`Search knowledge`,style:{flex:`1 1 200px`,padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:14,fontFamily:`inherit`,outline:`none`,minWidth:200}}),(0,x.jsxs)(`select`,{value:i,onChange:e=>a(e.target.value),"aria-label":`Filter by layer`,style:{padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`},children:[(0,x.jsx)(`option`,{value:`all`,children:`All layers`}),c.layers.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.label},e.id))]}),p.length>1&&(0,x.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),"aria-label":`Filter by status`,style:{padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`},children:[(0,x.jsx)(`option`,{value:`all`,children:`All statuses`}),p.map(e=>(0,x.jsx)(`option`,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))]})]}),(0,x.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:f.map(e=>{let n=e.artifacts.filter(e=>e.status===`missing`||e.status===`placeholder`).length;return(0,x.jsxs)(`button`,{onClick:()=>t.navigate({to:`/knowledge/$layer`,params:{layer:e.id}}),style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:20,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`,transition:`border-color 0.15s`},onMouseEnter:e=>e.currentTarget.style.borderColor=`var(--primary)`,onMouseLeave:e=>e.currentTarget.style.borderColor=`var(--border)`,children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,x.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,margin:0,color:`var(--foreground)`},children:e.label}),(0,x.jsx)(So,{status:e.status})]}),(0,x.jsxs)(`div`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:[e.artifacts.length,` artifact`,e.artifacts.length===1?``:`s`,n>0&&(0,x.jsxs)(`span`,{style:{color:`var(--warning)`,marginLeft:8},children:[n,` needs attention`]})]})]},e.id)})}),f.every(e=>e.artifacts.length===0)&&n&&(0,x.jsx)(`div`,{style:{textAlign:`center`,padding:32,color:`var(--foreground-muted)`},children:(0,x.jsxs)(`p`,{style:{fontSize:14},children:[`No artifacts match "`,n,`"`]})})]})}function zo({crumbs:e}){let t=mi();return(0,x.jsx)(`nav`,{"aria-label":`Breadcrumb`,style:{fontSize:13,color:`var(--foreground-muted)`,marginBottom:16},children:e.map((e,n)=>(0,x.jsxs)(`span`,{children:[n>0&&(0,x.jsx)(`span`,{style:{margin:`0 6px`},children:`/`}),e.path?(0,x.jsx)(`button`,{onClick:()=>t.navigate({to:e.path}),style:{background:`none`,border:`none`,padding:0,cursor:`pointer`,color:`var(--primary)`,fontFamily:`inherit`,fontSize:`inherit`,textDecoration:`none`},children:e.label}):(0,x.jsx)(`span`,{style:{color:`var(--foreground)`},children:e.label})]},n))})}var Bo={available:{label:`Available`,variant:`success`},missing:{label:`Missing`,variant:`danger`},placeholder:{label:`Needs content`,variant:`warning`},"not-applicable":{label:`Not applicable`,variant:`muted`},unknown:{label:`Unknown`,variant:`muted`}};function Vo({status:e}){let t=Bo[e]??{label:e,variant:`muted`};return(0,x.jsx)(vo,{variant:t.variant,children:t.label})}function H(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[[1,2,3].map(e=>(0,x.jsx)(`div`,{style:{height:60,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,marginBottom:12,animation:`pulse 1.5s ease-in-out infinite`}},e)),(0,x.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }`})]})}function Ho(){let{layer:e}=Ki({from:`/knowledge/$layer`}),t=mi(),{data:n,isLoading:r,error:i}=it({queryKey:[`knowledge-inventory`],queryFn:V.getKnowledgeInventory,refetchOnWindowFocus:!0});if(r)return(0,x.jsx)(H,{});if(i)return(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`Error loading knowledge`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 0`,fontSize:14},children:i.message})]})});let a=n?.layers.find(t=>t.id===e);return a?(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:1200,margin:`0 auto`},children:[(0,x.jsx)(zo,{crumbs:[{label:`Knowledge`,path:`/knowledge`},{label:a.label}]}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:0},children:a.label}),(0,x.jsx)(So,{status:a.status})]}),(0,x.jsxs)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`,margin:`0 0 20px`},children:[a.artifacts.length,` artifact`,a.artifacts.length===1?``:`s`]}),a.artifacts.length===0?(0,x.jsx)(`div`,{style:{textAlign:`center`,padding:32,color:`var(--foreground-muted)`},children:(0,x.jsx)(`p`,{style:{fontSize:14},children:`No artifacts in this layer.`})}):(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:a.artifacts.map(n=>(0,x.jsxs)(`button`,{onClick:()=>t.navigate({to:`/knowledge/$layer/$artifactId`,params:{layer:e,artifactId:n.id}}),style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`14px 18px`,cursor:`pointer`,fontFamily:`inherit`,textAlign:`left`,transition:`border-color 0.15s`},onMouseEnter:e=>e.currentTarget.style.borderColor=`var(--primary)`,onMouseLeave:e=>e.currentTarget.style.borderColor=`var(--border)`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`var(--foreground)`},children:n.title}),(0,x.jsx)(`div`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2},children:n.path})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[(0,x.jsx)(Vo,{status:n.status}),(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`,fontSize:14},children:`→`})]})]},n.id))})]}):(0,x.jsxs)(`div`,{style:{padding:`48px 32px`,textAlign:`center`,color:`var(--foreground-muted)`},children:[(0,x.jsx)(`h2`,{style:{fontSize:18,fontWeight:600,color:`var(--foreground)`},children:`Layer not found`}),(0,x.jsxs)(`p`,{style:{fontSize:14},children:[`Knowledge layer "`,e,`" does not exist.`]})]})}function Uo(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Wo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Go=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ko={};function qo(e,t){return((t||Ko).jsx?Go:Wo).test(e)}var Jo=/[ \t\n\f\r]/g;function Yo(e){return typeof e==`object`?e.type===`text`&&Xo(e.value):Xo(e)}function Xo(e){return e.replace(Jo,``)===``}var Zo=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Zo.prototype.normal={},Zo.prototype.property={},Zo.prototype.space=void 0;function Qo(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Zo(n,r,t)}function $o(e){return e.toLowerCase()}var es=class{constructor(e,t){this.attribute=t,this.property=e}};es.prototype.attribute=``,es.prototype.booleanish=!1,es.prototype.boolean=!1,es.prototype.commaOrSpaceSeparated=!1,es.prototype.commaSeparated=!1,es.prototype.defined=!1,es.prototype.mustUseProperty=!1,es.prototype.number=!1,es.prototype.overloadedBoolean=!1,es.prototype.property=``,es.prototype.spaceSeparated=!1,es.prototype.space=void 0;var ts=s({boolean:()=>U,booleanish:()=>rs,commaOrSpaceSeparated:()=>os,commaSeparated:()=>as,number:()=>W,overloadedBoolean:()=>is,spaceSeparated:()=>G}),ns=0,U=ss(),rs=ss(),is=ss(),W=ss(),G=ss(),as=ss(),os=ss();function ss(){return 2**++ns}var cs=Object.keys(ts),ls=class extends es{constructor(e,t,n,r){let i=-1;if(super(e,t),us(this,`space`,r),typeof n==`number`)for(;++i<cs.length;){let e=cs[i];us(this,cs[i],(n&ts[e])===ts[e])}}};ls.prototype.defined=!0;function us(e,t,n){n&&(e[t]=n)}function ds(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ls(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[$o(r)]=r,n[$o(a.attribute)]=r}return new Zo(t,n,e.space)}var fs=ds({properties:{ariaActiveDescendant:null,ariaAtomic:rs,ariaAutoComplete:null,ariaBusy:rs,ariaChecked:rs,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:rs,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:rs,ariaFlowTo:G,ariaGrabbed:rs,ariaHasPopup:null,ariaHidden:rs,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:W,ariaLive:null,ariaModal:rs,ariaMultiLine:rs,ariaMultiSelectable:rs,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:rs,ariaReadOnly:rs,ariaRelevant:null,ariaRequired:rs,ariaRoleDescription:G,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:rs,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ps(e,t){return t in e?e[t]:t}function ms(e,t){return ps(e,t.toLowerCase())}var hs=ds({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:as,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:G,autoFocus:U,autoPlay:U,blocking:G,capture:null,charSet:null,checked:U,cite:null,className:G,cols:W,colSpan:null,content:null,contentEditable:rs,controls:U,controlsList:G,coords:W|as,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:is,draggable:rs,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:G,height:W,hidden:is,high:W,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:G,itemRef:G,itemScope:U,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,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:U,optimum:W,pattern:null,ping:G,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:G,required:U,reversed:U,rows:W,rowSpan:W,sandbox:G,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:rs,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:rs,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:rs,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:ms}),gs=ds({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:os,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:G,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:as,g2:as,glyphName:as,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:os,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,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:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:os,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:os,rev:os,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:os,requiredFeatures:os,requiredFonts:os,requiredFormats:os,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:os,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:os,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:os,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ps}),_s=ds({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()}}),vs=ds({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ms}),ys=ds({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),bs={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`},xs=/[A-Z]/g,Ss=/-[a-z]/g,Cs=/^data[-\w.:]+$/i;function ws(e,t){let n=$o(t),r=t,i=es;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Cs.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ss,Es);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ss.test(e)){let n=e.replace(xs,Ts);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ls}return new i(r,t)}function Ts(e){return`-`+e.toLowerCase()}function Es(e){return e.charAt(1).toUpperCase()}var Ds=Qo([fs,hs,_s,vs,ys],`html`),Os=Qo([fs,gs,_s,vs,ys],`svg`);function ks(e){return e.join(` `).trim()}var As=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;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
10
|
+
\r`.includes(e)?``:encodeURIComponent(e))),Bn(e)}function Hn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Gn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[In];i=Un(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[In];i=Un(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[In]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function Un(e,t){let n=Kn();return{...t,key:n,__TSR_key:n,[In]:e}}function Wn(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>Vn(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Gn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Kn();t.history.replaceState({[In]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Gn(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[In]-l.state[In],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=Hn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Rn,x,{capture:!0}),t.removeEventListener(Ln,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Rn,x,{capture:!0}),t.addEventListener(Ln,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Gn(e,t){let n=Vn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Kn();t={[In]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Kn(){return(Math.random()+1).toString(36).substring(7)}function qn(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Jn(e){return e.pathname+e.search+e.hash}function Yn(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Xn(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Zn({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Qn(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function $n(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var er=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Wn()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&At(n)?Mn(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Fn(this.latestLocation,e),Zt(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Sn(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&vn(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:un(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Ct(e),external:!1,searchStr:o,search:ft(t?.search,i),hash:Ct(r.slice(1)),state:pt(t?.state,a)}}let o=Nn(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:Ct(Bn(o.pathname)),external:!!this.rewrite&&qn(o,this.origin),searchStr:c,search:ft(t?.search,s),hash:Ct(o.hash.slice(1)),state:pt(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=xn(kt(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Gn(n.href,{});n={...n,to:Nn(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=Mt(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[kt(c)],u=c.includes(`$`),d;if(l)d=l._branch??=Tn(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??hn(!1,{fullPath:c},0):void 0,p;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(p??=ar(n.params,e),!ut(p))break;p===e&&(p=Object.assign(dt(),p));try{Object.assign(p,t(p))}catch{}}}p??=ar(n.params,or(n.params,f)?o()[3]:sr);let m=e.leaveParams?c:Bn(Ct(f?It(c,f,p,this.pathParamsDecoder):c)),h=cr(d,e._includeValidateSearch),g=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,ir(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},_=h.length?lr(h,g(),n):n.search===!0?g():typeof n.search==`function`?n.search(g()):n.search||sr,v=this.options.stringifySearch(_),y=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,b=y?`#${y}`:``,x=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:sr,S=`${m}${v}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=e.origin,n=Pn(this.rewrite,e);C=Jn(e),qn(n,t)?(w=n.href,T=!0):w=Bn(Jn(n))}else C=wt(S),w=C;return{publicHref:w,href:C,pathname:m,search:_,searchStr:v,state:x,hash:y??``,external:T,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=yn(r.pathname,this.processedTree);if(t){let i=Object.assign(dt(),t.rawParams),{from:a,params:o,...s}=t.route,c=ar(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return tr(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=kt(this.latestLocation.href)===kt(n.href)&&ht(Zn(n.state),Zn(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?bt(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return tr(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await ti(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Xn(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Yn(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(xt.test(n)||(r=bt(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:qn(e,this.origin)||(n=Jn(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=mr,this.preloadRoute=e=>ni(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?Mt(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=bn(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!ht(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?ht(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Nt(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??rn,parseSearch:e.parseSearch??nn,protocolAllowlist:e.protocolAllowlist??yt}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=hn(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:kt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?ur(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=ir(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof nr||(r=new nr(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=dt(),_=i._interpolation?It(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{dr(i,d)}catch(e){if(x=Lt(e)||ln(e)?e:new rr(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:ft(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=Yn(i)?`pending`:`success`;C={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?ft(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?pt(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?ft(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=st(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=st(a),c={...e.search};for(let e of a)try{Object.assign(c,ir(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{dr(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function tr(e,t,{replace:n,ignoreBlocker:r}){if(!St(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var nr=class extends Error{},rr=class extends Error{};function ir(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new nr(`Async validation not supported`);if(n.issues)throw new nr(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function ar(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function or(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!lt.call(e,t[1]))}var sr=Object.freeze({});function cr(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=ir(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function lr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=ct(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function ur(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return sn}function dr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function fr(e,t){return e.options[t]?.preload?.()}function pr(e,t){let n=fr(e,`component`),r=fr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function mr(e,t,n){let r=()=>t===!1?void 0:t?fr(e,t):pr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function hr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var gr=0,_r=1,vr=2,yr=3,br=[4];function xr(e){return typeof e[0]==`number`}function Sr(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Cr(e,t){return e.routesById[t.routeId]}function wr(e,t,n){return ln(e)?[yr,e]:Lt(e)?(e.routeId||=n,[vr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[_r,e]):[gr,e]}function Tr(e,t){let n=wr(t,!0,e.id);if(n[0]!==_r)return n;try{e.options.onError?.(n[1])}catch(t){n=wr(t,!0,e.id)}return n}function Er(e,t,n,r,i){return i[0].signal.aborted?br:Hr(e,t,n,Tr(n,r),i)}async function Dr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Cr(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return kr(e,r),[i,Er(e,t,u,a,n)]}if(c.aborted)return[i,br];let p=r.paramsError??r.searchError;if(p!==void 0)return kr(e,r),[i,Er(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{Mr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Sr(a,c):a);if(c.aborted)return[i,br];let s=Hr(e,t,u,wr(o,!1,u.id),n);if(s[0]!==gr)return kr(e,r),[i,s];r.context={...r.context,...o}}catch(a){return kr(e,r),[i,Er(e,t,u,a,n)]}finally{r.status=h,Mr(e,r,!1,n[0])}}i()}function Or(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function kr(e,t){let n=t._flight;t._flight=void 0,Or(e,t,n)?.abort()}function Ar(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Or(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function jr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Mr(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Nr(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Pr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return br;if(!i)return[gr,void 0];let l=n._flight;Mr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Nr(e,t,n,r,s,a,!!o[3]))).then(e=>wr(e,!1,r.id),e=>wr(e,!0,r.id)).then(t=>(t[0]!==gr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===_r&&l[2]?Tr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Hr(e,t,r,await Sr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return kr(e,n),br}finally{Mr(e,n,!1,s)}}function Fr(e,t,n){t[0]!==yr&&(e.status=`success`,e.error=void 0,t[0]===gr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Ir(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&kr(e,r)}function Lr(e,t){return t[0]===_r||t[0]===vr?{...e,status:t[0]===_r?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Rr(e,t,n,r,i,a,o){let s=t[1][n],c=Cr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Nr(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=br)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,kr(e,s),p=Er(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Or(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Pr(e,t,s,c,g,i,a).then(t=>(Fr(s,t,l),t[0]===gr&&(m&&!a[0].signal.aborted&&Ir(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[gr,s.loaderData]),T=(async()=>{try{let e=mr(c,void 0,C);e&&await Sr(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Er(e,t,c,r,a)]}let r=await w;x&&r[0]===gr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Lr(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=Pr(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Fr(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>Lr(E,e))}async function zr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Cr(e,t[n]);try{let e=mr(i,!1);e&&await Sr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Br(e,t){t[2]&&=(Ar(e,t[2].map(e=>e[3])),void 0)}async function Vr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=yr)throw[a,t];!i&&t[0]!==gr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===yr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Hr(e,t,n,r,i,a){for(;r[0]===yr;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[yr,t]:[yr,t,a]}return[yr,o,n]}catch(e){r=a?[_r,e]:Tr(n,e),a=!0}}return r}async function Ur(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===vr?zr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=yr)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==gr&&t[0]<yr&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=yr){let n=s[1];if(n[0]!==yr||n[1].options.reloadDocument||n[2])return Br(e,t),n;c=!0,s=[0,[_r,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===_r?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Cr(e,u);try{await Sr(i?Promise.resolve().then(()=>mr(m,l===_r?`errorComponent`:`notFoundComponent`)):Promise.all([mr(m),mr(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Br(e,t),br}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Br(e,t),Ar(e,o),p()):u.status=`success`}return t}async function Wr(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Cr(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Sr(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Gr(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await zr(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Rr(e,i,t,u,f,r,l)},m=await Dr(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===vr){let t=await zr(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=yr&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Ur(e,i,u,r[0],Vr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Vr(i[2],void 0,void 0,h.then(e=>xr(e)?0:hr(n).length,()=>0))),o=await h}catch(t){if(Br(e,i),t===a&&a.aborted)return br;throw t}return xr(o)?o:Wr(e,o,a,r[6]===n.length?r[6]:0)}function Kr(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Cr(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>Kr(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function qr(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function Jr(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!hr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Sr(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Yr(e,t){e._committed=t,e.stores.setMatches(t)}function Xr(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=hr(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=Cr(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Qn(n);Yr(e,n),Ar(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),$n(e,i,n,a,l,t)}async function Zr(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Qr(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function $r(e,t,n,r,i){let a=n.map(e=>({...e}));jr(a);for(let t of r)kr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Ur(e,o,r,t[0],i)}catch(t){throw Ar(e,a),t}if(xr(s)){Ar(e,a),s[0]===yr&&e._tx===t&&e._committed===n&&await Qr(e,t,s);return}if(await Wr(e,s,t[0].signal),e._tx!==t||e._committed!==n){Ar(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),kr(e,n))}Yr(e,a),Ar(e,n,a)}async function ei(e,t,n,r,i,a){let o=await Gr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(xr(o)){let n=o[0]===yr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&qr(e,t),Ar(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){qr(e,t);return}await Qr(e,t,o);return}let s=o[1];if(e._tx===t&&await Jr(e,t),e._tx!==t){qr(e,t),Ar(e,s),Br(e,o);return}let c=t[2],l=Xn(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Jr(e,t),e._tx!==t){qr(e,t),Ar(e,s),Br(e,o);return}let n=await e.startTransition(()=>{qr(e,t),Xr(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){Br(e,o);return}u?.length&&$r(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function ti(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Xn(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await Zr(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});jr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Ar(e,m),await Zr(e,n);return}e._preflight=void 0;let g,_=()=>ei(e,y,f,()=>Kr(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>Zr(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&Mr(e,t,!1)}n[0].abort(),Ar(e,n[3],y[3],!0)}if(e._tx!==y){Ar(e,y[3]),y[3]=[],g?.(),await Zr(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&Kr(e,y),g?.(_()),await y[5]}async function ni(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),jr(a),o=(e._preloads??=new Map).set(i,a),s=await Gr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Ar(e,a)),i.abort()}if(!xr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Lt(e)||console.error(e);return}}}var ri=`Error preloading route! ☝️`,ii=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=sn:this.parentRoute||Et();let r=n?sn:t?.path;r&&r!==`/`&&(r=Ot(r));let i=t?.id||r,a=n?sn:Dt((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:Dt(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=kt(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>cn({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ai=class extends ii{constructor(e){super(e)}},oi=class extends v.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?v.createElement(this.props.errorComponent??si,{error:e[0],reset:this.reset}):this.props.children}};function si({error:e}){let[t,n]=v.useState(!1);return(0,x.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,x.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,x.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,x.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,x.jsx)(`div`,{children:(0,x.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,x.jsx)(`code`,{children:e.message}):null})}):null]})}var ci=()=>!0,li=()=>!1;function ui({children:e,fallback:t=null}){return(0,x.jsx)(v.Fragment,{children:di()?e:t})}function di(){return v.useSyncExternalStore(fi,ci,li)}function fi(){return()=>{}}var pi=v.createContext(null);function mi(e){return v.useContext(pi)}var hi=v.createContext(void 0),gi=v.createContext(void 0);function _i({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function vi(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var yi=[],bi=0,{link:xi,unlink:Si,propagate:Ci,checkDirty:wi,shallowPropagate:Ti}=_i({update(e){return e._update()},notify(e){yi[Di++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,ji(e))}}),Ei=0,Di=0,Oi,ki=0;function Ai(e){try{++ki,e()}finally{--ki||Mi()}}function ji(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Si(n,e)}function Mi(){if(!(ki>0)){for(;Ei<Di;){let e=yi[Ei];yi[Ei++]=void 0,e.notify()}Ei=0,Di=0}}function Ni(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return Oi!==void 0&&xi(i,Oi,bi),i._snapshot},subscribe(e){let t=vi(e),n={current:!1},r=Pi(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Oi,o=t?.compare??Object.is;if(n)Oi=i,++bi,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Oi=a,n&&(i.flags&=-5),ji(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&wi(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ti(e)}}else e&32&&(i.flags=e&-33);return Oi!==void 0&&xi(i,Oi,bi),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Ci(e),Ti(e),Mi())}},i}function Pi(e){let t=()=>{let t=Oi;Oi=n,++bi,n.depsTail=void 0,n.flags=6;try{return e()}finally{Oi=t,n.flags&=-5,ji(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&wi(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,ji(this)}};return t(),n}var Fi=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ii=o(((e,t)=>{t.exports=Fi()})),Li=o((e=>{var t=d(),n=Ii();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Ri=l(o(((e,t)=>{t.exports=Li()}))(),1);function zi(e,t){return e===t}function Bi(e,t=e=>e,n){let r=n?.compare??zi,i=(0,v.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,v.useCallback)(()=>e.get(),[e]);return(0,Ri.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Vi={};function Hi(e,t){let n=v.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=pt(n.current,i):i}}function Ui(e){let t=mi(),n=v.useContext(e.from?gi:hi),r=e.from??n,i=t.stores.getMatchStore(r),a=Hi(e,t),o=Bi(i,e=>e?a(e):Vi);if(o!==Vi)return o;(e.shouldThrow??!0)&&Et()}function Wi(e){return Ui({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Gi(e){let{select:t,...n}=e;return Ui({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Ki(e){return Ui({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function qi(e){return Ui({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ji(e){let t=mi();return v.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Yi(e){let t=mi(),n=Ji(),r=v.useRef(null);return ot(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function Xi(e){return Ui({...e,select:t=>e.select?e.select(t.context):t.context})}function Zi(...e){let t=v.useRef(e),n=t.current;return e.forEach((e,t)=>{ht(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Qi(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(ri)})}var $i={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function ea(e,t){let n=typeof e==`string`&&bt(e);if(n)return t.has(n)?e:null}function ta(e,t,n,r,i){let a=jt(e.pathname,r),o=jt(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!ht(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function na(e,t,n){let r=mi(),i=v.useRef(null),a=v.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:m,ignoreBlocker:h,disabled:g,target:_,onClick:y,onBlur:b,onFocus:x,onMouseEnter:S,onMouseLeave:C,onTouchStart:w}=e,T=di(),[E,D,O]=Zi(e.search,e.params,o),[k,A]=v.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,E,D,e.state,e.mask,e.unsafeRelative]),j=v.useCallback(e=>{let t=ea(s,r.protocolAllowlist);if(t!==void 0)return[t??void 0];k._fromLocation||(A._fromLocation=e);let n=r.buildLocation(A),i=ua(n,r,g);return[i,!g&&(!i||bt(i))?void 0:ta(e,n,O,r.basepath,T)]},[O,g,T,k,A,r,s]),[M,N]=Bi(r.stores.location,j,$i),P=N===void 0?M:void 0,F=g||M===void 0,ee=v.useRef(!1),I=e.reloadDocument||P||F?!1:c??r.options.defaultPreload,te=l??r.options.defaultPreloadDelay??0,ne=v.useCallback(e=>{let t=e?.isIntersecting;if(!(t??I===`intent`)){t===!1&&ca(i);return}if(!te){Qi(r,k);return}sa.has(i)||sa.set(i,setTimeout(()=>{sa.delete(i),Qi(r,k)},te))},[r,k,i,I,te]);v.useEffect(()=>{I===`render`&&!ee.current&&(ee.current=!0,Qi(r,k));let e;return I===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(e=new IntersectionObserver(e=>ne(e.pop()),{rootMargin:`100px`}),e.observe(i.current)),()=>{e?.disconnect(),ca(i)}},[r,k,I,ne,i]);let L=aa(e,n);if(L.ref=t?a:i,P)return L.href=P,L;let re=e=>{let t=_??e.currentTarget.getAttribute(`target`);!F&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...k,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:m,ignoreBlocker:h}))},ie=()=>{I===`intent`&&Qi(r,k)},ae=()=>{I===`intent`&&ca(i)};return L.onClick=la(y,re),L.onBlur=la(b,ae),L.onFocus=la(x,ne),L.onMouseEnter=la(S,ne),L.onMouseLeave=la(C,ae),L.onTouchStart=la(w,ie),oa(L,e,N,M,F,n)}var ra={},ia={className:`active`},B=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function aa(e,t){let n={};for(let r in e)B.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function oa(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=ct(n?o:s,{})??(n?ia:ra);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var sa=new WeakMap,ca=e=>{clearTimeout(sa.get(e)),sa.delete(e)},la=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ua(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!St(i,t.protocolAllowlist))return i}var da=v.memo(v.forwardRef((e,t)=>{let n=e._asChild||`a`,r=na(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return v.createElement(n,r,i)}),fa);function fa(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!B.has(r)||!ht(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var pa=class extends ii{constructor(e){super(e),this.useMatch=e=>Ui({...e,from:this.id}),this.useRouteContext=e=>Xi({...e,from:this.id}),this.useSearch=e=>qi({...e,from:this.id}),this.useParams=e=>Ki({...e,from:this.id}),this.useLoaderDeps=e=>Gi({...e,from:this.id}),this.useLoaderData=e=>Wi({...e,from:this.id}),this.useNavigate=()=>Ji({from:this.fullPath}),this.Link=v.forwardRef((e,t)=>(0,x.jsx)(da,{ref:t,from:this.fullPath,...e}))}};function ma(e){return new pa(e)}var ha=class extends ai{constructor(e){super(e),this.useMatch=e=>Ui({...e,from:this.id}),this.useRouteContext=e=>Xi({...e,from:this.id}),this.useSearch=e=>qi({...e,from:this.id}),this.useParams=e=>Ki({...e,from:this.id}),this.useLoaderDeps=e=>Gi({...e,from:this.id}),this.useLoaderData=e=>Wi({...e,from:this.id}),this.useNavigate=()=>Ji({from:this.fullPath}),this.Link=v.forwardRef((e,t)=>(0,x.jsx)(da,{ref:t,from:this.fullPath,...e}))}};function ga(e){return new ha(e)}function _a(e){let t=mi(),n=`not-found-${Bi(t.stores.location,e=>e.pathname)}-${Bi(t.stores.status)}`;return(0,x.jsx)(oi,{getResetKey:()=>n,onCatch:(t,n)=>{if(Lt(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Lt(t))return e.fallback?.(t);throw t},children:e.children})}function va(){return(0,x.jsx)(`p`,{children:`Not Found`})}function ya(e){return(0,x.jsx)(x.Fragment,{children:e.children})}function ba(e,t,n){return t.options.notFoundComponent?(0,x.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,x.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,x.jsx)(va,{})}function xa(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,x.jsx)(n,{}):null}var Sa=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ca=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,wa=v.memo(function({routeId:e}){let t=mi();return(0,x.jsx)(Ta,{router:t,match:Bi(t.stores.getMatchStore(e))})});function Ta({router:e,match:t}){let n=e.routesById[t.routeId],r=xa(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Ca(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?v.Suspense:ya,l=i?oi:ya,u=o?_a:ya;return(0,x.jsxs)(n.isRoot?n.options.shellComponent??ya:ya,{children:[(0,x.jsx)(hi.Provider,{value:t.routeId,children:(0,x.jsx)(c,{fallback:r,children:(0,x.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Lt(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,x.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return v.createElement(o,e)},children:s?(0,x.jsx)(ui,{fallback:r,children:(0,x.jsx)(Ea,{match:t})}):(0,x.jsx)(Ea,{match:t})})})})}),null]})}var Ea=v.memo(function({match:e}){let t=mi(),n=e.routeId,r=t.routesById[n],i=v.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=v.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,x.jsx)(e,{},i):(0,x.jsx)(Da,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ca(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return xa(t,r)}if(e.status===`notFound`)return ba(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Da=v.memo(function(){let e=mi(),t=v.useContext(hi),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Bi(a,e=>[!!e._notFound,e.error],{compare:Sa}),i=Bi(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ba(e,e.routesById[t],r);if(!i)return null;let a=(0,x.jsx)(wa,{routeId:i});return t===`__root__`?(0,x.jsx)(v.Suspense,{fallback:xa(e),children:a}):a});function Oa(e,t){let n=e[1];e.length=0,n?.(t)}function ka({t:e}){let t=mi(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Oa(n,!1),n.push(i,a),e(t),v.startTransition(r)}),ot(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(kt(r.publicHref)!==kt(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Xn(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Aa(){let e=mi(),t=e.routesById[sn],n=xa(e,t),r=e.ssr?ya:v.Suspense,i=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ka,{t:v.useState()[1]}),(0,x.jsx)(r,{fallback:n,children:(0,x.jsx)(ja,{})})]});return e.options.InnerWrap?(0,x.jsx)(e.options.InnerWrap,{children:i}):i}function ja(){let e=mi(),t=e._rendered,n=Bi(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;ot(()=>{t[0]===n&&Oa(t,!0)},[t,n]);let a=i?(0,x.jsx)(wa,{routeId:i}):null;return(0,x.jsx)(hi.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,x.jsx)(oi,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Ma=e=>({createMutableStore:Ni,createReadonlyStore:Ni,batch:Ai}),Na=e=>new Pa(e),Pa=class extends er{constructor(e){super(e,Ma)}};function Fa({router:e,children:t,...n}){ut(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,x.jsx)(pi.Provider,{value:e,children:t});return e.options.Wrap?(0,x.jsx)(e.options.Wrap,{children:r}):r}function Ia({router:e,...t}){return(0,x.jsx)(Fa,{router:e,...t,children:(0,x.jsx)(Aa,{})})}function La(e){let t=mi({warn:e?.router===void 0}),n=e?.router||t;return Bi(n.stores.__store,Hi(e,n))}var Ra={"delivery-completed":{label:`Delivery completed`,tone:`success`},"delivery-completed-release-blocked":{label:`Delivery completed`,tone:`warning`,description:`Release blocked`},ready:{label:`Ready`,tone:`success`},initialized:{label:`Initialized`,tone:`neutral`},"completed-only":{label:`Completed`,tone:`success`,description:`Further workflow steps available`}};function za(e,t){return Ra[e]||(e===`not-applicable`?{label:`Needs attention`,tone:`warning`,description:t??`Additional configuration required`}:e.includes(`blocked`)?{label:Ua(e),tone:`danger`}:e.includes(`completed`)||e.includes(`ready`)?{label:Ua(e),tone:`success`}:e.includes(`missing`)||e.includes(`incomplete`)?{label:Ua(e),tone:`warning`}:{label:Ua(e),tone:`neutral`})}function Ba(e,t){return e===t||t!==`/overview`&&e.startsWith(t+`/`)}var Va={bugfix:`Bug fix`,feature:`Feature`,hotfix:`Hotfix`,spike:`Spike`,chore:`Chore`,maintenance:`Maintenance`,refactor:`Refactor`,docs:`Docs`};function Ha(e){return e?Va[e]??Ua(e):`Unknown`}function Ua(e){return e.replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}function Wa(e){return Ua(e)}function Ga(e){return{ready:e.filter(e=>e.status!==`Missing`&&e.status!==`Not applicable`).length,total:e.length}}function Ka(e,t){let n=e.completed??0,r=t-n-(e.archived??0),i=[];return n>0&&i.push(`${n} completed`),r>0&&i.push(`${r} active`),i.length===0&&t===0?`No work items`:i.join(` · `)}function qa(e){return e===0?`No modules registered`:`Registered`}function Ja(e,t,n){let r=e+t+n;if(r===0)return{total:0,label:`No findings`,tone:`success`};let i=[];e>0&&i.push(`${e} blocking`),t>0&&i.push(`${t} warning${t>1?`s`:``}`),n>0&&i.push(`${n} FYI`);let a=e>0?`danger`:t>0?`warning`:`info`;return{total:r,label:i.join(` · `),tone:a}}function Ya(e,t){return{completed:e,total:t,label:`Overall Kaddo workflow coverage`}}function Xa(e){let{recommendedNextStep:t}=e;if(!t.label)return null;let n=t.label.match(/(?:Use |run )?(\S+-agent)/i)?.[1],r=t.label;n&&(r=r.replace(/^Use \S+-agent to /i,``)),r=r.replace(/\(.*?\)\s*\.?$/,``).trim(),r=r.replace(/\b\w/,e=>e.toUpperCase()),r.endsWith(`.`)&&(r=r.slice(0,-1));let i=n?`Use ${n} to ${r.charAt(0).toLowerCase()}${r.slice(1)}.`:void 0;return{title:r,description:i,agent:n,command:t.command}}var Za={"not-started":`neutral`,"in-progress":`info`,completed:`success`,partial:`warning`,blocked:`danger`,passed:`success`,failed:`danger`,"accepted-with-exceptions":`warning`,"not-assessed":`neutral`,ready:`success`,released:`success`,"not-applicable":`neutral`};function Qa(e){return e?{label:Ua(e),tone:Za[e]??`neutral`}:null}var $a={affected:`Affected`,"reviewed-not-affected":`Reviewed — not affected`,unknown:`Unknown`,"not-applicable":`Not applicable`},eo={affected:`info`,"reviewed-not-affected":`neutral`,unknown:`warning`,"not-applicable":`neutral`};function to(e){return{label:$a[e]??Ua(e),tone:eo[e]??`neutral`}}var no={pending:`warning`,passed:`success`,failed:`danger`,blocked:`danger`,waived:`neutral`,"not-applicable":`neutral`};function ro(e){return{label:Ua(e),tone:no[e]??`neutral`}}var io={high:`success`,medium:`warning`,low:`danger`};function ao(e){return e?{label:Ua(e),tone:io[e]??`neutral`}:{label:`Not assessed`,tone:`neutral`}}function oo(e){return e===`affected`||e===`unknown`}function so(e){return e===`neutral`?`muted`:e}var co=[{label:`Overview`,path:`/overview`,icon:`◎`},{label:`Knowledge`,path:`/knowledge`,icon:`📚`},{label:`Work Items`,path:`/work-items`,icon:`📋`},{label:`System`,path:`/system`,icon:`⚙`},{label:`Integrations`,path:`/integrations`,icon:`🔌`},{label:`External Items`,path:`/external-items`,icon:`🔍`}];function lo({projectName:e}){let t=mi(),n=La({select:e=>e.location.pathname});return(0,x.jsxs)(`aside`,{style:{width:220,flexShrink:0,background:`var(--surface)`,borderRight:`1px solid var(--border)`,display:`flex`,flexDirection:`column`},children:[(0,x.jsxs)(`div`,{style:{padding:`20px 16px 16px`,borderBottom:`1px solid var(--border)`},children:[(0,x.jsx)(`div`,{style:{fontSize:16,fontWeight:700,color:`var(--primary)`},children:`Kaddo Admin`}),(0,x.jsx)(`div`,{style:{fontSize:10,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.5,marginTop:10},children:`Project`}),(0,x.jsx)(`div`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e})]}),(0,x.jsx)(`nav`,{style:{padding:`8px 0`,flex:1},children:co.map(e=>{let r=Ba(n,e.path);return(0,x.jsxs)(`button`,{onClick:()=>!e.disabled&&t.navigate({to:e.path}),disabled:e.disabled,"aria-current":r?`page`:void 0,style:{display:`flex`,alignItems:`center`,gap:10,width:`100%`,padding:`10px 16px`,border:`none`,background:r?`var(--surface-muted)`:`transparent`,color:e.disabled?`var(--foreground-muted)`:r?`var(--foreground)`:`var(--foreground-muted)`,fontSize:14,fontWeight:r?600:400,cursor:e.disabled?`default`:`pointer`,opacity:e.disabled?.5:1,textAlign:`left`,borderLeft:r?`3px solid var(--primary)`:`3px solid transparent`,fontFamily:`inherit`},children:[(0,x.jsx)(`span`,{style:{width:20,textAlign:`center`},children:e.icon}),(0,x.jsx)(`span`,{children:e.label}),e.disabled&&(0,x.jsx)(`span`,{style:{fontSize:10,marginLeft:`auto`},children:`Soon`})]},e.path)})})]})}var uo=`/api/v1/admin`,fo=class extends Error{code;status;constructor(e,t,n){super(t),this.name=`ApiError`,this.code=e,this.status=n}};async function po(e){let t=await fetch(`${uo}${e}`,{credentials:`include`});if(!t.ok){let e=await t.json().catch(()=>null);throw new fo(e?.error?.code??`ERROR`,e?.error?.message??`Request failed: ${t.status}`,t.status)}return t.json()}async function mo(e,t,n){let r=await fetch(`${uo}${e}`,{method:t,credentials:`include`,...n===void 0?{}:{headers:{"Content-Type":`application/json`},body:JSON.stringify(n)}});if(!r.ok){let e=await r.json().catch(()=>null);throw new fo(e?.error?.code??`ERROR`,e?.error?.message??`Request failed: ${r.status}`,r.status)}return r.json()}function ho(e){let t=new URLSearchParams;e.status&&e.status!==`all`&&t.set(`status`,e.status),e.module&&e.module!==`all`&&t.set(`module`,e.module),e.query&&e.query.trim()&&t.set(`query`,e.query.trim());let n=t.toString();return n?`?${n}`:``}var V={initSession:()=>po(`/session`),getOverview:()=>po(`/overview`),getProject:()=>po(`/project`),getKnowledge:()=>po(`/knowledge`),getModules:()=>po(`/modules`),getReadiness:()=>po(`/readiness`),getRoute:()=>po(`/route`),getFindings:()=>po(`/findings`),getSystemMap:()=>po(`/system`),getTopologyHandoff:()=>po(`/system/topology-handoff`),getKnowledgeInventory:()=>po(`/knowledge/inventory`),getKnowledgeArtifact:e=>po(`/knowledge/artifact/${encodeURIComponent(e)}`),getWorkItemsList:(e={})=>po(`/work-items${ho(e)}`),getWorkItem:e=>po(`/work-items/${encodeURIComponent(e)}`),getCaptureDefinition:()=>po(`/work-items-capture`),createWorkItem:(e,t,n)=>mo(`/work-items`,`POST`,{intent:e,type:t,...n?{answers:n}:{}}),getWorkItemEdit:e=>po(`/work-items/${encodeURIComponent(e)}/edit`),updateWorkItem:(e,t,n)=>mo(`/work-items/${encodeURIComponent(e)}`,`PUT`,{model:t,expectedRevision:n}),validateWorkItem:e=>mo(`/work-items/${encodeURIComponent(e)}/validate`,`POST`),transitionReady:(e,t)=>mo(`/work-items/${encodeURIComponent(e)}/transitions/ready`,`POST`,{expectedRevision:t}),transitionDraft:(e,t)=>mo(`/work-items/${encodeURIComponent(e)}/transitions/draft`,`POST`,{expectedRevision:t}),getRefinementHandoff:e=>po(`/work-items/${encodeURIComponent(e)}/refinement-handoff`),getIntegrations:()=>po(`/integrations`),getIntegrationTypes:()=>po(`/integrations/types`),getIntegrationDetail:e=>po(`/integrations/${encodeURIComponent(e)}`),getIntegrationSecretStatus:e=>po(`/integrations/${encodeURIComponent(e)}/secrets`),getIntegrationStatus:e=>po(`/integrations/${encodeURIComponent(e)}/status`),createIntegration:e=>mo(`/integrations`,`POST`,e),updateIntegration:(e,t)=>mo(`/integrations/${encodeURIComponent(e)}`,`PUT`,t),deleteIntegration:e=>mo(`/integrations/${encodeURIComponent(e)}`,`DELETE`),enableIntegration:e=>mo(`/integrations/${encodeURIComponent(e)}/enable`,`POST`),disableIntegration:e=>mo(`/integrations/${encodeURIComponent(e)}/disable`,`POST`),setIntegrationSecret:(e,t,n)=>mo(`/integrations/${encodeURIComponent(e)}/secrets/${encodeURIComponent(t)}`,`POST`,{value:n}),removeIntegrationSecret:(e,t)=>mo(`/integrations/${encodeURIComponent(e)}/secrets/${encodeURIComponent(t)}`,`DELETE`),getExternalWorkItems:(e,t={})=>{let n=new URLSearchParams;t.cursor&&n.set(`cursor`,t.cursor),t.pageSize&&n.set(`pageSize`,String(t.pageSize)),t.filters?.statuses?.length&&n.set(`statuses`,t.filters.statuses.join(`,`)),t.filters?.types?.length&&n.set(`types`,t.filters.types.join(`,`)),t.filters?.labels?.length&&n.set(`labels`,t.filters.labels.join(`,`)),t.filters?.assignees?.length&&n.set(`assignees`,t.filters.assignees.join(`,`)),t.filters?.search&&n.set(`search`,t.filters.search);let r=n.toString();return po(`/integrations/${encodeURIComponent(e)}/work-items${r?`?${r}`:``}`)},getExternalWorkItem:(e,t)=>po(`/integrations/${encodeURIComponent(e)}/work-items/${encodeURIComponent(t)}`),getImportPreview:(e,t,n)=>po(`/integrations/${encodeURIComponent(e)}/work-items/${encodeURIComponent(t)}/import-preview${n?`?type=${encodeURIComponent(n)}`:``}`),importExternalWorkItem:(e,t,n)=>mo(`/integrations/${encodeURIComponent(e)}/work-items/${encodeURIComponent(t)}/import`,`POST`,{type:n}),discoverExternalWorkItems:(e={})=>{let t=new URLSearchParams;e.filters?.statuses?.length&&t.set(`statuses`,e.filters.statuses.join(`,`)),e.filters?.types?.length&&t.set(`types`,e.filters.types.join(`,`)),e.filters?.labels?.length&&t.set(`labels`,e.filters.labels.join(`,`)),e.filters?.assignees?.length&&t.set(`assignees`,e.filters.assignees.join(`,`)),e.filters?.search&&t.set(`search`,e.filters.search),e.pageSize&&t.set(`pageSize`,String(e.pageSize)),e.integrationIds?.length&&t.set(`integrationIds`,e.integrationIds.join(`,`));let n=t.toString();return po(`/integrations/discover${n?`?${n}`:``}`)},getIntegrationFilters:e=>po(`/integrations/${encodeURIComponent(e)}/filters`),updateIntegrationFilters:(e,t)=>mo(`/integrations/${encodeURIComponent(e)}/filters`,`PUT`,t)};function go(){let{data:e}=it({queryKey:[`project`],queryFn:V.getProject,staleTime:6e4});return(0,x.jsxs)(`div`,{style:{display:`flex`,minHeight:`100vh`,background:`var(--background)`},children:[(0,x.jsx)(lo,{projectName:e?.name??`...`}),(0,x.jsx)(`main`,{style:{flex:1,minWidth:0,overflow:`auto`},children:(0,x.jsx)(Da,{})})]})}var _o={default:{bg:`var(--surface-muted)`,color:`var(--foreground)`},success:{bg:`color-mix(in srgb, var(--success) 15%, transparent)`,color:`var(--success)`},warning:{bg:`color-mix(in srgb, var(--warning) 15%, transparent)`,color:`var(--warning)`},danger:{bg:`color-mix(in srgb, var(--danger) 15%, transparent)`,color:`var(--danger)`},info:{bg:`color-mix(in srgb, var(--info) 15%, transparent)`,color:`var(--info)`},muted:{bg:`var(--surface-muted)`,color:`var(--foreground-muted)`}};function vo({variant:e=`default`,children:t}){let{bg:n,color:r}=_o[e];return(0,x.jsx)(`span`,{style:{display:`inline-flex`,alignItems:`center`,padding:`2px 10px`,borderRadius:`var(--radius)`,fontSize:12,fontWeight:600,background:n,color:r},children:t})}function yo(e){return e===`success`?`success`:e===`warning`?`warning`:e===`danger`?`danger`:`muted`}function bo({status:e}){let t=za(e);return(0,x.jsx)(vo,{variant:yo(t.tone),children:t.label})}var xo={Consolidated:`success`,Structured:`success`,Ready:`success`,Useful:`success`,Weak:`warning`,Placeholder:`warning`,Missing:`danger`,"Not applicable":`muted`,"Managed by core":`muted`};function So({status:e}){return(0,x.jsx)(vo,{variant:xo[e]??`muted`,children:e})}function Co({layer:e,status:t,navigable:n=!1}){let r=mi(),i=e.toLowerCase();return n?(0,x.jsxs)(`button`,{onClick:()=>r.navigate({to:`/knowledge/$layer`,params:{layer:i}}),style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:14,padding:`6px 4px`,width:`100%`,border:`none`,background:`none`,cursor:`pointer`,fontFamily:`inherit`,borderRadius:4,transition:`background 0.1s`},onMouseEnter:e=>e.currentTarget.style.background=`var(--surface-muted)`,onMouseLeave:e=>e.currentTarget.style.background=`none`,children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground)`},children:e}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,x.jsx)(So,{status:t}),(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`,fontSize:14},children:`→`})]})]}):(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:14,padding:`4px 0`},children:[(0,x.jsx)(`span`,{children:e}),(0,x.jsx)(So,{status:t})]})}function wo({role:e,available:t}){return t?e===`core`?(0,x.jsx)(vo,{variant:`info`,children:`Core`}):(0,x.jsx)(vo,{variant:`success`,children:`Module`}):(0,x.jsx)(vo,{variant:`danger`,children:`Unavailable`})}function To({title:e,description:t}){return(0,x.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,padding:`48px 24px`,color:`var(--foreground-muted)`,textAlign:`center`},children:[(0,x.jsx)(`p`,{style:{fontSize:16,fontWeight:600,margin:`0 0 4px`},children:e}),t&&(0,x.jsx)(`p`,{style:{fontSize:14,margin:0},children:t})]})}function Eo({readiness:e}){let t=Xa(e);return t?(0,x.jsxs)(`section`,{"aria-labelledby":`next-action-heading`,style:{background:`color-mix(in srgb, var(--primary) 8%, var(--surface))`,border:`1px solid color-mix(in srgb, var(--primary) 25%, var(--border))`,borderRadius:`var(--radius)`,padding:`16px 20px`,marginBottom:20},children:[(0,x.jsx)(`div`,{style:{fontSize:11,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.5,marginBottom:8},children:(0,x.jsx)(`span`,{id:`next-action-heading`,children:`Next action`})}),(0,x.jsx)(`div`,{style:{fontSize:15,fontWeight:600,color:`var(--foreground)`,marginBottom:t.description||t.agent?6:0},children:t.title}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:13,color:`var(--foreground-muted)`,marginBottom:t.agent||t.command?8:0},children:t.description}),(t.agent||t.command)&&(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[t.agent&&(0,x.jsx)(`span`,{className:`font-mono`,style:{display:`inline-block`,padding:`2px 8px`,background:`color-mix(in srgb, var(--primary) 15%, var(--surface))`,borderRadius:3,fontSize:12,color:`var(--primary)`,fontWeight:500},children:t.agent}),t.command&&(0,x.jsx)(`code`,{className:`font-mono`,style:{display:`inline-block`,padding:`2px 8px`,background:`var(--surface-muted)`,borderRadius:3,fontSize:12,color:`var(--foreground-muted)`},children:t.command})]})]}):null}function Do({title:e,value:t,subtitle:n,icon:r}){return(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`,display:`flex`,alignItems:`center`,gap:14},children:[r&&(0,x.jsx)(`div`,{style:{fontSize:22,flexShrink:0},children:r}),(0,x.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,x.jsx)(`div`,{style:{fontSize:12,fontWeight:500,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.3},children:e}),(0,x.jsx)(`div`,{style:{fontSize:22,fontWeight:700,color:`var(--foreground)`,marginTop:2},children:t}),n&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2},children:n})]})]})}var Oo={done:`✓`,current:`●`,warning:`⚠`,blocked:`✗`,next:`○`,pending:`○`,optional:`○`,skipped:`—`},ko={done:`var(--success)`,current:`var(--primary)`,warning:`var(--warning)`,blocked:`var(--danger)`,next:`var(--foreground-muted)`,pending:`var(--foreground-muted)`,optional:`var(--foreground-muted)`,skipped:`var(--foreground-muted)`};function Ao({completed:e,total:t,progressPercent:n,steps:r}){let[i,a]=(0,v.useState)(!1),o=Ya(e,t);return(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`},children:[(0,x.jsxs)(`button`,{onClick:()=>a(!i),"aria-expanded":i,"aria-label":`Project Route progress: ${e} of ${t} steps completed`,style:{display:`flex`,alignItems:`center`,gap:12,width:`100%`,border:`none`,background:`none`,cursor:`pointer`,padding:0,color:`var(--foreground)`,fontFamily:`inherit`,fontSize:14},children:[(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3},children:`Project Route`}),(0,x.jsx)(`div`,{role:`progressbar`,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":`${e} of ${t} steps completed`,style:{flex:1,height:6,borderRadius:3,background:`var(--surface-muted)`,overflow:`hidden`},children:(0,x.jsx)(`div`,{style:{width:`${n}%`,height:`100%`,borderRadius:3,background:n===100?`var(--success)`:`var(--primary)`,transition:`width 0.3s ease`}})}),(0,x.jsxs)(`span`,{style:{fontSize:13,color:`var(--foreground-muted)`,whiteSpace:`nowrap`},children:[e,`/`,t]}),(0,x.jsx)(`span`,{style:{fontSize:10,color:`var(--foreground-muted)`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0)`},children:`▼`})]}),(0,x.jsx)(`div`,{style:{fontSize:11,color:`var(--foreground-muted)`,marginTop:4,paddingLeft:0},children:o.label}),i&&(0,x.jsx)(`div`,{style:{marginTop:12,display:`flex`,flexDirection:`column`,gap:4,paddingLeft:4},children:r.map(e=>(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:ko[e.status]??`var(--foreground-muted)`,width:16,textAlign:`center`},children:Oo[e.status]??`○`}),(0,x.jsx)(`span`,{style:{color:e.status===`done`?`var(--foreground)`:`var(--foreground-muted)`},children:e.label})]},e.id))})]})}var jo={blocking:`danger`,warning:`warning`,fyi:`muted`};function Mo({level:e,count:t}){return(0,x.jsx)(vo,{variant:jo[e]??`muted`,children:t===void 0?e:`${t} ${e}`})}function No({blocking:e,warning:t,fyi:n,items:r}){let[i,a]=(0,v.useState)(!1),o=Ja(e,t,n);return o.total===0?(0,x.jsxs)(`div`,{role:`status`,style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`,display:`flex`,alignItems:`center`,gap:10},children:[(0,x.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.3},children:`Findings`}),(0,x.jsx)(`span`,{style:{fontSize:13,color:`var(--success)`},children:`✓ No findings`})]}):(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`16px 18px`},children:[(0,x.jsxs)(`button`,{onClick:()=>a(!i),"aria-expanded":i,"aria-label":`Findings: ${o.label}`,style:{display:`flex`,alignItems:`center`,gap:12,width:`100%`,border:`none`,background:`none`,cursor:`pointer`,padding:0,color:`var(--foreground)`,fontFamily:`inherit`},children:[(0,x.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:`var(--foreground-muted)`,textTransform:`uppercase`,letterSpacing:.3},children:`Findings`}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,flex:1},children:[e>0&&(0,x.jsx)(Mo,{level:`blocking`,count:e}),t>0&&(0,x.jsx)(Mo,{level:`warning`,count:t}),n>0&&(0,x.jsx)(Mo,{level:`fyi`,count:n})]}),(0,x.jsx)(`span`,{style:{fontSize:10,color:`var(--foreground-muted)`,transition:`transform 0.2s`,transform:i?`rotate(180deg)`:`rotate(0)`},children:`▼`})]}),i&&r.length>0&&(0,x.jsx)(`div`,{style:{marginTop:12,display:`flex`,flexDirection:`column`,gap:4,fontSize:13},children:r.map((e,t)=>(0,x.jsxs)(`div`,{style:{color:`var(--foreground-muted)`},children:[(0,x.jsxs)(`span`,{style:{textTransform:`capitalize`,fontWeight:600,color:`var(--finding-${e.level})`},children:[e.level,`: `]}),e.message]},t))})]})}function Po(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[[1,2,3].map(e=>(0,x.jsx)(`div`,{style:{height:120,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,marginBottom:16,animation:`pulse 1.5s ease-in-out infinite`}},e)),(0,x.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }`})]})}function Fo({title:e,children:t}){return(0,x.jsxs)(`div`,{style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:20},children:[(0,x.jsx)(`h3`,{style:{fontSize:12,fontWeight:600,color:`var(--foreground-muted)`,margin:`0 0 12px`,textTransform:`uppercase`,letterSpacing:.3},children:e}),t]})}function Io(){let e=C(),t=mi(),{data:n,isLoading:r,error:i}=it({queryKey:[`overview`],queryFn:V.getOverview,refetchOnWindowFocus:!0});if(r)return(0,x.jsx)(Po,{});if(i)return(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`Error loading project`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 0`,fontSize:14},children:i.message})]})});if(!n)return(0,x.jsx)(To,{title:`No project data`,description:`Could not load project information.`});let{project:a,knowledge:o,workItems:s,modules:c,readiness:l,route:u,findings:d}=n,f=Ga(o.layers),p=Ja(d.blocking,d.warning,d.fyi);return(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:1200,margin:`0 auto`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:`0 0 4px`},children:a.name}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`},children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:13,color:`var(--foreground-muted)`},children:Wa(a.structure)}),(0,x.jsx)(`span`,{style:{color:`var(--border-strong)`},children:`·`}),(0,x.jsx)(bo,{status:l.overall})]})]}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`overview`]}),"aria-label":`Refresh overview`,style:{padding:`8px 14px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground-muted)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`},children:`↻ Refresh`})]}),(0,x.jsx)(Eo,{readiness:l}),(0,x.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(200px, 1fr))`,gap:16,marginBottom:20},children:[(0,x.jsx)(`div`,{onClick:()=>t.navigate({to:`/knowledge`}),style:{cursor:`pointer`},children:(0,x.jsx)(Do,{title:`Knowledge`,value:`${f.ready}/${f.total}`,subtitle:`Layers ready`})}),(0,x.jsx)(`div`,{onClick:()=>t.navigate({to:`/work-items`}),style:{cursor:`pointer`},children:(0,x.jsx)(Do,{title:`Work Items`,value:s.total,subtitle:Ka(s.byState,s.total)})}),(0,x.jsx)(Do,{title:`Modules`,value:c.modules.length,subtitle:qa(c.modules.length)}),(0,x.jsx)(Do,{title:`Findings`,value:p.total,subtitle:p.label})]}),(0,x.jsx)(`div`,{style:{marginBottom:16},children:(0,x.jsx)(Ao,{completed:u.completed,total:u.total,progressPercent:u.progressPercent,steps:u.steps})}),(0,x.jsx)(`div`,{style:{marginBottom:16},children:(0,x.jsx)(No,{blocking:d.blocking,warning:d.warning,fyi:d.fyi,items:d.items})}),(0,x.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(380px, 1fr))`,gap:16},children:[(0,x.jsx)(Fo,{title:`Knowledge`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:o.layers.map(e=>(0,x.jsx)(Co,{layer:e.layer,status:e.status,navigable:!0},e.layer))})}),c.modules.length>0&&(0,x.jsx)(Fo,{title:`Modules`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:c.modules.map(e=>(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,fontSize:14},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontWeight:600},children:e.id}),e.path&&(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`,marginLeft:8,fontSize:12},children:e.path})]}),(0,x.jsx)(wo,{role:e.role,available:e.available})]},e.id))})})]})]})}function Lo(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[[1,2,3,4].map(e=>(0,x.jsx)(`div`,{style:{height:100,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,marginBottom:16,animation:`pulse 1.5s ease-in-out infinite`}},e)),(0,x.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }`})]})}function Ro(){let e=C(),t=mi(),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(`all`),[o,s]=(0,v.useState)(`all`),{data:c,isLoading:l,error:u}=it({queryKey:[`knowledge-inventory`],queryFn:V.getKnowledgeInventory,refetchOnWindowFocus:!0});if(l)return(0,x.jsx)(Lo,{});if(u)return(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`Knowledge could not be loaded`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 8px`,fontSize:14,color:`var(--foreground-muted)`},children:`The project is still available, but the Knowledge inventory could not be read.`}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`knowledge-inventory`]}),style:{padding:`6px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`,color:`var(--foreground)`},children:`Retry`})]})});if(!c||c.layers.length===0)return(0,x.jsxs)(`div`,{style:{padding:`48px 32px`,textAlign:`center`,color:`var(--foreground-muted)`},children:[(0,x.jsx)(`div`,{style:{fontSize:32,marginBottom:12},children:`📚`}),(0,x.jsx)(`h2`,{style:{fontSize:18,fontWeight:600,margin:`0 0 8px`,color:`var(--foreground)`},children:`No knowledge available`}),(0,x.jsx)(`p`,{style:{fontSize:14},children:`This project does not contain knowledge artifacts yet.`}),(0,x.jsx)(`p`,{style:{fontSize:13,marginTop:8},children:`Use the Kaddo workflow to build the project knowledge baseline.`})]});let d=n.toLowerCase(),f=c.layers.filter(e=>i===`all`||e.id===i).map(e=>({...e,artifacts:e.artifacts.filter(e=>!(o!==`all`&&e.status!==o||d&&!e.title.toLowerCase().includes(d)&&!e.path.toLowerCase().includes(d)&&!e.layer.toLowerCase().includes(d)))})),p=[...new Set(c.layers.flatMap(e=>e.artifacts.map(e=>e.status)))];return(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:1200,margin:`0 auto`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:8},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:`0 0 4px`},children:`Knowledge`}),(0,x.jsx)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`,margin:0},children:`Explore the project knowledge used by Kaddo.`})]}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`knowledge-inventory`]}),"aria-label":`Refresh knowledge`,style:{padding:`8px 14px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground-muted)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`},children:`↻ Refresh`})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:12,marginBottom:20,flexWrap:`wrap`,alignItems:`center`},children:[(0,x.jsx)(`input`,{type:`search`,placeholder:`Search knowledge...`,value:n,onChange:e=>r(e.target.value),"aria-label":`Search knowledge`,style:{flex:`1 1 200px`,padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:14,fontFamily:`inherit`,outline:`none`,minWidth:200}}),(0,x.jsxs)(`select`,{value:i,onChange:e=>a(e.target.value),"aria-label":`Filter by layer`,style:{padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`},children:[(0,x.jsx)(`option`,{value:`all`,children:`All layers`}),c.layers.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.label},e.id))]}),p.length>1&&(0,x.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),"aria-label":`Filter by status`,style:{padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`},children:[(0,x.jsx)(`option`,{value:`all`,children:`All statuses`}),p.map(e=>(0,x.jsx)(`option`,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))]})]}),(0,x.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:16},children:f.map(e=>{let n=e.artifacts.filter(e=>e.status===`missing`||e.status===`placeholder`).length;return(0,x.jsxs)(`button`,{onClick:()=>t.navigate({to:`/knowledge/$layer`,params:{layer:e.id}}),style:{background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:20,cursor:`pointer`,textAlign:`left`,fontFamily:`inherit`,transition:`border-color 0.15s`},onMouseEnter:e=>e.currentTarget.style.borderColor=`var(--primary)`,onMouseLeave:e=>e.currentTarget.style.borderColor=`var(--border)`,children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:8},children:[(0,x.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,margin:0,color:`var(--foreground)`},children:e.label}),(0,x.jsx)(So,{status:e.status})]}),(0,x.jsxs)(`div`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:[e.artifacts.length,` artifact`,e.artifacts.length===1?``:`s`,n>0&&(0,x.jsxs)(`span`,{style:{color:`var(--warning)`,marginLeft:8},children:[n,` needs attention`]})]})]},e.id)})}),f.every(e=>e.artifacts.length===0)&&n&&(0,x.jsx)(`div`,{style:{textAlign:`center`,padding:32,color:`var(--foreground-muted)`},children:(0,x.jsxs)(`p`,{style:{fontSize:14},children:[`No artifacts match "`,n,`"`]})})]})}function zo({crumbs:e}){let t=mi();return(0,x.jsx)(`nav`,{"aria-label":`Breadcrumb`,style:{fontSize:13,color:`var(--foreground-muted)`,marginBottom:16},children:e.map((e,n)=>(0,x.jsxs)(`span`,{children:[n>0&&(0,x.jsx)(`span`,{style:{margin:`0 6px`},children:`/`}),e.path?(0,x.jsx)(`button`,{onClick:()=>t.navigate({to:e.path}),style:{background:`none`,border:`none`,padding:0,cursor:`pointer`,color:`var(--primary)`,fontFamily:`inherit`,fontSize:`inherit`,textDecoration:`none`},children:e.label}):(0,x.jsx)(`span`,{style:{color:`var(--foreground)`},children:e.label})]},n))})}var Bo={available:{label:`Available`,variant:`success`},missing:{label:`Missing`,variant:`danger`},placeholder:{label:`Needs content`,variant:`warning`},"not-applicable":{label:`Not applicable`,variant:`muted`},unknown:{label:`Unknown`,variant:`muted`}};function Vo({status:e}){let t=Bo[e]??{label:e,variant:`muted`};return(0,x.jsx)(vo,{variant:t.variant,children:t.label})}function H(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[[1,2,3].map(e=>(0,x.jsx)(`div`,{style:{height:60,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,marginBottom:12,animation:`pulse 1.5s ease-in-out infinite`}},e)),(0,x.jsx)(`style`,{children:`@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }`})]})}function Ho(){let{layer:e}=Ki({from:`/knowledge/$layer`}),t=mi(),{data:n,isLoading:r,error:i}=it({queryKey:[`knowledge-inventory`],queryFn:V.getKnowledgeInventory,refetchOnWindowFocus:!0});if(r)return(0,x.jsx)(H,{});if(i)return(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`Error loading knowledge`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 0`,fontSize:14},children:i.message})]})});let a=n?.layers.find(t=>t.id===e);return a?(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:1200,margin:`0 auto`},children:[(0,x.jsx)(zo,{crumbs:[{label:`Knowledge`,path:`/knowledge`},{label:a.label}]}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,marginBottom:20},children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:0},children:a.label}),(0,x.jsx)(So,{status:a.status})]}),(0,x.jsxs)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`,margin:`0 0 20px`},children:[a.artifacts.length,` artifact`,a.artifacts.length===1?``:`s`]}),a.artifacts.length===0?(0,x.jsx)(`div`,{style:{textAlign:`center`,padding:32,color:`var(--foreground-muted)`},children:(0,x.jsx)(`p`,{style:{fontSize:14},children:`No artifacts in this layer.`})}):(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:a.artifacts.map(n=>(0,x.jsxs)(`button`,{onClick:()=>t.navigate({to:`/knowledge/$layer/$artifactId`,params:{layer:e,artifactId:n.id}}),style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:`14px 18px`,cursor:`pointer`,fontFamily:`inherit`,textAlign:`left`,transition:`border-color 0.15s`},onMouseEnter:e=>e.currentTarget.style.borderColor=`var(--primary)`,onMouseLeave:e=>e.currentTarget.style.borderColor=`var(--border)`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`var(--foreground)`},children:n.title}),(0,x.jsx)(`div`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2},children:n.path})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,flexShrink:0},children:[(0,x.jsx)(Vo,{status:n.status}),(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`,fontSize:14},children:`→`})]})]},n.id))})]}):(0,x.jsxs)(`div`,{style:{padding:`48px 32px`,textAlign:`center`,color:`var(--foreground-muted)`},children:[(0,x.jsx)(`h2`,{style:{fontSize:18,fontWeight:600,color:`var(--foreground)`},children:`Layer not found`}),(0,x.jsxs)(`p`,{style:{fontSize:14},children:[`Knowledge layer "`,e,`" does not exist.`]})]})}function Uo(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Wo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Go=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ko={};function qo(e,t){return((t||Ko).jsx?Go:Wo).test(e)}var Jo=/[ \t\n\f\r]/g;function Yo(e){return typeof e==`object`?e.type===`text`&&Xo(e.value):Xo(e)}function Xo(e){return e.replace(Jo,``)===``}var Zo=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Zo.prototype.normal={},Zo.prototype.property={},Zo.prototype.space=void 0;function Qo(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Zo(n,r,t)}function $o(e){return e.toLowerCase()}var es=class{constructor(e,t){this.attribute=t,this.property=e}};es.prototype.attribute=``,es.prototype.booleanish=!1,es.prototype.boolean=!1,es.prototype.commaOrSpaceSeparated=!1,es.prototype.commaSeparated=!1,es.prototype.defined=!1,es.prototype.mustUseProperty=!1,es.prototype.number=!1,es.prototype.overloadedBoolean=!1,es.prototype.property=``,es.prototype.spaceSeparated=!1,es.prototype.space=void 0;var ts=s({boolean:()=>U,booleanish:()=>rs,commaOrSpaceSeparated:()=>os,commaSeparated:()=>as,number:()=>W,overloadedBoolean:()=>is,spaceSeparated:()=>G}),ns=0,U=ss(),rs=ss(),is=ss(),W=ss(),G=ss(),as=ss(),os=ss();function ss(){return 2**++ns}var cs=Object.keys(ts),ls=class extends es{constructor(e,t,n,r){let i=-1;if(super(e,t),us(this,`space`,r),typeof n==`number`)for(;++i<cs.length;){let e=cs[i];us(this,cs[i],(n&ts[e])===ts[e])}}};ls.prototype.defined=!0;function us(e,t,n){n&&(e[t]=n)}function ds(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ls(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[$o(r)]=r,n[$o(a.attribute)]=r}return new Zo(t,n,e.space)}var fs=ds({properties:{ariaActiveDescendant:null,ariaAtomic:rs,ariaAutoComplete:null,ariaBusy:rs,ariaChecked:rs,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:rs,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:rs,ariaFlowTo:G,ariaGrabbed:rs,ariaHasPopup:null,ariaHidden:rs,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:W,ariaLive:null,ariaModal:rs,ariaMultiLine:rs,ariaMultiSelectable:rs,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:rs,ariaReadOnly:rs,ariaRelevant:null,ariaRequired:rs,ariaRoleDescription:G,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:rs,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ps(e,t){return t in e?e[t]:t}function ms(e,t){return ps(e,t.toLowerCase())}var hs=ds({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:as,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:G,autoFocus:U,autoPlay:U,blocking:G,capture:null,charSet:null,checked:U,cite:null,className:G,cols:W,colSpan:null,content:null,contentEditable:rs,controls:U,controlsList:G,coords:W|as,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:is,draggable:rs,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:G,height:W,hidden:is,high:W,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:G,itemRef:G,itemScope:U,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,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:U,optimum:W,pattern:null,ping:G,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:G,required:U,reversed:U,rows:W,rowSpan:W,sandbox:G,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:rs,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:rs,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:rs,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:ms}),gs=ds({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:os,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:G,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:as,g2:as,glyphName:as,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:os,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,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:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:os,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:os,rev:os,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:os,requiredFeatures:os,requiredFonts:os,requiredFormats:os,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:os,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:os,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:os,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ps}),_s=ds({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()}}),vs=ds({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ms}),ys=ds({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),bs={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`},xs=/[A-Z]/g,Ss=/-[a-z]/g,Cs=/^data[-\w.:]+$/i;function ws(e,t){let n=$o(t),r=t,i=es;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Cs.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ss,Es);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ss.test(e)){let n=e.replace(xs,Ts);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ls}return new i(r,t)}function Ts(e){return`-`+e.toLowerCase()}function Es(e){return e.charAt(1).toUpperCase()}var Ds=Qo([fs,hs,_s,vs,ys],`html`),Os=Qo([fs,gs,_s,vs,ys],`svg`);function ks(e){return e.join(` `).trim()}var As=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;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
11
11
|
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),js=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(As());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}})),Ms=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))}})),Ns=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(js()),r=Ms();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})),Ps=Is(`end`),Fs=Is(`start`);function Is(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 Ls(e){let t=Fs(e),n=Ps(e);if(t&&n)return{start:t,end:n}}function Rs(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Bs(e.position):`start`in e||`end`in e?Bs(e):`line`in e||`column`in e?zs(e):``}function zs(e){return Vs(e&&e.line)+`:`+Vs(e&&e.column)}function Bs(e){return zs(e&&e.start)+`-`+zs(e&&e.end)}function Vs(e){return e&&typeof e==`number`?e:1}var Hs=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=Rs(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}};Hs.prototype.file=``,Hs.prototype.name=``,Hs.prototype.reason=``,Hs.prototype.message=``,Hs.prototype.stack=``,Hs.prototype.column=void 0,Hs.prototype.line=void 0,Hs.prototype.ancestors=void 0,Hs.prototype.cause=void 0,Hs.prototype.fatal=void 0,Hs.prototype.place=void 0,Hs.prototype.ruleId=void 0,Hs.prototype.source=void 0;var Us=l(Ns(),1),Ws={}.hasOwnProperty,Gs=new Map,Ks=/[A-Z]/g,qs=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Js=new Set([`td`,`th`]),Ys=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Xs(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=sc(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=oc(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`?Os:Ds,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Zs(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Zs(e,t,n){if(t.type===`element`)return Qs(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return $s(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return tc(e,t,n);if(t.type===`mdxjsEsm`)return ec(e,t);if(t.type===`root`)return nc(e,t,n);if(t.type===`text`)return rc(e,t)}function Qs(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Os,e.schema=i),e.ancestors.push(t);let a=pc(e,t.tagName,!1),o=cc(e,t),s=uc(e,t);return qs.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Yo(e)})),ic(e,o,a,t),ac(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $s(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)}mc(e,t.position)}function ec(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mc(e,t.position)}function tc(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Os,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:pc(e,t.name,!0),o=lc(e,t),s=uc(e,t);return ic(e,o,a,t),ac(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nc(e,t,n){let r={};return ac(r,uc(e,t)),e.create(t,e.Fragment,r,n)}function rc(e,t){return t.value}function ic(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ac(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function oc(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 sc(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Fs(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 cc(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ws.call(t.properties,i)){let a=dc(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Js.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 lc(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 mc(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 mc(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function uc(e,t){let n=[],r=-1,i=e.passKeys?new Map:Gs;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=Zs(e,a,o);s!==void 0&&n.push(s)}return n}function dc(e,t,n){let r=ws(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Uo(n):ks(n)),r.property===`style`){let t=typeof n==`object`?n:fc(e,String(n));return e.stylePropertyNameCase===`css`&&(t=hc(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?bs[r.property]||r.property:r.attribute,n]}}function fc(e,t){try{return(0,Us.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Hs("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=Ys+`#cannot-parse-style-attribute`,r}}function pc(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=qo(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=qo(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ws.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);mc(e)}function mc(e,t){let n=new Hs("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=Ys+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function hc(e){let t={},n;for(n in e)Ws.call(e,n)&&(t[gc(n)]=e[n]);return t}function gc(e){let t=e.replace(Ks,_c);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function _c(e){return`-`+e.toLowerCase()}var vc={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`]},yc={};function bc(e,t){let n=t||yc;return xc(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function xc(e,t,n){if(Cc(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 Sc(e.children,t,n)}return Array.isArray(e)?Sc(e,t,n):``}function Sc(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=xc(e[i],t,n);return r.join(``)}function Cc(e){return!!(e&&typeof e==`object`)}var wc=document.createElement(`i`);function Tc(e){let t=`&`+e+`;`;wc.innerHTML=t;let n=wc.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Ec(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 Dc(e,t){return e.length>0?(Ec(e,e.length,0,t),e):t}var Oc={}.hasOwnProperty;function kc(e){let t={},n=-1;for(;++n<e.length;)Ac(t,e[n]);return t}function Ac(e,t){let n;for(n in t){let r=(Oc.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Oc.call(r,a)||(r[a]=[]);let e=i[a];jc(r[a],Array.isArray(e)?e:e?[e]:[])}}}function jc(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Ec(e,0,0,r)}function Mc(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 Nc(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Pc=Uc(/[A-Za-z]/),Fc=Uc(/[\dA-Za-z]/),Ic=Uc(/[#-'*+\--9=?A-Z^-~]/);function Lc(e){return e!==null&&(e<32||e===127)}var Rc=Uc(/\d/),zc=Uc(/[\dA-Fa-f]/),Bc=Uc(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}var Vc=Uc(/\p{P}|\p{S}/u),Hc=Uc(/\s/);function Uc(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Wc(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Fc(e.charCodeAt(n+1))&&Fc(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 Y(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J(r)?(e.enter(n),s(r)):t(r)}function s(r){return J(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Gc={tokenize:Kc};function Kc(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`),Y(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 K(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var qc={tokenize:Yc},Jc={tokenize:Xc};function Yc(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 Ec(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(Jc,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(Jc,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 K(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++;Ec(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 Xc(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Zc(e){if(e===null||q(e)||Hc(e))return 1;if(Vc(e))return 2}function Qc(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 $c={name:`attention`,resolveAll:el,tokenize:tl};function el(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};nl(d,-c),nl(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=Dc(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Dc(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Dc(l,Qc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Dc(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=Dc(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Ec(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 tl(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Zc(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=Zc(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 nl(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var rl={name:`autolink`,tokenize:il};function il(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 Pc(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Fc(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||Fc(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||Lc(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Ic(t)?(e.consume(t),l):n(t)}function u(e){return Fc(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||Fc(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var al={partial:!0,tokenize:ol};function ol(e,t,n){return r;function r(t){return J(t)?Y(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||K(e)?t(e):n(e)}}var sl={continuation:{tokenize:ll},exit:ul,name:`blockQuote`,tokenize:cl};function cl(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 J(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ll(e,t,n){let r=this;return i;function i(t){return J(t)?Y(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(sl,t,n)(r)}}function ul(e){e.exit(`blockQuote`)}var dl={name:`characterEscape`,tokenize:fl};function fl(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 Bc(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var pl={name:`characterReference`,tokenize:ml};function ml(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=Fc,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=zc,u):(e.enter(`characterReferenceValue`),a=7,o=Rc,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Fc&&!Tc(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 hl={partial:!0,tokenize:vl},gl={concrete:!0,name:`codeFenced`,tokenize:_l};function _l(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`),J(t)?Y(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||K(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(hl,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||K(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Y(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||K(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||K(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&&J(t)?Y(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(hl,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(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`),J(t)?Y(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`),J(t)?Y(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function vl(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 yl={name:`codeIndented`,tokenize:xl},bl={partial:!0,tokenize:Sl};function xl(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Y(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):K(t)?e.attempt(bl,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||K(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Sl(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Y(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):K(e)?i(e):n(e)}}var Cl={name:`codeText`,previous:Tl,resolve:wl,tokenize:El};function wl(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 Tl(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function El(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)):K(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||K(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 Dl=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&&Ol(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),Ol(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ol(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);Ol(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ol(this.left,t.reverse())}}}};function Ol(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 kl(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Dl(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,Al(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 Ec(e,0,1/0,u.slice(0)),!l}function Al(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 jl={resolve:Nl,tokenize:Pl},Ml={partial:!0,tokenize:Fl};function Nl(e){return kl(e),e}function Pl(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):K(t)?e.check(Ml,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 Fl(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,a,`linePrefix`)}function a(i){if(i===null||K(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 Il(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||Lc(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||K(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||q(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||Lc(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 Ll(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):K(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||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Rl(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):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(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 zl(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J(i)?Y(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Bl={name:`definition`,tokenize:Hl},Vl={partial:!0,tokenize:Ul};function Hl(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Ll.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Nc(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 q(t)?zl(e,l)(t):l(t)}function l(t){return Il(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Vl,d,d)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ul(e,t,n){return r;function r(t){return q(t)?zl(e,i)(t):n(t)}function i(t){return Rl(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J(t)?Y(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}var Wl={name:`hardBreakEscape`,tokenize:Gl};function Gl(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Kl={name:`headingAtx`,resolve:ql,tokenize:Jl};function ql(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`},Ec(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Jl(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||q(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):J(n)?Y(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||q(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Yl=`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(`.`),Xl=[`pre`,`script`,`style`,`textarea`],Zl={concrete:!0,name:`htmlFlow`,resolveTo:eu,tokenize:tu},Ql={partial:!0,tokenize:ru},$l={partial:!0,tokenize:nu};function eu(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 tu(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:ee):Pc(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):Pc(a)?(e.consume(a),i=4,r.interrupt?t:ee):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ee):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 Pc(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Xl.includes(l)?(i=1,r.interrupt?t(s):O(s)):Yl.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||Fc(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 J(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Pc(t)?(e.consume(t),b):J(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Fc(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J(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):J(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(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||q(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||K(t)?O(t):J(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),I):t===63&&i===3?(e.consume(t),ee):t===93&&i===5?(e.consume(t),F):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Ql,te,k)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check($l,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||K(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),ee):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 Xl.includes(n)?(e.consume(t),I):O(t)}return Pc(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),ee):O(t)}function ee(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),ee):O(t)}function I(t){return t===null||K(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),I)}function te(n){return e.exit(`htmlFlow`),t(n)}}function nu(e,t,n){let r=this;return i;function i(t){return K(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 ru(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(al,t,n)}}var iu={name:`htmlText`,tokenize:au};function au(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):Pc(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):Pc(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):K(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):K(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):K(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return Pc(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Fc(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,N(t)):J(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Fc(t)?(e.consume(t),w):t===47||t===62||q(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||Pc(t)?(e.consume(t),E):K(t)?(o=T,N(t)):J(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Fc(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):K(t)?(o=D,N(t)):J(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):K(t)?(o=O,N(t)):J(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):K(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||q(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||q(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 J(t)?Y(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 ou={name:`labelEnd`,resolveAll:uu,resolveTo:du,tokenize:fu},su={tokenize:pu},cu={tokenize:mu},lu={tokenize:hu};function uu(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&&Ec(e,0,e.length,n),e}function du(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=Dc(s,e.slice(a+1,a+r+3)),s=Dc(s,[[`enter`,u,t]]),s=Dc(s,Qc(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Dc(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Dc(s,e.slice(o+1)),s=Dc(s,[[`exit`,c,t]]),Ec(e,a,e.length,s),e}function fu(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(Nc(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(su,u,o?u:d)(t):t===91?e.attempt(cu,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(lu,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function pu(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 q(t)?zl(e,a)(t):a(t)}function a(t){return t===41?u(t):Il(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return q(t)?zl(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Rl(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return q(t)?zl(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 mu(e,t,n){let r=this;return i;function i(t){return Ll.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Nc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function hu(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 gu={name:`labelStartImage`,resolveAll:ou.resolveAll,tokenize:_u};function _u(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 vu={name:`labelStartLink`,resolveAll:ou.resolveAll,tokenize:yu};function yu(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 bu={name:`lineEnding`,tokenize:xu};function xu(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Y(e,t,`linePrefix`)}}var Su={name:`thematicBreak`,tokenize:Cu};function Cu(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||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J(t)?Y(e,s,`whitespace`)(t):s(t))}}var wu={continuation:{tokenize:Ou},exit:Au,name:`list`,tokenize:Du},Tu={partial:!0,tokenize:ju},Eu={partial:!0,tokenize:ku};function Du(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:Rc(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(Su,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 Rc(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(al,r.interrupt?n:u,e.attempt(Tu,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J(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 Ou(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(al,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J(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(Eu,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(wu,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ku(e,t,n){let r=this;return Y(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 Au(e){e.exit(this.containerState.type)}function ju(e,t,n){let r=this;return Y(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!J(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Mu={name:`setextUnderline`,resolveTo:Nu,tokenize:Pu};function Nu(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 Pu(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`),J(t)?Y(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Fu={tokenize:Iu};function Iu(e){let t=this,n=e.attempt(al,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(jl,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 Lu={resolveAll:Vu()},Ru=Bu(`string`),zu=Bu(`text`);function Bu(e){return{resolveAll:Vu(e===`text`?Hu: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 Vu(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 Hu(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 Uu=s({attentionMarkers:()=>Zu,contentInitial:()=>Gu,disable:()=>X,document:()=>Wu,flow:()=>qu,flowInitial:()=>Ku,insideSpan:()=>Xu,string:()=>Ju,text:()=>Yu}),Wu={42:wu,43:wu,45:wu,48:wu,49:wu,50:wu,51:wu,52:wu,53:wu,54:wu,55:wu,56:wu,57:wu,62:sl},Gu={91:Bl},Ku={[-2]:yl,[-1]:yl,32:yl},qu={35:Kl,42:Su,45:[Mu,Su],60:Zl,61:Mu,95:Su,96:gl,126:gl},Ju={38:pl,92:dl},Yu={[-5]:bu,[-4]:bu,[-3]:bu,33:gu,38:pl,42:$c,60:[rl,iu],91:vu,92:[Wl,dl],93:ou,95:$c,96:Cl},Xu={null:[$c,Lu]},Zu={null:[42,95]},X={null:[]};function Z(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=Dc(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Qc(a,l.events,l),l.events):[]}function f(e,t){return $u(p(e),t)}function p(e){return Qu(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){K(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&&Ec(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 Qu(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 $u(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
|
|
13
13
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ed(e){let t={constructs:kc([Uu,...(e||{}).extensions||[]]),content:n(Gc),defined:[],document:n(qc),flow:n(Fu),lazy:{},string:n(Ru),text:n(zu)};return t;function n(e){return n;function n(n){return Z(t,e,n)}}}function td(e){for(;!kl(e););return e}var nd=/[\0\t\n\r]/g;function rd(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(nd.lastIndex=u,c=nd.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var id=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ad(e){return e.replace(id,od)}function od(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Mc(n.slice(t?2:1),t?16:10)}return Tc(n)||e}var sd={}.hasOwnProperty;function cd(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ld(n)(td(ed(n).document().write(rd()(e,t,!0))))}function ld(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(he),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(R),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(ue,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(z),hardBreakTrailing:a(z),htmlFlow:a(pe,o),htmlFlowData:T,htmlText:a(pe,o),htmlTextData:T,image:a(me),label:o,link:a(he),listItem:a(_e),listItemValue:f,listOrdered:a(ge,d),listUnordered:a(ge),paragraph:a(ve),reference:ne,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(R),strong:a(ye),thematicBreak:a(xe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ie,characterReference:ae,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:L,resourceDestinationString:ee,resourceTitleString:I,resource:te,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};dd(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];sd.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||pd).call(a,void 0,e[0])}for(r.position={start:ud(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ud(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ud(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||pd).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ud(e.end)}function u(){return bc(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Nc(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=be(),n.position={start:ud(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ud(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ud(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ad(t),n.identifier=Nc(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function L(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Nc(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function re(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Mc(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Tc(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=ud(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function ue(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function fe(){return{type:`emphasis`,children:[]}}function R(){return{type:`heading`,depth:0,children:[]}}function z(){return{type:`break`}}function pe(){return{type:`html`,value:``}}function me(){return{type:`image`,title:null,url:``,alt:null}}function he(){return{type:`link`,title:null,url:``,children:[]}}function ge(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function _e(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function ve(){return{type:`paragraph`,children:[]}}function ye(){return{type:`strong`,children:[]}}function be(){return{type:`text`,value:``}}function xe(){return{type:`thematicBreak`}}}function ud(e){return{line:e.line,column:e.column,offset:e.offset}}function dd(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?dd(e,r):fd(e,r)}}function fd(e,t){let n;for(n in t)if(sd.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function pd(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+`) is still open`)}function md(e){let t=this;t.parser=n;function n(n){return cd(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function hd(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gd(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
@@ -41,4 +41,4 @@ Error generating stack: `+e.message+`
|
|
|
41
41
|
`,`
|
|
42
42
|
+`).split(`
|
|
43
43
|
`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,v.useEffect)(()=>{let n=t?.target??oj,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&zO(e))return!1;let n=lj(e.code,s);if(a.current.add(e[n]),cj(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=lj(e.code,s);cj(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function cj(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function lj(e,t){return t.includes(e)?`code`:`key`}var uj=()=>{let e=NA();return(0,v.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=TO(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return bO(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=xO(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function dj(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)fj(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function fj(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing)}}function pj(e,t){return dj(e,t)}function mj(e,t){return dj(e,t)}function hj(e,t){return{id:e,type:`select`,selected:t}}function gj(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);(a.selected!==void 0||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(hj(a.id,e)))}return r}function _j({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function vj(e){return{id:e.id,type:`remove`}}var yj=vO(`React Flow`,`https://reactflow.dev/`);function bj(e,t,n={}){return QO(e,t,{...n,onError:n.onError??yj})}var xj=e=>KD(e),Sj=e=>GD(e);function Cj(e){return(0,v.forwardRef)(e)}var wj=typeof window<`u`?v.useLayoutEffect:v.useEffect;function Tj(e){let[t,n]=(0,v.useState)(BigInt(0)),[r]=(0,v.useState)(()=>Ej(()=>n(e=>e+BigInt(1))));return wj(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function Ej(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Dj=(0,v.createContext)(null);function Oj({children:e}){let t=NA(),n=Tj((0,v.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=_j({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=Tj((0,v.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(_j({items:s,lookup:o}))},[])),i=(0,v.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,x.jsx)(Dj.Provider,{value:i,children:e})}function kj(){let e=(0,v.useContext)(Dj);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var Aj=e=>!!e.panZoom;function jj(){let e=uj(),t=NA(),n=kj(),r=MA(Aj),i=(0,v.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=xj(e)?e:n.get(e.id),a=i.parentId?AO(i.position,i.measured,i.parentId,n,r):i.position;return dO({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&xj(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&Sj(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await nO({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(vj);o?.(f),c(e)}if(m){let e=d.map(vj);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=gO(e),o=i?e:a(e),s=r!==void 0;return o?(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let c=dO(s?r:a),l=hO(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=gO(e)?e:a(e);if(!r)return!1;let i=hO(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return YD(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??MO();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,v.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var Mj=e=>e.selected,Nj=typeof window<`u`?window:void 0;function Pj({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=NA(),{deleteElements:r}=jj(),i=sj(e,{actInsideInputWithModifier:!1}),a=sj(t,{target:Nj});(0,v.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(Mj),edges:e.filter(Mj)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,v.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function Fj(e){let t=NA();(0,v.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=IO(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,PD.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t&&e.current&&t.unobserve(e.current)}}},[])}var Ij={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},Lj=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Rj({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:i,panOnScrollSpeed:a=.5,panOnScrollMode:o=zD.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:_,onViewportChange:y,isControlledViewport:b,paneClickDistance:S,selectionOnDrag:C}){let w=NA(),T=(0,v.useRef)(null),{userSelectionActive:E,lib:D,connectionInProgress:O}=MA(Lj,OA),k=sj(p),A=(0,v.useRef)();Fj(T);let j=(0,v.useCallback)(e=>{y?.({x:e[0],y:e[1],zoom:e[2]}),b||w.setState({transform:e})},[y,b]);return(0,v.useEffect)(()=>{if(T.current){A.current=sA({domNode:T.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:e=>w.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=w.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=w.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=w.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=A.current.getViewport();return w.setState({panZoom:A.current,transform:[e,t,n],domNode:T.current.closest(`.react-flow`)}),()=>{A.current?.destroy()}}},[]),(0,v.useEffect)(()=>{A.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:i,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:k,preventScrolling:m,noPanClassName:_,userSelectionActive:E,noWheelClassName:g,lib:D,onTransformChange:j,connectionInProgress:O,selectionOnDrag:C,paneClickDistance:S})},[e,t,n,r,i,a,o,s,c,k,m,_,E,g,D,j,O,C,S]),(0,x.jsx)(`div`,{className:`react-flow__renderer`,ref:T,style:Ij,children:h})}var zj=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Bj(){let{userSelectionActive:e,userSelectionRect:t}=MA(zj,OA);return e&&t?(0,x.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Vj=(e,t)=>n=>{n.target===t.current&&e?.(n)},Hj=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Uj({isSelecting:e,selectionKeyPressed:t,selectionMode:n=BD.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:c,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){let g=(0,v.useRef)(0),_=NA(),{userSelectionActive:y,elementsSelectable:b,dragging:S,panBy:C,autoPanSpeed:w}=MA(Hj,OA),T=b&&(e||y),E=(0,v.useRef)(null),D=(0,v.useRef)(),O=(0,v.useRef)(new Set),k=(0,v.useRef)(new Set),A=(0,v.useRef)(!1),j=(0,v.useRef)(!1),M=(0,v.useRef)({x:0,y:0}),N=(0,v.useRef)(!1),P=e=>{if(j.current||A.current||_.getState().connection.inProgress){j.current=!1,A.current=!1;return}l?.(e),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},F=e=>{if(Array.isArray(r)&&r?.includes(2)){e.preventDefault();return}u?.(e)},ee=d?e=>d(e):void 0,I=e=>{j.current&&=(e.stopPropagation(),!1)},te=n=>{if(n.pointerType===`touch`&&r!==!1&&!t)return;let{domNode:i,transform:a}=_.getState();if(D.current=i?.getBoundingClientRect(),!D.current)return;let s=n.target===E.current;if(!s&&n.target.closest(`.nokey`)||!e||!(o&&s||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),j.current=!1;let{x:c,y:l}=VO(n.nativeEvent,D.current),u=bO({x:c,y:l},a);_.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:c,y:l}}),s||(n.stopPropagation(),n.preventDefault())};function ne(e,t){let{userSelectionRect:r}=_.getState();if(!r)return;let{transform:i,nodeLookup:a,edgeLookup:o,connectionLookup:s,triggerNodeChanges:c,triggerEdgeChanges:l,defaultEdgeOptions:u}=_.getState(),d={x:r.startX,y:r.startY},{x:f,y:p}=xO(d,i),m={startX:d.x,startY:d.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=O.current,g=k.current;O.current=new Set(ZD(a,m,i,n===BD.Partial,!0).map(e=>e.id)),k.current=new Set;let v=u?.selectable??!0;for(let e of O.current){let t=s.get(e);if(t)for(let{edgeId:e}of t.values()){let t=o.get(e);t&&(t.selectable??v)&&k.current.add(e)}}jO(h,O.current)||c(gj(a,O.current,!0)),jO(g,k.current)||l(gj(o,k.current)),_.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}function L(){if(!i||!D.current)return;let[e,t]=sO(M.current,D.current,w);C({x:e,y:t}).then(e=>{if(!j.current||!e){g.current=requestAnimationFrame(L);return}let{x:t,y:n}=M.current;ne(t,n),g.current=requestAnimationFrame(L)})}let re=()=>{cancelAnimationFrame(g.current),g.current=0,N.current=!1};(0,v.useEffect)(()=>()=>re(),[]);let ie=e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=_.getState();if(!D.current||!n)return;let{x:o,y:c}=VO(e.nativeEvent,D.current);M.current={x:o,y:c};let l=xO({x:n.startX,y:n.startY},r);if(!j.current){let n=t?0:a;if(Math.hypot(o-l.x,c-l.y)<=n)return;i(),s?.(e)}j.current=!0,N.current||=(L(),!0),ne(o,c)},ae=e=>{if(!T){e.target===E.current&&_.getState().connection.inProgress&&(A.current=!0);return}e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!y&&e.target===E.current&&_.getState().userSelectionRect&&P?.(e),_.setState({userSelectionActive:!1,userSelectionRect:null}),j.current&&(c?.(e),_.setState({nodesSelectionActive:O.current.size>0})),re())},oe=e=>{e.target?.releasePointerCapture?.(e.pointerId),re()},se=r===!0||Array.isArray(r)&&r.includes(0);return(0,x.jsxs)(`div`,{className:Zx([`react-flow__pane`,{draggable:se,dragging:S,selection:e}]),onClick:T?void 0:Vj(P,E),onContextMenu:Vj(F,E),onWheel:Vj(ee,E),onPointerEnter:T?void 0:f,onPointerMove:T?ie:p,onPointerUp:ae,onPointerCancel:T?oe:void 0,onPointerDownCapture:T?te:void 0,onClickCapture:T?I:void 0,onPointerLeave:m,ref:E,style:Ij,children:[h,(0,x.jsx)(Bj,{})]})}function Wj({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c?.(`012`,PD.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function Gj({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=NA(),[c,l]=(0,v.useState)(!1),u=(0,v.useRef)();return(0,v.useEffect)(()=>{if(!t)return u.current=Ik({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{Wj({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}}),()=>{u.current?.destroy(),u.current=void 0}},[t,s,e]),(0,v.useEffect)(()=>{!t&&e.current&&u.current&&u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o})},[n,r,t,a,e,i,o]),c}var Kj=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function qj(){let e=NA();return(0,v.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=Kj(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=yO(t,i));let{position:a,positionAbsolute:s}=tO({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var Jj=(0,v.createContext)(null),Yj=Jj.Provider;Jj.Consumer;var Xj=()=>(0,v.useContext)(Jj),Zj=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Qj=(0,v.createContext)(null);function $j({children:e}){let t=MA(Zj,OA);return(0,x.jsx)(Qj.Provider,{value:t,children:e})}function eM(){let e=(0,v.useContext)(Qj);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}var tM={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},nM=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!i)return tM;let u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===RD.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function rM({type:e=`source`,position:t=$.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=NA(),_=Xj(),{connectOnClick:v,noPanClassName:y,rfId:b}=eM(),{connectingFrom:S,connectingTo:C,clickConnecting:w,isPossibleEndHandle:T,connectionInProcess:E,clickConnectionInProcess:D,valid:O}=MA(nM(_,m,e),OA);_||g.getState().onError?.(`010`,PD.error010());let k=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=g.getState();t(bj(i,e,{onError:n}))}n?.(i),s?.(i)},A=e=>{if(!_)return;let t=BO(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();Kk.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:k,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,x.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${b}-${_}-${m}-${e}`,className:Zx([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:w,connectingfrom:S,connectingto:C,valid:O,connectionindicator:r&&(!E||T)&&(E||D?a:i)}]),onMouseDown:A,onTouchStart:A,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=LO(t.target),h=n||c,{connection:v,isValid:y}=Kk.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&k(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var iM=(0,v.memo)(Cj(rM));function aM({data:e,isConnectable:t,sourcePosition:n=$.Bottom}){return(0,x.jsxs)(x.Fragment,{children:[e?.label,(0,x.jsx)(iM,{type:`source`,position:n,isConnectable:t})]})}function oM({data:e,isConnectable:t,targetPosition:n=$.Top,sourcePosition:r=$.Bottom}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(iM,{type:`target`,position:n,isConnectable:t}),e?.label,(0,x.jsx)(iM,{type:`source`,position:r,isConnectable:t})]})}function sM(){return null}function cM({data:e,isConnectable:t,targetPosition:n=$.Top}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(iM,{type:`target`,position:n,isConnectable:t}),e?.label]})}var lM={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},uM={input:aM,default:oM,output:cM,group:sM};function dM(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var fM=e=>{let{width:t,height:n,x:r,y:i}=XD(e.nodeLookup,{filter:e=>!!e.selected});return{width:_O(t)?t:null,height:_O(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function pM({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=NA(),{width:i,height:a,transformString:o,userSelectionActive:s}=MA(fM,OA),c=qj(),l=(0,v.useRef)(null);(0,v.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(Gj({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,x.jsx)(`div`,{className:Zx([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,x.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(lM,e.key)&&(e.preventDefault(),c({direction:lM[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var mM=typeof window<`u`?window:void 0,hM=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function gM({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:T,autoPanOnSelection:E,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,preventScrolling:j,onSelectionContextMenu:M,noWheelClassName:N,noPanClassName:P,disableKeyboardA11y:F,onViewportChange:ee,isControlledViewport:I}){let{nodesSelectionActive:te,userSelectionActive:ne}=MA(hM,OA),L=sj(l,{target:mM}),re=sj(h,{target:mM}),ie=re||T,ae=re||b,oe=u&&ie!==!0,se=L||ne||oe;return Pj({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,x.jsx)(Rj,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:ae,panActivationKeyPressed:re,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:!L&&ie,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,zoomActivationKeyCode:g,preventScrolling:j,noWheelClassName:N,noPanClassName:P,onViewportChange:ee,isControlledViewport:I,paneClickDistance:s,selectionOnDrag:oe,children:(0,x.jsxs)(Uj,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:ie,autoPanOnSelection:E,isSelecting:!!se,selectionMode:d,selectionKeyPressed:L,paneClickDistance:s,selectionOnDrag:oe,children:[e,te&&(0,x.jsx)(pM,{onSelectionContextMenu:M,noPanClassName:P,disableKeyboardA11y:F})]})})}gM.displayName=`FlowRenderer`;var _M=(0,v.memo)(gM),vM=e=>t=>e?ZD(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function yM(e){return MA((0,v.useCallback)(vM(e),[e]),OA)}var bM=e=>e.updateNodeInternals;function xM(){let e=MA(bM),[t]=(0,v.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,v.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function SM({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=NA(),a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=(0,v.useRef)(e.sourcePosition),c=(0,v.useRef)(e.targetPosition),l=(0,v.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,v.useEffect)(()=>{a.current&&!e.hidden&&(!u||o.current!==a.current)&&(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,v.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,v.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function CM({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:b,isParent:S}=MA(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},OA),C=y.type||`default`,w=g?.[C]||uM[C];w===void 0&&(v?.(`003`,PD.error003(C)),C=`default`,w=g?.default||uM.default);let T=!!(y.draggable||s&&y.draggable===void 0),E=!!(y.selectable||c&&y.selectable===void 0),D=!!(y.connectable||l&&y.connectable===void 0),O=!!(y.focusable||u&&y.focusable===void 0),k=NA(),A=kO(y),j=SM({node:y,nodeType:C,hasDimensions:A,resizeObserver:d}),M=Gj({nodeRef:j,disabled:y.hidden||!T,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:E,nodeClickDistance:_}),N=qj();if(y.hidden)return null;let P=OO(y),F=dM(y),ee=E||T||t||n||r||i,I=n?e=>n(e,{...b.userNode}):void 0,te=r?e=>r(e,{...b.userNode}):void 0,ne=i?e=>i(e,{...b.userNode}):void 0,L=a?e=>a(e,{...b.userNode}):void 0,re=o?e=>o(e,{...b.userNode}):void 0,ie=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=k.getState();E&&(!r||!T||i>0)&&Wj({id:e,store:k,nodeRef:j}),t&&t(n,{...b.userNode})},ae=t=>{if(!(zO(t.nativeEvent)||m)){if(ID.includes(t.key)&&E){let n=t.key===`Escape`;Wj({id:e,store:k,unselect:n,nodeRef:j})}else if(T&&y.selected&&Object.prototype.hasOwnProperty.call(lM,t.key)){t.preventDefault();let{ariaLabelConfig:e}=k.getState();k.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),N({direction:lM[t.key],factor:t.shiftKey?4:1})}}},oe=()=>{if(m||!j.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=k.getState();i&&(ZD(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+P.width/2,y.position.y+P.height/2,{zoom:t[2]}))};return(0,x.jsx)(`div`,{className:Zx([`react-flow__node`,`react-flow__node-${C}`,{[p]:T},y.className,{selected:y.selected,selectable:E,parent:S,draggable:T,dragging:M}]),ref:j,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:ee?`all`:`none`,visibility:A?`visible`:`hidden`,...y.style,...F},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:te,onMouseLeave:ne,onContextMenu:L,onClick:ie,onDoubleClick:re,onKeyDown:O?ae:void 0,tabIndex:O?0:void 0,onFocus:O?oe:void 0,role:y.ariaRole??(O?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${IA}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,x.jsx)(Yj,{value:e,children:(0,x.jsx)(w,{id:e,data:y.data,type:C,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:y.selected??!1,selectable:E,draggable:T,deletable:y.deletable??!0,isConnectable:D,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:M,dragHandle:y.dragHandle,zIndex:b.z,parentId:y.parentId,...P})})})}var wM=(0,v.memo)(CM),TM=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function EM(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=MA(TM,OA),a=yM(e.onlyRenderVisibleElements),o=xM();return(0,x.jsx)(`div`,{className:`react-flow__nodes`,style:Ij,children:a.map(a=>(0,x.jsx)(wM,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}EM.displayName=`NodeRenderer`;var DM=(0,v.memo)(EM);function OM(e){return MA((0,v.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&YO({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),OA)}var kM=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,x.jsx)(`polyline`,{className:`arrow`,style:n,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`})},AM=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,x.jsx)(`polyline`,{className:`arrowclosed`,style:n,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`})},jM={[UD.Arrow]:kM,[UD.ArrowClosed]:AM};function MM(e){let t=NA();return(0,v.useMemo)(()=>Object.prototype.hasOwnProperty.call(jM,e)?jM[e]:(t.getState().onError?.(`009`,PD.error009(e)),null),[e])}var NM=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=MM(t);return c?(0,x.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,x.jsx)(c,{color:n,strokeWidth:o})}):null},PM=({defaultColor:e,rfId:t})=>{let n=MA(e=>e.edges),r=MA(e=>e.defaultEdgeOptions),i=(0,v.useMemo)(()=>fk(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,x.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,x.jsx)(`defs`,{children:i.map(e=>(0,x.jsx)(NM,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};PM.displayName=`MarkerDefinitions`;var FM=(0,v.memo)(PM);function IM({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,v.useState)({x:1,y:0,width:0,height:0}),p=Zx([`react-flow__edge-textwrapper`,l]),m=(0,v.useRef)(null);return(0,v.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,x.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,x.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,x.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}IM.displayName=`EdgeText`;var LM=(0,v.memo)(IM);function RM({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`path`,{...u,d:e,fill:`none`,className:Zx([`react-flow__edge-path`,u.className])}),l?(0,x.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&_O(t)&&_O(n)?(0,x.jsx)(LM,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function zM({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===$.Left||e===$.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function BM({sourceX:e,sourceY:t,sourcePosition:n=$.Bottom,targetX:r,targetY:i,targetPosition:a=$.Top}){let[o,s]=zM({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=zM({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=UO({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function VM(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,b]=BM({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),S=e.isInternal?void 0:t;return(0,x.jsx)(RM,{id:S,path:v,labelX:y,labelY:b,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var HM=VM({isInternal:!1}),UM=VM({isInternal:!0});HM.displayName=`SimpleBezierEdge`,UM.displayName=`SimpleBezierEdgeInternal`;function WM(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=$.Bottom,targetPosition:m=$.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,S]=ak({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition}),C=e.isInternal?void 0:t;return(0,x.jsx)(RM,{id:C,path:y,labelX:b,labelY:S,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var GM=WM({isInternal:!1}),KM=WM({isInternal:!0});GM.displayName=`SmoothStepEdge`,KM.displayName=`SmoothStepEdgeInternal`;function qM(e){return(0,v.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,x.jsx)(GM,{...n,id:r,pathOptions:(0,v.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var JM=qM({isInternal:!1}),YM=qM({isInternal:!0});JM.displayName=`StepEdge`,YM.displayName=`StepEdgeInternal`;function XM(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=$O({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,x.jsx)(RM,{id:y,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var ZM=XM({isInternal:!1}),QM=XM({isInternal:!0});ZM.displayName=`StraightEdge`,QM.displayName=`StraightEdgeInternal`;function $M(e){return(0,v.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=$.Bottom,targetPosition:s=$.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,S]=KO({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature}),C=e.isInternal?void 0:t;return(0,x.jsx)(RM,{id:C,path:y,labelX:b,labelY:S,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var eN=$M({isInternal:!1}),tN=$M({isInternal:!0});eN.displayName=`BezierEdge`,tN.displayName=`BezierEdgeInternal`;var nN={default:tN,straight:QM,step:YM,smoothstep:KM,simplebezier:UM},rN={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},iN=(e,t,n)=>n===$.Left?e-t:n===$.Right?e+t:e,aN=(e,t,n)=>n===$.Top?e-t:n===$.Bottom?e+t:e,oN=`react-flow__edgeupdater`;function sN({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,x.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:Zx([oN,`${oN}-${s}`]),cx:iN(t,r,e),cy:aN(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function cN({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=NA(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;Kk.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,x.jsxs)(x.Fragment,{children:[(e===!0||e===`source`)&&(0,x.jsx)(sN,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,x.jsx)(sN,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function lN({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:_,disableKeyboardA11y:y}){let b=MA(t=>t.edgeLookup.get(e)),S=MA(e=>e.defaultEdgeOptions);b=S?{...S,...b}:b;let C=b.type||`default`,w=h?.[C]||nN[C];w===void 0&&(_?.(`011`,PD.error011(C)),C=`default`,w=h?.default||nN.default);let T=!!(b.focusable||t&&b.focusable===void 0),E=d!==void 0&&(b.reconnectable||n&&b.reconnectable===void 0),D=!!(b.selectable||r&&b.selectable===void 0),O=(0,v.useRef)(null),[k,A]=(0,v.useState)(!1),[j,M]=(0,v.useState)(!1),N=NA(),{zIndex:P=b.zIndex,sourceX:F,sourceY:ee,targetX:I,targetY:te,sourcePosition:ne,targetPosition:L}=MA((0,v.useCallback)(t=>{let n=t.nodeLookup.get(b.source),r=t.nodeLookup.get(b.target);if(!n||!r)return rN;let i=sk({id:e,sourceNode:n,targetNode:r,sourceHandle:b.sourceHandle||null,targetHandle:b.targetHandle||null,connectionMode:t.connectionMode,onError:_}),a=JO({selected:b.selected,zIndex:b.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{...i||rN,zIndex:a}},[b.source,b.target,b.sourceHandle,b.targetHandle,b.selected,b.zIndex,_]),OA),re=(0,v.useMemo)(()=>b.markerStart?`url('#${dk(b.markerStart,m)}')`:void 0,[b.markerStart,m]),ie=(0,v.useMemo)(()=>b.markerEnd?`url('#${dk(b.markerEnd,m)}')`:void 0,[b.markerEnd,m]);if(b.hidden||F===null||ee===null||I===null||te===null)return null;let ae=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=N.getState();D&&(N.setState({nodesSelectionActive:!1}),b.selected&&a?(r({nodes:[],edges:[b]}),O.current?.blur()):n([e])),i&&i(t,b)},oe=a?e=>{a(e,{...b})}:void 0,se=o?e=>{o(e,{...b})}:void 0,ce=s?e=>{s(e,{...b})}:void 0,le=c?e=>{c(e,{...b})}:void 0,ue=l?e=>{l(e,{...b})}:void 0;return(0,x.jsx)(`svg`,{style:{zIndex:P},children:(0,x.jsxs)(`g`,{className:Zx([`react-flow__edge`,`react-flow__edge-${C}`,b.className,g,{selected:b.selected,animated:b.animated,inactive:!D&&!i,updating:k,selectable:D}]),onClick:ae,onDoubleClick:oe,onContextMenu:se,onMouseEnter:ce,onMouseMove:le,onMouseLeave:ue,onKeyDown:T?t=>{if(!y&&ID.includes(t.key)&&D){let{unselectNodesAndEdges:n,addSelectedEdges:r}=N.getState();t.key===`Escape`?(O.current?.blur(),n({edges:[b]})):r([e])}}:void 0,tabIndex:T?0:void 0,role:b.ariaRole??(T?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":b.ariaLabel===null?void 0:b.ariaLabel||`Edge from ${b.source} to ${b.target}`,"aria-describedby":T?`${LA}-${m}`:void 0,ref:O,...b.domAttributes,children:[!j&&(0,x.jsx)(w,{id:e,source:b.source,target:b.target,type:b.type,selected:b.selected,animated:b.animated,selectable:D,deletable:b.deletable??!0,label:b.label,labelStyle:b.labelStyle,labelShowBg:b.labelShowBg,labelBgStyle:b.labelBgStyle,labelBgPadding:b.labelBgPadding,labelBgBorderRadius:b.labelBgBorderRadius,sourceX:F,sourceY:ee,targetX:I,targetY:te,sourcePosition:ne,targetPosition:L,data:b.data,style:b.style,sourceHandleId:b.sourceHandle,targetHandleId:b.targetHandle,markerStart:re,markerEnd:ie,pathOptions:`pathOptions`in b?b.pathOptions:void 0,interactionWidth:b.interactionWidth}),E&&(0,x.jsx)(cN,{edge:b,isReconnectable:E,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:F,sourceY:ee,targetX:I,targetY:te,sourcePosition:ne,targetPosition:L,setUpdateHover:A,setReconnecting:M})]})})}var uN=(0,v.memo)(lN),dN=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function fN({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=MA(dN,OA),b=OM(t);return(0,x.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,x.jsx)(FM,{defaultColor:e,rfId:n}),b.map(e=>(0,x.jsx)(uN,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}fN.displayName=`EdgeRenderer`;var pN=(0,v.memo)(fN),mN=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function hN({children:e}){let t=NA(),n=(0,v.useRef)(null),[r]=(0,v.useState)(()=>t.getState().transform);return wj(()=>{let e=null,r=()=>{let r=t.getState().transform;e&&r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]||(e=r,n.current&&(n.current.style.transform=mN(r)))};return r(),t.subscribe(r)},[t]),(0,x.jsx)(`div`,{ref:n,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:mN(r)},children:e})}function gN(e){let t=jj(),n=(0,v.useRef)(!1);(0,v.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var _N=e=>e.panZoom?.syncViewport;function vN(e){let t=MA(_N),n=NA();return(0,v.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function yN(e){return e.connection.inProgress?{...e.connection,to:bO(e.connection.to,e.transform)}:{...e.connection}}function bN(e){return e?t=>e(yN(t)):yN}function xN(e){return MA(bN(e),OA)}var SN=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function CN({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=MA(SN,OA);return a&&i&&c?(0,x.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,x.jsx)(`g`,{className:Zx([`react-flow__connection`,PO(s)]),children:(0,x.jsx)(wN,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var wN=({style:e,type:t=HD.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=xN();if(!i)return;if(n)return(0,x.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:PO(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case HD.Bezier:[m]=KO(h);break;case HD.SimpleBezier:[m]=BM(h);break;case HD.Step:[m]=ak({...h,borderRadius:0});break;case HD.SmoothStep:[m]=ak(h);break;default:[m]=$O(h)}return(0,x.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};wN.displayName=`ConnectionLine`;var TN={};function EN(e=TN){(0,v.useRef)(e),NA(),(0,v.useEffect)(()=>{},[e])}function DN(){NA(),(0,v.useRef)(!1),(0,v.useEffect)(()=>{},[])}function ON({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,deleteKeyCode:T,onlyRenderVisibleElements:E,elementsSelectable:D,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,preventScrolling:M,defaultMarkerColor:N,zoomOnScroll:P,zoomOnPinch:F,panOnScroll:ee,panOnScrollSpeed:I,panOnScrollMode:te,zoomOnDoubleClick:ne,panOnDrag:L,autoPanOnSelection:re,onPaneClick:ie,onPaneMouseEnter:ae,onPaneMouseMove:oe,onPaneMouseLeave:se,onPaneScroll:ce,onPaneContextMenu:le,paneClickDistance:ue,nodeClickDistance:de,onEdgeContextMenu:fe,onEdgeMouseEnter:R,onEdgeMouseMove:z,onEdgeMouseLeave:pe,reconnectRadius:me,onReconnect:he,onReconnectStart:ge,onReconnectEnd:_e,noDragClassName:ve,noWheelClassName:ye,noPanClassName:be,disableKeyboardA11y:xe,nodeExtent:Se,rfId:Ce,viewport:we,onViewportChange:Te,nodesDraggable:Ee}){return EN(e),EN(t),DN(),gN(n),vN(we),(0,x.jsx)(_M,{onPaneClick:ie,onPaneMouseEnter:ae,onPaneMouseMove:oe,onPaneMouseLeave:se,onPaneContextMenu:le,onPaneScroll:ce,paneClickDistance:ue,deleteKeyCode:T,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,elementsSelectable:D,zoomOnScroll:P,zoomOnPinch:F,zoomOnDoubleClick:ne,panOnScroll:ee,panOnScrollSpeed:I,panOnScrollMode:te,panOnDrag:L,autoPanOnSelection:re,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,onSelectionContextMenu:d,preventScrolling:M,noDragClassName:ve,noWheelClassName:ye,noPanClassName:be,disableKeyboardA11y:xe,onViewportChange:Te,isControlledViewport:!!we,children:(0,x.jsxs)(hN,{children:[(0,x.jsx)(pN,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:he,onReconnectStart:ge,onReconnectEnd:_e,onlyRenderVisibleElements:E,onEdgeContextMenu:fe,onEdgeMouseEnter:R,onEdgeMouseMove:z,onEdgeMouseLeave:pe,reconnectRadius:me,defaultMarkerColor:N,noPanClassName:be,disableKeyboardA11y:xe,rfId:Ce}),(0,x.jsx)(CN,{style:h,type:m,component:g,containerStyle:_}),(0,x.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,x.jsx)(DM,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:de,onlyRenderVisibleElements:E,noPanClassName:be,noDragClassName:ve,disableKeyboardA11y:xe,nodeExtent:Se,rfId:Ce,nodesDraggable:Ee}),(0,x.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}ON.displayName=`GraphView`;var kN=(0,v.memo)(ON),AN=vO(`React Flow`,`https://reactflow.dev/`),jN=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??FD;Ak(h,g,_);let{nodesInitialized:x}=xk(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=TO(XD(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:FD,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:RD.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...VD},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:AN,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:LD,zIndexMode:f,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},MN=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>DA((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await eO({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...jN({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,fitViewQueued:o,zIndexMode:s,nodesSelectionActive:c}=m(),{nodesInitialized:l,hasSelectedNodes:u}=xk(e,t,n,{nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,checkEquality:!0,zIndexMode:s}),d=c&&u;o&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();Ak(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=Dk(e,n,r,i,a,o,l);d&&(vk(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=lk(e,o.fromHandle,$.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=Ek(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(pj(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(mj(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){i(e.map(e=>hj(e,!0)));return}i(gj(r,new Set([...e]),!0)),a(gj(n))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){a(e.map(e=>hj(e,!0)));return}a(gj(n,new Set([...e]))),i(gj(r,new Set,!0))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s){if(!e.selected)continue;let t=i.get(e.id);t&&(t.selected=!1),l.push(hj(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(hj(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,hj(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,hj(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(xk(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return Ok({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return!1;let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{p({connection:{...VD}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...jN()})}},Object.is);function NN({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,v.useState)(()=>MN({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,x.jsx)(AA,{value:m,children:(0,x.jsx)(Oj,{children:(0,x.jsx)($j,{children:p})})})}function PN({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,v.useContext)(kA)?(0,x.jsx)(x.Fragment,{children:e}):(0,x.jsx)(NN,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var FN={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function IN({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,onNodeMouseEnter:y,onNodeMouseMove:b,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:w,onNodeDragStart:T,onNodeDrag:E,onNodeDragStop:D,onNodesDelete:O,onEdgesDelete:k,onDelete:A,onSelectionChange:j,onSelectionDragStart:M,onSelectionDrag:N,onSelectionDragStop:P,onSelectionContextMenu:F,onSelectionStart:ee,onSelectionEnd:I,onBeforeDelete:te,connectionMode:ne,connectionLineType:L=HD.Bezier,connectionLineStyle:re,connectionLineComponent:ie,connectionLineContainerStyle:ae,deleteKeyCode:oe=`Backspace`,selectionKeyCode:se=`Shift`,selectionOnDrag:ce=!1,selectionMode:le=BD.Full,panActivationKeyCode:ue=`Space`,multiSelectionKeyCode:de=EO()?`Meta`:`Control`,zoomActivationKeyCode:fe=EO()?`Meta`:`Control`,snapToGrid:R,snapGrid:z,onlyRenderVisibleElements:pe=!1,selectNodesOnDrag:me,nodesDraggable:he,autoPanOnNodeFocus:ge,nodesConnectable:_e,nodesFocusable:ve,nodeOrigin:ye=QA,edgesFocusable:be,edgesReconnectable:xe,elementsSelectable:Se=!0,defaultViewport:Ce=$A,minZoom:we=.5,maxZoom:Te=2,translateExtent:Ee=FD,preventScrolling:De=!0,nodeExtent:Oe,defaultMarkerColor:ke=`#b1b1b7`,zoomOnScroll:Ae=!0,zoomOnPinch:je=!0,panOnScroll:Me=!1,panOnScrollSpeed:Ne=.5,panOnScrollMode:Pe=zD.Free,zoomOnDoubleClick:Fe=!0,panOnDrag:Ie=!0,onPaneClick:Le,onPaneMouseEnter:Re,onPaneMouseMove:ze,onPaneMouseLeave:Be,onPaneScroll:Ve,onPaneContextMenu:He,paneClickDistance:Ue=1,nodeClickDistance:We=0,children:Ge,onReconnect:Ke,onReconnectStart:qe,onReconnectEnd:Je,onEdgeContextMenu:Ye,onEdgeDoubleClick:Xe,onEdgeMouseEnter:Ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:et=10,onNodesChange:tt,onEdgesChange:nt,noDragClassName:rt=`nodrag`,noWheelClassName:it=`nowheel`,noPanClassName:at=`nopan`,fitView:ot,fitViewOptions:st,connectOnClick:ct,attributionPosition:lt,proOptions:ut,defaultEdgeOptions:dt,elevateNodesOnSelect:ft=!0,elevateEdgesOnSelect:pt=!1,disableKeyboardA11y:mt=!1,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanOnSelection:_t=!0,autoPanSpeed:vt,connectionRadius:yt,isValidConnection:bt,onError:xt,style:St,id:Ct,nodeDragThreshold:wt,connectionDragThreshold:Tt,viewport:Et,onViewportChange:Dt,width:Ot,height:kt,colorMode:At=`light`,debug:jt,onScroll:Mt,ariaLabelConfig:Nt,zIndexMode:Pt=`basic`,...Ft},It){let Lt=Ct||`1`,Rt=aj(At),zt=(0,v.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Mt?.(e)},[Mt]);return(0,x.jsx)(`div`,{"data-testid":`rf__wrapper`,...Ft,onScroll:zt,style:{...St,...FN},ref:It,className:Zx([`react-flow`,i,Rt]),id:Ct,role:`application`,children:(0,x.jsxs)(PN,{nodes:e,edges:t,width:Ot,height:kt,fitView:ot,fitViewOptions:st,minZoom:we,maxZoom:Te,nodeOrigin:ye,nodeExtent:Oe,zIndexMode:Pt,children:[(0,x.jsx)(rj,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,nodesDraggable:he,autoPanOnNodeFocus:ge,nodesConnectable:_e,nodesFocusable:ve,edgesFocusable:be,edgesReconnectable:xe,elementsSelectable:Se,elevateNodesOnSelect:ft,elevateEdgesOnSelect:pt,minZoom:we,maxZoom:Te,nodeExtent:Oe,onNodesChange:tt,onEdgesChange:nt,snapToGrid:R,snapGrid:z,connectionMode:ne,translateExtent:Ee,connectOnClick:ct,defaultEdgeOptions:dt,fitView:ot,fitViewOptions:st,onNodesDelete:O,onEdgesDelete:k,onDelete:A,onNodeDragStart:T,onNodeDrag:E,onNodeDragStop:D,onSelectionDrag:N,onSelectionDragStart:M,onSelectionDragStop:P,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:at,nodeOrigin:ye,rfId:Lt,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanSpeed:vt,onError:xt,connectionRadius:yt,isValidConnection:bt,selectNodesOnDrag:me,nodeDragThreshold:wt,connectionDragThreshold:Tt,onBeforeDelete:te,debug:jt,ariaLabelConfig:Nt,zIndexMode:Pt}),(0,x.jsx)(kN,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:b,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:w,nodeTypes:a,edgeTypes:o,connectionLineType:L,connectionLineStyle:re,connectionLineComponent:ie,connectionLineContainerStyle:ae,selectionKeyCode:se,selectionOnDrag:ce,selectionMode:le,deleteKeyCode:oe,multiSelectionKeyCode:de,panActivationKeyCode:ue,zoomActivationKeyCode:fe,onlyRenderVisibleElements:pe,defaultViewport:Ce,translateExtent:Ee,minZoom:we,maxZoom:Te,preventScrolling:De,zoomOnScroll:Ae,zoomOnPinch:je,zoomOnDoubleClick:Fe,panOnScroll:Me,panOnScrollSpeed:Ne,panOnScrollMode:Pe,panOnDrag:Ie,autoPanOnSelection:_t,onPaneClick:Le,onPaneMouseEnter:Re,onPaneMouseMove:ze,onPaneMouseLeave:Be,onPaneScroll:Ve,onPaneContextMenu:He,paneClickDistance:Ue,nodeClickDistance:We,onSelectionContextMenu:F,onSelectionStart:ee,onSelectionEnd:I,onReconnect:Ke,onReconnectStart:qe,onReconnectEnd:Je,onEdgeContextMenu:Ye,onEdgeDoubleClick:Xe,onEdgeMouseEnter:Ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:et,defaultMarkerColor:ke,noDragClassName:rt,noWheelClassName:it,noPanClassName:at,rfId:Lt,disableKeyboardA11y:mt,nodeExtent:Oe,viewport:Et,onViewportChange:Dt,nodesDraggable:he}),(0,x.jsx)(ZA,{onSelectionChange:j}),Ge,(0,x.jsx)(GA,{proOptions:ut,position:lt}),(0,x.jsx)(HA,{rfId:Lt,disableKeyboardA11y:mt})]})})}var LN=Cj(IN);PD.error014();function RN({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,x.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Zx([`react-flow__background-pattern`,n,r])})}function zN({radius:e,className:t}){return(0,x.jsx)(`circle`,{cx:e,cy:e,r:e,className:Zx([`react-flow__background-pattern`,`dots`,t])})}var BN;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(BN||={});var VN={[BN.Dots]:1,[BN.Lines]:1,[BN.Cross]:6},HN=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function UN({id:e,variant:t=BN.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,v.useRef)(null),{transform:f,patternId:p}=MA(HN,OA),m=r||VN[t],h=t===BN.Dots,g=t===BN.Cross,_=Array.isArray(n)?n:[n,n],y=[_[0]*f[2]||1,_[1]*f[2]||1],b=m*f[2],S=Array.isArray(a)?a:[a,a],C=g?[b,b]:y,w=[S[0]*f[2]+C[0]/2,S[1]*f[2]+C[1]/2],T=`${p}${e||``}`;return(0,x.jsxs)(`svg`,{className:Zx([`react-flow__background`,l]),style:{...c,...Ij,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,x.jsx)(`pattern`,{id:T,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${w[0]},-${w[1]})`,children:h?(0,x.jsx)(zN,{radius:b/2,className:u}):(0,x.jsx)(RN,{dimensions:C,lineWidth:i,variant:t,className:u})}),(0,x.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${T})`})]})}UN.displayName=`Background`;var WN=(0,v.memo)(UN);function GN(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,x.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function KN(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,x.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function qN(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,x.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function JN(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,x.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function YN(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,x.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function XN({children:e,className:t,...n}){return(0,x.jsx)(`button`,{type:`button`,className:Zx([`react-flow__controls-button`,t]),...n,children:e})}var ZN=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function QN({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=NA(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=MA(ZN,OA),{zoomIn:y,zoomOut:b,fitView:S}=jj();return(0,x.jsxs)(UA,{className:Zx([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(XN,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,x.jsx)(GN,{})}),(0,x.jsx)(XN,{onClick:()=>{b(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,x.jsx)(KN,{})})]}),n&&(0,x.jsx)(XN,{className:`react-flow__controls-fitview`,onClick:()=>{S(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,x.jsx)(qN,{})}),r&&(0,x.jsx)(XN,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,x.jsx)(YN,{}):(0,x.jsx)(JN,{})}),u]})}QN.displayName=`Controls`;var $N=(0,v.memo)(QN);function eP({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,x.jsx)(`rect`,{className:Zx([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var tP=(0,v.memo)(eP),nP=e=>e.nodes.map(e=>e.id),rP=e=>e instanceof Function?e:()=>e;function iP({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=tP,onClick:o}){let s=MA(nP,OA),c=rP(t),l=rP(e),u=rP(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,x.jsx)(x.Fragment,{children:s.map(e=>(0,x.jsx)(oP,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function aP({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=MA(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=OO(r);return{node:r,x:i,y:a,width:o,height:s}},OA);return!l||l.hidden||!kO(l)?null:(0,x.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var oP=(0,v.memo)(aP),sP=(0,v.memo)(iP),cP=200,lP=150,uP=e=>!e.hidden,dP=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let t of e.nodeLookup.values())if(!t.hidden){n=!0;break}return{viewBB:t,boundingRect:n?pO(XD(e.nodeLookup,{filter:uP}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},fP=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,pP=(e,t)=>fP(e.viewBB,t.viewBB)&&fP(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,mP=`react-flow__minimap-desc`;function hP({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:_,inversePan:y,zoomStep:b=1,offsetScale:S=5}){let C=NA(),w=(0,v.useRef)(null),{boundingRect:T,panZoom:E,viewBB:D,rfId:O,translateExtent:k,flowWidth:A,flowHeight:j,ariaLabelConfig:M}=MA(dP,pP),N=e?.width??cP,P=e?.height??lP,F=T.width/N,ee=T.height/P,I=Math.max(F,ee),te=I*N,ne=I*P,L=S*I,re=T.x-(te-T.width)/2-L,ie=T.y-(ne-T.height)/2-L,ae=te+L*2,oe=ne+L*2,se=`${mP}-${O}`,ce=(0,v.useRef)(0),le=(0,v.useRef)();ce.current=I,(0,v.useEffect)(()=>{let e=C.getState().panZoom;if(w.current&&e)return le.current=qk({domNode:w.current,panZoom:e,getTransform:()=>C.getState().transform,getViewScale:()=>ce.current}),()=>{le.current?.destroy()}},[E]),(0,v.useEffect)(()=>{le.current?.update({translateExtent:k,width:A,height:j,inversePan:y,pannable:h,zoomStep:b,zoomable:g})},[h,g,y,b,k,A,j]);let ue=p?e=>{let[t,n]=le.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,de=(0,v.useCallback)((e,t)=>{let n=C.getState().nodeLookup.get(t).internals.userNode;m?.(e,n)},[m]),fe=m?de:void 0,R=_??M[`minimap.ariaLabel`];return(0,x.jsx)(UA,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*I:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:Zx([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,x.jsxs)(`svg`,{width:N,height:P,viewBox:`${re} ${ie} ${ae} ${oe}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":se,ref:w,onClick:ue,children:[R&&(0,x.jsx)(`title`,{id:se,children:R}),(0,x.jsx)(sP,{onClick:fe,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,x.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${re-L},${ie-L}h${ae+L*2}v${oe+L*2}h${-ae-L*2}z
|
|
44
|
-
M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}hP.displayName=`MiniMap`,(0,v.memo)(hP);var gP=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,_P={[cA.Line]:`right`,[cA.Handle]:`bottom-right`};function vP({nodeId:e,position:t,variant:n=cA.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let y=Xj(),b=typeof e==`string`?e:y,S=NA(),C=(0,v.useRef)(null),w=n===cA.Handle,T=MA((0,v.useCallback)(gP(w&&p),[w,p]),OA),E=(0,v.useRef)(null),D=t??_P[n];(0,v.useEffect)(()=>{if(C.current&&b)return E.current||=yA({domNode:C.current,nodeId:b,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=S.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=S.getState(),o=[],s={x:e.x,y:e.y},c=r.get(b);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=Ek([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...AO({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:b,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:b,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:b,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};S.getState().triggerNodeChanges([n])}}),E.current.update({controlPosition:D,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{E.current?.destroy()}},[D,s,c,l,u,d,h,g,_,m]);let O=D.split(`-`);return(0,x.jsx)(`div`,{className:Zx([`react-flow__resize-control`,`nodrag`,...O,n,r]),ref:C,style:{...i,scale:T,...o&&{[w?`backgroundColor`:`borderColor`]:o}},children:a})}(0,v.memo)(vP);var yP={affected:{tone:`var(--danger)`,label:`Affected`},reviewed:{tone:`var(--foreground-muted)`,label:`Reviewed · not affected`},unknown:{tone:`var(--warning)`,label:`Unknown`}};function bP({data:e}){let{node:t,selected:n,impact:r,dimmed:i}=e,a=ax(t.type),o=tx[t.dimension],s=r?yP[r]:null;return(0,x.jsxs)(`div`,{style:{width:190,minHeight:58,boxSizing:`border-box`,background:`var(--surface)`,border:`1px ${o.border} ${n?`var(--primary)`:s?s.tone:`var(--border)`}`,borderLeft:`4px solid ${a.tone}`,borderRadius:`var(--radius)`,boxShadow:n?`0 0 0 2px color-mix(in srgb, var(--primary) 40%, transparent)`:s?`0 0 0 2px color-mix(in srgb, ${s.tone} 45%, transparent)`:`none`,opacity:i?.4:1,padding:`8px 10px`,overflow:`hidden`},children:[(0,x.jsx)(iM,{type:`target`,position:$.Top,style:{background:`var(--border-strong)`,width:6,height:6}}),(0,x.jsx)(`div`,{style:{fontSize:10,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`},children:a.label}),(0,x.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground)`,lineHeight:1.25,wordBreak:`break-word`},children:t.label}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,marginTop:3,flexWrap:`wrap`},children:[t.moduleId&&(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:10,color:`var(--foreground-muted)`},children:t.moduleId}),t.status&&(0,x.jsxs)(`span`,{style:{fontSize:10,color:`var(--foreground-muted)`},children:[`· `,t.status]})]}),s&&(0,x.jsx)(`div`,{style:{marginTop:4,fontSize:10,fontWeight:700,color:s.tone},children:s.label}),(0,x.jsx)(iM,{type:`source`,position:$.Bottom,style:{background:`var(--border-strong)`,width:6,height:6}})]})}function xP({data:e}){return(0,x.jsx)(`div`,{style:{width:`100%`,height:`100%`,boxSizing:`border-box`,border:`1px dashed ${e.available?`var(--border-strong)`:`var(--danger)`}`,borderRadius:`var(--radius)`,background:`color-mix(in srgb, var(--surface-muted) 50%, transparent)`},children:(0,x.jsxs)(`div`,{style:{position:`absolute`,top:4,left:8,display:`flex`,gap:8,alignItems:`center`},children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:11,fontWeight:700,color:`var(--foreground-muted)`},children:e.label}),!e.available&&(0,x.jsx)(`span`,{style:{fontSize:10,color:`var(--danger)`},children:`Unavailable`})]})})}function SP({label:e,children:t}){return(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsx)(`div`,{style:{fontSize:11,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`,marginBottom:3},children:e}),(0,x.jsx)(`div`,{style:{fontSize:14,color:`var(--foreground)`},children:t})]})}function CP({children:e,onClick:t}){return(0,x.jsx)(`button`,{onClick:t,style:{display:`block`,background:`none`,border:`none`,padding:`2px 0`,cursor:`pointer`,color:`var(--primary)`,fontFamily:`inherit`,fontSize:14,textAlign:`left`},children:e})}function wP({projection:e,selectedNodeId:t,selectedEdgeId:n,onClose:r,onSelectNode:i}){let a=mi(),o=new Map(e.nodes.map(e=>[e.id,e])),s=t?o.get(t)??null:null,c=n?e.relationships.find(e=>e.id===n)??null:null;return(0,x.jsxs)(`aside`,{style:{width:320,flexShrink:0,borderLeft:`1px solid var(--border)`,background:`var(--surface)`,padding:20,overflowY:`auto`},children:[(0,x.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,x.jsx)(`button`,{onClick:r,"aria-label":`Close details`,style:{background:`none`,border:`none`,cursor:`pointer`,color:`var(--foreground-muted)`,fontSize:18,lineHeight:1},children:`×`})}),s&&(0,x.jsx)(TP,{node:s,projection:e,nodeById:o,onSelectNode:i,router:a}),!s&&c&&(0,x.jsx)(EP,{edge:c,nodeById:o}),!s&&!c&&(0,x.jsx)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`},children:`Select a node or relationship to see details.`})]})}function TP({node:e,projection:t,nodeById:n,onSelectNode:r,router:i}){let a=ax(e.type),o=[];for(let r of t.relationships)if(r.source===e.id){let e=n.get(r.target);e&&o.push({id:e.id,label:e.label,rel:`${r.label} →`,dimension:e.dimension})}else if(r.target===e.id){let e=n.get(r.source);e&&o.push({id:e.id,label:e.label,rel:`${r.label} from`,dimension:e.dimension})}let s=e=>o.filter(t=>t.dimension===e),c=s(`system`),l=s(`knowledge`),u=s(`delivery`),d=s(`implementation`);return(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:17,fontWeight:700,margin:`0 0 12px`,wordBreak:`break-word`},children:e.label}),(0,x.jsx)(SP,{label:`Type`,children:a.label}),e.moduleId&&(0,x.jsx)(SP,{label:`Module / repository`,children:(0,x.jsx)(`span`,{className:`font-mono`,children:e.moduleId})}),e.status&&(0,x.jsx)(SP,{label:`Status`,children:Ua(e.status)}),e.purpose&&(0,x.jsx)(SP,{label:`Purpose`,children:e.purpose}),c.length>0&&(0,x.jsx)(SP,{label:`Relationships`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:c.map((e,t)=>(0,x.jsxs)(CP,{onClick:()=>r(e.id),children:[e.rel,` `,e.label]},t))})}),l.length>0&&(0,x.jsx)(SP,{label:`Knowledge context`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:l.map((e,t)=>(0,x.jsxs)(CP,{onClick:()=>r(e.id),children:[e.rel,` `,e.label]},t))})}),u.length>0&&(0,x.jsx)(SP,{label:`Delivery history`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:u.map((e,t)=>(0,x.jsxs)(CP,{onClick:()=>r(e.id),children:[e.rel,` `,e.label]},t))})}),d.length>0&&(0,x.jsx)(SP,{label:`Implementation`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:d.map((e,t)=>(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`},children:e.label},t))})}),(e.knowledgeRef||e.knowledgeRefs&&e.knowledgeRefs.length>0)&&(0,x.jsx)(SP,{label:`Knowledge`,children:(0,x.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[e.knowledgeRef&&(0,x.jsxs)(CP,{onClick:()=>i.navigate({to:`/knowledge/$layer/$artifactId`,params:{layer:e.knowledgeRef.layer,artifactId:e.knowledgeRef.id}}),children:[Ua(e.knowledgeRef.layer),` / `,e.knowledgeRef.id,` →`]}),(e.knowledgeRefs??[]).map(e=>(0,x.jsxs)(CP,{onClick:()=>i.navigate({to:`/knowledge/$layer/$artifactId`,params:{layer:e.layer,artifactId:e.id}}),children:[Ua(e.layer),` / `,e.id,` →`]},e.id))]})}),e.provenance&&(0,x.jsxs)(SP,{label:`Provenance`,children:[Ua(e.provenance),e.evidence&&e.evidence.length>0&&(0,x.jsx)(`div`,{className:`font-mono`,style:{fontSize:11,color:`var(--foreground-muted)`,marginTop:4},children:e.evidence.map((e,t)=>(0,x.jsx)(`div`,{children:e},t))})]}),e.workItemRef&&(0,x.jsx)(SP,{label:`Related Work Item`,children:(0,x.jsxs)(CP,{onClick:()=>i.navigate({to:`/work-items/$workItemId`,params:{workItemId:e.workItemRef}}),children:[e.workItemRef,` →`]})}),e.path&&(0,x.jsx)(SP,{label:`Path`,children:(0,x.jsx)(Ug,{path:e.path})})]})}function EP({edge:e,nodeById:t}){let n=t.get(e.source),r=t.get(e.target);return(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:15,fontWeight:700,margin:`0 0 12px`},children:`Relationship`}),(0,x.jsx)(SP,{label:`From`,children:n?.label??e.source}),(0,x.jsx)(SP,{label:`To`,children:r?.label??e.target}),(0,x.jsx)(SP,{label:`Type`,children:e.label}),n?.moduleId&&(0,x.jsx)(SP,{label:`Source module`,children:(0,x.jsx)(`span`,{className:`font-mono`,children:n.moduleId})}),r?.moduleId&&(0,x.jsx)(SP,{label:`Target module`,children:(0,x.jsx)(`span`,{className:`font-mono`,children:r.moduleId})})]})}function DP({metadata:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=e.topologyStatus,f=d===`available`?(0,x.jsx)(vo,{variant:`success`,children:`Available`}):d===`partial`?(0,x.jsx)(vo,{variant:`warning`,children:`Partial`}):(0,x.jsx)(vo,{variant:`muted`,children:`Unavailable`}),p=async()=>{if(t)return t;u(!0),c(null);try{let e=await V.getTopologyHandoff();return n(e),e}catch(e){return c(e instanceof fo?e.message:`The handoff could not be generated.`),null}finally{u(!1)}},m=async()=>{let e=await p();if(e)try{await navigator.clipboard?.writeText(e.text),o(!0),setTimeout(()=>o(!1),2e3)}catch{i(!0)}},h=async()=>{r?i(!1):await p()&&i(!0)},g=d===`available`?`${e.semanticEntityCount} semantic components · ${e.technicalRelationshipCount} technical relationships.`:d===`partial`?`${e.semanticEntityCount} semantic components known — Kaddo knows useful topology, but the map is not assumed to be exhaustive.`:`Kaddo currently knows Knowledge and Delivery relationships, but does not yet have enough semantic system metadata to describe how the software is structured.`,_={padding:`5px 12px`,borderRadius:`var(--radius)`,fontSize:12,fontWeight:600,fontFamily:`inherit`,cursor:`pointer`};return(0,x.jsxs)(`div`,{style:{padding:`10px 16px`,borderBottom:`1px solid var(--border)`,background:d===`available`?`transparent`:`color-mix(in srgb, var(--warning) 8%, transparent)`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,x.jsx)(`span`,{style:{fontSize:11,fontWeight:700,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`},children:`System topology`}),f,(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:g}),d!==`available`&&(0,x.jsxs)(`div`,{style:{marginLeft:`auto`,display:`flex`,gap:8,alignItems:`center`},children:[(0,x.jsxs)(`span`,{style:{fontSize:11,color:`var(--foreground-muted)`},children:[`Recommended: `,(0,x.jsx)(`span`,{className:`font-mono`,children:`architecture-agent`}),` · `,(0,x.jsx)(`span`,{className:`font-mono`,children:`graph-metadata-review`})]}),(0,x.jsx)(`button`,{onClick:m,disabled:l,style:{..._,border:`1px solid var(--primary)`,background:`var(--primary)`,color:`var(--primary-foreground)`,opacity:l?.6:1},children:l&&!t?`Preparing…`:a?`✓ Copied`:`Copy topology enrichment handoff`}),(0,x.jsx)(`button`,{onClick:h,disabled:l,style:{..._,border:`1px solid var(--border)`,background:`var(--surface)`,color:`var(--foreground)`},children:r?`Hide handoff`:`View handoff`})]})]}),s&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,margin:`8px 0 0`},children:s}),r&&t&&(0,x.jsx)(`pre`,{style:{marginTop:10,background:`var(--surface-muted)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:12,fontSize:11,lineHeight:1.5,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontFamily:`var(--font-mono)`,color:`var(--foreground)`,maxHeight:240,overflowY:`auto`},children:t.text})]})}var OP={affected:{tone:`var(--danger)`,label:`Affected`},"reviewed-not-affected":{tone:`var(--foreground-muted)`,label:`Reviewed — not affected`},unknown:{tone:`var(--warning)`,label:`Unknown`}},kP=e=>OP[e]??{tone:`var(--foreground-muted)`,label:e};function AP(e,t,n,r){return(0,x.jsxs)(`button`,{onClick:t,title:`Focus in the graph`,style:{display:`inline-flex`,alignItems:`center`,gap:5,padding:`2px 8px`,borderRadius:`var(--radius)`,border:`1px solid ${e}`,background:`color-mix(in srgb, ${e} 12%, transparent)`,color:`var(--foreground)`,cursor:`pointer`,fontFamily:`inherit`,fontSize:12},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:e}}),n]},r)}function jP({workItemId:e,wi:t,topologyStatus:n,onClear:r,onSelectNode:i}){let a=t?.affectedSystemEntities??[],o=t?.reviewedSystemEntities??[],s=o.filter(e=>e.status!==`unknown`),c=o.filter(e=>e.status===`unknown`),l=fx(a,o),u=px(a,o),d=l.length>0,f=e=>e[0]&&i(e[0].nodeId),p=(e,t,n,r)=>(0,x.jsxs)(`button`,{onClick:()=>f(r),disabled:t===0,style:{display:`inline-flex`,gap:6,alignItems:`center`,padding:`3px 9px`,borderRadius:`var(--radius)`,border:`1px solid var(--border)`,background:`var(--surface)`,color:`var(--foreground)`,cursor:t===0?`default`:`pointer`,opacity:t===0?.5:1,fontSize:12,fontFamily:`inherit`},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:n}}),e,` `,(0,x.jsx)(`strong`,{children:t})]});return(0,x.jsxs)(`div`,{style:{padding:`10px 16px`,borderBottom:`1px solid var(--border)`,background:`var(--surface)`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,x.jsxs)(`span`,{style:{fontSize:13,fontWeight:700},children:[`Impact view · `,(0,x.jsx)(`span`,{className:`font-mono`,children:e})]}),(0,x.jsx)(`button`,{onClick:r,style:{padding:`5px 10px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground-muted)`,cursor:`pointer`,fontSize:12,fontFamily:`inherit`},children:`✕ Clear impact`})]}),t&&d&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[p(`Affected`,u.affected,`var(--danger)`,a),p(`Reviewed`,u.reviewedNotAffected,`var(--foreground-muted)`,s),p(`Unknown`,u.unknown,`var(--warning)`,c)]}),(0,x.jsx)(`div`,{style:{display:`flex`,gap:6,flexWrap:`wrap`},children:l.map(e=>AP(kP(e.status).tone,()=>i(e.nodeId),e.label,`${e.status}:${e.nodeId}`))})]}),t&&!d&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--foreground-muted)`,margin:0},children:`This Work Item has not been assessed against the system Graph. A missing assessment does not mean there is no impact.`}),t&&d&&(0,x.jsx)(`div`,{style:{display:`flex`,gap:14,flexWrap:`wrap`,fontSize:11,color:`var(--foreground-muted)`},children:[`affected`,`reviewed-not-affected`,`unknown`].map(e=>(0,x.jsxs)(`span`,{style:{display:`inline-flex`,gap:5,alignItems:`center`},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:kP(e).tone}}),kP(e).label]},e))}),n===`partial`&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--warning)`,margin:0},children:`⚠ Graph coverage is partial. The highlighted entities represent reviewed scope based on the currently known topology and repository evidence — entities without a highlight may still be impacted.`}),n===`unavailable`&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--foreground-muted)`,margin:0},children:`No semantic topology is available, so impact cannot be projected onto the graph.`})]})}var MP={system:bP,systemGroup:xP};function NP(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[(0,x.jsx)(`div`,{style:{height:`calc(100vh - 120px)`,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,animation:`pulse 1.5s ease-in-out infinite`}}),(0,x.jsx)(`style`,{children:`@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}`})]})}var PP={padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`};function FP({projection:e}){let t=mi(),n=C(),r=qi({from:`/system`}),i=jj(),a=r.workItem??null,{data:o}=it({queryKey:[`work-item`,a],queryFn:()=>V.getWorkItem(a),enabled:a!=null,retry:!1}),s=(0,v.useMemo)(()=>{if(!a||!o)return;let e=new Map;for(let t of o.affectedSystemEntities)e.set(t.nodeId,`affected`);for(let t of o.reviewedSystemEntities)e.has(t.nodeId)||e.set(t.nodeId,t.status===`unknown`?`unknown`:`reviewed`);return e},[a,o]),[c,l]=(0,v.useState)(r.node??null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(`all`),[g,_]=(0,v.useState)(`all`),[y,b]=(0,v.useState)({system:!0,knowledge:!0,delivery:!0,implementation:!1,unknown:!0}),S=(0,v.useMemo)(()=>[...new Set(e.nodes.map(e=>e.type))].sort(),[e]),w=(0,v.useMemo)(()=>{let t=e.nodes.filter(e=>y[e.dimension]&&(m===`all`||e.moduleId===m)&&(g===`all`||e.type===g)),n=new Set(t.map(e=>e.id));return{...e,nodes:t,relationships:e.relationships.filter(e=>n.has(e.source)&&n.has(e.target))}},[e,m,g,y]),T=e=>b(t=>({...t,[e]:!t[e]})),E=(e,t)=>(0,x.jsxs)(`label`,{style:{display:`inline-flex`,gap:5,alignItems:`center`,fontSize:12,cursor:`pointer`,color:`var(--foreground-muted)`},children:[(0,x.jsx)(`input`,{type:`checkbox`,checked:y[e],onChange:()=>T(e),"aria-label":`Toggle ${t}`}),t]}),D=(0,v.useMemo)(()=>sx(w),[w]),O=(0,v.useMemo)(()=>lx(w,D,c,s),[w,D,c,s]),k=(0,v.useMemo)(()=>ux(w,c),[w,c]),A=e=>{let t=D.positions.get(e);t&&i.setCenter(t.x+95,t.y+29,{zoom:1.2,duration:400})};(0,v.useEffect)(()=>{if(r.node&&D.positions.has(r.node)){l(r.node);let e=setTimeout(()=>A(r.node),100);return()=>clearTimeout(e)}},[]),(0,v.useEffect)(()=>{if(!s||s.size===0)return;let e=[...s.keys()].filter(e=>D.positions.has(e));if(e.length===0)return;let t=setTimeout(()=>i.fitView({nodes:e.map(e=>({id:e})),duration:500,padding:.3,maxZoom:1.4}),120);return()=>clearTimeout(t)},[s,D]);let j=e=>{l(e),d(null),t.navigate({to:`/system`,search:{node:e,workItem:a??void 0},replace:!0}),A(e)},M=f.trim()?dx(w.nodes,f).slice(0,8):[];return(0,x.jsxs)(`div`,{style:{display:`flex`,height:`calc(100vh - 56px)`},children:[(0,x.jsxs)(`div`,{style:{flex:1,minWidth:0,position:`relative`,display:`flex`,flexDirection:`column`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,gap:10,padding:`12px 16px`,borderBottom:`1px solid var(--border)`,alignItems:`center`,flexWrap:`wrap`,position:`relative`,zIndex:5,background:`var(--background)`},children:[(0,x.jsxs)(`div`,{style:{position:`relative`,flex:`1 1 220px`,minWidth:180},children:[(0,x.jsx)(`input`,{type:`search`,placeholder:`Search system…`,value:f,onChange:e=>p(e.target.value),"aria-label":`Search system`,style:{...PP,width:`100%`,boxSizing:`border-box`}}),M.length>0&&(0,x.jsx)(`ul`,{style:{position:`absolute`,top:`100%`,left:0,right:0,marginTop:4,listStyle:`none`,padding:4,background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,zIndex:10,maxHeight:260,overflowY:`auto`},children:M.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{onClick:()=>{j(e.id),p(``)},style:{display:`block`,width:`100%`,textAlign:`left`,padding:`6px 8px`,background:`none`,border:`none`,cursor:`pointer`,color:`var(--foreground)`,fontFamily:`inherit`,fontSize:13},children:[e.label,` `,(0,x.jsxs)(`span`,{style:{color:`var(--foreground-muted)`,fontSize:11},children:[`· `,ax(e.type).label,e.moduleId?` · ${e.moduleId}`:``]})]})},e.id))})]}),e.groups.length>0&&(0,x.jsxs)(`select`,{value:m,onChange:e=>h(e.target.value),"aria-label":`Filter by module`,style:PP,children:[(0,x.jsx)(`option`,{value:`all`,children:`All modules`}),e.groups.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.label},e.id))]}),(0,x.jsxs)(`select`,{value:g,onChange:e=>_(e.target.value),"aria-label":`Filter by type`,style:PP,children:[(0,x.jsx)(`option`,{value:`all`,children:`All types`}),S.map(e=>(0,x.jsx)(`option`,{value:e,children:ax(e).label},e))]}),(0,x.jsxs)(`div`,{style:{display:`inline-flex`,gap:12,alignItems:`center`,paddingLeft:4},children:[(0,x.jsx)(`span`,{style:{fontSize:11,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`},children:`Show`}),E(`knowledge`,`Knowledge`),E(`delivery`,`Delivery`),E(`implementation`,`Implementation`)]}),(0,x.jsxs)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:[w.nodes.length,` nodes · `,w.relationships.length,` relationships · coverage `,e.metadata.coverage]}),(0,x.jsx)(`button`,{onClick:()=>n.invalidateQueries({queryKey:[`system-map`]}),style:{...PP,cursor:`pointer`,color:`var(--foreground-muted)`},children:`↻ Refresh`})]}),(0,x.jsx)(DP,{metadata:e.metadata}),a&&(0,x.jsx)(jP,{workItemId:a,wi:o??null,topologyStatus:e.metadata.topologyStatus,onClear:()=>t.navigate({to:`/system`,search:{},replace:!0}),onSelectNode:j}),w.nodes.length===0?(0,x.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--foreground-muted)`,fontSize:14},children:`No nodes match these filters.`}):(0,x.jsx)(`div`,{style:{flex:1},children:(0,x.jsxs)(LN,{nodes:O,edges:k,nodeTypes:MP,onNodeClick:(e,t)=>{t.type===`system`&&j(t.id)},onEdgeClick:(e,t)=>{d(t.id),l(null)},onPaneClick:()=>{l(null),d(null)},fitView:!0,minZoom:.2,proOptions:{hideAttribution:!0},children:[(0,x.jsx)(WN,{color:`var(--border)`,gap:20}),(0,x.jsx)($N,{showInteractive:!1})]})})]}),(c||u)&&(0,x.jsx)(wP,{projection:e,selectedNodeId:c,selectedEdgeId:u,onClose:()=>{l(null),d(null)},onSelectNode:j})]})}function IP(){let e=C(),{data:t,isLoading:n,error:r}=it({queryKey:[`system-map`],queryFn:V.getSystemMap,refetchOnWindowFocus:!1});return n?(0,x.jsx)(NP,{}):r?(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`System map could not be loaded`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 8px`,fontSize:14,color:`var(--foreground-muted)`},children:`The project remains available, but Kaddo could not build the current System Map.`}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`system-map`]}),style:{...PP,cursor:`pointer`},children:`Retry`})]})}):!t||!t.metadata.available?(0,x.jsxs)(`div`,{style:{padding:`48px 32px`,textAlign:`center`,color:`var(--foreground-muted)`,maxWidth:640,margin:`0 auto`},children:[(0,x.jsx)(`div`,{style:{fontSize:32,marginBottom:12},children:`🗺️`}),(0,x.jsx)(`h2`,{style:{fontSize:18,fontWeight:600,color:`var(--foreground)`,margin:`0 0 8px`},children:`System map not available yet`}),(0,x.jsx)(`p`,{style:{fontSize:14},children:`Kaddo does not have enough system metadata to build a System Map for this project yet.`}),(0,x.jsx)(`p`,{style:{fontSize:13,marginTop:8},children:`Review the project Knowledge and graph metadata to enrich the map.`})]}):(0,x.jsx)(NN,{children:(0,x.jsx)(FP,{projection:t})})}var LP={available:`var(--success)`,configured:`var(--foreground-muted)`,unauthorized:`var(--danger)`,unavailable:`var(--warning)`,"invalid-config":`var(--danger)`,disabled:`var(--foreground-muted)`};function RP({status:e}){return(0,x.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:12,color:`var(--foreground)`},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:LP[e]??`var(--foreground-muted)`}}),e]})}function zP({on:e,label:t}){return(0,x.jsxs)(`span`,{style:{fontSize:12,color:e?`var(--foreground)`:`var(--foreground-muted)`},children:[e?`✓`:`✗`,` `,t]})}var BP={padding:`6px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`},VP={...BP,background:`var(--primary)`,color:`var(--primary-foreground, #fff)`,fontWeight:600},HP={...BP,color:`var(--danger)`,borderColor:`var(--danger)`},UP={padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`,width:`100%`,boxSizing:`border-box`},WP={fontSize:13,fontWeight:600,color:`var(--foreground)`,marginBottom:4,display:`block`},GP={border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:16,background:`var(--surface)`};function KP({name:e,schema:t,value:n,onChange:r}){return t.type===`select`&&t.options?(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[t.label,t.required&&` *`]}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:t.description}),(0,x.jsxs)(`select`,{value:String(n??t.defaultValue??``),onChange:e=>r(e.target.value),style:UP,children:[(0,x.jsx)(`option`,{value:``,children:`Choose…`}),t.options.map(e=>(0,x.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]}):t.type===`boolean`?(0,x.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,x.jsx)(`input`,{type:`checkbox`,checked:!!(n??t.defaultValue),onChange:e=>r(e.target.checked),id:`field-${e}`}),(0,x.jsx)(`label`,{htmlFor:`field-${e}`,style:{fontSize:13,fontWeight:600},children:t.label}),t.description&&(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:t.description})]}):(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[t.label,t.required&&` *`]}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:t.description}),(0,x.jsx)(`input`,{type:t.type===`number`?`number`:`text`,value:String(n??``),placeholder:t.placeholder,onChange:e=>r(t.type===`number`?Number(e.target.value):e.target.value),style:UP})]})}function qP({schema:e,configured:t,onSave:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``);return r?(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[e.label,e.required&&` *`]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,x.jsx)(`input`,{type:`password`,value:a,onChange:e=>o(e.target.value),placeholder:`Enter value…`,style:{...UP,flex:1}}),(0,x.jsx)(`button`,{disabled:!a.trim(),onClick:()=>{n(a),i(!1),o(``)},style:VP,children:`Save`}),(0,x.jsx)(`button`,{onClick:()=>i(!1),style:BP,children:`Cancel`})]})]}):(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[e.label,e.required&&` *`]}),e.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:e.description}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,x.jsx)(`span`,{style:{fontSize:13,color:t?`var(--success)`:`var(--warning)`},children:t?`Configured`:`Not configured`}),(0,x.jsx)(`button`,{onClick:()=>{i(!0),o(``)},style:BP,children:t?`Replace`:`Set`})]})]})}function JP({onCreated:e,onCancel:t}){let n=C(),{data:r}=it({queryKey:[`integration-types`],queryFn:()=>V.getIntegrationTypes()}),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)({}),[u,d]=(0,v.useState)({}),f=at({mutationFn:()=>V.createIntegration({id:o.trim(),adapter:i.id,config:c}),onSuccess:async t=>{for(let[e,n]of Object.entries(u))n.trim()&&await V.setIntegrationSecret(t.id,e,n);n.invalidateQueries({queryKey:[`integrations`]}),e()}});if(!i)return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:16},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,x.jsx)(`h3`,{style:{fontSize:15,fontWeight:700,margin:0},children:`Add Integration`}),(0,x.jsx)(`button`,{onClick:t,style:{...BP,border:`none`,background:`none`,color:`var(--foreground-muted)`},children:`✕`})]}),(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`,margin:`0 0 12px`},children:`Choose a provider from the Integration Registry:`}),!r&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:`Loading…`}),(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:r?.map(e=>(0,x.jsxs)(`button`,{onClick:()=>{a(e),s(``)},style:{...GP,cursor:`pointer`,textAlign:`left`},children:[(0,x.jsx)(`div`,{style:{fontWeight:600,fontSize:14},children:e.displayName}),e.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2},children:e.description}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:6},children:[(0,x.jsx)(zP,{on:e.capabilities.workItems.read,label:`Read`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.list,label:`List`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.import,label:`Import`})]})]},e.id))})]});let p=i.configSchema,m=i.secretSchema,h=o.trim()&&/^[a-z0-9][a-z0-9._-]*$/i.test(o.trim());return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:16},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,x.jsxs)(`h3`,{style:{fontSize:15,fontWeight:700,margin:0},children:[i.displayName,` Integration`]}),(0,x.jsx)(`button`,{onClick:()=>a(null),style:{...BP,border:`none`,background:`none`,color:`var(--foreground-muted)`},children:`✕`})]}),(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsx)(`label`,{style:WP,children:`Integration ID *`}),(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:`A unique identifier (alphanumeric, dashes, dots).`}),(0,x.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:`e.g. company-jira`,style:UP})]}),Object.keys(p).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`16px 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Configuration`}),Object.entries(p).map(([e,t])=>(0,x.jsx)(KP,{name:e,schema:t,value:c[e],onChange:t=>l({...c,[e]:t})},e))]}),Object.keys(m).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`16px 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Credentials`}),Object.entries(m).map(([e,t])=>(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[t.label,t.required&&` *`]}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:t.description}),(0,x.jsx)(`input`,{type:`password`,value:u[e]??``,onChange:t=>d({...u,[e]:t.target.value}),placeholder:`Enter value…`,style:UP})]},e))]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:16},children:[(0,x.jsx)(`button`,{disabled:!h||f.isPending,onClick:()=>f.mutate(),style:VP,children:f.isPending?`Creating…`:`Save Integration`}),(0,x.jsx)(`button`,{onClick:t,style:BP,children:`Cancel`})]}),f.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,marginTop:8},children:f.error.message})]})}function YP({integration:e,onDone:t}){let n=C(),r=e.metadata?.configSchema??{},i=e.metadata?.secretSchema??{},{data:a}=it({queryKey:[`integration-detail`,e.id],queryFn:()=>V.getIntegrationDetail(e.id)}),{data:o,refetch:s}=it({queryKey:[`integration-secrets`,e.id],queryFn:()=>V.getIntegrationSecretStatus(e.id)}),[c,l]=(0,v.useState)(()=>({...a??e})),[u,d]=(0,v.useState)(!1),f=a?.config;(0,v.useState)(()=>{f&&!u&&l(f)});let p=at({mutationFn:()=>V.updateIntegration(e.id,{config:c}),onSuccess:()=>{n.invalidateQueries({queryKey:[`integrations`]}),n.invalidateQueries({queryKey:[`integration-detail`,e.id]}),d(!1)}}),m=at({mutationFn:({name:t,value:n})=>V.setIntegrationSecret(e.id,t,n),onSuccess:()=>{s(),n.invalidateQueries({queryKey:[`integrations`]})}});return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:16},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,x.jsxs)(`h3`,{style:{fontSize:15,fontWeight:700,margin:0},children:[`Configure: `,e.displayName]}),(0,x.jsx)(`button`,{onClick:t,style:{...BP,border:`none`,background:`none`,color:`var(--foreground-muted)`},children:`✕`})]}),Object.keys(r).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`0 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Configuration`}),Object.entries(r).map(([e,t])=>(0,x.jsx)(KP,{name:e,schema:t,value:c[e],onChange:t=>{l({...c,[e]:t}),d(!0)}},e)),(0,x.jsx)(`button`,{disabled:!u||p.isPending,onClick:()=>p.mutate(),style:VP,children:p.isPending?`Saving…`:`Save Configuration`}),p.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,marginTop:4},children:p.error.message})]}),Object.keys(i).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`16px 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Credentials`}),Object.entries(i).map(([e,t])=>(0,x.jsx)(qP,{name:e,schema:t,configured:o?.[e]??!1,onSave:t=>m.mutate({name:e,value:t})},e)),m.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,marginTop:4},children:m.error.message})]})]})}function XP({integrationId:e,item:t,onClose:n}){let r=mi(),i=C(),[a,o]=(0,v.useState)(``),{data:s}=it({queryKey:[`capture-def`],queryFn:()=>V.getCaptureDefinition()}),{data:c,isLoading:l}=it({queryKey:[`import-preview`,e,t.externalId],queryFn:()=>V.getImportPreview(e,t.externalId),retry:!1}),u=at({mutationFn:()=>V.importExternalWorkItem(e,t.externalId,a),onSuccess:n=>{i.invalidateQueries({queryKey:[`import-preview`,e,t.externalId]}),r.navigate({to:`/work-items/$workItemId`,params:{workItemId:n.workItemId}})}});return(0,x.jsxs)(`div`,{style:{...GP,marginTop:10},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,x.jsx)(`h3`,{style:{fontSize:13,fontWeight:700,textTransform:`uppercase`,letterSpacing:.4,color:`var(--foreground-muted)`,margin:0},children:`Import work item`}),(0,x.jsx)(`button`,{onClick:n,style:{background:`none`,border:`none`,cursor:`pointer`,color:`var(--foreground-muted)`,fontSize:13},children:`✕`})]}),l&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:`Loading preview…`}),c?.duplicate?(0,x.jsxs)(`div`,{style:{marginTop:8},children:[(0,x.jsxs)(`p`,{style:{fontSize:14},children:[`Already imported as `,(0,x.jsx)(`strong`,{className:`font-mono`,children:c.duplicate.workItemId}),` — "`,c.duplicate.title,`".`]}),(0,x.jsx)(`button`,{onClick:()=>r.navigate({to:`/work-items/$workItemId`,params:{workItemId:c.duplicate.workItemId}}),style:BP,children:`View Work Item`})]}):c?(0,x.jsxs)(`div`,{style:{marginTop:8,display:`flex`,flexDirection:`column`,gap:10},children:[(0,x.jsxs)(`div`,{style:{fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`},children:`Source:`}),` `,c.preview.source.provider,` · `,c.preview.source.externalId]}),(0,x.jsxs)(`div`,{style:{fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`},children:`Captured intent:`}),` `,c.preview.capturedIntent]}),(0,x.jsxs)(`div`,{style:{fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`},children:`Will create:`}),` a Draft Work Item (needs refinement)`]}),c.preview.externalType&&(0,x.jsxs)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:[`External type "`,c.preview.externalType,`" — choose the Kaddo type explicitly (never inferred):`]}),(0,x.jsxs)(`select`,{value:a,onChange:e=>o(e.target.value),"aria-label":`Kaddo Work Item type`,style:{...UP,alignSelf:`flex-start`,width:`auto`},children:[(0,x.jsx)(`option`,{value:``,children:`Choose Kaddo Work Item type…`}),(s?.types??[]).map(e=>(0,x.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--foreground-muted)`,margin:0},children:`No project files have been modified yet.`}),(0,x.jsx)(`div`,{children:(0,x.jsx)(`button`,{disabled:!a||u.isPending,onClick:()=>u.mutate(),style:a?VP:BP,children:u.isPending?`Importing…`:`Import as Draft`})}),u.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`},children:u.error.message})]}):null]})}function ZP({integration:e,onEdit:t}){let n=C(),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=e.status!==`disabled`&&e.status!==`invalid-config`&&e.capabilities?.workItems.list,u=it({queryKey:[`integration-status`,e.id],queryFn:()=>V.getIntegrationStatus(e.id),enabled:l,retry:!1}),d=it({queryKey:[`external-items`,e.id],queryFn:()=>V.getExternalWorkItems(e.id),enabled:r&&!!l,retry:!1}),f=at({mutationFn:()=>e.enabled?V.disableIntegration(e.id):V.enableIntegration(e.id),onSuccess:()=>n.invalidateQueries({queryKey:[`integrations`]})}),p=at({mutationFn:()=>V.deleteIntegration(e.id),onSuccess:()=>n.invalidateQueries({queryKey:[`integrations`]})}),m=at({mutationFn:()=>V.getIntegrationStatus(e.id),onSuccess:()=>{n.invalidateQueries({queryKey:[`integration-status`,e.id]}),n.invalidateQueries({queryKey:[`integrations`]})}});return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:12},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,gap:12,flexWrap:`wrap`},children:[(0,x.jsxs)(`div`,{style:{flex:1},children:[(0,x.jsxs)(`div`,{style:{fontSize:15,fontWeight:700},children:[e.displayName,` `,(0,x.jsxs)(`span`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`,fontWeight:400},children:[`· `,e.id]})]}),(0,x.jsxs)(`div`,{style:{marginTop:4,display:`flex`,gap:12,alignItems:`center`,flexWrap:`wrap`},children:[(0,x.jsx)(RP,{status:u.data?.status??e.status}),e.capabilities&&(0,x.jsxs)(`span`,{style:{display:`inline-flex`,gap:10},children:[(0,x.jsx)(zP,{on:e.capabilities.workItems.read,label:`Read`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.list,label:`List`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.import,label:`Import`})]})]})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:6,flexWrap:`wrap`},children:[(0,x.jsx)(`button`,{onClick:t,style:BP,children:`Configure`}),(0,x.jsx)(`button`,{onClick:()=>m.mutate(),disabled:m.isPending,style:BP,children:m.isPending?`Verifying…`:`Verify`}),(0,x.jsx)(`button`,{onClick:()=>f.mutate(),disabled:f.isPending,style:BP,children:f.isPending?`…`:e.enabled?`Disable`:`Enable`}),l&&(0,x.jsx)(`button`,{onClick:()=>i(e=>!e),style:BP,children:r?`Hide items`:`Browse`}),s?(0,x.jsxs)(`span`,{style:{display:`inline-flex`,gap:4,alignItems:`center`},children:[(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--danger)`},children:`Delete?`}),(0,x.jsx)(`button`,{onClick:()=>p.mutate(),style:HP,children:`Yes`}),(0,x.jsx)(`button`,{onClick:()=>c(!1),style:BP,children:`No`})]}):(0,x.jsx)(`button`,{onClick:()=>c(!0),style:HP,children:`Delete`})]})]}),m.data&&(0,x.jsxs)(`div`,{style:{marginTop:8,fontSize:13,padding:`6px 10px`,borderRadius:`var(--radius)`,background:m.data.status===`available`?`var(--success-bg, rgba(0,180,0,0.08))`:`var(--danger-bg, rgba(200,0,0,0.08))`},children:[`Connection: `,(0,x.jsx)(`strong`,{children:m.data.status}),m.data.message?` — ${m.data.message}`:``]}),e.findings.map((e,t)=>(0,x.jsxs)(`p`,{style:{fontSize:12,color:e.level===`blocking`?`var(--danger)`:`var(--warning)`,margin:`6px 0 0`},children:[`[`,e.level,`] `,e.message]},t)),p.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,margin:`6px 0 0`},children:p.error.message}),r&&l&&(0,x.jsxs)(`div`,{style:{marginTop:12},children:[d.isLoading&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:`Loading…`}),d.isError&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--danger)`},children:d.error.message}),(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:d.data?.items.map(t=>(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`},children:t.externalId}),` `,(0,x.jsx)(`span`,{style:{fontSize:14},children:t.title}),t.status&&(0,x.jsxs)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:[` · `,t.status]})]}),e.capabilities?.workItems.import&&(0,x.jsx)(`button`,{onClick:()=>o(t),style:BP,children:`Import`})]},t.externalId))}),a&&(0,x.jsx)(XP,{integrationId:e.id,item:a,onClose:()=>o(null)})]})]})}function QP(){let e=C(),{data:t,isLoading:n,error:r}=it({queryKey:[`integrations`],queryFn:()=>V.getIntegrations(),retry:!1}),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),c=t?.find(e=>e.id===o);return(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:900,margin:`0 auto`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:20},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:`0 0 4px`},children:`Integrations`}),(0,x.jsxs)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`,margin:0},children:[`Connect Kaddo to external work systems. Configuration lives in `,(0,x.jsx)(`span`,{className:`font-mono`,children:`.kaddo/integrations.yml`}),` — Admin and CLI share the same source of truth.`]})]}),!i&&(0,x.jsx)(`button`,{onClick:()=>{a(!0),s(null)},style:VP,children:`+ Add Integration`})]}),i&&(0,x.jsx)(JP,{onCreated:()=>{a(!1),e.invalidateQueries({queryKey:[`integrations`]})},onCancel:()=>a(!1)}),o&&c&&(0,x.jsx)(YP,{integration:c,onDone:()=>s(null)}),n&&(0,x.jsx)(`p`,{style:{color:`var(--foreground-muted)`},children:`Loading…`}),r&&(0,x.jsx)(`p`,{style:{color:`var(--danger)`},children:r.message}),t&&t.length===0&&!i&&(0,x.jsxs)(`div`,{style:{padding:32,textAlign:`center`,color:`var(--foreground-muted)`,border:`1px dashed var(--border)`,borderRadius:`var(--radius)`},children:[(0,x.jsx)(`div`,{style:{fontSize:28,marginBottom:8},children:`🔌`}),(0,x.jsxs)(`p`,{style:{fontSize:14,margin:0},children:[`No integrations are configured. Click `,(0,x.jsx)(`strong`,{children:`+ Add Integration`}),` to get started.`]})]}),t?.map(e=>(0,x.jsx)(ZP,{integration:e,onEdit:()=>{s(e.id),a(!1)}},e.id))]})}var $P=new Ge({defaultOptions:{queries:{staleTime:3e4,retry:1}}}),eF=ga({component:go}),tF=ma({getParentRoute:()=>eF,path:`/`,component:()=>(0,x.jsx)(Yi,{to:`/overview`})}),nF=ma({getParentRoute:()=>eF,path:`/overview`,component:Io}),rF=ma({getParentRoute:()=>eF,path:`/knowledge`,component:Ro}),iF=ma({getParentRoute:()=>eF,path:`/knowledge/$layer`,component:Ho}),aF=ma({getParentRoute:()=>eF,path:`/knowledge/$layer/$artifactId`,component:Gg}),oF=ma({getParentRoute:()=>eF,path:`/work-items`,component:n_}),sF=ma({getParentRoute:()=>eF,path:`/work-items/new`,component:Ax}),cF=ma({getParentRoute:()=>eF,path:`/work-items/$workItemId`,component:Sx}),lF=ma({getParentRoute:()=>eF,path:`/work-items/$workItemId/edit`,component:Xx}),uF=ma({getParentRoute:()=>eF,path:`/system`,component:IP,validateSearch:e=>({node:typeof e.node==`string`?e.node:void 0,workItem:typeof e.workItem==`string`?e.workItem:void 0})}),dF=ma({getParentRoute:()=>eF,path:`/integrations`,component:QP}),fF=Na({routeTree:eF.addChildren([tF,nF,rF,iF,aF,oF,sF,cF,lF,uF,dF])});function pF(){return(0,x.jsx)(w,{client:$P,children:(0,x.jsx)(Ia,{router:fF})})}V.initSession().catch(()=>{}),(0,y.createRoot)(document.getElementById(`root`)).render((0,x.jsx)(v.StrictMode,{children:(0,x.jsx)(pF,{})}));
|
|
44
|
+
M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}hP.displayName=`MiniMap`,(0,v.memo)(hP);var gP=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,_P={[cA.Line]:`right`,[cA.Handle]:`bottom-right`};function vP({nodeId:e,position:t,variant:n=cA.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let y=Xj(),b=typeof e==`string`?e:y,S=NA(),C=(0,v.useRef)(null),w=n===cA.Handle,T=MA((0,v.useCallback)(gP(w&&p),[w,p]),OA),E=(0,v.useRef)(null),D=t??_P[n];(0,v.useEffect)(()=>{if(C.current&&b)return E.current||=yA({domNode:C.current,nodeId:b,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=S.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=S.getState(),o=[],s={x:e.x,y:e.y},c=r.get(b);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=Ek([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...AO({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:b,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:b,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:b,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};S.getState().triggerNodeChanges([n])}}),E.current.update({controlPosition:D,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{E.current?.destroy()}},[D,s,c,l,u,d,h,g,_,m]);let O=D.split(`-`);return(0,x.jsx)(`div`,{className:Zx([`react-flow__resize-control`,`nodrag`,...O,n,r]),ref:C,style:{...i,scale:T,...o&&{[w?`backgroundColor`:`borderColor`]:o}},children:a})}(0,v.memo)(vP);var yP={affected:{tone:`var(--danger)`,label:`Affected`},reviewed:{tone:`var(--foreground-muted)`,label:`Reviewed · not affected`},unknown:{tone:`var(--warning)`,label:`Unknown`}};function bP({data:e}){let{node:t,selected:n,impact:r,dimmed:i}=e,a=ax(t.type),o=tx[t.dimension],s=r?yP[r]:null;return(0,x.jsxs)(`div`,{style:{width:190,minHeight:58,boxSizing:`border-box`,background:`var(--surface)`,border:`1px ${o.border} ${n?`var(--primary)`:s?s.tone:`var(--border)`}`,borderLeft:`4px solid ${a.tone}`,borderRadius:`var(--radius)`,boxShadow:n?`0 0 0 2px color-mix(in srgb, var(--primary) 40%, transparent)`:s?`0 0 0 2px color-mix(in srgb, ${s.tone} 45%, transparent)`:`none`,opacity:i?.4:1,padding:`8px 10px`,overflow:`hidden`},children:[(0,x.jsx)(iM,{type:`target`,position:$.Top,style:{background:`var(--border-strong)`,width:6,height:6}}),(0,x.jsx)(`div`,{style:{fontSize:10,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`},children:a.label}),(0,x.jsx)(`div`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground)`,lineHeight:1.25,wordBreak:`break-word`},children:t.label}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,marginTop:3,flexWrap:`wrap`},children:[t.moduleId&&(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:10,color:`var(--foreground-muted)`},children:t.moduleId}),t.status&&(0,x.jsxs)(`span`,{style:{fontSize:10,color:`var(--foreground-muted)`},children:[`· `,t.status]})]}),s&&(0,x.jsx)(`div`,{style:{marginTop:4,fontSize:10,fontWeight:700,color:s.tone},children:s.label}),(0,x.jsx)(iM,{type:`source`,position:$.Bottom,style:{background:`var(--border-strong)`,width:6,height:6}})]})}function xP({data:e}){return(0,x.jsx)(`div`,{style:{width:`100%`,height:`100%`,boxSizing:`border-box`,border:`1px dashed ${e.available?`var(--border-strong)`:`var(--danger)`}`,borderRadius:`var(--radius)`,background:`color-mix(in srgb, var(--surface-muted) 50%, transparent)`},children:(0,x.jsxs)(`div`,{style:{position:`absolute`,top:4,left:8,display:`flex`,gap:8,alignItems:`center`},children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:11,fontWeight:700,color:`var(--foreground-muted)`},children:e.label}),!e.available&&(0,x.jsx)(`span`,{style:{fontSize:10,color:`var(--danger)`},children:`Unavailable`})]})})}function SP({label:e,children:t}){return(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsx)(`div`,{style:{fontSize:11,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`,marginBottom:3},children:e}),(0,x.jsx)(`div`,{style:{fontSize:14,color:`var(--foreground)`},children:t})]})}function CP({children:e,onClick:t}){return(0,x.jsx)(`button`,{onClick:t,style:{display:`block`,background:`none`,border:`none`,padding:`2px 0`,cursor:`pointer`,color:`var(--primary)`,fontFamily:`inherit`,fontSize:14,textAlign:`left`},children:e})}function wP({projection:e,selectedNodeId:t,selectedEdgeId:n,onClose:r,onSelectNode:i}){let a=mi(),o=new Map(e.nodes.map(e=>[e.id,e])),s=t?o.get(t)??null:null,c=n?e.relationships.find(e=>e.id===n)??null:null;return(0,x.jsxs)(`aside`,{style:{width:320,flexShrink:0,borderLeft:`1px solid var(--border)`,background:`var(--surface)`,padding:20,overflowY:`auto`},children:[(0,x.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`},children:(0,x.jsx)(`button`,{onClick:r,"aria-label":`Close details`,style:{background:`none`,border:`none`,cursor:`pointer`,color:`var(--foreground-muted)`,fontSize:18,lineHeight:1},children:`×`})}),s&&(0,x.jsx)(TP,{node:s,projection:e,nodeById:o,onSelectNode:i,router:a}),!s&&c&&(0,x.jsx)(EP,{edge:c,nodeById:o}),!s&&!c&&(0,x.jsx)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`},children:`Select a node or relationship to see details.`})]})}function TP({node:e,projection:t,nodeById:n,onSelectNode:r,router:i}){let a=ax(e.type),o=[];for(let r of t.relationships)if(r.source===e.id){let e=n.get(r.target);e&&o.push({id:e.id,label:e.label,rel:`${r.label} →`,dimension:e.dimension})}else if(r.target===e.id){let e=n.get(r.source);e&&o.push({id:e.id,label:e.label,rel:`${r.label} from`,dimension:e.dimension})}let s=e=>o.filter(t=>t.dimension===e),c=s(`system`),l=s(`knowledge`),u=s(`delivery`),d=s(`implementation`);return(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:17,fontWeight:700,margin:`0 0 12px`,wordBreak:`break-word`},children:e.label}),(0,x.jsx)(SP,{label:`Type`,children:a.label}),e.moduleId&&(0,x.jsx)(SP,{label:`Module / repository`,children:(0,x.jsx)(`span`,{className:`font-mono`,children:e.moduleId})}),e.status&&(0,x.jsx)(SP,{label:`Status`,children:Ua(e.status)}),e.purpose&&(0,x.jsx)(SP,{label:`Purpose`,children:e.purpose}),c.length>0&&(0,x.jsx)(SP,{label:`Relationships`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:c.map((e,t)=>(0,x.jsxs)(CP,{onClick:()=>r(e.id),children:[e.rel,` `,e.label]},t))})}),l.length>0&&(0,x.jsx)(SP,{label:`Knowledge context`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:l.map((e,t)=>(0,x.jsxs)(CP,{onClick:()=>r(e.id),children:[e.rel,` `,e.label]},t))})}),u.length>0&&(0,x.jsx)(SP,{label:`Delivery history`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:u.map((e,t)=>(0,x.jsxs)(CP,{onClick:()=>r(e.id),children:[e.rel,` `,e.label]},t))})}),d.length>0&&(0,x.jsx)(SP,{label:`Implementation`,children:(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:d.map((e,t)=>(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`},children:e.label},t))})}),(e.knowledgeRef||e.knowledgeRefs&&e.knowledgeRefs.length>0)&&(0,x.jsx)(SP,{label:`Knowledge`,children:(0,x.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[e.knowledgeRef&&(0,x.jsxs)(CP,{onClick:()=>i.navigate({to:`/knowledge/$layer/$artifactId`,params:{layer:e.knowledgeRef.layer,artifactId:e.knowledgeRef.id}}),children:[Ua(e.knowledgeRef.layer),` / `,e.knowledgeRef.id,` →`]}),(e.knowledgeRefs??[]).map(e=>(0,x.jsxs)(CP,{onClick:()=>i.navigate({to:`/knowledge/$layer/$artifactId`,params:{layer:e.layer,artifactId:e.id}}),children:[Ua(e.layer),` / `,e.id,` →`]},e.id))]})}),e.provenance&&(0,x.jsxs)(SP,{label:`Provenance`,children:[Ua(e.provenance),e.evidence&&e.evidence.length>0&&(0,x.jsx)(`div`,{className:`font-mono`,style:{fontSize:11,color:`var(--foreground-muted)`,marginTop:4},children:e.evidence.map((e,t)=>(0,x.jsx)(`div`,{children:e},t))})]}),e.workItemRef&&(0,x.jsx)(SP,{label:`Related Work Item`,children:(0,x.jsxs)(CP,{onClick:()=>i.navigate({to:`/work-items/$workItemId`,params:{workItemId:e.workItemRef}}),children:[e.workItemRef,` →`]})}),e.path&&(0,x.jsx)(SP,{label:`Path`,children:(0,x.jsx)(Ug,{path:e.path})})]})}function EP({edge:e,nodeById:t}){let n=t.get(e.source),r=t.get(e.target);return(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:15,fontWeight:700,margin:`0 0 12px`},children:`Relationship`}),(0,x.jsx)(SP,{label:`From`,children:n?.label??e.source}),(0,x.jsx)(SP,{label:`To`,children:r?.label??e.target}),(0,x.jsx)(SP,{label:`Type`,children:e.label}),n?.moduleId&&(0,x.jsx)(SP,{label:`Source module`,children:(0,x.jsx)(`span`,{className:`font-mono`,children:n.moduleId})}),r?.moduleId&&(0,x.jsx)(SP,{label:`Target module`,children:(0,x.jsx)(`span`,{className:`font-mono`,children:r.moduleId})})]})}function DP({metadata:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=e.topologyStatus,f=d===`available`?(0,x.jsx)(vo,{variant:`success`,children:`Available`}):d===`partial`?(0,x.jsx)(vo,{variant:`warning`,children:`Partial`}):(0,x.jsx)(vo,{variant:`muted`,children:`Unavailable`}),p=async()=>{if(t)return t;u(!0),c(null);try{let e=await V.getTopologyHandoff();return n(e),e}catch(e){return c(e instanceof fo?e.message:`The handoff could not be generated.`),null}finally{u(!1)}},m=async()=>{let e=await p();if(e)try{await navigator.clipboard?.writeText(e.text),o(!0),setTimeout(()=>o(!1),2e3)}catch{i(!0)}},h=async()=>{r?i(!1):await p()&&i(!0)},g=d===`available`?`${e.semanticEntityCount} semantic components · ${e.technicalRelationshipCount} technical relationships.`:d===`partial`?`${e.semanticEntityCount} semantic components known — Kaddo knows useful topology, but the map is not assumed to be exhaustive.`:`Kaddo currently knows Knowledge and Delivery relationships, but does not yet have enough semantic system metadata to describe how the software is structured.`,_={padding:`5px 12px`,borderRadius:`var(--radius)`,fontSize:12,fontWeight:600,fontFamily:`inherit`,cursor:`pointer`};return(0,x.jsxs)(`div`,{style:{padding:`10px 16px`,borderBottom:`1px solid var(--border)`,background:d===`available`?`transparent`:`color-mix(in srgb, var(--warning) 8%, transparent)`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,x.jsx)(`span`,{style:{fontSize:11,fontWeight:700,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`},children:`System topology`}),f,(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:g}),d!==`available`&&(0,x.jsxs)(`div`,{style:{marginLeft:`auto`,display:`flex`,gap:8,alignItems:`center`},children:[(0,x.jsxs)(`span`,{style:{fontSize:11,color:`var(--foreground-muted)`},children:[`Recommended: `,(0,x.jsx)(`span`,{className:`font-mono`,children:`architecture-agent`}),` · `,(0,x.jsx)(`span`,{className:`font-mono`,children:`graph-metadata-review`})]}),(0,x.jsx)(`button`,{onClick:m,disabled:l,style:{..._,border:`1px solid var(--primary)`,background:`var(--primary)`,color:`var(--primary-foreground)`,opacity:l?.6:1},children:l&&!t?`Preparing…`:a?`✓ Copied`:`Copy topology enrichment handoff`}),(0,x.jsx)(`button`,{onClick:h,disabled:l,style:{..._,border:`1px solid var(--border)`,background:`var(--surface)`,color:`var(--foreground)`},children:r?`Hide handoff`:`View handoff`})]})]}),s&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,margin:`8px 0 0`},children:s}),r&&t&&(0,x.jsx)(`pre`,{style:{marginTop:10,background:`var(--surface-muted)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:12,fontSize:11,lineHeight:1.5,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontFamily:`var(--font-mono)`,color:`var(--foreground)`,maxHeight:240,overflowY:`auto`},children:t.text})]})}var OP={affected:{tone:`var(--danger)`,label:`Affected`},"reviewed-not-affected":{tone:`var(--foreground-muted)`,label:`Reviewed — not affected`},unknown:{tone:`var(--warning)`,label:`Unknown`}},kP=e=>OP[e]??{tone:`var(--foreground-muted)`,label:e};function AP(e,t,n,r){return(0,x.jsxs)(`button`,{onClick:t,title:`Focus in the graph`,style:{display:`inline-flex`,alignItems:`center`,gap:5,padding:`2px 8px`,borderRadius:`var(--radius)`,border:`1px solid ${e}`,background:`color-mix(in srgb, ${e} 12%, transparent)`,color:`var(--foreground)`,cursor:`pointer`,fontFamily:`inherit`,fontSize:12},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:e}}),n]},r)}function jP({workItemId:e,wi:t,topologyStatus:n,onClear:r,onSelectNode:i}){let a=t?.affectedSystemEntities??[],o=t?.reviewedSystemEntities??[],s=o.filter(e=>e.status!==`unknown`),c=o.filter(e=>e.status===`unknown`),l=fx(a,o),u=px(a,o),d=l.length>0,f=e=>e[0]&&i(e[0].nodeId),p=(e,t,n,r)=>(0,x.jsxs)(`button`,{onClick:()=>f(r),disabled:t===0,style:{display:`inline-flex`,gap:6,alignItems:`center`,padding:`3px 9px`,borderRadius:`var(--radius)`,border:`1px solid var(--border)`,background:`var(--surface)`,color:`var(--foreground)`,cursor:t===0?`default`:`pointer`,opacity:t===0?.5:1,fontSize:12,fontFamily:`inherit`},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:n}}),e,` `,(0,x.jsx)(`strong`,{children:t})]});return(0,x.jsxs)(`div`,{style:{padding:`10px 16px`,borderBottom:`1px solid var(--border)`,background:`var(--surface)`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,flexWrap:`wrap`},children:[(0,x.jsxs)(`span`,{style:{fontSize:13,fontWeight:700},children:[`Impact view · `,(0,x.jsx)(`span`,{className:`font-mono`,children:e})]}),(0,x.jsx)(`button`,{onClick:r,style:{padding:`5px 10px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground-muted)`,cursor:`pointer`,fontSize:12,fontFamily:`inherit`},children:`✕ Clear impact`})]}),t&&d&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[p(`Affected`,u.affected,`var(--danger)`,a),p(`Reviewed`,u.reviewedNotAffected,`var(--foreground-muted)`,s),p(`Unknown`,u.unknown,`var(--warning)`,c)]}),(0,x.jsx)(`div`,{style:{display:`flex`,gap:6,flexWrap:`wrap`},children:l.map(e=>AP(kP(e.status).tone,()=>i(e.nodeId),e.label,`${e.status}:${e.nodeId}`))})]}),t&&!d&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--foreground-muted)`,margin:0},children:`This Work Item has not been assessed against the system Graph. A missing assessment does not mean there is no impact.`}),t&&d&&(0,x.jsx)(`div`,{style:{display:`flex`,gap:14,flexWrap:`wrap`,fontSize:11,color:`var(--foreground-muted)`},children:[`affected`,`reviewed-not-affected`,`unknown`].map(e=>(0,x.jsxs)(`span`,{style:{display:`inline-flex`,gap:5,alignItems:`center`},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:kP(e).tone}}),kP(e).label]},e))}),n===`partial`&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--warning)`,margin:0},children:`⚠ Graph coverage is partial. The highlighted entities represent reviewed scope based on the currently known topology and repository evidence — entities without a highlight may still be impacted.`}),n===`unavailable`&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--foreground-muted)`,margin:0},children:`No semantic topology is available, so impact cannot be projected onto the graph.`})]})}var MP={system:bP,systemGroup:xP};function NP(){return(0,x.jsxs)(`div`,{style:{padding:24},children:[(0,x.jsx)(`div`,{style:{height:`calc(100vh - 120px)`,background:`var(--surface-muted)`,borderRadius:`var(--radius)`,animation:`pulse 1.5s ease-in-out infinite`}}),(0,x.jsx)(`style`,{children:`@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}`})]})}var PP={padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`};function FP({projection:e}){let t=mi(),n=C(),r=qi({from:`/system`}),i=jj(),a=r.workItem??null,{data:o}=it({queryKey:[`work-item`,a],queryFn:()=>V.getWorkItem(a),enabled:a!=null,retry:!1}),s=(0,v.useMemo)(()=>{if(!a||!o)return;let e=new Map;for(let t of o.affectedSystemEntities)e.set(t.nodeId,`affected`);for(let t of o.reviewedSystemEntities)e.has(t.nodeId)||e.set(t.nodeId,t.status===`unknown`?`unknown`:`reviewed`);return e},[a,o]),[c,l]=(0,v.useState)(r.node??null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(`all`),[g,_]=(0,v.useState)(`all`),[y,b]=(0,v.useState)({system:!0,knowledge:!0,delivery:!0,implementation:!1,unknown:!0}),S=(0,v.useMemo)(()=>[...new Set(e.nodes.map(e=>e.type))].sort(),[e]),w=(0,v.useMemo)(()=>{let t=e.nodes.filter(e=>y[e.dimension]&&(m===`all`||e.moduleId===m)&&(g===`all`||e.type===g)),n=new Set(t.map(e=>e.id));return{...e,nodes:t,relationships:e.relationships.filter(e=>n.has(e.source)&&n.has(e.target))}},[e,m,g,y]),T=e=>b(t=>({...t,[e]:!t[e]})),E=(e,t)=>(0,x.jsxs)(`label`,{style:{display:`inline-flex`,gap:5,alignItems:`center`,fontSize:12,cursor:`pointer`,color:`var(--foreground-muted)`},children:[(0,x.jsx)(`input`,{type:`checkbox`,checked:y[e],onChange:()=>T(e),"aria-label":`Toggle ${t}`}),t]}),D=(0,v.useMemo)(()=>sx(w),[w]),O=(0,v.useMemo)(()=>lx(w,D,c,s),[w,D,c,s]),k=(0,v.useMemo)(()=>ux(w,c),[w,c]),A=e=>{let t=D.positions.get(e);t&&i.setCenter(t.x+95,t.y+29,{zoom:1.2,duration:400})};(0,v.useEffect)(()=>{if(r.node&&D.positions.has(r.node)){l(r.node);let e=setTimeout(()=>A(r.node),100);return()=>clearTimeout(e)}},[]),(0,v.useEffect)(()=>{if(!s||s.size===0)return;let e=[...s.keys()].filter(e=>D.positions.has(e));if(e.length===0)return;let t=setTimeout(()=>i.fitView({nodes:e.map(e=>({id:e})),duration:500,padding:.3,maxZoom:1.4}),120);return()=>clearTimeout(t)},[s,D]);let j=e=>{l(e),d(null),t.navigate({to:`/system`,search:{node:e,workItem:a??void 0},replace:!0}),A(e)},M=f.trim()?dx(w.nodes,f).slice(0,8):[];return(0,x.jsxs)(`div`,{style:{display:`flex`,height:`calc(100vh - 56px)`},children:[(0,x.jsxs)(`div`,{style:{flex:1,minWidth:0,position:`relative`,display:`flex`,flexDirection:`column`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,gap:10,padding:`12px 16px`,borderBottom:`1px solid var(--border)`,alignItems:`center`,flexWrap:`wrap`,position:`relative`,zIndex:5,background:`var(--background)`},children:[(0,x.jsxs)(`div`,{style:{position:`relative`,flex:`1 1 220px`,minWidth:180},children:[(0,x.jsx)(`input`,{type:`search`,placeholder:`Search system…`,value:f,onChange:e=>p(e.target.value),"aria-label":`Search system`,style:{...PP,width:`100%`,boxSizing:`border-box`}}),M.length>0&&(0,x.jsx)(`ul`,{style:{position:`absolute`,top:`100%`,left:0,right:0,marginTop:4,listStyle:`none`,padding:4,background:`var(--surface)`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,zIndex:10,maxHeight:260,overflowY:`auto`},children:M.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsxs)(`button`,{onClick:()=>{j(e.id),p(``)},style:{display:`block`,width:`100%`,textAlign:`left`,padding:`6px 8px`,background:`none`,border:`none`,cursor:`pointer`,color:`var(--foreground)`,fontFamily:`inherit`,fontSize:13},children:[e.label,` `,(0,x.jsxs)(`span`,{style:{color:`var(--foreground-muted)`,fontSize:11},children:[`· `,ax(e.type).label,e.moduleId?` · ${e.moduleId}`:``]})]})},e.id))})]}),e.groups.length>0&&(0,x.jsxs)(`select`,{value:m,onChange:e=>h(e.target.value),"aria-label":`Filter by module`,style:PP,children:[(0,x.jsx)(`option`,{value:`all`,children:`All modules`}),e.groups.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.label},e.id))]}),(0,x.jsxs)(`select`,{value:g,onChange:e=>_(e.target.value),"aria-label":`Filter by type`,style:PP,children:[(0,x.jsx)(`option`,{value:`all`,children:`All types`}),S.map(e=>(0,x.jsx)(`option`,{value:e,children:ax(e).label},e))]}),(0,x.jsxs)(`div`,{style:{display:`inline-flex`,gap:12,alignItems:`center`,paddingLeft:4},children:[(0,x.jsx)(`span`,{style:{fontSize:11,fontWeight:600,textTransform:`uppercase`,letterSpacing:.3,color:`var(--foreground-muted)`},children:`Show`}),E(`knowledge`,`Knowledge`),E(`delivery`,`Delivery`),E(`implementation`,`Implementation`)]}),(0,x.jsxs)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:[w.nodes.length,` nodes · `,w.relationships.length,` relationships · coverage `,e.metadata.coverage]}),(0,x.jsx)(`button`,{onClick:()=>n.invalidateQueries({queryKey:[`system-map`]}),style:{...PP,cursor:`pointer`,color:`var(--foreground-muted)`},children:`↻ Refresh`})]}),(0,x.jsx)(DP,{metadata:e.metadata}),a&&(0,x.jsx)(jP,{workItemId:a,wi:o??null,topologyStatus:e.metadata.topologyStatus,onClear:()=>t.navigate({to:`/system`,search:{},replace:!0}),onSelectNode:j}),w.nodes.length===0?(0,x.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`var(--foreground-muted)`,fontSize:14},children:`No nodes match these filters.`}):(0,x.jsx)(`div`,{style:{flex:1},children:(0,x.jsxs)(LN,{nodes:O,edges:k,nodeTypes:MP,onNodeClick:(e,t)=>{t.type===`system`&&j(t.id)},onEdgeClick:(e,t)=>{d(t.id),l(null)},onPaneClick:()=>{l(null),d(null)},fitView:!0,minZoom:.2,proOptions:{hideAttribution:!0},children:[(0,x.jsx)(WN,{color:`var(--border)`,gap:20}),(0,x.jsx)($N,{showInteractive:!1})]})})]}),(c||u)&&(0,x.jsx)(wP,{projection:e,selectedNodeId:c,selectedEdgeId:u,onClose:()=>{l(null),d(null)},onSelectNode:j})]})}function IP(){let e=C(),{data:t,isLoading:n,error:r}=it({queryKey:[`system-map`],queryFn:V.getSystemMap,refetchOnWindowFocus:!1});return n?(0,x.jsx)(NP,{}):r?(0,x.jsx)(`div`,{style:{padding:24},children:(0,x.jsxs)(`div`,{style:{background:`color-mix(in srgb, var(--danger) 10%, transparent)`,border:`1px solid var(--danger)`,borderRadius:`var(--radius)`,padding:16},children:[(0,x.jsx)(`strong`,{children:`System map could not be loaded`}),(0,x.jsx)(`p`,{style:{margin:`4px 0 8px`,fontSize:14,color:`var(--foreground-muted)`},children:`The project remains available, but Kaddo could not build the current System Map.`}),(0,x.jsx)(`button`,{onClick:()=>e.invalidateQueries({queryKey:[`system-map`]}),style:{...PP,cursor:`pointer`},children:`Retry`})]})}):!t||!t.metadata.available?(0,x.jsxs)(`div`,{style:{padding:`48px 32px`,textAlign:`center`,color:`var(--foreground-muted)`,maxWidth:640,margin:`0 auto`},children:[(0,x.jsx)(`div`,{style:{fontSize:32,marginBottom:12},children:`🗺️`}),(0,x.jsx)(`h2`,{style:{fontSize:18,fontWeight:600,color:`var(--foreground)`,margin:`0 0 8px`},children:`System map not available yet`}),(0,x.jsx)(`p`,{style:{fontSize:14},children:`Kaddo does not have enough system metadata to build a System Map for this project yet.`}),(0,x.jsx)(`p`,{style:{fontSize:13,marginTop:8},children:`Review the project Knowledge and graph metadata to enrich the map.`})]}):(0,x.jsx)(NN,{children:(0,x.jsx)(FP,{projection:t})})}var LP={available:`var(--success)`,configured:`var(--foreground-muted)`,unauthorized:`var(--danger)`,unavailable:`var(--warning)`,"invalid-config":`var(--danger)`,disabled:`var(--foreground-muted)`};function RP({status:e}){return(0,x.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:6,fontSize:12,color:`var(--foreground)`},children:[(0,x.jsx)(`span`,{"aria-hidden":!0,style:{width:8,height:8,borderRadius:8,background:LP[e]??`var(--foreground-muted)`}}),e]})}function zP({on:e,label:t}){return(0,x.jsxs)(`span`,{style:{fontSize:12,color:e?`var(--foreground)`:`var(--foreground-muted)`},children:[e?`✓`:`✗`,` `,t]})}var BP={padding:`6px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`},VP={...BP,background:`var(--primary)`,color:`var(--primary-foreground, #fff)`,fontWeight:600},HP={...BP,color:`var(--danger)`,borderColor:`var(--danger)`},UP={padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`,width:`100%`,boxSizing:`border-box`},WP={fontSize:13,fontWeight:600,color:`var(--foreground)`,marginBottom:4,display:`block`},GP={border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:16,background:`var(--surface)`};function KP({name:e,schema:t,value:n,onChange:r}){return t.type===`select`&&t.options?(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[t.label,t.required&&` *`]}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:t.description}),(0,x.jsxs)(`select`,{value:String(n??t.defaultValue??``),onChange:e=>r(e.target.value),style:UP,children:[(0,x.jsx)(`option`,{value:``,children:`Choose…`}),t.options.map(e=>(0,x.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]}):t.type===`boolean`?(0,x.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,alignItems:`center`,gap:8},children:[(0,x.jsx)(`input`,{type:`checkbox`,checked:!!(n??t.defaultValue),onChange:e=>r(e.target.checked),id:`field-${e}`}),(0,x.jsx)(`label`,{htmlFor:`field-${e}`,style:{fontSize:13,fontWeight:600},children:t.label}),t.description&&(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:t.description})]}):(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[t.label,t.required&&` *`]}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:t.description}),(0,x.jsx)(`input`,{type:t.type===`number`?`number`:`text`,value:String(n??``),placeholder:t.placeholder,onChange:e=>r(t.type===`number`?Number(e.target.value):e.target.value),style:UP})]})}function qP({schema:e,configured:t,onSave:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``);return r?(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[e.label,e.required&&` *`]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,x.jsx)(`input`,{type:`password`,value:a,onChange:e=>o(e.target.value),placeholder:`Enter value…`,style:{...UP,flex:1}}),(0,x.jsx)(`button`,{disabled:!a.trim(),onClick:()=>{n(a),i(!1),o(``)},style:VP,children:`Save`}),(0,x.jsx)(`button`,{onClick:()=>i(!1),style:BP,children:`Cancel`})]})]}):(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[e.label,e.required&&` *`]}),e.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:e.description}),(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,x.jsx)(`span`,{style:{fontSize:13,color:t?`var(--success)`:`var(--warning)`},children:t?`Configured`:`Not configured`}),(0,x.jsx)(`button`,{onClick:()=>{i(!0),o(``)},style:BP,children:t?`Replace`:`Set`})]})]})}function JP({onCreated:e,onCancel:t}){let n=C(),{data:r}=it({queryKey:[`integration-types`],queryFn:()=>V.getIntegrationTypes()}),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)({}),[u,d]=(0,v.useState)({}),f=at({mutationFn:()=>V.createIntegration({id:o.trim(),adapter:i.id,config:c}),onSuccess:async t=>{for(let[e,n]of Object.entries(u))n.trim()&&await V.setIntegrationSecret(t.id,e,n);n.invalidateQueries({queryKey:[`integrations`]}),e()}});if(!i)return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:16},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,x.jsx)(`h3`,{style:{fontSize:15,fontWeight:700,margin:0},children:`Add Integration`}),(0,x.jsx)(`button`,{onClick:t,style:{...BP,border:`none`,background:`none`,color:`var(--foreground-muted)`},children:`✕`})]}),(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`,margin:`0 0 12px`},children:`Choose a provider from the Integration Registry:`}),!r&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:`Loading…`}),(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:r?.map(e=>(0,x.jsxs)(`button`,{onClick:()=>{a(e),s(``)},style:{...GP,cursor:`pointer`,textAlign:`left`},children:[(0,x.jsx)(`div`,{style:{fontWeight:600,fontSize:14},children:e.displayName}),e.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginTop:2},children:e.description}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:6},children:[(0,x.jsx)(zP,{on:e.capabilities.workItems.read,label:`Read`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.list,label:`List`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.import,label:`Import`})]})]},e.id))})]});let p=i.configSchema,m=i.secretSchema,h=o.trim()&&/^[a-z0-9][a-z0-9._-]*$/i.test(o.trim());return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:16},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,x.jsxs)(`h3`,{style:{fontSize:15,fontWeight:700,margin:0},children:[i.displayName,` Integration`]}),(0,x.jsx)(`button`,{onClick:()=>a(null),style:{...BP,border:`none`,background:`none`,color:`var(--foreground-muted)`},children:`✕`})]}),(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsx)(`label`,{style:WP,children:`Integration ID *`}),(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:`A unique identifier (alphanumeric, dashes, dots).`}),(0,x.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:`e.g. company-jira`,style:UP})]}),Object.keys(p).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`16px 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Configuration`}),Object.entries(p).map(([e,t])=>(0,x.jsx)(KP,{name:e,schema:t,value:c[e],onChange:t=>l({...c,[e]:t})},e))]}),Object.keys(m).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`16px 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Credentials`}),Object.entries(m).map(([e,t])=>(0,x.jsxs)(`div`,{style:{marginBottom:12},children:[(0,x.jsxs)(`label`,{style:WP,children:[t.label,t.required&&` *`]}),t.description&&(0,x.jsx)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:4},children:t.description}),(0,x.jsx)(`input`,{type:`password`,value:u[e]??``,onChange:t=>d({...u,[e]:t.target.value}),placeholder:`Enter value…`,style:UP})]},e))]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:16},children:[(0,x.jsx)(`button`,{disabled:!h||f.isPending,onClick:()=>f.mutate(),style:VP,children:f.isPending?`Creating…`:`Save Integration`}),(0,x.jsx)(`button`,{onClick:t,style:BP,children:`Cancel`})]}),f.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,marginTop:8},children:f.error.message})]})}function YP({integration:e,onDone:t}){let n=C(),r=e.metadata?.configSchema??{},i=e.metadata?.secretSchema??{},{data:a}=it({queryKey:[`integration-detail`,e.id],queryFn:()=>V.getIntegrationDetail(e.id)}),{data:o,refetch:s}=it({queryKey:[`integration-secrets`,e.id],queryFn:()=>V.getIntegrationSecretStatus(e.id)}),[c,l]=(0,v.useState)(()=>({...a??e})),[u,d]=(0,v.useState)(!1),f=a?.config;(0,v.useState)(()=>{f&&!u&&l(f)});let p=at({mutationFn:()=>V.updateIntegration(e.id,{config:c}),onSuccess:()=>{n.invalidateQueries({queryKey:[`integrations`]}),n.invalidateQueries({queryKey:[`integration-detail`,e.id]}),d(!1)}}),m=at({mutationFn:({name:t,value:n})=>V.setIntegrationSecret(e.id,t,n),onSuccess:()=>{s(),n.invalidateQueries({queryKey:[`integrations`]})}});return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:16},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,x.jsxs)(`h3`,{style:{fontSize:15,fontWeight:700,margin:0},children:[`Configure: `,e.displayName]}),(0,x.jsx)(`button`,{onClick:t,style:{...BP,border:`none`,background:`none`,color:`var(--foreground-muted)`},children:`✕`})]}),Object.keys(r).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`0 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Configuration`}),Object.entries(r).map(([e,t])=>(0,x.jsx)(KP,{name:e,schema:t,value:c[e],onChange:t=>{l({...c,[e]:t}),d(!0)}},e)),(0,x.jsx)(`button`,{disabled:!u||p.isPending,onClick:()=>p.mutate(),style:VP,children:p.isPending?`Saving…`:`Save Configuration`}),p.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,marginTop:4},children:p.error.message})]}),Object.keys(i).length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{style:{fontSize:13,fontWeight:600,color:`var(--foreground-muted)`,margin:`16px 0 8px`,textTransform:`uppercase`,letterSpacing:.4},children:`Credentials`}),Object.entries(i).map(([e,t])=>(0,x.jsx)(qP,{name:e,schema:t,configured:o?.[e]??!1,onSave:t=>m.mutate({name:e,value:t})},e)),m.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,marginTop:4},children:m.error.message})]})]})}function XP({integrationId:e,item:t,onClose:n}){let r=mi(),i=C(),[a,o]=(0,v.useState)(``),{data:s}=it({queryKey:[`capture-def`],queryFn:()=>V.getCaptureDefinition()}),{data:c,isLoading:l}=it({queryKey:[`import-preview`,e,t.externalId],queryFn:()=>V.getImportPreview(e,t.externalId),retry:!1}),u=at({mutationFn:()=>V.importExternalWorkItem(e,t.externalId,a),onSuccess:n=>{i.invalidateQueries({queryKey:[`import-preview`,e,t.externalId]}),r.navigate({to:`/work-items/$workItemId`,params:{workItemId:n.workItemId}})}});return(0,x.jsxs)(`div`,{style:{...GP,marginTop:10},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,x.jsx)(`h3`,{style:{fontSize:13,fontWeight:700,textTransform:`uppercase`,letterSpacing:.4,color:`var(--foreground-muted)`,margin:0},children:`Import work item`}),(0,x.jsx)(`button`,{onClick:n,style:{background:`none`,border:`none`,cursor:`pointer`,color:`var(--foreground-muted)`,fontSize:13},children:`✕`})]}),l&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:`Loading preview…`}),c?.duplicate?(0,x.jsxs)(`div`,{style:{marginTop:8},children:[(0,x.jsxs)(`p`,{style:{fontSize:14},children:[`Already imported as `,(0,x.jsx)(`strong`,{className:`font-mono`,children:c.duplicate.workItemId}),` — "`,c.duplicate.title,`".`]}),(0,x.jsx)(`button`,{onClick:()=>r.navigate({to:`/work-items/$workItemId`,params:{workItemId:c.duplicate.workItemId}}),style:BP,children:`View Work Item`})]}):c?(0,x.jsxs)(`div`,{style:{marginTop:8,display:`flex`,flexDirection:`column`,gap:10},children:[(0,x.jsxs)(`div`,{style:{fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`},children:`Source:`}),` `,c.preview.source.provider,` · `,c.preview.source.externalId]}),(0,x.jsxs)(`div`,{style:{fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`},children:`Captured intent:`}),` `,c.preview.capturedIntent]}),(0,x.jsxs)(`div`,{style:{fontSize:13},children:[(0,x.jsx)(`span`,{style:{color:`var(--foreground-muted)`},children:`Will create:`}),` a Draft Work Item (needs refinement)`]}),c.preview.externalType&&(0,x.jsxs)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:[`External type "`,c.preview.externalType,`" — choose the Kaddo type explicitly (never inferred):`]}),(0,x.jsxs)(`select`,{value:a,onChange:e=>o(e.target.value),"aria-label":`Kaddo Work Item type`,style:{...UP,alignSelf:`flex-start`,width:`auto`},children:[(0,x.jsx)(`option`,{value:``,children:`Choose Kaddo Work Item type…`}),(s?.types??[]).map(e=>(0,x.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--foreground-muted)`,margin:0},children:`No project files have been modified yet.`}),(0,x.jsx)(`div`,{children:(0,x.jsx)(`button`,{disabled:!a||u.isPending,onClick:()=>u.mutate(),style:a?VP:BP,children:u.isPending?`Importing…`:`Import as Draft`})}),u.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`},children:u.error.message})]}):null]})}function ZP({integration:e,onEdit:t}){let n=C(),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=e.status!==`disabled`&&e.status!==`invalid-config`&&e.capabilities?.workItems.list,u=it({queryKey:[`integration-status`,e.id],queryFn:()=>V.getIntegrationStatus(e.id),enabled:l,retry:!1}),d=it({queryKey:[`external-items`,e.id],queryFn:()=>V.getExternalWorkItems(e.id),enabled:r&&!!l,retry:!1}),f=at({mutationFn:()=>e.enabled?V.disableIntegration(e.id):V.enableIntegration(e.id),onSuccess:()=>n.invalidateQueries({queryKey:[`integrations`]})}),p=at({mutationFn:()=>V.deleteIntegration(e.id),onSuccess:()=>n.invalidateQueries({queryKey:[`integrations`]})}),m=at({mutationFn:()=>V.getIntegrationStatus(e.id),onSuccess:()=>{n.invalidateQueries({queryKey:[`integration-status`,e.id]}),n.invalidateQueries({queryKey:[`integrations`]})}});return(0,x.jsxs)(`div`,{style:{...GP,marginBottom:12},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,gap:12,flexWrap:`wrap`},children:[(0,x.jsxs)(`div`,{style:{flex:1},children:[(0,x.jsxs)(`div`,{style:{fontSize:15,fontWeight:700},children:[e.displayName,` `,(0,x.jsxs)(`span`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`,fontWeight:400},children:[`· `,e.id]})]}),(0,x.jsxs)(`div`,{style:{marginTop:4,display:`flex`,gap:12,alignItems:`center`,flexWrap:`wrap`},children:[(0,x.jsx)(RP,{status:u.data?.status??e.status}),e.capabilities&&(0,x.jsxs)(`span`,{style:{display:`inline-flex`,gap:10},children:[(0,x.jsx)(zP,{on:e.capabilities.workItems.read,label:`Read`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.list,label:`List`}),(0,x.jsx)(zP,{on:e.capabilities.workItems.import,label:`Import`})]})]})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:6,flexWrap:`wrap`},children:[(0,x.jsx)(`button`,{onClick:t,style:BP,children:`Configure`}),(0,x.jsx)(`button`,{onClick:()=>m.mutate(),disabled:m.isPending,style:BP,children:m.isPending?`Verifying…`:`Verify`}),(0,x.jsx)(`button`,{onClick:()=>f.mutate(),disabled:f.isPending,style:BP,children:f.isPending?`…`:e.enabled?`Disable`:`Enable`}),l&&(0,x.jsx)(`button`,{onClick:()=>i(e=>!e),style:BP,children:r?`Hide items`:`Browse`}),s?(0,x.jsxs)(`span`,{style:{display:`inline-flex`,gap:4,alignItems:`center`},children:[(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--danger)`},children:`Delete?`}),(0,x.jsx)(`button`,{onClick:()=>p.mutate(),style:HP,children:`Yes`}),(0,x.jsx)(`button`,{onClick:()=>c(!1),style:BP,children:`No`})]}):(0,x.jsx)(`button`,{onClick:()=>c(!0),style:HP,children:`Delete`})]})]}),m.data&&(0,x.jsxs)(`div`,{style:{marginTop:8,fontSize:13,padding:`6px 10px`,borderRadius:`var(--radius)`,background:m.data.status===`available`?`var(--success-bg, rgba(0,180,0,0.08))`:`var(--danger-bg, rgba(200,0,0,0.08))`},children:[`Connection: `,(0,x.jsx)(`strong`,{children:m.data.status}),m.data.message?` — ${m.data.message}`:``]}),e.findings.map((e,t)=>(0,x.jsxs)(`p`,{style:{fontSize:12,color:e.level===`blocking`?`var(--danger)`:`var(--warning)`,margin:`6px 0 0`},children:[`[`,e.level,`] `,e.message]},t)),p.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`,margin:`6px 0 0`},children:p.error.message}),r&&l&&(0,x.jsxs)(`div`,{style:{marginTop:12},children:[d.isLoading&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:`Loading…`}),d.isError&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--danger)`},children:d.error.message}),(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:d.data?.items.map(t=>(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,padding:`8px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:12,color:`var(--foreground-muted)`},children:t.externalId}),` `,(0,x.jsx)(`span`,{style:{fontSize:14},children:t.title}),t.status&&(0,x.jsxs)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:[` · `,t.status]})]}),e.capabilities?.workItems.import&&(0,x.jsx)(`button`,{onClick:()=>o(t),style:BP,children:`Import`})]},t.externalId))}),a&&(0,x.jsx)(XP,{integrationId:e.id,item:a,onClose:()=>o(null)})]})]})}function QP(){let e=C(),{data:t,isLoading:n,error:r}=it({queryKey:[`integrations`],queryFn:()=>V.getIntegrations(),retry:!1}),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),c=t?.find(e=>e.id===o);return(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:900,margin:`0 auto`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:20},children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:`0 0 4px`},children:`Integrations`}),(0,x.jsxs)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`,margin:0},children:[`Connect Kaddo to external work systems. Configuration lives in `,(0,x.jsx)(`span`,{className:`font-mono`,children:`.kaddo/integrations.yml`}),` — Admin and CLI share the same source of truth.`]})]}),!i&&(0,x.jsx)(`button`,{onClick:()=>{a(!0),s(null)},style:VP,children:`+ Add Integration`})]}),i&&(0,x.jsx)(JP,{onCreated:()=>{a(!1),e.invalidateQueries({queryKey:[`integrations`]})},onCancel:()=>a(!1)}),o&&c&&(0,x.jsx)(YP,{integration:c,onDone:()=>s(null)}),n&&(0,x.jsx)(`p`,{style:{color:`var(--foreground-muted)`},children:`Loading…`}),r&&(0,x.jsx)(`p`,{style:{color:`var(--danger)`},children:r.message}),t&&t.length===0&&!i&&(0,x.jsxs)(`div`,{style:{padding:32,textAlign:`center`,color:`var(--foreground-muted)`,border:`1px dashed var(--border)`,borderRadius:`var(--radius)`},children:[(0,x.jsx)(`div`,{style:{fontSize:28,marginBottom:8},children:`🔌`}),(0,x.jsxs)(`p`,{style:{fontSize:14,margin:0},children:[`No integrations are configured. Click `,(0,x.jsx)(`strong`,{children:`+ Add Integration`}),` to get started.`]})]}),t?.map(e=>(0,x.jsx)(ZP,{integration:e,onEdit:()=>{s(e.id),a(!1)}},e.id))]})}var $P={padding:`6px 12px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,cursor:`pointer`,fontSize:13,fontFamily:`inherit`},eF={...$P,background:`var(--primary)`,color:`var(--primary-foreground, #fff)`,fontWeight:600},tF={padding:`6px 10px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`,color:`var(--foreground)`,fontSize:13,fontFamily:`inherit`},nF={border:`1px solid var(--border)`,borderRadius:`var(--radius)`,padding:16,background:`var(--surface)`},rF={display:`inline-flex`,alignItems:`center`,gap:4,padding:`2px 8px`,borderRadius:12,fontSize:11,fontWeight:500,background:`var(--surface-muted)`,color:`var(--foreground-muted)`};function iF({type:e}){if(!e)return null;let t={Feature:`var(--primary)`,Bug:`var(--danger)`,Task:`var(--foreground-muted)`,Epic:`var(--warning)`};return(0,x.jsx)(`span`,{style:{...rF,borderLeft:`3px solid ${t[e]??`var(--foreground-muted)`}`},children:e})}function aF({status:e}){if(!e)return null;let t={Open:`var(--primary)`,"To Do":`var(--foreground-muted)`,"In Progress":`var(--warning)`,Done:`var(--success)`};return(0,x.jsxs)(`span`,{style:{...rF},children:[(0,x.jsx)(`span`,{style:{width:6,height:6,borderRadius:6,background:t[e]??`var(--foreground-muted)`}}),e]})}function oF({filters:e,onChange:t,onRefresh:n,loading:r}){let[i,a]=(0,v.useState)(e.search??``);return(0,x.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`,flexWrap:`wrap`,marginBottom:16},children:[(0,x.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),onKeyDown:n=>{n.key===`Enter`&&t({...e,search:i.trim()||void 0})},placeholder:`Search items…`,style:{...tF,width:260}}),(0,x.jsx)(`button`,{onClick:()=>t({...e,search:i.trim()||void 0}),style:$P,children:`Search`}),(0,x.jsx)(`button`,{onClick:n,disabled:r,style:$P,children:r?`Refreshing…`:`Refresh`}),(e.statuses?.length||e.types?.length||e.labels?.length||e.search)&&(0,x.jsx)(`button`,{onClick:()=>{a(``),t({})},style:{...$P,color:`var(--foreground-muted)`,fontSize:12},children:`Clear filters`})]})}function sF({integrationId:e,item:t,onClose:n}){let r=mi(),i=C(),[a,o]=(0,v.useState)(``),{data:s}=it({queryKey:[`capture-def`],queryFn:()=>V.getCaptureDefinition()}),{data:c,isLoading:l}=it({queryKey:[`import-preview`,e,t.externalId],queryFn:()=>V.getImportPreview(e,t.externalId),retry:!1}),u=at({mutationFn:()=>V.importExternalWorkItem(e,t.externalId,a),onSuccess:e=>{i.invalidateQueries({queryKey:[`discover`]}),r.navigate({to:`/work-items/$workItemId`,params:{workItemId:e.workItemId}})}});return(0,x.jsxs)(`div`,{style:{...nF,marginTop:10,marginLeft:16,borderLeft:`3px solid var(--primary)`},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,x.jsxs)(`h4`,{style:{fontSize:13,fontWeight:700,margin:0},children:[`Import: `,t.title]}),(0,x.jsx)(`button`,{onClick:n,style:{background:`none`,border:`none`,cursor:`pointer`,color:`var(--foreground-muted)`,fontSize:13},children:`✕`})]}),l&&(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--foreground-muted)`},children:`Loading preview…`}),c?.duplicate?(0,x.jsxs)(`div`,{style:{marginTop:8},children:[(0,x.jsxs)(`p`,{style:{fontSize:13},children:[`Already imported as `,(0,x.jsx)(`strong`,{className:`font-mono`,children:c.duplicate.workItemId}),`.`]}),(0,x.jsx)(`button`,{onClick:()=>r.navigate({to:`/work-items/$workItemId`,params:{workItemId:c.duplicate.workItemId}}),style:$P,children:`View Work Item`})]}):c?(0,x.jsxs)(`div`,{style:{marginTop:8,display:`flex`,flexDirection:`column`,gap:8},children:[(0,x.jsxs)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`},children:[`Source: `,c.preview.source.provider,` · `,c.preview.source.externalId]}),(0,x.jsxs)(`select`,{value:a,onChange:e=>o(e.target.value),style:{...tF,width:`auto`,alignSelf:`flex-start`},children:[(0,x.jsx)(`option`,{value:``,children:`Choose Kaddo Work Item type…`}),(s?.types??[]).map(e=>(0,x.jsx)(`option`,{value:e.value,children:e.label},e.value))]}),(0,x.jsx)(`p`,{style:{fontSize:11,color:`var(--foreground-muted)`,margin:0},children:`No project files have been modified yet.`}),(0,x.jsx)(`div`,{children:(0,x.jsx)(`button`,{disabled:!a||u.isPending,onClick:()=>u.mutate(),style:a?eF:$P,children:u.isPending?`Importing…`:`Import as Draft`})}),u.isError&&(0,x.jsx)(`p`,{style:{fontSize:12,color:`var(--danger)`},children:u.error.message})]}):null]})}function cF({item:e,integrationId:t,integrationName:n,icon:r}){let[i,a]=(0,v.useState)(!1);return(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,padding:`10px 14px`,border:`1px solid var(--border)`,borderRadius:`var(--radius)`,background:`var(--surface)`},children:[(0,x.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:4},children:[(0,x.jsx)(`span`,{className:`font-mono`,style:{fontSize:11,color:`var(--foreground-muted)`,flexShrink:0},children:e.externalId}),(0,x.jsx)(`span`,{style:{fontSize:14,fontWeight:500,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`center`,flexWrap:`wrap`},children:[(0,x.jsx)(iF,{type:e.type}),(0,x.jsx)(aF,{status:e.status}),e.labels?.map(e=>(0,x.jsx)(`span`,{style:{...rF,fontSize:10},children:e},e)),(0,x.jsxs)(`span`,{style:{fontSize:11,color:`var(--foreground-muted)`},children:[r?`${r} `:``,n]}),e.assignees?.length?(0,x.jsx)(`span`,{style:{fontSize:11,color:`var(--foreground-muted)`},children:e.assignees.map(e=>e.name).join(`, `)}):null]})]}),(0,x.jsxs)(`div`,{style:{display:`flex`,gap:6,flexShrink:0},children:[e.url&&(0,x.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,style:{...$P,textDecoration:`none`,fontSize:12},children:`Open`}),(0,x.jsx)(`button`,{onClick:()=>a(!i),style:$P,children:i?`Cancel`:`Import`})]})]}),i&&(0,x.jsx)(sF,{integrationId:t,item:e,onClose:()=>a(!1)})]})}function lF({result:e}){return e.error?(0,x.jsxs)(`div`,{style:{...nF,borderLeft:`3px solid var(--danger)`,marginBottom:12},children:[(0,x.jsxs)(`div`,{style:{fontWeight:600,fontSize:14},children:[e.displayName,` `,(0,x.jsx)(`span`,{style:{fontWeight:400,fontSize:12,color:`var(--danger)`},children:`Error`})]}),(0,x.jsx)(`p`,{style:{fontSize:13,color:`var(--danger)`,margin:`4px 0 0`},children:e.error})]}):(0,x.jsxs)(`div`,{style:{marginBottom:16},children:[(0,x.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:8},children:[(0,x.jsx)(`span`,{style:{fontSize:14,fontWeight:600},children:e.displayName}),(0,x.jsxs)(`span`,{style:{...rF},children:[e.items.length,` item`,e.items.length===1?``:`s`,e.hasMore?`+`:``]})]}),(0,x.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:e.items.map(t=>(0,x.jsx)(cF,{item:t,integrationId:e.integrationId,integrationName:e.displayName,icon:e.icon},`${e.integrationId}-${t.externalId}`))})]})}function uF(){let[e,t]=(0,v.useState)({}),{data:n,isLoading:r,error:i,refetch:a}=it({queryKey:[`discover`,e],queryFn:()=>V.discoverExternalWorkItems({filters:e,pageSize:50}),retry:!1}),o=(0,v.useMemo)(()=>n?n.results.flatMap(e=>e.items.map(t=>({...t,_integrationId:e.integrationId,_integrationName:e.displayName,_icon:e.icon}))):[],[n]),s=(0,v.useMemo)(()=>[...new Set(o.map(e=>e.type).filter(Boolean))].sort(),[o]),c=(0,v.useMemo)(()=>[...new Set(o.map(e=>e.status).filter(Boolean))].sort(),[o]);return(0,x.jsxs)(`div`,{style:{padding:`24px 32px`,maxWidth:1e3,margin:`0 auto`},children:[(0,x.jsxs)(`div`,{style:{marginBottom:20},children:[(0,x.jsx)(`h2`,{style:{fontSize:22,fontWeight:700,margin:`0 0 4px`},children:`External Work Items`}),(0,x.jsx)(`p`,{style:{fontSize:14,color:`var(--foreground-muted)`,margin:0},children:`Discover items from all enabled integrations. Read-only — import creates a Draft Work Item through human confirmation.`})]}),(0,x.jsx)(oF,{filters:e,onChange:t,onRefresh:()=>a(),loading:r}),s.length>0&&(0,x.jsxs)(`div`,{style:{display:`flex`,gap:4,marginBottom:8,flexWrap:`wrap`},children:[(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`,lineHeight:`24px`},children:`Types:`}),s.map(n=>(0,x.jsx)(`button`,{onClick:()=>{let r=e.types??[];t({...e,types:r.includes(n)?r.filter(e=>e!==n):[...r,n]})},style:{...rF,cursor:`pointer`,border:`1px solid var(--border)`,background:e.types?.includes(n)?`var(--primary)`:`var(--surface)`,color:e.types?.includes(n)?`var(--primary-foreground, #fff)`:`var(--foreground-muted)`},children:n},n))]}),c.length>0&&(0,x.jsxs)(`div`,{style:{display:`flex`,gap:4,marginBottom:12,flexWrap:`wrap`},children:[(0,x.jsx)(`span`,{style:{fontSize:12,color:`var(--foreground-muted)`,lineHeight:`24px`},children:`Statuses:`}),c.map(n=>(0,x.jsx)(`button`,{onClick:()=>{let r=e.statuses??[];t({...e,statuses:r.includes(n)?r.filter(e=>e!==n):[...r,n]})},style:{...rF,cursor:`pointer`,border:`1px solid var(--border)`,background:e.statuses?.includes(n)?`var(--primary)`:`var(--surface)`,color:e.statuses?.includes(n)?`var(--primary-foreground, #fff)`:`var(--foreground-muted)`},children:n},n))]}),r&&(0,x.jsx)(`p`,{style:{color:`var(--foreground-muted)`},children:`Discovering work items across integrations…`}),i&&(0,x.jsx)(`p`,{style:{color:`var(--danger)`},children:i.message}),n&&n.totalItems===0&&n.results.every(e=>!e.error)&&(0,x.jsxs)(`div`,{style:{padding:32,textAlign:`center`,color:`var(--foreground-muted)`,border:`1px dashed var(--border)`,borderRadius:`var(--radius)`},children:[(0,x.jsx)(`div`,{style:{fontSize:28,marginBottom:8},children:`🔍`}),(0,x.jsx)(`p`,{style:{fontSize:14,margin:0},children:`No external work items found. Check that integrations are configured and enabled.`})]}),n&&(0,x.jsxs)(`div`,{style:{fontSize:12,color:`var(--foreground-muted)`,marginBottom:12},children:[n.totalItems,` item`,n.totalItems===1?``:`s`,` from `,n.results.length,` integration`,n.results.length===1?``:`s`]}),n?.results.map(e=>(0,x.jsx)(lF,{result:e},e.integrationId))]})}var dF=new Ge({defaultOptions:{queries:{staleTime:3e4,retry:1}}}),fF=ga({component:go}),pF=ma({getParentRoute:()=>fF,path:`/`,component:()=>(0,x.jsx)(Yi,{to:`/overview`})}),mF=ma({getParentRoute:()=>fF,path:`/overview`,component:Io}),hF=ma({getParentRoute:()=>fF,path:`/knowledge`,component:Ro}),gF=ma({getParentRoute:()=>fF,path:`/knowledge/$layer`,component:Ho}),_F=ma({getParentRoute:()=>fF,path:`/knowledge/$layer/$artifactId`,component:Gg}),vF=ma({getParentRoute:()=>fF,path:`/work-items`,component:n_}),yF=ma({getParentRoute:()=>fF,path:`/work-items/new`,component:Ax}),bF=ma({getParentRoute:()=>fF,path:`/work-items/$workItemId`,component:Sx}),xF=ma({getParentRoute:()=>fF,path:`/work-items/$workItemId/edit`,component:Xx}),SF=ma({getParentRoute:()=>fF,path:`/system`,component:IP,validateSearch:e=>({node:typeof e.node==`string`?e.node:void 0,workItem:typeof e.workItem==`string`?e.workItem:void 0})}),CF=ma({getParentRoute:()=>fF,path:`/integrations`,component:QP}),wF=ma({getParentRoute:()=>fF,path:`/external-items`,component:uF}),TF=Na({routeTree:fF.addChildren([pF,mF,hF,gF,_F,vF,yF,bF,xF,SF,CF,wF])});function EF(){return(0,x.jsx)(w,{client:dF,children:(0,x.jsx)(Ia,{router:TF})})}V.initSession().catch(()=>{}),(0,y.createRoot)(document.getElementById(`root`)).render((0,x.jsx)(v.StrictMode,{children:(0,x.jsx)(EF,{})}));
|