@inkeep/open-knowledge 0.35.1-beta.1 → 0.35.1-beta.2

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 @@ import{i as e,t}from"./chunk-DseTPa7n.js";import{t as n}from"./preload-helper-2e
7
7
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ie(n):``}function se(e,t){switch(e.tag){case 26:case 27:case 5:return ie(e.type);case 16:return ie(`Lazy`);case 13:return e.child!==t&&t!==null?ie(`Suspense Fallback`):ie(`Suspense`);case 19:return ie(`SuspenseList`);case 0:case 15:return oe(e.type,!1);case 11:return oe(e.type.render,!1);case 1:return oe(e.type,!0);case 31:return ie(`Activity`);default:return``}}function ce(e){try{var t=``,n=null;do t+=se(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
8
  Error generating stack: `+e.message+`
9
9
  `+e.stack}}var le=Object.prototype.hasOwnProperty,ue=t.unstable_scheduleCallback,de=t.unstable_cancelCallback,fe=t.unstable_shouldYield,pe=t.unstable_requestPaint,me=t.unstable_now,he=t.unstable_getCurrentPriorityLevel,ge=t.unstable_ImmediatePriority,_e=t.unstable_UserBlockingPriority,ve=t.unstable_NormalPriority,ye=t.unstable_LowPriority,be=t.unstable_IdlePriority,xe=t.log,Se=t.unstable_setDisableYieldValue,Ce=null,we=null;function Te(e){if(typeof xe==`function`&&Se(e),we&&typeof we.setStrictMode==`function`)try{we.setStrictMode(Ce,e)}catch{}}var Ee=Math.clz32?Math.clz32:ke,De=Math.log,Oe=Math.LN2;function ke(e){return e>>>=0,e===0?32:31-(De(e)/Oe|0)|0}var Ae=256,je=262144,Me=4194304;function Ne(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Pe(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=Ne(n))):i=Ne(o):i=Ne(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ne(n))):i=Ne(o)):i=Ne(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 Fe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ie(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 Le(){var e=Me;return Me<<=1,!(Me&62914560)&&(Me=4194304),e}function Re(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Be(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-Ee(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&&Ve(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ve(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ee(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function He(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ee(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ue(e,t){var n=t&-t;return n=n&42?1:We(n),(n&(e.suspendedLanes|t))===0?n:0}function We(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 Ge(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ke(){var e=F.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function qe(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Je=Math.random().toString(36).slice(2),Ye=`__reactFiber$`+Je,Xe=`__reactProps$`+Je,Ze=`__reactContainer$`+Je,Qe=`__reactEvents$`+Je,$e=`__reactListeners$`+Je,et=`__reactHandles$`+Je,tt=`__reactResources$`+Je,nt=`__reactMarker$`+Je;function rt(e){delete e[Ye],delete e[Xe],delete e[Qe],delete e[$e],delete e[et]}function it(e){var t=e[Ye];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ze]||n[Ye]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[Ye])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function at(e){if(e=e[Ye]||e[Ze]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function st(e){var t=e[tt];return t||=e[tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ct(e){e[nt]=!0}var lt=new Set,ut={};function dt(e,t){ft(e,t),ft(e+`Capture`,t)}function ft(e,t){for(ut[e]=t,e=0;e<t.length;e++)lt.add(t[e])}var pt=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]*$`),mt={},ht={};function gt(e){return le.call(ht,e)?!0:le.call(mt,e)?!1:pt.test(e)?ht[e]=!0:(mt[e]=!0,!1)}function _t(e,t,n){if(gt(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 vt(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 bt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function xt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function St(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 Ct(e){if(!e._valueTracker){var t=xt(e)?`checked`:`value`;e._valueTracker=St(e,t,``+e[t])}}function wt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=xt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Tt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Et=/[\n"\\]/g;function Dt(e){return e.replace(Et,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ot(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=``+bt(t)):e.value!==``+bt(t)&&(e.value=``+bt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):At(e,o,bt(n)):At(e,o,bt(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=``+bt(s):e.removeAttribute(`name`)}function kt(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)){Ct(e);return}n=n==null?``:``+bt(n),t=t==null?n:``+bt(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),Ct(e)}function At(e,t,n){t===`number`&&Tt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function J(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=``+bt(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 jt(e,t,n){if(t!=null&&(t=``+bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+bt(n)}function Mt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=bt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ct(e)}function Nt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pt=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 Ft(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||Pt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function It(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Ft(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Ft(e,o,t[o])}function Lt(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 Rt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),zt=/^[\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 Bt(e){return zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Vt(){}var Ht=null;function Ut(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wt=null,Gt=null;function Kt(e){var t=at(e);if(t&&(e=t.stateNode)){var n=e[Xe]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ot(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="`+Dt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Xe]||null;if(!i)throw Error(a(90));Ot(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&wt(r)}break a;case`textarea`:jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&J(e,!!n.multiple,t,!1)}}}var qt=!1;function Jt(e,t,n){if(qt)return e(t,n);qt=!0;try{return e(t)}finally{if(qt=!1,(Wt!==null||Gt!==null)&&(yu(),Wt&&(t=Wt,e=Gt,Gt=Wt=null,Kt(t),e)))for(t=0;t<e.length;t++)Kt(e[t])}}function Yt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Xe]||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(a(231,t,typeof n));return n}var Xt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Zt=!1;if(Xt)try{var Qt={};Object.defineProperty(Qt,`passive`,{get:function(){Zt=!0}}),window.addEventListener(`test`,Qt,Qt),window.removeEventListener(`test`,Qt,Qt)}catch{Zt=!1}var $t=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t=en,n=t.length,r,i=`value`in $t?$t.value:$t.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 tn=i.slice(e,1<r?1-r:void 0)}function rn(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 an(){return!0}function on(){return!1}function sn(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)?an:on,this.isPropagationStopped=on,this}return p(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=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=sn(ln),Y=p({},ln,{view:0,detail:0}),dn=sn(Y),X,fn,pn,mn=p({},Y,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,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!==pn&&(pn&&e.type===`mousemove`?(X=e.screenX-pn.screenX,fn=e.screenY-pn.screenY):fn=X=0,pn=e),X)},movementY:function(e){return`movementY`in e?e.movementY:fn}}),hn=sn(mn),gn=sn(p({},mn,{dataTransfer:0})),_n=sn(p({},Y,{relatedTarget:0})),vn=sn(p({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=sn(p({},ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),bn=sn(p({},ln,{data:0})),xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Sn={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`},Cn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Cn[e])?!!t[e]:!1}function Tn(){return wn}var En=sn(p({},Y,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=rn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Sn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return e.type===`keypress`?rn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?rn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Dn=sn(p({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),On=sn(p({},Y,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),kn=sn(p({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=sn(p({},mn,{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})),jn=sn(p({},ln,{newState:0,oldState:0})),Mn=[9,13,27,32],Nn=Xt&&`CompositionEvent`in window,Pn=null;Xt&&`documentMode`in document&&(Pn=document.documentMode);var Fn=Xt&&`TextEvent`in window&&!Pn,In=Xt&&(!Nn||Pn&&8<Pn&&11>=Pn),Ln=` `,Rn=!1;function zn(e,t){switch(e){case`keyup`:return Mn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Bn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Vn=!1;function Hn(e,t){switch(e){case`compositionend`:return Bn(t);case`keypress`:return t.which===32?(Rn=!0,Ln):null;case`textInput`:return e=t.data,e===Ln&&Rn?null:e;default:return null}}function Un(e,t){if(Vn)return e===`compositionend`||!Nn&&zn(e,t)?(e=nn(),tn=en=$t=null,Vn=!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 In&&t.locale!==`ko`?null:t.data;default:return null}}var Wn={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 Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Wn[e.type]:t===`textarea`}function Kn(e,t,n,r){Wt?Gt?Gt.push(r):Gt=[r]:Wt=r,t=Dd(t,`onChange`),0<t.length&&(n=new un(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var qn=null,Jn=null;function Yn(e){yd(e,0)}function Xn(e){if(wt(ot(e)))return e}function Zn(e,t){if(e===`change`)return t}var Qn=!1;if(Xt){var $n;if(Xt){var er=`oninput`in document;if(!er){var tr=document.createElement(`div`);tr.setAttribute(`oninput`,`return;`),er=typeof tr.oninput==`function`}$n=er}else $n=!1;Qn=$n&&(!document.documentMode||9<document.documentMode)}function nr(){qn&&(qn.detachEvent(`onpropertychange`,rr),Jn=qn=null)}function rr(e){if(e.propertyName===`value`&&Xn(Jn)){var t=[];Kn(t,Jn,e,Ut(e)),Jt(Yn,t)}}function ir(e,t,n){e===`focusin`?(nr(),qn=t,Jn=n,qn.attachEvent(`onpropertychange`,rr)):e===`focusout`&&nr()}function ar(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Xn(Jn)}function or(e,t){if(e===`click`)return Xn(t)}function sr(e,t){if(e===`input`||e===`change`)return Xn(t)}function cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var lr=typeof Object.is==`function`?Object.is:cr;function ur(e,t){if(lr(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(!le.call(t,i)||!lr(e[i],t[i]))return!1}return!0}function dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fr(e,t){var n=dr(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=dr(n)}}function pr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Tt(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=Tt(e.document)}return t}function hr(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 gr=Xt&&`documentMode`in document&&11>=document.documentMode,_r=null,vr=null,yr=null,br=!1;function xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;br||_r==null||_r!==Tt(r)||(r=_r,`selectionStart`in r&&hr(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}),yr&&ur(yr,r)||(yr=r,r=Dd(vr,`onSelect`),0<r.length&&(t=new un(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=_r)))}function Sr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Cr={animationend:Sr(`Animation`,`AnimationEnd`),animationiteration:Sr(`Animation`,`AnimationIteration`),animationstart:Sr(`Animation`,`AnimationStart`),transitionrun:Sr(`Transition`,`TransitionRun`),transitionstart:Sr(`Transition`,`TransitionStart`),transitioncancel:Sr(`Transition`,`TransitionCancel`),transitionend:Sr(`Transition`,`TransitionEnd`)},wr={},Tr={};Xt&&(Tr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Cr.animationend.animation,delete Cr.animationiteration.animation,delete Cr.animationstart.animation),`TransitionEvent`in window||delete Cr.transitionend.transition);function Er(e){if(wr[e])return wr[e];if(!Cr[e])return e;var t=Cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Tr)return wr[e]=t[n];return e}var Dr=Er(`animationend`),Or=Er(`animationiteration`),kr=Er(`animationstart`),Ar=Er(`transitionrun`),jr=Er(`transitionstart`),Mr=Er(`transitioncancel`),Nr=Er(`transitionend`),Pr=new Map,Fr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Fr.push(`scrollEnd`);function Ir(e,t){Pr.set(e,t),dt(t,[e])}var Lr=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)},Rr=[],zr=0,Br=0;function Vr(){for(var e=zr,t=Br=zr=0;t<e;){var n=Rr[t];Rr[t++]=null;var r=Rr[t];Rr[t++]=null;var i=Rr[t];Rr[t++]=null;var a=Rr[t];if(Rr[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&&Gr(n,i,a)}}function Hr(e,t,n,r){Rr[zr++]=e,Rr[zr++]=t,Rr[zr++]=n,Rr[zr++]=r,Br|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ur(e,t,n,r){return Hr(e,t,n,r),Kr(e)}function Wr(e,t){return Hr(e,null,null,t),Kr(e)}function Gr(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-Ee(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Kr(e){if(50<uu)throw uu=0,du=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var qr={};function Jr(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 Yr(e,t,n,r){return new Jr(e,t,n,r)}function Xr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zr(e,t){var n=e.alternate;return n===null?(n=Yr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Qr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $r(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)Xr(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,H.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=Yr(31,n,t,i),e.elementType=D,e.lanes=o,e;case _:return ei(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=Yr(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=Yr(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=Yr(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=Yr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ei(e,t,n,r){return e=Yr(7,e,r,t),e.lanes=n,e}function ti(e,t,n){return e=Yr(6,e,null,t),e.lanes=n,e}function ni(e){var t=Yr(18,null,null,0);return t.stateNode=e,t}function ri(e,t,n){return t=Yr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ii=new WeakMap;function ai(e,t){if(typeof e==`object`&&e){var n=ii.get(e);return n===void 0?(t={value:e,source:t,stack:ce(t)},ii.set(e,t),t):n}return{value:e,source:t,stack:ce(t)}}var oi=[],si=0,ci=null,li=0,ui=[],di=0,fi=null,pi=1,mi=``;function hi(e,t){oi[si++]=li,oi[si++]=ci,ci=e,li=t}function gi(e,t,n){ui[di++]=pi,ui[di++]=mi,ui[di++]=fi,fi=e;var r=pi;e=mi;var i=32-Ee(r)-1;r&=~(1<<i),n+=1;var a=32-Ee(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,pi=1<<32-Ee(t)+i|n<<i|r,mi=a+e}else pi=1<<a|n<<i|r,mi=e}function _i(e){e.return!==null&&(hi(e,1),gi(e,1,0))}function vi(e){for(;e===ci;)ci=oi[--si],oi[si]=null,li=oi[--si],oi[si]=null;for(;e===fi;)fi=ui[--di],ui[di]=null,mi=ui[--di],ui[di]=null,pi=ui[--di],ui[di]=null}function yi(e,t){ui[di++]=pi,ui[di++]=mi,ui[di++]=fi,pi=t.id,mi=t.overflow,fi=e}var bi=null,xi=null,Si=!1,Ci=null,wi=!1,Ti=Error(a(519));function Ei(e){throw Mi(ai(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ti}function Di(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ye]=e,t[Xe]=r,n){case`dialog`:bd(`cancel`,t),bd(`close`,t);break;case`iframe`:case`object`:case`embed`:bd(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)bd(_d[n],t);break;case`source`:bd(`error`,t);break;case`img`:case`image`:case`link`:bd(`error`,t),bd(`load`,t);break;case`details`:bd(`toggle`,t);break;case`input`:bd(`invalid`,t),kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:bd(`invalid`,t);break;case`textarea`:bd(`invalid`,t),Mt(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||Nd(t.textContent,n)?(r.popover!=null&&(bd(`beforetoggle`,t),bd(`toggle`,t)),r.onScroll!=null&&bd(`scroll`,t),r.onScrollEnd!=null&&bd(`scrollend`,t),r.onClick!=null&&(t.onclick=Vt),t=!0):t=!1,t||Ei(e,!0)}function Oi(e){for(bi=e.return;bi;)switch(bi.tag){case 5:case 31:case 13:wi=!1;return;case 27:case 3:wi=!0;return;default:bi=bi.return}}function ki(e){if(e!==bi)return!1;if(!Si)return Oi(e),Si=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Gd(e.type,e.memoizedProps)),n=!n),n&&xi&&Ei(e),Oi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));xi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));xi=uf(e)}else t===27?(t=xi,$(e.type)?(e=lf,lf=null,xi=e):xi=t):xi=bi?cf(e.stateNode.nextSibling):null;return!0}function Ai(){xi=bi=null,Si=!1}function ji(){var e=Ci;return e!==null&&(Xl===null?Xl=e:Xl.push.apply(Xl,e),Ci=null),e}function Mi(e){Ci===null?Ci=[e]:Ci.push(e)}var Ni=z(null),Pi=null,Fi=null;function Ii(e,t,n){V(Ni,t._currentValue),t._currentValue=n}function Li(e){e._currentValue=Ni.current,B(Ni)}function Ri(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 zi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ri(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ri(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Bi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;lr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===G.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&zi(t,e,n,r),t.flags|=262144}function Vi(e){for(e=e.firstContext;e!==null;){if(!lr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Hi(e){Pi=e,Fi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ui(e){return Gi(Pi,e)}function Wi(e,t){return Pi===null&&Hi(e),Gi(e,t)}function Gi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Fi===null){if(e===null)throw Error(a(308));Fi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Fi=Fi.next=t;return n}var Ki=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},qi=t.unstable_scheduleCallback,Ji=t.unstable_NormalPriority,Yi={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xi(){return{controller:new Ki,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&qi(Ji,function(){e.controller.abort()})}var Qi=null,$i=0,ea=0,ta=null;function na(e,t){if(Qi===null){var n=Qi=[];$i=0,ea=dd(),ta={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return $i++,t.then(ra,ra),t}function ra(){if(--$i===0&&Qi!==null){ta!==null&&(ta.status=`fulfilled`);var e=Qi;Qi=null,ea=0,ta=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ia(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var aa=P.S;P.S=function(e,t){$l=me(),typeof t==`object`&&t&&typeof t.then==`function`&&na(e,t),aa!==null&&aa(e,t)};var oa=z(null);function sa(){var e=oa.current;return e===null?Pl.pooledCache:e}function ca(e,t){t===null?V(oa,oa.current):V(oa,t.pool)}function la(){var e=sa();return e===null?null:{parent:Yi._currentValue,pool:e}}var ua=Error(a(460)),da=Error(a(474)),fa=Error(a(542)),pa={then:function(){}};function ma(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ha(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Vt,Vt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e;default:if(typeof t.status==`string`)t.then(Vt,Vt);else{if(e=Pl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e}throw _a=t,ua}}function ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(_a=e,ua):e}}var _a=null;function va(){if(_a===null)throw Error(a(459));var e=_a;return _a=null,e}function ya(e){if(e===ua||e===fa)throw Error(a(483))}var ba=null,xa=0;function Sa(e){var t=xa;return xa+=1,ba===null&&(ba=[]),ha(ba,e,t)}function Ca(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function wa(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ta(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Zr(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ti(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&ga(a)===t.type)?(t=i(t,n.props),Ca(t,n),t.return=e,t):(t=$r(n.type,n.key,n.props,null,e.mode,r),Ca(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ri(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ei(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ti(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=$r(t.type,t.key,t.props,null,e.mode,n),Ca(n,t),n.return=e,n;case g:return t=ri(t,e.mode,n),t.return=e,t;case E:return t=ga(t),f(e,t,n)}if(N(t)||A(t))return t=ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Sa(t),n);if(t.$$typeof===x)return f(e,Wi(e,t),n);wa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=ga(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Sa(n),r);if(n.$$typeof===x)return p(e,t,Wi(e,n),r);wa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=ga(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Sa(r),i);if(r.$$typeof===x)return m(e,t,n,Wi(t,r),i);wa(t,r)}return null}function v(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),Si&&hi(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 Si&&hi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Si&&hi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(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(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Si&&hi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Si&&hi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Si&&hi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ga(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ca(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=$r(o.type,o.key,o.props,null,e.mode,c),Ca(c,o),c.return=e,e=c)}return s(e);case g: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=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ri(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ga(o),b(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Sa(o),c);if(o.$$typeof===x)return b(e,r,Wi(e,o),c);wa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=ti(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{xa=0;var i=b(e,t,n,r);return ba=null,i}catch(t){if(t===ua||t===fa)throw t;var a=Yr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ea=Ta(!0),Da=Ta(!1),Oa=!1;function ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Aa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Kr(e),Gr(e,null,n),t}return Hr(e,r,t,n),Kr(e)}function Na(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,He(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Fa=!1;function Ia(){if(Fa){var e=ta;if(e!==null)throw e}}function La(e,t,n,r){Fa=!1;var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Il&f)===f:(r&f)===f){f!==0&&f===ea&&(Fa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Oa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),Wl|=o,e.lanes=o,e.memoizedState=d}}function Ra(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ra(n[e],t)}var Ba=z(null),Va=z(0);function Ha(e,t){e=Hl,V(Va,e),V(Ba,t),Hl=e|t.baseLanes}function Ua(){V(Va,Hl),V(Ba,Ba.current)}function Wa(){Hl=Va.current,B(Ba),B(Va)}var Ga=z(null),Ka=null;function qa(e){var t=e.alternate;V(Qa,Qa.current&1),V(Ga,e),Ka===null&&(t===null||Ba.current!==null||t.memoizedState!==null)&&(Ka=e)}function Ja(e){V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)}function Ya(e){e.tag===22?(V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)):Xa(e)}function Xa(){V(Qa,Qa.current),V(Ga,Ga.current)}function Za(e){B(Ga),Ka===e&&(Ka=null),B(Qa)}var Qa=z(0);function $a(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eo=0,to=null,no=null,ro=null,io=!1,ao=!1,oo=!1,so=0,co=0,lo=null,uo=0;function fo(){throw Error(a(321))}function po(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!lr(e[n],t[n]))return!1;return!0}function mo(e,t,n,r,i,a){return eo=a,to=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?js:Ms,oo=!1,a=n(r,i),oo=!1,ao&&(a=go(t,n,r,i)),ho(e),a}function ho(e){P.H=As;var t=no!==null&&no.next!==null;if(eo=0,ro=no=to=null,io=!1,co=0,lo=null,t)throw Error(a(300));e===null||Ys||(e=e.dependencies,e!==null&&Vi(e)&&(Ys=!0))}function go(e,t,n,r){to=e;var i=0;do{if(ao&&(lo=null),co=0,ao=!1,25<=i)throw Error(a(301));if(i+=1,ro=no=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ns,o=t(n,r)}while(ao);return o}function _o(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?wo(t):t,e=e.useState()[0],(no===null?null:no.memoizedState)!==e&&(to.flags|=1024),t}function vo(){var e=so!==0;return so=0,e}function yo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function bo(e){if(io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}io=!1}eo=0,ro=no=to=null,ao=!1,co=so=0,lo=null}function xo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ro===null?to.memoizedState=ro=e:ro=ro.next=e,ro}function So(){if(no===null){var e=to.alternate;e=e===null?null:e.memoizedState}else e=no.next;var t=ro===null?to.memoizedState:ro.next;if(t!==null)ro=t,no=e;else{if(e===null)throw to.alternate===null?Error(a(467)):Error(a(310));no=e,e={memoizedState:no.memoizedState,baseState:no.baseState,baseQueue:no.baseQueue,queue:no.queue,next:null},ro===null?to.memoizedState=ro=e:ro=ro.next=e}return ro}function Co(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wo(e){var t=co;return co+=1,lo===null&&(lo=[]),e=ha(lo,e,t),t=to,(ro===null?t.memoizedState:ro.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?js:Ms),e}function To(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return wo(e);if(e.$$typeof===x)return Ui(e)}throw Error(a(438,String(e)))}function Eo(e){var t=null,n=to.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=to.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=Co(),to.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]=O;return t.index++,n}function Do(e,t){return typeof t==`function`?t(e):t}function Oo(e){return ko(So(),no,e)}function ko(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(eo&f)===f:(Il&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ea&&(d=!0);else if((eo&p)===p){u=u.next,p===ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,to.lanes|=p,Wl|=p;f=u.action,oo&&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,to.lanes|=f,Wl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!lr(o,e.memoizedState)&&(Ys=!0,d&&(n=ta,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ao(e){var t=So(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);lr(o,t.memoizedState)||(Ys=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function jo(e,t,n){var r=to,i=So(),o=Si;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!lr((no||i).memoizedState,n);if(s&&(i.memoizedState=n,Ys=!0),i=i.queue,ns(Po.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||ro!==null&&ro.memoizedState.tag&1){if(r.flags|=2048,Zo(9,{destroy:void 0},No.bind(null,r,i,n,t),null),Pl===null)throw Error(a(349));o||eo&127||Mo(r,t,n)}return n}function Mo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=to.updateQueue,t===null?(t=Co(),to.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function No(e,t,n,r){t.value=n,t.getSnapshot=r,Fo(t)&&Io(e)}function Po(e,t,n){return n(function(){Fo(t)&&Io(e)})}function Fo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!lr(e,n)}catch{return!0}}function Io(e){var t=Wr(e,2);t!==null&&mu(t,e,2)}function Lo(e){var t=xo();if(typeof e==`function`){var n=e;if(e=n(),oo){Te(!0);try{n()}finally{Te(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:e},t}function Ro(e,t,n,r){return e.baseState=n,ko(e,no,typeof r==`function`?r:Do)}function zo(e,t,n,r,i){if(Ds(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Bo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Bo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Vo(e,t,s)}catch(n){Uo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Vo(e,t,a)}catch(n){Uo(e,t,n)}}function Vo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ho(e,t,n)},function(n){return Uo(e,t,n)}):Ho(e,t,n)}function Ho(e,t,n){t.status=`fulfilled`,t.value=n,Wo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Bo(e,n)))}function Uo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Wo(t),t=t.next;while(t!==r)}e.action=null}function Wo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Go(e,t){return t}function Ko(e,t){if(Si){var n=Pl.formState;if(n!==null){a:{var r=to;if(Si){if(xi){b:{for(var i=xi,a=wi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){xi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ei(r)}r=!1}r&&(t=n[0])}}return n=xo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:t},n.queue=r,n=ws.bind(null,to,r),r.dispatch=n,r=Lo(!1),a=Es.bind(null,to,!1,r.queue),r=xo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=zo.bind(null,to,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function qo(e){return Jo(So(),no,e)}function Jo(e,t,n){if(t=ko(e,t,Go)[0],e=Oo(Do)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=wo(t)}catch(e){throw e===ua?fa:e}else r=t;t=So();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(to.flags|=2048,Zo(9,{destroy:void 0},Yo.bind(null,i,n),null)),[r,a,e]}function Yo(e,t){e.action=t}function Xo(e){var t=So(),n=no;if(n!==null)return Jo(t,n,e);So(),t=t.memoizedState,n=So();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Zo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=to.updateQueue,t===null&&(t=Co(),to.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 Qo(){return So().memoizedState}function $o(e,t,n,r){var i=xo();to.flags|=e,i.memoizedState=Zo(1|t,{destroy:void 0},n,r===void 0?null:r)}function es(e,t,n,r){var i=So();r=r===void 0?null:r;var a=i.memoizedState.inst;no!==null&&r!==null&&po(r,no.memoizedState.deps)?i.memoizedState=Zo(t,a,n,r):(to.flags|=e,i.memoizedState=Zo(1|t,a,n,r))}function ts(e,t){$o(8390656,8,e,t)}function ns(e,t){es(2048,8,e,t)}function rs(e){to.flags|=4;var t=to.updateQueue;if(t===null)t=Co(),to.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function is(e){var t=So().memoizedState;return rs({ref:t,nextImpl:e}),function(){if(Nl&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function as(e,t){return es(4,2,e,t)}function os(e,t){return es(4,4,e,t)}function ss(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 cs(e,t,n){n=n==null?null:n.concat([e]),es(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&po(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&po(t,r[1]))return r[0];if(r=e(),oo){Te(!0);try{e()}finally{Te(!1)}}return n.memoizedState=[r,t],r}function fs(e,t,n){return n===void 0||eo&1073741824&&!(Il&261930)?e.memoizedState=t:(e.memoizedState=n,e=pu(),to.lanes|=e,Wl|=e,n)}function ps(e,t,n,r){return lr(n,t)?n:Ba.current===null?!(eo&42)||eo&1073741824&&!(Il&261930)?(Ys=!0,e.memoizedState=n):(e=pu(),to.lanes|=e,Wl|=e,t):(e=fs(e,n,r),lr(e,t)||(Ys=!0),e)}function ms(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Es(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ts(e,t,ia(c,r),fu(e)):Ts(e,t,r,fu(e))}catch(n){Ts(e,t,{then:function(){},status:`rejected`,reason:n},fu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function hs(){}function gs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=_s(e).queue;ms(e,i,t,I,n===null?hs:function(){return vs(e),n(r)})}function _s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vs(e){var t=_s(e);t.next===null&&(t=e.alternate.memoizedState),Ts(e,t.next.queue,{},fu())}function ys(){return Ui(Qf)}function bs(){return So().memoizedState}function xs(){return So().memoizedState}function Ss(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fu();e=ja(n);var r=Ma(t,e,n);r!==null&&(mu(r,t,n),Na(r,t,n)),t={cache:Xi()},e.payload=t;return}t=t.return}}function Cs(e,t,n){var r=fu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ds(e)?Os(t,n):(n=Ur(e,t,n,r),n!==null&&(mu(n,e,r),ks(n,t,r)))}function ws(e,t,n){Ts(e,t,n,fu())}function Ts(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))Os(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,lr(s,o))return Hr(e,t,i,0),Pl===null&&Vr(),!1}catch{}if(n=Ur(e,t,i,r),n!==null)return mu(n,e,r),ks(n,t,r),!0}return!1}function Es(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ds(e)){if(t)throw Error(a(479))}else t=Ur(e,n,r,2),t!==null&&mu(t,e,2)}function Ds(e){var t=e.alternate;return e===to||t!==null&&t===to}function Os(e,t){ao=io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ks(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,He(e,n)}}var As={readContext:Ui,use:To,useCallback:fo,useContext:fo,useEffect:fo,useImperativeHandle:fo,useLayoutEffect:fo,useInsertionEffect:fo,useMemo:fo,useReducer:fo,useRef:fo,useState:fo,useDebugValue:fo,useDeferredValue:fo,useTransition:fo,useSyncExternalStore:fo,useId:fo,useHostTransitionStatus:fo,useFormState:fo,useActionState:fo,useOptimistic:fo,useMemoCache:fo,useCacheRefresh:fo};As.useEffectEvent=fo;var js={readContext:Ui,use:To,useCallback:function(e,t){return xo().memoizedState=[e,t===void 0?null:t],e},useContext:Ui,useEffect:ts,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),$o(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $o(4194308,4,e,t)},useInsertionEffect:function(e,t){$o(4,2,e,t)},useMemo:function(e,t){var n=xo();t=t===void 0?null:t;var r=e();if(oo){Te(!0);try{e()}finally{Te(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=xo();if(n!==void 0){var i=n(t);if(oo){Te(!0);try{n(t)}finally{Te(!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=Cs.bind(null,to,e),[r.memoizedState,e]},useRef:function(e){var t=xo();return e={current:e},t.memoizedState=e},useState:function(e){e=Lo(e);var t=e.queue,n=ws.bind(null,to,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ls,useDeferredValue:function(e,t){return fs(xo(),e,t)},useTransition:function(){var e=Lo(!1);return e=ms.bind(null,to,e.queue,!0,!1),xo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=to,i=xo();if(Si){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Pl===null)throw Error(a(349));Il&127||Mo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ts(Po.bind(null,r,o,e),[e]),r.flags|=2048,Zo(9,{destroy:void 0},No.bind(null,r,o,n,t),null),n},useId:function(){var e=xo(),t=Pl.identifierPrefix;if(Si){var n=mi,r=pi;n=(r&~(1<<32-Ee(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=so++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=uo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ys,useFormState:Ko,useActionState:Ko,useOptimistic:function(e){var t=xo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Es.bind(null,to,!0,n),n.dispatch=t,[e,t]},useMemoCache:Eo,useCacheRefresh:function(){return xo().memoizedState=Ss.bind(null,to)},useEffectEvent:function(e){var t=xo(),n={impl:e};return t.memoizedState=n,function(){if(Nl&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Ms={readContext:Ui,use:To,useCallback:us,useContext:Ui,useEffect:ns,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Oo,useRef:Qo,useState:function(){return Oo(Do)},useDebugValue:ls,useDeferredValue:function(e,t){return ps(So(),no.memoizedState,e,t)},useTransition:function(){var e=Oo(Do)[0],t=So().memoizedState;return[typeof e==`boolean`?e:wo(e),t]},useSyncExternalStore:jo,useId:bs,useHostTransitionStatus:ys,useFormState:qo,useActionState:qo,useOptimistic:function(e,t){return Ro(So(),no,e,t)},useMemoCache:Eo,useCacheRefresh:xs};Ms.useEffectEvent=is;var Ns={readContext:Ui,use:To,useCallback:us,useContext:Ui,useEffect:ns,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Ao,useRef:Qo,useState:function(){return Ao(Do)},useDebugValue:ls,useDeferredValue:function(e,t){var n=So();return no===null?fs(n,e,t):ps(n,no.memoizedState,e,t)},useTransition:function(){var e=Ao(Do)[0],t=So().memoizedState;return[typeof e==`boolean`?e:wo(e),t]},useSyncExternalStore:jo,useId:bs,useHostTransitionStatus:ys,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){var n=So();return no===null?(n.baseState=e,[e,n.queue.dispatch]):Ro(n,no,e,t)},useMemoCache:Eo,useCacheRefresh:xs};Ns.useEffectEvent=is;function Ps(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fu(),i=ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(mu(t,e,r),Na(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fu(),i=ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(mu(t,e,r),Na(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fu(),r=ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ma(e,r,n),t!==null&&(mu(t,e,n),Na(t,e,n))}};function Is(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?!ur(n,r)||!ur(i,a):!0}function Ls(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&&Fs.enqueueReplaceState(t,t.state,null)}function Rs(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=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function zs(e){Lr(e)}function Bs(e){console.error(e)}function Vs(e){Lr(e)}function Hs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Us(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 Ws(e,t,n){return n=ja(n),n.tag=3,n.payload={element:null},n.callback=function(){Hs(e,t)},n}function Gs(e){return e=ja(e),e.tag=3,e}function Ks(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(){Us(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Us(t,n,r),typeof i!=`function`&&(nu===null?nu=new Set([this]):nu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function qs(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Bi(t,n,i,!0),n=Ga.current,n!==null){switch(n.tag){case 31:case 13:return Ka===null?Eu():n.alternate===null&&Ul===0&&(Ul=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,i)),!1}throw Error(a(435,n.tag))}return Gu(e,r,i),Eu(),!1}if(Si)return t=Ga.current,t===null?(r!==Ti&&(t=Error(a(423),{cause:r}),Mi(ai(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=ai(r,n),i=Ws(e.stateNode,r,i),Pa(e,i),Ul!==4&&(Ul=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ti&&(e=Error(a(422),{cause:r}),Mi(ai(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=ai(o,n),Yl===null?Yl=[o]:Yl.push(o),Ul!==4&&(Ul=2),t===null)return!0;r=ai(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Ws(n.stateNode,r,e),Pa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(nu===null||!nu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Gs(i),Ks(i,e,n,r),Pa(n,i),!1}n=n.return}while(n!==null);return!1}var Js=Error(a(461)),Ys=!1;function Xs(e,t,n,r){t.child=e===null?Da(t,null,n,r):Ea(t,e.child,n,r)}function Zs(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 Hi(t),r=mo(e,t,n,o,a,i),s=vo(),e!==null&&!Ys?(yo(e,t,i),xc(e,t,i)):(Si&&s&&_i(t),t.flags|=1,Xs(e,t,r,i),t.child)}function Qs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Xr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,$s(e,t,a,r,i)):(e=$r(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Sc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?ur:n,n(o,r)&&e.ref===t.ref)return xc(e,t,i)}return t.flags|=1,e=Zr(a,r),e.ref=t.ref,e.return=t,t.child=e}function $s(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(ur(a,r)&&e.ref===t.ref)if(Ys=!1,t.pendingProps=r=a,Sc(e,i))e.flags&131072&&(Ys=!0);else return t.lanes=e.lanes,xc(e,t,i)}return sc(e,t,n,r,i)}function ec(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 nc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ca(t,a===null?null:a.cachePool),a===null?Ua():Ha(t,a),Ya(t);else return r=t.lanes=536870912,nc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ca(t,null),Ua(),Xa(t)):(ca(t,a.cachePool),Ha(t,a),Xa(t),t.memoizedState=null);return Xs(e,t,i,n),t.child}function tc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nc(e,t,n,r,i){var a=sa();return a=a===null?null:{parent:Yi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ca(t,null),Ua(),Ya(t),e!==null&&Bi(e,t,r,!0),t.childLanes=i,null}function rc(e,t){return t=gc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ic(e,t,n){return Ea(t,e.child,null,n),e=rc(t,t.pendingProps),e.flags|=2,Za(t),t.memoizedState=null,e}function ac(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Si){if(r.mode===`hidden`)return e=rc(t,r),t.lanes=536870912,tc(null,e);if(Ja(t),(e=xi)?(e=rf(e,wi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fi===null?null:{id:pi,overflow:mi},retryLane:536870912,hydrationErrors:null},n=ni(e),n.return=t,t.child=n,bi=t,xi=null)):e=null,e===null)throw Ei(t);return t.lanes=536870912,null}return rc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ja(t),i)if(t.flags&256)t.flags&=-257,t=ic(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(Ys||Bi(e,t,n,!1),i=(n&e.childLanes)!==0,Ys||i){if(r=Pl,r!==null&&(s=Ue(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Wr(e,s),mu(r,e,s),Js;Eu(),t=ic(e,t,n)}else e=o.treeContext,xi=cf(s.nextSibling),bi=t,Si=!0,Ci=null,wi=!1,e!==null&&yi(t,e),t=rc(t,r),t.flags|=4096;return t}return e=Zr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function oc(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(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function sc(e,t,n,r,i){return Hi(t),n=mo(e,t,n,r,void 0,i),r=vo(),e!==null&&!Ys?(yo(e,t,i),xc(e,t,i)):(Si&&r&&_i(t),t.flags|=1,Xs(e,t,n,i),t.child)}function cc(e,t,n,r,i,a){return Hi(t),t.updateQueue=null,n=go(t,r,n,i),ho(e),r=vo(),e!==null&&!Ys?(yo(e,t,a),xc(e,t,a)):(Si&&r&&_i(t),t.flags|=1,Xs(e,t,n,a),t.child)}function lc(e,t,n,r,i){if(Hi(t),t.stateNode===null){var a=qr,o=n.contextType;typeof o==`object`&&o&&(a=Ui(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Fs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ka(t),o=n.contextType,a.context=typeof o==`object`&&o?Ui(o):qr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ps(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&&Fs.enqueueReplaceState(a,a.state,null),La(t,r,a,i),Ia(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Rs(n,s);a.props=c;var l=a.context,u=n.contextType;o=qr,typeof u==`object`&&u&&(o=Ui(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ls(t,a,r,o),Oa=!1;var f=t.memoizedState;a.state=f,La(t,r,a,i),Ia(),l=t.memoizedState,s||f!==l||Oa?(typeof d==`function`&&(Ps(t,n,d,r),l=t.memoizedState),(c=Oa||Is(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Aa(e,t),o=t.memoizedProps,u=Rs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=qr,typeof l==`object`&&l&&(c=Ui(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ls(t,a,r,c),Oa=!1,f=t.memoizedState,a.state=f,La(t,r,a,i),Ia();var p=t.memoizedState;o!==d||f!==p||Oa||e!==null&&e.dependencies!==null&&Vi(e.dependencies)?(typeof s==`function`&&(Ps(t,n,s,r),p=t.memoizedState),(u=Oa||Is(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Vi(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,oc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,n,i)):Xs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=xc(e,t,i),e}function uc(e,t,n,r){return Ai(),t.flags|=256,Xs(e,t,n,r),t.child}var dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fc(e){return{baseLanes:e,cachePool:la()}}function pc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ql),e}function mc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Qa.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Si){if(i?qa(t):Xa(t),(e=xi)?(e=rf(e,wi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fi===null?null:{id:pi,overflow:mi},retryLane:536870912,hydrationErrors:null},n=ni(e),n.return=t,t.child=n,bi=t,xi=null)):e=null,e===null)throw Ei(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(Xa(t),i=t.mode,c=gc({mode:`hidden`,children:c},i),r=ei(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=fc(n),r.childLanes=pc(e,s,n),t.memoizedState=dc,tc(null,r)):(qa(t),hc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(qa(t),t.flags&=-257,t=_c(e,t,n)):t.memoizedState===null?(Xa(t),c=r.fallback,i=t.mode,r=gc({mode:`visible`,children:r.children},i),c=ei(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ea(t,e.child,null,n),r=t.child,r.memoizedState=fc(n),r.childLanes=pc(e,s,n),t.memoizedState=dc,t=tc(null,r)):(Xa(t),t.child=e.child,t.flags|=128,t=null);else if(qa(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Mi({value:r,source:null,stack:null}),t=_c(e,t,n)}else if(Ys||Bi(e,t,n,!1),s=(n&e.childLanes)!==0,Ys||s){if(s=Pl,s!==null&&(r=Ue(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Wr(e,r),mu(s,e,r),Js;af(c)||Eu(),t=_c(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,xi=cf(c.nextSibling),bi=t,Si=!0,Ci=null,wi=!1,e!==null&&yi(t,e),t=hc(t,r.children),t.flags|=4096);return t}return i?(Xa(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=Zr(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ei(c,i,n,null),c.flags|=2):c=Zr(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,tc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=fc(n):(i=c.cachePool,i===null?i=la():(l=Yi._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=pc(e,s,n),t.memoizedState=dc,tc(e.child,r)):(qa(t),n=e.child,e=n.sibling,n=Zr(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function hc(e,t){return t=gc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function gc(e,t){return e=Yr(22,e,null,t),e.lanes=0,e}function _c(e,t,n){return Ea(t,e.child,null,n),e=hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ri(e.return,t,n)}function yc(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 bc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Qa.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,V(Qa,o),Xs(e,t,r,n),r=Si?li:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vc(e,n,t);else if(e.tag===19)vc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&$a(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),yc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&$a(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}yc(t,!0,n,null,a,r);break;case`together`:yc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function xc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Wl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Bi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=Zr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Vi(e))):!0}function Cc(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ii(t,Yi,e.memoizedState.cache),Ai();break;case 27:case 5:te(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ii(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ja(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(qa(t),e=xc(e,t,n),e===null?null:e.sibling):mc(e,t,n):(qa(t),t.flags|=128,null);qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Bi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return bc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(Qa,Qa.current),r)break;return null;case 22:return t.lanes=0,ec(e,t,n,t.pendingProps);case 24:Ii(t,Yi,e.memoizedState.cache)}return xc(e,t,n)}function wc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ys=!0;else{if(!Sc(e,n)&&!(t.flags&128))return Ys=!1,Cc(e,t,n);Ys=!!(e.flags&131072)}else Ys=!1,Si&&t.flags&1048576&&gi(t,li,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ga(t.elementType),t.type=e,typeof e==`function`)Xr(e)?(r=Rs(e,r),t.tag=1,t=lc(null,t,e,r,n)):(t.tag=0,t=sc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=Zs(null,t,e,r,n);break a}else if(i===T){t.tag=14,t=Qs(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return sc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Rs(r,t.pendingProps),lc(e,t,r,i,n);case 3:a:{if(K(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Aa(e,t),La(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ii(t,Yi,r),r!==o.cache&&zi(t,[Yi],n,!0),Ia(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=uc(e,t,r,n);break a}else if(r!==i){i=ai(Error(a(424)),t),Mi(i),t=uc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(xi=cf(e.firstChild),bi=t,Si=!0,Ci=null,wi=!0,n=Da(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ai(),r===i){t=xc(e,t,n);break a}Xs(e,t,r,n)}t=t.child}return t;case 26:return oc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Si||(n=t.type,e=t.pendingProps,r=Hd(W.current).createElement(n),r[Ye]=t,r[Xe]=e,Id(r,n,e),ct(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return te(t),e===null&&Si&&(r=t.stateNode=ff(t.type,t.pendingProps,W.current),bi=t,wi=!0,i=xi,$(t.type)?(lf=i,xi=cf(r.firstChild)):xi=i),Xs(e,t,t.pendingProps.children,n),oc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Si&&((i=r=xi)&&(r=tf(r,t.type,t.pendingProps,wi),r===null?i=!1:(t.stateNode=r,bi=t,xi=cf(r.firstChild),wi=!1,i=!0)),i||Ei(t)),te(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Gd(i,o)?r=null:s!==null&&Gd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=mo(e,t,_o,null,null,n),Qf._currentValue=i),oc(e,t),Xs(e,t,r,n),t.child;case 6:return e===null&&Si&&((e=n=xi)&&(n=nf(n,t.pendingProps,wi),n===null?e=!1:(t.stateNode=n,bi=t,xi=null,e=!0)),e||Ei(t)),null;case 13:return mc(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ea(t,null,r,n):Xs(e,t,r,n),t.child;case 11:return Zs(e,t,t.type,t.pendingProps,n);case 7:return Xs(e,t,t.pendingProps,n),t.child;case 8:return Xs(e,t,t.pendingProps.children,n),t.child;case 12:return Xs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ii(t,t.type,r.value),Xs(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Hi(t),i=Ui(i),r=r(i),t.flags|=1,Xs(e,t,r,n),t.child;case 14:return Qs(e,t,t.type,t.pendingProps,n);case 15:return $s(e,t,t.type,t.pendingProps,n);case 19:return bc(e,t,n);case 31:return ac(e,t,n);case 22:return ec(e,t,n,t.pendingProps);case 24:return Hi(t),r=Ui(Yi),e===null?(i=sa(),i===null&&(i=Pl,o=Xi(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},ka(t),Ii(t,Yi,i)):((e.lanes&n)!==0&&(Aa(e,t),La(t,null,null,n),Ia()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Ii(t,Yi,r),r!==i.cache&&zi(t,[Yi],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ii(t,Yi,r))),Xs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Tc(e){e.flags|=4}function Ec(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cu())e.flags|=8192;else throw _a=pa,da}else e.flags&=-16777217}function Dc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Cu())e.flags|=8192;else throw _a=pa,da}function Oc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Le(),e.lanes|=t,Jl|=t)}function kc(e,t){if(!Si)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ac(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function jc(e,t,n){var r=t.pendingProps;switch(vi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ac(t),null;case 1:return Ac(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Li(Yi),ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ki(t)?Tc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ji())),Ac(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Tc(t),o===null?(Ac(t),Ec(t,i,null,r,n)):(Ac(t),Dc(t,o))):o?o===e.memoizedState?(Ac(t),t.flags&=-16777217):(Tc(t),Ac(t),Dc(t,o)):(e=e.memoizedProps,e!==r&&Tc(t),Ac(t),Ec(t,i,e,r,n)),null;case 27:if(q(t),n=W.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ac(t),null}e=H.current,ki(t)?Di(t,e):(e=ff(i,r,n),t.stateNode=e,Tc(t))}return Ac(t),null;case 5:if(q(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ac(t),null}if(o=H.current,ki(t))Di(t,o);else{var s=Hd(W.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);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(i,{is:r.is}):s.createElement(i)}}o[Ye]=t,o[Xe]=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(Id(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Tc(t)}}return Ac(t),Ec(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=W.current,ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=bi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ye]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Ei(t,!0)}else e=Hd(e).createTextNode(r),e[Ye]=t,t.stateNode=e}return Ac(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ki(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[Ye]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ac(t),e=!1}else n=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Za(t),t):(Za(t),null);if(t.flags&128)throw Error(a(558))}return Ac(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[Ye]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ac(t),i=!1}else i=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Za(t),t):(Za(t),null)}return Za(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Oc(t,t.updateQueue),Ac(t),null);case 4:return ee(),e===null&&Cd(t.stateNode.containerInfo),Ac(t),null;case 10:return Li(t.type),Ac(t),null;case 19:if(B(Qa),r=t.memoizedState,r===null)return Ac(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)kc(r,!1);else{if(Ul!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=$a(e),o!==null){for(t.flags|=128,kc(r,!1),e=o.updateQueue,t.updateQueue=e,Oc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Qr(n,e),n=n.sibling;return V(Qa,Qa.current&1|2),Si&&hi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&me()>eu&&(t.flags|=128,i=!0,kc(r,!1),t.lanes=4194304)}else{if(!i)if(e=$a(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Oc(t,e),kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Si)return Ac(t),null}else 2*me()-r.renderingStartTime>eu&&n!==536870912&&(t.flags|=128,i=!0,kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ac(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=me(),e.sibling=null,n=Qa.current,V(Qa,i?n&1|2:n&1),Si&&hi(t,r.treeForkCount),e);case 22:case 23:return Za(t),Wa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ac(t),t.subtreeFlags&6&&(t.flags|=8192)):Ac(t),n=t.updateQueue,n!==null&&Oc(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&&B(oa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Li(Yi),Ac(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Mc(e,t){switch(vi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Li(Yi),ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return q(t),null;case 31:if(t.memoizedState!==null){if(Za(t),t.alternate===null)throw Error(a(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Za(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Qa),null;case 4:return ee(),null;case 10:return Li(t.type),null;case 22:case 23:return Za(t),Wa(),e!==null&&B(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Li(Yi),null;case 25:return null;default:return null}}function Nc(e,t){switch(vi(t),t.tag){case 3:Li(Yi),ee();break;case 26:case 27:case 5:q(t);break;case 4:ee();break;case 31:t.memoizedState!==null&&Za(t);break;case 13:Za(t);break;case 19:B(Qa);break;case 10:Li(t.type);break;case 22:case 23:Za(t),Wa(),e!==null&&B(oa);break;case 24:Li(Yi)}}function Pc(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){Wu(t,t.return,e)}}function Fc(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){Wu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Wu(t,t.return,e)}}function Ic(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{za(t,n)}catch(t){Wu(e,e.return,t)}}}function Lc(e,t,n){n.props=Rs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Wu(e,t,n)}}function Rc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Wu(e,t,n)}}function zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Wu(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){Wu(e,t,n)}else n.current=null}function Bc(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){Wu(e,e.return,t)}}function Vc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[Xe]=t}catch(t){Wu(e,e.return,t)}}function Hc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$(e.type)||e.tag===4}function Uc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Hc(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&&$(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 Wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vt));else if(r!==4&&(r===27&&$(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[Ye]=e,t[Xe]=n}catch(t){Wu(e,e.return,t)}}var qc=!1,Jc=!1,Yc=!1,Xc=typeof WeakSet==`function`?WeakSet:Set,Zc=null;function Qc(e,t){if(e=e.containerInfo,Bd=sp,e=mr(e),hr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Vd={focusedElem:e,selectionRange:n},sp=!1,Zc=t;Zc!==null;)if(t=Zc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Zc=e;else for(;Zc!==null;){switch(t=Zc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Rs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Wu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,Zc=e;break}Zc=t.return}}function $c(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ml(e,n),r&4&&Pc(5,n);break;case 1:if(ml(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Wu(n,n.return,e)}else{var i=Rs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Wu(n,n.return,e)}}r&64&&Ic(n),r&512&&Rc(n,n.return);break;case 3:if(ml(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{za(e,t)}catch(e){Wu(n,n.return,e)}}break;case 27:t===null&&r&4&&Kc(n);case 26:case 5:ml(e,n),t===null&&r&4&&Bc(n),r&512&&Rc(n,n.return);break;case 12:ml(e,n);break;case 31:ml(e,n),r&4&&al(e,n);break;case 13:ml(e,n),r&4&&ol(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||qc,!r){t=t!==null&&t.memoizedState!==null||Jc,i=qc;var a=Jc;qc=r,(Jc=t)&&!a?gl(e,n,(n.subtreeFlags&8772)!=0):ml(e,n),qc=i,Jc=a}break;case 30:break;default:ml(e,n)}}function el(e){var t=e.alternate;t!==null&&(e.alternate=null,el(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&rt(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 tl=null,nl=!1;function rl(e,t,n){for(n=n.child;n!==null;)il(e,t,n),n=n.sibling}function il(e,t,n){if(we&&typeof we.onCommitFiberUnmount==`function`)try{we.onCommitFiberUnmount(Ce,n)}catch{}switch(n.tag){case 26:Jc||zc(n,t),rl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Jc||zc(n,t);var r=tl,i=nl;$(n.type)&&(tl=n.stateNode,nl=!1),rl(e,t,n),pf(n.stateNode),tl=r,nl=i;break;case 5:Jc||zc(n,t);case 6:if(r=tl,i=nl,tl=null,rl(e,t,n),tl=r,nl=i,tl!==null)if(nl)try{(tl.nodeType===9?tl.body:tl.nodeName===`HTML`?tl.ownerDocument.body:tl).removeChild(n.stateNode)}catch(e){Wu(n,t,e)}else try{tl.removeChild(n.stateNode)}catch(e){Wu(n,t,e)}break;case 18:tl!==null&&(nl?(e=tl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(tl,n.stateNode));break;case 4:r=tl,i=nl,tl=n.stateNode.containerInfo,nl=!0,rl(e,t,n),tl=r,nl=i;break;case 0:case 11:case 14:case 15:Fc(2,n,t),Jc||Fc(4,n,t),rl(e,t,n);break;case 1:Jc||(zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Lc(n,t,r)),rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:Jc=(r=Jc)||n.memoizedState!==null,rl(e,t,n),Jc=r;break;default:rl(e,t,n)}}function al(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Wu(t,t.return,e)}}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Wu(t,t.return,e)}}function sl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xc),t;default:throw Error(a(435,e.tag))}}function cl(e,t){var n=sl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function ll(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if($(c.type)){tl=c.stateNode,nl=!1;break a}break;case 5:tl=c.stateNode,nl=!1;break a;case 3:case 4:tl=c.stateNode.containerInfo,nl=!0;break a}c=c.return}if(tl===null)throw Error(a(160));il(o,s,i),tl=null,nl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dl(t,e),t=t.sibling}var ul=null;function dl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ll(t,e),fl(e),r&4&&(Fc(3,e,e.return),Pc(3,e),Fc(5,e,e.return));break;case 1:ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),r&64&&qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=ul;if(ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[nt]||o[Ye]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Id(o,r,n),o[Ye]=e,ct(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Id(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Id(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Ye]=e,ct(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),n!==null&&r&4&&Vc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),e.flags&32){i=e.stateNode;try{Nt(i,``)}catch(t){Wu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Vc(e,i,n===null?i:n.memoizedProps)),r&1024&&(Yc=!0);break;case 6:if(ll(t,e),fl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Wu(e,e.return,t)}}break;case 3:if(Bf=null,i=ul,ul=gf(t.containerInfo),ll(t,e),ul=i,fl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Wu(e,e.return,t)}Yc&&(Yc=!1,pl(e));break;case 4:r=ul,ul=gf(e.stateNode.containerInfo),ll(t,e),fl(e),ul=r;break;case 12:ll(t,e),fl(e);break;case 31:ll(t,e),fl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 13:ll(t,e),fl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ql=me()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=qc,d=Jc;if(qc=u||i,Jc=d||l,ll(t,e),Jc=d,qc=u,fl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||qc||Jc||hl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Wu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Wu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Wu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,cl(e,n))));break;case 19:ll(t,e),fl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 30:break;case 21:break;default:ll(t,e),fl(e)}}function fl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Hc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Gc(e,Uc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Nt(o,``),n.flags&=-33),Gc(e,Uc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Wc(e,Uc(e),s);break;default:throw Error(a(161))}}catch(t){Wu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ml(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$c(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fc(4,t,t.return),hl(t);break;case 1:zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Lc(t,t.return,n),hl(t);break;case 27:pf(t.stateNode);case 26:case 5:zc(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function gl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:gl(i,a,n),Pc(4,a);break;case 1:if(gl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Wu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ra(c[i],s)}catch(e){Wu(r,r.return,e)}}n&&o&64&&Ic(a),Rc(a,a.return);break;case 27:Kc(a);case 26:case 5:gl(i,a,n),n&&r===null&&o&4&&Bc(a),Rc(a,a.return);break;case 12:gl(i,a,n);break;case 31:gl(i,a,n),n&&o&4&&al(i,a);break;case 13:gl(i,a,n),n&&o&4&&ol(i,a);break;case 22:a.memoizedState===null&&gl(i,a,n),Rc(a,a.return);break;case 30:break;default:gl(i,a,n)}t=t.sibling}}function _l(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Zi(n))}function vl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function yl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bl(e,t,n,r),t=t.sibling}function bl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:yl(e,t,n,r),i&2048&&Pc(9,t);break;case 1:yl(e,t,n,r);break;case 3:yl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e)));break;case 12:if(i&2048){yl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Wu(t,t.return,e)}}else yl(e,t,n,r);break;case 31:yl(e,t,n,r);break;case 13:yl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?yl(e,t,n,r):(a._visibility|=2,xl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?yl(e,t,n,r):Sl(e,t),i&2048&&_l(o,t);break;case 24:yl(e,t,n,r),i&2048&&vl(t.alternate,t);break;default:yl(e,t,n,r)}}function xl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:xl(a,o,s,c,i),Pc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,xl(a,o,s,c,i)):u._visibility&2?xl(a,o,s,c,i):Sl(a,o),i&&l&2048&&_l(o.alternate,o);break;case 24:xl(a,o,s,c,i),i&&l&2048&&vl(o.alternate,o);break;default:xl(a,o,s,c,i)}t=t.sibling}}function Sl(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:Sl(n,r),i&2048&&_l(r.alternate,r);break;case 24:Sl(n,r),i&2048&&vl(r.alternate,r);break;default:Sl(n,r)}t=t.sibling}}var Cl=8192;function wl(e,t,n){if(e.subtreeFlags&Cl)for(e=e.child;e!==null;)Tl(e,t,n),e=e.sibling}function Tl(e,t,n){switch(e.tag){case 26:wl(e,t,n),e.flags&Cl&&e.memoizedState!==null&&Gf(n,ul,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,n);break;case 3:case 4:var r=ul;ul=gf(e.stateNode.containerInfo),wl(e,t,n),ul=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Cl,Cl=16777216,wl(e,t,n),Cl=r):wl(e,t,n));break;default:wl(e,t,n)}}function El(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 Dl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Zc=r,Al(r,e)}El(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ol(e),e=e.sibling}function Ol(e){switch(e.tag){case 0:case 11:case 15:Dl(e),e.flags&2048&&Fc(9,e,e.return);break;case 3:Dl(e);break;case 12:Dl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,kl(e)):Dl(e);break;default:Dl(e)}}function kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Zc=r,Al(r,e)}El(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fc(8,t,t.return),kl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,kl(t));break;default:kl(t)}e=e.sibling}}function Al(e,t){for(;Zc!==null;){var n=Zc;switch(n.tag){case 0:case 11:case 15:Fc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Zi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Zc=r;else a:for(n=e;Zc!==null;){r=Zc;var i=r.sibling,a=r.return;if(el(r),r===n){Zc=null;break a}if(i!==null){i.return=a,Zc=i;break a}Zc=a}}}var jl={getCacheForType:function(e){var t=Ui(Yi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ui(Yi).controller.signal}},Ml=typeof WeakMap==`function`?WeakMap:Map,Nl=0,Pl=null,Fl=null,Il=0,Ll=0,Rl=null,zl=!1,Bl=!1,Vl=!1,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=null,Xl=null,Zl=!1,Ql=0,$l=0,eu=1/0,tu=null,nu=null,ru=0,iu=null,au=null,ou=0,su=0,cu=null,lu=null,uu=0,du=null;function fu(){return Nl&2&&Il!==0?Il&-Il:P.T===null?Ke():dd()}function pu(){if(ql===0)if(!(Il&536870912)||Si){var e=je;je<<=1,!(je&3932160)&&(je=262144),ql=e}else ql=536870912;return e=Ga.current,e!==null&&(e.flags|=32),ql}function mu(e,t,n){(e===Pl&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)&&(xu(e,0),vu(e,Il,ql,!1)),ze(e,n),(!(Nl&2)||e!==Pl)&&(e===Pl&&(!(Nl&2)&&(Gl|=n),Ul===4&&vu(e,Il,ql,!1)),rd(e))}function hu(e,t,n){if(Nl&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Fe(e,t),i=r?ku(e,t):Du(e,t,!0),o=r;do{if(i===0){Bl&&!r&&vu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!_u(n)){i=Du(e,t,!1),o=!1;continue}if(i===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;i=Yl;var l=c.current.memoizedState.isDehydrated;if(l&&(xu(c,s).flags|=256),s=Du(c,s,!1),s!==2){if(Vl&&!l){c.errorRecoveryDisabledLanes|=o,Gl|=o,i=4;break a}o=Xl,Xl=i,o!==null&&(Xl===null?Xl=o:Xl.push.apply(Xl,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){xu(e,0),vu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:vu(r,t,ql,!zl);break a;case 2:Xl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=Ql+300-me(),10<i)){if(vu(r,t,ql,!zl),Pe(r,0,!0)!==0)break a;ou=t,r.timeoutHandle=Yd(gu.bind(null,r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,`Throttled`,-0,0),i);break a}gu(r,n,Xl,tu,Zl,t,ql,Gl,Jl,zl,o,null,-0,0)}}break}while(1);rd(e)}function gu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vt},Tl(t,a,d);var m=(a&62914560)===a?Ql-me():(a&4194048)===a?$l-me():0;if(m=qf(d,m),m!==null){ou=a,e.cancelPendingCommit=m(Iu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),vu(e,a,o,!l);return}}Iu(e,t,a,n,r,i,o,s,c)}function _u(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(!lr(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 vu(e,t,n,r){t&=~Kl,t&=~Gl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ee(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ve(e,n,t)}function yu(){return Nl&6?!0:(id(0,!1),!1)}function bu(){if(Fl!==null){if(Ll===0)var e=Fl.return;else e=Fl,Fi=Pi=null,bo(e),ba=null,xa=0,e=Fl;for(;e!==null;)Nc(e.alternate,e),e=e.return;Fl=null}}function xu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ou=0,bu(),Pl=e,Fl=n=Zr(e.current,null),Il=t,Ll=0,Rl=null,zl=!1,Bl=Fe(e,t),Vl=!1,Jl=ql=Kl=Gl=Wl=Ul=0,Xl=Yl=null,Zl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ee(r),a=1<<i;t|=e[i],r&=~a}return Hl=t,Vr(),n}function Su(e,t){to=null,P.H=As,t===ua||t===fa?(t=va(),Ll=3):t===da?(t=va(),Ll=4):Ll=t===Js?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Rl=t,Fl===null&&(Ul=1,Hs(e,ai(t,e.current)))}function Cu(){var e=Ga.current;return e===null?!0:(Il&4194048)===Il?Ka===null:(Il&62914560)===Il||Il&536870912?e===Ka:!1}function wu(){var e=P.H;return P.H=As,e===null?As:e}function Tu(){var e=P.A;return P.A=jl,e}function Eu(){Ul=4,zl||(Il&4194048)!==Il&&Ga.current!==null||(Bl=!0),!(Wl&134217727)&&!(Gl&134217727)||Pl===null||vu(Pl,Il,ql,!1)}function Du(e,t,n){var r=Nl;Nl|=2;var i=wu(),a=Tu();(Pl!==e||Il!==t)&&(tu=null,xu(e,t)),t=!1;var o=Ul;a:do try{if(Ll!==0&&Fl!==null){var s=Fl,c=Rl;switch(Ll){case 8:bu(),o=6;break a;case 3:case 2:case 9:case 6:Ga.current===null&&(t=!0);var l=Ll;if(Ll=0,Rl=null,Nu(e,s,c,l),n&&Bl){o=0;break a}break;default:l=Ll,Ll=0,Rl=null,Nu(e,s,c,l)}}Ou(),o=Ul;break}catch(t){Su(e,t)}while(1);return t&&e.shellSuspendCounter++,Fi=Pi=null,Nl=r,P.H=i,P.A=a,Fl===null&&(Pl=null,Il=0,Vr()),o}function Ou(){for(;Fl!==null;)ju(Fl)}function ku(e,t){var n=Nl;Nl|=2;var r=wu(),i=Tu();Pl!==e||Il!==t?(tu=null,eu=me()+500,xu(e,t)):Bl=Fe(e,t);a:do try{if(Ll!==0&&Fl!==null){t=Fl;var o=Rl;b:switch(Ll){case 1:Ll=0,Rl=null,Nu(e,t,o,1);break;case 2:case 9:if(ma(o)){Ll=0,Rl=null,Mu(t);break}t=function(){Ll!==2&&Ll!==9||Pl!==e||(Ll=7),rd(e)},o.then(t,t);break a;case 3:Ll=7;break a;case 4:Ll=5;break a;case 7:ma(o)?(Ll=0,Rl=null,Mu(t)):(Ll=0,Rl=null,Nu(e,t,o,7));break;case 5:var s=null;switch(Fl.tag){case 26:s=Fl.memoizedState;case 5:case 27:var c=Fl;if(s?Wf(s):c.stateNode.complete){Ll=0,Rl=null;var l=c.sibling;if(l!==null)Fl=l;else{var u=c.return;u===null?Fl=null:(Fl=u,Pu(u))}break b}}Ll=0,Rl=null,Nu(e,t,o,5);break;case 6:Ll=0,Rl=null,Nu(e,t,o,6);break;case 8:bu(),Ul=6;break a;default:throw Error(a(462))}}Au();break}catch(t){Su(e,t)}while(1);return Fi=Pi=null,P.H=r,P.A=i,Nl=n,Fl===null?(Pl=null,Il=0,Vr(),Ul):0}function Au(){for(;Fl!==null&&!fe();)ju(Fl)}function ju(e){var t=wc(e.alternate,e,Hl);e.memoizedProps=e.pendingProps,t===null?Pu(e):Fl=t}function Mu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=cc(n,t,t.pendingProps,t.type,void 0,Il);break;case 11:t=cc(n,t,t.pendingProps,t.type.render,t.ref,Il);break;case 5:bo(t);default:Nc(n,t),t=Fl=Qr(t,Hl),t=wc(n,t,Hl)}e.memoizedProps=e.pendingProps,t===null?Pu(e):Fl=t}function Nu(e,t,n,r){Fi=Pi=null,bo(t),ba=null,xa=0;var i=t.return;try{if(qs(e,i,t,n,Il)){Ul=1,Hs(e,ai(n,e.current)),Fl=null;return}}catch(t){if(i!==null)throw Fl=i,t;Ul=1,Hs(e,ai(n,e.current)),Fl=null;return}t.flags&32768?(Si||r===1?e=!0:Bl||Il&536870912?e=!1:(zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ga.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fu(t,e)):Pu(t)}function Pu(e){var t=e;do{if(t.flags&32768){Fu(t,zl);return}e=t.return;var n=jc(t.alternate,t,Hl);if(n!==null){Fl=n;return}if(t=t.sibling,t!==null){Fl=t;return}Fl=t=e}while(t!==null);Ul===0&&(Ul=5)}function Fu(e,t){do{var n=Mc(e.alternate,e);if(n!==null){n.flags&=32767,Fl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Fl=e;return}Fl=e=n}while(e!==null);Ul=6,Fl=null}function Iu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Vu();while(ru!==0);if(Nl&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Br,Be(e,n,o,s,c,l),e===Pl&&(Fl=Pl=null,Il=0),au=t,iu=e,ou=n,su=o,cu=i,lu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(ve,function(){return Hu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=Nl,Nl|=4;try{Qc(e,t,n)}finally{Nl=s,F.p=i,P.T=r}}ru=1,Lu(),Ru(),zu()}}function Lu(){if(ru===1){ru=0;var e=iu,t=au,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Nl;Nl|=4;try{dl(t,e);var a=Vd,o=mr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&pr(s.ownerDocument.documentElement,s)){if(c!==null&&hr(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 _=fr(s,h),v=fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Bd,Vd=Bd=null}finally{Nl=i,F.p=r,P.T=n}}e.current=t,ru=2}}function Ru(){if(ru===2){ru=0;var e=iu,t=au,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Nl;Nl|=4;try{$c(e,t.alternate,t)}finally{Nl=i,F.p=r,P.T=n}}ru=3}}function zu(){if(ru===4||ru===3){ru=0,pe();var e=iu,t=au,n=ou,r=lu;t.subtreeFlags&10256||t.flags&10256?ru=5:(ru=0,au=iu=null,Bu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nu=null),Ge(n),t=t.stateNode,we&&typeof we.onCommitFiberRoot==`function`)try{we.onCommitFiberRoot(Ce,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}ou&3&&Vu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===du?uu++:(uu=0,du=e):uu=0,id(0,!1)}}function Bu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function Vu(){return Lu(),Ru(),zu(),Hu()}function Hu(){if(ru!==5)return!1;var e=iu,t=su;su=0;var n=Ge(ou),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=cu,cu=null;var o=iu,s=ou;if(ru=0,au=iu=null,ou=0,Nl&6)throw Error(a(331));var c=Nl;if(Nl|=4,Ol(o.current),bl(o,o.current,s,n),Nl=c,id(0,!1),we&&typeof we.onPostCommitFiberRoot==`function`)try{we.onPostCommitFiberRoot(Ce,o)}catch{}return!0}finally{F.p=i,P.T=r,Bu(e,t)}}function Uu(e,t,n){t=ai(n,t),t=Ws(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(ze(e,2),rd(e))}function Wu(e,t,n){if(e.tag===3)Uu(e,e,n);else for(;t!==null;){if(t.tag===3){Uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(nu===null||!nu.has(r))){e=ai(n,e),n=Gs(2),r=Ma(t,n,2),r!==null&&(Ks(n,r,t,e),ze(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ml;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)||(Vl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pl===e&&(Il&n)===n&&(Ul===4||Ul===3&&(Il&62914560)===Il&&300>me()-Ql?!(Nl&2)&&xu(e,0):Kl|=n,Jl===Il&&(Jl=0)),rd(e)}function qu(e,t){t===0&&(t=Le()),e=Wr(e,t),e!==null&&(ze(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return ue(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;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-Ee(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Il,a=Pe(r,r===Pl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Fe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&qd()&&(e=nd);for(var t=me(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}ru!==0&&ru!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ee(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ie(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Pl,n=Il,n=Pe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ll===2||Ll===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&de(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Fe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&de(r),Ge(n)){case 2:case 8:n=_e;break;case 32:n=ve;break;case 268435456:n=be;break;default:n=ve}return r=cd.bind(null,e),n=ue(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&de(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(ru!==0&&ru!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Vu()&&e.callbackNode!==n)return null;var r=Il;return r=Pe(e,e===Pl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(hu(e,r,t),sd(e,me()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Vu())return null;hu(e,t,!0)}function ud(){Q(function(){Nl&6?ue(ge,ad):od()})}function dd(){if(nd===0){var e=ea;e===0&&(e=Ae,Ae<<=1,!(Ae&261888)&&(Ae=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Bt(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[Xe]||null).action),o=r.submitter;o&&(t=(t=o[Xe]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new un(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);gs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),gs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Fr.length;hd++){var gd=Fr[hd];Ir(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Ir(Dr,`onAnimationEnd`),Ir(Or,`onAnimationIteration`),Ir(kr,`onAnimationStart`),Ir(`dblclick`,`onDoubleClick`),Ir(`focusin`,`onFocus`),Ir(`focusout`,`onBlur`),Ir(Ar,`onTransitionRun`),Ir(jr,`onTransitionStart`),Ir(Mr,`onTransitionCancel`),Ir(Nr,`onTransitionEnd`),ft(`onMouseEnter`,[`mouseout`,`mouseover`]),ft(`onMouseLeave`,[`mouseout`,`mouseover`]),ft(`onPointerEnter`,[`pointerout`,`pointerover`]),ft(`onPointerLeave`,[`pointerout`,`pointerover`]),dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Lr(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){Lr(e)}i.currentTarget=null,a=c}}}}function bd(e,t){var n=t[Qe];n===void 0&&(n=t[Qe]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,lt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!Zt||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 Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=it(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}Jt(function(){var r=a,i=Ut(n),o=[];a:{var c=Pr.get(e);if(c!==void 0){var l=un,u=e;switch(e){case`keypress`:if(rn(n)===0)break a;case`keydown`:case`keyup`:l=En;break;case`focusin`:u=`focus`,l=_n;break;case`focusout`:u=`blur`,l=_n;break;case`beforeblur`:case`afterblur`:l=_n;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=hn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=On;break;case Dr:case Or:case kr:l=vn;break;case Nr:l=kn;break;case`scroll`:case`scrollend`:l=dn;break;case`wheel`:l=An;break;case`copy`:case`cut`:case`paste`:l=yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Dn;break;case`toggle`:case`beforetoggle`:l=jn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Yt(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Ht&&(u=n.relatedTarget||n.fromElement)&&(it(u)||u[Ze]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?it(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=hn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Dn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ot(l),h=u==null?c:ot(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,it(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Od,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&kd(o,c,l,d,!1),u!==null&&f!==null&&kd(o,f,u,d,!0)}}a:{if(c=r?ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Zn;else if(Gn(c))if(Qn)v=sr;else{v=ar;var y=ir}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Lt(r.elementType)&&(v=Zn):v=or;if(v&&=v(e,r)){Kn(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&At(c,`number`,c.value)}switch(y=r?ot(r):window,e){case`focusin`:(Gn(y)||y.contentEditable===`true`)&&(_r=y,vr=r,yr=null);break;case`focusout`:yr=vr=_r=null;break;case`mousedown`:br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:br=!1,xr(o,n,i);break;case`selectionchange`:if(gr)break;case`keydown`:case`keyup`:xr(o,n,i)}var b;if(Nn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Vn?zn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(In&&n.locale!==`ko`&&(Vn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Vn&&(b=nn()):($t=i,en=`value`in $t?$t.value:$t.textContent,Vn=!0)),y=Dd(r,x),0<y.length&&(x=new bn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Bn(n),b!==null&&(x.data=b)))),(b=Fn?Hn(e,n):Un(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new bn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(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=Yt(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=Yt(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(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=Yt(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=Yt(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
10
- `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Nt(e,``+r);break;case`className`:vt(e,`class`,r);break;case`tabIndex`:vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:vt(e,n,r);break;case`style`:It(e,r,o);break;case`data`:if(t!==`object`){vt(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=Bt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,i.name,i,null),Pd(e,t,`formEncType`,i.formEncType,i,null),Pd(e,t,`formMethod`,i.formMethod,i,null),Pd(e,t,`formTarget`,i.formTarget,i,null)):(Pd(e,t,`encType`,i.encType,i,null),Pd(e,t,`method`,i.method,i,null),Pd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Bt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:bd(`beforetoggle`,e),bd(`toggle`,e),_t(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`:_t(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Rt.get(n)||n,_t(e,n,r))}}function Fd(e,t,n,r,i,o){switch(n){case`style`:It(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Nt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[Xe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):_t(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,i=!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`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Pd(e,t,o,s,n,null)}}i&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=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(a(137,t));break;default:Pd(e,t,r,d,n,null)}}kt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&J(e,!!r,n,!0):J(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Pd(e,t,s,c,n,null)}Mt(e,r,i,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:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`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(a(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(Lt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(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 i=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)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Ot(e,s,c,l,u,d,o,i);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)||Pd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?J(e,!!n,n?[]:``,!1):J(e,!!n,t,!0)):J(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Pd(e,t,s,i,r,o)}jt(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:Pd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Pd(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)&&Pd(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(a(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(Lt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(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||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(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||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){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&&Rd(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&&Rd(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 Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(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 Wd(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 Gd(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 Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Z=typeof Promise==`function`?Promise:void 0,Q=typeof queueMicrotask==`function`?queueMicrotask:Z===void 0?Yd:function(e){return Z.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function $(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),rt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[nt])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=F.d;F.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=yu();return e||t}function yf(e){var t=at(e);t!==null&&t.tag===5&&t.type===`form`?vs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Dt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Dt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Dt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Dt(n.imageSizes)+`"]`)):i+=`[href="`+Dt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Dt(r)+`"][href="`+Dt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Id(r,`link`,e),ct(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=st(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);ct(c),Id(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=st(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=st(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=W.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=st(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=st(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=st(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Dt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),ct(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Dt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Dt(n.href)+`"]`);if(r)return t.instance=r,ct(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ct(r),Id(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,ct(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,ct(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),ct(i),Id(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[nt]||a[Ye]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ct(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Re(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Re(0),this.hiddenUpdates=Re(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Yr(3,null,null,t),e.current=a,a.stateNode=e,t=Xi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ka(a),e}function tp(e){return e?(e=qr,e):qr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ma(e,r,t),n!==null&&(mu(n,e,t),Na(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Wr(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=We(t);var n=Wr(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,up(e,t,n,r)}finally{F.p=a,P.T=i}}function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,up(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Td(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=at(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ne(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ee(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Nl&6)&&(eu=me()+500,id(0,!1))}}break;case 31:case 13:s=Wr(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Td(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function dp(e){return e=Ut(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=it(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(he()){case ge:return 2;case _e:return 8;case ve:case ye:return 32;case be:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=at(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=it(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,qe(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,qe(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ht=r,n.target.dispatchEvent(r),Ht=null}else return t=at(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=at(n);a!==null&&(e.splice(t,3),t-=3,gs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Xe]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Xe]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),yu(),t[Ze]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(a(527,Lp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ce=zp.inject(Rp),we=zp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=zs,s=Bs,c=Vs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[Ze]=t.current,Cd(e),new Fp(t)}})),Xd=t(((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=Yd()})),Z=i(),Q=e(r(),1),Zd=Xd(),$=a(),Qd=3100,$d=3;function ef(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??$d;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var tf={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},nf=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function rf(e,t={}){let n=t.rng??Math.random,r=t.colors??nf,i=tf[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var af=1.8,of=90,sf=16,cf=380,lf=.025,uf=.1,df=.18,ff=400,pf=9.2736,mf=18.1799,hf=14.5244,gf={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function _f(e,t){let{halfWidth:n,apexLift:r}=gf[t];return`M${e-n} ${hf+.3} Q${e} ${hf-r}, ${e+n} ${hf+.3}`}function vf(e){let t=1.5,n=.3;return`M${e-t} ${hf-n} Q${e} ${hf+1.4}, ${e+t} ${hf-n}`}var yf=15,bf=15;function xf(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function Sf(e){let t=(0,$.c)(71),{size:n,className:r,trackMouse:i,variant:a,celebrateSignal:o}=e,s=n===void 0?48:n,c=i===void 0?!0:i,l=a===void 0?`default`:a,u=o===void 0?0:o,d=(0,Q.useRef)(null),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={x:0,y:0},t[0]=m):m=t[0];let h=(0,Q.useRef)(m),[g,_]=(0,Q.useState)(0),[v,y]=(0,Q.useState)(0),b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[1]=b):b=t[1];let[x,S]=(0,Q.useState)(b),C=(0,Q.useRef)(0),w=(0,Q.useRef)(void 0),T=l===`sleeping`,E;t[2]!==g||t[3]!==T?(E=function(){if(T)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=C.current===0?1/0:e-C.current;C.current=e;let n=ef(g,t);_(n),y(Ef),S(rf(n)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Qd)},t[2]=g,t[3]=T,t[4]=E):E=t[4];let D=E,O,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>()=>clearTimeout(w.current),k=[],t[5]=O,t[6]=k):(O=t[5],k=t[6]),(0,Q.useEffect)(O,k);let A,j;t[7]!==u||t[8]!==T?(A=()=>{u===0||T||(_(3),y(Tf),S(rf(3)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Qd))},j=[u,T],t[7]=u,t[8]=T,t[9]=A,t[10]=j):(A=t[9],j=t[10]),(0,Q.useEffect)(A,j);let M,N;t[11]!==T||t[12]!==c?(M=()=>{if(!c||T||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,l=function(){s===0&&(s=requestAnimationFrame(m))},u=function(r){e=r.clientX,t=r.clientY,n=!0,l()};function m(){s=0;let c=f.current,u=d.current;if(!c||!u){l();return}let m=n;n=!1;let g=c.getBoundingClientRect(),_=g.left+g.width/2,v=g.top+g.height*.48,y=e-_,b=t-v,x=Math.hypot(y,b),S=Math.max(-1,Math.min(1,y/cf)),C=-Math.max(-1,Math.min(1,b/cf))*sf,w=S*sf,T=0,E=0;if(x>=1){let e=Math.min(x/of,1)*af;T=y/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!m&&D)return;l(),r+=(C-r)*uf,i+=(w-i)*uf,u.style.transform=`perspective(${ff}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*df,o+=(E-o)*df;let O=i*lf,k=-r*lf,A=a+O,j=o+k;h.current.x=A,h.current.y=j,p.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,u,{passive:!0}),l(),()=>{document.removeEventListener(`mousemove`,u),s!==0&&cancelAnimationFrame(s),s=0,d.current&&(d.current.style.transform=``),h.current={x:0,y:0},p.current?.removeAttribute(`transform`)}},N=[c,T],t[11]=T,t[12]=c,t[13]=M,t[14]=N):(M=t[13],N=t[14]),(0,Q.useEffect)(M,N);let P;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{let e=p.current;if(!e)return;let{x:t,y:n}=h.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[15]=P):P=t[15],(0,Q.useLayoutEffect)(P);let F=g>0,I=F?g:1,L=F?`ok-blob-clicked-${g}`:null,R;t[16]===r?R=t[17]:(R=X(`ok-blob-3d-wrapper`,r),t[16]=r,t[17]=R);let z=T?`cursor-default`:`cursor-pointer`,B=`body-${v}`,V=T&&`ok-blob-sleeping`,H;t[18]!==L||t[19]!==V?(H=X(`ok-blob-group`,V,L),t[18]=L,t[19]=V,t[20]=H):H=t[20];let U;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(`path`,{d:`M25.2339 6.78134C25.5199 7.35734 25.8179 8.47234 26.0179 9.07834C26.0189 9.08234 26.0209 9.08634 26.0219 9.09134C26.0229 9.09534 26.0249 9.10034 26.0259 9.10434C26.0539 9.19734 26.0949 9.29533 26.1519 9.41633C26.2919 9.71133 26.5269 10.1173 27.1299 11.1683C27.3259 11.4643 27.5209 11.7693 27.7119 12.0903C29.9739 15.1623 29.3259 20.1913 27.0469 22.9153C26.7779 23.2953 26.4869 23.6043 26.1889 23.8863C26.1519 23.9253 26.1129 23.9643 26.0729 24.0033C25.3159 24.7543 24.2949 25.4673 23.6129 25.8323C22.7469 26.2983 22.1349 26.5483 21.6299 26.7463C20.3649 27.3063 19.0609 27.7733 17.6569 28.0423C15.9649 28.3513 14.1939 28.4433 12.4569 28.1373C11.4779 27.9663 10.5119 27.6663 9.60891 27.2493C8.77491 26.8663 7.99192 26.3853 7.26992 25.8403C6.83592 25.5393 6.43893 25.2343 6.08093 24.9383C5.57893 24.5223 5.15993 24.1263 4.83493 23.7793C4.04993 22.9443 3.31593 21.8893 2.80893 21.0953C2.72593 20.9663 2.64792 20.8433 2.57592 20.7293C2.56192 20.7093 2.54793 20.6893 2.53393 20.6703C2.08593 20.0263 1.71892 19.3293 1.43792 18.5993C1.42892 18.5453 1.42093 18.4903 1.41293 18.4353C1.32093 17.7443 1.08292 16.9423 1.01092 15.6333C0.984921 15.0653 0.998928 14.4013 1.12393 13.6353C1.20693 13.1413 1.31993 12.9023 1.40893 12.7113C1.43593 12.6543 1.46193 12.6023 1.48593 12.5483C1.56793 12.3653 1.59392 12.1563 1.63592 11.9083C1.68992 11.5883 1.76992 11.1943 2.04592 10.7553C2.94392 9.37934 3.36792 8.81934 3.66592 8.33934C3.75592 8.20334 3.84292 8.08134 3.94192 7.96634C4.21592 7.64634 4.67693 7.29534 5.10293 7.05734C5.16693 7.02234 5.23093 6.98834 5.29193 6.95534C5.62993 6.77834 6.22592 6.30135 6.66992 5.92035C6.83692 5.77635 7.08193 5.60735 7.37393 5.40935C7.67393 5.20535 8.02593 4.96934 8.39193 4.70234C9.32093 4.02634 9.84091 3.69134 10.2599 3.42334C10.3799 3.34734 10.4919 3.27734 10.6049 3.20834C10.9609 2.98834 11.4149 2.73034 11.8869 2.48634C12.4519 2.19334 13.0469 1.92133 13.5089 1.72233C14.7399 1.30233 16.0539 1.01333 17.4169 1.00033C18.1169 0.991333 18.7939 1.16534 19.2389 1.43034C19.6869 1.69534 19.8689 2.00335 19.8039 2.23935C19.7379 2.47835 19.4399 2.63634 19.0109 2.74734C18.5789 2.85634 18.0469 2.92035 17.4889 2.96135C16.3639 3.04235 15.2399 3.36435 14.1499 3.80835C12.8199 4.35135 11.5379 5.07133 10.2719 5.84733C9.38691 6.39133 8.51192 6.97334 7.63592 7.56834C7.54492 7.63034 7.45492 7.69135 7.36492 7.75235C6.97392 8.06635 6.58293 8.38134 6.22293 8.66334C5.97893 8.85734 5.76793 9.04834 5.59393 9.21434C5.26893 9.52334 5.02393 9.74334 4.81893 9.93934C4.67793 10.0753 4.55793 10.2013 4.45593 10.3443C4.40093 10.4213 4.32992 10.5273 4.24792 10.6593C3.90492 11.1933 3.44493 12.1693 3.15393 13.1173C3.01893 13.5363 2.87991 14.0343 2.79391 14.5253C2.66591 15.2253 2.65594 15.9053 2.71994 16.2373C2.82794 16.8193 2.95593 17.4833 3.14093 18.0553C3.31293 18.6003 3.52991 19.0583 3.70791 19.2823C3.81591 19.4183 3.90394 19.5473 3.99594 19.6913C4.09394 19.8413 4.19191 20.0073 4.31091 20.2033C4.47891 20.4803 4.68592 20.8163 5.00192 21.2493C5.36492 21.7463 5.61793 22.1043 5.83493 22.4023C6.14493 22.8243 6.38591 23.1343 6.83691 23.5033C7.33891 23.9113 7.86593 24.3113 8.26693 24.6393C8.44893 24.7883 8.66993 24.9443 8.90493 25.0963C9.21593 25.2963 9.55192 25.4893 9.85592 25.6703C10.1059 25.8203 10.3059 25.9633 10.4869 26.0863C10.5429 26.1243 10.5979 26.1603 10.6519 26.1943C10.8699 26.2803 11.0929 26.3593 11.3159 26.4283C11.3539 26.4323 11.3949 26.4353 11.4369 26.4393C11.6509 26.4573 11.9089 26.4733 12.2209 26.5133C12.7169 26.5753 13.1399 26.6603 13.6019 26.7243C13.9589 26.7733 14.3409 26.8083 14.7729 26.7893C15.0729 26.7753 15.4069 26.7353 15.7389 26.6813C16.2349 26.6023 16.7179 26.4943 17.0569 26.4473C17.1499 26.4343 17.2359 26.4343 17.3209 26.4373C17.3489 26.4393 17.3799 26.4413 17.4109 26.4433C17.4119 26.4433 17.4119 26.4433 17.4129 26.4433C17.4199 26.4433 17.4279 26.4443 17.4349 26.4443C18.2329 26.2413 19.0259 25.9433 19.7959 25.5983C19.8609 25.5633 19.9259 25.5273 19.9899 25.4913C20.3059 25.3173 20.6049 25.1383 20.7869 24.9943C20.9829 24.8393 21.5189 24.5373 22.0579 24.1853C22.4109 23.9553 22.7649 23.7053 23.0369 23.4833C23.1949 23.3553 23.3689 23.2693 23.5479 23.1773C23.7129 23.0923 23.8809 23.0013 24.0349 22.8653C24.1109 22.7983 24.1869 22.7173 24.2639 22.6303C24.3309 22.5563 24.4039 22.4723 24.4759 22.3923C24.5459 22.3153 24.7199 22.1723 24.9139 21.9793C25.0079 21.8863 25.1059 21.7783 25.1909 21.6713C25.2199 21.6323 25.2489 21.5943 25.2769 21.5553C25.5919 21.0403 25.8779 20.5003 26.1019 19.9653C26.1299 19.8403 26.1379 19.7293 26.1279 19.6373C26.1199 19.5703 26.1029 19.5113 26.0839 19.4503C26.0599 19.3643 26.0329 19.2773 26.0239 19.1723C26.0169 19.0893 26.0309 19.0043 26.0629 18.9543C26.0779 18.9323 26.0969 18.9143 26.1129 18.8993C26.1329 18.8823 26.1499 18.8673 26.1569 18.8443C26.1609 18.8273 26.1579 18.8073 26.1529 18.7833C26.1459 18.7443 26.1369 18.6943 26.1539 18.6293C26.2189 18.3853 26.2869 18.1103 26.3319 17.8383C26.3829 17.5393 26.4049 17.2433 26.3949 17.0123C26.3849 16.7493 26.3909 16.3823 26.3469 16.0003C26.3179 15.7343 26.2659 15.4663 26.1979 15.2383C26.1319 15.0143 26.0219 14.7913 25.9039 14.5783C25.7629 14.3223 25.6119 14.0783 25.5169 13.8453C25.4969 13.7983 25.4999 13.7263 25.4999 13.6323C25.5009 13.5673 25.4999 13.4913 25.4919 13.4083C25.3239 13.1243 25.1459 12.8423 24.9589 12.5483C24.9479 12.5413 24.9369 12.5333 24.9249 12.5263C24.6689 12.3503 24.3139 12.1173 24.0769 11.5503C24.0179 11.4063 24.0069 11.2983 23.9969 11.1993C23.9859 11.1013 23.9799 11.0183 23.9289 10.9093C23.8709 10.7853 23.7759 10.6583 23.6709 10.4993C23.5849 10.3703 23.4899 10.2133 23.4199 10.0423C23.3819 9.95134 23.3509 9.85734 23.3329 9.75934C23.3299 9.74334 23.3269 9.72534 23.3229 9.70634C23.2899 9.52734 23.2439 9.26534 23.2409 8.98634C23.0209 8.24434 22.8339 7.48833 22.6519 6.77633C22.3429 5.57133 22.0519 4.54234 21.3329 3.95434C20.9839 3.65334 20.5689 3.35433 20.2459 3.05433C19.9259 2.75633 19.7449 2.47534 19.8019 2.23834C19.8639 2.00634 20.1589 1.82934 20.6659 1.80534C21.1699 1.78334 21.8699 1.93235 22.5209 2.39235C23.6159 3.14235 24.2029 4.38334 24.5599 5.35734C24.5829 5.40834 24.6049 5.46034 24.6259 5.51234C24.7849 5.89434 24.9529 6.22834 25.1199 6.55534C25.1579 6.63034 25.1969 6.70834 25.2339 6.78134Z`,className:`ok-blob-body`}),t[21]=U):U=t[21];let W=(F||T)&&`ok-blob-eye-hidden`,G;t[22]===W?G=t[23]:(G=X(`ok-blob-eye`,W),t[22]=W,t[23]=G);let K;t[24]===G?K=t[25]:(K=(0,Z.jsx)(`ellipse`,{cx:pf,cy:hf,rx:1.2722,ry:1.9083,className:G}),t[24]=G,t[25]=K);let ee=(F||T)&&`ok-blob-eye-hidden`,te;t[26]===ee?te=t[27]:(te=X(`ok-blob-eye ok-blob-eye-right`,ee),t[26]=ee,t[27]=te);let q;t[28]===te?q=t[29]:(q=(0,Z.jsx)(`ellipse`,{cx:mf,cy:hf,rx:1.2722,ry:1.9083,className:te}),t[28]=te,t[29]=q);let ne;t[30]===I?ne=t[31]:(ne=_f(pf,I),t[30]=I,t[31]=ne);let re=(!F||T)&&`ok-blob-eye-hidden`,ie;t[32]===re?ie=t[33]:(ie=X(`ok-blob-happy-eye`,re),t[32]=re,t[33]=ie);let ae;t[34]!==ne||t[35]!==ie?(ae=(0,Z.jsx)(`path`,{d:ne,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ie}),t[34]=ne,t[35]=ie,t[36]=ae):ae=t[36];let oe;t[37]===I?oe=t[38]:(oe=_f(mf,I),t[37]=I,t[38]=oe);let se=(!F||T)&&`ok-blob-eye-hidden`,ce;t[39]===se?ce=t[40]:(ce=X(`ok-blob-happy-eye`,se),t[39]=se,t[40]=ce);let le;t[41]!==oe||t[42]!==ce?(le=(0,Z.jsx)(`path`,{d:oe,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ce}),t[41]=oe,t[42]=ce,t[43]=le):le=t[43];let ue;t[44]===T?ue=t[45]:(ue=T?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`path`,{d:vf(pf),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,Z.jsx)(`path`,{d:vf(mf),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[44]=T,t[45]=ue);let de;t[46]!==K||t[47]!==q||t[48]!==ae||t[49]!==le||t[50]!==ue?(de=(0,Z.jsxs)(`g`,{ref:p,children:[K,q,ae,le,ue]}),t[46]=K,t[47]=q,t[48]=ae,t[49]=le,t[50]=ue,t[51]=de):de=t[51];let fe;t[52]!==B||t[53]!==H||t[54]!==de?(fe=(0,Z.jsxs)(`g`,{className:H,children:[U,de]},B),t[52]=B,t[53]=H,t[54]=de,t[55]=fe):fe=t[55];let pe;t[56]===T?pe=t[57]:(pe=T?(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,Z.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[56]=T,t[57]=pe);let me;t[58]!==v||t[59]!==x?(me=x.length>0&&(0,Z.jsx)(`g`,{children:x.map(Cf)},`firework-${v}`),t[58]=v,t[59]=x,t[60]=me):me=t[60];let he;t[61]!==D||t[62]!==s||t[63]!==z||t[64]!==fe||t[65]!==pe||t[66]!==me?(he=(0,Z.jsxs)(`svg`,{ref:f,width:s,height:s,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:z,"aria-hidden":`true`,onClick:D,onMouseDown:wf,children:[fe,pe,me]}),t[61]=D,t[62]=s,t[63]=z,t[64]=fe,t[65]=pe,t[66]=me,t[67]=he):he=t[67];let ge;return t[68]!==R||t[69]!==he?(ge=(0,Z.jsx)(`span`,{ref:d,className:R,children:he}),t[68]=R,t[69]=he,t[70]=ge):ge=t[70],ge}function Cf(e){return(0,Z.jsx)(`circle`,{cx:yf+e.originDx,cy:bf+e.originDy,r:e.size,className:`ok-blob-firework`,style:xf(e)},e.id)}function wf(e){return e.preventDefault()}function Tf(e){return e+1}function Ef(e){return e+1}var Df=(0,Q.lazy)(()=>n(()=>import(`./ReportBugDialogBody-BCRLTK8_.js`),__vite__mapDeps([5,1,6,2,3,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url)),Of=1200,kf=`[cmdk-root],[data-radix-popper-content-wrapper]`,Af=500;function jf(e){let t=(0,$.c)(8),[n,r]=(0,Q.useState)(e.open),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(0);e.open&&!n&&r(!0);let l,u;if(t[0]!==e.crashInvite||t[1]!==e.open?(l=()=>{if(!e.open){a(!1);return}let t=c.current+=1,n=window.okDesktop?.bugReport?.captureScreenshot;if(typeof n!=`function`||e.crashInvite!==void 0){s(null),a(!0);return}s(null);let r=!1,i=e=>{r||c.current!==t||(r=!0,s(e),a(!0))},o=setTimeout(()=>i(null),Of),l=performance.now(),u=0,d=()=>{if(c.current!==t)return;let e=performance.now()-l>=Af;if(document.querySelector(kf)!==null&&!e){u=requestAnimationFrame(d);return}u=requestAnimationFrame(()=>{c.current===t&&n().then(i).catch(()=>i(null))})};return u=requestAnimationFrame(d),()=>{c.current+=1,clearTimeout(o),cancelAnimationFrame(u)}},u=[e.open,e.crashInvite],t[0]=e.crashInvite,t[1]=e.open,t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,Q.useEffect)(l,u),!n)return null;let d=e.open&&i,f;return t[4]!==e||t[5]!==o||t[6]!==d?(f=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(Df,{...e,open:d,screenshot:o})}),t[4]=e,t[5]=o,t[6]=d,t[7]=f):f=t[7],f}var Mf=`ContextMenu`,[Nf,Pf]=vn(Mf,[Ur]),Ff=Ur(),[If,Lf]=Nf(Mf),Rf=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Q.useState(!1),c=Ff(t),l=_n(r),u=Q.useCallback(e=>{s(e),l(e)},[l]);return(0,Z.jsx)(If,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Z.jsx)(Br,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};Rf.displayName=Mf;var zf=`ContextMenuTrigger`,Bf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=Lf(zf,n),o=Ff(n),s=Q.useRef({x:0,y:0}),c=Q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Q.useRef(0),u=Q.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Q.useEffect(()=>u,[u]),Q.useEffect(()=>void(r&&u()),[r,u]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ar,{...o,virtualRef:c}),(0,Z.jsx)(mn.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:pn(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:pn(e.onPointerDown,hp(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:pn(e.onPointerMove,hp(u)),onPointerCancel:r?e.onPointerCancel:pn(e.onPointerCancel,hp(u)),onPointerUp:r?e.onPointerUp:pn(e.onPointerUp,hp(u))})]})});Bf.displayName=zf;var Vf=`ContextMenuPortal`,Hf=e=>{let{__scopeContextMenu:t,...n}=e,r=Ff(t);return(0,Z.jsx)(Mr,{...r,...n})};Hf.displayName=Vf;var Uf=`ContextMenuContent`,Wf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Lf(Uf,n),a=Ff(n),o=Q.useRef(!1);return(0,Z.jsx)(Dr,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Wf.displayName=Uf;var Gf=`ContextMenuGroup`,Kf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Yr,{...i,...r,ref:t})});Kf.displayName=Gf;var qf=`ContextMenuLabel`,Jf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(zr,{...i,...r,ref:t})});Jf.displayName=qf;var Yf=`ContextMenuItem`,Xf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Ir,{...i,...r,ref:t})});Xf.displayName=Yf;var Zf=`ContextMenuCheckboxItem`,Qf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Xr,{...i,...r,ref:t})});Qf.displayName=Zf;var $f=`ContextMenuRadioGroup`,ep=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Pr,{...i,...r,ref:t})});ep.displayName=$f;var tp=`ContextMenuRadioItem`,np=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Fr,{...i,...r,ref:t})});np.displayName=tp;var rp=`ContextMenuItemIndicator`,ip=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Lr,{...i,...r,ref:t})});ip.displayName=rp;var ap=`ContextMenuSeparator`,op=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(ai,{...i,...r,ref:t})});op.displayName=ap;var sp=`ContextMenuArrow`,cp=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Rr,{...i,...r,ref:t})});cp.displayName=sp;var lp=`ContextMenuSub`,up=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=Ff(t),[s,c]=gn({prop:i,defaultProp:a??!1,onChange:r,caller:lp});return(0,Z.jsx)(Or,{...o,open:s,onOpenChange:c,children:n})};up.displayName=lp;var dp=`ContextMenuSubTrigger`,fp=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Nr,{...i,...r,ref:t})});fp.displayName=dp;var pp=`ContextMenuSubContent`,mp=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Wr,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});mp.displayName=pp;function hp(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var gp=Rf,_p=Bf,vp=Hf,yp=Wf,bp=Kf,xp=Jf,Sp=Xf,Cp=Qf,wp=ip,Tp=op,Ep=up,Dp=fp,Op=mp,kp=`Tabs`,[Ap,jp]=vn(kp,[Tr]),Mp=Tr(),[Np,Pp]=Ap(kp),Fp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Cn(s),[d,f]=gn({prop:r,onChange:i,defaultProp:a??``,caller:kp});return(0,Z.jsx)(Np,{scope:n,baseId:hn(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,Z.jsx)(mn.div,{dir:u,"data-orientation":o,...l,ref:t})})});Fp.displayName=kp;var Ip=`TabsList`,Lp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Pp(Ip,n),o=Mp(n);return(0,Z.jsx)(wr,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,Z.jsx)(mn.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});Lp.displayName=Ip;var Rp=`TabsTrigger`,zp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Pp(Rp,n),s=Mp(n),c=Hp(o.baseId,r),l=Up(o.baseId,r),u=r===o.value;return(0,Z.jsx)(Er,{asChild:!0,...s,focusable:!i,active:u,children:(0,Z.jsx)(mn.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:pn(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:pn(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:pn(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});zp.displayName=Rp;var Bp=`TabsContent`,Vp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Pp(Bp,n),c=Hp(s.baseId,r),l=Up(s.baseId,r),u=r===s.value,d=Q.useRef(u);return Q.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,Z.jsx)(fn,{present:i||u,children:({present:n})=>(0,Z.jsx)(mn.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});Vp.displayName=Bp;function Hp(e,t){return`${e}-trigger-${t}`}function Up(e,t){return`${e}-content-${t}`}var Wp=Fp,Gp=Lp,Kp=zp,qp=Vp;function Jp(e){let t=(0,$.c)(24),{error:n,resetErrorBoundary:r}=e,{_:i}=jt(),[a,o]=(0,Q.useState)(!1),s=(0,Q.useRef)(null),c=typeof window<`u`?window.okDesktop:void 0,l;t[0]!==i||t[1]!==n?(l=n instanceof Error&&n.message?n.message:i({id:`W5A0Ly`}),t[0]=i,t[1]=n,t[2]=l):l=t[2];let u=l,d,f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{s.current?.focus()},f=[],t[3]=d,t[4]=f):(d=t[3],f=t[4]),(0,Q.useEffect)(d,f);let p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(Sf,{size:80,variant:`sleeping`}),t[5]=p):p=t[5];let m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`h1`,{id:`app-error-title`,className:`text-2xl font-light tracking-tighter text-balance`,children:(0,Z.jsx)(J,{id:`nwtY4N`})}),t[6]=m):m=t[6];let h;t[7]===u?h=t[8]:(h=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[m,(0,Z.jsx)(`p`,{className:`max-w-sm text-sm break-words text-muted-foreground`,children:u})]}),t[7]=u,t[8]=h);let g;t[9]===r?g=t[10]:(g=()=>r(),t[9]=r,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(J,{id:`KDw4GX`}),t[11]=_):_=t[11];let v;t[12]===g?v=t[13]:(v=(0,Z.jsx)(Y,{ref:s,variant:`default`,onClick:g,children:_}),t[12]=g,t[13]=v);let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=c?(0,Z.jsx)(Y,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>o(!0),children:(0,Z.jsx)(J,{id:`ii5mVn`})}):null,t[14]=y):y=t[14];let b;t[15]===v?b=t[16]:(b=(0,Z.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[v,y]}),t[15]=v,t[16]=b);let x;t[17]!==n||t[18]!==a?(x=c?(0,Z.jsx)(Zp,{children:(0,Z.jsx)(jf,{open:a,onOpenChange:o,systemWide:c.config.mode===`navigator`,crashContext:{source:`app shell`,errorMessage:n instanceof Error&&n.message?n.message:String(n)}})}):null,t[17]=n,t[18]=a,t[19]=x):x=t[19];let S;return t[20]!==b||t[21]!==x||t[22]!==h?(S=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`app-error-title`,"data-slot":`app-error-boundary`,className:`flex h-screen flex-col items-center justify-center gap-8 p-8 text-center`,children:[p,h,b,x]}),t[20]=b,t[21]=x,t[22]=h,t[23]=S):S=t[23],S}function Yp(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(I,{FallbackComponent:Jp,onError:Xp,children:n}),t[0]=n,t[1]=r),r}function Xp(e){console.error(`[AppErrorBoundary] app-shell render crash`,e)}function Zp(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(I,{fallback:null,onError:Qp,children:n}),t[0]=n,t[1]=r),r}function Qp(e){console.error(`[CrashReportingBoundary] crash-reporting UI render crash`,e)}var $p=dn(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),em=dn(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),tm=dn(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),nm=dn(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),rm=dn(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),im=dn(`book-marked`,[[`path`,{d:`M10 2v8l3-3 3 3V2`,key:`sqw3rj`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),am=e(cn(),1),om=[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]];dn(`bot`,om);var sm=dn(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),cm=dn(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),lm=dn(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),um=dn(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),dm=dn(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),fm=dn(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),pm=dn(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),mm=dn(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),hm=dn(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),gm=dn(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),_m=dn(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),vm=dn(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),ym=dn(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),bm=dn(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),xm=dn(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),Sm=dn(`fold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]),Cm=dn(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),wm=dn(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Tm=dn(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Em=dn(`grid-2x2-x`,[[`path`,{d:`M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3`,key:`11za1p`}],[`path`,{d:`m16 16 5 5`,key:`8tpb07`}],[`path`,{d:`m16 21 5-5`,key:`193jll`}]]),Dm=dn(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Om=dn(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),km=dn(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),Am=dn(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),jm=dn(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Mm=dn(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),Nm=dn(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Pm=dn(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Fm=dn(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),Im=dn(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Lm=dn(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Rm=dn(`megaphone`,[[`path`,{d:`M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z`,key:`q8bfy3`}],[`path`,{d:`M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14`,key:`1853fq`}],[`path`,{d:`M8 6v8`,key:`15ugcq`}]]),zm=dn(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Bm=dn(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Vm=dn(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Hm=dn(`panel-bottom`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),Um=dn(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Wm=dn(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Gm=dn(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Km=dn(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),qm=dn(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Jm=dn(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),Ym=dn(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),Xm=dn(`replace-all`,[[`path`,{d:`M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`zg1ipl`}],[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`txt6k4`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Zm=dn(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Qm=dn(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),$m=dn(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),eh=dn(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),th=dn(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),nh=dn(`spell-check`,[[`path`,{d:`m6 16 6-12 6 12`,key:`1b4byz`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`m16 20 2 2 4-4`,key:`13tcca`}]]),rh=dn(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),ih=dn(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ah=dn(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),oh=dn(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),sh=dn(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),ch=dn(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),lh=dn(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),uh=dn(`table-properties`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),dh=dn(`telescope`,[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]),fh=dn(`text-align-center`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M17 12H7`,key:`16if0g`}],[`path`,{d:`M19 19H5`,key:`vjpgq2`}]]),ph=dn(`text-align-end`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M21 19H7`,key:`4cu937`}]]),mh=dn(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),hh=dn(`text-quote`,[[`path`,{d:`M17 5H3`,key:`1cn7zz`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 19H8`,key:`13qgcb`}],[`path`,{d:`M3 12v7`,key:`1ri8j3`}]]),gh=dn(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),_h=dn(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),vh=dn(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),yh=dn(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),bh=dn(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]),xh=180,Sh=5e3;function Ch(e,t){if(e===``||t===``)return``;let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return`${e.replace(/[/\\]+$/,``)}${n}${t}`}function wh(e){if(e===``)return``;let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function Th(e){let{parent:t,sanitizedName:n,enclosingProject:r,enclosingGit:i,targetState:a}=e;return t===``||n===``?{kind:`idle`}:r===null?i===null?a===`exists-nonempty`?{kind:`block-nonempty`}:{kind:`free`}:{kind:`confirm-git`,gitRoot:i.gitRoot}:{kind:`block-nested`,rootPath:r.rootPath}}function Eh(e){let t=e instanceof Error?e.message:String(e);for(let e of Xo)if(t.startsWith(`${e}:`)||t.includes(`${e}: `))return e===`nested-project`||e===`target-not-empty`?{reason:e}:{reason:e,message:t};return{reason:`unknown`,message:t}}function Dh(e){switch(e.reason){case`nested-project`:return{id:`ScwcF2`};case`target-not-empty`:return{id:`e8L17t`};case`invalid-args`:return{id:`6bTTAN`};case`mkdir-failed`:return{id:`gJR87V`};case`git-init-failed`:return{id:`4CfgPM`};case`init-failed`:return{id:`l17ab4`};case`discovery-failed`:return{id:`ThmUrC`};case`unknown`:return{id:`AddR83`}}}function Oh(e){let t=(0,$.c)(186),{open:n,onOpenChange:r,bridge:i,initialPackId:a,packs:o}=e,{_:s}=jt(),c=(0,Q.useId)(),l=(0,Q.useId)(),u=(0,Q.useId)(),d=(0,Q.useId)(),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(Fh),[b,x]=(0,Q.useState)(`shared`),[S,C]=(0,Q.useState)(!1),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w={kind:`idle`},t[0]=w):w=t[0];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(`idle`),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(null),N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(N={kind:`idle`},t[1]=N):N=t[1];let[P,F]=(0,Q.useState)(N),[I,L]=(0,Q.useState)(0),R;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=new Set,t[2]=R):R=t[2];let z=(0,Q.useRef)(R),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H=(0,Q.useRef)(null),U=(0,Q.useRef)(0),W,G;t[3]!==i||t[4]!==n?(W=()=>{if(!n)return;z.current.clear(),M(null),E({kind:`idle`}),O(`idle`),A(!1),_(``),y(new Set(Vo)),x(`shared`),C(!1),F({kind:`idle`}),U.current+=1;let e=!1;p(``),h(!0),i.fs.defaultProjectsRoot().then(t=>{e||p(t)}).catch(Ph).finally(()=>{e||h(!1)});let t=requestAnimationFrame(()=>{H.current?.focus()});return()=>{e=!0,cancelAnimationFrame(t)}},G=[n,i],t[3]=i,t[4]=n,t[5]=W,t[6]=G):(W=t[5],G=t[6]),(0,Q.useEffect)(W,G);let K;t[7]!==i||t[8]!==f||t[9]!==g||t[10]!==n?(K=()=>{if(!n)return;V.current!==null&&clearTimeout(V.current),B.current!==null&&B.current.abort();let e=Na(g);if(f===``||e===``){E({kind:`idle`}),O(`idle`);return}let t=f,r=Ch(t,e),a=new AbortController;return B.current=a,V.current=setTimeout(()=>{O(`in-flight`),Promise.all([i.fs.findEnclosingProjectRoot(t),i.fs.findEnclosingGitRoot(t),i.fs.folderState(r)]).then(n=>{let[r,i,o]=n;a.signal.aborted||(O(`idle`),E(Th({parent:t,sanitizedName:e,enclosingProject:r,enclosingGit:i,targetState:o})))}).catch(e=>{a.signal.aborted||(console.warn(`[CreateProjectDialog] cascade probe failed:`,e),O(`idle`),E({kind:`free`}))})},xh),()=>{V.current!==null&&clearTimeout(V.current),a.abort()}},t[7]=i,t[8]=f,t[9]=g,t[10]=n,t[11]=K):K=t[11];let ee;t[12]!==i||t[13]!==f||t[14]!==g||t[15]!==n||t[16]!==I?(ee=[n,f,g,i,I],t[12]=i,t[13]=f,t[14]=g,t[15]=n,t[16]=I,t[17]=ee):ee=t[17],(0,Q.useEffect)(K,ee);let te,q;t[18]===n?(te=t[19],q=t[20]):(te=()=>{if(!n)return;let e=()=>L(Nh);return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},q=[n],t[18]=n,t[19]=te,t[20]=q),(0,Q.useEffect)(te,q);let ne=(0,Q.useRef)(`idle`),re,ie;t[21]===D?(re=t[22],ie=t[23]):(re=()=>{ne.current=D},ie=[D],t[21]=D,t[22]=re,t[23]=ie),(0,Q.useEffect)(re,ie);let ae,oe;t[24]!==T.kind||t[25]!==n?(ae=()=>{if(!n||T.kind!==`confirm-git`)return;let e=setInterval(()=>{ne.current!==`in-flight`&&L(Mh)},Sh);return()=>clearInterval(e)},oe=[n,T.kind],t[24]=T.kind,t[25]=n,t[26]=ae,t[27]=oe):(ae=t[26],oe=t[27]),(0,Q.useEffect)(ae,oe);let se;t[28]!==T.gitRoot||t[29]!==T.kind||t[30]!==P.gitRoot||t[31]!==P.kind?(se=()=>{if(T.kind!==`confirm-git`){P.kind!==`idle`&&(U.current+=1,F({kind:`idle`}));return}P.kind===`confirming`&&P.gitRoot!==T.gitRoot&&F({kind:`idle`}),P.kind===`pending`&&P.gitRoot!==T.gitRoot&&(U.current+=1,F({kind:`idle`}))},t[28]=T.gitRoot,t[29]=T.kind,t[30]=P.gitRoot,t[31]=P.kind,t[32]=se):se=t[32];let ce;t[33]!==T||t[34]!==P?(ce=[T,P],t[33]=T,t[34]=P,t[35]=ce):ce=t[35],(0,Q.useEffect)(se,ce);let le;t[36]!==i||t[37]!==T.kind||t[38]!==n?(le=()=>{if(!n)return;let e=null;T.kind===`block-nested`?e=`nested`:T.kind===`block-nonempty`?e=`nonempty`:T.kind===`confirm-git`&&(e=`git-confirm`),e!==null&&(z.current.has(e)||(z.current.add(e),i.project.recordCreateNewBannerShown(e).catch(jh)))},t[36]=i,t[37]=T.kind,t[38]=n,t[39]=le):le=t[39];let ue;t[40]!==i||t[41]!==T||t[42]!==n?(ue=[n,T,i],t[40]=i,t[41]=T,t[42]=n,t[43]=ue):ue=t[43],(0,Q.useEffect)(le,ue);let de;t[44]!==a||t[45]!==o?(de=o?.find(e=>e.id===a),t[44]=a,t[45]=o,t[46]=de):de=t[46];let fe=de,pe=g,me,he,ge,_e,ve;t[47]!==T.kind||t[48]!==f||t[49]!==pe?(_e=pe===``?``:Na(pe),he=pe!==``&&_e!==pe&&_e!==``,ge=pe!==``&&_e===``,me=T.kind===`block-nonempty`,ve=f!==``&&_e!==``?Ch(f,_e):``,t[47]=T.kind,t[48]=f,t[49]=pe,t[50]=me,t[51]=he,t[52]=ge,t[53]=_e,t[54]=ve):(me=t[50],he=t[51],ge=t[52],_e=t[53],ve=t[54]);let ye=ve,be=!k&&f!==``&&pe!==``&&_e!==``&&D===`idle`&&(T.kind===`free`||T.kind===`confirm-git`),xe=k||pe!==``&&!be,Se;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Se=function(e){y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[55]=Se):Se=t[55];let Ce=Se,we;t[56]!==i||t[57]!==f?(we=async function(){try{let e=await i.dialog.openFolder(f===``?void 0:{defaultPath:f});if(e===null)return;p(e),L(Ah),M(null)}catch(e){console.warn(`[CreateProjectDialog] dialog.openFolder failed:`,e)}},t[56]=i,t[57]=f,t[58]=we):we=t[58];let Te=we,Ee;t[59]!==s||t[60]!==i||t[61]!==k||t[62]!==be||t[63]!==v||t[64]!==a||t[65]!==f||t[66]!==r||t[67]!==pe||t[68]!==_e||t[69]!==b?(Ee=async function(e){if(e.preventDefault(),!k){if(pe.trim()===``){ul.error(s({id:`5OqaJi`})),H.current?.focus();return}if(be){A(!0),M(null);try{await i.project.createNew({parent:f,name:_e,editors:Array.from(v),sharing:b,packId:a}),r(!1)}catch(e){M(Eh(e)),A(!1)}}}},t[59]=s,t[60]=i,t[61]=k,t[62]=be,t[63]=v,t[64]=a,t[65]=f,t[66]=r,t[67]=pe,t[68]=_e,t[69]=b,t[70]=Ee):Ee=t[70];let De=Ee,Oe;t[71]!==k||t[72]!==r?(Oe=function(e){k||r(e)},t[71]=k,t[72]=r,t[73]=Oe):Oe=t[73];let ke=Oe,Ae;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=async function(e){F({kind:`confirming`,gitRoot:e})},t[74]=Ae):Ae=t[74];let je=Ae,Me;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(Me=async function(){F({kind:`idle`})},t[75]=Me):Me=t[75];let Ne=Me,Pe;t[76]===i?Pe=t[77]:(Pe=async function(e){let t=U.current+1;U.current=t,F({kind:`pending`,gitRoot:e});try{if(await i.fs.removeGitFolder(e),U.current!==t)return;L(kh),F({kind:`idle`})}catch(e){let n=e;if(U.current!==t)return;let r=n instanceof Error?n.message:String(n);console.error(`[CreateProjectDialog] bridge.fs.removeGitFolder failed:`,n),F({kind:`error`,message:r})}},t[76]=i,t[77]=Pe);let Fe=Pe,Ie;t[78]!==i||t[79]!==r?(Ie=async function(e){r(!1);try{await i.project.open({path:e,target:`new-window`,entryPoint:`create-new-nested-redirect`})}catch(e){console.warn(`[CreateProjectDialog] project.open failed:`,e)}},t[78]=i,t[79]=r,t[80]=Ie):Ie=t[80];let Le=Ie,Re=ge||me||he?`${u} ${d}`:u,ze;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,Z.jsx)(On,{children:(0,Z.jsx)(J,{id:`wbv9xO`})}),t[81]=ze):ze=t[81];let Be;t[82]===fe?Be=t[83]:(Be=(0,Z.jsxs)(Mn,{children:[ze,(0,Z.jsx)(Dn,{children:fe?(0,Z.jsx)(J,{id:`D2CwBE`,values:{0:fe.name,1:fe.entryCounts.folders},components:{0:(0,Z.jsx)(`strong`,{})}}):(0,Z.jsx)(J,{id:`O6yEPk`})})]}),t[82]=fe,t[83]=Be);let Ve;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,Z.jsx)(J,{id:`OyIC0Q`}),t[84]=Ve):Ve=t[84];let He;t[85]===l?He=t[86]:(He=(0,Z.jsx)(oi,{htmlFor:l,children:Ve}),t[85]=l,t[86]=He);let Ue;t[87]===s?Ue=t[88]:(Ue=s({id:`cV7LOw`}),t[87]=s,t[88]=Ue);let We;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(We=e=>_(e.target.value),t[89]=We):We=t[89];let Ge=ge||me,Ke;t[90]!==k||t[91]!==g||t[92]!==Re||t[93]!==l||t[94]!==Ue||t[95]!==Ge?(Ke=(0,Z.jsx)(gl,{id:l,ref:H,value:g,placeholder:Ue,onChange:We,disabled:k,autoComplete:`off`,"aria-invalid":Ge,"aria-describedby":Re,"data-testid":`create-name`}),t[90]=k,t[91]=g,t[92]=Re,t[93]=l,t[94]=Ue,t[95]=Ge,t[96]=Ke):Ke=t[96];let qe;t[97]!==d||t[98]!==me||t[99]!==he||t[100]!==ge||t[101]!==_e?(qe=ge?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-erased`,children:(0,Z.jsx)(J,{id:`_PBJRl`})}):me?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-taken`,children:(0,Z.jsx)(J,{id:`7apDiJ`,values:{sanitized:_e},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):he?(0,Z.jsx)(`p`,{id:d,role:`status`,"aria-live":`polite`,className:`text-1sm text-muted-foreground`,"data-testid":`create-name-hint-diverged`,children:(0,Z.jsx)(J,{id:`KnoB--`,values:{sanitized:_e},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[97]=d,t[98]=me,t[99]=he,t[100]=ge,t[101]=_e,t[102]=qe):qe=t[102];let Je;t[103]!==He||t[104]!==Ke||t[105]!==qe?(Je=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[He,Ke,qe]}),t[103]=He,t[104]=Ke,t[105]=qe,t[106]=Je):Je=t[106];let Ye;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,Z.jsx)(oi,{children:(0,Z.jsx)(J,{id:`wJijgU`})}),t[107]=Ye):Ye=t[107];let Xe;t[108]!==f||t[109]!==m?(Xe=f===``?m?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(J,{id:`iHAJDj`})}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(J,{id:`8m8diM`})}):f,t[108]=f,t[109]=m,t[110]=Xe):Xe=t[110];let Ze;t[111]===Xe?Ze=t[112]:(Ze=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 rounded-md border border-input bg-muted/50 px-2.5 py-1 text-sm text-foreground wrap-break-word`,"data-testid":`create-location-display`,children:Xe}),t[111]=Xe,t[112]=Ze);let Qe;t[113]===Te?Qe=t[114]:(Qe=()=>void Te(),t[113]=Te,t[114]=Qe);let $e;t[115]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,Z.jsx)(J,{id:`O2UpM1`}),t[115]=$e):$e=t[115];let et;t[116]!==k||t[117]!==Qe?(et=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`shrink-0`,disabled:k,onClick:Qe,"data-testid":`create-browse`,children:$e}),t[116]=k,t[117]=Qe,t[118]=et):et=t[118];let tt;t[119]!==Ze||t[120]!==et?(tt=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Ze,et]}),t[119]=Ze,t[120]=et,t[121]=tt):tt=t[121];let nt;t[122]===ye?nt=t[123]:(nt=ye===``?null:(0,Z.jsx)(J,{id:`k_yIIc`,values:{targetPreview:ye},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}}),t[122]=ye,t[123]=nt);let rt;t[124]!==u||t[125]!==nt?(rt=(0,Z.jsx)(`p`,{id:u,className:`text-1sm text-muted-foreground wrap-break-word`,"aria-live":`polite`,"data-testid":`create-target-caption`,children:nt}),t[124]=u,t[125]=nt,t[126]=rt):rt=t[126];let it;t[127]!==tt||t[128]!==rt?(it=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ye,tt,rt]}),t[127]=tt,t[128]=rt,t[129]=it):it=t[129];let at;t[130]!==T||t[131]!==Fe||t[132]!==Le||t[133]!==P?(at=(0,Z.jsx)(Ih,{cascade:T,onOpenNested:Le,removeGitState:P,onRequestRemoveGit:je,onCancelRemoveGit:Ne,onConfirmRemoveGit:Fe}),t[130]=T,t[131]=Fe,t[132]=Le,t[133]=P,t[134]=at):at=t[134];let ot;t[135]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,Z.jsxs)(Tn,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`create-advanced-trigger`,children:[(0,Z.jsx)(J,{id:`VNgKZz`}),(0,Z.jsx)(Ns,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[135]=ot):ot=t[135];let st;t[136]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,Z.jsx)(`legend`,{className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`0YEbfk`})}),t[136]=st):st=t[136];let ct;t[137]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`8IP5jY`})}),t[137]=ct):ct=t[137];let lt;t[138]!==k||t[139]!==v?(lt=Vo.map(e=>{let t=`create-editor-${e}`;return(0,Z.jsxs)(oi,{htmlFor:t,className:`text-sm font-normal`,children:[(0,Z.jsx)(pr,{id:t,checked:v.has(e),onCheckedChange:()=>Ce(e),disabled:k,"data-testid":`create-editor-${e}`}),(0,Z.jsx)(`span`,{children:Za[e]})]},e)}),t[138]=k,t[139]=v,t[140]=lt):lt=t[140];let ut;t[141]===lt?ut=t[142]:(ut=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col space-y-2 pb-2`,children:[st,ct,lt]}),t[141]=lt,t[142]=ut);let dt;t[143]!==k||t[144]!==b?(dt=(0,Z.jsx)(fl,{idPrefix:`create`,testIdPrefix:`create-sharing`,value:b,onValueChange:x,disabled:k}),t[143]=k,t[144]=b,t[145]=dt):dt=t[145];let ft;t[146]!==ut||t[147]!==dt?(ft=(0,Z.jsxs)(wn,{className:`space-y-6 border-t border-border px-3 py-4`,children:[ut,dt]}),t[146]=ut,t[147]=dt,t[148]=ft):ft=t[148];let pt;t[149]!==S||t[150]!==ft?(pt=(0,Z.jsxs)(En,{open:S,onOpenChange:C,className:`rounded-md border border-border`,"data-testid":`create-advanced`,children:[ot,ft]}),t[149]=S,t[150]=ft,t[151]=pt):pt=t[151];let mt;t[152]!==s||t[153]!==j?(mt=j===null?null:(0,Z.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-submit-error`,children:s(Dh(j))}),t[152]=s,t[153]=j,t[154]=mt):mt=t[154];let ht;t[155]!==c||t[156]!==De||t[157]!==Je||t[158]!==it||t[159]!==at||t[160]!==pt||t[161]!==mt?(ht=(0,Z.jsx)(An,{className:`space-y-6`,children:(0,Z.jsxs)(`form`,{id:c,onSubmit:De,"data-testid":`create-project-form`,className:`space-y-6`,children:[Je,it,at,pt,mt]})}),t[155]=c,t[156]=De,t[157]=Je,t[158]=it,t[159]=at,t[160]=pt,t[161]=mt,t[162]=ht):ht=t[162];let gt;t[163]===r?gt=t[164]:(gt=()=>r(!1),t[163]=r,t[164]=gt);let _t;t[165]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,Z.jsx)(J,{id:`dEgA5A`}),t[165]=_t):_t=t[165];let vt;t[166]!==k||t[167]!==gt?(vt=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:gt,disabled:k,"data-testid":`create-cancel`,children:_t}),t[166]=k,t[167]=gt,t[168]=vt):vt=t[168];let yt;t[169]===k?yt=t[170]:(yt=k?(0,Z.jsx)(J,{id:`E9bKSA`}):(0,Z.jsx)(J,{id:`hYgDIe`}),t[169]=k,t[170]=yt);let bt;t[171]!==c||t[172]!==xe||t[173]!==yt?(bt=(0,Z.jsx)(Y,{type:`submit`,form:c,disabled:xe,"data-testid":`create-submit`,children:yt}),t[171]=c,t[172]=xe,t[173]=yt,t[174]=bt):bt=t[174];let xt;t[175]!==vt||t[176]!==bt?(xt=(0,Z.jsxs)(jn,{children:[vt,bt]}),t[175]=vt,t[176]=bt,t[177]=xt):xt=t[177];let St;t[178]!==Be||t[179]!==ht||t[180]!==xt?(St=(0,Z.jsxs)(kn,{className:`sm:max-w-lg`,"data-testid":`create-project-dialog`,children:[Be,ht,xt]}),t[178]=Be,t[179]=ht,t[180]=xt,t[181]=St):St=t[181];let Ct;return t[182]!==ke||t[183]!==n||t[184]!==St?(Ct=(0,Z.jsx)(Nn,{open:n,onOpenChange:ke,children:St}),t[182]=ke,t[183]=n,t[184]=St,t[185]=Ct):Ct=t[185],Ct}function kh(e){return e+1}function Ah(e){return e+1}function jh(){}function Mh(e){return e+1}function Nh(e){return e+1}function Ph(e){console.warn(`[CreateProjectDialog] defaultProjectsRoot probe failed:`,e)}function Fh(){return new Set(Vo)}function Ih(e){let t=(0,$.c)(37),{cascade:n,onOpenNested:r,removeGitState:i,onRequestRemoveGit:a,onCancelRemoveGit:o,onConfirmRemoveGit:s}=e;if(n.kind===`idle`||n.kind===`free`||n.kind===`block-nonempty`)return null;if(n.kind===`block-nested`){let{rootPath:e}=n,i;t[0]===e?i=t[1]:(i=wh(e),t[0]=e,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o={rootPath:e},t[2]=e,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})},t[4]=s):s=t[4];let c;t[5]===o?c=t[6]:(c=(0,Z.jsx)(`p`,{className:`mb-2`,children:(0,Z.jsx)(J,{id:`W7XJN4`,values:o,components:s})}),t[5]=o,t[6]=c);let l;t[7]!==r||t[8]!==e?(l=()=>r(e),t[7]=r,t[8]=e,t[9]=l):l=t[9];let u;t[10]===a?u=t[11]:(u=(0,Z.jsx)(J,{id:`1Ta7Fd`,values:{basename:a}}),t[10]=a,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:l,"data-testid":`create-banner-nested-open`,children:u}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let f;return t[15]!==c||t[16]!==d?(f=(0,Z.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-banner-nested`,children:[c,d]}),t[15]=c,t[16]=d,t[17]=f):f=t[17],f}if(n.kind===`confirm-git`){let{gitRoot:e}=n,r;if(t[18]!==e){let n;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=/\/+$/,t[20]=n):n=t[20],r=e.replace(n,``),t[18]=e,t[19]=r}else r=t[19];let c=`${r}/.git`,l=i.kind===`error`?i.message:null,u;t[21]===e?u=t[22]:(u={gitRoot:e},t[21]=e,t[22]=u);let d;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(d={0:(0,Z.jsx)(`code`,{}),1:(0,Z.jsx)(`code`,{})},t[23]=d):d=t[23];let f;t[24]===u?f=t[25]:(f=(0,Z.jsx)(`p`,{children:(0,Z.jsx)(J,{id:`FEK4oC`,values:u,components:d})}),t[24]=u,t[25]=f);let p;t[26]!==e||t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==l||t[31]!==i.kind||t[32]!==c?(p=i.kind===`idle`||i.kind===`error`?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e),"data-testid":`create-banner-git-remove`,children:(0,Z.jsx)(J,{id:`YTLmTM`,components:{0:(0,Z.jsx)(`code`,{})}})}),i.kind===`error`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`create-banner-git-remove-error`,children:(0,Z.jsx)(J,{id:`SkMZlS`,values:{targetGitPath:c,removeGitError:l},components:{0:(0,Z.jsx)(`code`,{})}})}):null]}):(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 rounded border border-blue-400/60 bg-white/40 p-2 dark:border-blue-600/60 dark:bg-black/20`,"data-testid":`create-banner-git-remove-confirm`,children:[(0,Z.jsx)(`p`,{className:`text-xs`,children:(0,Z.jsx)(J,{id:`WZ-vBy`,values:{targetGitPath:c},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`destructive`,size:`sm`,disabled:i.kind===`pending`,onClick:()=>s(e),"data-testid":`create-banner-git-remove-confirm-button`,children:i.kind===`pending`?(0,Z.jsx)(J,{id:`0-31GV`}):(0,Z.jsx)(J,{id:`v-h2hx`,values:{targetGitPath:c}})}),(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,disabled:i.kind===`pending`,onClick:o,"data-testid":`create-banner-git-remove-cancel`,children:(0,Z.jsx)(J,{id:`dEgA5A`})})]})]}),t[26]=e,t[27]=o,t[28]=s,t[29]=a,t[30]=l,t[31]=i.kind,t[32]=c,t[33]=p):p=t[33];let m;return t[34]!==f||t[35]!==p?(m=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-900 dark:border-blue-700 dark:bg-blue-950 dark:text-blue-200`,"data-testid":`create-banner-git-confirm`,children:[f,p]}),t[34]=f,t[35]=p,t[36]=m):m=t[36],m}return null}var Lh=`open-knowledge:doc-panel-tab`,Rh=null;function zh(){let e=Rh;return Rh=null,e}function Bh(e,t=typeof window>`u`?new EventTarget:window){Rh=e,t.dispatchEvent(new CustomEvent(Lh,{detail:{tab:e}}))}function Vh(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(Lh,n),()=>t.removeEventListener(Lh,n)}function Hh(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`GitHub`}),r=(0,Z.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var Uh={messages:JSON.parse(`{"--T3kB":["Loading preview"],"-3Qbv7":[["count","plural",{"one":["matches ","#"," file"],"other":["matches ","#"," files"]}]],"-3ois8":["Hard break"],"-5jISU":[["0","plural",{"one":["#"," template"],"other":["#"," templates"]}]],"-8PP0T":["Match case"],"-K0AvT":["Disconnect"],"-LHLx7":["edited template"],"-QCLWk":["Templates available"],"-Qw-1t":["GitHub authentication failed. Try signing in again."],"-WFFG2":["Default properties"],"-YV1Uo":["Pattern ",["patternNumber"]],"-bFGPF":["Next change"],"-dNlfM":["Undid the last edit on ",["docName"]],"-g6KIS":["Unrecognized link"],"-gdcIo":["Auto-sync is on — your commits push and remote changes pull on intervals."],"-kbIAr":["Links & images"],"-lCAuQ":["Loading graph"],"-o5XAG":["Sent privately to the OpenKnowledge team, along with your note and app version. Never posted publicly."],"-q4abP":["Results capped — this workspace has more files than search can index. A missing file may be a cap artifact, not a typo."],"-r_Kx7":["Create skill"],"-slrNR":["Toggle a task list."],"-uaQnI":["No matching worktrees or branches."],"-wePNM":["Search matches file names, paths, and folders. Open a file to search its body (⌘F)."],"-zA2E7":["Couldn't create the worktree. Try a different name."],"-zy2Nq":["Type"],"0-31GV":["Removing"],"00c7t0":["Ask AI about this code block"],"02P3hL":["Upload failed: ",["message"]],"03wKPg":["A report helps us find the cause. Nothing is sent until you review it."],"04RA0-":["Failed to enable sync — ",["detail"]],"04XyCH":["Adds a managed block to ",["0"]],"05n5wS":["Doc mention suggestions"],"06SZfb":["Template \\"",["trimmedTitle"],"\\" created"],"07eGJB":["Couldn't move skill: ",["0"]],"07gHun":["You don't have access to this private repo. Sign in with an account that does."],"07q4Qk":["File sidebar"],"09Tv5j":["Reconnecting…"],"0BB9ID":["No headings yet."],"0BfhAj":["Reset view"],"0E9DR6":["Type to find a doc"],"0Er6-M":["Restarting"],"0Gd0NU":["Shared"],"0LBDjY":["\\"",["0"],"\\" uninstalled — back to a draft"],"0NA4b3":["Keep my version"],"0NkNB5":[["0"],"mo ago"],"0SBTff":["Show terminal"],"0TnCvC":["Rename ",["0"]],"0YEbfk":["Connect to AI tools"],"0YUS3Q":["Subfolder under current folder"],"0_J12R":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in ",["targetLabel"]],"0eHrMb":["Could not complete delete"],"0g7rCZ":["Duplicated to \\"",["0"],"\\""],"0inVGS":["Helps your coding agent recognize OpenKnowledge projects and route reads and writes through it."],"0jD-Gn":["A team knowledge base, a personal wiki, project docs..."],"0kTAXe":["Open source: ",["mirrorSrc"]],"0qyKG6":["Synced from disk"],"0rwwOn":["By tag"],"0s8-e8":["Select, enter, or leave block components and fallback source blocks from keyboard boundaries."],"0t0bbC":["Could not save sync preference: ",["detail"]],"0uTHCg":["Start a new OpenKnowledge project."],"0wswKc":["Horizontal rule that divides sections."],"0xnmlQ":["Repository name"],"0yL--g":["Review conflicts"],"10g8I_":["Turn off Only markdown files"],"12F9WL":["(no id)"],"151wvk":["Show sidebar"],"16D5Zj":["Are you sure you want to delete ",["itemName"],"? This action cannot be undone."],"170Js2":["Hide panel"],"1AumWo":["Push failed — check the server logs for details."],"1CalO6":["Style"],"1EcCom":[["keyName"]," value"],"1FLarN":["Describe what you want to create to continue"],"1GhYxC":["of ",["totalPages"]],"1HBhDS":["Checking out files"],"1MGRQl":["Terminal sessions"],"1OKzC_":["Your report couldn't be sent. Try again or email it instead."],"1QfxQT":["Dismiss"],"1RluQD":["Show replace"],"1TNIig":["Open"],"1Ta7Fd":["Open ",["basename"]],"1XSMhZ":["Switching to <0>local-only</0> will refuse until they're untracked via<1> git rm --cached</1>."],"1YJ4Yg":["Update available",["0"]],"1ZpfyB":["Open with AI ",["displayName"],", ",["hint"]],"1bDVu5":["Workspace Command Palette"],"1d1F11":["Select all files and folders"],"1di5fu":["Document not found"],"1hvhf0":["The folder on disk and the id agents use to invoke this skill."],"1njn7W":["Light"],"1nke1r":["Open ",["0"]," on GitHub (opens in a new tab)"],"1t_NnN":["Reject"],"2-CeZn":["Your report is saved on this Mac, so nothing was lost. You can email it to us instead."],"2277Tu":["Collapse graph"],"237hSL":["Ended"],"25Pw6a":["Cloning"],"27XW26":["Clone happens in the Project Navigator. Reclick the share link there."],"28B21t":["Agent Skills"],"29VNqC":["Unknown error"],"29XZXN":["Set git identity"],"2AIVbm":["Review your report"],"2B6eYX":["What this checkbox changes"],"2BBAbc":["List"],"2FYpfJ":["More"],"2FnYUD":["App & system info, recent app logs, and project server logs: the essentials we need to reproduce the issue."],"2G-56b":["Failed to update markdownlint rules"],"2GT3Hf":["Global"],"2H43L8":["Secrets like API keys and tokens are redacted automatically."],"2IYGkU":["This doc has unpushed changes. Recipients will see the last pushed version."],"2QM24L":["All tags"],"2RBzMG":["Network error — check your connection and try again"],"2Snes1":["This sends the link's address off your machine"],"2XQ8Ww":["Open preview when agent edits"],"2YOwme":["Restarted — now running v",["appRuntime"],"."],"2YZwPB":["Forward-links response did not match expected shape."],"2bVHbB":["Available in every project on this computer."],"2hYmUH":["my@email.com"],"2hpdRq":["Hide panel (",["panelShortcutLabel"],")"],"2j1kfc":["Enter a valid URL (for example https://api.openai.com/v1)."],"2m_bmh":[["label"]," (",["0"],")"],"2myNzt":["We've filed it with the team and attached your logs."],"2n3oDU":["Project-level pages ordered by inbound link count, up to ",["FULLSCREEN_HUB_LIMIT"]," results."],"2q_Q7x":["Visibility"],"2ryd91":["Failed to rename property"],"2tgFCe":["Starting clone"],"2vIPtm":["Open link in new tab"],"2wxgft":["Rename"],"322lyb":["Highlight tips, warnings, and notes."],"34qyH5":["Could not reach server"],"36WXSC":["Couldn't delete template: ",["error"]],"36aWJD":["Join us on Discord"],"38foVZ":["Loading diff"],"3BnyYc":["This doc isn't on GitHub yet. The link won't work until it's pushed."],"3DJEEt":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"3DTatP":["Copy a prompt for your agent, start a blank file, or scaffold from a template."],"3FMvls":["A short line shown under the title in the template list."],"3Fcb0I":["Open graph"],"3HNlwb":["Hello, world!"],"3Ib6FN":["Move down"],"3Ijjy1":["Couldn't load this skill's files."],"3IseAk":["Install an AI agent to create with AI"],"3J7d2N":["Big section heading."],"3JYy1p":["Branch ",["0"]," no longer exists. Cloned to default branch."],"3MnvrL":["Showing top ",["0"]," matches — keep typing to narrow"],"3Mwaly":["Could not initialize ",["0"],"."],"3SDfZl":["<0>Mirror — pick a source.</0> Set <1>src</1> + <2>anchor</2> via the property panel to point at a <3><MirrorSource></3> elsewhere."],"3TCafD":["Stored on this machine."],"3VbwPp":["Open ",["keyName"]," in browser"],"3VsNTI":["Loading document"],"3YWddZ":["No content changes in this version"],"3YvS-c":["New tab"],"3_6U6f":["Connect to GitHub"],"3__SjS":["breadcrumb"],"3a_Bd7":["Open source doc: ",["mirrorSrc"]],"3aeN7X":["All files"],"3cOo2C":["Create a folder from the current document or folder context."],"3ePd3I":["What's new"],"3h5zMp":["Something went wrong loading the settings panel."],"3iyGWF":["Open recent project"],"3jod3l":["Connect GitHub"],"3l_cXP":["Take a look if you'd like. This exact file is what we receive."],"3m2GBo":["Searching docs"],"3mFsc3":["Restore with remote changes"],"3o3tur":["Starter content"],"3oh0nQ":["Nested .okignore error in ",["path"]],"3pU8e-":["Pin tab"],"3wiBAs":["Where should it live?"],"3y6XTb":["Semantic search"],"3zyg_A":["Ignore patterns"],"438Fca":["Cloned successfully, but could not open the project."],"44DSl0":["Already have a git repository? Add it with <0>git remote add origin <url></0> in this project's folder. This page updates automatically once a remote is detected."],"45MZFs":["Commands"],"47EXvY":["This replaces the current skill content with the bundled version ",["0"]," (you have ",["1"],"). Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"484LKL":["Remove link"],"48uGTI":["Failed to load docs. Press Escape and re-open to retry."],"4A3Yzu":["Code block"],"4BITzH":["Error:"],"4CfgPM":["Project folder created, but git init failed. Try again."],"4E9jPa":["Create your first project"],"4Gz2wC":["Failed to upload file"],"4KmEoC":["Hotkeys"],"4NC2Ym":["Move to the next or previous table cell."],"4PYsOz":["Hide Files (",["sidebarShortcutLabel"],")"],"4Sxexw":["Source undo or redo"],"4TzU0n":["Initialize"],"4XL6N4":["Detected from the editors this project is set up for. Adjust to control where every skill installs."],"4buZWd":["Inherited from ",["path"]],"4c_a6S":["Nothing set yet."],"4g19V6":["Failed to update property"],"4h3e0H":["Couldn't update skills sharing — ",["detail"],"."],"4hJhzz":["Table"],"4ieVh2":["Pick “Custom” above to use this palette."],"4jDd0j":["Anyone can see"],"4mLBx9":["Subscriptions aren't available right now."],"4niEzY":["Sandboxed HTML embed — write HTML, see the rendered preview live."],"4nj6n8":["/api/config returned HTTP ",["code"]],"4rjwLG":["Create with ",["0"]," CLI"],"4sKwf6":["File already exists"],"4uNLmk":["Pulling"],"4v2Yyz":["Select every visible file-tree row when focus is in the Files sidebar."],"4xtLTl":["Hidden folder “",["basename"],"”"],"4zEZS5":["Auto-sync is on for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"4zGlN_":["Paste image URL or click upload"],"4z_1j2":["Rendered"],"5-FeN2":["Share URL"],"5-o4kO":["Only markdown files"],"50ORFs":["Reset ",["0"]," to default"],"54Y6Fg":["Could not load templates. Try again later."],"56WWtu":["Couldn't load starter packs: ",["error"]],"56xUL1":["Property name"],"57fiu8":["(read-only — edit in source mode for now)"],"5ALjdr":["Move through visual-editor find results from the find field."],"5Ajb15":["The formula <0>c = √(a² + b²)</0> renders inline."],"5AzM72":["This setting is per-machine and isn't shared with collaborators."],"5ClEAu":["Inline hashtag for cross-doc grouping."],"5D3Ior":["Hide folder"],"5DFPDh":["Started a fresh OpenKnowledge server (v",["appRuntime"],") for this dev session — the server already running for this project was terminated. Connected agents (Claude Code, Codex, Cursor) just lost their OpenKnowledge MCP connection; restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"5F5HYj":[["ahead"]," ahead, ",["behind"]," behind"],"5GKMSz":["Indent or outdent the current list item."],"5GRxoA":["Search files, folders, and commands for the current workspace."],"5LXwX8":["This permanently removes ",["path"],". Agents that reference this template by name will fail until it's recreated or replaced by one in a parent folder."],"5OTgC7":["Open and focus the bottom Ask AI prompt composer."],"5OqaJi":["Enter a project name"],"5PHgV2":["You can also create one from a terminal with <0>ok bug-report</0>."],"5QGTaA":["Could not copy relative path"],"5SwVv1":["Not installed"],"5Tk8Fb":["Loading files"],"5Umg9i":["Disable external link previews"],"5WDhAk":["Link to a page or external URL."],"5ZB7XC":["File drop zone"],"5ZbJFS":["Your current version is saved first, so this is reversible."],"5_8TCr":["Fix all (",["count"],")"],"5_j-DA":["Kill Terminal"],"5e1Dri":["The menu label agents pick this template by (required)."],"5gr_ev":["Becomes the document's content when someone creates a doc from this template. Type <0>",["dateToken"],"</0> or <1>",["userToken"],"</1> to fill in today's date or the author's name automatically."],"5kWklo":["(some may already be hidden by other rules)"],"5lWFkC":["Sign in"],"5mksg0":["Failed to disable semantic search — ",["detail"]],"5qNxOe":[["count","plural",{"one":["#"," item could not be moved to the Trash. Do you want to permanently delete instead?"],"other":["#"," items could not be moved to the Trash. Do you want to permanently delete instead?"]}]],"5wV2qQ":["and more"],"5y_9lO":["Waiting for authorization"],"6-wLTJ":[["behind"]," behind origin"],"60vpJN":["What were you doing?"],"62Pc08":["Install for Claude Chat & Cowork (Desktop App)"],"62bOuM":["Latest edit"],"636K3K":["Delete adjacent chip"],"67f-3g":["Duplicate succeeded but the sidebar may be out of date — refresh to resync"],"6Aih4U":["Offline"],"6EKG_c":["What agents match on to decide when to use the skill."],"6HCOwA":["Failed to open."],"6KCH4m":["Hidden files"],"6LbUG7":["The repository is private and your GitHub account doesn't have access to it."],"6MnZEC":["Terminal failed to load"],"6O626z":["No headings match \\"",["trimmedAnchorQuery"],"\\""],"6Pxqwv":["No project templates yet. Create one to make it available everywhere in this project. Folder-scoped templates live on each folder's overview page."],"6Uau97":["Skip"],"6V3Ea3":["Copied"],"6VqW-1":["Remove ",["keyName"]],"6WdDG7":["Page"],"6YtxFj":["Name"],"6ZhdPI":["What the agent may read, write, and surface."],"6_ZOw4":["Copied full path"],"6bTTAN":["Invalid input — pick a different folder."],"6cR-PU":["Already open"],"6caB2T":["Connect an existing repository"],"6cuT_1":["Open date picker for ",["keyName"]],"6cyguR":["Connect GitHub to continue."],"6eniID":["Map the architecture"],"6fGjTz":["Show fewer"],"6g2jsp":["Update skill"],"6gRgw8":["Retry"],"6h4zVU":["What would you like to create?"],"6hfDJr":["Server error: ",["status"]],"6iDEWA":["Show panel"],"6ibbCg":["Create your first file"],"6ki7F2":[["0","plural",{"one":["#"," item"],"other":["#"," items"]}]],"6lGV3K":["Show less"],"6m_7We":["Open this settings dialog."],"6q0rnH":["writing"],"6qMe0o":["Draft a technical spec for my project. Start with an overview, then add cross-linked pages for the architecture, the key modules, and the open questions, all linked from a specs index."],"6s7LXO":["Heads up"],"6u9LvN":[["days","plural",{"one":["#"," day ago"],"other":["#"," days ago"]}]],"6vEr3W":["Link target"],"6zzhQL":["Send your report by email"],"72xhRD":["Diagram view mode"],"74-bX-":["A pull quote stands out from the surrounding text."],"74eHt-":["No file or folder selected"],"75Y1dk":["Horizontal pill strip + active panel below; click a pill to switch panels."],"77SdEP":["Delete ",["itemName"]],"7FamGZ":["Go to line"],"7Fkcej":["+ Add ",["addChildName"]],"7H4UHD":["Documents tagged <0>#",["tagName"],"</0>"],"7JtSLi":["Failed to delete path"],"7OhaRy":["Source search"],"7Ongq0":["Condense my AGENTS.md file to less than 40k characters"],"7OwvEL":["Show HTML preview"],"7PNNNs":["This sends content off your machine"],"7PXYaF":["<0>ok</0> won't run in external terminals until you add it later from the File menu. OpenKnowledge's built-in terminal and AI tools keep working."],"7PzzBU":["User"],"7YRrJ9":["Available in the OpenKnowledge desktop app. From a terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."],"7_bFEL":["Drag ",["patternText"]," to reorder"],"7apDiJ":["A folder named <0>",["sanitized"],"</0> already has files here. Pick a different name."],"7d1a0d":["Public"],"7hctf2":["Describe the project you want to create"],"7jIIFX":["You're all set up!"],"7qRHf0":["Install for Claude Chat & Cowork"],"7uBlRT":["Copy the focused file-tree item so Paste can duplicate it."],"80c4-P":["Code copied to clipboard"],"81H_23":["Add properties"],"881Uwh":["Delete selected table"],"89TtiD":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in the project root"],"89y7ar":[["sizeText"]," · secrets redacted"],"8F1i42":["Page not found"],"8FqTCr":[["chunksRemaining","plural",{"one":["#"," unresolved hunk"],"other":["#"," unresolved hunks"]}]],"8Gzz2G":["worktree of ",["worktreeOf"]],"8IP5jY":["Each selected tool gets an OpenKnowledge MCP entry."],"8Jm2EP":["Toggle heading levels 1 through 6."],"8OGgNM":["Open or close visual-editor find."],"8OxKZy":["Move succeeded but the sidebar may be out of date — refresh to resync"],"8PifYj":["Mermaid diagram"],"8PmoQF":["Open the insert menu in an empty or active text position."],"8RtNI0":["Failed to load documents"],"8TvlHF":["Crash dump"],"8Vq20-":["Switch worktree"],"8XQRON":["Loading repositories"],"8_brI5":["Name is required"],"8cS0nH":["Config sharing unavailable: ",["0"],"."],"8cpOa8":["Couldn't disconnect — please try again."],"8cpeU3":["Shared repositories"],"8eW0WQ":["No matching repositories."],"8fRyLo":["Invalid patch payload"],"8fc_3j":["Protected branch — cannot push"],"8lwQlE":[["0"]," added, ",["1"]," removed"],"8m8diM":["No location selected. Use Browse to choose a folder."],"8nWu1k":["Empty diagram"],"8tjQCz":["Explore"],"8uAWix":["This template lives in a parent folder — deleting it affects every folder beneath it that doesn't define its own version."],"8vETh9":["Show"],"92rbk2":["Mirror loading <0>",["mirrorRef"],"</0>"],"96G6Re":["New folder"],"96w9hU":["Something went wrong opening this file (HTTP ",["status"],")."],"99eR72":["Visual editor table selection"],"9Bd18D":["Failed to load hub pages"],"9KooKn":["Run a project audit from the Problems panel."],"9NJWgv":["Backlinks"],"9OIqw4":["You don't have write access to this repo."],"9PQysm":["Hide advanced"],"9R7pRC":["No tags match \\"",["trimmed"],"\\". Continue typing to create one."],"9UQ730":["Clone"],"9V0W-R":["Adds the OpenKnowledge skill to the <0>Claude Desktop App</0> so it's available in Chat and Cowork sessions."],"9XIEYq":["Attach the file in an email to <0/>"],"9bCiQ8":["No pages are missing incoming graph links."],"9clcD5":["Open documents tagged #",["chip"]],"9dw5bW":["Create with ",["0"]],"9euN0m":[["count","plural",{"one":["#"," more cross-doc participant"],"other":["#"," more cross-doc participants"]}]],"9fhQRL":["Beta channel"],"9fvog2":["Preview unavailable: ",["errorDetail"]],"9i21pa":["Commits happen automatically"],"9jnjV0":["Embed an audio file with native player controls."],"9mEZeD":[["name"]," CLI"],"9npOH9":["Open file"],"9o1bIV":[["behind"]," behind"],"9oE4C3":["Browse your repos:"],"9sBe85":["Follow us on"],"9tJX8r":["By meaning"],"9uI_rE":["Undo"],"9xCnv8":["Hide Terminal"],"9zb2WA":["Connecting"],"A1taO8":["Search"],"A50vr3":["Use lowercase letters, digits, and <0>-</0> only."],"A5CYnd":["Broken link"],"A5hiCy":["Create template"],"A67Uwj":["Still loading"],"A6h5b-":["File duplicated"],"AAlr5Y":["No collab server for this worktree — run <0>ok start</0> here, or reopen the project."],"AB4qw9":["New terminal"],"AE7BY3":["The terminal session ended."],"AIn2Yv":[["displayName"]," CLI, ",["hint"]],"AItsE5":["Open it there"],"AKxFtn":[["openedWorktreeCount","plural",{"one":["worktree"],"other":["worktrees"]}]],"ALhMYW":["Terminal"],"AQ-Lfg":["Couldn't load templates"],"AQGtjK":["Commands run with the full access of your macOS user account on this machine. Turn this off to disable the shell."],"ATGYL1":["Email address"],"AVW-K9":["Failed to load orphan pages"],"AWOSPo":["Zoom in"],"AaaESH":["Auto-sync is off for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"AcK_r0":["Claude CLI"],"AczYxH":["Custom open-knowledge entry — not managed by OpenKnowledge"],"AdcGcG":["Applying your change"],"AddR83":["Could not create project. Try again or pick a different location."],"AeHuzT":["# One pattern per line.\\n# Examples:\\n# drafts/\\n# *.draft.md\\n# !keep.md"],"AeXO77":["Account"],"AhoGwP":["Set up OpenKnowledge integrations"],"AiNMQ7":["This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."],"Aif3E7":["Enable semantic search"],"Am78jY":["Drag ",["keyName"]," to reorder"],"ApeA0n":["Undid ",["dropCount"]," edits on ",["docName"]],"Aq-O0x":["status"],"AqnqMJ":["API key set"],"AsqRE_":["Default location for new attachments"],"AtBdnD":["Couldn't delete skill: ",["error"]],"B11p-O":["Edit markdown link"],"B2DrPb":["Auto-save"],"B2Srgd":[["packName"]," skill installed."],"B3NAZC":["Open Navigator"],"B4_ipX":[["conflictCount","plural",{"one":["#"," file conflicted"],"other":["#"," files conflicted"]}]],"BAH4qX":["Selected graph item"],"BBqGS9":["Desktop"],"BD0XSC":["Failed to load project templates"],"BEkF-P":[["userName"],", ",["tabCount","plural",{"one":["#"," concurrent tab"],"other":["#"," concurrent tabs"]}]],"BGHHtQ":["Single page"],"BH56dn":["Custom display text"],"BQKHuL":["Restart terminal"],"BQu9Pg":["Symlink"],"BUyQnq":["Couldn't restart the server. Try \`ok start\` in this folder."],"BY-g4_":["Add pattern"],"Bdha5y":["Publishing..."],"BeWTQy":["Loading starter packs"],"BgV29F":["Visual editor find input focused"],"Bh9671":["This project is local-only, so .ok/skills is hidden from git and these skills can't be committed or shared. Share just the skills folder — the rest of your OK config stays on this computer."],"Bn9-El":["default"],"Bv5a9_":["Selection statistics"],"Bx4EXG":["Actions for ",["label"]],"By-7Pn":["Toggle a bullet list."],"BymzO4":["Document outline"],"C0hoX6":["Always included"],"C37Zkt":["Send to"],"C62P6b":["Editor selection"],"C7XjNB":["Global Skill"],"C9TBvF":["No Outgoing"],"CCTop_":["Recent"],"CFnavk":["This project isn't a git repository, so worktrees aren't available."],"CKyk7Q":["Go back"],"COr1Y7":["Pick <0>openknowledge.skill</0> from your <1>Downloads</1> folder. It enables automatically."],"CSL0l1":["Couldn't clear the key — please try again."],"CTJLpz":["\\"",["trimmed"],"\\" already exists here"],"CU3AiE":["Switching branches"],"CWzc2T":["<0>~/.ok/bin</0> and <1>~/.ok/env.sh</1> stay either way — the app always maintains them."],"CXTwen":["Can't safely edit this project config"],"CXj9C-":["New property name"],"C_Lyvh":["Failed to save theme setting"],"C_WGy8":["This file is too large to open in the built-in text editor (1 MB limit). Use Open file below to open it in another app."],"C_cPoW":["Your GitHub session expired — sign in again to verify push access."],"ChAtFg":["You don't have permission to push to this repo"],"CifUuG":["Update available"],"Ck9XRt":["Couldn't save the key — please try again."],"CmeH9S":["Add property to ",["keyName"]],"CoHvYd":["Moved ",["0"]," to position ",["1"]," of ",["2"]],"CvsD6Y":["via ",["viaTags"]],"D-Oh1s":["How to set up ",["0"]," (opens in browser)"],"D12vtS":["(detached)"],"D2CwBE":["Create a new OpenKnowledge project from the <0>",["0"],"</0> starter pack (",["1","plural",{"one":["#"," folder"],"other":["#"," folders"]}]," and starter templates) in the folder of your choice."],"D4H2N6":["Remove ",["tag"]],"D8OV7J":["Only collaborators"],"DDTdLl":["Code block settings"],"DELNQk":["Collaborators see your in-progress edits as soon as they sync."],"DEWDbv":["Show diagram"],"DF1MtZ":["Loading conflict for ",["filePath"]],"DFfRbX":["Sync status: ",["syncStateLabel"]," — git identity unset"],"DId6MT":["Project-level pages with no outgoing graph edges."],"DJd000":["Activate the previous editor tab."],"DPfwMq":["Done"],"DTI-fp":["This ",["targetNoun"]," only exists on branch <0>",["shareBranch"],"</0>. You have uncommitted changes that prevent switching here — open it in a worktree to leave your changes untouched."],"DVh_Tb":["Failed to clean up after trash"],"DXd9LM":["New worktree"],"D_WKe_":["Click an agent's avatar in the presence bar to view their session."],"DbILZA":["No matches. Some files are excluded from search (hidden or ignored files)."],"DcLaew":["Custom theme"],"DeDYLr":["Unrecognized wiki link"],"DgcGrb":[["fileCount","plural",{"one":["file"],"other":["files"]}]],"DhK_hZ":["Moved \\"",["name"],"\\" to ",["0"]," (",["skipped"]," binary file(s) not copied)"],"DhLHEb":["Failed to load activity"],"DiFKSL":["Counting markdown files"],"Dnn2XG":["Automatic"],"DrYM2Z":["Sync disabled"],"DsDwR-":[["0","plural",{"one":["#"," error"],"other":["#"," errors"]}]],"DskIkK":["Sign-in stream ended without confirmation — please try again"],"Dub54T":["Preview browsers can't auto-copy. Use Cmd/Ctrl+C on the URL above, or open OK in the desktop app."],"Dvwa0U":["Create a worktree from this branch"],"Dw1T_W":["Rename ",["label"]],"E1Da_b":["This permanently removes ",["0"],". Agents that invoke this skill by name will fail until it's recreated."],"E1_c72":["Task list"],"E1tG2u":["Get Claude Code"],"E2Mv-X":["Copy source"],"E4XYYH":["Enable terminal for this project"],"E5WeIy":["Reopen the most recently closed editor tab."],"E6lrpp":["Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."],"E7BhZn":["Blank note"],"E9bKSA":["Creating"],"EARn6h":["Couldn't share skills — ",["detail"],"."],"EBVbtP":["Could not duplicate item"],"EDl9kS":["Subscribe"],"EDm3wJ":["Loading diff renderer"],"EEYbdt":["Publish"],"EHu0x2":["Syncing"],"EJuO7B":["Connect a GitHub account to browse and sync your repositories."],"ELYtNJ":[".ok folders"],"EL_YRd":["Mirror of <0>api-spec</0>"],"ENpRJV":["External link previews"],"EOjU5V":["Inline Math Properties"],"ETyvvg":["No language match."],"EVnzPs":["Edit with AI"],"EWPtMO":["Code"],"EWX92Z":["Collapse Ask AI"],"EZVxVz":["Replace the active match from the replace field."],"E_BHoD":["Could not move \\"",["targetName"],"\\" to the Trash. Do you want to permanently delete instead?"],"E_tNGD":["Connected as @",["login"]],"Ea1prf":["Choose which editors every skill in this project installs into."],"EarrCe":["Search emoji"],"Eax_et":["Accent"],"EbZT7P":["Toggle the left file sidebar."],"EbjWsS":["Current commit"],"EcM3k7":["Failed to clean up pending ",["kind"]],"EcR0fl":["Checking for installed agents"],"EdQY6l":["None"],"Ef7StM":["Unknown"],"EhDLBx":["You modified <0>",["filePath"],"</0> locally, but it was deleted upstream."],"Ehkru0":["Open, navigate, accept, or dismiss CodeMirror completion suggestions."],"EiVgl5":["You don't have permission to push to this repo."],"Eji13z":["Toggle highlight formatting."],"EkH9pt":["Update"],"El7NbA":["Heading 2"],"Emz5BG":["Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."],"EoaQyO":["Append-only log of what changed."],"EqrC_R":["Undo failed: ",["message"]],"EqtBXb":["Visual editor find open"],"ErRi6L":["Template \\"",["label"],"\\" deleted"],"Es-eZU":["Remove from recent projects"],"Ev2r9A":["No results"],"EvPX7f":["Opens a folder picker to choose where to clone the repository."],"Evq3lu":["Orphan mode"],"ExPiRQ":["Move to the next CodeMirror lint diagnostic."],"ExUzM4":["skill \\"",["0"],"\\""],"F-NRCj":["Add property"],"F-vBv0":["Ask"],"F0OA00":["Get ",["displayName"]],"F1T9y_":["Showing top matches — keep typing to narrow"],"F4IYWe":["Share doc"],"F4vEsL":["Sync status: ",["syncStateLabel"]],"F6pfE9":["Active"],"FBknns":["HTML"],"FCAcjR":["Run a real terminal docked inside OpenKnowledge, starting in this project's folder."],"FCxvG5":["First item"],"FEK4oC":["OpenKnowledge will be initialized at <0>",["gitRoot"],"</0> — the parent of your new folder, because it contains a <1>.git</1> folder (one project per git repo)."],"FEqWFL":["Guides your AI agents on how to work here."],"FEr96N":["Theme"],"FNTx6u":["Search \\"",["semanticSubmitQuery"],"\\" by meaning"],"FOGD7m":["Create something great."],"FRYB1Q":["/api/config returned a malformed body"],"FRqZ9v":["Couldn't update skill: ",["0"]],"FTUGgh":["Enter a repository URL or owner/repo"],"FUMerq":["Could not enable sync: ",["detail"]],"FWQuPE":["This project is running a different, incompatible build of OpenKnowledge than this app (v",["0"],")."],"FXk_zY":["Adds a guided workflow for authoring new Agent Skills."],"FZtBeR":["Enable ",["0"]],"FgRAvd":["Logs & system info"],"FjkaiT":["Zoom out"],"FnMkli":["Sync disabled — you don't have permission to push"],"FqTpiN":["Bird wiki"],"Fqr8BP":["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],"Fsx78O":["Add the <0>ok</0> command to your terminal"],"FvMSms":["Renaming changes the file on disk and the id agents use to pick this template."],"FvpFSZ":["Reveal in Finder, ",["hint"]],"Fxf4jq":["Description (optional)"],"Fy4GgU":["Explain how your codebase works so teammates and AI agents can find their way around. Good for documenting the architecture, the main parts, and the questions new contributors always ask."],"FyW0WO":["Authorize in browser"],"G-JBA1":["Source mode requires a live connection — your edits are saved and will appear when you reconnect."],"G-h6qN":[["0","plural",{"one":["#"," option set"],"other":["#"," options set"]}]],"G0YZ-I":["Indent or outdent list item"],"G1Gw0v":["New template"],"G1XxbZ":["Checkbox"],"G4-bgo":["Ask AI (from selection)"],"G7-rf8":["Pattern syntax error: ",["message"]],"G7cMuO":["HTML preview"],"G8t9NN":["Add a property"],"GA-UkN":[["keyName"]," type: ",["typeLabel"],". Click to change."],"GDvlUT":["Role"],"GF51cw":["Give the AI tools you use access to read and update your projects. Pick what to set up below, and change it anytime."],"GGsM4y":["Selected in graph"],"GHsJb8":["Show .ok folders"],"GJH-AT":[["docName"]," is ",["0"],". OpenKnowledge currently opens files up to ",["1"],"."],"GK-IRZ":["Undo buttons are disabled — per-session state has been garbage-collected."],"GLxIKR":["How to push manually"],"GN6L5F":["Filename"],"GQDSBN":["Layout options"],"GSYWCm":["Hide document panel"],"GUYwCr":["Dismiss notice"],"GUqTzn":["Competitor research"],"GXf9hG":["Cloning ",["repoName"],"..."],"GZzDqc":["Details about the error you just hit are included. Secrets like API keys and tokens are redacted automatically."],"G_686w":["Task List"],"G_efLf":["Installed into"],"G_hVTP":["Enable Themes"],"G_mWXb":["Filter languages"],"GamjcN":["Template saved"],"GemPfn":["Failed to parse forward-links error response (HTTP ",["status"],")"],"Gfr4fu":["Server can't open documents"],"GhjUB_":["Reconnected"],"GkYV_4":["Renamed ",["0"]," → ",["1"]],"Gp_twO":["Local path"],"GsBUCk":["Loading settings"],"Gt4gOO":["This folder has unpushed changes. Recipients will see the last pushed version."],"GtJbUa":["Background"],"GuaJb-":["Open email draft"],"GubkSu":["Use a starter pack"],"GuqOb1":["Failed to load headings"],"Gx0VS1":["e.g. drafts/ or *.draft.md"],"GzPQ2f":["Stay in the loop"],"H-vDm3":["Relaunching to install the update…"],"H0WlWQ":["Grid of rows and columns with a header row."],"H86f9p":["Collapse"],"HAvRAI":[["skillCount","plural",{"one":["skill"],"other":["skills"]}]],"HCn0Ay":["Toggle strikethrough formatting."],"HGNCsl":["Connection lost — keep this tab open, your edits will sync when reconnected"],"HIb0vl":["Network error — please try again"],"HM56Bx":["Creating..."],"HPTPGr":["Create a new spec file for my user story"],"HSh8u_":["Folders"],"HTW0Zw":["One more step: run <0>claude</0> in this project and approve OpenKnowledge once."],"HdkSiO":["New file"],"HfI1dR":["I already have it locally →"],"HjNrT0":[["0","plural",{"one":["#"," backlink"],"other":["#"," backlinks"]}]],"Hl89Qd":["Loading templates"],"HlmZBk":["Documents response did not match expected shape."],"Hnl9nT":["Set where pasted and dropped files are stored for this project."],"HoWElC":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>. Please commit your changes or enable auto-sync."],"Hp1l6f":["Current"],"HpK_8d":["Reload"],"HptUxX":["Number"],"HqOPpj":["Git needs a helper tool (such as git-lfs) that isn't installed or couldn't be found. Install it, then try again."],"HqiZvw":["OpenKnowledge stores its configuration and internal files inside a newly created <0>.ok</0> directory in your project root folder."],"Hrz9NY":["Wiki link"],"HyvSqq":["Project Skill"],"I-xnra":[["0"]," hex value"],"I1gRhX":["Failed to rename"],"I5685_":["Try a prompt"],"I5AfhE":["Sync status unavailable — server unreachable."],"I7Exsw":["Follow us on X"],"IA1wNb":["The Claude Desktop App didn't open the file. Is it installed? (",["msg"],")"],"IA6JW2":["Detecting"],"ICoNYz":["You can also manage this in Settings."],"IFezUv":["The audit could not be completed. Try again."],"IInnZo":["Conflict"],"IKoTAC":["Keep disabled"],"IN4UX8":["Search (",["searchShortcut"],")"],"IQPyrD":["Missing page — click to create"],"IRv9cH":["Cloned ",["repoName"],"."],"IWGfGF":["Checking your GitHub connection"],"IX7-sq":["Something went wrong opening \\"",["docName"],"\\"."],"IX_uXB":["my-feature"],"IYciRC":["Thanks for the report!"],"IajAbS":["Add a starter pack"],"If0crP":["Open with AI ",["targetDisplayName"],", ",["hint"]],"IgTwLt":["Open this document in the editor and collapse the graph."],"Ik-gP0":["Heading H",["level"],": ",["text"]],"Iq8zdU":["Close terminal"],"IrB5AK":["Server-side cleanup failed for ",["failedCount","plural",{"one":["#"," item"],"other":["#"," items"]}]],"IrC12v":["Application"],"IreQBq":["Repository"],"It9ARY":["Toggle the right document panel."],"Ix0K8o":["Hide external URL nodes"],"IxyZXD":["Screenshot"],"Izb10l":["Fix all ",["count"]," fixable problems"],"J2Mv98":["Name (e.g. ",["login"],")"],"J2eKUI":["File"],"J3HzPL":["Collapse ",["keyName"]],"J6N5MX":["Couldn't construct the share URL. Try Done and re-share."],"J6mxC1":["A network problem or GitHub outage interrupted the clone."],"JCxGEX":["No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."],"JE21eh":["Symlink to ",["targetPath"]],"JJcBCm":[["0"]," total"],"JK-Ave":["Hide thumbnails"],"JL3si7":["Updating"],"JLUTgi":["No tags yet — author \`#tagname\` in any doc to populate the index."],"JLzQi_":["Close ",["accessibleLabel"]],"JM_aq-":["Use an https:// URL — http:// is only allowed for localhost."],"JOcPqH":["Bring a remote repository onto this machine."],"JWsZlx":["Open a project to edit."],"JZ8cO6":["Light, dark, or follow the OS."],"J_bJiH":["Pick a built-in IDE color palette, or define your own."],"Jejur6":["Couldn't load document"],"JfPuv7":[["shareBranch"]," isn't a valid branch name."],"Jhj_lh":["Modify the link target, anchor, and display label."],"JkCD2u":["Sync paused — you don't have permission to push to this repo"],"JmfgFc":["(a worktree of ",["0"],")"],"Jqqevv":["System error"],"JtD-Br":["Page link"],"Jw6EC4":["Branch switch failed — try opening the ",["targetNoun"]," manually."],"K-a33w":["Start writing to create this page"],"K-h9cT":["Couldn't save the resolution for ",["filePath"],"."],"K0FgsP":[".ok/skills is committable so your team gets your skills; the rest of .ok/ stays on this computer."],"K0N7zS":["Config sharing status read failed"],"K1ckLX":["Failed to create folder"],"K2v7QF":["Couldn't share skills"],"K6MQQk":["Sync is failing. See the sync status for details."],"K6jjWB":[["packName"]," was already set up. Nothing to do."],"K6jxcj":["Add a key"],"K8-WWn":["Move between table cells"],"K9J00P":["Clone failed — connection error"],"KDuPiY":["Uploading ",["fileName"]],"KDw4GX":["Try again"],"KFdXwz":["Show panel (",["panelShortcut"],")"],"KH5bQi":["Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."],"KIIamL":["OpenKnowledge will create commits and push them to your remote automatically. If you do not want automatic commits in your git history, you should not enable auto-sync."],"KOZud0":["Build a competitor research knowledge base. Start with an overview page, then add cross-linked pages for each competitor, their products and pricing, and the sources behind every claim."],"KPW5WC":["moved template"],"KQGZuq":["Reused if it already exists, created if not."],"KRJ6xh":["No tags yet. Continue typing to create one."],"KWL_Ih":["Blog post"],"KX1MZR":["Your repositories"],"KYSocE":["Research the extinction of flightless birds"],"KYcZ6Y":["Above"],"KZLdgR":["See <0>#design-docs</0> for the latest specs."],"K_vT1F":["Upstream sync"],"KaFCD3":["Open this link in a new tab and collapse the graph."],"Kf7GG5":["Restarting the server…"],"Kgdbkt":["Switch to local-only refused"],"Kh1n4a":["<",["componentName"],"> isn't a known component. Copy the source to use it elsewhere, or delete the block."],"Khxcyu":["Terminal access isn't enabled for this project."],"Kiytqd":["Exception: skills are shared"],"KkEAud":["Create a file from the current document or folder context."],"KmydK6":["Bold"],"KnoB--":["Will be saved as <0>",["sanitized"],"</0>."],"KpOJFY":["Enable external link previews"],"Kr3VPS":["Codex will still ask until you run \\"ok init\\" in a terminal for this project."],"KsAPaB":["This branch is checked out in:"],"KszKI_":["Skill level"],"KtACeE":["Default: <0>",["0"],"</0>"],"KujtjC":["Find"],"L-rMC9":["Reset to default"],"L1ZE3M":["Document statistics"],"L1rRuU":["Embeddings API endpoint"],"L3CEC1":["this item"],"L4Cdd9":["or create a new file <0/>"],"L6Hhh6":["(root)"],"L8fKuc":["Run this in your terminal"],"L9Y9Om":["Top linked pages"],"LBwUR6":["Branch switch timed out — try opening the ",["targetNoun"]," manually."],"LCUy_N":["Session ended"],"LDuM35":["Replace current match from field"],"LE7t79":["Clone to a new folder"],"LKIPzv":[["laterEdits","plural",{"one":["Removes ","#"," newer edit on this file."],"other":["Removes ","#"," newer edits on this file."]}]],"LKOLNn":["No AI agents installed"],"LNum6A":[["minutes"]," min ago"],"LRgZAt":[["owner"],"/",["name"]," already exists"],"LXdWeS":["Medium section heading."],"LXfNU-":["Navigation and suggestions"],"LYufDw":["Failed to enable semantic search — ",["detail"]],"LbmLyU":["Can't safely edit this tool's config"],"Lcehxn":["Save resolution"],"LdABLa":["Could not open ",["target"],". Try opening it manually."],"LdKIHS":["Draft a spec"],"LeGeTf":["OpenKnowledge on GitHub"],"LhQlGR":["This project is running an older version of OpenKnowledge (v",["0"],") than this app (v",["1"],")."],"LhWYpm":["Other OK paths are tracked upstream:"],"LiAw2k":["What this changes"],"LlHqdU":["Initializing project"],"Llyqvo":["This usually means one of:"],"LpB85N":["Plain"],"LtI9AS":["Owner"],"LtSYdi":["Reveal in Finder"],"LtiJ5c":["Project skill"],"LuoJWu":[["truncatedShownCount","plural",{"one":["Showing the first item in one folder — the rest of that folder is hidden."],"other":["Showing the first ",["formattedCount"]," items in one folder — the rest of that folder is hidden."]}]],"LwMxXg":["Failed to open worktree."],"M-IF14":["Report reference"],"M1OfV9":["Next source diagnostic"],"M3ytY_":["This looks like a drive root (e.g., C:\\\\). Scaffolding here will scan an entire drive."],"M5_9s2":["Sending report"],"M5mfAe":["Add tag"],"M6mvVi":["Copy relative path"],"M9597s":["Preparing share URL..."],"MCjC9A":["Delete ",["deleteDescriptorLabel"]],"MDZSJe":["When the agent runs its scheduled work."],"MGb89P":["Insert, delete, move, copy, and indent source editor lines through CodeMirror's default keymap."],"MHrjPM":["Title"],"MJqRO6":["Your report is being sent."],"MKOVhz":["Enable git auto-sync"],"MQIM_Y":["Couldn't copy. Select the URL above to copy it manually."],"MRZxAn":["Edited"],"MTs6g3":["Couldn't reconnect after server restart"],"MUBR8r":["Rename succeeded but the tabstrip may be out of date — refresh to resync"],"MUrVEo":["No recent projects."],"MV-Dkb":["Found ",["countDisplay"]," markdown files"],"MVxpbf":["Find and replace"],"MZSBsh":["No templates yet. Add one to give new docs in this folder a ready-made starting point."],"MZoxVx":["Failed to load tags. Press Escape and re-open to retry."],"Mb_20S":["Visual"],"Md709y":["Loading ",["fileName"]],"MdpSC1":["New skill"],"Mh_4hd":["Previous tab"],"Mj8R8K":["Couldn't install skill: ",["0"]],"MmDDWK":["Recently opened"],"MmqnGI":["No global skills yet."],"Mnavhe":[["propPanelDescriptorLabel"]," Properties"],"MqQoV-":["Describe what you want to build, start a blank file, or scaffold from a template."],"MqsbfN":["Turn on external link previews?"],"MrwYIK":["Toggle a source comment through CodeMirror."],"MsuXaI":["Hide panel (",["panelShortcut"],")"],"My0wYT":["When you hover an external link, its URL is sent to the destination site to fetch the page's preview metadata — one request per previewed link."],"My9uXI":["Updated \\"",["display"],"\\" to ",["0"]," — your previous version is in history if you need to restore it."],"N1KkEO":["Jump to last tab"],"N1YYa7":["Loading image"],"N1mdmS":["This file can't be opened in the text editor."],"N2FcBE":["Synced"],"N2S1rs":["Empty"],"N2eHWq":["Code Block"],"N3_ozB":["Hubs"],"N55YNr":["Choose whether this project's OpenKnowledge setup, including its AI-tool connections, is saved with the project so teammates get it too, or kept only on your computer."],"NEzPEh":["Create a new branch, or check out an existing one, in its own window."],"NF_Wcg":["Show skills section"],"NIWAux":["No docs registered under #",["tagDocsName"],"."],"NJyQi_":["Branch ",["shareBranch"]," no longer exists on the remote."],"NKkZXl":["Initialize and open"],"NNJsn7":["One more step: enable it in Cursor → Settings → Tools & MCP (Cursor leaves project servers off until you turn them on)."],"NOHyEE":["Retry push"],"NORKZU":["Pattern warnings: ",["summary"]],"NQ8llq":["Add item"],"NQXwDy":["Edit in config file"],"NRSLBe":[["diffMin"],"m ago"],"NSnIUP":["Two-page (even)"],"NUr4kz":["A reusable starting point for new documents in this folder."],"NYUhy5":["Subfolder name"],"N_7kkF":["Read through this codebase and draft a technical spec for the most complex module: an overview, the architecture, key files, and open questions, all linked from a specs index page."],"NcurBF":["Pan down"],"NgZwB0":[["enabledCount"],"/",["0"]," on"],"NjrIak":["File: <0>",["fixedName"],".md</0>"],"NkXEFS":["Restore failed — document unchanged"],"NmPNJJ":["Copy code"],"Nn4GgW":["Will be created as <0>",["sanitizedName"],"</0>"],"NnQapF":["Open with AI ",["targetDisplayName"]],"NpC29w":["Create a new list item from the current list item."],"NrFwux":["Failed to save content rules — ",["0"]],"Nu4DdT":["Sync"],"Nu4oKW":["Description"],"NuH1jp":["Public repository"],"Nv3mUj":["Show advanced"],"NvOvTi":["Create in <0>",["dirDisplay"],"</0>"],"Nx7BWE":["Git auto-sync"],"NxW-md":["Resize ",["handleKey"]],"NzFvyK":["Session ended — undo unavailable"],"NzluOx":["(optional)"],"O0Z2Xr":["Outgoing"],"O2UpM1":["Browse"],"O3oNi5":["Email"],"O4PnDd":["AI tool management is only available in the OpenKnowledge desktop app."],"O6yEPk":["Create a new OpenKnowledge project in the folder of your choice."],"O7_W_a":["Open with AI"],"O9oQJS":["Send report"],"OD0FCX":["Hidden “",["basename"],"”"],"ODGGlj":["Folder name: ",["detail"]],"OETysD":["No hub pages yet. Hubs appear once pages accumulate inbound graph links."],"OEu_0l":["Failed to load skills: ",["0"]],"OFBmkg":["Search files, commands, projects, and AI handoff actions. With text selected in the visual editor, this chord adds a link instead."],"OJTOUj":["Requires ",["brand"],"."],"OJeiSH":["Failed to add property"],"OLBz-_":["Mermaid diagram failed to render."],"OLIKgw":["Drag item ",["0"]," to reorder"],"ONPvOb":["Loading agent activity"],"ONgEZF":["Loading headings for ",["pageTarget"]],"OOIVJo":["Uninstalled \\"",["0"],"\\" from ",["1"]],"OTF92M":["Label <0>(optional display text)</0>"],"OVjNeX":["Terminal ",["0"]],"OX2Neh":["Inline code"],"OXb_Df":["Settings content"],"OXdGnd":["Problems"],"OYnx7O":["Path cannot start with \\"/\\""],"OZJeTZ":["Skill"],"Oawo4U":["The report service couldn't be reached."],"OdmsFg":["Failed to delete item"],"OeAl1e":["e.g. assets/uploads"],"OfhWJH":["Reset"],"OgyJSr":["Local only"],"OiHJdA":["Move through slash, wiki-link, tag, and path suggestions; accept or dismiss the active suggestion."],"Okd2Xv":["Toggle underline formatting."],"OlAl5i":["Expand all"],"OmHTGj":["Disable git auto-sync"],"On0aF2":["Website"],"Oo_WWc":["No pages found"],"Oos8fo":["Copy command"],"OplnBG":["Managing AI tools is unavailable in this build."],"OuY8t9":["Open in current branch"],"OvEjsP":["Copying..."],"OxplNM":["Updated \\"",["0"],"\\": added ",["1"],", removed ",["2"]],"Oxyd5f":["Pick a name"],"OyIC0Q":["Project name"],"P-ye9o":["Could not open folder picker"],"P0HC30":["This ",["targetNoun"]," moved to <0>",["0"],"</0>. Open it there?"],"P3NS4G":["Pattern syntax error (line ",["lineNumber"],"): ",["message"]],"P3hnm0":["File too large to open"],"P47EWZ":["Could not update sidebar settings"],"P6gXB-":["Replace ",["keyName"]],"P6lAT3":["Folder target: ",["linkTitle"],". Click to open the overview."],"P8yDjG":["Name can’t be empty, \\".\\", \\"..\\", or contain / or \\\\"],"PB4upl":["Find previous match"],"PBwmDJ":["Searching by meaning"],"PBxg_E":["Not now"],"PCNIuJ":["File an issue"],"PCSkw2":["Skills"],"PIMM5l":["You're subscribed!"],"PKLY-1":["Opening..."],"PKjGhT":["Headings"],"PMyJ9C":["No edit session yet"],"PPFQ3o":["Installed \\"",["0"],"\\" into ",["1"]],"PQCdtv":["\\"",["docName"],"\\" doesn't exist."],"PR9FSv":["Move to the next visual-editor find result."],"PRnH8G":["of ",["0"]],"PVUn_c":["Open folder"],"PZtgO0":["Opening worktree"],"P_bX4O":["How to set up"],"Pck6eI":["Pick a built-in IDE palette. The dark IDE themes override the light/dark setting in Preferences."],"PdA9NZ":[["ahead"]," ahead"],"PdJZ5p":["No skills yet."],"Pgu10b":["Saved as <0>",["slug"],".md</0>"],"PgzIpb":["Move to the previous visual-editor find result."],"PiH3UR":["Copied!"],"PkeYXL":["Expanded graph mode"],"Pkw7J9":["This folder is empty."],"PlGC6r":["the git exclude file isn't writable"],"PqYWiC":["Couldn't restart the server automatically. Try running \`ok stop all\` in a terminal, then reopen this project — or restart your computer if it persists."],"PrJYSN":["This folder isn't on GitHub yet. The link won't work until it's pushed."],"PrhzDE":["Pan up"],"Q1mtyd":["Hide sidebar"],"Q5fqMz":["Connection error — try again"],"Q6hhn8":["Preferences"],"Q7W-mC":["Same folder as current file"],"Q7cNKe":["Skills are now shared. Commit .ok/skills to share them with your team."],"Q8A-U_":["Connected to"],"QAi7Q9":["Branch <0>",["trimmed"],"</0> already has a worktree — it'll open in its own window."],"QDZbvN":[["diffDays"],"d ago"],"QJaG-9":["Choose CLI for new chat"],"QNxpRm":["Dock terminal to the right"],"QOINDn":["empty"],"QQghPu":["Install in Claude Desktop"],"QR5SP1":["created template"],"QYfQdv":[["displayName"]," CLI"],"QcpeeE":["Navigate to ",["docName"]],"QfFBdJ":["The template's filename (without \`.md\`)."],"Qj4RL5":["Completed:"],"QlxHAH":["Showing results for \\"",["semanticResultsLabel"],"\\""],"QnjpOq":["What do you want to build?"],"QqBQu1":["Label <0>(visible link text)</0>"],"Qvls7J":["Eng specs"],"Qw-7Ie":["A simple place to write, with one file per topic and a daily journal. Pick this if you just want to start writing and let the links between notes build up over time."],"QyioBP":["Move up"],"R0cyYB":[["0","plural",{"one":["#"," request blocked by the preview's security policy"],"other":["#"," requests blocked by the preview's security policy"]}]],"R0jJzV":["Paste URL, owner/repo, or search your repos"],"R3y75Z":["Edit source"],"R65q-K":["A real shell is off for this project. Turning it on runs commands with the full access of your macOS user account."],"R9IDFz":["Renames the folder on disk and the id agents use to invoke it."],"R9Khdg":["Auto"],"RDjuBN":["Setup"],"RDrXh4":["Configure user, project, and integration settings."],"RG4XHV":["Copy ",["0"]," prompt"],"RGCCrg":["Copy share link"],"RGkNeJ":["Initialize a starter pack"],"RJ3a8Z":["Looking for <0>",["lookingForUrl"],"</0>."],"RN62Q8":["We'll build <0>openknowledge.skill</0>, save it to <1>~/Downloads</1>, and open the Claude Desktop App for you."],"RO-yts":["Failed to disable link previews — ",["detail"]],"RSqaSd":["Project root"],"RVZJWQ":["Search projects..."],"RXNu_r":["Shared via git with everyone working on this project."],"RY6Bq1":["Open shared ",["targetNoun"]],"RaPMZv":["Keyboard shortcuts available in the editor and workspace."],"Rah7yq":["What should the AI do? (optional)"],"Rb1zMa":["No excerpt"],"RfHNf8":["Open activity panel for ",["tooltipName"]],"RfaEio":["Toggle source comment"],"RfilGt":["No rules match your filters."],"RgbKEe":["You don't have access to this repository."],"Rj01Fz":["Links"],"RlCInP":["Slash commands"],"RlLl3G":["Actions for ",["0"]],"RmBY0A":["No git remote"],"RnrnTe":["Already set up — ok is available in your terminal"],"RobAKV":["Update the destination and optional section anchor."],"Rq1vFD":["Tree view options"],"RrAIZx":["What config sharing covers"],"Rsdhj9":["Configuration warnings"],"Rx5ReQ":["Rename ",["keyName"]],"RyIKxy":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy, and that change hasn't synced yet."],"S33tz3":["Not connected"],"S34Vju":["Have something else in mind?"],"S6l5dv":["Could not start creating a new item"],"S9Vnum":["Remove ",["patternText"]],"S9t1PI":["Fixing ",["0"],"/",["1"]],"SCoBBH":["Tag suggestions"],"SCzAbA":[["phase"]," — ",["pct"],"%"],"SFN6dN":["Heading 3"],"SOPwPh":["Restore to this edit"],"STTOnz":[["keyName"]," type: complex value (nested; read-only)"],"SUOoXn":["Failed to open project."],"SVLPt5":[["formatted"]," GitHub stars"],"SXCSQd":["Copied path"],"SYfHmN":["Unpin tab"],"Sc1bKE":["Local collaboration data for \\"",["docName"],"\\" could not be cleared in time. Reload to retry."],"ScwcF2":["A project already exists at this location. Pick a different parent folder."],"SfxQX8":["Writes a project-MCP config for each selected tool."],"SgKLfA":["Not connected to GitHub."],"Sh3Qkg":["No matching branches."],"Si7mIR":["Create report"],"SiUUCS":["Next match"],"SkMZlS":["Couldn't remove <0>",["targetGitPath"],"</0>: ",["removeGitError"]],"Skr_7L":["Search worktrees"],"Sq8lf2":["Editors to install skills into"],"SrOuyg":["Document panels"],"T-654M":["Loading PDF"],"T0OVm7":["The default branch is protected — pushes need a pull request."],"T3j-7o":["e.g. Switching projects while a sync was running"],"T67A0Y":["Auto-sync pushes/pulls commits to your git remote on intervals and on save. Toggling on requires confirmation."],"TEEPPF":["Will replace existing OpenKnowledge entry"],"TJnkyf":["ok ui responded but server.lock has no port yet"],"TKQ7K-":["Install"],"TLIO3j":["Toggle italic formatting."],"TUzThQ":["Share skills"],"T_R-Qz":["Primary"],"T_wG4n":["We couldn't check your GitHub connection."],"Ta25TG":["No history yet"],"TbjyhA":["Docs"],"Te6sK2":["Heads up: editing any rule or option here creates a <0>.markdownlint.json</0> file in your project to save your changes."],"ThmUrC":["Could not finalize project setup. Try again."],"Tjc1pH":["Section <0>(optional heading anchor)</0>"],"TsZmgr":["The file on disk, and the id agents use."],"TvY_XA":["Documentation"],"TwYboS":["Navigate CodeMirror source search results or dismiss the search panel."],"Tz0i8g":["Settings"],"Tz9pJB":["Clone stream ended unexpectedly — check if the clone completed"],"U2Kx6T":["Close all unpinned"],"U2pMtf":["tag-name"],"U3IvM5":["Full guide"],"U5Spo9":["Content directory must be inside the project"],"U7HJ4y":["Managed by OpenKnowledge (read-only)"],"U8CD-l":["Copy full path, No workspace"],"UBv8UK":["Delete Permanently"],"UDFrWm":["Checking GitHub connection..."],"UL8A9w":["Tag"],"ULRb5t":["Adds telemetry, server state, and runtime info when available. Document names are anonymized."],"UMrOy2":["Skill \\"",["trimmedName"],"\\" created"],"UPjaXD":["Couldn't duplicate \\"",["0"],"\\": ",["1"]],"UQAp48":["Search templates"],"UQMMvx":["Moved \\"",["name"],"\\" to ",["0"]],"URmyfc":["Details"],"UTNVyS":["Select the full source document."],"UTZ97u":["Selection must be inside the project"],"UTgWxm":["Nothing was uploaded. The report stays on this Mac until you email it to us."],"UVLlMV":["Couldn't reach GitHub. Try again?"],"UW2Fg3":["This project's running server doesn't support live editing. Restart OpenKnowledge to fix."],"UW93oq":["Replace key"],"UYcGIW":["Connecting — waiting for collab server"],"Ua78MH":["no response"],"UaDyeb":["Hide selection preview"],"Uay5NL":["This ",["targetNoun"]," was added to branch <0>",["shareBranch"],"</0> recently. Switch and update to open it."],"Uci-Ph":["Ordered List"],"Ud0Pj9":["<0>Mirror source removed.</0> The doc <1>",["src"],"</1> is no longer available."],"UfW9Kr":["Your search queries and the full text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"UhpfxY":["Pan left"],"UkQGhd":["Hide replace"],"Up2_7p":["Copy full path"],"UpCz01":["This doc"],"UuYo7g":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy. Please commit your changes or enable auto-sync."],"Uuj_R4":["New from template"],"Uw6ERJ":["Couldn't copy: ",["detail"]],"UyROxs":[["mins","plural",{"one":["#"," min ago"],"other":["#"," min ago"]}]],"V2Gmie":["These rules come from your project's <0>",["configFile"],"</0> file, which fully governs linting for this project. Turn rules on or off and edit their options here; changes write back to the file."],"V48OUT":["You deleted <0>",["filePath"],"</0> locally, but it was modified upstream."],"V7QxyT":["Connection dropped"],"VAHWL_":["Connected as <0>@",["signedInLogin"],"</0>"],"VBE2dw":["Build and keep track of the world behind your story. A home for your characters, places, factions, and the lore that ties them together, so details stay consistent as you write."],"VFQXPl":["External link previews show a card with the site name, page title, and description when you hover a link."],"VITWk5":["Managed by OpenKnowledge"],"VIwCaD":["Entry"],"VM7H66":["This file is binary and can't be shown as text."],"VNgKZz":["Advanced settings"],"VTulZj":["Open in worktree"],"VU3Nrn":["Missing"],"VUijjF":["Embed an image with optional alt text."],"VYd_YA":["Open an existing project folder from disk."],"VZGGPK":["Collapse terminal"],"VZGh8G":["Fold, unfold, fold all, or unfold all source ranges."],"VZSBXL":["Semantic ranking activates the first time an agent runs a search."],"V_6bJ4":["Terminal settings not loaded yet — try again in a moment."],"V_wltx":["Enter a title for this template."],"VbqhBI":["Already at ",["assetContentPath"]," — reusing."],"VcqWBy":["Upload may have succeeded but the sidebar is out of date — refresh to resync"],"VdXv4D":["Clone from GitHub"],"Vftef5":["Common markdown issues — hard tabs, heading increments, list markers, and more."],"Vlc75q":["Keep file deleted"],"VsaI0G":[["folderCount","plural",{"one":["folder"],"other":["folders"]}]],"VuxVSP":["Start source completion"],"VvS_k_":["Config sharing is now local-only."],"VxO6wR":["Delete selected files or folders"],"VzGJRl":["Add link"],"W-ntoW":["heading-slug"],"W0i24j":["Object"],"W1SI2K":[["0","plural",{"one":["#"," warning"],"other":["#"," warnings"]}]],"W1qRuM":["This document is already active in the editor. Use Open to collapse the graph."],"W3Xlpc":["Set the auto-sync default for users opening this project for the first time. This setting is committed to your repository."],"W5A0Ly":["An unexpected error occurred."],"W7XJN4":["Can't nest projects. An OpenKnowledge project already exists at <0>",["rootPath"],"</0>. Choose a location outside it, or open that project instead."],"W8vpBM":["starter pack"],"W9_Bub":["Local changes overlap with incoming sync"],"WFEbV1":["Flag common markdown issues in the editor. Powered by <0>markdownlint<1/></0>."],"WHPvOb":["All files are hidden by view filters."],"WJjviG":["What to include"],"WL6puM":["Path resolves outside project"],"WMCwmR":["Check for updates"],"WMIKXK":["Are you sure you want to delete ",["targetCount"]," selected items? Folders and all files inside them will be deleted. This action cannot be undone."],"WPwDin":["Open folder on disk"],"WR0y2O":["Share folder"],"WRNXKp":["Searching"],"WRdYfS":["Refresh audit"],"WWcqsG":["Start here: what this is and how it's organized."],"WZ-vBy":["Permanently deletes <0>",["targetGitPath"],"</0> and all its git history. Working files stay in place. If the parent git repo is intentional (e.g. you cloned it), cancel and pick a location outside it."],"Waiy-j":["The agent's persona, values, and voice."],"WamGNs":["Failed to load PDF: ",["error"]],"WcWS__":["Download file"],"Wcv-Zi":["Make this knowledge base available as a Claude Skill."],"We7h2I":["📝 or assets/icon.png"],"Weq9zb":["General"],"Wgmlsw":["Fetching"],"Wh0im4":["editing [[",["realCurrentDoc"],"]]"],"WhOsNE":["Strikethrough"],"Wi-VWy":["Couldn't send the report"],"WkTLN7":["Show only markdown files"],"WmPbvm":["Get product updates in your inbox."],"Wq6Wcm":["Please enter a valid email address."],"WqLq6M":["Open with AI ",["displayName"]],"Wt5W56":["Sync is off — your edits will not sync to the remote repository."],"Wtw22s":["Installing"],"WuntOK":["Preview of the screenshot"],"WyQxwa":["Connect this project to GitHub to share."],"WyXG7w":["Close all"],"Wyxs0x":["Path cannot contain \\"..\\""],"X0ttSN":["No tags match \\"",["tagListQuery"],"\\"."],"X7u0xR":[["0"]," templates available"],"X8kjQX":["Re-authenticate with GitHub"],"X9VpsP":["Loading folder contents"],"XAyxsa":["Check out remote branch"],"XDzAnp":["Opens in a new tab"],"XH30C4":["document"],"XJOV1Y":["Activity"],"XPJ0sN":[["settingsDescriptorLabel"]," properties"],"XPqe3B":["Create new tag #",["tagValue"]],"XRuL0i":["Create page"],"XU0OXn":["Enable auto-sync"],"XV5sC0":["Open worktree"],"XW18jo":["Page headings response did not match success schema"],"XYlJJT":["Setting up"],"XZkdtg":["Switch branch"],"XcGbim":["Show hidden files"],"Xet9MX":["Failed to load backlinks"],"Xewl6B":["Your local copy is behind. Pull the latest changes, then open the link again."],"XfzqjK":["template \\"",["name"],"\\""],"Xisk4u":["Edited ",["editedAgo"]],"Xk0-VC":["Previews of links to other documents in this project are always on and read from the local index — nothing leaves your computer for those."],"Xl-UUg":["guides/install or https://example.com"],"XmJfZT":["name"],"XnlF3W":["Add the next matching source selection."],"XopE_I":["Failed to parse backlinks error response (HTTP ",["status"],")"],"XpIZmv":["Fenced code block with monospace text."],"XqNHcm":["Couldn't update skill targets: ",["0"]],"XtRoxT":["Page ",["pageNumber"]],"XuQzrk":["Couldn't restart the server — another process owns it. Quit other OpenKnowledge windows for this project, then try again."],"Xv_ijG":["https://github.com/owner/repo or owner/repo"],"Xw_maT":["Type a query, then press ↵ to search your pages by meaning."],"Xwump4":["no git repository here"],"XyOUTJ":["Exit merge"],"Xzy0s0":["Remove ",["fullLabel"]," from context"],"Y-Urt2":["Block math equation rendered with KaTeX from a LaTeX source string."],"Y1QMlM":["Get set up"],"Y1kX2z":["OpenKnowledge initializes at <0>",["projectDir"],"</0> — the parent of <1>",["pickedRelative"],"</1> because it contains a <2>.git</2> folder (one .ok/ per git repo). <3>Content directory</3> defaults to <4>.</4> (the whole repo); type a sub-folder to narrow it."],"Y6SK9K":["Show source"],"Y8ViJx":["A newer version may have been deployed since this tab opened."],"YC6_wP":["Edit ",["keyName"]],"YEIS9T":["Edits apply live. Light or dark is chosen from the background."],"YEP3X2":["Delete a table when the active table cell selection covers the full table."],"YGIi_c":["Reinstall"],"YJ1BTp":["A skill with that name already exists."],"YKLP_-":["Template renamed"],"YLMBSd":["e.g. The editor froze after I pasted a large table"],"YPFBfr":[["detail"]," - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"YRavYS":["A personal color-theme picker — not shared with your project. When on, it appears under Plugins in the sidebar."],"YSFv5w":["No git repository — config sharing does not apply here."],"YTLmTM":["Remove the parent <0>.git</0> folder"],"YW7Q86":["Search settings not yet loaded — try again in a moment"],"Y_kL7X":["Customize how the editor looks and behaves."],"YaeyFh":["Pulls may overwrite uncommitted edits in your local files."],"Yea-K5":["Restore to this point"],"Yi0VMG":["Upload ",["keyName"]],"YjMLg2":["Off — external links show only their URL. No requests leave this computer."],"YjhKI5":["Cloning..."],"YlDuro":["Fit height"],"YsEYYS":[["behind","plural",{"one":["#"," commit behind"],"other":["#"," commits behind"]}]],"YwPUUP":["This pack is already set up here."],"YyXtnN":["Underline"],"Z1LF1M":["Sharing a doc needs a GitHub repository. Create one for this project."],"Z2M5XM":["Reason: ",["reason"]," (",["osDetail"],")"],"Z3FXyt":["Loading..."],"Z5HWHd":["On"],"Z5h97D":["Hide files and folders from your knowledge base. Hidden items don’t appear in the file tree, search, or AI tools. <0>Learn more about patterns</0>."],"Z6rrjc":["No <0>.markdownlint.*</0> file yet — every rule runs on the same defaults as the VS Code markdownlint extension: all on, except line length."],"Z79bnE":["View diff for edit ",["burstNumber"]," of ",["docName"]],"Z7x_Zh":["Git needs ",["tool"]," for this repository, but it isn't installed or couldn't be found. Install it, then try again."],"Z8KDox":["Enter a folder name (e.g. brain)."],"Z8lGw6":["Share"],"ZARuZJ":["Couldn't load files"],"ZBt4rI":["Instruction for the AI"],"ZBxvV3":["New Terminal"],"ZI8uvA":["No problems found."],"ZLQol-":["You can turn this on later in <0>Settings → Sync</0>."],"ZNK2Tq":["root"],"ZQJ1IV":["Activate the last editor tab."],"ZQLDTl":["created folder"],"ZU8VV_":["Remove failed: ",["error"]],"ZW3mlR":["Diff render mode"],"ZWgr0b":["In a subfolder"],"ZWolSV":["You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want."],"ZWwYwM":["Base branch"],"ZWxfrc":["cleared folder properties"],"ZWyHmq":["This project"],"ZYtq3m":["Connect the AI tools you use to this specific project. These files live in the project folder, so anyone who opens it gets the same setup."],"ZatAO_":["Failed to enable link previews — ",["detail"]],"Zf0w-R":["Take a piece of writing from a rough idea to a finished draft to something you're ready to share. Good for blog posts, essays, or anything you want to move through clear stages."],"ZgGuA4":[["0","plural",{"one":["File"],"other":["Files"]}]],"ZgJVnp":["Check spelling while typing"],"Zhe80e":["Restore to edit ",["burstNumber"]," of ",["docName"]],"ZhhOwV":["Quote"],"ZjtgI-":["Command palette"],"ZoOlzR":["App & system info and recent app logs. No project is open, so project logs aren't included."],"Zon_qG":["Mirror source <0>",["label"],"</0>"],"ZptNUh":["Show ",["hidden"]," more"],"ZsGpr_":["Paste link"],"Zue_jx":["Your GitHub token is missing required scopes. Try signing in again."],"Zul8Ry":["never"],"ZvzbDF":["Add it directly to this project."],"ZxXhLY":["Hide Files (",["sidebarShortcut"],")"],"Zz25kq":["Show Files (",["sidebarShortcut"],")"],"_0JUKX":["Bug reporting needs the OpenKnowledge desktop app."],"_5qBNl":["AI tools & CLI"],"_6FVBz":["Jump to tab 1-8"],"_7UQ7y":["Whole word"],"_8quCH":["From template"],"_902BE":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. You're currently on <1>",["currentLabel"],"</1>."],"_FLBbi":[["sizeText"]," · secrets redacted · crash dump not redacted"],"_IGfXZ":["OpenKnowledge quit unexpectedly last time."],"_NX6gG":["Managing project AI tools is unavailable in this build."],"_PACVa":["Release notes"],"_PBJRl":["Add at least one letter or number."],"_QwkMu":["No matching paths"],"_RcqUM":["You picked your home directory. OpenKnowledge will index everything in your home tree — large and may surface personal files."],"_TDESN":["Network error - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"_TF8ep":["Failed to render PDF"],"_VRtd7":["Couldn't send the selection — please try again."],"_W-elG":["(inline)"],"_WPP7e":["Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."],"_XWY2J":["Terminal disabled"],"_ayOfA":["A knowledge base that follows Google's Open Knowledge Format, a shared way of organizing what you know. Pick this if you want your notes to work well with other tools that understand the format."],"_azghp":["Previous change"],"_bth6g":["Claude Code is installed, but OpenKnowledge tools aren't connected to it yet."],"_eguJc":["Uploading"],"_gkGSK":["deleted template"],"_hPpdX":["Skill renamed"],"_pY_Vq":["The repository was moved, renamed, or deleted."],"_qD6mn":["Pick the folder where you've cloned it."],"_rP3HI":[["minutes"],"m ago"],"_tekeB":["updated folder properties"],"_tjopj":["Paste duplicate"],"a-cKXz":["Select all source"],"a3H_MR":["Open and focus the Ask AI composer for the current editor selection."],"a4FRQv":["Undo to this edit?"],"a5Gha5":["Local changes blocked the merge"],"a5W0q0":["Are you sure you want to delete ",["folderName"],"/ and all files inside? This action cannot be undone."],"a9OzSn":["No pages found for \\"",["trimmedQuery"],"\\""],"aBgwis":["Scope"],"aByJ8j":["How does sharing work?"],"aE2_XM":["One pattern per line — appended to <0>.okignore</0>."],"aENGMB":["Semantic search adds meaning-based ranking to the search tool so conceptually-related pages surface even without shared keywords."],"aHPdYV":["Go to line ",["displayLine"]],"aM23Wr":["page-name"],"aOp3hw":["Couldn't move to Trash"],"aWlJai":["Starting sign-in flow"],"a_u4ck":["Loading tags"],"aaE55D":["Clear ",["keyName"]],"aalx4E":["Editing broken MDX source: ",["reason"]],"abiHje":["Delete selected items"],"adsMWO":["Resolving deltas"],"aiArms":["We couldn't clone this repository."],"ajz9F8":["Couldn't load conflict content for ",["filePath"],". Try reloading the page."],"aoa6xA":["network error (is \`ok ui\` running?)"],"arUUsK":["Product updates"],"ax9kie":["Link preview settings not yet loaded — try again in a moment"],"az8lvo":["Off"],"b18t0_":["Close diff"],"b3Thhd":["Upload failed"],"b4AQFK":["Open activity panel for ",["tooltipName"],", editing ",["realCurrentDoc"]],"b4VvP-":["Existing branch <0>",["trimmed"],"</0> will be checked out into its own window, under <1>.ok/worktrees/</1>."],"b4itZn":["Working"],"b5aNbi":["The ",["targetNoun"]," could not be opened — try navigating to it manually."],"bBE5tC":["Detected on this machine"],"bBcFK_":["Open emoji picker for ",["keyName"]],"bD8I7O":["Complete"],"bGa3Fk":["Uploading file"],"bH382I":["Edit this HTML — the preview updates live."],"bSD4im":["Search worktrees and branches"],"bS_boY":["Replace current match"],"bUUVED":["Asset"],"bV6DJA":["Who you are, so the agent has your context."],"bWLmRK":["Could not fetch branch. Check your connection."],"ba3vIW":[["templateCount","plural",{"one":["template"],"other":["templates"]}]],"bcDHUM":[["descriptorLabel"]," — render error, source editable below"],"bcjYUA":["Fold or unfold source"],"bkQRMh":["Paragraph"],"blFttG":["Search projects"],"bmC18N":["Clearing local collaboration data for \\"",["docName"],"\\" before reconnecting."],"brCtGB":["History unavailable"],"bultyE":["When enabled, the agent opens or refreshes the preview after each edit. Disable if you manage your own preview window (OK Desktop, a browser tab on another display, etc.)."],"bwil08":["Building <0>openknowledge.skill</0> and opening the Claude Desktop App"],"c1LZZH":["Link copied."],"c4fVUV":["Fix"],"c5PTFE":["Dev instance: ",["label"]," (isolated from other worktrees)"],"c5f7sm":["Code block language: ",["currentLabel"],". Click to change."],"c5rF4v":["What is this knowledge base for?"],"c863eW":["Could not switch to ",["shareBranch"],". Try switching manually."],"c8iK2Y":["No templates found."],"c8jBgX":["Checking for updates on GitHub"],"cEoyWz":["Add item to ",["keyName"]],"cF9DyA":["Reconnecting after server restart"],"cGV6Mh":["Show a preview card when you hover an external link in the editor. This setting applies only to this computer."],"cHhH3i":["a required git tool"],"cIptmH":["In the Claude Desktop App"],"cKjLuT":["(project + user)"],"cN1Gcp":["A worktree folder for ",["shareBranch"]," already exists."],"cOJyVj":["Disable Themes"],"cOSAfL":["No repositories found on your GitHub account."],"cOrTMo":["Your share link is ready below."],"cRHuuI":["Couldn't copy path"],"cSCbv3":["BETA"],"cUK8lW":[["conflictCount","plural",{"one":["#"," conflict"],"other":["#"," conflicts"]}]],"cUk6TF":["Sync failed — check the server logs for details."],"cV7LOw":["Team Wiki"],"cZGNlb":["Add another pattern"],"cZI5AL":["OK Desktop"],"cZ_8zB":["Stays on this computer."],"ccNps_":["Only modified"],"cd5EXh":["Report a bug"],"cdm00A":["No Incoming"],"cdmk8A":["Uncommitted changes"],"chL5IG":["Community"],"cklVjM":["Timeline"],"cn1sLi":["Couldn't connect OpenKnowledge tools to Claude Code. Please try again."],"cnGeoo":["Delete"],"cqQyPB":["Folder name"],"crqzW5":["AI tools"],"cs4mps":["Config sharing"],"csDS2L":["Available"],"ct2kv5":["No headings in ",["pageTarget"]],"cuA8QW":["Organize specs"],"d1JjXo":["Your local copy of branch <0>",["branch"],"</0> is behind. Pull the latest changes, then open the link again."],"d2uTPx":["Server error (HTTP ",["status"],")"],"d5rK4X":[["chars","plural",{"one":["char"],"other":["chars"]}]],"dCIGNG":["Border"],"dD7NPy":["Outline"],"dDpCOp":["Rename succeeded but the sidebar may be out of date — refresh to resync"],"dEgA5A":["Cancel"],"dGAdpH":["New branch <0>",["trimmed"],"</0> will be created from <1>",["currentBaseLabel"],"</1>, in its own worktree under <2>.ok/worktrees/</2>."],"dIYSqk":["remote"],"dJw2_7":["Saved with the project for your team."],"dMsx3p":["Home page and navigation hub."],"dN20LW":["Semantic search is on, but no API key is set — search falls back to keyword matching. Add one in <0>Settings → Account</0> (it's stored once for your whole machine)."],"dNM58w":["Claude Code (claude) isn't installed or on your PATH."],"dOHMA0":["Failed to move"],"dOxPd4":["Footnote"],"dPOFid":["Show or hide terminal"],"dTaauv":["Reason: ",["reason"]],"dUCQo4":["Renamed to \\"",["trimmed"],"\\""],"dUQ7_J":["Add meaning-based ranking to search so conceptually-related pages surface even when they share no keywords. This setting applies only to this computer."],"dURmlQ":["\\"frontmatter\\" is a reserved property name"],"dVaXnv":["Content rules not yet loaded — try again in a moment"],"dXWMFn":["Removes this skill from your editors."],"dbapvC":["Follow us on social media"],"dbhUX1":["Hide this file"],"dbtjJh":["(opens in new tab)"],"djc1l9":["More than ",["0"]," requests were blocked by the preview's security policy"],"djjdjr":[["deleteCount","plural",{"one":["Delete"],"other":["Delete ","#"," items"]}]],"dprWmL":["Anchor in this page"],"dr1vFs":["Replace all matches"],"dvGKu2":["Shared auto-sync default"],"dw_3cv":["Rename skill"],"dw_dUJ":["Failed to duplicate path"],"dx-TwN":["Running project audit"],"e0NrBM":["Project"],"e1Rn_k":["Open containing folder"],"e1hptq":["Embed a video with native player controls."],"e4GHWP":["Pull"],"e4PbgC":["Duplicate the file-tree item copied from the Files sidebar."],"e8L17t":["A non-empty folder already exists at this path. Pick a different folder."],"e8zRrb":["Show Files"],"e8zYa8":["Could not open ",["shareBranch"]," in a worktree. Try again."],"eBIT9h":["Paste failed.",["restoreSuffix"]],"eFJkVt":["Clone failed: ",["cloneError"]],"eG8Jsg":["Toggle source tab focus mode"],"eGUbmF":["Copy selected file or folder"],"eJitUk":["Upload from computer"],"eKThTQ":["Failed to reorder"],"eLl1VX":["Failed to update the embeddings endpoint — ",["detail"]],"eNQGRb":["Inline LaTeX math rendered with KaTeX."],"ePK91l":["Edit"],"eQkgKV":["Installed"],"eQxm13":["Failed to update attachment location — ",["detail"]],"eTL5y9":["Show selection preview"],"eTsJYJ":["description"],"eVPynQ":["Open <0><1>",["verificationUri"],"</1><2/></0> and enter this code:"],"el312q":["Install skills into"],"emgiet":["Authoritative content; mirrored verbatim everywhere it's referenced."],"enPTnx":["line ",["displayLine"]],"eneWvv":["Draft"],"epuNYK":["Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."],"euc6Ns":["Duplicate"],"evs0iw":["Tags matching \\"",["tagListQuery"],"\\""],"f1XQyZ":["Move block"],"f65AOQ":["Start from"],"f8jU-L":[["0"],"/",["1"]," — ",["2"]],"f9lQNJ":["Adds a managed block to"],"fBHvBn":["There's no project folder for this window, so a terminal can't start here."],"fG0X0e":["Install ",["brand"]," →"],"fIgqfQ":["Reinstalling"],"fJ3EbT":["Themes"],"fJgQHX":["Failed to create file"],"fNr-MX":["Disable semantic search"],"fR-Kdc":["(project-level only)"],"fSRzLo":["Show document panel"],"fVcm9t":[["0","plural",{"one":["#"," doc"],"other":["#"," docs"]}]],"fWi7pn":["Initialize starter pack"],"fWsBTs":["Something went wrong. Please try again."],"fYKgzG":["Failed to load recent projects."],"fYjgXu":["Unordered list of items."],"fZj9em":["Fix ",["flatId"]],"f_PkYv":["Restarting closes this project's server. Connected agents (Claude Code, Codex, Cursor) will see their OpenKnowledge MCP connection close unexpectedly — you may need to restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"fbdLmk":["Toggle bold formatting."],"fbsiBw":["Something went wrong starting the terminal."],"fcgvCA":["Claude"],"fiMNLl":["Sync settings not yet loaded — try again in a moment"],"fj5YiP":["Downloads a fresh copy from GitHub."],"fnlBN4":["Auto-approve settings not yet loaded — try again in a moment"],"fo0VXg":["Uninstall"],"fqSfXY":["Replace"],"fru3T7":["Could not fix ",["0"]," of ",["1"]," files."],"fuJZKk":["Search branches"],"fwhX-N":["Indent or outdent source"],"fxJk_6":["<0>Have more to add?</0> Write to <1/> and mention your reference."],"fxbCNQ":["Synced. The link is up to date."],"g3UF2V":["Accept"],"g4WlQK":["Project AI tool management is only available in the OpenKnowledge desktop app."],"g4XBm0":["Small section heading."],"g58Kwy":["<",["descriptorLabel"],"> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block."],"gBbxn_":["Checking sign-in status"],"gGVP4q":["Click <0>+</0> <1/> <2>Create skill</2> <3/> <4>Upload skill</4>."],"gHSAWT":["Create worktree <0>“<1>",["typedName"],"</1>”</0>"],"gITz7o":["Move the cursor or extend selection through CodeMirror's standard source-editor navigation keymap."],"gJR87V":["Could not create the project folder. Pick a different folder."],"gKi-a_":["New project"],"gQV-9w":["Branch switched but the ",["targetNoun"]," could not be opened — try navigating to it manually."],"gUlRQj":["Orphans"],"gYuDfu":["Pick a starter pack to scaffold your project with ready-made folders and templates."],"gYz2ep":["Expires in ",["timeLabel"]],"gZElfU":["Fixing ",["0"]," of ",["1"]," files"],"gbHcbI":["Failed to delete property"],"gfdqcY":["Couldn't apply the change: ",["0"]],"gfohmY":["Connect tools"],"ggm6JX":["This page doesn't exist yet. Open it to create the page in the editor and collapse the graph."],"ggs9f8":["Search files, folders, or commands"],"gh27t1":["Link previews"],"gijbne":["Failed to rename path"],"gk_-qj":["Couldn't rename template: ",["0"]],"gljvbT":[["words","plural",{"one":["word"],"other":["words"]}]],"glzsS_":["Pan right"],"gmJ0An":["Failed to open folder."],"goO4Ll":["Editor status bar"],"gp3I7-":["Before syncing, set your identity for git commits:"],"gtEbeW":["Highlight"],"gvApb7":["Turn the things you read into clear, trusted articles. Save a source, figure out what it means, then keep the final version so you can rely on it later."],"gwykHF":["This doc hasn't synced to GitHub yet. The link will work after the next sync."],"h-AdvS":["The folders and templates are already here, so there's nothing to add."],"h06R3C":["No pages are missing outgoing graph links."],"h16FyT":["Lists"],"h3QZcB":["A branch named ",["shareBranch"]," already exists. Open its worktree from the switcher instead."],"h7FzJC":["Link-graph response did not match expected shape."],"h9QFb9":["Skill \\"",["0"],"\\" deleted"],"hBMK4W":["Project templates"],"hCOLSd":["Keep a written record of how your product gets built. A home for proposing ideas, recording decisions, writing specs, and capturing what you learned after something broke."],"hDEaQu":["Connect OpenKnowledge to other tools you use."],"hDKtoF":[["diffHrs"],"h ago"],"hDoLrm":["Remove ",["projectName"]," from recent projects"],"hGmuTc":["Docs tagged #",["tagDocsName"]],"hHMv6l":["Delete block"],"hIQkLb":["New chat"],"hItdtk":["Browse folder"],"hLy8b1":["Updated to Version ",["version"]],"hQXiDc":["Search branches..."],"hSBIG-":["A title, description, tags — anything that describes this folder."],"hSySVc":["Install handoff failed: ",["msg"]],"hXUWyd":["Value is required"],"hXbSxc":["Asset: ",["title"]],"hY8pka":["Select next occurrence"],"hYDc6B":["Name cannot be empty"],"hYgDIe":["Create"],"hZoBHK":["Empty starting content"],"haHgQj":["Copied relative path"],"habOU_":["Failed to update the auto-approve setting — ",["detail"]],"he3ygx":["Copy"],"hh4mVC":["Ask AI to fix ",["flatId"]],"hjO0Mq":["Add tab"],"hmYd9H":["Keep track of the people and companies you work with and the meetings you have with them. Good for remembering who someone is, how you know them, and what you last talked about."],"hnq8fP":["Remove ",["label"]," from context"],"hpDtUm":["External wiki link"],"hpzRlK":["Reopen closed tab"],"hwFOFD":["Settings failed to load"],"hxBHxQ":["A line with a footnote<0><1>[1]</1></0> and a definition shown below."],"hxEUVJ":["Initialize ",["selectedPackName"]],"hyCxJY":["Open that worktree instead"],"hynz2K":["Download started"],"i-ShMB":["Diagram"],"i09An-":["Restored an earlier version (",["0"],")"],"i1flq_":["Wiki link suggestions"],"i3f2kh":["No matching commands."],"i92eAT":["We'll create a repository and start syncing — no terminal needed."],"i9OyGp":["Undo or redo"],"i9TPUi":["This ",["targetNoun"]," isn't on branch <0>",["branch"],"</0>. It may not have been pushed yet."],"i9toLO":["Agent configuration file"],"iAoh55":["Update \\"",["0"],"\\"?"],"iDZtvM":["Failed to load templates: ",["message"]],"iEQQyu":["Agent"],"iEYxO4":["Show thumbnails"],"iGCs04":["No templates available"],"iH8pgl":["Back"],"iHAJDj":["Resolving default location"],"iIaSUD":["Whitespace"],"iKSP5j":["Word wrap"],"iKZkk1":["Property value"],"iMkWoF":["Turn on"],"iO8V-7":["Create worktree"],"iOHg1t":["Open embedded URL in new tab"],"iRdfLr":["Dev instance: ",["label"]],"iSLIjg":["Connect"],"iSQTsg":["Ordered list"],"iSnkwB":["Failed to open cloned project."],"iTlqm3":[["ahead","plural",{"one":["#"," commit ahead"],"other":["#"," commits ahead"]}]],"iTylMl":["Templates"],"iXTp5j":["Scope: "],"idD8Ev":["Saved"],"ig5vUe":["Failed to load file"],"ii5mVn":["Report this error"],"iilQXA":["Folder duplicated"],"ijLc3m":["Bullet list"],"ilodsp":["Let agents use OpenKnowledge without asking"],"ipn17C":["The <0>type</0> every document created from this template gets (e.g. <1>research-note</1>). Keeps new docs Open Knowledge Format–conformant."],"iqIDv4":["Sync status unavailable"],"iqugog":["Initialize failed: ",["errorDetail"]],"irFGwu":["Template list"],"ircigK":["Blank project"],"irrm_E":["Remove selection"],"isRobC":["New"],"itxlnr":["Setup files include: <0>.ok/</0>, AI-tool MCP configs (<1>.mcp.json</1> and per-tool files), project skills.<2/><3>Shared</3> commits them to git, so anyone who clones the repo gets the same setup. <4/><5>Local only</5> keeps them out of git (via <6>.git/info/exclude</6>)."],"iuTKci":["No edits yet."],"iv452l":["Documentation for ",["0"]," (opens in browser)"],"iycx_A":["Pushing"],"j9Vqvc":["inherited"],"j9tqwO":["Not in sidebar"],"jAMpHn":["What is a starter pack?"],"jBVUXo":["Couldn't open the terminal — please try again."],"jC8LSZ":["Reset view filters"],"jEZ6Lf":["provisional"],"jEdF24":["Missing page: ",["linkTitle"],". Click to create."],"jKd3AP":["Could not enable the terminal: ",["0"]],"jPUPvG":["Couldn't resolve the conflict for ",["filePath"],"."],"jRHdCz":["Failed to load PDF"],"jSO1X5":["Inherited templates can't be renamed here — rename it in the folder that owns it."],"jSY41h":["\\"",["docName"],"\\" took too long. Check your connection."],"jTLWxh":["Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox)."],"jX0IPx":["A skill with this name already exists."],"jZ_E5M":["Fetch failed — check the server logs for details."],"j_Z6g7":["Shared default"],"jbSG8V":["Show Files (",["sidebarShortcutLabel"],")"],"jdGUeI":["Couldn't create template: ",["error"]],"jerqF0":["Loading branch state"],"jhtG3I":[" Your selection has been restored."],"jjtmV_":["First file name"],"jnCROW":["A memory snapshot from the crash, and the artifact that helps us most. It can contain document content and can't be redacted, so uncheck it if you'd rather not share it."],"jol95m":["Failed to open Project Navigator."],"jpctdh":["View"],"jtg_8-":["Build a knowledge wiki about the different types of flightless birds. Start with an overview page, then add cross-linked pages for each major group (ratites like ostriches, emus, and kiwis; penguins; and flightless rails), the regions they live in, and a timeline of how flightlessness evolved."],"ju38ms":["This project has no git repository — sharing mode does not apply. Initialize a repo to enable the toggle."],"jwnpdM":["A template named <0>",["trimmedSlug"],"</0> already exists here. Saving creates a local copy that overrides it for this folder."],"k0vc0N":["New terminal tab"],"k2fEi7":["User plugins are personal to this device — turn them on or off here. The choice lives in your user config and is never committed to the project. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"k4CuuV":["Ready-made folders and templates to get you started quickly. Select a pack to preview what gets created, then add it to your project."],"k7Hoig":["No content changes at this version."],"kCNU4q":["Indexing your pages — ",["semanticIndexedCount"]," of ",["semanticTotalCount"]," ready. Results may be incomplete."],"kCqCyf":["Open CodeMirror's lint diagnostics panel."],"kDwcbW":["Go to line ",["displayLine"]," in ",["0"]],"kFLlsI":["Insert a footnote reference + matching definition stub."],"kLv8d3":["Your copy of branch <0>",["shareBranch"],"</0> has changes that aren't on GitHub. The ",["targetNoun"]," will appear once the branch syncs."],"kNqMMd":["Folder"],"kUn-CN":["Sync off"],"kV2YZv":["Don't see <0>Skills</0>? Enable <1>Settings <2/> Capabilities <3/> Code execution and file creation</1> first."],"kYL1lH":["Agent activity"],"k_Dqw1":[["0","plural",{"one":["No problems across ","#"," document."],"other":["No problems across ","#"," documents."]}]],"k_pade":["Config sharing is now shared. Commit the OK files to share with your team."],"k_yIIc":["Will be created at: <0>",["targetPreview"],"</0>"],"kdzzOK":["Off — search ranks by keyword only. No content leaves this computer."],"keNFEd":["Set identity"],"khCa4M":["Teaches coding agents in this project to read and write through OpenKnowledge."],"kj9pAE":["Creating page"],"kknhfj":["No changes"],"klPS-L":["Original file — before this agent's edits."],"kmKqZg":["Clusters"],"knjOzA":["Tag value"],"kolRU1":["Do you want to permanently delete instead?"],"kpqWwG":["This ",["targetNoun"]," was removed from branch <0>",["branch"],"</0>."],"ku0yLQ":["Pages are embedded the first time a search needs them."],"ky9Tuc":["Edit ",["0"]," source"],"l-4nnw":["Search rules"],"l17ab4":["Could not write project files. Try a different location."],"l1aQKz":["Visual editor table"],"l1l8sj":[["0"],"d ago"],"l3s5ri":["Import"],"l46MqT":["Next tab"],"l6OXqI":["No installed agents found"],"l6kpzR":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>, and that change hasn't synced yet."],"l8G3S9":["Auto-sync is off — you don't have permission to push to this repo"],"lAiyU_":["Only the current document uses <0>#",["tag"],"</0>."],"lCC_D5":["Subscribing..."],"lGs_bQ":["Page <0>*</0>"],"lHCR4I":["Clear the field to reset back to the default OpenAI endpoint."],"lHwYMr":["Server error: ",["status"]," ",["statusText"]],"lI0Td2":["Use letters, digits, <0>_</0> and <1>-</1> only."],"lIn9L9":["Disable sync"],"lPzyrU":["All hunks resolved"],"lVWEIL":["Indexed ",["embedded"]," of ",["total"]," pages."],"lWNpNB":["Add cursors or select matching occurrences through CodeMirror."],"lXKZGw":["Heading 1"],"lY27jj":[["0"],"y ago"],"lZAiSP":["Backlinks response did not match expected shape."],"l_FAT6":["Use letters, digits, <0>-</0> or <1>_</1> only."],"l_UFPv":["Properties"],"lb_UU4":["Sync now"],"lbkOif":["Undo or redo visual-editor changes through TipTap collaboration history."],"lhjq3G":["Reset ",["labelText"]," to default"],"ljHjfg":["That branch is already open in another worktree."],"lkYioO":["Show or hide document panel"],"ll2yNl":["Content directory"],"lmBPt0":["Only external links trigger a request. Links to other documents in this project preview from the local index and never leave your computer."],"lond3p":["Shows above the code body. Round-trips as \`title=\\"...\\"\` in markdown."],"lrhetp":["+ ",["overflow"]," more"],"ls1N1w":["(missing)"],"lyWa43":["Project-level disconnected pages"],"lzmtKp":["Failed to load folder properties: ",["message"]],"lzwo7p":["Could not open GitHub sign-in. Please try again."],"m16xKo":["Add"],"m2T1Xj":["Tag #",["tagValue"],", ",["uses"]],"m6YGpY":["Active panel content for the selected tab shows here."],"mBltnd":["Path suggestions"],"mGaZwZ":["See the full install guide"],"mHVPm5":["Reconnect required"],"mLAjyL":["Give the AI tools you use access to read and update your projects. Checking a box sets it up right away; unchecking removes it."],"mPneVR":["Updated \\"",["display"],"\\" to ",["0"],"."],"mPy9lS":["Organize my existing specs into a linked index grouped by area, and flag any that have drifted out of sync with the current code."],"mU3j1b":["Remove item ",["0"]],"mVFyH-":[["accessibleLabel"]," (conflict)"],"mWVJRX":["Collapsible section with a clickable summary."],"mY8U64":["Teach agents a repeatable task. You can edit the body after creating."],"mYGY3B":["Date"],"mYzDD_":["A worktree folder for that branch already exists."],"mZ1r4i":["Create a document from ",["label"]],"maDWIB":["Mirror source <0>api-spec</0>"],"makN88":["No patterns yet. Type a folder or file name below to start hiding files."],"mdKFEy":["You cancelled loading \\"",["docName"],"\\"."],"mdzKSV":[["nodeCount","plural",{"one":["#"," node"],"other":["#"," nodes"]}]],"mf37rL":["Retrying"],"mg0YGL":["Source multi-cursor and multi-select"],"mk2poV":["e.g. server.ts"],"mmpzAq":["Wrap long lines in the markdown source editor."],"mo22UP":["Toggle inline code formatting."],"mqSwZH":["<0>Mirror anchor not found.</0> No <1>",["mirrorSourceTag"],"</1> exists in <2>",["src"],"</2>."],"msOK6I":["Repositories you've already cloned may keep syncing through git's own saved credentials, even after you disconnect."],"msqUNq":["Ready-made folders and templates to get you started quickly."],"mu1O0q":["Open Knowledge can manage ",["0"]," editor skill(s) for this project. Import moves them into .ok/skills and replaces the .claude, .codex, etc. copies with symlinks — one place to edit, in sync everywhere. If those folders are committed to git, review the change first; symlinks can behave differently on some editors and on Windows."],"mwMF9u":["Open CodeMirror search in source editor mode."],"mxY24F":["Duplicate the focused file-tree item when focus is in the Files sidebar."],"n2lRue":["Commit or stash changes to switch:"],"n3wx1q":["Restore to this version?"],"n5n_vi":["Private repository"],"n6hXUm":["Auto-sync periodically fetches, pulls, and pushes commits to your remote git repository so your edits stay in sync across machines."],"n7aopT":["Editor mode"],"n8DwqQ":["Connects automatically the next time you open this project in a trusted Codex session."],"nCzR-G":["Copy code ",["userCode"]],"nD7Fx9":["This replaces the current skill content with the bundled version ",["0"],". Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"nDT8qt":["Initialized ",["0"]," but could not open it."],"nJq7et":["Couldn't uninstall skill: ",["0"]],"nMSYz5":["This path is on an external volume (/Volumes/...). OpenKnowledge will lose track of files when the drive ejects."],"nNYV3Y":["and ",["remaining"]," more"],"nP-KFo":["New ",["0"]," chat"],"nP76lk":["Applies to all projects on this machine. Claude and Codex, started from the built-in terminal, auto-approve OpenKnowledge's read and write tools (Claude also auto-runs \\"ok open\\"). Deleting, moving, sharing, installing skills, other commands, and non-OpenKnowledge file edits still ask. Cursor, OpenCode, and Pi are unaffected. Best-effort per agent."],"nTwL53":["Open a doc to share its URL."],"nUNZL4":["Ask ",["0"]],"nWv1ja":["Manage hidden files in Settings → Ignore patterns."],"nYKerc":["(user-level only)"],"nYeBmY":[["hours"],"h ago"],"nbfdhU":["Integrations"],"ndeI89":["Use Cmd/Ctrl+C to copy the link below, or open OK in the desktop app."],"ndwmea":["unavailable on this platform"],"neRy3o":["Split list item"],"nfPccR":[["laterEdits","plural",{"one":["Rolls back ","#"," later edit."],"other":["Rolls back ","#"," later edits."]}]],"nfoduq":["create worktree"],"nft48x":["Stored at <0>.ok/templates/</0> in this project. Available in every folder (folder-scoped templates can override by filename)."],"ng2Ibo":["Branch name"],"nh3wwx":["Embeddings provider key"],"njBeMm":["Both"],"njU86j":["Property \\"",["trimmed"],"\\" already exists"],"noH1JX":["Couldn't reach collab server — ",["errorDetail"],". Try <0>ok status</0> or check <1>.ok/local/last-spawn-error.log</1>."],"npcziF":["Install on"],"nqV0Kk":["This folder hasn't synced to GitHub yet. The link will work after the next sync."],"nrGWJ7":["Git identity isn't set — commits use a default author. Set yours so teammates see your name."],"nskygk":["Choose agent"],"nwtY4N":["Something went wrong"],"nxlOpL":["OpenKnowledge is using this GitHub account."],"ny6vNn":["OpenKnowledge is using a GitHub account provided by the gh CLI. There's no separate OpenKnowledge credential to disconnect."],"nzHlj8":["Close ",["0"]],"nzaV6Q":["Page thumbnails"],"o2yoFu":["Reveal in Finder, No workspace"],"o49mDZ":["Loading timeline history"],"o4dcAf":["Reveal in File Explorer, ",["hint"]],"o5gfs1":["This setting is per-machine and isn't shared with collaborators. It needs an API key set with <0>ok embeddings set-key</0>."],"o9CrsQ":["research-note"],"oAFVKX":["Failed to update the project sync default — ",["detail"]],"oAGN8p":["Remote branch <0>",["remoteCheckoutRef"],"</0> will be checked out as a new local tracking branch <1>",["trimmed"],"</1>, in its own window under <2>.ok/worktrees/</2>."],"oBXkm2":["Delete code block"],"oCHfGC":["Level"],"oCNLN8":["Toggle the bottom terminal panel. With text selected, stage it in the terminal's AI input instead."],"oCZkaG":["Copy path"],"oEgEn_":["A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and the embeddings endpoint setting."],"oJl7eO":["Unknown component: ",["componentName"]," — source editable below"],"oKBnk5":["More requests were blocked."],"oQA-cA":["Full path"],"oS1YpJ":["Open the Project Navigator."],"oXKEsy":["Delete an adjacent wiki-link or tag chip."],"oXlLi4":["Project plugins are your project's authoring standard — turn them on or off here. The choice is committed to config.yml and shared with every collaborator via git. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"oYepHb":["The terminal is turned off for this project. Turn it back on to run commands here."],"of3tF-":["You picked ~/Documents. OpenKnowledge will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope."],"ogAuyr":["Back to document view"],"ohUJJM":["Plugins"],"omXJcU":["Close others"],"onTlRk":["Couldn't update skills sharing"],"optX0N":[["0"],"h ago"],"oqB2ez":["Previous match"],"osRqlv":["Open delete confirmation for the selected file-tree items."],"ot5BRK":["Duplicate selected file or folder"],"otE4aj":["Show external URL nodes"],"ou1hFW":["Toggle an ordered list."],"outYNy":["Duplicate name \\"",["keyName"],"\\""],"ovIGrT":["Local collaboration data for \\"",["docName"],"\\" could not be cleared. Reload to retry."],"p0Iq25":["Insert link"],"p9sdCy":["New ignore pattern"],"pAgkuZ":["Reopening \\"",["docName"],"\\" with a fresh local collaboration cache."],"pBROkv":["Thanks for subscribing. Watch your inbox for product updates."],"pEQFsW":["No matching projects."],"pFagOn":["Source editing"],"pHYP6v":["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pQf2Ux":[".ok/skills is back to local-only."],"pTPqMK":["Toggle a fenced code block."],"pWT04I":["Checking..."],"pWbsW6":["Loading docs"],"pZAs1T":["Failed to load outgoing links"],"pajIrl":["Could not turn off the terminal: ",["0"]],"pbwTg6":[["seconds"],"s ago"],"pckX1A":[["0","plural",{"one":["#"," use"],"other":["#"," uses"]}]],"pcqlQu":[["0","plural",{"one":["Folder"],"other":["Folders"]}]],"pgq_xf":[["0"],"/",["1"]," ",["2"]],"phM8Kh":["Found the repo but could not open the project. Please try again."],"pha01Y":["Project-level pages with no incoming graph edges."],"pkAft1":["Search failed."],"pmOGtg":["Use the default OpenAI endpoint or override it with an OpenAI-compatible base URL for Azure or a self-hosted provider."],"pmUArF":["Workspace"],"ppDgFi":["Restart with this app's version"],"psfGPX":["MCP connections"],"pvnfJD":["Dark"],"pzutoc":["Italic"],"q2kXMG":["Inline Math"],"q3TWG7":["Move to Trash"],"q4YJl_":["The terminal session ended (exit code ",["0"],")."],"q6-JVU":["Loading pages"],"q7F5am":["title"],"qAQVSD":["Page headings response was not JSON"],"qAhFeg":[["userName"]," · ",["tabCount","plural",{"one":["#"," tab"],"other":["#"," tabs"]}]],"qAx7xG":["Fixed folder in content root"],"qEEfPk":["Bug report ",["0"]],"qEIFZu":["Key ending in ",["keyHint"]],"qEue6Q":[" or "],"qFWMl-":["View as text"],"qNOgUu":["Edits at the source land here — no copy-paste drift."],"qRZh7J":["Let Tab leave the source editor instead of indenting."],"qSKu2v":["Source navigation and selection"],"qSxaOz":["Accept their deletion"],"qUB_o_":["Auto-sync is off — your edits stay local until you commit and push manually."],"qXN416":["Couldn't share skills: internal error. Please restart the app."],"qXg5W9":["File saves to <0>~/Downloads/openknowledge.skill</0>."],"qXsafh":["Publish to GitHub"],"qZv5ZR":["Config sharing toggle failed"],"q_9EcE":["Enable git auto-sync?"],"q_z77Z":["Heading levels"],"qaHyRJ":[["linkCount","plural",{"one":["#"," link"],"other":["#"," links"]}]],"qbfj1f":["Receiving objects"],"qdBUHP":["Couldn't load ",["fileName"]],"qi1F96":["Reveal in File Explorer"],"qiN9NB":["Surface"],"qiRoLb":["Summarize everything I changed this week"],"qioCwA":["Jump to page ",["pageNumber"]],"qjHMHf":["Failed to disable sync — ",["detail"]],"qmL1UG":["Uploading securely"],"qo4zCg":["Path cannot contain backslashes"],"qpQwGC":["Describe what you're working on and the agent sets it up for you."],"qvWGzP":["Collapse all"],"qyLmWw":["Source editor search panel"],"r-OJYm":["Enter a valid branch name (no spaces, no leading dot, no \\"..\\")."],"r2huLx":["Undo, redo, or undo selection changes through CodeMirror history."],"r4R7AZ":["Network error during cleanup"],"r51jLC":["File saved & Claude Desktop App opened"],"r6ncaO":["Close tab"],"r871ed":["Your knowledge base is now on GitHub at <0>",["ownerLogin"],"/",["repoName"],"</0>."],"rBc32v":["Couldn't reach the embeddings provider — press ↵ to retry"],"rD-woT":["Tell us what went wrong and we'll gather the logs. Nothing leaves your Mac until you've reviewed it."],"rFmBG3":["Color theme"],"rFw02Q":["Uploading ",["keyName"]],"rJVoVX":["Source find results"],"rNifQd":["Remove property"],"rQAQus":["Couldn't save template: ",["error"]],"rQRrkB":["yesterday"],"rSoi6g":[["displayName"]," (",["bin"],") isn't installed or on your PATH."],"rVJpLz":["On — hovering an external link sends its URL to the destination site to fetch a preview."],"rVxu1k":["No pages link here yet."],"rXz97P":["Numbered list of items."],"rZ9HZq":["To do"],"rZVMkf":["Visual editor replace input focused"],"rageVb":["Custom HTML with a live preview pane (sandboxed iframe)."],"rdU729":["Layout"],"rf6x3F":["Dock terminal to the bottom"],"rfFpcF":["Remove ",["chip"]],"rgPqOw":["Convert the current block to a paragraph."],"riqekz":["Suggestion menu navigation"],"rlUzXK":["Could not validate folder. Please try again."],"roAe2K":["Link URL"],"roiUQQ":["This page doesn't link to anything yet."],"rppgXF":["Disconnecting"],"rssK8c":["Ignore patterns (raw text)"],"rtdR4v":["Show or hide Files"],"rwrPbS":["Component boundary navigation"],"s-MGs7":["Resources"],"s-XOaI":["File name"],"s061i4":["Relative path"],"s0IDhW":["This file could not be found."],"s0J_k9":[["0","plural",{"one":["#"," key"],"other":["#"," keys"]}]],"s0_GnA":["Opening ",["openingLabel"],"…"],"s1c0ja":["Bullet List"],"s3caR3":["Deleting"],"sE7R19":["Could not load templates: ",["templatesError"],". You can still create a blank note."],"sER-bs":["Files"],"sFhaTJ":["Disambiguates similarly-named templates in the menu."],"sHrqDx":["Couldn't rename skill: ",["0"]],"sICrVf":["Restored to the version from ",["0"]],"sIGbBZ":["Convert selection to footnote"],"sIxSSP":["Resolve conflict in your terminal"],"sJK6pq":["Permission denied"],"sJWhgo":["Unknown component: ",["unregisteredComponentName"]],"sOxZaS":["Failed to load graph"],"sZ2IOu":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. It doesn't exist on your current branch (<1>",["currentLabel"],"</1>)."],"saIASg":["Second item"],"saYiIO":["Path cannot contain null bytes"],"seeS6l":["Setup OpenKnowledge in this folder?"],"shNd9t":["Slash command menu"],"si3L24":["Open an additional terminal tab. With text selected, stage it in the new tab's AI input."],"skf5Ix":["Indent or outdent source editor lines."],"sn5BEU":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]," · crash dump not redacted"],"snrVQ7":["probe failed"],"ssuwjF":["Branch"],"stlgky":["On — your search queries and the text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"sxTdZI":["Loading paths…"],"sxjyRq":["Worktrees"],"sxkWRg":["Advanced"],"t-JXbf":["Notion-style inline row for a downloadable file. Drag-drop also works."],"t18QYR":["Unpin ",["accessibleLabel"]],"t2TkQ3":["Sync paused — resolve conflicts to resume."],"t422_7":["Uninstall everywhere"],"t4sFKC":["New branch <0>",["trimmed"],"</0> will be created from the current commit, in its own worktree under <1>.ok/worktrees/</1>."],"t6w1cq":["Open a blank editor tab."],"tAPZEx":["Below"],"tHKQ6j":["Renaming"],"tP5DDk":["Apply link"],"tUvUfp":["Use a folder you already have."],"t_YqKh":["Remove"],"teD0H9":["Couldn't open a worktree for that branch."],"tfDRzk":["Save"],"tfi40B":["Failed to create page"],"tgWuMB":["Modified"],"thnPBX":["Activate the next editor tab."],"ti6aF_":["Ask ",["0"]," CLI"],"tiWX6q":["Source editor"],"tjXez2":["blog-post"],"toyw51":["Mermaid diagram controls"],"tsiTqO":["Paste your API key"],"tsyExA":["Connect your AI tools to OpenKnowledge"],"u-9fWA":["See <0>Architecture</0> for the system overview."],"u3BOHd":[["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"u3YnKw":["Could not construct share URL."],"u3wRF-":["Published"],"u6Hp4N":["Markdown"],"u7H-Wn":["Show panel (",["panelShortcutLabel"],")"],"u7U_Ij":["Link the selected text, or edit the link under the caret."],"uA_jXp":["Switch and update branch"],"uCaIdy":["GitHub sign-in is missing or expired. Reconnect to resume syncing."],"uDlyqd":["Document the architecture of this repo: create an overview page that links to a page per major module describing its responsibilities and entry points."],"uF9ruK":["Saving"],"uFOL2y":["No project skills yet. Author one to teach agents a repeatable task scoped to this knowledge base."],"uFQbYd":["Home page and entry point."],"uGaIIS":["Check out worktree"],"uH_S-u":[["loadErrorTitle"],": ",["message"]],"uKRYiW":["Sync status unavailable — server error."],"uL_Wx8":["The terminal stopped unexpectedly."],"uM6jnS":["Restore failed"],"uO9WLl":["Push"],"uQNW00":["Detached HEAD — checkout a branch to resume"],"uQewpR":["Couldn't restart the server — it's running under a different account. Restart your computer to clear it, then reopen this project."],"uWtdQR":["No templates yet. Add one in this folder's Templates section, or in Settings → Templates."],"uWx2ZP":["Last sync"],"u_lS4C":["Clone complete — opening project"],"uaUc6t":["Restart server"],"ubMwcO":["The terminal session ended (signal ",["0"],")."],"ugoTXs":["folder"],"uhJEA2":[["count","plural",{"one":["#"," more participant"],"other":["#"," more participants"]}]],"uksqrP":["Repository not found. It may have been renamed, deleted, or moved."],"un8kBM":["Creating page: ",["linkTitle"],"."],"ur2XSb":["Visual editor"],"uuoHOU":["Command failed."],"uynXup":[["tokens","plural",{"one":["token"],"other":["tokens"]}]],"v-h2hx":["Delete ",["targetGitPath"]],"v2ZW0K":["Enable terminal"],"v41fCm":["File not found"],"v75Em9":[["uploadedCount","plural",{"one":["Uploaded one file"],"other":["Uploaded ",["uploadedCount"]," files"]}]],"v77jrg":["Visual editor selection"],"v7hK0U":["Use lowercase letters, digits, and hyphens only."],"v7lbnC":["Find next match"],"vAYoCZ":["Couldn't open the worktree. Try again."],"vDXqVv":["Insert a markdown hard break."],"vEJDlt":["The file is in your Trash; the file-watcher will reconcile."],"vGeNNQ":["Copy a prompt and paste it into your agent to set up your project."],"vIxrEk":["Fit width"],"vLyv1R":["Hide"],"vQIVHc":["Folder properties"],"vWc9a0":["Type to edit; <0>⌘ Enter</0> saves, <1>Esc</1> cancels."],"vZVeFG":["Upload failed — please try again"],"vbK_ZG":["Files sidebar"],"ve8vEM":["Code expired — please try again"],"vfRlCI":["Could not copy full path"],"vfWA_g":["You picked ~/Desktop. OpenKnowledge will index everything on your desktop."],"vhAnzJ":["Turn on semantic search?"],"viwC-K":["Failed to remove project."],"vppAju":["Where newly added attachments are placed."],"vv7kpg":["Cancelled"],"vvWZnu":["Diff unavailable"],"w3tVpc":["No links yet. Add wiki links or markdown links to build a graph."],"w3vFfL":["Hide Files"],"w4hMYl":["Could not read branch state for this project. Close this dialog and open the share link again."],"w6sBjd":["Terminal settings not yet loaded — try again in a moment"],"w7SsvI":["That folder isn't an OpenKnowledge project yet. Initialize it and open?"],"w7nm4K":["Indented blockquote for citations."],"wDgmsr":["\\"",["0"],"\\" install refreshed (",["1"],")"],"wGSHzy":["Activate one of the first eight editor tabs."],"wJijgU":["Location"],"wJo9oS":["Close find"],"wQp1V3":["Mirror of <0>",["src"],"</0>"],"wT4iQr":["Open visual-editor find with replace controls expanded."],"wTcjov":["No workspace"],"wVa83H":["Couldn't create the report"],"wXO4Tg":[["hrs"],"h ago"],"w_Sphq":["Attachments"],"waFx9W":["Managed"],"wbv9xO":["Create new project"],"wbwHYD":["Enable sync"],"wccmX0":["Your embeddings provider API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search, where you can also override the endpoint."],"wdxz7K":["Source"],"weP6me":["Couldn't load docs — type @ again to retry"],"wlwXUk":["You picked ~/Downloads. Files there are usually transient — consider a stable folder instead."],"wn8EJi":["Skills teach agents repeatable tasks. Author them here; install a skill to project it into your editors' skill folders."],"wndeIl":["Project-level pages with neither incoming nor outgoing graph edges."],"wtcxiD":["Share this setup with your team?"],"wvbc1r":["Couldn't open document"],"wzq9Rv":["A branch with that name already exists. Open its worktree from the switcher instead."],"x-5mJ1":["Install on all"],"x2fr_j":["Graph"],"x3-2ta":[["packName"]," initialized (",["projectEntries","plural",{"one":["#"," entry"],"other":["#"," entries"]}],")"],"x57cJf":["Open link"],"xCJdfg":["Clear"],"xCdTnb":["Close new tab"],"xDBki3":["Heading suggestions"],"xFQRu4":["I already have it locally"],"xG4tb6":["Lost connection to \\"",["docName"],"\\"."],"xHGM4U":["Hide HTML preview"],"xK291b":["Two-page (odd)"],"xNyj3h":["Reinstall for Claude Chat & Cowork"],"xOTzt5":["just now"],"xSVO3J":["What gets created"],"xV5sXw":[["0"],"w ago"],"xWEvuo":["Ask AI"],"xXo8FT":["Save failed: ",["error"]],"xYMPyY":["Paste was incomplete — ",["chunksCompleted"]," of ",["totalChunks"]," chunks landed.",["restoreSuffix"]],"xaDWAI":["Switch project"],"xbdtfY":["Markdown source"],"xc4g25":["Parse failed"],"xeXS4P":["Or use a starter pack"],"xeiujy":["Text"],"xhlFsx":["Inherited — set a value here to replace it."],"xi9KGG":["Show Terminal"],"xiv-dW":["No files yet."],"xloBjn":["Relative Path"],"xnP32l":["No description yet — add one so agents know when to use this skill."],"xrVr_k":["Couldn't create skill: ",["0"]],"xsZhu-":["Page number"],"xzktOa":["Edit wiki link"],"y1t8bQ":["Settings sections"],"y3aU20":["Save changes"],"y46m5r":["The desktop app isn't responding. Refresh and try again."],"y5FUYi":["Suggestion menu open"],"y5UgU8":["Disable ",["0"]],"y8B54M":["Couldn't send your prompt — please try again."],"yCX4jp":[" Your selection could not be restored."],"yEJ-sl":["The preview blocks resources that don't meet its security rules (for example plain http:// URLs, or code that uses eval). The content above may render incompletely."],"yFyZMJ":["No pages matched \\"",["semanticQueryText"],"\\" by meaning."],"yH7T4q":[["failedCount","plural",{"one":["1 file failed to upload"],"other":[["failedCount"]," files failed to upload"]}]],"yHikCO":["Open CodeMirror's go-to-line prompt."],"yIPXut":["Preparing search"],"yKu_3Y":["Restore"],"yLEyuq":["Product updates in your inbox."],"yLq4w4":["Separator"],"yMgL_E":["Find field navigation"],"yQE2r9":["Loading"],"yQyglE":["No matching docs"],"yR5LHI":["Enter a 6-digit hex like #1A2B3C"],"yUxR-Q":["Expand ",["keyName"]],"yWSvcf":["Content root"],"yWWThY":["Asset reference"],"yYR6za":["Display text"],"yZmvQ4":["This project's server (v",["0"],") is newer than this app (v",["1"],")."],"y_5CE8":["Item ",["0"]],"y_K0Dz":["What happened?"],"yaPGPa":["Open a project to manage its AI tool connections."],"yf5auF":["Search rules by id, alias, or name"],"yf5r22":[["keyName"]," type: ",["typeLabel"]," (inherited from folder properties; not editable here)"],"yhdqox":["Installed — ok is available in external terminals. Unchecking removes it; OpenKnowledge's built-in terminal and AI tools keep working."],"yitgD9":["Failed to load skill targets: ",["0"]],"yjExfe":["Branch <0>",["shareBranch"],"</0> is checked out in:"],"ylXj1N":["Selected"],"ymWJLd":["Show ",["0"]," more"],"ynIa4S":["Visual editor list item"],"ypw6My":["Showing top ",["0"]," headings — keep typing to narrow"],"ysxgu8":["project"],"yutJKi":["Checklist with checkboxes."],"yvG-l1":["Open source lint panel"],"yvHDYG":["Claude Desktop"],"yz7wBu":["Close"],"yzF66j":["Link"],"yzGPkm":["Expand graph"],"yzYE4B":["A picture of the app from just before you opened this. It isn't redacted, so check the preview and uncheck it if anything shouldn't be shared."],"z-lawV":["worktree"],"z0a2EA":["Diagram from Mermaid source — flowchart, sequence, class, state, ER, gantt, pie."],"z1uNN0":["No emoji found."],"z2JdQ-":["Config sharing unchanged — see details below."],"z2funE":["Full Path"],"z5pqI8":["Cannot upload: no document is open"],"z60Lgn":["Saves the file to <0>~/Downloads/openknowledge.skill</0> and opens the Claude Desktop App. Requires Node.js or Bun on your PATH."],"zAJzIg":["Problems in ",["0"]],"zAsDLY":["Graph visualization of document links"],"zKxoPm":["Couldn't rename \\"",["0"],"\\": ",["1"]],"zL0LPh":["Global outside text fields"],"zLGXna":["No starter packs available."],"zLak8b":["Activate new tab"],"zQBg2C":["Move the current block up or down one position."],"zUhPuR":["Open containing folder, ",["hint"]],"zXj1rA":["Search by meaning"],"zYp8Sr":["A <0>Modified</0> badge marks rules your config sets explicitly — directly, or inherited through <1>extends</1>. Unmarked rules keep their default state."],"zZ_I5K":["Open project menu"],"zaXlhf":["The properties block at the top of this doc has a formatting error. Switch to source mode to fix it."],"zbymaY":[["0"],"m ago"],"zcmYx4":["git configuration is unavailable"],"zd00pH":["Copy Path"],"zgSFyG":["External link"],"zkz0Fg":["Set up syncing"],"zlErBl":["Page headings error response did not match RFC 9457"],"zo3Dl7":["Toggle thumbnails"],"zrP8HX":["Frontmatter every document created from this template starts with. Values are YAML — a list is <0>[a, b]</0>; <1>{",["date"],"}</1> fills in on create."],"ztKII6":["Failed to add item"],"zvjCD4":["Detailed diagnostics"],"zwBp5t":["Private"],"zyKa-I":["Star us on GitHub"]}`)},Wh=`en`;_l.load(Wh,Uh.messages),_l.activate(Wh);function Gh(e){if(e===null)return`none`;switch(e.kind){case`doc`:case`folder-index`:return`doc`;case`folder`:return`folder`;case`asset`:case`skill-file`:case`large-file`:return`asset`;case`missing`:return`none`}}var Kh={newFile:{id:`HdkSiO`},newFolder:{id:`96G6Re`},openGraph:{id:`3Fcb0I`},initializeStarterPack:{id:`fWi7pn`},newProject:{id:`gKi-a_`},openFolderOnDisk:{id:`WPwDin`},switchProject:{id:`xaDWAI`},settings:{id:`Tz0i8g`},installClaudeDesktop:{id:`62Pc08`},reportBug:{id:`cd5EXh`},newFromTemplate:{id:`Uuj_R4`},rename:{id:`2wxgft`},duplicate:{id:`euc6Ns`},moveToTrash:{id:`q3TWG7`},revealInFinder:{id:`LtSYdi`},copyFullPath:{id:`Up2_7p`},copyRelativePath:{id:`M6mvVi`},closeTab:{id:`r6ncaO`},newWorktree:{id:`DXd9LM`},switchWorktree:{id:`8Vq20-`},sidebarShow:{id:`151wvk`},sidebarHide:{id:`Q1mtyd`},docPanelShow:{id:`fSRzLo`},docPanelHide:{id:`GSYWCm`},terminalShow:{id:`xi9KGG`},terminalHide:{id:`9xCnv8`},showHiddenFiles:{id:`XcGbim`},showOkFolders:{id:`GHsJb8`},showOnlyMarkdownFiles:{id:`WkTLN7`},showSkillsSection:{id:`NF_Wcg`},expandAll:{id:`OlAl5i`},collapseAll:{id:`qvWGzP`},newTerminal:{id:`ZBxvV3`},killTerminal:{id:`5_j-DA`},checkForUpdates:{id:`WMCwmR`},setUpIntegrations:{id:`AhoGwP`},checkSpelling:{id:`ZgJVnp`},openOnGithub:{id:`LeGeTf`}},qh={"new-file":tr,"new-folder":wm,"open-graph":zm,"initialize-starter-pack":Vm,"new-project":Oe,"open-folder":Sc,"switch-project":Dt,settings:Qm,"install-claude-desktop":Ri,"report-bug":ze,"new-from-template":tr,rename:yc,duplicate:bc,"move-to-trash":Wc,"reveal-in-finder":Sc,"copy-full-path":bc,"copy-relative-path":bc,"close-tab":ll,"new-worktree":ts,"switch-worktree":ts,"toggle-sidebar":rt,"toggle-doc-panel":Wm,"toggle-terminal":ah,"toggle-show-hidden-files":xc,"toggle-show-ok-folders":Tm,"toggle-show-only-markdown-files":ir,"toggle-show-skills-section":pc,"expand-all-tree":vh,"collapse-all-tree":Sm,"new-terminal":ah,"kill-terminal":ah,"check-for-updates":Uc,"set-up-integrations":nm,"toggle-spell-check":nh,"open-github":Hh},Jh={"new-file":e=>{e.closePalette(),e.openNewItemDialog(`file`)},"new-folder":e=>{e.closePalette(),e.openNewItemDialog(`folder`)},"open-graph":e=>{e.closePalette(),Bh(`graph`)},"initialize-starter-pack":e=>{e.closePalette(),e.openSeedDialog()},"new-project":e=>{e.closePalette(),e.openCreateProjectDialog()},"open-folder":e=>{let t=e.bridge;t&&e.runAction(async()=>{let e=await t.dialog.openFolder();e&&await t.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})})},"switch-project":e=>{let t=e.bridge;t&&e.runAction(()=>t.navigator.open(),_l._({id:`jol95m`}))},settings:e=>{e.closePalette(),window.location.hash!==`#settings`&&(window.location.hash=Ki)},"install-claude-desktop":e=>{e.closePalette(),window.location.hash=`#install-claude-desktop`},"report-bug":e=>{e.closePalette(),e.openReportBugDialog()},"check-for-updates":e=>e.runAction(async()=>{await e.bridge?.update.checkNow()}),"set-up-integrations":e=>e.runAction(async()=>{await e.bridge?.mcpWiring.reconfigure()}),"toggle-spell-check":e=>e.runAction(async()=>{await e.bridge?.spellcheck.toggle()}),"open-github":e=>e.openExternalUrl(Bo)};function Yh(e){return{host:e.bridge===null?`web`:`desktop`,activeTargetKind:e.contextualTargetKind,singleFile:e.singleFile,terminalLive:e.viewMenuState.terminalLive===!0,canExpandAll:e.viewMenuState.canExpandAll!==!1,canCollapseAll:e.viewMenuState.canCollapseAll!==!1,hasActiveDoc:e.activeDocName!==null,showInstallSkill:!1}}function Xh(e,t){if(e.stateToggle){let n=t.viewMenuState[e.stateToggle.stateField]===!0?e.stateToggle.hideKey:e.stateToggle.showKey;return _l._(Kh[n])}return _l._(Kh[e.labelKey])}function Zh(e){let t=e.menuActionId;return e=>e.emitMenuAction(t)}function Qh(e){let t=e.palette;if(!t)throw Error(`command ${e.id} has no palette presence`);let n=qh[e.id];if(!n)throw Error(`command ${e.id} has no palette icon`);let r=e.checkField;return{id:e.id,menuActionId:e.menuActionId,label:t=>Xh(e,t),keywords:e.keywords,icon:n,group:t.group,visibility:t.visibility,shortcutId:e.shortcutId,shortcutDesktopOnly:e.shortcutDesktopOnly,checked:r?e=>e.viewMenuState[r]===!0:void 0,available:t=>ba(e.availability,Yh(t)),dispatch:Jh[e.id]??Zh(e)}}var $h=Co.flatMap(e=>e.palette?[Qh(e)]:[]),eg=`ok-omnibar-recents-v1`,tg=10;function ng(e){return typeof e==`object`&&!!e&&(e.kind===`file`||e.kind===`folder`)&&typeof e.path==`string`&&typeof e.lastOpenedAt==`string`}function rg(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function ig(e,t){return`${e}:${t}`}function ag(e){let t=rg(e);if(!t)return[];try{let e=t.getItem(eg);if(!e)return[];let n=JSON.parse(e);return Array.isArray(n)?n.filter(ng).slice(0,tg):[]}catch{return[]}}function og(e,t){let n=rg(t);if(n)try{n.setItem(eg,JSON.stringify(e.slice(0,tg)))}catch(e){console.warn(`[omnibar] Failed to save recent entries:`,e)}}function sg(e,t){return[t,...e.filter(e=>e.kind!==t.kind||e.path!==t.path)].slice(0,tg)}function cg(e,t){return e.filter(e=>t.has(ig(e.kind,e.path)))}var lg=50,ug=50,dg=``,fg=null;function pg(e){return e.trim().toLowerCase()}function mg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function hg(e){let t=e.trim();return t?[...new Set(t.split(/\s+/).filter(Boolean))].sort((e,t)=>t.length-e.length):[]}function gg(e,t,n=new Map,r=new Map,i=new Set){let a=[],o=new Set;for(let t of e){o.add(t);let e=r.get(t),i=e?.modified,s=n.get(t);a.push({kind:`file`,path:t,name:ho(t),...s&&{title:s},...e?.docExt&&{docExt:e.docExt},...i&&{modifiedTs:Date.parse(i)}})}for(let e of i)o.has(e)||(o.add(e),a.push({kind:`file`,path:e,name:ho(e),bodyIndexed:!1}));for(let e of t)a.push({kind:`folder`,path:e,name:ho(e)});return a.sort((e,t)=>{let n=e.path.localeCompare(t.path);return n===0?e.kind===t.kind?0:e.kind===`folder`?-1:1:n}),a}function _g(e){return _a({kind:e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`,path:e.path,title:e.title??e.name,modifiedTs:e.modifiedTs??0})}function vg(e){return{entries:e,byId:new Map(e.map(e=>[`${e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`}:${e.path}`,e])),corpus:ao(e.map(_g))}}function yg(e){return e.map(e=>`${e.kind}\u0000${e.path}\u0000${e.title??``}\u0000${e.docExt??``}\u0000${e.modifiedTs??0} ${e.bodyIndexed===!1?`0`:`1`}`).join(``)}function bg(e){let t=yg(e);return fg&&dg===t?fg:(dg=t,fg=vg(e),fg)}function xg(e,t,n=lg){return Sg(bg(e),t,n)}function Sg(e,t,n=lg){let r=pg(t);return r?Ra(e.corpus,r,{intent:`omnibar`,limit:n,scopes:[`page`,`folder`,`file`]}).map(t=>e.byId.get(t.document.id)).filter(e=>e!==void 0):e.entries.slice(0,20)}function Cg(e,t){let n=hg(t);if(n.length===0||e.length===0)return[{text:e,match:!1,start:0}];let r=RegExp(`(${n.map(mg).join(`|`)})`,`gi`),i=[],a=0;for(let t of e.matchAll(r)){let n=t.index??0;n>a&&i.push({text:e.slice(a,n),match:!1,start:a}),i.push({text:t[0],match:!0,start:n}),a=n+t[0].length}return a<e.length&&i.push({text:e.slice(a),match:!1,start:a}),i.length>0?i:[{text:e,match:!1,start:0}]}function wg(e){if(e.kind!==`page`&&e.kind!==`folder`&&e.kind!==`file`||typeof e.path!=`string`)return null;let t=ho(e.path);return{kind:e.kind===`folder`?`folder`:`file`,path:e.path,name:t,...e.kind===`file`&&{bodyIndexed:!1},...e.title&&{title:e.title},...e.snippet&&{snippet:e.snippet},...typeof e.score==`number`&&{score:e.score}}}async function Tg(e,t={}){let n=e.trim();if(!n)return{entries:[],truncated:!1,ready:!0};let r=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:n,intent:`full_text`,ranking:t.semantic?`relevance`:`navigation`,scopes:[`page`,`folder`,`content`,`file`],limit:t.limit??ug,source:`omnibar`,...t.semantic?{semantic:!0}:{}}),signal:t.signal});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(El(e)??`Search failed with status ${r.status}`)}let i=await r.json();return{entries:(i.results??[]).map(wg).filter(e=>!!e),truncated:i.truncated===!0,ready:i.ready!==!1}}function Eg(e,t,n=[]){let r=pg(t);return r?pg([e,...n].join(` `)).includes(r):!0}function Dg(e,t,n={}){if(e.trim()===``)return`idle`;if(t.length===0)return`empty`;if(n.truncated)return`truncated`;for(let e of t)if(`snippet`in e&&typeof e.snippet==`string`&&e.snippet.length>0)return`content`;return`name-only`}function Og(e){let{query:t,firedQuery:n,status:r,resultCount:i}=e,a=i>0,o=t!==``&&t!==n,s=a&&(r===`loading`||t!==n),c=null;r===`error`&&t!==``?c={kind:`retry`,query:t}:o&&r!==`loading`&&(c={kind:`search`,query:t});let l=null;return r===`loading`?l=`searching`:t===``&&!a?l=`empty`:r===`success`&&!o&&!a&&(l=`no-results`),{submit:c,results:{show:a,dimmed:s,forQuery:a?n:null},notice:l}}var kg=`tag:`;function Ag(e,t){if(!e.toLowerCase().startsWith(`tag:`))return{kind:`normal`,query:e};let n=e.slice(4).replace(/^\s+/,``).trim();return n&&t.has(n)?{kind:`tag-docs`,tagName:n}:{kind:`tag-list`,query:n}}function jg(e,t){return et(e,t)}var Mg=_e;async function Ng(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/tags/${e} responded with ${t.status}`);let n=await t.json();return Array.isArray(n.docs)?n.docs:[]}var Pg=[`.md`,`.mdx`];function Fg(e){let t=e.toLowerCase();for(let e of Pg)if(t.endsWith(e))return e;return null}var Ig={local:0,inherited:1};function Lg(e){return[...e].sort((e,t)=>{let n=Ig[e.scope]-Ig[t.scope];if(n!==0)return n;let r=(e.title??e.name).toLowerCase(),i=(t.title??t.name).toLowerCase();return r.localeCompare(i)})}var Rg=`__blank__`;function zg(e){return e.trim()?e.includes(`..`)?`dotdot`:e.startsWith(`/`)?`leading-slash`:e.includes(`\\`)?`backslash`:e.includes(`\0`)?`null-byte`:null:`empty`}function Bg(e){switch(e){case`empty`:return{id:`hYDc6B`};case`dotdot`:return{id:`Wyxs0x`};case`leading-slash`:return{id:`OYnx7O`};case`backslash`:return{id:`qo4zCg`};case`null-byte`:return{id:`saYiIO`}}}function Vg(e){let t=e.fileName.trim(),n=Fg(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function Hg(e,t){return vl(e.target)?!1:Tl(e,`new-item`,t)}function Ug(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function Wg(e){let t=(0,$.c)(136),{open:n,onOpenChange:r,kind:i,initialDir:a,suggestedName:o,initialTemplate:s,defaultToTemplate:c,description:l,onCreated:u,folderConfig:d}=e,{_:f}=jt(),{addPage:p}=Ls(),m=Ni(d?null:a),h=d??m,[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(Rg),[S,C]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(null),A=(0,Q.useId)(),j=(0,Q.useId)(),M=(0,Q.useId)(),N=(0,Q.useId)(),P=(0,Q.useId)(),[F,I]=(0,Q.useState)(!1),L=(0,Q.useRef)(null),R=(0,Q.useRef)(null),z,B;t[0]!==s||t[1]!==i||t[2]!==n||t[3]!==o?(z=()=>{n&&(T(null),k(null),D(!1),y(``),x(i===`file`&&s?s:Rg),C(!1),I(!1),_(i===`file`?o??`untitled`:`index`))},B=[n,i,o,s],t[0]=s,t[1]=i,t[2]=n,t[3]=o,t[4]=z,t[5]=B):(z=t[4],B=t[5]),(0,Q.useEffect)(z,B);let V;t[6]!==h.state.data||t[7]!==h.state.status?(V=h.state.status===`ready`?Lg(h.state.data.folder.templates_available??[]):[],t[6]=h.state.data,t[7]=h.state.status,t[8]=V):V=t[8];let H=V,U;t[9]!==h.state.data||t[10]!==h.state.status||t[11]!==n||t[12]!==b?(U=()=>{n&&b!==Rg&&h.state.status===`ready`&&((h.state.data.folder.templates_available??[]).some(e=>e.name===b)||x(Rg))},t[9]=h.state.data,t[10]=h.state.status,t[11]=n,t[12]=b,t[13]=U):U=t[13];let W;t[14]!==h.state||t[15]!==n||t[16]!==b?(W=[n,b,h.state],t[14]=h.state,t[15]=n,t[16]=b,t[17]=W):W=t[17],(0,Q.useEffect)(U,W);let G;t[18]!==c||t[19]!==h.state.data||t[20]!==h.state.status||t[21]!==s||t[22]!==n||t[23]!==S?(G=()=>{if(!n||!c||s||S||h.state.status!==`ready`)return;let e=Lg(h.state.data.folder.templates_available??[]);e.length>0&&x(e[0].name)},t[18]=c,t[19]=h.state.data,t[20]=h.state.status,t[21]=s,t[22]=n,t[23]=S,t[24]=G):G=t[24];let K;t[25]!==c||t[26]!==h.state||t[27]!==s||t[28]!==n||t[29]!==S?(K=[n,c,s,S,h.state],t[25]=c,t[26]=h.state,t[27]=s,t[28]=n,t[29]=S,t[30]=K):K=t[30],(0,Q.useEffect)(G,K);let ee=i===`file`,te=h.state.status===`loading`||h.state.status===`idle`,q=h.state.status===`error`?h.state.message:null,ne;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(e){_(e),T(null)},t[31]=ne):ne=t[31];let re=ne,ie;t[32]!==g||t[33]!==v||t[34]!==a||t[35]!==i?(ie=function(){return Vg({kind:i,initialDir:a,fileName:g,folderName:v})},t[32]=g,t[33]=v,t[34]=a,t[35]=i,t[36]=ie):ie=t[36];let ae=ie,oe;t[37]!==f||t[38]!==g||t[39]!==v||t[40]!==i?(oe=function(){if(i===`folder`){let e=zg(v.trim());if(e)return{message:f({id:`ODGGlj`,values:{detail:f(Bg(e))}}),field:`folder`}}let e=zg(g.trim());return e?{message:f(Bg(e)),field:`file`}:null},t[37]=f,t[38]=g,t[39]=v,t[40]=i,t[41]=oe):oe=t[41];let se=oe,ce;t[42]!==E||t[43]!==g||t[44]!==v||t[45]!==i?(ce=E||!g.trim()||i===`folder`&&!v.trim(),t[42]=E,t[43]=g,t[44]=v,t[45]=i,t[46]=ce):ce=t[46];let le=ce,ue;t[47]!==f||t[48]!==p||t[49]!==ae||t[50]!==se||t[51]!==i||t[52]!==u||t[53]!==r||t[54]!==b?(ue=async function(){let e=se();if(e){T(e.message),k(e.field);return}D(!0),T(null),k(null);let t=ae(),n=i===`file`&&b!==Rg?b:void 0,a={path:t};n!==void 0&&(a.template=n);try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)}),t=e.status,n=await At(e,f({id:`d2uTPx`,values:{status:t}}));if(!n.ok){D(!1),T(n.title),k(`form`);return}let o=oo.safeParse(n.body);if(D(!1),!o.success){T(f(i===`folder`?{id:`K1ckLX`}:{id:`fJgQHX`})),k(`form`);return}let s=o.data.docName;r(!1),window.location.hash=`#/${s}`,p(s),Jl([`files`,`backlinks`,`graph`]),u?.(s)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),D(!1),T(f({id:`HIb0vl`})),k(`form`)}},t[47]=f,t[48]=p,t[49]=ae,t[50]=se,t[51]=i,t[52]=u,t[53]=r,t[54]=b,t[55]=ue):ue=t[55];let de=ue,fe;t[56]!==f||t[57]!==a?(fe=a||f({id:`L6Hhh6`}),t[56]=f,t[57]=a,t[58]=fe):fe=t[58];let pe=fe,me;t[59]===i?me=t[60]:(me=(0,Z.jsx)(On,{children:i===`file`?(0,Z.jsx)(J,{id:`HdkSiO`}):(0,Z.jsx)(J,{id:`96G6Re`})}),t[59]=i,t[60]=me);let he;t[61]!==l||t[62]!==pe?(he=l??(0,Z.jsx)(J,{id:`NvOvTi`,values:{dirDisplay:pe},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})}}),t[61]=l,t[62]=pe,t[63]=he):he=t[63];let ge;t[64]===he?ge=t[65]:(ge=(0,Z.jsx)(Dn,{children:he}),t[64]=he,t[65]=ge);let _e;t[66]!==me||t[67]!==ge?(_e=(0,Z.jsxs)(Mn,{children:[me,ge]}),t[66]=me,t[67]=ge,t[68]=_e):_e=t[68];let ve;t[69]!==b||t[70]!==ee||t[71]!==N||t[72]!==F||t[73]!==P||t[74]!==H||t[75]!==q||t[76]!==te?(ve=ee&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{id:N,className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`f65AOQ`})}),q?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,children:(0,Z.jsx)(J,{id:`sE7R19`,values:{templatesError:q}})}):null,(0,Z.jsx)(Kg,{triggerId:P,labelledById:N,open:F,onOpenChange:I,value:b,onValueChange:e=>{x(e),C(!0)},templates:H,loading:te}),!te&&!q&&H.length===0?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`uWtdQR`})}):null]}),t[69]=b,t[70]=ee,t[71]=N,t[72]=F,t[73]=P,t[74]=H,t[75]=q,t[76]=te,t[77]=ve):ve=t[77];let ye;t[78]!==f||t[79]!==w||t[80]!==O||t[81]!==A||t[82]!==j||t[83]!==v||t[84]!==i?(ye=i===`folder`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:j,children:(0,Z.jsx)(J,{id:`cqQyPB`})}),(0,Z.jsx)(gl,{ref:R,id:j,value:v,onChange:e=>{y(e.target.value),T(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":w&&(O===`folder`||O===`form`)?A:void 0,"aria-invalid":w&&(O===`folder`||O===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=zg(v.trim());if(t){T(f({id:`ODGGlj`,values:{detail:f(Bg(t))}})),k(`folder`);return}L.current?.focus()}}})]}),t[78]=f,t[79]=w,t[80]=O,t[81]=A,t[82]=j,t[83]=v,t[84]=i,t[85]=ye):ye=t[85];let be;t[86]===i?be=t[87]:(be=i===`folder`?(0,Z.jsx)(J,{id:`jjtmV_`}):(0,Z.jsx)(J,{id:`s-XOaI`}),t[86]=i,t[87]=be);let xe;t[88]!==M||t[89]!==be?(xe=(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:M,children:be}),t[88]=M,t[89]=be,t[90]=xe):xe=t[90];let Se;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(Se=e=>re(e.target.value),t[91]=Se):Se=t[91];let Ce=i===`file`,we=w&&(O===`file`||O===`form`)?A:void 0,Te=w&&(O===`file`||O===`form`)?!0:void 0,Ee;t[92]!==de||t[93]!==le?(Ee=e=>{e.key===`Enter`&&!le&&de()},t[92]=de,t[93]=le,t[94]=Ee):Ee=t[94];let De;t[95]!==M||t[96]!==g||t[97]!==Ce||t[98]!==we||t[99]!==Te||t[100]!==Ee?(De=(0,Z.jsx)(gl,{ref:L,id:M,value:g,onChange:Se,placeholder:`my-note`,autoFocus:Ce,"aria-describedby":we,"aria-invalid":Te,onFocus:Gg,onKeyDown:Ee}),t[95]=M,t[96]=g,t[97]=Ce,t[98]=we,t[99]=Te,t[100]=Ee,t[101]=De):De=t[101];let Oe;t[102]!==w||t[103]!==A?(Oe=w&&(0,Z.jsx)(`p`,{id:A,role:`alert`,className:`text-1sm text-destructive`,children:w}),t[102]=w,t[103]=A,t[104]=Oe):Oe=t[104];let ke;t[105]!==xe||t[106]!==De||t[107]!==Oe?(ke=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[xe,De,Oe]}),t[105]=xe,t[106]=De,t[107]=Oe,t[108]=ke):ke=t[108];let Ae;t[109]!==ve||t[110]!==ye||t[111]!==ke?(Ae=(0,Z.jsxs)(An,{className:`space-y-6 pb-1`,children:[ve,ye,ke]}),t[109]=ve,t[110]=ye,t[111]=ke,t[112]=Ae):Ae=t[112];let je;t[113]===r?je=t[114]:(je=()=>r(!1),t[113]=r,t[114]=je);let Me;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,Z.jsx)(J,{id:`dEgA5A`}),t[115]=Me):Me=t[115];let Ne;t[116]!==E||t[117]!==je?(Ne=(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:je,disabled:E,children:Me}),t[116]=E,t[117]=je,t[118]=Ne):Ne=t[118];let Pe;t[119]===E?Pe=t[120]:(Pe=E?(0,Z.jsx)(J,{id:`E9bKSA`}):(0,Z.jsx)(J,{id:`hYgDIe`}),t[119]=E,t[120]=Pe);let Fe;t[121]!==de||t[122]!==le||t[123]!==Pe?(Fe=(0,Z.jsx)(Y,{onClick:de,disabled:le,children:Pe}),t[121]=de,t[122]=le,t[123]=Pe,t[124]=Fe):Fe=t[124];let Ie;t[125]!==Ne||t[126]!==Fe?(Ie=(0,Z.jsxs)(jn,{children:[Ne,Fe]}),t[125]=Ne,t[126]=Fe,t[127]=Ie):Ie=t[127];let Le;t[128]!==_e||t[129]!==Ae||t[130]!==Ie?(Le=(0,Z.jsxs)(kn,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[_e,Ae,Ie]}),t[128]=_e,t[129]=Ae,t[130]=Ie,t[131]=Le):Le=t[131];let Re;return t[132]!==r||t[133]!==n||t[134]!==Le?(Re=(0,Z.jsx)(Nn,{open:n,onOpenChange:r,children:Le}),t[132]=r,t[133]=n,t[134]=Le,t[135]=Re):Re=t[135],Re}function Gg(e){return Ug(e.currentTarget)}function Kg(e){let t=(0,$.c)(66),{triggerId:n,labelledById:r,open:i,onOpenChange:a,value:o,onValueChange:s,templates:c,loading:l}=e,{_:u}=jt(),d=(0,Q.useId)(),f;if(t[0]!==c||t[1]!==o){let e;t[3]===o?e=t[4]:(e=e=>e.name===o,t[3]=o,t[4]=e),f=c.find(e),t[0]=c,t[1]=o,t[2]=f}else f=t[2];let p=f,m=o===Rg,h=i?d:void 0,g=`${r} ${n}`,_;t[5]!==m||t[6]!==l||t[7]!==p?.name||t[8]!==p?.title||t[9]!==o?(_=l?(0,Z.jsx)(J,{id:`Hl89Qd`}):m?(0,Z.jsx)(J,{id:`E7BhZn`}):p?.title??p?.name??o,t[5]=m,t[6]=l,t[7]=p?.name,t[8]=p?.title,t[9]=o,t[10]=_):_=t[10];let v;t[11]===_?v=t[12]:(v=(0,Z.jsx)(`span`,{className:`truncate`,children:_}),t[11]=_,t[12]=v);let y;t[13]!==m||t[14]!==l||t[15]!==p?(y=!l&&!m&&p?(0,Z.jsx)(Xg,{entry:p}):null,t[13]=m,t[14]=l,t[15]=p,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(lm,{className:`ml-2 size-4 shrink-0 opacity-50`,"aria-hidden":`true`}),t[20]=x):x=t[20];let C;t[21]!==l||t[22]!==i||t[23]!==h||t[24]!==g||t[25]!==b||t[26]!==n?(C=(0,Z.jsx)(se,{asChild:!0,children:(0,Z.jsxs)(Y,{id:n,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":i,"aria-haspopup":`listbox`,"aria-controls":h,"aria-labelledby":g,disabled:l,className:`w-full justify-between font-normal`,children:[b,x]})}),t[21]=l,t[22]=i,t[23]=h,t[24]=g,t[25]=b,t[26]=n,t[27]=C):C=t[27];let w;t[28]===u?w=t[29]:(w=u({id:`UQAp48`}),t[28]=u,t[29]=w);let T;t[30]===w?T=t[31]:(T=(0,Z.jsx)(de,{placeholder:w}),t[30]=w,t[31]=T);let E;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`c8iK2Y`})}),t[32]=E):E=t[32];let D;if(t[33]!==a||t[34]!==s||t[35]!==c||t[36]!==o){let e;t[38]!==a||t[39]!==s||t[40]!==o?(e=e=>{let t=e.title??e.name,n=e.title&&e.title!==e.name?e.name:void 0,r=`${e.scope}:${e.source_folder}:${e.name}`;return(0,Z.jsxs)(le,{value:r,keywords:[t,e.name,e.description??``,e.scope,e.source_folder??``],onSelect:()=>{s(e.name),a(!1)},className:`items-start gap-3`,children:[(0,Z.jsx)(As,{className:X(`mt-1 size-4 shrink-0`,o===e.name?`opacity-100`:`opacity-0`),"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:t}),n?(0,Z.jsx)(`code`,{className:`font-mono text-2xs text-muted-foreground shrink-0`,children:n}):null,(0,Z.jsx)(Xg,{entry:e,className:`ml-auto`})]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description}):null]})]},r)},t[38]=a,t[39]=s,t[40]=o,t[41]=e):e=t[41],D=c.map(e),t[33]=a,t[34]=s,t[35]=c,t[36]=o,t[37]=D}else D=t[37];let O;t[42]!==a||t[43]!==s?(O=()=>{s(Rg),a(!1)},t[42]=a,t[43]=s,t[44]=O):O=t[44];let k=o===Rg?`opacity-100`:`opacity-0`,A;t[45]===k?A=t[46]:(A=X(`mt-1 size-4 shrink-0`,k),t[45]=k,t[46]=A);let j;t[47]===A?j=t[48]:(j=(0,Z.jsx)(As,{className:A,"aria-hidden":`true`}),t[47]=A,t[48]=j);let M;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`E7BhZn`})}),t[49]=M):M=t[49];let N;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[M,(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(0,Z.jsx)(J,{id:`hZoBHK`})})]}),t[50]=N):N=t[50];let P;t[51]!==O||t[52]!==j?(P=(0,Z.jsxs)(le,{value:`Blank note empty`,onSelect:O,className:`items-start gap-3`,children:[j,N]}),t[51]=O,t[52]=j,t[53]=P):P=t[53];let F;t[54]!==d||t[55]!==D||t[56]!==P?(F=(0,Z.jsxs)(pe,{id:d,className:`subtle-scrollbar`,children:[E,D,P]}),t[54]=d,t[55]=D,t[56]=P,t[57]=F):F=t[57];let I;t[58]!==T||t[59]!==F?(I=(0,Z.jsx)(re,{className:`w-[var(--radix-popover-trigger-width)] p-0`,align:`start`,onOpenAutoFocus:Yg,onWheel:Jg,onTouchMove:qg,children:(0,Z.jsxs)(S,{children:[T,F]})}),t[58]=T,t[59]=F,t[60]=I):I=t[60];let L;return t[61]!==a||t[62]!==i||t[63]!==I||t[64]!==C?(L=(0,Z.jsxs)(ae,{open:i,onOpenChange:a,children:[C,I]}),t[61]=a,t[62]=i,t[63]=I,t[64]=C,t[65]=L):L=t[65],L}function qg(e){e.stopPropagation()}function Jg(e){e.stopPropagation()}function Yg(e){e.preventDefault(),e.currentTarget.querySelector(`[cmdk-input]`)?.focus()}function Xg(e){let t=(0,$.c)(7),{entry:n,className:r}=e;if(n.scope===`inherited`){let e;t[0]===r?e=t[1]:(e=X(`shrink-0 text-2xs`,r),t[0]=r,t[1]=e);let i;t[2]===n.source_folder?i=t[3]:(i=n.source_folder||(0,Z.jsx)(J,{id:`ZNK2Tq`}),t[2]=n.source_folder,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,Z.jsx)(Ps,{variant:`gray`,className:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}return null}function Zg(e){return e.split(`/`).pop()??e}function Qg(e,t){let n=[];for(let r of t?.folders??[]){let t=`${r.path}/.ok/templates/`,i=e.created.filter(e=>e.kind===`file`&&(e.path.startsWith(t)||e.path.includes(`/${t}`))).map(e=>Zg(e.path)),a=i.length,o=e.created.some(e=>e.kind===`folder`&&(e.path===r.path||e.path.endsWith(`/${r.path}`)));(a>0||o)&&n.push({path:r.path,summary:r.summary,templateCount:a,templates:i})}return n}function $g(e){return e.created.filter(e=>e.kind===`file`&&!e.path.split(`/`).includes(`.ok`)).map(e=>({path:e.path,name:Zg(e.path)}))}function e_(e){let t=(0,$.c)(17),{plan:n,selectedPack:r}=e,{_:i}=jt(),a,o,s,c;if(t[0]!==i||t[1]!==n||t[2]!==r){let e=Qg(n,r),l=$g(n),u=n.packSkill?.pending?n.packSkill:void 0,d=e.length,f=l.length,p=e.reduce(s_,0),m=+!!u,h={"log.md":i({id:`EoaQyO`}),"USER.md":i({id:`bV6DJA`}),"SOUL.md":i({id:`Waiy-j`}),"ACCESS_POLICY.md":i({id:`6ZhdPI`}),"HEARTBEAT.md":i({id:`MDZSJe`}),"OVERVIEW.md":i({id:`dMsx3p`}),"welcome.md":i({id:`WWcqsG`}),"index.md":i({id:`uFQbYd`})},g=[d>0?{key:`folders`,n:d,label:i({id:`VsaI0G`,values:{folderCount:d}})}:null,f>0?{key:`files`,n:f,label:i({id:`DgcGrb`,values:{fileCount:f}})}:null,p>0?{key:`templates`,n:p,label:i({id:`ba3vIW`,values:{templateCount:p}})}:null,m>0?{key:`skills`,n:m,label:i({id:`HAvRAI`,values:{skillCount:m}})}:null].filter(o_),_=e.map(e=>({key:`folder:${e.path}`,icon:Tm,name:`${Zg(e.path)}/`,pill:e.templateCount>0?i({id:`-5jISU`,values:{0:e.templateCount}}):void 0,pillTooltip:e.templateCount>0?e.templates:void 0,description:e.summary||void 0})),v=l.map(e=>({key:`file:${e.path}`,icon:St,name:e.name,title:e.name,description:h[e.name]})),y=u?[{key:`skill:${u.name}`,icon:Om,name:uc(u.name),title:u.name,description:i({id:`FEqWFL`})}]:[],b=[{key:`folders`,label:i({id:`pcqlQu`,values:{0:_.length}}),rows:_},{key:`files`,label:i({id:`ZgGuA4`,values:{0:v.length}}),rows:v},{key:`skill`,label:i({id:`OZJeTZ`}),rows:y}].filter(a_);s=`space-y-5`;let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(`h3`,{className:`flex items-center gap-1.5 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(J,{id:`xSVO3J`})}),t[7]=x):x=t[7];let S=g.length>0?(0,Z.jsx)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs`,children:g.map(i_)}):null;t[8]===S?c=t[9]:(c=(0,Z.jsxs)(`div`,{className:`flex flex-wrap justify-between items-baseline gap-x-2 gap-y-0.5`,children:[x,S]}),t[8]=S,t[9]=c),a=`space-y-5`,o=b.map(t_),t[0]=i,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else a=t[3],o=t[4],s=t[5],c=t[6];let l;t[10]!==a||t[11]!==o?(l=(0,Z.jsx)(`div`,{className:a,children:o}),t[10]=a,t[11]=o,t[12]=l):l=t[12];let u;return t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,Z.jsxs)(`section`,{className:s,children:[c,l]}),t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function t_(e){return(0,Z.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Z.jsxs)(`h4`,{className:`flex items-baseline gap-2 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:e.label}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/50`,children:e.rows.length})]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:e.rows.map(n_)})]},e.key)}function n_(e){let t=e.icon;return(0,Z.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border border-border/60`,children:(0,Z.jsx)(t,{className:`size-4 text-muted-foreground`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-1sm text-foreground/90`,title:e.title,children:e.name}),e.pill?e.pillTooltip&&e.pillTooltip.length>0?(0,Z.jsxs)(Sn,{children:[(0,Z.jsx)(yn,{className:`shrink-0 cursor-help rounded bg-transparent p-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground transition-colors hover:text-foreground/70 focus-visible:text-foreground/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:e.pill}),(0,Z.jsx)(bn,{children:(0,Z.jsx)(`ul`,{className:`space-y-0.5 text-left font-mono`,children:e.pillTooltip.map(r_)})})]}):(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground`,children:e.pill}):null]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:e.description}):null]})]},e.key)}function r_(e){return(0,Z.jsx)(`li`,{children:e},e)}function i_(e,t){return(0,Z.jsxs)(Q.Fragment,{children:[t>0?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground/50`,children:`·`}):null,(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`span`,{className:`text-foreground/80`,children:e.n}),` `,(0,Z.jsx)(`span`,{className:`text-muted-foreground/80`,children:e.label})]})]},e.key)}function a_(e){return e.rows.length>0}function o_(e){return e!==null}function s_(e,t){return e+t.templateCount}async function c_(e){let t=await e.json().catch(()=>null),n=Oo.safeParse(t);if(!n.success)return{kind:`internal`,message:`HTTP ${e.status}`};let r=n.data.detail??n.data.title,i=n.data.type;return i===`urn:ok:error:seed-prerequisite-missing`?{kind:`prerequisite-missing`,message:r}:i===`urn:ok:error:seed-invalid-root`?{kind:`invalid-root`,message:r}:i===`urn:ok:error:no-project-dir`?{kind:`no-project`,message:r}:{kind:`internal`,message:r}}function l_(){let e=typeof window<`u`?window.okDesktop:void 0;if(e?.seed){let t=e.seed.apply;return{plan:e.seed.plan,apply:async(e,n)=>{let r=await t(e,n);return r.ok&&Xl(),r},listPacks:e.seed.listPacks}}return{plan:async e=>{let t=new URLSearchParams;e?.rootDir&&t.set(`rootDir`,e.rootDir),e?.packId&&t.set(`packId`,e.packId);let n=t.toString(),r=await fetch(`/api/seed/plan${n?`?${n}`:``}`);if(!r.ok)return{ok:!1,error:await c_(r)};let i=await r.json().catch(()=>null);return i?.plan?{ok:!0,plan:i.plan}:{ok:!1,error:{kind:`internal`,message:`Malformed plan response`}}},apply:async(e,t)=>{let n=await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e,packId:t?.packId})});if(!n.ok)return{ok:!1,error:await c_(n)};let r=await n.json().catch(()=>null);return r?.result?(Xl(),{ok:!0,result:r.result}):{ok:!1,error:{kind:`internal`,message:`Malformed apply response`}}},listPacks:async()=>{let e=await fetch(`/api/seed/packs`);if(!e.ok)return{ok:!1,error:{kind:`internal`,message:`HTTP ${e.status}`}};let t=await e.json().catch(()=>null);return!t||!Array.isArray(t.packs)?{ok:!1,error:{kind:`internal`,message:`Malformed listPacks response`}}:{ok:!0,packs:t.packs}}}}var u_={"knowledge-base":Mm,"software-lifecycle":ts,"codebase-wiki":im,"plain-notes":ch,worldbuilding:pm,"writing-pipeline":Gm,"entity-vault":zm,okf:_m};function d_(e){return u_[e]??Mm}function f_(e){let t=(0,$.c)(69),{onPackSelect:n,onCreateBlankFile:r,collapsedPackIds:i,className:a,packs:o}=e,{_:s}=jt(),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(!1),m=o===void 0,h,g;t[0]===m?(h=t[1],g=t[2]):(h=()=>{if(!m)return;let e=!1;return(async()=>{try{let t=await l_().listPacks();if(e)return;t.ok?l(t.packs):d(t.error.message)}catch(t){let n=t;if(e)return;d(n instanceof Error?n.message:String(n))}})(),()=>{e=!0}},g=[m],t[0]=m,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _=m?c:o;if(u!==null){let e;t[3]===a?e=t[4]:(e=X(`rounded-md bg-destructive/10 p-4 text-sm text-destructive`,a),t[3]=a,t[4]=e);let n;t[5]===u?n=t[6]:(n=(0,Z.jsx)(J,{id:`56WWtu`,values:{error:u}}),t[5]=u,t[6]=n);let r;return t[7]!==e||t[8]!==n?(r=(0,Z.jsx)(`div`,{role:`alert`,className:e,children:n}),t[7]=e,t[8]=n,t[9]=r):r=t[9],r}if(_===null){let e;t[10]===a?e=t[11]:(e=X(`@container/packgrid w-full max-w-5xl`,a),t[10]=a,t[11]=e);let n;t[12]===s?n=t[13]:(n=s({id:`BeWTQy`}),t[12]=s,t[13]=n);let r;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:Array.from({length:Object.keys(u_).length},m_).map(p_)}),t[14]=r):r=t[14];let i;return t[15]!==e||t[16]!==n||t[17]!==r?(i=(0,Z.jsx)(`div`,{role:`status`,className:e,"aria-busy":`true`,"aria-label":n,children:r}),t[15]=e,t[16]=n,t[17]=r,t[18]=i):i=t[18],i}if(_.length===0){let e;t[19]===a?e=t[20]:(e=X(`flex w-full max-w-5xl items-center justify-center rounded-2xl border border-dashed border-border/60 bg-muted/20 p-8 text-sm text-muted-foreground`,a),t[19]=a,t[20]=e);let n;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(J,{id:`zLGXna`}),t[21]=n):n=t[21];let r;return t[22]===e?r=t[23]:(r=(0,Z.jsx)(`div`,{role:`status`,className:e,children:n}),t[22]=e,t[23]=r),r}let v;t[24]===i?v=t[25]:(v=i??[],t[24]=i,t[25]=v);let y;t[26]===v?y=t[27]:(y=new Set(v),t[26]=v,t[27]=y);let b=y,x,S,C,w,T,E,D,O,k;if(t[28]!==a||t[29]!==b||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==_){let e;t[43]===b?e=t[44]:(e=e=>!b.has(e.id),t[43]=b,t[44]=e);let i=_.filter(e),o;t[45]===b?o=t[46]:(o=e=>b.has(e.id),t[45]=b,t[46]=o),C=_.filter(o),S=C.length>0,w=S||r!=null,t[47]===a?k=t[48]:(k=X(`@container/packgrid w-full max-w-5xl`,a),t[47]=a,t[48]=k),x=En,T=f,E=p;let s;t[49]===n?s=t[50]:(s=e=>(0,Z.jsx)(h_,{pack:e,onSelect:()=>n(e.id)},e.id),t[49]=n,t[50]=s);let c=i.map(s);t[51]===c?D=t[52]:(D=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:c}),t[51]=c,t[52]=D),O=S?(0,Z.jsx)(wn,{className:`-mx-1 -mb-1 overflow-hidden px-1 pb-1 data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,Z.jsx)(`div`,{className:X(`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,`pt-4`),children:C.map(e=>(0,Z.jsx)(h_,{pack:e,onSelect:()=>n(e.id)},e.id))})}):null,t[28]=a,t[29]=b,t[30]=f,t[31]=r,t[32]=n,t[33]=_,t[34]=x,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=O,t[42]=k}else x=t[34],S=t[35],C=t[36],w=t[37],T=t[38],E=t[39],D=t[40],O=t[41],k=t[42];let A;t[53]!==f||t[54]!==S||t[55]!==C||t[56]!==r||t[57]!==w?(A=w?(0,Z.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center justify-between gap-2`,children:[S?(0,Z.jsx)(Tn,{asChild:!0,children:(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,children:[f?(0,Z.jsx)(J,{id:`6lGV3K`}):(0,Z.jsx)(J,{id:`ymWJLd`,values:{0:C.length}}),(0,Z.jsx)(Ms,{"aria-hidden":`true`,className:X(`size-3.5 transition-transform`,f&&`rotate-180`)})]})}):(0,Z.jsx)(`span`,{}),r?(0,Z.jsx)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:r,children:(0,Z.jsx)(J,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(Jn,{"aria-hidden":`true`,className:`size-3.5`})}})}):null]}):null,t[53]=f,t[54]=S,t[55]=C,t[56]=r,t[57]=w,t[58]=A):A=t[58];let j;t[59]!==x||t[60]!==A||t[61]!==T||t[62]!==E||t[63]!==D||t[64]!==O?(j=(0,Z.jsxs)(x,{open:T,onOpenChange:E,children:[D,O,A]}),t[59]=x,t[60]=A,t[61]=T,t[62]=E,t[63]=D,t[64]=O,t[65]=j):j=t[65];let M;return t[66]!==j||t[67]!==k?(M=(0,Z.jsx)(`div`,{className:k,children:j}),t[66]=j,t[67]=k,t[68]=M):M=t[68],M}function p_(e){return(0,Z.jsx)(g_,{},`skeleton-${e}`)}function m_(e,t){return t}function h_(e){let t=(0,$.c)(17),{pack:n,onSelect:r}=e,i;t[0]===n.id?i=t[1]:(i=d_(n.id),t[0]=n.id,t[1]=i);let a=i,o;t[2]===a?o=t[3]:(o=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`mt-0.5 shrink-0 text-muted-foreground`,children:(0,Z.jsx)(a,{className:`size-3.5`})}),t[2]=a,t[3]=o);let s;t[4]===n.name?s=t[5]:(s=(0,Z.jsx)(`h3`,{className:`min-w-0 wrap-break-word text-sm font-medium leading-tight`,children:n.name}),t[4]=n.name,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-row items-start gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n.description?l=t[10]:(l=(0,Z.jsx)(`p`,{className:`line-clamp-2 text-1sm leading-relaxed text-muted-foreground`,children:n.description}),t[9]=n.description,t[10]=l);let u;t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2`,children:[c,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13];let d;return t[14]!==r||t[15]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`group flex h-full min-w-0 flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px`,children:u}),t[14]=r,t[15]=u,t[16]=d):d=t[16],d}function g_(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`size-10 animate-pulse rounded-lg bg-muted`,"aria-hidden":`true`,children:(0,Z.jsx)(zc,{className:`size-5 animate-spin text-muted-foreground opacity-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6`,children:[t,(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-4 w-1/2 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-4/5 animate-pulse rounded bg-muted`})]}),(0,Z.jsx)(`div`,{className:`mt-auto h-3 w-20 animate-pulse rounded bg-muted`})]}),e[1]=n):n=e[1],n}var __=`knowledge-base`;function v_(e){let t=(0,$.c)(94),{open:n,onOpenChange:r,onSeedApplied:i,initialPackId:a}=e,{_:o}=jt(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={kind:`loading`},t[0]=s):s=t[0];let[c,l]=(0,Q.useState)(s),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(a??__),[m,h]=(0,Q.useState)(`project-root`),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(a===void 0?`pick`:`configure`),b=(0,Q.useRef)(!0),x=u?.find(e=>e.id===f),S,C;t[1]!==n||t[2]!==u?(S=()=>{if(!n||u!==null)return;let e=!1;return(async()=>{try{let t=await l_().listPacks();if(e)return;t.ok?d(t.packs):(d([]),l({kind:`error`,message:t.error.message}))}catch(t){let n=t;if(e)return;d([]),l({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>{e=!0}},C=[n,u],t[1]=n,t[2]=u,t[3]=S,t[4]=C):(S=t[3],C=t[4]),(0,Q.useEffect)(S,C);let w,T;t[5]!==a||t[6]!==n?(w=()=>{n&&(p(a??__),h(`project-root`),_(``),y(a===void 0?`pick`:`configure`),l({kind:`loading`}),b.current=!0)},T=[n,a],t[5]=a,t[6]=n,t[7]=w,t[8]=T):(w=t[7],T=t[8]),(0,Q.useEffect)(w,T),(0,Q.useEffect)(()=>{x&&_(x.defaultSubfolder??``)},[x]);let E;t[9]===g?E=t[10]:(E=g.trim(),t[9]=g,t[10]=E);let D=E,O=m===`subfolder`&&D===``,k,A;t[11]!==o||t[12]!==n||t[13]!==u||t[14]!==m||t[15]!==f||t[16]!==v||t[17]!==O||t[18]!==D?(k=()=>{if(!n||v!==`configure`||u===null)return;if(O){l({kind:`error`,message:o({id:`Z8KDox`})});return}let e=m===`project-root`?void 0:D,t=b.current?0:200;b.current=!1;let r=!1,i=setTimeout(()=>{r||(l(y_),l_().plan({rootDir:e,packId:f}).then(e=>{if(!r){if(!e.ok){l({kind:`error`,message:e.error.message});return}l(e.plan.created.length>0||e.plan.packSkill?.pending===!0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||l({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},A=[n,v,u,f,m,D,O,o],t[11]=o,t[12]=n,t[13]=u,t[14]=m,t[15]=f,t[16]=v,t[17]=O,t[18]=D,t[19]=k,t[20]=A):(k=t[19],A=t[20]),(0,Q.useEffect)(k,A);let j=async function(){if(c.kind!==`plan`)return;let e=c.plan;l({kind:`applying`,plan:e});let t;try{t=await l_().apply(e,{packId:f})}catch(t){let n=t,r=n instanceof Error?n.message:String(n);ul.error(o({id:`iqugog`,values:{errorDetail:r}})),l({kind:`plan`,plan:e});return}if(t.ok){let n=x?.name??o({id:`W8vpBM`}),a=t.result.applied,s=e.packSkill?.pending===!0,c=o(a>0?{id:`x3-2ta`,values:{packName:n,projectEntries:a}}:s?{id:`B2Srgd`,values:{packName:n}}:{id:`K6jjWB`,values:{packName:n}});ul.success(c),i?.(),r(!1)}else{let n=t.error.message;ul.error(o({id:`iqugog`,values:{errorDetail:n}})),l({kind:`plan`,plan:e})}},M=a!==void 0,N=x?.name,P=o(v===`configure`&&x?{id:`hxEUVJ`,values:{selectedPackName:N}}:{id:`RGkNeJ`}),F;t[21]===o?F=t[22]:(F=o({id:`gvApb7`}),t[21]=o,t[22]=F);let I;t[23]===o?I=t[24]:(I=o({id:`hCOLSd`}),t[23]=o,t[24]=I);let L;t[25]===o?L=t[26]:(L=o({id:`Fy4GgU`}),t[25]=o,t[26]=L);let R;t[27]===o?R=t[28]:(R=o({id:`Qw-7Ie`}),t[27]=o,t[28]=R);let z;t[29]===o?z=t[30]:(z=o({id:`_ayOfA`}),t[29]=o,t[30]=z);let B;t[31]===o?B=t[32]:(B=o({id:`Zf0w-R`}),t[31]=o,t[32]=B);let V;t[33]===o?V=t[34]:(V=o({id:`hmYd9H`}),t[33]=o,t[34]=V);let H;t[35]===o?H=t[36]:(H=o({id:`VBE2dw`}),t[35]=o,t[36]=H);let U;t[37]!==F||t[38]!==I||t[39]!==L||t[40]!==R||t[41]!==z||t[42]!==B||t[43]!==V||t[44]!==H?(U={"knowledge-base":F,"software-lifecycle":I,"codebase-wiki":L,"plain-notes":R,okf:z,"writing-pipeline":B,"entity-vault":V,worldbuilding:H},t[37]=F,t[38]=I,t[39]=L,t[40]=R,t[41]=z,t[42]=B,t[43]=V,t[44]=H,t[45]=U):U=t[45];let W=U,G;t[46]!==o||t[47]!==W||t[48]!==x||t[49]!==v?(G=v===`configure`&&x?W[x.id]??x.description:o({id:`msqUNq`}),t[46]=o,t[47]=W,t[48]=x,t[49]=v,t[50]=G):G=t[50];let K=G,ee;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ee=function(e){p(e),y(`configure`),b.current=!0},t[51]=ee):ee=t[51];let te=ee,q;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(q=function(){y(`pick`),l({kind:`loading`}),b.current=!0},t[52]=q):q=t[52];let ne=q,re;t[53]===P?re=t[54]:(re=(0,Z.jsx)(On,{children:P}),t[53]=P,t[54]=re);let ie;t[55]===K?ie=t[56]:(ie=(0,Z.jsx)(Dn,{children:K}),t[55]=K,t[56]=ie);let ae;t[57]!==re||t[58]!==ie?(ae=(0,Z.jsxs)(Mn,{children:[re,ie]}),t[57]=re,t[58]=ie,t[59]=ae):ae=t[59];let oe;t[60]!==u||t[61]!==c||t[62]!==m||t[63]!==x||t[64]!==v||t[65]!==g?(oe=v===`pick`?(0,Z.jsx)(An,{children:(0,Z.jsx)(f_,{packs:u,onPackSelect:te})}):(0,Z.jsxs)(An,{className:`space-y-6`,children:[(0,Z.jsx)(b_,{choice:m,subfolder:g,placeholder:x?.defaultSubfolder??`subfolder`,onChoiceChange:h,onSubfolderChange:_}),(0,Z.jsx)(x_,{phase:c,selectedPack:x})]}),t[60]=u,t[61]=c,t[62]=m,t[63]=x,t[64]=v,t[65]=g,t[66]=oe):oe=t[66];let se;t[67]!==M||t[68]!==v?(se=v===`configure`&&!M?(0,Z.jsxs)(Y,{className:`mr-auto uppercase font-mono`,variant:`ghost`,onClick:ne,children:[(0,Z.jsx)(ur,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,Z.jsx)(J,{id:`iH8pgl`})]}):null,t[67]=M,t[68]=v,t[69]=se):se=t[69];let ce;t[70]===r?ce=t[71]:(ce=()=>r(!1),t[70]=r,t[71]=ce);let le;t[72]===c.kind?le=t[73]:(le=c.kind===`already-seeded`||c.kind===`error`?(0,Z.jsx)(J,{id:`yz7wBu`}):(0,Z.jsx)(J,{id:`dEgA5A`}),t[72]=c.kind,t[73]=le);let ue;t[74]!==ce||t[75]!==le?(ue=(0,Z.jsx)(Y,{className:`uppercase font-mono`,variant:`outline`,onClick:ce,children:le}),t[74]=ce,t[75]=le,t[76]=ue):ue=t[76];let de;t[77]!==j||t[78]!==c.kind||t[79]!==v||t[80]!==O?(de=v===`configure`&&c.kind===`plan`?(0,Z.jsx)(Y,{onClick:j,disabled:O,children:(0,Z.jsx)(J,{id:`4TzU0n`})}):v===`configure`&&c.kind===`applying`?(0,Z.jsxs)(Y,{disabled:!0,children:[(0,Z.jsx)(zc,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(J,{id:`XYlJJT`})]}):null,t[77]=j,t[78]=c.kind,t[79]=v,t[80]=O,t[81]=de):de=t[81];let fe;t[82]!==se||t[83]!==ue||t[84]!==de?(fe=(0,Z.jsxs)(jn,{children:[se,ue,de]}),t[82]=se,t[83]=ue,t[84]=de,t[85]=fe):fe=t[85];let pe;t[86]!==ae||t[87]!==oe||t[88]!==fe?(pe=(0,Z.jsxs)(kn,{className:`sm:max-w-4xl`,"data-ok-layer-spawned":``,children:[ae,oe,fe]}),t[86]=ae,t[87]=oe,t[88]=fe,t[89]=pe):pe=t[89];let me;return t[90]!==r||t[91]!==n||t[92]!==pe?(me=(0,Z.jsx)(Nn,{open:n,onOpenChange:r,children:pe}),t[90]=r,t[91]=n,t[92]=pe,t[93]=me):me=t[93],me}function y_(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function b_(e){let t=(0,$.c)(22),{choice:n,subfolder:r,placeholder:i,onChoiceChange:a,onSubfolderChange:o}=e,{_:s}=jt(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`3wiBAs`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=e=>a(e),t[1]=a,t[2]=l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Gi,{children:(0,Z.jsx)(J,{id:`RSqaSd`})}),t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)($i,{htmlFor:`seed-root-project-root`,children:(0,Z.jsxs)(Ai,{orientation:`horizontal`,children:[(0,Z.jsxs)(Si,{children:[u,(0,Z.jsx)(li,{className:`text-1sm`,children:(0,Z.jsx)(J,{id:`ZvzbDF`})})]}),(0,Z.jsx)(si,{value:`project-root`,id:`seed-root-project-root`})]})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(Gi,{children:(0,Z.jsx)(J,{id:`ZWgr0b`})}),t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(li,{className:`nth-last-2:mt-0 text-1sm`,children:(0,Z.jsx)(J,{id:`KQGZuq`})}),t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==n||t[9]!==o||t[10]!==i||t[11]!==r?(m=n===`subfolder`&&(0,Z.jsx)(gl,{value:r,onChange:e=>o(e.target.value),placeholder:i,"aria-label":s({id:`NYUhy5`}),spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`}),t[7]=s,t[8]=n,t[9]=o,t[10]=i,t[11]=r,t[12]=m):m=t[12];let h;t[13]===m?h=t[14]:(h=(0,Z.jsxs)(Si,{children:[f,p,m]}),t[13]=m,t[14]=h);let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(si,{value:`subfolder`,id:`seed-root-subfolder`}),t[15]=g):g=t[15];let _;t[16]===h?_=t[17]:(_=(0,Z.jsx)($i,{htmlFor:`seed-root-subfolder`,children:(0,Z.jsxs)(Ai,{orientation:`horizontal`,children:[h,g]})}),t[16]=h,t[17]=_);let v;return t[18]!==n||t[19]!==_||t[20]!==l?(v=(0,Z.jsxs)(`div`,{className:`space-y-2 py-1`,children:[c,(0,Z.jsxs)(ci,{className:`sm:flex`,value:n,onValueChange:l,children:[d,_]})]}),t[18]=n,t[19]=_,t[20]=l,t[21]=v):v=t[21],v}function x_(e){let t=(0,$.c)(19),{phase:n,selectedPack:r}=e,{_:i}=jt();if(n.kind===`loading`){let e=r?.folders.length??6,n;t[0]===i?n=t[1]:(n=i({id:`--T3kB`}),t[0]=i,t[1]=n);let a;t[2]===e?a=t[3]:(a=(0,Z.jsx)(`ul`,{className:`space-y-2`,children:Array.from({length:e},w_).map(C_)}),t[2]=e,t[3]=a);let o;return t[4]!==n||t[5]!==a?(o=(0,Z.jsx)(`section`,{role:`status`,"aria-busy":`true`,"aria-label":n,children:a}),t[4]=n,t[5]=a,t[6]=o):o=t[6],o}if(n.kind===`error`){let e;return t[7]===n.message?e=t[8]:(e=(0,Z.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[7]=n.message,t[8]=e),e}if(n.kind===`already-seeded`){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`font-medium`,children:(0,Z.jsx)(J,{id:`YwPUUP`})}),t[9]=e):e=t[9];let n;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`py-2 text-sm`,children:[e,(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Z.jsx)(J,{id:`h-AdvS`})})]}),t[10]=n):n=t[10],n}let a;t[11]!==n.plan||t[12]!==r?(a=n.plan.created.length>0||n.plan.packSkill?.pending?(0,Z.jsx)(e_,{plan:n.plan,selectedPack:r}):null,t[11]=n.plan,t[12]=r,t[13]=a):a=t[13];let o;t[14]===n.plan.warnings?o=t[15]:(o=n.plan.warnings.length>0?(0,Z.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:n.plan.warnings.map(S_)}):null,t[14]=n.plan.warnings,t[15]=o);let s;return t[16]!==a||t[17]!==o?(s=(0,Z.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[a,o]}),t[16]=a,t[17]=o,t[18]=s):s=t[18],s}function S_(e){return(0,Z.jsx)(`p`,{children:e},e)}function C_(e){return(0,Z.jsxs)(`li`,{"aria-hidden":`true`,className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`size-8 shrink-0 animate-pulse rounded-lg bg-muted`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsx)(`span`,{className:`block h-3.5 w-28 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`span`,{className:`mt-2 block h-3 w-4/5 animate-pulse rounded bg-muted`})]})]},`seed-skeleton-${e}`)}function w_(e,t){return t}function T_(){return(0,Q.useSyncExternalStore)(Wu,Gu,Gu)}function E_(e,t){return e instanceof Error&&e.message?e.message:t}async function D_(e,t,n,r=`action`){try{n(null),await e()}catch(e){console.error(`[${r}] action failed:`,e),n(E_(e,t))}}async function O_(e,t,n=ul,r=`action`){await D_(e,t,e=>{e!==null&&n.error(e)},r)}var k_=(0,Q.createContext)(!1);function A_(e){let t=(0,$.c)(5),{children:n}=e,[r,i]=(0,Q.useState)(M_),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{if(window.okDesktop)return;let e=new AbortController;return V(e.signal).then(t=>{e.signal.aborted||t.status!==`ok`||i(t.config.singleFile)}).catch(j_),()=>e.abort()},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(k_,{value:r,children:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}function j_(){}function M_(){return typeof window<`u`?window.okDesktop?.config.singleFile??!1:!1}function N_(){return(0,Q.use)(k_)}var P_={},F_=new Set;function I_(){return P_}function L_(e){P_={...P_,...e};for(let e of F_)e()}function R_(e){return F_.add(e),()=>{F_.delete(e)}}function z_(){return(0,Q.useSyncExternalStore)(R_,I_,I_)}function B_(e,t,n){let r=[],i=new Set,a=new Set,o=t!==null&&t.mainRoot===e.project.mainRoot;e.projectSynthesized||(r.push({branch:e.project.branch??null,path:e.project.path,opened:!0,isMain:!0,isCurrent:e.project.path===n}),i.add(e.project.path),e.project.branch!=null&&a.add(e.project.branch));let s=[...e.worktrees].sort((e,t)=>t.lastOpenedAt.localeCompare(e.lastOpenedAt));for(let e of s)i.has(e.path)||(r.push({branch:e.branch??null,path:e.path,opened:!0,isMain:!1,isCurrent:e.path===n}),i.add(e.path),e.branch!=null&&a.add(e.branch));if(o){let e=t.entries.filter(e=>e.branch!==null&&!a.has(e.branch)&&(e.worktreePath===null||!i.has(e.worktreePath))).sort((e,t)=>(e.branch??``).localeCompare(t.branch??``));for(let t of e)r.push({branch:t.branch,path:t.worktreePath,opened:t.worktreePath!==null,isMain:t.isMain,isCurrent:t.isCurrent}),t.branch!=null&&a.add(t.branch),t.worktreePath!=null&&i.add(t.worktreePath)}return r.sort((e,t)=>V_(e)-V_(t))}function V_(e){return e.isMain?0:e.opened?1:2}function H_(e){let t=e.split(/[/\\]/).filter(e=>e.length>0);return t.length>0?t[t.length-1]??e:e}function U_(e){let t=[],n=new Map;for(let r of e){let e=r.gitCommonDir,i=r.mainRoot;if(e===void 0||i===void 0){t.push({project:r,mainRoot:r.path,worktrees:[]});continue}let a=n.get(e);a===void 0&&(a=t.length,n.set(e,a),t.push({project:null,mainRoot:i,worktrees:[]}));let o=t[a];o!==void 0&&(r.isLinkedWorktree?o.worktrees.push(r):o.project===null&&(o.project=r))}return t.map(e=>{let t=e.project===null;return{project:e.project??{path:e.mainRoot,name:H_(e.mainRoot),lastOpenedAt:``},worktrees:e.worktrees,projectSynthesized:t}})}var W_=3e3,G_=600,K_=20,q_=(e,t,n)=>O_(e,t,n,`CommandPalette`);function J_(e){window.location.assign(du(e))}function Y_(e,t){return e?.kind===`folder`||e?.kind===`folder-index`?e.folderPath:Fl(t)}function X_(e){let t=(0,$.c)(27),{entry:n,query:r,onSelect:i,disabled:a}=e,o=r===void 0?``:r,c=a===void 0?!1:a,l;t[0]===n?l=t[1]:(l=`title`in n&&n.title?n.title:n.path.split(`/`).pop()??n.path,t[0]=n,t[1]=l);let u=l,d=`snippet`in n?n.snippet:void 0,f=`docExt`in n?n.docExt:void 0,p=`bodyIndexed`in n?n.bodyIndexed:void 0,m=`${n.kind} ${n.path}`,h=`command-palette-nav-${n.kind}-${n.path}`,g;t[2]!==p||t[3]!==f||t[4]!==n.kind||t[5]!==n.path?(g=(0,Z.jsx)(s,{bodyIndexed:p,className:`mt-0.5 size-4`,docExt:f,kind:n.kind,path:n.path}),t[2]=p,t[3]=f,t[4]=n.kind,t[5]=n.path,t[6]=g):g=t[6];let _;t[7]!==o||t[8]!==u?(_=(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:(0,Z.jsx)(Q_,{query:o,text:u})}),t[7]=o,t[8]=u,t[9]=_):_=t[9];let v;t[10]!==n.path||t[11]!==o?(v=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(Q_,{query:o,text:n.path})}),t[10]=n.path,t[11]=o,t[12]=v):v=t[12];let y;t[13]!==o||t[14]!==d?(y=d?(0,Z.jsx)(`span`,{className:`max-h-10 overflow-hidden text-muted-foreground text-xs leading-relaxed`,children:(0,Z.jsx)(Q_,{query:o,text:d})}):null,t[13]=o,t[14]=d,t[15]=y):y=t[15];let b;t[16]!==_||t[17]!==v||t[18]!==y?(b=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[_,v,y]}),t[16]=_,t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;return t[20]!==c||t[21]!==i||t[22]!==b||t[23]!==m||t[24]!==h||t[25]!==g?(x=(0,Z.jsxs)(le,{value:m,onSelect:i,disabled:c,"data-testid":h,className:`items-start`,children:[g,b]}),t[20]=c,t[21]=i,t[22]=b,t[23]=m,t[24]=h,t[25]=g,t[26]=x):x=t[26],x}function Z_(e){let t=(0,$.c)(5),{mode:n,inExclusiveMode:r,paletteModeKind:i}=e;if(r||i!==`normal`||n===`idle`||n===`content`)return null;let a=`command-palette-search-hint-${n}`,o;t[0]===n?o=t[1]:(o=n===`name-only`?(0,Z.jsx)(J,{id:`-wePNM`}):n===`truncated`?(0,Z.jsx)(J,{id:`-q4abP`}):(0,Z.jsx)(J,{id:`DbILZA`}),t[0]=n,t[1]=o);let s;return t[2]!==a||t[3]!==o?(s=(0,Z.jsx)(`div`,{"aria-live":`polite`,"data-testid":a,className:`border-t px-3 py-2 text-muted-foreground text-xs`,children:o}),t[2]=a,t[3]=o,t[4]=s):s=t[4],s}function Q_(e){let t=(0,$.c)(5),{text:n,query:r}=e,i;t[0]!==r||t[1]!==n?(i=Cg(n,r).map($_),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[3]=i,t[4]=a),a}function $_(e){let t=`${e.start}:${e.match?`match`:`plain`}`;return e.match?(0,Z.jsx)(`mark`,{className:`rounded-sm bg-primary/10 px-0.5 font-semibold text-primary`,children:e.text},t):(0,Z.jsx)(`span`,{children:e.text},t)}function ev({searchResults:e,fallbackSearchResults:t,searchStatus:n}){return e.length>0?e:n===`success`?[]:t}function tv(e){let t=(0,$.c)(130),{bridge:n,open:r,onOpenChange:i}=e,a=n===void 0?null:n,{_:o}=jt(),s=N_(),[c,l]=(0,Q.useState)(``),u=(0,Q.useDeferredValue)(c),d=u.trim(),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=[],t[0]=f):f=t[0];let[m,h]=(0,Q.useState)(f),[g,_]=(0,Q.useState)(`idle`),[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(!1),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=[],t[1]=w):w=t[1];let[T,D]=(0,Q.useState)(w),[k,j]=(0,Q.useState)(null),[M,N]=(0,Q.useState)(`idle`),P;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[2]=P):P=t[2];let[F,I]=(0,Q.useState)(P),L;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(L=[],t[3]=L):L=t[3];let[R,z]=(0,Q.useState)(L),[B,V]=(0,Q.useState)(null),[H,W]=(0,Q.useState)(!1),[G,K]=(0,Q.useState)(!1),[ee,te]=(0,Q.useState)(!1),q;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(q=[],t[4]=q):q=t[4];let[ne,re]=(0,Q.useState)(q),[ie,ae]=(0,Q.useState)(`idle`),oe;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(oe=[],t[5]=oe):oe=t[5];let[se,ce]=(0,Q.useState)(oe),[ue,fe]=(0,Q.useState)(`idle`),me=(0,Q.useRef)(!1),he=(0,Q.useRef)(null),ge=(0,Q.useRef)(null),_e=(0,Q.useRef)(null),ve=(0,Q.useRef)(null),{activeDocName:ye,activeTarget:be}=Xe(),{pages:xe,pageTitles:Se,pageMeta:Ce,folderPaths:we,filePaths:Te,loading:Ee}=Ls(),De=cc(),{states:Oe,refresh:ke}=rc(),{dispatch:Ae}=Bs(),je;t[6]===r?je=t[7]:(je={enabled:r},t[6]=r,t[7]=je);let{status:Me,refresh:Ne}=Oi(je),Pe=(Me?.enabled??!1)&&(Me?.keyPresent??!1),Fe=Me?.embedded??0,Ie=Me?.total??0,Le=Pe&&Ie>0&&Fe<Ie,Re;t[8]!==S||t[9]!==r||t[10]!==Ne||t[11]!==Le?(Re=()=>{if(!r||!S||!Le)return;let e=window.setInterval(()=>Ne(),2500);return()=>window.clearInterval(e)},t[8]=S,t[9]=r,t[10]=Ne,t[11]=Le,t[12]=Re):Re=t[12];let ze;t[13]!==S||t[14]!==r||t[15]!==Le?(ze=[r,S,Le],t[13]=S,t[14]=r,t[15]=Le,t[16]=ze):ze=t[16],(0,Q.useEffect)(Re,ze);let Be=Ws({docName:ye,workspace:De}),Ve=gg(xe,we,Se,Ce,Te),He=cg(R,new Set(Ve.map(av))),Ue=a?.config.projectPath??null,We=a?F.filter(e=>e.path!==Ue):[],Ge=T_(),Ke=a&&Ge?Ge.entries.filter(iv):[],qe;t[17]!==ye||t[18]!==be?(qe=Y_(be,ye),t[17]=ye,t[18]=be,t[19]=qe):qe=t[19];let Je=qe,Ye=d===``?[]:xg(Ve,d,8),Ze,Qe;t[20]!==i||t[21]!==r?(Ze=()=>{let e=function(e){Tl(e,`command-palette`)&&(e.preventDefault(),i(!r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},Qe=[i,r],t[20]=i,t[21]=r,t[22]=Ze,t[23]=Qe):(Ze=t[22],Qe=t[23]),(0,Q.useEffect)(Ze,Qe);let $e,et;t[24]!==o||t[25]!==a||t[26]!==r||t[27]!==ke?($e=()=>{if(r){if(z(ag()),ke(),a){let e=!1;return q_(async()=>{let t=await a.project.listRecent();e||I(t)},o({id:`fYKgzG`})),()=>{e=!0}}return}l(``),re([]),ae(`idle`),me.current=!1,ce([]),fe(`idle`),C(!1),_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),j(null),N(`idle`)},et=[r,a,ke,o],t[24]=o,t[25]=a,t[26]=r,t[27]=ke,t[28]=$e,t[29]=et):($e=t[28],et=t[29]),(0,Q.useEffect)($e,et);let tt;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(tt=()=>{he.current&&(he.current.scrollTop=0)},t[30]=tt):tt=t[30];let nt;t[31]===c?nt=t[32]:(nt=[c],t[31]=c,t[32]=nt),(0,Q.useEffect)(tt,nt);let rt=new Set(ne.map(rv)),it=S?{kind:`normal`,query:u}:Ag(u,rt),at=it.kind!==`normal`,st=at||S,ct=it.kind===`tag-list`?it.query:``,lt=it.kind===`tag-docs`?it.tagName:``,ut=c.trim(),dt=S?Og({query:ut,firedQuery:k,status:M,resultCount:T.length}):null,ft=dt?.submit?.query??``,pt=dt?.results.forQuery??``,mt,ht;t[33]!==at||t[34]!==r?(mt=()=>{if(!r||!at||me.current)return;me.current=!0,ae(`loading`);let e=!1;return Mg().then(t=>{e||(re(t),ae(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tags failed`,t),re([]),ae(`error`))}),()=>{e=!0}},ht=[r,at],t[33]=at,t[34]=r,t[35]=mt,t[36]=ht):(mt=t[35],ht=t[36]),(0,Q.useEffect)(mt,ht);let gt=it.kind===`tag-docs`?it.tagName:null;(0,Q.useEffect)(()=>{if(!r||gt===null){ce([]),fe(`idle`);return}fe(`loading`),ce([]);let e=!1;return Ng(gt).then(t=>{e||(ce(t),fe(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tag docs failed`,t),ce([]),fe(`error`))}),()=>{e=!0}},[r,gt]),(0,Q.useEffect)(()=>{if(!r||!d||st||Ee){h([]),_(`idle`),y(!1),x(!1);return}let e=!1,t=!1,n=0,i=null,a,o;_(`loading`);let s=()=>e||n>=K_?!1:(n+=1,o=window.setTimeout(l,G_),!0),c=()=>{e||t&&s()||(h([]),_(`error`),y(!1),x(!1))};function l(){let n=new AbortController;i=n,a=window.setTimeout(()=>{n.abort(),c()},W_),Tg(d,{signal:n.signal}).then(n=>{let{entries:r,truncated:i,ready:o}=n;if(window.clearTimeout(a),!e){if(!o){t||(t=!0,h([]),y(!1),x(!0),_(`success`)),s()||x(!1);return}h(r),y(i),x(!1),_(`success`)}}).catch(t=>{window.clearTimeout(a),!e&&(t instanceof Error&&t.name===`AbortError`||c())})}return l(),()=>{e=!0,window.clearTimeout(a),window.clearTimeout(o),i?.abort()}},[r,d,st,Ee]);let _t;t[37]!==o||t[38]!==i?(_t=(e,t)=>{let n=t===void 0?o({id:`uuoHOU`}):t;i(!1),q_(async()=>{await e()},n)},t[37]=o,t[38]=i,t[39]=_t):_t=t[39];let vt=_t,yt;t[40]!==o||t[41]!==a||t[42]!==vt?(yt=e=>{if(!a)return;let t=e.worktreePath;if(t!==null){vt(()=>a.project.open({path:t,target:`new-window`,entryPoint:`worktree`}),o({id:`LwMxXg`}));return}let n=e.branch;n!==null&&vt(async()=>{let e=await a.worktree.create({branch:n,createBranch:!1});if(!e.ok)throw Error(e.reason);Uu(),await a.project.open({path:e.path,target:`new-window`,entryPoint:`worktree`})},o({id:`LwMxXg`}))},t[40]=o,t[41]=a,t[42]=vt,t[43]=yt):yt=t[43];let bt=yt,xt;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(xt=function(e){let t={kind:e.kind,path:e.path,lastOpenedAt:new Date().toISOString()},n=sg(ag(),t);og(n),z(n)},t[44]=xt):xt=t[44];let St=xt,Ct;t[45]===i?Ct=t[46]:(Ct=function(e){i(!1),St(e),J_(e.path)},t[45]=i,t[46]=Ct);let wt=Ct,Tt=!st&&d===``&&He.length>0,Et=ev({searchResults:m,fallbackSearchResults:Ye,searchStatus:g}),Dt=!st&&Et.length>0,Ot=!st&&d!==``&&(Ee||b)&&!Dt,kt=!st&&d!==``&&g===`loading`&&!Dt&&!Ot,At=!st&&a!==null&&We.length>0&&(d===``||We.some(e=>Eg(`${e.name} ${e.path}`,u,[`open recent project`]))),Mt=Ke.filter(e=>d===``||Eg(e.branch??``,u,[`worktree branch`])),Nt=!st&&a!==null&&Mt.length>0,Pt=gc(),Ft=!st&&!Pt&&Be!==null&&(d===``||Us.some(e=>{let t=e.displayName;return Eg(o({id:`WqLq6M`,values:{displayName:t}}),u,[e.id,`agent handoff`,`open in`])})),It=it.kind===`tag-list`?jg(ne,it.query):[],Lt=it.kind===`tag-list`&&ie!==`loading`&&It.length===0,Rt=it.kind===`tag-docs`&&ue===`success`&&se.length===0,zt=z_(),Bt;t[47]===i?Bt=t[48]:(Bt=e=>{i(!1),E(e)},t[47]=i,t[48]=Bt);let Vt=Bt,Ht;t[49]!==a||t[50]!==i?(Ht=e=>{i(!1),Vu(e,a?{okDesktop:{shell:a.shell}}:{okDesktop:void 0})},t[49]=a,t[50]=i,t[51]=Ht):Ht=t[51];let Ut=Ht,Wt;t[52]===i?Wt=t[53]:(Wt=()=>i(!1),t[52]=i,t[53]=Wt);let Gt;t[54]===V?Gt=t[55]:(Gt=e=>V(e),t[54]=V,t[55]=Gt);let Kt;t[56]===W?Kt=t[57]:(Kt=()=>W(!0),t[56]=W,t[57]=Kt);let qt;t[58]===K?qt=t[59]:(qt=()=>K(!0),t[58]=K,t[59]=qt);let Jt;t[60]===te?Jt=t[61]:(Jt=()=>te(!0),t[60]=te,t[61]=Jt);let Yt={bridge:a,singleFile:s,activeDocName:ye,contextualTargetKind:Gh(be),viewMenuState:zt,emitMenuAction:Vt,runAction:vt,openExternalUrl:Ut,closePalette:Wt,openNewItemDialog:Gt,openSeedDialog:Kt,openCreateProjectDialog:qt,openReportBugDialog:Jt},Xt=st?[]:$h.flatMap(e=>{if(!e.available(Yt)||e.visibility===`search-only`&&d===``)return[];let t=e.label(Yt);return Eg(t,u,e.keywords)?[{cmd:e,label:t}]:[]}),Zt=Xt.length>0,Qt;t[62]===o?Qt=t[63]:(Qt=e=>{switch(e){case`commands`:return o({id:`45MZFs`});case`project`:return o({id:`e0NrBM`});case`file`:return o({id:`J2eKUI`});case`view`:return o({id:`jpctdh`});case`terminal`:return o({id:`ALhMYW`});case`app`:return o({id:`IrC12v`})}},t[62]=o,t[63]=Qt);let $t=Qt,en=e=>{let t=Xt.filter(t=>t.cmd.group===e);return t.length===0?null:(0,Z.jsx)(O,{heading:$t(e),children:t.map(e=>{let{cmd:t,label:n}=e,r=t.shortcutId!==void 0&&(t.shortcutDesktopOnly!==!0||a!==null)?wl(t.shortcutId):null;return(0,Z.jsxs)(le,{value:`${n} ${t.keywords.join(` `)}`,onSelect:()=>t.dispatch(Yt),"data-testid":`command-palette-${t.id}`,children:[(0,Z.jsx)(t.icon,{}),(0,Z.jsx)(`span`,{children:n}),t.checked?.(Yt)?(0,Z.jsx)(As,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`}):null,r?(0,Z.jsx)(U,{children:r}):null]},t.id)})},e)},tn=st||Tt||Dt||kt||Ot||At||Ft||Zt,nn;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(nn=function(e){l(`${kg}${e}`)},t[64]=nn):nn=t[64];let rn=nn,an;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(an=function(){_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),j(null),N(`idle`)},t[65]=an):an=t[65];let on=an,sn;t[66]===c?sn=t[67]:(sn=function(){C(!0),c.startsWith(`tag:`)&&l(c.slice(kg.length)),on(),ge.current?.focus()},t[66]=c,t[67]=sn);let cn=sn,ln;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ln=function(){C(!1),l(``),on(),ge.current?.focus()},t[68]=ln):ln=t[68];let un=ln,Y=function(e){let t=e.trim();if(!t||Ee)return;_e.current?.abort(),ve.current!==null&&window.clearTimeout(ve.current);let n=new AbortController;_e.current=n,N(`loading`);let r=!1,i=window.setTimeout(()=>{r=!0,n.abort(),N(`error`)},W_);ve.current=i,Tg(t,{signal:n.signal,semantic:!0,limit:30}).then(e=>{let{entries:r}=e;dn(i,n),D(r),j(t),N(`success`)}).catch(e=>{dn(i,n),!(e instanceof Error&&e.name===`AbortError`&&!r)&&(console.debug(`[semantic-search] fire failed`,{timedOut:r,error:e}),N(`error`))})};function dn(e,t){window.clearTimeout(e),ve.current===e&&(ve.current=null),_e.current===t&&(_e.current=null)}let fn=function(e){!S||e.key!==`Enter`||(dt?.submit?(e.preventDefault(),e.stopPropagation(),Y(dt.submit.query)):M===`loading`&&(e.preventDefault(),e.stopPropagation()))},pn;t[69]===S?pn=t[70]:(pn=function(e){S&&(e.preventDefault(),un())},t[69]=S,t[70]=pn);let mn=pn,hn;t[71]===o?hn=t[72]:(hn=o({id:`1bDVu5`}),t[71]=o,t[72]=hn);let gn;t[73]===o?gn=t[74]:(gn=o({id:`5GRxoA`}),t[73]=o,t[74]=gn);let _n;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(_n={shouldFilter:!1,className:`[&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4`},t[75]=_n):_n=t[75];let vn;t[76]!==o||t[77]!==S?(vn=o(S?{id:`zXj1rA`}:{id:`ggs9f8`}),t[76]=o,t[77]=S,t[78]=vn):vn=t[78];let yn;t[79]!==S||t[80]!==at?(yn=()=>{S&&(C(!1),on()),l(at?``:kg),ge.current?.focus()},t[79]=S,t[80]=at,t[81]=yn):yn=t[81];let bn=at?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,xn;t[82]===bn?xn=t[83]:(xn=X(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,bn),t[82]=bn,t[83]=xn);let Sn,Cn;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Sn=(0,Z.jsx)(p,{className:`size-3.5`}),Cn=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(J,{id:`0rwwOn`})}),t[84]=Sn,t[85]=Cn):(Sn=t[84],Cn=t[85]);let wn;t[86]!==at||t[87]!==yn||t[88]!==xn?(wn=(0,Z.jsxs)(`button`,{type:`button`,onClick:yn,"data-testid":`command-palette-filter-tag`,"data-active":at,"aria-pressed":at,className:xn,children:[Sn,Cn]}),t[86]=at,t[87]=yn,t[88]=xn,t[89]=wn):wn=t[89];let Tn;t[90]!==cn||t[91]!==S||t[92]!==Pe?(Tn=Pe?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>S?un():cn(),"data-testid":`command-palette-filter-semantic`,"data-active":S,"aria-pressed":S,className:X(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,S?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,Z.jsx)(pc,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(J,{id:`9tJX8r`})})]}):null,t[90]=cn,t[91]=S,t[92]=Pe,t[93]=Tn):Tn=t[93];let En;t[94]!==wn||t[95]!==Tn?(En=(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 border-b px-3 py-2`,children:[wn,Tn]}),t[94]=wn,t[95]=Tn,t[96]=En):En=t[96];let Dn;t[97]===Ot?Dn=t[98]:(Dn=Ot?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-search-preparing`,children:[(0,Z.jsx)(zc,{className:`size-4 animate-spin`}),(0,Z.jsx)(J,{id:`yIPXut`})]}):null,t[97]=Ot,t[98]=Dn);let On;t[99]!==Dt||t[100]!==kt?(On=kt&&!Dt?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`WRNXKp`})}):null,t[99]=Dt,t[100]=kt,t[101]=On):On=t[101];let kn=Z_,An=Dg(d,Et,{truncated:v}),jn;t[102]!==kn||t[103]!==st||t[104]!==it.kind||t[105]!==An?(jn=(0,Z.jsx)(kn,{mode:An,inExclusiveMode:st,paletteModeKind:it.kind}),t[102]=kn,t[103]=st,t[104]=it.kind,t[105]=An,t[106]=jn):jn=t[106];let Mn=B===`file`,Nn;t[107]===V?Nn=t[108]:(Nn=e=>{e||V(null)},t[107]=V,t[108]=Nn);let Pn;t[109]!==Je||t[110]!==Mn||t[111]!==Nn?(Pn=(0,Z.jsx)(Wg,{open:Mn,onOpenChange:Nn,kind:`file`,initialDir:Je}),t[109]=Je,t[110]=Mn,t[111]=Nn,t[112]=Pn):Pn=t[112];let Fn=B===`folder`,In;t[113]===V?In=t[114]:(In=e=>{e||V(null)},t[113]=V,t[114]=In);let Ln;t[115]!==Je||t[116]!==Fn||t[117]!==In?(Ln=(0,Z.jsx)(Wg,{open:Fn,onOpenChange:In,kind:`folder`,initialDir:Je}),t[115]=Je,t[116]=Fn,t[117]=In,t[118]=Ln):Ln=t[118];let Rn;t[119]!==H||t[120]!==W?(Rn=(0,Z.jsx)(v_,{open:H,onOpenChange:W}),t[119]=H,t[120]=W,t[121]=Rn):Rn=t[121];let zn;t[122]!==a||t[123]!==G||t[124]!==K?(zn=a?(0,Z.jsx)(Oh,{open:G,onOpenChange:K,bridge:a}):null,t[122]=a,t[123]=G,t[124]=K,t[125]=zn):zn=t[125];let Bn;return t[126]!==a||t[127]!==ee||t[128]!==te?(Bn=a?(0,Z.jsx)(jf,{open:ee,onOpenChange:te}):null,t[126]=a,t[127]=ee,t[128]=te,t[129]=Bn):Bn=t[129],(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(A,{open:r,onOpenChange:i,title:hn,description:gn,className:`sm:max-w-2xl`,commandProps:_n,onEscapeKeyDown:mn,children:[(0,Z.jsx)(de,{ref:ge,value:c,onValueChange:l,onKeyDown:fn,placeholder:vn}),En,(0,Z.jsxs)(pe,{ref:he,className:`subtle-scrollbar`,children:[S&&dt?(0,Z.jsxs)(Z.Fragment,{children:[Le?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-indexing`,children:[(0,Z.jsx)(zc,{className:`size-3.5 animate-spin`}),(0,Z.jsx)(J,{id:`kCNU4q`,values:{semanticIndexedCount:Fe,semanticTotalCount:Ie}})]}):null,dt.submit?(0,Z.jsx)(O,{children:(0,Z.jsx)(le,{value:`semantic-submit`,onSelect:()=>Y(ft),"data-testid":`command-palette-semantic-submit`,children:dt.submit.kind===`retry`?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(pc,{}),(0,Z.jsx)(J,{id:`rBc32v`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(pc,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,Z.jsx)(J,{id:`FNTx6u`,values:{semanticSubmitQuery:ft}})}),(0,Z.jsx)(U,{children:`↵`})]})})}):null,dt.notice===`empty`?(0,Z.jsx)(ot,{"data-testid":`command-palette-semantic-empty`,children:(0,Z.jsx)(J,{id:`Xw_maT`})}):null,dt.notice===`searching`?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-searching`,children:[(0,Z.jsx)(zc,{className:`size-4 animate-spin`}),(0,Z.jsx)(J,{id:`PBwmDJ`})]}):null,dt.notice===`no-results`?(0,Z.jsx)(ot,{"data-testid":`command-palette-semantic-no-results`,children:(0,Z.jsx)(J,{id:`yFyZMJ`,values:{semanticQueryText:ut}})}):null,dt.results.show?(0,Z.jsx)(O,{heading:dt.results.dimmed?o({id:`QlxHAH`,values:{semanticResultsLabel:pt}}):o({id:`9tJX8r`}),children:(0,Z.jsx)(`div`,{"data-testid":`command-palette-semantic-results`,"data-dimmed":dt.results.dimmed,children:T.map(e=>(0,Z.jsx)(X_,{entry:e,disabled:dt.results.dimmed,onSelect:()=>wt(e)},ig(e.kind,e.path)))})}):null]}):null,Dn,On,tn?null:(0,Z.jsx)(ot,{children:g===`error`?(0,Z.jsx)(J,{id:`pkAft1`}):(0,Z.jsx)(J,{id:`i3f2kh`})}),it.kind===`tag-list`?(0,Z.jsxs)(O,{heading:it.query?o({id:`evs0iw`,values:{tagListQuery:ct}}):o({id:`2QM24L`}),children:[ie===`loading`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`a_u4ck`})}):null,ie===`error`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`MZoxVx`})}):null,Lt?(0,Z.jsx)(ot,{children:it.query?o({id:`X0ttSN`,values:{tagListQuery:ct}}):o({id:`JLUTgi`})}):null,It.map(e=>(0,Z.jsxs)(le,{value:`tag ${e.name}`,onSelect:()=>rn(e.name),"data-testid":`command-palette-tag-${e.name}`,children:[(0,Z.jsx)(p,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:(0,Z.jsx)(J,{id:`fVcm9t`,values:{0:e.count}})})]},`tag:${e.name}`))]}):null,it.kind===`tag-docs`?(0,Z.jsxs)(O,{heading:o({id:`hGmuTc`,values:{tagDocsName:lt}}),children:[ue===`loading`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`pWbsW6`})}):null,ue===`error`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`48uGTI`})}):null,Rt?(0,Z.jsx)(ot,{children:o({id:`NIWAux`,values:{tagDocsName:lt}})}):null,se.map(e=>{let t=e.title||e.docName.split(`/`).pop()||e.docName,n=e.matchingTags.filter(e=>e!==it.tagName).map(nv).join(`, `);return(0,Z.jsxs)(le,{value:`tag-doc ${e.docName}`,onSelect:()=>{i(!1),J_(e.docName)},"data-testid":`command-palette-tag-doc-${e.docName}`,className:`items-start`,children:[(0,Z.jsx)(ir,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.docName}),e.matchingTags.length>0&&e.matchingTags.some(e=>e!==it.tagName)?(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-[11px]`,children:(0,Z.jsx)(J,{id:`CvsD6Y`,values:{viaTags:n}})}):null]})]},`tag-doc:${e.docName}`)})]}):null,Tt?(0,Z.jsx)(O,{heading:o({id:`MmDDWK`}),children:He.map(e=>(0,Z.jsx)(X_,{entry:e,onSelect:()=>wt(e)},ig(e.kind,e.path)))}):null,en(`commands`),Ft?(0,Z.jsx)(O,{heading:o({id:`O7_W_a`}),children:Us.filter(e=>{let t=e.displayName;return Eg(o({id:`WqLq6M`,values:{displayName:t}}),u,[e.id,`agent handoff`,`open in`])}).map(e=>{let t=Oe[e.id],n=t.installed===!0&&Be!==null,r=e.displayName,a=t.installed===null?o({id:`IA6JW2`}):t.installed===!1?o({id:`5SwVv1`}):null,s=o(a?{id:`1ZpfyB`,values:{displayName:r,hint:a}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Z.jsxs)(le,{value:`send to ai ${e.displayName} ${e.id} agent open in`,disabled:!n,onSelect:()=>{!n||!Be||(i(!1),Ae(e.id,Be))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":s,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(J,{id:`WqLq6M`,values:{displayName:r}})}),a?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:a}):null]},e.id)})}):null,en(`project`),At&&a?(0,Z.jsx)(O,{heading:o({id:`3iyGWF`}),children:We.filter(e=>Eg(`${e.name} ${e.path}`,u,[`open recent project`])).slice(0,10).map(e=>{let t=e.isLinkedWorktree===!0,n=t?ts:Tm,r=t&&e.mainRoot!==void 0?H_(e.mainRoot):null;return(0,Z.jsxs)(le,{value:`${e.name} ${e.path} recent project`,disabled:e.missing,onSelect:()=>vt(()=>a.project.open({path:e.path,target:`new-window`,entryPoint:`recents`}),o({id:`SUOoXn`})),"data-testid":`command-palette-recent-${e.path}`,className:`items-start`,children:[(0,Z.jsx)(n,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),r===null?null:(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(J,{id:`8Gzz2G`,values:{worktreeOf:r}})}),(0,Z.jsxs)(`span`,{className:`truncate text-muted-foreground text-xs`,children:[e.path,e.missing?(0,Z.jsxs)(Z.Fragment,{children:[` `,(0,Z.jsx)(J,{id:`ls1N1w`})]}):null]})]})]},e.path)})}):null,Nt&&a?(0,Z.jsx)(O,{heading:o({id:`sxjyRq`}),children:Mt.slice(0,10).map(e=>(0,Z.jsxs)(le,{value:`${e.branch} worktree branch`,onSelect:()=>bt(e),"data-testid":`command-palette-worktree-${e.branch}`,className:`items-start`,children:[(0,Z.jsx)(ts,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.branch}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.worktreePath??o({id:`iO8V-7`})})]})]},e.branch))}):null,[`file`,`view`,`terminal`,`app`].map(e=>en(e)),Dt?(0,Z.jsx)(O,{heading:o({id:`A1taO8`}),children:Et.map(e=>(0,Z.jsx)(X_,{entry:e,query:d,onSelect:()=>wt(e)},ig(e.kind,e.path)))}):null]}),jn]}),Pn,Ln,Rn,zn,Bn]})}function nv(e){return`#${e}`}function rv(e){return e.name}function iv(e){return e.branch!==null&&!e.isCurrent}function av(e){return ig(e.kind,e.path)}function ov(e){return e===`eperm`?_l._({id:`XuQzrk`}):_l._({id:`BUyQnq`})}async function sv(e){let t=await e.restartServer(e.config.projectPath);return t.ok?{ok:!0}:{ok:!1,message:ov(t.reason)}}var cv=500;function lv(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function uv(e){return e?.kind===`null-collab`}function dv(e){if(e===null)return _l._({id:`Ua78MH`});if(e.kind===`null-collab`)return _l._({id:`TJnkyf`});if(e.code===`network`)return _l._({id:`aoa6xA`});if(e.code===`invalid-body`)return _l._({id:`FRYB1Q`});let t=e.code;return _l._({id:`4nj6n8`,values:{code:t}})}function fv(){let e=(0,$.c)(28),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=Xe(),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d=typeof window<`u`?window.okDesktop:void 0,f,p;e[0]!==n||e[1]!==t?(f=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),cv);return()=>clearTimeout(e)},p=[t,n],e[0]=n,e[1]=t,e[2]=f,e[3]=p):(f=e[2],p=e[3]),(0,Q.useEffect)(f,p);let m=lv(t,n,a);if(m===`hidden`)return null;if(m===`terminal`){let t;e[4]===r?t=e[5]:(t=uv(r),e[4]=r,e[5]=t);let n=t,a;e[6]===r?a=e[7]:(a=dv(r),e[6]=r,e[7]=a);let o=a,f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=async()=>{if(d){u(null),c(!0);try{let e=await sv(d);e.ok||(u(e.message),c(!1))}catch{c(!1)}}},e[8]=f):f=e[8];let p=f,m;e[9]!==o||e[10]!==n?(m=(0,Z.jsx)(`span`,{children:n?(0,Z.jsx)(J,{id:`AAlr5Y`,components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}}):(0,Z.jsx)(J,{id:`noH1JX`,values:{errorDetail:o},components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`}),1:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}})}),e[9]=o,e[10]=n,e[11]=m):m=e[11];let h;e[12]===i?h=e[13]:(h=()=>{u(null),i()},e[12]=i,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(J,{id:`6gRgw8`}),e[14]=g):g=e[14];let _;e[15]!==s||e[16]!==h?(_=(0,Z.jsx)(`button`,{type:`button`,onClick:h,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:g}),e[15]=s,e[16]=h,e[17]=_):_=e[17];let v;e[18]===s?v=e[19]:(v=d?(0,Z.jsx)(`button`,{type:`button`,onClick:p,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:s?(0,Z.jsx)(J,{id:`0Er6-M`}):(0,Z.jsx)(J,{id:`uaUc6t`})}):null,e[18]=s,e[19]=v);let y;e[20]===l?y=e[21]:(y=l===null?null:(0,Z.jsx)(`span`,{className:`w-full text-red-950 text-xs`,children:l}),e[20]=l,e[21]=y);let b;return e[22]!==y||e[23]!==m||e[24]!==_||e[25]!==v?(b=(0,Z.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[m,_,v,y]}),e[22]=y,e[23]=m,e[24]=_,e[25]=v,e[26]=b):b=e[26],b}let h;return e[27]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md`,children:(0,Z.jsx)(J,{id:`UYcGIW`})}),e[27]=h):h=e[27],h}function pv(e){let t=(0,$.c)(5),{bridge:n}=e,[r,i]=(0,Q.useState)(!1),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>M(e=>{e===`new-project`&&i(!0)}),o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(Oh,{open:r,onOpenChange:i,bridge:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}async function mv(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null),n=t.status,r=t.statusText;throw Error(El(e)??_l._({id:`lHwYMr`,values:{status:n,statusText:r}}))}return(await t.json()).docs??[]}function hv(){let e=(0,$.c)(18),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`idle`},e[0]=a):a=e[0];let[o,s]=(0,Q.useState)(a),c=(0,Q.useRef)(0),l,u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=function(e){let t=e.detail;if(!t||typeof t.value!=`string`)return;let r=c.current+=1;i(t.value),n(!0),s({kind:`loading`}),mv(t.value).then(e=>{c.current===r&&s({kind:`ready`,docs:e})}).catch(e=>{c.current===r&&s({kind:`error`,message:e instanceof Error?e.message:String(e)})})};return document.addEventListener(ke,e),()=>document.removeEventListener(ke,e)},u=[],e[1]=l,e[2]=u):(l=e[1],u=e[2]),(0,Q.useEffect)(l,u);let d;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(e){n(!1),window.location.assign(du(e))},e[3]=d):d=e[3];let f=d,p=r??``,m;e[4]===p?m=e[5]:(m={tagName:p},e[4]=p,e[5]=m);let h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h={0:(0,Z.jsx)(`span`,{className:`font-mono break-all`})},e[6]=h):h=e[6];let g;e[7]===m?g=e[8]:(g=(0,Z.jsx)(Mn,{children:(0,Z.jsx)(On,{children:(0,Z.jsx)(J,{id:`7H4UHD`,values:m,components:h})})}),e[7]=m,e[8]=g);let _=r??``,v;e[9]!==o||e[10]!==_?(v=(0,Z.jsx)(An,{children:(0,Z.jsx)(gv,{fetchState:o,tag:_,onSelectDoc:f})}),e[9]=o,e[10]=_,e[11]=v):v=e[11];let y;e[12]!==g||e[13]!==v?(y=(0,Z.jsxs)(kn,{children:[g,v]}),e[12]=g,e[13]=v,e[14]=y):y=e[14];let b;return e[15]!==t||e[16]!==y?(b=(0,Z.jsx)(Nn,{open:t,onOpenChange:n,children:y}),e[15]=t,e[16]=y,e[17]=b):b=e[17],b}function gv(e){let t=(0,$.c)(15),{fetchState:n,tag:r,onSelectDoc:i}=e;if(n.kind===`idle`||n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-loading`,children:(0,Z.jsx)(J,{id:`yQE2r9`})}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`p`,{className:`text-destructive text-sm`,"data-testid":`tag-dialog-error`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.docs.length===0){let e;t[3]===r?e=t[4]:(e={tag:r},t[3]=r,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n={0:(0,Z.jsx)(`span`,{className:`font-mono`})},t[5]=n):n=t[5];let i;return t[6]===e?i=t[7]:(i=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-empty`,children:(0,Z.jsx)(J,{id:`lAiyU_`,values:e,components:n})}),t[6]=e,t[7]=i),i}let a;if(t[8]!==n.docs||t[9]!==i){let e;t[11]===i?e=t[12]:(e=e=>{let t=e.matchingTags??[];return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`w-full rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring`,onClick:()=>i(e.docName),"data-testid":`tag-dialog-row`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium`,children:e.title}),e.docName===e.title?null:(0,Z.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.docName}),t.length>0?(0,Z.jsx)(`span`,{className:`mt-1 flex flex-wrap items-center gap-1`,"data-testid":`tag-dialog-row-matches`,children:t.map(_v)}):null]})},e.docName)},t[11]=i,t[12]=e),a=n.docs.map(e),t[8]=n.docs,t[9]=i,t[10]=a}else a=t[10];let o;return t[13]===a?o=t[14]:(o=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,"data-testid":`tag-dialog-list`,children:a}),t[13]=a,t[14]=o),o}function _v(e){return(0,Z.jsxs)(`span`,{"data-testid":`tag-dialog-row-match`,"data-tag":e,className:`tag pointer-events-none text-xs`,children:[`#`,e]},e)}var vv=`raw-mdx-nav`,yv=`ok-editor-mode-v1`,bv=[`wysiwyg`,`source`],xv=`wysiwyg`;function Sv(e){return bv.includes(e)}function Cv(e=localStorage){try{let t=e.getItem(yv);if(t===null)return xv;if(Sv(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return xv}function wv(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return Sv(n)?n:Cv(t)}function Tv(e,t=localStorage){try{return t.setItem(yv,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function Ev(){let e=(0,$.c)(3),[t,n]=(0,Q.useState)(wv),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Tv(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Dv(){let e=(0,$.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={},e[0]=t):t=e[0];let[n,r]=(0,Q.useState)(t),i,a;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=window.okDesktop?.terminal;if(typeof e?.cliInstalledMap!=`function`)return;let t=!1,n=()=>{e.cliInstalledMap().then(e=>{t||r(e)}).catch(Ov)};return n(),window.addEventListener(`focus`,n),()=>{t=!0,window.removeEventListener(`focus`,n)}},a=[],e[1]=i,e[2]=a):(i=e[1],a=e[2]),(0,Q.useEffect)(i,a),n}function Ov(e){console.warn(`[terminal] cliInstalledMap probe failed:`,e)}function kv(e){let t=(0,$.c)(4),{_:n}=jt(),r=(0,Q.useRef)(!1),i,a;t[0]!==n||t[1]!==e?(i=()=>{e===`no-push-permission`&&!r.current&&(r.current=!0,ul.info(n({id:`JkCD2u`})))},a=[e,n],t[0]=n,t[1]=e,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,Q.useEffect)(i,a)}function Av(){let e=(0,$.c)(8),{projectLocalConfig:t,projectLocalSynced:n,projectLocalBinding:r}=Bu(),i=(0,Q.useRef)(!1),a;e[0]!==r||e[1]!==t?.autoSync||e[2]!==n?(a=()=>{if(!n||i.current||r===null)return;let e=t?.autoSync;if(e?.inheritedNoticePending!==!0)return;i.current=!0;let a=typeof e.inheritedFrom==`string`?e.inheritedFrom:``;ul(e.enabled===!0?(0,Z.jsx)(J,{id:`4zEZS5`,values:{project:a}}):(0,Z.jsx)(J,{id:`AaaESH`,values:{project:a}})),r.patch({autoSync:{inheritedNoticePending:null}})},e[0]=r,e[1]=t?.autoSync,e[2]=n,e[3]=a):a=e[3];let o;e[4]!==r||e[5]!==t||e[6]!==n?(o=[n,t,r],e[4]=r,e[5]=t,e[6]=n,e[7]=o):o=e[7],(0,Q.useEffect)(a,o)}var jv=`ok-ask-ai-agent-v2`,Mv=`ok-ask-ai-default-agent-v1`,Nv=`ok-preferred-agent-v1`,Pv=`terminal-cli`;function Fv(e){return`${Pv}:${e}`}function Iv(e){return e===null?null:e===`terminal-cli`?`claude`:za.find(t=>e===Fv(t))??null}function Lv(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Rv(e){let t=Lv(e);if(!t)return null;try{let e=t.getItem(jv);return e===null?t.getItem(Mv)??t.getItem(Nv):e}catch{return null}}function zv(e,t){let n=Lv(t);if(n)try{n.setItem(jv,e)}catch(e){console.warn(`[ask-ai] Failed to persist default agent:`,e)}}function Bv(e,t){let n=Us.filter(t=>e[t.id]?.installed===!0);if(t){let e=n.find(e=>e.id===t);if(e)return e}return n[0]??null}function Vv(e,t){return Iv(e)||(za.find(e=>t[e]===!0)??`claude`)}var Hv=`ok-terminal-dock-v1`,Uv=`right`;function Wv(e){return e===`bottom`?`bottom`:`right`}function Gv(e){try{return Wv((e??localStorage).getItem(Hv))}catch{return Uv}}function Kv(e,t){try{(t??localStorage).setItem(Hv,e)}catch{}}function qv(){try{return typeof localStorage>`u`?Uv:Gv()}catch{return Uv}}var Jv=`ok-terminal-new-tab-bare-v1`;function Yv(e){try{return(e??localStorage).getItem(Jv)===`1`}catch{return!1}}function Xv(e,t){try{let n=t??localStorage;e?n.setItem(Jv,`1`):n.removeItem(Jv)}catch{}}function Zv(){try{return typeof localStorage>`u`?!1:Yv()}catch{return!1}}function Qv(e){let t=(0,$.c)(25),{open:n,onResolved:r}=e,{_:i}=jt(),a=us(),o;t[0]!==i||t[1]!==r||t[2]!==a?(o=function(e){if(a===null){ul.error(i({id:`fiMNLl`}));return}let t=a(e);if(!t.ok){let n=t.error;ul.error(i(e?{id:`FUMerq`,values:{detail:n}}:{id:`0t0bbC`,values:{detail:n}}));return}r()},t[0]=i,t[1]=r,t[2]=a,t[3]=o):o=t[3];let s=o,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Mn,{children:(0,Z.jsx)(ps,{})}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(ms,{}),t[5]=l):l=t[5];let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsxs)(An,{children:[l,(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`ZLQol-`,components:{0:(0,Z.jsx)(`span`,{className:`font-medium`})}})})]}),t[6]=u):u=t[6];let d;t[7]===s?d=t[8]:(d=()=>s(!1),t[7]=s,t[8]=d);let f=a===null,p;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(J,{id:`IKoTAC`}),t[9]=p):p=t[9];let m;t[10]!==d||t[11]!==f?(m=(0,Z.jsx)(Y,{variant:`outline`,className:`uppercase font-mono`,onClick:d,disabled:f,children:p}),t[10]=d,t[11]=f,t[12]=m):m=t[12];let h;t[13]===s?h=t[14]:(h=()=>s(!0),t[13]=s,t[14]=h);let g=a===null,_;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(J,{id:`XU0OXn`}),t[15]=_):_=t[15];let v;t[16]!==g||t[17]!==h?(v=(0,Z.jsx)(Y,{onClick:h,disabled:g,children:_}),t[16]=g,t[17]=h,t[18]=v):v=t[18];let y;t[19]!==v||t[20]!==m?(y=(0,Z.jsxs)(kn,{className:`sm:max-w-lg`,showCloseButton:!1,children:[c,u,(0,Z.jsxs)(jn,{children:[m,v]})]}),t[19]=v,t[20]=m,t[21]=y):y=t[21];let b;return t[22]!==n||t[23]!==y?(b=(0,Z.jsx)(Nn,{open:n,onOpenChange:$v,children:y}),t[22]=n,t[23]=y,t[24]=b):b=t[24],b}function $v(){}function ey(e){return!e.autoSyncOnboardingDismissed&&e.hasRemote===!0&&e.projectLocalSynced===!0&&e.projectSynced===!0&&e.projectLocalConfig!==null&&e.projectLocalConfig.autoSync?.enabled===null&&(e.projectConfig?.autoSync?.default??null)===null&&(e.pushPermissionCheckStatus===`allowed`||e.pushPermissionCheckStatus===`unknown`)}var ty=new Map(Ro.map(e=>[e.id,e.alias]));function ny(e,t,n){return Eo({relativePath:vc(e),source:t.source,code:t.code,ruleAlias:t.source===`markdownlint`?ty.get(t.code):void 0,message:t.message,line:t.range.start.line+1,column:t.range.start.character+1,lineText:n})}var ry=5;async function iy(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Oo.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Fn(_l._({id:`XopE_I`,values:{status:r}}),{status:r})}let r=_o.safeParse(n);if(!r.success)throw new Fn(_l._({id:`lZAiSP`}),{status:t.status});return r.data.backlinks}async function ay(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Oo.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Fn(_l._({id:`GemPfn`,values:{status:r}}),{status:r})}let r=fa.safeParse(n);if(!r.success)throw new Fn(_l._({id:`2YZwPB`}),{status:t.status});return r.data.forwardLinks}function oy(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}function sy(e){window.location.hash=du(e)}function cy(e){let t=(0,$.c)(9),{title:n,count:r,isLoading:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Ms,{className:`size-3.5 text-muted-foreground transition-transform group-data-[state=closed]:-rotate-90`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[a,(0,Z.jsx)(Qt,{children:n})]}),t[1]=n,t[2]=o);let s;t[3]!==r||t[4]!==i?(s=!i&&(0,Z.jsx)(Zt,{children:r}),t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(Tn,{className:`group flex w-full cursor-pointer items-center justify-between px-5 py-3 text-left transition-colors hover:bg-muted/40`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function ly(e){let t=(0,$.c)(10),{total:n,expanded:r,onToggle:i}=e;if(n<=ry)return null;let a=n-ry,o;t[0]===r?o=t[1]:(o=r?(0,Z.jsx)(Ms,{className:`size-3`}):(0,Z.jsx)(Ns,{className:`size-3`}),t[0]=r,t[1]=o);let s;t[2]!==r||t[3]!==a?(s=r?(0,Z.jsx)(J,{id:`6fGjTz`}):(0,Z.jsx)(J,{id:`ZptNUh`,values:{hidden:a}}),t[2]=r,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==r||t[6]!==i||t[7]!==o||t[8]!==s?(c=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,className:`mt-2 inline-flex cursor-pointer items-center gap-1 px-3 text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:i,children:[o,s]}),t[5]=r,t[6]=i,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function uy(e){let t=(0,$.c)(35),{icon:n,iconColorClass:r,rowTooltip:i,title:a,path:o,anchor:s,snippet:c,titleHover:l,ariaLabel:u,href:d,external:f,disabled:p,onClick:m}=e,h=o!==void 0&&o!==a,g=r??`text-muted-foreground`,_;t[0]===g?_=t[1]:(_=X(`mt-0.5 shrink-0`,g),t[0]=g,t[1]=_);let v;t[2]!==n||t[3]!==_?(v=(0,Z.jsx)(`span`,{className:_,children:n}),t[2]=n,t[3]=_,t[4]=v):v=t[4];let y=v,b;t[5]!==u||t[6]!==p||t[7]!==f||t[8]!==d||t[9]!==m||t[10]!==a||t[11]!==l?(b=d?(0,Z.jsxs)(`a`,{href:d,target:f?`_blank`:void 0,rel:f?`noopener noreferrer`:void 0,"aria-label":u,title:l,onClick:m,className:`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,children:[a,f?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` `,(0,Z.jsx)(J,{id:`dbtjJh`})]}):null]}):(0,Z.jsx)(`button`,{type:`button`,"aria-label":u,title:l,disabled:p,onClick:m,className:X(`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,`cursor-pointer bg-transparent p-0 disabled:cursor-not-allowed disabled:opacity-60`),children:a}),t[5]=u,t[6]=p,t[7]=f,t[8]=d,t[9]=m,t[10]=a,t[11]=l,t[12]=b):b=t[12];let x=b,S;t[13]===y?S=t[14]:(S=(0,Z.jsx)(`div`,{className:`mt-px flex items-center`,children:y}),t[13]=y,t[14]=S);let C;t[15]!==s||t[16]!==o||t[17]!==h?(C=h?(0,Z.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[o,s?(0,Z.jsxs)(`span`,{className:`ml-1`,children:[`· #`,s]}):null]}):null,t[15]=s,t[16]=o,t[17]=h,t[18]=C):C=t[18];let w;t[19]===c?w=t[20]:(w=c?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground`,children:c}):null,t[19]=c,t[20]=w);let T;t[21]!==x||t[22]!==C||t[23]!==w?(T=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5 text-1sm`,children:[x,C,w]}),t[21]=x,t[22]=C,t[23]=w,t[24]=T):T=t[24];let E;t[25]!==S||t[26]!==T?(E=(0,Z.jsxs)(`div`,{className:`group relative flex items-start gap-2.5 rounded-md px-3 py-2.5 transition-colors hover:bg-muted/80`,children:[S,T]}),t[25]=S,t[26]=T,t[27]=E):E=t[27];let D=E;if(i){let e;t[28]===D?e=t[29]:(e=(0,Z.jsx)(yn,{asChild:!0,children:D}),t[28]=D,t[29]=e);let n;t[30]===i?n=t[31]:(n=(0,Z.jsx)(bn,{side:`top`,children:i}),t[30]=i,t[31]=n);let r;return t[32]!==e||t[33]!==n?(r=(0,Z.jsxs)(Sn,{children:[e,n]}),t[32]=e,t[33]=n,t[34]=r):r=t[34],r}return D}function dy(e){let t=(0,$.c)(39),{docName:n}=e,{_:r}=jt(),{folderPaths:i,pages:a,pagesBySlug:o,pagesByBasename:s,loading:c}=Ls(),l,u;t[0]===n?(l=t[1],u=t[2]):(l=[`backlinks`,n],u=()=>iy(n),t[0]=n,t[1]=l,t[2]=u);let d;t[3]!==n||t[4]!==c||t[5]!==a?(d=!c&&(a.has(n)||Po(n)),t[3]=n,t[4]=c,t[5]=a,t[6]=d):d=t[6];let f;t[7]!==l||t[8]!==u||t[9]!==d?(f={queryKey:l,queryFn:u,enabled:d},t[7]=l,t[8]=u,t[9]=d,t[10]=f):f=t[10];let{data:p,isLoading:m,error:h}=Bt(f),g;t[11]===p?g=t[12]:(g=p===void 0?[]:p,t[11]=p,t[12]=g);let _=g,[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(n);b!==n&&(x(n),y(!1));let S;t[13]!==_||t[14]!==v?(S=v?_:_.slice(0,ry),t[13]=_,t[14]=v,t[15]=S):S=t[15];let C=S,w;t[16]===r?w=t[17]:(w=r({id:`9NJWgv`}),t[16]=r,t[17]=w);let T;t[18]!==_.length||t[19]!==m||t[20]!==w?(T=(0,Z.jsx)(cy,{title:w,count:_.length,isLoading:m}),t[18]=_.length,t[19]=m,t[20]=w,t[21]=T):T=t[21];let E;t[22]!==r||t[23]!==_.length||t[24]!==h||t[25]!==v||t[26]!==i||t[27]!==m||t[28]!==a||t[29]!==s||t[30]!==o||t[31]!==C?(E=h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Rt,{children:h instanceof Error?h.message:r({id:`Xet9MX`})})}):_.length===0&&!m?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Gt,{children:(0,Z.jsx)(J,{id:`rVxu1k`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:C.map((e,t)=>{let n=Qu(e.source,{pages:a,folderPaths:i,pagesBySlug:o,pagesByBasename:s});return(0,Z.jsx)(uy,{icon:(0,Z.jsx)(St,{className:`size-3.5`}),title:e.title,path:oy(e.source),titleHover:e.source,anchor:e.anchor,snippet:e.snippet,href:du(n.hashDocName,e.anchor)},`${e.source}-${t}`)})}),(0,Z.jsx)(ly,{total:_.length,expanded:v,onToggle:()=>y(fy)})]}),t[22]=r,t[23]=_.length,t[24]=h,t[25]=v,t[26]=i,t[27]=m,t[28]=a,t[29]=s,t[30]=o,t[31]=C,t[32]=E):E=t[32];let D;t[33]!==m||t[34]!==E?(D=(0,Z.jsx)(wn,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":m,children:E})}),t[33]=m,t[34]=E,t[35]=D):D=t[35];let O;return t[36]!==D||t[37]!==T?(O=(0,Z.jsxs)(En,{defaultOpen:!0,children:[T,D]}),t[36]=D,t[37]=T,t[38]=O):O=t[38],O}function fy(e){return!e}function py(e){let t=(0,$.c)(49),{docName:n}=e,{_:r}=jt(),{addPage:i,folderPaths:a,pages:o,pagesBySlug:s,pagesByBasename:c,loading:l}=Ls(),u,d;t[0]===n?(u=t[1],d=t[2]):(u=[`forward-links`,n],d=()=>ay(n),t[0]=n,t[1]=u,t[2]=d);let f;t[3]!==n||t[4]!==o||t[5]!==l?(f=!l&&(o.has(n)||Po(n)),t[3]=n,t[4]=o,t[5]=l,t[6]=f):f=t[6];let p;t[7]!==u||t[8]!==d||t[9]!==f?(p={queryKey:u,queryFn:d,enabled:f},t[7]=u,t[8]=d,t[9]=f,t[10]=p):p=t[10];let{data:m,isLoading:h,error:g}=Bt(p),_;t[11]===m?_=t[12]:(_=m===void 0?[]:m,t[11]=m,t[12]=_);let v=_,[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(n);C!==n&&(w(n),S(!1),b(null));let T;t[13]!==x||t[14]!==v?(T=x?v:v.slice(0,ry),t[13]=x,t[14]=v,t[15]=T):T=t[15];let E=T,D;t[16]!==r||t[17]!==i||t[18]!==y?(D=async function(e,t){if(!y){b(t);try{await R(e,{addPage:i,onCreated:sy}),b(null)}catch(e){let t=e;ul.error(t instanceof Error?t.message:r({id:`tfi40B`})),b(null)}}},t[16]=r,t[17]=i,t[18]=y,t[19]=D):D=t[19];let O=D,k;t[20]!==r||t[21]!==y||t[22]!==a||t[23]!==O||t[24]!==o||t[25]!==c||t[26]!==s||t[27]!==l?(k=function(e){let{title:t}=e;if(e.kind===`external`){let t=e.title===e.url;return(0,Z.jsx)(uy,{icon:(0,Z.jsx)(hs,{className:`size-3.5`}),rowTooltip:r({id:`XDzAnp`}),title:e.title,path:t?void 0:e.url,titleHover:e.url,snippet:e.snippet,href:e.url,external:!0},`ext:${e.url}`)}let n=In(e.docName,{pages:o,folderPaths:a,pagesBySlug:s,pagesByBasename:c}),i=!l&&n.kind===`create`,u=!l&&n.kind===`navigate`&&n.displayState===`folder`,d=oy(e.docName),f=e.title===e.docName?d:e.title,p=`doc:${e.docName}:${e.anchor??``}`,m=n.kind===`navigate`?n.hashDocName:e.docName,h=n.kind===`navigate`&&n.hash?n.hash:du(m,e.anchor);if(i&&n.kind===`create`){let i={initialDir:n.initialDir,suggestedName:n.suggestedName};return(0,Z.jsx)(uy,{icon:(0,Z.jsx)(Gc,{className:`size-3.5`}),iconColorClass:`text-amber-600 dark:text-amber-400`,rowTooltip:r(y===p?{id:`kj9pAE`}:{id:`IQPyrD`}),ariaLabel:r(y===p?{id:`un8kBM`,values:{linkTitle:t}}:{id:`jEdF24`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,disabled:y!==null,onClick:()=>void O(i,p)},p)}return u&&n.kind===`navigate`?(0,Z.jsx)(uy,{icon:(0,Z.jsx)(Tm,{className:`size-3.5`}),iconColorClass:`text-sky-600 dark:text-sky-400`,ariaLabel:r({id:`P6lAT3`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p):(0,Z.jsx)(uy,{icon:(0,Z.jsx)(St,{className:`size-3.5`}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p)},t[20]=r,t[21]=y,t[22]=a,t[23]=O,t[24]=o,t[25]=c,t[26]=s,t[27]=l,t[28]=k):k=t[28];let A=k,j;t[29]===r?j=t[30]:(j=r({id:`O0Z2Xr`}),t[29]=r,t[30]=j);let M;t[31]!==h||t[32]!==v.length||t[33]!==j?(M=(0,Z.jsx)(cy,{title:j,count:v.length,isLoading:h}),t[31]=h,t[32]=v.length,t[33]=j,t[34]=M):M=t[34];let N;t[35]!==r||t[36]!==g||t[37]!==x||t[38]!==h||t[39]!==v.length||t[40]!==A||t[41]!==E?(N=g?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Rt,{children:g instanceof Error?g.message:r({id:`pZAs1T`})})}):v.length===0&&!h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Gt,{children:(0,Z.jsx)(J,{id:`roiUQQ`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:E.map(A)}),(0,Z.jsx)(ly,{total:v.length,expanded:x,onToggle:()=>S(my)})]}),t[35]=r,t[36]=g,t[37]=x,t[38]=h,t[39]=v.length,t[40]=A,t[41]=E,t[42]=N):N=t[42];let P;t[43]!==h||t[44]!==N?(P=(0,Z.jsx)(wn,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":h,children:N})}),t[43]=h,t[44]=N,t[45]=P):P=t[45];let F;return t[46]!==M||t[47]!==P?(F=(0,Z.jsxs)(En,{defaultOpen:!0,children:[M,P]}),t[46]=M,t[47]=P,t[48]=F):F=t[48],F}function my(e){return!e}function hy(e){let t=(0,$.c)(11),{docName:n,className:r}=e,i=r===void 0?``:r,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(py,{docName:n}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Xi,{}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(dy,{docName:n}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,Z.jsxs)(Jt,{className:`px-0 py-0`,children:[a,o,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==c?(l=(0,Z.jsx)($t,{className:i,children:c}),t[8]=i,t[9]=c,t[10]=l):l=t[10],l}function gy(e){let t=e.setTimer??((e,t)=>setTimeout(e,t)),n=e.clearTimer??(e=>clearTimeout(e)),r=!1,i=!1,a=null,o=null,s=e.baseMs,c=!1,l=n=>{if(!r){if(e.isPaused()){c=!0;return}a=t(u,n)}};async function u(){if(a=null,c=!1,r)return;if(e.isPaused()){c=!0;return}o=new AbortController;let t=o.signal;try{let n=await e.poll(t);if(r)return;n===`ok`?(s=e.baseMs,l(e.baseMs)):(s=Math.min(s*2,e.maxBackoffMs),l(s))}catch{if(r||t.aborted)return;s=Math.min(s*2,e.maxBackoffMs),l(s)}}return{start(){r||i||(i=!0,u())},resume(){r||!e.isPaused()&&c&&a===null&&(c=!1,u())},stop(){r=!0,a!==null&&(n(a),a=null),o?.abort()}}}var _y=1e4,vy=6e4;async function yy(e,t,n){try{let r=await fetch(`/api/history?docName=${encodeURIComponent(e)}&limit=100`,{signal:t});if(!r.ok)return n.setError(n.unavailableMessage),`error`;let i=await r.json();return n.setEntries((i.entries??[]).filter(e=>e.type!==`checkpoint`)),n.setError(null),`ok`}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;return n.setError(n.unavailableMessage),console.error(`[timeline]`,e),`error`}finally{t.aborted||n.setLoading(!1)}}function by(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return _l._({id:`xOTzt5`});if(r<3600){let e=Math.floor(r/60);return _l._({id:`UyROxs`,values:{mins:e}})}if(r<86400){let e=Math.floor(r/3600);return _l._({id:`wXO4Tg`,values:{hrs:e}})}if(r<86400*2)return _l._({id:`rQRrkB`});let i=Math.floor(r/86400);return i<7?_l._({id:`6u9LvN`,values:{days:i}}):t.toLocaleDateString()}function xy(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Sy(e){if(e.type===`upstream`)return{kind:`upstream`};let t=e.message,n=/^rollback: .+ to ([0-9a-f]{7,40})$/.exec(t);if(n)return{kind:`restore`,targetSha7:n[1].slice(0,7)};let r=/^rename: (.+) -> (.+)$/.exec(t);return r?{kind:`rename`,from:r[1],to:r[2]}:t.startsWith(`reconcile: `)?{kind:`reconcile`}:t.startsWith(`import: `)?{kind:`upstream`}:{kind:`edit`}}function Cy(e){return e.split(`/`).pop()??e}function wy(e){return e.type===`upstream`?_l._({id:`K_vT1F`}):e.contributors.length===1?e.contributors[0].name:e.contributors.length>1?e.contributors.map(e=>e.name).join(`, `):e.author===`openknowledge-server`||e.author===`server`?_l._({id:`B2DrPb`}):e.author}function Ty(e){let t=(0,$.c)(17),{entry:n,isDark:r}=e;if(n.type===`upstream`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(ts,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[0]=e):e=t[0],e}if(n.contributors.length>0){let e=n.contributors[0],i=e.colorSeed??e.name,a;t[1]===i?a=t[2]:(a=po(i),t[1]=i,t[2]=a);let o=a,s=r?Fo[o]??Wo[o]:Wo[o],c;t[3]!==s||t[4]!==i?(c=s??No(i),t[3]=s,t[4]=i,t[5]=c):c=t[5];let l=c;if(o!==`bot`){let e;t[6]===l?e=t[7]:(e={color:l},t[6]=l,t[7]=e);let n;return t[8]!==o||t[9]!==e?(n=(0,Z.jsx)($u,{icon:o,width:14,height:14,className:`shrink-0`,style:e}),t[8]=o,t[9]=e,t[10]=n):n=t[10],n}if(e.name===`File System`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Dm,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[11]=e):e=t[11],e}if(e.name===`OpenKnowledge (service)`||e.name===`Git (upstream)`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(rs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[12]=e):e=t[12],e}let u;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(yh,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[13]=u):u=t[13],u}if(n.authorEmail.includes(`agent`)||n.author.includes(`agent`)||n.authorEmail.includes(`cursor`)||n.authorEmail.includes(`claude`)){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(pc,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[14]=e):e=t[14],e}if(n.author===`openknowledge-server`||n.author===`server`){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(rs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[15]=e):e=t[15],e}let i;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(yh,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[16]=i):i=t[16],i}function Ey(e){let t=[];for(let n of e.contributors)if(n.summaries)for(let e of n.summaries)t.push(e);return t}function Dy(e){let t=(0,$.c)(21),{summaries:n}=e,[r,i]=(0,Q.useState)(!1),a=(0,Q.useId)();if(n.length===0)return null;let o,s;t[0]===n?(o=t[1],s=t[2]):([o,...s]=n,t[0]=n,t[1]=o,t[2]=s);let c=s.length,l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),t[3]=l):l=t[3];let u;t[4]===o?u=t[5]:(u=(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[l,o]}),t[4]=o,t[5]=u);let d;t[6]!==r||t[7]!==s?(d=r&&s.map(ky),t[6]=r,t[7]=s,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==u||t[11]!==d?(f=(0,Z.jsxs)(`ul`,{id:a,className:`list-none`,children:[u,d]}),t[9]=a,t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==r||t[14]!==c||t[15]!==a||t[16]!==s.length?(p=s.length>0&&(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:e=>{e.stopPropagation(),i(Oy)},children:[r?(0,Z.jsx)(Ms,{className:`size-3`}):(0,Z.jsx)(Ns,{className:`size-3`}),r?(0,Z.jsx)(J,{id:`vLyv1R`}):(0,Z.jsx)(J,{id:`ZptNUh`,values:{hidden:c}})]}),t[13]=r,t[14]=c,t[15]=a,t[16]=s.length,t[17]=p):p=t[17];let m;return t[18]!==f||t[19]!==p?(m=(0,Z.jsxs)(`div`,{className:`mt-0.5`,children:[f,p]}),t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function Oy(e){return!e}function ky(e,t){return(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),e]},`${t}-${e}`)}function Ay(e){let t=(0,$.c)(36),{descriptor:n,allDocs:r,versionBySha7:i,onJumpToVersion:a}=e,{_:o}=jt();if(n.kind===`restore`){let e,r;t[0]!==o||t[1]!==n.targetSha7||t[2]!==i?(r=i.get(n.targetSha7),e=o(r?{id:`sICrVf`,values:{0:xy(r.timestamp)}}:{id:`i09An-`,values:{0:n.targetSha7}}),t[0]=o,t[1]=n.targetSha7,t[2]=i,t[3]=e,t[4]=r):(e=t[3],r=t[4]);let s=e,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Hi,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[5]=c):c=t[5];let l;return t[6]!==n.targetSha7||t[7]!==s||t[8]!==a||t[9]!==r?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[c,r?(0,Z.jsx)(`button`,{type:`button`,className:`truncate text-left underline-offset-2 hover:text-foreground hover:underline`,title:s,onClick:e=>{e.stopPropagation(),a(n.targetSha7)},children:s}):(0,Z.jsx)(`span`,{className:`truncate`,title:s,children:s})]}),t[6]=n.targetSha7,t[7]=s,t[8]=a,t[9]=r,t[10]=l):l=t[10],l}if(n.kind===`rename`){let e=`${n.from} → ${n.to}`,r;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)($p,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[11]=r):r=t[11];let i;t[12]!==o||t[13]!==n.from||t[14]!==n.to?(i=o({id:`GkYV_4`,values:{0:Cy(n.from),1:Cy(n.to)}}),t[12]=o,t[13]=n.from,t[14]=n.to,t[15]=i):i=t[15];let a;t[16]===i?a=t[17]:(a=(0,Z.jsx)(`span`,{className:`truncate`,children:i}),t[16]=i,t[17]=a);let s;return t[18]!==e||t[19]!==a?(s=(0,Z.jsxs)(`p`,{className:`flex items-center gap-1 truncate text-xs text-muted-foreground`,title:e,children:[r,a]}),t[18]=e,t[19]=a,t[20]=s):s=t[20],s}if(n.kind===`reconcile`){let e;t[21]===o?e=t[22]:(e=o({id:`0qyKG6`}),t[21]=o,t[22]=e);let n;return t[23]===e?n=t[24]:(n=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:e}),t[23]=e,t[24]=n),n}if(r.length>0){let e;t[25]===r?e=t[26]:(e=r.join(`, `),t[25]=r,t[26]=e);let n;t[27]===r?n=t[28]:(n=r.join(`, `),t[27]=r,t[28]=n);let i;return t[29]!==e||t[30]!==n?(i=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:e,children:n}),t[29]=e,t[30]=n,t[31]=i):i=t[31],i}if(n.kind===`upstream`)return null;let s;t[32]===o?s=t[33]:(s=o({id:`MRZxAn`}),t[32]=o,t[33]=s);let c;return t[34]===s?c=t[35]:(c=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s}),t[34]=s,t[35]=c),c}function jy(e){let t=(0,$.c)(122),{entry:n,isDark:r,docName:i,laterEdits:a,onRestoreSuccess:o,versionBySha7:s,onJumpToVersion:c,registerRowRef:l,flashing:u}=e,{_:d}=jt(),f;t[0]===n.timestamp?f=t[1]:(f=by(n.timestamp),t[0]=n.timestamp,t[1]=f);let p=f,m;t[2]===n?m=t[3]:(m=wy(n),t[2]=n,t[3]=m);let h=m,g;t[4]===n.timestamp?g=t[5]:(g=xy(n.timestamp),t[4]=n.timestamp,t[5]=g);let _=g,v;t[6]===n.contributors?v=t[7]:(v=n.contributors.flatMap(My),t[6]=n.contributors,t[7]=v);let y=v,b;t[8]===n?b=t[9]:(b=Ey(n),t[8]=n,t[9]=b);let x=b,S;t[10]===n?S=t[11]:(S=Sy(n),t[10]=n,t[11]=S);let C=S,[w,T]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(!1),O=(0,Q.useRef)(null),k=Jc(),A=k?.docName===i&&k.sha===n.sha,j,M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>()=>O.current?.abort(),M=[],t[12]=j,t[13]=M):(j=t[12],M=t[13]),(0,Q.useEffect)(j,M);let N;t[14]!==_||t[15]!==h||t[16]!==i||t[17]!==n.parentSha||t[18]!==n.sha||t[19]!==a||t[20]!==p?(N=()=>{td(),qc({docName:i,sha:n.sha,parentSha:n.parentSha??null,laterEdits:a,authorName:h,relativeTime:p,absoluteTime:_})},t[14]=_,t[15]=h,t[16]=i,t[17]=n.parentSha,t[18]=n.sha,t[19]=a,t[20]=p,t[21]=N):N=t[21];let P=N,F;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(){O.current?.abort(),O.current=null,D(!1),T(!1)},t[22]=F):F=t[22];let I=F,L;t[23]!==d||t[24]!==i||t[25]!==n.sha||t[26]!==o?(L=async function(){D(!0);let e=new AbortController;O.current=e;let t=function(){e.signal.aborted||D(!1),O.current===e&&(O.current=null)},r;try{r=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:i,commitSha:n.sha}),signal:e.signal})}catch(r){let a=r;!e.signal.aborted&&!(a instanceof DOMException&&a.name===`AbortError`)&&(console.error(`[timeline] rollback fetch failed`,{docName:i,sha:n.sha,err:a}),ul.error(d({id:`NkXEFS`}),{duration:4e3})),t();return}if(e.signal.aborted){t();return}if(r.ok)T(!1),o();else{let e=`HTTP ${r.status}`;try{let t=Oo.safeParse(await r.json());t.success&&(e=t.data.title)}catch{}console.error(`[timeline] rollback failed`,{docName:i,sha:n.sha,status:r.status,detail:e}),ul.error(d({id:`uM6jnS`}),{description:e,duration:6e3})}t()},t[23]=d,t[24]=i,t[25]=n.sha,t[26]=o,t[27]=L):L=t[27];let R=L,z;t[28]!==n||t[29]!==r?(z=(0,Z.jsx)(Ty,{entry:n,isDark:r}),t[28]=n,t[29]=r,t[30]=z):z=t[30];let B=z,V=u?`ring-2 ring-ring ring-offset-1 ring-offset-background`:``,H;t[31]===V?H=t[32]:(H=[`flex flex-col rounded-lg transition-shadow`,V],t[31]=V,t[32]=H);let U=H.join(` `),W=A?`bg-muted`:`hover:bg-muted/80`,G;t[33]===W?G=t[34]:(G=[`group flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring`,W],t[33]=W,t[34]=G);let K=G.join(` `),ee;t[35]===P?ee=t[36]:(ee=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),P())},t[35]=P,t[36]=ee);let te;t[37]===B?te=t[38]:(te=(0,Z.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:B}),t[37]=B,t[38]=te);let q;t[39]===h?q=t[40]:(q=(0,Z.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:h}),t[39]=h,t[40]=q);let ne;t[41]!==n.timestamp||t[42]!==p?(ne=(0,Z.jsx)(`time`,{className:`ml-auto shrink-0 text-xs text-muted-foreground/80`,dateTime:n.timestamp,title:n.timestamp,children:p}),t[41]=n.timestamp,t[42]=p,t[43]=ne):ne=t[43];let re;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px shrink-0 bg-border`}),t[44]=re):re=t[44];let ie;t[45]===d?ie=t[46]:(ie=d({id:`Yea-K5`}),t[45]=d,t[46]=ie);let ae;t[47]!==R||t[48]!==a?(ae=e=>{e.stopPropagation(),a>0?T(!0):R()},t[47]=R,t[48]=a,t[49]=ae):ae=t[49];let oe;t[50]===E?oe=t[51]:(oe=E?(0,Z.jsx)(zc,{className:`size-3 animate-spin`}):(0,Z.jsx)(Kc,{className:`size-3`}),t[50]=E,t[51]=oe);let se;t[52]!==E||t[53]!==ie||t[54]!==ae||t[55]!==oe?(se=(0,Z.jsx)(yn,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`timeline-entry-restore`,"aria-label":ie,disabled:E,onClick:ae,children:oe})}),t[52]=E,t[53]=ie,t[54]=ae,t[55]=oe,t[56]=se):se=t[56];let ce;t[57]===d?ce=t[58]:(ce=d({id:`Yea-K5`}),t[57]=d,t[58]=ce);let le;t[59]===ce?le=t[60]:(le=(0,Z.jsx)(bn,{side:`top`,children:ce}),t[59]=ce,t[60]=le);let ue;t[61]!==se||t[62]!==le?(ue=(0,Z.jsxs)(Sn,{children:[se,le]}),t[61]=se,t[62]=le,t[63]=ue):ue=t[63];let de;t[64]!==q||t[65]!==ne||t[66]!==ue?(de=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[q,ne,re,ue]}),t[64]=q,t[65]=ne,t[66]=ue,t[67]=de):de=t[67];let fe;t[68]===x?fe=t[69]:(fe=x.length>0&&(0,Z.jsx)(Dy,{summaries:x}),t[68]=x,t[69]=fe);let pe;t[70]!==y||t[71]!==C||t[72]!==c||t[73]!==s?(pe=(0,Z.jsx)(Ay,{descriptor:C,allDocs:y,versionBySha7:s,onJumpToVersion:c}),t[70]=y,t[71]=C,t[72]=c,t[73]=s,t[74]=pe):pe=t[74];let me;t[75]!==de||t[76]!==fe||t[77]!==pe?(me=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[de,fe,pe]}),t[75]=de,t[76]=fe,t[77]=pe,t[78]=me):me=t[78];let he;t[79]!==P||t[80]!==A||t[81]!==K||t[82]!==ee||t[83]!==te||t[84]!==me?(he=(0,Z.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-pressed":A,"data-testid":`timeline-entry-open`,className:K,onClick:P,onKeyDown:ee,children:[te,me]}),t[79]=P,t[80]=A,t[81]=K,t[82]=ee,t[83]=te,t[84]=me,t[85]=he):he=t[85];let ge;t[86]!==l||t[87]!==U||t[88]!==he?(ge=(0,Z.jsx)(`div`,{ref:l,className:U,children:he}),t[86]=l,t[87]=U,t[88]=he,t[89]=ge):ge=t[89];let _e;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(_e=e=>{e?T(!0):I()},t[90]=_e):_e=t[90];let ve;t[91]===d?ve=t[92]:(ve=d({id:`n3wx1q`}),t[91]=d,t[92]=ve);let ye;t[93]===ve?ye=t[94]:(ye=(0,Z.jsx)(On,{children:ve}),t[93]=ve,t[94]=ye);let be;t[95]===a?be=t[96]:(be=(0,Z.jsx)(J,{id:`nfPccR`,values:{laterEdits:a}}),t[95]=a,t[96]=be);let xe;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)(J,{id:`5ZbJFS`}),t[97]=xe):xe=t[97];let Se;t[98]===be?Se=t[99]:(Se=(0,Z.jsxs)(Dn,{children:[be,` `,xe]}),t[98]=be,t[99]=Se);let Ce;t[100]!==ye||t[101]!==Se?(Ce=(0,Z.jsxs)(Mn,{children:[ye,Se]}),t[100]=ye,t[101]=Se,t[102]=Ce):Ce=t[102];let we;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(Y,{variant:`outline`,"data-testid":`timeline-entry-restore-cancel`,onClick:I,children:(0,Z.jsx)(J,{id:`dEgA5A`})}),t[103]=we):we=t[103];let Te;t[104]===R?Te=t[105]:(Te=()=>R(),t[104]=R,t[105]=Te);let Ee;t[106]===E?Ee=t[107]:(Ee=E?(0,Z.jsx)(zc,{className:`mr-2 size-4 animate-spin`}):null,t[106]=E,t[107]=Ee);let De;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Z.jsx)(J,{id:`yKu_3Y`}),t[108]=De):De=t[108];let Oe;t[109]!==E||t[110]!==Te||t[111]!==Ee?(Oe=(0,Z.jsxs)(jn,{children:[we,(0,Z.jsxs)(Y,{variant:`destructive`,"data-testid":`timeline-entry-restore-confirm`,disabled:E,onClick:Te,children:[Ee,De]})]}),t[109]=E,t[110]=Te,t[111]=Ee,t[112]=Oe):Oe=t[112];let ke;t[113]!==Ce||t[114]!==Oe?(ke=(0,Z.jsxs)(kn,{children:[Ce,Oe]}),t[113]=Ce,t[114]=Oe,t[115]=ke):ke=t[115];let Ae;t[116]!==w||t[117]!==ke?(Ae=(0,Z.jsx)(Nn,{open:w,onOpenChange:_e,children:ke}),t[116]=w,t[117]=ke,t[118]=Ae):Ae=t[118];let je;return t[119]!==ge||t[120]!==Ae?(je=(0,Z.jsxs)(Z.Fragment,{children:[ge,Ae]}),t[119]=ge,t[120]=Ae,t[121]=je):je=t[121],je}function My(e){return e.docs}function Ny(e){let t=(0,$.c)(27),{docName:n}=e,{_:r}=jt(),{resolvedTheme:i}=on(),a=i===`dark`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],t[0]=o):o=t[0];let[s,c]=(0,Q.useState)(o),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(null),p=(0,Q.useRef)(new Map),[m,h]=(0,Q.useState)(null),g=(0,Q.useRef)(null),_=new Map;for(let e of s)_.set(e.sha.slice(0,7),e);let v,y;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>clearTimeout(g.current??void 0),y=[],t[1]=v,t[2]=y):(v=t[1],y=t[2]),(0,Q.useEffect)(v,y);let b=function(e){let t=_.get(e);t&&(p.current.get(t.sha)?.scrollIntoView({behavior:`smooth`,block:`center`}),h(t.sha),clearTimeout(g.current??void 0),g.current=setTimeout(()=>h(null),1600))},x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){Yc()},t[3]=x):x=t[3];let S=x,C,w;t[4]!==r||t[5]!==n?(C=()=>{if(!n){c([]);return}u(!0);let e=gy({baseMs:_y,maxBackoffMs:vy,isPaused:Fy,poll:e=>yy(n,e,{setEntries:c,setError:f,setLoading:u,unavailableMessage:r({id:`brCtGB`})})});e.start();let t=()=>e.resume();return typeof document<`u`&&document.addEventListener(`visibilitychange`,t),()=>{e.stop(),typeof document<`u`&&document.removeEventListener(`visibilitychange`,t)}},w=[n,r],t[4]=r,t[5]=n,t[6]=C,t[7]=w):(C=t[6],w=t[7]),(0,Q.useEffect)(C,w);let T;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(Yt,{children:(0,Z.jsx)(Qt,{children:(0,Z.jsx)(J,{id:`cklVjM`})})}),t[8]=T):T=t[8];let E;t[9]!==r||t[10]!==l?(E=l&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,role:`status`,"aria-busy":`true`,"aria-label":r({id:`o49mDZ`}),children:[1,2,3].map(Py)}),t[9]=r,t[10]=l,t[11]=E):E=t[11];let D;t[12]!==d||t[13]!==l?(D=!l&&d&&(0,Z.jsx)(`div`,{className:`px-4 py-3`,children:(0,Z.jsx)(`p`,{className:`text-xs text-destructive`,children:d})}),t[12]=d,t[13]=l,t[14]=D):D=t[14];let O;t[15]!==s||t[16]!==d||t[17]!==l?(O=!l&&!d&&s.length===0&&(0,Z.jsx)(`div`,{className:`px-4 py-8 text-center`,children:(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(J,{id:`Ta25TG`})})}),t[15]=s,t[16]=d,t[17]=l,t[18]=O):O=t[18];let k=!l&&!d&&s.length>0&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,children:s.map((e,t)=>(0,Z.jsx)(jy,{entry:e,isDark:a,docName:n,laterEdits:t,onRestoreSuccess:S,versionBySha7:_,onJumpToVersion:b,registerRowRef:t=>{t?p.current.set(e.sha,t):p.current.delete(e.sha)},flashing:m===e.sha},e.sha))}),A;t[19]!==E||t[20]!==D||t[21]!==O||t[22]!==k?(A=(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto subtle-scrollbar scroll-fade-mask`,children:[E,D,O,k]}),t[19]=E,t[20]=D,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;return t[24]!==A||t[25]!==T?(j=(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[T,A]}),t[24]=A,t[25]=T,t[26]=j):j=t[26],j}function Py(e){return(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5`,children:[(0,Z.jsx)(xl,{className:`size-3.5 rounded mt-0.5 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Z.jsx)(xl,{className:`h-3 w-28`}),(0,Z.jsx)(xl,{className:`h-3 w-40`})]})]},e)}function Fy(){return typeof document<`u`&&document.visibilityState===`hidden`}var Iy=`open-knowledge:lint-source-fixed`,Ly=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`lint-fix`})});function Ry(e,t){let n=e.split(`
10
+ `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Nt(e,``+r);break;case`className`:vt(e,`class`,r);break;case`tabIndex`:vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:vt(e,n,r);break;case`style`:It(e,r,o);break;case`data`:if(t!==`object`){vt(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=Bt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,i.name,i,null),Pd(e,t,`formEncType`,i.formEncType,i,null),Pd(e,t,`formMethod`,i.formMethod,i,null),Pd(e,t,`formTarget`,i.formTarget,i,null)):(Pd(e,t,`encType`,i.encType,i,null),Pd(e,t,`method`,i.method,i,null),Pd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Bt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Bt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:bd(`beforetoggle`,e),bd(`toggle`,e),_t(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`:_t(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Rt.get(n)||n,_t(e,n,r))}}function Fd(e,t,n,r,i,o){switch(n){case`style`:It(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Nt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Nt(e,``+r);break;case`onScroll`:r!=null&&bd(`scroll`,e);break;case`onScrollEnd`:r!=null&&bd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Vt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[Xe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):_t(e,n,r)}}}function Id(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:bd(`error`,e),bd(`load`,e);var r=!1,i=!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`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Pd(e,t,o,s,n,null)}}i&&Pd(e,t,`srcSet`,n.srcSet,n,null),r&&Pd(e,t,`src`,n.src,n,null);return;case`input`:bd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=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(a(137,t));break;default:Pd(e,t,r,d,n,null)}}kt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in bd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Pd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&J(e,!!r,n,!0):J(e,!!r,t,!1);return;case`textarea`:for(s in bd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Pd(e,t,s,c,n,null)}Mt(e,r,i,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:Pd(e,t,l,r,n,null)}return;case`dialog`:bd(`beforetoggle`,e),bd(`toggle`,e),bd(`cancel`,e),bd(`close`,e);break;case`iframe`:case`object`:bd(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)bd(_d[r],e);break;case`image`:bd(`error`,e),bd(`load`,e);break;case`details`:bd(`toggle`,e);break;case`embed`:case`source`:case`link`:bd(`error`,e),bd(`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(a(137,t));default:Pd(e,t,u,r,n,null)}return;default:if(Lt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Fd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Pd(e,t,c,r,n,null))}function Ld(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 i=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)||Pd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Pd(e,t,p,m,r,f)}}Ot(e,s,c,l,u,d,o,i);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)||Pd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Pd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?J(e,!!n,n?[]:``,!1):J(e,!!n,t,!0)):J(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Pd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Pd(e,t,s,i,r,o)}jt(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:Pd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Pd(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)&&Pd(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(a(137,t));break;default:Pd(e,t,u,p,r,m)}return;default:if(Lt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Fd(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||Fd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Pd(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||Pd(e,t,f,p,r,m)}function Rd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function zd(){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&&Rd(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&&Rd(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 Bd=null,Vd=null;function Hd(e){return e.nodeType===9?e:e.ownerDocument}function Ud(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 Wd(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 Gd(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 Kd=null;function qd(){var e=window.event;return e&&e.type===`popstate`?e===Kd?!1:(Kd=e,!0):(Kd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Z=typeof Promise==`function`?Promise:void 0,Q=typeof queueMicrotask==`function`?queueMicrotask:Z===void 0?Yd:function(e){return Z.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function $(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(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 ef(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`:ef(n),rt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(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[nt])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=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(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 cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Hd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=F.d;F.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=yu();return e||t}function yf(e){var t=at(e);t!==null&&t.tag===5&&t.type===`form`?vs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Dt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Dt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Dt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Dt(n.imageSizes)+`"]`)):i+=`[href="`+Dt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Id(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Dt(r)+`"][href="`+Dt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Id(r,`link`,e),ct(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=st(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);ct(c),Id(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,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=st(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=st(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),ct(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=W.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=st(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=st(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=st(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Dt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),ct(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Dt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Dt(n.href)+`"]`);if(r)return t.instance=r,ct(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ct(r),Id(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,ct(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,ct(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),ct(i),Id(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(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 Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,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[nt]||a[Ye]||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 Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(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=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ct(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Re(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Re(0),this.hiddenUpdates=Re(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Yr(3,null,null,t),e.current=a,a.stateNode=e,t=Xi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ka(a),e}function tp(e){return e?(e=qr,e):qr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ma(e,r,t),n!==null&&(mu(n,e,t),Na(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Wr(e,67108864);t!==null&&mu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=fu();t=We(t);var n=Wr(e,t);n!==null&&mu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,up(e,t,n,r)}finally{F.p=a,P.T=i}}function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,up(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Td(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=at(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ne(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ee(o);s.entanglements[1]|=c,o&=~c}rd(a),!(Nl&6)&&(eu=me()+500,id(0,!1))}}break;case 31:case 13:s=Wr(a,2),s!==null&&mu(s,a,2),yu(),ip(a,2)}if(a=dp(r),a===null&&Td(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function dp(e){return e=Ut(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=it(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(he()){case ge:return 2;case _e:return 8;case ve:case ye:return 32;case be:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=at(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=it(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,qe(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,qe(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ht=r,n.target.dispatchEvent(r),Ht=null}else return t=at(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=at(n);a!==null&&(e.splice(t,3),t-=3,gs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Xe]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Xe]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,fu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),yu(),t[Ze]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(a(527,Lp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ce=zp.inject(Rp),we=zp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=zs,s=Bs,c=Vs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[Ze]=t.current,Cd(e),new Fp(t)}})),Xd=t(((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=Yd()})),Z=i(),Q=e(r(),1),Zd=Xd(),$=a(),Qd=3100,$d=3;function ef(e,t,n){let r=n?.windowMs??600,i=n?.maxLevel??$d;if(e===0||t>=r)return 1;let a=e+1;return a>i?i:a}var tf={0:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},1:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},2:{count:0,startRadius:0,baseDistance:0,distanceVariance:0,sizeMin:0,sizeMax:0,maxDelay:0,durationMin:0,durationMax:0},3:{count:16,startRadius:11,baseDistance:7,distanceVariance:3,sizeMin:.45,sizeMax:1.2,maxDelay:500,durationMin:1100,durationMax:2400}},nf=[`var(--color-azure-blue)`,`var(--color-sky-blue)`,`var(--color-violet-300)`,`var(--color-orange-light)`,`var(--color-crystal-blue)`,`var(--color-white-cream)`];function rf(e,t={}){let n=t.rng??Math.random,r=t.colors??nf,i=tf[e];if(i.count===0||r.length===0)return[];let a=[],o=Math.PI*2/i.count;for(let e=0;e<i.count;e++){let t=e*o+(n()-.5)*o*.7,s=i.baseDistance+(n()-.5)*2*i.distanceVariance,c=i.sizeMin+n()*(i.sizeMax-i.sizeMin),l=n()*i.maxDelay,u=i.durationMin+n()*(i.durationMax-i.durationMin),d=Math.floor(n()*r.length),f=Math.cos(t),p=Math.sin(t);a.push({id:e,dx:f*s,dy:p*s,originDx:f*i.startRadius,originDy:p*i.startRadius,size:c,color:r[d]??`currentColor`,delay:l,duration:u})}return a}var af=1.8,of=90,sf=16,cf=380,lf=.025,uf=.1,df=.18,ff=400,pf=9.2736,mf=18.1799,hf=14.5244,gf={1:{halfWidth:1.5,apexLift:2.2},2:{halfWidth:1.4,apexLift:2.6},3:{halfWidth:1.25,apexLift:3}};function _f(e,t){let{halfWidth:n,apexLift:r}=gf[t];return`M${e-n} ${hf+.3} Q${e} ${hf-r}, ${e+n} ${hf+.3}`}function vf(e){let t=1.5,n=.3;return`M${e-t} ${hf-n} Q${e} ${hf+1.4}, ${e+t} ${hf-n}`}var yf=15,bf=15;function xf(e){return{fill:e.color,"--fx-tx":`${e.dx}px`,"--fx-ty":`${e.dy}px`,"--fx-delay":`${e.delay}ms`,"--fx-duration":`${e.duration}ms`}}function Sf(e){let t=(0,$.c)(71),{size:n,className:r,trackMouse:i,variant:a,celebrateSignal:o}=e,s=n===void 0?48:n,c=i===void 0?!0:i,l=a===void 0?`default`:a,u=o===void 0?0:o,d=(0,Q.useRef)(null),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={x:0,y:0},t[0]=m):m=t[0];let h=(0,Q.useRef)(m),[g,_]=(0,Q.useState)(0),[v,y]=(0,Q.useState)(0),b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(b=[],t[1]=b):b=t[1];let[x,S]=(0,Q.useState)(b),C=(0,Q.useRef)(0),w=(0,Q.useRef)(void 0),T=l===`sleeping`,E;t[2]!==g||t[3]!==T?(E=function(){if(T)return;let e=typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),t=C.current===0?1/0:e-C.current;C.current=e;let n=ef(g,t);_(n),y(Ef),S(rf(n)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Qd)},t[2]=g,t[3]=T,t[4]=E):E=t[4];let D=E,O,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>()=>clearTimeout(w.current),k=[],t[5]=O,t[6]=k):(O=t[5],k=t[6]),(0,Q.useEffect)(O,k);let A,j;t[7]!==u||t[8]!==T?(A=()=>{u===0||T||(_(3),y(Tf),S(rf(3)),clearTimeout(w.current),w.current=setTimeout(()=>{_(0),S([])},Qd))},j=[u,T],t[7]=u,t[8]=T,t[9]=A,t[10]=j):(A=t[9],j=t[10]),(0,Q.useEffect)(A,j);let M,N;t[11]!==T||t[12]!==c?(M=()=>{if(!c||T||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=0,t=0,n=!1,r=0,i=0,a=0,o=0,s=0,l=function(){s===0&&(s=requestAnimationFrame(m))},u=function(r){e=r.clientX,t=r.clientY,n=!0,l()};function m(){s=0;let c=f.current,u=d.current;if(!c||!u){l();return}let m=n;n=!1;let g=c.getBoundingClientRect(),_=g.left+g.width/2,v=g.top+g.height*.48,y=e-_,b=t-v,x=Math.hypot(y,b),S=Math.max(-1,Math.min(1,y/cf)),C=-Math.max(-1,Math.min(1,b/cf))*sf,w=S*sf,T=0,E=0;if(x>=1){let e=Math.min(x/of,1)*af;T=y/x*e,E=b/x*e}let D=Math.abs(C-r)<.01&&Math.abs(w-i)<.01&&Math.abs(T-a)<.01&&Math.abs(E-o)<.01;if(!m&&D)return;l(),r+=(C-r)*uf,i+=(w-i)*uf,u.style.transform=`perspective(${ff}px) rotateX(${r.toFixed(3)}deg) rotateY(${i.toFixed(3)}deg)`,a+=(T-a)*df,o+=(E-o)*df;let O=i*lf,k=-r*lf,A=a+O,j=o+k;h.current.x=A,h.current.y=j,p.current?.setAttribute(`transform`,`translate(${A.toFixed(3)} ${j.toFixed(3)})`)}return document.addEventListener(`mousemove`,u,{passive:!0}),l(),()=>{document.removeEventListener(`mousemove`,u),s!==0&&cancelAnimationFrame(s),s=0,d.current&&(d.current.style.transform=``),h.current={x:0,y:0},p.current?.removeAttribute(`transform`)}},N=[c,T],t[11]=T,t[12]=c,t[13]=M,t[14]=N):(M=t[13],N=t[14]),(0,Q.useEffect)(M,N);let P;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>{let e=p.current;if(!e)return;let{x:t,y:n}=h.current;e.setAttribute(`transform`,`translate(${t.toFixed(3)} ${n.toFixed(3)})`)},t[15]=P):P=t[15],(0,Q.useLayoutEffect)(P);let F=g>0,I=F?g:1,L=F?`ok-blob-clicked-${g}`:null,R;t[16]===r?R=t[17]:(R=X(`ok-blob-3d-wrapper`,r),t[16]=r,t[17]=R);let z=T?`cursor-default`:`cursor-pointer`,B=`body-${v}`,V=T&&`ok-blob-sleeping`,H;t[18]!==L||t[19]!==V?(H=X(`ok-blob-group`,V,L),t[18]=L,t[19]=V,t[20]=H):H=t[20];let U;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Z.jsx)(`path`,{d:`M25.2339 6.78134C25.5199 7.35734 25.8179 8.47234 26.0179 9.07834C26.0189 9.08234 26.0209 9.08634 26.0219 9.09134C26.0229 9.09534 26.0249 9.10034 26.0259 9.10434C26.0539 9.19734 26.0949 9.29533 26.1519 9.41633C26.2919 9.71133 26.5269 10.1173 27.1299 11.1683C27.3259 11.4643 27.5209 11.7693 27.7119 12.0903C29.9739 15.1623 29.3259 20.1913 27.0469 22.9153C26.7779 23.2953 26.4869 23.6043 26.1889 23.8863C26.1519 23.9253 26.1129 23.9643 26.0729 24.0033C25.3159 24.7543 24.2949 25.4673 23.6129 25.8323C22.7469 26.2983 22.1349 26.5483 21.6299 26.7463C20.3649 27.3063 19.0609 27.7733 17.6569 28.0423C15.9649 28.3513 14.1939 28.4433 12.4569 28.1373C11.4779 27.9663 10.5119 27.6663 9.60891 27.2493C8.77491 26.8663 7.99192 26.3853 7.26992 25.8403C6.83592 25.5393 6.43893 25.2343 6.08093 24.9383C5.57893 24.5223 5.15993 24.1263 4.83493 23.7793C4.04993 22.9443 3.31593 21.8893 2.80893 21.0953C2.72593 20.9663 2.64792 20.8433 2.57592 20.7293C2.56192 20.7093 2.54793 20.6893 2.53393 20.6703C2.08593 20.0263 1.71892 19.3293 1.43792 18.5993C1.42892 18.5453 1.42093 18.4903 1.41293 18.4353C1.32093 17.7443 1.08292 16.9423 1.01092 15.6333C0.984921 15.0653 0.998928 14.4013 1.12393 13.6353C1.20693 13.1413 1.31993 12.9023 1.40893 12.7113C1.43593 12.6543 1.46193 12.6023 1.48593 12.5483C1.56793 12.3653 1.59392 12.1563 1.63592 11.9083C1.68992 11.5883 1.76992 11.1943 2.04592 10.7553C2.94392 9.37934 3.36792 8.81934 3.66592 8.33934C3.75592 8.20334 3.84292 8.08134 3.94192 7.96634C4.21592 7.64634 4.67693 7.29534 5.10293 7.05734C5.16693 7.02234 5.23093 6.98834 5.29193 6.95534C5.62993 6.77834 6.22592 6.30135 6.66992 5.92035C6.83692 5.77635 7.08193 5.60735 7.37393 5.40935C7.67393 5.20535 8.02593 4.96934 8.39193 4.70234C9.32093 4.02634 9.84091 3.69134 10.2599 3.42334C10.3799 3.34734 10.4919 3.27734 10.6049 3.20834C10.9609 2.98834 11.4149 2.73034 11.8869 2.48634C12.4519 2.19334 13.0469 1.92133 13.5089 1.72233C14.7399 1.30233 16.0539 1.01333 17.4169 1.00033C18.1169 0.991333 18.7939 1.16534 19.2389 1.43034C19.6869 1.69534 19.8689 2.00335 19.8039 2.23935C19.7379 2.47835 19.4399 2.63634 19.0109 2.74734C18.5789 2.85634 18.0469 2.92035 17.4889 2.96135C16.3639 3.04235 15.2399 3.36435 14.1499 3.80835C12.8199 4.35135 11.5379 5.07133 10.2719 5.84733C9.38691 6.39133 8.51192 6.97334 7.63592 7.56834C7.54492 7.63034 7.45492 7.69135 7.36492 7.75235C6.97392 8.06635 6.58293 8.38134 6.22293 8.66334C5.97893 8.85734 5.76793 9.04834 5.59393 9.21434C5.26893 9.52334 5.02393 9.74334 4.81893 9.93934C4.67793 10.0753 4.55793 10.2013 4.45593 10.3443C4.40093 10.4213 4.32992 10.5273 4.24792 10.6593C3.90492 11.1933 3.44493 12.1693 3.15393 13.1173C3.01893 13.5363 2.87991 14.0343 2.79391 14.5253C2.66591 15.2253 2.65594 15.9053 2.71994 16.2373C2.82794 16.8193 2.95593 17.4833 3.14093 18.0553C3.31293 18.6003 3.52991 19.0583 3.70791 19.2823C3.81591 19.4183 3.90394 19.5473 3.99594 19.6913C4.09394 19.8413 4.19191 20.0073 4.31091 20.2033C4.47891 20.4803 4.68592 20.8163 5.00192 21.2493C5.36492 21.7463 5.61793 22.1043 5.83493 22.4023C6.14493 22.8243 6.38591 23.1343 6.83691 23.5033C7.33891 23.9113 7.86593 24.3113 8.26693 24.6393C8.44893 24.7883 8.66993 24.9443 8.90493 25.0963C9.21593 25.2963 9.55192 25.4893 9.85592 25.6703C10.1059 25.8203 10.3059 25.9633 10.4869 26.0863C10.5429 26.1243 10.5979 26.1603 10.6519 26.1943C10.8699 26.2803 11.0929 26.3593 11.3159 26.4283C11.3539 26.4323 11.3949 26.4353 11.4369 26.4393C11.6509 26.4573 11.9089 26.4733 12.2209 26.5133C12.7169 26.5753 13.1399 26.6603 13.6019 26.7243C13.9589 26.7733 14.3409 26.8083 14.7729 26.7893C15.0729 26.7753 15.4069 26.7353 15.7389 26.6813C16.2349 26.6023 16.7179 26.4943 17.0569 26.4473C17.1499 26.4343 17.2359 26.4343 17.3209 26.4373C17.3489 26.4393 17.3799 26.4413 17.4109 26.4433C17.4119 26.4433 17.4119 26.4433 17.4129 26.4433C17.4199 26.4433 17.4279 26.4443 17.4349 26.4443C18.2329 26.2413 19.0259 25.9433 19.7959 25.5983C19.8609 25.5633 19.9259 25.5273 19.9899 25.4913C20.3059 25.3173 20.6049 25.1383 20.7869 24.9943C20.9829 24.8393 21.5189 24.5373 22.0579 24.1853C22.4109 23.9553 22.7649 23.7053 23.0369 23.4833C23.1949 23.3553 23.3689 23.2693 23.5479 23.1773C23.7129 23.0923 23.8809 23.0013 24.0349 22.8653C24.1109 22.7983 24.1869 22.7173 24.2639 22.6303C24.3309 22.5563 24.4039 22.4723 24.4759 22.3923C24.5459 22.3153 24.7199 22.1723 24.9139 21.9793C25.0079 21.8863 25.1059 21.7783 25.1909 21.6713C25.2199 21.6323 25.2489 21.5943 25.2769 21.5553C25.5919 21.0403 25.8779 20.5003 26.1019 19.9653C26.1299 19.8403 26.1379 19.7293 26.1279 19.6373C26.1199 19.5703 26.1029 19.5113 26.0839 19.4503C26.0599 19.3643 26.0329 19.2773 26.0239 19.1723C26.0169 19.0893 26.0309 19.0043 26.0629 18.9543C26.0779 18.9323 26.0969 18.9143 26.1129 18.8993C26.1329 18.8823 26.1499 18.8673 26.1569 18.8443C26.1609 18.8273 26.1579 18.8073 26.1529 18.7833C26.1459 18.7443 26.1369 18.6943 26.1539 18.6293C26.2189 18.3853 26.2869 18.1103 26.3319 17.8383C26.3829 17.5393 26.4049 17.2433 26.3949 17.0123C26.3849 16.7493 26.3909 16.3823 26.3469 16.0003C26.3179 15.7343 26.2659 15.4663 26.1979 15.2383C26.1319 15.0143 26.0219 14.7913 25.9039 14.5783C25.7629 14.3223 25.6119 14.0783 25.5169 13.8453C25.4969 13.7983 25.4999 13.7263 25.4999 13.6323C25.5009 13.5673 25.4999 13.4913 25.4919 13.4083C25.3239 13.1243 25.1459 12.8423 24.9589 12.5483C24.9479 12.5413 24.9369 12.5333 24.9249 12.5263C24.6689 12.3503 24.3139 12.1173 24.0769 11.5503C24.0179 11.4063 24.0069 11.2983 23.9969 11.1993C23.9859 11.1013 23.9799 11.0183 23.9289 10.9093C23.8709 10.7853 23.7759 10.6583 23.6709 10.4993C23.5849 10.3703 23.4899 10.2133 23.4199 10.0423C23.3819 9.95134 23.3509 9.85734 23.3329 9.75934C23.3299 9.74334 23.3269 9.72534 23.3229 9.70634C23.2899 9.52734 23.2439 9.26534 23.2409 8.98634C23.0209 8.24434 22.8339 7.48833 22.6519 6.77633C22.3429 5.57133 22.0519 4.54234 21.3329 3.95434C20.9839 3.65334 20.5689 3.35433 20.2459 3.05433C19.9259 2.75633 19.7449 2.47534 19.8019 2.23834C19.8639 2.00634 20.1589 1.82934 20.6659 1.80534C21.1699 1.78334 21.8699 1.93235 22.5209 2.39235C23.6159 3.14235 24.2029 4.38334 24.5599 5.35734C24.5829 5.40834 24.6049 5.46034 24.6259 5.51234C24.7849 5.89434 24.9529 6.22834 25.1199 6.55534C25.1579 6.63034 25.1969 6.70834 25.2339 6.78134Z`,className:`ok-blob-body`}),t[21]=U):U=t[21];let W=(F||T)&&`ok-blob-eye-hidden`,G;t[22]===W?G=t[23]:(G=X(`ok-blob-eye`,W),t[22]=W,t[23]=G);let K;t[24]===G?K=t[25]:(K=(0,Z.jsx)(`ellipse`,{cx:pf,cy:hf,rx:1.2722,ry:1.9083,className:G}),t[24]=G,t[25]=K);let ee=(F||T)&&`ok-blob-eye-hidden`,te;t[26]===ee?te=t[27]:(te=X(`ok-blob-eye ok-blob-eye-right`,ee),t[26]=ee,t[27]=te);let q;t[28]===te?q=t[29]:(q=(0,Z.jsx)(`ellipse`,{cx:mf,cy:hf,rx:1.2722,ry:1.9083,className:te}),t[28]=te,t[29]=q);let ne;t[30]===I?ne=t[31]:(ne=_f(pf,I),t[30]=I,t[31]=ne);let re=(!F||T)&&`ok-blob-eye-hidden`,ie;t[32]===re?ie=t[33]:(ie=X(`ok-blob-happy-eye`,re),t[32]=re,t[33]=ie);let ae;t[34]!==ne||t[35]!==ie?(ae=(0,Z.jsx)(`path`,{d:ne,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ie}),t[34]=ne,t[35]=ie,t[36]=ae):ae=t[36];let oe;t[37]===I?oe=t[38]:(oe=_f(mf,I),t[37]=I,t[38]=oe);let se=(!F||T)&&`ok-blob-eye-hidden`,ce;t[39]===se?ce=t[40]:(ce=X(`ok-blob-happy-eye`,se),t[39]=se,t[40]=ce);let le;t[41]!==oe||t[42]!==ce?(le=(0,Z.jsx)(`path`,{d:oe,strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:ce}),t[41]=oe,t[42]=ce,t[43]=le):le=t[43];let ue;t[44]===T?ue=t[45]:(ue=T?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`path`,{d:vf(pf),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`}),(0,Z.jsx)(`path`,{d:vf(mf),strokeWidth:`1.2`,strokeLinecap:`round`,fill:`none`,className:`ok-blob-sleeping-eye`})]}):null,t[44]=T,t[45]=ue);let de;t[46]!==K||t[47]!==q||t[48]!==ae||t[49]!==le||t[50]!==ue?(de=(0,Z.jsxs)(`g`,{ref:p,children:[K,q,ae,le,ue]}),t[46]=K,t[47]=q,t[48]=ae,t[49]=le,t[50]=ue,t[51]=de):de=t[51];let fe;t[52]!==B||t[53]!==H||t[54]!==de?(fe=(0,Z.jsxs)(`g`,{className:H,children:[U,de]},B),t[52]=B,t[53]=H,t[54]=de,t[55]=fe):fe=t[55];let pe;t[56]===T?pe=t[57]:(pe=T?(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`text`,{x:21,y:7,className:`ok-blob-z ok-blob-z-1`,children:`z`}),(0,Z.jsx)(`text`,{x:26,y:2,className:`ok-blob-z ok-blob-z-2`,children:`z`})]}):null,t[56]=T,t[57]=pe);let me;t[58]!==v||t[59]!==x?(me=x.length>0&&(0,Z.jsx)(`g`,{children:x.map(Cf)},`firework-${v}`),t[58]=v,t[59]=x,t[60]=me):me=t[60];let he;t[61]!==D||t[62]!==s||t[63]!==z||t[64]!==fe||t[65]!==pe||t[66]!==me?(he=(0,Z.jsxs)(`svg`,{ref:f,width:s,height:s,viewBox:`0 0 30 30`,fill:`none`,overflow:`visible`,xmlns:`http://www.w3.org/2000/svg`,className:z,"aria-hidden":`true`,onClick:D,onMouseDown:wf,children:[fe,pe,me]}),t[61]=D,t[62]=s,t[63]=z,t[64]=fe,t[65]=pe,t[66]=me,t[67]=he):he=t[67];let ge;return t[68]!==R||t[69]!==he?(ge=(0,Z.jsx)(`span`,{ref:d,className:R,children:he}),t[68]=R,t[69]=he,t[70]=ge):ge=t[70],ge}function Cf(e){return(0,Z.jsx)(`circle`,{cx:yf+e.originDx,cy:bf+e.originDy,r:e.size,className:`ok-blob-firework`,style:xf(e)},e.id)}function wf(e){return e.preventDefault()}function Tf(e){return e+1}function Ef(e){return e+1}var Df=(0,Q.lazy)(()=>n(()=>import(`./ReportBugDialogBody-BCRLTK8_.js`),__vite__mapDeps([5,1,6,2,3,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29]),import.meta.url)),Of=1200,kf=`[cmdk-root],[data-radix-popper-content-wrapper]`,Af=500;function jf(e){let t=(0,$.c)(8),[n,r]=(0,Q.useState)(e.open),[i,a]=(0,Q.useState)(!1),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(0);e.open&&!n&&r(!0);let l,u;if(t[0]!==e.crashInvite||t[1]!==e.open?(l=()=>{if(!e.open){a(!1);return}let t=c.current+=1,n=window.okDesktop?.bugReport?.captureScreenshot;if(typeof n!=`function`||e.crashInvite!==void 0){s(null),a(!0);return}s(null);let r=!1,i=e=>{r||c.current!==t||(r=!0,s(e),a(!0))},o=setTimeout(()=>i(null),Of),l=performance.now(),u=0,d=()=>{if(c.current!==t)return;let e=performance.now()-l>=Af;if(document.querySelector(kf)!==null&&!e){u=requestAnimationFrame(d);return}u=requestAnimationFrame(()=>{c.current===t&&n().then(i).catch(()=>i(null))})};return u=requestAnimationFrame(d),()=>{c.current+=1,clearTimeout(o),cancelAnimationFrame(u)}},u=[e.open,e.crashInvite],t[0]=e.crashInvite,t[1]=e.open,t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,Q.useEffect)(l,u),!n)return null;let d=e.open&&i,f;return t[4]!==e||t[5]!==o||t[6]!==d?(f=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(Df,{...e,open:d,screenshot:o})}),t[4]=e,t[5]=o,t[6]=d,t[7]=f):f=t[7],f}var Mf=`ContextMenu`,[Nf,Pf]=vn(Mf,[Ur]),Ff=Ur(),[If,Lf]=Nf(Mf),Rf=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Q.useState(!1),c=Ff(t),l=_n(r),u=Q.useCallback(e=>{s(e),l(e)},[l]);return(0,Z.jsx)(If,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Z.jsx)(Br,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};Rf.displayName=Mf;var zf=`ContextMenuTrigger`,Bf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=Lf(zf,n),o=Ff(n),s=Q.useRef({x:0,y:0}),c=Q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Q.useRef(0),u=Q.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Q.useEffect(()=>u,[u]),Q.useEffect(()=>void(r&&u()),[r,u]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ar,{...o,virtualRef:c}),(0,Z.jsx)(mn.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:pn(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:pn(e.onPointerDown,hp(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:pn(e.onPointerMove,hp(u)),onPointerCancel:r?e.onPointerCancel:pn(e.onPointerCancel,hp(u)),onPointerUp:r?e.onPointerUp:pn(e.onPointerUp,hp(u))})]})});Bf.displayName=zf;var Vf=`ContextMenuPortal`,Hf=e=>{let{__scopeContextMenu:t,...n}=e,r=Ff(t);return(0,Z.jsx)(Mr,{...r,...n})};Hf.displayName=Vf;var Uf=`ContextMenuContent`,Wf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Lf(Uf,n),a=Ff(n),o=Q.useRef(!1);return(0,Z.jsx)(Dr,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Wf.displayName=Uf;var Gf=`ContextMenuGroup`,Kf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Yr,{...i,...r,ref:t})});Kf.displayName=Gf;var qf=`ContextMenuLabel`,Jf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(zr,{...i,...r,ref:t})});Jf.displayName=qf;var Yf=`ContextMenuItem`,Xf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Ir,{...i,...r,ref:t})});Xf.displayName=Yf;var Zf=`ContextMenuCheckboxItem`,Qf=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Xr,{...i,...r,ref:t})});Qf.displayName=Zf;var $f=`ContextMenuRadioGroup`,ep=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Pr,{...i,...r,ref:t})});ep.displayName=$f;var tp=`ContextMenuRadioItem`,np=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Fr,{...i,...r,ref:t})});np.displayName=tp;var rp=`ContextMenuItemIndicator`,ip=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Lr,{...i,...r,ref:t})});ip.displayName=rp;var ap=`ContextMenuSeparator`,op=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(ai,{...i,...r,ref:t})});op.displayName=ap;var sp=`ContextMenuArrow`,cp=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Rr,{...i,...r,ref:t})});cp.displayName=sp;var lp=`ContextMenuSub`,up=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=Ff(t),[s,c]=gn({prop:i,defaultProp:a??!1,onChange:r,caller:lp});return(0,Z.jsx)(Or,{...o,open:s,onOpenChange:c,children:n})};up.displayName=lp;var dp=`ContextMenuSubTrigger`,fp=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Nr,{...i,...r,ref:t})});fp.displayName=dp;var pp=`ContextMenuSubContent`,mp=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=Ff(n);return(0,Z.jsx)(Wr,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});mp.displayName=pp;function hp(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var gp=Rf,_p=Bf,vp=Hf,yp=Wf,bp=Kf,xp=Jf,Sp=Xf,Cp=Qf,wp=ip,Tp=op,Ep=up,Dp=fp,Op=mp,kp=`Tabs`,[Ap,jp]=vn(kp,[Tr]),Mp=Tr(),[Np,Pp]=Ap(kp),Fp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Cn(s),[d,f]=gn({prop:r,onChange:i,defaultProp:a??``,caller:kp});return(0,Z.jsx)(Np,{scope:n,baseId:hn(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,Z.jsx)(mn.div,{dir:u,"data-orientation":o,...l,ref:t})})});Fp.displayName=kp;var Ip=`TabsList`,Lp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Pp(Ip,n),o=Mp(n);return(0,Z.jsx)(wr,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,Z.jsx)(mn.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});Lp.displayName=Ip;var Rp=`TabsTrigger`,zp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Pp(Rp,n),s=Mp(n),c=Hp(o.baseId,r),l=Up(o.baseId,r),u=r===o.value;return(0,Z.jsx)(Er,{asChild:!0,...s,focusable:!i,active:u,children:(0,Z.jsx)(mn.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:pn(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:pn(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:pn(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});zp.displayName=Rp;var Bp=`TabsContent`,Vp=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Pp(Bp,n),c=Hp(s.baseId,r),l=Up(s.baseId,r),u=r===s.value,d=Q.useRef(u);return Q.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,Z.jsx)(fn,{present:i||u,children:({present:n})=>(0,Z.jsx)(mn.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});Vp.displayName=Bp;function Hp(e,t){return`${e}-trigger-${t}`}function Up(e,t){return`${e}-content-${t}`}var Wp=Fp,Gp=Lp,Kp=zp,qp=Vp;function Jp(e){let t=(0,$.c)(24),{error:n,resetErrorBoundary:r}=e,{_:i}=jt(),[a,o]=(0,Q.useState)(!1),s=(0,Q.useRef)(null),c=typeof window<`u`?window.okDesktop:void 0,l;t[0]!==i||t[1]!==n?(l=n instanceof Error&&n.message?n.message:i({id:`W5A0Ly`}),t[0]=i,t[1]=n,t[2]=l):l=t[2];let u=l,d,f;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{s.current?.focus()},f=[],t[3]=d,t[4]=f):(d=t[3],f=t[4]),(0,Q.useEffect)(d,f);let p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(Sf,{size:80,variant:`sleeping`}),t[5]=p):p=t[5];let m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`h1`,{id:`app-error-title`,className:`text-2xl font-light tracking-tighter text-balance`,children:(0,Z.jsx)(J,{id:`nwtY4N`})}),t[6]=m):m=t[6];let h;t[7]===u?h=t[8]:(h=(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[m,(0,Z.jsx)(`p`,{className:`max-w-sm text-sm break-words text-muted-foreground`,children:u})]}),t[7]=u,t[8]=h);let g;t[9]===r?g=t[10]:(g=()=>r(),t[9]=r,t[10]=g);let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(J,{id:`KDw4GX`}),t[11]=_):_=t[11];let v;t[12]===g?v=t[13]:(v=(0,Z.jsx)(Y,{ref:s,variant:`default`,onClick:g,children:_}),t[12]=g,t[13]=v);let y;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(y=c?(0,Z.jsx)(Y,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>o(!0),children:(0,Z.jsx)(J,{id:`ii5mVn`})}):null,t[14]=y):y=t[14];let b;t[15]===v?b=t[16]:(b=(0,Z.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[v,y]}),t[15]=v,t[16]=b);let x;t[17]!==n||t[18]!==a?(x=c?(0,Z.jsx)(Zp,{children:(0,Z.jsx)(jf,{open:a,onOpenChange:o,systemWide:c.config.mode===`navigator`,crashContext:{source:`app shell`,errorMessage:n instanceof Error&&n.message?n.message:String(n)}})}):null,t[17]=n,t[18]=a,t[19]=x):x=t[19];let S;return t[20]!==b||t[21]!==x||t[22]!==h?(S=(0,Z.jsxs)(`div`,{role:`alert`,"aria-labelledby":`app-error-title`,"data-slot":`app-error-boundary`,className:`flex h-screen flex-col items-center justify-center gap-8 p-8 text-center`,children:[p,h,b,x]}),t[20]=b,t[21]=x,t[22]=h,t[23]=S):S=t[23],S}function Yp(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(I,{FallbackComponent:Jp,onError:Xp,children:n}),t[0]=n,t[1]=r),r}function Xp(e){console.error(`[AppErrorBoundary] app-shell render crash`,e)}function Zp(e){let t=(0,$.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(I,{fallback:null,onError:Qp,children:n}),t[0]=n,t[1]=r),r}function Qp(e){console.error(`[CrashReportingBoundary] crash-reporting UI render crash`,e)}var $p=dn(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),em=dn(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),tm=dn(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),nm=dn(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),rm=dn(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),im=dn(`book-marked`,[[`path`,{d:`M10 2v8l3-3 3 3V2`,key:`sqw3rj`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),am=e(cn(),1),om=[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]];dn(`bot`,om);var sm=dn(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),cm=dn(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),lm=dn(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),um=dn(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),dm=dn(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),fm=dn(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),pm=dn(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),mm=dn(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),hm=dn(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),gm=dn(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),_m=dn(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),vm=dn(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),ym=dn(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),bm=dn(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),xm=dn(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),Sm=dn(`fold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]),Cm=dn(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),wm=dn(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Tm=dn(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Em=dn(`grid-2x2-x`,[[`path`,{d:`M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3`,key:`11za1p`}],[`path`,{d:`m16 16 5 5`,key:`8tpb07`}],[`path`,{d:`m16 21 5-5`,key:`193jll`}]]),Dm=dn(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Om=dn(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),km=dn(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),Am=dn(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),jm=dn(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),Mm=dn(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),Nm=dn(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),Pm=dn(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),Fm=dn(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),Im=dn(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Lm=dn(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Rm=dn(`megaphone`,[[`path`,{d:`M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z`,key:`q8bfy3`}],[`path`,{d:`M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14`,key:`1853fq`}],[`path`,{d:`M8 6v8`,key:`15ugcq`}]]),zm=dn(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Bm=dn(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Vm=dn(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),Hm=dn(`panel-bottom`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),Um=dn(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),Wm=dn(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Gm=dn(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Km=dn(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),qm=dn(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Jm=dn(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),Ym=dn(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),Xm=dn(`replace-all`,[[`path`,{d:`M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`zg1ipl`}],[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`txt6k4`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Zm=dn(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Qm=dn(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),$m=dn(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),eh=dn(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),th=dn(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),nh=dn(`spell-check`,[[`path`,{d:`m6 16 6-12 6 12`,key:`1b4byz`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`m16 20 2 2 4-4`,key:`13tcca`}]]),rh=dn(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),ih=dn(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),ah=dn(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),oh=dn(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),sh=dn(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),ch=dn(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),lh=dn(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),uh=dn(`table-properties`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),dh=dn(`telescope`,[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]),fh=dn(`text-align-center`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M17 12H7`,key:`16if0g`}],[`path`,{d:`M19 19H5`,key:`vjpgq2`}]]),ph=dn(`text-align-end`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M21 19H7`,key:`4cu937`}]]),mh=dn(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),hh=dn(`text-quote`,[[`path`,{d:`M17 5H3`,key:`1cn7zz`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 19H8`,key:`13qgcb`}],[`path`,{d:`M3 12v7`,key:`1ri8j3`}]]),gh=dn(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),_h=dn(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),vh=dn(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),yh=dn(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),bh=dn(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]),xh=180,Sh=5e3;function Ch(e,t){if(e===``||t===``)return``;let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return`${e.replace(/[/\\]+$/,``)}${n}${t}`}function wh(e){if(e===``)return``;let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function Th(e){let{parent:t,sanitizedName:n,enclosingProject:r,enclosingGit:i,targetState:a}=e;return t===``||n===``?{kind:`idle`}:r===null?i===null?a===`exists-nonempty`?{kind:`block-nonempty`}:{kind:`free`}:{kind:`confirm-git`,gitRoot:i.gitRoot}:{kind:`block-nested`,rootPath:r.rootPath}}function Eh(e){let t=e instanceof Error?e.message:String(e);for(let e of Xo)if(t.startsWith(`${e}:`)||t.includes(`${e}: `))return e===`nested-project`||e===`target-not-empty`?{reason:e}:{reason:e,message:t};return{reason:`unknown`,message:t}}function Dh(e){switch(e.reason){case`nested-project`:return{id:`ScwcF2`};case`target-not-empty`:return{id:`e8L17t`};case`invalid-args`:return{id:`6bTTAN`};case`mkdir-failed`:return{id:`gJR87V`};case`git-init-failed`:return{id:`4CfgPM`};case`init-failed`:return{id:`l17ab4`};case`discovery-failed`:return{id:`ThmUrC`};case`unknown`:return{id:`AddR83`}}}function Oh(e){let t=(0,$.c)(186),{open:n,onOpenChange:r,bridge:i,initialPackId:a,packs:o}=e,{_:s}=jt(),c=(0,Q.useId)(),l=(0,Q.useId)(),u=(0,Q.useId)(),d=(0,Q.useId)(),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(Fh),[b,x]=(0,Q.useState)(`shared`),[S,C]=(0,Q.useState)(!1),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w={kind:`idle`},t[0]=w):w=t[0];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(`idle`),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(null),N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(N={kind:`idle`},t[1]=N):N=t[1];let[P,F]=(0,Q.useState)(N),[I,L]=(0,Q.useState)(0),R;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=new Set,t[2]=R):R=t[2];let z=(0,Q.useRef)(R),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H=(0,Q.useRef)(null),U=(0,Q.useRef)(0),W,G;t[3]!==i||t[4]!==n?(W=()=>{if(!n)return;z.current.clear(),M(null),E({kind:`idle`}),O(`idle`),A(!1),_(``),y(new Set(Vo)),x(`shared`),C(!1),F({kind:`idle`}),U.current+=1;let e=!1;p(``),h(!0),i.fs.defaultProjectsRoot().then(t=>{e||p(t)}).catch(Ph).finally(()=>{e||h(!1)});let t=requestAnimationFrame(()=>{H.current?.focus()});return()=>{e=!0,cancelAnimationFrame(t)}},G=[n,i],t[3]=i,t[4]=n,t[5]=W,t[6]=G):(W=t[5],G=t[6]),(0,Q.useEffect)(W,G);let K;t[7]!==i||t[8]!==f||t[9]!==g||t[10]!==n?(K=()=>{if(!n)return;V.current!==null&&clearTimeout(V.current),B.current!==null&&B.current.abort();let e=Na(g);if(f===``||e===``){E({kind:`idle`}),O(`idle`);return}let t=f,r=Ch(t,e),a=new AbortController;return B.current=a,V.current=setTimeout(()=>{O(`in-flight`),Promise.all([i.fs.findEnclosingProjectRoot(t),i.fs.findEnclosingGitRoot(t),i.fs.folderState(r)]).then(n=>{let[r,i,o]=n;a.signal.aborted||(O(`idle`),E(Th({parent:t,sanitizedName:e,enclosingProject:r,enclosingGit:i,targetState:o})))}).catch(e=>{a.signal.aborted||(console.warn(`[CreateProjectDialog] cascade probe failed:`,e),O(`idle`),E({kind:`free`}))})},xh),()=>{V.current!==null&&clearTimeout(V.current),a.abort()}},t[7]=i,t[8]=f,t[9]=g,t[10]=n,t[11]=K):K=t[11];let ee;t[12]!==i||t[13]!==f||t[14]!==g||t[15]!==n||t[16]!==I?(ee=[n,f,g,i,I],t[12]=i,t[13]=f,t[14]=g,t[15]=n,t[16]=I,t[17]=ee):ee=t[17],(0,Q.useEffect)(K,ee);let te,q;t[18]===n?(te=t[19],q=t[20]):(te=()=>{if(!n)return;let e=()=>L(Nh);return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},q=[n],t[18]=n,t[19]=te,t[20]=q),(0,Q.useEffect)(te,q);let ne=(0,Q.useRef)(`idle`),re,ie;t[21]===D?(re=t[22],ie=t[23]):(re=()=>{ne.current=D},ie=[D],t[21]=D,t[22]=re,t[23]=ie),(0,Q.useEffect)(re,ie);let ae,oe;t[24]!==T.kind||t[25]!==n?(ae=()=>{if(!n||T.kind!==`confirm-git`)return;let e=setInterval(()=>{ne.current!==`in-flight`&&L(Mh)},Sh);return()=>clearInterval(e)},oe=[n,T.kind],t[24]=T.kind,t[25]=n,t[26]=ae,t[27]=oe):(ae=t[26],oe=t[27]),(0,Q.useEffect)(ae,oe);let se;t[28]!==T.gitRoot||t[29]!==T.kind||t[30]!==P.gitRoot||t[31]!==P.kind?(se=()=>{if(T.kind!==`confirm-git`){P.kind!==`idle`&&(U.current+=1,F({kind:`idle`}));return}P.kind===`confirming`&&P.gitRoot!==T.gitRoot&&F({kind:`idle`}),P.kind===`pending`&&P.gitRoot!==T.gitRoot&&(U.current+=1,F({kind:`idle`}))},t[28]=T.gitRoot,t[29]=T.kind,t[30]=P.gitRoot,t[31]=P.kind,t[32]=se):se=t[32];let ce;t[33]!==T||t[34]!==P?(ce=[T,P],t[33]=T,t[34]=P,t[35]=ce):ce=t[35],(0,Q.useEffect)(se,ce);let le;t[36]!==i||t[37]!==T.kind||t[38]!==n?(le=()=>{if(!n)return;let e=null;T.kind===`block-nested`?e=`nested`:T.kind===`block-nonempty`?e=`nonempty`:T.kind===`confirm-git`&&(e=`git-confirm`),e!==null&&(z.current.has(e)||(z.current.add(e),i.project.recordCreateNewBannerShown(e).catch(jh)))},t[36]=i,t[37]=T.kind,t[38]=n,t[39]=le):le=t[39];let ue;t[40]!==i||t[41]!==T||t[42]!==n?(ue=[n,T,i],t[40]=i,t[41]=T,t[42]=n,t[43]=ue):ue=t[43],(0,Q.useEffect)(le,ue);let de;t[44]!==a||t[45]!==o?(de=o?.find(e=>e.id===a),t[44]=a,t[45]=o,t[46]=de):de=t[46];let fe=de,pe=g,me,he,ge,_e,ve;t[47]!==T.kind||t[48]!==f||t[49]!==pe?(_e=pe===``?``:Na(pe),he=pe!==``&&_e!==pe&&_e!==``,ge=pe!==``&&_e===``,me=T.kind===`block-nonempty`,ve=f!==``&&_e!==``?Ch(f,_e):``,t[47]=T.kind,t[48]=f,t[49]=pe,t[50]=me,t[51]=he,t[52]=ge,t[53]=_e,t[54]=ve):(me=t[50],he=t[51],ge=t[52],_e=t[53],ve=t[54]);let ye=ve,be=!k&&f!==``&&pe!==``&&_e!==``&&D===`idle`&&(T.kind===`free`||T.kind===`confirm-git`),xe=k||pe!==``&&!be,Se;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(Se=function(e){y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[55]=Se):Se=t[55];let Ce=Se,we;t[56]!==i||t[57]!==f?(we=async function(){try{let e=await i.dialog.openFolder(f===``?void 0:{defaultPath:f});if(e===null)return;p(e),L(Ah),M(null)}catch(e){console.warn(`[CreateProjectDialog] dialog.openFolder failed:`,e)}},t[56]=i,t[57]=f,t[58]=we):we=t[58];let Te=we,Ee;t[59]!==s||t[60]!==i||t[61]!==k||t[62]!==be||t[63]!==v||t[64]!==a||t[65]!==f||t[66]!==r||t[67]!==pe||t[68]!==_e||t[69]!==b?(Ee=async function(e){if(e.preventDefault(),!k){if(pe.trim()===``){ul.error(s({id:`5OqaJi`})),H.current?.focus();return}if(be){A(!0),M(null);try{await i.project.createNew({parent:f,name:_e,editors:Array.from(v),sharing:b,packId:a}),r(!1)}catch(e){M(Eh(e)),A(!1)}}}},t[59]=s,t[60]=i,t[61]=k,t[62]=be,t[63]=v,t[64]=a,t[65]=f,t[66]=r,t[67]=pe,t[68]=_e,t[69]=b,t[70]=Ee):Ee=t[70];let De=Ee,Oe;t[71]!==k||t[72]!==r?(Oe=function(e){k||r(e)},t[71]=k,t[72]=r,t[73]=Oe):Oe=t[73];let ke=Oe,Ae;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=async function(e){F({kind:`confirming`,gitRoot:e})},t[74]=Ae):Ae=t[74];let je=Ae,Me;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(Me=async function(){F({kind:`idle`})},t[75]=Me):Me=t[75];let Ne=Me,Pe;t[76]===i?Pe=t[77]:(Pe=async function(e){let t=U.current+1;U.current=t,F({kind:`pending`,gitRoot:e});try{if(await i.fs.removeGitFolder(e),U.current!==t)return;L(kh),F({kind:`idle`})}catch(e){let n=e;if(U.current!==t)return;let r=n instanceof Error?n.message:String(n);console.error(`[CreateProjectDialog] bridge.fs.removeGitFolder failed:`,n),F({kind:`error`,message:r})}},t[76]=i,t[77]=Pe);let Fe=Pe,Ie;t[78]!==i||t[79]!==r?(Ie=async function(e){r(!1);try{await i.project.open({path:e,target:`new-window`,entryPoint:`create-new-nested-redirect`})}catch(e){console.warn(`[CreateProjectDialog] project.open failed:`,e)}},t[78]=i,t[79]=r,t[80]=Ie):Ie=t[80];let Le=Ie,Re=ge||me||he?`${u} ${d}`:u,ze;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,Z.jsx)(On,{children:(0,Z.jsx)(J,{id:`wbv9xO`})}),t[81]=ze):ze=t[81];let Be;t[82]===fe?Be=t[83]:(Be=(0,Z.jsxs)(Mn,{children:[ze,(0,Z.jsx)(Dn,{children:fe?(0,Z.jsx)(J,{id:`D2CwBE`,values:{0:fe.name,1:fe.entryCounts.folders},components:{0:(0,Z.jsx)(`strong`,{})}}):(0,Z.jsx)(J,{id:`O6yEPk`})})]}),t[82]=fe,t[83]=Be);let Ve;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,Z.jsx)(J,{id:`OyIC0Q`}),t[84]=Ve):Ve=t[84];let He;t[85]===l?He=t[86]:(He=(0,Z.jsx)(oi,{htmlFor:l,children:Ve}),t[85]=l,t[86]=He);let Ue;t[87]===s?Ue=t[88]:(Ue=s({id:`cV7LOw`}),t[87]=s,t[88]=Ue);let We;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(We=e=>_(e.target.value),t[89]=We):We=t[89];let Ge=ge||me,Ke;t[90]!==k||t[91]!==g||t[92]!==Re||t[93]!==l||t[94]!==Ue||t[95]!==Ge?(Ke=(0,Z.jsx)(gl,{id:l,ref:H,value:g,placeholder:Ue,onChange:We,disabled:k,autoComplete:`off`,"aria-invalid":Ge,"aria-describedby":Re,"data-testid":`create-name`}),t[90]=k,t[91]=g,t[92]=Re,t[93]=l,t[94]=Ue,t[95]=Ge,t[96]=Ke):Ke=t[96];let qe;t[97]!==d||t[98]!==me||t[99]!==he||t[100]!==ge||t[101]!==_e?(qe=ge?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-erased`,children:(0,Z.jsx)(J,{id:`_PBJRl`})}):me?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-taken`,children:(0,Z.jsx)(J,{id:`7apDiJ`,values:{sanitized:_e},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):he?(0,Z.jsx)(`p`,{id:d,role:`status`,"aria-live":`polite`,className:`text-1sm text-muted-foreground`,"data-testid":`create-name-hint-diverged`,children:(0,Z.jsx)(J,{id:`KnoB--`,values:{sanitized:_e},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[97]=d,t[98]=me,t[99]=he,t[100]=ge,t[101]=_e,t[102]=qe):qe=t[102];let Je;t[103]!==He||t[104]!==Ke||t[105]!==qe?(Je=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[He,Ke,qe]}),t[103]=He,t[104]=Ke,t[105]=qe,t[106]=Je):Je=t[106];let Ye;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=(0,Z.jsx)(oi,{children:(0,Z.jsx)(J,{id:`wJijgU`})}),t[107]=Ye):Ye=t[107];let Xe;t[108]!==f||t[109]!==m?(Xe=f===``?m?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(J,{id:`iHAJDj`})}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(J,{id:`8m8diM`})}):f,t[108]=f,t[109]=m,t[110]=Xe):Xe=t[110];let Ze;t[111]===Xe?Ze=t[112]:(Ze=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 rounded-md border border-input bg-muted/50 px-2.5 py-1 text-sm text-foreground wrap-break-word`,"data-testid":`create-location-display`,children:Xe}),t[111]=Xe,t[112]=Ze);let Qe;t[113]===Te?Qe=t[114]:(Qe=()=>void Te(),t[113]=Te,t[114]=Qe);let $e;t[115]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,Z.jsx)(J,{id:`O2UpM1`}),t[115]=$e):$e=t[115];let et;t[116]!==k||t[117]!==Qe?(et=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`shrink-0`,disabled:k,onClick:Qe,"data-testid":`create-browse`,children:$e}),t[116]=k,t[117]=Qe,t[118]=et):et=t[118];let tt;t[119]!==Ze||t[120]!==et?(tt=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Ze,et]}),t[119]=Ze,t[120]=et,t[121]=tt):tt=t[121];let nt;t[122]===ye?nt=t[123]:(nt=ye===``?null:(0,Z.jsx)(J,{id:`k_yIIc`,values:{targetPreview:ye},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}}),t[122]=ye,t[123]=nt);let rt;t[124]!==u||t[125]!==nt?(rt=(0,Z.jsx)(`p`,{id:u,className:`text-1sm text-muted-foreground wrap-break-word`,"aria-live":`polite`,"data-testid":`create-target-caption`,children:nt}),t[124]=u,t[125]=nt,t[126]=rt):rt=t[126];let it;t[127]!==tt||t[128]!==rt?(it=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ye,tt,rt]}),t[127]=tt,t[128]=rt,t[129]=it):it=t[129];let at;t[130]!==T||t[131]!==Fe||t[132]!==Le||t[133]!==P?(at=(0,Z.jsx)(Ih,{cascade:T,onOpenNested:Le,removeGitState:P,onRequestRemoveGit:je,onCancelRemoveGit:Ne,onConfirmRemoveGit:Fe}),t[130]=T,t[131]=Fe,t[132]=Le,t[133]=P,t[134]=at):at=t[134];let ot;t[135]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,Z.jsxs)(Tn,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`create-advanced-trigger`,children:[(0,Z.jsx)(J,{id:`VNgKZz`}),(0,Z.jsx)(Ns,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[135]=ot):ot=t[135];let st;t[136]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,Z.jsx)(`legend`,{className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`0YEbfk`})}),t[136]=st):st=t[136];let ct;t[137]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`8IP5jY`})}),t[137]=ct):ct=t[137];let lt;t[138]!==k||t[139]!==v?(lt=Vo.map(e=>{let t=`create-editor-${e}`;return(0,Z.jsxs)(oi,{htmlFor:t,className:`text-sm font-normal`,children:[(0,Z.jsx)(pr,{id:t,checked:v.has(e),onCheckedChange:()=>Ce(e),disabled:k,"data-testid":`create-editor-${e}`}),(0,Z.jsx)(`span`,{children:Za[e]})]},e)}),t[138]=k,t[139]=v,t[140]=lt):lt=t[140];let ut;t[141]===lt?ut=t[142]:(ut=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col space-y-2 pb-2`,children:[st,ct,lt]}),t[141]=lt,t[142]=ut);let dt;t[143]!==k||t[144]!==b?(dt=(0,Z.jsx)(fl,{idPrefix:`create`,testIdPrefix:`create-sharing`,value:b,onValueChange:x,disabled:k}),t[143]=k,t[144]=b,t[145]=dt):dt=t[145];let ft;t[146]!==ut||t[147]!==dt?(ft=(0,Z.jsxs)(wn,{className:`space-y-6 border-t border-border px-3 py-4`,children:[ut,dt]}),t[146]=ut,t[147]=dt,t[148]=ft):ft=t[148];let pt;t[149]!==S||t[150]!==ft?(pt=(0,Z.jsxs)(En,{open:S,onOpenChange:C,className:`rounded-md border border-border`,"data-testid":`create-advanced`,children:[ot,ft]}),t[149]=S,t[150]=ft,t[151]=pt):pt=t[151];let mt;t[152]!==s||t[153]!==j?(mt=j===null?null:(0,Z.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-submit-error`,children:s(Dh(j))}),t[152]=s,t[153]=j,t[154]=mt):mt=t[154];let ht;t[155]!==c||t[156]!==De||t[157]!==Je||t[158]!==it||t[159]!==at||t[160]!==pt||t[161]!==mt?(ht=(0,Z.jsx)(An,{className:`space-y-6`,children:(0,Z.jsxs)(`form`,{id:c,onSubmit:De,"data-testid":`create-project-form`,className:`space-y-6`,children:[Je,it,at,pt,mt]})}),t[155]=c,t[156]=De,t[157]=Je,t[158]=it,t[159]=at,t[160]=pt,t[161]=mt,t[162]=ht):ht=t[162];let gt;t[163]===r?gt=t[164]:(gt=()=>r(!1),t[163]=r,t[164]=gt);let _t;t[165]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,Z.jsx)(J,{id:`dEgA5A`}),t[165]=_t):_t=t[165];let vt;t[166]!==k||t[167]!==gt?(vt=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:gt,disabled:k,"data-testid":`create-cancel`,children:_t}),t[166]=k,t[167]=gt,t[168]=vt):vt=t[168];let yt;t[169]===k?yt=t[170]:(yt=k?(0,Z.jsx)(J,{id:`E9bKSA`}):(0,Z.jsx)(J,{id:`hYgDIe`}),t[169]=k,t[170]=yt);let bt;t[171]!==c||t[172]!==xe||t[173]!==yt?(bt=(0,Z.jsx)(Y,{type:`submit`,form:c,disabled:xe,"data-testid":`create-submit`,children:yt}),t[171]=c,t[172]=xe,t[173]=yt,t[174]=bt):bt=t[174];let xt;t[175]!==vt||t[176]!==bt?(xt=(0,Z.jsxs)(jn,{children:[vt,bt]}),t[175]=vt,t[176]=bt,t[177]=xt):xt=t[177];let St;t[178]!==Be||t[179]!==ht||t[180]!==xt?(St=(0,Z.jsxs)(kn,{className:`sm:max-w-lg`,"data-testid":`create-project-dialog`,children:[Be,ht,xt]}),t[178]=Be,t[179]=ht,t[180]=xt,t[181]=St):St=t[181];let Ct;return t[182]!==ke||t[183]!==n||t[184]!==St?(Ct=(0,Z.jsx)(Nn,{open:n,onOpenChange:ke,children:St}),t[182]=ke,t[183]=n,t[184]=St,t[185]=Ct):Ct=t[185],Ct}function kh(e){return e+1}function Ah(e){return e+1}function jh(){}function Mh(e){return e+1}function Nh(e){return e+1}function Ph(e){console.warn(`[CreateProjectDialog] defaultProjectsRoot probe failed:`,e)}function Fh(){return new Set(Vo)}function Ih(e){let t=(0,$.c)(37),{cascade:n,onOpenNested:r,removeGitState:i,onRequestRemoveGit:a,onCancelRemoveGit:o,onConfirmRemoveGit:s}=e;if(n.kind===`idle`||n.kind===`free`||n.kind===`block-nonempty`)return null;if(n.kind===`block-nested`){let{rootPath:e}=n,i;t[0]===e?i=t[1]:(i=wh(e),t[0]=e,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o={rootPath:e},t[2]=e,t[3]=o);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})},t[4]=s):s=t[4];let c;t[5]===o?c=t[6]:(c=(0,Z.jsx)(`p`,{className:`mb-2`,children:(0,Z.jsx)(J,{id:`W7XJN4`,values:o,components:s})}),t[5]=o,t[6]=c);let l;t[7]!==r||t[8]!==e?(l=()=>r(e),t[7]=r,t[8]=e,t[9]=l):l=t[9];let u;t[10]===a?u=t[11]:(u=(0,Z.jsx)(J,{id:`1Ta7Fd`,values:{basename:a}}),t[10]=a,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:l,"data-testid":`create-banner-nested-open`,children:u}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let f;return t[15]!==c||t[16]!==d?(f=(0,Z.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-banner-nested`,children:[c,d]}),t[15]=c,t[16]=d,t[17]=f):f=t[17],f}if(n.kind===`confirm-git`){let{gitRoot:e}=n,r;if(t[18]!==e){let n;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=/\/+$/,t[20]=n):n=t[20],r=e.replace(n,``),t[18]=e,t[19]=r}else r=t[19];let c=`${r}/.git`,l=i.kind===`error`?i.message:null,u;t[21]===e?u=t[22]:(u={gitRoot:e},t[21]=e,t[22]=u);let d;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(d={0:(0,Z.jsx)(`code`,{}),1:(0,Z.jsx)(`code`,{})},t[23]=d):d=t[23];let f;t[24]===u?f=t[25]:(f=(0,Z.jsx)(`p`,{children:(0,Z.jsx)(J,{id:`FEK4oC`,values:u,components:d})}),t[24]=u,t[25]=f);let p;t[26]!==e||t[27]!==o||t[28]!==s||t[29]!==a||t[30]!==l||t[31]!==i.kind||t[32]!==c?(p=i.kind===`idle`||i.kind===`error`?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e),"data-testid":`create-banner-git-remove`,children:(0,Z.jsx)(J,{id:`YTLmTM`,components:{0:(0,Z.jsx)(`code`,{})}})}),i.kind===`error`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`create-banner-git-remove-error`,children:(0,Z.jsx)(J,{id:`SkMZlS`,values:{targetGitPath:c,removeGitError:l},components:{0:(0,Z.jsx)(`code`,{})}})}):null]}):(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 rounded border border-blue-400/60 bg-white/40 p-2 dark:border-blue-600/60 dark:bg-black/20`,"data-testid":`create-banner-git-remove-confirm`,children:[(0,Z.jsx)(`p`,{className:`text-xs`,children:(0,Z.jsx)(J,{id:`WZ-vBy`,values:{targetGitPath:c},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsx)(Y,{type:`button`,variant:`destructive`,size:`sm`,disabled:i.kind===`pending`,onClick:()=>s(e),"data-testid":`create-banner-git-remove-confirm-button`,children:i.kind===`pending`?(0,Z.jsx)(J,{id:`0-31GV`}):(0,Z.jsx)(J,{id:`v-h2hx`,values:{targetGitPath:c}})}),(0,Z.jsx)(Y,{type:`button`,variant:`outline`,size:`sm`,disabled:i.kind===`pending`,onClick:o,"data-testid":`create-banner-git-remove-cancel`,children:(0,Z.jsx)(J,{id:`dEgA5A`})})]})]}),t[26]=e,t[27]=o,t[28]=s,t[29]=a,t[30]=l,t[31]=i.kind,t[32]=c,t[33]=p):p=t[33];let m;return t[34]!==f||t[35]!==p?(m=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-900 dark:border-blue-700 dark:bg-blue-950 dark:text-blue-200`,"data-testid":`create-banner-git-confirm`,children:[f,p]}),t[34]=f,t[35]=p,t[36]=m):m=t[36],m}return null}var Lh=`open-knowledge:doc-panel-tab`,Rh=null;function zh(){let e=Rh;return Rh=null,e}function Bh(e,t=typeof window>`u`?new EventTarget:window){Rh=e,t.dispatchEvent(new CustomEvent(Lh,{detail:{tab:e}}))}function Vh(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(Lh,n),()=>t.removeEventListener(Lh,n)}function Hh(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`GitHub`}),r=(0,Z.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}var Uh={messages:JSON.parse(`{"--T3kB":["Loading preview"],"-3Qbv7":[["count","plural",{"one":["matches ","#"," file"],"other":["matches ","#"," files"]}]],"-3ois8":["Hard break"],"-5jISU":[["0","plural",{"one":["#"," template"],"other":["#"," templates"]}]],"-8PP0T":["Match case"],"-K0AvT":["Disconnect"],"-LHLx7":["edited template"],"-QCLWk":["Templates available"],"-Qw-1t":["GitHub authentication failed. Try signing in again."],"-WFFG2":["Default properties"],"-YV1Uo":["Pattern ",["patternNumber"]],"-bFGPF":["Next change"],"-dNlfM":["Undid the last edit on ",["docName"]],"-g6KIS":["Unrecognized link"],"-gdcIo":["Auto-sync is on — your commits push and remote changes pull on intervals."],"-kbIAr":["Links & images"],"-lCAuQ":["Loading graph"],"-o5XAG":["Sent privately to the OpenKnowledge team, along with your note and app version. Never posted publicly."],"-q4abP":["Results capped — this workspace has more files than search can index. A missing file may be a cap artifact, not a typo."],"-r_Kx7":["Create skill"],"-slrNR":["Toggle a task list."],"-uaQnI":["No matching worktrees or branches."],"-wePNM":["Search matches file names, paths, and folders. Open a file to search its body (⌘F)."],"-zA2E7":["Couldn't create the worktree. Try a different name."],"-zy2Nq":["Type"],"0-31GV":["Removing"],"00c7t0":["Ask AI about this code block"],"02P3hL":["Upload failed: ",["message"]],"03wKPg":["A report helps us find the cause. Nothing is sent until you review it."],"04RA0-":["Failed to enable sync — ",["detail"]],"04XyCH":["Adds a managed block to ",["0"]],"05n5wS":["Doc mention suggestions"],"06SZfb":["Template \\"",["trimmedTitle"],"\\" created"],"07eGJB":["Couldn't move skill: ",["0"]],"07gHun":["You don't have access to this private repo. Sign in with an account that does."],"07q4Qk":["File sidebar"],"09Tv5j":["Reconnecting…"],"0BB9ID":["No headings yet."],"0BfhAj":["Reset view"],"0E9DR6":["Type to find a doc"],"0Er6-M":["Restarting"],"0Gd0NU":["Shared"],"0LBDjY":["\\"",["0"],"\\" uninstalled — back to a draft"],"0NA4b3":["Keep my version"],"0NkNB5":[["0"],"mo ago"],"0SBTff":["Show terminal"],"0TnCvC":["Rename ",["0"]],"0YEbfk":["Connect to AI tools"],"0YUS3Q":["Subfolder under current folder"],"0_J12R":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in ",["targetLabel"]],"0eHrMb":["Could not complete delete"],"0g7rCZ":["Duplicated to \\"",["0"],"\\""],"0inVGS":["Helps your coding agent recognize OpenKnowledge projects and route reads and writes through it."],"0jD-Gn":["A team knowledge base, a personal wiki, project docs..."],"0kTAXe":["Open source: ",["mirrorSrc"]],"0qyKG6":["Synced from disk"],"0rwwOn":["By tag"],"0s8-e8":["Select, enter, or leave block components and fallback source blocks from keyboard boundaries."],"0t0bbC":["Could not save sync preference: ",["detail"]],"0uTHCg":["Start a new OpenKnowledge project."],"0wswKc":["Horizontal rule that divides sections."],"0xnmlQ":["Repository name"],"0yL--g":["Review conflicts"],"10g8I_":["Turn off Only markdown files"],"12F9WL":["(no id)"],"151wvk":["Show sidebar"],"16D5Zj":["Are you sure you want to delete ",["itemName"],"? This action cannot be undone."],"170Js2":["Hide panel"],"1AumWo":["Push failed — check the server logs for details."],"1CalO6":["Style"],"1EcCom":[["keyName"]," value"],"1FLarN":["Describe what you want to create to continue"],"1GhYxC":["of ",["totalPages"]],"1HBhDS":["Checking out files"],"1MGRQl":["Terminal sessions"],"1OKzC_":["Your report couldn't be sent. Try again or email it instead."],"1QfxQT":["Dismiss"],"1RluQD":["Show replace"],"1TNIig":["Open"],"1Ta7Fd":["Open ",["basename"]],"1XSMhZ":["Switching to <0>local-only</0> will refuse until they're untracked via<1> git rm --cached</1>."],"1YJ4Yg":["Update available",["0"]],"1ZpfyB":["Open with AI ",["displayName"],", ",["hint"]],"1bDVu5":["Workspace Command Palette"],"1d1F11":["Select all files and folders"],"1di5fu":["Document not found"],"1hvhf0":["The folder on disk and the id agents use to invoke this skill."],"1njn7W":["Light"],"1nke1r":["Open ",["0"]," on GitHub (opens in a new tab)"],"1t_NnN":["Reject"],"2-CeZn":["Your report is saved on this Mac, so nothing was lost. You can email it to us instead."],"2277Tu":["Collapse graph"],"237hSL":["Ended"],"25Pw6a":["Cloning"],"27XW26":["Clone happens in the Project Navigator. Reclick the share link there."],"28B21t":["Agent Skills"],"29VNqC":["Unknown error"],"29XZXN":["Set git identity"],"2AIVbm":["Review your report"],"2B6eYX":["What this checkbox changes"],"2BBAbc":["List"],"2FYpfJ":["More"],"2FnYUD":["App & system info, recent app logs, and project server logs: the essentials we need to reproduce the issue."],"2G-56b":["Failed to update markdownlint rules"],"2GT3Hf":["Global"],"2H43L8":["Secrets like API keys and tokens are redacted automatically."],"2IYGkU":["This doc has unpushed changes. Recipients will see the last pushed version."],"2QM24L":["All tags"],"2RBzMG":["Network error — check your connection and try again"],"2Snes1":["This sends the link's address off your machine"],"2XQ8Ww":["Open preview when agent edits"],"2YOwme":["Restarted — now running v",["appRuntime"],"."],"2YZwPB":["Forward-links response did not match expected shape."],"2bVHbB":["Available in every project on this computer."],"2hYmUH":["my@email.com"],"2hpdRq":["Hide panel (",["panelShortcutLabel"],")"],"2j1kfc":["Enter a valid URL (for example https://api.openai.com/v1)."],"2m_bmh":[["label"]," (",["0"],")"],"2myNzt":["We've filed it with the team and attached your logs."],"2n3oDU":["Project-level pages ordered by inbound link count, up to ",["FULLSCREEN_HUB_LIMIT"]," results."],"2q_Q7x":["Visibility"],"2ryd91":["Failed to rename property"],"2tgFCe":["Starting clone"],"2vIPtm":["Open link in new tab"],"2wxgft":["Rename"],"322lyb":["Highlight tips, warnings, and notes."],"34qyH5":["Could not reach server"],"36WXSC":["Couldn't delete template: ",["error"]],"36aWJD":["Join us on Discord"],"38foVZ":["Loading diff"],"3BnyYc":["This doc isn't on GitHub yet. The link won't work until it's pushed."],"3DJEEt":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"3DTatP":["Copy a prompt for your agent, start a blank file, or scaffold from a template."],"3FMvls":["A short line shown under the title in the template list."],"3Fcb0I":["Open graph"],"3HNlwb":["Hello, world!"],"3Ib6FN":["Move down"],"3Ijjy1":["Couldn't load this skill's files."],"3IseAk":["Install an AI agent to create with AI"],"3J7d2N":["Big section heading."],"3JYy1p":["Branch ",["0"]," no longer exists. Cloned to default branch."],"3MnvrL":["Showing top ",["0"]," matches — keep typing to narrow"],"3Mwaly":["Could not initialize ",["0"],"."],"3SDfZl":["<0>Mirror — pick a source.</0> Set <1>src</1> + <2>anchor</2> via the property panel to point at a <3><MirrorSource></3> elsewhere."],"3TCafD":["Stored on this machine."],"3VbwPp":["Open ",["keyName"]," in browser"],"3VsNTI":["Loading document"],"3YWddZ":["No content changes in this version"],"3YvS-c":["New tab"],"3_6U6f":["Connect to GitHub"],"3__SjS":["breadcrumb"],"3a_Bd7":["Open source doc: ",["mirrorSrc"]],"3aeN7X":["All files"],"3cOo2C":["Create a folder from the current document or folder context."],"3ePd3I":["What's new"],"3h5zMp":["Something went wrong loading the settings panel."],"3iyGWF":["Open recent project"],"3jod3l":["Connect GitHub"],"3l_cXP":["Take a look if you'd like. This exact file is what we receive."],"3m2GBo":["Searching docs"],"3mFsc3":["Restore with remote changes"],"3o3tur":["Starter content"],"3oh0nQ":["Nested .okignore error in ",["path"]],"3pU8e-":["Pin tab"],"3wiBAs":["Where should it live?"],"3y6XTb":["Semantic search"],"3zyg_A":["Ignore patterns"],"438Fca":["Cloned successfully, but could not open the project."],"44DSl0":["Already have a git repository? Add it with <0>git remote add origin <url></0> in this project's folder. This page updates automatically once a remote is detected."],"45MZFs":["Commands"],"47EXvY":["This replaces the current skill content with the bundled version ",["0"]," (you have ",["1"],"). Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"484LKL":["Remove link"],"48uGTI":["Failed to load docs. Press Escape and re-open to retry."],"4A3Yzu":["Code block"],"4BITzH":["Error:"],"4CfgPM":["Project folder created, but git init failed. Try again."],"4E9jPa":["Create your first project"],"4Gz2wC":["Failed to upload file"],"4KmEoC":["Hotkeys"],"4NC2Ym":["Move to the next or previous table cell."],"4PYsOz":["Hide Files (",["sidebarShortcutLabel"],")"],"4Sxexw":["Source undo or redo"],"4TzU0n":["Initialize"],"4XL6N4":["Detected from the editors this project is set up for. Adjust to control where every skill installs."],"4buZWd":["Inherited from ",["path"]],"4c_a6S":["Nothing set yet."],"4g19V6":["Failed to update property"],"4h3e0H":["Couldn't update skills sharing — ",["detail"],"."],"4hJhzz":["Table"],"4ieVh2":["Pick “Custom” above to use this palette."],"4jDd0j":["Anyone can see"],"4mLBx9":["Subscriptions aren't available right now."],"4niEzY":["Sandboxed HTML embed — write HTML, see the rendered preview live."],"4nj6n8":["/api/config returned HTTP ",["code"]],"4rjwLG":["Create with ",["0"]," CLI"],"4sKwf6":["File already exists"],"4uNLmk":["Pulling"],"4v2Yyz":["Select every visible file-tree row when focus is in the Files sidebar."],"4xtLTl":["Hidden folder “",["basename"],"”"],"4zEZS5":["Auto-sync is on for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"4zGlN_":["Paste image URL or click upload"],"4z_1j2":["Rendered"],"5-FeN2":["Share URL"],"5-o4kO":["Only markdown files"],"50ORFs":["Reset ",["0"]," to default"],"54Y6Fg":["Could not load templates. Try again later."],"56WWtu":["Couldn't load starter packs: ",["error"]],"56xUL1":["Property name"],"57fiu8":["(read-only — edit in source mode for now)"],"5ALjdr":["Move through visual-editor find results from the find field."],"5Ajb15":["The formula <0>c = √(a² + b²)</0> renders inline."],"5AzM72":["This setting is per-machine and isn't shared with collaborators."],"5ClEAu":["Inline hashtag for cross-doc grouping."],"5D3Ior":["Hide folder"],"5F5HYj":[["ahead"]," ahead, ",["behind"]," behind"],"5GKMSz":["Indent or outdent the current list item."],"5GRxoA":["Search files, folders, and commands for the current workspace."],"5LXwX8":["This permanently removes ",["path"],". Agents that reference this template by name will fail until it's recreated or replaced by one in a parent folder."],"5OTgC7":["Open and focus the bottom Ask AI prompt composer."],"5OqaJi":["Enter a project name"],"5PHgV2":["You can also create one from a terminal with <0>ok bug-report</0>."],"5QGTaA":["Could not copy relative path"],"5SwVv1":["Not installed"],"5Tk8Fb":["Loading files"],"5Umg9i":["Disable external link previews"],"5WDhAk":["Link to a page or external URL."],"5ZB7XC":["File drop zone"],"5ZbJFS":["Your current version is saved first, so this is reversible."],"5_8TCr":["Fix all (",["count"],")"],"5_j-DA":["Kill Terminal"],"5e1Dri":["The menu label agents pick this template by (required)."],"5gr_ev":["Becomes the document's content when someone creates a doc from this template. Type <0>",["dateToken"],"</0> or <1>",["userToken"],"</1> to fill in today's date or the author's name automatically."],"5kWklo":["(some may already be hidden by other rules)"],"5lWFkC":["Sign in"],"5mksg0":["Failed to disable semantic search — ",["detail"]],"5qNxOe":[["count","plural",{"one":["#"," item could not be moved to the Trash. Do you want to permanently delete instead?"],"other":["#"," items could not be moved to the Trash. Do you want to permanently delete instead?"]}]],"5wV2qQ":["and more"],"5y_9lO":["Waiting for authorization"],"6-wLTJ":[["behind"]," behind origin"],"60vpJN":["What were you doing?"],"62Pc08":["Install for Claude Chat & Cowork (Desktop App)"],"62bOuM":["Latest edit"],"636K3K":["Delete adjacent chip"],"67f-3g":["Duplicate succeeded but the sidebar may be out of date — refresh to resync"],"6Aih4U":["Offline"],"6EKG_c":["What agents match on to decide when to use the skill."],"6HCOwA":["Failed to open."],"6KCH4m":["Hidden files"],"6LbUG7":["The repository is private and your GitHub account doesn't have access to it."],"6MnZEC":["Terminal failed to load"],"6O626z":["No headings match \\"",["trimmedAnchorQuery"],"\\""],"6Pxqwv":["No project templates yet. Create one to make it available everywhere in this project. Folder-scoped templates live on each folder's overview page."],"6Uau97":["Skip"],"6V3Ea3":["Copied"],"6VqW-1":["Remove ",["keyName"]],"6WdDG7":["Page"],"6YtxFj":["Name"],"6ZhdPI":["What the agent may read, write, and surface."],"6_ZOw4":["Copied full path"],"6bTTAN":["Invalid input — pick a different folder."],"6cR-PU":["Already open"],"6caB2T":["Connect an existing repository"],"6cuT_1":["Open date picker for ",["keyName"]],"6cyguR":["Connect GitHub to continue."],"6eniID":["Map the architecture"],"6fGjTz":["Show fewer"],"6g2jsp":["Update skill"],"6gRgw8":["Retry"],"6h4zVU":["What would you like to create?"],"6hfDJr":["Server error: ",["status"]],"6iDEWA":["Show panel"],"6ibbCg":["Create your first file"],"6ki7F2":[["0","plural",{"one":["#"," item"],"other":["#"," items"]}]],"6lGV3K":["Show less"],"6m_7We":["Open this settings dialog."],"6q0rnH":["writing"],"6qMe0o":["Draft a technical spec for my project. Start with an overview, then add cross-linked pages for the architecture, the key modules, and the open questions, all linked from a specs index."],"6s7LXO":["Heads up"],"6u9LvN":[["days","plural",{"one":["#"," day ago"],"other":["#"," days ago"]}]],"6vEr3W":["Link target"],"6zzhQL":["Send your report by email"],"72xhRD":["Diagram view mode"],"74-bX-":["A pull quote stands out from the surrounding text."],"74eHt-":["No file or folder selected"],"75Y1dk":["Horizontal pill strip + active panel below; click a pill to switch panels."],"77SdEP":["Delete ",["itemName"]],"7FamGZ":["Go to line"],"7Fkcej":["+ Add ",["addChildName"]],"7H4UHD":["Documents tagged <0>#",["tagName"],"</0>"],"7JtSLi":["Failed to delete path"],"7OhaRy":["Source search"],"7Ongq0":["Condense my AGENTS.md file to less than 40k characters"],"7OwvEL":["Show HTML preview"],"7PNNNs":["This sends content off your machine"],"7PXYaF":["<0>ok</0> won't run in external terminals until you add it later from the File menu. OpenKnowledge's built-in terminal and AI tools keep working."],"7PzzBU":["User"],"7YRrJ9":["Available in the OpenKnowledge desktop app. From a terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."],"7_bFEL":["Drag ",["patternText"]," to reorder"],"7apDiJ":["A folder named <0>",["sanitized"],"</0> already has files here. Pick a different name."],"7d1a0d":["Public"],"7hctf2":["Describe the project you want to create"],"7jIIFX":["You're all set up!"],"7qRHf0":["Install for Claude Chat & Cowork"],"7uBlRT":["Copy the focused file-tree item so Paste can duplicate it."],"80c4-P":["Code copied to clipboard"],"81H_23":["Add properties"],"881Uwh":["Delete selected table"],"89TtiD":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in the project root"],"89y7ar":[["sizeText"]," · secrets redacted"],"8F1i42":["Page not found"],"8FqTCr":[["chunksRemaining","plural",{"one":["#"," unresolved hunk"],"other":["#"," unresolved hunks"]}]],"8Gzz2G":["worktree of ",["worktreeOf"]],"8IP5jY":["Each selected tool gets an OpenKnowledge MCP entry."],"8Jm2EP":["Toggle heading levels 1 through 6."],"8OGgNM":["Open or close visual-editor find."],"8OxKZy":["Move succeeded but the sidebar may be out of date — refresh to resync"],"8PifYj":["Mermaid diagram"],"8PmoQF":["Open the insert menu in an empty or active text position."],"8RtNI0":["Failed to load documents"],"8TvlHF":["Crash dump"],"8Vq20-":["Switch worktree"],"8XQRON":["Loading repositories"],"8_brI5":["Name is required"],"8cS0nH":["Config sharing unavailable: ",["0"],"."],"8cpOa8":["Couldn't disconnect — please try again."],"8cpeU3":["Shared repositories"],"8eW0WQ":["No matching repositories."],"8fRyLo":["Invalid patch payload"],"8fc_3j":["Protected branch — cannot push"],"8lwQlE":[["0"]," added, ",["1"]," removed"],"8m8diM":["No location selected. Use Browse to choose a folder."],"8nWu1k":["Empty diagram"],"8tjQCz":["Explore"],"8uAWix":["This template lives in a parent folder — deleting it affects every folder beneath it that doesn't define its own version."],"8vETh9":["Show"],"92rbk2":["Mirror loading <0>",["mirrorRef"],"</0>"],"96G6Re":["New folder"],"96w9hU":["Something went wrong opening this file (HTTP ",["status"],")."],"99eR72":["Visual editor table selection"],"9Bd18D":["Failed to load hub pages"],"9KooKn":["Run a project audit from the Problems panel."],"9NJWgv":["Backlinks"],"9OIqw4":["You don't have write access to this repo."],"9PQysm":["Hide advanced"],"9R7pRC":["No tags match \\"",["trimmed"],"\\". Continue typing to create one."],"9UQ730":["Clone"],"9V0W-R":["Adds the OpenKnowledge skill to the <0>Claude Desktop App</0> so it's available in Chat and Cowork sessions."],"9XIEYq":["Attach the file in an email to <0/>"],"9bCiQ8":["No pages are missing incoming graph links."],"9clcD5":["Open documents tagged #",["chip"]],"9dw5bW":["Create with ",["0"]],"9euN0m":[["count","plural",{"one":["#"," more cross-doc participant"],"other":["#"," more cross-doc participants"]}]],"9fhQRL":["Beta channel"],"9fvog2":["Preview unavailable: ",["errorDetail"]],"9i21pa":["Commits happen automatically"],"9jnjV0":["Embed an audio file with native player controls."],"9mEZeD":[["name"]," CLI"],"9npOH9":["Open file"],"9o1bIV":[["behind"]," behind"],"9oE4C3":["Browse your repos:"],"9sBe85":["Follow us on"],"9tJX8r":["By meaning"],"9uI_rE":["Undo"],"9xCnv8":["Hide Terminal"],"9zb2WA":["Connecting"],"A1taO8":["Search"],"A50vr3":["Use lowercase letters, digits, and <0>-</0> only."],"A5CYnd":["Broken link"],"A5hiCy":["Create template"],"A67Uwj":["Still loading"],"A6h5b-":["File duplicated"],"AAlr5Y":["No collab server for this worktree — run <0>ok start</0> here, or reopen the project."],"AB4qw9":["New terminal"],"AE7BY3":["The terminal session ended."],"AIn2Yv":[["displayName"]," CLI, ",["hint"]],"AItsE5":["Open it there"],"AKxFtn":[["openedWorktreeCount","plural",{"one":["worktree"],"other":["worktrees"]}]],"ALhMYW":["Terminal"],"AQ-Lfg":["Couldn't load templates"],"AQGtjK":["Commands run with the full access of your macOS user account on this machine. Turn this off to disable the shell."],"ATGYL1":["Email address"],"AVW-K9":["Failed to load orphan pages"],"AWOSPo":["Zoom in"],"AaaESH":["Auto-sync is off for this worktree, inherited from ",["project"],". Change it in Settings → Sync."],"AcK_r0":["Claude CLI"],"AczYxH":["Custom open-knowledge entry — not managed by OpenKnowledge"],"AdcGcG":["Applying your change"],"AddR83":["Could not create project. Try again or pick a different location."],"AeHuzT":["# One pattern per line.\\n# Examples:\\n# drafts/\\n# *.draft.md\\n# !keep.md"],"AeXO77":["Account"],"AhoGwP":["Set up OpenKnowledge integrations"],"AiNMQ7":["This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."],"Aif3E7":["Enable semantic search"],"Am78jY":["Drag ",["keyName"]," to reorder"],"ApeA0n":["Undid ",["dropCount"]," edits on ",["docName"]],"Aq-O0x":["status"],"AqnqMJ":["API key set"],"AsqRE_":["Default location for new attachments"],"AtBdnD":["Couldn't delete skill: ",["error"]],"B11p-O":["Edit markdown link"],"B2DrPb":["Auto-save"],"B2Srgd":[["packName"]," skill installed."],"B3NAZC":["Open Navigator"],"B4_ipX":[["conflictCount","plural",{"one":["#"," file conflicted"],"other":["#"," files conflicted"]}]],"BAH4qX":["Selected graph item"],"BBqGS9":["Desktop"],"BD0XSC":["Failed to load project templates"],"BEkF-P":[["userName"],", ",["tabCount","plural",{"one":["#"," concurrent tab"],"other":["#"," concurrent tabs"]}]],"BGHHtQ":["Single page"],"BH56dn":["Custom display text"],"BQKHuL":["Restart terminal"],"BQu9Pg":["Symlink"],"BUyQnq":["Couldn't restart the server. Try \`ok start\` in this folder."],"BY-g4_":["Add pattern"],"Bdha5y":["Publishing..."],"BeWTQy":["Loading starter packs"],"BgV29F":["Visual editor find input focused"],"Bh9671":["This project is local-only, so .ok/skills is hidden from git and these skills can't be committed or shared. Share just the skills folder — the rest of your OK config stays on this computer."],"Bn9-El":["default"],"Bv5a9_":["Selection statistics"],"Bx4EXG":["Actions for ",["label"]],"By-7Pn":["Toggle a bullet list."],"BymzO4":["Document outline"],"C0hoX6":["Always included"],"C37Zkt":["Send to"],"C62P6b":["Editor selection"],"C7XjNB":["Global Skill"],"C9TBvF":["No Outgoing"],"CCTop_":["Recent"],"CFnavk":["This project isn't a git repository, so worktrees aren't available."],"CKyk7Q":["Go back"],"COr1Y7":["Pick <0>openknowledge.skill</0> from your <1>Downloads</1> folder. It enables automatically."],"CSL0l1":["Couldn't clear the key — please try again."],"CTJLpz":["\\"",["trimmed"],"\\" already exists here"],"CU3AiE":["Switching branches"],"CWzc2T":["<0>~/.ok/bin</0> and <1>~/.ok/env.sh</1> stay either way — the app always maintains them."],"CXTwen":["Can't safely edit this project config"],"CXj9C-":["New property name"],"C_Lyvh":["Failed to save theme setting"],"C_WGy8":["This file is too large to open in the built-in text editor (1 MB limit). Use Open file below to open it in another app."],"C_cPoW":["Your GitHub session expired — sign in again to verify push access."],"ChAtFg":["You don't have permission to push to this repo"],"CifUuG":["Update available"],"Ck9XRt":["Couldn't save the key — please try again."],"CmeH9S":["Add property to ",["keyName"]],"CoHvYd":["Moved ",["0"]," to position ",["1"]," of ",["2"]],"CvsD6Y":["via ",["viaTags"]],"D-Oh1s":["How to set up ",["0"]," (opens in browser)"],"D12vtS":["(detached)"],"D2CwBE":["Create a new OpenKnowledge project from the <0>",["0"],"</0> starter pack (",["1","plural",{"one":["#"," folder"],"other":["#"," folders"]}]," and starter templates) in the folder of your choice."],"D4H2N6":["Remove ",["tag"]],"D8OV7J":["Only collaborators"],"DDTdLl":["Code block settings"],"DELNQk":["Collaborators see your in-progress edits as soon as they sync."],"DEWDbv":["Show diagram"],"DF1MtZ":["Loading conflict for ",["filePath"]],"DFfRbX":["Sync status: ",["syncStateLabel"]," — git identity unset"],"DId6MT":["Project-level pages with no outgoing graph edges."],"DJd000":["Activate the previous editor tab."],"DPfwMq":["Done"],"DTI-fp":["This ",["targetNoun"]," only exists on branch <0>",["shareBranch"],"</0>. You have uncommitted changes that prevent switching here — open it in a worktree to leave your changes untouched."],"DVh_Tb":["Failed to clean up after trash"],"DXd9LM":["New worktree"],"D_WKe_":["Click an agent's avatar in the presence bar to view their session."],"DbILZA":["No matches. Some files are excluded from search (hidden or ignored files)."],"DcLaew":["Custom theme"],"DeDYLr":["Unrecognized wiki link"],"DgcGrb":[["fileCount","plural",{"one":["file"],"other":["files"]}]],"DhK_hZ":["Moved \\"",["name"],"\\" to ",["0"]," (",["skipped"]," binary file(s) not copied)"],"DhLHEb":["Failed to load activity"],"DiFKSL":["Counting markdown files"],"Dnn2XG":["Automatic"],"DrYM2Z":["Sync disabled"],"DsDwR-":[["0","plural",{"one":["#"," error"],"other":["#"," errors"]}]],"DskIkK":["Sign-in stream ended without confirmation — please try again"],"Dub54T":["Preview browsers can't auto-copy. Use Cmd/Ctrl+C on the URL above, or open OK in the desktop app."],"Dvwa0U":["Create a worktree from this branch"],"Dw1T_W":["Rename ",["label"]],"E1Da_b":["This permanently removes ",["0"],". Agents that invoke this skill by name will fail until it's recreated."],"E1_c72":["Task list"],"E1tG2u":["Get Claude Code"],"E2Mv-X":["Copy source"],"E4XYYH":["Enable terminal for this project"],"E5WeIy":["Reopen the most recently closed editor tab."],"E6lrpp":["Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."],"E7BhZn":["Blank note"],"E9bKSA":["Creating"],"EARn6h":["Couldn't share skills — ",["detail"],"."],"EBVbtP":["Could not duplicate item"],"EDl9kS":["Subscribe"],"EDm3wJ":["Loading diff renderer"],"EEYbdt":["Publish"],"EHu0x2":["Syncing"],"EJuO7B":["Connect a GitHub account to browse and sync your repositories."],"ELYtNJ":[".ok folders"],"EL_YRd":["Mirror of <0>api-spec</0>"],"ENpRJV":["External link previews"],"EOjU5V":["Inline Math Properties"],"ETyvvg":["No language match."],"EVnzPs":["Edit with AI"],"EWPtMO":["Code"],"EWX92Z":["Collapse Ask AI"],"EZVxVz":["Replace the active match from the replace field."],"E_BHoD":["Could not move \\"",["targetName"],"\\" to the Trash. Do you want to permanently delete instead?"],"E_tNGD":["Connected as @",["login"]],"Ea1prf":["Choose which editors every skill in this project installs into."],"EarrCe":["Search emoji"],"Eax_et":["Accent"],"EbZT7P":["Toggle the left file sidebar."],"EbjWsS":["Current commit"],"EcM3k7":["Failed to clean up pending ",["kind"]],"EcR0fl":["Checking for installed agents"],"EdQY6l":["None"],"Ef7StM":["Unknown"],"EhDLBx":["You modified <0>",["filePath"],"</0> locally, but it was deleted upstream."],"Ehkru0":["Open, navigate, accept, or dismiss CodeMirror completion suggestions."],"EiVgl5":["You don't have permission to push to this repo."],"Eji13z":["Toggle highlight formatting."],"EkH9pt":["Update"],"El7NbA":["Heading 2"],"Emz5BG":["Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."],"EoaQyO":["Append-only log of what changed."],"EqrC_R":["Undo failed: ",["message"]],"EqtBXb":["Visual editor find open"],"ErRi6L":["Template \\"",["label"],"\\" deleted"],"Es-eZU":["Remove from recent projects"],"Ev2r9A":["No results"],"EvPX7f":["Opens a folder picker to choose where to clone the repository."],"Evq3lu":["Orphan mode"],"ExPiRQ":["Move to the next CodeMirror lint diagnostic."],"ExUzM4":["skill \\"",["0"],"\\""],"F-NRCj":["Add property"],"F-vBv0":["Ask"],"F0OA00":["Get ",["displayName"]],"F1T9y_":["Showing top matches — keep typing to narrow"],"F4IYWe":["Share doc"],"F4vEsL":["Sync status: ",["syncStateLabel"]],"F6pfE9":["Active"],"FBknns":["HTML"],"FCAcjR":["Run a real terminal docked inside OpenKnowledge, starting in this project's folder."],"FCxvG5":["First item"],"FEK4oC":["OpenKnowledge will be initialized at <0>",["gitRoot"],"</0> — the parent of your new folder, because it contains a <1>.git</1> folder (one project per git repo)."],"FEqWFL":["Guides your AI agents on how to work here."],"FEr96N":["Theme"],"FNTx6u":["Search \\"",["semanticSubmitQuery"],"\\" by meaning"],"FOGD7m":["Create something great."],"FRYB1Q":["/api/config returned a malformed body"],"FRqZ9v":["Couldn't update skill: ",["0"]],"FTUGgh":["Enter a repository URL or owner/repo"],"FUMerq":["Could not enable sync: ",["detail"]],"FWQuPE":["This project is running a different, incompatible build of OpenKnowledge than this app (v",["0"],")."],"FXk_zY":["Adds a guided workflow for authoring new Agent Skills."],"FZtBeR":["Enable ",["0"]],"FgRAvd":["Logs & system info"],"FjkaiT":["Zoom out"],"FnMkli":["Sync disabled — you don't have permission to push"],"FqTpiN":["Bird wiki"],"Fqr8BP":["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],"Fsx78O":["Add the <0>ok</0> command to your terminal"],"FvMSms":["Renaming changes the file on disk and the id agents use to pick this template."],"FvpFSZ":["Reveal in Finder, ",["hint"]],"Fxf4jq":["Description (optional)"],"Fy4GgU":["Explain how your codebase works so teammates and AI agents can find their way around. Good for documenting the architecture, the main parts, and the questions new contributors always ask."],"FyW0WO":["Authorize in browser"],"G-JBA1":["Source mode requires a live connection — your edits are saved and will appear when you reconnect."],"G-h6qN":[["0","plural",{"one":["#"," option set"],"other":["#"," options set"]}]],"G0YZ-I":["Indent or outdent list item"],"G1Gw0v":["New template"],"G1XxbZ":["Checkbox"],"G4-bgo":["Ask AI (from selection)"],"G7-rf8":["Pattern syntax error: ",["message"]],"G7cMuO":["HTML preview"],"G8t9NN":["Add a property"],"GA-UkN":[["keyName"]," type: ",["typeLabel"],". Click to change."],"GDvlUT":["Role"],"GF51cw":["Give the AI tools you use access to read and update your projects. Pick what to set up below, and change it anytime."],"GGsM4y":["Selected in graph"],"GHsJb8":["Show .ok folders"],"GJH-AT":[["docName"]," is ",["0"],". OpenKnowledge currently opens files up to ",["1"],"."],"GK-IRZ":["Undo buttons are disabled — per-session state has been garbage-collected."],"GLxIKR":["How to push manually"],"GN6L5F":["Filename"],"GQDSBN":["Layout options"],"GSYWCm":["Hide document panel"],"GUYwCr":["Dismiss notice"],"GUqTzn":["Competitor research"],"GXf9hG":["Cloning ",["repoName"],"..."],"GZzDqc":["Details about the error you just hit are included. Secrets like API keys and tokens are redacted automatically."],"G_686w":["Task List"],"G_efLf":["Installed into"],"G_hVTP":["Enable Themes"],"G_mWXb":["Filter languages"],"GamjcN":["Template saved"],"GemPfn":["Failed to parse forward-links error response (HTTP ",["status"],")"],"Gfr4fu":["Server can't open documents"],"GhjUB_":["Reconnected"],"GkYV_4":["Renamed ",["0"]," → ",["1"]],"Gp_twO":["Local path"],"GsBUCk":["Loading settings"],"Gt4gOO":["This folder has unpushed changes. Recipients will see the last pushed version."],"GtJbUa":["Background"],"GuaJb-":["Open email draft"],"GubkSu":["Use a starter pack"],"GuqOb1":["Failed to load headings"],"Gx0VS1":["e.g. drafts/ or *.draft.md"],"GzPQ2f":["Stay in the loop"],"H-vDm3":["Relaunching to install the update…"],"H0WlWQ":["Grid of rows and columns with a header row."],"H86f9p":["Collapse"],"HAvRAI":[["skillCount","plural",{"one":["skill"],"other":["skills"]}]],"HCn0Ay":["Toggle strikethrough formatting."],"HGNCsl":["Connection lost — keep this tab open, your edits will sync when reconnected"],"HIb0vl":["Network error — please try again"],"HM56Bx":["Creating..."],"HPTPGr":["Create a new spec file for my user story"],"HSh8u_":["Folders"],"HTW0Zw":["One more step: run <0>claude</0> in this project and approve OpenKnowledge once."],"HdkSiO":["New file"],"HfI1dR":["I already have it locally →"],"HjNrT0":[["0","plural",{"one":["#"," backlink"],"other":["#"," backlinks"]}]],"Hl89Qd":["Loading templates"],"HlmZBk":["Documents response did not match expected shape."],"Hnl9nT":["Set where pasted and dropped files are stored for this project."],"HoWElC":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>. Please commit your changes or enable auto-sync."],"Hp1l6f":["Current"],"HpK_8d":["Reload"],"HptUxX":["Number"],"HqOPpj":["Git needs a helper tool (such as git-lfs) that isn't installed or couldn't be found. Install it, then try again."],"HqiZvw":["OpenKnowledge stores its configuration and internal files inside a newly created <0>.ok</0> directory in your project root folder."],"Hrz9NY":["Wiki link"],"HyvSqq":["Project Skill"],"I-xnra":[["0"]," hex value"],"I1gRhX":["Failed to rename"],"I5685_":["Try a prompt"],"I5AfhE":["Sync status unavailable — server unreachable."],"I7Exsw":["Follow us on X"],"IA1wNb":["The Claude Desktop App didn't open the file. Is it installed? (",["msg"],")"],"IA6JW2":["Detecting"],"ICoNYz":["You can also manage this in Settings."],"IFezUv":["The audit could not be completed. Try again."],"IInnZo":["Conflict"],"IKoTAC":["Keep disabled"],"IN4UX8":["Search (",["searchShortcut"],")"],"IQPyrD":["Missing page — click to create"],"IRv9cH":["Cloned ",["repoName"],"."],"IWGfGF":["Checking your GitHub connection"],"IX7-sq":["Something went wrong opening \\"",["docName"],"\\"."],"IX_uXB":["my-feature"],"IYciRC":["Thanks for the report!"],"IajAbS":["Add a starter pack"],"If0crP":["Open with AI ",["targetDisplayName"],", ",["hint"]],"IgTwLt":["Open this document in the editor and collapse the graph."],"Ik-gP0":["Heading H",["level"],": ",["text"]],"Iq8zdU":["Close terminal"],"IrB5AK":["Server-side cleanup failed for ",["failedCount","plural",{"one":["#"," item"],"other":["#"," items"]}]],"IrC12v":["Application"],"IreQBq":["Repository"],"It9ARY":["Toggle the right document panel."],"Ix0K8o":["Hide external URL nodes"],"IxyZXD":["Screenshot"],"Izb10l":["Fix all ",["count"]," fixable problems"],"J2Mv98":["Name (e.g. ",["login"],")"],"J2eKUI":["File"],"J3HzPL":["Collapse ",["keyName"]],"J6N5MX":["Couldn't construct the share URL. Try Done and re-share."],"J6mxC1":["A network problem or GitHub outage interrupted the clone."],"JCxGEX":["No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."],"JE21eh":["Symlink to ",["targetPath"]],"JJcBCm":[["0"]," total"],"JK-Ave":["Hide thumbnails"],"JL3si7":["Updating"],"JLUTgi":["No tags yet — author \`#tagname\` in any doc to populate the index."],"JLzQi_":["Close ",["accessibleLabel"]],"JM_aq-":["Use an https:// URL — http:// is only allowed for localhost."],"JOcPqH":["Bring a remote repository onto this machine."],"JWsZlx":["Open a project to edit."],"JZ8cO6":["Light, dark, or follow the OS."],"J_bJiH":["Pick a built-in IDE color palette, or define your own."],"Jejur6":["Couldn't load document"],"JfPuv7":[["shareBranch"]," isn't a valid branch name."],"Jhj_lh":["Modify the link target, anchor, and display label."],"JkCD2u":["Sync paused — you don't have permission to push to this repo"],"JmfgFc":["(a worktree of ",["0"],")"],"Jqqevv":["System error"],"JtD-Br":["Page link"],"Jw6EC4":["Branch switch failed — try opening the ",["targetNoun"]," manually."],"K-a33w":["Start writing to create this page"],"K-h9cT":["Couldn't save the resolution for ",["filePath"],"."],"K0FgsP":[".ok/skills is committable so your team gets your skills; the rest of .ok/ stays on this computer."],"K0N7zS":["Config sharing status read failed"],"K1ckLX":["Failed to create folder"],"K2v7QF":["Couldn't share skills"],"K6MQQk":["Sync is failing. See the sync status for details."],"K6jjWB":[["packName"]," was already set up. Nothing to do."],"K6jxcj":["Add a key"],"K8-WWn":["Move between table cells"],"K9J00P":["Clone failed — connection error"],"KDuPiY":["Uploading ",["fileName"]],"KDw4GX":["Try again"],"KFdXwz":["Show panel (",["panelShortcut"],")"],"KH5bQi":["Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."],"KIIamL":["OpenKnowledge will create commits and push them to your remote automatically. If you do not want automatic commits in your git history, you should not enable auto-sync."],"KOZud0":["Build a competitor research knowledge base. Start with an overview page, then add cross-linked pages for each competitor, their products and pricing, and the sources behind every claim."],"KPW5WC":["moved template"],"KQGZuq":["Reused if it already exists, created if not."],"KRJ6xh":["No tags yet. Continue typing to create one."],"KWL_Ih":["Blog post"],"KX1MZR":["Your repositories"],"KYSocE":["Research the extinction of flightless birds"],"KYcZ6Y":["Above"],"KZLdgR":["See <0>#design-docs</0> for the latest specs."],"K_vT1F":["Upstream sync"],"KaFCD3":["Open this link in a new tab and collapse the graph."],"Kf7GG5":["Restarting the server…"],"Kgdbkt":["Switch to local-only refused"],"Kh1n4a":["<",["componentName"],"> isn't a known component. Copy the source to use it elsewhere, or delete the block."],"Khxcyu":["Terminal access isn't enabled for this project."],"Kiytqd":["Exception: skills are shared"],"KkEAud":["Create a file from the current document or folder context."],"KmydK6":["Bold"],"KnoB--":["Will be saved as <0>",["sanitized"],"</0>."],"KpOJFY":["Enable external link previews"],"Kr3VPS":["Codex will still ask until you run \\"ok init\\" in a terminal for this project."],"KsAPaB":["This branch is checked out in:"],"KszKI_":["Skill level"],"KtACeE":["Default: <0>",["0"],"</0>"],"KujtjC":["Find"],"L-rMC9":["Reset to default"],"L1ZE3M":["Document statistics"],"L1rRuU":["Embeddings API endpoint"],"L3CEC1":["this item"],"L4Cdd9":["or create a new file <0/>"],"L6Hhh6":["(root)"],"L8fKuc":["Run this in your terminal"],"L9Y9Om":["Top linked pages"],"LBwUR6":["Branch switch timed out — try opening the ",["targetNoun"]," manually."],"LCUy_N":["Session ended"],"LDuM35":["Replace current match from field"],"LE7t79":["Clone to a new folder"],"LKIPzv":[["laterEdits","plural",{"one":["Removes ","#"," newer edit on this file."],"other":["Removes ","#"," newer edits on this file."]}]],"LKOLNn":["No AI agents installed"],"LNum6A":[["minutes"]," min ago"],"LRgZAt":[["owner"],"/",["name"]," already exists"],"LXdWeS":["Medium section heading."],"LXfNU-":["Navigation and suggestions"],"LYufDw":["Failed to enable semantic search — ",["detail"]],"LbmLyU":["Can't safely edit this tool's config"],"Lcehxn":["Save resolution"],"LdABLa":["Could not open ",["target"],". Try opening it manually."],"LdKIHS":["Draft a spec"],"LeGeTf":["OpenKnowledge on GitHub"],"LhQlGR":["This project is running an older version of OpenKnowledge (v",["0"],") than this app (v",["1"],")."],"LhWYpm":["Other OK paths are tracked upstream:"],"LiAw2k":["What this changes"],"LlHqdU":["Initializing project"],"Llyqvo":["This usually means one of:"],"LpB85N":["Plain"],"LtI9AS":["Owner"],"LtSYdi":["Reveal in Finder"],"LtiJ5c":["Project skill"],"LuoJWu":[["truncatedShownCount","plural",{"one":["Showing the first item in one folder — the rest of that folder is hidden."],"other":["Showing the first ",["formattedCount"]," items in one folder — the rest of that folder is hidden."]}]],"LwMxXg":["Failed to open worktree."],"M-IF14":["Report reference"],"M1OfV9":["Next source diagnostic"],"M3ytY_":["This looks like a drive root (e.g., C:\\\\). Scaffolding here will scan an entire drive."],"M5_9s2":["Sending report"],"M5mfAe":["Add tag"],"M6mvVi":["Copy relative path"],"M9597s":["Preparing share URL..."],"MCjC9A":["Delete ",["deleteDescriptorLabel"]],"MDZSJe":["When the agent runs its scheduled work."],"MGb89P":["Insert, delete, move, copy, and indent source editor lines through CodeMirror's default keymap."],"MHrjPM":["Title"],"MJqRO6":["Your report is being sent."],"MKOVhz":["Enable git auto-sync"],"MQIM_Y":["Couldn't copy. Select the URL above to copy it manually."],"MRZxAn":["Edited"],"MTs6g3":["Couldn't reconnect after server restart"],"MUBR8r":["Rename succeeded but the tabstrip may be out of date — refresh to resync"],"MUrVEo":["No recent projects."],"MV-Dkb":["Found ",["countDisplay"]," markdown files"],"MVxpbf":["Find and replace"],"MZSBsh":["No templates yet. Add one to give new docs in this folder a ready-made starting point."],"MZoxVx":["Failed to load tags. Press Escape and re-open to retry."],"Mb_20S":["Visual"],"Md709y":["Loading ",["fileName"]],"MdpSC1":["New skill"],"Mh_4hd":["Previous tab"],"Mj8R8K":["Couldn't install skill: ",["0"]],"MmDDWK":["Recently opened"],"MmqnGI":["No global skills yet."],"Mnavhe":[["propPanelDescriptorLabel"]," Properties"],"MqQoV-":["Describe what you want to build, start a blank file, or scaffold from a template."],"MqsbfN":["Turn on external link previews?"],"MrwYIK":["Toggle a source comment through CodeMirror."],"MsuXaI":["Hide panel (",["panelShortcut"],")"],"My0wYT":["When you hover an external link, its URL is sent to the destination site to fetch the page's preview metadata — one request per previewed link."],"My9uXI":["Updated \\"",["display"],"\\" to ",["0"]," — your previous version is in history if you need to restore it."],"N1KkEO":["Jump to last tab"],"N1YYa7":["Loading image"],"N1mdmS":["This file can't be opened in the text editor."],"N2FcBE":["Synced"],"N2S1rs":["Empty"],"N2eHWq":["Code Block"],"N3_ozB":["Hubs"],"N55YNr":["Choose whether this project's OpenKnowledge setup, including its AI-tool connections, is saved with the project so teammates get it too, or kept only on your computer."],"NEzPEh":["Create a new branch, or check out an existing one, in its own window."],"NF_Wcg":["Show skills section"],"NIWAux":["No docs registered under #",["tagDocsName"],"."],"NJyQi_":["Branch ",["shareBranch"]," no longer exists on the remote."],"NKkZXl":["Initialize and open"],"NNJsn7":["One more step: enable it in Cursor → Settings → Tools & MCP (Cursor leaves project servers off until you turn them on)."],"NOHyEE":["Retry push"],"NORKZU":["Pattern warnings: ",["summary"]],"NQ8llq":["Add item"],"NQXwDy":["Edit in config file"],"NRSLBe":[["diffMin"],"m ago"],"NSnIUP":["Two-page (even)"],"NUr4kz":["A reusable starting point for new documents in this folder."],"NYUhy5":["Subfolder name"],"N_7kkF":["Read through this codebase and draft a technical spec for the most complex module: an overview, the architecture, key files, and open questions, all linked from a specs index page."],"NcurBF":["Pan down"],"NgZwB0":[["enabledCount"],"/",["0"]," on"],"NjrIak":["File: <0>",["fixedName"],".md</0>"],"NkXEFS":["Restore failed — document unchanged"],"NmPNJJ":["Copy code"],"Nn4GgW":["Will be created as <0>",["sanitizedName"],"</0>"],"NnQapF":["Open with AI ",["targetDisplayName"]],"NpC29w":["Create a new list item from the current list item."],"NrFwux":["Failed to save content rules — ",["0"]],"Nu4DdT":["Sync"],"Nu4oKW":["Description"],"NuH1jp":["Public repository"],"Nv3mUj":["Show advanced"],"NvOvTi":["Create in <0>",["dirDisplay"],"</0>"],"Nx7BWE":["Git auto-sync"],"NxW-md":["Resize ",["handleKey"]],"NzFvyK":["Session ended — undo unavailable"],"NzluOx":["(optional)"],"O0Z2Xr":["Outgoing"],"O2UpM1":["Browse"],"O3oNi5":["Email"],"O4PnDd":["AI tool management is only available in the OpenKnowledge desktop app."],"O6yEPk":["Create a new OpenKnowledge project in the folder of your choice."],"O7_W_a":["Open with AI"],"O9oQJS":["Send report"],"OD0FCX":["Hidden “",["basename"],"”"],"ODGGlj":["Folder name: ",["detail"]],"OETysD":["No hub pages yet. Hubs appear once pages accumulate inbound graph links."],"OEu_0l":["Failed to load skills: ",["0"]],"OFBmkg":["Search files, commands, projects, and AI handoff actions. With text selected in the visual editor, this chord adds a link instead."],"OJTOUj":["Requires ",["brand"],"."],"OJeiSH":["Failed to add property"],"OLBz-_":["Mermaid diagram failed to render."],"OLIKgw":["Drag item ",["0"]," to reorder"],"ONPvOb":["Loading agent activity"],"ONgEZF":["Loading headings for ",["pageTarget"]],"OOIVJo":["Uninstalled \\"",["0"],"\\" from ",["1"]],"OTF92M":["Label <0>(optional display text)</0>"],"OVjNeX":["Terminal ",["0"]],"OX2Neh":["Inline code"],"OXb_Df":["Settings content"],"OXdGnd":["Problems"],"OYnx7O":["Path cannot start with \\"/\\""],"OZJeTZ":["Skill"],"Oawo4U":["The report service couldn't be reached."],"OdmsFg":["Failed to delete item"],"OeAl1e":["e.g. assets/uploads"],"OfhWJH":["Reset"],"OgyJSr":["Local only"],"OiHJdA":["Move through slash, wiki-link, tag, and path suggestions; accept or dismiss the active suggestion."],"Okd2Xv":["Toggle underline formatting."],"OlAl5i":["Expand all"],"OmHTGj":["Disable git auto-sync"],"On0aF2":["Website"],"Oo_WWc":["No pages found"],"Oos8fo":["Copy command"],"OplnBG":["Managing AI tools is unavailable in this build."],"OuY8t9":["Open in current branch"],"OvEjsP":["Copying..."],"OxplNM":["Updated \\"",["0"],"\\": added ",["1"],", removed ",["2"]],"Oxyd5f":["Pick a name"],"OyIC0Q":["Project name"],"P-ye9o":["Could not open folder picker"],"P0HC30":["This ",["targetNoun"]," moved to <0>",["0"],"</0>. Open it there?"],"P3NS4G":["Pattern syntax error (line ",["lineNumber"],"): ",["message"]],"P3hnm0":["File too large to open"],"P47EWZ":["Could not update sidebar settings"],"P6gXB-":["Replace ",["keyName"]],"P6lAT3":["Folder target: ",["linkTitle"],". Click to open the overview."],"P8yDjG":["Name can’t be empty, \\".\\", \\"..\\", or contain / or \\\\"],"PB4upl":["Find previous match"],"PBwmDJ":["Searching by meaning"],"PBxg_E":["Not now"],"PCNIuJ":["File an issue"],"PCSkw2":["Skills"],"PIMM5l":["You're subscribed!"],"PKLY-1":["Opening..."],"PKjGhT":["Headings"],"PMyJ9C":["No edit session yet"],"PPFQ3o":["Installed \\"",["0"],"\\" into ",["1"]],"PQCdtv":["\\"",["docName"],"\\" doesn't exist."],"PR9FSv":["Move to the next visual-editor find result."],"PRnH8G":["of ",["0"]],"PVUn_c":["Open folder"],"PZtgO0":["Opening worktree"],"P_bX4O":["How to set up"],"Pck6eI":["Pick a built-in IDE palette. The dark IDE themes override the light/dark setting in Preferences."],"PdA9NZ":[["ahead"]," ahead"],"PdJZ5p":["No skills yet."],"Pgu10b":["Saved as <0>",["slug"],".md</0>"],"PgzIpb":["Move to the previous visual-editor find result."],"PiH3UR":["Copied!"],"PkeYXL":["Expanded graph mode"],"Pkw7J9":["This folder is empty."],"PlGC6r":["the git exclude file isn't writable"],"PqYWiC":["Couldn't restart the server automatically. Try running \`ok stop all\` in a terminal, then reopen this project — or restart your computer if it persists."],"PrJYSN":["This folder isn't on GitHub yet. The link won't work until it's pushed."],"PrhzDE":["Pan up"],"Q1mtyd":["Hide sidebar"],"Q5fqMz":["Connection error — try again"],"Q6hhn8":["Preferences"],"Q7W-mC":["Same folder as current file"],"Q7cNKe":["Skills are now shared. Commit .ok/skills to share them with your team."],"Q8A-U_":["Connected to"],"QAi7Q9":["Branch <0>",["trimmed"],"</0> already has a worktree — it'll open in its own window."],"QDZbvN":[["diffDays"],"d ago"],"QJaG-9":["Choose CLI for new chat"],"QNxpRm":["Dock terminal to the right"],"QOINDn":["empty"],"QQghPu":["Install in Claude Desktop"],"QR5SP1":["created template"],"QYfQdv":[["displayName"]," CLI"],"QcpeeE":["Navigate to ",["docName"]],"QfFBdJ":["The template's filename (without \`.md\`)."],"Qj4RL5":["Completed:"],"QlxHAH":["Showing results for \\"",["semanticResultsLabel"],"\\""],"QnjpOq":["What do you want to build?"],"QqBQu1":["Label <0>(visible link text)</0>"],"Qvls7J":["Eng specs"],"Qw-7Ie":["A simple place to write, with one file per topic and a daily journal. Pick this if you just want to start writing and let the links between notes build up over time."],"QyioBP":["Move up"],"R0cyYB":[["0","plural",{"one":["#"," request blocked by the preview's security policy"],"other":["#"," requests blocked by the preview's security policy"]}]],"R0jJzV":["Paste URL, owner/repo, or search your repos"],"R3y75Z":["Edit source"],"R65q-K":["A real shell is off for this project. Turning it on runs commands with the full access of your macOS user account."],"R9IDFz":["Renames the folder on disk and the id agents use to invoke it."],"R9Khdg":["Auto"],"RDjuBN":["Setup"],"RDrXh4":["Configure user, project, and integration settings."],"RG4XHV":["Copy ",["0"]," prompt"],"RGCCrg":["Copy share link"],"RGkNeJ":["Initialize a starter pack"],"RJ3a8Z":["Looking for <0>",["lookingForUrl"],"</0>."],"RN62Q8":["We'll build <0>openknowledge.skill</0>, save it to <1>~/Downloads</1>, and open the Claude Desktop App for you."],"RO-yts":["Failed to disable link previews — ",["detail"]],"RSqaSd":["Project root"],"RVZJWQ":["Search projects..."],"RXNu_r":["Shared via git with everyone working on this project."],"RY6Bq1":["Open shared ",["targetNoun"]],"RaPMZv":["Keyboard shortcuts available in the editor and workspace."],"Rah7yq":["What should the AI do? (optional)"],"Rb1zMa":["No excerpt"],"RfHNf8":["Open activity panel for ",["tooltipName"]],"RfaEio":["Toggle source comment"],"RfilGt":["No rules match your filters."],"RgbKEe":["You don't have access to this repository."],"Rj01Fz":["Links"],"RlCInP":["Slash commands"],"RlLl3G":["Actions for ",["0"]],"RmBY0A":["No git remote"],"RnrnTe":["Already set up — ok is available in your terminal"],"RobAKV":["Update the destination and optional section anchor."],"Rq1vFD":["Tree view options"],"RrAIZx":["What config sharing covers"],"Rsdhj9":["Configuration warnings"],"Rx5ReQ":["Rename ",["keyName"]],"RyIKxy":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy, and that change hasn't synced yet."],"S33tz3":["Not connected"],"S34Vju":["Have something else in mind?"],"S6l5dv":["Could not start creating a new item"],"S9Vnum":["Remove ",["patternText"]],"S9t1PI":["Fixing ",["0"],"/",["1"]],"SCoBBH":["Tag suggestions"],"SCzAbA":[["phase"]," — ",["pct"],"%"],"SFN6dN":["Heading 3"],"SOPwPh":["Restore to this edit"],"STTOnz":[["keyName"]," type: complex value (nested; read-only)"],"SUOoXn":["Failed to open project."],"SVLPt5":[["formatted"]," GitHub stars"],"SXCSQd":["Copied path"],"SYfHmN":["Unpin tab"],"Sc1bKE":["Local collaboration data for \\"",["docName"],"\\" could not be cleared in time. Reload to retry."],"ScwcF2":["A project already exists at this location. Pick a different parent folder."],"SfxQX8":["Writes a project-MCP config for each selected tool."],"SgKLfA":["Not connected to GitHub."],"Sh3Qkg":["No matching branches."],"Si7mIR":["Create report"],"SiUUCS":["Next match"],"SkMZlS":["Couldn't remove <0>",["targetGitPath"],"</0>: ",["removeGitError"]],"Skr_7L":["Search worktrees"],"Sq8lf2":["Editors to install skills into"],"SrOuyg":["Document panels"],"T-654M":["Loading PDF"],"T0OVm7":["The default branch is protected — pushes need a pull request."],"T3j-7o":["e.g. Switching projects while a sync was running"],"T67A0Y":["Auto-sync pushes/pulls commits to your git remote on intervals and on save. Toggling on requires confirmation."],"TEEPPF":["Will replace existing OpenKnowledge entry"],"TJnkyf":["ok ui responded but server.lock has no port yet"],"TKQ7K-":["Install"],"TLIO3j":["Toggle italic formatting."],"TUzThQ":["Share skills"],"T_R-Qz":["Primary"],"T_wG4n":["We couldn't check your GitHub connection."],"Ta25TG":["No history yet"],"TbjyhA":["Docs"],"Te6sK2":["Heads up: editing any rule or option here creates a <0>.markdownlint.json</0> file in your project to save your changes."],"ThmUrC":["Could not finalize project setup. Try again."],"Tjc1pH":["Section <0>(optional heading anchor)</0>"],"TsZmgr":["The file on disk, and the id agents use."],"TvY_XA":["Documentation"],"TwYboS":["Navigate CodeMirror source search results or dismiss the search panel."],"Tz0i8g":["Settings"],"Tz9pJB":["Clone stream ended unexpectedly — check if the clone completed"],"U2Kx6T":["Close all unpinned"],"U2pMtf":["tag-name"],"U3IvM5":["Full guide"],"U5Spo9":["Content directory must be inside the project"],"U7HJ4y":["Managed by OpenKnowledge (read-only)"],"U8CD-l":["Copy full path, No workspace"],"UBv8UK":["Delete Permanently"],"UDFrWm":["Checking GitHub connection..."],"UL8A9w":["Tag"],"ULRb5t":["Adds telemetry, server state, and runtime info when available. Document names are anonymized."],"UMrOy2":["Skill \\"",["trimmedName"],"\\" created"],"UPjaXD":["Couldn't duplicate \\"",["0"],"\\": ",["1"]],"UQAp48":["Search templates"],"UQMMvx":["Moved \\"",["name"],"\\" to ",["0"]],"URmyfc":["Details"],"UTNVyS":["Select the full source document."],"UTZ97u":["Selection must be inside the project"],"UTgWxm":["Nothing was uploaded. The report stays on this Mac until you email it to us."],"UVLlMV":["Couldn't reach GitHub. Try again?"],"UW2Fg3":["This project's running server doesn't support live editing. Restart OpenKnowledge to fix."],"UW93oq":["Replace key"],"UYcGIW":["Connecting — waiting for collab server"],"Ua78MH":["no response"],"UaDyeb":["Hide selection preview"],"Uay5NL":["This ",["targetNoun"]," was added to branch <0>",["shareBranch"],"</0> recently. Switch and update to open it."],"Uci-Ph":["Ordered List"],"Ud0Pj9":["<0>Mirror source removed.</0> The doc <1>",["src"],"</1> is no longer available."],"UfW9Kr":["Your search queries and the full text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"UhpfxY":["Pan left"],"UkQGhd":["Hide replace"],"Up2_7p":["Copy full path"],"UpCz01":["This doc"],"UuYo7g":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy. Please commit your changes or enable auto-sync."],"Uuj_R4":["New from template"],"Uw6ERJ":["Couldn't copy: ",["detail"]],"UyROxs":[["mins","plural",{"one":["#"," min ago"],"other":["#"," min ago"]}]],"V2Gmie":["These rules come from your project's <0>",["configFile"],"</0> file, which fully governs linting for this project. Turn rules on or off and edit their options here; changes write back to the file."],"V48OUT":["You deleted <0>",["filePath"],"</0> locally, but it was modified upstream."],"V7QxyT":["Connection dropped"],"VAHWL_":["Connected as <0>@",["signedInLogin"],"</0>"],"VBE2dw":["Build and keep track of the world behind your story. A home for your characters, places, factions, and the lore that ties them together, so details stay consistent as you write."],"VFQXPl":["External link previews show a card with the site name, page title, and description when you hover a link."],"VITWk5":["Managed by OpenKnowledge"],"VIwCaD":["Entry"],"VM7H66":["This file is binary and can't be shown as text."],"VNgKZz":["Advanced settings"],"VTulZj":["Open in worktree"],"VU3Nrn":["Missing"],"VUijjF":["Embed an image with optional alt text."],"VYd_YA":["Open an existing project folder from disk."],"VZGGPK":["Collapse terminal"],"VZGh8G":["Fold, unfold, fold all, or unfold all source ranges."],"VZSBXL":["Semantic ranking activates the first time an agent runs a search."],"V_6bJ4":["Terminal settings not loaded yet — try again in a moment."],"V_wltx":["Enter a title for this template."],"VbqhBI":["Already at ",["assetContentPath"]," — reusing."],"VcqWBy":["Upload may have succeeded but the sidebar is out of date — refresh to resync"],"VdXv4D":["Clone from GitHub"],"Vftef5":["Common markdown issues — hard tabs, heading increments, list markers, and more."],"Vlc75q":["Keep file deleted"],"VsaI0G":[["folderCount","plural",{"one":["folder"],"other":["folders"]}]],"VuxVSP":["Start source completion"],"VvS_k_":["Config sharing is now local-only."],"VxO6wR":["Delete selected files or folders"],"VzGJRl":["Add link"],"W-ntoW":["heading-slug"],"W0i24j":["Object"],"W1SI2K":[["0","plural",{"one":["#"," warning"],"other":["#"," warnings"]}]],"W1qRuM":["This document is already active in the editor. Use Open to collapse the graph."],"W3Xlpc":["Set the auto-sync default for users opening this project for the first time. This setting is committed to your repository."],"W5A0Ly":["An unexpected error occurred."],"W7XJN4":["Can't nest projects. An OpenKnowledge project already exists at <0>",["rootPath"],"</0>. Choose a location outside it, or open that project instead."],"W8vpBM":["starter pack"],"W9_Bub":["Local changes overlap with incoming sync"],"WFEbV1":["Flag common markdown issues in the editor. Powered by <0>markdownlint<1/></0>."],"WHPvOb":["All files are hidden by view filters."],"WJjviG":["What to include"],"WL6puM":["Path resolves outside project"],"WMCwmR":["Check for updates"],"WMIKXK":["Are you sure you want to delete ",["targetCount"]," selected items? Folders and all files inside them will be deleted. This action cannot be undone."],"WPwDin":["Open folder on disk"],"WR0y2O":["Share folder"],"WRNXKp":["Searching"],"WRdYfS":["Refresh audit"],"WWcqsG":["Start here: what this is and how it's organized."],"WZ-vBy":["Permanently deletes <0>",["targetGitPath"],"</0> and all its git history. Working files stay in place. If the parent git repo is intentional (e.g. you cloned it), cancel and pick a location outside it."],"Waiy-j":["The agent's persona, values, and voice."],"WamGNs":["Failed to load PDF: ",["error"]],"WcWS__":["Download file"],"Wcv-Zi":["Make this knowledge base available as a Claude Skill."],"We7h2I":["📝 or assets/icon.png"],"Weq9zb":["General"],"Wgmlsw":["Fetching"],"Wh0im4":["editing [[",["realCurrentDoc"],"]]"],"WhOsNE":["Strikethrough"],"Wi-VWy":["Couldn't send the report"],"WkTLN7":["Show only markdown files"],"WmPbvm":["Get product updates in your inbox."],"Wq6Wcm":["Please enter a valid email address."],"WqLq6M":["Open with AI ",["displayName"]],"Wt5W56":["Sync is off — your edits will not sync to the remote repository."],"Wtw22s":["Installing"],"WuntOK":["Preview of the screenshot"],"WyQxwa":["Connect this project to GitHub to share."],"WyXG7w":["Close all"],"Wyxs0x":["Path cannot contain \\"..\\""],"X0ttSN":["No tags match \\"",["tagListQuery"],"\\"."],"X7u0xR":[["0"]," templates available"],"X8kjQX":["Re-authenticate with GitHub"],"X9VpsP":["Loading folder contents"],"XAyxsa":["Check out remote branch"],"XDzAnp":["Opens in a new tab"],"XH30C4":["document"],"XJOV1Y":["Activity"],"XPJ0sN":[["settingsDescriptorLabel"]," properties"],"XPqe3B":["Create new tag #",["tagValue"]],"XRuL0i":["Create page"],"XU0OXn":["Enable auto-sync"],"XV5sC0":["Open worktree"],"XW18jo":["Page headings response did not match success schema"],"XYlJJT":["Setting up"],"XZkdtg":["Switch branch"],"XcGbim":["Show hidden files"],"Xet9MX":["Failed to load backlinks"],"Xewl6B":["Your local copy is behind. Pull the latest changes, then open the link again."],"XfzqjK":["template \\"",["name"],"\\""],"Xisk4u":["Edited ",["editedAgo"]],"Xk0-VC":["Previews of links to other documents in this project are always on and read from the local index — nothing leaves your computer for those."],"Xl-UUg":["guides/install or https://example.com"],"XmJfZT":["name"],"XnlF3W":["Add the next matching source selection."],"XopE_I":["Failed to parse backlinks error response (HTTP ",["status"],")"],"XpIZmv":["Fenced code block with monospace text."],"XqNHcm":["Couldn't update skill targets: ",["0"]],"XtRoxT":["Page ",["pageNumber"]],"XuQzrk":["Couldn't restart the server — another process owns it. Quit other OpenKnowledge windows for this project, then try again."],"Xv_ijG":["https://github.com/owner/repo or owner/repo"],"Xw_maT":["Type a query, then press ↵ to search your pages by meaning."],"Xwump4":["no git repository here"],"XyOUTJ":["Exit merge"],"Xzy0s0":["Remove ",["fullLabel"]," from context"],"Y-Urt2":["Block math equation rendered with KaTeX from a LaTeX source string."],"Y1QMlM":["Get set up"],"Y1kX2z":["OpenKnowledge initializes at <0>",["projectDir"],"</0> — the parent of <1>",["pickedRelative"],"</1> because it contains a <2>.git</2> folder (one .ok/ per git repo). <3>Content directory</3> defaults to <4>.</4> (the whole repo); type a sub-folder to narrow it."],"Y6SK9K":["Show source"],"Y8ViJx":["A newer version may have been deployed since this tab opened."],"YC6_wP":["Edit ",["keyName"]],"YEIS9T":["Edits apply live. Light or dark is chosen from the background."],"YEP3X2":["Delete a table when the active table cell selection covers the full table."],"YGIi_c":["Reinstall"],"YJ1BTp":["A skill with that name already exists."],"YKLP_-":["Template renamed"],"YLMBSd":["e.g. The editor froze after I pasted a large table"],"YPFBfr":[["detail"]," - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"YRavYS":["A personal color-theme picker — not shared with your project. When on, it appears under Plugins in the sidebar."],"YSFv5w":["No git repository — config sharing does not apply here."],"YTLmTM":["Remove the parent <0>.git</0> folder"],"YW7Q86":["Search settings not yet loaded — try again in a moment"],"Y_kL7X":["Customize how the editor looks and behaves."],"YaeyFh":["Pulls may overwrite uncommitted edits in your local files."],"Yea-K5":["Restore to this point"],"Yi0VMG":["Upload ",["keyName"]],"YjMLg2":["Off — external links show only their URL. No requests leave this computer."],"YjhKI5":["Cloning..."],"YlDuro":["Fit height"],"YsEYYS":[["behind","plural",{"one":["#"," commit behind"],"other":["#"," commits behind"]}]],"YwPUUP":["This pack is already set up here."],"YyXtnN":["Underline"],"Z1LF1M":["Sharing a doc needs a GitHub repository. Create one for this project."],"Z2M5XM":["Reason: ",["reason"]," (",["osDetail"],")"],"Z3FXyt":["Loading..."],"Z5HWHd":["On"],"Z5h97D":["Hide files and folders from your knowledge base. Hidden items don’t appear in the file tree, search, or AI tools. <0>Learn more about patterns</0>."],"Z6rrjc":["No <0>.markdownlint.*</0> file yet — every rule runs on the same defaults as the VS Code markdownlint extension: all on, except line length."],"Z79bnE":["View diff for edit ",["burstNumber"]," of ",["docName"]],"Z7x_Zh":["Git needs ",["tool"]," for this repository, but it isn't installed or couldn't be found. Install it, then try again."],"Z8KDox":["Enter a folder name (e.g. brain)."],"Z8lGw6":["Share"],"ZARuZJ":["Couldn't load files"],"ZBt4rI":["Instruction for the AI"],"ZBxvV3":["New Terminal"],"ZI8uvA":["No problems found."],"ZLQol-":["You can turn this on later in <0>Settings → Sync</0>."],"ZNK2Tq":["root"],"ZQJ1IV":["Activate the last editor tab."],"ZQLDTl":["created folder"],"ZU8VV_":["Remove failed: ",["error"]],"ZW3mlR":["Diff render mode"],"ZWgr0b":["In a subfolder"],"ZWolSV":["You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want."],"ZWwYwM":["Base branch"],"ZWxfrc":["cleared folder properties"],"ZWyHmq":["This project"],"ZYtq3m":["Connect the AI tools you use to this specific project. These files live in the project folder, so anyone who opens it gets the same setup."],"ZatAO_":["Failed to enable link previews — ",["detail"]],"Zf0w-R":["Take a piece of writing from a rough idea to a finished draft to something you're ready to share. Good for blog posts, essays, or anything you want to move through clear stages."],"ZgGuA4":[["0","plural",{"one":["File"],"other":["Files"]}]],"ZgJVnp":["Check spelling while typing"],"Zhe80e":["Restore to edit ",["burstNumber"]," of ",["docName"]],"ZhhOwV":["Quote"],"ZjtgI-":["Command palette"],"ZoOlzR":["App & system info and recent app logs. No project is open, so project logs aren't included."],"Zon_qG":["Mirror source <0>",["label"],"</0>"],"ZptNUh":["Show ",["hidden"]," more"],"ZsGpr_":["Paste link"],"Zue_jx":["Your GitHub token is missing required scopes. Try signing in again."],"Zul8Ry":["never"],"ZvzbDF":["Add it directly to this project."],"ZxXhLY":["Hide Files (",["sidebarShortcut"],")"],"Zz25kq":["Show Files (",["sidebarShortcut"],")"],"_0JUKX":["Bug reporting needs the OpenKnowledge desktop app."],"_5qBNl":["AI tools & CLI"],"_6FVBz":["Jump to tab 1-8"],"_7UQ7y":["Whole word"],"_8quCH":["From template"],"_902BE":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. You're currently on <1>",["currentLabel"],"</1>."],"_FLBbi":[["sizeText"]," · secrets redacted · crash dump not redacted"],"_IGfXZ":["OpenKnowledge quit unexpectedly last time."],"_NX6gG":["Managing project AI tools is unavailable in this build."],"_PACVa":["Release notes"],"_PBJRl":["Add at least one letter or number."],"_QwkMu":["No matching paths"],"_RcqUM":["You picked your home directory. OpenKnowledge will index everything in your home tree — large and may surface personal files."],"_TDESN":["Network error - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"_TF8ep":["Failed to render PDF"],"_VRtd7":["Couldn't send the selection — please try again."],"_W-elG":["(inline)"],"_WPP7e":["Read-only copy of a MirrorSource block from another doc. Edit at the source and it updates live."],"_XWY2J":["Terminal disabled"],"_ayOfA":["A knowledge base that follows Google's Open Knowledge Format, a shared way of organizing what you know. Pick this if you want your notes to work well with other tools that understand the format."],"_azghp":["Previous change"],"_bth6g":["Claude Code is installed, but OpenKnowledge tools aren't connected to it yet."],"_eguJc":["Uploading"],"_gkGSK":["deleted template"],"_hPpdX":["Skill renamed"],"_pY_Vq":["The repository was moved, renamed, or deleted."],"_qD6mn":["Pick the folder where you've cloned it."],"_rP3HI":[["minutes"],"m ago"],"_tekeB":["updated folder properties"],"_tjopj":["Paste duplicate"],"a-cKXz":["Select all source"],"a3H_MR":["Open and focus the Ask AI composer for the current editor selection."],"a4FRQv":["Undo to this edit?"],"a5Gha5":["Local changes blocked the merge"],"a5W0q0":["Are you sure you want to delete ",["folderName"],"/ and all files inside? This action cannot be undone."],"a9OzSn":["No pages found for \\"",["trimmedQuery"],"\\""],"aBgwis":["Scope"],"aByJ8j":["How does sharing work?"],"aE2_XM":["One pattern per line — appended to <0>.okignore</0>."],"aENGMB":["Semantic search adds meaning-based ranking to the search tool so conceptually-related pages surface even without shared keywords."],"aHPdYV":["Go to line ",["displayLine"]],"aM23Wr":["page-name"],"aOp3hw":["Couldn't move to Trash"],"aWlJai":["Starting sign-in flow"],"a_u4ck":["Loading tags"],"aaE55D":["Clear ",["keyName"]],"aalx4E":["Editing broken MDX source: ",["reason"]],"abiHje":["Delete selected items"],"adsMWO":["Resolving deltas"],"aiArms":["We couldn't clone this repository."],"ajz9F8":["Couldn't load conflict content for ",["filePath"],". Try reloading the page."],"aoa6xA":["network error (is \`ok ui\` running?)"],"arUUsK":["Product updates"],"ax9kie":["Link preview settings not yet loaded — try again in a moment"],"az8lvo":["Off"],"b18t0_":["Close diff"],"b3Thhd":["Upload failed"],"b4AQFK":["Open activity panel for ",["tooltipName"],", editing ",["realCurrentDoc"]],"b4VvP-":["Existing branch <0>",["trimmed"],"</0> will be checked out into its own window, under <1>.ok/worktrees/</1>."],"b4itZn":["Working"],"b5aNbi":["The ",["targetNoun"]," could not be opened — try navigating to it manually."],"bBE5tC":["Detected on this machine"],"bBcFK_":["Open emoji picker for ",["keyName"]],"bD8I7O":["Complete"],"bGa3Fk":["Uploading file"],"bH382I":["Edit this HTML — the preview updates live."],"bSD4im":["Search worktrees and branches"],"bS_boY":["Replace current match"],"bUUVED":["Asset"],"bV6DJA":["Who you are, so the agent has your context."],"bWLmRK":["Could not fetch branch. Check your connection."],"ba3vIW":[["templateCount","plural",{"one":["template"],"other":["templates"]}]],"bcDHUM":[["descriptorLabel"]," — render error, source editable below"],"bcjYUA":["Fold or unfold source"],"bkQRMh":["Paragraph"],"blFttG":["Search projects"],"bmC18N":["Clearing local collaboration data for \\"",["docName"],"\\" before reconnecting."],"brCtGB":["History unavailable"],"bultyE":["When enabled, the agent opens or refreshes the preview after each edit. Disable if you manage your own preview window (OK Desktop, a browser tab on another display, etc.)."],"bwil08":["Building <0>openknowledge.skill</0> and opening the Claude Desktop App"],"c1LZZH":["Link copied."],"c4fVUV":["Fix"],"c5PTFE":["Dev instance: ",["label"]," (isolated from other worktrees)"],"c5f7sm":["Code block language: ",["currentLabel"],". Click to change."],"c5rF4v":["What is this knowledge base for?"],"c863eW":["Could not switch to ",["shareBranch"],". Try switching manually."],"c8iK2Y":["No templates found."],"c8jBgX":["Checking for updates on GitHub"],"cEoyWz":["Add item to ",["keyName"]],"cF9DyA":["Reconnecting after server restart"],"cGV6Mh":["Show a preview card when you hover an external link in the editor. This setting applies only to this computer."],"cHhH3i":["a required git tool"],"cIptmH":["In the Claude Desktop App"],"cKjLuT":["(project + user)"],"cN1Gcp":["A worktree folder for ",["shareBranch"]," already exists."],"cOJyVj":["Disable Themes"],"cOSAfL":["No repositories found on your GitHub account."],"cOrTMo":["Your share link is ready below."],"cRHuuI":["Couldn't copy path"],"cSCbv3":["BETA"],"cUK8lW":[["conflictCount","plural",{"one":["#"," conflict"],"other":["#"," conflicts"]}]],"cUk6TF":["Sync failed — check the server logs for details."],"cV7LOw":["Team Wiki"],"cZGNlb":["Add another pattern"],"cZI5AL":["OK Desktop"],"cZ_8zB":["Stays on this computer."],"ccNps_":["Only modified"],"cd5EXh":["Report a bug"],"cdm00A":["No Incoming"],"cdmk8A":["Uncommitted changes"],"chL5IG":["Community"],"cklVjM":["Timeline"],"cn1sLi":["Couldn't connect OpenKnowledge tools to Claude Code. Please try again."],"cnGeoo":["Delete"],"cqQyPB":["Folder name"],"crqzW5":["AI tools"],"cs4mps":["Config sharing"],"csDS2L":["Available"],"ct2kv5":["No headings in ",["pageTarget"]],"cuA8QW":["Organize specs"],"d1JjXo":["Your local copy of branch <0>",["branch"],"</0> is behind. Pull the latest changes, then open the link again."],"d2uTPx":["Server error (HTTP ",["status"],")"],"d5rK4X":[["chars","plural",{"one":["char"],"other":["chars"]}]],"dCIGNG":["Border"],"dD7NPy":["Outline"],"dDpCOp":["Rename succeeded but the sidebar may be out of date — refresh to resync"],"dEgA5A":["Cancel"],"dGAdpH":["New branch <0>",["trimmed"],"</0> will be created from <1>",["currentBaseLabel"],"</1>, in its own worktree under <2>.ok/worktrees/</2>."],"dIYSqk":["remote"],"dJw2_7":["Saved with the project for your team."],"dMsx3p":["Home page and navigation hub."],"dN20LW":["Semantic search is on, but no API key is set — search falls back to keyword matching. Add one in <0>Settings → Account</0> (it's stored once for your whole machine)."],"dNM58w":["Claude Code (claude) isn't installed or on your PATH."],"dOHMA0":["Failed to move"],"dOxPd4":["Footnote"],"dPOFid":["Show or hide terminal"],"dTaauv":["Reason: ",["reason"]],"dUCQo4":["Renamed to \\"",["trimmed"],"\\""],"dUQ7_J":["Add meaning-based ranking to search so conceptually-related pages surface even when they share no keywords. This setting applies only to this computer."],"dURmlQ":["\\"frontmatter\\" is a reserved property name"],"dVaXnv":["Content rules not yet loaded — try again in a moment"],"dXWMFn":["Removes this skill from your editors."],"dbapvC":["Follow us on social media"],"dbhUX1":["Hide this file"],"dbtjJh":["(opens in new tab)"],"djc1l9":["More than ",["0"]," requests were blocked by the preview's security policy"],"djjdjr":[["deleteCount","plural",{"one":["Delete"],"other":["Delete ","#"," items"]}]],"dprWmL":["Anchor in this page"],"dr1vFs":["Replace all matches"],"dvGKu2":["Shared auto-sync default"],"dw_3cv":["Rename skill"],"dw_dUJ":["Failed to duplicate path"],"dx-TwN":["Running project audit"],"e0NrBM":["Project"],"e1Rn_k":["Open containing folder"],"e1hptq":["Embed a video with native player controls."],"e4GHWP":["Pull"],"e4PbgC":["Duplicate the file-tree item copied from the Files sidebar."],"e8L17t":["A non-empty folder already exists at this path. Pick a different folder."],"e8zRrb":["Show Files"],"e8zYa8":["Could not open ",["shareBranch"]," in a worktree. Try again."],"eBIT9h":["Paste failed.",["restoreSuffix"]],"eFJkVt":["Clone failed: ",["cloneError"]],"eG8Jsg":["Toggle source tab focus mode"],"eGUbmF":["Copy selected file or folder"],"eJitUk":["Upload from computer"],"eKThTQ":["Failed to reorder"],"eLl1VX":["Failed to update the embeddings endpoint — ",["detail"]],"eNQGRb":["Inline LaTeX math rendered with KaTeX."],"ePK91l":["Edit"],"eQkgKV":["Installed"],"eQxm13":["Failed to update attachment location — ",["detail"]],"eTL5y9":["Show selection preview"],"eTsJYJ":["description"],"eVPynQ":["Open <0><1>",["verificationUri"],"</1><2/></0> and enter this code:"],"el312q":["Install skills into"],"emgiet":["Authoritative content; mirrored verbatim everywhere it's referenced."],"enPTnx":["line ",["displayLine"]],"eneWvv":["Draft"],"epuNYK":["Mark a block as the source of truth. Mirrors elsewhere update live as you edit it."],"euc6Ns":["Duplicate"],"evs0iw":["Tags matching \\"",["tagListQuery"],"\\""],"f1XQyZ":["Move block"],"f65AOQ":["Start from"],"f8jU-L":[["0"],"/",["1"]," — ",["2"]],"f9lQNJ":["Adds a managed block to"],"fBHvBn":["There's no project folder for this window, so a terminal can't start here."],"fG0X0e":["Install ",["brand"]," →"],"fIgqfQ":["Reinstalling"],"fJ3EbT":["Themes"],"fJgQHX":["Failed to create file"],"fNr-MX":["Disable semantic search"],"fR-Kdc":["(project-level only)"],"fSRzLo":["Show document panel"],"fVcm9t":[["0","plural",{"one":["#"," doc"],"other":["#"," docs"]}]],"fWi7pn":["Initialize starter pack"],"fWsBTs":["Something went wrong. Please try again."],"fYKgzG":["Failed to load recent projects."],"fYjgXu":["Unordered list of items."],"fZj9em":["Fix ",["flatId"]],"f_PkYv":["Restarting closes this project's server. Connected agents (Claude Code, Codex, Cursor) will see their OpenKnowledge MCP connection close unexpectedly — you may need to restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"fbdLmk":["Toggle bold formatting."],"fbsiBw":["Something went wrong starting the terminal."],"fcgvCA":["Claude"],"fiMNLl":["Sync settings not yet loaded — try again in a moment"],"fj5YiP":["Downloads a fresh copy from GitHub."],"fnlBN4":["Auto-approve settings not yet loaded — try again in a moment"],"fo0VXg":["Uninstall"],"fqSfXY":["Replace"],"fru3T7":["Could not fix ",["0"]," of ",["1"]," files."],"fuJZKk":["Search branches"],"fwhX-N":["Indent or outdent source"],"fxJk_6":["<0>Have more to add?</0> Write to <1/> and mention your reference."],"fxbCNQ":["Synced. The link is up to date."],"g3UF2V":["Accept"],"g4WlQK":["Project AI tool management is only available in the OpenKnowledge desktop app."],"g4XBm0":["Small section heading."],"g58Kwy":["<",["descriptorLabel"],"> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block."],"gBbxn_":["Checking sign-in status"],"gGVP4q":["Click <0>+</0> <1/> <2>Create skill</2> <3/> <4>Upload skill</4>."],"gHSAWT":["Create worktree <0>“<1>",["typedName"],"</1>”</0>"],"gITz7o":["Move the cursor or extend selection through CodeMirror's standard source-editor navigation keymap."],"gJR87V":["Could not create the project folder. Pick a different folder."],"gKi-a_":["New project"],"gQV-9w":["Branch switched but the ",["targetNoun"]," could not be opened — try navigating to it manually."],"gUlRQj":["Orphans"],"gYuDfu":["Pick a starter pack to scaffold your project with ready-made folders and templates."],"gYz2ep":["Expires in ",["timeLabel"]],"gZElfU":["Fixing ",["0"]," of ",["1"]," files"],"gbHcbI":["Failed to delete property"],"gfdqcY":["Couldn't apply the change: ",["0"]],"gfohmY":["Connect tools"],"ggm6JX":["This page doesn't exist yet. Open it to create the page in the editor and collapse the graph."],"ggs9f8":["Search files, folders, or commands"],"gh27t1":["Link previews"],"gijbne":["Failed to rename path"],"gk_-qj":["Couldn't rename template: ",["0"]],"gljvbT":[["words","plural",{"one":["word"],"other":["words"]}]],"glzsS_":["Pan right"],"gmJ0An":["Failed to open folder."],"goO4Ll":["Editor status bar"],"gp3I7-":["Before syncing, set your identity for git commits:"],"gtEbeW":["Highlight"],"gvApb7":["Turn the things you read into clear, trusted articles. Save a source, figure out what it means, then keep the final version so you can rely on it later."],"gwykHF":["This doc hasn't synced to GitHub yet. The link will work after the next sync."],"h-AdvS":["The folders and templates are already here, so there's nothing to add."],"h06R3C":["No pages are missing outgoing graph links."],"h16FyT":["Lists"],"h3QZcB":["A branch named ",["shareBranch"]," already exists. Open its worktree from the switcher instead."],"h7FzJC":["Link-graph response did not match expected shape."],"h9QFb9":["Skill \\"",["0"],"\\" deleted"],"hBMK4W":["Project templates"],"hCOLSd":["Keep a written record of how your product gets built. A home for proposing ideas, recording decisions, writing specs, and capturing what you learned after something broke."],"hDEaQu":["Connect OpenKnowledge to other tools you use."],"hDKtoF":[["diffHrs"],"h ago"],"hDoLrm":["Remove ",["projectName"]," from recent projects"],"hGmuTc":["Docs tagged #",["tagDocsName"]],"hHMv6l":["Delete block"],"hIQkLb":["New chat"],"hItdtk":["Browse folder"],"hLy8b1":["Updated to Version ",["version"]],"hQXiDc":["Search branches..."],"hSBIG-":["A title, description, tags — anything that describes this folder."],"hSySVc":["Install handoff failed: ",["msg"]],"hXUWyd":["Value is required"],"hXbSxc":["Asset: ",["title"]],"hY8pka":["Select next occurrence"],"hYDc6B":["Name cannot be empty"],"hYgDIe":["Create"],"hZoBHK":["Empty starting content"],"haHgQj":["Copied relative path"],"habOU_":["Failed to update the auto-approve setting — ",["detail"]],"he3ygx":["Copy"],"hh4mVC":["Ask AI to fix ",["flatId"]],"hjO0Mq":["Add tab"],"hmYd9H":["Keep track of the people and companies you work with and the meetings you have with them. Good for remembering who someone is, how you know them, and what you last talked about."],"hnq8fP":["Remove ",["label"]," from context"],"hpDtUm":["External wiki link"],"hpzRlK":["Reopen closed tab"],"hwFOFD":["Settings failed to load"],"hxBHxQ":["A line with a footnote<0><1>[1]</1></0> and a definition shown below."],"hxEUVJ":["Initialize ",["selectedPackName"]],"hyCxJY":["Open that worktree instead"],"hynz2K":["Download started"],"i-ShMB":["Diagram"],"i09An-":["Restored an earlier version (",["0"],")"],"i1flq_":["Wiki link suggestions"],"i3f2kh":["No matching commands."],"i92eAT":["We'll create a repository and start syncing — no terminal needed."],"i9OyGp":["Undo or redo"],"i9TPUi":["This ",["targetNoun"]," isn't on branch <0>",["branch"],"</0>. It may not have been pushed yet."],"i9toLO":["Agent configuration file"],"iAoh55":["Update \\"",["0"],"\\"?"],"iDZtvM":["Failed to load templates: ",["message"]],"iEQQyu":["Agent"],"iEYxO4":["Show thumbnails"],"iGCs04":["No templates available"],"iH8pgl":["Back"],"iHAJDj":["Resolving default location"],"iIaSUD":["Whitespace"],"iKSP5j":["Word wrap"],"iKZkk1":["Property value"],"iMkWoF":["Turn on"],"iO8V-7":["Create worktree"],"iOHg1t":["Open embedded URL in new tab"],"iRdfLr":["Dev instance: ",["label"]],"iSLIjg":["Connect"],"iSQTsg":["Ordered list"],"iSnkwB":["Failed to open cloned project."],"iTlqm3":[["ahead","plural",{"one":["#"," commit ahead"],"other":["#"," commits ahead"]}]],"iTylMl":["Templates"],"iXTp5j":["Scope: "],"idD8Ev":["Saved"],"ig5vUe":["Failed to load file"],"ii5mVn":["Report this error"],"iilQXA":["Folder duplicated"],"ijLc3m":["Bullet list"],"ilodsp":["Let agents use OpenKnowledge without asking"],"ipn17C":["The <0>type</0> every document created from this template gets (e.g. <1>research-note</1>). Keeps new docs Open Knowledge Format–conformant."],"iqIDv4":["Sync status unavailable"],"iqugog":["Initialize failed: ",["errorDetail"]],"irFGwu":["Template list"],"ircigK":["Blank project"],"irrm_E":["Remove selection"],"isRobC":["New"],"itxlnr":["Setup files include: <0>.ok/</0>, AI-tool MCP configs (<1>.mcp.json</1> and per-tool files), project skills.<2/><3>Shared</3> commits them to git, so anyone who clones the repo gets the same setup. <4/><5>Local only</5> keeps them out of git (via <6>.git/info/exclude</6>)."],"iuTKci":["No edits yet."],"iv452l":["Documentation for ",["0"]," (opens in browser)"],"iycx_A":["Pushing"],"j9Vqvc":["inherited"],"j9tqwO":["Not in sidebar"],"jAMpHn":["What is a starter pack?"],"jBVUXo":["Couldn't open the terminal — please try again."],"jC8LSZ":["Reset view filters"],"jEZ6Lf":["provisional"],"jEdF24":["Missing page: ",["linkTitle"],". Click to create."],"jKd3AP":["Could not enable the terminal: ",["0"]],"jPUPvG":["Couldn't resolve the conflict for ",["filePath"],"."],"jRHdCz":["Failed to load PDF"],"jSO1X5":["Inherited templates can't be renamed here — rename it in the folder that owns it."],"jSY41h":["\\"",["docName"],"\\" took too long. Check your connection."],"jTLWxh":["Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox)."],"jX0IPx":["A skill with this name already exists."],"jZ_E5M":["Fetch failed — check the server logs for details."],"j_Z6g7":["Shared default"],"jbSG8V":["Show Files (",["sidebarShortcutLabel"],")"],"jdGUeI":["Couldn't create template: ",["error"]],"jerqF0":["Loading branch state"],"jhtG3I":[" Your selection has been restored."],"jjtmV_":["First file name"],"jnCROW":["A memory snapshot from the crash, and the artifact that helps us most. It can contain document content and can't be redacted, so uncheck it if you'd rather not share it."],"jol95m":["Failed to open Project Navigator."],"jpctdh":["View"],"jtg_8-":["Build a knowledge wiki about the different types of flightless birds. Start with an overview page, then add cross-linked pages for each major group (ratites like ostriches, emus, and kiwis; penguins; and flightless rails), the regions they live in, and a timeline of how flightlessness evolved."],"ju38ms":["This project has no git repository — sharing mode does not apply. Initialize a repo to enable the toggle."],"jwnpdM":["A template named <0>",["trimmedSlug"],"</0> already exists here. Saving creates a local copy that overrides it for this folder."],"k0vc0N":["New terminal tab"],"k2fEi7":["User plugins are personal to this device — turn them on or off here. The choice lives in your user config and is never committed to the project. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"k4CuuV":["Ready-made folders and templates to get you started quickly. Select a pack to preview what gets created, then add it to your project."],"k7Hoig":["No content changes at this version."],"kCNU4q":["Indexing your pages — ",["semanticIndexedCount"]," of ",["semanticTotalCount"]," ready. Results may be incomplete."],"kCqCyf":["Open CodeMirror's lint diagnostics panel."],"kDwcbW":["Go to line ",["displayLine"]," in ",["0"]],"kFLlsI":["Insert a footnote reference + matching definition stub."],"kLv8d3":["Your copy of branch <0>",["shareBranch"],"</0> has changes that aren't on GitHub. The ",["targetNoun"]," will appear once the branch syncs."],"kNqMMd":["Folder"],"kUn-CN":["Sync off"],"kV2YZv":["Don't see <0>Skills</0>? Enable <1>Settings <2/> Capabilities <3/> Code execution and file creation</1> first."],"kYL1lH":["Agent activity"],"k_Dqw1":[["0","plural",{"one":["No problems across ","#"," document."],"other":["No problems across ","#"," documents."]}]],"k_pade":["Config sharing is now shared. Commit the OK files to share with your team."],"k_yIIc":["Will be created at: <0>",["targetPreview"],"</0>"],"kdzzOK":["Off — search ranks by keyword only. No content leaves this computer."],"keNFEd":["Set identity"],"khCa4M":["Teaches coding agents in this project to read and write through OpenKnowledge."],"kj9pAE":["Creating page"],"kknhfj":["No changes"],"klPS-L":["Original file — before this agent's edits."],"kmKqZg":["Clusters"],"knjOzA":["Tag value"],"kolRU1":["Do you want to permanently delete instead?"],"kpqWwG":["This ",["targetNoun"]," was removed from branch <0>",["branch"],"</0>."],"ku0yLQ":["Pages are embedded the first time a search needs them."],"ky9Tuc":["Edit ",["0"]," source"],"l-4nnw":["Search rules"],"l17ab4":["Could not write project files. Try a different location."],"l1aQKz":["Visual editor table"],"l1l8sj":[["0"],"d ago"],"l3s5ri":["Import"],"l46MqT":["Next tab"],"l6OXqI":["No installed agents found"],"l6kpzR":["This ",["targetNoun"]," has been moved, renamed, or deleted in your local copy of branch <0>",["branch"],"</0>, and that change hasn't synced yet."],"l8G3S9":["Auto-sync is off — you don't have permission to push to this repo"],"lAiyU_":["Only the current document uses <0>#",["tag"],"</0>."],"lCC_D5":["Subscribing..."],"lGs_bQ":["Page <0>*</0>"],"lHCR4I":["Clear the field to reset back to the default OpenAI endpoint."],"lHwYMr":["Server error: ",["status"]," ",["statusText"]],"lI0Td2":["Use letters, digits, <0>_</0> and <1>-</1> only."],"lIn9L9":["Disable sync"],"lPzyrU":["All hunks resolved"],"lVWEIL":["Indexed ",["embedded"]," of ",["total"]," pages."],"lWNpNB":["Add cursors or select matching occurrences through CodeMirror."],"lXKZGw":["Heading 1"],"lY27jj":[["0"],"y ago"],"lZAiSP":["Backlinks response did not match expected shape."],"l_FAT6":["Use letters, digits, <0>-</0> or <1>_</1> only."],"l_UFPv":["Properties"],"lb_UU4":["Sync now"],"lbkOif":["Undo or redo visual-editor changes through TipTap collaboration history."],"lhjq3G":["Reset ",["labelText"]," to default"],"ljHjfg":["That branch is already open in another worktree."],"lkYioO":["Show or hide document panel"],"ll2yNl":["Content directory"],"lmBPt0":["Only external links trigger a request. Links to other documents in this project preview from the local index and never leave your computer."],"lond3p":["Shows above the code body. Round-trips as \`title=\\"...\\"\` in markdown."],"lrhetp":["+ ",["overflow"]," more"],"ls1N1w":["(missing)"],"lyWa43":["Project-level disconnected pages"],"lzmtKp":["Failed to load folder properties: ",["message"]],"lzwo7p":["Could not open GitHub sign-in. Please try again."],"m16xKo":["Add"],"m2T1Xj":["Tag #",["tagValue"],", ",["uses"]],"m6YGpY":["Active panel content for the selected tab shows here."],"mBltnd":["Path suggestions"],"mGaZwZ":["See the full install guide"],"mHVPm5":["Reconnect required"],"mLAjyL":["Give the AI tools you use access to read and update your projects. Checking a box sets it up right away; unchecking removes it."],"mPneVR":["Updated \\"",["display"],"\\" to ",["0"],"."],"mPy9lS":["Organize my existing specs into a linked index grouped by area, and flag any that have drifted out of sync with the current code."],"mU3j1b":["Remove item ",["0"]],"mVFyH-":[["accessibleLabel"]," (conflict)"],"mWVJRX":["Collapsible section with a clickable summary."],"mY8U64":["Teach agents a repeatable task. You can edit the body after creating."],"mYGY3B":["Date"],"mYzDD_":["A worktree folder for that branch already exists."],"mZ1r4i":["Create a document from ",["label"]],"maDWIB":["Mirror source <0>api-spec</0>"],"makN88":["No patterns yet. Type a folder or file name below to start hiding files."],"mdKFEy":["You cancelled loading \\"",["docName"],"\\"."],"mdzKSV":[["nodeCount","plural",{"one":["#"," node"],"other":["#"," nodes"]}]],"mf37rL":["Retrying"],"mg0YGL":["Source multi-cursor and multi-select"],"mk2poV":["e.g. server.ts"],"mmpzAq":["Wrap long lines in the markdown source editor."],"mo22UP":["Toggle inline code formatting."],"mqSwZH":["<0>Mirror anchor not found.</0> No <1>",["mirrorSourceTag"],"</1> exists in <2>",["src"],"</2>."],"msOK6I":["Repositories you've already cloned may keep syncing through git's own saved credentials, even after you disconnect."],"msqUNq":["Ready-made folders and templates to get you started quickly."],"mu1O0q":["Open Knowledge can manage ",["0"]," editor skill(s) for this project. Import moves them into .ok/skills and replaces the .claude, .codex, etc. copies with symlinks — one place to edit, in sync everywhere. If those folders are committed to git, review the change first; symlinks can behave differently on some editors and on Windows."],"mwMF9u":["Open CodeMirror search in source editor mode."],"mxY24F":["Duplicate the focused file-tree item when focus is in the Files sidebar."],"n2lRue":["Commit or stash changes to switch:"],"n3wx1q":["Restore to this version?"],"n5n_vi":["Private repository"],"n6hXUm":["Auto-sync periodically fetches, pulls, and pushes commits to your remote git repository so your edits stay in sync across machines."],"n7aopT":["Editor mode"],"n8DwqQ":["Connects automatically the next time you open this project in a trusted Codex session."],"nCzR-G":["Copy code ",["userCode"]],"nD7Fx9":["This replaces the current skill content with the bundled version ",["0"],". Any local edits will be replaced — your current version is saved to history first, so you can restore it."],"nDT8qt":["Initialized ",["0"]," but could not open it."],"nJq7et":["Couldn't uninstall skill: ",["0"]],"nMSYz5":["This path is on an external volume (/Volumes/...). OpenKnowledge will lose track of files when the drive ejects."],"nNYV3Y":["and ",["remaining"]," more"],"nP-KFo":["New ",["0"]," chat"],"nP76lk":["Applies to all projects on this machine. Claude and Codex, started from the built-in terminal, auto-approve OpenKnowledge's read and write tools (Claude also auto-runs \\"ok open\\"). Deleting, moving, sharing, installing skills, other commands, and non-OpenKnowledge file edits still ask. Cursor, OpenCode, and Pi are unaffected. Best-effort per agent."],"nTwL53":["Open a doc to share its URL."],"nUNZL4":["Ask ",["0"]],"nWv1ja":["Manage hidden files in Settings → Ignore patterns."],"nYKerc":["(user-level only)"],"nYeBmY":[["hours"],"h ago"],"nbfdhU":["Integrations"],"ndeI89":["Use Cmd/Ctrl+C to copy the link below, or open OK in the desktop app."],"ndwmea":["unavailable on this platform"],"neRy3o":["Split list item"],"nfPccR":[["laterEdits","plural",{"one":["Rolls back ","#"," later edit."],"other":["Rolls back ","#"," later edits."]}]],"nfoduq":["create worktree"],"nft48x":["Stored at <0>.ok/templates/</0> in this project. Available in every folder (folder-scoped templates can override by filename)."],"ng2Ibo":["Branch name"],"nh3wwx":["Embeddings provider key"],"njBeMm":["Both"],"njU86j":["Property \\"",["trimmed"],"\\" already exists"],"noH1JX":["Couldn't reach collab server — ",["errorDetail"],". Try <0>ok status</0> or check <1>.ok/local/last-spawn-error.log</1>."],"npcziF":["Install on"],"nqV0Kk":["This folder hasn't synced to GitHub yet. The link will work after the next sync."],"nrGWJ7":["Git identity isn't set — commits use a default author. Set yours so teammates see your name."],"nskygk":["Choose agent"],"nwtY4N":["Something went wrong"],"nxlOpL":["OpenKnowledge is using this GitHub account."],"ny6vNn":["OpenKnowledge is using a GitHub account provided by the gh CLI. There's no separate OpenKnowledge credential to disconnect."],"nzHlj8":["Close ",["0"]],"nzaV6Q":["Page thumbnails"],"o2yoFu":["Reveal in Finder, No workspace"],"o49mDZ":["Loading timeline history"],"o4dcAf":["Reveal in File Explorer, ",["hint"]],"o5gfs1":["This setting is per-machine and isn't shared with collaborators. It needs an API key set with <0>ok embeddings set-key</0>."],"o9CrsQ":["research-note"],"oAFVKX":["Failed to update the project sync default — ",["detail"]],"oAGN8p":["Remote branch <0>",["remoteCheckoutRef"],"</0> will be checked out as a new local tracking branch <1>",["trimmed"],"</1>, in its own window under <2>.ok/worktrees/</2>."],"oBXkm2":["Delete code block"],"oCHfGC":["Level"],"oCNLN8":["Toggle the bottom terminal panel. With text selected, stage it in the terminal's AI input instead."],"oCZkaG":["Copy path"],"oEgEn_":["A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and the embeddings endpoint setting."],"oJl7eO":["Unknown component: ",["componentName"]," — source editable below"],"oKBnk5":["More requests were blocked."],"oQA-cA":["Full path"],"oS1YpJ":["Open the Project Navigator."],"oXKEsy":["Delete an adjacent wiki-link or tag chip."],"oXlLi4":["Project plugins are your project's authoring standard — turn them on or off here. The choice is committed to config.yml and shared with every collaborator via git. Each enabled plugin gets its own page under Plugins in the settings sidebar."],"oYepHb":["The terminal is turned off for this project. Turn it back on to run commands here."],"of3tF-":["You picked ~/Documents. OpenKnowledge will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope."],"ogAuyr":["Back to document view"],"ohUJJM":["Plugins"],"omXJcU":["Close others"],"onTlRk":["Couldn't update skills sharing"],"optX0N":[["0"],"h ago"],"oqB2ez":["Previous match"],"osRqlv":["Open delete confirmation for the selected file-tree items."],"ot5BRK":["Duplicate selected file or folder"],"otE4aj":["Show external URL nodes"],"ou1hFW":["Toggle an ordered list."],"outYNy":["Duplicate name \\"",["keyName"],"\\""],"ovIGrT":["Local collaboration data for \\"",["docName"],"\\" could not be cleared. Reload to retry."],"p0Iq25":["Insert link"],"p9sdCy":["New ignore pattern"],"pAgkuZ":["Reopening \\"",["docName"],"\\" with a fresh local collaboration cache."],"pBROkv":["Thanks for subscribing. Watch your inbox for product updates."],"pEQFsW":["No matching projects."],"pFagOn":["Source editing"],"pHYP6v":["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pQf2Ux":[".ok/skills is back to local-only."],"pTPqMK":["Toggle a fenced code block."],"pWT04I":["Checking..."],"pWbsW6":["Loading docs"],"pZAs1T":["Failed to load outgoing links"],"pajIrl":["Could not turn off the terminal: ",["0"]],"pbwTg6":[["seconds"],"s ago"],"pckX1A":[["0","plural",{"one":["#"," use"],"other":["#"," uses"]}]],"pcqlQu":[["0","plural",{"one":["Folder"],"other":["Folders"]}]],"pgq_xf":[["0"],"/",["1"]," ",["2"]],"phM8Kh":["Found the repo but could not open the project. Please try again."],"pha01Y":["Project-level pages with no incoming graph edges."],"pkAft1":["Search failed."],"pmOGtg":["Use the default OpenAI endpoint or override it with an OpenAI-compatible base URL for Azure or a self-hosted provider."],"pmUArF":["Workspace"],"ppDgFi":["Restart with this app's version"],"psfGPX":["MCP connections"],"pvnfJD":["Dark"],"pzutoc":["Italic"],"q2kXMG":["Inline Math"],"q3TWG7":["Move to Trash"],"q4YJl_":["The terminal session ended (exit code ",["0"],")."],"q6-JVU":["Loading pages"],"q7F5am":["title"],"qAQVSD":["Page headings response was not JSON"],"qAhFeg":[["userName"]," · ",["tabCount","plural",{"one":["#"," tab"],"other":["#"," tabs"]}]],"qAx7xG":["Fixed folder in content root"],"qEEfPk":["Bug report ",["0"]],"qEIFZu":["Key ending in ",["keyHint"]],"qEue6Q":[" or "],"qFWMl-":["View as text"],"qNOgUu":["Edits at the source land here — no copy-paste drift."],"qRZh7J":["Let Tab leave the source editor instead of indenting."],"qSKu2v":["Source navigation and selection"],"qSxaOz":["Accept their deletion"],"qUB_o_":["Auto-sync is off — your edits stay local until you commit and push manually."],"qXN416":["Couldn't share skills: internal error. Please restart the app."],"qXg5W9":["File saves to <0>~/Downloads/openknowledge.skill</0>."],"qXsafh":["Publish to GitHub"],"qZv5ZR":["Config sharing toggle failed"],"q_9EcE":["Enable git auto-sync?"],"q_z77Z":["Heading levels"],"qaHyRJ":[["linkCount","plural",{"one":["#"," link"],"other":["#"," links"]}]],"qbfj1f":["Receiving objects"],"qdBUHP":["Couldn't load ",["fileName"]],"qi1F96":["Reveal in File Explorer"],"qiN9NB":["Surface"],"qiRoLb":["Summarize everything I changed this week"],"qioCwA":["Jump to page ",["pageNumber"]],"qjHMHf":["Failed to disable sync — ",["detail"]],"qmL1UG":["Uploading securely"],"qo4zCg":["Path cannot contain backslashes"],"qpQwGC":["Describe what you're working on and the agent sets it up for you."],"qvWGzP":["Collapse all"],"qyLmWw":["Source editor search panel"],"r-OJYm":["Enter a valid branch name (no spaces, no leading dot, no \\"..\\")."],"r2huLx":["Undo, redo, or undo selection changes through CodeMirror history."],"r4R7AZ":["Network error during cleanup"],"r51jLC":["File saved & Claude Desktop App opened"],"r6ncaO":["Close tab"],"r871ed":["Your knowledge base is now on GitHub at <0>",["ownerLogin"],"/",["repoName"],"</0>."],"rBc32v":["Couldn't reach the embeddings provider — press ↵ to retry"],"rD-woT":["Tell us what went wrong and we'll gather the logs. Nothing leaves your Mac until you've reviewed it."],"rFmBG3":["Color theme"],"rFw02Q":["Uploading ",["keyName"]],"rJVoVX":["Source find results"],"rNifQd":["Remove property"],"rQAQus":["Couldn't save template: ",["error"]],"rQRrkB":["yesterday"],"rSoi6g":[["displayName"]," (",["bin"],") isn't installed or on your PATH."],"rVJpLz":["On — hovering an external link sends its URL to the destination site to fetch a preview."],"rVxu1k":["No pages link here yet."],"rXz97P":["Numbered list of items."],"rZ9HZq":["To do"],"rZVMkf":["Visual editor replace input focused"],"rageVb":["Custom HTML with a live preview pane (sandboxed iframe)."],"rdU729":["Layout"],"rf6x3F":["Dock terminal to the bottom"],"rfFpcF":["Remove ",["chip"]],"rgPqOw":["Convert the current block to a paragraph."],"riqekz":["Suggestion menu navigation"],"rlUzXK":["Could not validate folder. Please try again."],"roAe2K":["Link URL"],"roiUQQ":["This page doesn't link to anything yet."],"rppgXF":["Disconnecting"],"rssK8c":["Ignore patterns (raw text)"],"rtdR4v":["Show or hide Files"],"rwrPbS":["Component boundary navigation"],"s-MGs7":["Resources"],"s-XOaI":["File name"],"s061i4":["Relative path"],"s0IDhW":["This file could not be found."],"s0J_k9":[["0","plural",{"one":["#"," key"],"other":["#"," keys"]}]],"s0_GnA":["Opening ",["openingLabel"],"…"],"s1c0ja":["Bullet List"],"s3caR3":["Deleting"],"sE7R19":["Could not load templates: ",["templatesError"],". You can still create a blank note."],"sER-bs":["Files"],"sFhaTJ":["Disambiguates similarly-named templates in the menu."],"sHrqDx":["Couldn't rename skill: ",["0"]],"sICrVf":["Restored to the version from ",["0"]],"sIGbBZ":["Convert selection to footnote"],"sIxSSP":["Resolve conflict in your terminal"],"sJK6pq":["Permission denied"],"sJWhgo":["Unknown component: ",["unregisteredComponentName"]],"sOxZaS":["Failed to load graph"],"sZ2IOu":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. It doesn't exist on your current branch (<1>",["currentLabel"],"</1>)."],"saIASg":["Second item"],"saYiIO":["Path cannot contain null bytes"],"seeS6l":["Setup OpenKnowledge in this folder?"],"shNd9t":["Slash command menu"],"si3L24":["Open an additional terminal tab. With text selected, stage it in the new tab's AI input."],"skf5Ix":["Indent or outdent source editor lines."],"sn5BEU":[["sizeText"]," · secrets redacted · ",["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]," · crash dump not redacted"],"snrVQ7":["probe failed"],"ssuwjF":["Branch"],"stlgky":["On — your search queries and the text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"sxTdZI":["Loading paths…"],"sxjyRq":["Worktrees"],"sxkWRg":["Advanced"],"t-JXbf":["Notion-style inline row for a downloadable file. Drag-drop also works."],"t18QYR":["Unpin ",["accessibleLabel"]],"t2TkQ3":["Sync paused — resolve conflicts to resume."],"t422_7":["Uninstall everywhere"],"t4sFKC":["New branch <0>",["trimmed"],"</0> will be created from the current commit, in its own worktree under <1>.ok/worktrees/</1>."],"t6w1cq":["Open a blank editor tab."],"tAPZEx":["Below"],"tHKQ6j":["Renaming"],"tP5DDk":["Apply link"],"tUvUfp":["Use a folder you already have."],"t_YqKh":["Remove"],"teD0H9":["Couldn't open a worktree for that branch."],"tfDRzk":["Save"],"tfi40B":["Failed to create page"],"tgWuMB":["Modified"],"thnPBX":["Activate the next editor tab."],"ti6aF_":["Ask ",["0"]," CLI"],"tiWX6q":["Source editor"],"tjXez2":["blog-post"],"toyw51":["Mermaid diagram controls"],"tsiTqO":["Paste your API key"],"tsyExA":["Connect your AI tools to OpenKnowledge"],"u-9fWA":["See <0>Architecture</0> for the system overview."],"u3BOHd":[["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"u3YnKw":["Could not construct share URL."],"u3wRF-":["Published"],"u6Hp4N":["Markdown"],"u7H-Wn":["Show panel (",["panelShortcutLabel"],")"],"u7U_Ij":["Link the selected text, or edit the link under the caret."],"uA_jXp":["Switch and update branch"],"uCaIdy":["GitHub sign-in is missing or expired. Reconnect to resume syncing."],"uDlyqd":["Document the architecture of this repo: create an overview page that links to a page per major module describing its responsibilities and entry points."],"uF9ruK":["Saving"],"uFOL2y":["No project skills yet. Author one to teach agents a repeatable task scoped to this knowledge base."],"uFQbYd":["Home page and entry point."],"uGaIIS":["Check out worktree"],"uH_S-u":[["loadErrorTitle"],": ",["message"]],"uKRYiW":["Sync status unavailable — server error."],"uL_Wx8":["The terminal stopped unexpectedly."],"uM6jnS":["Restore failed"],"uO9WLl":["Push"],"uQNW00":["Detached HEAD — checkout a branch to resume"],"uQewpR":["Couldn't restart the server — it's running under a different account. Restart your computer to clear it, then reopen this project."],"uWtdQR":["No templates yet. Add one in this folder's Templates section, or in Settings → Templates."],"uWx2ZP":["Last sync"],"u_lS4C":["Clone complete — opening project"],"uaUc6t":["Restart server"],"ubMwcO":["The terminal session ended (signal ",["0"],")."],"ugoTXs":["folder"],"uhJEA2":[["count","plural",{"one":["#"," more participant"],"other":["#"," more participants"]}]],"uksqrP":["Repository not found. It may have been renamed, deleted, or moved."],"un8kBM":["Creating page: ",["linkTitle"],"."],"ur2XSb":["Visual editor"],"uuoHOU":["Command failed."],"uynXup":[["tokens","plural",{"one":["token"],"other":["tokens"]}]],"v-h2hx":["Delete ",["targetGitPath"]],"v2ZW0K":["Enable terminal"],"v41fCm":["File not found"],"v75Em9":[["uploadedCount","plural",{"one":["Uploaded one file"],"other":["Uploaded ",["uploadedCount"]," files"]}]],"v77jrg":["Visual editor selection"],"v7hK0U":["Use lowercase letters, digits, and hyphens only."],"v7lbnC":["Find next match"],"vAYoCZ":["Couldn't open the worktree. Try again."],"vDXqVv":["Insert a markdown hard break."],"vEJDlt":["The file is in your Trash; the file-watcher will reconcile."],"vGeNNQ":["Copy a prompt and paste it into your agent to set up your project."],"vIxrEk":["Fit width"],"vLyv1R":["Hide"],"vQIVHc":["Folder properties"],"vWc9a0":["Type to edit; <0>⌘ Enter</0> saves, <1>Esc</1> cancels."],"vZVeFG":["Upload failed — please try again"],"vbK_ZG":["Files sidebar"],"ve8vEM":["Code expired — please try again"],"vfRlCI":["Could not copy full path"],"vfWA_g":["You picked ~/Desktop. OpenKnowledge will index everything on your desktop."],"vhAnzJ":["Turn on semantic search?"],"viwC-K":["Failed to remove project."],"vppAju":["Where newly added attachments are placed."],"vv7kpg":["Cancelled"],"vvWZnu":["Diff unavailable"],"w3tVpc":["No links yet. Add wiki links or markdown links to build a graph."],"w3vFfL":["Hide Files"],"w4hMYl":["Could not read branch state for this project. Close this dialog and open the share link again."],"w6sBjd":["Terminal settings not yet loaded — try again in a moment"],"w7SsvI":["That folder isn't an OpenKnowledge project yet. Initialize it and open?"],"w7nm4K":["Indented blockquote for citations."],"wDgmsr":["\\"",["0"],"\\" install refreshed (",["1"],")"],"wGSHzy":["Activate one of the first eight editor tabs."],"wJijgU":["Location"],"wJo9oS":["Close find"],"wQp1V3":["Mirror of <0>",["src"],"</0>"],"wT4iQr":["Open visual-editor find with replace controls expanded."],"wTcjov":["No workspace"],"wVa83H":["Couldn't create the report"],"wXO4Tg":[["hrs"],"h ago"],"w_Sphq":["Attachments"],"waFx9W":["Managed"],"wbv9xO":["Create new project"],"wbwHYD":["Enable sync"],"wccmX0":["Your embeddings provider API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search, where you can also override the endpoint."],"wdxz7K":["Source"],"weP6me":["Couldn't load docs — type @ again to retry"],"wlwXUk":["You picked ~/Downloads. Files there are usually transient — consider a stable folder instead."],"wn8EJi":["Skills teach agents repeatable tasks. Author them here; install a skill to project it into your editors' skill folders."],"wndeIl":["Project-level pages with neither incoming nor outgoing graph edges."],"wtcxiD":["Share this setup with your team?"],"wvbc1r":["Couldn't open document"],"wzq9Rv":["A branch with that name already exists. Open its worktree from the switcher instead."],"x-5mJ1":["Install on all"],"x2fr_j":["Graph"],"x3-2ta":[["packName"]," initialized (",["projectEntries","plural",{"one":["#"," entry"],"other":["#"," entries"]}],")"],"x57cJf":["Open link"],"xCJdfg":["Clear"],"xCdTnb":["Close new tab"],"xDBki3":["Heading suggestions"],"xFQRu4":["I already have it locally"],"xG4tb6":["Lost connection to \\"",["docName"],"\\"."],"xHGM4U":["Hide HTML preview"],"xK291b":["Two-page (odd)"],"xNyj3h":["Reinstall for Claude Chat & Cowork"],"xOTzt5":["just now"],"xSVO3J":["What gets created"],"xV5sXw":[["0"],"w ago"],"xWEvuo":["Ask AI"],"xXo8FT":["Save failed: ",["error"]],"xYMPyY":["Paste was incomplete — ",["chunksCompleted"]," of ",["totalChunks"]," chunks landed.",["restoreSuffix"]],"xaDWAI":["Switch project"],"xbdtfY":["Markdown source"],"xc4g25":["Parse failed"],"xeXS4P":["Or use a starter pack"],"xeiujy":["Text"],"xhlFsx":["Inherited — set a value here to replace it."],"xi9KGG":["Show Terminal"],"xiv-dW":["No files yet."],"xloBjn":["Relative Path"],"xnP32l":["No description yet — add one so agents know when to use this skill."],"xrVr_k":["Couldn't create skill: ",["0"]],"xsZhu-":["Page number"],"xzktOa":["Edit wiki link"],"y1t8bQ":["Settings sections"],"y3aU20":["Save changes"],"y46m5r":["The desktop app isn't responding. Refresh and try again."],"y5FUYi":["Suggestion menu open"],"y5UgU8":["Disable ",["0"]],"y8B54M":["Couldn't send your prompt — please try again."],"yCX4jp":[" Your selection could not be restored."],"yEJ-sl":["The preview blocks resources that don't meet its security rules (for example plain http:// URLs, or code that uses eval). The content above may render incompletely."],"yFyZMJ":["No pages matched \\"",["semanticQueryText"],"\\" by meaning."],"yH7T4q":[["failedCount","plural",{"one":["1 file failed to upload"],"other":[["failedCount"]," files failed to upload"]}]],"yHikCO":["Open CodeMirror's go-to-line prompt."],"yIPXut":["Preparing search"],"yKu_3Y":["Restore"],"yLEyuq":["Product updates in your inbox."],"yLq4w4":["Separator"],"yMgL_E":["Find field navigation"],"yQE2r9":["Loading"],"yQyglE":["No matching docs"],"yR5LHI":["Enter a 6-digit hex like #1A2B3C"],"yUxR-Q":["Expand ",["keyName"]],"yWSvcf":["Content root"],"yWWThY":["Asset reference"],"yYR6za":["Display text"],"yZmvQ4":["This project's server (v",["0"],") is newer than this app (v",["1"],")."],"y_5CE8":["Item ",["0"]],"y_K0Dz":["What happened?"],"yaPGPa":["Open a project to manage its AI tool connections."],"yf5auF":["Search rules by id, alias, or name"],"yf5r22":[["keyName"]," type: ",["typeLabel"]," (inherited from folder properties; not editable here)"],"yhdqox":["Installed — ok is available in external terminals. Unchecking removes it; OpenKnowledge's built-in terminal and AI tools keep working."],"yitgD9":["Failed to load skill targets: ",["0"]],"yjExfe":["Branch <0>",["shareBranch"],"</0> is checked out in:"],"ylXj1N":["Selected"],"ymWJLd":["Show ",["0"]," more"],"ynIa4S":["Visual editor list item"],"ypw6My":["Showing top ",["0"]," headings — keep typing to narrow"],"ysxgu8":["project"],"yutJKi":["Checklist with checkboxes."],"yvG-l1":["Open source lint panel"],"yvHDYG":["Claude Desktop"],"yz7wBu":["Close"],"yzF66j":["Link"],"yzGPkm":["Expand graph"],"yzYE4B":["A picture of the app from just before you opened this. It isn't redacted, so check the preview and uncheck it if anything shouldn't be shared."],"z-lawV":["worktree"],"z0a2EA":["Diagram from Mermaid source — flowchart, sequence, class, state, ER, gantt, pie."],"z1uNN0":["No emoji found."],"z2JdQ-":["Config sharing unchanged — see details below."],"z2funE":["Full Path"],"z5pqI8":["Cannot upload: no document is open"],"z60Lgn":["Saves the file to <0>~/Downloads/openknowledge.skill</0> and opens the Claude Desktop App. Requires Node.js or Bun on your PATH."],"zAJzIg":["Problems in ",["0"]],"zAsDLY":["Graph visualization of document links"],"zKxoPm":["Couldn't rename \\"",["0"],"\\": ",["1"]],"zL0LPh":["Global outside text fields"],"zLGXna":["No starter packs available."],"zLak8b":["Activate new tab"],"zQBg2C":["Move the current block up or down one position."],"zUhPuR":["Open containing folder, ",["hint"]],"zXj1rA":["Search by meaning"],"zYp8Sr":["A <0>Modified</0> badge marks rules your config sets explicitly — directly, or inherited through <1>extends</1>. Unmarked rules keep their default state."],"zZ_I5K":["Open project menu"],"zaXlhf":["The properties block at the top of this doc has a formatting error. Switch to source mode to fix it."],"zbymaY":[["0"],"m ago"],"zcmYx4":["git configuration is unavailable"],"zd00pH":["Copy Path"],"zgSFyG":["External link"],"zkz0Fg":["Set up syncing"],"zlErBl":["Page headings error response did not match RFC 9457"],"zo3Dl7":["Toggle thumbnails"],"zrP8HX":["Frontmatter every document created from this template starts with. Values are YAML — a list is <0>[a, b]</0>; <1>{",["date"],"}</1> fills in on create."],"ztKII6":["Failed to add item"],"zvjCD4":["Detailed diagnostics"],"zwBp5t":["Private"],"zyKa-I":["Star us on GitHub"]}`)},Wh=`en`;_l.load(Wh,Uh.messages),_l.activate(Wh);function Gh(e){if(e===null)return`none`;switch(e.kind){case`doc`:case`folder-index`:return`doc`;case`folder`:return`folder`;case`asset`:case`skill-file`:case`large-file`:return`asset`;case`missing`:return`none`}}var Kh={newFile:{id:`HdkSiO`},newFolder:{id:`96G6Re`},openGraph:{id:`3Fcb0I`},initializeStarterPack:{id:`fWi7pn`},newProject:{id:`gKi-a_`},openFolderOnDisk:{id:`WPwDin`},switchProject:{id:`xaDWAI`},settings:{id:`Tz0i8g`},installClaudeDesktop:{id:`62Pc08`},reportBug:{id:`cd5EXh`},newFromTemplate:{id:`Uuj_R4`},rename:{id:`2wxgft`},duplicate:{id:`euc6Ns`},moveToTrash:{id:`q3TWG7`},revealInFinder:{id:`LtSYdi`},copyFullPath:{id:`Up2_7p`},copyRelativePath:{id:`M6mvVi`},closeTab:{id:`r6ncaO`},newWorktree:{id:`DXd9LM`},switchWorktree:{id:`8Vq20-`},sidebarShow:{id:`151wvk`},sidebarHide:{id:`Q1mtyd`},docPanelShow:{id:`fSRzLo`},docPanelHide:{id:`GSYWCm`},terminalShow:{id:`xi9KGG`},terminalHide:{id:`9xCnv8`},showHiddenFiles:{id:`XcGbim`},showOkFolders:{id:`GHsJb8`},showOnlyMarkdownFiles:{id:`WkTLN7`},showSkillsSection:{id:`NF_Wcg`},expandAll:{id:`OlAl5i`},collapseAll:{id:`qvWGzP`},newTerminal:{id:`ZBxvV3`},killTerminal:{id:`5_j-DA`},checkForUpdates:{id:`WMCwmR`},setUpIntegrations:{id:`AhoGwP`},checkSpelling:{id:`ZgJVnp`},openOnGithub:{id:`LeGeTf`}},qh={"new-file":tr,"new-folder":wm,"open-graph":zm,"initialize-starter-pack":Vm,"new-project":Oe,"open-folder":Sc,"switch-project":Dt,settings:Qm,"install-claude-desktop":Ri,"report-bug":ze,"new-from-template":tr,rename:yc,duplicate:bc,"move-to-trash":Wc,"reveal-in-finder":Sc,"copy-full-path":bc,"copy-relative-path":bc,"close-tab":ll,"new-worktree":ts,"switch-worktree":ts,"toggle-sidebar":rt,"toggle-doc-panel":Wm,"toggle-terminal":ah,"toggle-show-hidden-files":xc,"toggle-show-ok-folders":Tm,"toggle-show-only-markdown-files":ir,"toggle-show-skills-section":pc,"expand-all-tree":vh,"collapse-all-tree":Sm,"new-terminal":ah,"kill-terminal":ah,"check-for-updates":Uc,"set-up-integrations":nm,"toggle-spell-check":nh,"open-github":Hh},Jh={"new-file":e=>{e.closePalette(),e.openNewItemDialog(`file`)},"new-folder":e=>{e.closePalette(),e.openNewItemDialog(`folder`)},"open-graph":e=>{e.closePalette(),Bh(`graph`)},"initialize-starter-pack":e=>{e.closePalette(),e.openSeedDialog()},"new-project":e=>{e.closePalette(),e.openCreateProjectDialog()},"open-folder":e=>{let t=e.bridge;t&&e.runAction(async()=>{let e=await t.dialog.openFolder();e&&await t.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})})},"switch-project":e=>{let t=e.bridge;t&&e.runAction(()=>t.navigator.open(),_l._({id:`jol95m`}))},settings:e=>{e.closePalette(),window.location.hash!==`#settings`&&(window.location.hash=Ki)},"install-claude-desktop":e=>{e.closePalette(),window.location.hash=`#install-claude-desktop`},"report-bug":e=>{e.closePalette(),e.openReportBugDialog()},"check-for-updates":e=>e.runAction(async()=>{await e.bridge?.update.checkNow()}),"set-up-integrations":e=>e.runAction(async()=>{await e.bridge?.mcpWiring.reconfigure()}),"toggle-spell-check":e=>e.runAction(async()=>{await e.bridge?.spellcheck.toggle()}),"open-github":e=>e.openExternalUrl(Bo)};function Yh(e){return{host:e.bridge===null?`web`:`desktop`,activeTargetKind:e.contextualTargetKind,singleFile:e.singleFile,terminalLive:e.viewMenuState.terminalLive===!0,canExpandAll:e.viewMenuState.canExpandAll!==!1,canCollapseAll:e.viewMenuState.canCollapseAll!==!1,hasActiveDoc:e.activeDocName!==null,showInstallSkill:!1}}function Xh(e,t){if(e.stateToggle){let n=t.viewMenuState[e.stateToggle.stateField]===!0?e.stateToggle.hideKey:e.stateToggle.showKey;return _l._(Kh[n])}return _l._(Kh[e.labelKey])}function Zh(e){let t=e.menuActionId;return e=>e.emitMenuAction(t)}function Qh(e){let t=e.palette;if(!t)throw Error(`command ${e.id} has no palette presence`);let n=qh[e.id];if(!n)throw Error(`command ${e.id} has no palette icon`);let r=e.checkField;return{id:e.id,menuActionId:e.menuActionId,label:t=>Xh(e,t),keywords:e.keywords,icon:n,group:t.group,visibility:t.visibility,shortcutId:e.shortcutId,shortcutDesktopOnly:e.shortcutDesktopOnly,checked:r?e=>e.viewMenuState[r]===!0:void 0,available:t=>ba(e.availability,Yh(t)),dispatch:Jh[e.id]??Zh(e)}}var $h=Co.flatMap(e=>e.palette?[Qh(e)]:[]),eg=`ok-omnibar-recents-v1`,tg=10;function ng(e){return typeof e==`object`&&!!e&&(e.kind===`file`||e.kind===`folder`)&&typeof e.path==`string`&&typeof e.lastOpenedAt==`string`}function rg(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function ig(e,t){return`${e}:${t}`}function ag(e){let t=rg(e);if(!t)return[];try{let e=t.getItem(eg);if(!e)return[];let n=JSON.parse(e);return Array.isArray(n)?n.filter(ng).slice(0,tg):[]}catch{return[]}}function og(e,t){let n=rg(t);if(n)try{n.setItem(eg,JSON.stringify(e.slice(0,tg)))}catch(e){console.warn(`[omnibar] Failed to save recent entries:`,e)}}function sg(e,t){return[t,...e.filter(e=>e.kind!==t.kind||e.path!==t.path)].slice(0,tg)}function cg(e,t){return e.filter(e=>t.has(ig(e.kind,e.path)))}var lg=50,ug=50,dg=``,fg=null;function pg(e){return e.trim().toLowerCase()}function mg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function hg(e){let t=e.trim();return t?[...new Set(t.split(/\s+/).filter(Boolean))].sort((e,t)=>t.length-e.length):[]}function gg(e,t,n=new Map,r=new Map,i=new Set){let a=[],o=new Set;for(let t of e){o.add(t);let e=r.get(t),i=e?.modified,s=n.get(t);a.push({kind:`file`,path:t,name:ho(t),...s&&{title:s},...e?.docExt&&{docExt:e.docExt},...i&&{modifiedTs:Date.parse(i)}})}for(let e of i)o.has(e)||(o.add(e),a.push({kind:`file`,path:e,name:ho(e),bodyIndexed:!1}));for(let e of t)a.push({kind:`folder`,path:e,name:ho(e)});return a.sort((e,t)=>{let n=e.path.localeCompare(t.path);return n===0?e.kind===t.kind?0:e.kind===`folder`?-1:1:n}),a}function _g(e){return _a({kind:e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`,path:e.path,title:e.title??e.name,modifiedTs:e.modifiedTs??0})}function vg(e){return{entries:e,byId:new Map(e.map(e=>[`${e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`}:${e.path}`,e])),corpus:ao(e.map(_g))}}function yg(e){return e.map(e=>`${e.kind}\u0000${e.path}\u0000${e.title??``}\u0000${e.docExt??``}\u0000${e.modifiedTs??0} ${e.bodyIndexed===!1?`0`:`1`}`).join(``)}function bg(e){let t=yg(e);return fg&&dg===t?fg:(dg=t,fg=vg(e),fg)}function xg(e,t,n=lg){return Sg(bg(e),t,n)}function Sg(e,t,n=lg){let r=pg(t);return r?Ra(e.corpus,r,{intent:`omnibar`,limit:n,scopes:[`page`,`folder`,`file`]}).map(t=>e.byId.get(t.document.id)).filter(e=>e!==void 0):e.entries.slice(0,20)}function Cg(e,t){let n=hg(t);if(n.length===0||e.length===0)return[{text:e,match:!1,start:0}];let r=RegExp(`(${n.map(mg).join(`|`)})`,`gi`),i=[],a=0;for(let t of e.matchAll(r)){let n=t.index??0;n>a&&i.push({text:e.slice(a,n),match:!1,start:a}),i.push({text:t[0],match:!0,start:n}),a=n+t[0].length}return a<e.length&&i.push({text:e.slice(a),match:!1,start:a}),i.length>0?i:[{text:e,match:!1,start:0}]}function wg(e){if(e.kind!==`page`&&e.kind!==`folder`&&e.kind!==`file`||typeof e.path!=`string`)return null;let t=ho(e.path);return{kind:e.kind===`folder`?`folder`:`file`,path:e.path,name:t,...e.kind===`file`&&{bodyIndexed:!1},...e.title&&{title:e.title},...e.snippet&&{snippet:e.snippet},...typeof e.score==`number`&&{score:e.score}}}async function Tg(e,t={}){let n=e.trim();if(!n)return{entries:[],truncated:!1,ready:!0};let r=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:n,intent:`full_text`,ranking:t.semantic?`relevance`:`navigation`,scopes:[`page`,`folder`,`content`,`file`],limit:t.limit??ug,source:`omnibar`,...t.semantic?{semantic:!0}:{}}),signal:t.signal});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(El(e)??`Search failed with status ${r.status}`)}let i=await r.json();return{entries:(i.results??[]).map(wg).filter(e=>!!e),truncated:i.truncated===!0,ready:i.ready!==!1}}function Eg(e,t,n=[]){let r=pg(t);return r?pg([e,...n].join(` `)).includes(r):!0}function Dg(e,t,n={}){if(e.trim()===``)return`idle`;if(t.length===0)return`empty`;if(n.truncated)return`truncated`;for(let e of t)if(`snippet`in e&&typeof e.snippet==`string`&&e.snippet.length>0)return`content`;return`name-only`}function Og(e){let{query:t,firedQuery:n,status:r,resultCount:i}=e,a=i>0,o=t!==``&&t!==n,s=a&&(r===`loading`||t!==n),c=null;r===`error`&&t!==``?c={kind:`retry`,query:t}:o&&r!==`loading`&&(c={kind:`search`,query:t});let l=null;return r===`loading`?l=`searching`:t===``&&!a?l=`empty`:r===`success`&&!o&&!a&&(l=`no-results`),{submit:c,results:{show:a,dimmed:s,forQuery:a?n:null},notice:l}}var kg=`tag:`;function Ag(e,t){if(!e.toLowerCase().startsWith(`tag:`))return{kind:`normal`,query:e};let n=e.slice(4).replace(/^\s+/,``).trim();return n&&t.has(n)?{kind:`tag-docs`,tagName:n}:{kind:`tag-list`,query:n}}function jg(e,t){return et(e,t)}var Mg=_e;async function Ng(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/tags/${e} responded with ${t.status}`);let n=await t.json();return Array.isArray(n.docs)?n.docs:[]}var Pg=[`.md`,`.mdx`];function Fg(e){let t=e.toLowerCase();for(let e of Pg)if(t.endsWith(e))return e;return null}var Ig={local:0,inherited:1};function Lg(e){return[...e].sort((e,t)=>{let n=Ig[e.scope]-Ig[t.scope];if(n!==0)return n;let r=(e.title??e.name).toLowerCase(),i=(t.title??t.name).toLowerCase();return r.localeCompare(i)})}var Rg=`__blank__`;function zg(e){return e.trim()?e.includes(`..`)?`dotdot`:e.startsWith(`/`)?`leading-slash`:e.includes(`\\`)?`backslash`:e.includes(`\0`)?`null-byte`:null:`empty`}function Bg(e){switch(e){case`empty`:return{id:`hYDc6B`};case`dotdot`:return{id:`Wyxs0x`};case`leading-slash`:return{id:`OYnx7O`};case`backslash`:return{id:`qo4zCg`};case`null-byte`:return{id:`saYiIO`}}}function Vg(e){let t=e.fileName.trim(),n=Fg(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function Hg(e,t){return vl(e.target)?!1:Tl(e,`new-item`,t)}function Ug(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function Wg(e){let t=(0,$.c)(136),{open:n,onOpenChange:r,kind:i,initialDir:a,suggestedName:o,initialTemplate:s,defaultToTemplate:c,description:l,onCreated:u,folderConfig:d}=e,{_:f}=jt(),{addPage:p}=Ls(),m=Ni(d?null:a),h=d??m,[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(Rg),[S,C]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(null),A=(0,Q.useId)(),j=(0,Q.useId)(),M=(0,Q.useId)(),N=(0,Q.useId)(),P=(0,Q.useId)(),[F,I]=(0,Q.useState)(!1),L=(0,Q.useRef)(null),R=(0,Q.useRef)(null),z,B;t[0]!==s||t[1]!==i||t[2]!==n||t[3]!==o?(z=()=>{n&&(T(null),k(null),D(!1),y(``),x(i===`file`&&s?s:Rg),C(!1),I(!1),_(i===`file`?o??`untitled`:`index`))},B=[n,i,o,s],t[0]=s,t[1]=i,t[2]=n,t[3]=o,t[4]=z,t[5]=B):(z=t[4],B=t[5]),(0,Q.useEffect)(z,B);let V;t[6]!==h.state.data||t[7]!==h.state.status?(V=h.state.status===`ready`?Lg(h.state.data.folder.templates_available??[]):[],t[6]=h.state.data,t[7]=h.state.status,t[8]=V):V=t[8];let H=V,U;t[9]!==h.state.data||t[10]!==h.state.status||t[11]!==n||t[12]!==b?(U=()=>{n&&b!==Rg&&h.state.status===`ready`&&((h.state.data.folder.templates_available??[]).some(e=>e.name===b)||x(Rg))},t[9]=h.state.data,t[10]=h.state.status,t[11]=n,t[12]=b,t[13]=U):U=t[13];let W;t[14]!==h.state||t[15]!==n||t[16]!==b?(W=[n,b,h.state],t[14]=h.state,t[15]=n,t[16]=b,t[17]=W):W=t[17],(0,Q.useEffect)(U,W);let G;t[18]!==c||t[19]!==h.state.data||t[20]!==h.state.status||t[21]!==s||t[22]!==n||t[23]!==S?(G=()=>{if(!n||!c||s||S||h.state.status!==`ready`)return;let e=Lg(h.state.data.folder.templates_available??[]);e.length>0&&x(e[0].name)},t[18]=c,t[19]=h.state.data,t[20]=h.state.status,t[21]=s,t[22]=n,t[23]=S,t[24]=G):G=t[24];let K;t[25]!==c||t[26]!==h.state||t[27]!==s||t[28]!==n||t[29]!==S?(K=[n,c,s,S,h.state],t[25]=c,t[26]=h.state,t[27]=s,t[28]=n,t[29]=S,t[30]=K):K=t[30],(0,Q.useEffect)(G,K);let ee=i===`file`,te=h.state.status===`loading`||h.state.status===`idle`,q=h.state.status===`error`?h.state.message:null,ne;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(e){_(e),T(null)},t[31]=ne):ne=t[31];let re=ne,ie;t[32]!==g||t[33]!==v||t[34]!==a||t[35]!==i?(ie=function(){return Vg({kind:i,initialDir:a,fileName:g,folderName:v})},t[32]=g,t[33]=v,t[34]=a,t[35]=i,t[36]=ie):ie=t[36];let ae=ie,oe;t[37]!==f||t[38]!==g||t[39]!==v||t[40]!==i?(oe=function(){if(i===`folder`){let e=zg(v.trim());if(e)return{message:f({id:`ODGGlj`,values:{detail:f(Bg(e))}}),field:`folder`}}let e=zg(g.trim());return e?{message:f(Bg(e)),field:`file`}:null},t[37]=f,t[38]=g,t[39]=v,t[40]=i,t[41]=oe):oe=t[41];let se=oe,ce;t[42]!==E||t[43]!==g||t[44]!==v||t[45]!==i?(ce=E||!g.trim()||i===`folder`&&!v.trim(),t[42]=E,t[43]=g,t[44]=v,t[45]=i,t[46]=ce):ce=t[46];let le=ce,ue;t[47]!==f||t[48]!==p||t[49]!==ae||t[50]!==se||t[51]!==i||t[52]!==u||t[53]!==r||t[54]!==b?(ue=async function(){let e=se();if(e){T(e.message),k(e.field);return}D(!0),T(null),k(null);let t=ae(),n=i===`file`&&b!==Rg?b:void 0,a={path:t};n!==void 0&&(a.template=n);try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(a)}),t=e.status,n=await At(e,f({id:`d2uTPx`,values:{status:t}}));if(!n.ok){D(!1),T(n.title),k(`form`);return}let o=oo.safeParse(n.body);if(D(!1),!o.success){T(f(i===`folder`?{id:`K1ckLX`}:{id:`fJgQHX`})),k(`form`);return}let s=o.data.docName;r(!1),window.location.hash=`#/${s}`,p(s),Jl([`files`,`backlinks`,`graph`]),u?.(s)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),D(!1),T(f({id:`HIb0vl`})),k(`form`)}},t[47]=f,t[48]=p,t[49]=ae,t[50]=se,t[51]=i,t[52]=u,t[53]=r,t[54]=b,t[55]=ue):ue=t[55];let de=ue,fe;t[56]!==f||t[57]!==a?(fe=a||f({id:`L6Hhh6`}),t[56]=f,t[57]=a,t[58]=fe):fe=t[58];let pe=fe,me;t[59]===i?me=t[60]:(me=(0,Z.jsx)(On,{children:i===`file`?(0,Z.jsx)(J,{id:`HdkSiO`}):(0,Z.jsx)(J,{id:`96G6Re`})}),t[59]=i,t[60]=me);let he;t[61]!==l||t[62]!==pe?(he=l??(0,Z.jsx)(J,{id:`NvOvTi`,values:{dirDisplay:pe},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})}}),t[61]=l,t[62]=pe,t[63]=he):he=t[63];let ge;t[64]===he?ge=t[65]:(ge=(0,Z.jsx)(Dn,{children:he}),t[64]=he,t[65]=ge);let _e;t[66]!==me||t[67]!==ge?(_e=(0,Z.jsxs)(Mn,{children:[me,ge]}),t[66]=me,t[67]=ge,t[68]=_e):_e=t[68];let ve;t[69]!==b||t[70]!==ee||t[71]!==N||t[72]!==F||t[73]!==P||t[74]!==H||t[75]!==q||t[76]!==te?(ve=ee&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{id:N,className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`f65AOQ`})}),q?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,children:(0,Z.jsx)(J,{id:`sE7R19`,values:{templatesError:q}})}):null,(0,Z.jsx)(Kg,{triggerId:P,labelledById:N,open:F,onOpenChange:I,value:b,onValueChange:e=>{x(e),C(!0)},templates:H,loading:te}),!te&&!q&&H.length===0?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`uWtdQR`})}):null]}),t[69]=b,t[70]=ee,t[71]=N,t[72]=F,t[73]=P,t[74]=H,t[75]=q,t[76]=te,t[77]=ve):ve=t[77];let ye;t[78]!==f||t[79]!==w||t[80]!==O||t[81]!==A||t[82]!==j||t[83]!==v||t[84]!==i?(ye=i===`folder`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:j,children:(0,Z.jsx)(J,{id:`cqQyPB`})}),(0,Z.jsx)(gl,{ref:R,id:j,value:v,onChange:e=>{y(e.target.value),T(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":w&&(O===`folder`||O===`form`)?A:void 0,"aria-invalid":w&&(O===`folder`||O===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=zg(v.trim());if(t){T(f({id:`ODGGlj`,values:{detail:f(Bg(t))}})),k(`folder`);return}L.current?.focus()}}})]}),t[78]=f,t[79]=w,t[80]=O,t[81]=A,t[82]=j,t[83]=v,t[84]=i,t[85]=ye):ye=t[85];let be;t[86]===i?be=t[87]:(be=i===`folder`?(0,Z.jsx)(J,{id:`jjtmV_`}):(0,Z.jsx)(J,{id:`s-XOaI`}),t[86]=i,t[87]=be);let xe;t[88]!==M||t[89]!==be?(xe=(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:M,children:be}),t[88]=M,t[89]=be,t[90]=xe):xe=t[90];let Se;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(Se=e=>re(e.target.value),t[91]=Se):Se=t[91];let Ce=i===`file`,we=w&&(O===`file`||O===`form`)?A:void 0,Te=w&&(O===`file`||O===`form`)?!0:void 0,Ee;t[92]!==de||t[93]!==le?(Ee=e=>{e.key===`Enter`&&!le&&de()},t[92]=de,t[93]=le,t[94]=Ee):Ee=t[94];let De;t[95]!==M||t[96]!==g||t[97]!==Ce||t[98]!==we||t[99]!==Te||t[100]!==Ee?(De=(0,Z.jsx)(gl,{ref:L,id:M,value:g,onChange:Se,placeholder:`my-note`,autoFocus:Ce,"aria-describedby":we,"aria-invalid":Te,onFocus:Gg,onKeyDown:Ee}),t[95]=M,t[96]=g,t[97]=Ce,t[98]=we,t[99]=Te,t[100]=Ee,t[101]=De):De=t[101];let Oe;t[102]!==w||t[103]!==A?(Oe=w&&(0,Z.jsx)(`p`,{id:A,role:`alert`,className:`text-1sm text-destructive`,children:w}),t[102]=w,t[103]=A,t[104]=Oe):Oe=t[104];let ke;t[105]!==xe||t[106]!==De||t[107]!==Oe?(ke=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[xe,De,Oe]}),t[105]=xe,t[106]=De,t[107]=Oe,t[108]=ke):ke=t[108];let Ae;t[109]!==ve||t[110]!==ye||t[111]!==ke?(Ae=(0,Z.jsxs)(An,{className:`space-y-6 pb-1`,children:[ve,ye,ke]}),t[109]=ve,t[110]=ye,t[111]=ke,t[112]=Ae):Ae=t[112];let je;t[113]===r?je=t[114]:(je=()=>r(!1),t[113]=r,t[114]=je);let Me;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,Z.jsx)(J,{id:`dEgA5A`}),t[115]=Me):Me=t[115];let Ne;t[116]!==E||t[117]!==je?(Ne=(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:je,disabled:E,children:Me}),t[116]=E,t[117]=je,t[118]=Ne):Ne=t[118];let Pe;t[119]===E?Pe=t[120]:(Pe=E?(0,Z.jsx)(J,{id:`E9bKSA`}):(0,Z.jsx)(J,{id:`hYgDIe`}),t[119]=E,t[120]=Pe);let Fe;t[121]!==de||t[122]!==le||t[123]!==Pe?(Fe=(0,Z.jsx)(Y,{onClick:de,disabled:le,children:Pe}),t[121]=de,t[122]=le,t[123]=Pe,t[124]=Fe):Fe=t[124];let Ie;t[125]!==Ne||t[126]!==Fe?(Ie=(0,Z.jsxs)(jn,{children:[Ne,Fe]}),t[125]=Ne,t[126]=Fe,t[127]=Ie):Ie=t[127];let Le;t[128]!==_e||t[129]!==Ae||t[130]!==Ie?(Le=(0,Z.jsxs)(kn,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[_e,Ae,Ie]}),t[128]=_e,t[129]=Ae,t[130]=Ie,t[131]=Le):Le=t[131];let Re;return t[132]!==r||t[133]!==n||t[134]!==Le?(Re=(0,Z.jsx)(Nn,{open:n,onOpenChange:r,children:Le}),t[132]=r,t[133]=n,t[134]=Le,t[135]=Re):Re=t[135],Re}function Gg(e){return Ug(e.currentTarget)}function Kg(e){let t=(0,$.c)(66),{triggerId:n,labelledById:r,open:i,onOpenChange:a,value:o,onValueChange:s,templates:c,loading:l}=e,{_:u}=jt(),d=(0,Q.useId)(),f;if(t[0]!==c||t[1]!==o){let e;t[3]===o?e=t[4]:(e=e=>e.name===o,t[3]=o,t[4]=e),f=c.find(e),t[0]=c,t[1]=o,t[2]=f}else f=t[2];let p=f,m=o===Rg,h=i?d:void 0,g=`${r} ${n}`,_;t[5]!==m||t[6]!==l||t[7]!==p?.name||t[8]!==p?.title||t[9]!==o?(_=l?(0,Z.jsx)(J,{id:`Hl89Qd`}):m?(0,Z.jsx)(J,{id:`E7BhZn`}):p?.title??p?.name??o,t[5]=m,t[6]=l,t[7]=p?.name,t[8]=p?.title,t[9]=o,t[10]=_):_=t[10];let v;t[11]===_?v=t[12]:(v=(0,Z.jsx)(`span`,{className:`truncate`,children:_}),t[11]=_,t[12]=v);let y;t[13]!==m||t[14]!==l||t[15]!==p?(y=!l&&!m&&p?(0,Z.jsx)(Xg,{entry:p}):null,t[13]=m,t[14]=l,t[15]=p,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(lm,{className:`ml-2 size-4 shrink-0 opacity-50`,"aria-hidden":`true`}),t[20]=x):x=t[20];let C;t[21]!==l||t[22]!==i||t[23]!==h||t[24]!==g||t[25]!==b||t[26]!==n?(C=(0,Z.jsx)(se,{asChild:!0,children:(0,Z.jsxs)(Y,{id:n,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":i,"aria-haspopup":`listbox`,"aria-controls":h,"aria-labelledby":g,disabled:l,className:`w-full justify-between font-normal`,children:[b,x]})}),t[21]=l,t[22]=i,t[23]=h,t[24]=g,t[25]=b,t[26]=n,t[27]=C):C=t[27];let w;t[28]===u?w=t[29]:(w=u({id:`UQAp48`}),t[28]=u,t[29]=w);let T;t[30]===w?T=t[31]:(T=(0,Z.jsx)(de,{placeholder:w}),t[30]=w,t[31]=T);let E;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`c8iK2Y`})}),t[32]=E):E=t[32];let D;if(t[33]!==a||t[34]!==s||t[35]!==c||t[36]!==o){let e;t[38]!==a||t[39]!==s||t[40]!==o?(e=e=>{let t=e.title??e.name,n=e.title&&e.title!==e.name?e.name:void 0,r=`${e.scope}:${e.source_folder}:${e.name}`;return(0,Z.jsxs)(le,{value:r,keywords:[t,e.name,e.description??``,e.scope,e.source_folder??``],onSelect:()=>{s(e.name),a(!1)},className:`items-start gap-3`,children:[(0,Z.jsx)(As,{className:X(`mt-1 size-4 shrink-0`,o===e.name?`opacity-100`:`opacity-0`),"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:t}),n?(0,Z.jsx)(`code`,{className:`font-mono text-2xs text-muted-foreground shrink-0`,children:n}):null,(0,Z.jsx)(Xg,{entry:e,className:`ml-auto`})]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description}):null]})]},r)},t[38]=a,t[39]=s,t[40]=o,t[41]=e):e=t[41],D=c.map(e),t[33]=a,t[34]=s,t[35]=c,t[36]=o,t[37]=D}else D=t[37];let O;t[42]!==a||t[43]!==s?(O=()=>{s(Rg),a(!1)},t[42]=a,t[43]=s,t[44]=O):O=t[44];let k=o===Rg?`opacity-100`:`opacity-0`,A;t[45]===k?A=t[46]:(A=X(`mt-1 size-4 shrink-0`,k),t[45]=k,t[46]=A);let j;t[47]===A?j=t[48]:(j=(0,Z.jsx)(As,{className:A,"aria-hidden":`true`}),t[47]=A,t[48]=j);let M;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`E7BhZn`})}),t[49]=M):M=t[49];let N;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[M,(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(0,Z.jsx)(J,{id:`hZoBHK`})})]}),t[50]=N):N=t[50];let P;t[51]!==O||t[52]!==j?(P=(0,Z.jsxs)(le,{value:`Blank note empty`,onSelect:O,className:`items-start gap-3`,children:[j,N]}),t[51]=O,t[52]=j,t[53]=P):P=t[53];let F;t[54]!==d||t[55]!==D||t[56]!==P?(F=(0,Z.jsxs)(pe,{id:d,className:`subtle-scrollbar`,children:[E,D,P]}),t[54]=d,t[55]=D,t[56]=P,t[57]=F):F=t[57];let I;t[58]!==T||t[59]!==F?(I=(0,Z.jsx)(re,{className:`w-[var(--radix-popover-trigger-width)] p-0`,align:`start`,onOpenAutoFocus:Yg,onWheel:Jg,onTouchMove:qg,children:(0,Z.jsxs)(S,{children:[T,F]})}),t[58]=T,t[59]=F,t[60]=I):I=t[60];let L;return t[61]!==a||t[62]!==i||t[63]!==I||t[64]!==C?(L=(0,Z.jsxs)(ae,{open:i,onOpenChange:a,children:[C,I]}),t[61]=a,t[62]=i,t[63]=I,t[64]=C,t[65]=L):L=t[65],L}function qg(e){e.stopPropagation()}function Jg(e){e.stopPropagation()}function Yg(e){e.preventDefault(),e.currentTarget.querySelector(`[cmdk-input]`)?.focus()}function Xg(e){let t=(0,$.c)(7),{entry:n,className:r}=e;if(n.scope===`inherited`){let e;t[0]===r?e=t[1]:(e=X(`shrink-0 text-2xs`,r),t[0]=r,t[1]=e);let i;t[2]===n.source_folder?i=t[3]:(i=n.source_folder||(0,Z.jsx)(J,{id:`ZNK2Tq`}),t[2]=n.source_folder,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,Z.jsx)(Ps,{variant:`gray`,className:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}return null}function Zg(e){return e.split(`/`).pop()??e}function Qg(e,t){let n=[];for(let r of t?.folders??[]){let t=`${r.path}/.ok/templates/`,i=e.created.filter(e=>e.kind===`file`&&(e.path.startsWith(t)||e.path.includes(`/${t}`))).map(e=>Zg(e.path)),a=i.length,o=e.created.some(e=>e.kind===`folder`&&(e.path===r.path||e.path.endsWith(`/${r.path}`)));(a>0||o)&&n.push({path:r.path,summary:r.summary,templateCount:a,templates:i})}return n}function $g(e){return e.created.filter(e=>e.kind===`file`&&!e.path.split(`/`).includes(`.ok`)).map(e=>({path:e.path,name:Zg(e.path)}))}function e_(e){let t=(0,$.c)(17),{plan:n,selectedPack:r}=e,{_:i}=jt(),a,o,s,c;if(t[0]!==i||t[1]!==n||t[2]!==r){let e=Qg(n,r),l=$g(n),u=n.packSkill?.pending?n.packSkill:void 0,d=e.length,f=l.length,p=e.reduce(s_,0),m=+!!u,h={"log.md":i({id:`EoaQyO`}),"USER.md":i({id:`bV6DJA`}),"SOUL.md":i({id:`Waiy-j`}),"ACCESS_POLICY.md":i({id:`6ZhdPI`}),"HEARTBEAT.md":i({id:`MDZSJe`}),"OVERVIEW.md":i({id:`dMsx3p`}),"welcome.md":i({id:`WWcqsG`}),"index.md":i({id:`uFQbYd`})},g=[d>0?{key:`folders`,n:d,label:i({id:`VsaI0G`,values:{folderCount:d}})}:null,f>0?{key:`files`,n:f,label:i({id:`DgcGrb`,values:{fileCount:f}})}:null,p>0?{key:`templates`,n:p,label:i({id:`ba3vIW`,values:{templateCount:p}})}:null,m>0?{key:`skills`,n:m,label:i({id:`HAvRAI`,values:{skillCount:m}})}:null].filter(o_),_=e.map(e=>({key:`folder:${e.path}`,icon:Tm,name:`${Zg(e.path)}/`,pill:e.templateCount>0?i({id:`-5jISU`,values:{0:e.templateCount}}):void 0,pillTooltip:e.templateCount>0?e.templates:void 0,description:e.summary||void 0})),v=l.map(e=>({key:`file:${e.path}`,icon:St,name:e.name,title:e.name,description:h[e.name]})),y=u?[{key:`skill:${u.name}`,icon:Om,name:uc(u.name),title:u.name,description:i({id:`FEqWFL`})}]:[],b=[{key:`folders`,label:i({id:`pcqlQu`,values:{0:_.length}}),rows:_},{key:`files`,label:i({id:`ZgGuA4`,values:{0:v.length}}),rows:v},{key:`skill`,label:i({id:`OZJeTZ`}),rows:y}].filter(a_);s=`space-y-5`;let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(`h3`,{className:`flex items-center gap-1.5 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:(0,Z.jsx)(J,{id:`xSVO3J`})}),t[7]=x):x=t[7];let S=g.length>0?(0,Z.jsx)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs`,children:g.map(i_)}):null;t[8]===S?c=t[9]:(c=(0,Z.jsxs)(`div`,{className:`flex flex-wrap justify-between items-baseline gap-x-2 gap-y-0.5`,children:[x,S]}),t[8]=S,t[9]=c),a=`space-y-5`,o=b.map(t_),t[0]=i,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else a=t[3],o=t[4],s=t[5],c=t[6];let l;t[10]!==a||t[11]!==o?(l=(0,Z.jsx)(`div`,{className:a,children:o}),t[10]=a,t[11]=o,t[12]=l):l=t[12];let u;return t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,Z.jsxs)(`section`,{className:s,children:[c,l]}),t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function t_(e){return(0,Z.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,Z.jsxs)(`h4`,{className:`flex items-baseline gap-2 text-xs font-medium uppercase font-mono tracking-wider text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:e.label}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/50`,children:e.rows.length})]}),(0,Z.jsx)(`ul`,{className:`space-y-4`,children:e.rows.map(n_)})]},e.key)}function n_(e){let t=e.icon;return(0,Z.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border border-border/60`,children:(0,Z.jsx)(t,{className:`size-4 text-muted-foreground`})}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`code`,{className:`min-w-0 flex-1 truncate font-mono text-1sm text-foreground/90`,title:e.title,children:e.name}),e.pill?e.pillTooltip&&e.pillTooltip.length>0?(0,Z.jsxs)(Sn,{children:[(0,Z.jsx)(yn,{className:`shrink-0 cursor-help rounded bg-transparent p-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground transition-colors hover:text-foreground/70 focus-visible:text-foreground/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:e.pill}),(0,Z.jsx)(bn,{children:(0,Z.jsx)(`ul`,{className:`space-y-0.5 text-left font-mono`,children:e.pillTooltip.map(r_)})})]}):(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-2xs uppercase tracking-wide text-muted-foreground`,children:e.pill}):null]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:e.description}):null]})]},e.key)}function r_(e){return(0,Z.jsx)(`li`,{children:e},e)}function i_(e,t){return(0,Z.jsxs)(Q.Fragment,{children:[t>0?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground/50`,children:`·`}):null,(0,Z.jsxs)(`span`,{children:[(0,Z.jsx)(`span`,{className:`text-foreground/80`,children:e.n}),` `,(0,Z.jsx)(`span`,{className:`text-muted-foreground/80`,children:e.label})]})]},e.key)}function a_(e){return e.rows.length>0}function o_(e){return e!==null}function s_(e,t){return e+t.templateCount}async function c_(e){let t=await e.json().catch(()=>null),n=Oo.safeParse(t);if(!n.success)return{kind:`internal`,message:`HTTP ${e.status}`};let r=n.data.detail??n.data.title,i=n.data.type;return i===`urn:ok:error:seed-prerequisite-missing`?{kind:`prerequisite-missing`,message:r}:i===`urn:ok:error:seed-invalid-root`?{kind:`invalid-root`,message:r}:i===`urn:ok:error:no-project-dir`?{kind:`no-project`,message:r}:{kind:`internal`,message:r}}function l_(){let e=typeof window<`u`?window.okDesktop:void 0;if(e?.seed){let t=e.seed.apply;return{plan:e.seed.plan,apply:async(e,n)=>{let r=await t(e,n);return r.ok&&Xl(),r},listPacks:e.seed.listPacks}}return{plan:async e=>{let t=new URLSearchParams;e?.rootDir&&t.set(`rootDir`,e.rootDir),e?.packId&&t.set(`packId`,e.packId);let n=t.toString(),r=await fetch(`/api/seed/plan${n?`?${n}`:``}`);if(!r.ok)return{ok:!1,error:await c_(r)};let i=await r.json().catch(()=>null);return i?.plan?{ok:!0,plan:i.plan}:{ok:!1,error:{kind:`internal`,message:`Malformed plan response`}}},apply:async(e,t)=>{let n=await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e,packId:t?.packId})});if(!n.ok)return{ok:!1,error:await c_(n)};let r=await n.json().catch(()=>null);return r?.result?(Xl(),{ok:!0,result:r.result}):{ok:!1,error:{kind:`internal`,message:`Malformed apply response`}}},listPacks:async()=>{let e=await fetch(`/api/seed/packs`);if(!e.ok)return{ok:!1,error:{kind:`internal`,message:`HTTP ${e.status}`}};let t=await e.json().catch(()=>null);return!t||!Array.isArray(t.packs)?{ok:!1,error:{kind:`internal`,message:`Malformed listPacks response`}}:{ok:!0,packs:t.packs}}}}var u_={"knowledge-base":Mm,"software-lifecycle":ts,"codebase-wiki":im,"plain-notes":ch,worldbuilding:pm,"writing-pipeline":Gm,"entity-vault":zm,okf:_m};function d_(e){return u_[e]??Mm}function f_(e){let t=(0,$.c)(69),{onPackSelect:n,onCreateBlankFile:r,collapsedPackIds:i,className:a,packs:o}=e,{_:s}=jt(),[c,l]=(0,Q.useState)(null),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(!1),m=o===void 0,h,g;t[0]===m?(h=t[1],g=t[2]):(h=()=>{if(!m)return;let e=!1;return(async()=>{try{let t=await l_().listPacks();if(e)return;t.ok?l(t.packs):d(t.error.message)}catch(t){let n=t;if(e)return;d(n instanceof Error?n.message:String(n))}})(),()=>{e=!0}},g=[m],t[0]=m,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _=m?c:o;if(u!==null){let e;t[3]===a?e=t[4]:(e=X(`rounded-md bg-destructive/10 p-4 text-sm text-destructive`,a),t[3]=a,t[4]=e);let n;t[5]===u?n=t[6]:(n=(0,Z.jsx)(J,{id:`56WWtu`,values:{error:u}}),t[5]=u,t[6]=n);let r;return t[7]!==e||t[8]!==n?(r=(0,Z.jsx)(`div`,{role:`alert`,className:e,children:n}),t[7]=e,t[8]=n,t[9]=r):r=t[9],r}if(_===null){let e;t[10]===a?e=t[11]:(e=X(`@container/packgrid w-full max-w-5xl`,a),t[10]=a,t[11]=e);let n;t[12]===s?n=t[13]:(n=s({id:`BeWTQy`}),t[12]=s,t[13]=n);let r;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:Array.from({length:Object.keys(u_).length},m_).map(p_)}),t[14]=r):r=t[14];let i;return t[15]!==e||t[16]!==n||t[17]!==r?(i=(0,Z.jsx)(`div`,{role:`status`,className:e,"aria-busy":`true`,"aria-label":n,children:r}),t[15]=e,t[16]=n,t[17]=r,t[18]=i):i=t[18],i}if(_.length===0){let e;t[19]===a?e=t[20]:(e=X(`flex w-full max-w-5xl items-center justify-center rounded-2xl border border-dashed border-border/60 bg-muted/20 p-8 text-sm text-muted-foreground`,a),t[19]=a,t[20]=e);let n;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(J,{id:`zLGXna`}),t[21]=n):n=t[21];let r;return t[22]===e?r=t[23]:(r=(0,Z.jsx)(`div`,{role:`status`,className:e,children:n}),t[22]=e,t[23]=r),r}let v;t[24]===i?v=t[25]:(v=i??[],t[24]=i,t[25]=v);let y;t[26]===v?y=t[27]:(y=new Set(v),t[26]=v,t[27]=y);let b=y,x,S,C,w,T,E,D,O,k;if(t[28]!==a||t[29]!==b||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==_){let e;t[43]===b?e=t[44]:(e=e=>!b.has(e.id),t[43]=b,t[44]=e);let i=_.filter(e),o;t[45]===b?o=t[46]:(o=e=>b.has(e.id),t[45]=b,t[46]=o),C=_.filter(o),S=C.length>0,w=S||r!=null,t[47]===a?k=t[48]:(k=X(`@container/packgrid w-full max-w-5xl`,a),t[47]=a,t[48]=k),x=En,T=f,E=p;let s;t[49]===n?s=t[50]:(s=e=>(0,Z.jsx)(h_,{pack:e,onSelect:()=>n(e.id)},e.id),t[49]=n,t[50]=s);let c=i.map(s);t[51]===c?D=t[52]:(D=(0,Z.jsx)(`div`,{className:`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,children:c}),t[51]=c,t[52]=D),O=S?(0,Z.jsx)(wn,{className:`-mx-1 -mb-1 overflow-hidden px-1 pb-1 data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,children:(0,Z.jsx)(`div`,{className:X(`grid gap-4 @sm/packgrid:grid-cols-2 @2xl/packgrid:grid-cols-3`,`pt-4`),children:C.map(e=>(0,Z.jsx)(h_,{pack:e,onSelect:()=>n(e.id)},e.id))})}):null,t[28]=a,t[29]=b,t[30]=f,t[31]=r,t[32]=n,t[33]=_,t[34]=x,t[35]=S,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=O,t[42]=k}else x=t[34],S=t[35],C=t[36],w=t[37],T=t[38],E=t[39],D=t[40],O=t[41],k=t[42];let A;t[53]!==f||t[54]!==S||t[55]!==C||t[56]!==r||t[57]!==w?(A=w?(0,Z.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center justify-between gap-2`,children:[S?(0,Z.jsx)(Tn,{asChild:!0,children:(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,children:[f?(0,Z.jsx)(J,{id:`6lGV3K`}):(0,Z.jsx)(J,{id:`ymWJLd`,values:{0:C.length}}),(0,Z.jsx)(Ms,{"aria-hidden":`true`,className:X(`size-3.5 transition-transform`,f&&`rotate-180`)})]})}):(0,Z.jsx)(`span`,{}),r?(0,Z.jsx)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:r,children:(0,Z.jsx)(J,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(Jn,{"aria-hidden":`true`,className:`size-3.5`})}})}):null]}):null,t[53]=f,t[54]=S,t[55]=C,t[56]=r,t[57]=w,t[58]=A):A=t[58];let j;t[59]!==x||t[60]!==A||t[61]!==T||t[62]!==E||t[63]!==D||t[64]!==O?(j=(0,Z.jsxs)(x,{open:T,onOpenChange:E,children:[D,O,A]}),t[59]=x,t[60]=A,t[61]=T,t[62]=E,t[63]=D,t[64]=O,t[65]=j):j=t[65];let M;return t[66]!==j||t[67]!==k?(M=(0,Z.jsx)(`div`,{className:k,children:j}),t[66]=j,t[67]=k,t[68]=M):M=t[68],M}function p_(e){return(0,Z.jsx)(g_,{},`skeleton-${e}`)}function m_(e,t){return t}function h_(e){let t=(0,$.c)(17),{pack:n,onSelect:r}=e,i;t[0]===n.id?i=t[1]:(i=d_(n.id),t[0]=n.id,t[1]=i);let a=i,o;t[2]===a?o=t[3]:(o=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`mt-0.5 shrink-0 text-muted-foreground`,children:(0,Z.jsx)(a,{className:`size-3.5`})}),t[2]=a,t[3]=o);let s;t[4]===n.name?s=t[5]:(s=(0,Z.jsx)(`h3`,{className:`min-w-0 wrap-break-word text-sm font-medium leading-tight`,children:n.name}),t[4]=n.name,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-row items-start gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n.description?l=t[10]:(l=(0,Z.jsx)(`p`,{className:`line-clamp-2 text-1sm leading-relaxed text-muted-foreground`,children:n.description}),t[9]=n.description,t[10]=l);let u;t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col gap-2`,children:[c,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13];let d;return t[14]!==r||t[15]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`group flex h-full min-w-0 flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px`,children:u}),t[14]=r,t[15]=u,t[16]=d):d=t[16],d}function g_(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`size-10 animate-pulse rounded-lg bg-muted`,"aria-hidden":`true`,children:(0,Z.jsx)(zc,{className:`size-5 animate-spin text-muted-foreground opacity-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6`,children:[t,(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-4 w-1/2 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-4/5 animate-pulse rounded bg-muted`})]}),(0,Z.jsx)(`div`,{className:`mt-auto h-3 w-20 animate-pulse rounded bg-muted`})]}),e[1]=n):n=e[1],n}var __=`knowledge-base`;function v_(e){let t=(0,$.c)(94),{open:n,onOpenChange:r,onSeedApplied:i,initialPackId:a}=e,{_:o}=jt(),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={kind:`loading`},t[0]=s):s=t[0];let[c,l]=(0,Q.useState)(s),[u,d]=(0,Q.useState)(null),[f,p]=(0,Q.useState)(a??__),[m,h]=(0,Q.useState)(`project-root`),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(a===void 0?`pick`:`configure`),b=(0,Q.useRef)(!0),x=u?.find(e=>e.id===f),S,C;t[1]!==n||t[2]!==u?(S=()=>{if(!n||u!==null)return;let e=!1;return(async()=>{try{let t=await l_().listPacks();if(e)return;t.ok?d(t.packs):(d([]),l({kind:`error`,message:t.error.message}))}catch(t){let n=t;if(e)return;d([]),l({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>{e=!0}},C=[n,u],t[1]=n,t[2]=u,t[3]=S,t[4]=C):(S=t[3],C=t[4]),(0,Q.useEffect)(S,C);let w,T;t[5]!==a||t[6]!==n?(w=()=>{n&&(p(a??__),h(`project-root`),_(``),y(a===void 0?`pick`:`configure`),l({kind:`loading`}),b.current=!0)},T=[n,a],t[5]=a,t[6]=n,t[7]=w,t[8]=T):(w=t[7],T=t[8]),(0,Q.useEffect)(w,T),(0,Q.useEffect)(()=>{x&&_(x.defaultSubfolder??``)},[x]);let E;t[9]===g?E=t[10]:(E=g.trim(),t[9]=g,t[10]=E);let D=E,O=m===`subfolder`&&D===``,k,A;t[11]!==o||t[12]!==n||t[13]!==u||t[14]!==m||t[15]!==f||t[16]!==v||t[17]!==O||t[18]!==D?(k=()=>{if(!n||v!==`configure`||u===null)return;if(O){l({kind:`error`,message:o({id:`Z8KDox`})});return}let e=m===`project-root`?void 0:D,t=b.current?0:200;b.current=!1;let r=!1,i=setTimeout(()=>{r||(l(y_),l_().plan({rootDir:e,packId:f}).then(e=>{if(!r){if(!e.ok){l({kind:`error`,message:e.error.message});return}l(e.plan.created.length>0||e.plan.packSkill?.pending===!0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||l({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},A=[n,v,u,f,m,D,O,o],t[11]=o,t[12]=n,t[13]=u,t[14]=m,t[15]=f,t[16]=v,t[17]=O,t[18]=D,t[19]=k,t[20]=A):(k=t[19],A=t[20]),(0,Q.useEffect)(k,A);let j=async function(){if(c.kind!==`plan`)return;let e=c.plan;l({kind:`applying`,plan:e});let t;try{t=await l_().apply(e,{packId:f})}catch(t){let n=t,r=n instanceof Error?n.message:String(n);ul.error(o({id:`iqugog`,values:{errorDetail:r}})),l({kind:`plan`,plan:e});return}if(t.ok){let n=x?.name??o({id:`W8vpBM`}),a=t.result.applied,s=e.packSkill?.pending===!0,c=o(a>0?{id:`x3-2ta`,values:{packName:n,projectEntries:a}}:s?{id:`B2Srgd`,values:{packName:n}}:{id:`K6jjWB`,values:{packName:n}});ul.success(c),i?.(),r(!1)}else{let n=t.error.message;ul.error(o({id:`iqugog`,values:{errorDetail:n}})),l({kind:`plan`,plan:e})}},M=a!==void 0,N=x?.name,P=o(v===`configure`&&x?{id:`hxEUVJ`,values:{selectedPackName:N}}:{id:`RGkNeJ`}),F;t[21]===o?F=t[22]:(F=o({id:`gvApb7`}),t[21]=o,t[22]=F);let I;t[23]===o?I=t[24]:(I=o({id:`hCOLSd`}),t[23]=o,t[24]=I);let L;t[25]===o?L=t[26]:(L=o({id:`Fy4GgU`}),t[25]=o,t[26]=L);let R;t[27]===o?R=t[28]:(R=o({id:`Qw-7Ie`}),t[27]=o,t[28]=R);let z;t[29]===o?z=t[30]:(z=o({id:`_ayOfA`}),t[29]=o,t[30]=z);let B;t[31]===o?B=t[32]:(B=o({id:`Zf0w-R`}),t[31]=o,t[32]=B);let V;t[33]===o?V=t[34]:(V=o({id:`hmYd9H`}),t[33]=o,t[34]=V);let H;t[35]===o?H=t[36]:(H=o({id:`VBE2dw`}),t[35]=o,t[36]=H);let U;t[37]!==F||t[38]!==I||t[39]!==L||t[40]!==R||t[41]!==z||t[42]!==B||t[43]!==V||t[44]!==H?(U={"knowledge-base":F,"software-lifecycle":I,"codebase-wiki":L,"plain-notes":R,okf:z,"writing-pipeline":B,"entity-vault":V,worldbuilding:H},t[37]=F,t[38]=I,t[39]=L,t[40]=R,t[41]=z,t[42]=B,t[43]=V,t[44]=H,t[45]=U):U=t[45];let W=U,G;t[46]!==o||t[47]!==W||t[48]!==x||t[49]!==v?(G=v===`configure`&&x?W[x.id]??x.description:o({id:`msqUNq`}),t[46]=o,t[47]=W,t[48]=x,t[49]=v,t[50]=G):G=t[50];let K=G,ee;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ee=function(e){p(e),y(`configure`),b.current=!0},t[51]=ee):ee=t[51];let te=ee,q;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(q=function(){y(`pick`),l({kind:`loading`}),b.current=!0},t[52]=q):q=t[52];let ne=q,re;t[53]===P?re=t[54]:(re=(0,Z.jsx)(On,{children:P}),t[53]=P,t[54]=re);let ie;t[55]===K?ie=t[56]:(ie=(0,Z.jsx)(Dn,{children:K}),t[55]=K,t[56]=ie);let ae;t[57]!==re||t[58]!==ie?(ae=(0,Z.jsxs)(Mn,{children:[re,ie]}),t[57]=re,t[58]=ie,t[59]=ae):ae=t[59];let oe;t[60]!==u||t[61]!==c||t[62]!==m||t[63]!==x||t[64]!==v||t[65]!==g?(oe=v===`pick`?(0,Z.jsx)(An,{children:(0,Z.jsx)(f_,{packs:u,onPackSelect:te})}):(0,Z.jsxs)(An,{className:`space-y-6`,children:[(0,Z.jsx)(b_,{choice:m,subfolder:g,placeholder:x?.defaultSubfolder??`subfolder`,onChoiceChange:h,onSubfolderChange:_}),(0,Z.jsx)(x_,{phase:c,selectedPack:x})]}),t[60]=u,t[61]=c,t[62]=m,t[63]=x,t[64]=v,t[65]=g,t[66]=oe):oe=t[66];let se;t[67]!==M||t[68]!==v?(se=v===`configure`&&!M?(0,Z.jsxs)(Y,{className:`mr-auto uppercase font-mono`,variant:`ghost`,onClick:ne,children:[(0,Z.jsx)(ur,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,Z.jsx)(J,{id:`iH8pgl`})]}):null,t[67]=M,t[68]=v,t[69]=se):se=t[69];let ce;t[70]===r?ce=t[71]:(ce=()=>r(!1),t[70]=r,t[71]=ce);let le;t[72]===c.kind?le=t[73]:(le=c.kind===`already-seeded`||c.kind===`error`?(0,Z.jsx)(J,{id:`yz7wBu`}):(0,Z.jsx)(J,{id:`dEgA5A`}),t[72]=c.kind,t[73]=le);let ue;t[74]!==ce||t[75]!==le?(ue=(0,Z.jsx)(Y,{className:`uppercase font-mono`,variant:`outline`,onClick:ce,children:le}),t[74]=ce,t[75]=le,t[76]=ue):ue=t[76];let de;t[77]!==j||t[78]!==c.kind||t[79]!==v||t[80]!==O?(de=v===`configure`&&c.kind===`plan`?(0,Z.jsx)(Y,{onClick:j,disabled:O,children:(0,Z.jsx)(J,{id:`4TzU0n`})}):v===`configure`&&c.kind===`applying`?(0,Z.jsxs)(Y,{disabled:!0,children:[(0,Z.jsx)(zc,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(J,{id:`XYlJJT`})]}):null,t[77]=j,t[78]=c.kind,t[79]=v,t[80]=O,t[81]=de):de=t[81];let fe;t[82]!==se||t[83]!==ue||t[84]!==de?(fe=(0,Z.jsxs)(jn,{children:[se,ue,de]}),t[82]=se,t[83]=ue,t[84]=de,t[85]=fe):fe=t[85];let pe;t[86]!==ae||t[87]!==oe||t[88]!==fe?(pe=(0,Z.jsxs)(kn,{className:`sm:max-w-4xl`,"data-ok-layer-spawned":``,children:[ae,oe,fe]}),t[86]=ae,t[87]=oe,t[88]=fe,t[89]=pe):pe=t[89];let me;return t[90]!==r||t[91]!==n||t[92]!==pe?(me=(0,Z.jsx)(Nn,{open:n,onOpenChange:r,children:pe}),t[90]=r,t[91]=n,t[92]=pe,t[93]=me):me=t[93],me}function y_(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function b_(e){let t=(0,$.c)(22),{choice:n,subfolder:r,placeholder:i,onChoiceChange:a,onSubfolderChange:o}=e,{_:s}=jt(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`3wiBAs`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=e=>a(e),t[1]=a,t[2]=l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Gi,{children:(0,Z.jsx)(J,{id:`RSqaSd`})}),t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)($i,{htmlFor:`seed-root-project-root`,children:(0,Z.jsxs)(Ai,{orientation:`horizontal`,children:[(0,Z.jsxs)(Si,{children:[u,(0,Z.jsx)(li,{className:`text-1sm`,children:(0,Z.jsx)(J,{id:`ZvzbDF`})})]}),(0,Z.jsx)(si,{value:`project-root`,id:`seed-root-project-root`})]})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(Gi,{children:(0,Z.jsx)(J,{id:`ZWgr0b`})}),t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(li,{className:`nth-last-2:mt-0 text-1sm`,children:(0,Z.jsx)(J,{id:`KQGZuq`})}),t[6]=p):p=t[6];let m;t[7]!==s||t[8]!==n||t[9]!==o||t[10]!==i||t[11]!==r?(m=n===`subfolder`&&(0,Z.jsx)(gl,{value:r,onChange:e=>o(e.target.value),placeholder:i,"aria-label":s({id:`NYUhy5`}),spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`}),t[7]=s,t[8]=n,t[9]=o,t[10]=i,t[11]=r,t[12]=m):m=t[12];let h;t[13]===m?h=t[14]:(h=(0,Z.jsxs)(Si,{children:[f,p,m]}),t[13]=m,t[14]=h);let g;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(si,{value:`subfolder`,id:`seed-root-subfolder`}),t[15]=g):g=t[15];let _;t[16]===h?_=t[17]:(_=(0,Z.jsx)($i,{htmlFor:`seed-root-subfolder`,children:(0,Z.jsxs)(Ai,{orientation:`horizontal`,children:[h,g]})}),t[16]=h,t[17]=_);let v;return t[18]!==n||t[19]!==_||t[20]!==l?(v=(0,Z.jsxs)(`div`,{className:`space-y-2 py-1`,children:[c,(0,Z.jsxs)(ci,{className:`sm:flex`,value:n,onValueChange:l,children:[d,_]})]}),t[18]=n,t[19]=_,t[20]=l,t[21]=v):v=t[21],v}function x_(e){let t=(0,$.c)(19),{phase:n,selectedPack:r}=e,{_:i}=jt();if(n.kind===`loading`){let e=r?.folders.length??6,n;t[0]===i?n=t[1]:(n=i({id:`--T3kB`}),t[0]=i,t[1]=n);let a;t[2]===e?a=t[3]:(a=(0,Z.jsx)(`ul`,{className:`space-y-2`,children:Array.from({length:e},w_).map(C_)}),t[2]=e,t[3]=a);let o;return t[4]!==n||t[5]!==a?(o=(0,Z.jsx)(`section`,{role:`status`,"aria-busy":`true`,"aria-label":n,children:a}),t[4]=n,t[5]=a,t[6]=o):o=t[6],o}if(n.kind===`error`){let e;return t[7]===n.message?e=t[8]:(e=(0,Z.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[7]=n.message,t[8]=e),e}if(n.kind===`already-seeded`){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`font-medium`,children:(0,Z.jsx)(J,{id:`YwPUUP`})}),t[9]=e):e=t[9];let n;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`py-2 text-sm`,children:[e,(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Z.jsx)(J,{id:`h-AdvS`})})]}),t[10]=n):n=t[10],n}let a;t[11]!==n.plan||t[12]!==r?(a=n.plan.created.length>0||n.plan.packSkill?.pending?(0,Z.jsx)(e_,{plan:n.plan,selectedPack:r}):null,t[11]=n.plan,t[12]=r,t[13]=a):a=t[13];let o;t[14]===n.plan.warnings?o=t[15]:(o=n.plan.warnings.length>0?(0,Z.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:n.plan.warnings.map(S_)}):null,t[14]=n.plan.warnings,t[15]=o);let s;return t[16]!==a||t[17]!==o?(s=(0,Z.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[a,o]}),t[16]=a,t[17]=o,t[18]=s):s=t[18],s}function S_(e){return(0,Z.jsx)(`p`,{children:e},e)}function C_(e){return(0,Z.jsxs)(`li`,{"aria-hidden":`true`,className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`size-8 shrink-0 animate-pulse rounded-lg bg-muted`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 py-0.5`,children:[(0,Z.jsx)(`span`,{className:`block h-3.5 w-28 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`span`,{className:`mt-2 block h-3 w-4/5 animate-pulse rounded bg-muted`})]})]},`seed-skeleton-${e}`)}function w_(e,t){return t}function T_(){return(0,Q.useSyncExternalStore)(Wu,Gu,Gu)}function E_(e,t){return e instanceof Error&&e.message?e.message:t}async function D_(e,t,n,r=`action`){try{n(null),await e()}catch(e){console.error(`[${r}] action failed:`,e),n(E_(e,t))}}async function O_(e,t,n=ul,r=`action`){await D_(e,t,e=>{e!==null&&n.error(e)},r)}var k_=(0,Q.createContext)(!1);function A_(e){let t=(0,$.c)(5),{children:n}=e,[r,i]=(0,Q.useState)(M_),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{if(window.okDesktop)return;let e=new AbortController;return V(e.signal).then(t=>{e.signal.aborted||t.status!==`ok`||i(t.config.singleFile)}).catch(j_),()=>e.abort()},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(k_,{value:r,children:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}function j_(){}function M_(){return typeof window<`u`?window.okDesktop?.config.singleFile??!1:!1}function N_(){return(0,Q.use)(k_)}var P_={},F_=new Set;function I_(){return P_}function L_(e){P_={...P_,...e};for(let e of F_)e()}function R_(e){return F_.add(e),()=>{F_.delete(e)}}function z_(){return(0,Q.useSyncExternalStore)(R_,I_,I_)}function B_(e,t,n){let r=[],i=new Set,a=new Set,o=t!==null&&t.mainRoot===e.project.mainRoot;e.projectSynthesized||(r.push({branch:e.project.branch??null,path:e.project.path,opened:!0,isMain:!0,isCurrent:e.project.path===n}),i.add(e.project.path),e.project.branch!=null&&a.add(e.project.branch));let s=[...e.worktrees].sort((e,t)=>t.lastOpenedAt.localeCompare(e.lastOpenedAt));for(let e of s)i.has(e.path)||(r.push({branch:e.branch??null,path:e.path,opened:!0,isMain:!1,isCurrent:e.path===n}),i.add(e.path),e.branch!=null&&a.add(e.branch));if(o){let e=t.entries.filter(e=>e.branch!==null&&!a.has(e.branch)&&(e.worktreePath===null||!i.has(e.worktreePath))).sort((e,t)=>(e.branch??``).localeCompare(t.branch??``));for(let t of e)r.push({branch:t.branch,path:t.worktreePath,opened:t.worktreePath!==null,isMain:t.isMain,isCurrent:t.isCurrent}),t.branch!=null&&a.add(t.branch),t.worktreePath!=null&&i.add(t.worktreePath)}return r.sort((e,t)=>V_(e)-V_(t))}function V_(e){return e.isMain?0:e.opened?1:2}function H_(e){let t=e.split(/[/\\]/).filter(e=>e.length>0);return t.length>0?t[t.length-1]??e:e}function U_(e){let t=[],n=new Map;for(let r of e){let e=r.gitCommonDir,i=r.mainRoot;if(e===void 0||i===void 0){t.push({project:r,mainRoot:r.path,worktrees:[]});continue}let a=n.get(e);a===void 0&&(a=t.length,n.set(e,a),t.push({project:null,mainRoot:i,worktrees:[]}));let o=t[a];o!==void 0&&(r.isLinkedWorktree?o.worktrees.push(r):o.project===null&&(o.project=r))}return t.map(e=>{let t=e.project===null;return{project:e.project??{path:e.mainRoot,name:H_(e.mainRoot),lastOpenedAt:``},worktrees:e.worktrees,projectSynthesized:t}})}var W_=3e3,G_=600,K_=20,q_=(e,t,n)=>O_(e,t,n,`CommandPalette`);function J_(e){window.location.assign(du(e))}function Y_(e,t){return e?.kind===`folder`||e?.kind===`folder-index`?e.folderPath:Fl(t)}function X_(e){let t=(0,$.c)(27),{entry:n,query:r,onSelect:i,disabled:a}=e,o=r===void 0?``:r,c=a===void 0?!1:a,l;t[0]===n?l=t[1]:(l=`title`in n&&n.title?n.title:n.path.split(`/`).pop()??n.path,t[0]=n,t[1]=l);let u=l,d=`snippet`in n?n.snippet:void 0,f=`docExt`in n?n.docExt:void 0,p=`bodyIndexed`in n?n.bodyIndexed:void 0,m=`${n.kind} ${n.path}`,h=`command-palette-nav-${n.kind}-${n.path}`,g;t[2]!==p||t[3]!==f||t[4]!==n.kind||t[5]!==n.path?(g=(0,Z.jsx)(s,{bodyIndexed:p,className:`mt-0.5 size-4`,docExt:f,kind:n.kind,path:n.path}),t[2]=p,t[3]=f,t[4]=n.kind,t[5]=n.path,t[6]=g):g=t[6];let _;t[7]!==o||t[8]!==u?(_=(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:(0,Z.jsx)(Q_,{query:o,text:u})}),t[7]=o,t[8]=u,t[9]=_):_=t[9];let v;t[10]!==n.path||t[11]!==o?(v=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(Q_,{query:o,text:n.path})}),t[10]=n.path,t[11]=o,t[12]=v):v=t[12];let y;t[13]!==o||t[14]!==d?(y=d?(0,Z.jsx)(`span`,{className:`max-h-10 overflow-hidden text-muted-foreground text-xs leading-relaxed`,children:(0,Z.jsx)(Q_,{query:o,text:d})}):null,t[13]=o,t[14]=d,t[15]=y):y=t[15];let b;t[16]!==_||t[17]!==v||t[18]!==y?(b=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[_,v,y]}),t[16]=_,t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;return t[20]!==c||t[21]!==i||t[22]!==b||t[23]!==m||t[24]!==h||t[25]!==g?(x=(0,Z.jsxs)(le,{value:m,onSelect:i,disabled:c,"data-testid":h,className:`items-start`,children:[g,b]}),t[20]=c,t[21]=i,t[22]=b,t[23]=m,t[24]=h,t[25]=g,t[26]=x):x=t[26],x}function Z_(e){let t=(0,$.c)(5),{mode:n,inExclusiveMode:r,paletteModeKind:i}=e;if(r||i!==`normal`||n===`idle`||n===`content`)return null;let a=`command-palette-search-hint-${n}`,o;t[0]===n?o=t[1]:(o=n===`name-only`?(0,Z.jsx)(J,{id:`-wePNM`}):n===`truncated`?(0,Z.jsx)(J,{id:`-q4abP`}):(0,Z.jsx)(J,{id:`DbILZA`}),t[0]=n,t[1]=o);let s;return t[2]!==a||t[3]!==o?(s=(0,Z.jsx)(`div`,{"aria-live":`polite`,"data-testid":a,className:`border-t px-3 py-2 text-muted-foreground text-xs`,children:o}),t[2]=a,t[3]=o,t[4]=s):s=t[4],s}function Q_(e){let t=(0,$.c)(5),{text:n,query:r}=e,i;t[0]!==r||t[1]!==n?(i=Cg(n,r).map($_),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[3]=i,t[4]=a),a}function $_(e){let t=`${e.start}:${e.match?`match`:`plain`}`;return e.match?(0,Z.jsx)(`mark`,{className:`rounded-sm bg-primary/10 px-0.5 font-semibold text-primary`,children:e.text},t):(0,Z.jsx)(`span`,{children:e.text},t)}function ev({searchResults:e,fallbackSearchResults:t,searchStatus:n}){return e.length>0?e:n===`success`?[]:t}function tv(e){let t=(0,$.c)(130),{bridge:n,open:r,onOpenChange:i}=e,a=n===void 0?null:n,{_:o}=jt(),s=N_(),[c,l]=(0,Q.useState)(``),u=(0,Q.useDeferredValue)(c),d=u.trim(),f;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(f=[],t[0]=f):f=t[0];let[m,h]=(0,Q.useState)(f),[g,_]=(0,Q.useState)(`idle`),[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(!1),w;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(w=[],t[1]=w):w=t[1];let[T,D]=(0,Q.useState)(w),[k,j]=(0,Q.useState)(null),[M,N]=(0,Q.useState)(`idle`),P;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(P=[],t[2]=P):P=t[2];let[F,I]=(0,Q.useState)(P),L;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(L=[],t[3]=L):L=t[3];let[R,z]=(0,Q.useState)(L),[B,V]=(0,Q.useState)(null),[H,W]=(0,Q.useState)(!1),[G,K]=(0,Q.useState)(!1),[ee,te]=(0,Q.useState)(!1),q;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(q=[],t[4]=q):q=t[4];let[ne,re]=(0,Q.useState)(q),[ie,ae]=(0,Q.useState)(`idle`),oe;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(oe=[],t[5]=oe):oe=t[5];let[se,ce]=(0,Q.useState)(oe),[ue,fe]=(0,Q.useState)(`idle`),me=(0,Q.useRef)(!1),he=(0,Q.useRef)(null),ge=(0,Q.useRef)(null),_e=(0,Q.useRef)(null),ve=(0,Q.useRef)(null),{activeDocName:ye,activeTarget:be}=Xe(),{pages:xe,pageTitles:Se,pageMeta:Ce,folderPaths:we,filePaths:Te,loading:Ee}=Ls(),De=cc(),{states:Oe,refresh:ke}=rc(),{dispatch:Ae}=Bs(),je;t[6]===r?je=t[7]:(je={enabled:r},t[6]=r,t[7]=je);let{status:Me,refresh:Ne}=Oi(je),Pe=(Me?.enabled??!1)&&(Me?.keyPresent??!1),Fe=Me?.embedded??0,Ie=Me?.total??0,Le=Pe&&Ie>0&&Fe<Ie,Re;t[8]!==S||t[9]!==r||t[10]!==Ne||t[11]!==Le?(Re=()=>{if(!r||!S||!Le)return;let e=window.setInterval(()=>Ne(),2500);return()=>window.clearInterval(e)},t[8]=S,t[9]=r,t[10]=Ne,t[11]=Le,t[12]=Re):Re=t[12];let ze;t[13]!==S||t[14]!==r||t[15]!==Le?(ze=[r,S,Le],t[13]=S,t[14]=r,t[15]=Le,t[16]=ze):ze=t[16],(0,Q.useEffect)(Re,ze);let Be=Ws({docName:ye,workspace:De}),Ve=gg(xe,we,Se,Ce,Te),He=cg(R,new Set(Ve.map(av))),Ue=a?.config.projectPath??null,We=a?F.filter(e=>e.path!==Ue):[],Ge=T_(),Ke=a&&Ge?Ge.entries.filter(iv):[],qe;t[17]!==ye||t[18]!==be?(qe=Y_(be,ye),t[17]=ye,t[18]=be,t[19]=qe):qe=t[19];let Je=qe,Ye=d===``?[]:xg(Ve,d,8),Ze,Qe;t[20]!==i||t[21]!==r?(Ze=()=>{let e=function(e){Tl(e,`command-palette`)&&(e.preventDefault(),i(!r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},Qe=[i,r],t[20]=i,t[21]=r,t[22]=Ze,t[23]=Qe):(Ze=t[22],Qe=t[23]),(0,Q.useEffect)(Ze,Qe);let $e,et;t[24]!==o||t[25]!==a||t[26]!==r||t[27]!==ke?($e=()=>{if(r){if(z(ag()),ke(),a){let e=!1;return q_(async()=>{let t=await a.project.listRecent();e||I(t)},o({id:`fYKgzG`})),()=>{e=!0}}return}l(``),re([]),ae(`idle`),me.current=!1,ce([]),fe(`idle`),C(!1),_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),j(null),N(`idle`)},et=[r,a,ke,o],t[24]=o,t[25]=a,t[26]=r,t[27]=ke,t[28]=$e,t[29]=et):($e=t[28],et=t[29]),(0,Q.useEffect)($e,et);let tt;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(tt=()=>{he.current&&(he.current.scrollTop=0)},t[30]=tt):tt=t[30];let nt;t[31]===c?nt=t[32]:(nt=[c],t[31]=c,t[32]=nt),(0,Q.useEffect)(tt,nt);let rt=new Set(ne.map(rv)),it=S?{kind:`normal`,query:u}:Ag(u,rt),at=it.kind!==`normal`,st=at||S,ct=it.kind===`tag-list`?it.query:``,lt=it.kind===`tag-docs`?it.tagName:``,ut=c.trim(),dt=S?Og({query:ut,firedQuery:k,status:M,resultCount:T.length}):null,ft=dt?.submit?.query??``,pt=dt?.results.forQuery??``,mt,ht;t[33]!==at||t[34]!==r?(mt=()=>{if(!r||!at||me.current)return;me.current=!0,ae(`loading`);let e=!1;return Mg().then(t=>{e||(re(t),ae(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tags failed`,t),re([]),ae(`error`))}),()=>{e=!0}},ht=[r,at],t[33]=at,t[34]=r,t[35]=mt,t[36]=ht):(mt=t[35],ht=t[36]),(0,Q.useEffect)(mt,ht);let gt=it.kind===`tag-docs`?it.tagName:null;(0,Q.useEffect)(()=>{if(!r||gt===null){ce([]),fe(`idle`);return}fe(`loading`),ce([]);let e=!1;return Ng(gt).then(t=>{e||(ce(t),fe(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tag docs failed`,t),ce([]),fe(`error`))}),()=>{e=!0}},[r,gt]),(0,Q.useEffect)(()=>{if(!r||!d||st||Ee){h([]),_(`idle`),y(!1),x(!1);return}let e=!1,t=!1,n=0,i=null,a,o;_(`loading`);let s=()=>e||n>=K_?!1:(n+=1,o=window.setTimeout(l,G_),!0),c=()=>{e||t&&s()||(h([]),_(`error`),y(!1),x(!1))};function l(){let n=new AbortController;i=n,a=window.setTimeout(()=>{n.abort(),c()},W_),Tg(d,{signal:n.signal}).then(n=>{let{entries:r,truncated:i,ready:o}=n;if(window.clearTimeout(a),!e){if(!o){t||(t=!0,h([]),y(!1),x(!0),_(`success`)),s()||x(!1);return}h(r),y(i),x(!1),_(`success`)}}).catch(t=>{window.clearTimeout(a),!e&&(t instanceof Error&&t.name===`AbortError`||c())})}return l(),()=>{e=!0,window.clearTimeout(a),window.clearTimeout(o),i?.abort()}},[r,d,st,Ee]);let _t;t[37]!==o||t[38]!==i?(_t=(e,t)=>{let n=t===void 0?o({id:`uuoHOU`}):t;i(!1),q_(async()=>{await e()},n)},t[37]=o,t[38]=i,t[39]=_t):_t=t[39];let vt=_t,yt;t[40]!==o||t[41]!==a||t[42]!==vt?(yt=e=>{if(!a)return;let t=e.worktreePath;if(t!==null){vt(()=>a.project.open({path:t,target:`new-window`,entryPoint:`worktree`}),o({id:`LwMxXg`}));return}let n=e.branch;n!==null&&vt(async()=>{let e=await a.worktree.create({branch:n,createBranch:!1});if(!e.ok)throw Error(e.reason);Uu(),await a.project.open({path:e.path,target:`new-window`,entryPoint:`worktree`})},o({id:`LwMxXg`}))},t[40]=o,t[41]=a,t[42]=vt,t[43]=yt):yt=t[43];let bt=yt,xt;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(xt=function(e){let t={kind:e.kind,path:e.path,lastOpenedAt:new Date().toISOString()},n=sg(ag(),t);og(n),z(n)},t[44]=xt):xt=t[44];let St=xt,Ct;t[45]===i?Ct=t[46]:(Ct=function(e){i(!1),St(e),J_(e.path)},t[45]=i,t[46]=Ct);let wt=Ct,Tt=!st&&d===``&&He.length>0,Et=ev({searchResults:m,fallbackSearchResults:Ye,searchStatus:g}),Dt=!st&&Et.length>0,Ot=!st&&d!==``&&(Ee||b)&&!Dt,kt=!st&&d!==``&&g===`loading`&&!Dt&&!Ot,At=!st&&a!==null&&We.length>0&&(d===``||We.some(e=>Eg(`${e.name} ${e.path}`,u,[`open recent project`]))),Mt=Ke.filter(e=>d===``||Eg(e.branch??``,u,[`worktree branch`])),Nt=!st&&a!==null&&Mt.length>0,Pt=gc(),Ft=!st&&!Pt&&Be!==null&&(d===``||Us.some(e=>{let t=e.displayName;return Eg(o({id:`WqLq6M`,values:{displayName:t}}),u,[e.id,`agent handoff`,`open in`])})),It=it.kind===`tag-list`?jg(ne,it.query):[],Lt=it.kind===`tag-list`&&ie!==`loading`&&It.length===0,Rt=it.kind===`tag-docs`&&ue===`success`&&se.length===0,zt=z_(),Bt;t[47]===i?Bt=t[48]:(Bt=e=>{i(!1),E(e)},t[47]=i,t[48]=Bt);let Vt=Bt,Ht;t[49]!==a||t[50]!==i?(Ht=e=>{i(!1),Vu(e,a?{okDesktop:{shell:a.shell}}:{okDesktop:void 0})},t[49]=a,t[50]=i,t[51]=Ht):Ht=t[51];let Ut=Ht,Wt;t[52]===i?Wt=t[53]:(Wt=()=>i(!1),t[52]=i,t[53]=Wt);let Gt;t[54]===V?Gt=t[55]:(Gt=e=>V(e),t[54]=V,t[55]=Gt);let Kt;t[56]===W?Kt=t[57]:(Kt=()=>W(!0),t[56]=W,t[57]=Kt);let qt;t[58]===K?qt=t[59]:(qt=()=>K(!0),t[58]=K,t[59]=qt);let Jt;t[60]===te?Jt=t[61]:(Jt=()=>te(!0),t[60]=te,t[61]=Jt);let Yt={bridge:a,singleFile:s,activeDocName:ye,contextualTargetKind:Gh(be),viewMenuState:zt,emitMenuAction:Vt,runAction:vt,openExternalUrl:Ut,closePalette:Wt,openNewItemDialog:Gt,openSeedDialog:Kt,openCreateProjectDialog:qt,openReportBugDialog:Jt},Xt=st?[]:$h.flatMap(e=>{if(!e.available(Yt)||e.visibility===`search-only`&&d===``)return[];let t=e.label(Yt);return Eg(t,u,e.keywords)?[{cmd:e,label:t}]:[]}),Zt=Xt.length>0,Qt;t[62]===o?Qt=t[63]:(Qt=e=>{switch(e){case`commands`:return o({id:`45MZFs`});case`project`:return o({id:`e0NrBM`});case`file`:return o({id:`J2eKUI`});case`view`:return o({id:`jpctdh`});case`terminal`:return o({id:`ALhMYW`});case`app`:return o({id:`IrC12v`})}},t[62]=o,t[63]=Qt);let $t=Qt,en=e=>{let t=Xt.filter(t=>t.cmd.group===e);return t.length===0?null:(0,Z.jsx)(O,{heading:$t(e),children:t.map(e=>{let{cmd:t,label:n}=e,r=t.shortcutId!==void 0&&(t.shortcutDesktopOnly!==!0||a!==null)?wl(t.shortcutId):null;return(0,Z.jsxs)(le,{value:`${n} ${t.keywords.join(` `)}`,onSelect:()=>t.dispatch(Yt),"data-testid":`command-palette-${t.id}`,children:[(0,Z.jsx)(t.icon,{}),(0,Z.jsx)(`span`,{children:n}),t.checked?.(Yt)?(0,Z.jsx)(As,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`}):null,r?(0,Z.jsx)(U,{children:r}):null]},t.id)})},e)},tn=st||Tt||Dt||kt||Ot||At||Ft||Zt,nn;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(nn=function(e){l(`${kg}${e}`)},t[64]=nn):nn=t[64];let rn=nn,an;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(an=function(){_e.current?.abort(),_e.current=null,ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null),D([]),j(null),N(`idle`)},t[65]=an):an=t[65];let on=an,sn;t[66]===c?sn=t[67]:(sn=function(){C(!0),c.startsWith(`tag:`)&&l(c.slice(kg.length)),on(),ge.current?.focus()},t[66]=c,t[67]=sn);let cn=sn,ln;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ln=function(){C(!1),l(``),on(),ge.current?.focus()},t[68]=ln):ln=t[68];let un=ln,Y=function(e){let t=e.trim();if(!t||Ee)return;_e.current?.abort(),ve.current!==null&&window.clearTimeout(ve.current);let n=new AbortController;_e.current=n,N(`loading`);let r=!1,i=window.setTimeout(()=>{r=!0,n.abort(),N(`error`)},W_);ve.current=i,Tg(t,{signal:n.signal,semantic:!0,limit:30}).then(e=>{let{entries:r}=e;dn(i,n),D(r),j(t),N(`success`)}).catch(e=>{dn(i,n),!(e instanceof Error&&e.name===`AbortError`&&!r)&&(console.debug(`[semantic-search] fire failed`,{timedOut:r,error:e}),N(`error`))})};function dn(e,t){window.clearTimeout(e),ve.current===e&&(ve.current=null),_e.current===t&&(_e.current=null)}let fn=function(e){!S||e.key!==`Enter`||(dt?.submit?(e.preventDefault(),e.stopPropagation(),Y(dt.submit.query)):M===`loading`&&(e.preventDefault(),e.stopPropagation()))},pn;t[69]===S?pn=t[70]:(pn=function(e){S&&(e.preventDefault(),un())},t[69]=S,t[70]=pn);let mn=pn,hn;t[71]===o?hn=t[72]:(hn=o({id:`1bDVu5`}),t[71]=o,t[72]=hn);let gn;t[73]===o?gn=t[74]:(gn=o({id:`5GRxoA`}),t[73]=o,t[74]=gn);let _n;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(_n={shouldFilter:!1,className:`[&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4`},t[75]=_n):_n=t[75];let vn;t[76]!==o||t[77]!==S?(vn=o(S?{id:`zXj1rA`}:{id:`ggs9f8`}),t[76]=o,t[77]=S,t[78]=vn):vn=t[78];let yn;t[79]!==S||t[80]!==at?(yn=()=>{S&&(C(!1),on()),l(at?``:kg),ge.current?.focus()},t[79]=S,t[80]=at,t[81]=yn):yn=t[81];let bn=at?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,xn;t[82]===bn?xn=t[83]:(xn=X(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,bn),t[82]=bn,t[83]=xn);let Sn,Cn;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Sn=(0,Z.jsx)(p,{className:`size-3.5`}),Cn=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(J,{id:`0rwwOn`})}),t[84]=Sn,t[85]=Cn):(Sn=t[84],Cn=t[85]);let wn;t[86]!==at||t[87]!==yn||t[88]!==xn?(wn=(0,Z.jsxs)(`button`,{type:`button`,onClick:yn,"data-testid":`command-palette-filter-tag`,"data-active":at,"aria-pressed":at,className:xn,children:[Sn,Cn]}),t[86]=at,t[87]=yn,t[88]=xn,t[89]=wn):wn=t[89];let Tn;t[90]!==cn||t[91]!==S||t[92]!==Pe?(Tn=Pe?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>S?un():cn(),"data-testid":`command-palette-filter-semantic`,"data-active":S,"aria-pressed":S,className:X(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,S?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,Z.jsx)(pc,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(J,{id:`9tJX8r`})})]}):null,t[90]=cn,t[91]=S,t[92]=Pe,t[93]=Tn):Tn=t[93];let En;t[94]!==wn||t[95]!==Tn?(En=(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 border-b px-3 py-2`,children:[wn,Tn]}),t[94]=wn,t[95]=Tn,t[96]=En):En=t[96];let Dn;t[97]===Ot?Dn=t[98]:(Dn=Ot?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-search-preparing`,children:[(0,Z.jsx)(zc,{className:`size-4 animate-spin`}),(0,Z.jsx)(J,{id:`yIPXut`})]}):null,t[97]=Ot,t[98]=Dn);let On;t[99]!==Dt||t[100]!==kt?(On=kt&&!Dt?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`WRNXKp`})}):null,t[99]=Dt,t[100]=kt,t[101]=On):On=t[101];let kn=Z_,An=Dg(d,Et,{truncated:v}),jn;t[102]!==kn||t[103]!==st||t[104]!==it.kind||t[105]!==An?(jn=(0,Z.jsx)(kn,{mode:An,inExclusiveMode:st,paletteModeKind:it.kind}),t[102]=kn,t[103]=st,t[104]=it.kind,t[105]=An,t[106]=jn):jn=t[106];let Mn=B===`file`,Nn;t[107]===V?Nn=t[108]:(Nn=e=>{e||V(null)},t[107]=V,t[108]=Nn);let Pn;t[109]!==Je||t[110]!==Mn||t[111]!==Nn?(Pn=(0,Z.jsx)(Wg,{open:Mn,onOpenChange:Nn,kind:`file`,initialDir:Je}),t[109]=Je,t[110]=Mn,t[111]=Nn,t[112]=Pn):Pn=t[112];let Fn=B===`folder`,In;t[113]===V?In=t[114]:(In=e=>{e||V(null)},t[113]=V,t[114]=In);let Ln;t[115]!==Je||t[116]!==Fn||t[117]!==In?(Ln=(0,Z.jsx)(Wg,{open:Fn,onOpenChange:In,kind:`folder`,initialDir:Je}),t[115]=Je,t[116]=Fn,t[117]=In,t[118]=Ln):Ln=t[118];let Rn;t[119]!==H||t[120]!==W?(Rn=(0,Z.jsx)(v_,{open:H,onOpenChange:W}),t[119]=H,t[120]=W,t[121]=Rn):Rn=t[121];let zn;t[122]!==a||t[123]!==G||t[124]!==K?(zn=a?(0,Z.jsx)(Oh,{open:G,onOpenChange:K,bridge:a}):null,t[122]=a,t[123]=G,t[124]=K,t[125]=zn):zn=t[125];let Bn;return t[126]!==a||t[127]!==ee||t[128]!==te?(Bn=a?(0,Z.jsx)(jf,{open:ee,onOpenChange:te}):null,t[126]=a,t[127]=ee,t[128]=te,t[129]=Bn):Bn=t[129],(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(A,{open:r,onOpenChange:i,title:hn,description:gn,className:`sm:max-w-2xl`,commandProps:_n,onEscapeKeyDown:mn,children:[(0,Z.jsx)(de,{ref:ge,value:c,onValueChange:l,onKeyDown:fn,placeholder:vn}),En,(0,Z.jsxs)(pe,{ref:he,className:`subtle-scrollbar`,children:[S&&dt?(0,Z.jsxs)(Z.Fragment,{children:[Le?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-indexing`,children:[(0,Z.jsx)(zc,{className:`size-3.5 animate-spin`}),(0,Z.jsx)(J,{id:`kCNU4q`,values:{semanticIndexedCount:Fe,semanticTotalCount:Ie}})]}):null,dt.submit?(0,Z.jsx)(O,{children:(0,Z.jsx)(le,{value:`semantic-submit`,onSelect:()=>Y(ft),"data-testid":`command-palette-semantic-submit`,children:dt.submit.kind===`retry`?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(pc,{}),(0,Z.jsx)(J,{id:`rBc32v`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(pc,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,Z.jsx)(J,{id:`FNTx6u`,values:{semanticSubmitQuery:ft}})}),(0,Z.jsx)(U,{children:`↵`})]})})}):null,dt.notice===`empty`?(0,Z.jsx)(ot,{"data-testid":`command-palette-semantic-empty`,children:(0,Z.jsx)(J,{id:`Xw_maT`})}):null,dt.notice===`searching`?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-searching`,children:[(0,Z.jsx)(zc,{className:`size-4 animate-spin`}),(0,Z.jsx)(J,{id:`PBwmDJ`})]}):null,dt.notice===`no-results`?(0,Z.jsx)(ot,{"data-testid":`command-palette-semantic-no-results`,children:(0,Z.jsx)(J,{id:`yFyZMJ`,values:{semanticQueryText:ut}})}):null,dt.results.show?(0,Z.jsx)(O,{heading:dt.results.dimmed?o({id:`QlxHAH`,values:{semanticResultsLabel:pt}}):o({id:`9tJX8r`}),children:(0,Z.jsx)(`div`,{"data-testid":`command-palette-semantic-results`,"data-dimmed":dt.results.dimmed,children:T.map(e=>(0,Z.jsx)(X_,{entry:e,disabled:dt.results.dimmed,onSelect:()=>wt(e)},ig(e.kind,e.path)))})}):null]}):null,Dn,On,tn?null:(0,Z.jsx)(ot,{children:g===`error`?(0,Z.jsx)(J,{id:`pkAft1`}):(0,Z.jsx)(J,{id:`i3f2kh`})}),it.kind===`tag-list`?(0,Z.jsxs)(O,{heading:it.query?o({id:`evs0iw`,values:{tagListQuery:ct}}):o({id:`2QM24L`}),children:[ie===`loading`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`a_u4ck`})}):null,ie===`error`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`MZoxVx`})}):null,Lt?(0,Z.jsx)(ot,{children:it.query?o({id:`X0ttSN`,values:{tagListQuery:ct}}):o({id:`JLUTgi`})}):null,It.map(e=>(0,Z.jsxs)(le,{value:`tag ${e.name}`,onSelect:()=>rn(e.name),"data-testid":`command-palette-tag-${e.name}`,children:[(0,Z.jsx)(p,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:(0,Z.jsx)(J,{id:`fVcm9t`,values:{0:e.count}})})]},`tag:${e.name}`))]}):null,it.kind===`tag-docs`?(0,Z.jsxs)(O,{heading:o({id:`hGmuTc`,values:{tagDocsName:lt}}),children:[ue===`loading`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`pWbsW6`})}):null,ue===`error`?(0,Z.jsx)(ot,{children:(0,Z.jsx)(J,{id:`48uGTI`})}):null,Rt?(0,Z.jsx)(ot,{children:o({id:`NIWAux`,values:{tagDocsName:lt}})}):null,se.map(e=>{let t=e.title||e.docName.split(`/`).pop()||e.docName,n=e.matchingTags.filter(e=>e!==it.tagName).map(nv).join(`, `);return(0,Z.jsxs)(le,{value:`tag-doc ${e.docName}`,onSelect:()=>{i(!1),J_(e.docName)},"data-testid":`command-palette-tag-doc-${e.docName}`,className:`items-start`,children:[(0,Z.jsx)(ir,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.docName}),e.matchingTags.length>0&&e.matchingTags.some(e=>e!==it.tagName)?(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-[11px]`,children:(0,Z.jsx)(J,{id:`CvsD6Y`,values:{viaTags:n}})}):null]})]},`tag-doc:${e.docName}`)})]}):null,Tt?(0,Z.jsx)(O,{heading:o({id:`MmDDWK`}),children:He.map(e=>(0,Z.jsx)(X_,{entry:e,onSelect:()=>wt(e)},ig(e.kind,e.path)))}):null,en(`commands`),Ft?(0,Z.jsx)(O,{heading:o({id:`O7_W_a`}),children:Us.filter(e=>{let t=e.displayName;return Eg(o({id:`WqLq6M`,values:{displayName:t}}),u,[e.id,`agent handoff`,`open in`])}).map(e=>{let t=Oe[e.id],n=t.installed===!0&&Be!==null,r=e.displayName,a=t.installed===null?o({id:`IA6JW2`}):t.installed===!1?o({id:`5SwVv1`}):null,s=o(a?{id:`1ZpfyB`,values:{displayName:r,hint:a}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Z.jsxs)(le,{value:`send to ai ${e.displayName} ${e.id} agent open in`,disabled:!n,onSelect:()=>{!n||!Be||(i(!1),Ae(e.id,Be))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":s,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(J,{id:`WqLq6M`,values:{displayName:r}})}),a?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:a}):null]},e.id)})}):null,en(`project`),At&&a?(0,Z.jsx)(O,{heading:o({id:`3iyGWF`}),children:We.filter(e=>Eg(`${e.name} ${e.path}`,u,[`open recent project`])).slice(0,10).map(e=>{let t=e.isLinkedWorktree===!0,n=t?ts:Tm,r=t&&e.mainRoot!==void 0?H_(e.mainRoot):null;return(0,Z.jsxs)(le,{value:`${e.name} ${e.path} recent project`,disabled:e.missing,onSelect:()=>vt(()=>a.project.open({path:e.path,target:`new-window`,entryPoint:`recents`}),o({id:`SUOoXn`})),"data-testid":`command-palette-recent-${e.path}`,className:`items-start`,children:[(0,Z.jsx)(n,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),r===null?null:(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(J,{id:`8Gzz2G`,values:{worktreeOf:r}})}),(0,Z.jsxs)(`span`,{className:`truncate text-muted-foreground text-xs`,children:[e.path,e.missing?(0,Z.jsxs)(Z.Fragment,{children:[` `,(0,Z.jsx)(J,{id:`ls1N1w`})]}):null]})]})]},e.path)})}):null,Nt&&a?(0,Z.jsx)(O,{heading:o({id:`sxjyRq`}),children:Mt.slice(0,10).map(e=>(0,Z.jsxs)(le,{value:`${e.branch} worktree branch`,onSelect:()=>bt(e),"data-testid":`command-palette-worktree-${e.branch}`,className:`items-start`,children:[(0,Z.jsx)(ts,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.branch}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.worktreePath??o({id:`iO8V-7`})})]})]},e.branch))}):null,[`file`,`view`,`terminal`,`app`].map(e=>en(e)),Dt?(0,Z.jsx)(O,{heading:o({id:`A1taO8`}),children:Et.map(e=>(0,Z.jsx)(X_,{entry:e,query:d,onSelect:()=>wt(e)},ig(e.kind,e.path)))}):null]}),jn]}),Pn,Ln,Rn,zn,Bn]})}function nv(e){return`#${e}`}function rv(e){return e.name}function iv(e){return e.branch!==null&&!e.isCurrent}function av(e){return ig(e.kind,e.path)}function ov(e){return e===`eperm`?_l._({id:`XuQzrk`}):_l._({id:`BUyQnq`})}async function sv(e){let t=await e.restartServer(e.config.projectPath);return t.ok?{ok:!0}:{ok:!1,message:ov(t.reason)}}var cv=500;function lv(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function uv(e){return e?.kind===`null-collab`}function dv(e){if(e===null)return _l._({id:`Ua78MH`});if(e.kind===`null-collab`)return _l._({id:`TJnkyf`});if(e.code===`network`)return _l._({id:`aoa6xA`});if(e.code===`invalid-body`)return _l._({id:`FRYB1Q`});let t=e.code;return _l._({id:`4nj6n8`,values:{code:t}})}function fv(){let e=(0,$.c)(28),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=Xe(),[a,o]=(0,Q.useState)(!1),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d=typeof window<`u`?window.okDesktop:void 0,f,p;e[0]!==n||e[1]!==t?(f=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),cv);return()=>clearTimeout(e)},p=[t,n],e[0]=n,e[1]=t,e[2]=f,e[3]=p):(f=e[2],p=e[3]),(0,Q.useEffect)(f,p);let m=lv(t,n,a);if(m===`hidden`)return null;if(m===`terminal`){let t;e[4]===r?t=e[5]:(t=uv(r),e[4]=r,e[5]=t);let n=t,a;e[6]===r?a=e[7]:(a=dv(r),e[6]=r,e[7]=a);let o=a,f;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=async()=>{if(d){u(null),c(!0);try{let e=await sv(d);e.ok||(u(e.message),c(!1))}catch{c(!1)}}},e[8]=f):f=e[8];let p=f,m;e[9]!==o||e[10]!==n?(m=(0,Z.jsx)(`span`,{children:n?(0,Z.jsx)(J,{id:`AAlr5Y`,components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}}):(0,Z.jsx)(J,{id:`noH1JX`,values:{errorDetail:o},components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`}),1:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}})}),e[9]=o,e[10]=n,e[11]=m):m=e[11];let h;e[12]===i?h=e[13]:(h=()=>{u(null),i()},e[12]=i,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(J,{id:`6gRgw8`}),e[14]=g):g=e[14];let _;e[15]!==s||e[16]!==h?(_=(0,Z.jsx)(`button`,{type:`button`,onClick:h,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:g}),e[15]=s,e[16]=h,e[17]=_):_=e[17];let v;e[18]===s?v=e[19]:(v=d?(0,Z.jsx)(`button`,{type:`button`,onClick:p,disabled:s,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900 disabled:opacity-60`,children:s?(0,Z.jsx)(J,{id:`0Er6-M`}):(0,Z.jsx)(J,{id:`uaUc6t`})}):null,e[18]=s,e[19]=v);let y;e[20]===l?y=e[21]:(y=l===null?null:(0,Z.jsx)(`span`,{className:`w-full text-red-950 text-xs`,children:l}),e[20]=l,e[21]=y);let b;return e[22]!==y||e[23]!==m||e[24]!==_||e[25]!==v?(b=(0,Z.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[m,_,v,y]}),e[22]=y,e[23]=m,e[24]=_,e[25]=v,e[26]=b):b=e[26],b}let h;return e[27]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md`,children:(0,Z.jsx)(J,{id:`UYcGIW`})}),e[27]=h):h=e[27],h}function pv(e){let t=(0,$.c)(5),{bridge:n}=e,[r,i]=(0,Q.useState)(!1),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>M(e=>{e===`new-project`&&i(!0)}),o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(Oh,{open:r,onOpenChange:i,bridge:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}async function mv(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null),n=t.status,r=t.statusText;throw Error(El(e)??_l._({id:`lHwYMr`,values:{status:n,statusText:r}}))}return(await t.json()).docs??[]}function hv(){let e=(0,$.c)(18),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`idle`},e[0]=a):a=e[0];let[o,s]=(0,Q.useState)(a),c=(0,Q.useRef)(0),l,u;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>{let e=function(e){let t=e.detail;if(!t||typeof t.value!=`string`)return;let r=c.current+=1;i(t.value),n(!0),s({kind:`loading`}),mv(t.value).then(e=>{c.current===r&&s({kind:`ready`,docs:e})}).catch(e=>{c.current===r&&s({kind:`error`,message:e instanceof Error?e.message:String(e)})})};return document.addEventListener(ke,e),()=>document.removeEventListener(ke,e)},u=[],e[1]=l,e[2]=u):(l=e[1],u=e[2]),(0,Q.useEffect)(l,u);let d;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=function(e){n(!1),window.location.assign(du(e))},e[3]=d):d=e[3];let f=d,p=r??``,m;e[4]===p?m=e[5]:(m={tagName:p},e[4]=p,e[5]=m);let h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h={0:(0,Z.jsx)(`span`,{className:`font-mono break-all`})},e[6]=h):h=e[6];let g;e[7]===m?g=e[8]:(g=(0,Z.jsx)(Mn,{children:(0,Z.jsx)(On,{children:(0,Z.jsx)(J,{id:`7H4UHD`,values:m,components:h})})}),e[7]=m,e[8]=g);let _=r??``,v;e[9]!==o||e[10]!==_?(v=(0,Z.jsx)(An,{children:(0,Z.jsx)(gv,{fetchState:o,tag:_,onSelectDoc:f})}),e[9]=o,e[10]=_,e[11]=v):v=e[11];let y;e[12]!==g||e[13]!==v?(y=(0,Z.jsxs)(kn,{children:[g,v]}),e[12]=g,e[13]=v,e[14]=y):y=e[14];let b;return e[15]!==t||e[16]!==y?(b=(0,Z.jsx)(Nn,{open:t,onOpenChange:n,children:y}),e[15]=t,e[16]=y,e[17]=b):b=e[17],b}function gv(e){let t=(0,$.c)(15),{fetchState:n,tag:r,onSelectDoc:i}=e;if(n.kind===`idle`||n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-loading`,children:(0,Z.jsx)(J,{id:`yQE2r9`})}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`p`,{className:`text-destructive text-sm`,"data-testid":`tag-dialog-error`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.docs.length===0){let e;t[3]===r?e=t[4]:(e={tag:r},t[3]=r,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n={0:(0,Z.jsx)(`span`,{className:`font-mono`})},t[5]=n):n=t[5];let i;return t[6]===e?i=t[7]:(i=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-empty`,children:(0,Z.jsx)(J,{id:`lAiyU_`,values:e,components:n})}),t[6]=e,t[7]=i),i}let a;if(t[8]!==n.docs||t[9]!==i){let e;t[11]===i?e=t[12]:(e=e=>{let t=e.matchingTags??[];return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`w-full rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring`,onClick:()=>i(e.docName),"data-testid":`tag-dialog-row`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium`,children:e.title}),e.docName===e.title?null:(0,Z.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.docName}),t.length>0?(0,Z.jsx)(`span`,{className:`mt-1 flex flex-wrap items-center gap-1`,"data-testid":`tag-dialog-row-matches`,children:t.map(_v)}):null]})},e.docName)},t[11]=i,t[12]=e),a=n.docs.map(e),t[8]=n.docs,t[9]=i,t[10]=a}else a=t[10];let o;return t[13]===a?o=t[14]:(o=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,"data-testid":`tag-dialog-list`,children:a}),t[13]=a,t[14]=o),o}function _v(e){return(0,Z.jsxs)(`span`,{"data-testid":`tag-dialog-row-match`,"data-tag":e,className:`tag pointer-events-none text-xs`,children:[`#`,e]},e)}var vv=`raw-mdx-nav`,yv=`ok-editor-mode-v1`,bv=[`wysiwyg`,`source`],xv=`wysiwyg`;function Sv(e){return bv.includes(e)}function Cv(e=localStorage){try{let t=e.getItem(yv);if(t===null)return xv;if(Sv(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return xv}function wv(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return Sv(n)?n:Cv(t)}function Tv(e,t=localStorage){try{return t.setItem(yv,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function Ev(){let e=(0,$.c)(3),[t,n]=(0,Q.useState)(wv),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Tv(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Dv(){let e=(0,$.c)(3),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={},e[0]=t):t=e[0];let[n,r]=(0,Q.useState)(t),i,a;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=window.okDesktop?.terminal;if(typeof e?.cliInstalledMap!=`function`)return;let t=!1,n=()=>{e.cliInstalledMap().then(e=>{t||r(e)}).catch(Ov)};return n(),window.addEventListener(`focus`,n),()=>{t=!0,window.removeEventListener(`focus`,n)}},a=[],e[1]=i,e[2]=a):(i=e[1],a=e[2]),(0,Q.useEffect)(i,a),n}function Ov(e){console.warn(`[terminal] cliInstalledMap probe failed:`,e)}function kv(e){let t=(0,$.c)(4),{_:n}=jt(),r=(0,Q.useRef)(!1),i,a;t[0]!==n||t[1]!==e?(i=()=>{e===`no-push-permission`&&!r.current&&(r.current=!0,ul.info(n({id:`JkCD2u`})))},a=[e,n],t[0]=n,t[1]=e,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,Q.useEffect)(i,a)}function Av(){let e=(0,$.c)(8),{projectLocalConfig:t,projectLocalSynced:n,projectLocalBinding:r}=Bu(),i=(0,Q.useRef)(!1),a;e[0]!==r||e[1]!==t?.autoSync||e[2]!==n?(a=()=>{if(!n||i.current||r===null)return;let e=t?.autoSync;if(e?.inheritedNoticePending!==!0)return;i.current=!0;let a=typeof e.inheritedFrom==`string`?e.inheritedFrom:``;ul(e.enabled===!0?(0,Z.jsx)(J,{id:`4zEZS5`,values:{project:a}}):(0,Z.jsx)(J,{id:`AaaESH`,values:{project:a}})),r.patch({autoSync:{inheritedNoticePending:null}})},e[0]=r,e[1]=t?.autoSync,e[2]=n,e[3]=a):a=e[3];let o;e[4]!==r||e[5]!==t||e[6]!==n?(o=[n,t,r],e[4]=r,e[5]=t,e[6]=n,e[7]=o):o=e[7],(0,Q.useEffect)(a,o)}var jv=`ok-ask-ai-agent-v2`,Mv=`ok-ask-ai-default-agent-v1`,Nv=`ok-preferred-agent-v1`,Pv=`terminal-cli`;function Fv(e){return`${Pv}:${e}`}function Iv(e){return e===null?null:e===`terminal-cli`?`claude`:za.find(t=>e===Fv(t))??null}function Lv(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Rv(e){let t=Lv(e);if(!t)return null;try{let e=t.getItem(jv);return e===null?t.getItem(Mv)??t.getItem(Nv):e}catch{return null}}function zv(e,t){let n=Lv(t);if(n)try{n.setItem(jv,e)}catch(e){console.warn(`[ask-ai] Failed to persist default agent:`,e)}}function Bv(e,t){let n=Us.filter(t=>e[t.id]?.installed===!0);if(t){let e=n.find(e=>e.id===t);if(e)return e}return n[0]??null}function Vv(e,t){return Iv(e)||(za.find(e=>t[e]===!0)??`claude`)}var Hv=`ok-terminal-dock-v1`,Uv=`right`;function Wv(e){return e===`bottom`?`bottom`:`right`}function Gv(e){try{return Wv((e??localStorage).getItem(Hv))}catch{return Uv}}function Kv(e,t){try{(t??localStorage).setItem(Hv,e)}catch{}}function qv(){try{return typeof localStorage>`u`?Uv:Gv()}catch{return Uv}}var Jv=`ok-terminal-new-tab-bare-v1`;function Yv(e){try{return(e??localStorage).getItem(Jv)===`1`}catch{return!1}}function Xv(e,t){try{let n=t??localStorage;e?n.setItem(Jv,`1`):n.removeItem(Jv)}catch{}}function Zv(){try{return typeof localStorage>`u`?!1:Yv()}catch{return!1}}function Qv(e){let t=(0,$.c)(25),{open:n,onResolved:r}=e,{_:i}=jt(),a=us(),o;t[0]!==i||t[1]!==r||t[2]!==a?(o=function(e){if(a===null){ul.error(i({id:`fiMNLl`}));return}let t=a(e);if(!t.ok){let n=t.error;ul.error(i(e?{id:`FUMerq`,values:{detail:n}}:{id:`0t0bbC`,values:{detail:n}}));return}r()},t[0]=i,t[1]=r,t[2]=a,t[3]=o):o=t[3];let s=o,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Mn,{children:(0,Z.jsx)(ps,{})}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(ms,{}),t[5]=l):l=t[5];let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsxs)(An,{children:[l,(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`ZLQol-`,components:{0:(0,Z.jsx)(`span`,{className:`font-medium`})}})})]}),t[6]=u):u=t[6];let d;t[7]===s?d=t[8]:(d=()=>s(!1),t[7]=s,t[8]=d);let f=a===null,p;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(J,{id:`IKoTAC`}),t[9]=p):p=t[9];let m;t[10]!==d||t[11]!==f?(m=(0,Z.jsx)(Y,{variant:`outline`,className:`uppercase font-mono`,onClick:d,disabled:f,children:p}),t[10]=d,t[11]=f,t[12]=m):m=t[12];let h;t[13]===s?h=t[14]:(h=()=>s(!0),t[13]=s,t[14]=h);let g=a===null,_;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(J,{id:`XU0OXn`}),t[15]=_):_=t[15];let v;t[16]!==g||t[17]!==h?(v=(0,Z.jsx)(Y,{onClick:h,disabled:g,children:_}),t[16]=g,t[17]=h,t[18]=v):v=t[18];let y;t[19]!==v||t[20]!==m?(y=(0,Z.jsxs)(kn,{className:`sm:max-w-lg`,showCloseButton:!1,children:[c,u,(0,Z.jsxs)(jn,{children:[m,v]})]}),t[19]=v,t[20]=m,t[21]=y):y=t[21];let b;return t[22]!==n||t[23]!==y?(b=(0,Z.jsx)(Nn,{open:n,onOpenChange:$v,children:y}),t[22]=n,t[23]=y,t[24]=b):b=t[24],b}function $v(){}function ey(e){return!e.autoSyncOnboardingDismissed&&e.hasRemote===!0&&e.projectLocalSynced===!0&&e.projectSynced===!0&&e.projectLocalConfig!==null&&e.projectLocalConfig.autoSync?.enabled===null&&(e.projectConfig?.autoSync?.default??null)===null&&(e.pushPermissionCheckStatus===`allowed`||e.pushPermissionCheckStatus===`unknown`)}var ty=new Map(Ro.map(e=>[e.id,e.alias]));function ny(e,t,n){return Eo({relativePath:vc(e),source:t.source,code:t.code,ruleAlias:t.source===`markdownlint`?ty.get(t.code):void 0,message:t.message,line:t.range.start.line+1,column:t.range.start.character+1,lineText:n})}var ry=5;async function iy(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Oo.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Fn(_l._({id:`XopE_I`,values:{status:r}}),{status:r})}let r=_o.safeParse(n);if(!r.success)throw new Fn(_l._({id:`lZAiSP`}),{status:t.status});return r.data.backlinks}async function ay(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Oo.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new Fn(_l._({id:`GemPfn`,values:{status:r}}),{status:r})}let r=fa.safeParse(n);if(!r.success)throw new Fn(_l._({id:`2YZwPB`}),{status:t.status});return r.data.forwardLinks}function oy(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}function sy(e){window.location.hash=du(e)}function cy(e){let t=(0,$.c)(9),{title:n,count:r,isLoading:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(Ms,{className:`size-3.5 text-muted-foreground transition-transform group-data-[state=closed]:-rotate-90`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[a,(0,Z.jsx)(Qt,{children:n})]}),t[1]=n,t[2]=o);let s;t[3]!==r||t[4]!==i?(s=!i&&(0,Z.jsx)(Zt,{children:r}),t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(Tn,{className:`group flex w-full cursor-pointer items-center justify-between px-5 py-3 text-left transition-colors hover:bg-muted/40`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function ly(e){let t=(0,$.c)(10),{total:n,expanded:r,onToggle:i}=e;if(n<=ry)return null;let a=n-ry,o;t[0]===r?o=t[1]:(o=r?(0,Z.jsx)(Ms,{className:`size-3`}):(0,Z.jsx)(Ns,{className:`size-3`}),t[0]=r,t[1]=o);let s;t[2]!==r||t[3]!==a?(s=r?(0,Z.jsx)(J,{id:`6fGjTz`}):(0,Z.jsx)(J,{id:`ZptNUh`,values:{hidden:a}}),t[2]=r,t[3]=a,t[4]=s):s=t[4];let c;return t[5]!==r||t[6]!==i||t[7]!==o||t[8]!==s?(c=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,className:`mt-2 inline-flex cursor-pointer items-center gap-1 px-3 text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:i,children:[o,s]}),t[5]=r,t[6]=i,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function uy(e){let t=(0,$.c)(35),{icon:n,iconColorClass:r,rowTooltip:i,title:a,path:o,anchor:s,snippet:c,titleHover:l,ariaLabel:u,href:d,external:f,disabled:p,onClick:m}=e,h=o!==void 0&&o!==a,g=r??`text-muted-foreground`,_;t[0]===g?_=t[1]:(_=X(`mt-0.5 shrink-0`,g),t[0]=g,t[1]=_);let v;t[2]!==n||t[3]!==_?(v=(0,Z.jsx)(`span`,{className:_,children:n}),t[2]=n,t[3]=_,t[4]=v):v=t[4];let y=v,b;t[5]!==u||t[6]!==p||t[7]!==f||t[8]!==d||t[9]!==m||t[10]!==a||t[11]!==l?(b=d?(0,Z.jsxs)(`a`,{href:d,target:f?`_blank`:void 0,rel:f?`noopener noreferrer`:void 0,"aria-label":u,title:l,onClick:m,className:`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,children:[a,f?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` `,(0,Z.jsx)(J,{id:`dbtjJh`})]}):null]}):(0,Z.jsx)(`button`,{type:`button`,"aria-label":u,title:l,disabled:p,onClick:m,className:X(`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,`cursor-pointer bg-transparent p-0 disabled:cursor-not-allowed disabled:opacity-60`),children:a}),t[5]=u,t[6]=p,t[7]=f,t[8]=d,t[9]=m,t[10]=a,t[11]=l,t[12]=b):b=t[12];let x=b,S;t[13]===y?S=t[14]:(S=(0,Z.jsx)(`div`,{className:`mt-px flex items-center`,children:y}),t[13]=y,t[14]=S);let C;t[15]!==s||t[16]!==o||t[17]!==h?(C=h?(0,Z.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[o,s?(0,Z.jsxs)(`span`,{className:`ml-1`,children:[`· #`,s]}):null]}):null,t[15]=s,t[16]=o,t[17]=h,t[18]=C):C=t[18];let w;t[19]===c?w=t[20]:(w=c?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground`,children:c}):null,t[19]=c,t[20]=w);let T;t[21]!==x||t[22]!==C||t[23]!==w?(T=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5 text-1sm`,children:[x,C,w]}),t[21]=x,t[22]=C,t[23]=w,t[24]=T):T=t[24];let E;t[25]!==S||t[26]!==T?(E=(0,Z.jsxs)(`div`,{className:`group relative flex items-start gap-2.5 rounded-md px-3 py-2.5 transition-colors hover:bg-muted/80`,children:[S,T]}),t[25]=S,t[26]=T,t[27]=E):E=t[27];let D=E;if(i){let e;t[28]===D?e=t[29]:(e=(0,Z.jsx)(yn,{asChild:!0,children:D}),t[28]=D,t[29]=e);let n;t[30]===i?n=t[31]:(n=(0,Z.jsx)(bn,{side:`top`,children:i}),t[30]=i,t[31]=n);let r;return t[32]!==e||t[33]!==n?(r=(0,Z.jsxs)(Sn,{children:[e,n]}),t[32]=e,t[33]=n,t[34]=r):r=t[34],r}return D}function dy(e){let t=(0,$.c)(39),{docName:n}=e,{_:r}=jt(),{folderPaths:i,pages:a,pagesBySlug:o,pagesByBasename:s,loading:c}=Ls(),l,u;t[0]===n?(l=t[1],u=t[2]):(l=[`backlinks`,n],u=()=>iy(n),t[0]=n,t[1]=l,t[2]=u);let d;t[3]!==n||t[4]!==c||t[5]!==a?(d=!c&&(a.has(n)||Po(n)),t[3]=n,t[4]=c,t[5]=a,t[6]=d):d=t[6];let f;t[7]!==l||t[8]!==u||t[9]!==d?(f={queryKey:l,queryFn:u,enabled:d},t[7]=l,t[8]=u,t[9]=d,t[10]=f):f=t[10];let{data:p,isLoading:m,error:h}=Bt(f),g;t[11]===p?g=t[12]:(g=p===void 0?[]:p,t[11]=p,t[12]=g);let _=g,[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(n);b!==n&&(x(n),y(!1));let S;t[13]!==_||t[14]!==v?(S=v?_:_.slice(0,ry),t[13]=_,t[14]=v,t[15]=S):S=t[15];let C=S,w;t[16]===r?w=t[17]:(w=r({id:`9NJWgv`}),t[16]=r,t[17]=w);let T;t[18]!==_.length||t[19]!==m||t[20]!==w?(T=(0,Z.jsx)(cy,{title:w,count:_.length,isLoading:m}),t[18]=_.length,t[19]=m,t[20]=w,t[21]=T):T=t[21];let E;t[22]!==r||t[23]!==_.length||t[24]!==h||t[25]!==v||t[26]!==i||t[27]!==m||t[28]!==a||t[29]!==s||t[30]!==o||t[31]!==C?(E=h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Rt,{children:h instanceof Error?h.message:r({id:`Xet9MX`})})}):_.length===0&&!m?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Gt,{children:(0,Z.jsx)(J,{id:`rVxu1k`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:C.map((e,t)=>{let n=Qu(e.source,{pages:a,folderPaths:i,pagesBySlug:o,pagesByBasename:s});return(0,Z.jsx)(uy,{icon:(0,Z.jsx)(St,{className:`size-3.5`}),title:e.title,path:oy(e.source),titleHover:e.source,anchor:e.anchor,snippet:e.snippet,href:du(n.hashDocName,e.anchor)},`${e.source}-${t}`)})}),(0,Z.jsx)(ly,{total:_.length,expanded:v,onToggle:()=>y(fy)})]}),t[22]=r,t[23]=_.length,t[24]=h,t[25]=v,t[26]=i,t[27]=m,t[28]=a,t[29]=s,t[30]=o,t[31]=C,t[32]=E):E=t[32];let D;t[33]!==m||t[34]!==E?(D=(0,Z.jsx)(wn,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":m,children:E})}),t[33]=m,t[34]=E,t[35]=D):D=t[35];let O;return t[36]!==D||t[37]!==T?(O=(0,Z.jsxs)(En,{defaultOpen:!0,children:[T,D]}),t[36]=D,t[37]=T,t[38]=O):O=t[38],O}function fy(e){return!e}function py(e){let t=(0,$.c)(49),{docName:n}=e,{_:r}=jt(),{addPage:i,folderPaths:a,pages:o,pagesBySlug:s,pagesByBasename:c,loading:l}=Ls(),u,d;t[0]===n?(u=t[1],d=t[2]):(u=[`forward-links`,n],d=()=>ay(n),t[0]=n,t[1]=u,t[2]=d);let f;t[3]!==n||t[4]!==o||t[5]!==l?(f=!l&&(o.has(n)||Po(n)),t[3]=n,t[4]=o,t[5]=l,t[6]=f):f=t[6];let p;t[7]!==u||t[8]!==d||t[9]!==f?(p={queryKey:u,queryFn:d,enabled:f},t[7]=u,t[8]=d,t[9]=f,t[10]=p):p=t[10];let{data:m,isLoading:h,error:g}=Bt(p),_;t[11]===m?_=t[12]:(_=m===void 0?[]:m,t[11]=m,t[12]=_);let v=_,[y,b]=(0,Q.useState)(null),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(n);C!==n&&(w(n),S(!1),b(null));let T;t[13]!==x||t[14]!==v?(T=x?v:v.slice(0,ry),t[13]=x,t[14]=v,t[15]=T):T=t[15];let E=T,D;t[16]!==r||t[17]!==i||t[18]!==y?(D=async function(e,t){if(!y){b(t);try{await R(e,{addPage:i,onCreated:sy}),b(null)}catch(e){let t=e;ul.error(t instanceof Error?t.message:r({id:`tfi40B`})),b(null)}}},t[16]=r,t[17]=i,t[18]=y,t[19]=D):D=t[19];let O=D,k;t[20]!==r||t[21]!==y||t[22]!==a||t[23]!==O||t[24]!==o||t[25]!==c||t[26]!==s||t[27]!==l?(k=function(e){let{title:t}=e;if(e.kind===`external`){let t=e.title===e.url;return(0,Z.jsx)(uy,{icon:(0,Z.jsx)(hs,{className:`size-3.5`}),rowTooltip:r({id:`XDzAnp`}),title:e.title,path:t?void 0:e.url,titleHover:e.url,snippet:e.snippet,href:e.url,external:!0},`ext:${e.url}`)}let n=In(e.docName,{pages:o,folderPaths:a,pagesBySlug:s,pagesByBasename:c}),i=!l&&n.kind===`create`,u=!l&&n.kind===`navigate`&&n.displayState===`folder`,d=oy(e.docName),f=e.title===e.docName?d:e.title,p=`doc:${e.docName}:${e.anchor??``}`,m=n.kind===`navigate`?n.hashDocName:e.docName,h=n.kind===`navigate`&&n.hash?n.hash:du(m,e.anchor);if(i&&n.kind===`create`){let i={initialDir:n.initialDir,suggestedName:n.suggestedName};return(0,Z.jsx)(uy,{icon:(0,Z.jsx)(Gc,{className:`size-3.5`}),iconColorClass:`text-amber-600 dark:text-amber-400`,rowTooltip:r(y===p?{id:`kj9pAE`}:{id:`IQPyrD`}),ariaLabel:r(y===p?{id:`un8kBM`,values:{linkTitle:t}}:{id:`jEdF24`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,disabled:y!==null,onClick:()=>void O(i,p)},p)}return u&&n.kind===`navigate`?(0,Z.jsx)(uy,{icon:(0,Z.jsx)(Tm,{className:`size-3.5`}),iconColorClass:`text-sky-600 dark:text-sky-400`,ariaLabel:r({id:`P6lAT3`,values:{linkTitle:t}}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p):(0,Z.jsx)(uy,{icon:(0,Z.jsx)(St,{className:`size-3.5`}),title:f,path:d,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:h},p)},t[20]=r,t[21]=y,t[22]=a,t[23]=O,t[24]=o,t[25]=c,t[26]=s,t[27]=l,t[28]=k):k=t[28];let A=k,j;t[29]===r?j=t[30]:(j=r({id:`O0Z2Xr`}),t[29]=r,t[30]=j);let M;t[31]!==h||t[32]!==v.length||t[33]!==j?(M=(0,Z.jsx)(cy,{title:j,count:v.length,isLoading:h}),t[31]=h,t[32]=v.length,t[33]=j,t[34]=M):M=t[34];let N;t[35]!==r||t[36]!==g||t[37]!==x||t[38]!==h||t[39]!==v.length||t[40]!==A||t[41]!==E?(N=g?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Rt,{children:g instanceof Error?g.message:r({id:`pZAs1T`})})}):v.length===0&&!h?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(Gt,{children:(0,Z.jsx)(J,{id:`roiUQQ`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:E.map(A)}),(0,Z.jsx)(ly,{total:v.length,expanded:x,onToggle:()=>S(my)})]}),t[35]=r,t[36]=g,t[37]=x,t[38]=h,t[39]=v.length,t[40]=A,t[41]=E,t[42]=N):N=t[42];let P;t[43]!==h||t[44]!==N?(P=(0,Z.jsx)(wn,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":h,children:N})}),t[43]=h,t[44]=N,t[45]=P):P=t[45];let F;return t[46]!==M||t[47]!==P?(F=(0,Z.jsxs)(En,{defaultOpen:!0,children:[M,P]}),t[46]=M,t[47]=P,t[48]=F):F=t[48],F}function my(e){return!e}function hy(e){let t=(0,$.c)(11),{docName:n,className:r}=e,i=r===void 0?``:r,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(py,{docName:n}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(Xi,{}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(dy,{docName:n}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,Z.jsxs)(Jt,{className:`px-0 py-0`,children:[a,o,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==c?(l=(0,Z.jsx)($t,{className:i,children:c}),t[8]=i,t[9]=c,t[10]=l):l=t[10],l}function gy(e){let t=e.setTimer??((e,t)=>setTimeout(e,t)),n=e.clearTimer??(e=>clearTimeout(e)),r=!1,i=!1,a=null,o=null,s=e.baseMs,c=!1,l=n=>{if(!r){if(e.isPaused()){c=!0;return}a=t(u,n)}};async function u(){if(a=null,c=!1,r)return;if(e.isPaused()){c=!0;return}o=new AbortController;let t=o.signal;try{let n=await e.poll(t);if(r)return;n===`ok`?(s=e.baseMs,l(e.baseMs)):(s=Math.min(s*2,e.maxBackoffMs),l(s))}catch{if(r||t.aborted)return;s=Math.min(s*2,e.maxBackoffMs),l(s)}}return{start(){r||i||(i=!0,u())},resume(){r||!e.isPaused()&&c&&a===null&&(c=!1,u())},stop(){r=!0,a!==null&&(n(a),a=null),o?.abort()}}}var _y=1e4,vy=6e4;async function yy(e,t,n){try{let r=await fetch(`/api/history?docName=${encodeURIComponent(e)}&limit=100`,{signal:t});if(!r.ok)return n.setError(n.unavailableMessage),`error`;let i=await r.json();return n.setEntries((i.entries??[]).filter(e=>e.type!==`checkpoint`)),n.setError(null),`ok`}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;return n.setError(n.unavailableMessage),console.error(`[timeline]`,e),`error`}finally{t.aborted||n.setLoading(!1)}}function by(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return _l._({id:`xOTzt5`});if(r<3600){let e=Math.floor(r/60);return _l._({id:`UyROxs`,values:{mins:e}})}if(r<86400){let e=Math.floor(r/3600);return _l._({id:`wXO4Tg`,values:{hrs:e}})}if(r<86400*2)return _l._({id:`rQRrkB`});let i=Math.floor(r/86400);return i<7?_l._({id:`6u9LvN`,values:{days:i}}):t.toLocaleDateString()}function xy(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function Sy(e){if(e.type===`upstream`)return{kind:`upstream`};let t=e.message,n=/^rollback: .+ to ([0-9a-f]{7,40})$/.exec(t);if(n)return{kind:`restore`,targetSha7:n[1].slice(0,7)};let r=/^rename: (.+) -> (.+)$/.exec(t);return r?{kind:`rename`,from:r[1],to:r[2]}:t.startsWith(`reconcile: `)?{kind:`reconcile`}:t.startsWith(`import: `)?{kind:`upstream`}:{kind:`edit`}}function Cy(e){return e.split(`/`).pop()??e}function wy(e){return e.type===`upstream`?_l._({id:`K_vT1F`}):e.contributors.length===1?e.contributors[0].name:e.contributors.length>1?e.contributors.map(e=>e.name).join(`, `):e.author===`openknowledge-server`||e.author===`server`?_l._({id:`B2DrPb`}):e.author}function Ty(e){let t=(0,$.c)(17),{entry:n,isDark:r}=e;if(n.type===`upstream`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(ts,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[0]=e):e=t[0],e}if(n.contributors.length>0){let e=n.contributors[0],i=e.colorSeed??e.name,a;t[1]===i?a=t[2]:(a=po(i),t[1]=i,t[2]=a);let o=a,s=r?Fo[o]??Wo[o]:Wo[o],c;t[3]!==s||t[4]!==i?(c=s??No(i),t[3]=s,t[4]=i,t[5]=c):c=t[5];let l=c;if(o!==`bot`){let e;t[6]===l?e=t[7]:(e={color:l},t[6]=l,t[7]=e);let n;return t[8]!==o||t[9]!==e?(n=(0,Z.jsx)($u,{icon:o,width:14,height:14,className:`shrink-0`,style:e}),t[8]=o,t[9]=e,t[10]=n):n=t[10],n}if(e.name===`File System`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Dm,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[11]=e):e=t[11],e}if(e.name===`OpenKnowledge (service)`||e.name===`Git (upstream)`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(rs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[12]=e):e=t[12],e}let u;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(yh,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[13]=u):u=t[13],u}if(n.authorEmail.includes(`agent`)||n.author.includes(`agent`)||n.authorEmail.includes(`cursor`)||n.authorEmail.includes(`claude`)){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(pc,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[14]=e):e=t[14],e}if(n.author===`openknowledge-server`||n.author===`server`){let e;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(rs,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[15]=e):e=t[15],e}let i;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(yh,{className:`size-3.5 shrink-0 text-muted-foreground`}),t[16]=i):i=t[16],i}function Ey(e){let t=[];for(let n of e.contributors)if(n.summaries)for(let e of n.summaries)t.push(e);return t}function Dy(e){let t=(0,$.c)(21),{summaries:n}=e,[r,i]=(0,Q.useState)(!1),a=(0,Q.useId)();if(n.length===0)return null;let o,s;t[0]===n?(o=t[1],s=t[2]):([o,...s]=n,t[0]=n,t[1]=o,t[2]=s);let c=s.length,l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),t[3]=l):l=t[3];let u;t[4]===o?u=t[5]:(u=(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[l,o]}),t[4]=o,t[5]=u);let d;t[6]!==r||t[7]!==s?(d=r&&s.map(ky),t[6]=r,t[7]=s,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==u||t[11]!==d?(f=(0,Z.jsxs)(`ul`,{id:a,className:`list-none`,children:[u,d]}),t[9]=a,t[10]=u,t[11]=d,t[12]=f):f=t[12];let p;t[13]!==r||t[14]!==c||t[15]!==a||t[16]!==s.length?(p=s.length>0&&(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,"aria-controls":a,className:`inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,onClick:e=>{e.stopPropagation(),i(Oy)},children:[r?(0,Z.jsx)(Ms,{className:`size-3`}):(0,Z.jsx)(Ns,{className:`size-3`}),r?(0,Z.jsx)(J,{id:`vLyv1R`}):(0,Z.jsx)(J,{id:`ZptNUh`,values:{hidden:c}})]}),t[13]=r,t[14]=c,t[15]=a,t[16]=s.length,t[17]=p):p=t[17];let m;return t[18]!==f||t[19]!==p?(m=(0,Z.jsxs)(`div`,{className:`mt-0.5`,children:[f,p]}),t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function Oy(e){return!e}function ky(e,t){return(0,Z.jsxs)(`li`,{className:`text-xs text-foreground/90`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:`• `}),e]},`${t}-${e}`)}function Ay(e){let t=(0,$.c)(36),{descriptor:n,allDocs:r,versionBySha7:i,onJumpToVersion:a}=e,{_:o}=jt();if(n.kind===`restore`){let e,r;t[0]!==o||t[1]!==n.targetSha7||t[2]!==i?(r=i.get(n.targetSha7),e=o(r?{id:`sICrVf`,values:{0:xy(r.timestamp)}}:{id:`i09An-`,values:{0:n.targetSha7}}),t[0]=o,t[1]=n.targetSha7,t[2]=i,t[3]=e,t[4]=r):(e=t[3],r=t[4]);let s=e,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Hi,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[5]=c):c=t[5];let l;return t[6]!==n.targetSha7||t[7]!==s||t[8]!==a||t[9]!==r?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[c,r?(0,Z.jsx)(`button`,{type:`button`,className:`truncate text-left underline-offset-2 hover:text-foreground hover:underline`,title:s,onClick:e=>{e.stopPropagation(),a(n.targetSha7)},children:s}):(0,Z.jsx)(`span`,{className:`truncate`,title:s,children:s})]}),t[6]=n.targetSha7,t[7]=s,t[8]=a,t[9]=r,t[10]=l):l=t[10],l}if(n.kind===`rename`){let e=`${n.from} → ${n.to}`,r;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)($p,{className:`size-3 shrink-0`,"aria-hidden":!0}),t[11]=r):r=t[11];let i;t[12]!==o||t[13]!==n.from||t[14]!==n.to?(i=o({id:`GkYV_4`,values:{0:Cy(n.from),1:Cy(n.to)}}),t[12]=o,t[13]=n.from,t[14]=n.to,t[15]=i):i=t[15];let a;t[16]===i?a=t[17]:(a=(0,Z.jsx)(`span`,{className:`truncate`,children:i}),t[16]=i,t[17]=a);let s;return t[18]!==e||t[19]!==a?(s=(0,Z.jsxs)(`p`,{className:`flex items-center gap-1 truncate text-xs text-muted-foreground`,title:e,children:[r,a]}),t[18]=e,t[19]=a,t[20]=s):s=t[20],s}if(n.kind===`reconcile`){let e;t[21]===o?e=t[22]:(e=o({id:`0qyKG6`}),t[21]=o,t[22]=e);let n;return t[23]===e?n=t[24]:(n=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:e}),t[23]=e,t[24]=n),n}if(r.length>0){let e;t[25]===r?e=t[26]:(e=r.join(`, `),t[25]=r,t[26]=e);let n;t[27]===r?n=t[28]:(n=r.join(`, `),t[27]=r,t[28]=n);let i;return t[29]!==e||t[30]!==n?(i=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,title:e,children:n}),t[29]=e,t[30]=n,t[31]=i):i=t[31],i}if(n.kind===`upstream`)return null;let s;t[32]===o?s=t[33]:(s=o({id:`MRZxAn`}),t[32]=o,t[33]=s);let c;return t[34]===s?c=t[35]:(c=(0,Z.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:s}),t[34]=s,t[35]=c),c}function jy(e){let t=(0,$.c)(122),{entry:n,isDark:r,docName:i,laterEdits:a,onRestoreSuccess:o,versionBySha7:s,onJumpToVersion:c,registerRowRef:l,flashing:u}=e,{_:d}=jt(),f;t[0]===n.timestamp?f=t[1]:(f=by(n.timestamp),t[0]=n.timestamp,t[1]=f);let p=f,m;t[2]===n?m=t[3]:(m=wy(n),t[2]=n,t[3]=m);let h=m,g;t[4]===n.timestamp?g=t[5]:(g=xy(n.timestamp),t[4]=n.timestamp,t[5]=g);let _=g,v;t[6]===n.contributors?v=t[7]:(v=n.contributors.flatMap(My),t[6]=n.contributors,t[7]=v);let y=v,b;t[8]===n?b=t[9]:(b=Ey(n),t[8]=n,t[9]=b);let x=b,S;t[10]===n?S=t[11]:(S=Sy(n),t[10]=n,t[11]=S);let C=S,[w,T]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(!1),O=(0,Q.useRef)(null),k=Jc(),A=k?.docName===i&&k.sha===n.sha,j,M;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>()=>O.current?.abort(),M=[],t[12]=j,t[13]=M):(j=t[12],M=t[13]),(0,Q.useEffect)(j,M);let N;t[14]!==_||t[15]!==h||t[16]!==i||t[17]!==n.parentSha||t[18]!==n.sha||t[19]!==a||t[20]!==p?(N=()=>{td(),qc({docName:i,sha:n.sha,parentSha:n.parentSha??null,laterEdits:a,authorName:h,relativeTime:p,absoluteTime:_})},t[14]=_,t[15]=h,t[16]=i,t[17]=n.parentSha,t[18]=n.sha,t[19]=a,t[20]=p,t[21]=N):N=t[21];let P=N,F;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(F=function(){O.current?.abort(),O.current=null,D(!1),T(!1)},t[22]=F):F=t[22];let I=F,L;t[23]!==d||t[24]!==i||t[25]!==n.sha||t[26]!==o?(L=async function(){D(!0);let e=new AbortController;O.current=e;let t=function(){e.signal.aborted||D(!1),O.current===e&&(O.current=null)},r;try{r=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:i,commitSha:n.sha}),signal:e.signal})}catch(r){let a=r;!e.signal.aborted&&!(a instanceof DOMException&&a.name===`AbortError`)&&(console.error(`[timeline] rollback fetch failed`,{docName:i,sha:n.sha,err:a}),ul.error(d({id:`NkXEFS`}),{duration:4e3})),t();return}if(e.signal.aborted){t();return}if(r.ok)T(!1),o();else{let e=`HTTP ${r.status}`;try{let t=Oo.safeParse(await r.json());t.success&&(e=t.data.title)}catch{}console.error(`[timeline] rollback failed`,{docName:i,sha:n.sha,status:r.status,detail:e}),ul.error(d({id:`uM6jnS`}),{description:e,duration:6e3})}t()},t[23]=d,t[24]=i,t[25]=n.sha,t[26]=o,t[27]=L):L=t[27];let R=L,z;t[28]!==n||t[29]!==r?(z=(0,Z.jsx)(Ty,{entry:n,isDark:r}),t[28]=n,t[29]=r,t[30]=z):z=t[30];let B=z,V=u?`ring-2 ring-ring ring-offset-1 ring-offset-background`:``,H;t[31]===V?H=t[32]:(H=[`flex flex-col rounded-lg transition-shadow`,V],t[31]=V,t[32]=H);let U=H.join(` `),W=A?`bg-muted`:`hover:bg-muted/80`,G;t[33]===W?G=t[34]:(G=[`group flex w-full items-start gap-2.5 rounded-lg px-3 py-2.5 text-left transition-colors cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-ring`,W],t[33]=W,t[34]=G);let K=G.join(` `),ee;t[35]===P?ee=t[36]:(ee=e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),P())},t[35]=P,t[36]=ee);let te;t[37]===B?te=t[38]:(te=(0,Z.jsx)(`span`,{className:`mt-0.5 shrink-0`,children:B}),t[37]=B,t[38]=te);let q;t[39]===h?q=t[40]:(q=(0,Z.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:h}),t[39]=h,t[40]=q);let ne;t[41]!==n.timestamp||t[42]!==p?(ne=(0,Z.jsx)(`time`,{className:`ml-auto shrink-0 text-xs text-muted-foreground/80`,dateTime:n.timestamp,title:n.timestamp,children:p}),t[41]=n.timestamp,t[42]=p,t[43]=ne):ne=t[43];let re;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px shrink-0 bg-border`}),t[44]=re):re=t[44];let ie;t[45]===d?ie=t[46]:(ie=d({id:`Yea-K5`}),t[45]=d,t[46]=ie);let ae;t[47]!==R||t[48]!==a?(ae=e=>{e.stopPropagation(),a>0?T(!0):R()},t[47]=R,t[48]=a,t[49]=ae):ae=t[49];let oe;t[50]===E?oe=t[51]:(oe=E?(0,Z.jsx)(zc,{className:`size-3 animate-spin`}):(0,Z.jsx)(Kc,{className:`size-3`}),t[50]=E,t[51]=oe);let se;t[52]!==E||t[53]!==ie||t[54]!==ae||t[55]!==oe?(se=(0,Z.jsx)(yn,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-destructive`,"data-testid":`timeline-entry-restore`,"aria-label":ie,disabled:E,onClick:ae,children:oe})}),t[52]=E,t[53]=ie,t[54]=ae,t[55]=oe,t[56]=se):se=t[56];let ce;t[57]===d?ce=t[58]:(ce=d({id:`Yea-K5`}),t[57]=d,t[58]=ce);let le;t[59]===ce?le=t[60]:(le=(0,Z.jsx)(bn,{side:`top`,children:ce}),t[59]=ce,t[60]=le);let ue;t[61]!==se||t[62]!==le?(ue=(0,Z.jsxs)(Sn,{children:[se,le]}),t[61]=se,t[62]=le,t[63]=ue):ue=t[63];let de;t[64]!==q||t[65]!==ne||t[66]!==ue?(de=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[q,ne,re,ue]}),t[64]=q,t[65]=ne,t[66]=ue,t[67]=de):de=t[67];let fe;t[68]===x?fe=t[69]:(fe=x.length>0&&(0,Z.jsx)(Dy,{summaries:x}),t[68]=x,t[69]=fe);let pe;t[70]!==y||t[71]!==C||t[72]!==c||t[73]!==s?(pe=(0,Z.jsx)(Ay,{descriptor:C,allDocs:y,versionBySha7:s,onJumpToVersion:c}),t[70]=y,t[71]=C,t[72]=c,t[73]=s,t[74]=pe):pe=t[74];let me;t[75]!==de||t[76]!==fe||t[77]!==pe?(me=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[de,fe,pe]}),t[75]=de,t[76]=fe,t[77]=pe,t[78]=me):me=t[78];let he;t[79]!==P||t[80]!==A||t[81]!==K||t[82]!==ee||t[83]!==te||t[84]!==me?(he=(0,Z.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-pressed":A,"data-testid":`timeline-entry-open`,className:K,onClick:P,onKeyDown:ee,children:[te,me]}),t[79]=P,t[80]=A,t[81]=K,t[82]=ee,t[83]=te,t[84]=me,t[85]=he):he=t[85];let ge;t[86]!==l||t[87]!==U||t[88]!==he?(ge=(0,Z.jsx)(`div`,{ref:l,className:U,children:he}),t[86]=l,t[87]=U,t[88]=he,t[89]=ge):ge=t[89];let _e;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(_e=e=>{e?T(!0):I()},t[90]=_e):_e=t[90];let ve;t[91]===d?ve=t[92]:(ve=d({id:`n3wx1q`}),t[91]=d,t[92]=ve);let ye;t[93]===ve?ye=t[94]:(ye=(0,Z.jsx)(On,{children:ve}),t[93]=ve,t[94]=ye);let be;t[95]===a?be=t[96]:(be=(0,Z.jsx)(J,{id:`nfPccR`,values:{laterEdits:a}}),t[95]=a,t[96]=be);let xe;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)(J,{id:`5ZbJFS`}),t[97]=xe):xe=t[97];let Se;t[98]===be?Se=t[99]:(Se=(0,Z.jsxs)(Dn,{children:[be,` `,xe]}),t[98]=be,t[99]=Se);let Ce;t[100]!==ye||t[101]!==Se?(Ce=(0,Z.jsxs)(Mn,{children:[ye,Se]}),t[100]=ye,t[101]=Se,t[102]=Ce):Ce=t[102];let we;t[103]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Z.jsx)(Y,{variant:`outline`,"data-testid":`timeline-entry-restore-cancel`,onClick:I,children:(0,Z.jsx)(J,{id:`dEgA5A`})}),t[103]=we):we=t[103];let Te;t[104]===R?Te=t[105]:(Te=()=>R(),t[104]=R,t[105]=Te);let Ee;t[106]===E?Ee=t[107]:(Ee=E?(0,Z.jsx)(zc,{className:`mr-2 size-4 animate-spin`}):null,t[106]=E,t[107]=Ee);let De;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Z.jsx)(J,{id:`yKu_3Y`}),t[108]=De):De=t[108];let Oe;t[109]!==E||t[110]!==Te||t[111]!==Ee?(Oe=(0,Z.jsxs)(jn,{children:[we,(0,Z.jsxs)(Y,{variant:`destructive`,"data-testid":`timeline-entry-restore-confirm`,disabled:E,onClick:Te,children:[Ee,De]})]}),t[109]=E,t[110]=Te,t[111]=Ee,t[112]=Oe):Oe=t[112];let ke;t[113]!==Ce||t[114]!==Oe?(ke=(0,Z.jsxs)(kn,{children:[Ce,Oe]}),t[113]=Ce,t[114]=Oe,t[115]=ke):ke=t[115];let Ae;t[116]!==w||t[117]!==ke?(Ae=(0,Z.jsx)(Nn,{open:w,onOpenChange:_e,children:ke}),t[116]=w,t[117]=ke,t[118]=Ae):Ae=t[118];let je;return t[119]!==ge||t[120]!==Ae?(je=(0,Z.jsxs)(Z.Fragment,{children:[ge,Ae]}),t[119]=ge,t[120]=Ae,t[121]=je):je=t[121],je}function My(e){return e.docs}function Ny(e){let t=(0,$.c)(27),{docName:n}=e,{_:r}=jt(),{resolvedTheme:i}=on(),a=i===`dark`,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[],t[0]=o):o=t[0];let[s,c]=(0,Q.useState)(o),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(null),p=(0,Q.useRef)(new Map),[m,h]=(0,Q.useState)(null),g=(0,Q.useRef)(null),_=new Map;for(let e of s)_.set(e.sha.slice(0,7),e);let v,y;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>()=>clearTimeout(g.current??void 0),y=[],t[1]=v,t[2]=y):(v=t[1],y=t[2]),(0,Q.useEffect)(v,y);let b=function(e){let t=_.get(e);t&&(p.current.get(t.sha)?.scrollIntoView({behavior:`smooth`,block:`center`}),h(t.sha),clearTimeout(g.current??void 0),g.current=setTimeout(()=>h(null),1600))},x;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=function(){Yc()},t[3]=x):x=t[3];let S=x,C,w;t[4]!==r||t[5]!==n?(C=()=>{if(!n){c([]);return}u(!0);let e=gy({baseMs:_y,maxBackoffMs:vy,isPaused:Fy,poll:e=>yy(n,e,{setEntries:c,setError:f,setLoading:u,unavailableMessage:r({id:`brCtGB`})})});e.start();let t=()=>e.resume();return typeof document<`u`&&document.addEventListener(`visibilitychange`,t),()=>{e.stop(),typeof document<`u`&&document.removeEventListener(`visibilitychange`,t)}},w=[n,r],t[4]=r,t[5]=n,t[6]=C,t[7]=w):(C=t[6],w=t[7]),(0,Q.useEffect)(C,w);let T;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(Yt,{children:(0,Z.jsx)(Qt,{children:(0,Z.jsx)(J,{id:`cklVjM`})})}),t[8]=T):T=t[8];let E;t[9]!==r||t[10]!==l?(E=l&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,role:`status`,"aria-busy":`true`,"aria-label":r({id:`o49mDZ`}),children:[1,2,3].map(Py)}),t[9]=r,t[10]=l,t[11]=E):E=t[11];let D;t[12]!==d||t[13]!==l?(D=!l&&d&&(0,Z.jsx)(`div`,{className:`px-4 py-3`,children:(0,Z.jsx)(`p`,{className:`text-xs text-destructive`,children:d})}),t[12]=d,t[13]=l,t[14]=D):D=t[14];let O;t[15]!==s||t[16]!==d||t[17]!==l?(O=!l&&!d&&s.length===0&&(0,Z.jsx)(`div`,{className:`px-4 py-8 text-center`,children:(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(J,{id:`Ta25TG`})})}),t[15]=s,t[16]=d,t[17]=l,t[18]=O):O=t[18];let k=!l&&!d&&s.length>0&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-1 p-2`,children:s.map((e,t)=>(0,Z.jsx)(jy,{entry:e,isDark:a,docName:n,laterEdits:t,onRestoreSuccess:S,versionBySha7:_,onJumpToVersion:b,registerRowRef:t=>{t?p.current.set(e.sha,t):p.current.delete(e.sha)},flashing:m===e.sha},e.sha))}),A;t[19]!==E||t[20]!==D||t[21]!==O||t[22]!==k?(A=(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto subtle-scrollbar scroll-fade-mask`,children:[E,D,O,k]}),t[19]=E,t[20]=D,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;return t[24]!==A||t[25]!==T?(j=(0,Z.jsxs)(`div`,{className:`flex h-full flex-col`,children:[T,A]}),t[24]=A,t[25]=T,t[26]=j):j=t[26],j}function Py(e){return(0,Z.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5`,children:[(0,Z.jsx)(xl,{className:`size-3.5 rounded mt-0.5 shrink-0`}),(0,Z.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,Z.jsx)(xl,{className:`h-3 w-28`}),(0,Z.jsx)(xl,{className:`h-3 w-40`})]})]},e)}function Fy(){return typeof document<`u`&&document.visibilityState===`hidden`}var Iy=`open-knowledge:lint-source-fixed`,Ly=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`lint-fix`})});function Ry(e,t){let n=e.split(`
11
11
  `),r=0;for(let e=0;e<t.line&&e<n.length;e+=1)r+=n[e].length+1;let i=n[Math.min(t.line,n.length-1)]?.length??0;return r+Math.min(Math.max(t.character,0),i)}function zy(e){return e.flatMap(e=>e.fixes??[])}function By(e,t){if(t.length===0)return!1;let n=e.document.getText(`source`),r=n.toString(),i=t.map(e=>({from:Ry(r,e.range.start),to:Ry(r,e.range.end),insert:e.newText})).sort((e,t)=>t.to-e.to||t.from-e.from||e.insert.localeCompare(t.insert));return e.document.transact(()=>{let e=1/0,t;for(let r of i){let i=t!==void 0&&r.from===t.from&&r.to===t.to&&r.insert===t.insert;t=r,!(i||r.to>e)&&(r.to>r.from&&n.delete(r.from,r.to-r.from),r.insert.length>0&&n.insert(r.from,r.insert),e=r.from)}},Ly),typeof window<`u`&&window.dispatchEvent(new CustomEvent(Iy)),!0}var Vy=300;function Hy(e,t){let n=(0,$.c)(7),r;n[0]===t?r=n[1]:(r=t?.enabled?JSON.stringify(t):null,n[0]=t,n[1]=r);let i=r,a;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],n[2]=a):a=n[2];let[o,s]=(0,Q.useState)(a),c,l;return n[3]!==i||n[4]!==e?(c=()=>{if(!e||i===null){s(Uy);return}let t=JSON.parse(i),n=e.document.getText(`source`),r=null,a=!1,o=e.configuration.name,c=()=>void Do(n.toString(),t,o).then(e=>{a||s(e)}).catch(e=>{a||console.warn(`[lint] lintDocument failed`,e)}),l=()=>{r&&clearTimeout(r),r=setTimeout(c,Vy)};return c(),n.observe(l),()=>{a=!0,r&&clearTimeout(r),n.unobserve(l)}},l=[e,i],n[3]=i,n[4]=e,n[5]=c,n[6]=l):(c=n[5],l=n[6]),(0,Q.useEffect)(c,l),o}function Uy(e){return e.length===0?e:[]}var Wy=[{id:`outline`,icon:Im},{id:`links`,icon:me},{id:`graph`,icon:zm},{id:`timeline`,icon:dm},{id:`problems`,icon:Gc}];function Gy(e){return e===`outline`?_l._({id:`dD7NPy`}):e===`links`?_l._({id:`Rj01Fz`}):e===`graph`?_l._({id:`x2fr_j`}):e===`problems`?_l._({id:`OXdGnd`}):_l._({id:`cklVjM`})}function Ky(){return n(()=>import(`./GraphPanel-D-LFOZKp.js`),__vite__mapDeps([30,1,6,2,3,7,8,31,9,10,15,32,14,16,33,34,22,12,13,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,25,51,52,28]),import.meta.url)}var qy=(0,Q.lazy)(async()=>({default:(await Ky()).GraphPanel})),Jy=(0,Q.lazy)(async()=>({default:(await n(()=>import(`./ActivityModeContent-XJSnDzK_.js`),__vite__mapDeps([53,1,54,2,55,56,8,57,58,59,60,61,62,63,64,13,6,3,7,65,51,10,66,67,31,9,15,68,69,25,16,45,46,28,48,70,12,14,4,71,33,19,20,22,17,72,18,73,74,21,23,44,47,49,50,75,76,77,24,78,79,26,80,81,82,83,84,85]),import.meta.url)).ActivityModeContent}));function Yy(e){let t=(0,$.c)(32),{docName:n,isSourceMode:r,activeTab:i,onActiveTabChange:a,mode:o}=e,{_:s}=jt(),{activeProvider:c,activeDocName:l}=Xe(),{data:u}=Cl(n),d=l===n?c:null,f=Hy(d,u?.effective??null),p;t[0]===d?p=t[1]:(p=e=>{d!==null&&e.fixes&&e.fixes.length>0&&By(d,e.fixes)},t[0]=d,t[1]=p);let m=p,h;t[2]!==f||t[3]!==d?(h=()=>{d!==null&&By(d,zy(f))},t[2]=f,t[3]=d,t[4]=h):h=t[4];let g=h,_=Ys(),v;t[5]!==n||t[6]!==d?(v=e=>{if(d===null)return;let t=d.document.getText(`source`).toString().split(`
12
12
  `)[e.range.start.line];W(ny(n,e,t))},t[5]=n,t[6]=d,t[7]=v):v=t[7];let y=v,b=N_(),x,S,C;if(t[8]!==s||t[9]!==i||t[10]!==f||t[11]!==o||t[12]!==a||t[13]!==b){let e=b?Wy.filter(Xy):Wy;x=e.some(e=>e.id===i)?i:`outline`,S=o===`doc`&&e.length>1,C=S?(0,Z.jsx)(`div`,{className:`flex flex-row items-center justify-center gap-3 p-2`,children:(0,Z.jsx)(ca,{type:`single`,variant:`outline`,value:x,onValueChange:e=>{e&&a(e)},"aria-label":s({id:`SrOuyg`}),children:e.map(e=>{let{id:t,icon:n}=e,r=Gy(t),i=t===`problems`&&f.length>0;return(0,Z.jsxs)(Sn,{children:[(0,Z.jsx)(oa,{value:t,role:`tab`,id:`tab-${t}`,"aria-controls":`panel-${t}`,"aria-label":i?s({id:`2m_bmh`,values:{0:f.length,label:r}}):r,asChild:!0,children:(0,Z.jsxs)(yn,{className:`relative`,children:[(0,Z.jsx)(n,{}),i&&(0,Z.jsx)(Ps,{variant:`destructive`,"aria-hidden":`true`,className:`absolute -right-1.5 -top-1.5 h-4 min-w-4 rounded-full px-1 text-[10px] leading-none`,children:f.length>99?`99+`:f.length})]})}),(0,Z.jsx)(bn,{side:`bottom`,children:r})]},t)})})}):null,t[8]=s,t[9]=i,t[10]=f,t[11]=o,t[12]=a,t[13]=b,t[14]=x,t[15]=S,t[16]=C}else x=t[14],S=t[15],C=t[16];let w;t[17]!==f||t[18]!==n||t[19]!==x||t[20]!==y||t[21]!==m||t[22]!==g||t[23]!==r||t[24]!==d||t[25]!==o||t[26]!==S||t[27]!==_?(w=o===`doc`?(0,Z.jsxs)(`div`,{...S?{role:`tabpanel`,id:`panel-${x}`,"aria-labelledby":`tab-${x}`}:{},className:`min-h-0 flex-1`,children:[x===`outline`&&(0,Z.jsx)(Qc,{docName:n,isSourceMode:r}),x===`links`&&(0,Z.jsx)(hy,{docName:n}),x===`graph`&&(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`-lCAuQ`})}),children:(0,Z.jsx)(qy,{activeDocName:n})}),x===`timeline`&&(0,Z.jsx)(Ny,{docName:n}),x===`problems`&&(0,Z.jsx)(nl,{docName:n,diagnostics:f,onFix:d===null?void 0:m,onFixAll:d===null?void 0:g,onAskAi:d!==null&&_!==null?y:void 0})]}):(0,Z.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,Z.jsx)(Q.Suspense,{fallback:(0,Z.jsx)(`div`,{role:`status`,"aria-busy":`true`,className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`ONPvOb`})}),children:(0,Z.jsx)(Jy,{})})}),t[17]=f,t[18]=n,t[19]=x,t[20]=y,t[21]=m,t[22]=g,t[23]=r,t[24]=d,t[25]=o,t[26]=S,t[27]=_,t[28]=w):w=t[28];let T;return t[29]!==C||t[30]!==w?(T=(0,Z.jsxs)(Z.Fragment,{children:[C,w]}),t[29]=C,t[30]=w,t[31]=T):T=t[31],T}function Xy(e){return e.id===`outline`||e.id===`problems`}function Zy(e,t){let n=getComputedStyle(e);return t*parseFloat(n.fontSize)}function Qy(e,t){let n=getComputedStyle(e.ownerDocument.documentElement);return t*parseFloat(n.fontSize)}function $y(e){return e/100*window.innerHeight}function eb(e){return e/100*window.innerWidth}function tb(e){switch(typeof e){case`number`:return[e,`px`];case`string`:{let t=parseFloat(e);return e.endsWith(`%`)?[t,`%`]:e.endsWith(`px`)?[t,`px`]:e.endsWith(`rem`)?[t,`rem`]:e.endsWith(`em`)?[t,`em`]:e.endsWith(`vh`)?[t,`vh`]:e.endsWith(`vw`)?[t,`vw`]:[t,`%`]}}}function nb({groupSize:e,panelElement:t,styleProp:n}){let r,[i,a]=tb(n);switch(a){case`%`:r=i/100*e;break;case`px`:r=i;break;case`rem`:r=Qy(t,i);break;case`em`:r=Zy(t,i);break;case`vh`:r=$y(i);break;case`vw`:r=eb(i);break}return r}function rb(e){return parseFloat(e.toFixed(3))}function ib({group:e}){let{orientation:t,panels:n}=e;return n.reduce((e,n)=>(e+=t===`horizontal`?n.element.offsetWidth:n.element.offsetHeight,e),0)}function ab(e){let{panels:t}=e,n=ib({group:e});return n===0?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:e.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{let{element:t,panelConstraints:r}=e,i=0;r.collapsedSize!==void 0&&(i=rb(nb({groupSize:n,panelElement:t,styleProp:r.collapsedSize})/n*100));let a;r.defaultSize!==void 0&&(a=rb(nb({groupSize:n,panelElement:t,styleProp:r.defaultSize})/n*100));let o=0;r.minSize!==void 0&&(o=rb(nb({groupSize:n,panelElement:t,styleProp:r.minSize})/n*100));let s=100;return r.maxSize!==void 0&&(s=rb(nb({groupSize:n,panelElement:t,styleProp:r.maxSize})/n*100)),{groupResizeBehavior:r.groupResizeBehavior,collapsedSize:i,collapsible:r.collapsible===!0,defaultSize:a,disabled:r.disabled,minSize:o,maxSize:s,panelId:e.id}})}function ob(e,t=`Assertion error`){if(!e)throw Error(t)}function sb(e,t){return Array.from(t).sort(e===`horizontal`?cb:lb)}function cb(e,t){let n=e.element.offsetLeft-t.element.offsetLeft;return n===0?e.element.offsetWidth-t.element.offsetWidth:n}function lb(e,t){let n=e.element.offsetTop-t.element.offsetTop;return n===0?e.element.offsetHeight-t.element.offsetHeight:n}function ub(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE}function db(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function fb({orientation:e,rects:t,targetRect:n}){let r={x:n.x+n.width/2,y:n.y+n.height/2},i,a=Number.MAX_VALUE;for(let n of t){let{x:t,y:o}=db(r,n),s=e===`horizontal`?t:o;s<a&&(a=s,i=n)}return ob(i,`No rect found`),i}var pb;function mb(){return pb===void 0&&(pb=typeof matchMedia==`function`?!!matchMedia(`(pointer:coarse)`).matches:!1),pb}function hb(e){let{element:t,orientation:n,panels:r,separators:i}=e,a=sb(n,Array.from(t.children).filter(ub).map(e=>({element:e}))).map(({element:e})=>e),o=[],s=!1,c=!1,l=-1,u=-1,d=0,f,p=[];{let e=-1;for(let t of a)t.hasAttribute(`data-panel`)&&(e++,t.hasAttribute(`data-disabled`)||(d++,l===-1&&(l=e),u=e))}if(d>1){let t=-1;for(let d of a)if(d.hasAttribute(`data-panel`)){t++;let i=r.find(e=>e.element===d);if(i){if(f){let r=f.element.getBoundingClientRect(),a=d.getBoundingClientRect(),m;if(c){let e=n===`horizontal`?new DOMRect(r.right,r.top,0,r.height):new DOMRect(r.left,r.bottom,r.width,0),t=n===`horizontal`?new DOMRect(a.left,a.top,0,a.height):new DOMRect(a.left,a.top,a.width,0);switch(p.length){case 0:m=[e,t];break;case 1:{let i=p[0];m=[i,fb({orientation:n,rects:[r,a],targetRect:i.element.getBoundingClientRect()})===r?t:e];break}default:m=p;break}}else m=p.length?p:[n===`horizontal`?new DOMRect(r.right,a.top,a.left-r.right,a.height):new DOMRect(a.left,r.bottom,a.width,a.top-r.bottom)];for(let n of m){let r=`width`in n?n:n.element.getBoundingClientRect(),a=mb()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(r.width<a){let e=a-r.width;r=new DOMRect(r.x-e/2,r.y,r.width+e,r.height)}if(r.height<a){let e=a-r.height;r=new DOMRect(r.x,r.y-e/2,r.width,r.height+e)}!s&&!(t<=l||t>u)&&o.push({group:e,groupSize:ib({group:e}),panels:[f,i],separator:`width`in n?void 0:n,rect:r}),s=!1}}c=!1,f=i,p=[]}}else if(d.hasAttribute(`data-separator`)){d.ariaDisabled!==null&&(s=!0);let e=i.find(e=>e.element===d);e?p.push(e):(f=void 0,p=[])}else c=!0}return o}var gb=class{#e={};addListener(e,t){let n=this.#e[e];return n===void 0?this.#e[e]=[t]:n.includes(t)||n.push(t),()=>{this.removeListener(e,t)}}emit(e,t){let n=this.#e[e];if(n!==void 0)if(n.length===1)n[0].call(null,t);else{let e=!1,r=null,i=Array.from(n);for(let n=0;n<i.length;n++){let a=i[n];try{a.call(null,t)}catch(t){r===null&&(e=!0,r=t)}}if(e)throw r}}removeAllListeners(){this.#e={}}removeListener(e,t){let n=this.#e[e];if(n!==void 0){let e=n.indexOf(t);e>=0&&n.splice(e,1)}}},_b={cursorFlags:0,state:`inactive`},vb=new gb;function yb(){return _b}function bb(e){return vb.addListener(`change`,e)}function xb(e){let t=_b,n={..._b};n.cursorFlags=e,_b=n,vb.emit(`change`,{prev:t,next:n})}function Sb(e){let t=_b;_b=e,vb.emit(`change`,{prev:t,next:e})}var Cb=e=>e,wb=()=>{},Tb=1,Eb=2,Db=4,Ob=8,kb=3,Ab=12,jb;function Mb(){return jb===void 0&&(jb=!1,typeof window<`u`&&(window.navigator.userAgent.includes(`Chrome`)||window.navigator.userAgent.includes(`Firefox`))&&(jb=!0)),jb}function Nb({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case`active`:case`hover`:t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case`horizontal`:r++;break;case`vertical`:i++;break}})}if(!(r===0&&i===0)){switch(n){case`active`:if(e&&Mb()){let t=(e&Tb)!==0,n=(e&Eb)!==0,r=(e&Db)!==0,i=(e&Ob)!==0;if(t)return r?`se-resize`:i?`ne-resize`:`e-resize`;if(n)return r?`sw-resize`:i?`nw-resize`:`w-resize`;if(r)return`s-resize`;if(i)return`n-resize`}break}return Mb()?r>0&&i>0?`move`:r>0?`ew-resize`:`ns-resize`:r>0&&i>0?`grab`:r>0?`col-resize`:`row-resize`}}var Pb=new WeakMap;function Fb(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Pb.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));let r=yb();switch(r.state){case`active`:case`hover`:{let e=Nb({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(e=>e.group),state:r.state}),i=`*, *:hover {cursor: ${e} !important; }`;if(t===i)return;t=i,e?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case`inactive`:t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}Pb.set(e,{prevStyle:t,styleSheet:n})}var Ib=new Map,Lb=new gb;function Rb(e){Ib=new Map(Ib),Ib.delete(e)}function zb(e,t){for(let[t]of Ib)if(t.id===e)return t}function Bb(e,t){for(let[t,n]of Ib)if(t.id===e)return n;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Vb(){return Ib}function Hb(e,t){return Lb.addListener(`groupChange`,n=>{n.group.id===e&&t(n)})}function Ub(e,t,n){let r=Ib.get(e);Ib=new Map(Ib),Ib.set(e,t),Lb.emit(`groupChange`,{group:e,isUserInteraction:n?.isUserInteraction===!0,prev:r,next:t})}function Wb(e){let t=yb(),n=!1;switch(t.state){case`active`:Sb({cursorFlags:0,state:`inactive`}),t.hitRegions.length>0&&(Fb(e),n=!0,t.hitRegions.forEach(e=>{let t=Bb(e.group.id,!0);Ub(e.group,t,{isUserInteraction:!0})}))}return n}function Gb(e){e.defaultPrevented||Wb(e.currentTarget)}function Kb(e,t,n){let r,i={x:1/0,y:1/0};for(let a of t){let t=db(n,a.rect);switch(e){case`horizontal`:t.x<=i.x&&(r=a,i=t);break;case`vertical`:t.y<=i.y&&(r=a,i=t);break}}return r?{distance:i,hitRegion:r}:void 0}function qb(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Jb(e,t){if(e===t)throw Error(`Cannot compare node with itself`);let n={a:ex(e),b:ex(t)},r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();ob(r,`Stacking order can only be calculated for elements with a common ancestor`);let i={a:$b(Qb(n.a)),b:$b(Qb(n.b))};if(i.a===i.b){let e=r.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(i.a-i.b)}var Yb=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Xb(e){let t=getComputedStyle(tx(e)??e).display;return t===`flex`||t===`inline-flex`}function Zb(e){let t=getComputedStyle(e);return!!(t.position===`fixed`||t.zIndex!==`auto`&&(t.position!==`static`||Xb(e))||+t.opacity<1||`transform`in t&&t.transform!==`none`||`webkitTransform`in t&&t.webkitTransform!==`none`||`mixBlendMode`in t&&t.mixBlendMode!==`normal`||`filter`in t&&t.filter!==`none`||`webkitFilter`in t&&t.webkitFilter!==`none`||`isolation`in t&&t.isolation===`isolate`||Yb.test(t.willChange)||t.webkitOverflowScrolling===`touch`)}function Qb(e){let t=e.length;for(;t--;){let n=e[t];if(ob(n,`Missing node`),Zb(n))return n}return null}function $b(e){return e&&Number(getComputedStyle(e).zIndex)||0}function ex(e){let t=[];for(;e;)t.push(e),e=tx(e);return t}function tx(e){let{parentNode:t}=e;return qb(t)?t.host:t}function nx(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function rx({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!ub(n)||n.contains(e)||e.contains(n))return!0;if(Jb(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(nx(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function ix(e,t){let n=[];return t.forEach((t,r)=>{if(r.disabled)return;let i=hb(r),a=Kb(r.orientation,i,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&rx({groupElement:r.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function ax(e,t){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 ox(e,t,n=0){return Math.abs(rb(e)-rb(t))<=n}function sx(e,t){return ox(e,t)?0:e>t?1:-1}function cx({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){let{collapsedSize:i=0,collapsible:a,disabled:o,maxSize:s=100,minSize:c=0}=t;if(o&&!e)return n;if(sx(r,c)<0)if(a){let e=(i+c)/2;r=sx(r,e)<0?i:c}else r=c;return r=Math.min(s,r),r=rb(r),r}function lx({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:a}){if(ox(e,0))return t;let o=a===`imperative-api`,s=Object.values(t),c=Object.values(i),l=[...s],[u,d]=r;ob(u!=null,`Invalid first pivot index`),ob(d!=null,`Invalid second pivot index`);let f=0;switch(a){case`keyboard`:{let t=e<0?d:u,r=n[t];ob(r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(ob(n!=null,`Previous layout not found for panel index ${t}`),ox(n,i)){let t=o-n;sx(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let t=e<0?u:d,r=n[t];ob(r,`No panel constraints found for index ${t}`);let{collapsedSize:i=0,collapsible:a,minSize:o=0}=r;if(a){let n=s[t];if(ob(n!=null,`Previous layout not found for panel index ${t}`),ox(n,o)){let t=n-i;sx(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{let t=e<0?d:u,r=n[t];ob(r,`Panel constraints not found for index ${t}`);let i=s[t],{collapsible:a,collapsedSize:o,minSize:c}=r;if(a&&sx(i,c)<0)if(e>0){let t=c-o,n=t/2;sx(i+e,c)<0&&(e=sx(e,n)<=0?0:t)}else{let t=c-o,n=100-t/2;sx(i-e,c)<0&&(e=sx(100+e,n)>0?0:-t)}break}}{let t=e<0?1:-1,r=e<0?d:u,i=0;for(;;){let e=s[r];ob(e!=null,`Previous layout not found for panel index ${r}`);let a=cx({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:e,size:100})-e;if(i+=a,r+=t,r<0||r>=n.length)break}let a=Math.min(Math.abs(e),Math.abs(i));e=e<0?0-a:a}{let t=e<0?u:d;for(;t>=0&&t<n.length;){let r=Math.abs(e)-Math.abs(f),i=s[t];ob(i!=null,`Previous layout not found for panel index ${t}`);let a=i-r,c=cx({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:i,size:a});if(!ox(i,c)&&(f+=i-c,l[t]=c,f.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(ax(c,l))return i;{let t=e<0?d:u,r=s[t];ob(r!=null,`Previous layout not found for panel index ${t}`);let i=r+f,a=cx({overrideDisabledPanels:o,panelConstraints:n[t],prevSize:r,size:i});if(l[t]=a,!ox(a,i)){let t=i-a,r=e<0?d:u;for(;r>=0&&r<n.length;){let i=l[r];ob(i!=null,`Previous layout not found for panel index ${r}`);let a=i+t,s=cx({overrideDisabledPanels:o,panelConstraints:n[r],prevSize:i,size:a});if(ox(i,s)||(t-=s-i,l[r]=s),ox(t,0))break;e>0?r--:r++}}}if(!ox(Object.values(l).reduce((e,t)=>t+e,0),100,.1))return i;let p=Object.keys(i);return l.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function ux(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(t[n]===void 0||sx(e[n],t[n])!==0)return!1;return!0}function dx({layout:e,panelConstraints:t}){let n=Object.values(e),r=[...n],i=r.reduce((e,t)=>e+t,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(e=>`${e}%`).join(`, `)}`);if(!ox(i,100)&&r.length>0)for(let e=0;e<t.length;e++){let t=r[e];ob(t!=null,`No layout data found for index ${e}`),r[e]=100/i*t}let a=0;for(let e=0;e<t.length;e++){let i=n[e];ob(i!=null,`No layout data found for index ${e}`);let o=r[e];ob(o!=null,`No layout data found for index ${e}`);let s=cx({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:i,size:o});o!=s&&(a+=o-s,r[e]=s)}if(!ox(a,0))for(let e=0;e<t.length;e++){let n=r[e];ob(n!=null,`No layout data found for index ${e}`);let i=n+a,o=cx({overrideDisabledPanels:!0,panelConstraints:t[e],prevSize:n,size:i});if(n!==o&&(a-=o-n,r[e]=o,ox(a,0)))break}let o=Object.keys(e);return r.reduce((e,t,n)=>(e[o[n]]=t,e),{})}function fx({groupId:e,panelId:t}){let n=()=>{let t=Vb();for(let[n,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:a,groupSize:o,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:n,groupSize:o,layout:a,separatorToPanels:s};throw Error(`Group ${e} not found`)},r=()=>{let e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(e!==void 0)return e;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{let e=n().group.panels.find(e=>e.id===t);if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},a=()=>{let e=n().layout[t];if(e!==void 0)return e;throw Error(`Layout not found for Panel ${t}`)},o=({nextSize:e,panels:n,prevLayout:r,derivedPanelConstraints:i})=>{let o=a(),s=n.findIndex(e=>e.id===t),c=s===0,l=s===n.length-1;if(l&&e<o&&(c||n.slice(0,s).every((e,t)=>{let n=i[t];return n?.collapsible&&ox(n.collapsedSize,r[n.panelId])}))){let e=n.slice(0,s).reduce((e,t)=>e+r[t.id],0);return{...r,[t]:rb(100-e)}}return lx({delta:l?o-e:e-o,initialLayout:r,panelConstraints:i,pivotIndices:l?[s-1,s]:[s,s+1],prevLayout:r,trigger:`imperative-api`})},s=e=>{if(e===a())return;let{defaultLayoutDeferred:t,derivedPanelConstraints:r,group:i,groupSize:s,layout:c,separatorToPanels:l}=n(),u=dx({layout:o({nextSize:e,panels:i.panels,prevLayout:c,derivedPanelConstraints:r}),panelConstraints:r});ux(c,u)||Ub(i,{defaultLayoutDeferred:t,derivedPanelConstraints:r,groupSize:s,layout:u,separatorToPanels:l})};return{collapse:()=>{let{collapsible:e,collapsedSize:t}=r(),{mutableValues:n}=i(),o=a();e&&o!==t&&(n.expandToSize=o,s(t))},expand:()=>{let{collapsible:e,collapsedSize:t,minSize:n}=r(),{mutableValues:o}=i(),c=a();if(e&&c===t){let e=o.expandToSize??n;e===0&&(e=1),s(e)}},getSize:()=>{let{group:e}=n(),t=a(),{element:r}=i();return{asPercentage:t,inPixels:e.orientation===`horizontal`?r.offsetWidth:r.offsetHeight}},isCollapsed:()=>{let{collapsible:e,collapsedSize:t}=r(),n=a();return e&&ox(t,n)},resize:e=>{let{group:t}=n(),{element:r}=i(),a=ib({group:t});s(rb(nb({groupSize:a,panelElement:r,styleProp:e})/a*100))}}}function px(e){e.defaultPrevented||ix(e,Vb()).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){let n=t.panels.find(e=>e.panelConstraints.defaultSize!==void 0);if(n){let r=n.panelConstraints.defaultSize,i=fx({groupId:t.group.id,panelId:n.id});i&&r!==void 0&&(i.resize(r),e.preventDefault())}}})}function mx(e){let t=Vb();for(let[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error(`Could not find parent Group for separator element`)}function hx({groupId:e}){let t=()=>{let t=Vb();for(let[n,r]of t)if(n.id===e)return{group:n,...r};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){let{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){let{defaultLayoutDeferred:n,derivedPanelConstraints:r,group:i,groupSize:a,layout:o,separatorToPanels:s}=t(),c=dx({layout:e,panelConstraints:r});return n?o:(ux(o,c)||Ub(i,{defaultLayoutDeferred:n,derivedPanelConstraints:r,groupSize:a,layout:c,separatorToPanels:s}),c)}}}function gx(e,t){let n=mx(e),r=Bb(n.id,!0),i=n.separators.find(t=>t.element===e);ob(i,`Matching separator not found`);let a=r.separatorToPanels.get(i);ob(a,`Matching panels not found`);let o=a.map(e=>n.panels.indexOf(e)),s=hx({groupId:n.id}).getLayout(),c=dx({layout:lx({delta:t,initialLayout:s,panelConstraints:r.derivedPanelConstraints,pivotIndices:o,prevLayout:s,trigger:`keyboard`}),panelConstraints:r.derivedPanelConstraints});ux(s,c)||Ub(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:c,separatorToPanels:r.separatorToPanels},{isUserInteraction:!0})}function _x(e){if(e.defaultPrevented)return;let t=e.currentTarget,n=mx(t);if(!n.disabled)switch(e.key){case`ArrowDown`:e.preventDefault(),n.orientation===`vertical`&&gx(t,5);break;case`ArrowLeft`:e.preventDefault(),n.orientation===`horizontal`&&gx(t,-5);break;case`ArrowRight`:e.preventDefault(),n.orientation===`horizontal`&&gx(t,5);break;case`ArrowUp`:e.preventDefault(),n.orientation===`vertical`&&gx(t,-5);break;case`End`:e.preventDefault(),gx(t,100);break;case`Enter`:{e.preventDefault();let n=mx(t),{derivedPanelConstraints:r,layout:i,separatorToPanels:a}=Bb(n.id,!0),o=n.separators.find(e=>e.element===t);ob(o,`Matching separator not found`);let s=a.get(o);ob(s,`Matching panels not found`);let c=s[0],l=r.find(e=>e.panelId===c.id);if(ob(l,`Panel metadata not found`),l.collapsible){let e=i[c.id];gx(t,(l.collapsedSize===e?n.mutableState.expandedPanelSizes[c.id]??l.minSize:l.collapsedSize)-e)}break}case`F6`:{e.preventDefault();let n=mx(t).separators.map(e=>e.element),r=Array.from(n).findIndex(t=>t===e.currentTarget);ob(r!==null,`Index not found`),n[e.shiftKey?r>0?r-1:n.length-1:r+1<n.length?r+1:0].focus({preventScroll:!0});break}case`Home`:e.preventDefault(),gx(t,-100);break}}function vx(e){if(e.defaultPrevented||e.pointerType===`mouse`&&e.button>0)return;let t=Vb(),n=ix(e,t),r=new Map,i=!1;n.forEach(e=>{e.separator&&(i||(i=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));let n=t.get(e.group);n&&r.set(e.group,n.layout)}),Sb({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:`active`}),n.length&&e.preventDefault()}function yx({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:a,prevCursorFlags:o}){let s=0;n.forEach(e=>{let{group:n,groupSize:o}=e,{orientation:c,panels:l}=n,{disableCursor:u}=n.mutableState,d=0;d=a?c===`horizontal`?(t.clientX-a.x)/o*100:(t.clientY-a.y)/o*100:c===`horizontal`?t.clientX<0?-100:100:t.clientY<0?-100:100;let f=r.get(n),p=i.get(n);if(!f||!p)return;let{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:_,separatorToPanels:v}=p;if(h&&_&&v){let t=lx({delta:d,initialLayout:f,panelConstraints:h,pivotIndices:e.panels.map(e=>l.indexOf(e)),prevLayout:_,trigger:`mouse-or-touch`});if(ux(t,_)){if(d!==0&&!u)switch(c){case`horizontal`:s|=d<0?Tb:Eb;break;case`vertical`:s|=d<0?Db:Ob;break}}else Ub(e.group,{defaultLayoutDeferred:m,derivedPanelConstraints:h,groupSize:g,layout:t,separatorToPanels:v})}});let c=0;t.movementX===0?c|=o&kb:c|=s&kb,t.movementY===0?c|=o&Ab:c|=s&Ab,xb(c),Fb(e)}function bx(e){let t=Vb(),n=yb();switch(n.state){case`active`:yx({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function xx(e){if(e.defaultPrevented)return;let t=yb(),n=Vb();switch(t.state){case`active`:if(e.buttons===0){Sb({cursorFlags:0,state:`inactive`}),t.hitRegions.forEach(e=>{let t=Bb(e.group.id,!0);Ub(e.group,t,{isUserInteraction:!0})});return}for(let n of t.hitRegions)if(n.separator){let{element:t}=n.separator;t.hasPointerCapture?.(e.pointerId)||t.setPointerCapture?.(e.pointerId)}yx({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break;default:{let r=ix(e,n);r.length===0?t.state!==`inactive`&&Sb({cursorFlags:0,state:`inactive`}):Sb({cursorFlags:0,hitRegions:r,state:`hover`}),Fb(e.currentTarget);break}}}function Sx(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(yb().state){case`hover`:Sb({cursorFlags:0,state:`inactive`})}}function Cx(e){e.defaultPrevented||e.pointerType===`mouse`&&e.button>0||Wb(e.currentTarget)&&e.preventDefault()}function wx(e){let t=0,n=0,r={};for(let i of e)if(i.defaultSize!==void 0){t++;let e=rb(i.defaultSize);n+=e,r[i.panelId]=e}else r[i.panelId]=void 0;let i=e.length-t;if(i!==0){let t=rb((100-n)/i);for(let n of e)n.defaultSize===void 0&&(r[n.panelId]=t)}return r}function Tx(e,t,n){if(!n[0])return;let r=e.panels.find(e=>e.element===t);if(!r||!r.onResize)return;let i=ib({group:e}),a=e.orientation===`horizontal`?r.element.offsetWidth:r.element.offsetHeight,o=r.mutableValues.prevSize,s={asPercentage:rb(a/i*100),inPixels:a};r.mutableValues.prevSize=s,r.onResize(s,r.id,o)}function Ex(e,t){if(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 Dx({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let i=0,a=0,o=!1,s=new Map,c=[];for(let l of e.panels){let e=r[l.id]??0;switch(l.panelConstraints.groupResizeBehavior){case`preserve-pixel-size`:{o=!0;let r=rb(e/100*n/t*100);s.set(l.id,r),i+=r;break}default:c.push(l.id),a+=e;break}}if(!o||c.length===0)return r;let l=100-i,u={...r};if(s.forEach((e,t)=>{u[t]=e}),a>0)for(let e of c)u[e]=rb((r[e]??0)/a*l);else{let e=rb(l/c.length);for(let t of c)u[t]=e}return u}function Ox(e,t){let n=e.map(e=>e.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;return!0}var kx=new Map;function Ax(e){let t=!0;ob(e.element.ownerDocument.defaultView,`Cannot register an unmounted Group`);let n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,a=new n(n=>{for(let r of n){let{borderBoxSize:n,target:i}=r;if(i===e.element){if(t){let t=ib({group:e});if(t===0)return;let n=Bb(e.id);if(!n)return;let r=ab(e),i=n.defaultLayoutDeferred?wx(r):n.layout,a=dx({layout:Dx({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:i}),panelConstraints:r});if(!n.defaultLayoutDeferred&&ux(n.layout,a)&&Ex(n.derivedPanelConstraints,r)&&n.groupSize===t)return;Ub(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:r,groupSize:t,layout:a,separatorToPanels:n.separatorToPanels})}}else Tx(e,i,n)}});a.observe(e.element),e.panels.forEach(e=>{ob(!r.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.onResize&&a.observe(e.element)});let o=ib({group:e}),s=ab(e),c=e.panels.map(({id:e})=>e).join(`,`),l=e.mutableState.defaultLayout;l&&(Ox(e.panels,l)||(l=void 0));let u=dx({layout:e.mutableState.layouts[c]??l??wx(s),panelConstraints:s}),d=e.element.ownerDocument;kx.set(d,(kx.get(d)??0)+1);let f=new Map;return hb(e).forEach(e=>{e.separator&&f.set(e.separator,e.panels)}),Ub(e,{defaultLayoutDeferred:o===0,derivedPanelConstraints:s,groupSize:o,layout:u,separatorToPanels:f}),e.separators.forEach(e=>{ob(!i.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.element.addEventListener(`keydown`,_x)}),kx.get(d)===1&&(d.addEventListener(`contextmenu`,Gb,!0),d.addEventListener(`dblclick`,px,!0),d.addEventListener(`pointerdown`,vx,!0),d.addEventListener(`pointerleave`,bx),d.addEventListener(`pointermove`,xx),d.addEventListener(`pointerout`,Sx),d.addEventListener(`pointerup`,Cx,!0)),function(){t=!1,kx.set(d,Math.max(0,(kx.get(d)??0)-1)),Rb(e),e.separators.forEach(e=>{e.element.removeEventListener(`keydown`,_x)}),kx.get(d)||(d.removeEventListener(`contextmenu`,Gb,!0),d.removeEventListener(`dblclick`,px,!0),d.removeEventListener(`pointerdown`,vx,!0),d.removeEventListener(`pointerleave`,bx),d.removeEventListener(`pointermove`,xx),d.removeEventListener(`pointerout`,Sx),d.removeEventListener(`pointerup`,Cx,!0)),a.disconnect()}}function jx(){let[e,t]=(0,Q.useState)({});return[e,(0,Q.useCallback)(()=>t({}),[])]}function Mx(e){let t=(0,Q.useId)();return`${e??t}`}var Nx=typeof window<`u`?Q.useLayoutEffect:Q.useEffect;function Px(e){let t=(0,Q.useRef)(e);return Nx(()=>{t.current=e},[e]),(0,Q.useCallback)((...e)=>t.current?.(...e),[t])}function Fx(...e){return Px(t=>{e.forEach(e=>{if(e)switch(typeof e){case`function`:e(t);break;case`object`:e.current=t;break}})})}function Ix(e){let t=(0,Q.useRef)({...e});return Nx(()=>{for(let n in e)t.current[n]=e[n]},[e]),t.current}var Lx=(0,Q.createContext)(null);function Rx(e,t){let n=(0,Q.useRef)({getLayout:()=>({}),setLayout:Cb});(0,Q.useImperativeHandle)(t,()=>n.current,[]),Nx(()=>{Object.assign(n.current,hx({groupId:e}))})}function zx({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:a,groupRef:o,id:s,onLayoutChange:c,onLayoutChanged:l,orientation:u=`horizontal`,resizeTargetMinimumSize:d={coarse:20,fine:10},style:f,...p}){let m=(0,Q.useRef)({onLayoutChange:{},onLayoutChanged:{}}),h=Px(e=>{ux(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,c?.(e))}),g=Px((e,t)=>{ux(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,l?.(e,{isUserInteraction:t}))}),_=Mx(s),v=(0,Q.useRef)(null),[y,b]=jx(),x=(0,Q.useRef)({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:d,separators:[]}),S=Fx(v,a);Rx(_,o);let C=Px((e,t)=>{let r=yb(),i=zb(e),a=Bb(e);if(a){let e=!1;switch(r.state){case`active`:e=r.hitRegions.some(e=>e.group===i);break}return{flexGrow:a.layout[t]??1,pointerEvents:e?`none`:void 0}}if(n?.[t])return{flexGrow:n?.[t]}}),w=Ix({defaultLayout:n,disableCursor:r}),T=(0,Q.useMemo)(()=>({get disableCursor(){return!!w.disableCursor},getPanelStyles:C,id:_,orientation:u,registerPanel:e=>{let t=x.current;return t.panels=sb(u,[...t.panels,e]),b(),()=>{t.panels=t.panels.filter(t=>t!==e),b()}},registerSeparator:e=>{let t=x.current;return t.separators=sb(u,[...t.separators,e]),b(),()=>{t.separators=t.separators.filter(t=>t!==e),b()}},updatePanelProps:(e,{disabled:t})=>{let n=x.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);let r=zb(_),i=Bb(_);r&&i&&Ub(r,{...i,derivedPanelConstraints:ab(r)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{let r=x.current.separators.find(t=>t.id===e);r&&(r.disabled=t,r.disableDoubleClick=n)}}),[C,_,b,u,w]),E=(0,Q.useRef)(null);return Nx(()=>{let e=v.current;if(e===null)return;let t=x.current,n;if(w.defaultLayout!==void 0&&Object.keys(w.defaultLayout).length===t.panels.length){n={};for(let e of t.panels){let t=w.defaultLayout[e.id];t!==void 0&&(n[e.id]=t)}}let r={disabled:!!i,element:e,id:_,mutableState:{defaultLayout:n,disableCursor:!!w.disableCursor,expandedPanelSizes:x.current.lastExpandedPanelSizes,layouts:x.current.layouts},orientation:u,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};E.current=r;let a=Ax(r),{defaultLayoutDeferred:o,derivedPanelConstraints:s,layout:c}=Bb(r.id,!0);!o&&s.length>0&&(h(c),g(c,!1));let l=Hb(_,e=>{let{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:i}=e.next;if(t||n.length===0)return;let a=r.panels.map(({id:e})=>e).join(`,`);r.mutableState.layouts[a]=i,n.forEach(t=>{if(t.collapsible){let{layout:n}=e.prev??{};if(n){let e=ox(t.collapsedSize,i[t.panelId]),a=ox(t.collapsedSize,n[t.panelId]);e&&!a&&(r.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});let o=yb().state!==`active`;h(i),o&&g(i,e.isUserInteraction)});return()=>{E.current=null,a(),l()}},[i,_,g,h,u,y,w]),(0,Q.useEffect)(()=>{let e=E.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!r)}),(0,Z.jsx)(Lx.Provider,{value:T,children:(0,Z.jsx)(`div`,{...p,className:t,"data-group":!0,"data-testid":_,id:_,ref:S,style:{height:`100%`,width:`100%`,overflow:`hidden`,...f,display:`flex`,flexDirection:u===`horizontal`?`row`:`column`,flexWrap:`nowrap`,touchAction:u===`horizontal`?`pan-y`:`pan-x`},children:e})})}zx.displayName=`Group`;function Bx(){return(0,Q.useRef)(null)}function Vx(){let e=(0,Q.useContext)(Lx);return ob(e,`Group Context not found; did you render a Panel or Separator outside of a Group?`),e}function Hx(e,t){let{id:n}=Vx(),r=(0,Q.useRef)({collapse:wb,expand:wb,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:wb});(0,Q.useImperativeHandle)(t,()=>r.current,[]),Nx(()=>{Object.assign(r.current,fx({groupId:n,panelId:e}))})}function Ux({children:e,className:t,collapsedSize:n=`0%`,collapsible:r=!1,defaultSize:i,disabled:a,elementRef:o,groupResizeBehavior:s=`preserve-relative-size`,id:c,maxSize:l=`100%`,minSize:u=`0%`,onResize:d,panelRef:f,style:p,...m}){let h=!!c,g=Mx(c),_=Ix({disabled:a}),v=(0,Q.useRef)(null),y=Fx(v,o),{getPanelStyles:b,id:x,orientation:S,registerPanel:C,updatePanelProps:w}=Vx(),T=d!==null,E=Px((e,t,n)=>{d?.(e,c,n)});Nx(()=>{let e=v.current;if(e!==null)return C({element:e,id:g,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:T?E:void 0,panelConstraints:{groupResizeBehavior:s,collapsedSize:n,collapsible:r,defaultSize:i,disabled:_.disabled,maxSize:l,minSize:u}})},[s,n,r,i,T,g,h,l,u,E,C,_]),(0,Q.useEffect)(()=>{w(g,{disabled:a})},[a,g,w]),Hx(g,f);let D=()=>{let e=b(x,g);if(e)return JSON.stringify(e)},O=(0,Q.useSyncExternalStore)(e=>Hb(x,e),D,D),k;return k=O?JSON.parse(O):i===void 0?{flexGrow:1}:{flexGrow:void 0,flexShrink:void 0,flexBasis:i},(0,Z.jsx)(`div`,{...m,"data-disabled":a||void 0,"data-panel":!0,"data-testid":g,id:g,ref:y,style:{...Wx,display:`flex`,flexBasis:0,flexShrink:1,overflow:`visible`,...k},children:(0,Z.jsx)(`div`,{className:t,style:{maxHeight:`100%`,maxWidth:`100%`,flexGrow:1,overflow:`auto`,...p,touchAction:S===`horizontal`?`pan-y`:`pan-x`},children:e})})}Ux.displayName=`Panel`;var Wx={minHeight:0,maxHeight:`100%`,height:`auto`,minWidth:0,maxWidth:`100%`,width:`auto`,border:`none`,borderWidth:0,padding:0,margin:0};function Gx(){return(0,Q.useRef)(null)}function Kx({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,a,o=e[n],s=t.find(e=>e.panelId===n);if(s){let c=s.maxSize,l=s.collapsible?s.collapsedSize:s.minSize,u=[r,r+1];a=dx({layout:lx({delta:l-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],i=dx({layout:lx({delta:c-o,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:a,valueNow:o}}function qx({children:e,className:t,disabled:n,disableDoubleClick:r,elementRef:i,id:a,style:o,...s}){let c=Mx(a),l=Ix({disabled:n,disableDoubleClick:r}),[u,d]=(0,Q.useState)({}),[f,p]=(0,Q.useState)(`inactive`),[m,h]=(0,Q.useState)(!1),g=(0,Q.useRef)(null),_=Fx(g,i),{disableCursor:v,id:y,orientation:b,registerSeparator:x,updateSeparatorProps:S}=Vx(),C=b===`horizontal`?`vertical`:`horizontal`;Nx(()=>{let e=g.current;if(e!==null){let t={disabled:l.disabled,disableDoubleClick:l.disableDoubleClick,element:e,id:c},n=x(t),r=bb(e=>{p(e.next.state!==`inactive`&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:`inactive`)}),i=Hb(y,e=>{let{derivedPanelConstraints:n,layout:r,separatorToPanels:i}=e.next,a=i.get(t);if(a){let e=a[0],t=a.indexOf(e);d(Kx({layout:r,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{r(),i(),n()}}},[y,c,x,l]),(0,Q.useEffect)(()=>{S(c,{disabled:n,disableDoubleClick:r})},[n,r,c,S]);let w;n&&!v&&(w=`not-allowed`);let T;if(n)T=`disabled`;else switch(f){case`active`:T=`active`;break;default:T=m?`focus`:f}return(0,Z.jsx)(`div`,{...s,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":C,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":T,"data-testid":c,id:c,onBlur:()=>h(!1),onFocus:()=>h(!0),ref:_,role:`separator`,style:{flexBasis:`auto`,cursor:w,...o,flexGrow:0,flexShrink:0,touchAction:`none`},tabIndex:n?void 0:0})}qx.displayName=`Separator`;var Jx=new Map;function Yx(e){let t=Jx.get(e);if(t)return t;let n=Xx(e);return Jx.set(e,n),n}async function Xx(e){switch(e){case`bash`:case`shell`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{shell:e}=await import(`./shell-CJ7sRXEH.js`);return{shell:e}},[],import.meta.url)).shell);case`c`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{c:e}=await import(`./clike-BgMHoZVb.js`);return{c:e}},[],import.meta.url)).c);case`cpp`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{cpp:e}=await import(`./clike-BgMHoZVb.js`);return{cpp:e}},[],import.meta.url)).cpp);case`csharp`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{csharp:e}=await import(`./clike-BgMHoZVb.js`);return{csharp:e}},[],import.meta.url)).csharp);case`css`:case`less`:case`scss`:return(await n(async()=>{let{css:e}=await import(`./dist-BuhX1ZiW.js`).then(e=>e.r);return{css:e}},__vite__mapDeps([55,1,56,8,57]),import.meta.url)).css().language;case`diff`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{diff:e}=await import(`./diff-B7WgJJz8.js`);return{diff:e}},[],import.meta.url)).diff);case`go`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{go:e}=await import(`./go-DTLWKePr.js`);return{go:e}},[],import.meta.url)).go);case`ini`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{properties:e}=await import(`./properties-CwLn0BUZ.js`);return{properties:e}},[],import.meta.url)).properties);case`java`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{java:e}=await import(`./clike-BgMHoZVb.js`);return{java:e}},[],import.meta.url)).java);case`javascript`:return(await n(async()=>{let{javascript:e}=await import(`./dist-Bvng05Ux.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([59,1,60,56,8,57]),import.meta.url)).javascript().language;case`json`:return(await n(async()=>{let{json:e}=await import(`./dist-CCfVhAvJ.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([61,1,56,8,57]),import.meta.url)).json().language;case`kotlin`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{kotlin:e}=await import(`./clike-BgMHoZVb.js`);return{kotlin:e}},[],import.meta.url)).kotlin);case`lua`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{lua:e}=await import(`./lua-B3utixrX.js`);return{lua:e}},[],import.meta.url)).lua);case`markdown`:return(await n(async()=>{let{markdown:e}=await import(`./dist-DXywpqg-.js`).then(e=>e.t);return{markdown:e}},__vite__mapDeps([62,1,60,56,8,58,55,57,59]),import.meta.url)).markdown().language;case`objectivec`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{objectiveC:e}=await import(`./clike-BgMHoZVb.js`);return{objectiveC:e}},[],import.meta.url)).objectiveC);case`perl`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{perl:e}=await import(`./perl-CZ2U9dfT.js`);return{perl:e}},[],import.meta.url)).perl);case`python`:return(await n(async()=>{let{python:e}=await import(`./dist-B76xtaAd.js`);return{python:e}},__vite__mapDeps([86,60,56,1,8,57]),import.meta.url)).python().language;case`r`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{r:e}=await import(`./r-Crnq5PtH.js`);return{r:e}},[],import.meta.url)).r);case`ruby`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{ruby:e}=await import(`./ruby-nTEDjg1w.js`);return{ruby:e}},[],import.meta.url)).ruby);case`rust`:return(await n(async()=>{let{rust:e}=await import(`./dist-BZciNIwH.js`);return{rust:e}},__vite__mapDeps([87,56,1,8,57]),import.meta.url)).rust().language;case`sql`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{standardSQL:e}=await import(`./sql-B7jXn3j6.js`);return{standardSQL:e}},[],import.meta.url)).standardSQL);case`swift`:return(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{swift:e}=await import(`./swift-DKG9kMYe.js`);return{swift:e}},[],import.meta.url)).swift);case`typescript`:return(await n(async()=>{let{javascript:e}=await import(`./dist-Bvng05Ux.js`).then(e=>e.t);return{javascript:e}},__vite__mapDeps([59,1,60,56,8,57]),import.meta.url)).javascript({typescript:!0,jsx:!0}).language;case`xml`:return(await n(async()=>{let{html:e}=await import(`./dist-BiVF6Gdz.js`).then(e=>e.t);return{html:e}},__vite__mapDeps([58,1,55,56,8,57,59,60]),import.meta.url)).html().language;case`yaml`:return(await n(async()=>{let{yaml:e}=await import(`./dist-D1KI0nTz.js`).then(e=>e.t);return{yaml:e}},__vite__mapDeps([63,1,56,8,57]),import.meta.url)).yaml().language;default:return null}}async function Zx(e,t){if(e===`canvas`)return(await n(async()=>{let{json:e}=await import(`./dist-CCfVhAvJ.js`).then(e=>e.t);return{json:e}},__vite__mapDeps([61,1,56,8,57]),import.meta.url)).json().language;if(t){let e=await Yx(t);if(e)return e}return e===`toml`?(await n(async()=>{let{StreamLanguage:e}=await import(`./dist-BQhSFgYM.js`).then(e=>e.h);return{StreamLanguage:e}},__vite__mapDeps([56,1,8]),import.meta.url)).StreamLanguage.define((await n(async()=>{let{toml:e}=await import(`./toml-ClZMF6Q0.js`);return{toml:e}},[],import.meta.url)).toml):null}function Qx(e){let t=(0,$.c)(10),{_:n}=jt(),r;t[0]===n?r=t[1]:(r=e=>n(e===413?{id:`C_WGy8`}:e===415?{id:`VM7H66`}:e===404?{id:`s0IDhW`}:e===400?{id:`N1mdmS`}:typeof e==`number`?{id:`96w9hU`,values:{status:e}}:{id:`ig5vUe`}),t[0]=n,t[1]=r);let i=r,{src:a,loadText:o}=e,s=(0,Q.useRef)(o),c=(0,Q.useRef)(i),l;t[2]!==o||t[3]!==i?(l=()=>{s.current=o,c.current=i},t[2]=o,t[3]=i,t[4]=l):l=t[4],(0,Q.useEffect)(l);let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u={status:`loading`},t[5]=u):u=t[5];let[d,f]=(0,Q.useState)(u),p,m;return t[6]!==n||t[7]!==a?(p=()=>{let e=!1,t=new AbortController;f({status:`loading`});let r=s.current;return r?(r(t.signal).then(t=>{if(!e){if(t.ok){f({status:`loaded`,content:t.text});return}f({status:`error`,message:t.message??c.current(t.status)})}}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||f({status:`error`,message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()}):(fetch(a??``,{credentials:`same-origin`,signal:t.signal}).then(async e=>{if(!e.ok)throw Error(c.current(e.status));return e.text()}).then(t=>{e||f({status:`loaded`,content:t})}).catch(t=>{e||t instanceof Error&&t.name===`AbortError`||f({status:`error`,message:t instanceof Error?t.message:n({id:`ig5vUe`})})}),()=>{e=!0,t.abort()})},m=[a,n],t[6]=n,t[7]=a,t[8]=p,t[9]=m):(p=t[8],m=t[9]),(0,Q.useEffect)(p,m),d}function $x(e){let t=(0,$.c)(10),{fileName:n,dataAttr:r,extraAttrs:i}=e,a=`${r}-state`,o;t[0]!==r||t[1]!==a?(o={[r]:``,[a]:`loading`},t[0]=r,t[1]=a,t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(J,{id:`Md709y`,values:{fileName:n}})}),t[3]=n,t[4]=s);let c;return t[5]!==i||t[6]!==n||t[7]!==o||t[8]!==s?(c=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center bg-background text-muted-foreground text-sm`,"aria-label":n,...o,...i,children:s}),t[5]=i,t[6]=n,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function eS(e){let t=(0,$.c)(16),{fileName:n,dataAttr:r,extraAttrs:i,message:a,openHref:o}=e,s=`${r}-state`,c;t[0]!==r||t[1]!==s?(c={[r]:``,[s]:`error`},t[0]=r,t[1]=s,t[2]=c):c=t[2];let l;t[3]===n?l=t[4]:(l=(0,Z.jsx)(`div`,{className:`font-medium text-sm`,children:(0,Z.jsx)(J,{id:`qdBUHP`,values:{fileName:n}})}),t[3]=n,t[4]=l);let u;t[5]===a?u=t[6]:(u=(0,Z.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:a}),t[5]=a,t[6]=u);let d;t[7]===o?d=t[8]:(d=o?(0,Z.jsx)(`a`,{href:o,className:`mt-2 rounded-md border px-3 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground`,children:(0,Z.jsx)(J,{id:`9npOH9`})}):null,t[7]=o,t[8]=d);let f;return t[9]!==i||t[10]!==n||t[11]!==c||t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,Z.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col items-center justify-center gap-2 bg-background p-4 text-center`,"aria-label":n,...c,...i,children:[l,u,d]}),t[9]=i,t[10]=n,t[11]=c,t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15],f}var tS=Wn({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}}),nS=dr({settings:{background:`var(--background)`,gutterBackground:`var(--muted)`}});function rS(e){let t=(0,$.c)(23),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,Q.useRef)(null),o=(0,Q.useRef)(null),{resolvedTheme:s}=on(),c=Qx(i),l=c.status===`loaded`?c.content:null,u,d;t[4]!==n||t[5]!==l||t[6]!==s?(u=()=>{if(!a.current||l===null)return;let e=n.toLowerCase(),t=bo(e),r=s===`dark`?tS:nS,i=!1,c=null;return Zx(e,t).then(e=>{if(i||!a.current)return;let t=[id,...e?[e]:[],Au.editable.of(!0),Ou.readOnly.of(!0),Au.lineWrapping,r];c=new Au({state:Ou.create({doc:l,extensions:t}),parent:a.current}),o.current=c}),()=>{i=!0,c?.destroy(),o.current=null}},d=[l,n,s],t[4]=n,t[5]=l,t[6]=s,t[7]=u,t[8]=d):(u=t[7],d=t[8]),(0,Q.useEffect)(u,d);let f;t[9]===n?f=t[10]:(f={"data-text-viewer-extension":n},t[9]=n,t[10]=f);let p=f;if(c.status===`loading`){let e;return t[11]!==p||t[12]!==r?(e=(0,Z.jsx)($x,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:p}),t[11]=p,t[12]=r,t[13]=e):e=t[13],e}if(c.status===`error`){let e;return t[14]!==p||t[15]!==c.message||t[16]!==r||t[17]!==i.src?(e=(0,Z.jsx)(eS,{fileName:r,dataAttr:`data-text-viewer`,extraAttrs:p,message:c.message,openHref:i.src}),t[14]=p,t[15]=c.message,t[16]=r,t[17]=i.src,t[18]=e):e=t[18],e}let m;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(`div`,{ref:a,className:`min-h-0 flex-1 overflow-auto`}),t[19]=m):m=t[19];let h;return t[20]!==n||t[21]!==r?(h=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-text-viewer":``,"data-text-viewer-state":`loaded`,"data-text-viewer-extension":n,children:m}),t[20]=n,t[21]=r,t[22]=h):h=t[22],h}function iS(e){let t=(0,$.c)(50),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({fileName:r,extension:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{_:a}=jt(),[o,s]=(0,Q.useState)(`diagram`),c=Qx(i),l;t[4]===n?l=t[5]:(l={"data-mermaid-file-viewer-extension":n},t[4]=n,t[5]=l);let u=l;if(c.status===`loading`){let e;return t[6]!==u||t[7]!==r?(e=(0,Z.jsx)($x,{fileName:r,dataAttr:`data-mermaid-file-viewer`,extraAttrs:u}),t[6]=u,t[7]=r,t[8]=e):e=t[8],e}if(c.status===`error`){let e;return t[9]!==u||t[10]!==c.message||t[11]!==r||t[12]!==i.src?(e=(0,Z.jsx)(eS,{fileName:r,dataAttr:`data-mermaid-file-viewer`,extraAttrs:u,message:c.message,openHref:i.src}),t[9]=u,t[10]=c.message,t[11]=r,t[12]=i.src,t[13]=e):e=t[13],e}let d=c.content,f;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{e&&s(e)},t[14]=f):f=t[14];let p;t[15]===a?p=t[16]:(p=a({id:`72xhRD`}),t[15]=a,t[16]=p);let m;t[17]===a?m=t[18]:(m=a({id:`DEWDbv`}),t[17]=a,t[18]=m);let h;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(yn,{children:(0,Z.jsx)(dt,{className:`size-4`})}),t[19]=h):h=t[19];let _;t[20]===m?_=t[21]:(_=(0,Z.jsx)(oa,{value:`diagram`,"aria-label":m,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,asChild:!0,children:h}),t[20]=m,t[21]=_);let v;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(bn,{side:`bottom`,children:(0,Z.jsx)(J,{id:`i-ShMB`})}),t[22]=v):v=t[22];let y;t[23]===_?y=t[24]:(y=(0,Z.jsxs)(Sn,{children:[_,v]}),t[23]=_,t[24]=y);let b;t[25]===a?b=t[26]:(b=a({id:`Y6SK9K`}),t[25]=a,t[26]=b);let x;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(yn,{children:(0,Z.jsx)(g,{className:`size-4`})}),t[27]=x):x=t[27];let S;t[28]===b?S=t[29]:(S=(0,Z.jsx)(oa,{value:`source`,"aria-label":b,className:`size-7 px-0 dark:data-[state=on]:bg-foreground/15`,asChild:!0,children:x}),t[28]=b,t[29]=S);let C;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(bn,{side:`bottom`,children:(0,Z.jsx)(J,{id:`wdxz7K`})}),t[30]=C):C=t[30];let w;t[31]===S?w=t[32]:(w=(0,Z.jsxs)(Sn,{children:[S,C]}),t[31]=S,t[32]=w);let T;t[33]!==o||t[34]!==w||t[35]!==p||t[36]!==y?(T=(0,Z.jsx)(`div`,{className:`flex shrink-0 items-center justify-center border-b bg-background py-2`,children:(0,Z.jsxs)(ca,{type:`single`,value:o,onValueChange:f,"aria-label":p,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 bg-muted p-0.5 data-[size=sm]:rounded-[10px]`,children:[y,w]})}),t[33]=o,t[34]=w,t[35]=p,t[36]=y,t[37]=T):T=t[37];let E;t[38]!==n||t[39]!==r||t[40]!==o||t[41]!==i||t[42]!==d?(E=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:o===`diagram`?(0,Z.jsx)(`div`,{className:`flex h-full min-h-0 flex-col p-3 [&_.mermaid-error-source]:hidden`,children:(0,Z.jsx)(Vn,{chart:d,className:`min-h-0 flex-1`})}):(0,Z.jsx)(rS,{...i,fileName:r,extension:n})}),t[38]=n,t[39]=r,t[40]=o,t[41]=i,t[42]=d,t[43]=E):E=t[43];let D;return t[44]!==u||t[45]!==r||t[46]!==o||t[47]!==T||t[48]!==E?(D=(0,Z.jsxs)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":r,"data-mermaid-file-viewer":``,"data-mermaid-file-viewer-state":`loaded`,"data-mermaid-file-viewer-mode":o,...u,children:[T,E]}),t[44]=u,t[45]=r,t[46]=o,t[47]=T,t[48]=E,t[49]=D):D=t[49],D}function aS(e){let t=(0,$.c)(29),{entry:n,className:r}=e,{_:i}=jt(),{projectLocalBinding:a,merged:o}=Bu(),s=o?.appearance?.sidebar,c=s?.showHiddenFiles??!1,l=s?.showOnlyMarkdownFiles??!1,u;t[0]!==n||t[1]!==c||t[2]!==l?(u=Rl(n,{showHiddenFiles:c,showOnlyMarkdownFiles:l}),t[0]=n,t[1]=c,t[2]=l,t[3]=u):u=t[3];let d=u;if(!d.hiddenFiles&&!d.onlyMarkdownFiles)return null;let f;t[4]!==i||t[5]!==a?(f=e=>{if(a===null)return;let t=a.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[NotInSidebarIndicator] sidebar visibility flip rejected:`,To(t.error)),ul.error(i({id:`P47EWZ`}),{description:To(t.error)}))},t[4]=i,t[5]=a,t[6]=f):f=t[6];let p=f,m;t[7]===r?m=t[8]:(m=X(`flex items-center gap-1.5 text-muted-foreground/70 text-xs`,r),t[7]=r,t[8]=m);let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(te,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),t[9]=h):h=t[9];let g;t[10]===i?g=t[11]:(g=i({id:`j9tqwO`}),t[10]=i,t[11]=g);let _;t[12]===g?_=t[13]:(_=(0,Z.jsx)(`span`,{className:`whitespace-nowrap`,children:g}),t[12]=g,t[13]=_);let v;t[14]!==i||t[15]!==d.hiddenFiles||t[16]!==p||t[17]!==a?(v=d.hiddenFiles?(0,Z.jsx)(Y,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:a===null,onClick:()=>p({showHiddenFiles:!0}),"aria-label":i({id:`XcGbim`}),title:i({id:`XcGbim`}),"data-testid":`not-in-sidebar-flip-hidden-files`,children:i({id:`6KCH4m`})}):null,t[14]=i,t[15]=d.hiddenFiles,t[16]=p,t[17]=a,t[18]=v):v=t[18];let y;t[19]!==i||t[20]!==d.onlyMarkdownFiles||t[21]!==p||t[22]!==a?(y=d.onlyMarkdownFiles?(0,Z.jsx)(Y,{variant:`outline`,size:`sm`,className:`h-5 rounded-sm px-1.5 font-normal text-2xs text-muted-foreground hover:text-foreground`,disabled:a===null,onClick:()=>p({showOnlyMarkdownFiles:!1}),"aria-label":i({id:`10g8I_`}),title:i({id:`10g8I_`}),"data-testid":`not-in-sidebar-flip-only-markdown`,children:i({id:`5-o4kO`})}):null,t[19]=i,t[20]=d.onlyMarkdownFiles,t[21]=p,t[22]=a,t[23]=y):y=t[23];let b;return t[24]!==y||t[25]!==m||t[26]!==_||t[27]!==v?(b=(0,Z.jsxs)(`div`,{"data-testid":`not-in-sidebar-indicator`,className:m,children:[h,_,v,y]}),t[24]=y,t[25]=m,t[26]=_,t[27]=v,t[28]=b):b=t[28],b}function oS(e){return co(`/api/asset?path=${encodeURIComponent(e)}`)}function sS(e){return`/api/asset-text?path=${encodeURIComponent(e)}`}function cS(e){let t=(0,$.c)(8),{assetPath:n,mediaKind:r}=e,i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(aS,{entry:{kind:`asset`,path:n},className:`shrink-0 border-b bg-background px-3 py-1.5`}),t[0]=n,t[1]=i);let a;t[2]!==n||t[3]!==r?(a=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,Z.jsx)(lS,{assetPath:n,mediaKind:r})}),t[2]=n,t[3]=r,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[i,a]}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function lS(e){let t=(0,$.c)(33),{assetPath:n,mediaKind:r}=e,[i,a]=(0,Q.useState)(!1),o;t[0]===n?o=t[1]:(o=oS(n),t[0]=n,t[1]=o);let s=o,c;t[2]===n?c=t[3]:(c=n.split(`/`).pop()??n,t[2]=n,t[3]=c);let l=c,u,d,f,p;if(t[4]!==n||t[5]!==l||t[6]!==i||t[7]!==r||t[8]!==s){p=Symbol.for(`react.early_return_sentinel`);bb0:{if(f=l.includes(`.`)?l.split(`.`).pop()??``:``,d=f.length>0?f.toUpperCase():`FILE`,u=i?`text`:r,u===`pdf`){let e;t[13]!==l||t[14]!==s?(e=(0,Z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,Z.jsx)(ne,{src:s,title:l,fillContainer:!0})}),t[13]=l,t[14]=s,t[15]=e):e=t[15];let n;t[16]!==l||t[17]!==e?(n=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":l,children:e}),t[16]=l,t[17]=e,t[18]=n):n=t[18],p=n;break bb0}if(u===`text`){let e;t[19]===n?e=t[20]:(e=sS(n),t[19]=n,t[20]=e),p=(0,Z.jsx)(rS,{src:e,fileName:l,extension:f.toLowerCase()},n);break bb0}if(u===`mermaid`){let e;t[21]===n?e=t[22]:(e=sS(n),t[21]=n,t[22]=e),p=(0,Z.jsx)(iS,{src:e,fileName:l,extension:f.toLowerCase()},n);break bb0}}t[4]=n,t[5]=l,t[6]=i,t[7]=r,t[8]=s,t[9]=u,t[10]=d,t[11]=f,t[12]=p}else u=t[9],d=t[10],f=t[11],p=t[12];if(p!==Symbol.for(`react.early_return_sentinel`))return p;let m;t[23]!==n||t[24]!==u||t[25]!==d||t[26]!==l||t[27]!==f||t[28]!==s?(m=(0,Z.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:u===`image`?(0,Z.jsx)(oe,{src:s,alt:l,draggable:!1,slotClassName:`flex h-full w-full items-center justify-center`,className:`max-h-full max-w-full`}):u===`video`?(0,Z.jsx)(`video`,{src:s,controls:!0,className:`max-h-full max-w-full`}):u===`audio`?(0,Z.jsx)(`audio`,{src:s,controls:!0,className:`w-full max-w-md`}):(0,Z.jsxs)(`div`,{className:`flex max-w-sm flex-col items-center gap-8 text-center`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-1`,children:[(0,Z.jsx)(`div`,{className:`flex items-center justify-center tracking-wide text-muted-foreground/80 text-2xs font-mono`,children:d}),(0,Z.jsx)(`div`,{className:`max-w-full text-balance break-words tracking-tight font-light text-2xl`,children:l})]}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[(0,Z.jsx)(Y,{variant:`default`,size:`sm`,onClick:()=>a(!0),"data-testid":`asset-preview-open-as-text`,className:`font-mono uppercase`,children:(0,Z.jsx)(J,{id:`qFWMl-`})}),(0,Z.jsx)(Y,{variant:`outline`,size:`sm`,className:`font-mono uppercase`,onClick:()=>{Xn({url:s,projectRelPath:n,ext:f.toLowerCase(),title:l,forceOsDelegation:!1})},children:(0,Z.jsx)(J,{id:`9npOH9`})})]})]})}),t[23]=n,t[24]=u,t[25]=d,t[26]=l,t[27]=f,t[28]=s,t[29]=m):m=t[29];let h;return t[30]!==l||t[31]!==m?(h=(0,Z.jsx)(`main`,{className:`flex h-full min-h-0 flex-col bg-background`,"aria-label":l,children:m}),t[30]=l,t[31]=m,t[32]=h):h=t[32],h}function uS(){let e=(0,$.c)(5),{_:t}=jt(),n;e[0]===t?n=e[1]:(n=t({id:`3VsNTI`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsx)(xl,{className:`h-9 w-2/5 mt-6 mb-5`}),(0,Z.jsx)(xl,{className:`h-4 w-full`}),(0,Z.jsx)(xl,{className:`h-4 w-3/4`})]}),e[2]=r):r=e[2];let i;return e[3]===n?i=e[4]:(i=(0,Z.jsx)(`div`,{className:`tiptap-editor pt-10`,role:`status`,"aria-busy":`true`,"aria-label":n,children:r}),e[3]=n,e[4]=i),i}function dS(e){let{_:t}=jt();return e===`existing-repo`?[{id:`draft-spec`,icon:vm,label:t({id:`LdKIHS`}),prompt:t({id:`N_7kkF`})},{id:`organize-specs`,icon:Im,label:t({id:`cuA8QW`}),prompt:t({id:`mPy9lS`})},{id:`document-architecture`,icon:zm,label:t({id:`6eniID`}),prompt:t({id:`uDlyqd`})}]:[{id:`competitor-research`,icon:dh,label:t({id:`GUqTzn`}),prompt:t({id:`KOZud0`})},{id:`eng-specs`,icon:vm,label:t({id:`Qvls7J`}),prompt:t({id:`6qMe0o`})},{id:`bird-wiki`,icon:tm,label:t({id:`FqTpiN`}),prompt:t({id:`jtg_8-`})}]}function fS(e){let t=(0,$.c)(13),{scenario:n,className:r}=e,{_:i}=jt(),a=dS(n),[o,s]=(0,Q.useState)(null),c=(0,Q.useRef)(void 0),l,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>()=>clearTimeout(c.current),u=[],t[0]=l,t[1]=u):(l=t[0],u=t[1]),(0,Q.useEffect)(l,u);let d,f;if(t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a){let e=function(e,t){ad(t).then(()=>{s(e),clearTimeout(c.current),c.current=setTimeout(()=>s(null),1600)}).catch(pS)};t[8]===r?d=t[9]:(d=X(`w-full divide-y divide-border/60 overflow-hidden rounded-2xl border border-border/60 bg-card`,r),t[8]=r,t[9]=d),f=a.map(t=>{let n=t.icon,r=o===t.id;return(0,Z.jsxs)(`li`,{className:`group flex items-start gap-3 p-3.5`,"data-testid":`copy-prompt-${t.id}`,children:[(0,Z.jsx)(n,{className:`mt-0.5 size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-medium leading-tight text-foreground`,children:t.label}),(0,Z.jsx)(`span`,{className:`truncate text-1sm leading-relaxed text-muted-foreground`,children:t.prompt})]}),(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>e(t.id,t.prompt),"aria-label":i(r?{id:`6V3Ea3`}:{id:`RG4XHV`,values:{0:t.label}}),className:X(`shrink-0 gap-1.5 transition-opacity focus-visible:opacity-100 uppercase font-mono`,r?`opacity-100`:`opacity-0 group-hover:opacity-100`),"data-testid":`copy-prompt-button-${t.id}`,children:[r?(0,Z.jsx)(As,{className:`size-3.5`,"aria-hidden":`true`}):(0,Z.jsx)(bc,{className:`size-3.5`,"aria-hidden":`true`}),i(r?{id:`6V3Ea3`}:{id:`he3ygx`})]})]},t.id)}),t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=d,t[7]=f}else d=t[6],f=t[7];let p;return t[10]!==d||t[11]!==f?(p=(0,Z.jsx)(`ul`,{className:d,children:f}),t[10]=d,t[11]=f,t[12]=p):p=t[12],p}function pS(){}var mS=`ok-ask-ai-draft-v2`,hS={doc:null,dismissed:!1};function gS(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}var _S=null,vS=new Set;function yS(e){if(e===null)return!0;let t=e.content;return!Array.isArray(t)||t.length===0?!0:t.every(e=>{let t=e.content;return!Array.isArray(t)||t.length===0})}function bS(){let e=gS();if(!e)return hS;try{let t=e.getItem(mS);if(!t)return hS;let n=JSON.parse(t);return typeof n!=`object`||!n||Array.isArray(n)?hS:{doc:n,dismissed:!1}}catch(e){return console.warn(`failed to parse stored draft — clearing`,e),hS}}function xS(){return _S===null&&(_S=bS()),_S}function SS(e){let t=gS();if(t)try{e&&!yS(e)?t.setItem(mS,JSON.stringify(e)):t.removeItem(mS)}catch{}}function CS(){for(let e of vS)e()}function wS(){return xS()}function TS(e){let t=e&&!yS(e)?e:null;_S={...xS(),doc:t},SS(t),CS()}function ES(){TS(null)}var DS=`button, a[href], [role="menuitem"], [role="button"], input, textarea, select, [contenteditable="true"]`;function OS(e,t){!(e.target instanceof HTMLElement)||e.target.closest(DS)||(e.preventDefault(),t.current?.focus())}var kS=un(`group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!`,vertical:`flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!`}},defaultVariants:{orientation:`horizontal`}});function AS(e){let t=(0,$.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==r?(a=X(kS({orientation:r}),n),t[4]=n,t[5]=r,t[6]=a):a=t[6];let o;return t[7]!==r||t[8]!==i||t[9]!==a?(o=(0,Z.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":r,className:a,...i}),t[7]=r,t[8]=i,t[9]=a,t[10]=o):o=t[10],o}var jS=$a;function MS(e){let t=$n(e).kind;return t===`folder`||t===`asset`?t:`page`}function NS(e){let t=(0,$.c)(14),{items:n,query:r,selectedIndex:i,onSelect:a,loading:o,error:s,hasMore:c}=e,l=o===void 0?!1:o,u=s===void 0?!1:s,d=c===void 0?!1:c,{_:f}=jt(),p=(0,Q.useId)(),m=(0,Q.useRef)(null),h,g;t[0]===i?(h=t[1],g=t[2]):(h=()=>{(m.current?.querySelectorAll(`[role="option"]`))?.item(i)?.scrollIntoView({block:`nearest`})},g=[i],t[0]=i,t[1]=h,t[2]=g),(0,Q.useEffect)(h,g);let _=i>=0&&i<n.length?n[i]:null,v;return t[3]!==f||t[4]!==u||t[5]!==d||t[6]!==n||t[7]!==p||t[8]!==l||t[9]!==a||t[10]!==r||t[11]!==i||t[12]!==_?(v=(0,Z.jsx)(`div`,{ref:m,className:`w-80 max-w-[min(28rem,90vw)] overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:l?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-muted-foreground`,"aria-live":`polite`,children:f({id:`3m2GBo`})}):u?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-muted-foreground`,"aria-live":`assertive`,children:f({id:`weP6me`})}):n.length===0?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-sm text-muted-foreground`,"aria-live":`polite`,children:r.trim()===``?f({id:`0E9DR6`}):f({id:`yQyglE`})}):(0,Z.jsxs)(`div`,{role:`listbox`,id:p,"aria-label":f({id:`05n5wS`}),tabIndex:-1,className:`max-h-64 overflow-y-auto subtle-scrollbar`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:_?_.title:``}),n.map((e,t)=>{let n=t===i,r=MS(e.path),o=r===`folder`,s=o?`${e.path}/`:e.path;return(0,Z.jsxs)(`button`,{id:`${p}-option-${t}`,type:`button`,role:`option`,"aria-selected":n,"data-active":n,"data-mention-kind":r,"data-testid":`composer-mention-option-${e.docName}`,className:`flex w-full items-start gap-2 rounded-md px-2 py-1.5 text-left ${n?`bg-accent text-accent-foreground`:``}`,onMouseDown:t=>{t.preventDefault(),a(e)},children:[(0,Z.jsx)(Te,{path:e.path,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,Z.jsxs)(`span`,{className:`flex items-baseline gap-1.5`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:e.title}),o?(0,Z.jsx)(`span`,{className:`shrink-0 text-[10px] font-medium uppercase tracking-wide text-muted-foreground`,children:f({id:`kNqMMd`})}):null]}),(0,Z.jsx)(`span`,{className:`line-clamp-2 break-all text-xs text-muted-foreground`,children:s})]})]},e.docName)}),d?(0,Z.jsx)(`div`,{className:`px-2 py-1 text-xs text-muted-foreground`,"aria-hidden":!0,children:f({id:`F1T9y_`})}):null]})}),t[3]=f,t[4]=u,t[5]=d,t[6]=n,t[7]=p,t[8]=l,t[9]=a,t[10]=r,t[11]=i,t[12]=_,t[13]=v):v=t[13],v}var PS=8,FS=new es(`composerMentionSuggestion`);function IS(e){return e.kind===`asset`?e.docName.replace(/^\//,``):e.kind===`folder`?e.docName:vc(e.docName)}var LS=xo.create({name:`doc`,topNode:!0,content:`paragraph+`}),RS=xo.create({name:`paragraph`,group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML(){return[`p`,0]}}),zS=xo.create({name:`text`,group:`inline`}),BS=xo.create({name:`hardBreak`,group:`inline`,inline:!0,selectable:!1,parseHTML(){return[{tag:`br`}]},renderHTML(){return[`br`]},addKeyboardShortcuts(){return{"Shift-Enter":()=>this.editor.commands.insertContent({type:`hardBreak`})}}}),VS=vo.create({name:`composerHistory`,addProseMirrorPlugins(){return[ua(),Ba({"Mod-z":Go,"Mod-y":So,"Shift-Mod-z":So})]}}),HS=xo.create({name:`composerMention`,group:`inline`,inline:!0,atom:!0,selectable:!0,addAttributes(){return{path:{default:``},label:{default:``}}},parseHTML(){return[{tag:`span[data-composer-mention]`}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.label||e.attrs.path);return[`span`,Ja(t,{"data-composer-mention":String(e.attrs.path??``),class:`composer-mention-chip`}),`@${n}`]},renderText({node:e}){return`@${e.attrs.path}`},addNodeView(){return({node:e,editor:t,getPos:n})=>{let r=String(e.attrs.path??``),i=String(e.attrs.label||e.attrs.path),a=document.createElement(`span`);a.className=`composer-mention-chip group/mention`,a.setAttribute(`data-composer-mention`,r),a.title=i;let o=document.createElement(`button`);o.type=`button`,o.className=`composer-mention-icon`,o.setAttribute(`aria-label`,_l._({id:`Xzy0s0`,values:{fullLabel:i}}));let s=document.createElement(`span`);s.className=`composer-mention-glyph composer-mention-glyph-icon`,s.setAttribute(`aria-hidden`,`true`),s.innerHTML=ct(r),o.appendChild(s);let c=document.createElement(`span`);c.className=`composer-mention-glyph composer-mention-glyph-x`,c.setAttribute(`aria-hidden`,`true`),c.innerHTML=Ie(ll),o.appendChild(c),o.addEventListener(`mousedown`,e=>e.preventDefault()),o.addEventListener(`click`,r=>{r.preventDefault();let i=typeof n==`function`?n():null;i!=null&&t.chain().focus().deleteRange({from:i,to:i+e.nodeSize}).run()}),a.appendChild(o);let l=document.createElement(`span`);return l.className=`composer-mention-label`,l.textContent=i,a.appendChild(l),{dom:a}}},addProseMirrorPlugins(){return[GS(this.editor)]}});function US(e){return[LS,RS,zS,BS,VS,HS,...e?.placeholder?[jS.configure({placeholder:e.placeholder})]:[]]}function WS(e=nr){let t=[],n=!1,r=null,i=!1;return{snapshot(){return{loaded:n,error:i}},async getItems(a){if(!n){r||=e();try{t=await r,n=!0,i=!1}catch(e){console.error(`[composer-mention] failed to fetch pages`,e),t=[],i=!0}finally{r=null}}return lr(t,a).map(e=>({docName:e.docName,title:e.title,path:IS(e)})).filter(e=>e.path!==``)},reset(){t=[],n=!1,r=null,i=!1}}}function GS(e){let t=WS();return Pn({editor:e,pluginKey:FS,char:`@`,items:({query:e})=>t.getItems(e),command:({editor:e,range:t,props:n})=>{try{e.chain().focus().deleteRange(t).insertContent([{type:`composerMention`,attrs:{path:n.path,label:n.title}},{type:`text`,text:` `}]).run()}catch(e){console.error(`[composer-mention] insert failed`,{item:n,range:t},e)}},render:()=>{let e=null,n=null,r=0,i={popup:null,stopAutoUpdate:null},a=null,o=null,s=e=>{n?.command(e)},c=e=>{let n=e.items??[],{loaded:i,error:a}=t.snapshot();return{items:n,query:e.query??``,selectedIndex:r,onSelect:s,loading:!i&&!a,error:a,hasMore:n.length>=PS}},l=()=>{!e||!n||e.updateProps(c(n))};return{onBeforeStart(t){n=t,r=0;let s=Kn(()=>n,`composer-mention`);i.popup=s.popup,a=s.doPosition,o=s.reveal,e=new Yn(NS,{props:c(t),editor:t.editor}),s.popup.appendChild(e.element),i.stopAutoUpdate=s.startAutoUpdate()},onStart(e){n=e,r=0,l(),o?.()},onUpdate(e){n=e,r=Math.min(r,Math.max(0,e.items.length-1)),l(),a?.()},onKeyDown({event:e}){if(!n)return!1;let t=n.items;if(e.key===`ArrowDown`)return t.length===0?!1:(r=(r+1)%t.length,l(),!0);if(e.key===`ArrowUp`)return t.length===0?!1:(r=(r-1+t.length)%t.length,l(),!0);if(e.key===`Enter`||e.key===`Tab`){let e=t[r];return e?(n.command(e),!0):!1}return!1},onExit(){Gn(i),a=null,o=null,e?.destroy(),e=null,n=null,r=0,t.reset()}}}})}function KS(e){let t=[],n=new Set,r=[];return e.state.doc.forEach(e=>{let i=``;e.forEach(e=>{if(e.type.name===`composerMention`){let r=String(e.attrs.path??``);r!==``&&(i+=`@${r}`,n.has(r)||(n.add(r),t.push(r)))}else e.isText?i+=e.text??``:e.type.name===`hardBreak`&&(i+=`
13
13
  `)}),r.push(i)}),{instruction:r.join(`
@@ -1992,4 +1992,4 @@ Error generating stack: `+e.message+`
1992
1992
  --trees-focus-ring-color: transparent;
1993
1993
  }
1994
1994
  `}\n${fJ}\n${pJ}`;function uX(e){let t=e.split(`/`).pop()?.replace(/\.md$/i,``).toLowerCase();return!!t&&JY.has(t)}function dX(e){return e===`darwin`?_l._({id:`LtSYdi`}):e===`win32`?_l._({id:`qi1F96`}):_l._({id:`e1Rn_k`})}function fX(e){let t=(0,$.c)(18),{item:n,workspace:r,onClose:i}=e,{_:a}=jt(),o=typeof window<`u`?window.okDesktop:void 0;if(!o)return null;let s=o.platform,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=dX(s),t[0]=c):c=t[0];let l=c,u,d;t[1]!==a||t[2]!==r?(u=r?null:a({id:`wTcjov`}),d=a(s===`darwin`?u?{id:`FvpFSZ`,values:{hint:u}}:{id:`LtSYdi`}:s===`win32`?u?{id:`o4dcAf`,values:{hint:u}}:{id:`qi1F96`}:u?{id:`zUhPuR`,values:{hint:u}}:{id:`e1Rn_k`}),t[1]=a,t[2]=r,t[3]=u,t[4]=d):(u=t[3],d=t[4]);let f=d,p=!r,m;t[5]!==n||t[6]!==i||t[7]!==r?(m=()=>{if(!r)return;i();let e=mc(r.contentDir,pd(n),r.pathSeparator);o.shell.showItemInFolder(e)},t[5]=n,t[6]=i,t[7]=r,t[8]=m):m=t[8];let h,g;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(Sc,{"aria-hidden":`true`}),g=(0,Z.jsx)(`span`,{className:`flex-1`,children:l}),t[9]=h,t[10]=g):(h=t[9],g=t[10]);let _;t[11]===u?_=t[12]:(_=u?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:u}):null,t[11]=u,t[12]=_);let v;return t[13]!==f||t[14]!==p||t[15]!==m||t[16]!==_?(v=(0,Z.jsxs)(Gr,{disabled:p,onSelect:m,"aria-label":f,children:[h,g,_]}),t[13]=f,t[14]=p,t[15]=m,t[16]=_,t[17]=v):v=t[17],v}function pX(e,t){return dd({kind:e.endsWith(`/`)?`directory`:`file`,name:e,path:e},t)}function mX(e){let t=e.match(/\.(md|mdx)$/i);if(!t)return null;let n=t[0].toLowerCase()===`.md`?`.mdx`:`.md`;return`${e.slice(0,-t[0].length)}${n}`}function hX(e,t){let n=mX(e);return n?t.includes(n):!1}function gX(e,t){return e!==t&&e.startsWith(t)}function _X(e,t){let n=[...new Set(e)].filter(e=>!Ul(e)),r=n.filter(e=>e.endsWith(`/`));return n.filter(e=>!r.some(t=>gX(e,t))).map(e=>pX(e,t))}function vX(e,t){let n=e.getItem(t)??e.getItem(Dd(t));return n?.isDirectory()?Dd(Fd(n.getPath())):t}function yX(e){let t=e.getFocusedPath()??e.getSelectedPaths()[0]??null;return t?vX(e,t):null}function bX(e,t,n){let r=yX(e);return!r||n.has(r)||Ul(r)?null:pX(r,t)}function xX(e,t){let n=e.getSelectedPaths(),r=yX(e);return _X(n.length>0?n.map(t=>vX(e,t)):r?[r]:[],t)}function SX(e,t){return e===t||e.startsWith(`${t}/`)}function CX(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`||e.isContentEditable||e.closest(`[contenteditable="true"]`)!==null}function wX(e,t,n){let r=new Set,i=new Set,a=new Set;for(let o of e){if(o.kind===`file`){r.add(o.path);continue}if(o.kind===`asset`){a.add(o.path);continue}i.add(o.path);for(let e of t)Pl(e)&&e.docName.startsWith(`${o.path}/`)?r.add(e.docName):Gl(e)&&e.path.startsWith(`${o.path}/`)&&a.add(e.path);for(let e of n){let t=Fd(e);SX(t,o.path)&&i.add(t)}}return{docNames:r,folderPaths:i,assetPaths:a}}function TX(e,t){return e.kind===`file`?t.kind===`file`&&e.path===t.createdPath:e.kind===`asset`?!1:SX(t.createdPath,e.path)}function EX(e){let t=(0,$.c)(68),{item:n,context:r,anyActionBusy:i,workspace:a,handoff:o,model:s,okignoreBinding:c,onStartCreating:l,onCreateFromTemplate:u,onDuplicate:d,onDelete:f,onExpandSubtree:p,onCollapseSubtree:m,folderTreePaths:h,isAsset:g,documents:_}=e,{_:v}=jt(),y=dd(n,_),b=n.kind===`directory`,x;t[0]===n.path?x=t[1]:(x=Ul(n.path),t[0]=n.path,t[1]=x);let S=x,C=y.kind===`asset`?null:y,w=C!==null&&c!==null,T;t[2]!==v||t[3]!==b?(T=v(b?{id:`5D3Ior`}:{id:`dbhUX1`}),t[2]=v,t[3]=b,t[4]=T):T=t[4];let E=T,D;t[5]!==b||t[6]!==n.path?(D=b?Fd(n.path):null,t[5]=b,t[6]=n.path,t[7]=D):D=t[7];let O=Ni(D),k=O.state.status===`ready`?(O.state.data.folder.templates_available?.length??0)>0:!0,A=s.getSelectedPaths(),j=A.includes(y.treePath)?_X(A,_):[],M=j.length>1?j:[y],N=M.length,P=_l._({id:`djjdjr`,values:{deleteCount:N}}),F;t[8]!==_||t[9]!==g||t[10]!==b||t[11]!==n||t[12]!==a?(F=g?null:b?Xs({folderRelativePath:pd(n),workspace:a}):Ws({docName:Pd(n.path,_),workspace:a}),t[8]=_,t[9]=g,t[10]=b,t[11]=n,t[12]=a,t[13]=F):F=t[13];let I=F,L;t[14]===r?L=t[15]:(L=()=>r.close({restoreFocus:!1}),t[14]=r,t[15]=L);let R=L,z;t[16]===r?z=t[17]:(z=()=>r.close(),t[16]=r,t[17]=z);let B=z,{status:V}=fs(),H=V?.hasRemote===!0,U;t[18]!==_||t[19]!==g||t[20]!==b||t[21]!==n.path||t[22]!==y?(U=g||y.kind===`asset`?null:b?pi(Fd(n.path)):xi(Pd(n.path,_)),t[18]=_,t[19]=g,t[20]=b,t[21]=n.path,t[22]=y,t[23]=U):U=t[23];let W=U,G=H&&W!==null,K;t[24]!==v||t[25]!==H||t[26]!==W?(K=()=>{W&&gi({...W,hasRemote:H,onClickWhenNoRemote:()=>{ul.error(v({id:`WyQxwa`}))}},{clipboardWrite:ad,toastSuccess:kX,toastError:OX,logEvent:DX})},t[24]=v,t[25]=H,t[26]=W,t[27]=K):K=t[27];let ee=K,q;t[28]!==G||t[29]!==B||t[30]!==ee?(q=G?(0,Z.jsxs)(Gr,{"data-testid":`file-tree-menu-share`,onSelect:()=>{B(),ee()},children:[(0,Z.jsx)($m,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`Z8lGw6`})]}):null,t[28]=G,t[29]=B,t[30]=ee,t[31]=q):q=t[31];let ne=q,re=0,ie=0;if(b){let e=Dd(n.path);for(let t of h)(t===e||t.startsWith(e))&&(re++,aY(s.getItem(t))?.isExpanded()&&ie++)}let ae=b&&ie<re,oe=b&&ie>0,se;t[32]===B?se=t[33]:(se=e=>{e||B()},t[32]=B,t[33]=se);let ce;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,Z.jsx)(jr,{asChild:!0,children:(0,Z.jsx)(`span`,{"aria-hidden":`true`,"data-file-tree-context-menu-root":`true`,className:`block size-px`})}),t[34]=ce):ce=t[34];let le;t[35]!==v||t[36]!==i||t[37]!==w||t[38]!==B||t[39]!==R||t[40]!==P||t[41]!==M||t[42]!==k||t[43]!==o||t[44]!==I||t[45]!==E||t[46]!==g||t[47]!==b||t[48]!==S||t[49]!==n||t[50]!==s||t[51]!==c||t[52]!==C||t[53]!==m||t[54]!==u||t[55]!==f||t[56]!==d||t[57]!==p||t[58]!==l||t[59]!==ne||t[60]!==oe||t[61]!==ae||t[62]!==y||t[63]!==a?(le=(0,Z.jsx)(qr,{sideOffset:0,align:`start`,"data-file-tree-context-menu-root":`true`,className:`min-w-52`,children:b?(0,Z.jsxs)(Z.Fragment,{children:[S?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(Gr,{disabled:i,onSelect:()=>{R(),l(`file`,Fd(n.path))},children:[(0,Z.jsx)(ih,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`HdkSiO`})]}),k?(0,Z.jsxs)(kr,{children:[(0,Z.jsxs)(Hr,{disabled:i,children:[(0,Z.jsx)(ta,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`Uuj_R4`})]}),(0,Z.jsx)(ri,{children:(0,Z.jsx)(iY,{parentDir:Fd(n.path),onSelectTemplate:e=>{R(),u(Fd(n.path),e)},ItemComponent:Gr})})]}):null,(0,Z.jsxs)(Gr,{disabled:i,onSelect:()=>{R(),l(`folder`,Fd(n.path))},children:[(0,Z.jsx)(wm,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`96G6Re`})]}),(0,Z.jsx)(Vr,{})]}),(0,Z.jsx)(fX,{item:n,workspace:a,onClose:B}),(0,Z.jsx)(Gs,{input:I,installStates:o.installStates,isElectronHost:o.isElectronHost,dispatch:o.dispatch}),ne,(0,Z.jsxs)(kr,{children:[(0,Z.jsxs)(Hr,{children:[(0,Z.jsx)(bc,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`oCZkaG`})]}),(0,Z.jsxs)(ri,{children:[(0,Z.jsx)(Gr,{disabled:!a,onSelect:()=>{a&&(B(),qY(mc(a.contentDir,pd(n),a.pathSeparator),`full`))},children:(0,Z.jsx)(J,{id:`oQA-cA`})}),(0,Z.jsx)(Gr,{onSelect:()=>{B(),qY(pd(n),`relative`)},children:(0,Z.jsx)(J,{id:`s061i4`})})]})]}),ae||oe?(0,Z.jsx)(Vr,{}):null,ae?(0,Z.jsxs)(Gr,{onSelect:()=>{B(),p(n.path)},children:[(0,Z.jsx)(vh,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`OlAl5i`})]}):null,oe?(0,Z.jsxs)(Gr,{onSelect:()=>{B(),m(n.path)},children:[(0,Z.jsx)(Sm,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`qvWGzP`})]}):null,S?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Vr,{}),(0,Z.jsxs)(Gr,{disabled:i,onSelect:()=>{y.kind!==`asset`&&(B(),d(y))},children:[(0,Z.jsx)(dc,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`euc6Ns`})]}),(0,Z.jsxs)(Gr,{disabled:i,onSelect:()=>{R(),s.startRenaming(n.path)},children:[(0,Z.jsx)(yc,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`2wxgft`})]}),(0,Z.jsxs)(Gr,{"data-testid":`file-tree-menu-hide`,disabled:!w,onSelect:()=>{if(!c||!C)return;B();let e=AJ(C),t=Ui(c.current()),n=ea(t,e);if(n===t)return;c.patch(ji(n));let r=C.path.split(`/`).pop()||C.path;ul.success(v({id:`4xtLTl`,values:{basename:r}}),{description:v({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(te,{"aria-hidden":`true`}),E]}),(0,Z.jsxs)(Gr,{variant:`destructive`,disabled:i,onSelect:()=>{B(),f(M)},children:[(0,Z.jsx)(Wc,{"aria-hidden":`true`}),P]})]})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(fX,{item:n,workspace:a,onClose:B}),!g&&(0,Z.jsx)(Gs,{input:I,installStates:o.installStates,isElectronHost:o.isElectronHost,dispatch:o.dispatch}),ne,(0,Z.jsxs)(kr,{children:[(0,Z.jsxs)(Hr,{children:[(0,Z.jsx)(bc,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`oCZkaG`})]}),(0,Z.jsxs)(ri,{children:[(0,Z.jsx)(Gr,{disabled:!a,onSelect:()=>{a&&(B(),qY(mc(a.contentDir,pd(n),a.pathSeparator),`full`))},children:(0,Z.jsx)(J,{id:`oQA-cA`})}),(0,Z.jsx)(Gr,{onSelect:()=>{B(),qY(pd(n),`relative`)},children:(0,Z.jsx)(J,{id:`s061i4`})})]})]}),S?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Vr,{}),g?null:(0,Z.jsxs)(Gr,{disabled:i,onSelect:()=>{B(),d(y)},children:[(0,Z.jsx)(dc,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`euc6Ns`})]}),(0,Z.jsxs)(Gr,{disabled:i,onSelect:()=>{R(),s.startRenaming(n.path)},children:[(0,Z.jsx)(yc,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`2wxgft`})]}),C?(0,Z.jsxs)(Gr,{"data-testid":`file-tree-menu-hide`,disabled:!w,onSelect:()=>{if(!c)return;B();let e=AJ(C),t=Ui(c.current()),n=ea(t,e);if(n===t)return;c.patch(ji(n));let r=C.path.split(`/`).pop()||C.path;ul.success(v({id:`OD0FCX`,values:{basename:r}}),{description:v({id:`nWv1ja`}),duration:5e3})},children:[(0,Z.jsx)(te,{"aria-hidden":`true`}),E]}):null,(0,Z.jsxs)(Gr,{variant:`destructive`,disabled:i,onSelect:()=>{B(),f(M)},children:[(0,Z.jsx)(Wc,{"aria-hidden":`true`}),P]})]})]})}),t[35]=v,t[36]=i,t[37]=w,t[38]=B,t[39]=R,t[40]=P,t[41]=M,t[42]=k,t[43]=o,t[44]=I,t[45]=E,t[46]=g,t[47]=b,t[48]=S,t[49]=n,t[50]=s,t[51]=c,t[52]=C,t[53]=m,t[54]=u,t[55]=f,t[56]=d,t[57]=p,t[58]=l,t[59]=ne,t[60]=oe,t[61]=ae,t[62]=y,t[63]=a,t[64]=le):le=t[64];let ue;return t[65]!==se||t[66]!==le?(ue=(0,Z.jsxs)($r,{open:!0,modal:!1,onOpenChange:se,children:[ce,le]}),t[65]=se,t[66]=le,t[67]=ue):ue=t[67],ue}function DX(e){return console.log(e)}function OX(e){return ul.error(e)}function kX(e){return ul.success(e)}function AX(e,t){return`/api/documents?showAll=true${t?`&showOk=true`:``}&dir=${encodeURIComponent(e)}&depth=1`}async function jX(e,t,n,r,i){try{let a=await fetch(AX(e,t),{signal:n,headers:yY});if(bY(a)){let e=await CY(a);return{kind:`entries`,entries:Al(e.entries),truncated:e.truncated}}let o=await At(a,r);if(!o.ok)return{kind:`http-error`,title:o.title};let s=Ao.safeParse(o.body);return s.success?{kind:`entries`,entries:Al(s.data.documents),truncated:s.data.truncated===!0}:{kind:`http-error`,title:i}}catch(e){return e instanceof xY?{kind:`http-error`,title:e.message}:{kind:`network-error`,cause:e}}}function MX(e){let t=(0,$.c)(366),{ref:n,onContentHeightChange:r}=e,{_:i,i18n:a}=jt(),{activeDocName:o,activeTarget:s,closeTabs:c,closeDocument:l,closeAndClearForRename:u,getPoolActiveDocName:d,poolHas:p,isNewTabActive:m,openTarget:h,prewarm:g,remapTabsForRename:_}=Xe(),{notifySidebarFileSelected:v}=zM(),{resolvedTheme:y}=on(),{addPage:b,pageMeta:x,pages:S}=Ls(),C;t[0]===x?C=t[1]:(C=function(e,t){return Ll(e,t??x.get(e)?.size)??{kind:`doc`,target:e,docName:e}},t[0]=x,t[1]=C);let w=C,T;t[2]!==b||t[3]!==w||t[4]!==v||t[5]!==h?(T=function(e,t,n){n?.registerPage&&b(e),h(w(e,t),{tabBehavior:`replace-active`}),iu(du(e)),v()},t[2]=b,t[3]=w,t[4]=v,t[5]=h,t[6]=T):T=t[6];let E=T,D;t[7]!==v||t[8]!==h?(D=function(e){let t=ru(e);h({kind:`folder`,target:e,folderPath:e},{tabBehavior:`replace-active`}),iu(t),v()},t[7]=v,t[8]=h,t[9]=D):D=t[9];let O=D,k;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(k=[],t[10]=k):k=t[10];let[A,j]=(0,Q.useState)(k),[M,N]=(0,Q.useState)(!0),[P,F]=(0,Q.useState)(null),[I,L]=(0,Q.useState)(!1),R=EP(),z=(0,Q.useRef)(null),[B,V]=(0,Q.useState)(null),[H,U]=(0,Q.useState)(0),[W,G]=(0,Q.useState)(null),[K,ee]=(0,Q.useState)(null),[te,q]=(0,Q.useState)(null),{conflicts:ne}=Ci(),[re,ie]=(0,Q.useState)(null),[ae,oe]=(0,Q.useState)(null),[se,ce]=(0,Q.useState)(!1),le=(0,Q.useRef)(se),ue;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(ue=new Set,t[11]=ue):ue=t[11];let de=(0,Q.useRef)(ue),fe=(0,Q.useRef)(A),pe=(0,Q.useRef)(x),me=(0,Q.useRef)(null),he;t[12]!==A||t[13]!==O||t[14]!==E||t[15]!==v||t[16]!==h||t[17]!==S?(he=function(e,t){let n=t===void 0?A:t,r=GJ(e,n);if(r.kind===`none`){console.debug(`[FileTree] Dropped selection for unknown docName:`,Nd(e));return}if(r.kind===`asset`){h({kind:`asset`,target:r.path,assetPath:r.path,mediaKind:r.mediaKind},{tabBehavior:`replace-active`}),iu(r.hash),v();return}if(r.kind===`folder`){O(r.path);return}let i=n.find(e=>Pl(e)&&e.docName===r.path),a=Nl(r.path,{pages:S,docExt:i?.docExt});if(a?.kind===`asset`){h(a,{tabBehavior:`replace-active`}),iu(lu(a.assetPath)),v();return}if(a?.kind===`doc`){E(a.docName);return}E(r.path,i?.size,{registerPage:Dl(r.path)})},t[12]=A,t[13]=O,t[14]=E,t[15]=v,t[16]=h,t[17]=S,t[18]=he):he=t[18];let ge=he,_e;t[19]!==v||t[20]!==h?(_e=function(e,t){h({kind:`asset`,target:e,assetPath:e,mediaKind:(t??fe.current).find(t=>Gl(t)&&t.path===e)?.mediaKind??null},{tabBehavior:`replace-active`}),iu(lu(e)),v()},t[19]=v,t[20]=h,t[21]=_e):_e=t[21];let ve=_e,ye=(0,Q.useRef)(o),be;t[22]===A?be=t[23]:(be=new Set(A.filter(Gl).map(oZ)),t[22]=A,t[23]=be);let xe=be,Se=(0,Q.useRef)(xe),Ce;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=[],t[24]=Ce):Ce=t[24];let we=(0,Q.useRef)(Ce),Te=(0,Q.useRef)(null),Ee=(0,Q.useRef)(aZ),De=(0,Q.useRef)(null),Oe=(0,Q.useRef)(null),ke=(0,Q.useRef)(!1),Ae=(0,Q.useRef)(!1),je=(0,Q.useRef)(null),Me;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(Me={row:null,root:null},t[25]=Me):Me=t[25];let Ne=(0,Q.useRef)(Me),Pe=(0,Q.useRef)(iZ),Fe=(0,Q.useRef)(null),Ie=(0,Q.useRef)(null),Le;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(Le=new Map,t[26]=Le):Le=t[26];let Re=(0,Q.useRef)(Le),ze;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ze=new Set,t[27]=ze):ze=t[27];let Be=(0,Q.useRef)(ze),Ve;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=new Map,t[28]=Ve):Ve=t[28];let He=(0,Q.useRef)(Ve),Ue=(0,Q.useRef)(0),We;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(We=new Set,t[29]=We):We=t[29];let Ge=(0,Q.useRef)(We),qe=(0,Q.useRef)(rZ),Je=(0,Q.useRef)(nZ),Ye=(0,Q.useRef)(!1),Qe=(0,Q.useRef)(!1),$e=(0,Q.useRef)(!1),et;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(et=()=>({showHiddenFiles:Ye.current,showOnlyMarkdownFiles:Qe.current,showOkFolders:$e.current}),t[30]=et):et=t[30];let tt=et,nt=(0,Q.useRef)(null),rt=(0,Q.useRef)(null),it=(0,Q.useRef)(tZ),at=(0,Q.useRef)(eZ),ot=(0,Q.useRef)($X),st=(0,Q.useRef)(QX),ct=(0,Q.useRef)(s),[ut,dt]=(0,Q.useState)(!1),ft;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ft=function(){z.current!==null&&(clearTimeout(z.current),z.current=null)},t[31]=ft):ft=t[31];let pt=ft,mt;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(mt=function(){pt(),L(!1)},t[32]=mt):mt=t[32];let gt=mt,_t;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(_t=function(e){gt(),F(e)},t[33]=_t):_t=t[33];let vt=_t,yt;t[34]===i?yt=t[35]:(yt=function(){if(pt(),SP()){F(null),L(!0),z.current=setTimeout(()=>{z.current=null,nt.current?.()},oX);return}L(!1),F(i({id:`34qyH5`}))},t[34]=i,t[35]=yt);let bt=yt,xt=(0,Q.useRef)(!0),St;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(St=()=>{if(xt.current){xt.current=!1;return}nt.current?.()},t[36]=St):St=t[36];let Ct;t[37]===R?Ct=t[38]:(Ct=[R],t[37]=R,t[38]=Ct),(0,Q.useEffect)(St,Ct);let wt,Tt;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(wt=()=>pt,Tt=[],t[39]=wt,t[40]=Tt):(wt=t[39],Tt=t[40]),(0,Q.useEffect)(wt,Tt);let Et,Dt;t[41]!==A.length||t[42]!==M?(Et=()=>{if(M||A.length===0)return;let e=rt.current?.querySelector(tz)?.shadowRoot;if(!e)return;let t=e,n=function(){je.current!==null&&clearTimeout(je.current),je.current=setTimeout(()=>{Ae.current=!1,je.current=null},0)},r=function(e){if(!(e instanceof DragEvent))return;let t=cZ(e),n=t?.dataset.itemPath;if(!n)return;let r=XJ(t.dataset.itemType===`folder`?Dd(n):n,fe.current,pe.current);r&&(je.current!==null&&(clearTimeout(je.current),je.current=null),Ae.current=!0,e.dataTransfer?.setData(cd,od(r)))},i=function(e){if(!(e instanceof DragEvent)||!wd(e))return;let t=uZ(e);if(!t){GY(Ne);return}e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect=`copy`),KY(Ne,t)},a=function(e){if(!(e instanceof DragEvent)||!wd(e))return;let n=e.relatedTarget;n instanceof Node&&t.contains(n)||GY(Ne)},o=function(e){if(!(e instanceof DragEvent)||!wd(e))return;let t=uZ(e),n=vd(e);if(!t||n.length===0){GY(Ne);return}e.preventDefault(),e.stopPropagation(),GY(Ne),Pe.current(n,t.parentDir,t.busyPath)};return e.addEventListener(`dragstart`,r,{capture:!0}),e.addEventListener(`dragover`,i,{capture:!0}),e.addEventListener(`dragleave`,a,{capture:!0}),e.addEventListener(`drop`,o,{capture:!0}),e.addEventListener(`dragend`,n,{capture:!0}),window.addEventListener(`drop`,n,!0),window.addEventListener(`dragend`,n,!0),()=>{e.removeEventListener(`dragstart`,r,{capture:!0}),e.removeEventListener(`dragover`,i,{capture:!0}),e.removeEventListener(`dragleave`,a,{capture:!0}),e.removeEventListener(`drop`,o,{capture:!0}),e.removeEventListener(`dragend`,n,{capture:!0}),window.removeEventListener(`drop`,n,!0),window.removeEventListener(`dragend`,n,!0),GY(Ne),je.current!==null&&(clearTimeout(je.current),je.current=null),Ae.current=!1}},Dt=[A.length,M],t[41]=A.length,t[42]=M,t[43]=Et,t[44]=Dt):(Et=t[43],Dt=t[44]),(0,Q.useEffect)(Et,Dt);let{selectedFilePath:Ot,selectedFolderPath:kt,navigationPath:Mt}=WJ(s,m?null:o),Nt=Ot?kd(Ot,A.find(e=>Pl(e)&&e.docName===Ot)?.docExt):kt?Dd(kt):s?.kind===`asset`?s.assetPath:null,Pt=se?null:Nt,Ft=rc().states,{dispatch:It}=Bs(),Lt;t[45]!==It||t[46]!==Ft?(Lt={installStates:Ft,isElectronHost:typeof window<`u`&&window.okDesktop!=null,dispatch:It},t[45]=It,t[46]=Ft,t[47]=Lt):Lt=t[47];let Rt=Lt,{okignoreBinding:zt,merged:Bt}=Bu(),Vt=Bt?.appearance?.sidebar?.showHiddenFiles??!1,Ht=Bt?.appearance?.sidebar?.showOnlyMarkdownFiles??!1,Ut=Bt?.appearance?.sidebar?.showOkFolders??!1,Wt;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(Wt=()=>Fe.current===null,t[48]=Wt):Wt=t[48];let Gt=Wt,Kt;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(Kt=[],t[49]=Kt):Kt=t[49];let qt;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(qt={set:`complete`,spriteSheet:tX,byFileExtension:{md:{name:ZY,viewBox:Ze},mdx:{name:ZY,viewBox:Ze}}},t[50]=qt):qt=t[50];let Jt;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(Jt={contextMenu:{enabled:!0,triggerMode:`both`,buttonVisibility:`when-needed`}},t[51]=Jt):Jt=t[51];let Yt;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(Yt={canDrag:Gt,canDrop:Gt,onDropComplete:e=>st.current(e),onDropError:ZX},t[52]=Yt):Yt=t[52];let Xt,Zt;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(Xt={canRename:Gt,onRename:e=>at.current(e),onError:e=>ot.current(e)},Zt=e=>it.current(e),t[53]=Xt,t[54]=Zt):(Xt=t[53],Zt=t[54]);let Qt;t[55]===i?Qt=t[56]:(Qt={paths:Kt,initialExpansion:`closed`,fileTreeSearchMode:`hide-non-matches`,initialVisibleRowCount:18,stickyFolders:!0,...uJ,icons:qt,unsafeCSS:lX,composition:Jt,dragAndDrop:Yt,renaming:Xt,onSelectionChange:Zt,renderRowDecoration:e=>{let{item:t}=e;if(t.kind===`file`){let e=fe.current.find(e=>Pl(e)&&kd(e.docName,e.docExt)===t.path);if(e?.isSymlink){let t=e.targetPath;return{icon:YY,title:i(t?{id:`JE21eh`,values:{targetPath:t}}:{id:`BQu9Pg`})}}return uX(t.path)?{icon:XY,title:i({id:`i9toLO`})}:null}let n=fe.current.find(e=>Wl(e)&&Dd(e.path)===Dd(t.path));if(n?.isSymlink){let e=n.targetPath;return{icon:YY,title:i(e?{id:`JE21eh`,values:{targetPath:e}}:{id:`BQu9Pg`})}}return null}},t[55]=i,t[56]=Qt);let{model:$t}=cJ(Qt),en;t[57]===$t?en=t[58]:(en=function(e){let t=$t.getItem(e)??$t.getItem(Dd(e));return t?.isDirectory()?Dd(Fd(t.getPath())):e},t[57]=$t,t[58]=en);let tn=en,nn,rn;t[59]===A?(nn=t[60],rn=t[61]):(rn=gd(A),nn=sd(rn),t[59]=A,t[60]=nn,t[61]=rn);let an=nn,sn=(0,Q.useRef)(rn),cn;t[62]!==A||t[63]!==Ut?(cn=Td(A,{includeOkFolders:Ut}),t[62]=A,t[63]=Ut,t[64]=cn):cn=t[64];let ln=cn,un=(0,Q.useRef)(ln),dn=kt?Od(Dd(kt)).slice(0,-1):Od(Pt??Mt),fn=dn.join(`\0`),pn;t[65]===$t?pn=t[66]:(pn=()=>{let e=new Set;for(let t of un.current)aY($t.getItem(t))?.isExpanded()&&e.add(t);return e},t[65]=$t,t[66]=pn);let mn=pn,hn;t[67]===mn?hn=t[68]:(hn=e=>{let t=new Set(Td(e??fe.current,{includeOkFolders:$e.current})),n=mn();for(let e of we.current)n.add(e);return[...n].filter(e=>t.has(e))},t[67]=mn,t[68]=hn);let gn=hn,_n;t[69]!==gn||t[70]!==$t?(_n=e=>{let t=gd(e??fe.current);$t.resetPaths(t,{initialExpandedPaths:gn(e)})},t[69]=gn,t[70]=$t,t[71]=_n):_n=t[71];let vn=_n,yn;t[72]!==i||t[73]!==bt?(yn=async function(e){let t=Ue.current,n=new AbortController;He.current.set(e,n);let r=await jX(Fd(e),$e.current,n.signal,i({id:`8RtNI0`}),i({id:`HlmZBk`}));if(He.current.get(e)===n&&He.current.delete(e),n.signal.aborted||t!==Ue.current)return;if(r.kind===`network-error`){bt(),console.warn(`[FileTree] lazy folder children fetch failed:`,e,r.cause);return}if(r.kind===`http-error`){console.warn(`[FileTree] lazy folder children http error:`,e,r.title),vt(r.title);return}let a=Ml(r.entries,tt());Be.current.add(e),j(t=>EY(t,e,a,Re.current)),F(null),gt(),r.truncated&&V(r.entries.length)},t[72]=i,t[73]=bt,t[74]=yn):yn=t[74];let bn=yn,xn;t[75]!==mn||t[76]!==bn?(xn=()=>{let e=mn(),t=Ge.current;Ge.current=e;for(let n of e){if(t.has(n)||Be.current.has(n)||He.current.has(n))continue;let e=Fd(n);fe.current.find(t=>Wl(t)&&t.path===e)?.hasChildren!==!1&&bn(n)}},t[75]=mn,t[76]=bn,t[77]=xn):xn=t[77];let Sn=xn,Cn;t[78]!==mn||t[79]!==bn?(Cn=()=>{for(let e of mn())Be.current.has(e)||He.current.has(e)||bn(e)},t[78]=mn,t[79]=bn,t[80]=Cn):Cn=t[80];let wn=Cn,Tn;t[81]!==$t||t[82]!==vn?(Tn=(e,t,n,r)=>{let i=r===void 0?[]:r,a=0,o=null;for(let{fromDocName:r,toDocName:i}of n){let n=e.find(e=>Pl(e)&&e.docName===r);if(n==null||$t.getItem(i)==null)continue;let s=kd(i,t.find(e=>Pl(e)&&e.docName===i)?.docExt??n.docExt);$t.move(i,s),o=s,a+=1}for(let{toPath:e}of i){let t=kl(e);if(t===``)continue;let n=e.slice(0,-t.length);$t.getItem(n)!=null&&($t.getItem(e)??$t.move(n,e),o=e,a+=1)}a!==0&&(vn(t),o!=null&&$t.focusPath(o))},t[81]=$t,t[82]=vn,t[83]=Tn):Tn=t[83];let En=Tn,Dn;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Dn=e=>{De.current=Cd(e)},t[84]=Dn):Dn=t[84];let On=Dn,kn;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(kn=e=>Se.current.has(e),t[85]=kn):kn=t[85];let An=kn,jn;t[86]!==i||t[87]!==b||t[88]!==O||t[89]!==E||t[90]!==vn?(jn=async function(e){if(e.kind===`asset`||Fe.current!==null)return;let t=()=>{G(null),Fe.current=null};Fe.current=e.path,G(e.path),F(null);try{let n=await At(await fetch(`/api/duplicate-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.path})}),i({id:`dw_dUJ`}));if(!n.ok){ul.error(n.title),vn(),t();return}let r=f(Ha,n.body,`duplicate-path`,null);if(r===null){let e=i({id:`67f-3g`});ul.error(e),F(e),Jl([`files`,`backlinks`,`graph`]),vn(),t();return}for(let e of r.duplicatedDocNames)b(e);j(t=>{let n=QP(t,e,r);return vn(n),On(n),n}),Jl([`files`,`backlinks`,`graph`]),r.path!==e.path&&(r.kind===`folder`?O(r.path):E(r.path)),ul.success(r.kind===`folder`?i({id:`iilQXA`}):i({id:`A6h5b-`}),{description:r.path}),t()}catch(e){let n=e,r=n instanceof Error?n.message:String(n);console.warn(`[FileTree] duplicate failed:`,n),ul.error(i({id:`EBVbtP`}),{description:r}),vn(),t()}},t[86]=i,t[87]=b,t[88]=O,t[89]=E,t[90]=vn,t[91]=jn):jn=t[91];let Mn=jn,Pn=(0,Q.useRef)(Mn),Fn;t[92]===Mn?Fn=t[93]:(Fn=()=>{Pn.current=Mn},t[92]=Mn,t[93]=Fn),(0,Q.useEffect)(Fn);let In=function(e){let t=HY(e);if(!t||UY(t))return!1;let n=$t.getFocusedPath()??$t.getSelectedPaths()[0]??null;if(!n||n.endsWith(`/`)||An(n))return!1;let r=UY(n);if(!r)return!1;let i=Dd(t);if(!un.current.includes(i))return!1;let a=`${t}${r}`;return sn.current.includes(a)?!1:(mr({sourcePath:n,destinationPath:a,isFolder:!1}),$t.move(n,a),!0)},Ln;t[94]===Symbol.for(`react.memo_cache_sentinel`)?(Ln=e=>{let t=e??Te.current;!t||Te.current!==t||(t.disposeCommitListener(),Te.current=null)},t[94]=Ln):Ln=t[94];let Rn=Ln,zn;t[95]!==i||t[96]!==Rn||t[97]!==l||t[98]!==c||t[99]!==vn?(zn=async function(e,t){let n=t===void 0?{}:t,r=n.updateUi??!0,a=n.restoreLocation??r;Rn(e),r&&G(e.renamePath);try{let t=await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e.kind,path:e.createdPath})});if(!t.ok&&t.status!==404){let n=e.kind,a=e.createdPath,o=await At(t,i({id:`EcM3k7`,values:{kind:n}}));if(o.ok)return;let s=o.title,c=i({id:`YPFBfr`,values:{detail:s,kind:n,createdPath:a}});r?ul.error(c):console.warn(`[FileTree] cleanup pending create failed: ${c}`),r&&(G(null),vn());return}}catch(t){if(console.warn(`[FileTree] cleanup pending create failed:`,t),r){let t=e.kind,n=e.createdPath;ul.error(i({id:`_TDESN`,values:{kind:t,createdPath:n}}))}r&&(G(null),vn());return}r&&(e.kind===`file`?l(e.createdPath):c([ht(e.createdPath)],{force:!0})),r&&j(t=>{let n=XP(t,e.kind===`file`?[e.createdPath]:[],e.kind===`folder`?e.createdPath:void 0);return On(n),n}),Jl([`files`,`backlinks`,`graph`]),a&&(window.location.hash=e.previousHash),r&&G(null)},t[95]=i,t[96]=Rn,t[97]=l,t[98]=c,t[99]=vn,t[100]=zn):zn=t[100];let Bn=zn,Vn,Hn;t[101]===Symbol.for(`react.memo_cache_sentinel`)?(Vn=()=>()=>{let e=Te.current;e&&Ee.current(e,{restoreLocation:!1,updateUi:!1}).catch(XX)},Hn=[],t[101]=Vn,t[102]=Hn):(Vn=t[101],Hn=t[102]),(0,Q.useEffect)(Vn,Hn);let Un;t[103]!==i||t[104]!==bt?(Un=()=>{let e=!0,t=null,n=vY(async function(){t?.abort();let n=new AbortController;t=n,Ue.current+=1;for(let e of He.current.values())e.abort();He.current.clear(),Be.current.clear();try{let t=await fetch(AX(``,$e.current),{signal:n.signal,headers:yY});if(bY(t)){let r=tt(),i=!1,{entries:a,truncated:o}=await CY(t,{onBatch:t=>{if(!e||n.signal.aborted)return;let a=Ml(Al(t),r);a.length!==0&&(j(e=>TY(e,a)),i||(i=!0,F(null),gt(),N(!1)))}});if(!e)return;let s=Al(a),c=Ml(s,r);j(e=>EY(e,``,c,Re.current)),F(null),gt(),V(o?a.length:null),U(s.length),Je.current()}else{let n=await At(t,i({id:`8RtNI0`}));if(!e)return;if(!n.ok)vt(n.title),V(null);else{let e=Ao.safeParse(n.body);if(!e.success)vt(i({id:`HlmZBk`})),V(null);else{let t=Al(e.data.documents),n=Ml(t,tt());j(e=>EY(e,``,n,Re.current)),F(null),gt(),V(e.data.truncated===!0?e.data.documents.length:null),U(t.length),Je.current()}}}}catch(t){let r=t;if(n.signal.aborted)return;e&&(r instanceof xY?vt(r.message):bt()),console.warn(`[FileTree] fetch failed:`,r)}e&&N(!1)},()=>t?.abort());nt.current=()=>n.request(),n.request();let r=()=>{document.visibilityState===`visible`&&n.request()};window.addEventListener(`focus`,r),window.addEventListener(`visibilitychange`,r);let a=Yl(e=>{e.includes(`files`)&&n.request()});return()=>{e=!1,nt.current=null,n.dispose();for(let e of He.current.values())e.abort();He.current.clear(),window.removeEventListener(`focus`,r),window.removeEventListener(`visibilitychange`,r),a()}},t[103]=i,t[104]=bt,t[105]=Un):Un=t[105];let Wn;t[106]===i?Wn=t[107]:(Wn=[i],t[106]=i,t[107]=Wn),(0,Q.useEffect)(Un,Wn);let Gn=(0,Q.useRef)(!0),Kn;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(Kn=()=>{if(Gn.current){Gn.current=!1;return}nt.current?.()},t[108]=Kn):Kn=t[108];let qn;t[109]!==Vt||t[110]!==Ut||t[111]!==Ht?(qn=[Vt,Ht,Ut],t[109]=Vt,t[110]=Ut,t[111]=Ht,t[112]=qn):qn=t[112],(0,Q.useEffect)(Kn,qn);let Jn,Yn;t[113]===Symbol.for(`react.memo_cache_sentinel`)?(Jn=()=>{let e=!0;return fetch(`/api/workspace`).then(async t=>{let n=await t.json();if(!e||!t.ok)return;let r=f(mo,n,`workspace`,null);r&&oe({contentDir:r.contentDir,pathSeparator:r.pathSeparator})}).catch(YX),()=>{e=!1}},Yn=[],t[113]=Jn,t[114]=Yn):(Jn=t[113],Yn=t[114]),(0,Q.useEffect)(Jn,Yn);let Xn;t[115]!==gn||t[116]!==$t||t[117]!==an?(Xn=()=>{if(De.current===an){De.current=null;return}$t.resetPaths(sn.current,{initialExpandedPaths:gn()})},t[115]=gn,t[116]=$t,t[117]=an,t[118]=Xn):Xn=t[118];let Zn;t[119]!==$t||t[120]!==an?(Zn=[$t,an],t[119]=$t,t[120]=an,t[121]=Zn):Zn=t[121],(0,Q.useEffect)(Xn,Zn),cY($t,Pt,fn,ke,an);let Qn,$n;t[122]!==$t||t[123]!==r?(Qn=()=>{if(!r)return;let e=0,t=0,n=()=>rt.current?.querySelector(`file-tree-container`)?.shadowRoot?.querySelector(`[data-file-tree-virtualized-list]`)??null,i=()=>{let e=n();if(!e)return;let t=Number.parseFloat(e.style.height);Number.isFinite(t)&&r(t)},a=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(i)},o=new MutationObserver(i),s=()=>{let e=n();e?(o.observe(e,{attributes:!0,attributeFilter:[`style`]}),i()):t=requestAnimationFrame(s)};s();let c=$t.subscribe(a);return window.addEventListener(`resize`,a),()=>{cancelAnimationFrame(e),cancelAnimationFrame(t),o.disconnect(),c(),window.removeEventListener(`resize`,a)}},$n=[r,$t],t[122]=$t,t[123]=r,t[124]=Qn,t[125]=$n):(Qn=t[124],$n=t[125]),(0,Q.useEffect)(Qn,$n);let er;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(er=()=>{ce(!1)},t[126]=er):er=t[126];let tr;t[127]===Nt?tr=t[128]:(tr=[Nt],t[127]=Nt,t[128]=tr),(0,Q.useEffect)(er,tr);let nr,rr;t[129]===se?(nr=t[130],rr=t[131]):(nr=()=>{le.current=se;for(let e of de.current)e()},rr=[se],t[129]=se,t[130]=nr,t[131]=rr),(0,Q.useEffect)(nr,rr);let ir;t[132]!==Pt||t[133]!==M||t[134]!==$t?(ir=()=>{M||!Pt||HJ($t,Pt)},t[132]=Pt,t[133]=M,t[134]=$t,t[135]=ir):ir=t[135];let ar;t[136]!==fn||t[137]!==Pt||t[138]!==M||t[139]!==$t||t[140]!==an?(ar=[Pt,fn,an,M,$t],t[136]=fn,t[137]=Pt,t[138]=M,t[139]=$t,t[140]=an,t[141]=ar):ar=t[141],(0,Q.useEffect)(ir,ar);let or,sr;t[142]===$t?(or=t[143],sr=t[144]):(or=()=>$t.subscribe(()=>{if(!$t.isSearchOpen())for(let e of we.current){let t=aY($t.getItem(e));t&&!t.isExpanded()&&t.expand()}}),sr=[$t],t[142]=$t,t[143]=or,t[144]=sr),(0,Q.useEffect)(or,sr);let cr,lr;t[145]===$t?(cr=t[146],lr=t[147]):(cr=()=>$t.subscribe(()=>qe.current()),lr=[$t],t[145]=$t,t[146]=cr,t[147]=lr),(0,Q.useEffect)(cr,lr);let ur,dr;t[148]===$t?(ur=t[149],dr=t[150]):(ur=()=>$t.onMutation(`remove`,e=>{let t=Te.current;!t||e.path!==t.renamePath||Ee.current(t)}),dr=[$t],t[148]=$t,t[149]=ur,t[150]=dr),(0,Q.useEffect)(ur,dr);let fr;t[151]!==b||t[152]!==u||t[153]!==d||t[154]!==ve||t[155]!==O||t[156]!==E||t[157]!==p||t[158]!==En||t[159]!==_?(fr=async(e,t,n,r,i)=>{let a=t===void 0?[]:t,o=n===void 0?[]:n,s=i===void 0?[]:i,c=r?.docName??ye.current,l=new Map,f=new Map;for(let e of fe.current){if(Pl(e)){let t=o.find(t=>t.fromPath===kd(e.docName,e.docExt))?.toPath;t&&l.set(e.docName,t);continue}if(Gl(e)){let t=o.find(t=>t.fromPath===e.path)?.toPath;t&&Dl(t)&&f.set(e.path,hd(t))}}let m=c?l.get(c)??null:null,h=r?.folderPath??(ct.current?.kind===`folder`?ct.current.folderPath:null),g=h?lt(h,a):null,v=r?.assetPath??(ct.current?.kind===`asset`?ct.current.assetPath:null),y=v?f.get(v)??null:null,x=m?null:y??$P(c,e),S=m??(v?y?null:o.find(e=>e.fromPath===v)?.toPath??lt(v,a):null);Ke(e);let C=[...eF(e,d(),p),...l.keys()];await Promise.all(C.map(e=>u(e)));for(let t of e)b(t.toDocName);for(let e of f.values())b(e);_(e,a,o);let w=null;j(t=>{let n=YP(t,e,a,o,s);return w=n,En(t,n,e,o),On(n),n}),h&&g&&g!==h?O(g):x&&x!==c?(E(x),WY(x)):S&&(m||S!==v)&&ve(S,w??fe.current),Jl([`files`,`backlinks`,`graph`])},t[151]=b,t[152]=u,t[153]=d,t[154]=ve,t[155]=O,t[156]=E,t[157]=p,t[158]=En,t[159]=_,t[160]=fr):fr=t[160];let pr=fr;async function mr(e){let t=!e.isFolder&&An(e.sourcePath),n=t?e.sourcePath:bd(e.sourcePath,e.isFolder);G(n),F(null);try{let r=Ol(e.sourcePath,e.destinationPath,e.isFolder),a=!e.isFolder&&!t&&!Dl(r.destinationPath),o=t||a?r.destinationPath:bd(r.destinationPath,e.isFolder),s=e.isFolder?{kind:`folder`,fromPath:Fd(n),toPath:Fd(o)}:t||a?{kind:`asset`,fromPath:n,toPath:o}:{kind:`file`,fromPath:Pd(n,fe.current),toPath:o},c={docName:ye.current,folderPath:ct.current?.kind===`folder`?ct.current.folderPath:null,assetPath:ct.current?.kind===`asset`?ct.current.assetPath:null},l=await At(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(s)}),i({id:`gijbne`}));if(!l.ok){ul.error(l.title),vn();let e=Te.current;e&&e.renamePath===n?await Bn(e):Rn(),G(null);return}let u=f(Qo,l.body,`rename-path`,{renamed:[],renamedAssets:[]});try{await pr(u.renamed,e.isFolder?[{fromPath:Fd(n),toPath:Fd(o)}]:[],u.renamedAssets,c,!e.isFolder&&!t&&!a?u.renamed.flatMap(e=>{let t=kl(o);return t?[{toDocName:e.toDocName,docExt:t}]:[]}):[])}catch(e){console.warn(`[FileTree] post-rename reconciliation failed`,{err:e,sourceTreePath:n,destinationTreePath:o,renamedCount:u.renamed.length,renamedAssetCount:u.renamedAssets.length}),ul.error(i({id:`dDpCOp`}))}Rn(),G(null)}catch(e){console.warn(`[FileTree] rename failed:`,e);let t=i({id:`HIb0vl`});ul.error(t),F(t),vn();let r=Te.current;r&&r.renamePath===n?await Bn(r):Rn(),G(null)}}let hr;t[161]!==i||t[162]!==pr||t[163]!==vn?(hr=async function(e){let t=e.draggedPaths.map(t=>{let n=xd(t,e.target);return t===n?null:{sourcePath:t,destinationTreePath:n}}).filter(JX);if(t.length!==0){G(t[0]?.sourcePath??null),F(null);try{let e=[],n=[],r=[],a={docName:ye.current,folderPath:ct.current?.kind===`folder`?ct.current.folderPath:null,assetPath:ct.current?.kind===`asset`?ct.current.assetPath:null};for(let a of t){let t=a.sourcePath.endsWith(`/`),o=!t&&An(a.sourcePath),s=o?null:Pd(a.sourcePath,fe.current),c=t?{kind:`folder`,fromPath:Fd(a.sourcePath),toPath:Fd(a.destinationTreePath)}:o?{kind:`asset`,fromPath:a.sourcePath,toPath:a.destinationTreePath}:{kind:`file`,fromPath:s??hd(a.sourcePath),toPath:s&&Dl(s)?a.destinationTreePath:hd(a.destinationTreePath)},l=await At(await fetch(`/api/rename-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(c)}),i({id:`dOHMA0`}));if(!l.ok){ul.error(l.title),vn(),G(null);return}let u=f(Qo,l.body,`rename-path:drop`,{renamed:[],renamedAssets:[]});e=e.concat(u.renamed),n=n.concat(u.renamedAssets),t&&r.push({fromPath:Fd(a.sourcePath),toPath:Fd(a.destinationTreePath)})}try{await pr(e,r,n,a)}catch(r){console.warn(`[FileTree] post-move reconciliation failed`,{err:r,operationCount:t.length,renamedCount:e.length,renamedAssetCount:n.length}),ul.error(i({id:`8OxKZy`}))}G(null)}catch(e){console.warn(`[FileTree] move failed:`,e),ul.error(i({id:`HIb0vl`})),vn(),G(null)}}},t[161]=i,t[162]=pr,t[163]=vn,t[164]=hr):hr=t[164];let gr=hr,_r;t[165]!==i||t[166]!==b||t[167]!==vn?(_r=async function(e,t,n){if(e.length===0||Fe.current!==null)return;let r=()=>{Fe.current=null,G(null)};Fe.current=n,G(n),F(null);let a=[],o=0,s=0;for(let n of e){let e=new FormData;e.append(`file`,n),Ad(e,t,n.name||`upload`);try{let r=await At(await fetch(`/api/upload`,{method:`POST`,body:e}),i({id:`4Gz2wC`}));if(!r.ok){s+=1,ul.error(r.title,{description:n.name});continue}let c=f(fo,r.body,`upload:drop`,null);if(c===null){s+=1,ul.error(i({id:`4Gz2wC`}),{description:n.name});continue}let l=fd(t,c);if(c.deduped===!0){s+=1,ul.error(i({id:`4sKwf6`}),{description:l});continue}o+=1;let u=jd(l,n);u&&a.push(u)}catch(e){let t=e;s+=1,console.warn(`[FileTree] external file upload failed:`,t),ul.error(t instanceof TypeError?i({id:`HIb0vl`}):i({id:`4Gz2wC`}),{description:n.name})}}try{if(a.length>0){for(let e of a)Pl(e)&&b(e.docName);j(e=>{let t=new Set(e.map(_d)),n=!1,r=[...e];for(let e of a){let i=_d(e);Re.current.set(i,Date.now()),!t.has(i)&&(t.add(i),r.push(e),n=!0)}return n?(vn(r),On(r),r):e})}o>0&&(Jl([`files`,`backlinks`,`graph`]),nt.current?.(),ul.success(_l._({id:`v75Em9`,values:{uploadedCount:o}}),{description:t||i({id:`RSqaSd`})})),s>0&&F(o>0?_l._({id:`yH7T4q`,values:{failedCount:s}}):i({id:`4Gz2wC`})),r()}catch(e){let t=e,n=i({id:`VcqWBy`});console.warn(`[FileTree] upload post-upload reconciliation failed:`,t),ul.error(n),F(n),r()}},t[165]=i,t[166]=b,t[167]=vn,t[168]=_r):_r=t[168];let vr=_r,yr;t[169]===Symbol.for(`react.memo_cache_sentinel`)?(yr=function(e){ie({parentDir:e})},t[169]=yr):yr=t[169];let br=yr,xr;t[170]!==i||t[171]!==b||t[172]!==Bn||t[173]!==Rn||t[174]!==$t||t[175]!==O||t[176]!==E||t[177]!==vn||t[178]!==rn?(xr=async function(e,t,n){if(Fe.current)return;let r=Te.current;r&&Rn(r);try{let r=Ed(e,t,[...rn,...un.current]);G(r.renamePath),Fe.current=r.renamePath;let a=window.location.hash,o;if(e===`file`){let e=md(`file`,r.addPath),t={path:e};n?.template&&(t.template=n.template);let a=await At(await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),i({id:`fJgQHX`}));if(!a.ok){ul.error(a.title),G(null),Fe.current=null;return}let s=hd(e),c=f(oo,a.body,`create-page`,{docName:s}).docName;o=c;let l={kind:`document`,docName:c,docExt:e.toLowerCase().endsWith(`.mdx`)?`.mdx`:`.md`,modified:new Date().toISOString(),size:0};b(c),j(e=>{if(e.some(e=>Pl(e)&&e.docName===c))return e;let t=[...e,l];return On(t),Re.current.set(_d(l),Date.now()),t}),Jl([`files`,`backlinks`,`graph`]),E(c)}else{let e=Fd(r.addPath),t=await At(await fetch(`/api/create-folder`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e})}),i({id:`K1ckLX`}));if(!t.ok){ul.error(t.title),G(null),Fe.current=null;return}o=f(qo,t.body,`create-folder`,{path:e}).path;let n={kind:`folder`,path:o,modified:new Date().toISOString(),size:0};j(e=>{if(e.some(e=>Wl(e)&&e.path===o))return e;let t=[...e,n];return On(t),Re.current.set(_d(n),Date.now()),t}),Jl([`files`]),O(o)}let s=!1,c=e=>{if(e.key!==`Enter`)return;let t=Te.current;!t||t.renamePath!==r.renamePath||queueMicrotask(()=>Rn(t))};document.addEventListener(`keydown`,c,!0),Te.current={kind:e,renamePath:r.renamePath,createdPath:o,previousHash:a,disposeCommitListener:()=>{s||(s=!0,document.removeEventListener(`keydown`,c,!0))}},G(null),Fe.current=null,$t.add(r.addPath),$t.startRenaming(r.renamePath,{removeIfCanceled:!0})}catch(e){console.warn(`[FileTree] create placeholder failed:`,e),ul.error(i({id:`S6l5dv`}));let t=Te.current;t?await Bn(t):Rn(),G(null),Fe.current=null,vn()}},t[170]=i,t[171]=b,t[172]=Bn,t[173]=Rn,t[174]=$t,t[175]=O,t[176]=E,t[177]=vn,t[178]=rn,t[179]=xr):xr=t[179];let Sr=xr,Cr;t[180]===$t?Cr=t[181]:(Cr=function(e){let t=Dd(e);(0,Q.startTransition)(()=>{for(let e of un.current)if(e===t||e.startsWith(t)){let t=aY($t.getItem(e));t&&t.expand()}})},t[180]=$t,t[181]=Cr);let wr=Cr,Tr;t[182]===$t?Tr=t[183]:(Tr=function(e){let t=Dd(e),n=new Set(we.current);(0,Q.startTransition)(()=>{for(let e of[...un.current].reverse())if((e===t||e.startsWith(t))&&!n.has(e)){let t=aY($t.getItem(e));t&&t.collapse()}})},t[182]=$t,t[183]=Tr);let Er=Tr,Dr;t[184]===Symbol.for(`react.memo_cache_sentinel`)?(Dr=function(){return((rt.current?.querySelector(`file-tree-container`)?.shadowRoot)?.querySelector(`[aria-selected="true"][data-item-path]`))?.dataset.itemPath??null},t[184]=Dr):Dr=t[184];let Or=Dr,kr;t[185]!==ge||t[186]!==dn||t[187]!==o||t[188]!==s||t[189]!==xe||t[190]!==W||t[191]!==Bn||t[192]!==Sn||t[193]!==A||t[194]!==ln||t[195]!==gr||t[196]!==mr||t[197]!==tn||t[198]!==x||t[199]!==In||t[200]!==wn||t[201]!==Vt||t[202]!==Ut||t[203]!==Ht||t[204]!==rn||t[205]!==vr?(kr=()=>{fe.current=A,pe.current=x,ye.current=o,ct.current=s,Se.current=xe,Fe.current=W,Ye.current=Vt,Qe.current=Ht,$e.current=Ut,sn.current=rn,un.current=ln,we.current=dn,qe.current=Sn,Je.current=wn,Ee.current=Bn,Pe.current=(e,t,n)=>{vr(e,t,n)},it.current=e=>{if(ke.current||Ae.current||e.length!==1)return;let t=e[0];if(t){ce(!1);let e=tn(t),n=me.current,r=n!==null&&hd(n)===hd(e),i=r?n:e;me.current=null,queueMicrotask(()=>{ge(tn((r?null:Or())??i),fe.current)})}},ot.current=e=>{In(e)||ul.error(e)},at.current=mr,st.current=gr},t[185]=ge,t[186]=dn,t[187]=o,t[188]=s,t[189]=xe,t[190]=W,t[191]=Bn,t[192]=Sn,t[193]=A,t[194]=ln,t[195]=gr,t[196]=mr,t[197]=tn,t[198]=x,t[199]=In,t[200]=wn,t[201]=Vt,t[202]=Ut,t[203]=Ht,t[204]=rn,t[205]=vr,t[206]=kr):kr=t[206],(0,Q.useLayoutEffect)(kr);let Ar,jr;t[207]===$t?(Ar=t[208],jr=t[209]):(Ar=()=>{let e=e=>{let t=(e.metaKey||e.ctrlKey)&&!e.altKey,n=e.key.toLowerCase(),r=t&&n===`a`,i=t&&!e.shiftKey&&n===`d`,a=t&&!e.shiftKey&&n===`c`,o=t&&!e.shiftKey&&n===`v`,s=!e.altKey&&!e.shiftKey&&(e.metaKey&&!e.ctrlKey&&n===`backspace`||!e.metaKey&&!e.ctrlKey&&n===`delete`);if(!r&&!i&&!a&&!o&&!s||CX(e.target))return;let c=rt.current,l=e.target,u=document.activeElement,d=l instanceof Node&&c?.contains(l),f=u instanceof Node&&c?.contains(u);if(!d&&!f)return;if(a){let t=bX($t,fe.current,Se.current);if(!t)return;Ie.current=t,e.preventDefault(),e.stopPropagation();return}if(o){let t=Ie.current;if(!t)return;Pn.current(t),e.preventDefault(),e.stopPropagation();return}if(i){let t=bX($t,fe.current,Se.current);if(!t)return;Pn.current(t),e.preventDefault(),e.stopPropagation();return}if(s){if(Fe.current!==null)return;let t=xX($t,fe.current);if(t.length===0)return;ee({targets:t}),e.preventDefault(),e.stopPropagation();return}let p=new Set([...un.current,...sn.current]);ke.current=!0;for(let e of p)e&&$t.getItem(e)?.select();queueMicrotask(()=>{ke.current=!1}),e.preventDefault(),e.stopPropagation()};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},jr=[$t],t[207]=$t,t[208]=Ar,t[209]=jr),(0,Q.useEffect)(Ar,jr);let Mr,Nr;t[210]!==A.length||t[211]!==M?(Mr=()=>{if(M||A.length===0)return;let e=rt.current?.querySelector(tz)?.shadowRoot;if(!e)return;let t=qX,n=()=>{for(let n of e.querySelectorAll(`[data-item-path]`)){let e=n.dataset.itemPath;if(!e)continue;let r=t(e);n.title!==r&&(n.title=r)}let n=e.querySelector(`[data-type="context-menu-anchor"]`);if(n){let r=e.querySelector(`[data-item-context-hover="true"][data-item-path]`)?.dataset.itemPath,i=r?t(r):``;n.title!==i&&(n.title=i)}};n();let r=new MutationObserver(n);return r.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`,`data-item-context-hover`]}),()=>r.disconnect()},Nr=[M,A.length],t[210]=A.length,t[211]=M,t[212]=Mr,t[213]=Nr):(Mr=t[212],Nr=t[213]),(0,Q.useEffect)(Mr,Nr);let Pr,Fr;t[214]!==A.length||t[215]!==M?(Pr=()=>{if(M||A.length===0)return;let e=rt.current?.querySelector(tz)?.shadowRoot;if(!e)return;let t=()=>yJ(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},Fr=[M,A.length],t[214]=A.length,t[215]=M,t[216]=Pr,t[217]=Fr):(Pr=t[216],Fr=t[217]),(0,Q.useEffect)(Pr,Fr);let Ir,Lr;t[218]!==A.length||t[219]!==M?(Ir=()=>{if(M||A.length===0)return;let e=rt.current?.querySelector(tz)?.shadowRoot;if(!e)return;let t=()=>LJ(e);t();let n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-item-path`]}),()=>n.disconnect()},Lr=[M,A.length],t[218]=A.length,t[219]=M,t[220]=Ir,t[221]=Lr):(Ir=t[220],Lr=t[221]),(0,Q.useEffect)(Ir,Lr);let Rr;t[222]===Symbol.for(`react.memo_cache_sentinel`)?(Rr={folderCount:0,expandedCount:0},t[222]=Rr):Rr=t[222];let zr=(0,Q.useRef)(Rr),Br=(0,Q.useRef)(Sr),Vr=(0,Q.useRef)(br),Hr;t[223]===Sr?Hr=t[224]:(Hr=()=>{Br.current=Sr,Vr.current=br},t[223]=Sr,t[224]=Hr),(0,Q.useEffect)(Hr);let Ur,Wr;t[225]===$t?(Ur=t[226],Wr=t[227]):(Ur=()=>({startCreating(e,t){Br.current(e,t)},startCreatingFromTemplate(e){Vr.current(e)},createFromTemplate(e,t){Br.current(`file`,e,{template:t})},expandAll(){(0,Q.startTransition)(()=>{for(let e of un.current){let t=aY($t.getItem(e));t&&t.expand()}})},collapseAll(){let e=new Set(we.current);(0,Q.startTransition)(()=>{for(let t of[...un.current].reverse()){if(e.has(t))continue;let n=aY($t.getItem(t));n&&n.collapse()}})},getFolderState(){let e=un.current,t=0;for(let n of e)aY($t.getItem(n))?.isExpanded()&&t++;let n=e.length,r=zr.current;if(r.folderCount===n&&r.expandedCount===t)return r;let i={folderCount:n,expandedCount:t};return zr.current=i,i},isCreationTargetCleared(){return le.current},clearCreationTarget(){ce(!0)},subscribe(e){de.current.add(e);let t=$t.subscribe(e);return()=>{de.current.delete(e),t()}}}),Wr=[$t],t[225]=$t,t[226]=Ur,t[227]=Wr),(0,Q.useImperativeHandle)(n,Ur,Wr);let Gr;t[228]!==Rn||t[229]!==u||t[230]!==c||t[231]!==$t?(Gr=async function(e,t,n){let r=wX(e,fe.current,un.current),i=Te.current;i&&e.some(e=>TX(e,i))&&(i.kind===`file`?r.docNames.add(i.createdPath):r.folderPaths.add(i.createdPath),Rn(i));let a=new Set([...r.docNames,...t]),o=new Set([...r.folderPaths,...n]),s=new Set([...r.assetPaths,...e.filter(KX).map(GX)]);c([...[...a].map(WX),...[...o].map(UX),...[...s].map(HX)],{force:!0}),await Promise.all([...a].map(e=>u(e)));for(let t of e){let e=t.kind===`folder`?Dd(t.path):t.kind===`asset`?t.path:kd(t.path,t.docExt);$t.getItem(e)&&$t.remove(e,t.kind===`folder`?{recursive:!0}:void 0)}j(e=>{let t=XP(e,[...a],void 0,[...s]);for(let e of o)t=XP(t,[],e);return On(t),t}),Jl([`files`,`backlinks`,`graph`])},t[228]=Rn,t[229]=u,t[230]=c,t[231]=$t,t[232]=Gr):Gr=t[232];let Kr=Gr,qr;t[233]!==i||t[234]!==Kr?(qr=async function(e){let t=[],n=[],r=[];for(let a of e){let e=a.kind;G(a.path);let o=await At(await fetch(`/api/delete-path`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e,path:a.path})}),i({id:`7JtSLi`}));if(!o.ok)return r.length>0&&await Kr(r,t,n),ul.error(o.title),!1;let s=f(Ka,o.body,`delete-path`,{deletedDocNames:[]});t.push(...s.deletedDocNames),e===`folder`&&n.push(a.path),r.push(a)}return await Kr(r,t,n),!0},t[233]=i,t[234]=Kr,t[235]=qr):qr=t[235];let Jr=qr,Yr;t[236]===Symbol.for(`react.memo_cache_sentinel`)?(Yr=async function(e,t,n){let r=[],i=[];for(let a of e){G(a.path);let e=tF(a,n),o=await t.shell.trashItem(e);o.ok?r.push(a):i.push({kind:a.kind,path:a.path,name:a.name,reason:QJ(o.reason),detail:o.detail})}return{trashed:r,failed:i}},t[236]=Yr):Yr=t[236];let Xr=Yr,Zr;t[237]===i?Zr=t[238]:(Zr=async function(e){let t=[],n=[],r=[];for(let a of e){let e=a.kind;try{let o=await At(await fetch(`/api/trash/cleanup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({kind:e,path:a.path})}),i({id:`DVh_Tb`}));if(!o.ok){console.warn(`[FileTree] trash-cleanup failed`,{target:`${a.kind}:${a.path}`,reason:o.title}),r.push({target:a,reason:o.title});continue}let s=f(ha,o.body,`trash-cleanup`,{deletedDocNames:[]});t.push(...s.deletedDocNames),e===`folder`&&n.push(a.path)}catch(e){let t=e;console.warn(`[FileTree] trash-cleanup threw`,{target:`${a.kind}:${a.path}`,err:t}),r.push({target:a,reason:i({id:`r4R7AZ`})})}}if(r.length>0){let e=r.length;ul.error(i({id:`IrB5AK`,values:{failedCount:e}}),{description:i({id:`vEJDlt`})})}return r.length===e.length&&e.length>0?null:{deletedDocNames:t,deletedFolderPaths:n}},t[237]=i,t[238]=Zr);let Qr=Zr,$r;t[239]!==i||t[240]!==ne||t[241]!==Kr||t[242]!==Jr||t[243]!==Qr||t[244]!==vn||t[245]!==ae?($r=async function(e){let t=e.filter(VX).map(e=>ZP(e,fe.current)),n=t[0];if(!n)return;let r=ne.filter(e=>t.some(t=>{if(t.kind===`file`){let n=`${t.path}${t.docExt??`.md`}`;return e.file===n}return t.kind===`folder`?e.file.startsWith(`${t.path}/`):!1}));if(r.length>0){let e=r.slice(0,3).map(BX),t=r.length>e.length?`, +${r.length-e.length} more`:``;ul.error(`Cannot delete files with unresolved conflicts`,{description:`Resolve the conflict on ${e.join(`, `)}${t} before deleting.`});return}G(n.path),ee(null);let a=typeof window<`u`?window.okDesktop:void 0;try{if(a&&ae){let{trashed:e,failed:n}=await Xr(t,a,ae);if(e.length>0){let t=await Qr(e);t?await Kr(e,t.deletedDocNames,t.deletedFolderPaths):await Kr(e,e.filter(zX).map(RX),e.filter(LX).map(IX))}n.length>0&&q({failed:n,originalTargets:[...t]}),G(null)}else{let e=await Jr(t);G(null),e||vn()}}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] delete failed:`,t),ul.error(i({id:`0eHrMb`}),{description:n}),G(null),vn()}},t[239]=i,t[240]=ne,t[241]=Kr,t[242]=Jr,t[243]=Qr,t[244]=vn,t[245]=ae,t[246]=$r):$r=t[246];let ei=$r,ti;t[247]!==i||t[248]!==Jr||t[249]!==vn||t[250]!==te?(ti=async function(){if(!te)return;let e=new Set(te.failed.map(FX)),t=te.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));if(q(null),t.length!==0){G(t[0]?.path??null);try{let e=await Jr(t);G(null),e||vn()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);console.warn(`[FileTree] hard-delete fallback failed:`,t),ul.error(i({id:`0eHrMb`}),{description:n}),G(null),vn()}}},t[247]=i,t[248]=Jr,t[249]=vn,t[250]=te,t[251]=ti):ti=t[251];let ni=ti,ri;t[252]!==ei||t[253]!==te?(ri=async function(){if(!te)return;let e=new Set(te.failed.map(PX)),t=te.originalTargets.filter(t=>e.has(`${t.kind}:${t.path}`));q(null),await ei(t)},t[252]=ei,t[253]=te,t[254]=ri):ri=t[254];let ii=ri,ai=(0,Q.useRef)(ei),oi;t[255]===ei?oi=t[256]:(oi=()=>{ai.current=ei},t[255]=ei,t[256]=oi),(0,Q.useEffect)(oi);let si,ci;t[257]===Symbol.for(`react.memo_cache_sentinel`)?(si=()=>pY(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=fe.current.find(e=>Pl(e)&&e.docName===t);ai.current([{kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt}]);return}if(e.kind===`folder`){ai.current([{kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath}]);return}if(e.kind===`asset`){ai.current([{kind:`asset`,path:e.assetPath,name:e.assetPath.split(`/`).pop()??e.assetPath}]);return}console.warn(JSON.stringify({event:`file-tree-menu-action-delete-unsupported-kind`,kind:e.kind}))}),ci=[],t[257]=si,t[258]=ci):(si=t[257],ci=t[258]),(0,Q.useEffect)(si,ci);let li,ui;t[259]===Symbol.for(`react.memo_cache_sentinel`)?(li=()=>_Y(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=fe.current.find(e=>Pl(e)&&e.docName===t);Pn.current({kind:`file`,path:t,name:t.split(`/`).pop()??t,docExt:n?.docExt});return}if(e.kind===`folder`){Pn.current({kind:`folder`,path:e.folderPath,name:e.folderPath.split(`/`).pop()??e.folderPath});return}console.warn(JSON.stringify({event:`file-tree-menu-action-duplicate-unsupported-kind`,kind:e.kind}))}),ui=[],t[259]=li,t[260]=ui):(li=t[259],ui=t[260]),(0,Q.useEffect)(li,ui);let di,fi;t[261]===$t?(di=t[262],fi=t[263]):(di=()=>hY(e=>{if(e.kind===`doc`||e.kind===`folder-index`){let t=e.docName,n=kd(t,fe.current.find(e=>Pl(e)&&e.docName===t)?.docExt);$t.startRenaming(n);return}if(e.kind===`folder`){$t.startRenaming(e.folderPath);return}if(e.kind===`asset`){$t.startRenaming(e.assetPath);return}console.warn(JSON.stringify({event:`file-tree-menu-action-rename-unsupported-kind`,kind:e.kind}))}),fi=[$t],t[261]=$t,t[262]=di,t[263]=fi),(0,Q.useEffect)(di,fi);let pi;t[264]===Symbol.for(`react.memo_cache_sentinel`)?(pi=function(){let e=Oe.current;e&&BY(e),Oe.current=null},t[264]=pi):pi=t[264];let mi=pi,hi;t[265]===Symbol.for(`react.memo_cache_sentinel`)?(hi=function(e){let t=mX(e);if(!t)return!1;let n=rt.current?.querySelector(tz)?.shadowRoot;if(!n)return!1;for(let e of n.querySelectorAll(`[data-item-path]`))if(e.dataset.itemPath===t)return!0;return!1},t[265]=hi):hi=t[265];let gi=hi,_i;t[266]===g?_i=t[267]:(_i=function(e){let t=sZ(e.nativeEvent);if(!t||t.endsWith(`/`)){mi();return}let n=fe.current.find(e=>_d(e)===t);if(n&&Gl(n)){mi();return}let r=n&&Pl(n)?n.docName:Pd(t,fe.current);if(n&&Pl(n)&&ko(n.size)){mi();return}Oe.current!==r&&(mi(),Oe.current=r,zY(r,e=>g(e)))},t[266]=g,t[267]=_i);let vi=_i,yi;t[268]!==ge||t[269]!==$t||t[270]!==O||t[271]!==E?(yi=function(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=cZ(e.nativeEvent);if(!t){dZ(e.nativeEvent)&&ce(!0);return}let n=t.getAttribute(`aria-selected`)===`true`,r=t.dataset.itemPath;if(!r)return;let i=t.dataset.itemType===`folder`?Dd(r):r;if(t.dataset.itemType===`folder`){let t=Fd(i),r=aY($t.getItem(i));if(!n){e.preventDefault(),e.stopPropagation(),r&&!r.isExpanded()&&r.expand(),queueMicrotask(()=>O(t));return}if($t.getSelectedPaths().length!==1||window.location.hash===ru(t))return;e.preventDefault(),e.stopPropagation(),r&&!r.isExpanded()&&r.expand(),queueMicrotask(()=>O(t));return}if(!n){if(hX(i,sn.current)||gi(i)){me.current=i,setTimeout(()=>E(i,void 0,{registerPage:!0}),0);return}queueMicrotask(()=>ge(i));return}let a=Pd(i,fe.current);$t.getSelectedPaths().length===1&&window.location.hash!==du(a)&&queueMicrotask(()=>ge(i))},t[268]=ge,t[269]=$t,t[270]=O,t[271]=E,t[272]=yi):yi=t[272];let bi=yi,xi;t[273]===Symbol.for(`react.memo_cache_sentinel`)?(xi=function(e){wd(e.nativeEvent)&&(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`,dt(!0))},t[273]=xi):xi=t[273];let Si=xi,wi;t[274]===Symbol.for(`react.memo_cache_sentinel`)?(wi=function(e){let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||dt(!1)},t[274]=wi):wi=t[274];let Ti=wi,Ei;t[275]===vr?Ei=t[276]:(Ei=function(e){if(!wd(e.nativeEvent))return;let t=vd(e.nativeEvent);t.length!==0&&(e.preventDefault(),e.stopPropagation(),dt(!1),vr(t,``,aX))},t[275]=vr,t[276]=Ei);let Di=Ei;if(M){let e;return t[277]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(pZ,{}),t[277]=e):e=t[277],e}let Oi;t[278]!==i||t[279]!==I||t[280]!==R?(Oi=I?i(R?{id:`H-vDm3`}:{id:`09Tv5j`}):null,t[278]=i,t[279]=I,t[280]=R,t[281]=Oi):Oi=t[281];let ki=Oi;if(A.length===0){if(ki!==null){let e;return t[282]===ki?e=t[283]:(e=(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,Z.jsx)(`span`,{role:`status`,className:`select-none text-sidebar-foreground/50 text-sm`,children:ki})}),t[282]=ki,t[283]=e),e}if(P){let e;return t[284]===P?e=t[285]:(e=(0,Z.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-8`,children:(0,Z.jsx)(`span`,{role:`alert`,className:`select-none text-sidebar-foreground/50 text-sm`,children:P})}),t[284]=P,t[285]=e),e}if(Il({visibility:{showHiddenFiles:Vt,showOnlyMarkdownFiles:Ht},unfilteredRootEntryCount:H,knownPageCount:S.size})===`filtered-to-zero`){let e;return t[286]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(lJ,{}),t[286]=e):e=t[286],e}let e;t[287]===i?e=t[288]:(e=i({id:`5ZB7XC`}),t[287]=i,t[288]=e);let n=ut&&`bg-primary/5 ring-2 ring-primary/70 ring-inset`,r;t[289]===n?r=t[290]:(r=X(`flex flex-1 flex-col items-center justify-center gap-3 rounded-md py-8`,n),t[289]=n,t[290]=r);let a;t[291]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(`span`,{className:`select-none text-sidebar-foreground/30 text-sm`,children:(0,Z.jsx)(J,{id:`xiv-dW`})}),t[291]=a):a=t[291];let o;t[292]===Sr?o=t[293]:(o=()=>Sr(`file`,``),t[292]=Sr,t[293]=o);let s;t[294]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(J,{id:`6ibbCg`}),t[294]=s):s=t[294];let c;t[295]===o?c=t[296]:(c=(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`font-mono uppercase`,onClick:o,children:s}),t[295]=o,t[296]=c);let l;return t[297]!==Di||t[298]!==e||t[299]!==r||t[300]!==c?(l=(0,Z.jsxs)(`section`,{"aria-label":e,className:r,onDragOver:Si,onDragLeave:Ti,onDrop:Di,children:[a,c]}),t[297]=Di,t[298]=e,t[299]=r,t[300]=c,t[301]=l):l=t[301],l}let Ai=W!==null,ji=K?.targets[0]??null,Mi=null;if(B!==null){let e;if(t[302]!==a.locale||t[303]!==B){let n=new Intl.NumberFormat(a.locale).format(B);e=_l._({id:`LuoJWu`,values:{truncatedShownCount:B,formattedCount:n}}),t[302]=a.locale,t[303]=B,t[304]=e}else e=t[304];Mi=e}let Ni;t[305]!==P||t[306]!==ki||t[307]!==Mi?(Ni=(P||ki!==null||Mi!==null)&&(0,Z.jsxs)(Z.Fragment,{children:[ki===null?P&&(0,Z.jsx)(hZ,{kind:`error`,children:P}):(0,Z.jsx)(hZ,{kind:`reconnecting`,children:ki}),Mi!==null&&(0,Z.jsx)(hZ,{kind:`info`,children:Mi})]}),t[305]=P,t[306]=ki,t[307]=Mi,t[308]=Ni):Ni=t[308];let Pi;t[309]===y?Pi=t[310]:(Pi=mJ(y),t[309]=y,t[310]=Pi);let Fi=se?``:void 0,Ii;t[311]===Fi?Ii=t[312]:(Ii={[cX]:Fi},t[311]=Fi,t[312]=Ii);let Li;t[313]!==Ai||t[314]!==xe||t[315]!==Er||t[316]!==A||t[317]!==wr||t[318]!==ln||t[319]!==Mn||t[320]!==Rt||t[321]!==$t||t[322]!==zt||t[323]!==Sr||t[324]!==ae?(Li=(e,t)=>(0,Z.jsx)(EX,{item:e,context:t,anyActionBusy:Ai,workspace:ae,handoff:Rt,model:$t,okignoreBinding:zt,onStartCreating:Sr,onCreateFromTemplate:(e,t)=>Sr(`file`,e,{template:t}),onDuplicate:Mn,onDelete:e=>ee({targets:e}),onExpandSubtree:wr,onCollapseSubtree:Er,folderTreePaths:ln,isAsset:xe.has(e.path),documents:A}),t[313]=Ai,t[314]=xe,t[315]=Er,t[316]=A,t[317]=wr,t[318]=ln,t[319]=Mn,t[320]=Rt,t[321]=$t,t[322]=zt,t[323]=Sr,t[324]=ae,t[325]=Li):Li=t[325];let Ri;t[326]!==bi||t[327]!==vi||t[328]!==$t||t[329]!==Ni||t[330]!==Pi||t[331]!==Ii||t[332]!==Li?(Ri=(0,Z.jsx)(`div`,{ref:rt,className:`flex min-h-0 flex-1 flex-col`,children:(0,Z.jsx)(sJ,{header:Ni,model:$t,style:Pi,...Ii,onClickCapture:bi,onMouseMove:vi,onMouseLeave:mi,renderContextMenu:Li})}),t[326]=bi,t[327]=vi,t[328]=$t,t[329]=Ni,t[330]=Pi,t[331]=Ii,t[332]=Li,t[333]=Ri):Ri=t[333];let zi=!!K,Bi;t[334]===W?Bi=t[335]:(Bi=e=>{!e&&!W&&ee(null)},t[334]=W,t[335]=Bi);let Vi;t[336]!==i||t[337]!==W||t[338]!==K||t[339]!==ei||t[340]!==ji?(Vi=K&&ji&&(0,Z.jsx)(nc,{...(()=>{let e=JJ(typeof window<`u`&&window.okDesktop!=null?`electron`:`web`,K.targets);if(e)return{customTitle:e.title,customDescription:``,customDetail:e.detail,customConfirmLabel:e.confirmLabel,customConfirmLabelBusy:e.confirmLabelBusy,children:e.listedTargets?(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1 font-mono text-foreground text-xs`,children:e.listedTargets.map(NX)}):null};let t=K.targets.length,n=ji.name;return{itemName:t===1?ji.kind===`folder`?`${ji.name}/`:ji.kind===`file`?`${ji.name}${ji.docExt??`.md`}`:ji.name:void 0,customTitle:t>1?i({id:`abiHje`}):void 0,customDescription:t>1?i({id:`WMIKXK`,values:{targetCount:t}}):ji.kind===`folder`?i({id:`a5W0q0`,values:{folderName:n}}):void 0}})(),isSubmitting:W!==null,onDelete:()=>ei(K.targets)}),t[336]=i,t[337]=W,t[338]=K,t[339]=ei,t[340]=ji,t[341]=Vi):Vi=t[341];let Hi;t[342]!==zi||t[343]!==Bi||t[344]!==Vi?(Hi=(0,Z.jsx)(Nn,{open:zi,onOpenChange:Bi,children:Vi}),t[342]=zi,t[343]=Bi,t[344]=Vi,t[345]=Hi):Hi=t[345];let Ui=!!te,Wi;t[346]===W?Wi=t[347]:(Wi=e=>{!e&&!W&&q(null)},t[346]=W,t[347]=Wi);let Gi;t[348]!==W||t[349]!==ni||t[350]!==ii||t[351]!==te?(Gi=te&&(0,Z.jsx)(nY,{failedTargets:te.failed,isSubmitting:W!==null,onDeletePermanently:ni,onRetry:ii,onCancel:()=>q(null)}),t[348]=W,t[349]=ni,t[350]=ii,t[351]=te,t[352]=Gi):Gi=t[352];let Ki;t[353]!==Ui||t[354]!==Wi||t[355]!==Gi?(Ki=(0,Z.jsx)(Nn,{open:Ui,onOpenChange:Wi,children:Gi}),t[353]=Ui,t[354]=Wi,t[355]=Gi,t[356]=Ki):Ki=t[356];let qi=re!==null,Ji;t[357]===Symbol.for(`react.memo_cache_sentinel`)?(Ji=e=>{e||ie(null)},t[357]=Ji):Ji=t[357];let Yi=re?.parentDir??``,Xi;t[358]!==qi||t[359]!==Yi?(Xi=(0,Z.jsx)(Wg,{open:qi,onOpenChange:Ji,kind:`file`,initialDir:Yi,defaultToTemplate:!0}),t[358]=qi,t[359]=Yi,t[360]=Xi):Xi=t[360];let Zi;return t[361]!==Ri||t[362]!==Hi||t[363]!==Ki||t[364]!==Xi?(Zi=(0,Z.jsxs)(Z.Fragment,{children:[Ri,Hi,Ki,Xi]}),t[361]=Ri,t[362]=Hi,t[363]=Ki,t[364]=Xi,t[365]=Zi):Zi=t[365],Zi}function NX(e){return(0,Z.jsx)(`li`,{"data-testid":`delete-target-row`,children:YJ(e)},`${e.kind}:${e.path}`)}function PX(e){return`${e.kind}:${e.path}`}function FX(e){return`${e.kind}:${e.path}`}function IX(e){return e.path}function LX(e){return e.kind===`folder`}function RX(e){return e.path}function zX(e){return e.kind===`file`}function BX(e){return e.file}function VX(e){return!Ul(e.path)}function HX(e){return H(e)}function UX(e){return ht(e)}function WX(e){return o(e)}function GX(e){return e.path}function KX(e){return e.kind===`asset`}function qX(e){return e.endsWith(`/`)?e.slice(0,-1):e}function JX(e){return!!e}function YX(e){console.warn(`[FileTree] /api/workspace fetch failed:`,e)}function XX(e){console.warn(`[FileTree] unmount cleanup failed:`,e)}function ZX(e){ul.error(e)}function QX(){}function $X(e){return ul.error(e)}function eZ(){}function tZ(){}function nZ(){}function rZ(){}function iZ(){}async function aZ(){}function oZ(e){return _d(e)}function sZ(e){return cZ(e)?.dataset.itemPath??null}function cZ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.dataset.itemPath)return t;return null}function lZ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.matches(`[data-file-tree-virtualized-root]`))return t;return null}function uZ(e){let t=cZ(e);if(t){let e=t.dataset.itemPath;if(!e)return null;let n=t.dataset.itemType===`folder`,r=yd(e,n);return{parentDir:r,row:t,root:null,busyPath:n?Dd(r):e}}return dZ(e)?{parentDir:``,row:null,root:lZ(e),busyPath:aX}:null}function dZ(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.matches(`[data-file-tree-virtualized-scroll]`))return!0;return!1}var fZ=[`w-3/4`,`w-2/3`,`w-4/5`,`w-1/2`,`w-3/5`,`w-2/3`];function pZ(){let e=(0,$.c)(5),{_:t}=jt(),n;e[0]===t?n=e[1]:(n=t({id:`5Tk8Fb`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=fZ.map(mZ),e[2]=r):r=e[2];let i;return e[3]===n?i=e[4]:(i=(0,Z.jsx)(`div`,{className:`flex flex-1 flex-col gap-1 px-2 py-2`,role:`status`,"aria-busy":`true`,"aria-label":n,children:r}),e[3]=n,e[4]=i),i}function mZ(e,t){return(0,Z.jsxs)(`div`,{className:`flex h-6 items-center gap-2`,children:[(0,Z.jsx)(xl,{className:`h-3 w-3 shrink-0 rounded-sm`}),(0,Z.jsx)(xl,{className:`h-3 ${e}`})]},t)}function hZ(e){let t=(0,$.c)(14),{kind:n,children:r}=e,i=n===`error`?Gc:n===`reconnecting`?Uc:Rc,a=n===`error`?`alert`:`status`,o=n===`error`?`text-destructive`:`text-muted-foreground`,s;t[0]===o?s=t[1]:(s=X(`mx-2 mb-1 flex items-start gap-1.5 rounded-md bg-muted/50 px-2 py-1.5 text-xs leading-snug`,o),t[0]=o,t[1]=s);let c=n===`reconnecting`&&`animate-spin motion-reduce:animate-none`,l;t[2]===c?l=t[3]:(l=X(`mt-0.5 size-3.5 shrink-0`,c),t[2]=c,t[3]=l);let u;t[4]!==i||t[5]!==l?(u=(0,Z.jsx)(i,{"aria-hidden":`true`,className:l}),t[4]=i,t[5]=l,t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=(0,Z.jsx)(`span`,{className:`min-w-0`,children:r}),t[7]=r,t[8]=d);let f;return t[9]!==a||t[10]!==s||t[11]!==u||t[12]!==d?(f=(0,Z.jsxs)(`span`,{role:a,className:s,children:[u,d]}),t[9]=a,t[10]=s,t[11]=u,t[12]=d,t[13]=f):f=t[13],f}function gZ(e){return e?_l._({id:`wTcjov`}):null}function _Z(e){let t=(0,$.c)(23),{_:n}=jt(),r=gc(),i=Ys();if(r)return null;let{input:a,installStates:o,dispatch:s}=e,c=a===null,l,u,d,f,p,m;if(t[0]!==n||t[1]!==s||t[2]!==a||t[3]!==c||t[4]!==o||t[5]!==i){m=Symbol.for(`react.early_return_sentinel`);bb0:{let e=gZ(c),r;t[12]===o?r=t[13]:(r=e=>o[e.id]?.installed===!0,t[12]=o,t[13]=r);let h=Us.filter(r),g=h.length>0,_=i!==null;if(!g&&!_){m=null;break bb0}let v=i?$s(i.installedClis):[];u=uF,t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsxs)(pF,{children:[(0,Z.jsx)(pc,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`O7_W_a`})]}),t[14]=p):p=t[14],l=mF,d=_?(0,Z.jsxs)(lF,{"aria-label":n({id:`ALhMYW`}),children:[(0,Z.jsx)(gF,{children:(0,Z.jsx)(J,{id:`ALhMYW`})}),v.map(t=>{let{displayName:r}=Pa[t];return(0,Z.jsxs)(fF,{onSelect:()=>{a!==null&&i.launchInTerminal(a,t)},disabled:c,"data-testid":`empty-space-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,Z.jsx)(oc,{id:qs(t),"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,f=g?(0,Z.jsxs)(Z.Fragment,{children:[_?(0,Z.jsx)(_F,{}):null,(0,Z.jsxs)(lF,{"aria-label":n({id:`BBqGS9`}),children:[(0,Z.jsx)(gF,{children:(0,Z.jsx)(J,{id:`BBqGS9`})}),h.map(t=>{let r=!c,{displayName:i}=t,o=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Z.jsxs)(fF,{disabled:!r,onSelect:()=>{a&&s(t.id,a)},"data-testid":`empty-space-open-in-${t.id}`,"aria-label":o,children:[(0,Z.jsx)(oc,{id:t.id,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null}t[0]=n,t[1]=s,t[2]=a,t[3]=c,t[4]=o,t[5]=i,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m}else l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let h;t[15]!==l||t[16]!==d||t[17]!==f?(h=(0,Z.jsxs)(l,{children:[d,f]}),t[15]=l,t[16]=d,t[17]=f,t[18]=h):h=t[18];let g;return t[19]!==u||t[20]!==p||t[21]!==h?(g=(0,Z.jsxs)(u,{children:[p,h]}),t[19]=u,t[20]=p,t[21]=h,t[22]=g):g=t[22],g}async function vZ(e){try{let t=await e.project.listRecent(),n=e.config.projectPath;if(t.some(e=>e.path!==n))return null;let r=await UT();return e.config.freshlyCreated?r:r===0?0:null}catch(e){return console.warn(`[onboarding-card-visible] fresh-project probe failed; suppressing card`,e),null}}function yZ(e){let t=(0,$.c)(4),n=e===void 0?zT:e,{initialized:r,dismissed:i,completed:a}=(0,Q.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot),o=i||a,s=!r&&!o,c,l;return t[0]!==s||t[1]!==n?(c=()=>{if(!s)return;let e=window.okDesktop;if(e==null)return;let t=!1;return vZ(e).then(e=>{!t&&e!==null&&n.activate(e)}),()=>{t=!0}},l=[s,n],t[0]=s,t[1]=n,t[2]=c,t[3]=l):(c=t[2],l=t[3]),(0,Q.useEffect)(c,l),r&&!o}function bZ(e){let t=(0,$.c)(3),n=e===void 0?zT:e,r,i;t[0]===n?(r=t[1],i=t[2]):(r=()=>{if(n.getSnapshot().steps.file)return;let e=Yl(e=>{e.includes(`files`)&&WT(n)});return WT(n),e},i=[n],t[0]=n,t[1]=r,t[2]=i),(0,Q.useEffect)(r,i)}var xZ=3,SZ=5200,CZ=1500,wZ=220;function TZ(e){let t=(0,$.c)(14),{complete:n,label:r,shortcutId:i}=e,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(pr,{checked:n,disabled:!0,"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none opacity-100 disabled:opacity-100`}),t[0]=n,t[1]=a);let o=n?`flex-1 text-muted-foreground/60`:`flex-1`,s;t[2]===n?s=t[3]:(s=n?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[(0,Z.jsx)(J,{id:`Qj4RL5`}),` `]}):null,t[2]=n,t[3]=s);let c;t[4]!==r||t[5]!==o||t[6]!==s?(c=(0,Z.jsxs)(`span`,{className:o,children:[s,r]}),t[4]=r,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===i?l=t[9]:(l=i?(0,Z.jsx)(Re,{children:wl(i)}):null,t[8]=i,t[9]=l);let u;return t[10]!==a||t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`li`,{className:`flex items-center gap-2 py-0.5 text-sm`,children:[a,c,l]}),t[10]=a,t[11]=c,t[12]=l,t[13]=u):u=t[13],u}function EZ(e){let t=(0,$.c)(24),{store:n,lingerMs:r}=e,i=n===void 0?zT:n,a=r===void 0?SZ:r,{_:o}=jt(),{steps:s}=BT(i);bZ(i);let[c,l]=(0,Q.useState)(0),[u,d]=(0,Q.useState)(!1),f=1+ +!!s.file+ +!!s.askedAi,p=f===xZ,m,h;t[0]!==p||t[1]!==a?(m=()=>{if(!p)return;l(OZ);let e=setInterval(()=>l(DZ),CZ),t=setTimeout(()=>{clearInterval(e),d(!0)},a);return()=>{clearInterval(e),clearTimeout(t)}},h=[p,a],t[0]=p,t[1]=a,t[2]=m,t[3]=h):(m=t[2],h=t[3]),(0,Q.useEffect)(m,h);let g,_;t[4]!==u||t[5]!==i?(g=()=>{if(!u)return;let e=setTimeout(()=>i.markCompleted(),wZ);return()=>clearTimeout(e)},_=[u,i],t[4]=u,t[5]=i,t[6]=g,t[7]=_):(g=t[6],_=t[7]),(0,Q.useEffect)(g,_);let v;t[8]!==o||t[9]!==p?(v=p?o({id:`7jIIFX`}):``,t[8]=o,t[9]=p,t[10]=v):v=t[10];let y;t[11]===v?y=t[12]:(y=(0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:v}),t[11]=v,t[12]=y);let b;t[13]!==p||t[14]!==c||t[15]!==f||t[16]!==u||t[17]!==s.askedAi||t[18]!==s.file||t[19]!==i?(b=p?(0,Z.jsxs)(`section`,{"aria-hidden":!0,className:X(`mx-2 mb-1 flex items-center gap-3 rounded-lg border bg-card px-4 py-3 text-card-foreground`,`motion-reduce:animate-none motion-reduce:duration-0`,u?`animate-out fade-out-0 zoom-out-95 fill-mode-forwards duration-200`:`animate-in fade-in-0 zoom-in-95 duration-300`),children:[(0,Z.jsx)(Sf,{size:36,celebrateSignal:c}),(0,Z.jsx)(`span`,{className:`font-medium text-sm`,children:(0,Z.jsx)(J,{id:`7jIIFX`})})]}):(0,Z.jsxs)(`section`,{"aria-labelledby":`onboarding-card-heading`,className:`mx-2 mb-1 rounded-lg border bg-card px-4 py-3 text-card-foreground`,children:[(0,Z.jsxs)(`header`,{className:`mb-3 flex items-center justify-between`,children:[(0,Z.jsx)(`h2`,{id:`onboarding-card-heading`,className:`font-medium text-sm`,children:(0,Z.jsx)(J,{id:`Y1QMlM`})}),(0,Z.jsx)(`span`,{className:`text-muted-foreground/60 text-xs tabular-nums`,children:`${f} / ${xZ}`})]}),(0,Z.jsxs)(`ul`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(TZ,{complete:!0,label:(0,Z.jsx)(J,{id:`4E9jPa`})}),(0,Z.jsx)(TZ,{complete:s.file,label:(0,Z.jsx)(J,{id:`6ibbCg`}),shortcutId:`new-item`}),(0,Z.jsx)(TZ,{complete:s.askedAi,label:(0,Z.jsx)(J,{id:`xWEvuo`}),shortcutId:`open-ask-ai`})]}),(0,Z.jsx)(`footer`,{className:`-mb-1 mt-2 flex justify-end`,children:(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`sm`,className:`h-auto px-2 py-1 text-muted-foreground text-xs`,onClick:()=>i.dismiss(),children:(0,Z.jsx)(J,{id:`1QfxQT`})})})]}),t[13]=p,t[14]=c,t[15]=f,t[16]=u,t[17]=s.askedAi,t[18]=s.file,t[19]=i,t[20]=b):b=t[20];let x;return t[21]!==y||t[22]!==b?(x=(0,Z.jsxs)(Z.Fragment,{children:[y,b]}),t[21]=y,t[22]=b,t[23]=x):x=t[23],x}function DZ(e){return e+1}function OZ(e){return e+1}function kZ(){let e=(0,$.c)(1);if(!yZ())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(EZ,{}),e[0]=t):t=e[0],t}function AZ(e){return e===null?null:e.kind===`local`?e.name:e.ref}function jZ(e,t){if(e.length===0)return null;let n=`origin/${e}`;return t.includes(n)?n:t.find(t=>Aa(t)===e)??null}function MZ(e){switch(e){case`branch-exists`:return{id:`wzq9Rv`};case`already-checked-out`:return{id:`ljHjfg`};case`path-exists`:return{id:`mYzDD_`};case`invalid-branch`:return{id:`r-OJYm`};case`no-git`:return{id:`CFnavk`};case`helper-not-found`:return{id:`HqOPpj`};default:return{id:`-zA2E7`}}}function NZ(e){let t=(0,$.c)(71),{open:n,onOpenChange:r,bridge:i,currentBranch:a,branches:o,existingWorktreeBranches:s,remoteBranches:c,behindByBranch:l,initialBranchName:u}=e,d=o===void 0?[]:o,f=c===void 0?[]:c,p=u===void 0?``:u,{_:m}=jt(),h=(0,Q.useId)(),g=(0,Q.useId)(),_=(0,Q.useId)(),v=(0,Q.useId)(),y=(0,Q.useId)(),b=(0,Q.useId)(),[x,S]=(0,Q.useState)(``),C;t[0]===a?C=t[1]:(C=a===null?null:{kind:`local`,name:a},t[0]=a,t[1]=C);let[w,T]=(0,Q.useState)(C),[E,D]=(0,Q.useState)(!1),[O,k]=(0,Q.useState)(``),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(null),P=(0,Q.useRef)(null),F=(0,Q.useRef)(null),I,L;t[2]!==a||t[3]!==p||t[4]!==n?(I=()=>{if(!n)return;S(p),T(a===null?null:{kind:`local`,name:a}),D(!1),k(``),j(!1),N(null);let e=requestAnimationFrame(()=>P.current?.focus());return()=>cancelAnimationFrame(e)},L=[n,a,p],t[2]=a,t[3]=p,t[4]=n,t[5]=I,t[6]=L):(I=t[5],L=t[6]),(0,Q.useEffect)(I,L);let R=x.trim(),z=!A&&R.length>0,B=R.length>0&&d.includes(R),V=B?null:jZ(R,f),H=V!==null,U=B||H,W=B&&(s?.has(R)??!1),G=d.filter(e=>e.toLowerCase().startsWith(R.toLowerCase())),K=!A&&G.length>0&&!U,ee=(a!==null&&!d.includes(a)?[a,...d]:d).map(RZ),te=f.map(LZ),q=AZ(w),ne=O.trim().toLowerCase(),ie=ne===``?ee:ee.filter(e=>e.name.toLowerCase().includes(ne)),oe=ne===``?te:te.filter(e=>e.ref.toLowerCase().includes(ne)),ce=ne!==``&&ie.length===0&&oe.length===0,le=async function(e){if(e.preventDefault(),z){j(!0),N(null);try{let e=H?{branch:R,createBranch:!0,remoteRef:V}:B?{branch:R,createBranch:!1}:{branch:R,createBranch:!0,baseBranch:w?.kind===`local`?w.name:void 0,baseRef:w?.kind===`remote`?w.ref:void 0},t=await i.worktree.create(e);if(!t.ok){N(MZ(t.reason)),j(!1);return}Uu(),r(!1),await i.project.open({path:t.path,target:`new-window`,entryPoint:`worktree`})}catch(e){console.warn(`[NewWorktreeDialog] worktree create/open failed:`,e),ul.error(m({id:`vAYoCZ`})),j(!1)}}},ue=Nn,de;t[7]!==A||t[8]!==r?(de=e=>{A||r(e)},t[7]=A,t[8]=r,t[9]=de):de=t[9];let fe=kn,pe;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Z.jsx)(On,{children:(0,Z.jsx)(J,{id:`DXd9LM`})}),t[10]=pe):pe=t[10];let me;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Z.jsxs)(Mn,{children:[pe,(0,Z.jsx)(Dn,{children:(0,Z.jsx)(J,{id:`NEzPEh`})})]}),t[11]=me):me=t[11];let he=An,ge;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Z.jsx)(J,{id:`ng2Ibo`}),t[12]=ge):ge=t[12];let _e;t[13]===g?_e=t[14]:(_e=(0,Z.jsx)(oi,{htmlFor:g,children:ge}),t[13]=g,t[14]=_e);let ve;t[15]===m?ve=t[16]:(ve=m({id:`IX_uXB`}),t[15]=m,t[16]=ve);let ye;t[17]===M?ye=t[18]:(ye=e=>{S(e.target.value),M!==null&&N(null)},t[17]=M,t[18]=ye);let be=M!==null,xe=M===null?y:`${y} ${b}`,Se;t[19]!==x||t[20]!==A||t[21]!==g||t[22]!==ve||t[23]!==ye||t[24]!==be||t[25]!==xe?(Se=(0,Z.jsx)(gl,{id:g,ref:P,value:x,placeholder:ve,onChange:ye,disabled:A,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-invalid":be,"aria-describedby":xe,"data-testid":`new-worktree-branch`}),t[19]=x,t[20]=A,t[21]=g,t[22]=ve,t[23]=ye,t[24]=be,t[25]=xe,t[26]=Se):Se=t[26];let Ce=R.length>0?(0,Z.jsxs)(`p`,{id:y,className:`flex items-start gap-1.5 text-1sm text-muted-foreground`,"data-testid":W?`new-worktree-mode-existing-worktree`:H?`new-worktree-mode-remote-checkout`:B?`new-worktree-mode-checkout`:`new-worktree-mode-create`,children:[W?(0,Z.jsx)(Sc,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-600 dark:text-amber-400`}):H?(0,Z.jsx)(qi,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-violet-600 dark:text-violet-400`}):B?(0,Z.jsx)(As,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-blue-600 dark:text-blue-400`}):(0,Z.jsx)(Oe,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-green-600 dark:text-green-400`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1`,children:W?(0,Z.jsx)(J,{id:`QAi7Q9`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`})}}):H?(0,Z.jsx)(J,{id:`oAGN8p`,values:{remoteCheckoutRef:V,trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),2:(0,Z.jsx)(`code`,{className:`font-mono`})}}):B?(0,Z.jsx)(J,{id:`b4VvP-`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono`})}}):q===null?(0,Z.jsx)(J,{id:`t4sFKC`,values:{trimmed:R},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono`})}}):(0,Z.jsx)(J,{id:`dGAdpH`,values:{trimmed:R,currentBaseLabel:q},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),1:(0,Z.jsx)(`code`,{className:`font-mono break-words`}),2:(0,Z.jsx)(`code`,{className:`font-mono`})}})})]}):null,we=K?(0,Z.jsx)(`div`,{className:`max-h-40 overflow-y-auto rounded-md border bg-popover p-1 shadow-xs`,"data-testid":`new-worktree-branch-list`,children:G.map(e=>(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,size:`sm`,tabIndex:-1,onClick:()=>{S(e),M!==null&&N(null),P.current?.focus()},"data-testid":`new-worktree-branch-option-${e}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:e})]},e))}):null,Te=U?null:(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-col gap-2`,children:[(0,Z.jsx)(oi,{id:v,htmlFor:_,children:(0,Z.jsx)(J,{id:`ZWwYwM`})}),(0,Z.jsxs)(ae,{open:E,onOpenChange:e=>{D(e),e||k(``)},children:[(0,Z.jsx)(se,{asChild:!0,children:(0,Z.jsxs)(Y,{id:_,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":E,"aria-haspopup":`listbox`,"aria-labelledby":`${v} ${_}`,"aria-label":m({id:`ZWwYwM`}),disabled:A,"data-testid":`new-worktree-base-trigger`,className:`w-full justify-between font-normal`,children:[(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[w?.kind===`remote`?(0,Z.jsx)(qi,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}):(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 truncate text-left`,children:q===null?(0,Z.jsx)(J,{id:`EbjWsS`}):q})]}),(0,Z.jsx)(lm,{"aria-hidden":`true`,className:`ml-2 size-4 shrink-0 opacity-50`})]})}),(0,Z.jsxs)(re,{align:`start`,className:`w-[var(--radix-popover-trigger-width)] p-1`,onWheel:IZ,onTouchMove:FZ,onOpenAutoFocus:e=>{e.preventDefault(),F.current?.focus()},children:[(0,Z.jsxs)(jw,{className:`mb-1 h-8`,children:[(0,Z.jsx)(Iw,{ref:F,"aria-label":m({id:`fuJZKk`}),placeholder:m({id:`hQXiDc`}),value:O,onChange:e=>k(e.target.value),onKeyDown:PZ,"data-testid":`new-worktree-base-search`}),(0,Z.jsx)(Nw,{children:(0,Z.jsx)(_t,{"aria-hidden":`true`})})]}),(0,Z.jsxs)(`div`,{role:`listbox`,"aria-label":m({id:`ZWwYwM`}),className:`max-h-56 overflow-y-auto`,"data-testid":`new-worktree-base-list`,children:[ce?(0,Z.jsx)(`p`,{className:`px-2 py-1.5 text-1sm text-muted-foreground`,children:(0,Z.jsx)(J,{id:`Sh3Qkg`})}):null,ie.map(e=>{let t=e.name,n=l?.get(t);return(0,Z.jsxs)(Y,{type:`button`,role:`option`,"aria-selected":w?.kind===`local`&&w.name===t,variant:`ghost`,size:`sm`,onClick:()=>{T(e),D(!1),k(``)},"data-testid":`new-worktree-base-option-${t}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t}),n!==void 0&&n>0?(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-amber-600 dark:text-amber-400`,"data-testid":`new-worktree-base-behind-${t}`,children:(0,Z.jsx)(J,{id:`6-wLTJ`,values:{behind:n}})}):null]},`local:${t}`)}),oe.map(e=>{let t=e.ref;return(0,Z.jsxs)(Y,{type:`button`,role:`option`,"aria-selected":w?.kind===`remote`&&w.ref===t,variant:`ghost`,size:`sm`,onClick:()=>{T(e),D(!1),k(``)},"data-testid":`new-worktree-base-option-${t}`,className:`h-8 w-full justify-start gap-2 font-normal`,children:[(0,Z.jsx)(qi,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:t}),(0,Z.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:(0,Z.jsx)(J,{id:`dIYSqk`})})]},`remote:${t}`)})]})]})]})]}),Ee;t[27]!==m||t[28]!==M||t[29]!==b?(Ee=M===null?null:(0,Z.jsx)(`p`,{id:b,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`new-worktree-error`,children:m(M)}),t[27]=m,t[28]=M,t[29]=b,t[30]=Ee):Ee=t[30];let De;t[31]!==h||t[32]!==le||t[33]!==_e||t[34]!==Se||t[35]!==Ce||t[36]!==we||t[37]!==Te||t[38]!==Ee?(De=(0,Z.jsxs)(`form`,{id:h,onSubmit:le,className:`flex flex-col gap-2`,children:[_e,Se,Ce,we,Te,Ee]}),t[31]=h,t[32]=le,t[33]=_e,t[34]=Se,t[35]=Ce,t[36]=we,t[37]=Te,t[38]=Ee,t[39]=De):De=t[39];let ke;t[40]!==he||t[41]!==De?(ke=(0,Z.jsx)(he,{children:De}),t[40]=he,t[41]=De,t[42]=ke):ke=t[42];let Ae;t[43]===r?Ae=t[44]:(Ae=()=>r(!1),t[43]=r,t[44]=Ae);let je;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,Z.jsx)(J,{id:`dEgA5A`}),t[45]=je):je=t[45];let Me;t[46]!==A||t[47]!==Ae?(Me=(0,Z.jsx)(Y,{type:`button`,variant:`outline`,onClick:Ae,disabled:A,"data-testid":`new-worktree-cancel`,children:je}),t[46]=A,t[47]=Ae,t[48]=Me):Me=t[48];let Ne=!z,Pe;t[49]!==A||t[50]!==W||t[51]!==B||t[52]!==H?(Pe=A?(0,Z.jsx)(J,{id:`b4itZn`}):W?(0,Z.jsx)(J,{id:`XV5sC0`}):H?(0,Z.jsx)(J,{id:`XAyxsa`}):B?(0,Z.jsx)(J,{id:`uGaIIS`}):(0,Z.jsx)(J,{id:`iO8V-7`}),t[49]=A,t[50]=W,t[51]=B,t[52]=H,t[53]=Pe):Pe=t[53];let Fe;t[54]!==h||t[55]!==Ne||t[56]!==Pe?(Fe=(0,Z.jsx)(Y,{type:`submit`,form:h,disabled:Ne,"data-testid":`new-worktree-create`,children:Pe}),t[54]=h,t[55]=Ne,t[56]=Pe,t[57]=Fe):Fe=t[57];let Ie;t[58]!==Me||t[59]!==Fe?(Ie=(0,Z.jsxs)(jn,{children:[Me,Fe]}),t[58]=Me,t[59]=Fe,t[60]=Ie):Ie=t[60];let Le;t[61]!==fe||t[62]!==me||t[63]!==ke||t[64]!==Ie?(Le=(0,Z.jsxs)(fe,{className:`sm:max-w-md`,"data-testid":`new-worktree-dialog`,children:[me,ke,Ie]}),t[61]=fe,t[62]=me,t[63]=ke,t[64]=Ie,t[65]=Le):Le=t[65];let Re;return t[66]!==ue||t[67]!==n||t[68]!==Le||t[69]!==de?(Re=(0,Z.jsx)(ue,{open:n,onOpenChange:de,children:Le}),t[66]=ue,t[67]=n,t[68]=Le,t[69]=de,t[70]=Re):Re=t[70],Re}function PZ(e){return e.stopPropagation()}function FZ(e){e.stopPropagation()}function IZ(e){e.stopPropagation()}function LZ(e){return{kind:`remote`,ref:e}}function RZ(e){return{kind:`local`,name:e}}function zZ(e){let t=(0,$.c)(51),{bridge:n,recents:r,currentPath:i,query:a,worktreeModel:o,closeMenu:s,guardStaleSelect:c,flyoutPath:l,setFlyoutPath:u,openNewWorktreeWith:d}=e,{_:f}=jt(),p;t[0]!==f||t[1]!==n.project||t[2]!==s?(p=function(e,t){s(),n.project.open({path:e,target:`new-window`,entryPoint:t}).catch(e=>{console.warn(`[RecentProjectsMenu] project.open failed:`,e),ul.error(f({id:`6HCOwA`}))})},t[0]=f,t[1]=n.project,t[2]=s,t[3]=p):p=t[3];let m=p,h;t[4]!==f||t[5]!==n.project||t[6]!==n.worktree?(h=async function(e){try{let t=await n.worktree.create({branch:e,createBranch:!1});if(!t.ok){ul.error(f({id:`teD0H9`}));return}Uu(),await n.project.open({path:t.path,target:`new-window`,entryPoint:`worktree`})}catch(e){console.warn(`[RecentProjectsMenu] create/open branch failed:`,e),ul.error(f({id:`LwMxXg`}))}},t[4]=f,t[5]=n.project,t[6]=n.worktree,t[7]=h):h=t[7];let g=h,_;t[8]!==s||t[9]!==i||t[10]!==m?(_=function(e){if(e.path===i){s();return}m(e.path,e.isLinkedWorktree?`worktree`:`recents`)},t[8]=s,t[9]=i,t[10]=m,t[11]=_):_=t[11];let v=_,y;t[12]!==s||t[13]!==g||t[14]!==i||t[15]!==m?(y=function(e){if(e.path!==null){if(e.path===i){s();return}m(e.path,e.isMain?`recents`:`worktree`);return}e.branch!==null&&(s(),g(e.branch))},t[12]=s,t[13]=g,t[14]=i,t[15]=m,t[16]=y):y=t[16];let b=y;if(a!==``){let e;t[17]!==s||t[18]!==g?(e=e=>{s(),g(e)},t[17]=s,t[18]=g,t[19]=e):e=t[19];let n;return t[20]!==i||t[21]!==c||t[22]!==v||t[23]!==a||t[24]!==r||t[25]!==e||t[26]!==o?(n=(0,Z.jsx)(WZ,{recents:r,currentPath:i,query:a,worktreeModel:o,onPickEntry:v,onPickBranch:e,guardStaleSelect:c}),t[20]=i,t[21]=c,t[22]=v,t[23]=a,t[24]=r,t[25]=e,t[26]=o,t[27]=n):n=t[27],n}let x;if(t[28]!==s||t[29]!==i||t[30]!==l||t[31]!==c||t[32]!==b||t[33]!==d||t[34]!==m||t[35]!==r||t[36]!==u||t[37]!==o){let e=U_(r),n;t[39]!==s||t[40]!==i||t[41]!==l||t[42]!==c||t[43]!==b||t[44]!==d||t[45]!==m||t[46]!==u||t[47]!==o?(n=e=>(0,Z.jsx)(BZ,{group:e,currentPath:i,worktreeModel:o,flyoutOpen:l===e.project.path,setFlyoutOpen:t=>u(n=>t?e.project.path:n===e.project.path?null:n),onPickProject:()=>{if(e.project.path===i){s();return}m(e.project.path,`recents`)},onPickFlyoutEntry:b,guardStaleSelect:c,openNewWorktreeWith:d},e.project.path),t[39]=s,t[40]=i,t[41]=l,t[42]=c,t[43]=b,t[44]=d,t[45]=m,t[46]=u,t[47]=o,t[48]=n):n=t[48],x=e.map(n),t[28]=s,t[29]=i,t[30]=l,t[31]=c,t[32]=b,t[33]=d,t[34]=m,t[35]=r,t[36]=u,t[37]=o,t[38]=x}else x=t[38];let S;return t[49]===x?S=t[50]:(S=(0,Z.jsx)(Z.Fragment,{children:x}),t[49]=x,t[50]=S),S}function BZ(e){let t=(0,$.c)(34),{group:n,currentPath:r,worktreeModel:i,flyoutOpen:a,setFlyoutOpen:o,onPickProject:s,onPickFlyoutEntry:c,guardStaleSelect:l,openNewWorktreeWith:u}=e,d=n.project.path===r,f,p;t[0]!==r||t[1]!==n||t[2]!==i?(f=B_(n,i,r),p=f.filter(VZ),t[0]=r,t[1]=n,t[2]=i,t[3]=f,t[4]=p):(f=t[3],p=t[4]);let m=p.length;if(m===0){let e;t[5]!==l||t[6]!==s?(e=e=>{l(e)||s()},t[5]=l,t[6]=s,t[7]=e):e=t[7];let r=`project-switcher-recent-${n.project.path}`,i=d?`true`:void 0,a;t[8]!==n.project.name||t[9]!==n.project.path||t[10]!==d?(a=(0,Z.jsx)(qZ,{name:n.project.name,path:n.project.path,current:d}),t[8]=n.project.name,t[9]=n.project.path,t[10]=d,t[11]=a):a=t[11];let o;return t[12]!==e||t[13]!==r||t[14]!==i||t[15]!==a?(o=(0,Z.jsx)(Gr,{onSelect:e,className:`flex w-full min-w-0 flex-col items-start gap-0.5`,"data-testid":r,"data-current":i,children:a}),t[12]=e,t[13]=r,t[14]=i,t[15]=a,t[16]=o):o=t[16],o}let h;t[17]!==r||t[18]!==n.worktrees||t[19]!==d?(h=d||n.worktrees.some(e=>e.path===r),t[17]=r,t[18]=n.worktrees,t[19]=d,t[20]=h):h=t[20];let g=h,_;return t[21]!==g||t[22]!==r||t[23]!==f||t[24]!==a||t[25]!==n||t[26]!==l||t[27]!==c||t[28]!==s||t[29]!==u||t[30]!==m||t[31]!==o||t[32]!==i?(_=(0,Z.jsx)(HZ,{group:n,currentPath:r,containsCurrent:g,worktreeModel:i,flyoutEntries:f,openedWorktreeCount:m,flyoutOpen:a,setFlyoutOpen:o,onPickProject:s,onPickFlyoutEntry:c,guardStaleSelect:l,openNewWorktreeWith:u}),t[21]=g,t[22]=r,t[23]=f,t[24]=a,t[25]=n,t[26]=l,t[27]=c,t[28]=s,t[29]=u,t[30]=m,t[31]=o,t[32]=i,t[33]=_):_=t[33],_}function VZ(e){return e.opened&&!e.isMain}function HZ(e){let t=(0,$.c)(46),{group:n,currentPath:r,containsCurrent:i,worktreeModel:a,flyoutEntries:o,openedWorktreeCount:s,flyoutOpen:c,setFlyoutOpen:l,onPickProject:u,onPickFlyoutEntry:d,guardStaleSelect:f,openNewWorktreeWith:p}=e,{_:m}=jt(),h=n.project.path===r,g;t[0]!==f||t[1]!==u?(g=e=>{f(e)||u()},t[0]=f,t[1]=u,t[2]=g):g=t[2];let _=g,v,y;t[3]===_?(v=t[4],y=t[5]):(v=e=>{e.target.closest(`[data-project-open]`)!==null&&(e.preventDefault(),_(e.nativeEvent))},y=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),_(e.nativeEvent))},t[3]=_,t[4]=v,t[5]=y);let b=`project-switcher-group-${n.project.path}`,x=c?`true`:void 0,S=i?`true`:void 0,C;t[6]===n.project.name?C=t[7]:(C=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm`,"data-project-open":``,title:n.project.name,children:n.project.name}),t[6]=n.project.name,t[7]=C);let w;t[8]===n.project.path?w=t[9]:(w=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,title:n.project.path,children:n.project.path}),t[8]=n.project.path,t[9]=w);let T;t[10]!==C||t[11]!==w?(T=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[C,w]}),t[10]=C,t[11]=w,t[12]=T):T=t[12];let E;t[13]!==m||t[14]!==h?(E=h?(0,Z.jsx)(As,{"aria-label":m({id:`Hp1l6f`}),className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground`}):null,t[13]=m,t[14]=h,t[15]=E):E=t[15];let D=`project-switcher-toggle-${n.project.path}`,O;t[16]===s?O=t[17]:(O=(0,Z.jsx)(`span`,{className:`tabular-nums`,children:s}),t[16]=s,t[17]=O);let k;t[18]===s?k=t[19]:(k=(0,Z.jsx)(J,{id:`AKxFtn`,values:{openedWorktreeCount:s}}),t[18]=s,t[19]=k);let A;t[20]!==D||t[21]!==O||t[22]!==k?(A=(0,Z.jsxs)(`span`,{className:`mt-0.5 shrink-0 text-muted-foreground text-xs`,"data-testid":D,children:[O,` `,k]}),t[20]=D,t[21]=O,t[22]=k,t[23]=A):A=t[23];let j;t[24]!==E||t[25]!==A||t[26]!==v||t[27]!==y||t[28]!==b||t[29]!==x||t[30]!==S||t[31]!==T?(j=(0,Z.jsxs)(Hr,{onClick:v,onKeyDown:y,className:`flex w-full min-w-0 items-start gap-2`,"data-testid":b,"data-flyout-open":x,"data-current":S,children:[T,E,A]}),t[24]=E,t[25]=A,t[26]=v,t[27]=y,t[28]=b,t[29]=x,t[30]=S,t[31]=T,t[32]=j):j=t[32];let M;t[33]!==o||t[34]!==c||t[35]!==n||t[36]!==f||t[37]!==d||t[38]!==p||t[39]!==a?(M=(0,Z.jsx)(UZ,{group:n,open:c,worktreeModel:a,entries:o,onPickFlyoutEntry:d,guardStaleSelect:f,openNewWorktreeWith:p}),t[33]=o,t[34]=c,t[35]=n,t[36]=f,t[37]=d,t[38]=p,t[39]=a,t[40]=M):M=t[40];let N;return t[41]!==c||t[42]!==l||t[43]!==j||t[44]!==M?(N=(0,Z.jsxs)(kr,{open:c,onOpenChange:l,children:[j,M]}),t[41]=c,t[42]=l,t[43]=j,t[44]=M,t[45]=N):N=t[45],N}function UZ(e){let t=(0,$.c)(15),{group:n,open:r,worktreeModel:i,entries:a,onPickFlyoutEntry:o,guardStaleSelect:s,openNewWorktreeWith:c}=e,{_:l}=jt(),[u,d]=(0,Q.useState)(``),f=(0,Q.useRef)(null),p=(0,Q.useRef)(null),m,h;t[0]===r?(m=t[1],h=t[2]):(m=()=>{r&&f.current?.focus({preventScroll:!0})},h=[r],t[0]=r,t[1]=m,t[2]=h),(0,Q.useEffect)(m,h);let g=function(){let e=p.current;return e===null?[]:[...e.querySelectorAll(`[role="menuitem"]`)]},_=function(e){g()[e]?.focus()},v=function(e,t){if(e.key===`ArrowDown`){e.preventDefault(),e.stopPropagation();let t=g(),n=t.indexOf(e.currentTarget);_(Math.min(n+1,t.length-1))}else if(e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=g().indexOf(e.currentTarget);t<=0?f.current?.focus():_(t-1)}else e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),t())},y;if(t[3]!==a||t[4]!==u){let e=u.trim().toLowerCase();y=e===``?a:a.filter(t=>(t.branch??``).toLowerCase().includes(e)),t[3]=a,t[4]=u,t[5]=y}else y=t[5];let b=y,x=i!==null&&i.mainRoot===n.project.mainRoot,S=u.trim(),C=x&&S.length>0,w;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(Nw,{align:`inline-start`,children:(0,Z.jsx)(_t,{"aria-hidden":`true`})}),t[6]=w):w=t[6];let T;t[7]===l?T=t[8]:(T=l({id:`bSD4im`}),t[7]=l,t[8]=T);let E;t[9]===l?E=t[10]:(E=l({id:`Skr_7L`}),t[9]=l,t[10]=E);let D;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>d(e.target.value),t[11]=D):D=t[11];let O=b.length===0?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(ni,{className:`font-normal text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,children:l({id:`-uaQnI`})}),C?(0,Z.jsxs)(Gr,{onSelect:e=>{s(e)||c(S)},onKeyDown:e=>v(e,()=>c(S)),className:`flex items-center gap-2`,"data-testid":`project-switcher-flyout-create`,children:[(0,Z.jsx)(Oe,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,title:S,children:(0,Z.jsx)(J,{id:`gHSAWT`,values:{typedName:S},components:{0:(0,Z.jsx)(`span`,{className:`font-medium`}),1:(0,Z.jsx)(`span`,{className:`font-mono`})}})})]}):null]}):b.map(e=>{let t=e.path??`branch:${e.branch}`,n=e.branch??l({id:`D12vtS`});return(0,Z.jsxs)(Gr,{onSelect:t=>{s(t)||o(e)},onKeyDown:t=>v(t,()=>o(e)),className:`flex items-center gap-2`,"data-testid":`project-switcher-flyout-entry-${t}`,"data-current":e.isCurrent?`true`:void 0,children:[(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,title:n,children:n}),e.isMain?(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:l({id:`Bn9-El`})}):e.opened?null:(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,title:l({id:`Dvwa0U`}),children:l({id:`nfoduq`})}),e.isCurrent?(0,Z.jsx)(JZ,{}):null]},t)}),k;return t[12]!==p||t[13]!==O?(k=(0,Z.jsx)(`div`,{ref:p,className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto overscroll-contain subtle-scrollbar`,children:O}),t[12]=p,t[13]=O,t[14]=k):k=t[14],(0,Z.jsx)(ii,{children:(0,Z.jsxs)(ri,{avoidCollisions:!1,sideOffset:-8,className:`flex max-h-80 w-96 flex-col gap-1 overflow-hidden p-1`,"data-testid":`project-switcher-flyout-${n.project.path}`,children:[(0,Z.jsxs)(jw,{className:`mb-1 h-8 shrink-0`,children:[w,(0,Z.jsx)(Iw,{ref:f,"aria-label":T,placeholder:E,value:u,onChange:D,onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),_(0)),e.stopPropagation()},"data-testid":`project-switcher-flyout-search-${n.project.path}`})]}),k]})})}function WZ(e){let t=(0,$.c)(41),{recents:n,currentPath:r,query:i,worktreeModel:a,onPickEntry:o,onPickBranch:s,guardStaleSelect:c}=e,{_:l}=jt(),u;t[0]===i?u=t[1]:(u=e=>e.toLowerCase().includes(i),t[0]=i,t[1]=u);let d=u,f,p,m,h;if(t[2]!==l||t[3]!==r||t[4]!==c||t[5]!==d||t[6]!==s||t[7]!==o||t[8]!==n||t[9]!==a){h=Symbol.for(`react.early_return_sentinel`);bb0:{let e;t[14]===d?e=t[15]:(e=e=>!e.isLinkedWorktree&&(d(e.name)||d(e.path)),t[14]=d,t[15]=e);let i=n.filter(e),u;t[16]===d?u=t[17]:(u=e=>e.isLinkedWorktree===!0&&(d(e.branch??``)||d(e.path)),t[16]=d,t[17]=u);let g=n.filter(u),_=new Set(g.map(GZ)),v;t[18]===a?.entries?v=t[19]:(v=a?.entries??[],t[18]=a?.entries,t[19]=v);let y=v.filter(e=>e.branch!==null&&d(e.branch)&&(e.worktreePath===null||!_.has(e.worktreePath))&&e.worktreePath!==r);if(i.length===0&&g.length===0&&y.length===0){let e;t[20]===l?e=t[21]:(e=l({id:`pEQFsW`}),t[20]=l,t[21]=e);let n;t[22]===e?n=t[23]:(n=(0,Z.jsx)(ni,{className:`font-normal text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,children:e}),t[22]=e,t[23]=n),h=n;break bb0}let b;t[24]!==r||t[25]!==c||t[26]!==o?(b=e=>(0,Z.jsx)(Gr,{onSelect:t=>{c(t)||o(e)},className:`flex w-full min-w-0 flex-col items-start gap-0.5`,"data-testid":`project-switcher-recent-${e.path}`,children:(0,Z.jsx)(qZ,{name:e.name,path:e.path,current:e.path===r})},e.path),t[24]=r,t[25]=c,t[26]=o,t[27]=b):b=t[27],f=i.map(b);let x;t[28]!==r||t[29]!==c||t[30]!==o?(x=e=>(0,Z.jsxs)(Gr,{onSelect:t=>{c(t)||o(e)},className:`flex items-start gap-2`,"data-testid":`project-switcher-worktree-${e.path}`,"data-current":e.path===r?`true`:void 0,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,Z.jsx)(KZ,{branch:e.branch??e.name,project:e.mainRoot===void 0?null:H_(e.mainRoot)})]},e.path),t[28]=r,t[29]=c,t[30]=o,t[31]=x):x=t[31],p=g.map(x);let S;t[32]!==l||t[33]!==c||t[34]!==s||t[35]!==a?(S=e=>(0,Z.jsxs)(Gr,{onSelect:t=>{c(t)||e.branch!==null&&s(e.branch)},className:`flex items-start gap-2`,"data-testid":`project-switcher-branch-${e.branch}`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 opacity-40`}),(0,Z.jsx)(KZ,{branch:e.branch??``,project:a===null?null:H_(a.mainRoot),hint:l({id:`nfoduq`})})]},`branch:${e.branch}`),t[32]=l,t[33]=c,t[34]=s,t[35]=a,t[36]=S):S=t[36],m=y.map(S)}t[2]=l,t[3]=r,t[4]=c,t[5]=d,t[6]=s,t[7]=o,t[8]=n,t[9]=a,t[10]=f,t[11]=p,t[12]=m,t[13]=h}else f=t[10],p=t[11],m=t[12],h=t[13];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let g;return t[37]!==f||t[38]!==p||t[39]!==m?(g=(0,Z.jsxs)(Z.Fragment,{children:[f,p,m]}),t[37]=f,t[38]=p,t[39]=m,t[40]=g):g=t[40],g}function GZ(e){return e.path}function KZ(e){let t=(0,$.c)(12),{branch:n,project:r,hint:i}=e,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=i===void 0?null:(0,Z.jsx)(`span`,{className:`shrink-0 text-muted-foreground text-xs`,children:i}),t[2]=i,t[3]=o);let s;t[4]!==a||t[5]!==o?(s=(0,Z.jsxs)(`span`,{className:`flex w-full min-w-0 items-center gap-1.5`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6];let c;t[7]===r?c=t[8]:(c=r===null?null:(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,title:r,children:r}),t[7]=r,t[8]=c);let l;return t[9]!==s||t[10]!==c?(l=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[s,c]}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function qZ(e){let t=(0,$.c)(15),{name:n,path:r,current:i}=e,a=i&&`font-medium`,o;t[0]===a?o=t[1]:(o=X(`flex w-full items-center gap-1.5`,a),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm`,title:n,children:n}),t[2]=n,t[3]=s);let c;t[4]===i?c=t[5]:(c=i?(0,Z.jsx)(As,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}):null,t[4]=i,t[5]=c);let l;t[6]!==o||t[7]!==s||t[8]!==c?(l=(0,Z.jsxs)(`span`,{className:o,children:[s,c]}),t[6]=o,t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;t[10]===r?u=t[11]:(u=(0,Z.jsx)(`span`,{className:`w-full truncate text-muted-foreground text-xs`,title:r,children:r}),t[10]=r,t[11]=u);let d;return t[12]!==l||t[13]!==u?(d=(0,Z.jsxs)(`span`,{className:`flex w-full min-w-0 flex-col gap-0.5`,children:[l,u]}),t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function JZ(){let e=(0,$.c)(4),{_:t}=jt(),n;e[0]===t?n=e[1]:(n=t({id:`Hp1l6f`}),e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r=(0,Z.jsx)(As,{"aria-label":n,className:`size-3.5 shrink-0 text-muted-foreground`}),e[2]=n,e[3]=r),r}var YZ=(e,t,n)=>O_(e,t,n,`ProjectSwitcher`),XZ=350;function ZZ(e){let t=(0,$.c)(107),{bridge:n}=e,{_:r}=jt(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(``),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(``),[g,_]=(0,Q.useState)(null),v=pN(),y=T_(),b=typeof window<`u`&&window.okDesktop!=null,x=(0,Q.useRef)(!1),S=(0,Q.useRef)(!1),C=(0,Q.useRef)(null),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{e&&(S.current=!0,C.current!==null&&clearTimeout(C.current),C.current=setTimeout(()=>{S.current=!1},XZ)),s(e),e||(l(``),_(null))},t[0]=w):w=t[0];let T=w,E;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>!b||!S.current?!1:(e.preventDefault(),!0),t[1]=E):E=t[1];let D=E,O;t[2]!==r||t[3]!==n.project||t[4]!==o?(O=()=>{if(!o)return;let e=!1;return YZ(async()=>{let t=await n.project.listRecent();e||a(t)},r({id:`fYKgzG`})),()=>{e=!0}},t[2]=r,t[3]=n.project,t[4]=o,t[5]=O):O=t[5];let k;t[6]!==r||t[7]!==n||t[8]!==o?(k=[o,n,r],t[6]=r,t[7]=n,t[8]=o,t[9]=k):k=t[9],(0,Q.useEffect)(O,k);let A,j;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>M(e=>{e===`new-worktree`?(s(!1),_(null),h(``),p(!0)):e===`switch-worktree`&&s(!0)}),j=[],t[10]=A,t[11]=j):(A=t[10],j=t[11]),(0,Q.useEffect)(A,j);let N;t[12]!==r||t[13]!==n.dialog||t[14]!==n.project?(N=()=>{T(!1),YZ(async()=>{let e=await n.dialog.openFolder();e&&await n.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})},r({id:`gmJ0An`}))},t[12]=r,t[13]=n.dialog,t[14]=n.project,t[15]=N):N=t[15];let P=N,F;t[16]!==r||t[17]!==n.navigator?(F=()=>{T(!1),YZ(()=>n.navigator.open(),r({id:`jol95m`}))},t[16]=r,t[17]=n.navigator,t[18]=F):F=t[18];let I=F,L;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>{T(!1),d(!0)},t[19]=L):L=t[19];let R=L,z;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{T(!1),h(e),p(!0)},t[20]=z):z=t[20];let B=z,V=n.config.projectPath,H;t[21]===c?H=t[22]:(H=c.trim().toLowerCase(),t[21]=c,t[22]=H);let U=H,W=U!==``,G;t[23]===i?G=t[24]:(G=i??[],t[23]=i,t[24]=G);let K=G,ee;t[25]!==W||t[26]!==K?(ee=W?K.filter(aQ):K,t[25]=W,t[26]=K,t[27]=ee):ee=t[27];let te=ee,q=W?null:y,ne=v!==null&&`h-auto py-1.5`,re;t[28]===ne?re=t[29]:(re=X(`justify-between text-sidebar-foreground/70 hover:text-sidebar-foreground! data-open:hover:text-sidebar-foreground!`,ne),t[28]=ne,t[29]=re);let ie;t[30]===r?ie=t[31]:(ie=r({id:`zZ_I5K`}),t[30]=r,t[31]=ie);let ae;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(ae=b?()=>{x.current=!0}:void 0,t[32]=ae):ae=t[32];let oe;t[33]===o?oe=t[34]:(oe=b?()=>{if(x.current){x.current=!1;return}T(!o)}:void 0,t[33]=o,t[34]=oe);let se;t[35]===n.config.projectName?se=t[36]:(se=(0,Z.jsx)(`span`,{className:`truncate`,children:n.config.projectName}),t[35]=n.config.projectName,t[36]=se);let ce;t[37]===v?ce=t[38]:(ce=v===null?null:(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 text-xs text-sidebar-foreground/50 group-hover/menu-button:text-sidebar-foreground`,"data-testid":`project-switcher-branch`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-3! shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate`,children:v})]}),t[37]=v,t[38]=ce);let le;t[39]!==se||t[40]!==ce?(le=(0,Z.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[se,ce]}),t[39]=se,t[40]=ce,t[41]=le):le=t[41];let ue;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Z.jsx)(lm,{"aria-hidden":`true`,className:`opacity-60`}),t[42]=ue):ue=t[42];let de;t[43]!==n.config.projectPath||t[44]!==re||t[45]!==ie||t[46]!==oe||t[47]!==le?(de=(0,Z.jsx)(jr,{asChild:!0,children:(0,Z.jsxs)(rN,{className:re,"data-testid":`project-switcher-trigger`,"aria-label":ie,title:n.config.projectPath,onPointerDown:ae,onClick:oe,children:[le,ue]})}),t[43]=n.config.projectPath,t[44]=re,t[45]=ie,t[46]=oe,t[47]=le,t[48]=de):de=t[48];let fe;t[49]!==r||t[50]!==n||t[51]!==V||t[52]!==g||t[53]!==te||t[54]!==q||t[55]!==U||t[56]!==i||t[57]!==c?(fe=i===null?null:i.length===0?(0,Z.jsx)(ni,{className:`font-normal text-muted-foreground text-xs`,children:(0,Z.jsx)(J,{id:`MUrVEo`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(jw,{className:`mb-1 h-8 border-0 shadow-none has-[[data-slot=input-group-control]:focus-visible]:ring-0`,children:[(0,Z.jsx)(Iw,{"aria-label":r({id:`blFttG`}),placeholder:r({id:`RVZJWQ`}),value:c,onChange:e=>{e.target.value!==``&&_(null),l(e.target.value)},onKeyDown:iQ,"data-testid":`project-switcher-search`}),(0,Z.jsx)(Nw,{children:(0,Z.jsx)(_t,{"aria-hidden":`true`})})]}),(0,Z.jsx)(Vr,{}),(0,Z.jsx)(`div`,{className:`max-h-64 overflow-x-hidden overflow-y-auto overscroll-contain subtle-scrollbar scroll-fade-mask`,"data-testid":`project-switcher-scroll`,onScroll:()=>{g!==null&&_(null)},children:(0,Z.jsx)(zZ,{bridge:n,recents:te,currentPath:V,query:U,worktreeModel:q,closeMenu:()=>T(!1),guardStaleSelect:D,flyoutPath:g,setFlyoutPath:_,openNewWorktreeWith:B})})]}),t[49]=r,t[50]=n,t[51]=V,t[52]=g,t[53]=te,t[54]=q,t[55]=U,t[56]=i,t[57]=c,t[58]=fe):fe=t[58];let pe;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Z.jsx)(Vr,{}),t[59]=pe):pe=t[59];let me;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(me=e=>{D(e)||R()},t[60]=me):me=t[60];let he;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,Z.jsxs)(Gr,{onSelect:me,"data-testid":`project-switcher-new-project`,children:[(0,Z.jsx)(Oe,{"aria-hidden":`true`,className:`text-muted-foreground`}),(0,Z.jsx)(J,{id:`gKi-a_`})]}),t[61]=he):he=t[61];let ge;t[62]===I?ge=t[63]:(ge=e=>{D(e)||I()},t[62]=I,t[63]=ge);let _e,ve;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,Z.jsx)(Dt,{"aria-hidden":`true`,className:`text-muted-foreground`}),ve=(0,Z.jsx)(J,{id:`xaDWAI`}),t[64]=_e,t[65]=ve):(_e=t[64],ve=t[65]);let ye;t[66]===ge?ye=t[67]:(ye=(0,Z.jsxs)(Gr,{onSelect:ge,"data-testid":`project-switcher-switch-project`,children:[_e,ve]}),t[66]=ge,t[67]=ye);let be;t[68]===P?be=t[69]:(be=e=>{D(e)||P()},t[68]=P,t[69]=be);let xe,Se;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)(Sc,{"aria-hidden":`true`,className:`text-muted-foreground`}),Se=(0,Z.jsx)(J,{id:`PVUn_c`}),t[70]=xe,t[71]=Se):(xe=t[70],Se=t[71]);let Ce;t[72]===be?Ce=t[73]:(Ce=(0,Z.jsxs)(Gr,{onSelect:be,"data-testid":`project-switcher-open-folder`,children:[xe,Se]}),t[72]=be,t[73]=Ce);let we;t[74]===v?we=t[75]:(we=v===null?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Vr,{}),(0,Z.jsxs)(Gr,{onSelect:e=>{D(e)||(T(!1),h(``),p(!0))},"data-testid":`project-switcher-new-worktree`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`text-muted-foreground`}),(0,Z.jsx)(J,{id:`DXd9LM`})]})]}),t[74]=v,t[75]=we);let Te;t[76]!==fe||t[77]!==ye||t[78]!==Ce||t[79]!==we?(Te=(0,Z.jsxs)(qr,{align:`start`,side:`top`,className:`min-w-[260px]`,"data-testid":`project-switcher-menu`,children:[fe,pe,he,ye,Ce,we]}),t[76]=fe,t[77]=ye,t[78]=Ce,t[79]=we,t[80]=Te):Te=t[80];let Ee;t[81]!==o||t[82]!==de||t[83]!==Te?(Ee=(0,Z.jsxs)($r,{open:o,onOpenChange:T,modal:!1,children:[de,Te]}),t[81]=o,t[82]=de,t[83]=Te,t[84]=Ee):Ee=t[84];let De;t[85]!==n||t[86]!==u?(De=(0,Z.jsx)(Oh,{open:u,onOpenChange:d,bridge:n}),t[85]=n,t[86]=u,t[87]=De):De=t[87];let ke;t[88]===y?.entries?ke=t[89]:(ke=y?.entries.map(rQ).filter(nQ),t[88]=y?.entries,t[89]=ke);let Ae;t[90]===y?.entries?Ae=t[91]:(Ae=new Set(y?.entries.filter(tQ).map(eQ)),t[90]=y?.entries,t[91]=Ae);let je=y?.remoteBranches,Me;t[92]===y?.entries?Me=t[93]:(Me=new Map(y?.entries.filter($Z).map(QZ)),t[92]=y?.entries,t[93]=Me);let Ne;t[94]!==v||t[95]!==n||t[96]!==m||t[97]!==f||t[98]!==ke||t[99]!==Ae||t[100]!==je||t[101]!==Me?(Ne=(0,Z.jsx)(NZ,{open:f,onOpenChange:p,bridge:n,currentBranch:v,initialBranchName:m,branches:ke,existingWorktreeBranches:Ae,remoteBranches:je,behindByBranch:Me}),t[94]=v,t[95]=n,t[96]=m,t[97]=f,t[98]=ke,t[99]=Ae,t[100]=je,t[101]=Me,t[102]=Ne):Ne=t[102];let Pe;return t[103]!==Ee||t[104]!==De||t[105]!==Ne?(Pe=(0,Z.jsxs)(Z.Fragment,{children:[Ee,De,Ne]}),t[103]=Ee,t[104]=De,t[105]=Ne,t[106]=Pe):Pe=t[106],Pe}function QZ(e){return[e.branch,e.behind]}function $Z(e){return e.branch!==null&&e.behind!==void 0}function eQ(e){return e.branch}function tQ(e){return e.branch!==null&&e.worktreePath!==null}function nQ(e){return e!==null}function rQ(e){return e.branch}function iQ(e){return e.stopPropagation()}function aQ(e){return!e.isLinkedWorktree}function oQ(e,t){let n=e instanceof Error?e:Error(String(e));console.warn(JSON.stringify({event:`jsx-render-failure`,component:`sidebarSearchPill`,rawComponentName:`sidebarSearchPill`,error:String(n),stack:t.componentStack})),la(`sidebarSearchPill`)}function sQ(e){let t=(0,$.c)(8),{onClick:n,className:r}=e,i;t[0]===r?i=t[1]:(i=X(`rounded-lg h-9 w-full justify-start gap-2 px-3 font-normal text-muted-foreground`,r),t[0]=r,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)(_t,{"aria-hidden":`true`}),t[2]=a):a=t[2];let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(`span`,{className:`flex-1 text-left text-sm`,children:(0,Z.jsx)(J,{id:`A1taO8`})}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(Re,{className:`text-foreground/70`,children:wl(`command-palette`)}),t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsxs)(Y,{variant:`outline`,onClick:n,"data-telemetry-event":`ok.sidebar.search_pill.click`,className:i,children:[a,o,s]}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c}function cQ(){let e=(0,$.c)(36),{_:t}=jt(),n=Qs(),{activeDocName:r}=Xe(),[i,a]=(0,Q.useState)(!1),o=ic(),s;e[0]!==n.data||e[1]!==n.status?(s=n.status===`ready`?n.data:[],e[0]=n.data,e[1]=n.status,e[2]=s):s=e[2];let c=s,l;e[3]===c?l=e[4]:(l=hc(c),e[3]=c,e[4]=l);let u=l,d=_c(),f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f={},e[5]=f):f=e[5];let[p,m]=(0,Q.useState)(f),h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(ZM,{asChild:!0,children:(0,Z.jsxs)(Tn,{className:`flex w-full items-center gap-1.5`,children:[(0,Z.jsx)(Om,{className:`size-3.5 shrink-0`}),(0,Z.jsx)(J,{id:`PCSkw2`}),(0,Z.jsx)(Ns,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/skills:rotate-90`})]})}),e[6]=h):h=e[6];let g;e[7]===t?g=e[8]:(g=t({id:`MdpSC1`}),e[7]=t,e[8]=g);let _,v;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>a(!0),v=(0,Z.jsx)(Oe,{}),e[9]=_,e[10]=v):(_=e[9],v=e[10]);let y;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(J,{id:`MdpSC1`})}),e[11]=y):y=e[11];let b;e[12]===g?b=e[13]:(b=(0,Z.jsxs)(QM,{title:g,onClick:_,children:[v,y]}),e[12]=g,e[13]=b);let x;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(vQ,{}),e[14]=x):x=e[14];let S;e[15]===c?S=e[16]:(S=c.some(uQ),e[15]=c,e[16]=S);let C;e[17]===S?C=e[18]:(C=(0,Z.jsx)(gQ,{hasProjectSkills:S}),e[17]=S,e[18]=C);let w;e[19]!==o||e[20]!==r||e[21]!==u||e[22]!==p||e[23]!==d||e[24]!==c?(w=c.length===0?(0,Z.jsx)(`p`,{className:`px-2 py-1 text-xs text-muted-foreground`,children:(0,Z.jsx)(J,{id:`PdJZ5p`})}):fc.filter(e=>c.some(t=>t.scope===e)).map(e=>(0,Z.jsxs)(En,{className:`group/scope`,open:c.some(t=>t.scope===e&&ma(t.scope,t.name)===r)||(p[e]??!1),onOpenChange:t=>m(n=>({...n,[e]:t})),children:[(0,Z.jsxs)(Tn,{className:`flex w-full items-center gap-1 px-2 pt-1 pb-0.5 text-[11px] text-muted-foreground/70 hover:text-muted-foreground`,children:[(0,Z.jsx)(Ns,{className:`size-3 shrink-0 transition-transform group-data-[state=open]/scope:rotate-90`}),(0,Z.jsx)(`span`,{className:`truncate`,children:d[e]})]}),(0,Z.jsx)(wn,{children:(0,Z.jsx)(eN,{className:`pl-2`,children:c.filter(t=>t.scope===e).map(e=>(0,Z.jsx)(dQ,{skill:e,activeDocName:r,actions:o,existingNames:u[e.scope]},`${e.scope}::${e.name}`))})})]},e)),e[19]=o,e[20]=r,e[21]=u,e[22]=p,e[23]=d,e[24]=c,e[25]=w):w=e[25];let T;e[26]!==C||e[27]!==w?(T=(0,Z.jsx)(wn,{children:(0,Z.jsxs)($M,{children:[x,C,w]})}),e[26]=C,e[27]=w,e[28]=T):T=e[28];let E;e[29]===i?E=e[30]:(E=(0,Z.jsx)(Vi,{defaultScope:`project`,open:i,onOpenChange:a,onCreated:lQ}),e[29]=i,e[30]=E);let D;return e[31]!==o.dialogs||e[32]!==T||e[33]!==E||e[34]!==b?(D=(0,Z.jsx)(En,{className:`group/skills shrink-0`,children:(0,Z.jsxs)(XM,{className:`px-0`,children:[h,b,T,o.dialogs,E]})}),e[31]=o.dialogs,e[32]=T,e[33]=E,e[34]=b,e[35]=D):D=e[35],D}function lQ(e){let{scope:t,name:n}=e;return Pc(ma(t,n))}function uQ(e){return e.scope===`project`&&!e.managed}function dQ(e){let t=(0,$.c)(52),{skill:n,activeDocName:r,actions:i,existingNames:a}=e,{_:o}=jt(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(!1),d;t[0]!==n.name||t[1]!==n.scope?(d=ma(n.scope,n.name),t[0]=n.name,t[1]=n.scope,t[2]=d):d=t[2];let f=r===d,p,m,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>{e.preventDefault(),u(!0)},m=(0,Z.jsx)(Ns,{className:`size-3 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/skill:rotate-90`}),h=(0,Z.jsx)(Om,{className:`size-3 shrink-0 text-muted-foreground`}),t[3]=p,t[4]=m,t[5]=h):(p=t[3],m=t[4],h=t[5]);let g=n.name,_;t[6]===n.name?_=t[7]:(_=uc(n.name),t[6]=n.name,t[7]=_);let v;t[8]!==n.name||t[9]!==_?(v=(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:g,children:_}),t[8]=n.name,t[9]=_,t[10]=v):v=t[10];let y;t[11]!==o||t[12]!==n.bundledVersion||t[13]!==n.updateAvailable?(y=n.updateAvailable?(0,Z.jsx)(`span`,{title:o({id:`1YJ4Yg`,values:{0:n.bundledVersion?` (${n.bundledVersion})`:``}}),className:`flex items-center`,children:(0,Z.jsx)(Uc,{className:`size-3 text-primary`,"aria-label":o({id:`CifUuG`})})}):null,t[11]=o,t[12]=n.bundledVersion,t[13]=n.updateAvailable,t[14]=y):y=t[14];let b;t[15]!==o||t[16]!==n.installed||t[17]!==n.managed?(b=n.managed?(0,Z.jsx)(`span`,{title:o({id:`U7HJ4y`}),className:`flex items-center`,children:(0,Z.jsx)(Vs,{className:`size-3 text-muted-foreground`,"aria-label":o({id:`U7HJ4y`})})}):(0,Z.jsx)(Fi,{installed:n.installed,subtle:!0,className:`shrink-0`}),t[15]=o,t[16]=n.installed,t[17]=n.managed,t[18]=b):b=t[18];let x;t[19]!==y||t[20]!==b?(x=(0,Z.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[y,b]}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]!==f||t[23]!==x||t[24]!==v?(S=(0,Z.jsx)(Tn,{asChild:!0,children:(0,Z.jsxs)(rN,{size:`sm`,isActive:f,className:`h-6 text-[11px]`,onContextMenu:p,children:[m,h,v,x]})}),t[22]=f,t[23]=x,t[24]=v,t[25]=S):S=t[25];let C;t[26]!==o||t[27]!==n.name?(C=o({id:`RlLl3G`,values:{0:n.name}}),t[26]=o,t[27]=n.name,t[28]=C):C=t[28];let w;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(gm,{}),t[29]=w):w=t[29];let T;t[30]===C?T=t[31]:(T=(0,Z.jsx)(jr,{asChild:!0,children:(0,Z.jsx)(iN,{showOnHover:!0,"aria-label":C,children:w})}),t[30]=C,t[31]=T);let E;t[32]!==i||t[33]!==a||t[34]!==n?(E=(0,Z.jsx)(qr,{side:`right`,align:`start`,className:`min-w-52`,children:(0,Z.jsx)(tc,{skill:n,actions:i,existingNames:a})}),t[32]=i,t[33]=a,t[34]=n,t[35]=E):E=t[35];let D;t[36]!==l||t[37]!==T||t[38]!==E?(D=(0,Z.jsxs)($r,{open:l,onOpenChange:u,children:[T,E]}),t[36]=l,t[37]=T,t[38]=E,t[39]=D):D=t[39];let O;t[40]!==s||t[41]!==n?(O=s?(0,Z.jsx)(mQ,{skill:n}):null,t[40]=s,t[41]=n,t[42]=O):O=t[42];let k;t[43]===O?k=t[44]:(k=(0,Z.jsx)(wn,{children:O}),t[43]=O,t[44]=k);let A;t[45]!==S||t[46]!==D||t[47]!==k?(A=(0,Z.jsxs)(tN,{children:[S,D,k]}),t[45]=S,t[46]=D,t[47]=k,t[48]=A):A=t[48];let j;return t[49]!==s||t[50]!==A?(j=(0,Z.jsx)(En,{open:s,onOpenChange:c,className:`group/skill`,children:A}),t[49]=s,t[50]=A,t[51]=j):j=t[51],j}function fQ(e){let t=[];for(let n of e){let e=n.path.split(`/`),r=t;e.forEach((t,i)=>{let a=i===e.length-1,o=r.find(e=>e.name===t);o||(o=a?{name:t,path:n.path,text:n.text}:{name:t,path:e.slice(0,i+1).join(`/`),children:[]},r.push(o)),!a&&o.children&&(r=o.children)})}return pQ(t),t}function pQ(e){e.sort((e,t)=>{let n=+!e.children,r=+!t.children;return n===r?e.name.localeCompare(t.name):n-r});for(let t of e)t.children&&pQ(t.children)}function mQ(e){let t=(0,$.c)(36),{skill:n}=e,{_:r}=jt(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),{openTarget:c}=Xe(),l;t[0]===c?l=t[1]:(l=function(e){c({kind:`doc`,target:e,docName:e},{tabBehavior:`append`}),iu(du(e))},t[0]=c,t[1]=l);let u=l,d;t[2]!==c||t[3]!==n.name||t[4]!==n.scope?(d=function(e){c({kind:`skill-file`,target:`${n.scope}/${n.name}/${e}`,scope:n.scope,name:n.name,path:e},{tabBehavior:`replace-active`}),iu(su({scope:n.scope,name:n.name,path:e}))},t[2]=c,t[3]=n.name,t[4]=n.scope,t[5]=d):d=t[5];let f=d,p;t[6]!==u||t[7]!==f||t[8]!==n.managed||t[9]!==n.name||t[10]!==n.scope?(p=function(e){if(n.managed){f(e);return}let t=e.lastIndexOf(`.`),r=t>=0?e.slice(t+1).toLowerCase():``;if(n.scope===`project`&&(r===`md`||r===`mdx`)){u(ft(n.name,e.replace(/\.mdx?$/i,``)));return}f(e)},t[6]=u,t[7]=f,t[8]=n.managed,t[9]=n.name,t[10]=n.scope,t[11]=p):p=t[11];let m=p,h,g;t[12]!==n.name||t[13]!==n.scope?(h=()=>{let e=!0,t=()=>{ei(n.scope,n.name).then(t=>{e&&(t.ok?(a(t.files),s(!1)):(a([]),s(!0)))})};t();let r=Zl(t);return()=>{e=!1,r()}},g=[n.scope,n.name],t[12]=n.name,t[13]=n.scope,t[14]=h,t[15]=g):(h=t[14],g=t[15]),(0,Q.useEffect)(h,g);let _;if(t[16]!==r||t[17]!==i||t[18]!==o||t[19]!==m||t[20]!==u||t[21]!==f||t[22]!==n.managed||t[23]!==n.name||t[24]!==n.scope){let e=i?fQ(i):[],a;t[26]!==u||t[27]!==f||t[28]!==n.managed||t[29]!==n.name||t[30]!==n.scope?(a=()=>n.managed?f(`SKILL.md`):n.scope===`project`?u(jo(n.name)):Pc(ma(n.scope,n.name)),t[26]=u,t[27]=f,t[28]=n.managed,t[29]=n.name,t[30]=n.scope,t[31]=a):a=t[31];let s,c;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,Z.jsx)(ir,{className:`size-3 shrink-0 text-muted-foreground`}),c=(0,Z.jsx)(`span`,{className:`truncate`,children:`SKILL.md`}),t[32]=s,t[33]=c):(s=t[32],c=t[33]);let l;t[34]===a?l=t[35]:(l=(0,Z.jsx)(oN,{children:(0,Z.jsxs)(sN,{size:`sm`,onClick:a,className:`text-[11px]`,children:[s,c]})}),t[34]=a,t[35]=l),_=(0,Z.jsxs)(aN,{className:`mr-0 pr-0`,children:[l,i===null?(0,Z.jsx)(oN,{children:(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-[11px] text-muted-foreground/70`,children:(0,Z.jsx)(J,{id:`yQE2r9`})})}):o?(0,Z.jsx)(oN,{children:(0,Z.jsx)(`span`,{className:`px-2 py-0.5 text-[11px] text-muted-foreground/70`,title:r({id:`3Ijjy1`}),children:(0,Z.jsx)(J,{id:`ZARuZJ`})})}):e.map(e=>(0,Z.jsx)(hQ,{node:e,depth:0,onOpenFile:m},e.path))]}),t[16]=r,t[17]=i,t[18]=o,t[19]=m,t[20]=u,t[21]=f,t[22]=n.managed,t[23]=n.name,t[24]=n.scope,t[25]=_}else _=t[25];return _}function hQ(e){let t=(0,$.c)(34),{node:n,depth:r,onOpenFile:i}=e,[a,o]=(0,Q.useState)(!1),s=`${r*.6}rem`,c;t[0]===s?c=t[1]:(c={paddingLeft:s},t[0]=s,t[1]=c);let l=c;if(n.children){let e;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(Ns,{className:`size-3 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/dir:rotate-90`}),t[2]=e):e=t[2];let s;t[3]===n.name?s=t[4]:(s=(0,Z.jsxs)(`span`,{className:`truncate`,children:[n.name,`/`]}),t[3]=n.name,t[4]=s);let c;t[5]!==l||t[6]!==s?(c=(0,Z.jsx)(Tn,{asChild:!0,children:(0,Z.jsxs)(sN,{size:`sm`,className:`text-[11px]`,style:l,children:[e,s]})}),t[5]=l,t[6]=s,t[7]=c):c=t[7];let u;if(t[8]!==r||t[9]!==n.children||t[10]!==i){let e;t[12]!==r||t[13]!==i?(e=e=>(0,Z.jsx)(hQ,{node:e,depth:r+1,onOpenFile:i},e.path),t[12]=r,t[13]=i,t[14]=e):e=t[14],u=n.children.map(e),t[8]=r,t[9]=n.children,t[10]=i,t[11]=u}else u=t[11];let d;t[15]===u?d=t[16]:(d=(0,Z.jsx)(wn,{children:u}),t[15]=u,t[16]=d);let f;t[17]!==c||t[18]!==d?(f=(0,Z.jsxs)(oN,{children:[c,d]}),t[17]=c,t[18]=d,t[19]=f):f=t[19];let p;return t[20]!==a||t[21]!==f?(p=(0,Z.jsx)(En,{open:a,onOpenChange:o,className:`group/dir`,children:f}),t[20]=a,t[21]=f,t[22]=p):p=t[22],p}let u=`skill-file-${n.path}`,d;t[23]!==n.path||t[24]!==i?(d=()=>i(n.path),t[23]=n.path,t[24]=i,t[25]=d):d=t[25];let f;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(ym,{className:`size-3 shrink-0 text-muted-foreground`}),t[26]=f):f=t[26];let p;t[27]===n.name?p=t[28]:(p=(0,Z.jsx)(`span`,{className:`truncate`,children:n.name}),t[27]=n.name,t[28]=p);let m;return t[29]!==l||t[30]!==u||t[31]!==d||t[32]!==p?(m=(0,Z.jsx)(oN,{children:(0,Z.jsxs)(sN,{size:`sm`,className:`text-[11px]`,style:l,"data-testid":u,onClick:d,children:[f,p]})}),t[29]=l,t[30]=u,t[31]=d,t[32]=p,t[33]=m):m=t[33],m}function gQ(e){let t=(0,$.c)(12),{hasProjectSkills:n}=e,{_:r}=jt(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(!1),c,l;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=window.okDesktop?.sharing;if(!e)return;let t=!1,n=()=>{e.status().then(e=>{t||a(e.mode===`local-only`&&!e.skillsShared)}).catch(_Q)};return n(),window.addEventListener(`focus`,n),()=>{t=!0,window.removeEventListener(`focus`,n)}},l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,Q.useEffect)(c,l),!n||i!==!0)return null;let u;t[2]!==r||t[3]!==o?(u=async()=>{let e=window.okDesktop?.sharing;if(!e||o)return;s(!0);let t=null,n=null;try{t=await e.setSkillsShared(!0)}catch(e){n=e}if(s(!1),n!==null){let e=n instanceof Error?n.message:``;ul.error(e.startsWith(`ok:sharing:dispatch:`)?r({id:`qXN416`}):e||r({id:`K2v7QF`}));return}if(t!==null){if(t.kind===`applied`)ul.success(r({id:`Q7cNKe`})),a(!1);else if(t.kind===`no-exclude`){let e=t.reason===`no-git`?r({id:`Xwump4`}):t.reason===`inaccessible`?r({id:`PlGC6r`}):r({id:`zcmYx4`});ul.warning(r({id:`EARn6h`,values:{detail:e}}))}}},t[2]=r,t[3]=o,t[4]=u):u=t[4];let d=u,f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(`p`,{className:`mb-2 text-amber-900 dark:text-amber-200`,children:(0,Z.jsx)(J,{id:`Bh9671`})}),t[5]=f):f=t[5];let p;t[6]===d?p=t[7]:(p=()=>void d(),t[6]=d,t[7]=p);let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(J,{id:`TUzThQ`}),t[8]=m):m=t[8];let h;return t[9]!==o||t[10]!==p?(h=(0,Z.jsxs)(`div`,{className:`mx-2 mb-1 rounded-md border border-amber-300 bg-amber-50 p-2 text-xs dark:border-amber-700 dark:bg-amber-950`,children:[f,(0,Z.jsx)(Y,{size:`sm`,className:`h-6 px-2 text-xs`,disabled:o,onClick:p,children:m})]}),t[9]=o,t[10]=p,t[11]=h):h=t[11],h}function _Q(e){console.warn(JSON.stringify({event:`skills-share-status-read-failed`,error:e instanceof Error?e.message:String(e)}))}function vQ(){let e=(0,$.c)(19),[t,n]=(0,Q.useState)(null),[r,i]=(0,Q.useState)(!1),a,o;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=!1;return Jr().then(t=>{e||n(t)}),()=>{e=!0}},o=[],e[0]=a,e[1]=o):(a=e[0],o=e[1]),(0,Q.useEffect)(a,o),!t||t.managed!==null||t.importable===0)return null;let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=async e=>{if(i(!0),!await ti(e)){i(!1);return}n({managed:e,importable:0})},e[2]=s):s=e[2];let c=s,l;e[3]===t.importable?l=e[4]:(l=(0,Z.jsx)(`p`,{className:`mb-2 text-muted-foreground`,children:(0,Z.jsx)(J,{id:`mu1O0q`,values:{0:t.importable}})}),e[3]=t.importable,e[4]=l);let u,d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>c(!0),d=(0,Z.jsx)(J,{id:`l3s5ri`}),e[5]=u,e[6]=d):(u=e[5],d=e[6]);let f;e[7]===r?f=e[8]:(f=(0,Z.jsx)(Y,{size:`sm`,className:`h-6 px-2 text-xs`,disabled:r,onClick:u,children:d}),e[7]=r,e[8]=f);let p,m;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>c(!1),m=(0,Z.jsx)(J,{id:`PBxg_E`}),e[9]=p,e[10]=m):(p=e[9],m=e[10]);let h;e[11]===r?h=e[12]:(h=(0,Z.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-6 px-2 text-xs`,disabled:r,onClick:p,children:m}),e[11]=r,e[12]=h);let g;e[13]!==f||e[14]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex gap-1.5`,children:[f,h]}),e[13]=f,e[14]=h,e[15]=g):g=e[15];let _;return e[16]!==g||e[17]!==l?(_=(0,Z.jsxs)(`div`,{className:`mx-2 mb-1 rounded-md border border-border/60 bg-muted/40 p-2 text-xs`,children:[l,g]}),e[16]=g,e[17]=l,e[18]=_):_=e[18],_}var yQ=`Relaunch`,bQ=`Release notes`,xQ=`Updates paused`,SQ=`Download`,CQ=`Reset to defaults`,wQ=`Relaunching to install the update…`,TQ=`Relaunch failed — please restart manually`;function EQ(e){return`Update to ${e} didn't install.`}var DQ=`Retry`,OQ=`Download manually`,kQ=`Recovery action failed — please try again`;function AQ(e,t){let n=t instanceof Error&&t.message?t.message:``;return n?`${e}: ${n}`:e}function jQ(e){return`Version ${e} ready to install`}function MQ(e){return`Updated to Version ${e}`}function NQ(e){return`Your settings and recent projects were saved by a newer build than this one (v${e}). Reset to defaults to continue.`}var PQ=0,FQ=0,IQ=1,LQ=2,RQ=3,zQ=6e4;function BQ(e,t,n=()=>{},r=zQ,i={isEligible:()=>!1,onShown:()=>{}}){let a=[],o=new Set,s=`update-downloaded`;return a.push(e.onUpdateDownloaded(({version:r})=>{let i=s,a=()=>{t({id:i,body:jQ(r),priority:LQ,action:{label:yQ,onClick:()=>{t({id:i,body:wQ,priority:LQ,dismissible:!1}),e.update.relaunchNow().then(()=>{n(i)},e=>{a(),t({id:`relaunch-error-${r}`,body:AQ(TQ,e),variant:`error`,priority:IQ})})}}})};a()})),a.push(e.onUpdateRelaunching(()=>{t({id:s,body:wQ,priority:LQ,dismissible:!1})})),a.push(e.onUpdateRelaunchFailed(({version:r,message:i,downloadUrl:a})=>{if(a){let i=`install-failed-${r}`,o=()=>{t({id:i,body:EQ(r),variant:`error`,priority:IQ,action:{label:DQ,onClick:()=>{e.update.relaunchNow().then(()=>{n(i)},e=>{console.warn(`[update-notice] install-failed retry rejected`,e),o()})}},secondaryAction:{label:OQ,onClick:()=>{e.shell.openExternal(a)}}})};o();return}t({id:`relaunch-error-${r}`,body:i?`${TQ}: ${i}`:TQ,variant:`error`,priority:IQ})})),a.push(e.onWhatsNew(({version:a,releaseUrl:s})=>{if(i.isEligible(a)){i.onShown(a),t({id:`whats-new-combined-${a}`,body:MQ(a),variant:`success`,priority:RQ,combinedSubscribe:!0,whatsNew:{version:a,releaseUrl:s},action:{label:bQ,onClick:()=>{e.shell.openExternal(s)}}}),e.update.dismissWhatsNew(a);return}let c=`whats-new-${a}`;t({id:c,body:MQ(a),variant:`success`,priority:RQ,action:{label:bQ,onClick:()=>{e.shell.openExternal(s)}},onDismiss:()=>{e.update.dismissWhatsNew(a)}});let l=setTimeout(()=>{o.delete(l),n(c),e.update.dismissWhatsNew(a)},r);o.add(l)})),a.push(e.onWhatsNewDismissed(({version:e})=>{n(`whats-new-${e}`)})),a.push(e.onUpdateStuckHint(({downloadUrl:n})=>{t({id:`update-stuck-hint`,body:xQ,priority:FQ,action:{label:SQ,onClick:()=>{e.shell.openExternal(n)}}})})),()=>{for(let e of a)e();for(let e of o)clearTimeout(e);o.clear()}}function VQ(e,t,n,r=()=>{}){let i=`schema-incompatibility-${t.persistedSchemaVersion}`,a=`schema-incompatibility-error-${t.persistedSchemaVersion}`,o=e=>{r(i),n({id:a,body:AQ(kQ,e),variant:`error`,priority:PQ})};n({id:i,body:NQ(t.currentBuild),priority:PQ,action:{label:CQ,onClick:()=>{e.state.resetIncompatible().then(()=>{r(i)},o)}}})}var HQ=[],UQ=new Set,WQ=!1;function GQ(){for(let e of UQ)e()}function KQ(e){let t=HQ.findIndex(t=>t.id===e.id);if(t===-1)HQ=[...HQ,e];else{let n=HQ.slice();n[t]=e,HQ=n}GQ()}function qQ(e){let t=HQ.filter(t=>t.id!==e);t.length!==HQ.length&&(HQ=t,GQ())}function JQ(){return HQ}function YQ(e){return UQ.add(e),()=>{UQ.delete(e)}}function XQ(){if(WQ||typeof window>`u`)return;let e=window.okDesktop;e&&(WQ=!0,BQ(e,KQ,qQ,void 0,{isEligible:e=>gI(CI.getSnapshot(),e),onShown:e=>CI.recordShown(e)}),e.state.query().then(t=>{t.schemaIncompatibility&&VQ(e,t.schemaIncompatibility,KQ,qQ)},e=>{console.warn(`[update-notices-store] bridge.state.query() failed`,e)}))}var ZQ=6e4,QQ=e=>{let t=(0,$.c)(11),{href:n,label:r,icon:i}=e,a,o;t[0]===n?(a=t[1],o=t[2]):(a=e=>Hu(e,n),o=e=>Hu(e,n),t[0]=n,t[1]=a,t[2]=o);let s;t[3]===i?s=t[4]:(s=(0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=i,t[4]=s);let c;return t[5]!==n||t[6]!==r||t[7]!==a||t[8]!==o||t[9]!==s?(c=(0,Z.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,onClick:a,onAuxClick:o,"aria-label":r,className:`rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:s}),t[5]=n,t[6]=r,t[7]=a,t[8]=o,t[9]=s,t[10]=c):c=t[10],c};function $Q(e){let t=(0,$.c)(34),{version:n,onOpenReleaseNotes:r,onClose:i,store:a,autoDismissMs:o}=e,s=a===void 0?CI:a,c=o===void 0?ZQ:o,{_:l}=jt(),[u,d]=(0,Q.useState)(!1),f,p;t[0]!==c||t[1]!==i||t[2]!==u?(f=()=>{if(!u)return;let e=setTimeout(i,c);return()=>clearTimeout(e)},p=[u,i,c],t[0]=c,t[1]=i,t[2]=u,t[3]=f,t[4]=p):(f=t[3],p=t[4]),(0,Q.useEffect)(f,p);let m;t[5]===l?m=t[6]:(m=l({id:`GzPQ2f`}),t[5]=l,t[6]=m);let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(J,{id:`yLEyuq`}),t[7]=h):h=t[7];let g;t[8]===s?g=t[9]:(g=()=>{s.markSubscribed(),d(!0)},t[8]=s,t[9]=g);let _;t[10]!==i||t[11]!==s?(_=()=>{s.dismiss(),i()},t[10]=i,t[11]=s,t[12]=_):_=t[12];let v;t[13]!==g||t[14]!==_?(v=(0,Z.jsx)(uI,{source:`post_update_card`,compactSubmit:!0,description:h,onSuccess:g,onDismiss:_}),t[13]=g,t[14]=_,t[15]=v):v=t[15];let y;t[16]!==l||t[17]!==u?(y=u?null:(0,Z.jsxs)(`nav`,{"aria-label":l({id:`dbapvC`}),className:`mt-3 flex items-center gap-1.5 text-muted-foreground text-xs`,children:[(0,Z.jsx)(`span`,{className:`mr-0.5`,children:(0,Z.jsx)(J,{id:`9sBe85`})}),(0,Z.jsx)(QQ,{href:pI,label:l({id:`I7Exsw`}),icon:EI}),(0,Z.jsx)(QQ,{href:dI,label:l({id:`zyKa-I`}),icon:Hh}),(0,Z.jsx)(QQ,{href:fI,label:l({id:`36aWJD`}),icon:TI})]}),t[16]=l,t[17]=u,t[18]=y):y=t[18];let b;t[19]!==y||t[20]!==v?(b=(0,Z.jsxs)(`div`,{className:`px-3 py-2.5`,children:[v,y]}),t[19]=y,t[20]=v,t[21]=b):b=t[21];let x;t[22]===n?x=t[23]:(x=(0,Z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:(0,Z.jsx)(J,{id:`hLy8b1`,values:{version:n}})}),t[22]=n,t[23]=x);let S;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(J,{id:`_PACVa`}),t[24]=S):S=t[24];let C;t[25]===r?C=t[26]:(C=(0,Z.jsx)(Y,{variant:`link`,size:`sm`,className:`h-auto p-0 text-muted-foreground text-xs hover:text-foreground`,onClick:r,children:S}),t[25]=r,t[26]=C);let w;t[27]!==x||t[28]!==C?(w=(0,Z.jsxs)(`div`,{className:`flex items-center justify-between border-t bg-muted/30 px-3 py-2.5 space-x-2`,children:[x,C]}),t[27]=x,t[28]=C,t[29]=w):w=t[29];let T;return t[30]!==b||t[31]!==w||t[32]!==m?(T=(0,Z.jsxs)(`section`,{"aria-label":m,className:`mx-1 mb-1 overflow-hidden rounded-lg border bg-card text-card-foreground`,children:[b,w]}),t[30]=b,t[31]=w,t[32]=m,t[33]=T):T=t[33],T}function e$(e){let t=(0,$.c)(37),{notice:n,onDismiss:r}=e,{_:i}=jt(),a=n.variant===`error`?`border-destructive/60 bg-sidebar-accent/30 text-muted-foreground`:n.variant===`success`?`border-emerald-500/40 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400`:`border-sidebar-border bg-sidebar-accent/30 text-muted-foreground`,o;t[0]!==i||t[1]!==n.dismissible||t[2]!==r?(o=n.dismissible===!1?null:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon`,className:`size-5 shrink-0 text-muted-foreground hover:text-sidebar-foreground`,"aria-label":i({id:`GUYwCr`}),onClick:r,children:(0,Z.jsx)(ll,{"aria-hidden":`true`,className:`size-3`})}),t[0]=i,t[1]=n.dismissible,t[2]=r,t[3]=o):o=t[3];let s=o,c=`shrink-0 text-xs font-medium underline underline-offset-2 ${n.variant===`success`?`decoration-emerald-500/40`:`decoration-muted-foreground/40`} hover:text-sidebar-foreground hover:decoration-sidebar-foreground`;if(n.secondaryAction){let e=`update-notice-${n.id}`,r=`flex flex-col gap-2 rounded-md border px-2 py-2 text-xs ${a}`,i;t[4]===n.body?i=t[5]:(i=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[4]=n.body,t[5]=i);let o;t[6]!==s||t[7]!==i?(o=(0,Z.jsxs)(`div`,{className:`flex items-start gap-2`,children:[i,s]}),t[6]=s,t[7]=i,t[8]=o):o=t[8];let l;t[9]!==c||t[10]!==n.action?(l=n.action?(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[9]=c,t[10]=n.action,t[11]=l):l=t[11];let u;t[12]===n.secondaryAction?u=t[13]:(u=()=>{n.secondaryAction?.onClick()},t[12]=n.secondaryAction,t[13]=u);let d;t[14]!==c||t[15]!==n.secondaryAction.label||t[16]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:u,children:n.secondaryAction.label}),t[14]=c,t[15]=n.secondaryAction.label,t[16]=u,t[17]=d):d=t[17];let f;t[18]!==l||t[19]!==d?(f=(0,Z.jsxs)(`div`,{className:`flex gap-3 pl-1`,children:[l,d]}),t[18]=l,t[19]=d,t[20]=f):f=t[20];let p;return t[21]!==e||t[22]!==r||t[23]!==o||t[24]!==f?(p=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":e,className:r,children:[o,f]}),t[21]=e,t[22]=r,t[23]=o,t[24]=f,t[25]=p):p=t[25],p}let l=`update-notice-${n.id}`,u=`flex items-center gap-2 rounded-md border px-2 py-1.5 text-xs ${a}`,d;t[26]===n.body?d=t[27]:(d=(0,Z.jsx)(`span`,{className:`flex-1 leading-snug`,children:n.body}),t[26]=n.body,t[27]=d);let f;t[28]!==c||t[29]!==n.action?(f=n.action?(0,Z.jsx)(`button`,{type:`button`,className:c,onClick:()=>{n.action?.onClick()},children:n.action.label}):null,t[28]=c,t[29]=n.action,t[30]=f):f=t[30];let p;return t[31]!==s||t[32]!==l||t[33]!==u||t[34]!==d||t[35]!==f?(p=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":l,className:u,children:[d,f,s]}),t[31]=s,t[32]=l,t[33]=u,t[34]=d,t[35]=f,t[36]=p):p=t[36],p}function t$(e){if(e.length===0)return null;let t=e[0];if(!t)return null;for(let n=1;n<e.length;n++){let r=e[n];r&&r.priority<t.priority&&(t=r)}return t}function n$(){let e=(0,$.c)(15),t=(0,Q.useSyncExternalStore)(YQ,JQ,JQ),n;e[0]===t?n=e[1]:(n=t$(t),e[0]=t,e[1]=n);let r=n;if(!r)return null;if(r.combinedSubscribe&&r.whatsNew){let t;e[2]===r.action?t=e[3]:(t=()=>r.action?.onClick(),e[2]=r.action,e[3]=t);let n;e[4]===r.id?n=e[5]:(n=()=>qQ(r.id),e[4]=r.id,e[5]=n);let i;return e[6]!==r.whatsNew.version||e[7]!==t||e[8]!==n?(i=(0,Z.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,Z.jsx)($Q,{version:r.whatsNew.version,onOpenReleaseNotes:t,onClose:n})}),e[6]=r.whatsNew.version,e[7]=t,e[8]=n,e[9]=i):i=e[9],i}let i;e[10]===r?i=e[11]:(i=()=>{r.onDismiss?.(),qQ(r.id)},e[10]=r,e[11]=i);let a;return e[12]!==r||e[13]!==i?(a=(0,Z.jsx)(`div`,{"data-testid":`update-notices-list`,children:(0,Z.jsx)(e$,{notice:r,onDismiss:i})}),e[12]=r,e[13]=i,e[14]=a):a=e[14],a}function r$(e,t){return e?.kind===`doc`||e?.kind===`folder-index`?mc(t.contentDir,vc(e.docName),t.pathSeparator):e?.kind===`folder`?mc(t.contentDir,e.folderPath,t.pathSeparator):e?.kind===`asset`?mc(t.contentDir,e.assetPath,t.pathSeparator):t.contentDir}function i$(e){return e?.kind===`doc`||e?.kind===`folder-index`?vc(e.docName):e?.kind===`folder`?e.folderPath:e?.kind===`asset`?e.assetPath:``}function a$(e,t){return e===null?sc({workspace:t}):e.kind===`folder`?t?Xs({folderRelativePath:e.folderPath,workspace:t}):null:e.kind===`doc`||e.kind===`folder-index`?Ws({docName:e.docName,workspace:t}):null}var o$={folderCount:0,expandedCount:0},s$=`button, [role="button"], [role="menuitem"], input, textarea, select, a[href]`;function c$(e){return typeof Element>`u`||!(e instanceof Element)?!1:e.closest(s$)!==null}function l$(e){let t=(0,$.c)(2),{onOpenSearch:n}=e,r;return t[0]===n?r=t[1]:(r=(0,Z.jsx)(eu,{name:`file-sidebar`,children:(0,Z.jsx)(f$,{onOpenSearch:n})}),t[0]=n,t[1]=r),r}var u$=e=>{let t=(0,$.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:n,label:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=(0,Z.jsx)(n,{"aria-hidden":`true`}),t[4]=n,t[5]=a);let o;t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(yn,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,"aria-label":r,...i,children:a})}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9];let s;t[10]===r?s=t[11]:(s=(0,Z.jsx)(bn,{children:r}),t[10]=r,t[11]=s);let c;return t[12]!==o||t[13]!==s?(c=(0,Z.jsxs)(Sn,{children:[o,s]}),t[12]=o,t[13]=s,t[14]=c):c=t[14],c},d$=e=>{let t=(0,$.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({icon:n,label:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=(0,Z.jsx)(n,{"aria-hidden":`true`}),t[4]=n,t[5]=a);let o;t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,Z.jsx)(yn,{asChild:!0,children:(0,Z.jsx)(jr,{asChild:!0,children:(0,Z.jsx)(Y,{variant:`ghost`,size:`icon-sm`,"aria-label":r,...i,children:a})})}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9];let s;t[10]===r?s=t[11]:(s=(0,Z.jsx)(bn,{children:r}),t[10]=r,t[11]=s);let c;return t[12]!==o||t[13]!==s?(c=(0,Z.jsxs)(Sn,{children:[o,s]}),t[12]=o,t[13]=s,t[14]=c):c=t[14],c};function f$(e){let t=(0,$.c)(309),{onOpenSearch:n}=e,{_:r}=jt(),[i,a]=(0,Q.useState)(null),[o,s]=(0,Q.useState)(null),{activeDocName:c,activeTarget:l}=Xe(),u;t[0]!==c||t[1]!==l?(u=l?.kind===`folder`||l?.kind===`folder-index`?l.folderPath:Fl(c),t[0]=c,t[1]=l,t[2]=u):u=t[2];let d=u,f;t[3]===d?f=t[4]:(f=Ul(d)?``:d,t[3]=d,t[4]=f);let p=f,[m,h]=(0,Q.useState)(!1),g=m?``:p,_=typeof window<`u`&&window.okDesktop!=null,{state:v,toggleSidebar:y}=zM(),b=gc(),x=v===`expanded`,S=_&&v===`collapsed`,[C,w]=(0,Q.useState)(o$),T,E;t[5]===i?(T=t[6],E=t[7]):(T=()=>{if(i===null)return;let e=()=>{w(i.getFolderState()),h(i.isCreationTargetCleared())};return e(),i.subscribe(e)},E=[i],t[5]=i,t[6]=T,t[7]=E),(0,Q.useEffect)(T,E);let D,O;t[8]===i?(D=t[9],O=t[10]):(D=()=>{if(i!==null)return uC(e=>{let t=e.initialDir??``;if(e.template){i.createFromTemplate(e.template.folder,e.template.name);return}i.startCreating(`file`,t)})},O=[i],t[8]=i,t[9]=D,t[10]=O),(0,Q.useEffect)(D,O);let k=C.folderCount>0,A=k&&C.expandedCount===C.folderCount,j=C.expandedCount===0,N=Ni(``),P=Ni(g===``?null:g),F=g===``?N:P,L=N.state.status===`ready`?(N.state.data.folder.templates_available?.length??0)>0:!0,R=F.state.status===`ready`?(F.state.data.folder.templates_available?.length??0)>0:!0,z=typeof window<`u`?window.okDesktop:void 0,B=cc(),{status:V}=fs(),H=V?.hasRemote===!0,U;t[11]!==r||t[12]!==B?.contentDir?(U=z?.config?.projectName||B?.contentDir.split(`/`).filter(Boolean).pop()||r({id:`sER-bs`}),t[11]=r,t[12]=B?.contentDir,t[13]=U):U=t[13];let W=U,G=rc().states,{dispatch:K}=Bs(),ee;t[14]===B?ee=t[15]:(ee=sc({workspace:B}),t[14]=B,t[15]=ee);let te=ee,{projectLocalBinding:q,merged:ne}=Bu(),re=ne?.appearance?.sidebar?.showHiddenFiles??!1,ie=ne?.appearance?.sidebar?.showOkFolders??!1,ae=ne?.appearance?.sidebar?.showOnlyMarkdownFiles??!1,oe=ne?.appearance?.sidebar?.showSkillsSection??!0,se=k&&!A,ce=k&&!j,le=se||ce,ue=(0,Q.useRef)(!1),de;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>{ue.current&&(ue.current=!1,e.preventDefault())},t[16]=de):de=t[16];let fe=de,pe=_$,me;t[17]!==i||t[18]!==B?(me=()=>{B&&(ue.current=!0,i?.startCreating(`file`,``))},t[17]=i,t[18]=B,t[19]=me):me=t[19];let he=me,ge;t[20]!==i||t[21]!==B?(ge=e=>{B&&(ue.current=!0,i?.createFromTemplate(``,e))},t[20]=i,t[21]=B,t[22]=ge):ge=t[22];let _e=ge,ve;t[23]!==i||t[24]!==B?(ve=()=>{B&&(ue.current=!0,i?.startCreating(`folder`,``))},t[23]=i,t[24]=B,t[25]=ve):ve=t[25];let ye=ve,be;t[26]===B?be=t[27]:(be=()=>{!B||!z||z.shell.showItemInFolder(B.contentDir)},t[26]=B,t[27]=be);let xe=be,Se;t[28]!==r||t[29]!==B?(Se=async()=>{if(B)try{await navigator.clipboard.writeText(B.contentDir),ul.success(r({id:`6_ZOw4`}),{description:B.contentDir})}catch(e){console.warn(`[FileSidebar] clipboard write failed:`,e),ul.error(r({id:`vfRlCI`}))}},t[28]=r,t[29]=B,t[30]=Se):Se=t[30];let Ce=Se,we;t[31]!==r||t[32]!==H?(we=()=>{gi({...pi(``),hasRemote:H,onClickWhenNoRemote:()=>{ul.error(r({id:`WyQxwa`}))}},{clipboardWrite:ad,toastSuccess:g$,toastError:h$,logEvent:m$})},t[31]=r,t[32]=H,t[33]=we):we=t[33];let Te=we,Ee;t[34]!==r||t[35]!==q?(Ee=e=>{if(q===null)return;let t=q.patch({appearance:{sidebar:e}});t.ok||(console.warn(`[FileSidebar] sidebar visibility toggle rejected:`,To(t.error)),ul.error(r({id:`P47EWZ`}),{description:To(t.error)}))},t[34]=r,t[35]=q,t[36]=Ee):Ee=t[36];let De=Ee,Oe;t[37]===i?Oe=t[38]:(Oe=()=>{i?.expandAll()},t[37]=i,t[38]=Oe);let ke=Oe,Ae;t[39]===i?Ae=t[40]:(Ae=()=>{i?.collapseAll()},t[39]=i,t[40]=Ae);let je=Ae,Me,Ne;t[41]!==ce||t[42]!==se||t[43]!==re||t[44]!==ie||t[45]!==ae||t[46]!==oe||t[47]!==v?(Me=()=>{let e={showHiddenFiles:re,showOkFolders:ie,showOnlyMarkdownFiles:ae,showSkillsSection:oe,canExpandAll:se,canCollapseAll:ce,sidebarVisible:v===`expanded`};L_(e),z&&z.editor.notifyViewMenuStateChanged(e)},Ne=[z,re,ie,ae,oe,se,ce,v],t[41]=ce,t[42]=se,t[43]=re,t[44]=ie,t[45]=ae,t[46]=oe,t[47]=v,t[48]=Me,t[49]=Ne):(Me=t[48],Ne=t[49]),(0,Q.useEffect)(Me,Ne);let Pe;t[50]!==r||t[51]!==l||t[52]!==K||t[53]!==G||t[54]!==g||t[55]!==De||t[56]!==re||t[57]!==ie||t[58]!==ae||t[59]!==oe||t[60]!==y||t[61]!==i||t[62]!==B?(Pe=()=>M(e=>{let t=l!==null&&Ul(i$(l));switch(e){case`new-doc`:if(!B||!i)return;i.startCreating(`file`,g);return;case`new-folder`:if(!B||!i)return;i.startCreating(`folder`,g);return;case`new-from-template`:if(!B||!i)return;i.startCreatingFromTemplate(g);return;case`rename`:if(!l||t)return;mY(l);return;case`duplicate`:if(!l||t)return;gY(l);return;case`move-to-trash`:if(!l||t)return;fY(l);return;case`reveal-in-finder`:{if(!z||!B)return;let e=r$(l,B);z.shell.showItemInFolder(e);return}case`send-to-ai`:{let e=Us.filter(e=>G[e.id]?.installed===!0);if(e.length===0){ul.error(r({id:`LKOLNn`}));return}let t=a$(l,B);if(!t)return;let[n]=e;if(!n)return;K(n.id,t);return}case`copy-full-path`:{if(!B)return;let e=r$(l,B);navigator.clipboard.writeText(e).then(()=>ul.success(r({id:`6_ZOw4`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),ul.error(r({id:`vfRlCI`}))});return}case`copy-relative-path`:{let e=i$(l);if(e===``){ul.error(r({id:`74eHt-`}));return}navigator.clipboard.writeText(e).then(()=>ul.success(r({id:`haHgQj`}),{description:e})).catch(e=>{console.warn(`[FileSidebar] clipboard write failed:`,e),ul.error(r({id:`5QGTaA`}))});return}case`toggle-show-ok-folders`:De({showOkFolders:!ie});return;case`toggle-show-hidden-files`:De({showHiddenFiles:!re});return;case`toggle-show-only-markdown-files`:De({showOnlyMarkdownFiles:!ae});return;case`toggle-show-skills-section`:De({showSkillsSection:!oe});return;case`expand-all-tree`:i?.expandAll();return;case`collapse-all-tree`:i?.collapseAll();return;case`toggle-sidebar`:y();return;case`delete`:case`toggle-source`:case`save-version`:case`version-history`:case`focus-search`:case`focus-command-palette`:case`close-active-tab-or-window`:case`toggle-doc-panel`:return}}),t[50]=r,t[51]=l,t[52]=K,t[53]=G,t[54]=g,t[55]=De,t[56]=re,t[57]=ie,t[58]=ae,t[59]=oe,t[60]=y,t[61]=i,t[62]=B,t[63]=Pe):Pe=t[63];let Fe;t[64]!==r||t[65]!==l||t[66]!==K||t[67]!==G||t[68]!==g||t[69]!==q||t[70]!==re||t[71]!==ie||t[72]!==ae||t[73]!==oe||t[74]!==y||t[75]!==i||t[76]!==B?(Fe=[z,i,B,l,g,q,re,ie,ae,oe,G,K,y,r],t[64]=r,t[65]=l,t[66]=K,t[67]=G,t[68]=g,t[69]=q,t[70]=re,t[71]=ie,t[72]=ae,t[73]=oe,t[74]=y,t[75]=i,t[76]=B,t[77]=Fe):Fe=t[77],(0,Q.useEffect)(Pe,Fe);let Ie=_&&x&&`motion-safe:delay-100`,Le=S&&`opacity-0`,Re;t[78]!==Ie||t[79]!==Le?(Re=X(`flex-row h-12 items-center py-0 px-3`,`justify-between`,_&&`overflow-x-clip`,_&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,Ie,Le,_&&`[-webkit-app-region:drag]`),t[78]=Ie,t[79]=Le,t[80]=Re):Re=t[80];let ze;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(ze=_?(0,Z.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`sidebar-traffic-light-reserve`,className:`w-[var(--ok-titlebar-reserve-left,0px)] shrink-0 self-stretch`}):null,t[81]=ze):ze=t[81];let Be;t[82]===x?Be=t[83]:(Be=x&&!_?(0,Z.jsx)(`span`,{className:`shrink-0 font-mono text-sm uppercase tracking-wider text-sidebar-foreground/50`,children:(0,Z.jsx)(J,{id:`sER-bs`})}):null,t[82]=x,t[83]=Be);let Ve;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=X(`flex items-center gap-1`,_&&`[&>*]:[-webkit-app-region:no-drag]`),t[84]=Ve):Ve=t[84];let He;t[85]===r?He=t[86]:(He=r({id:`Rq1vFD`}),t[85]=r,t[86]=He);let Ue;t[87]===He?Ue=t[88]:(Ue=(0,Z.jsx)(d$,{icon:Pm,label:He}),t[87]=He,t[88]=Ue);let We;t[89]!==se||t[90]!==i?(We=se?(0,Z.jsxs)(Gr,{onSelect:()=>i?.expandAll(),children:[(0,Z.jsx)(vh,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`OlAl5i`})]}):null,t[89]=se,t[90]=i,t[91]=We):We=t[91];let Ge;t[92]!==ce||t[93]!==i?(Ge=ce?(0,Z.jsxs)(Gr,{onSelect:()=>i?.collapseAll(),children:[(0,Z.jsx)(Sm,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`qvWGzP`})]}):null,t[92]=ce,t[93]=i,t[94]=Ge):Ge=t[94];let Ke;t[95]===le?Ke=t[96]:(Ke=le?(0,Z.jsx)(Vr,{}):null,t[95]=le,t[96]=Ke);let qe;t[97]===r?qe=t[98]:(qe=r({id:`8vETh9`}),t[97]=r,t[98]=qe);let Je;t[99]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Z.jsx)(ni,{children:(0,Z.jsx)(J,{id:`8vETh9`})}),t[99]=Je):Je=t[99];let Ye;t[100]===De?Ye=t[101]:(Ye=e=>De({showHiddenFiles:e}),t[100]=De,t[101]=Ye);let Ze=q===null,Qe;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=(0,Z.jsx)(J,{id:`6KCH4m`}),t[102]=Qe):Qe=t[102];let $e;t[103]!==re||t[104]!==Ye||t[105]!==Ze?($e=(0,Z.jsx)(Zr,{checked:re,onCheckedChange:Ye,disabled:Ze,"data-testid":`tree-options-show-hidden-files`,children:Qe}),t[103]=re,t[104]=Ye,t[105]=Ze,t[106]=$e):$e=t[106];let et;t[107]===De?et=t[108]:(et=e=>De({showOkFolders:e}),t[107]=De,t[108]=et);let tt=q===null,nt;t[109]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,Z.jsx)(J,{id:`ELYtNJ`}),t[109]=nt):nt=t[109];let rt;t[110]!==ie||t[111]!==et||t[112]!==tt?(rt=(0,Z.jsx)(Zr,{checked:ie,onCheckedChange:et,disabled:tt,"data-testid":`tree-options-show-ok-folders`,children:nt}),t[110]=ie,t[111]=et,t[112]=tt,t[113]=rt):rt=t[113];let it;t[114]===De?it=t[115]:(it=e=>De({showOnlyMarkdownFiles:e}),t[114]=De,t[115]=it);let at=q===null,ot;t[116]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,Z.jsx)(J,{id:`5-o4kO`}),t[116]=ot):ot=t[116];let st;t[117]!==ae||t[118]!==it||t[119]!==at?(st=(0,Z.jsx)(Zr,{checked:ae,onCheckedChange:it,disabled:at,"data-testid":`tree-options-show-only-markdown-files`,children:ot}),t[117]=ae,t[118]=it,t[119]=at,t[120]=st):st=t[120];let ct;t[121]===De?ct=t[122]:(ct=e=>De({showSkillsSection:e}),t[121]=De,t[122]=ct);let lt=q===null,ut;t[123]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,Z.jsx)(J,{id:`PCSkw2`}),t[123]=ut):ut=t[123];let dt;t[124]!==oe||t[125]!==ct||t[126]!==lt?(dt=(0,Z.jsx)(Zr,{checked:oe,onCheckedChange:ct,disabled:lt,"data-testid":`tree-options-show-skills`,children:ut}),t[124]=oe,t[125]=ct,t[126]=lt,t[127]=dt):dt=t[127];let ft;t[128]!==qe||t[129]!==$e||t[130]!==rt||t[131]!==st||t[132]!==dt?(ft=(0,Z.jsxs)(Kr,{"aria-label":qe,children:[Je,$e,rt,st,dt]}),t[128]=qe,t[129]=$e,t[130]=rt,t[131]=st,t[132]=dt,t[133]=ft):ft=t[133];let pt;t[134]!==We||t[135]!==Ge||t[136]!==Ke||t[137]!==ft?(pt=(0,Z.jsxs)(qr,{align:`end`,className:`min-w-52`,"data-testid":`tree-options-menu`,children:[We,Ge,Ke,ft]}),t[134]=We,t[135]=Ge,t[136]=Ke,t[137]=ft,t[138]=pt):pt=t[138];let mt;t[139]!==Ue||t[140]!==pt?(mt=(0,Z.jsxs)($r,{children:[Ue,pt]}),t[139]=Ue,t[140]=pt,t[141]=mt):mt=t[141];let ht;t[142]===r?ht=t[143]:(ht=r({id:`HdkSiO`}),t[142]=r,t[143]=ht);let gt;t[144]!==g||t[145]!==i?(gt=()=>i?.startCreating(`file`,g),t[144]=g,t[145]=i,t[146]=gt):gt=t[146];let _t;t[147]!==ht||t[148]!==gt?(_t=(0,Z.jsx)(u$,{icon:ih,label:ht,onClick:gt}),t[147]=ht,t[148]=gt,t[149]=_t):_t=t[149];let vt;t[150]!==r||t[151]!==R||t[152]!==g||t[153]!==i?(vt=R?(0,Z.jsxs)($r,{children:[(0,Z.jsx)(d$,{icon:ta,label:r({id:`Uuj_R4`})}),(0,Z.jsx)(qr,{align:`end`,className:`min-w-52`,onCloseAutoFocus:fe,children:(0,Z.jsx)(iY,{parentDir:g,onSelectTemplate:e=>{ue.current=!0,i?.createFromTemplate(g,e)},ItemComponent:Gr})})]}):null,t[150]=r,t[151]=R,t[152]=g,t[153]=i,t[154]=vt):vt=t[154];let yt;t[155]===r?yt=t[156]:(yt=r({id:`96G6Re`}),t[155]=r,t[156]=yt);let bt;t[157]!==g||t[158]!==i?(bt=()=>i?.startCreating(`folder`,g),t[157]=g,t[158]=i,t[159]=bt):bt=t[159];let xt;t[160]!==yt||t[161]!==bt?(xt=(0,Z.jsx)(u$,{icon:wm,label:yt,onClick:bt}),t[160]=yt,t[161]=bt,t[162]=xt):xt=t[162];let St;t[163]!==mt||t[164]!==_t||t[165]!==vt||t[166]!==xt?(St=(0,Z.jsxs)(`div`,{"data-testid":`sidebar-toolbar`,className:Ve,children:[mt,_t,vt,xt]}),t[163]=mt,t[164]=_t,t[165]=vt,t[166]=xt,t[167]=St):St=t[167];let Ct;t[168]!==Re||t[169]!==Be||t[170]!==St?(Ct=(0,Z.jsxs)(qM,{"data-electron-drag":_?``:void 0,className:Re,children:[ze,Be,St]}),t[168]=Re,t[169]=Be,t[170]=St,t[171]=Ct):Ct=t[171];let wt=_&&x&&`motion-safe:delay-100`,Tt=S&&`opacity-0`,Et;t[172]!==wt||t[173]!==Tt?(Et=X(`px-2 pb-2`,_&&`[-webkit-app-region:no-drag]`,_&&`motion-safe:transition-opacity motion-safe:duration-100 motion-safe:ease-out`,wt,Tt),t[172]=wt,t[173]=Tt,t[174]=Et):Et=t[174];let Dt;t[175]===v?Dt=t[176]:(Dt=[v],t[175]=v,t[176]=Dt);let Ot;t[177]===n?Ot=t[178]:(Ot=(0,Z.jsx)(sQ,{onClick:n}),t[177]=n,t[178]=Ot);let kt;t[179]!==Dt||t[180]!==Ot?(kt=(0,Z.jsx)(I,{fallbackRender:p$,onError:oQ,resetKeys:Dt,children:Ot}),t[179]=Dt,t[180]=Ot,t[181]=kt):kt=t[181];let At;t[182]!==Et||t[183]!==kt?(At=(0,Z.jsx)(`div`,{className:Et,children:kt}),t[182]=Et,t[183]=kt,t[184]=At):At=t[184];let Mt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(Mt=(0,Z.jsx)(BL,{}),t[185]=Mt):Mt=t[185];let Nt;t[186]===Symbol.for(`react.memo_cache_sentinel`)?(Nt=(0,Z.jsx)(Sc,{className:`size-3.5 shrink-0`}),t[186]=Nt):Nt=t[186];let Pt;t[187]===W?Pt=t[188]:(Pt=(0,Z.jsx)(`span`,{className:`truncate`,children:W}),t[187]=W,t[188]=Pt);let Ft;t[189]===Symbol.for(`react.memo_cache_sentinel`)?(Ft=(0,Z.jsx)(Ns,{className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]/files:rotate-90`}),t[189]=Ft):Ft=t[189];let It;t[190]===Pt?It=t[191]:(It=(0,Z.jsx)(ZM,{asChild:!0,className:`shrink-0`,children:(0,Z.jsxs)(Tn,{"data-sidebar-root-context":!0,className:`flex w-full items-center gap-1.5`,children:[Nt,Pt,Ft]})}),t[190]=Pt,t[191]=It);let Lt=o==null?`50vh`:`${o}px`,Rt;t[192]===Lt?Rt=t[193]:(Rt={height:Lt},t[192]=Lt,t[193]=Rt);let zt;t[194]===Symbol.for(`react.memo_cache_sentinel`)?(zt=(0,Z.jsx)(MX,{ref:a,onContentHeightChange:s}),t[194]=zt):zt=t[194];let Bt;t[195]===Rt?Bt=t[196]:(Bt=(0,Z.jsx)(wn,{className:`flex max-h-[70vh] flex-col overflow-hidden`,style:Rt,children:zt}),t[195]=Rt,t[196]=Bt);let Vt;t[197]!==It||t[198]!==Bt?(Vt=(0,Z.jsx)(En,{defaultOpen:!0,className:`group/files flex shrink-0 flex-col`,children:(0,Z.jsxs)(XM,{className:`min-h-0 px-0`,children:[It,Bt]})}),t[197]=It,t[198]=Bt,t[199]=Vt):Vt=t[199];let Ht;t[200]===oe?Ht=t[201]:(Ht=oe?(0,Z.jsx)(cQ,{}):null,t[200]=oe,t[201]=Ht);let Ut;t[202]===i?Ut=t[203]:(Ut=(0,Z.jsx)(`div`,{"aria-hidden":!0,"data-sidebar-empty-deselect":!0,className:`min-h-8 flex-1 cursor-default`,onClick:()=>i?.clearCreationTarget()}),t[202]=i,t[203]=Ut);let Wt;t[204]!==Vt||t[205]!==Ht||t[206]!==Ut?(Wt=(0,Z.jsxs)(YM,{children:[Mt,Vt,Ht,Ut]}),t[204]=Vt,t[205]=Ht,t[206]=Ut,t[207]=Wt):Wt=t[207];let Gt;t[208]===Symbol.for(`react.memo_cache_sentinel`)?(Gt=(0,Z.jsxs)(JM,{className:`px-0`,children:[(0,Z.jsx)(kZ,{}),(0,Z.jsx)(n$,{}),typeof window<`u`&&window.okDesktop?(0,Z.jsx)(eN,{children:(0,Z.jsx)(tN,{children:(0,Z.jsx)(ZZ,{bridge:window.okDesktop})})}):null]}),t[208]=Gt):Gt=t[208];let Kt=!(b&&v===`collapsed`),qt;t[209]===Kt?qt=t[210]:(qt=(0,Z.jsx)(GM,{enableToggle:!1,enableDrag:Kt}),t[209]=Kt,t[210]=qt);let Jt;t[211]!==Ct||t[212]!==At||t[213]!==Wt||t[214]!==qt?(Jt=(0,Z.jsx)(cF,{asChild:!0,children:(0,Z.jsxs)(`div`,{className:`contents`,onContextMenu:pe,children:[Ct,At,Wt,Gt,qt]})}),t[211]=Ct,t[212]=At,t[213]=Wt,t[214]=qt,t[215]=Jt):Jt=t[215];let Yt=!B,Xt,Zt;t[216]===Symbol.for(`react.memo_cache_sentinel`)?(Xt=(0,Z.jsx)(ih,{"aria-hidden":`true`}),Zt=(0,Z.jsx)(J,{id:`HdkSiO`}),t[216]=Xt,t[217]=Zt):(Xt=t[216],Zt=t[217]);let Qt;t[218]!==he||t[219]!==Yt?(Qt=(0,Z.jsxs)(fF,{disabled:Yt,onSelect:he,"data-testid":`empty-space-menu-new-file`,children:[Xt,Zt]}),t[218]=he,t[219]=Yt,t[220]=Qt):Qt=t[220];let $t;t[221]!==_e||t[222]!==L||t[223]!==B?($t=L?(0,Z.jsxs)(uF,{children:[(0,Z.jsxs)(pF,{disabled:!B,"data-testid":`empty-space-menu-new-from-template`,children:[(0,Z.jsx)(ta,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`Uuj_R4`})]}),(0,Z.jsx)(mF,{children:(0,Z.jsx)(iY,{parentDir:``,onSelectTemplate:_e,ItemComponent:fF})})]}):null,t[221]=_e,t[222]=L,t[223]=B,t[224]=$t):$t=t[224];let en=!B,tn,nn;t[225]===Symbol.for(`react.memo_cache_sentinel`)?(tn=(0,Z.jsx)(wm,{"aria-hidden":`true`}),nn=(0,Z.jsx)(J,{id:`96G6Re`}),t[225]=tn,t[226]=nn):(tn=t[225],nn=t[226]);let rn;t[227]!==ye||t[228]!==en?(rn=(0,Z.jsxs)(fF,{disabled:en,onSelect:ye,"data-testid":`empty-space-menu-new-folder`,children:[tn,nn]}),t[227]=ye,t[228]=en,t[229]=rn):rn=t[229];let an;t[230]===Symbol.for(`react.memo_cache_sentinel`)?(an=(0,Z.jsx)(_F,{}),t[230]=an):an=t[230];let on;t[231]!==r||t[232]!==xe||t[233]!==B?(on=z?(0,Z.jsxs)(fF,{disabled:!B,onSelect:xe,"data-testid":`empty-space-menu-reveal-in-finder`,"aria-label":r(B?{id:`LtSYdi`}:{id:`o2yoFu`}),children:[(0,Z.jsx)(Sc,{"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(J,{id:`LtSYdi`})}),B?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(J,{id:`wTcjov`})})]}):null,t[231]=r,t[232]=xe,t[233]=B,t[234]=on):on=t[234];let sn;t[235]!==K||t[236]!==te||t[237]!==G?(sn=(0,Z.jsx)(_Z,{input:te,installStates:G,dispatch:K}),t[235]=K,t[236]=te,t[237]=G,t[238]=sn):sn=t[238];let cn;t[239]!==Te||t[240]!==H?(cn=H?(0,Z.jsxs)(fF,{onSelect:Te,"data-testid":`empty-space-menu-share`,children:[(0,Z.jsx)($m,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`Z8lGw6`})]}):null,t[239]=Te,t[240]=H,t[241]=cn):cn=t[241];let ln=!B,un;t[242]!==r||t[243]!==B?(un=r(B?{id:`Up2_7p`}:{id:`U8CD-l`}),t[242]=r,t[243]=B,t[244]=un):un=t[244];let Y;t[245]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Z.jsx)(bc,{"aria-hidden":`true`}),t[245]=Y):Y=t[245];let dn;t[246]===Symbol.for(`react.memo_cache_sentinel`)?(dn=(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(J,{id:`Up2_7p`})}),t[246]=dn):dn=t[246];let fn;t[247]===B?fn=t[248]:(fn=B?null:(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:(0,Z.jsx)(J,{id:`wTcjov`})}),t[247]=B,t[248]=fn);let pn;t[249]!==Ce||t[250]!==ln||t[251]!==un||t[252]!==fn?(pn=(0,Z.jsxs)(fF,{disabled:ln,onSelect:Ce,"data-testid":`empty-space-menu-copy-full-path`,"aria-label":un,children:[Y,dn,fn]}),t[249]=Ce,t[250]=ln,t[251]=un,t[252]=fn,t[253]=pn):pn=t[253];let mn;t[254]===Symbol.for(`react.memo_cache_sentinel`)?(mn=(0,Z.jsx)(_F,{}),t[254]=mn):mn=t[254];let hn;t[255]===De?hn=t[256]:(hn=e=>De({showHiddenFiles:e}),t[255]=De,t[256]=hn);let gn=q===null,_n;t[257]===Symbol.for(`react.memo_cache_sentinel`)?(_n=(0,Z.jsx)(J,{id:`XcGbim`}),t[257]=_n):_n=t[257];let vn;t[258]!==re||t[259]!==hn||t[260]!==gn?(vn=(0,Z.jsx)(hF,{checked:re,onCheckedChange:hn,disabled:gn,"data-testid":`empty-space-menu-show-hidden-files`,children:_n}),t[258]=re,t[259]=hn,t[260]=gn,t[261]=vn):vn=t[261];let yn;t[262]===De?yn=t[263]:(yn=e=>De({showOkFolders:e}),t[262]=De,t[263]=yn);let bn=q===null,xn;t[264]===Symbol.for(`react.memo_cache_sentinel`)?(xn=(0,Z.jsx)(J,{id:`GHsJb8`}),t[264]=xn):xn=t[264];let Sn;t[265]!==ie||t[266]!==yn||t[267]!==bn?(Sn=(0,Z.jsx)(hF,{checked:ie,onCheckedChange:yn,disabled:bn,"data-testid":`empty-space-menu-show-ok-folders`,children:xn}),t[265]=ie,t[266]=yn,t[267]=bn,t[268]=Sn):Sn=t[268];let Cn;t[269]===De?Cn=t[270]:(Cn=e=>De({showOnlyMarkdownFiles:e}),t[269]=De,t[270]=Cn);let Dn=q===null,On;t[271]===Symbol.for(`react.memo_cache_sentinel`)?(On=(0,Z.jsx)(J,{id:`WkTLN7`}),t[271]=On):On=t[271];let kn;t[272]!==ae||t[273]!==Cn||t[274]!==Dn?(kn=(0,Z.jsx)(hF,{checked:ae,onCheckedChange:Cn,disabled:Dn,"data-testid":`empty-space-menu-show-only-markdown-files`,children:On}),t[272]=ae,t[273]=Cn,t[274]=Dn,t[275]=kn):kn=t[275];let An;t[276]===De?An=t[277]:(An=e=>De({showSkillsSection:e}),t[276]=De,t[277]=An);let jn=q===null,Mn;t[278]===Symbol.for(`react.memo_cache_sentinel`)?(Mn=(0,Z.jsx)(J,{id:`NF_Wcg`}),t[278]=Mn):Mn=t[278];let Nn;t[279]!==oe||t[280]!==An||t[281]!==jn?(Nn=(0,Z.jsx)(hF,{checked:oe,onCheckedChange:An,disabled:jn,"data-testid":`empty-space-menu-show-skills-section`,children:Mn}),t[279]=oe,t[280]=An,t[281]=jn,t[282]=Nn):Nn=t[282];let Pn;t[283]===le?Pn=t[284]:(Pn=le?(0,Z.jsx)(_F,{}):null,t[283]=le,t[284]=Pn);let Fn;t[285]!==ke||t[286]!==se?(Fn=se?(0,Z.jsxs)(fF,{onSelect:ke,"data-testid":`empty-space-menu-expand-all`,children:[(0,Z.jsx)(vh,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`OlAl5i`})]}):null,t[285]=ke,t[286]=se,t[287]=Fn):Fn=t[287];let In;t[288]!==je||t[289]!==ce?(In=ce?(0,Z.jsxs)(fF,{onSelect:je,"data-testid":`empty-space-menu-collapse-all`,children:[(0,Z.jsx)(Sm,{"aria-hidden":`true`}),(0,Z.jsx)(J,{id:`qvWGzP`})]}):null,t[288]=je,t[289]=ce,t[290]=In):In=t[290];let Ln;t[291]!==cn||t[292]!==pn||t[293]!==vn||t[294]!==Sn||t[295]!==kn||t[296]!==Nn||t[297]!==Pn||t[298]!==Fn||t[299]!==In||t[300]!==Qt||t[301]!==$t||t[302]!==rn||t[303]!==on||t[304]!==sn?(Ln=(0,Z.jsxs)(dF,{className:`min-w-52`,onCloseAutoFocus:fe,children:[Qt,$t,rn,an,on,sn,cn,pn,mn,vn,Sn,kn,Nn,Pn,Fn,In]}),t[291]=cn,t[292]=pn,t[293]=vn,t[294]=Sn,t[295]=kn,t[296]=Nn,t[297]=Pn,t[298]=Fn,t[299]=In,t[300]=Qt,t[301]=$t,t[302]=rn,t[303]=on,t[304]=sn,t[305]=Ln):Ln=t[305];let Rn;return t[306]!==Ln||t[307]!==Jt?(Rn=(0,Z.jsx)(UM,{variant:`inset`,children:(0,Z.jsxs)(sF,{children:[Jt,Ln]})}),t[306]=Ln,t[307]=Jt,t[308]=Rn):Rn=t[308],Rn}function p$(){return null}function m$(e){return console.log(e)}function h$(e){return ul.error(e)}function g$(e){return ul.success(e)}function _$(e){e.target instanceof Element&&e.target.closest(`[data-sidebar-root-context]`)||c$(e.target)&&(e.preventDefault(),e.stopPropagation())}var v$=(0,Q.lazy)(()=>n(()=>import(`./McpConsentDialogBody-DIH6Ms1u.js`),__vite__mapDeps([115,1,6,2,3,7,8,9,10,11,12,13,14,15,16,17,18,19,20,91,22,43,77,78,28,116]),import.meta.url));function y$(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(Id.subscribe,x$,b$))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(v$,{})}),e[0]=t):t=e[0],t}function b$(){return!1}function x$(){return Id.getSnapshot()!==null}function S$(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(!1),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>M(e=>{e===`report-bug`&&n(!0)}),i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a=(0,Z.jsx)(jf,{open:t,onOpenChange:n}),e[2]=t,e[3]=a),a}function C$(){let e=(0,$.c)(17),t=en(),{collabUrl:n,setSystemProvider:r,updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}=Xe(),l;e[0]!==o||e[1]!==s||e[2]!==a||e[3]!==c||e[4]!==i?(l={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c},e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=i,e[5]=l):l=e[5];let u=(0,Q.useRef)(l),d;e[6]!==o||e[7]!==s||e[8]!==a||e[9]!==c||e[10]!==i?(d=()=>{u.current={updateServerInstanceId:i,onBranchSwitched:a,observeBranch:o,observeDiskAck:s,refreshServerInfo:c}},e[6]=o,e[7]=s,e[8]=a,e[9]=c,e[10]=i,e[11]=d):d=e[11],(0,Q.useEffect)(d);let f,p;return e[12]!==n||e[13]!==t||e[14]!==r?(f=()=>{if(n===null)return;let e=new gu,i=new mu({url:n,name:Ta,document:e,onStateless:e=>{let{payload:t}=e;L(t,{onServerInfo:e=>{u.current.updateServerInstanceId(e.serverInstanceId),e.currentBranch!==void 0&&u.current.observeBranch(e.currentBranch)},onBranchSwitched:e=>{u.current.onBranchSwitched(e.branch)},onDiskAck:e=>{u.current.observeDiskAck(e.docName,e.sv)},onDerivedView:k$,onConfigValidationRejected:O$,onConfigIgnoreNestedError:D$,onUnknown:E$})},onClose:T$,onDisconnect:w$}),a=Yl(e=>{(e.includes(`files`)||e.includes(`backlinks`))&&(t.invalidateQueries({queryKey:[`backlinks`]}),t.invalidateQueries({queryKey:[`forward-links`]})),(e.includes(`files`)||e.includes(`graph`))&&(t.invalidateQueries({queryKey:[`orphans`]}),t.invalidateQueries({queryKey:[`hubs`]}))}),o=b(()=>{u.current.refreshServerInfo()});i.on(`synced`,()=>{Jl([`files`,`backlinks`,`graph`]),o()});let s=new Set,c=()=>{if(i.awareness)for(let[e,t]of i.awareness.getStates().entries())s.has(e)||t.user?.type===`agent`&&(s.add(e),console.warn(`[agent-presence] observed stale AwarenessUser.type === 'agent' from clientID ${e} — probably a stale bundled client`))};return i.awareness?.on(`change`,c),r(i),()=>{a(),i.awareness?.off(`change`,c),r(null),i.destroy(),e.destroy()}},p=[t,n,r],e[12]=n,e[13]=t,e[14]=r,e[15]=f,e[16]=p):(f=e[15],p=e[16]),(0,Q.useEffect)(f,p),null}function w$(){console.warn(`[CC1] __system__ disconnected - derived views may be stale`)}function T$(e){let{event:t}=e;console.warn(`[CC1] __system__ connection closed:`,t.code,t.reason)}function E$(e){console.warn(`[CC1] Unparseable stateless payload, skipping:`,e.slice(0,100))}function D$(e){Mi(e)}function O$(e){Yi(e)}function k$(e){Jl([e.ch])}function A$(e){let t=tt(e);if(t)return{scope:`project`,name:t};let n=wa(e);return n?.kind===`skill`?{scope:n.scope,name:n.name}:null}function j$(e,t){let n=new Set(t.map(e=>`${e.scope}\u0000${e.name}`)),r=[];for(let t of e){let e=A$(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`;n.has(`${i}\u0000${e.name}`)?r.push({kind:`retarget`,fromDocName:t,toDocName:ma(i,e.name)}):r.push({kind:`close`,docName:t})}return r}function M$(){let e=(0,$.c)(13),{openTabs:t,closeDocument:n}=Xe(),r;e[0]===t?r=e[1]:(r=t.some(P$),e[0]=t,e[1]=r);let i=r,a;e[2]===i?a=e[3]:(a={enabled:i},e[2]=i,e[3]=a);let o=Qs(a),s=(0,Q.useRef)(null),c;e[4]!==n||e[5]!==t||e[6]!==o.data||e[7]!==o.status?(c=()=>{if(o.status!==`ready`)return;let e=o.data,r=`${t.join(``)}\u0002${e.map(N$).sort().join(``)}`;if(s.current===r)return;s.current=r;let i=j$(t,e);for(let e of i)e.kind===`retarget`?(Pc(e.toDocName),n(e.fromDocName)):n(e.docName)},e[4]=n,e[5]=t,e[6]=o.data,e[7]=o.status,e[8]=c):c=e[8];let l;e[9]!==n||e[10]!==t||e[11]!==o?(l=[o,t,n],e[9]=n,e[10]=t,e[11]=o,e[12]=l):l=e[12],(0,Q.useEffect)(c,l)}function N$(e){return`${e.scope}\u0000${e.name}`}function P$(e){return A$(e)!==null}var F$=1e3,I$=3e4;function L$(e){let t=e.scheduler??{setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e)},n=e.initialBackoffMs??F$,r=e.maxBackoffMs??I$,i=e.rng??Math.random,a=e.createWebSocket??(e=>new WebSocket(e)),o=e.logger??null,s=e.log,c=null,l=null,u=!1,d=n;function f(e,t,n){try{o?o[e](t,n):s?.(t)}catch{}}function p(){if(u)return;l!==null&&t.clearTimeout(l);let e=d;d=Math.min(d*2,r);let n=i(),a=Math.max(1,Math.floor(e*(1-n/2)));f(`debug`,`scheduling reconnect`,{backoffMs:a,ceilMs:e}),l=t.setTimeout(()=>{l=null,m().catch(e=>f(`warn`,`reconnect failed`,{error:String(e)}))},a)}async function m(){if(u)return;let t;try{t=await e.resolveWsUrl()}catch(e){f(`warn`,`resolveWsUrl threw`,{error:String(e)}),p();return}if(!t){p();return}let r=[];e.pid!==void 0&&r.push(`pid=${encodeURIComponent(String(e.pid))}`),e.connectionId&&r.push(`connectionId=${encodeURIComponent(e.connectionId)}`),e.connectionId&&e.displayName!==void 0&&e.clientName!==void 0&&e.colorSeed!==void 0&&(r.push(`displayName=${encodeURIComponent(e.displayName)}`),r.push(`clientName=${encodeURIComponent(e.clientName)}`),r.push(`colorSeed=${encodeURIComponent(e.colorSeed)}`));let i=r.length>0?`?${r.join(`&`)}`:``,o=`${t}/collab/keepalive${i}`;try{c=a(o)}catch(e){f(`warn`,`WebSocket constructor failed`,{url:o,error:String(e)}),c=null,p();return}c.addEventListener(`open`,()=>{f(`info`,`connected`,{url:t}),d=n}),c.addEventListener(`close`,()=>{u||(f(`info`,`disconnected`,{url:t}),c=null,p())}),c.addEventListener(`error`,()=>{f(`debug`,`websocket error observed`,{url:t,readyState:c?.readyState,reason:`error-event`})})}return queueMicrotask(()=>{m().catch(e=>f(`warn`,`initial connect failed`,{error:String(e)}))}),{close:()=>{if(!u&&(u=!0,l!==null&&(t.clearTimeout(l),l=null),c)){try{c.close()}catch{}c=null}},isConnected:()=>c!==null&&c.readyState===1}}function R$(e){if(e)return e.replace(/\/collab\/?$/,``)}function z$(){return P(window)!==null}function B$(e,t){let n=(0,$.c)(5),r=(0,Q.useRef)(e),i=(0,Q.useRef)(t),a,o;n[0]===e?(a=n[1],o=n[2]):(a=()=>{r.current=e},o=[e],n[0]=e,n[1]=a,n[2]=o),(0,Q.useEffect)(a,o);let s,c;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=i.current?.startKeepalive??L$;if((i.current?.isElectronHost??z$)())return;let t=e({resolveWsUrl:async()=>R$(r.current)});return()=>t.close()},c=[],n[3]=s,n[4]=c):(s=n[3],c=n[4]),(0,Q.useEffect)(s,c)}var V$=(0,Q.lazy)(()=>n(()=>import(`./ShareBranchSwitchDialog-BU6DMxX1.js`).then(e=>({default:e.ShareBranchSwitchDialog})),__vite__mapDeps([117,1,9,10,15,19,14,16,20,72,24,118,78,119,120,121,6,2,3,7,8,122]),import.meta.url)),H$=(0,Q.lazy)(()=>n(()=>import(`./ShareReceiveMissDialog-yXLs8-wZ.js`).then(e=>({default:e.ShareReceiveMissDialog})),__vite__mapDeps([123,1,19,9,10,14,15,16,20,124,94,6,2,3,7,8,65,51,66,67,76,78,47,43,18,68,77,24,118,96,25,28,46]),import.meta.url)),U$=`#install-claude-desktop`,W$=/\.(md|mdx)$/i;function G$(e){return e===`#settings`||e===U$}function K$(e,t){if(!W$.test(e))return null;for(let n of t){let t=Qe(n);if(t.kind===`doc`&&t.docName===e)return{kind:`doc`,target:e,docName:e}}return null}function q$(e,t,n,r){return[e,t,n,r].map(e=>[...e].sort().join(`\0`)).join(``)}function J$(){let e=(0,$.c)(26),{clearTarget:t,openTabs:n,syncOpenTabsWithKnownTargets:r,tabSessionLoaded:i}=Xe(),{openTargetTransition:a}=st();M$();let{assetPaths:o,filePaths:s,folderPaths:c,loading:l,pageMeta:u,pages:d,pagesBySlug:f,pagesByBasename:p}=Ls(),m=(0,Q.useRef)(null),h;e[0]!==o||e[1]!==s||e[2]!==c||e[3]!==d?(h=q$(d,c,o,s),e[0]=o,e[1]=s,e[2]=c,e[3]=d,e[4]=h):h=e[4];let g=h,_,v;e[5]!==o||e[6]!==s||e[7]!==c||e[8]!==l||e[9]!==d||e[10]!==r||e[11]!==i||e[12]!==g?(_=()=>{l||!i||m.current===g||(m.current=g,r({pages:d,folderPaths:c,assetPaths:o,filePaths:s}))},v=[o,s,c,l,d,r,i,g],e[5]=o,e[6]=s,e[7]=c,e[8]=l,e[9]=d,e[10]=r,e[11]=i,e[12]=g,e[13]=_,e[14]=v):(_=e[13],v=e[14]),(0,Q.useEffect)(_,v);let y,b;return e[15]!==t||e[16]!==c||e[17]!==l||e[18]!==n||e[19]!==a||e[20]!==u||e[21]!==d||e[22]!==p||e[23]!==f?(y=()=>{e();function e(){if(G$(window.location.hash))return;let e=cu(window.location.hash);if(e){let t=Ko(e.split(`.`).pop()??``);$l(`ok/nav/hash-change`,{docName:null,kind:`asset`}),a({kind:`asset`,target:e,assetPath:e,mediaKind:t});return}let r=au(window.location.hash);if(r){$l(`ok/nav/hash-change`,{docName:null,kind:`skill-file`}),a({kind:`skill-file`,target:`${r.scope}/${r.name}/${r.path}`,scope:r.scope,name:r.name,path:r.path});return}if(pu(window.location.hash)){$l(`ok/nav/hash-change`,{docName:null,kind:`folder`}),a({kind:`folder`,target:``,folderPath:``});return}let i=uu(window.location.hash);if(!i){$l(`ok/nav/hash-change`,{docName:null,kind:`clear`}),t();return}if(l){$l(`ok/nav/hash-change`,{docName:i,kind:`deferred-loading`});return}let o=K$(i,n)??Bl(i,{pages:d,folderPaths:c,pagesBySlug:f,pagesByBasename:p});if(o.kind===`missing`&&/\/+$/.test(i.trim())){$l(`ok/nav/hash-change`,{docName:i,kind:`deferred-missing-folder`});return}let s=Hl(Vl(o),u);$l(`ok/nav/hash-change`,{docName:i,kind:s.kind}),a(s)}return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},b=[t,c,l,a,n,u,d,f,p],e[15]=t,e[16]=c,e[17]=l,e[18]=n,e[19]=a,e[20]=u,e[21]=d,e[22]=p,e[23]=f,e[24]=y,e[25]=b):(y=e[24],b=e[25]),(0,Q.useEffect)(y,b),null}function Y$(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,Q.useEffect)(X$,t),null}function X$(){let e=function(e){let t=e.target;Zi({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),window.location.hash!==`#settings`&&(window.location.hash=Ki))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}function Z$(){let e=(0,$.c)(4),{activeTarget:t}=Xe(),n=typeof window<`u`?window.okDesktop??null:null,r=t?.kind===`doc`||t?.kind===`folder`||t?.kind===`asset`?t.kind:null,i=t?.kind===`doc`?t.docName:t?.kind===`folder`?t.folderPath:t?.kind===`asset`?t.assetPath:null,a,o;return e[0]!==i||e[1]!==r?(a=()=>{if(n){if(r===null){n.editor.notifyActiveTargetChanged({kind:null});return}i!==null&&n.editor.notifyActiveTargetChanged({kind:r,identifier:i})}},o=[n,r,i],e[0]=i,e[1]=r,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,Q.useEffect)(a,o),null}function Q$(){let e=(0,$.c)(8),{activeDocName:t,activeTarget:n}=Xe(),[r,i]=(0,Q.useState)(!1),a;e[0]!==t||e[1]!==n?(a=n?.kind===`folder`?n.folderPath:Fl(t),e[0]=t,e[1]=n,e[2]=a):a=e[2];let o=a,s,c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=function(e){let t=e.target;Hg({target:t,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,key:e.key})&&(e.preventDefault(),i(!0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},c=[],e[3]=s,e[4]=c):(s=e[3],c=e[4]),(0,Q.useEffect)(s,c);let l;return e[5]!==r||e[6]!==o?(l=(0,Z.jsx)(Wg,{open:r,onOpenChange:i,kind:`file`,initialDir:o}),e[5]=r,e[6]=o,e[7]=l):l=e[7],l}function $$(e){let t=(0,$.c)(3),{children:n}=e,{collabUrl:r}=Xe();B$(r);let i;return t[0]!==n||t[1]!==r?(i=(0,Z.jsx)(vu,{collabUrl:r,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function e1(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(eu,{name:`app`,children:(0,Z.jsx)(pt,{children:(0,Z.jsx)($$,{children:(0,Z.jsx)(A_,{children:(0,Z.jsx)(t1,{})})})})}),e[0]=t):t=e[0],t}function t1(){let e=(0,$.c)(29),t=typeof window<`u`?window.okDesktop??null:null,n=typeof window<`u`&&window.okDesktop!=null,[r,i]=(0,Q.useState)(!1),a=N_(),o=Dv(),s;e[0]===o?s=e[1]:(s=t?{launchInTerminal:n1,installedClis:o}:null,e[0]=o,e[1]=s);let c=s,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(fv,{}),e[2]=l):l=e[2];let u,d,f,p;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(C$,{}),d=(0,Z.jsx)(J$,{}),f=(0,Z.jsx)(Z$,{}),p=(0,Z.jsx)(Q$,{}),e[3]=u,e[4]=d,e[5]=f,e[6]=p):(u=e[3],d=e[4],f=e[5],p=e[6]);let m;e[7]===a?m=e[8]:(m=!a&&(0,Z.jsx)(Y$,{}),e[7]=a,e[8]=m);let h,g,_,v,y;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=!1,v=t?(0,Z.jsx)(pv,{bridge:t}):null,y=t?(0,Z.jsx)(S$,{}):null,h=(0,Z.jsx)(y$,{}),g=t?(0,Z.jsxs)(Q.Suspense,{fallback:null,children:[(0,Z.jsx)(V$,{bridge:t}),(0,Z.jsx)(H$,{})]}):null,e[9]=h,e[10]=g,e[11]=_,e[12]=v,e[13]=y):(h=e[9],g=e[10],_=e[11],v=e[12],y=e[13]);let b;e[14]===r?b=e[15]:(b=(0,Z.jsx)(tv,{bridge:t,open:r,onOpenChange:i}),e[14]=r,e[15]=b);let x;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=n&&(0,Z.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`editor-window-chrome-drag-strip`,"data-electron-drag":``,className:`pointer-events-none fixed inset-x-0 top-0 z-50 h-2 [-webkit-app-region:drag]`}),e[16]=x):x=e[16];let S;e[17]===a?S=e[18]:(S=!a&&(0,Z.jsx)(l$,{onOpenSearch:()=>i(!0)}),e[17]=a,e[18]=S);let C;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(KM,{className:`overflow-hidden h-[calc(100vh-var(--layout-inset-offset))]`,children:(0,Z.jsx)(FL,{onOpenSearch:()=>i(!0)})}),e[19]=C):C=e[19];let w;e[20]===S?w=e[21]:(w=(0,Z.jsxs)(BM,{className:`h-screen overflow-hidden`,children:[S,C]}),e[20]=S,e[21]=w);let T;e[22]!==w||e[23]!==c?(T=(0,Z.jsx)(Js,{value:c,children:w}),e[22]=w,e[23]=c,e[24]=T):T=e[24];let E;return e[25]!==b||e[26]!==T||e[27]!==m?(E=(0,Z.jsxs)(Z.Fragment,{children:[l,(0,Z.jsxs)(Rs,{children:[u,d,f,p,m,_,v,y,h,g,b,x,T]})]}),e[25]=b,e[26]=T,e[27]=m,e[28]=E):E=e[28],E}function n1(e,t){$I(Ks(e,t),t)}function r1(e){let t=/\/([^/]+?)(?:\.git)?\/?$/.exec(e);return t?t[1]:`repo`}function i1(e){return{async getAuthStatus(){return e.authQueryTransport.status()},async startSignIn(){return e.openSignIn()},async runClone({url:t,branch:n}){let r=await e.bridge.dialog.openFolder();if(!r)return{kind:`cancelled`};let i=r1(t),a=`${r.replace(/\/$/,``)}/${i}`,o=ul.loading(_l._({id:`GXf9hG`,values:{repoName:i}}),{duration:1/0}),s=typeof n==`string`&&n.length>0?n:null;try{let n=e.cloneTransport.start({url:t,dir:a,branch:s});for await(let e of n.events){if(e.type===`progress`){let t=e.phase,n=Math.round(e.pct);ul.loading(_l._({id:`GXf9hG`,values:{repoName:i}}),{id:o,description:_l._({id:`SCzAbA`,values:{phase:t,pct:n}}),duration:1/0});continue}if(e.type===`branch-fallback`){console.log(Rd({branch_action:`fallback`,branch:e.branch})),ul.info(_l._({id:`3JYy1p`,values:{0:e.branch}}),{duration:8e3});continue}if(e.type===`complete`)return ul.success(_l._({id:`IRv9cH`,values:{repoName:i}}),{id:o,duration:4e3}),{kind:`ok`,dir:e.dir};if(e.type===`error`)return ul.dismiss(o),{kind:`error`,detail:e.message}}return ul.dismiss(o),{kind:`error`,detail:`Clone ended unexpectedly.`}}catch(e){console.warn(`[clone-controller] clone transport threw`,e);let t=e instanceof Error?e.message:`Unknown error`;return ul.dismiss(o),{kind:`error`,detail:t}}}}}function a1(){return{start(e){return vi((t,n)=>{(async()=>{try{let r=await fetch(`/api/local-op/clone`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,dir:e.dir||void 0,branch:typeof e.branch==`string`&&e.branch.length>0?e.branch:void 0}),signal:n});if(!r.ok){let e=`Clone failed — check the URL and try again (${r.status})`;try{let t=await r.json(),n=Oo.safeParse(t);n.success&&(e=`Clone failed: ${n.data.title}`)}catch{}t({type:`error`,message:e});return}if(!r.body){t({type:`error`,message:`Clone failed — empty response body`});return}let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{done:e,value:r}=await i.read();if(e)break;o+=a.decode(r,{stream:!0});let s=o.split(`
1995
- `);o=s.pop()??``;for(let e of s){if(!e.trim())continue;let n;try{n=JSON.parse(e)}catch{console.warn(`[clone-transport] Dropped unparseable NDJSON line:`,e.slice(0,100));continue}if(n&&typeof n==`object`&&n.type===`error`&&`problem`in n){let e=n.problem;t({type:`error`,message:e?.detail||e?.title||`Unknown error`});break}t(n)}if(n.aborted)break}n.aborted||t({type:`error`,message:`Clone stream ended unexpectedly — check if the clone completed`})}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;t({type:`error`,message:`Clone failed — connection error`})}})()})}}}function o1(e){return{start(t){let n=typeof t.branch==`string`&&t.branch.length>0?t.branch:null;return e.localOp.clone.start({url:t.url,dir:t.dir,branch:n})}}}function s1(e){switch(e){case`receiving`:return{id:`qbfj1f`};case`resolving`:return{id:`adsMWO`};case`checking`:return{id:`1HBhDS`};case`init`:return{id:`LlHqdU`};case`done`:return{id:`bD8I7O`};default:return{id:`25Pw6a`}}}function c1(e){let t=e.trim();if(/^[\w.-]+\/[\w.-]+$/.test(t))return t.split(`/`)[1];try{return new URL(t.replace(/^git@([^:]+):/,`https://$1/`)).pathname.replace(/\.git$/,``).split(`/`).pop()??`repo`}catch{return t.split(`/`).pop()?.replace(/\.git$/,``)??`repo`}}function l1(e){let t=(0,$.c)(100),{open:n,onOpenChange:r,onSignIn:i,onCloneComplete:a,transport:o,authQueryTransport:s,pickParentFolder:c,initialUrl:l}=e,{_:u}=jt(),d;t[0]===o?d=t[1]:(d=o??a1(),t[0]=o,t[1]=d);let f=d,p;t[2]===s?p=t[3]:(p=s??Ji(),t[2]=s,t[3]=p);let m=p,h=c!==void 0,[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(null),[S,C]=(0,Q.useState)(!1),T;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(T=Qi(),t[4]=T):T=t[4];let[E,D]=(0,Q.useState)(T),[O,k]=(0,Q.useState)(!1),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(-1),P=(0,Q.useRef)(null),F=(0,Q.useRef)(null),I=(0,Q.useRef)(null),L=(0,Q.useId)(),R;t[5]!==n||t[6]!==m?(R=()=>{if(!n)return;let e=!1;return m.status().then(t=>{Wi(t.authenticated),e||D(t.authenticated)}).catch(()=>{e||D(!1)}),()=>{e=!0}},t[5]=n,t[6]=m,t[7]=R):R=t[7];let z;t[8]===n?z=t[9]:(z=[n],t[8]=n,t[9]=z),(0,Q.useEffect)(R,z);let B;t[10]!==E||t[11]!==n||t[12]!==m?(B=()=>{if(!E||!n)return;let e=!1;return C(!0),m.repos().then(t=>{e||(x(t.ok?t.repos:[]),C(!1))}).catch(()=>{e||(x([]),C(!1))}),()=>{e=!0}},t[10]=E,t[11]=n,t[12]=m,t[13]=B):B=t[13];let V;t[14]!==E||t[15]!==n?(V=[E,n],t[14]=E,t[15]=n,t[16]=V):V=t[16],(0,Q.useEffect)(B,V);let H,U;t[17]!==l||t[18]!==n||t[19]!==h?(H=()=>{if(!n||!l||(_(l),h))return;let e=c1(l);e&&y(`~/Documents/${e}`)},U=[n,l,h],t[17]=l,t[18]=n,t[19]=h,t[20]=H,t[21]=U):(H=t[20],U=t[21]),(0,Q.useEffect)(H,U);let W,G;t[22]!==M||t[23]!==L?(W=()=>{M<0||document.getElementById(`${L}-opt-${M}`)?.scrollIntoView({block:`nearest`})},G=[M,L],t[22]=M,t[23]=L,t[24]=W,t[25]=G):(W=t[24],G=t[25]),(0,Q.useEffect)(W,G);let K;t[26]===h?K=t[27]:(K=function(e){if(_(e),j(!0),N(-1),h)return;let t=c1(e);t&&y(`~/Documents/${t}`)},t[26]=h,t[27]=K);let ee=K,te;t[28]===h?te=t[29]:(te=function(e){if(_(e.clone_url),h)return;let t=e.full_name.split(`/`)[1];y(`~/Documents/${t}`)},t[28]=h,t[29]=te);let q=te,ne;t[30]!==u||t[31]!==v||t[32]!==a||t[33]!==r||t[34]!==c||t[35]!==f||t[36]!==g?(ne=async function(){let e=g.trim();if(!e){ul.error(u({id:`FTUGgh`}));return}let t=v||``;if(c){k(!0);let n=await c();if(!n){k(!1);return}let r=c1(e);t=`${n.replace(/\/$/,``)}/${r}`}else k(!0);let n=ul.loading(u({id:`2tgFCe`}),{duration:1/0});F.current=n;let i=f.start({url:e,dir:t});P.current=i.cancel;try{let e=i.events[Symbol.asyncIterator](),t=await e.next();for(;!t.done;){let i=t.value;if(i.type===`progress`){let e=u(s1(i.phase));ul.loading(`${e} — ${i.pct}%`,{id:n})}else if(i.type===`complete`){ul.success(u({id:`u_lS4C`}),{id:n}),r(!1),k(!1),P.current=null;let e=`port`in i?i.port:void 0;a?a({port:e,dir:i.dir}):e!==void 0&&(window.location.href=`http://localhost:${e}`);return}else if(i.type===`error`){let e=i.message;ul.error(u({id:`eFJkVt`,values:{cloneError:e}}),{id:n}),k(!1),P.current=null;return}t=await e.next()}ul.error(u({id:`Tz9pJB`}),{id:n}),k(!1),P.current=null}catch(e){console.error(`[CloneDialog] clone iteration failed:`,e),ul.error(u({id:`K9J00P`}),{id:n}),k(!1),P.current=null}},t[30]=u,t[31]=v,t[32]=a,t[33]=r,t[34]=c,t[35]=f,t[36]=g,t[37]=ne):ne=t[37];let ie=ne,oe;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(oe=function(){P.current?.(),P.current=null,k(!1),ul.dismiss(F.current??void 0)},t[38]=oe):oe=t[38];let se=oe,ce;t[39]!==O||t[40]!==r||t[41]!==h?(ce=function(e){O||(r(e),e||(_(``),h||y(``),j(!1),N(-1)))},t[39]=O,t[40]=r,t[41]=h,t[42]=ce):ce=t[42];let le=ce,ue;t[43]===q?ue=t[44]:(ue=function(e){q(e),j(!1),N(-1),I.current?.focus()},t[43]=q,t[44]=ue);let de=ue,fe=E===null||S&&b===null,pe;if(t[45]!==b||t[46]!==g){let e=g.trim().toLowerCase(),n;t[48]===b?n=t[49]:(n=b??[],t[48]=b,t[49]=n),pe=n.filter(t=>`${t.full_name} ${t.clone_url}`.toLowerCase().includes(e)),t[45]=b,t[46]=g,t[47]=pe}else pe=t[47];let me=pe,he;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(he=/:\/\/|^git@|\.git$/i,t[50]=he):he=t[50];let ge;t[51]===g?ge=t[52]:(ge=he.test(g.trim()),t[51]=g,t[52]=ge);let _e=ge,ve=E===!0&&b!==null&&me.length===0&&!_e,ye=A&&E!==!1&&!O&&(fe||me.length>0||ve),be=me.length,xe=`${L}-loading`,Se,Ce;t[53]===be?(Se=t[54],Ce=t[55]):(Se=()=>{N(e=>e>=be?be-1:e)},Ce=[be],t[53]=be,t[54]=Se,t[55]=Ce),(0,Q.useEffect)(Se,Ce);let we;t[56]!==M||t[57]!==O||t[58]!==ye||t[59]!==de||t[60]!==me?(we=function(e){if(!O)if(e.key===`ArrowDown`){if(e.preventDefault(),!ye){j(!0);return}N(e=>Math.min(e+1,me.length-1))}else e.key===`ArrowUp`?(e.preventDefault(),N(h1)):e.key===`Enter`?ye&&M>=0&&M<me.length&&(e.preventDefault(),de(me[M])):e.key===`Escape`&&ye&&(e.preventDefault(),e.stopPropagation(),j(!1),N(-1))},t[56]=M,t[57]=O,t[58]=ye,t[59]=de,t[60]=me,t[61]=we):we=t[61];let Te=we,Ee;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,Z.jsx)(Mn,{children:(0,Z.jsx)(On,{children:(0,Z.jsx)(J,{id:`VdXv4D`})})}),t[62]=Ee):Ee=t[62];let De;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Z.jsx)(`label`,{htmlFor:`clone-source`,className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`IreQBq`})}),t[63]=De):De=t[63];let Oe;t[64]!==u||t[65]!==M||t[66]!==O||t[67]!==Te||t[68]!==ee||t[69]!==E||t[70]!==L||t[71]!==xe||t[72]!==i||t[73]!==ye||t[74]!==fe||t[75]!==b||t[76]!==de||t[77]!==me||t[78]!==g?(Oe=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[De,E===!1?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(gl,{id:`clone-source`,placeholder:u({id:`Xv_ijG`}),value:g,onChange:e=>ee(e.target.value),disabled:O}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-1sm text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:(0,Z.jsx)(J,{id:`9oE4C3`})}),(0,Z.jsx)(Y,{variant:`link`,className:`h-auto p-0`,onClick:()=>i?.(),disabled:O,children:(0,Z.jsx)(J,{id:`3jod3l`})})]})]}):(0,Z.jsxs)(ae,{open:ye,onOpenChange:j,children:[(0,Z.jsx)(w,{asChild:!0,children:(0,Z.jsx)(gl,{id:`clone-source`,ref:I,role:`combobox`,"aria-expanded":ye,"aria-controls":ye?fe?xe:L:void 0,"aria-activedescendant":M>=0?`${L}-opt-${M}`:void 0,"aria-autocomplete":`list`,autoComplete:`off`,placeholder:u({id:`R0jJzV`}),value:g,onChange:e=>ee(e.target.value),onFocus:()=>j(!0),onKeyDown:Te,disabled:O})}),(0,Z.jsx)(re,{align:`start`,sideOffset:4,className:`w-(--radix-popover-trigger-width) max-h-56 overflow-y-auto overscroll-y-contain subtle-scrollbar p-0`,onOpenAutoFocus:m1,onCloseAutoFocus:p1,onInteractOutside:e=>{I.current?.contains(e.target)&&e.preventDefault()},onWheel:f1,onTouchMove:d1,children:fe?(0,Z.jsxs)(`output`,{id:xe,className:`flex flex-col gap-1.5 px-3 py-2`,"aria-label":u({id:`8XQRON`}),children:[(0,Z.jsx)(xl,{className:`h-4 w-2/3`}),(0,Z.jsx)(xl,{className:`h-4 w-1/2`}),(0,Z.jsx)(xl,{className:`h-4 w-3/4`}),(0,Z.jsx)(xl,{className:`h-4 w-2/5`})]}):(0,Z.jsx)(`div`,{id:L,role:`listbox`,"aria-label":u({id:`KX1MZR`}),className:`py-1`,children:me.length===0?(0,Z.jsx)(`div`,{role:`presentation`,className:`px-3 py-2 text-xs text-muted-foreground`,children:b&&b.length===0?(0,Z.jsx)(J,{id:`cOSAfL`}):(0,Z.jsx)(J,{id:`8eW0WQ`})}):me.map((e,t)=>(0,Z.jsxs)(`div`,{id:`${L}-opt-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===M,onMouseDown:u1,onMouseEnter:()=>N(t),onClick:()=>de(e),className:X(`flex cursor-default items-center gap-2 px-3 py-1.5 text-sm`,t===M&&`bg-accent text-accent-foreground`),children:[e.private?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Vs,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(J,{id:`n5n_vi`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Is,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(J,{id:`NuH1jp`})})]}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.full_name})]},e.full_name))})})]})]}),t[64]=u,t[65]=M,t[66]=O,t[67]=Te,t[68]=ee,t[69]=E,t[70]=L,t[71]=xe,t[72]=i,t[73]=ye,t[74]=fe,t[75]=b,t[76]=de,t[77]=me,t[78]=g,t[79]=Oe):Oe=t[79];let ke;t[80]!==O||t[81]!==v||t[82]!==h?(ke=!h&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{htmlFor:`clone-path`,className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`Gp_twO`})}),(0,Z.jsx)(gl,{id:`clone-path`,placeholder:`~/Documents/repo-name`,value:v,onChange:e=>y(e.target.value),disabled:O})]}),t[80]=O,t[81]=v,t[82]=h,t[83]=ke):ke=t[83];let Ae;t[84]!==Oe||t[85]!==ke?(Ae=(0,Z.jsx)(An,{children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[Oe,ke]})}),t[84]=Oe,t[85]=ke,t[86]=Ae):Ae=t[86];let je;t[87]!==O||t[88]!==ie||t[89]!==le||t[90]!==g||t[91]!==h?(je=(0,Z.jsx)(jn,{children:O?(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:se,children:(0,Z.jsx)(J,{id:`dEgA5A`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>le(!1),children:(0,Z.jsx)(J,{id:`dEgA5A`})}),(0,Z.jsx)(Y,{onClick:()=>void ie(),disabled:!g.trim(),"aria-describedby":h?`clone-picker-hint`:void 0,children:(0,Z.jsx)(J,{id:`9UQ730`})}),h&&(0,Z.jsx)(`span`,{id:`clone-picker-hint`,className:`sr-only`,children:(0,Z.jsx)(J,{id:`EvPX7f`})})]})}),t[87]=O,t[88]=ie,t[89]=le,t[90]=g,t[91]=h,t[92]=je):je=t[92];let Me;t[93]!==Ae||t[94]!==je?(Me=(0,Z.jsxs)(kn,{className:`sm:max-w-lg`,children:[Ee,Ae,je]}),t[93]=Ae,t[94]=je,t[95]=Me):Me=t[95];let Ne;return t[96]!==le||t[97]!==n||t[98]!==Me?(Ne=(0,Z.jsx)(Nn,{open:n,onOpenChange:le,children:Me}),t[96]=le,t[97]=n,t[98]=Me,t[99]=Ne):Ne=t[99],Ne}function u1(e){return e.preventDefault()}function d1(e){return e.stopPropagation()}function f1(e){return e.stopPropagation()}function p1(e){return e.preventDefault()}function m1(e){return e.preventDefault()}function h1(e){return Math.max(e-1,-1)}var g1=(0,Q.lazy)(()=>n(()=>import(`./ConsentDialogBody-CFh9gVKe.js`),__vite__mapDeps([125,1,9,10,11,12,13,14,15,16,17,18,71,19,20,74,78,126,91,92,33,34,22,77,26,27]),import.meta.url));function _1(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(hl.subscribe,y1,v1))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(g1,{})}),e[0]=t):t=e[0],t}function v1(){return!1}function y1(){return hl.getSnapshot()!==null}function b1(e){let t=(0,$.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`OpenKnowledge icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`g`,{filter:`url(#filter0_d_ok)`,children:[(0,Z.jsx)(`path`,{d:`M66.8902 16.1017C58.2694 3.86669 46.1739 -0.690239 29.9182 2.17749C21.3995 3.67813 13.4602 9.555 8.67934 17.9009C3.93974 26.1701 2.98514 35.6533 6.05714 43.9166C9.31574 52.6868 16.7168 58.4752 24.2299 63.4231C25.7973 64.4562 26.1351 65.7172 26.3551 68.9896C26.5221 71.4625 26.799 75.6011 30.6842 77.7204C31.8176 78.3372 33.0648 78.6515 34.3946 78.6515C37.0796 78.6515 39.4033 77.3649 40.5189 76.7482C47.1049 73.1046 68.8878 59.7147 72.6453 40.4027C74.3444 31.6679 70.9797 21.9019 66.8922 16.1017H66.8902Z`,fill:`white`}),(0,Z.jsx)(`path`,{d:`M37.4214 71.154C28.7888 75.929 36.787 64.0397 27.7458 58.0843C21.6372 54.0616 14.788 49.0568 12.0499 41.6911C6.74463 27.4192 17.5438 10.8473 31.028 8.47262C45.1977 5.97613 54.6946 9.8947 61.6635 19.7844C65.2089 24.8167 67.6013 32.8365 66.3658 39.1828C63.6906 52.9341 49.073 64.7075 37.4214 71.154Z`,fill:`#69A3FF`}),(0,Z.jsx)(`path`,{d:`M52.7244 29.2638C53.4665 28.5217 54.6697 28.5217 55.4119 29.2638V29.2638C56.154 30.0059 56.154 31.2091 55.4119 31.9513L49.2589 38.1042L46.5715 35.4167L52.7244 29.2638Z`,fill:`#D5E5FF`}),(0,Z.jsx)(`path`,{d:`M55.4119 38.8821C56.154 39.6242 56.154 40.8274 55.4119 41.5696V41.5696C54.6698 42.3117 53.4665 42.3117 52.7244 41.5696L46.5715 35.4166L49.259 32.7292L55.4119 38.8821Z`,fill:`#D5E5FF`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`defs`,{children:(0,Z.jsxs)(`filter`,{id:`filter0_d_ok`,x:`-9.53674e-07`,y:`-0.0799994`,width:`77.3817`,height:`85.8743`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,Z.jsx)(`feFlood`,{floodOpacity:`0`,result:`BackgroundImageFix`}),(0,Z.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,Z.jsx)(`feOffset`,{dy:`2.85714`}),(0,Z.jsx)(`feGaussianBlur`,{stdDeviation:`2.14286`}),(0,Z.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,Z.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow_ok`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow_ok`,result:`shape`})]})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,Z.jsxs)(`svg`,{role:`img`,"aria-label":`OpenKnowledge icon`,fill:`none`,height:24,width:24,viewBox:`0 0 78 80`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var x1=(0,Q.lazy)(()=>n(()=>import(`./ShareReceiveDialog-BbWq-gzG.js`).then(e=>({default:e.ShareReceiveDialog})),__vite__mapDeps([127,1,6,2,3,7,8,9,10,15,19,14,16,20,24,78,119,120,121]),import.meta.url)),S1=(e,t,n)=>D_(e,t,n,`NavigatorApp`);function C1(e,t){return e.filter(e=>e.path!==t)}function w1(e){let t=(0,$.c)(108),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,a]=(0,Q.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,c]=(0,Q.useState)(o),[l,u]=(0,Q.useState)(!0),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(void 0),[T,E]=(0,Q.useState)(void 0),[D,O]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(!1),[j,N]=(0,Q.useState)(null),P=typeof window<`u`&&window.okDesktop!=null,[F,I]=(0,Q.useState)(`auth`),{theme:L}=on(),{_:R}=jt();_u(n,L??`system`);let z;t[2]!==R||t[3]!==n.project?(z=()=>{let e=!1;return n.project.listRecent().then(async t=>{if(e)return;a(t);let r=t.filter(T1),i=await Promise.all(r.map(async e=>{try{let{currentBranch:t}=await n.project.readHeadBranch(e.path);return[e.path,t]}catch{return[e.path,null]}}));e||c(e=>{let t=new Map(e);for(let[e,n]of i)t.set(e,n);return t})}).catch(t=>{console.error(`[NavigatorApp] listRecent failed:`,t),e||(m(t instanceof Error?t.message:R({id:`fYKgzG`})),f(!0))}).finally(()=>{e||u(!1)}),()=>{e=!0}},t[2]=R,t[3]=n.project,t[4]=z):z=t[4];let B;t[5]!==R||t[6]!==n?(B=[n,R],t[5]=R,t[6]=n,t[7]=B):B=t[7],(0,Q.useEffect)(z,B);let V,H;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>M(e=>{e===`new-project`&&b(!0),e===`report-bug`&&S(!0),e===`close-active-tab-or-window`&&window.close()}),H=[],t[8]=V,t[9]=H):(V=t[8],H=t[9]),(0,Q.useEffect)(V,H);let U;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(U=(e,t)=>S1(e,t,m),t[10]=U):U=t[10];let W=U,G;t[11]!==R||t[12]!==n?(G=(e,t,r)=>W(()=>(g(r),k1(n,e,t).finally(()=>g(null))),R({id:`SUOoXn`})),t[11]=R,t[12]=n,t[13]=G):G=t[13];let K=G,ee;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>v(!0),t[14]=ee):ee=t[14];let te=ee,q;t[15]!==R||t[16]!==n?(q=()=>W(async()=>{let e=await n.dialog.openFolder();e&&(g(A1(e)),await k1(n,e,`pick-existing`).finally(()=>g(null)))},R({id:`gmJ0An`})),t[15]=R,t[16]=n,t[17]=q):q=t[17];let ne=q,re;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(re=()=>b(!0),t[18]=re):re=t[18];let ie=re,ae;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(e,t)=>{w(e),E(t),b(!0)},t[19]=ae):ae=t[19];let oe=ae,se;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(se=e=>{b(e),e||(w(void 0),E(void 0))},t[20]=se):se=t[20];let ce=se,le;t[21]===K?le=t[22]:(le=e=>K(e,`recents`,A1(e)),t[21]=K,t[22]=le);let ue=le,de;t[23]!==R||t[24]!==n.project?(de=e=>W(async()=>{await n.project.removeRecent(e),a(t=>C1(t,e)),c(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},R({id:`viwC-K`})),t[23]=R,t[24]=n.project,t[25]=de):de=t[25];let fe=de,pe;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 z-10 h-9 ${P?`[-webkit-app-region:drag]`:``}`,"data-electron-drag":P?``:void 0,"data-testid":`nav-chrome-row`}),t[26]=pe):pe=t[26];let me;t[27]!==R||t[28]!==h?(me=h===null?null:(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 bg-primary-foreground/85 dark:bg-background/85 backdrop-blur-sm`,"data-testid":`nav-opening-overlay`,role:`status`,"aria-live":`polite`,children:[(0,Z.jsx)(zc,{className:`size-6 animate-spin text-muted-foreground`}),(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:R({id:`s0_GnA`,values:{openingLabel:h}})})]}),t[27]=R,t[28]=h,t[29]=me):me=t[29];let he;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,Z.jsx)(b1,{className:`size-12 shrink-0`}),t[30]=he):he=t[30];let ge;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`font-medium text-xl tracking-tight`,children:`OpenKnowledge`}),(0,Z.jsx)(GP,{})]}),t[31]=ge):ge=t[31];let _e;t[32]===n.appVersion?_e=t[33]:(_e=(0,Z.jsxs)(`header`,{className:`shrink-0 flex-wrap flex items-center gap-2.5`,children:[he,(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[ge,(0,Z.jsxs)(`p`,{className:`text-muted-foreground text-xs font-mono`,children:[`v`,n.appVersion]})]})]}),t[32]=n.appVersion,t[33]=_e);let ve;t[34]!==R||t[35]!==l||t[36]!==ne||t[37]!==i||t[38]!==d?(ve=l?null:!d&&i.length===0?(0,Z.jsx)(D1,{onPackSelect:oe,onOpenFolder:ne,onClone:te,onCreate:ie}):(0,Z.jsxs)(`section`,{className:`grid shrink-0 sm:grid-cols-3 gap-3`,children:[(0,Z.jsx)(E1,{title:R({id:`wbv9xO`}),description:R({id:`0uTHCg`}),onClick:ie,dataTestId:`nav-create-new`,Icon:Oe}),(0,Z.jsx)(E1,{title:R({id:`WPwDin`}),description:R({id:`tUvUfp`}),onClick:ne,dataTestId:`nav-open`,Icon:Sc}),(0,Z.jsx)(E1,{title:R({id:`VdXv4D`}),description:R({id:`JOcPqH`}),onClick:te,dataTestId:`nav-clone`,Icon:Hh})]}),t[34]=R,t[35]=l,t[36]=ne,t[37]=i,t[38]=d,t[39]=ve):ve=t[39];let ye;t[40]===p?ye=t[41]:(ye=p===null?null:(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2`,"data-testid":`nav-error-banner`,role:`alert`,children:[(0,Z.jsx)(`span`,{className:`text-red-700 text-xs dark:text-red-300`,children:p}),(0,Z.jsx)(Y,{type:`button`,variant:`link`,size:`sm`,onClick:()=>m(null),className:`h-auto p-0 text-red-700 text-xs dark:text-red-300`,"data-testid":`nav-error-dismiss`,children:(0,Z.jsx)(J,{id:`1QfxQT`})})]}),t[40]=p,t[41]=ye);let be;t[42]!==l||t[43]!==ue||t[44]!==fe||t[45]!==s||t[46]!==i?(be=l?(0,Z.jsx)(`section`,{className:`flex shrink-0 flex-col items-center`,children:(0,Z.jsx)(zc,{className:`size-4 animate-spin text-muted-foreground/60`})}):i.length>0?(0,Z.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[(0,Z.jsx)(`h2`,{className:`mb-2 shrink-0 font-medium text-muted-foreground font-mono text-xs uppercase tracking-wide`,children:(0,Z.jsx)(J,{id:`CCTop_`})}),(0,Z.jsx)(`ul`,{className:`min-h-0 max-h-48 subtle-scrollbar scroll-fade-mask overflow-y-auto space-y-0.5 -mx-4`,"data-testid":`nav-recent-list`,children:i.map(e=>(0,Z.jsx)(O1,{project:e,branch:s.get(e.path)??null,onOpen:()=>ue(e.path),onRemove:()=>fe(e.path)},e.path))})]}):null,t[42]=l,t[43]=ue,t[44]=fe,t[45]=s,t[46]=i,t[47]=be):be=t[47];let xe;t[48]!==_e||t[49]!==ve||t[50]!==ye||t[51]!==be?(xe=(0,Z.jsx)(`div`,{className:`mx-auto flex h-full w-full max-w-5xl flex-col overflow-hidden px-12 py-12`,children:(0,Z.jsxs)(`div`,{className:`my-auto flex min-h-0 flex-col space-y-10`,children:[_e,ve,ye,be]})}),t[48]=_e,t[49]=ve,t[50]=ye,t[51]=be,t[52]=xe):xe=t[52];let Se,Ce;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(y$,{}),Ce=(0,Z.jsx)(_1,{}),t[53]=Se,t[54]=Ce):(Se=t[53],Ce=t[54]);let we;t[55]!==n||t[56]!==y||t[57]!==C||t[58]!==T?(we=(0,Z.jsx)(Oh,{open:y,onOpenChange:ce,bridge:n,initialPackId:C,packs:T}),t[55]=n,t[56]=y,t[57]=C,t[58]=T,t[59]=we):we=t[59];let Te;t[60]===x?Te=t[61]:(Te=(0,Z.jsx)(jf,{open:x,onOpenChange:S,systemWide:!0}),t[60]=x,t[61]=Te);let Ee;t[62]===j?Ee=t[63]:(Ee=e=>{O(e),e||(A(!1),j&&(j(null),N(null)))},t[62]=j,t[63]=Ee);let De;t[64]===n?De=t[65]:(De=mi(n),t[64]=n,t[65]=De);let ke;t[66]===n?ke=t[67]:(ke=_i(n),t[66]=n,t[67]=ke);let Ae=F===`identity`,je;t[68]!==k||t[69]!==j?(je=e=>{O(!1),k&&(A(!1),v(!0)),j&&(j({authenticated:!0,host:`github.com`,login:e.login}),N(null))},t[68]=k,t[69]=j,t[70]=je):je=t[70];let Me;t[71]!==D||t[72]!==Ee||t[73]!==De||t[74]!==ke||t[75]!==Ae||t[76]!==je?(Me=(0,Z.jsx)(Di,{open:D,onOpenChange:Ee,transport:De,queryTransport:ke,identityPrompt:Ae,onSuccess:je}),t[71]=D,t[72]=Ee,t[73]=De,t[74]=ke,t[75]=Ae,t[76]=je,t[77]=Me):Me=t[77];let Ne;t[78]===n?Ne=t[79]:(Ne=o1(n),t[78]=n,t[79]=Ne);let Pe;t[80]===n?Pe=t[81]:(Pe=_i(n),t[80]=n,t[81]=Pe);let Fe;t[82]===n.dialog?Fe=t[83]:(Fe=()=>n.dialog.openFolder(),t[82]=n.dialog,t[83]=Fe);let Ie;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=()=>{v(!1),I(`auth`),A(!0),O(!0)},t[84]=Ie):Ie=t[84];let Le;t[85]!==R||t[86]!==n?(Le=e=>{let{dir:t}=e;W(()=>(g(A1(t)),k1(n,t,`pick-existing`).finally(()=>g(null))),R({id:`iSnkwB`}))},t[85]=R,t[86]=n,t[87]=Le):Le=t[87];let Re;t[88]!==_||t[89]!==Ne||t[90]!==Pe||t[91]!==Fe||t[92]!==Le?(Re=(0,Z.jsx)(l1,{open:_,onOpenChange:v,transport:Ne,authQueryTransport:Pe,pickParentFolder:Fe,onSignIn:Ie,onCloneComplete:Le}),t[88]=_,t[89]=Ne,t[90]=Pe,t[91]=Fe,t[92]=Le,t[93]=Re):Re=t[93];let ze;if(t[94]!==n){let e;t[96]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>new Promise(e=>{N(()=>e),O(!0)}),t[96]=e):e=t[96],ze=i1({bridge:n,authQueryTransport:_i(n),cloneTransport:o1(n),openSignIn:e}),t[94]=n,t[95]=ze}else ze=t[95];let Be;t[97]!==n||t[98]!==ze?(Be=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(x1,{bridge:n,cloneController:ze})}),t[97]=n,t[98]=ze,t[99]=Be):Be=t[99];let Ve;return t[100]!==me||t[101]!==xe||t[102]!==we||t[103]!==Te||t[104]!==Me||t[105]!==Re||t[106]!==Be?(Ve=(0,Z.jsxs)(`div`,{className:`relative flex h-screen w-screen flex-col overflow-hidden bg-primary-foreground dark:bg-background text-foreground`,children:[pe,me,xe,Se,Ce,we,Te,Me,Re,Be]}),t[100]=me,t[101]=xe,t[102]=we,t[103]=Te,t[104]=Me,t[105]=Re,t[106]=Be,t[107]=Ve):Ve=t[107],Ve}function T1(e){return!e.missing}function E1(e){let t=(0,$.c)(14),{title:n,description:r,onClick:i,dataTestId:a,Icon:o}=e,s;t[0]===o?s=t[1]:(s=o?(0,Z.jsx)(o,{className:`size-4 shrink-0 text-muted-foreground`}):null,t[0]=o,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,Z.jsx)(`span`,{className:`font-medium text-gray-700 dark:text-foreground text-sm`,children:n}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(`span`,{className:`line-clamp-2 text-muted-foreground text-xs leading-snug`,children:r}),t[7]=r,t[8]=u);let d;return t[9]!==a||t[10]!==i||t[11]!==l||t[12]!==u?(d=(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,onClick:i,"data-testid":a,className:`h-auto flex-col items-start justify-start gap-1.5 whitespace-normal bg-card px-4 py-3.5 text-left`,children:[l,u]}),t[9]=a,t[10]=i,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function D1(e){let t=(0,$.c)(31),{onPackSelect:n,onOpenFolder:r,onClone:i,onCreate:a}=e,[o,s]=(0,Q.useState)(null),c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1;return(async()=>{try{let t=await l_().listPacks();if(e)return;t.ok?s(t.packs):(console.error(`[NavigatorApp] listPacks returned error:`,t),s([]))}catch(t){let n=t;if(e)return;console.error(`[NavigatorApp] listPacks failed:`,n),s([])}})(),()=>{e=!0}},l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,Q.useEffect)(c,l);let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(`h2`,{className:`text-xl font-light tracking-tighter text-balance`,children:(0,Z.jsx)(J,{id:`QnjpOq`})}),t[2]=u):u=t[2];let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1`,children:[u,(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,Z.jsx)(J,{id:`gYuDfu`})})]}),t[3]=d):d=t[3];let f;t[4]!==n||t[5]!==o?(f=e=>n(e,o??[]),t[4]=n,t[5]=o,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=[`okf`,`entity-vault`],t[7]=p):p=t[7];let m;t[8]!==o||t[9]!==f?(m=(0,Z.jsx)(`div`,{className:`-m-1 min-h-0 flex-1 overflow-y-auto subtle-scrollbar p-1`,children:(0,Z.jsx)(f_,{packs:o,onPackSelect:f,collapsedPackIds:p})}),t[8]=o,t[9]=f,t[10]=m):m=t[10];let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:(0,Z.jsx)(J,{id:`S34Vju`})}),t[11]=h):h=t[11];let g,_;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(Sc,{"aria-hidden":`true`,className:`size-3.5`}),g=(0,Z.jsx)(J,{id:`PVUn_c`}),t[12]=g,t[13]=_):(g=t[12],_=t[13]);let v;t[14]===r?v=t[15]:(v=(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:r,"data-testid":`nav-first-run-open`,children:[_,g]}),t[14]=r,t[15]=v);let y,b;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(Hh,{"aria-hidden":`true`,className:`size-3.5`}),b=(0,Z.jsx)(J,{id:`VdXv4D`}),t[16]=y,t[17]=b):(y=t[16],b=t[17]);let x;t[18]===i?x=t[19]:(x=(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:i,"data-testid":`nav-first-run-clone`,children:[y,b]}),t[18]=i,t[19]=x);let S,C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(Oe,{"aria-hidden":`true`,className:`size-3.5`}),C=(0,Z.jsx)(J,{id:`ircigK`}),t[20]=S,t[21]=C):(S=t[20],C=t[21]);let w;t[22]===a?w=t[23]:(w=(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:a,"data-testid":`nav-first-run-blank`,children:[S,C]}),t[22]=a,t[23]=w);let T;t[24]!==v||t[25]!==x||t[26]!==w?(T=(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1`,"data-testid":`nav-first-run-secondary`,children:[h,(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-1 gap-y-1`,children:[v,x,w]})]}),t[24]=v,t[25]=x,t[26]=w,t[27]=T):T=t[27];let E;return t[28]!==T||t[29]!==m?(E=(0,Z.jsxs)(`section`,{className:`flex min-h-0 shrink flex-col gap-6`,"data-testid":`nav-first-run`,children:[d,m,T]}),t[28]=T,t[29]=m,t[30]=E):E=t[30],E}function O1(e){let t=(0,$.c)(44),{project:n,branch:r,onOpen:i,onRemove:a}=e,{_:o}=jt(),{name:s}=n,c=n.isLinkedWorktree===!0,l=c?n.branch??r:r,u=n.missing,d=n.missing&&`opacity-50`,f;t[0]===d?f=t[1]:(f=X(`h-auto min-w-0 flex-1 justify-between gap-3 py-3.5 pl-4 pr-2 text-left hover:bg-transparent`,d),t[0]=d,t[1]=f);let p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(Tm,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-muted-foreground`}),t[2]=p):p=t[2];let m;t[3]===n.name?m=t[4]:(m=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm text-gray-700 dark:text-foreground`,children:n.name}),t[3]=n.name,t[4]=m);let h;t[5]===c?h=t[6]:(h=c?(0,Z.jsxs)(Ps,{variant:`secondary`,className:`shrink-0 gap-1 rounded-full border-transparent bg-green-600/10 px-2 py-0 font-medium text-2xs text-green-800 dark:bg-green-400/10 dark:text-green-400`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-2.5`}),(0,Z.jsx)(J,{id:`z-lawV`})]}):null,t[5]=c,t[6]=h);let g;t[7]!==m||t[8]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[m,h]}),t[7]=m,t[8]=h,t[9]=g):g=t[9];let _=c?n.mainRoot??``:n.path,v;t[10]!==c||t[11]!==n.mainRoot||t[12]!==n.path?(v=c?(0,Z.jsx)(J,{id:`PRnH8G`,values:{0:H_(n.mainRoot??``)}}):n.path,t[10]=c,t[11]=n.mainRoot,t[12]=n.path,t[13]=v):v=t[13];let y;t[14]!==_||t[15]!==v?(y=(0,Z.jsx)(`span`,{className:`truncate w-full text-muted-foreground text-xs`,title:_,children:v}),t[14]=_,t[15]=v,t[16]=y):y=t[16];let b;t[17]!==y||t[18]!==g?(b=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[p,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 truncate`,children:[g,y]})]}),t[17]=y,t[18]=g,t[19]=b):b=t[19];let x;t[20]!==n.missing||t[21]!==n.path||t[22]!==l?(x=n.missing?(0,Z.jsx)(Ps,{className:`text-2xs rounded-sm`,variant:`warning`,children:(0,Z.jsx)(J,{id:`VU3Nrn`})}):l==null?null:(0,Z.jsxs)(`span`,{className:`flex max-w-[40%] items-center gap-1 text-muted-foreground text-xs`,"data-testid":`nav-recent-branch-${n.path}`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate font-mono`,children:l})]}),t[20]=n.missing,t[21]=n.path,t[22]=l,t[23]=x):x=t[23];let S;t[24]!==i||t[25]!==n.missing||t[26]!==b||t[27]!==x||t[28]!==f?(S=(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,onClick:i,disabled:u,className:f,children:[b,x]}),t[24]=i,t[25]=n.missing,t[26]=b,t[27]=x,t[28]=f,t[29]=S):S=t[29];let C;t[30]!==o||t[31]!==s?(C=o({id:`hDoLrm`,values:{projectName:s}}),t[30]=o,t[31]=s,t[32]=C):C=t[32];let w;t[33]===o?w=t[34]:(w=o({id:`Es-eZU`}),t[33]=o,t[34]=w);let T=`nav-recent-remove-${n.path}`,E;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(ll,{"aria-hidden":`true`}),t[35]=E):E=t[35];let D;t[36]!==a||t[37]!==C||t[38]!==w||t[39]!==T?(D=(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:a,"aria-label":C,title:w,className:`pointer-events-none mr-2 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100`,"data-testid":T,children:E}),t[36]=a,t[37]=C,t[38]=w,t[39]=T,t[40]=D):D=t[40];let O;return t[41]!==S||t[42]!==D?(O=(0,Z.jsxs)(`li`,{className:`group flex items-center justify-between rounded-lg hover:bg-accent`,children:[S,D]}),t[41]=S,t[42]=D,t[43]=O):O=t[43],O}async function k1(e,t,n){await e.project.open({path:t,target:`new-window`,entryPoint:n})}function A1(e){let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function j1(e){let t=(0,$.c)(5),{bridge:n}=e,r=n.config.collabUrl?n.config.collabUrl:null,i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(M1,{bridge:n}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,Z.jsx)(vu,{collabUrl:r,children:i}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function M1(e){let t=(0,$.c)(9),{bridge:n}=e,{resolvedTheme:r}=on(),i=ld(r),a=Dv(),[o,s]=(0,Q.useState)(null),c;t[0]===i.background?c=t[1]:(c=(0,Z.jsx)(`div`,{ref:s,className:`flex h-screen min-h-0 flex-col`,style:{backgroundColor:i.background}}),t[0]=i.background,t[1]=c);let l;t[2]!==n||t[3]!==o||t[4]!==a?(l=(0,Z.jsx)(CL,{bridge:n,variant:`window`,visible:!0,onVisibleChange:P1,installedClis:a,container:o,isShowing:!0,onRequestEditorFocus:N1}),t[2]=n,t[3]=o,t[4]=a,t[5]=l):l=t[5];let u;return t[6]!==c||t[7]!==l?(u=(0,Z.jsxs)(Z.Fragment,{children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8],u}function N1(){}function P1(e){e||window.close()}function F1(e){return e?.config.mode===`terminal`?(0,Z.jsx)(j1,{bridge:e}):e?.config.mode===`navigator`?(0,Z.jsx)(w1,{bridge:e}):(0,Z.jsx)(e1,{})}function I1(){let e=null,t=new Set,n=!1,r=null;function i(){for(let e of t)e()}function a(){e!==null&&(e=null,i())}return{install({bridge:t}){let o=t?.bugReport?.onCrashDetected;if(typeof o==`function`)return n?r??void 0:(n=!0,r=o(t=>{e=t,i()}),()=>{r?.(),r=null,n=!1,a()})},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dismiss(){a()}}}var L1=I1();function R1(e){return L1.install(e)}function z1(e){let t=(0,$.c)(7),{bridge:n}=e,r=(0,Q.useSyncExternalStore)(L1.subscribe,L1.getSnapshot);if(r===null)return null;let i;t[0]!==n.bugReport||t[1]!==r?(i=e=>{e||(n.bugReport.crashAck({eventId:r.eventId}),L1.dismiss())},t[0]=n.bugReport,t[1]=r,t[2]=i):i=t[2];let a=n.config.mode===`navigator`,o;return t[3]!==r||t[4]!==i||t[5]!==a?(o=(0,Z.jsx)(jf,{open:!0,onOpenChange:i,systemWide:a,crashInvite:r}),t[3]=r,t[4]=i,t[5]=a,t[6]=o):o=t[6],o}var B1=e=>{let t=(0,$.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=on(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,Z.jsx)(zs,{className:`size-4`}),info:(0,Z.jsx)(Rc,{className:`size-4`}),warning:(0,Z.jsx)(Gc,{className:`size-4`}),error:(0,Z.jsx)(Bm,{className:`size-4`}),loading:(0,Z.jsx)(zc,{className:`size-4 animate-spin`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsx)(dl,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c},V1=Symbol.for(`ok.client.fetchWrapper`);function H1(e={}){if(typeof window>`u`)return;let t=e.apiOrigin&&e.apiOrigin.length>0?e.apiOrigin:void 0;if(window.fetch[V1])return;let n=window.fetch.bind(window),r=hu(),i=((e,i)=>{let a=W1(e,t);if(!a.isApi)return n(e,i);if(e instanceof Request){let t=U1(e.headers,r);return n(new Request(a.url,e),{headers:t})}let o=U1(i?.headers,r);return n(a.url,{...i,headers:o})});i[V1]=!0,window.fetch=i}function U1(e,t){let n=new Headers(e);for(let[e,r]of Object.entries(t))n.set(e,r);return n}function W1(e,t){if(typeof e==`string`){if(e.startsWith(`/api/`))return{isApi:!0,url:t?t+e:e};let n=G1(e);return n&&K1(n,t)?{isApi:!0,url:e}:{isApi:!1,url:e}}let n=e instanceof URL?e:G1(e.url,window.location.origin);if(n&&K1(n,t)){let r=e instanceof URL?e.href:e.url;return t&&(n.origin===window.location.origin||n.protocol===`file:`)?{isApi:!0,url:t+n.pathname+n.search+n.hash}:{isApi:!0,url:r}}return{isApi:!1,url:e instanceof URL?e.href:e.url}}function G1(e,t){try{return new URL(e,t)}catch{return null}}function K1(e,t){if(!e.pathname.startsWith(`/api/`))return!1;if(e.origin===window.location.origin||e.protocol===`file:`)return!0;if(t){let n=G1(t);if(n&&e.origin===n.origin)return!0}return!1}var q1=Symbol.for(`ok.client.logForwarder`),J1=2e3,Y1=[`log`,`info`,`warn`,`error`],X1={log:`info`,info:`info`,warn:`warn`,error:`error`};function Z1(e){if(typeof e==`string`)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Q1(e){let t=e.message.length+80;if(e.event&&(t+=e.event.length),e.fields)try{t+=JSON.stringify(e.fields).length}catch{}return t}function $1(e={}){let t=e.windowObj??(typeof window<`u`?window:void 0);if(!t||t.okDesktop)return;let n=t;if(n[q1])return;n[q1]=!0;let r=e.consoleObj??console,i=e.documentObj===void 0?typeof document<`u`?document:null:e.documentObj,a=e.flushIntervalMs??J1,o=e.fetchImpl??n.fetch.bind(n),s=e.now??Date.now,c=[],l=0,u=null,d=!1,f={log:r.log.bind(r),info:r.info.bind(r),warn:r.warn.bind(r),error:r.error.bind(r)};function p(){if(u!==null&&(clearTimeout(u),u=null),c.length===0)return;let e=c.splice(0,100);l=0,d=!0;try{o(`/api/client-logs`,{method:`POST`,headers:{"content-type":`application/json`},keepalive:!0,body:JSON.stringify({entries:e})}).catch(()=>{})}catch{}finally{d=!1}}function m(e){if(c.push(e),l+=Q1(e),c.length>100){let e=c.shift();e&&(l-=Q1(e))}if(c.length>=100||l>=32768){p();return}u===null&&(u=setTimeout(p,a))}function h(e,t){if(!d)try{let n=Ia(t.map(Z1).join(` `)),r=t[0],i=typeof r==`string`&&r.length<=32768?r:void 0,a=i?Xa(i):null,o=a?.fields;if(o)try{JSON.stringify(o).length>8192&&(o=void 0)}catch{o=void 0}m({level:e,message:n,ts:s(),...a?.event?{event:a.event}:{},...o?{fields:o}:{}})}catch{}}for(let e of Y1)r[e]=(...t)=>{f[e](...t),h(X1[e],t)};let g=e=>{if(d)return;let t=e;h(`error`,[`uncaught error: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`])},_=e=>{d||h(`error`,[`unhandledrejection: ${Z1(e.reason)}`])},v=()=>p(),y=()=>{i&&i.visibilityState===`hidden`&&p()};n.addEventListener(`error`,g),n.addEventListener(`unhandledrejection`,_),n.addEventListener(`pagehide`,v),i&&i.addEventListener(`visibilitychange`,y);function b(){for(let e of Y1)r[e]=f[e];n.removeEventListener(`error`,g),n.removeEventListener(`unhandledrejection`,_),n.removeEventListener(`pagehide`,v),i&&i.removeEventListener(`visibilitychange`,y),u!==null&&(clearTimeout(u),u=null),c.length=0,delete n[q1]}return{flushNow:p,uninstall:b}}function e0(e,t){return e.branch===void 0||e.branch===null||e.branch===``||t===``||e.multiCandidate!==!0?null:{message:`Opened on branch ${e.branch}`,description:t}}function t0(e){let t=e.bridge;if(!t)return;let n=e.setHash??(e=>{window.location.hash=e}),r=e.emitToast??((e,t)=>{ul(e,t)});return t.onDeepLink(e=>{let i=e.kind??`doc`,a={kind:i,path:e.doc,branch:e.branch??null};if(e.targetMissing===!0){Bc.arm(a);return}as.arm(a),n(ou(i,e.doc,i===`doc`?e.branch:void 0));let o=e0(e,t.config.projectPath);o!==null&&r(o.message,{description:o.description,duration:3e3})})}var n0=4e3,r0=1440*60*1e3;function i0(e){let t=e.bridge;if(t&&t.onboarding)return t.onboarding.onToast(e=>{if(e.kind===`ancestor-promote`){ul.success(`Opened existing OpenKnowledge project at ${e.ancestorPath}`,{duration:n0});return}if(e.kind===`startup-reclaim`){let t=[];if(e.mcp.status===`repaired`){let n=e.mcp.editors.map(e=>Za[e]??e).join(`, `);t.push(`repaired ${n} MCP integration`)}else e.mcp.status===`failed`&&t.push(`MCP auto-repair failed`);e.path.status===`installed`&&t.push(e.path.summary),e.path.status===`failed`&&t.push(`PATH install failed: ${e.path.summary}`);let n=t.length>0?t.join(`; `):`OpenKnowledge integrations checked.`,r=e.mcp.status===`failed`||e.path.status===`failed`,i=e.path.status!==`none`;ul[r?`error`:`success`](n,{duration:r||i?r0:n0,position:`bottom-left`});return}if(e.kind===`sharing-refused-tracked`){ul.error(`Config sharing unchanged: ${e.tracked.length} OK file(s) tracked upstream — see message below.`,{duration:r0,description:e.remediation});return}if(e.kind===`sharing-no-git`){ul.warning(`Local-only requested but no git repository was created. Switch later via Settings → Config sharing once the project is in a git repo.`,{duration:n0});return}let t=ml(e.gitRoot,e.pickedPath)??e.pickedPath;ul.success(`Initialized OpenKnowledge at ${e.gitRoot} — opened parent of ${t} because it contains a .git folder`,{duration:n0})})}function a0(e){let t=(0,$.c)(18),{body:n,warning:r,restartLabel:i,cancelLabel:a,onRestart:o,onDismiss:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Gc,{className:`mt-0.5 size-4 shrink-0 text-amber-500`}),t[0]=c):c=t[0];let l;t[1]===n?l=t[2]:(l=(0,Z.jsx)(`p`,{className:`font-medium text-sm`,children:n}),t[1]=n,t[2]=l);let u;t[3]===r?u=t[4]:(u=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r}),t[3]=r,t[4]=u);let d;t[5]!==o||t[6]!==i?(d=(0,Z.jsx)(Y,{size:`sm`,onClick:o,children:i}),t[5]=o,t[6]=i,t[7]=d):d=t[7];let f;t[8]!==a||t[9]!==s?(f=(0,Z.jsx)(Y,{size:`sm`,variant:`ghost`,onClick:s,children:a}),t[8]=a,t[9]=s,t[10]=f):f=t[10];let p;t[11]!==d||t[12]!==f?(p=(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;return t[14]!==l||t[15]!==u||t[16]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex w-full gap-3 rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg`,children:[c,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[l,u,p]})]}),t[14]=l,t[15]=u,t[16]=p,t[17]=m):m=t[17],m}function o0(){return _l._({id:`f_PkYv`})}function s0(e){return e.serverRuntime===e.appRuntime?_l._({id:`FWQuPE`,values:{0:e.appRuntime}}):e.relation===`older`?_l._({id:`LhQlGR`,values:{0:e.serverRuntime,1:e.appRuntime}}):_l._({id:`yZmvQ4`,values:{0:e.serverRuntime,1:e.appRuntime}})}function c0(e){return _l._({id:`2YOwme`,values:{appRuntime:e}})}function l0(e){return _l._({id:`5DFPDh`,values:{appRuntime:e}})}function u0(e){return e===`eperm`?_l._({id:`uQewpR`}):_l._({id:`PqYWiC`})}async function d0(e){let t=ul.loading(_l._({id:`Kf7GG5`}),{duration:1/0}),n;try{n=await e.restartServer(e.config.projectPath)}catch{return}ul.dismiss(t),n.ok===!1&&ul.error(u0(n.reason),{duration:1/0})}function f0(e){let t=e.bridge;if(!t)return;let n=t.onServerVersionDrift(e=>{ul.custom(n=>(0,Q.createElement)(a0,{body:s0(e),warning:o0(),restartLabel:_l._({id:`ppDgFi`}),cancelLabel:_l._({id:`PBxg_E`}),onRestart:()=>{ul.dismiss(n),d0(t)},onDismiss:()=>ul.dismiss(n)}),{duration:1/0})}),r=t.onServerRestarted(e=>{ul.success(c0(e.appRuntime))}),i=t.onServerReclaimed(e=>{ul.warning(l0(e.appRuntime),{duration:15e3})});return()=>{n(),r(),i()}}function p0(e){let{initialDoc:t}=e;if(!t)return;let n=e.getHash();n!==``&&n!==`#`&&n!==`#/`||e.setHash(du(t))}function m0(){typeof window>`u`||!window.okDesktop||p0({initialDoc:window.okDesktop.config.initialDoc,getHash:()=>window.location.hash,setHash:e=>{window.location.hash=e}})}Bd(),n(()=>import(`./telemetry-startup-kV7RyeHQ.js`).then(e=>e.initStartupTrace()),__vite__mapDeps([128,0,1,2,3,4,50,10]),import.meta.url),H1({apiOrigin:typeof window<`u`?window.okDesktop?.config.apiOrigin:void 0}),$1(),NE()&&zE(),XQ(),VT(),wI(),TP(),typeof window<`u`&&t0({bridge:window.okDesktop}),typeof window<`u`&&f0({bridge:window.okDesktop}),typeof window<`u`&&Ld({bridge:window.okDesktop}),typeof window<`u`&&pl({bridge:window.okDesktop}),typeof window<`u`&&i0({bridge:window.okDesktop}),typeof window<`u`&&zd({bridge:window.okDesktop}),typeof window<`u`&&R1({bridge:window.okDesktop}),m0();var h0=new Kd({defaultOptions:{queries:{retry:1,staleTime:1e4}}}),g0=document.getElementById(`root`);if(!g0)throw Error(`Root element not found`);var _0=typeof window>`u`?void 0:window.okDesktop;(0,Zd.createRoot)(g0).render((0,Z.jsx)(Q.StrictMode,{children:(0,Z.jsx)(Mt,{i18n:_l,children:(0,Z.jsx)(Kt,{client:h0,children:(0,Z.jsxs)(sn,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,storageKey:`ok-theme-v1`,children:[(0,Z.jsxs)(xn,{children:[(0,Z.jsx)(Yp,{children:F1(_0)}),_0!==void 0&&(0,Z.jsx)(Zp,{children:(0,Z.jsx)(z1,{bridge:_0})})]}),(0,Z.jsx)(B1,{richColors:!0,closeButton:!0})]})})})}));
1995
+ `);o=s.pop()??``;for(let e of s){if(!e.trim())continue;let n;try{n=JSON.parse(e)}catch{console.warn(`[clone-transport] Dropped unparseable NDJSON line:`,e.slice(0,100));continue}if(n&&typeof n==`object`&&n.type===`error`&&`problem`in n){let e=n.problem;t({type:`error`,message:e?.detail||e?.title||`Unknown error`});break}t(n)}if(n.aborted)break}n.aborted||t({type:`error`,message:`Clone stream ended unexpectedly — check if the clone completed`})}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;t({type:`error`,message:`Clone failed — connection error`})}})()})}}}function o1(e){return{start(t){let n=typeof t.branch==`string`&&t.branch.length>0?t.branch:null;return e.localOp.clone.start({url:t.url,dir:t.dir,branch:n})}}}function s1(e){switch(e){case`receiving`:return{id:`qbfj1f`};case`resolving`:return{id:`adsMWO`};case`checking`:return{id:`1HBhDS`};case`init`:return{id:`LlHqdU`};case`done`:return{id:`bD8I7O`};default:return{id:`25Pw6a`}}}function c1(e){let t=e.trim();if(/^[\w.-]+\/[\w.-]+$/.test(t))return t.split(`/`)[1];try{return new URL(t.replace(/^git@([^:]+):/,`https://$1/`)).pathname.replace(/\.git$/,``).split(`/`).pop()??`repo`}catch{return t.split(`/`).pop()?.replace(/\.git$/,``)??`repo`}}function l1(e){let t=(0,$.c)(100),{open:n,onOpenChange:r,onSignIn:i,onCloneComplete:a,transport:o,authQueryTransport:s,pickParentFolder:c,initialUrl:l}=e,{_:u}=jt(),d;t[0]===o?d=t[1]:(d=o??a1(),t[0]=o,t[1]=d);let f=d,p;t[2]===s?p=t[3]:(p=s??Ji(),t[2]=s,t[3]=p);let m=p,h=c!==void 0,[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(null),[S,C]=(0,Q.useState)(!1),T;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(T=Qi(),t[4]=T):T=t[4];let[E,D]=(0,Q.useState)(T),[O,k]=(0,Q.useState)(!1),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(-1),P=(0,Q.useRef)(null),F=(0,Q.useRef)(null),I=(0,Q.useRef)(null),L=(0,Q.useId)(),R;t[5]!==n||t[6]!==m?(R=()=>{if(!n)return;let e=!1;return m.status().then(t=>{Wi(t.authenticated),e||D(t.authenticated)}).catch(()=>{e||D(!1)}),()=>{e=!0}},t[5]=n,t[6]=m,t[7]=R):R=t[7];let z;t[8]===n?z=t[9]:(z=[n],t[8]=n,t[9]=z),(0,Q.useEffect)(R,z);let B;t[10]!==E||t[11]!==n||t[12]!==m?(B=()=>{if(!E||!n)return;let e=!1;return C(!0),m.repos().then(t=>{e||(x(t.ok?t.repos:[]),C(!1))}).catch(()=>{e||(x([]),C(!1))}),()=>{e=!0}},t[10]=E,t[11]=n,t[12]=m,t[13]=B):B=t[13];let V;t[14]!==E||t[15]!==n?(V=[E,n],t[14]=E,t[15]=n,t[16]=V):V=t[16],(0,Q.useEffect)(B,V);let H,U;t[17]!==l||t[18]!==n||t[19]!==h?(H=()=>{if(!n||!l||(_(l),h))return;let e=c1(l);e&&y(`~/Documents/${e}`)},U=[n,l,h],t[17]=l,t[18]=n,t[19]=h,t[20]=H,t[21]=U):(H=t[20],U=t[21]),(0,Q.useEffect)(H,U);let W,G;t[22]!==M||t[23]!==L?(W=()=>{M<0||document.getElementById(`${L}-opt-${M}`)?.scrollIntoView({block:`nearest`})},G=[M,L],t[22]=M,t[23]=L,t[24]=W,t[25]=G):(W=t[24],G=t[25]),(0,Q.useEffect)(W,G);let K;t[26]===h?K=t[27]:(K=function(e){if(_(e),j(!0),N(-1),h)return;let t=c1(e);t&&y(`~/Documents/${t}`)},t[26]=h,t[27]=K);let ee=K,te;t[28]===h?te=t[29]:(te=function(e){if(_(e.clone_url),h)return;let t=e.full_name.split(`/`)[1];y(`~/Documents/${t}`)},t[28]=h,t[29]=te);let q=te,ne;t[30]!==u||t[31]!==v||t[32]!==a||t[33]!==r||t[34]!==c||t[35]!==f||t[36]!==g?(ne=async function(){let e=g.trim();if(!e){ul.error(u({id:`FTUGgh`}));return}let t=v||``;if(c){k(!0);let n=await c();if(!n){k(!1);return}let r=c1(e);t=`${n.replace(/\/$/,``)}/${r}`}else k(!0);let n=ul.loading(u({id:`2tgFCe`}),{duration:1/0});F.current=n;let i=f.start({url:e,dir:t});P.current=i.cancel;try{let e=i.events[Symbol.asyncIterator](),t=await e.next();for(;!t.done;){let i=t.value;if(i.type===`progress`){let e=u(s1(i.phase));ul.loading(`${e} — ${i.pct}%`,{id:n})}else if(i.type===`complete`){ul.success(u({id:`u_lS4C`}),{id:n}),r(!1),k(!1),P.current=null;let e=`port`in i?i.port:void 0;a?a({port:e,dir:i.dir}):e!==void 0&&(window.location.href=`http://localhost:${e}`);return}else if(i.type===`error`){let e=i.message;ul.error(u({id:`eFJkVt`,values:{cloneError:e}}),{id:n}),k(!1),P.current=null;return}t=await e.next()}ul.error(u({id:`Tz9pJB`}),{id:n}),k(!1),P.current=null}catch(e){console.error(`[CloneDialog] clone iteration failed:`,e),ul.error(u({id:`K9J00P`}),{id:n}),k(!1),P.current=null}},t[30]=u,t[31]=v,t[32]=a,t[33]=r,t[34]=c,t[35]=f,t[36]=g,t[37]=ne):ne=t[37];let ie=ne,oe;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(oe=function(){P.current?.(),P.current=null,k(!1),ul.dismiss(F.current??void 0)},t[38]=oe):oe=t[38];let se=oe,ce;t[39]!==O||t[40]!==r||t[41]!==h?(ce=function(e){O||(r(e),e||(_(``),h||y(``),j(!1),N(-1)))},t[39]=O,t[40]=r,t[41]=h,t[42]=ce):ce=t[42];let le=ce,ue;t[43]===q?ue=t[44]:(ue=function(e){q(e),j(!1),N(-1),I.current?.focus()},t[43]=q,t[44]=ue);let de=ue,fe=E===null||S&&b===null,pe;if(t[45]!==b||t[46]!==g){let e=g.trim().toLowerCase(),n;t[48]===b?n=t[49]:(n=b??[],t[48]=b,t[49]=n),pe=n.filter(t=>`${t.full_name} ${t.clone_url}`.toLowerCase().includes(e)),t[45]=b,t[46]=g,t[47]=pe}else pe=t[47];let me=pe,he;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(he=/:\/\/|^git@|\.git$/i,t[50]=he):he=t[50];let ge;t[51]===g?ge=t[52]:(ge=he.test(g.trim()),t[51]=g,t[52]=ge);let _e=ge,ve=E===!0&&b!==null&&me.length===0&&!_e,ye=A&&E!==!1&&!O&&(fe||me.length>0||ve),be=me.length,xe=`${L}-loading`,Se,Ce;t[53]===be?(Se=t[54],Ce=t[55]):(Se=()=>{N(e=>e>=be?be-1:e)},Ce=[be],t[53]=be,t[54]=Se,t[55]=Ce),(0,Q.useEffect)(Se,Ce);let we;t[56]!==M||t[57]!==O||t[58]!==ye||t[59]!==de||t[60]!==me?(we=function(e){if(!O)if(e.key===`ArrowDown`){if(e.preventDefault(),!ye){j(!0);return}N(e=>Math.min(e+1,me.length-1))}else e.key===`ArrowUp`?(e.preventDefault(),N(h1)):e.key===`Enter`?ye&&M>=0&&M<me.length&&(e.preventDefault(),de(me[M])):e.key===`Escape`&&ye&&(e.preventDefault(),e.stopPropagation(),j(!1),N(-1))},t[56]=M,t[57]=O,t[58]=ye,t[59]=de,t[60]=me,t[61]=we):we=t[61];let Te=we,Ee;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,Z.jsx)(Mn,{children:(0,Z.jsx)(On,{children:(0,Z.jsx)(J,{id:`VdXv4D`})})}),t[62]=Ee):Ee=t[62];let De;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Z.jsx)(`label`,{htmlFor:`clone-source`,className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`IreQBq`})}),t[63]=De):De=t[63];let Oe;t[64]!==u||t[65]!==M||t[66]!==O||t[67]!==Te||t[68]!==ee||t[69]!==E||t[70]!==L||t[71]!==xe||t[72]!==i||t[73]!==ye||t[74]!==fe||t[75]!==b||t[76]!==de||t[77]!==me||t[78]!==g?(Oe=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[De,E===!1?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(gl,{id:`clone-source`,placeholder:u({id:`Xv_ijG`}),value:g,onChange:e=>ee(e.target.value),disabled:O}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-1sm text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:(0,Z.jsx)(J,{id:`9oE4C3`})}),(0,Z.jsx)(Y,{variant:`link`,className:`h-auto p-0`,onClick:()=>i?.(),disabled:O,children:(0,Z.jsx)(J,{id:`3jod3l`})})]})]}):(0,Z.jsxs)(ae,{open:ye,onOpenChange:j,children:[(0,Z.jsx)(w,{asChild:!0,children:(0,Z.jsx)(gl,{id:`clone-source`,ref:I,role:`combobox`,"aria-expanded":ye,"aria-controls":ye?fe?xe:L:void 0,"aria-activedescendant":M>=0?`${L}-opt-${M}`:void 0,"aria-autocomplete":`list`,autoComplete:`off`,placeholder:u({id:`R0jJzV`}),value:g,onChange:e=>ee(e.target.value),onFocus:()=>j(!0),onKeyDown:Te,disabled:O})}),(0,Z.jsx)(re,{align:`start`,sideOffset:4,className:`w-(--radix-popover-trigger-width) max-h-56 overflow-y-auto overscroll-y-contain subtle-scrollbar p-0`,onOpenAutoFocus:m1,onCloseAutoFocus:p1,onInteractOutside:e=>{I.current?.contains(e.target)&&e.preventDefault()},onWheel:f1,onTouchMove:d1,children:fe?(0,Z.jsxs)(`output`,{id:xe,className:`flex flex-col gap-1.5 px-3 py-2`,"aria-label":u({id:`8XQRON`}),children:[(0,Z.jsx)(xl,{className:`h-4 w-2/3`}),(0,Z.jsx)(xl,{className:`h-4 w-1/2`}),(0,Z.jsx)(xl,{className:`h-4 w-3/4`}),(0,Z.jsx)(xl,{className:`h-4 w-2/5`})]}):(0,Z.jsx)(`div`,{id:L,role:`listbox`,"aria-label":u({id:`KX1MZR`}),className:`py-1`,children:me.length===0?(0,Z.jsx)(`div`,{role:`presentation`,className:`px-3 py-2 text-xs text-muted-foreground`,children:b&&b.length===0?(0,Z.jsx)(J,{id:`cOSAfL`}):(0,Z.jsx)(J,{id:`8eW0WQ`})}):me.map((e,t)=>(0,Z.jsxs)(`div`,{id:`${L}-opt-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===M,onMouseDown:u1,onMouseEnter:()=>N(t),onClick:()=>de(e),className:X(`flex cursor-default items-center gap-2 px-3 py-1.5 text-sm`,t===M&&`bg-accent text-accent-foreground`),children:[e.private?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Vs,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(J,{id:`n5n_vi`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Is,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(J,{id:`NuH1jp`})})]}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.full_name})]},e.full_name))})})]})]}),t[64]=u,t[65]=M,t[66]=O,t[67]=Te,t[68]=ee,t[69]=E,t[70]=L,t[71]=xe,t[72]=i,t[73]=ye,t[74]=fe,t[75]=b,t[76]=de,t[77]=me,t[78]=g,t[79]=Oe):Oe=t[79];let ke;t[80]!==O||t[81]!==v||t[82]!==h?(ke=!h&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{htmlFor:`clone-path`,className:`text-sm font-medium`,children:(0,Z.jsx)(J,{id:`Gp_twO`})}),(0,Z.jsx)(gl,{id:`clone-path`,placeholder:`~/Documents/repo-name`,value:v,onChange:e=>y(e.target.value),disabled:O})]}),t[80]=O,t[81]=v,t[82]=h,t[83]=ke):ke=t[83];let Ae;t[84]!==Oe||t[85]!==ke?(Ae=(0,Z.jsx)(An,{children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[Oe,ke]})}),t[84]=Oe,t[85]=ke,t[86]=Ae):Ae=t[86];let je;t[87]!==O||t[88]!==ie||t[89]!==le||t[90]!==g||t[91]!==h?(je=(0,Z.jsx)(jn,{children:O?(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:se,children:(0,Z.jsx)(J,{id:`dEgA5A`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Y,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>le(!1),children:(0,Z.jsx)(J,{id:`dEgA5A`})}),(0,Z.jsx)(Y,{onClick:()=>void ie(),disabled:!g.trim(),"aria-describedby":h?`clone-picker-hint`:void 0,children:(0,Z.jsx)(J,{id:`9UQ730`})}),h&&(0,Z.jsx)(`span`,{id:`clone-picker-hint`,className:`sr-only`,children:(0,Z.jsx)(J,{id:`EvPX7f`})})]})}),t[87]=O,t[88]=ie,t[89]=le,t[90]=g,t[91]=h,t[92]=je):je=t[92];let Me;t[93]!==Ae||t[94]!==je?(Me=(0,Z.jsxs)(kn,{className:`sm:max-w-lg`,children:[Ee,Ae,je]}),t[93]=Ae,t[94]=je,t[95]=Me):Me=t[95];let Ne;return t[96]!==le||t[97]!==n||t[98]!==Me?(Ne=(0,Z.jsx)(Nn,{open:n,onOpenChange:le,children:Me}),t[96]=le,t[97]=n,t[98]=Me,t[99]=Ne):Ne=t[99],Ne}function u1(e){return e.preventDefault()}function d1(e){return e.stopPropagation()}function f1(e){return e.stopPropagation()}function p1(e){return e.preventDefault()}function m1(e){return e.preventDefault()}function h1(e){return Math.max(e-1,-1)}var g1=(0,Q.lazy)(()=>n(()=>import(`./ConsentDialogBody-CFh9gVKe.js`),__vite__mapDeps([125,1,9,10,11,12,13,14,15,16,17,18,71,19,20,74,78,126,91,92,33,34,22,77,26,27]),import.meta.url));function _1(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(hl.subscribe,y1,v1))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(g1,{})}),e[0]=t):t=e[0],t}function v1(){return!1}function y1(){return hl.getSnapshot()!==null}function b1(e){let t=(0,$.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`OpenKnowledge icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`g`,{filter:`url(#filter0_d_ok)`,children:[(0,Z.jsx)(`path`,{d:`M66.8902 16.1017C58.2694 3.86669 46.1739 -0.690239 29.9182 2.17749C21.3995 3.67813 13.4602 9.555 8.67934 17.9009C3.93974 26.1701 2.98514 35.6533 6.05714 43.9166C9.31574 52.6868 16.7168 58.4752 24.2299 63.4231C25.7973 64.4562 26.1351 65.7172 26.3551 68.9896C26.5221 71.4625 26.799 75.6011 30.6842 77.7204C31.8176 78.3372 33.0648 78.6515 34.3946 78.6515C37.0796 78.6515 39.4033 77.3649 40.5189 76.7482C47.1049 73.1046 68.8878 59.7147 72.6453 40.4027C74.3444 31.6679 70.9797 21.9019 66.8922 16.1017H66.8902Z`,fill:`white`}),(0,Z.jsx)(`path`,{d:`M37.4214 71.154C28.7888 75.929 36.787 64.0397 27.7458 58.0843C21.6372 54.0616 14.788 49.0568 12.0499 41.6911C6.74463 27.4192 17.5438 10.8473 31.028 8.47262C45.1977 5.97613 54.6946 9.8947 61.6635 19.7844C65.2089 24.8167 67.6013 32.8365 66.3658 39.1828C63.6906 52.9341 49.073 64.7075 37.4214 71.154Z`,fill:`#69A3FF`}),(0,Z.jsx)(`path`,{d:`M52.7244 29.2638C53.4665 28.5217 54.6697 28.5217 55.4119 29.2638V29.2638C56.154 30.0059 56.154 31.2091 55.4119 31.9513L49.2589 38.1042L46.5715 35.4167L52.7244 29.2638Z`,fill:`#D5E5FF`}),(0,Z.jsx)(`path`,{d:`M55.4119 38.8821C56.154 39.6242 56.154 40.8274 55.4119 41.5696V41.5696C54.6698 42.3117 53.4665 42.3117 52.7244 41.5696L46.5715 35.4166L49.259 32.7292L55.4119 38.8821Z`,fill:`#D5E5FF`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`defs`,{children:(0,Z.jsxs)(`filter`,{id:`filter0_d_ok`,x:`-9.53674e-07`,y:`-0.0799994`,width:`77.3817`,height:`85.8743`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,Z.jsx)(`feFlood`,{floodOpacity:`0`,result:`BackgroundImageFix`}),(0,Z.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,Z.jsx)(`feOffset`,{dy:`2.85714`}),(0,Z.jsx)(`feGaussianBlur`,{stdDeviation:`2.14286`}),(0,Z.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,Z.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow_ok`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow_ok`,result:`shape`})]})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,Z.jsxs)(`svg`,{role:`img`,"aria-label":`OpenKnowledge icon`,fill:`none`,height:24,width:24,viewBox:`0 0 78 80`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var x1=(0,Q.lazy)(()=>n(()=>import(`./ShareReceiveDialog-BbWq-gzG.js`).then(e=>({default:e.ShareReceiveDialog})),__vite__mapDeps([127,1,6,2,3,7,8,9,10,15,19,14,16,20,24,78,119,120,121]),import.meta.url)),S1=(e,t,n)=>D_(e,t,n,`NavigatorApp`);function C1(e,t){return e.filter(e=>e.path!==t)}function w1(e){let t=(0,$.c)(108),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[i,a]=(0,Q.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=new Map,t[1]=o):o=t[1];let[s,c]=(0,Q.useState)(o),[l,u]=(0,Q.useState)(!0),[d,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)(!1),[C,w]=(0,Q.useState)(void 0),[T,E]=(0,Q.useState)(void 0),[D,O]=(0,Q.useState)(!1),[k,A]=(0,Q.useState)(!1),[j,N]=(0,Q.useState)(null),P=typeof window<`u`&&window.okDesktop!=null,[F,I]=(0,Q.useState)(`auth`),{theme:L}=on(),{_:R}=jt();_u(n,L??`system`);let z;t[2]!==R||t[3]!==n.project?(z=()=>{let e=!1;return n.project.listRecent().then(async t=>{if(e)return;a(t);let r=t.filter(T1),i=await Promise.all(r.map(async e=>{try{let{currentBranch:t}=await n.project.readHeadBranch(e.path);return[e.path,t]}catch{return[e.path,null]}}));e||c(e=>{let t=new Map(e);for(let[e,n]of i)t.set(e,n);return t})}).catch(t=>{console.error(`[NavigatorApp] listRecent failed:`,t),e||(m(t instanceof Error?t.message:R({id:`fYKgzG`})),f(!0))}).finally(()=>{e||u(!1)}),()=>{e=!0}},t[2]=R,t[3]=n.project,t[4]=z):z=t[4];let B;t[5]!==R||t[6]!==n?(B=[n,R],t[5]=R,t[6]=n,t[7]=B):B=t[7],(0,Q.useEffect)(z,B);let V,H;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>M(e=>{e===`new-project`&&b(!0),e===`report-bug`&&S(!0),e===`close-active-tab-or-window`&&window.close()}),H=[],t[8]=V,t[9]=H):(V=t[8],H=t[9]),(0,Q.useEffect)(V,H);let U;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(U=(e,t)=>S1(e,t,m),t[10]=U):U=t[10];let W=U,G;t[11]!==R||t[12]!==n?(G=(e,t,r)=>W(()=>(g(r),k1(n,e,t).finally(()=>g(null))),R({id:`SUOoXn`})),t[11]=R,t[12]=n,t[13]=G):G=t[13];let K=G,ee;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>v(!0),t[14]=ee):ee=t[14];let te=ee,q;t[15]!==R||t[16]!==n?(q=()=>W(async()=>{let e=await n.dialog.openFolder();e&&(g(A1(e)),await k1(n,e,`pick-existing`).finally(()=>g(null)))},R({id:`gmJ0An`})),t[15]=R,t[16]=n,t[17]=q):q=t[17];let ne=q,re;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(re=()=>b(!0),t[18]=re):re=t[18];let ie=re,ae;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(e,t)=>{w(e),E(t),b(!0)},t[19]=ae):ae=t[19];let oe=ae,se;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(se=e=>{b(e),e||(w(void 0),E(void 0))},t[20]=se):se=t[20];let ce=se,le;t[21]===K?le=t[22]:(le=e=>K(e,`recents`,A1(e)),t[21]=K,t[22]=le);let ue=le,de;t[23]!==R||t[24]!==n.project?(de=e=>W(async()=>{await n.project.removeRecent(e),a(t=>C1(t,e)),c(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},R({id:`viwC-K`})),t[23]=R,t[24]=n.project,t[25]=de):de=t[25];let fe=de,pe;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 z-10 h-9 ${P?`[-webkit-app-region:drag]`:``}`,"data-electron-drag":P?``:void 0,"data-testid":`nav-chrome-row`}),t[26]=pe):pe=t[26];let me;t[27]!==R||t[28]!==h?(me=h===null?null:(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-20 flex flex-col items-center justify-center gap-3 bg-primary-foreground/85 dark:bg-background/85 backdrop-blur-sm`,"data-testid":`nav-opening-overlay`,role:`status`,"aria-live":`polite`,children:[(0,Z.jsx)(zc,{className:`size-6 animate-spin text-muted-foreground`}),(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:R({id:`s0_GnA`,values:{openingLabel:h}})})]}),t[27]=R,t[28]=h,t[29]=me):me=t[29];let he;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,Z.jsx)(b1,{className:`size-12 shrink-0`}),t[30]=he):he=t[30];let ge;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`font-medium text-xl tracking-tight`,children:`OpenKnowledge`}),(0,Z.jsx)(GP,{})]}),t[31]=ge):ge=t[31];let _e;t[32]===n.appVersion?_e=t[33]:(_e=(0,Z.jsxs)(`header`,{className:`shrink-0 flex-wrap flex items-center gap-2.5`,children:[he,(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[ge,(0,Z.jsxs)(`p`,{className:`text-muted-foreground text-xs font-mono`,children:[`v`,n.appVersion]})]})]}),t[32]=n.appVersion,t[33]=_e);let ve;t[34]!==R||t[35]!==l||t[36]!==ne||t[37]!==i||t[38]!==d?(ve=l?null:!d&&i.length===0?(0,Z.jsx)(D1,{onPackSelect:oe,onOpenFolder:ne,onClone:te,onCreate:ie}):(0,Z.jsxs)(`section`,{className:`grid shrink-0 sm:grid-cols-3 gap-3`,children:[(0,Z.jsx)(E1,{title:R({id:`wbv9xO`}),description:R({id:`0uTHCg`}),onClick:ie,dataTestId:`nav-create-new`,Icon:Oe}),(0,Z.jsx)(E1,{title:R({id:`WPwDin`}),description:R({id:`tUvUfp`}),onClick:ne,dataTestId:`nav-open`,Icon:Sc}),(0,Z.jsx)(E1,{title:R({id:`VdXv4D`}),description:R({id:`JOcPqH`}),onClick:te,dataTestId:`nav-clone`,Icon:Hh})]}),t[34]=R,t[35]=l,t[36]=ne,t[37]=i,t[38]=d,t[39]=ve):ve=t[39];let ye;t[40]===p?ye=t[41]:(ye=p===null?null:(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2`,"data-testid":`nav-error-banner`,role:`alert`,children:[(0,Z.jsx)(`span`,{className:`text-red-700 text-xs dark:text-red-300`,children:p}),(0,Z.jsx)(Y,{type:`button`,variant:`link`,size:`sm`,onClick:()=>m(null),className:`h-auto p-0 text-red-700 text-xs dark:text-red-300`,"data-testid":`nav-error-dismiss`,children:(0,Z.jsx)(J,{id:`1QfxQT`})})]}),t[40]=p,t[41]=ye);let be;t[42]!==l||t[43]!==ue||t[44]!==fe||t[45]!==s||t[46]!==i?(be=l?(0,Z.jsx)(`section`,{className:`flex shrink-0 flex-col items-center`,children:(0,Z.jsx)(zc,{className:`size-4 animate-spin text-muted-foreground/60`})}):i.length>0?(0,Z.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[(0,Z.jsx)(`h2`,{className:`mb-2 shrink-0 font-medium text-muted-foreground font-mono text-xs uppercase tracking-wide`,children:(0,Z.jsx)(J,{id:`CCTop_`})}),(0,Z.jsx)(`ul`,{className:`min-h-0 max-h-48 subtle-scrollbar scroll-fade-mask overflow-y-auto space-y-0.5 -mx-4`,"data-testid":`nav-recent-list`,children:i.map(e=>(0,Z.jsx)(O1,{project:e,branch:s.get(e.path)??null,onOpen:()=>ue(e.path),onRemove:()=>fe(e.path)},e.path))})]}):null,t[42]=l,t[43]=ue,t[44]=fe,t[45]=s,t[46]=i,t[47]=be):be=t[47];let xe;t[48]!==_e||t[49]!==ve||t[50]!==ye||t[51]!==be?(xe=(0,Z.jsx)(`div`,{className:`mx-auto flex h-full w-full max-w-5xl flex-col overflow-hidden px-12 py-12`,children:(0,Z.jsxs)(`div`,{className:`my-auto flex min-h-0 flex-col space-y-10`,children:[_e,ve,ye,be]})}),t[48]=_e,t[49]=ve,t[50]=ye,t[51]=be,t[52]=xe):xe=t[52];let Se,Ce;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,Z.jsx)(y$,{}),Ce=(0,Z.jsx)(_1,{}),t[53]=Se,t[54]=Ce):(Se=t[53],Ce=t[54]);let we;t[55]!==n||t[56]!==y||t[57]!==C||t[58]!==T?(we=(0,Z.jsx)(Oh,{open:y,onOpenChange:ce,bridge:n,initialPackId:C,packs:T}),t[55]=n,t[56]=y,t[57]=C,t[58]=T,t[59]=we):we=t[59];let Te;t[60]===x?Te=t[61]:(Te=(0,Z.jsx)(jf,{open:x,onOpenChange:S,systemWide:!0}),t[60]=x,t[61]=Te);let Ee;t[62]===j?Ee=t[63]:(Ee=e=>{O(e),e||(A(!1),j&&(j(null),N(null)))},t[62]=j,t[63]=Ee);let De;t[64]===n?De=t[65]:(De=mi(n),t[64]=n,t[65]=De);let ke;t[66]===n?ke=t[67]:(ke=_i(n),t[66]=n,t[67]=ke);let Ae=F===`identity`,je;t[68]!==k||t[69]!==j?(je=e=>{O(!1),k&&(A(!1),v(!0)),j&&(j({authenticated:!0,host:`github.com`,login:e.login}),N(null))},t[68]=k,t[69]=j,t[70]=je):je=t[70];let Me;t[71]!==D||t[72]!==Ee||t[73]!==De||t[74]!==ke||t[75]!==Ae||t[76]!==je?(Me=(0,Z.jsx)(Di,{open:D,onOpenChange:Ee,transport:De,queryTransport:ke,identityPrompt:Ae,onSuccess:je}),t[71]=D,t[72]=Ee,t[73]=De,t[74]=ke,t[75]=Ae,t[76]=je,t[77]=Me):Me=t[77];let Ne;t[78]===n?Ne=t[79]:(Ne=o1(n),t[78]=n,t[79]=Ne);let Pe;t[80]===n?Pe=t[81]:(Pe=_i(n),t[80]=n,t[81]=Pe);let Fe;t[82]===n.dialog?Fe=t[83]:(Fe=()=>n.dialog.openFolder(),t[82]=n.dialog,t[83]=Fe);let Ie;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=()=>{v(!1),I(`auth`),A(!0),O(!0)},t[84]=Ie):Ie=t[84];let Le;t[85]!==R||t[86]!==n?(Le=e=>{let{dir:t}=e;W(()=>(g(A1(t)),k1(n,t,`pick-existing`).finally(()=>g(null))),R({id:`iSnkwB`}))},t[85]=R,t[86]=n,t[87]=Le):Le=t[87];let Re;t[88]!==_||t[89]!==Ne||t[90]!==Pe||t[91]!==Fe||t[92]!==Le?(Re=(0,Z.jsx)(l1,{open:_,onOpenChange:v,transport:Ne,authQueryTransport:Pe,pickParentFolder:Fe,onSignIn:Ie,onCloneComplete:Le}),t[88]=_,t[89]=Ne,t[90]=Pe,t[91]=Fe,t[92]=Le,t[93]=Re):Re=t[93];let ze;if(t[94]!==n){let e;t[96]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>new Promise(e=>{N(()=>e),O(!0)}),t[96]=e):e=t[96],ze=i1({bridge:n,authQueryTransport:_i(n),cloneTransport:o1(n),openSignIn:e}),t[94]=n,t[95]=ze}else ze=t[95];let Be;t[97]!==n||t[98]!==ze?(Be=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(x1,{bridge:n,cloneController:ze})}),t[97]=n,t[98]=ze,t[99]=Be):Be=t[99];let Ve;return t[100]!==me||t[101]!==xe||t[102]!==we||t[103]!==Te||t[104]!==Me||t[105]!==Re||t[106]!==Be?(Ve=(0,Z.jsxs)(`div`,{className:`relative flex h-screen w-screen flex-col overflow-hidden bg-primary-foreground dark:bg-background text-foreground`,children:[pe,me,xe,Se,Ce,we,Te,Me,Re,Be]}),t[100]=me,t[101]=xe,t[102]=we,t[103]=Te,t[104]=Me,t[105]=Re,t[106]=Be,t[107]=Ve):Ve=t[107],Ve}function T1(e){return!e.missing}function E1(e){let t=(0,$.c)(14),{title:n,description:r,onClick:i,dataTestId:a,Icon:o}=e,s;t[0]===o?s=t[1]:(s=o?(0,Z.jsx)(o,{className:`size-4 shrink-0 text-muted-foreground`}):null,t[0]=o,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,Z.jsx)(`span`,{className:`font-medium text-gray-700 dark:text-foreground text-sm`,children:n}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(`span`,{className:`line-clamp-2 text-muted-foreground text-xs leading-snug`,children:r}),t[7]=r,t[8]=u);let d;return t[9]!==a||t[10]!==i||t[11]!==l||t[12]!==u?(d=(0,Z.jsxs)(Y,{type:`button`,variant:`outline`,onClick:i,"data-testid":a,className:`h-auto flex-col items-start justify-start gap-1.5 whitespace-normal bg-card px-4 py-3.5 text-left`,children:[l,u]}),t[9]=a,t[10]=i,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function D1(e){let t=(0,$.c)(31),{onPackSelect:n,onOpenFolder:r,onClone:i,onCreate:a}=e,[o,s]=(0,Q.useState)(null),c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=!1;return(async()=>{try{let t=await l_().listPacks();if(e)return;t.ok?s(t.packs):(console.error(`[NavigatorApp] listPacks returned error:`,t),s([]))}catch(t){let n=t;if(e)return;console.error(`[NavigatorApp] listPacks failed:`,n),s([])}})(),()=>{e=!0}},l=[],t[0]=c,t[1]=l):(c=t[0],l=t[1]),(0,Q.useEffect)(c,l);let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(`h2`,{className:`text-xl font-light tracking-tighter text-balance`,children:(0,Z.jsx)(J,{id:`QnjpOq`})}),t[2]=u):u=t[2];let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1`,children:[u,(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:(0,Z.jsx)(J,{id:`gYuDfu`})})]}),t[3]=d):d=t[3];let f;t[4]!==n||t[5]!==o?(f=e=>n(e,o??[]),t[4]=n,t[5]=o,t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=[`okf`,`entity-vault`],t[7]=p):p=t[7];let m;t[8]!==o||t[9]!==f?(m=(0,Z.jsx)(`div`,{className:`-m-1 min-h-0 flex-1 overflow-y-auto subtle-scrollbar p-1`,children:(0,Z.jsx)(f_,{packs:o,onPackSelect:f,collapsedPackIds:p})}),t[8]=o,t[9]=f,t[10]=m):m=t[10];let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:(0,Z.jsx)(J,{id:`S34Vju`})}),t[11]=h):h=t[11];let g,_;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Z.jsx)(Sc,{"aria-hidden":`true`,className:`size-3.5`}),g=(0,Z.jsx)(J,{id:`PVUn_c`}),t[12]=g,t[13]=_):(g=t[12],_=t[13]);let v;t[14]===r?v=t[15]:(v=(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:r,"data-testid":`nav-first-run-open`,children:[_,g]}),t[14]=r,t[15]=v);let y,b;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(Hh,{"aria-hidden":`true`,className:`size-3.5`}),b=(0,Z.jsx)(J,{id:`VdXv4D`}),t[16]=y,t[17]=b):(y=t[16],b=t[17]);let x;t[18]===i?x=t[19]:(x=(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:i,"data-testid":`nav-first-run-clone`,children:[y,b]}),t[18]=i,t[19]=x);let S,C;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(Oe,{"aria-hidden":`true`,className:`size-3.5`}),C=(0,Z.jsx)(J,{id:`ircigK`}),t[20]=S,t[21]=C):(S=t[20],C=t[21]);let w;t[22]===a?w=t[23]:(w=(0,Z.jsxs)(Y,{type:`button`,variant:`link-muted`,size:`sm`,onClick:a,"data-testid":`nav-first-run-blank`,children:[S,C]}),t[22]=a,t[23]=w);let T;t[24]!==v||t[25]!==x||t[26]!==w?(T=(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1`,"data-testid":`nav-first-run-secondary`,children:[h,(0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-1 gap-y-1`,children:[v,x,w]})]}),t[24]=v,t[25]=x,t[26]=w,t[27]=T):T=t[27];let E;return t[28]!==T||t[29]!==m?(E=(0,Z.jsxs)(`section`,{className:`flex min-h-0 shrink flex-col gap-6`,"data-testid":`nav-first-run`,children:[d,m,T]}),t[28]=T,t[29]=m,t[30]=E):E=t[30],E}function O1(e){let t=(0,$.c)(44),{project:n,branch:r,onOpen:i,onRemove:a}=e,{_:o}=jt(),{name:s}=n,c=n.isLinkedWorktree===!0,l=c?n.branch??r:r,u=n.missing,d=n.missing&&`opacity-50`,f;t[0]===d?f=t[1]:(f=X(`h-auto min-w-0 flex-1 justify-between gap-3 py-3.5 pl-4 pr-2 text-left hover:bg-transparent`,d),t[0]=d,t[1]=f);let p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(Tm,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-muted-foreground`}),t[2]=p):p=t[2];let m;t[3]===n.name?m=t[4]:(m=(0,Z.jsx)(`span`,{className:`truncate font-medium text-sm text-gray-700 dark:text-foreground`,children:n.name}),t[3]=n.name,t[4]=m);let h;t[5]===c?h=t[6]:(h=c?(0,Z.jsxs)(Ps,{variant:`secondary`,className:`shrink-0 gap-1 rounded-full border-transparent bg-green-600/10 px-2 py-0 font-medium text-2xs text-green-800 dark:bg-green-400/10 dark:text-green-400`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-2.5`}),(0,Z.jsx)(J,{id:`z-lawV`})]}):null,t[5]=c,t[6]=h);let g;t[7]!==m||t[8]!==h?(g=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[m,h]}),t[7]=m,t[8]=h,t[9]=g):g=t[9];let _=c?n.mainRoot??``:n.path,v;t[10]!==c||t[11]!==n.mainRoot||t[12]!==n.path?(v=c?(0,Z.jsx)(J,{id:`PRnH8G`,values:{0:H_(n.mainRoot??``)}}):n.path,t[10]=c,t[11]=n.mainRoot,t[12]=n.path,t[13]=v):v=t[13];let y;t[14]!==_||t[15]!==v?(y=(0,Z.jsx)(`span`,{className:`truncate w-full text-muted-foreground text-xs`,title:_,children:v}),t[14]=_,t[15]=v,t[16]=y):y=t[16];let b;t[17]!==y||t[18]!==g?(b=(0,Z.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[p,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 truncate`,children:[g,y]})]}),t[17]=y,t[18]=g,t[19]=b):b=t[19];let x;t[20]!==n.missing||t[21]!==n.path||t[22]!==l?(x=n.missing?(0,Z.jsx)(Ps,{className:`text-2xs rounded-sm`,variant:`warning`,children:(0,Z.jsx)(J,{id:`VU3Nrn`})}):l==null?null:(0,Z.jsxs)(`span`,{className:`flex max-w-[40%] items-center gap-1 text-muted-foreground text-xs`,"data-testid":`nav-recent-branch-${n.path}`,children:[(0,Z.jsx)(ts,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate font-mono`,children:l})]}),t[20]=n.missing,t[21]=n.path,t[22]=l,t[23]=x):x=t[23];let S;t[24]!==i||t[25]!==n.missing||t[26]!==b||t[27]!==x||t[28]!==f?(S=(0,Z.jsxs)(Y,{type:`button`,variant:`ghost`,onClick:i,disabled:u,className:f,children:[b,x]}),t[24]=i,t[25]=n.missing,t[26]=b,t[27]=x,t[28]=f,t[29]=S):S=t[29];let C;t[30]!==o||t[31]!==s?(C=o({id:`hDoLrm`,values:{projectName:s}}),t[30]=o,t[31]=s,t[32]=C):C=t[32];let w;t[33]===o?w=t[34]:(w=o({id:`Es-eZU`}),t[33]=o,t[34]=w);let T=`nav-recent-remove-${n.path}`,E;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(ll,{"aria-hidden":`true`}),t[35]=E):E=t[35];let D;t[36]!==a||t[37]!==C||t[38]!==w||t[39]!==T?(D=(0,Z.jsx)(Y,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:a,"aria-label":C,title:w,className:`pointer-events-none mr-2 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100`,"data-testid":T,children:E}),t[36]=a,t[37]=C,t[38]=w,t[39]=T,t[40]=D):D=t[40];let O;return t[41]!==S||t[42]!==D?(O=(0,Z.jsxs)(`li`,{className:`group flex items-center justify-between rounded-lg hover:bg-accent`,children:[S,D]}),t[41]=S,t[42]=D,t[43]=O):O=t[43],O}async function k1(e,t,n){await e.project.open({path:t,target:`new-window`,entryPoint:n})}function A1(e){let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function j1(e){let t=(0,$.c)(5),{bridge:n}=e,r=n.config.collabUrl?n.config.collabUrl:null,i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(M1,{bridge:n}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,Z.jsx)(vu,{collabUrl:r,children:i}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function M1(e){let t=(0,$.c)(9),{bridge:n}=e,{resolvedTheme:r}=on(),i=ld(r),a=Dv(),[o,s]=(0,Q.useState)(null),c;t[0]===i.background?c=t[1]:(c=(0,Z.jsx)(`div`,{ref:s,className:`flex h-screen min-h-0 flex-col`,style:{backgroundColor:i.background}}),t[0]=i.background,t[1]=c);let l;t[2]!==n||t[3]!==o||t[4]!==a?(l=(0,Z.jsx)(CL,{bridge:n,variant:`window`,visible:!0,onVisibleChange:P1,installedClis:a,container:o,isShowing:!0,onRequestEditorFocus:N1}),t[2]=n,t[3]=o,t[4]=a,t[5]=l):l=t[5];let u;return t[6]!==c||t[7]!==l?(u=(0,Z.jsxs)(Z.Fragment,{children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8],u}function N1(){}function P1(e){e||window.close()}function F1(e){return e?.config.mode===`terminal`?(0,Z.jsx)(j1,{bridge:e}):e?.config.mode===`navigator`?(0,Z.jsx)(w1,{bridge:e}):(0,Z.jsx)(e1,{})}function I1(){let e=null,t=new Set,n=!1,r=null;function i(){for(let e of t)e()}function a(){e!==null&&(e=null,i())}return{install({bridge:t}){let o=t?.bugReport?.onCrashDetected;if(typeof o==`function`)return n?r??void 0:(n=!0,r=o(t=>{e=t,i()}),()=>{r?.(),r=null,n=!1,a()})},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dismiss(){a()}}}var L1=I1();function R1(e){return L1.install(e)}function z1(e){let t=(0,$.c)(7),{bridge:n}=e,r=(0,Q.useSyncExternalStore)(L1.subscribe,L1.getSnapshot);if(r===null)return null;let i;t[0]!==n.bugReport||t[1]!==r?(i=e=>{e||(n.bugReport.crashAck({eventId:r.eventId}),L1.dismiss())},t[0]=n.bugReport,t[1]=r,t[2]=i):i=t[2];let a=n.config.mode===`navigator`,o;return t[3]!==r||t[4]!==i||t[5]!==a?(o=(0,Z.jsx)(jf,{open:!0,onOpenChange:i,systemWide:a,crashInvite:r}),t[3]=r,t[4]=i,t[5]=a,t[6]=o):o=t[6],o}var B1=e=>{let t=(0,$.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=on(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,Z.jsx)(zs,{className:`size-4`}),info:(0,Z.jsx)(Rc,{className:`size-4`}),warning:(0,Z.jsx)(Gc,{className:`size-4`}),error:(0,Z.jsx)(Bm,{className:`size-4`}),loading:(0,Z.jsx)(zc,{className:`size-4 animate-spin`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsx)(dl,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c},V1=Symbol.for(`ok.client.fetchWrapper`);function H1(e={}){if(typeof window>`u`)return;let t=e.apiOrigin&&e.apiOrigin.length>0?e.apiOrigin:void 0;if(window.fetch[V1])return;let n=window.fetch.bind(window),r=hu(),i=((e,i)=>{let a=W1(e,t);if(!a.isApi)return n(e,i);if(e instanceof Request){let t=U1(e.headers,r);return n(new Request(a.url,e),{headers:t})}let o=U1(i?.headers,r);return n(a.url,{...i,headers:o})});i[V1]=!0,window.fetch=i}function U1(e,t){let n=new Headers(e);for(let[e,r]of Object.entries(t))n.set(e,r);return n}function W1(e,t){if(typeof e==`string`){if(e.startsWith(`/api/`))return{isApi:!0,url:t?t+e:e};let n=G1(e);return n&&K1(n,t)?{isApi:!0,url:e}:{isApi:!1,url:e}}let n=e instanceof URL?e:G1(e.url,window.location.origin);if(n&&K1(n,t)){let r=e instanceof URL?e.href:e.url;return t&&(n.origin===window.location.origin||n.protocol===`file:`)?{isApi:!0,url:t+n.pathname+n.search+n.hash}:{isApi:!0,url:r}}return{isApi:!1,url:e instanceof URL?e.href:e.url}}function G1(e,t){try{return new URL(e,t)}catch{return null}}function K1(e,t){if(!e.pathname.startsWith(`/api/`))return!1;if(e.origin===window.location.origin||e.protocol===`file:`)return!0;if(t){let n=G1(t);if(n&&e.origin===n.origin)return!0}return!1}var q1=Symbol.for(`ok.client.logForwarder`),J1=2e3,Y1=[`log`,`info`,`warn`,`error`],X1={log:`info`,info:`info`,warn:`warn`,error:`error`};function Z1(e){if(typeof e==`string`)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Q1(e){let t=e.message.length+80;if(e.event&&(t+=e.event.length),e.fields)try{t+=JSON.stringify(e.fields).length}catch{}return t}function $1(e={}){let t=e.windowObj??(typeof window<`u`?window:void 0);if(!t||t.okDesktop)return;let n=t;if(n[q1])return;n[q1]=!0;let r=e.consoleObj??console,i=e.documentObj===void 0?typeof document<`u`?document:null:e.documentObj,a=e.flushIntervalMs??J1,o=e.fetchImpl??n.fetch.bind(n),s=e.now??Date.now,c=[],l=0,u=null,d=!1,f={log:r.log.bind(r),info:r.info.bind(r),warn:r.warn.bind(r),error:r.error.bind(r)};function p(){if(u!==null&&(clearTimeout(u),u=null),c.length===0)return;let e=c.splice(0,100);l=0,d=!0;try{o(`/api/client-logs`,{method:`POST`,headers:{"content-type":`application/json`},keepalive:!0,body:JSON.stringify({entries:e})}).catch(()=>{})}catch{}finally{d=!1}}function m(e){if(c.push(e),l+=Q1(e),c.length>100){let e=c.shift();e&&(l-=Q1(e))}if(c.length>=100||l>=32768){p();return}u===null&&(u=setTimeout(p,a))}function h(e,t){if(!d)try{let n=Ia(t.map(Z1).join(` `)),r=t[0],i=typeof r==`string`&&r.length<=32768?r:void 0,a=i?Xa(i):null,o=a?.fields;if(o)try{JSON.stringify(o).length>8192&&(o=void 0)}catch{o=void 0}m({level:e,message:n,ts:s(),...a?.event?{event:a.event}:{},...o?{fields:o}:{}})}catch{}}for(let e of Y1)r[e]=(...t)=>{f[e](...t),h(X1[e],t)};let g=e=>{if(d)return;let t=e;h(`error`,[`uncaught error: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`])},_=e=>{d||h(`error`,[`unhandledrejection: ${Z1(e.reason)}`])},v=()=>p(),y=()=>{i&&i.visibilityState===`hidden`&&p()};n.addEventListener(`error`,g),n.addEventListener(`unhandledrejection`,_),n.addEventListener(`pagehide`,v),i&&i.addEventListener(`visibilitychange`,y);function b(){for(let e of Y1)r[e]=f[e];n.removeEventListener(`error`,g),n.removeEventListener(`unhandledrejection`,_),n.removeEventListener(`pagehide`,v),i&&i.removeEventListener(`visibilitychange`,y),u!==null&&(clearTimeout(u),u=null),c.length=0,delete n[q1]}return{flushNow:p,uninstall:b}}function e0(e,t){return e.branch===void 0||e.branch===null||e.branch===``||t===``||e.multiCandidate!==!0?null:{message:`Opened on branch ${e.branch}`,description:t}}function t0(e){let t=e.bridge;if(!t)return;let n=e.setHash??(e=>{window.location.hash=e}),r=e.emitToast??((e,t)=>{ul(e,t)});return t.onDeepLink(e=>{let i=e.kind??`doc`,a={kind:i,path:e.doc,branch:e.branch??null};if(e.targetMissing===!0){Bc.arm(a);return}as.arm(a),n(ou(i,e.doc,i===`doc`?e.branch:void 0));let o=e0(e,t.config.projectPath);o!==null&&r(o.message,{description:o.description,duration:3e3})})}var n0=4e3,r0=1440*60*1e3;function i0(e){let t=e.bridge;if(t&&t.onboarding)return t.onboarding.onToast(e=>{if(e.kind===`ancestor-promote`){ul.success(`Opened existing OpenKnowledge project at ${e.ancestorPath}`,{duration:n0});return}if(e.kind===`startup-reclaim`){let t=[];if(e.mcp.status===`repaired`){let n=e.mcp.editors.map(e=>Za[e]??e).join(`, `);t.push(`repaired ${n} MCP integration`)}else e.mcp.status===`failed`&&t.push(`MCP auto-repair failed`);e.path.status===`installed`&&t.push(e.path.summary),e.path.status===`failed`&&t.push(`PATH install failed: ${e.path.summary}`);let n=t.length>0?t.join(`; `):`OpenKnowledge integrations checked.`,r=e.mcp.status===`failed`||e.path.status===`failed`,i=e.path.status!==`none`;ul[r?`error`:`success`](n,{duration:r||i?r0:n0,position:`bottom-left`});return}if(e.kind===`sharing-refused-tracked`){ul.error(`Config sharing unchanged: ${e.tracked.length} OK file(s) tracked upstream — see message below.`,{duration:r0,description:e.remediation});return}if(e.kind===`sharing-no-git`){ul.warning(`Local-only requested but no git repository was created. Switch later via Settings → Config sharing once the project is in a git repo.`,{duration:n0});return}let t=ml(e.gitRoot,e.pickedPath)??e.pickedPath;ul.success(`Initialized OpenKnowledge at ${e.gitRoot} — opened parent of ${t} because it contains a .git folder`,{duration:n0})})}function a0(e){let t=(0,$.c)(18),{body:n,warning:r,restartLabel:i,cancelLabel:a,onRestart:o,onDismiss:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(Gc,{className:`mt-0.5 size-4 shrink-0 text-amber-500`}),t[0]=c):c=t[0];let l;t[1]===n?l=t[2]:(l=(0,Z.jsx)(`p`,{className:`font-medium text-sm`,children:n}),t[1]=n,t[2]=l);let u;t[3]===r?u=t[4]:(u=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r}),t[3]=r,t[4]=u);let d;t[5]!==o||t[6]!==i?(d=(0,Z.jsx)(Y,{size:`sm`,onClick:o,children:i}),t[5]=o,t[6]=i,t[7]=d):d=t[7];let f;t[8]!==a||t[9]!==s?(f=(0,Z.jsx)(Y,{size:`sm`,variant:`ghost`,onClick:s,children:a}),t[8]=a,t[9]=s,t[10]=f):f=t[10];let p;t[11]!==d||t[12]!==f?(p=(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;return t[14]!==l||t[15]!==u||t[16]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex w-full gap-3 rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg`,children:[c,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[l,u,p]})]}),t[14]=l,t[15]=u,t[16]=p,t[17]=m):m=t[17],m}function o0(){return _l._({id:`f_PkYv`})}function s0(e){return e.serverRuntime===e.appRuntime?_l._({id:`FWQuPE`,values:{0:e.appRuntime}}):e.relation===`older`?_l._({id:`LhQlGR`,values:{0:e.serverRuntime,1:e.appRuntime}}):_l._({id:`yZmvQ4`,values:{0:e.serverRuntime,1:e.appRuntime}})}function c0(e){return _l._({id:`2YOwme`,values:{appRuntime:e}})}function l0(e){return e===`eperm`?_l._({id:`uQewpR`}):_l._({id:`PqYWiC`})}async function u0(e){let t=ul.loading(_l._({id:`Kf7GG5`}),{duration:1/0}),n;try{n=await e.restartServer(e.config.projectPath)}catch{return}ul.dismiss(t),n.ok===!1&&ul.error(l0(n.reason),{duration:1/0})}function d0(e){let t=e.bridge;if(!t)return;let n=t.onServerVersionDrift(e=>{ul.custom(n=>(0,Q.createElement)(a0,{body:s0(e),warning:o0(),restartLabel:_l._({id:`ppDgFi`}),cancelLabel:_l._({id:`PBxg_E`}),onRestart:()=>{ul.dismiss(n),u0(t)},onDismiss:()=>ul.dismiss(n)}),{duration:1/0})}),r=t.onServerRestarted(e=>{ul.success(c0(e.appRuntime))});return()=>{n(),r()}}function f0(e){let{initialDoc:t}=e;if(!t)return;let n=e.getHash();n!==``&&n!==`#`&&n!==`#/`||e.setHash(du(t))}function p0(){typeof window>`u`||!window.okDesktop||f0({initialDoc:window.okDesktop.config.initialDoc,getHash:()=>window.location.hash,setHash:e=>{window.location.hash=e}})}Bd(),n(()=>import(`./telemetry-startup-kV7RyeHQ.js`).then(e=>e.initStartupTrace()),__vite__mapDeps([128,0,1,2,3,4,50,10]),import.meta.url),H1({apiOrigin:typeof window<`u`?window.okDesktop?.config.apiOrigin:void 0}),$1(),NE()&&zE(),XQ(),VT(),wI(),TP(),typeof window<`u`&&t0({bridge:window.okDesktop}),typeof window<`u`&&d0({bridge:window.okDesktop}),typeof window<`u`&&Ld({bridge:window.okDesktop}),typeof window<`u`&&pl({bridge:window.okDesktop}),typeof window<`u`&&i0({bridge:window.okDesktop}),typeof window<`u`&&zd({bridge:window.okDesktop}),typeof window<`u`&&R1({bridge:window.okDesktop}),p0();var m0=new Kd({defaultOptions:{queries:{retry:1,staleTime:1e4}}}),h0=document.getElementById(`root`);if(!h0)throw Error(`Root element not found`);var g0=typeof window>`u`?void 0:window.okDesktop;(0,Zd.createRoot)(h0).render((0,Z.jsx)(Q.StrictMode,{children:(0,Z.jsx)(Mt,{i18n:_l,children:(0,Z.jsx)(Kt,{client:m0,children:(0,Z.jsxs)(sn,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,storageKey:`ok-theme-v1`,children:[(0,Z.jsxs)(xn,{children:[(0,Z.jsx)(Yp,{children:F1(g0)}),g0!==void 0&&(0,Z.jsx)(Zp,{children:(0,Z.jsx)(z1,{bridge:g0})})]}),(0,Z.jsx)(B1,{richColors:!0,closeButton:!0})]})})})}));