@codexhost/cli-darwin-arm64 0.18.0-beta.3 → 0.18.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +9 -4
- package/app/console-web.js +9 -4
- package/app/desktop-controller.mjs +9 -4
- package/app/host-runtime.mjs +4751 -2746
- package/app/plugins/antigravity/plugin.mjs +9 -4
- package/app/plugins/claude-code/plugin.mjs +129 -58
- package/app/plugins/codebuddy/plugin.mjs +9 -4
- package/app/plugins/codex-usage/plugin.mjs +9 -4
- package/app/plugins/copilot/plugin.mjs +9 -4
- package/app/plugins/cursor-cli/plugin.mjs +9 -4
- package/app/plugins/deepseek-harness/plugin.mjs +9 -4
- package/app/plugins/devin/plugin.mjs +9 -4
- package/app/plugins/grok/plugin.mjs +9 -4
- package/app/plugins/hermes/plugin.mjs +9 -4
- package/app/plugins/kimi-code/plugin.mjs +9 -4
- package/app/plugins/kiro-cli/plugin.mjs +9 -4
- package/app/plugins/omp/plugin.mjs +9 -4
- package/app/plugins/opencode/plugin.mjs +9 -4
- package/app/plugins/pi/plugin.mjs +9 -4
- package/app/plugins/qoder/plugin.mjs +9 -4
- package/app/plugins/qoder-cn/plugin.mjs +9 -4
- package/app/plugins/qwen-code/plugin.mjs +9 -4
- package/app/plugins/workbuddy/plugin.mjs +9 -4
- package/app/plugins/zcode/plugin.mjs +9 -4
- package/app/renderer-extension.js +9 -4
- package/app/web/assets/{index-aKvkfNJN.js → index-D1dOzBMI.js} +2 -2
- package/app/web/codexhost-settings.js +9 -4
- package/app/web/index.html +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-connection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +63 -63
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -12
- package/app/web/plugins.json +4 -0
- package/app/web-modules/server.mjs +374 -154
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-layout`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("react"),i=e("@deepseek-ai/dsh-client-ui-primitives"),a=e("react/jsx-runtime"),o=e("@deepseek-ai/dsh-client-store"),s=.7;function c(e,t,n){return Math.min(n,Math.max(t,Math.round(e)))}function l(e,t,n,r=56){let i=t===0?r:c(t,264,420),a=e-i-400,o=n===0||a<300?0:Math.min(a,c(n,300,e*s));return{sidebar:i,center:Math.max(0,e-i-o),rightbar:o}}function u({useSessions:e,usePanelInfo:t,productTitle:n}){let i=t(e=>e.activePanelId===null),a=e(e=>{let t=Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0)?.id;return!i||t===void 0?void 0:e.byId[t]?.title});return(0,r.useEffect)(()=>(document.title=a===void 0?n:`${a} — ${n}`,()=>{document.title=n}),[n,a]),null}function d(e,t,n=!1,r){if(!e.contains(t)||t.closest(`input, textarea, select, a, [contenteditable]:not([contenteditable="false"]), [role="slider"], [data-phone-drawer], canvas, iframe, video, [data-sidebar-terminal], [data-dockkit-host="float"], [data-dockkit-divider], [data-dockkit-strip-tabs]`)||!n&&t.closest(`button, [data-sidebar-right-session]`))return!1;for(let n=t;n!==null&&n!==e;n=n.parentElement){let e=getComputedStyle(n).overflowX;if(n.scrollWidth>n.clientWidth+1&&/^(auto|scroll)$/.test(e))return!1}if(r!==void 0)for(let i of t.querySelectorAll(`[inert], [inert] *`)){let t=i.getBoundingClientRect();if(t.width>0&&t.height>0&&r.x>=t.left&&r.x<=t.right&&r.y>=t.top&&r.y<=t.bottom&&!d(e,i,n))return!1}return!0}function f(e,t){let{element:n,paint:r,onExpandedChange:i}=t,a=e.ownerDocument,o=matchMedia(`(prefers-reduced-motion: reduce)`),s=t.expanded,c=n.offsetWidth,l=e.getBoundingClientRect().width,u=s?0:c,f=u,p=0,m=null,h=0,g=!1,_=null,v=()=>r(u,u<c-.5||f===0||_?.claimed===!0),y=()=>{m!==null&&cancelAnimationFrame(m),m=null,h=0},b=e=>{m=null;let t=h===0?1/60:Math.min((e-h)/1e3,.032);for(h=e;t>0;){let e=Math.min(t,1/120);p+=((f-u)*400-40*p)*e,u=Math.max(0,Math.min(c,u+p*e)),t-=e}Math.abs(f-u)<.1&&Math.abs(p)<1?(u=f,p=0,h=0):m=requestAnimationFrame(b),v()},x=()=>{f=s?0:c,o.matches?(y(),u=f,p=0):m??=requestAnimationFrame(b),v()},S=()=>{_!==null&&(g||=_.claimed,_=null,p=0,x())},C=()=>e.hasAttribute(`data-phone`)&&e.getBoundingClientRect().width<640&&e.hasAttribute(`data-sidebar-collapsed`)&&n.isConnected&&n.closest(`[hidden]`)===null&&a.querySelector(`[aria-modal="true"], [role="menu"], dialog[open]`)===null&&a.getSelection()?.isCollapsed!==!1,w=t=>{if(t.touches.length!==1)return S();if(g=!1,_!==null||!C())return;let r=t.target;if(!(r instanceof Element))return;let i=n.contains(r),a=t.touches[0];!d(e,r,i,i?{x:a.clientX,y:a.clientY}:void 0)||!i&&(s||r.closest(`[role="button"], label`))||i&&u>=c-.5||(y(),p=0,_={id:a.identifier,x:a.clientX,y:a.clientY,base:u,opening:!i,interrupting:i&&u>0&&u<c,claimed:!1,origin:r,samples:[{x:u,time:t.timeStamp}]})},T=(e,t)=>{_!==null&&(u=Math.max(0,Math.min(c,_.base+e-_.x)),_.samples.push({x:u,time:t}),_.samples=_.samples.filter(e=>t-e.time<=90),v())},E=t=>{let n=_;if(n===null)return;let r=t.touches[0];if(t.defaultPrevented||t.touches.length!==1||r?.identifier!==n.id||!C()||!e.contains(n.origin))return S();let i=r.clientX-n.x,a=Math.abs(r.clientY-n.y);if(!n.claimed){let e=n.opening?-i:i;if(a>8&&a>=Math.abs(i)/1.5||!n.interrupting&&e<-8)return S();if((n.interrupting?Math.abs(i):e)<8||Math.abs(i)<a*1.5)return;n.claimed=!0}if(!t.cancelable)return S();t.preventDefault(),T(r.clientX,t.timeStamp)},D=t=>{let n=_;if(n===null)return;let r=[...t.changedTouches].find(e=>e.identifier===n.id);if(!n.claimed||t.defaultPrevented||t.touches.length!==0||r===void 0||!C()||!e.contains(n.origin))return S();t.cancelable&&t.preventDefault(),T(r.clientX,t.timeStamp);let a=n.samples[0];p=a&&t.timeStamp>a.time?(u-a.x)/(t.timeStamp-a.time)*1e3:0;let o=u+p*.15<c*.5;_=null,g=!0,s!==o&&i(o),s=o,x()},O=e=>{e.detail!==0&&(_?.claimed||g)&&(e.preventDefault(),e.stopImmediatePropagation())},k=e=>{e.pointerType!==`touch`&&_===null&&(g=!1)},A=()=>{_===null&&x()},j=new ResizeObserver(()=>{let t=e.getBoundingClientRect().width;(c!==n.offsetWidth||l!==t)&&(S(),y(),l=t,c=n.offsetWidth,u=s?0:c,p=0,f=u,v())});j.observe(n),j.observe(e);let M=new MutationObserver(()=>{_!==null&&(!C()||!e.contains(_.origin))&&S()});return M.observe(a.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-modal`,`role`,`open`,`hidden`,`data-sidebar-collapsed`]}),v(),a.addEventListener(`touchstart`,w,{passive:!0,capture:!0}),a.addEventListener(`pointerdown`,k,!0),e.addEventListener(`touchmove`,E,{passive:!1,capture:!0}),e.addEventListener(`touchend`,D,{passive:!1,capture:!0}),e.addEventListener(`touchcancel`,S,!0),e.addEventListener(`click`,O,!0),o.addEventListener(`change`,A),{setExpanded(e){if(s===e)return v();s=e,_===null?x():S()},dispose(){_=null,y(),j.disconnect(),M.disconnect(),o.removeEventListener(`change`,A),a.removeEventListener(`touchstart`,w,!0),a.removeEventListener(`pointerdown`,k,!0),e.removeEventListener(`touchmove`,E,!0),e.removeEventListener(`touchend`,D,!0),e.removeEventListener(`touchcancel`,S,!0),e.removeEventListener(`click`,O,!0),r(null,!1)}}}function p(e,t,n,i,a,o){let[s,c]=(0,r.useState)(a&&i),l=(0,r.useRef)(null),u=(0,r.useRef)(o);u.current=o;let f=(0,r.useRef)(a);return f.current=a,(0,r.useLayoutEffect)(()=>{let r=e.current,a=t.current,o=n.current;if(!i||r===null||a===null||o===null){c(!1);return}let s=a.querySelector(`[data-phone-drawer-edge]`);if(s===null)return;let p=r.ownerDocument,m=matchMedia(`(prefers-reduced-motion: reduce)`),h=a.offsetWidth,g=f.current?0:-h,_=0,v=g,y=null,b=0,x=!1,S=null,C=()=>{a.style.transform=`translateX(${g}px)`;let e=g>-h+.5||v===0||S?.claimed===!0;a.style.visibility=e?`visible`:`hidden`,a.inert=!e,o.style.visibility=e?`visible`:`hidden`,o.style.opacity=String(Math.max(0,Math.min(1,1+g/h)))},w=()=>{y!==null&&cancelAnimationFrame(y),y=null,b=0},T=e=>{y=null;let t=b===0?1/60:Math.min((e-b)/1e3,.032);for(b=e;t>0;){let e=Math.min(t,1/120);_+=((v-g)*400-40*_)*e,g=Math.max(-h,Math.min(0,g+_*e)),t-=e}Math.abs(v-g)<.1&&Math.abs(_)<1?(g=v,_=0,b=0,c(v===0)):y=requestAnimationFrame(T),C()},E=e=>{S===null&&(h=a.offsetWidth,v=e?0:-h,e&&c(!0),m.matches?(w(),g=v,_=0,c(e),C()):(C(),y??=requestAnimationFrame(T)))},D=()=>{let e=S;S=null,e?.claimed&&(x=!0),e?.kind===`pointer`&&s.hasPointerCapture(e.id)&&s.releasePointerCapture(e.id)},O=()=>{S!==null&&(D(),_=0,E(f.current))},k=()=>p.getSelection()?.isCollapsed!==!1&&[...p.querySelectorAll(`[aria-modal="true"], [role="menu"], dialog[open]`)].every(e=>e===a||a.contains(e)&&(e.hasAttribute(`data-phone-sidebar-view`)||e.getAttribute(`role`)===`menu`&&e.closest(`[data-phone-sidebar-view]`)!==null)),A=(e,t,n,r,i,a)=>{w(),_=0,S={id:e,kind:t,x:n,y:r,base:g,open:f.current,opening:a,claimed:!1,samples:[{x:g,time:i}]}},j=(e,t)=>{let n=S;n!==null&&(g=Math.max(-h,Math.min(0,n.base+e-n.x)),n.samples.push({x:g,time:t}),n.samples=n.samples.filter(e=>t-e.time<=90),C())},M=(e,t,n)=>{let r=S;if(r===null)return;if(!k())return O();let i=e-r.x,a=Math.abs(t-r.y);if(!r.claimed){if(a>8&&a>=Math.abs(i)/1.5||r.opening&&i<-8)return O();if((r.opening?i:Math.abs(i))<8||Math.abs(i)<a*1.5)return;if(!n.cancelable)return O();r.claimed=!0,r.kind===`pointer`&&s.setPointerCapture(r.id)}if(!n.cancelable)return O();n.preventDefault(),j(e,n.timeStamp)},N=(e,t)=>{let n=S;if(n===null)return;if(!n.claimed||!k())return O();t.cancelable&&t.preventDefault(),j(e,t.timeStamp);let r=n.samples[0];_=r&&t.timeStamp>r.time?(g-r.x)/(t.timeStamp-r.time)*1e3:0;let i=g+_*.15>-h*.5;D(),u.current(i),E(i)},P=e=>{if(e.touches.length!==1)return O();if(x=!1,S!==null||!k())return;let t=e.target;if(!(t instanceof Element)||!r.contains(t))return;let n=e.touches[0],i=s.contains(t)||t===o;(i||r.hasAttribute(`data-sidebar-collapsed`)&&d(r,t)&&!t.closest(`[role="button"], label, [data-sidebar-right-panel]`))&&A(n.identifier,`touch`,n.clientX,n.clientY,e.timeStamp,!i)},F=e=>{if(S?.kind!==`touch`)return;let t=e.touches[0];if(e.touches.length!==1||t?.identifier!==S.id)return O();M(t.clientX,t.clientY,e)},I=e=>{if(S?.kind!==`touch`)return;let t=[...e.changedTouches].find(e=>e.identifier===S?.id);if(e.touches.length!==0||t===void 0)return O();N(t.clientX,e)},L=e=>{e.pointerType===`touch`?S?.kind===`pointer`&&O():(S!==null&&(S.kind!==`pointer`||S.id!==e.pointerId)&&O(),x=!1,e.isPrimary&&e.button===0&&S===null&&e.target instanceof Node&&s.contains(e.target)&&k()&&(A(e.pointerId,`pointer`,e.clientX,e.clientY,e.timeStamp,!1),s.setPointerCapture(e.pointerId)))},R=e=>{S?.kind===`pointer`&&S.id===e.pointerId&&M(e.clientX,e.clientY,e)},z=e=>{S?.kind===`pointer`&&S.id===e.pointerId&&N(e.clientX,e)},B=e=>{(S?.kind===`pointer`&&S.id===e.pointerId||S?.kind===`touch`&&e.pointerType===`touch`)&&O()},V=e=>{S?.kind===`pointer`&&S.id===e.pointerId&&O()},H=e=>{(S?.claimed||x&&e.detail!==0)&&(e.preventDefault(),e.stopImmediatePropagation())},U=()=>E(f.current),W=new ResizeObserver(()=>{a.offsetWidth!==h&&(O(),E(f.current))});return W.observe(a),l.current={target:e=>{S!==null&&S.open!==e&&O(),E(e)}},C(),c(f.current),p.addEventListener(`touchstart`,P,{passive:!0,capture:!0}),p.addEventListener(`pointerdown`,L,!0),r.addEventListener(`touchmove`,F,{passive:!1,capture:!0}),r.addEventListener(`touchend`,I,{passive:!1,capture:!0}),r.addEventListener(`touchcancel`,O,!0),r.addEventListener(`click`,H,!0),s.addEventListener(`pointermove`,R),s.addEventListener(`pointerup`,z),r.addEventListener(`pointercancel`,B,!0),s.addEventListener(`lostpointercapture`,V),m.addEventListener(`change`,U),()=>{l.current=null,D(),w(),W.disconnect(),m.removeEventListener(`change`,U),p.removeEventListener(`touchstart`,P,!0),p.removeEventListener(`pointerdown`,L,!0),r.removeEventListener(`touchmove`,F,!0),r.removeEventListener(`touchend`,I,!0),r.removeEventListener(`touchcancel`,O,!0),r.removeEventListener(`click`,H,!0),s.removeEventListener(`pointermove`,R),s.removeEventListener(`pointerup`,z),r.removeEventListener(`pointercancel`,B,!0),s.removeEventListener(`lostpointercapture`,V)}},[i,e,t,n]),(0,r.useLayoutEffect)(()=>{l.current?.target(a)},[a,i]),i&&s}let m=`@deepseek-ai/dsh-client-ui-layout/AppFrame.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(m)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-layout`,e.dataset.pluginCss=m,e.textContent=`.Tjg6Bq_frame{background:var(--dsw-alias-bg-base);grid-template-rows:minmax(0,1fr) auto;height:100%;display:grid;position:relative;overflow:hidden}.Tjg6Bq_frame[data-animating]{transition:grid-template-columns var(--ds-transition-duration-slow) var(--ds-ease-in-out)}.Tjg6Bq_frame[data-dragging]{transition:none}[data-windows-titlebar] .Tjg6Bq_frame{--dsh-windows-content-radius:16px;box-sizing:border-box;padding-top:var(--dsh-windows-titlebar-height);background:var(--dsw-specific-sidebar-fill)}[data-windows-titlebar] .Tjg6Bq_centerCol{background:var(--dsw-alias-bg-base);border-radius:var(--dsh-windows-content-radius) 0 0 0;corner-shape:round}[data-windows-titlebar] .Tjg6Bq_frame:before{content:"";height:var(--dsh-windows-titlebar-height);background:var(--dsw-specific-sidebar-fill);-webkit-app-region:drag;position:absolute;inset:0 0 auto}[data-windows-titlebar] .Tjg6Bq_sidebarCol{border-right:none}@media (prefers-reduced-motion:reduce){.Tjg6Bq_frame[data-animating]{transition:none}}.Tjg6Bq_sidebarCol{background:var(--dsw-specific-sidebar-fill);border-right:.5px solid var(--dsw-alias-border-l3);min-width:0;overflow:hidden}.Tjg6Bq_centerCol{flex-direction:column;min-width:0;display:flex;overflow:hidden}[data-platform=darwin] .Tjg6Bq_frame{background:0 0}html[data-platform=darwin]{--dsh-frame-top-clearance:48px}html[data-windows-titlebar]{--dsh-frame-top-clearance:var(--dsh-windows-titlebar-height);--dsh-frame-chrome-top:var(--dsh-windows-titlebar-height)}html[data-platform=darwin],html[data-windows-titlebar]{--dsh-frame-overlay-top:calc(var(--dsh-frame-top-clearance) + 20px)}html[data-platform=darwin][data-fullscreen],html[data-windows-titlebar][data-fullscreen]{--dsh-frame-overlay-top:20px;--dsh-frame-chrome-top:0px}[data-platform=darwin] .Tjg6Bq_sidebarCol{background:linear-gradient(to bottom, #7a9bf01a, #7a9bf000 35%, #8f89b800 68%, #8f89b817), color-mix(in srgb, color-mix(in srgb, var(--dsw-specific-sidebar-fill) 97%, #7a9bf0) 40%, transparent);border-right:none}[data-platform=darwin] [data-ds-dark-theme] .Tjg6Bq_sidebarCol{background:linear-gradient(to bottom, #7a9bf014, #7a9bf000 35%, #8f89b800 68%, #8f89b812), color-mix(in srgb, var(--dsw-specific-sidebar-fill) 50%, transparent)}@media (prefers-reduced-transparency:reduce){[data-platform=darwin] .Tjg6Bq_sidebarCol,[data-platform=darwin] [data-ds-dark-theme] .Tjg6Bq_sidebarCol{background:color-mix(in srgb, var(--dsw-specific-sidebar-fill) 90%, transparent)}}[data-platform=darwin] .Tjg6Bq_centerCol{background:var(--dsw-alias-bg-base);border-left:.5px solid var(--dsw-alias-border-l3)}[data-platform=darwin] .Tjg6Bq_rightbarCol{background:var(--dsw-alias-bg-base)}[data-platform=darwin] [data-sidebar-hidden] .Tjg6Bq_centerCol{border-left:none}[data-platform=darwin] .Tjg6Bq_frame[data-sidebar-hidden]{--dsh-frame-leading-clearance:160px}[data-platform=darwin][data-fullscreen] .Tjg6Bq_frame[data-sidebar-hidden]{--dsh-frame-leading-clearance:84px}[data-platform=darwin][data-fullscreen] .Tjg6Bq_leadingSeat{left:12px}.Tjg6Bq_leadingSeat{z-index:15;-webkit-app-region:no-drag;align-items:center;display:flex;position:absolute;top:11px;left:88px}.Tjg6Bq_handle{cursor:col-resize;z-index:11;touch-action:none;grid-area:1/1/2/-1;width:8px;margin-left:-4px;position:absolute;top:0;bottom:0}.Tjg6Bq_frame[data-animating] .Tjg6Bq_handle{transition:left var(--ds-transition-duration-slow) var(--ds-ease-in-out)}.Tjg6Bq_frame[data-dragging] .Tjg6Bq_handle,.Tjg6Bq_frame[data-rightbar-fullscreen],.Tjg6Bq_frame[data-rightbar-fullscreen] .Tjg6Bq_handle,.Tjg6Bq_frame[data-rightbar-instant],.Tjg6Bq_frame[data-rightbar-instant] .Tjg6Bq_handle{transition:none}@media (prefers-reduced-motion:reduce){.Tjg6Bq_frame[data-animating] .Tjg6Bq_handle{transition:none}}.Tjg6Bq_rightbarCol{min-width:0;position:relative;overflow:visible}.Tjg6Bq_bottomRow{background:var(--dsw-alias-bg-base);grid-column:1/-1;min-width:0;min-height:0;overflow:auto}.Tjg6Bq_overlayLayer{z-index:20;pointer-events:none;position:absolute;inset:0}.Tjg6Bq_overlayLayer>*{pointer-events:auto}.Tjg6Bq_phoneSidebarTrack{min-width:0}.Tjg6Bq_phoneBackdrop{z-index:40;-webkit-tap-highlight-color:transparent;visibility:hidden;opacity:0;background:#0000001f;border:0;padding:0;position:absolute;inset:0}.Tjg6Bq_phoneDrawer{z-index:41;background:var(--dsw-specific-sidebar-fill,var(--dsw-alias-bg-base));--phone-drawer-highlight:color-mix(in srgb, var(--dsw-alias-bg-base) 80%, transparent);box-shadow:8px 12px 36px -12px #0000003d, inset -1px 1px 0 var(--phone-drawer-highlight);visibility:hidden;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);will-change:transform;box-sizing:border-box;border-radius:0 28px 28px 0;padding-right:12px;position:absolute;top:0;bottom:0;left:0;overflow:hidden;transform:translate(-110%)}[data-ds-dark-theme] .Tjg6Bq_phoneDrawer{--phone-drawer-highlight:color-mix(in srgb, var(--dsw-alias-label-primary) 18%, transparent)}@supports (backdrop-filter:blur(18px)){.Tjg6Bq_phoneDrawer{background:color-mix(in srgb, var(--dsw-specific-sidebar-fill) 38%, transparent);backdrop-filter:blur(18px)}}@media (prefers-reduced-transparency:reduce),(prefers-contrast:more),(forced-colors:active){.Tjg6Bq_phoneDrawer{background:var(--dsw-specific-sidebar-fill);backdrop-filter:none;border-right:1px solid var(--dsw-alias-label-primary)}}.Tjg6Bq_phoneDrawer,.Tjg6Bq_phoneDrawer *{scrollbar-width:none}.Tjg6Bq_phoneDrawer::-webkit-scrollbar,.Tjg6Bq_phoneDrawer ::-webkit-scrollbar{width:0;height:0;display:none}.Tjg6Bq_phoneDrawerBody{height:100%}.Tjg6Bq_phoneDrawerContent{height:100%;min-height:0}.Tjg6Bq_phoneDrawer:has([data-phone-sidebar-view]) .Tjg6Bq_phoneDrawerContent{opacity:0;visibility:hidden;pointer-events:none}.Tjg6Bq_phoneViews{inset:env(safe-area-inset-top) 12px env(safe-area-inset-bottom) env(safe-area-inset-left);pointer-events:none;position:absolute}.Tjg6Bq_phoneViews>*{pointer-events:auto}.Tjg6Bq_phoneDrawerEdge{touch-action:pan-y;user-select:none;width:12px;position:absolute;inset:0 0 0 auto}.Tjg6Bq_frame[data-phone] .Tjg6Bq_handle{display:none}.Tjg6Bq_frame[data-phone] .Tjg6Bq_leadingSeat{top:calc(env(safe-area-inset-top) + 8px);left:8px}.Tjg6Bq_frame[data-phone][data-sidebar-hidden]{--dsh-frame-leading-clearance:92px}`,document.head.appendChild(e)}var h={bottomRow:`Tjg6Bq_bottomRow`,centerCol:`Tjg6Bq_centerCol`,frame:`Tjg6Bq_frame`,handle:`Tjg6Bq_handle`,leadingSeat:`Tjg6Bq_leadingSeat`,overlayLayer:`Tjg6Bq_overlayLayer`,phoneBackdrop:`Tjg6Bq_phoneBackdrop`,phoneDrawer:`Tjg6Bq_phoneDrawer`,phoneDrawerBody:`Tjg6Bq_phoneDrawerBody`,phoneDrawerContent:`Tjg6Bq_phoneDrawerContent`,phoneDrawerEdge:`Tjg6Bq_phoneDrawerEdge`,phoneSidebarTrack:`Tjg6Bq_phoneSidebarTrack`,phoneViews:`Tjg6Bq_phoneViews`,rightbarCol:`Tjg6Bq_rightbarCol`,sidebarCol:`Tjg6Bq_sidebarCol`};function g(e){return/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.centerCol,children:e.children})}function _({usePanelInfo:e,renderSlot:t}){return t(`main`,{},{entryKey:e(e=>e.activePanelId)??`conversation`})}function v(e){return/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.rightbarCol,"data-rightbar-col":!0,children:e.children})}function y(e){let[t,n]=(0,r.useState)(!1),i=(0,r.useRef)(0),o=(0,r.useRef)(0),s=(0,r.useRef)(null),c=(0,r.useRef)(null),l=(0,r.useRef)({onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd});l.current={onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd};let u=(0,r.useCallback)(()=>{let e=c.current;e!==null&&(c.current=null,s.current!==null&&(cancelAnimationFrame(s.current),s.current=null),e.element.hasPointerCapture(e.id)&&e.element.releasePointerCapture(e.id),n(!1),l.current.onEnd())},[]);(0,r.useEffect)(()=>u,[u]);let d=(0,r.useCallback)(e=>{e.button===0&&c.current===null&&(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),c.current={element:e.currentTarget,id:e.pointerId},i.current=e.clientX,o.current=e.clientX,l.current.onStart(),n(!0))},[]),f=(0,r.useCallback)(e=>{c.current?.id===e.pointerId&&(o.current=e.clientX,s.current??=requestAnimationFrame(()=>{s.current=null,l.current.onDrag(o.current-i.current)}))},[]),p=(0,r.useCallback)(e=>{c.current?.id===e.pointerId&&(l.current.onDrag(e.clientX-i.current),u())},[u]),m=(0,r.useCallback)(e=>{c.current?.id===e.pointerId&&u()},[u]);return/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.handle,style:{left:e.left},"data-side":e.side,"data-dragging":t||void 0,onPointerDown:d,onPointerMove:f,onPointerUp:p,onPointerCancel:m,onLostPointerCapture:m})}function b({useStore:e,useSessions:t,usePanelInfo:n,actions:o,renderSlot:d,t:m}){let b=e(e=>e.layoutInfo),x=(0,r.useRef)(null),S=b.viewportWidth;(0,r.useLayoutEffect)(()=>{let e=x.current;
|
|
2
2
|
/* v8 ignore next -- the ref is always attached by effect time: the frame div renders unconditionally. */
|
|
3
|
-
if(e===null)return;let t=null,n=!1,r=()=>{let t=e.getBoundingClientRect().width;t>0&&o.setViewportWidth(t)};r();let i=new ResizeObserver(()=>{n||(t??=requestAnimationFrame(()=>{t=null,r()}))});return i.observe(e),()=>{n=!0,i.disconnect(),t!==null&&cancelAnimationFrame(t)}},[o]);let C=S<1024,w=S<640,T=(0,r.useCallback)(e=>{let t=x.current;return!w||t===null?{setExpanded:()=>{},dispose:()=>{}}:f(t,e)},[w]),E=C?!b.narrowExpanded:b.sidebar===0,D=(0,r.useRef)(null),O=(0,r.useRef)(null),k=(0,r.useRef)(null),[A,j]=(0,r.useState)(null),[M,N]=(0,r.useState)(0),P=(0,r.useCallback)(()=>(N(e=>e+1),()=>N(e=>e-1)),[]),F=(0,r.useCallback)(e=>{e===E&&o.toggleSidebar()},[o,E]),I=p(x,D,k,w,!E,F);(0,r.useLayoutEffect)(()=>{O.current&&(O.current.inert=!
|
|
3
|
+
if(e===null)return;let t=null,n=!1,r=()=>{let t=e.getBoundingClientRect().width;t>0&&o.setViewportWidth(t)};r();let i=new ResizeObserver(()=>{n||(t??=requestAnimationFrame(()=>{t=null,r()}))});return i.observe(e),()=>{n=!0,i.disconnect(),t!==null&&cancelAnimationFrame(t)}},[o]);let C=S<1024,w=S<640,T=(0,r.useCallback)(e=>{let t=x.current;return!w||t===null?{setExpanded:()=>{},dispose:()=>{}}:f(t,e)},[w]),E=C?!b.narrowExpanded:b.sidebar===0,D=(0,r.useRef)(null),O=(0,r.useRef)(null),k=(0,r.useRef)(null),[A,j]=(0,r.useState)(null),[M,N]=(0,r.useState)(0),P=(0,r.useCallback)(()=>(N(e=>e+1),()=>N(e=>e-1)),[]),F=(0,r.useCallback)(e=>{e===E&&o.toggleSidebar()},[o,E]),I=(0,r.useCallback)(()=>F(!1),[F]),L=p(x,D,k,w,!E,F);(0,r.useLayoutEffect)(()=>{O.current&&(O.current.inert=!L)},[L,w]),(0,i.useModalLayer)(D,w&&L&&M===0,()=>F(!1));let R=(0,r.useRef)(L);(0,r.useEffect)(()=>{let e=R.current&&!L;if(R.current=L,w&&e&&(document.activeElement===document.body||D.current?.contains(document.activeElement))){let e=x.current?.querySelector(`[data-shell-leading] button`);e&&(0,i.focusWithoutRing)(e,{preventScroll:!0})}},[w,L]);let z=E?0:b.sidebar===0?280:b.sidebar,B=b.rightbar??S*.45,V=document.documentElement.dataset.platform===`darwin`,H=V||w||document.documentElement.hasAttribute(`data-windows-titlebar`)?0:56,U=l(S,!b.rightbarShown&&C?0:z,B,H),W=l(S,z,b.rightbarTrack?B:0,H),ee=(0,r.useRef)(W);ee.current=W;let G=(0,r.useRef)(U.rightbar);G.current=U.rightbar;let K=(0,r.useRef)(0),te=(0,r.useRef)(0),[ne,q]=(0,r.useState)(!1),[J,Y]=(0,r.useState)(0),X=`${E}:${b.rightbarTrack}`,re=(0,r.useRef)(X),ie=(0,r.useRef)(S);(0,r.useLayoutEffect)(()=>{let e=ie.current!==S;ie.current=S,re.current!==X&&(re.current=X,!e&&Y(e=>e+1))},[X,S]),(0,r.useEffect)(()=>{if(J===0)return;let e=x.current;
|
|
4
4
|
/* v8 ignore next -- the ref is always attached by effect time: the frame div renders unconditionally. */
|
|
5
|
-
if(e===null)return;let t=()=>{
|
|
5
|
+
if(e===null)return;let t=()=>{Y(0)},n=n=>{n.target===e&&n.propertyName===`grid-template-columns`&&t()};e.addEventListener(`transitionend`,n);let r=setTimeout(t,600);return()=>{e.removeEventListener(`transitionend`,n),clearTimeout(r)}},[J]);let ae=(0,r.useCallback)(()=>{q(!1)},[]),oe=(0,r.useCallback)(()=>{K.current=ee.current.sidebar,q(!0)},[]),se=(0,r.useCallback)(e=>{o.setSidebar(K.current+e)},[o]),ce=(0,r.useCallback)(()=>{te.current=G.current,q(!0)},[]),le=(0,r.useCallback)(e=>{o.setRightbar(te.current-e)},[o]),ue=`CodexHost`,de=W.rightbar===0?0:c(B,300,S*s),Z=Math.min(320,Math.round(S*.86)),fe=(0,r.useMemo)(()=>d(`sidebar`,{collapsed:!w&&E,width:w?Z-12:W.sidebar}),[d,E,W.sidebar,w,Z]),Q=t(e=>Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0)?.id),$=(0,r.useRef)(Q);(0,r.useEffect)(()=>{$.current!==Q&&($.current=Q,w&&!E&&o.toggleSidebar())},[o,Q,w,E]);let pe=(0,r.useMemo)(()=>/* @__PURE__ */ (0,a.jsx)(_,{usePanelInfo:n,renderSlot:d}),[n,d]),me=(0,r.useMemo)(()=>d(`shell.overlay`,{}),[d]),he=(0,r.useMemo)(()=>d(`shell.leading`,{}),[d]),ge=w?!L:E,_e=(V||w)&&ge,ve=w?0:W.sidebar,ye=/* @__PURE__ */ (0,a.jsxs)(`div`,{ref:x,className:h.frame,style:{...document.documentElement.hasAttribute(`data-windows-titlebar`)?{"--dsh-windows-sidebar-width":`${W.sidebar}px`}:{},gridTemplateColumns:`${ve}px minmax(${W.rightbar===0||w?0:400}px, 1fr) minmax(0px, ${w?0:de}px)`},"data-phone":w||void 0,"data-sidebar-collapsed":E||void 0,"data-sidebar-hidden":ge||void 0,"data-rightbar-collapsed":W.rightbar===0||void 0,"data-rightbar-fullscreen":b.rightbarFullscreen||void 0,"data-rightbar-instant":b.rightbarInstant||void 0,"data-dragging":ne||void 0,"data-animating":J>0||void 0,children:[/* @__PURE__ */ (0,a.jsx)(u,{productTitle:ue,useSessions:t,usePanelInfo:n}),w?/* @__PURE__ */ (0,a.jsxs)(a.Fragment,{children:[/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.phoneSidebarTrack}),/* @__PURE__ */ (0,a.jsx)(`button`,{ref:k,type:`button`,className:h.phoneBackdrop,"aria-label":m(`close`),tabIndex:-1,onClick:()=>F(!1)}),/* @__PURE__ */ (0,a.jsxs)(`div`,{ref:D,className:h.phoneDrawer,"data-phone-drawer":!0,"data-open":L||void 0,role:M===0?`dialog`:void 0,"aria-modal":L&&M===0?!0:void 0,"aria-label":ue,"aria-hidden":!L||void 0,tabIndex:-1,style:{width:Z},children:[/* @__PURE__ */ (0,a.jsxs)(`div`,{ref:O,className:h.phoneDrawerBody,children:[/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.phoneDrawerContent,"data-phone-sidebar-content":!0,children:fe}),/* @__PURE__ */ (0,a.jsx)(`div`,{ref:j,className:h.phoneViews})]}),/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.phoneDrawerEdge,"data-phone-drawer-edge":!0,"aria-hidden":`true`,onClick:e=>{e.preventDefault(),e.stopPropagation()}})]})]}):/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.sidebarCol,children:fe}),/* @__PURE__ */ (0,a.jsxs)(a.Fragment,{children:[/* @__PURE__ */ (0,a.jsx)(g,{children:pe}),/* @__PURE__ */ (0,a.jsx)(v,{children:d(`rightbar`,{width:U.rightbar,viewportWidth:S,bindSwipeNavigation:T,canShow:U.rightbar>0})})]}),/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.bottomRow,"data-shell-bottom":!0,children:d(`shell.bottom`,{})}),/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.overlayLayer,"data-shell-overlay":!0,children:me}),_e&&/* @__PURE__ */ (0,a.jsx)(`div`,{className:h.leadingSeat,"data-shell-leading":!0,children:he}),!E&&/* @__PURE__ */ (0,a.jsx)(y,{side:`sidebar`,left:W.sidebar,onStart:oe,onDrag:se,onEnd:ae}),b.rightbarShown&&!b.rightbarFullscreen&&U.rightbar>0&&/* @__PURE__ */ (0,a.jsx)(y,{side:`rightbar`,left:S-U.rightbar,onStart:ce,onDrag:le,onEnd:ae})]});return/* @__PURE__ */ (0,a.jsx)(i.PhoneSidebarProvider,{target:w?A:null,open:L,close:I,backLabel:m(`back`),enterView:P,children:ye})}function x(){return(0,o.defineStore)({init:()=>({panelInfo:{activePanelId:null},layoutInfo:{sidebar:280,viewportWidth:window.innerWidth,narrowExpanded:!1,rightbar:null,rightbarShown:!1,rightbarTrack:!1,rightbarFullscreen:!1,rightbarInstant:!1}}),actions:{selectPanel:(e,t)=>{e.panelInfo.activePanelId=t,t!==null&&e.layoutInfo.viewportWidth<1024&&(e.layoutInfo.narrowExpanded=!1)},retainMainPanels:(e,t)=>{e.panelInfo.activePanelId!==null&&!t.includes(e.panelInfo.activePanelId)&&(e.panelInfo.activePanelId=null)},setSidebar:(e,t)=>{e.layoutInfo.rightbarInstant=!1,e.layoutInfo.sidebar=c(t,264,420)},toggleSidebar:e=>{e.layoutInfo.rightbarInstant=!1,e.layoutInfo.viewportWidth<1024?e.layoutInfo.narrowExpanded=!e.layoutInfo.narrowExpanded:e.layoutInfo.sidebar=e.layoutInfo.sidebar===0?280:0},setViewportWidth:(e,t)=>{e.layoutInfo.viewportWidth!==t&&(e.layoutInfo.rightbarInstant=!1,e.layoutInfo.viewportWidth<1024!=t<1024&&(e.layoutInfo.narrowExpanded=!1),e.layoutInfo.viewportWidth=t)},setRightbar:(e,t)=>{e.layoutInfo.rightbarInstant=!1,e.layoutInfo.rightbar=c(t,300,Math.max(300,e.layoutInfo.viewportWidth*s))},openRightbar:(e,t,n)=>{(!e.layoutInfo.rightbarShown||e.layoutInfo.rightbarTrack!==t||e.layoutInfo.rightbarFullscreen!==n)&&(e.layoutInfo.rightbarInstant=e.layoutInfo.rightbarFullscreen&&!n),!e.layoutInfo.rightbarShown&&e.layoutInfo.viewportWidth<1024&&(e.layoutInfo.narrowExpanded=!1),e.layoutInfo.rightbar??=Math.max(300,Math.round(e.layoutInfo.viewportWidth*.45)),e.layoutInfo.rightbarShown=!0,e.layoutInfo.rightbarTrack=t,e.layoutInfo.rightbarFullscreen=n},closeRightbar:e=>{e.layoutInfo.rightbarShown&&(e.layoutInfo.rightbarInstant=e.layoutInfo.rightbarFullscreen),e.layoutInfo.rightbarShown=!1,e.layoutInfo.rightbarTrack=!1,e.layoutInfo.rightbarFullscreen=!1}}})}var S=class{panels;hasMainPanel;panelInfo;navigation=new AbortController;constructor(e,t,n){this.panels=e,this.hasMainPanel=t,this.panelInfo=n}selectPanel(e){if(e!==null&&!this.hasMainPanel(e))throw Error(`layout.selectPanel: main panel "${e}" is not registered`);this.navigation.abort(),this.panels.selectPanel(e)}beginNavigation(){return this.navigation.abort(),this.navigation=new AbortController,this.navigation.signal}dispose(){this.navigation.abort()}toggleSidebar(){this.panels.toggleSidebar()}openRightbar(e,t){this.panels.openRightbar(e,t)}closeRightbar(){this.panels.closeRightbar()}};let C={toggle:`展开/收起左侧栏`},w={toggle:`Toggle left sidebar`},T=`data-ds-dark-theme`,E=`data-ds-theme-source`,D=`--dsh-content-font-size`;var O=class{appliedTokens=[];themeColorMeta;constructor(){this.themeColorMeta=document.createElement(`meta`),this.themeColorMeta.name=`theme-color`}apply(e){let t=e.active.colorScheme;document.documentElement.style.colorScheme=t,document.documentElement.setAttribute(E,e.preference===`system`?`system`:t);let n=document.body;t===`dark`?n.setAttribute(T,``):n.removeAttribute(T),n.style.setProperty(D,`${e.fontSize}px`);for(let e of this.appliedTokens)n.style.removeProperty(e);this.appliedTokens=[];for(let[t,r]of Object.entries(e.active.tokens))n.style.setProperty(t,r),this.appliedTokens.push(t);this.themeColorMeta.content=getComputedStyle(n).backgroundColor,this.themeColorMeta.isConnected||document.head.append(this.themeColorMeta)}dispose(){document.documentElement.style.removeProperty(`color-scheme`),document.documentElement.removeAttribute(E);let e=document.body;e.removeAttribute(T),e.style.removeProperty(D);for(let t of this.appliedTokens)e.style.removeProperty(t);this.appliedTokens=[],this.themeColorMeta.remove()}};let k=[`slots`,`theme`,`locale`,`shortcuts`];function A(e){e.effect(()=>e.locale.register(`shortcuts.layout`,{zh:C,en:w}),`layout: command labels`);let t=e.locale.bind(`shortcuts.layout`);e.effect(()=>{let n=x(),r=n.create(),i={...n,create:()=>r},a=()=>{r.actions.retainMainPanels(e.slots.entries(`main`).flatMap(e=>e.options.key===void 0?[]:[e.options.key]))},o=new S(r.actions,t=>e.slots.entries(`main`).some(e=>e.options.key===t),{getSnapshot:()=>r.getSnapshot().panelInfo,subscribe:e=>r.subscribe(e)}),s=e.slots.provideRoot({hooks:{panelInfo:o.panelInfo}}),c=e.reflect.provide(`layout`,o),l=e.slots.register({name:`root`,locale:`common`,children:{sidebar:{kind:`single`,scope:`root`},main:{kind:`keyed`,scope:`root`},rightbar:{kind:`single`,scope:`root`},"shell.bottom":{kind:`single`,scope:`root`},"shell.overlay":{kind:`list`,scope:`root`},"shell.leading":{kind:`single`,scope:`root`}},store:i},b),u=e.shortcuts.register({id:`sidebar.left.toggle`,label:()=>t(`toggle`),aliases:[`sidebar`,`toggle left sidebar`],defaults:{"desktop:macos":{code:`KeyB`,modifiers:[`primary`]},"desktop:windows":{code:`KeyB`,modifiers:[`primary`]},"desktop:linux":{code:`KeyB`,modifiers:[`primary`]},"web:macos":{code:`KeyB`,modifiers:[`primary`,`alt`]},"web:windows":{code:`KeyB`,modifiers:[`primary`,`alt`]}},regions:[`page`,`editable`],modals:[],resolve:()=>({status:`handled`,run:()=>{o.toggleSidebar()}})}),d=e.slots.subscribe(`main`,a);return a(),()=>{u(),o.dispose(),d(),l(),s(),c()}},`ui-layout: service + root registration`),e.effect(()=>{let t=new O;t.apply(e.theme.getTheme());let n=e.on(`theme/change`,e=>{t.apply(e)});return()=>{n(),t.dispose()}},`ui-layout: theme presenter`)}return n.LayoutController=S,n.apply=A,n.inject=k,t.exports}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/cordis"),i=e("@deepseek-ai/dsh-client-store");function a(e){return e==null}function o(e){return e&&typeof e==`object`&&!Array.isArray(e)}function s(e,t){return Object.fromEntries(Object.entries(e).filter(([e,n])=>t(e,n)))}function c(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n,e)]))}function l(e,t,n){if(!t)return{...e};let r={};for(let i of t)(n||e[i]!==void 0)&&(r[i]=e[i]);return r}let u=Symbol.for(`cosmokit.volatile.write`);function d(e,t=/* @__PURE__ */ new Set){if(typeof e==`function`)throw TypeError(`volatile config cannot contain functions`);if(typeof e!=`object`||!e)return e;if(t.has(e))throw TypeError(`volatile config cannot contain cycles`);t.add(e);try{if(Array.isArray(e))return Object.freeze(e.map(e=>d(e,t)));if(Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw TypeError(`volatile config objects must be plain objects or arrays`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,n])=>[e,d(n,t)])))}finally{t.delete(e)}}function f(e){let t=d(e);return Object.freeze({get:()=>t,[u]:e=>{t=e}})}function p(e){return typeof e==`object`&&!!e&&u in e}function m(e,t){return arguments.length===1?t=>m(e,t):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}function h(e){return m(`ArrayBuffer`,e)||m(`SharedArrayBuffer`,e)}function g(e){return h(e)||ArrayBuffer.isView(e)}let _;(function(e){e.is=h,e.isSource=g;function t(e){return ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e}e.fromSource=t;function n(e){if(e=t(e),typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);let n=``,r=new Uint8Array(e);for(let e=0;e<r.byteLength;e++)n+=String.fromCharCode(r[e]);return btoa(n)}e.toBase64=n;function r(e){return typeof Buffer<`u`?t(Buffer.from(e,`base64`)):Uint8Array.from(atob(e),e=>e.charCodeAt(0))}e.fromBase64=r;function i(e){return e=t(e),typeof Buffer<`u`?Buffer.from(e).toString(`hex`):Array.from(new Uint8Array(e),e=>e.toString(16).padStart(2,`0`)).join(``)}e.toHex=i;function a(e){if(typeof Buffer<`u`)return t(Buffer.from(e,`hex`));let n=e.length%2==0?e:e.slice(0,e.length-1),r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(`${n[e]}${n[e+1]}`,16));return Uint8Array.from(r).buffer}e.fromHex=a})(_||={}),_.fromBase64,_.toBase64,_.fromHex,_.toHex;function v(e,t=/* @__PURE__ */ new Map){if(!e||typeof e!=`object`)return e;if(m(`Date`,e))return new Date(e.valueOf());if(m(`RegExp`,e))return new RegExp(e.source,e.flags);if(h(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let n=t.get(e);if(n)return n;if(Array.isArray(e)){let n=[];return t.set(e,n),e.forEach((e,r)=>{n[r]=Reflect.apply(v,null,[e,t])}),n}let r=Object.create(Object.getPrototypeOf(e));t.set(e,r);for(let n of Reflect.ownKeys(e)){let i={...Reflect.getOwnPropertyDescriptor(e,n)};`value`in i&&(i.value=Reflect.apply(v,null,[i.value,t])),Reflect.defineProperty(r,n,i)}return r}function y(e,t,n){let r=/* @__PURE__ */ new Set;function i(e,t){if(e===t)return!0;if(p(e)||p(t))return p(e)&&p(t);if(!n&&a(e)&&a(t))return!0;if(typeof e!=typeof t||typeof e!=`object`||!e||!t||r.has(e))return!1;function o(n,r){return n(e)?n(t)?r(e,t):!1:!n(t)&&void 0}r.add(e);try{return o(Array.isArray,(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1;return!0})??o(m(`Date`),(e,t)=>e.valueOf()===t.valueOf())??o(m(`URL`),(e,t)=>e.href===t.href)??o(m(`RegExp`),(e,t)=>e.source===t.source&&e.flags===t.flags)??o(h,(e,t)=>{if(e.byteLength!==t.byteLength)return!1;let n=new Uint8Array(e),r=new Uint8Array(t);for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0})??((!n||[e,t].every(e=>Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null))&&Object.keys({...e,...t}).every(n=>i(e[n],t[n])))}finally{r.delete(e)}}return i(e,t)}let b;(function(e){e.millisecond=1;let t=e.second=1e3,n=e.minute=t*60,r=e.hour=n*60,i=e.day=r*24,a=e.week=i*7,o=(/* @__PURE__ */ new Date()).getTimezoneOffset();function s(e){o=e}e.setTimezoneOffset=s;function c(){return o}e.getTimezoneOffset=c;function l(e=/* @__PURE__ */ new Date,t){return typeof e==`number`&&(e=new Date(e)),t===void 0&&(t=o),Math.floor((e.valueOf()/n-t)/1440)}e.getDateNumber=l;function u(e,t){let r=new Date(e*i);return t===void 0&&(t=o),new Date(+r+t*n)}e.fromDateNumber=u;let d=RegExp(`^${[`w(?:eek(?:s)?)?`,`d(?:ay(?:s)?)?`,`h(?:our(?:s)?)?`,`m(?:in(?:ute)?(?:s)?)?`,`s(?:ec(?:ond)?(?:s)?)?`].map(e=>`(\\d+(?:\\.\\d+)?${e})?`).join(``)}$`);function f(e){let o=d.exec(e);return o?(parseFloat(o[1])*a||0)+(parseFloat(o[2])*i||0)+(parseFloat(o[3])*r||0)+(parseFloat(o[4])*n||0)+(parseFloat(o[5])*t||0):0}e.parseTime=f;function p(e){let t=f(e);return t?e=Date.now()+t:/^\d{1,2}(:\d{1,2}){1,2}$/.test(e)?e=`${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${e}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(e)&&(e=`${(/* @__PURE__ */ new Date()).getFullYear()}-${e}`),e?new Date(e):/* @__PURE__ */ new Date}e.parseDate=p;function m(e){let a=Math.abs(e);return a>=i-r/2?Math.round(e/i)+`d`:a>=r-n/2?Math.round(e/r)+`h`:a>=n-t/2?Math.round(e/n)+`m`:a>=t?Math.round(e/t)+`s`:e+`ms`}e.format=m;function h(e,t=2){return e.toString().padStart(t,`0`)}e.toDigits=h;function g(e,t=/* @__PURE__ */ new Date){return e.replace(`yyyy`,t.getFullYear().toString()).replace(`yy`,t.getFullYear().toString().slice(2)).replace(`MM`,h(t.getMonth()+1)).replace(`dd`,h(t.getDate())).replace(`hh`,h(t.getHours())).replace(`mm`,h(t.getMinutes())).replace(`ss`,h(t.getSeconds())).replace(`SSS`,h(t.getMilliseconds(),3))}e.template=g})(b||={});let x=Symbol.for(`schemastery`),S=Symbol.for(`ValidationError`);globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var C=class extends TypeError{options;name=`ValidationError`;constructor(e,t){let n=`$`;for(let e of t.path||[])typeof e==`string`?n+=`.`+e:typeof e==`number`?n+=`[`+e+`]`:typeof e==`symbol`&&(n+=`[Symbol(${e.toString()})]`);n.startsWith(`.`)&&(n=n.slice(1)),super((n===`$`?``:`${n} `)+e),this.options=t}static is(e){return!!e?.[S]}};Object.defineProperty(C.prototype,S,{value:!0});let w=function(e){let t=function(e,n={}){return w.resolve(e,t,n)[0]};if(e.refs){let t=c(e.refs,e=>new w(e)),n=e=>t[e];for(let e in t){let r=t[e];r.sKey=n(r.sKey),r.inner=n(r.inner),r.list=r.list&&r.list.map(n),r.dict=r.dict&&c(r.dict,n)}return t[e.uid]}if(Object.assign(t,e),typeof t.callback==`string`)try{t.callback=Function(`return `+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,w.prototype),t.meta||={},t.toString=t.toString.bind(t),t};w.prototype=Object.create(Function.prototype),w.prototype[x]=!0,Object.defineProperty(w.prototype,"~standard",{get(){return{version:1,vendor:`schemastery`,validate:e=>{try{return{value:w.resolve(e,this,{})[0]}}catch(e){if(C.is(e))return{issues:[{message:e.message,path:e.options.path}]};throw e}}}}}),w.ValidationError=C,w.prototype.toJSON=function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));let e={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,e},w.prototype.set=function(e,t){return this.dict[e]=t,this},w.prototype.push=function(e){return this.list.push(e),this};function T(e,t){let n=typeof e==`string`?{"":e}:{...e};for(let e in t){let r=t[e];r?.$description||r?.$desc?n[e]=r.$description||r.$desc:typeof r==`string`&&(n[e]=r)}return n}function E(e){return e?.$value??e?.$inner}function D(e){return s(e??{},e=>!e.startsWith(`$`))}w.prototype.i18n=function(e){let t=w(this),n=T(t.meta.description,e);return Object.keys(n).length&&(t.meta.description=n),t.dict&&=c(t.dict,(t,n)=>t.i18n(c(e,e=>E(e)?.[n]??e?.[n]))),t.list&&=t.list.map((t,n)=>t.i18n(c(e,(e={})=>Array.isArray(E(e))?E(e)[n]:Array.isArray(e)?e[n]:D(e)))),t.inner&&=t.inner.i18n(c(e,e=>E(e)?E(e):D(e))),t.sKey&&=t.sKey.i18n(c(e,e=>e?.$key)),t},w.prototype.extra=function(e,t){let n=w(this);return n.meta={...n.meta,[e]:t},n};for(let e of[`required`,`disabled`,`collapse`,`hidden`,`loose`])Object.assign(w.prototype,{[e](t=!0){let n=w(this);return n.meta={...n.meta,[e]:t},n}});w.prototype.deprecated=function(){let e=w(this);return e.meta.badges||=[],e.meta.badges.push({text:`deprecated`,type:`danger`}),e},w.prototype.experimental=function(){let e=w(this);return e.meta.badges||=[],e.meta.badges.push({text:`experimental`,type:`warning`}),e},w.prototype.pattern=function(e){let t=w(this),n=l(e,[`source`,`flags`]);return t.meta={...t.meta,pattern:n},t},w.prototype.simplify=function(e){if(p(e)&&(e=e.get()),y(e,this.meta.default,this.type===`dict`))return null;if(a(e))return e;if(this.type===`object`||this.type===`dict`){let t={};for(let n in e){let r=(this.type===`object`?this.dict[n]:this.inner)?.simplify(e[n]);(this.type===`dict`||!a(r))&&(t[n]=r)}return y(t,this.meta.default,this.type===`dict`)?null:t}if(this.type===`array`||this.type===`tuple`){let t=[];return e.forEach((e,n)=>{let r=this.type===`array`?this.inner:this.list[n],i=r?r.simplify(e):e;t.push(i)}),t}if(this.type===`intersect`){let t={};for(let n of this.list)Object.assign(t,n.simplify(e));return t}if(this.type===`union`)for(let t of this.list)try{return w.resolve(e,t,{}),t.simplify(e)}catch{}return e},w.prototype.toString=function(e){return I[this.type]?.(this,e)??`Schema<${this.type}>`},w.prototype.role=function(e,t){let n=w(this);return n.meta={...n.meta,role:e,extra:t},n};for(let e of[`default`,`link`,`comment`,`description`,`max`,`min`,`step`])Object.assign(w.prototype,{[e](t){let n=w(this);return n.meta={...n.meta,[e]:t},n}});w.prototype.volatile=function(){if(this.meta.volatile)throw TypeError(`volatile schema is already wrapped`);return this.extra(`volatile`,!0)};let O={},k=Symbol(`checked-volatile-schema`);function A(e,t=[],n=!1,r=/* @__PURE__ */ new Map){let i=r.get(e)??/* @__PURE__ */ new Set;if(i.has(n))return;if(i.add(n),r.set(e,i),e.meta?.volatile&&n)throw new C(`volatile fields require a fixed object path without an enclosing volatile field`,{path:t});let a=n||!!e.meta?.volatile;if(e.dict)for(let[n,i]of Object.entries(e.dict))A(i,[...t,n],a,r);if(e.sKey&&A(e.sKey,[...t,`<key>`],!0,r),e.inner&&(e.type!==`lazy`||e.inner[x])&&A(e.inner,[...t,`*`],!0,r),e.list)for(let n=0;n<e.list.length;n++)A(e.list[n],[...t,String(n)],!0,r)}w.extend=function(e,t){O[e]=t},w.resolve=function(e,t,n={},r=!1){if(!t)return[e];if(n[k]||(A(t,n.path),n={...n,[k]:!0}),t.meta?.volatile){let i=w(t);i.meta={...t.meta,volatile:!1};let[a,o]=w.resolve(e,i,n,r);try{return[f(a),o]}catch(e){throw new C(e instanceof Error?e.message:String(e),n)}}if(n.ignore?.(e,t))return[e];if(a(e)&&t.type!==`lazy`){if(t.meta.required)throw new C(`missing required value`,n);let r=t,i=t.meta.default;for(;r?.type===`intersect`&&a(i);)r=r.list[0],i=r?.meta.default;if(a(i))return[e];e=v(i)}let i=O[t.type];if(!i)throw new C(`unsupported type "${t.type}"`,n);try{return i(e,t,n,r)}catch(e){if(!t.meta.loose)throw e;return[t.meta.default]}},w.from=function(e){if(a(e))return w.any();if([`string`,`number`,`boolean`].includes(typeof e))return w.const(e).required();if(e[x])return e;if(typeof e==`function`)switch(e){case String:return w.string().required();case Number:return w.number().required();case Boolean:return w.boolean().required();case Function:return w.function().required();default:return w.is(e).required()}else throw TypeError(`cannot infer schema from ${e}`)},w.lazy=function(e){let t=new w({type:`lazy`,builder:e,inner:{toJSON:()=>(t.inner[x]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),t.inner.toJSON())}});return t},w.natural=function(){return w.number().step(1).min(0)},w.percent=function(){return w.number().step(.01).min(0).max(1).role(`slider`)},w.date=function(){return w.union([w.is(Date),w.transform(w.string().role(`datetime`),(e,t)=>{let n=new Date(e);if(isNaN(+n))throw new C(`invalid date "${e}"`,t);return n},!0)])},w.regExp=function(e=``){return w.union([w.is(RegExp),w.transform(w.string().role(`regexp`,{flag:e}),(t,n)=>{try{return new RegExp(t,e)}catch(e){throw new C(e.message,n)}},!0)])},w.arrayBuffer=function(e){return w.union([w.is(ArrayBuffer),w.is(SharedArrayBuffer),w.transform(w.any(),(e,t)=>{if(_.isSource(e))return _.fromSource(e);throw new C(`expected ArrayBufferSource but got ${e}`,t)},!0),...e?[w.transform(w.string(),(t,n)=>{try{return e===`base64`?_.fromBase64(t):_.fromHex(t)}catch(e){throw new C(e.message,n)}},!0)]:[]])},w.extend(`lazy`,(e,t,n,r)=>(t.inner[x]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta},A(t.inner,n.path,!0)),w.resolve(e,t.inner,n,r))),w.extend(`any`,e=>[e]),w.extend(`never`,(e,t,n)=>{throw new C(`expected nullable but got ${e}`,n)}),w.extend(`const`,(e,{value:t},n)=>{if(y(e,t))return[t];throw new C(`expected ${t} but got ${e}`,n)});function j(e,t,n,r,i=!1){let{max:a=1/0,min:o=-1/0}=t;if(e>a)throw new C(`expected ${n} <= ${a} but got ${e}`,r);if(e<o&&!i)throw new C(`expected ${n} >= ${o} but got ${e}`,r)}w.extend(`string`,(e,{meta:t},n)=>{if(typeof e!=`string`)throw new C(`expected string but got ${e}`,n);if(t.pattern){let r=new RegExp(t.pattern.source,t.pattern.flags);if(!r.test(e))throw new C(`expect string to match regexp ${r}`,n)}return j(e.length,t,`string length`,n),[e]});function M(e,t){let n=e.toString();if(n.includes(`e`))return e*10**t;let r=n.indexOf(`.`);if(r===-1)return e*10**t;let i=n.slice(r+1),a=n.slice(0,r);return i.length<=t?+(a+i.padEnd(t,`0`)):+(a+i.slice(0,t)+`.`+i.slice(t))}function N(e,t,n){if(n=Math.abs(n),!/^\d+\.\d+$/.test(n.toString()))return(e-t)%n===0;let r=n.toString().indexOf(`.`),i=n.toString().slice(r+1).length;return Math.abs(M(e,i)-M(t,i))%M(n,i)===0}w.extend(`number`,(e,{meta:t},n)=>{if(typeof e!=`number`)throw new C(`expected number but got ${e}`,n);j(e,t,`number`,n);let{step:r}=t;if(r&&!N(e,t.min??0,r))throw new C(`expected number multiple of ${r} but got ${e}`,n);return[e]}),w.extend(`boolean`,(e,t,n)=>{if(typeof e==`boolean`)return[e];throw new C(`expected boolean but got ${e}`,n)}),w.extend(`bitset`,(e,{bits:t,meta:n},r)=>{let i=0,a=[];if(typeof e==`number`){i=e;for(let n in t)e&t[n]&&a.push(n)}else if(Array.isArray(e)){a=e;for(let e of a){if(typeof e!=`string`)throw new C(`expected string but got ${e}`,r);e in t&&(i|=t[e])}}else throw new C(`expected number or array but got ${e}`,r);return i===n.default?[i]:[i,a]}),w.extend(`function`,(e,t,n)=>{if(typeof e==`function`)return[e];throw new C(`expected function but got ${e}`,n)}),w.extend(`is`,(e,{constructor:t},n)=>{if(typeof t==`function`){if(e instanceof t)return[e];throw new C(`expected ${t.name} but got ${e}`,n)}{if(a(e))throw new C(`expected ${t} but got ${e}`,n);let r=Object.getPrototypeOf(e);for(;r;){if(r.constructor?.name===t)return[e];r=Object.getPrototypeOf(r)}throw new C(`expected ${t} but got ${e}`,n)}});function P(e,t,n,r){try{let[i,a]=w.resolve(e[t],n,{...r,path:[...r.path||[],t]});return a!==void 0&&(e[t]=a),i}catch(i){if(!r?.autofix)throw i;return delete e[t],n.meta.volatile?f(n.meta.default):n.meta.default}}w.extend(`array`,(e,{inner:t,meta:n},r)=>{if(!Array.isArray(e))throw new C(`expected array but got ${e}`,r);return j(e.length,n,`array length`,r,!a(t.meta.default)),[e.map((n,i)=>P(e,i,t,r))]}),w.extend(`dict`,(e,{inner:t,sKey:n},r,i)=>{if(!o(e))throw new C(`expected object but got ${e}`,r);let a={};for(let o in e){let s;try{s=w.resolve(o,n,r)[0]}catch(e){if(i)continue;throw e}a[s]=P(e,o,t,r),e[s]=e[o],o!==s&&delete e[o]}return[a]}),w.extend(`tuple`,(e,{list:t},n,r)=>{if(!Array.isArray(e))throw new C(`expected array but got ${e}`,n);let i=t.map((t,r)=>P(e,r,t,n));return r||i.push(...e.slice(t.length)),[i]});function F(e,t){for(let n in t)n in e||(e[n]=t[n])}w.extend(`object`,(e,{dict:t},n,r)=>{if(!o(e))throw new C(`expected object but got ${e}`,n);let i={};for(let r in t){let o=P(e,r,t[r],n);(!a(o)||r in e)&&(i[r]=o)}return r||F(i,e),[i]}),w.extend(`union`,(e,{list:t,toString:n},r,i)=>{let a=[];for(let n of t)try{return w.resolve(e,n,r,i)}catch(e){a.push(e)}throw new C(`expected ${n()} but got ${JSON.stringify(e)}`,r)}),w.extend(`intersect`,(e,{list:t,toString:n},r,i)=>{if(!t.length)return[e];let s;for(let i of t){let t=w.resolve(e,i,r,!0)[0];if(!a(t)){if(a(s))s=t;else if(typeof s!=typeof t)throw new C(`expected ${n()} but got ${JSON.stringify(e)}`,r);else if(typeof t==`object`)F(s??={},t);else if(s!==t)throw new C(`expected ${n()} but got ${JSON.stringify(e)}`,r)}}return!i&&o(e)&&F(s,e),[s]}),w.extend(`transform`,(e,{inner:t,callback:n,preserve:r},i)=>{let[a,o=e]=w.resolve(e,t,i,!0);return r?[n(a)]:[n(a),n(o)]});let I={};function L(e,t,n){I[e]=n,Object.assign(w,{[e](...n){let r=new w({type:e});return t.forEach((e,t)=>{switch(e){case`sKey`:r.sKey=n[t]??w.string();break;case`inner`:r.inner=w.from(n[t]);break;case`list`:r.list=n[t].map(w.from);break;case`dict`:r.dict=c(n[t],w.from);break;case`bits`:r.bits={};for(let e in n[t])typeof n[t][e]==`number`&&(r.bits[e]=n[t][e]);break;case`callback`:{let e=r.callback=n[t];e.toJSON||=()=>e.toString();break}case`constructor`:{let e=r.constructor=n[t];typeof e==`function`&&(e.toJSON||=()=>e.name);break}default:r[e]=n[t]}}),e===`object`||e===`dict`?r.meta.default={}:e===`array`||e===`tuple`?r.meta.default=[]:e===`bitset`&&(r.meta.default=0),r}})}L(`is`,[`constructor`],({constructor:e})=>typeof e==`function`?e.name:e),L(`any`,[],()=>`any`),L(`never`,[],()=>`never`),L(`const`,[`value`],({value:e})=>typeof e==`string`?JSON.stringify(e):e),L(`string`,[],()=>`string`),L(`number`,[],()=>`number`),L(`boolean`,[],()=>`boolean`),L(`bitset`,[`bits`],()=>`bitset`),L(`function`,[],()=>`function`),L(`array`,[`inner`],({inner:e})=>`${e.toString(!0)}[]`),L(`dict`,[`inner`,`sKey`],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),L(`tuple`,[`list`],({list:e})=>`[${e.map(e=>e.toString()).join(`, `)}]`),L(`object`,[`dict`],({dict:e})=>Object.keys(e).length===0?`{}`:`{ ${Object.entries(e).map(([e,t])=>`${e}${t.meta.required?``:`?`}: ${t.toString()}`).join(`, `)} }`),L(`union`,[`list`],({list:e},t)=>{let n=e.map(({toString:e})=>e()).join(` | `);return t?`(${n})`:n}),L(`intersect`,[`list`],({list:e})=>`${e.map(e=>e.toString(!0)).join(` & `)}`),L(`transform`,[`inner`,`callback`,`preserve`],({inner:e},t)=>e.toString(t));function R(e,t){return Array.isArray(e)?[...e]:typeof e==`object`&&e?{...e}:/^\d+$/.test(t)?[]:{}}function z(e,t){let n={...e},r=n;for(let e=0;e<t.length-1;e++){let n=t[e],i=R(Array.isArray(r)?r[Number(n)]:r[n],t[e+1]);Array.isArray(r)?r[Number(n)]=i:r[n]=i,r=i}return{result:n,parent:r,leaf:t[t.length-1]}}var B=class extends r.Service{constructor(e){super(e,`settingsSchema`)}rehydrate(e){return new w(e)}validate(e,t){try{e(t);return}catch(e){return e instanceof Error?e.message:String(e)}}nodeAtPath(e,t){let n=e;for(let e of t){if(n===void 0)return;if(n.type===`object`)n=n.dict?.[e];else if(n.type===`dict`||n.type===`array`)n=n.inner;else return}return n}getPath(e,t){let n=e;for(let e of t)if(Array.isArray(n))n=n[Number(e)];else{if(typeof n!=`object`||!n)return;n=n[e]}return n}hasPath(e,t){if(t.length===0)return e!==void 0;let n=this.getPath(e,t.slice(0,-1)),r=t[t.length-1];return Array.isArray(n)?Number(r)<n.length:typeof n!=`object`||!n?!1:r in n}setPath(e,t,n){if(t.length===0)throw Error(`ui-settings: setPath needs a non-empty path`);let{result:r,parent:i,leaf:a}=z(e,t);return Array.isArray(i)?i[Number(a)]=n:i[a]=n,r}deletePath(e,t){if(t.length===0)throw Error(`ui-settings: deletePath needs a non-empty path`);if(!this.hasPath(e,t))return e;let{result:n,parent:r,leaf:i}=z(e,t);return Array.isArray(r)?r.splice(Number(i),1):Reflect.deleteProperty(r,i),n}},V=class{scope;enabled;local=(0,i.createSnapshotStore)(!0);constructor(e){this.scope=e,this.enabled=e.getSnapshot().mode===`memory`?this.local:{getSnapshot:()=>e.getSnapshot().value?.enabled??!1,subscribe:t=>{let n=this.enabled.getSnapshot();return e.subscribe(()=>{let e=this.enabled.getSnapshot();e!==n&&(n=e,t())})}}}async setEnabled(e){if(this.scope.getSnapshot().mode===`memory`)this.local.set(e);else if(!await this.scope.set(`enabled`,e))throw Error(`Developer tools preference was not saved`)}};let H={enabled:w.boolean().default(!0)};w.object(H);let U=/* @__PURE__ */ new Set([`ui-theme`,`locale`,`ui-chat`,`ui-conversation`,`ui-settings`]);function W(e){return U.has(e)}function G(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var K=class{schema;key;constructor(e,t){this.schema=t,this.key=`codexhost.web.preferences.v1:${e}`}read(e){let t;try{let n=JSON.parse(localStorage.getItem(this.key)??`null`);G(n)&&G(n.user)&&Number.isSafeInteger(n.revision)&&n.revision>=0&&this.valid(e,n.user)&&(t=n)}catch{}return t===void 0&&(t={user:G(e.user)?e.user:{},revision:0},this.valid(e,t.user)||(t.user={}),this.save(t)),{...e,...t,value:{...G(e.base)?e.base:{},...t.user}}}write(e,t,n){let r=this.read(e);if(n!==void 0&&n!==r.revision)return!1;let i={...G(r.user)?r.user:{}};for(let e of t){if(e.path.length!==1)return!1;let t=e.path[0];e.op===`set`?i={...i,[t]:e.value}:delete i[t]}return this.valid(e,i)?this.save({user:i,revision:r.revision+1}):!1}valid(e,t){try{return this.schema.validate(this.schema.rehydrate(e.schema),{...G(e.base)?e.base:{},...t})===void 0}catch{return!1}}save(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),!0}catch{return!1}}},q=class{ctx;spec;mirror;persistence;schema;store;tail=Promise.resolve();writeGeneration=0;disposed=!1;unsubscribe;browser;pendingRevision;constructor(e,t,n,r,a){if(this.ctx=e,this.spec=t,this.mirror=n,this.persistence=r,this.schema=a,this.browser=r===`browser`?new K(t.namespace,a):void 0,this.store=(0,i.createSnapshotStore)({status:r===`memory`?`unavailable`:`loading`,value:void 0,base:void 0,user:void 0,revision:void 0,writable:!1,mode:r}),r!==`memory`){let e=n.subscribe(()=>{this.derive()}),t=e=>{(e.key===null||e.key===this.browser?.key)&&this.derive()};this.browser!==void 0&&window.addEventListener(`storage`,t),this.unsubscribe=()=>{e(),this.browser!==void 0&&window.removeEventListener(`storage`,t)},this.derive()}}getSnapshot(){return this.store.getSnapshot()}subscribe(e){return this.store.subscribe(e)}set(e,t){return this.mutate([{op:`set`,path:[e],value:t}])}unset(e){return this.mutate([{op:`unset`,path:[e]}])}mutate(e,t){let n=structuredClone(e),r=this.browser;if(r!==void 0)return this.enqueue(()=>{let e=this.mirror.namespace(this.spec.namespace),i=e!==void 0&&r.write(e,n,t);return this.derive(),Promise.resolve(i)});let i=++this.writeGeneration;return this.enqueue(async()=>{let e=t??this.pendingRevision??this.getSnapshot().revision,r=await this.ctx.remote.settings.mutate(this.spec.namespace,n,e);return r.ok?(this.disposed||(i===this.writeGeneration?(this.pendingRevision=void 0,this.mirror.acceptView(r.value)):this.pendingRevision=r.value.revision),!0):(await this.recover(i),!1)})}async recover(e){this.disposed||e!==this.writeGeneration||(this.pendingRevision=void 0,await this.mirror.load())}async dispose(){this.disposed=!0,this.writeGeneration+=1,this.unsubscribe?.(),await this.tail}enqueue(e){if(this.persistence===`memory`||this.disposed)return Promise.resolve(!1);let t=this.tail.then(async()=>!this.disposed&&await e());return this.tail=t.then(()=>{},()=>{}),t}derive(){if(this.disposed)return;let e=this.mirror.getSnapshot();if(e.view===void 0)return;let{writable:t}=e.view,n=e.view.namespaces.find(e=>e.ns===this.spec.namespace);if(n===void 0){this.store.update(e=>{e.status=`unavailable`,e.writable=t});return}let r=this.browser?.read(n)??n,i=this.decode(r);this.store.update(e=>{e.revision=r.revision,e.base=r.base,e.user=r.user,e.writable=this.browser!==void 0||t,i!==void 0&&(e.status=`ready`,e.value=i)})}decode(e){if(this.spec.decode!==void 0)return this.spec.decode(e.value);if(typeof e.value!=`object`||e.value===null||Array.isArray(e.value))return;let t;try{t=this.schema.validate(this.schema.rehydrate(e.schema),e.value)}catch{return}return t===void 0?e.value:void 0}},J=class extends r.Service{forms=/* @__PURE__ */ new Map;developerTools;mirror;schema;persistence;owner;constructor(e,t){super(e,`configForms`),this.mirror=t.mirror,this.schema=t.schema,this.persistence=t.persistence,this.owner=e,this.developerTools=new V(this.get(`ui-settings`)),e.effect(()=>async()=>{await Promise.all([...this.forms.values()].map(e=>e.dispose())),this.forms.clear()},`ui-settings: configuration forms`)}describe(){return this.mirror}get(e){let t=this.forms.get(e);if(t!==void 0)return t;let n=new q(this.owner,{namespace:e},this.mirror,W(e)?`browser`:this.persistence,this.schema);return this.forms.set(e,n),this.mirror.ensure(),n}whileServed(e,t){let n,r=()=>{let r=new Set(this.mirror.getSnapshot().view?.namespaces.map(e=>e.ns)??[]),i=e.some(e=>r.has(e));i&&n===void 0?n=t(r):!i&&n!==void 0&&(n(),n=void 0)},i=this.mirror.subscribe(r);return this.mirror.ensure(),r(),()=>{i(),n?.(),n=void 0}}},Y=class{ctx;persistence;store;inFlight;rerun=!1;generation=0;constructor(e,t=`host`){this.ctx=e,this.persistence=t,this.store=(0,i.createSnapshotStore)({status:t===`host`?`idle`:`unavailable`,view:void 0,error:null})}getSnapshot(){return this.store.getSnapshot()}subscribe(e){return this.store.subscribe(e)}load(){if(this.persistence===`memory`)return Promise.resolve();if(this.inFlight!==void 0)return this.rerun=!0,this.inFlight;let e=Promise.resolve().then(()=>this.run());return this.inFlight=e,e}ensure(){return this.persistence===`memory`?Promise.resolve():this.inFlight===void 0?this.getSnapshot().status===`idle`?this.load():Promise.resolve():this.inFlight}acceptView(e){let t=this.store.getSnapshot();if(this.generation+=1,this.inFlight!==void 0&&(this.rerun=!0),t.view===void 0)return;let n=t.view.namespaces.some(t=>t.ns===e.ns)?t.view.namespaces.map(t=>t.ns===e.ns?e:t):[...t.view.namespaces,e];this.store.set({...t,view:{...t.view,namespaces:n}})}namespace(e){return this.store.getSnapshot().view?.namespaces.find(t=>t.ns===e)}async run(){try{do{let e=this.store.getSnapshot();e.status===`idle`&&this.store.set({...e,status:`loading`}),this.rerun=!1;let t=++this.generation,n;try{let e=await this.ctx.remote.settings.describe();n=e.ok?{view:e.value}:{failure:e.error.message}}catch(e){n={failure:e instanceof Error?e.message:String(e)}}if(t===this.generation){if(`view`in n)this.store.set({status:`ready`,view:n.view,error:null});else{let e=this.store.getSnapshot();this.store.set({status:e.view===void 0?`idle`:`ready`,view:e.view,error:n.failure})}}}while(this.shouldRerun())}finally{this.inFlight=void 0}}shouldRerun(){return this.rerun}};let X=[`remote`,`remote.settings`];function Z(e){let t=new B(e),n=`host`,r=new Y(e,n);e.effect(()=>{let t=[e.remote.$on(`settings/document-updated`,()=>{r.load()}),e.on(`connection/reset`,()=>{r.load()})];return r.ensure(),()=>{for(let e of t)e()}},`ui-settings: describe mirror invalidations`),new J(e,{mirror:r,schema:t,persistence:n})}return n.apply=Z,n.inject=X,t.exports}});
|
|
1
|
+
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/cordis"),i=e("@deepseek-ai/dsh-client-store");function a(e){return e==null}function o(e){return e&&typeof e==`object`&&!Array.isArray(e)}function s(e,t){return Object.fromEntries(Object.entries(e).filter(([e,n])=>t(e,n)))}function c(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n,e)]))}function l(e,t,n){if(!t)return{...e};let r={};for(let i of t)(n||e[i]!==void 0)&&(r[i]=e[i]);return r}let u=Symbol.for(`cosmokit.volatile.write`);function d(e,t=/* @__PURE__ */ new Set){if(typeof e==`function`)throw TypeError(`volatile config cannot contain functions`);if(typeof e!=`object`||!e)return e;if(t.has(e))throw TypeError(`volatile config cannot contain cycles`);t.add(e);try{if(Array.isArray(e))return Object.freeze(e.map(e=>d(e,t)));if(Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw TypeError(`volatile config objects must be plain objects or arrays`);return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,n])=>[e,d(n,t)])))}finally{t.delete(e)}}function f(e){let t=d(e);return Object.freeze({get:()=>t,[u]:e=>{t=e}})}function p(e){return typeof e==`object`&&!!e&&u in e}function m(e,t){return arguments.length===1?t=>m(e,t):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}function h(e){return m(`ArrayBuffer`,e)||m(`SharedArrayBuffer`,e)}function g(e){return h(e)||ArrayBuffer.isView(e)}let _;(function(e){e.is=h,e.isSource=g;function t(e){return ArrayBuffer.isView(e)?e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength):e}e.fromSource=t;function n(e){if(e=t(e),typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);let n=``,r=new Uint8Array(e);for(let e=0;e<r.byteLength;e++)n+=String.fromCharCode(r[e]);return btoa(n)}e.toBase64=n;function r(e){return typeof Buffer<`u`?t(Buffer.from(e,`base64`)):Uint8Array.from(atob(e),e=>e.charCodeAt(0))}e.fromBase64=r;function i(e){return e=t(e),typeof Buffer<`u`?Buffer.from(e).toString(`hex`):Array.from(new Uint8Array(e),e=>e.toString(16).padStart(2,`0`)).join(``)}e.toHex=i;function a(e){if(typeof Buffer<`u`)return t(Buffer.from(e,`hex`));let n=e.length%2==0?e:e.slice(0,e.length-1),r=[];for(let e=0;e<n.length;e+=2)r.push(parseInt(`${n[e]}${n[e+1]}`,16));return Uint8Array.from(r).buffer}e.fromHex=a})(_||={}),_.fromBase64,_.toBase64,_.fromHex,_.toHex;function v(e,t=/* @__PURE__ */ new Map){if(!e||typeof e!=`object`)return e;if(m(`Date`,e))return new Date(e.valueOf());if(m(`RegExp`,e))return new RegExp(e.source,e.flags);if(h(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);let n=t.get(e);if(n)return n;if(Array.isArray(e)){let n=[];return t.set(e,n),e.forEach((e,r)=>{n[r]=Reflect.apply(v,null,[e,t])}),n}let r=Object.create(Object.getPrototypeOf(e));t.set(e,r);for(let n of Reflect.ownKeys(e)){let i={...Reflect.getOwnPropertyDescriptor(e,n)};`value`in i&&(i.value=Reflect.apply(v,null,[i.value,t])),Reflect.defineProperty(r,n,i)}return r}function y(e,t,n){let r=/* @__PURE__ */ new Set;function i(e,t){if(e===t)return!0;if(p(e)||p(t))return p(e)&&p(t);if(!n&&a(e)&&a(t))return!0;if(typeof e!=typeof t||typeof e!=`object`||!e||!t||r.has(e))return!1;function o(n,r){return n(e)?n(t)?r(e,t):!1:!n(t)&&void 0}r.add(e);try{return o(Array.isArray,(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1;return!0})??o(m(`Date`),(e,t)=>e.valueOf()===t.valueOf())??o(m(`URL`),(e,t)=>e.href===t.href)??o(m(`RegExp`),(e,t)=>e.source===t.source&&e.flags===t.flags)??o(h,(e,t)=>{if(e.byteLength!==t.byteLength)return!1;let n=new Uint8Array(e),r=new Uint8Array(t);for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0})??((!n||[e,t].every(e=>Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null))&&Object.keys({...e,...t}).every(n=>i(e[n],t[n])))}finally{r.delete(e)}}return i(e,t)}let b;(function(e){e.millisecond=1;let t=e.second=1e3,n=e.minute=t*60,r=e.hour=n*60,i=e.day=r*24,a=e.week=i*7,o=(/* @__PURE__ */ new Date()).getTimezoneOffset();function s(e){o=e}e.setTimezoneOffset=s;function c(){return o}e.getTimezoneOffset=c;function l(e=/* @__PURE__ */ new Date,t){return typeof e==`number`&&(e=new Date(e)),t===void 0&&(t=o),Math.floor((e.valueOf()/n-t)/1440)}e.getDateNumber=l;function u(e,t){let r=new Date(e*i);return t===void 0&&(t=o),new Date(+r+t*n)}e.fromDateNumber=u;let d=RegExp(`^${[`w(?:eek(?:s)?)?`,`d(?:ay(?:s)?)?`,`h(?:our(?:s)?)?`,`m(?:in(?:ute)?(?:s)?)?`,`s(?:ec(?:ond)?(?:s)?)?`].map(e=>`(\\d+(?:\\.\\d+)?${e})?`).join(``)}$`);function f(e){let o=d.exec(e);return o?(parseFloat(o[1])*a||0)+(parseFloat(o[2])*i||0)+(parseFloat(o[3])*r||0)+(parseFloat(o[4])*n||0)+(parseFloat(o[5])*t||0):0}e.parseTime=f;function p(e){let t=f(e);return t?e=Date.now()+t:/^\d{1,2}(:\d{1,2}){1,2}$/.test(e)?e=`${(/* @__PURE__ */ new Date()).toLocaleDateString()}-${e}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(e)&&(e=`${(/* @__PURE__ */ new Date()).getFullYear()}-${e}`),e?new Date(e):/* @__PURE__ */ new Date}e.parseDate=p;function m(e){let a=Math.abs(e);return a>=i-r/2?Math.round(e/i)+`d`:a>=r-n/2?Math.round(e/r)+`h`:a>=n-t/2?Math.round(e/n)+`m`:a>=t?Math.round(e/t)+`s`:e+`ms`}e.format=m;function h(e,t=2){return e.toString().padStart(t,`0`)}e.toDigits=h;function g(e,t=/* @__PURE__ */ new Date){return e.replace(`yyyy`,t.getFullYear().toString()).replace(`yy`,t.getFullYear().toString().slice(2)).replace(`MM`,h(t.getMonth()+1)).replace(`dd`,h(t.getDate())).replace(`hh`,h(t.getHours())).replace(`mm`,h(t.getMinutes())).replace(`ss`,h(t.getSeconds())).replace(`SSS`,h(t.getMilliseconds(),3))}e.template=g})(b||={});let x=Symbol.for(`schemastery`),S=Symbol.for(`ValidationError`);globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var C=class extends TypeError{options;name=`ValidationError`;constructor(e,t){let n=`$`;for(let e of t.path||[])typeof e==`string`?n+=`.`+e:typeof e==`number`?n+=`[`+e+`]`:typeof e==`symbol`&&(n+=`[Symbol(${e.toString()})]`);n.startsWith(`.`)&&(n=n.slice(1)),super((n===`$`?``:`${n} `)+e),this.options=t}static is(e){return!!e?.[S]}};Object.defineProperty(C.prototype,S,{value:!0});let w=function(e){let t=function(e,n={}){return w.resolve(e,t,n)[0]};if(e.refs){let t=c(e.refs,e=>new w(e)),n=e=>t[e];for(let e in t){let r=t[e];r.sKey=n(r.sKey),r.inner=n(r.inner),r.list=r.list&&r.list.map(n),r.dict=r.dict&&c(r.dict,n)}return t[e.uid]}if(Object.assign(t,e),typeof t.callback==`string`)try{t.callback=Function(`return `+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,w.prototype),t.meta||={},t.toString=t.toString.bind(t),t};w.prototype=Object.create(Function.prototype),w.prototype[x]=!0,Object.defineProperty(w.prototype,"~standard",{get(){return{version:1,vendor:`schemastery`,validate:e=>{try{return{value:w.resolve(e,this,{})[0]}}catch(e){if(C.is(e))return{issues:[{message:e.message,path:e.options.path}]};throw e}}}}}),w.ValidationError=C,w.prototype.toJSON=function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));let e={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,e},w.prototype.set=function(e,t){return this.dict[e]=t,this},w.prototype.push=function(e){return this.list.push(e),this};function T(e,t){let n=typeof e==`string`?{"":e}:{...e};for(let e in t){let r=t[e];r?.$description||r?.$desc?n[e]=r.$description||r.$desc:typeof r==`string`&&(n[e]=r)}return n}function E(e){return e?.$value??e?.$inner}function D(e){return s(e??{},e=>!e.startsWith(`$`))}w.prototype.i18n=function(e){let t=w(this),n=T(t.meta.description,e);return Object.keys(n).length&&(t.meta.description=n),t.dict&&=c(t.dict,(t,n)=>t.i18n(c(e,e=>E(e)?.[n]??e?.[n]))),t.list&&=t.list.map((t,n)=>t.i18n(c(e,(e={})=>Array.isArray(E(e))?E(e)[n]:Array.isArray(e)?e[n]:D(e)))),t.inner&&=t.inner.i18n(c(e,e=>E(e)?E(e):D(e))),t.sKey&&=t.sKey.i18n(c(e,e=>e?.$key)),t},w.prototype.extra=function(e,t){let n=w(this);return n.meta={...n.meta,[e]:t},n};for(let e of[`required`,`disabled`,`collapse`,`hidden`,`loose`])Object.assign(w.prototype,{[e](t=!0){let n=w(this);return n.meta={...n.meta,[e]:t},n}});w.prototype.deprecated=function(){let e=w(this);return e.meta.badges||=[],e.meta.badges.push({text:`deprecated`,type:`danger`}),e},w.prototype.experimental=function(){let e=w(this);return e.meta.badges||=[],e.meta.badges.push({text:`experimental`,type:`warning`}),e},w.prototype.pattern=function(e){let t=w(this),n=l(e,[`source`,`flags`]);return t.meta={...t.meta,pattern:n},t},w.prototype.simplify=function(e){if(p(e)&&(e=e.get()),y(e,this.meta.default,this.type===`dict`))return null;if(a(e))return e;if(this.type===`object`||this.type===`dict`){let t={};for(let n in e){let r=(this.type===`object`?this.dict[n]:this.inner)?.simplify(e[n]);(this.type===`dict`||!a(r))&&(t[n]=r)}return y(t,this.meta.default,this.type===`dict`)?null:t}if(this.type===`array`||this.type===`tuple`){let t=[];return e.forEach((e,n)=>{let r=this.type===`array`?this.inner:this.list[n],i=r?r.simplify(e):e;t.push(i)}),t}if(this.type===`intersect`){let t={};for(let n of this.list)Object.assign(t,n.simplify(e));return t}if(this.type===`union`)for(let t of this.list)try{return w.resolve(e,t,{}),t.simplify(e)}catch{}return e},w.prototype.toString=function(e){return I[this.type]?.(this,e)??`Schema<${this.type}>`},w.prototype.role=function(e,t){let n=w(this);return n.meta={...n.meta,role:e,extra:t},n};for(let e of[`default`,`link`,`comment`,`description`,`max`,`min`,`step`])Object.assign(w.prototype,{[e](t){let n=w(this);return n.meta={...n.meta,[e]:t},n}});w.prototype.volatile=function(){if(this.meta.volatile)throw TypeError(`volatile schema is already wrapped`);return this.extra(`volatile`,!0)};let O={},k=Symbol(`checked-volatile-schema`);function A(e,t=[],n=!1,r=/* @__PURE__ */ new Map){let i=r.get(e)??/* @__PURE__ */ new Set;if(i.has(n))return;if(i.add(n),r.set(e,i),e.meta?.volatile&&n)throw new C(`volatile fields require a fixed object path without an enclosing volatile field`,{path:t});let a=n||!!e.meta?.volatile;if(e.dict)for(let[n,i]of Object.entries(e.dict))A(i,[...t,n],a,r);if(e.sKey&&A(e.sKey,[...t,`<key>`],!0,r),e.inner&&(e.type!==`lazy`||e.inner[x])&&A(e.inner,[...t,`*`],!0,r),e.list)for(let n=0;n<e.list.length;n++)A(e.list[n],[...t,String(n)],!0,r)}w.extend=function(e,t){O[e]=t},w.resolve=function(e,t,n={},r=!1){if(!t)return[e];if(n[k]||(A(t,n.path),n={...n,[k]:!0}),t.meta?.volatile){let i=w(t);i.meta={...t.meta,volatile:!1};let[a,o]=w.resolve(e,i,n,r);try{return[f(a),o]}catch(e){throw new C(e instanceof Error?e.message:String(e),n)}}if(n.ignore?.(e,t))return[e];if(a(e)&&t.type!==`lazy`){if(t.meta.required)throw new C(`missing required value`,n);let r=t,i=t.meta.default;for(;r?.type===`intersect`&&a(i);)r=r.list[0],i=r?.meta.default;if(a(i))return[e];e=v(i)}let i=O[t.type];if(!i)throw new C(`unsupported type "${t.type}"`,n);try{return i(e,t,n,r)}catch(e){if(!t.meta.loose)throw e;return[t.meta.default]}},w.from=function(e){if(a(e))return w.any();if([`string`,`number`,`boolean`].includes(typeof e))return w.const(e).required();if(e[x])return e;if(typeof e==`function`)switch(e){case String:return w.string().required();case Number:return w.number().required();case Boolean:return w.boolean().required();case Function:return w.function().required();default:return w.is(e).required()}else throw TypeError(`cannot infer schema from ${e}`)},w.lazy=function(e){let t=new w({type:`lazy`,builder:e,inner:{toJSON:()=>(t.inner[x]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),t.inner.toJSON())}});return t},w.natural=function(){return w.number().step(1).min(0)},w.percent=function(){return w.number().step(.01).min(0).max(1).role(`slider`)},w.date=function(){return w.union([w.is(Date),w.transform(w.string().role(`datetime`),(e,t)=>{let n=new Date(e);if(isNaN(+n))throw new C(`invalid date "${e}"`,t);return n},!0)])},w.regExp=function(e=``){return w.union([w.is(RegExp),w.transform(w.string().role(`regexp`,{flag:e}),(t,n)=>{try{return new RegExp(t,e)}catch(e){throw new C(e.message,n)}},!0)])},w.arrayBuffer=function(e){return w.union([w.is(ArrayBuffer),w.is(SharedArrayBuffer),w.transform(w.any(),(e,t)=>{if(_.isSource(e))return _.fromSource(e);throw new C(`expected ArrayBufferSource but got ${e}`,t)},!0),...e?[w.transform(w.string(),(t,n)=>{try{return e===`base64`?_.fromBase64(t):_.fromHex(t)}catch(e){throw new C(e.message,n)}},!0)]:[]])},w.extend(`lazy`,(e,t,n,r)=>(t.inner[x]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta},A(t.inner,n.path,!0)),w.resolve(e,t.inner,n,r))),w.extend(`any`,e=>[e]),w.extend(`never`,(e,t,n)=>{throw new C(`expected nullable but got ${e}`,n)}),w.extend(`const`,(e,{value:t},n)=>{if(y(e,t))return[t];throw new C(`expected ${t} but got ${e}`,n)});function j(e,t,n,r,i=!1){let{max:a=1/0,min:o=-1/0}=t;if(e>a)throw new C(`expected ${n} <= ${a} but got ${e}`,r);if(e<o&&!i)throw new C(`expected ${n} >= ${o} but got ${e}`,r)}w.extend(`string`,(e,{meta:t},n)=>{if(typeof e!=`string`)throw new C(`expected string but got ${e}`,n);if(t.pattern){let r=new RegExp(t.pattern.source,t.pattern.flags);if(!r.test(e))throw new C(`expect string to match regexp ${r}`,n)}return j(e.length,t,`string length`,n),[e]});function M(e,t){let n=e.toString();if(n.includes(`e`))return e*10**t;let r=n.indexOf(`.`);if(r===-1)return e*10**t;let i=n.slice(r+1),a=n.slice(0,r);return i.length<=t?+(a+i.padEnd(t,`0`)):+(a+i.slice(0,t)+`.`+i.slice(t))}function N(e,t,n){if(n=Math.abs(n),!/^\d+\.\d+$/.test(n.toString()))return(e-t)%n===0;let r=n.toString().indexOf(`.`),i=n.toString().slice(r+1).length;return Math.abs(M(e,i)-M(t,i))%M(n,i)===0}w.extend(`number`,(e,{meta:t},n)=>{if(typeof e!=`number`)throw new C(`expected number but got ${e}`,n);j(e,t,`number`,n);let{step:r}=t;if(r&&!N(e,t.min??0,r))throw new C(`expected number multiple of ${r} but got ${e}`,n);return[e]}),w.extend(`boolean`,(e,t,n)=>{if(typeof e==`boolean`)return[e];throw new C(`expected boolean but got ${e}`,n)}),w.extend(`bitset`,(e,{bits:t,meta:n},r)=>{let i=0,a=[];if(typeof e==`number`){i=e;for(let n in t)e&t[n]&&a.push(n)}else if(Array.isArray(e)){a=e;for(let e of a){if(typeof e!=`string`)throw new C(`expected string but got ${e}`,r);e in t&&(i|=t[e])}}else throw new C(`expected number or array but got ${e}`,r);return i===n.default?[i]:[i,a]}),w.extend(`function`,(e,t,n)=>{if(typeof e==`function`)return[e];throw new C(`expected function but got ${e}`,n)}),w.extend(`is`,(e,{constructor:t},n)=>{if(typeof t==`function`){if(e instanceof t)return[e];throw new C(`expected ${t.name} but got ${e}`,n)}{if(a(e))throw new C(`expected ${t} but got ${e}`,n);let r=Object.getPrototypeOf(e);for(;r;){if(r.constructor?.name===t)return[e];r=Object.getPrototypeOf(r)}throw new C(`expected ${t} but got ${e}`,n)}});function P(e,t,n,r){try{let[i,a]=w.resolve(e[t],n,{...r,path:[...r.path||[],t]});return a!==void 0&&(e[t]=a),i}catch(i){if(!r?.autofix)throw i;return delete e[t],n.meta.volatile?f(n.meta.default):n.meta.default}}w.extend(`array`,(e,{inner:t,meta:n},r)=>{if(!Array.isArray(e))throw new C(`expected array but got ${e}`,r);return j(e.length,n,`array length`,r,!a(t.meta.default)),[e.map((n,i)=>P(e,i,t,r))]}),w.extend(`dict`,(e,{inner:t,sKey:n},r,i)=>{if(!o(e))throw new C(`expected object but got ${e}`,r);let a={};for(let o in e){let s;try{s=w.resolve(o,n,r)[0]}catch(e){if(i)continue;throw e}a[s]=P(e,o,t,r),e[s]=e[o],o!==s&&delete e[o]}return[a]}),w.extend(`tuple`,(e,{list:t},n,r)=>{if(!Array.isArray(e))throw new C(`expected array but got ${e}`,n);let i=t.map((t,r)=>P(e,r,t,n));return r||i.push(...e.slice(t.length)),[i]});function F(e,t){for(let n in t)n in e||(e[n]=t[n])}w.extend(`object`,(e,{dict:t},n,r)=>{if(!o(e))throw new C(`expected object but got ${e}`,n);let i={};for(let r in t){let o=P(e,r,t[r],n);(!a(o)||r in e)&&(i[r]=o)}return r||F(i,e),[i]}),w.extend(`union`,(e,{list:t,toString:n},r,i)=>{let a=[];for(let n of t)try{return w.resolve(e,n,r,i)}catch(e){a.push(e)}throw new C(`expected ${n()} but got ${JSON.stringify(e)}`,r)}),w.extend(`intersect`,(e,{list:t,toString:n},r,i)=>{if(!t.length)return[e];let s;for(let i of t){let t=w.resolve(e,i,r,!0)[0];if(!a(t)){if(a(s))s=t;else if(typeof s!=typeof t)throw new C(`expected ${n()} but got ${JSON.stringify(e)}`,r);else if(typeof t==`object`)F(s??={},t);else if(s!==t)throw new C(`expected ${n()} but got ${JSON.stringify(e)}`,r)}}return!i&&o(e)&&F(s,e),[s]}),w.extend(`transform`,(e,{inner:t,callback:n,preserve:r},i)=>{let[a,o=e]=w.resolve(e,t,i,!0);return r?[n(a)]:[n(a),n(o)]});let I={};function L(e,t,n){I[e]=n,Object.assign(w,{[e](...n){let r=new w({type:e});return t.forEach((e,t)=>{switch(e){case`sKey`:r.sKey=n[t]??w.string();break;case`inner`:r.inner=w.from(n[t]);break;case`list`:r.list=n[t].map(w.from);break;case`dict`:r.dict=c(n[t],w.from);break;case`bits`:r.bits={};for(let e in n[t])typeof n[t][e]==`number`&&(r.bits[e]=n[t][e]);break;case`callback`:{let e=r.callback=n[t];e.toJSON||=()=>e.toString();break}case`constructor`:{let e=r.constructor=n[t];typeof e==`function`&&(e.toJSON||=()=>e.name);break}default:r[e]=n[t]}}),e===`object`||e===`dict`?r.meta.default={}:e===`array`||e===`tuple`?r.meta.default=[]:e===`bitset`&&(r.meta.default=0),r}})}L(`is`,[`constructor`],({constructor:e})=>typeof e==`function`?e.name:e),L(`any`,[],()=>`any`),L(`never`,[],()=>`never`),L(`const`,[`value`],({value:e})=>typeof e==`string`?JSON.stringify(e):e),L(`string`,[],()=>`string`),L(`number`,[],()=>`number`),L(`boolean`,[],()=>`boolean`),L(`bitset`,[`bits`],()=>`bitset`),L(`function`,[],()=>`function`),L(`array`,[`inner`],({inner:e})=>`${e.toString(!0)}[]`),L(`dict`,[`inner`,`sKey`],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),L(`tuple`,[`list`],({list:e})=>`[${e.map(e=>e.toString()).join(`, `)}]`),L(`object`,[`dict`],({dict:e})=>Object.keys(e).length===0?`{}`:`{ ${Object.entries(e).map(([e,t])=>`${e}${t.meta.required?``:`?`}: ${t.toString()}`).join(`, `)} }`),L(`union`,[`list`],({list:e},t)=>{let n=e.map(({toString:e})=>e()).join(` | `);return t?`(${n})`:n}),L(`intersect`,[`list`],({list:e})=>`${e.map(e=>e.toString(!0)).join(` & `)}`),L(`transform`,[`inner`,`callback`,`preserve`],({inner:e},t)=>e.toString(t));function R(e,t){return Array.isArray(e)?[...e]:typeof e==`object`&&e?{...e}:/^\d+$/.test(t)?[]:{}}function z(e,t){let n={...e},r=n;for(let e=0;e<t.length-1;e++){let n=t[e],i=R(Array.isArray(r)?r[Number(n)]:r[n],t[e+1]);Array.isArray(r)?r[Number(n)]=i:r[n]=i,r=i}return{result:n,parent:r,leaf:t[t.length-1]}}var B=class extends r.Service{constructor(e){super(e,`settingsSchema`)}rehydrate(e){return new w(e)}validate(e,t){try{e(t);return}catch(e){return e instanceof Error?e.message:String(e)}}nodeAtPath(e,t){let n=e;for(let e of t){if(n===void 0)return;if(n.type===`object`)n=n.dict?.[e];else if(n.type===`dict`||n.type===`array`)n=n.inner;else return}return n}getPath(e,t){let n=e;for(let e of t)if(Array.isArray(n))n=n[Number(e)];else{if(typeof n!=`object`||!n)return;n=n[e]}return n}hasPath(e,t){if(t.length===0)return e!==void 0;let n=this.getPath(e,t.slice(0,-1)),r=t[t.length-1];return Array.isArray(n)?Number(r)<n.length:typeof n!=`object`||!n?!1:r in n}setPath(e,t,n){if(t.length===0)throw Error(`ui-settings: setPath needs a non-empty path`);let{result:r,parent:i,leaf:a}=z(e,t);return Array.isArray(i)?i[Number(a)]=n:i[a]=n,r}deletePath(e,t){if(t.length===0)throw Error(`ui-settings: deletePath needs a non-empty path`);if(!this.hasPath(e,t))return e;let{result:n,parent:r,leaf:i}=z(e,t);return Array.isArray(r)?r.splice(Number(i),1):Reflect.deleteProperty(r,i),n}},V=class{scope;enabled;local=(0,i.createSnapshotStore)(!0);constructor(e){this.scope=e,this.enabled=e.getSnapshot().mode===`memory`?this.local:{getSnapshot:()=>e.getSnapshot().value?.enabled??!1,subscribe:t=>{let n=this.enabled.getSnapshot();return e.subscribe(()=>{let e=this.enabled.getSnapshot();e!==n&&(n=e,t())})}}}async setEnabled(e){if(this.scope.getSnapshot().mode===`memory`)this.local.set(e);else if(!await this.scope.set(`enabled`,e))throw Error(`Developer tools preference was not saved`)}};let H={enabled:w.boolean().default(!0)};w.object(H);let U=/* @__PURE__ */ new Set([`ui-theme`,`locale`,`ui-chat`,`ui-conversation`,`ui-settings`,`ui-workspace`]);function W(e){return U.has(e)}function G(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var K=class{schema;key;constructor(e,t){this.schema=t,this.key=`codexhost.web.preferences.v1:${e}`}read(e){let t;try{let n=JSON.parse(localStorage.getItem(this.key)??`null`);G(n)&&G(n.user)&&Number.isSafeInteger(n.revision)&&n.revision>=0&&this.valid(e,n.user)&&(t=n)}catch{}return t===void 0&&(t={user:G(e.user)?e.user:{},revision:0},this.valid(e,t.user)||(t.user={}),this.save(t)),{...e,...t,value:{...G(e.base)?e.base:{},...t.user}}}write(e,t,n){let r=this.read(e);if(n!==void 0&&n!==r.revision)return!1;let i={...G(r.user)?r.user:{}};for(let e of t){if(e.path.length!==1)return!1;let t=e.path[0];e.op===`set`?i={...i,[t]:e.value}:delete i[t]}return this.valid(e,i)?this.save({user:i,revision:r.revision+1}):!1}valid(e,t){try{return this.schema.validate(this.schema.rehydrate(e.schema),{...G(e.base)?e.base:{},...t})===void 0}catch{return!1}}save(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),!0}catch{return!1}}},q=class{ctx;spec;mirror;persistence;schema;store;tail=Promise.resolve();writeGeneration=0;disposed=!1;unsubscribe;browser;pendingRevision;constructor(e,t,n,r,a){if(this.ctx=e,this.spec=t,this.mirror=n,this.persistence=r,this.schema=a,this.browser=r===`browser`?new K(t.namespace,a):void 0,this.store=(0,i.createSnapshotStore)({status:r===`memory`?`unavailable`:`loading`,value:void 0,base:void 0,user:void 0,revision:void 0,writable:!1,mode:r}),r!==`memory`){let e=t.browserView===void 0?n.subscribe(()=>{this.derive()}):void 0,r=e=>{(e.key===null||e.key===this.browser?.key)&&this.derive()};this.browser!==void 0&&window.addEventListener(`storage`,r),this.unsubscribe=()=>{e?.(),this.browser!==void 0&&window.removeEventListener(`storage`,r)},this.derive()}}getSnapshot(){return this.store.getSnapshot()}subscribe(e){return this.store.subscribe(e)}set(e,t){return this.mutate([{op:`set`,path:[e],value:t}])}unset(e){return this.mutate([{op:`unset`,path:[e]}])}mutate(e,t){let n=structuredClone(e),r=this.browser;if(r!==void 0)return this.enqueue(()=>{let e=this.spec.browserView??this.mirror.namespace(this.spec.namespace),i=e!==void 0&&r.write(e,n,t);return this.derive(),Promise.resolve(i)});let i=++this.writeGeneration;return this.enqueue(async()=>{let e=t??this.pendingRevision??this.getSnapshot().revision,r=await this.ctx.remote.settings.mutate(this.spec.namespace,n,e);return r.ok?(this.disposed||(i===this.writeGeneration?(this.pendingRevision=void 0,this.mirror.acceptView(r.value)):this.pendingRevision=r.value.revision),!0):(await this.recover(i),!1)})}async recover(e){this.disposed||e!==this.writeGeneration||(this.pendingRevision=void 0,await this.mirror.load())}async dispose(){this.disposed=!0,this.writeGeneration+=1,this.unsubscribe?.(),await this.tail}enqueue(e){if(this.persistence===`memory`||this.disposed)return Promise.resolve(!1);let t=this.tail.then(async()=>!this.disposed&&await e());return this.tail=t.then(()=>{},()=>{}),t}derive(){if(this.disposed)return;let e=this.mirror.getSnapshot();if(this.spec.browserView===void 0&&e.view===void 0)return;let t=e.view?.writable??!1,n=this.spec.browserView??this.mirror.namespace(this.spec.namespace);if(n===void 0){this.store.update(e=>{e.status=`unavailable`,e.writable=t});return}let r=this.browser?.read(n)??n,i=this.decode(r);this.store.update(e=>{e.revision=r.revision,e.base=r.base,e.user=r.user,e.writable=this.browser!==void 0||t,i!==void 0&&(e.status=`ready`,e.value=i)})}decode(e){if(this.spec.decode!==void 0)return this.spec.decode(e.value);if(typeof e.value!=`object`||e.value===null||Array.isArray(e.value))return;let t;try{t=this.schema.validate(this.schema.rehydrate(e.schema),e.value)}catch{return}return t===void 0?e.value:void 0}},J=class extends r.Service{forms=/* @__PURE__ */ new Map;developerTools;mirror;schema;persistence;owner;constructor(e,t){super(e,`configForms`),this.mirror=t.mirror,this.schema=t.schema,this.persistence=t.persistence,this.owner=e,this.developerTools=new V(this.get(`ui-settings`)),e.effect(()=>async()=>{await Promise.all([...this.forms.values()].map(e=>e.dispose())),this.forms.clear()},`ui-settings: configuration forms`)}describe(){return this.mirror}get(e){let t=this.forms.get(e);if(t!==void 0)return t;let n=new q(this.owner,{namespace:e},this.mirror,W(e)?`browser`:this.persistence,this.schema);return this.forms.set(e,n),this.mirror.ensure(),n}registerBrowser(e,t,n){if(!W(e))throw Error(`ui-settings: ${e} is not a browser preference namespace`);let r=this.forms.get(e);if(r!==void 0)return r;let i={ns:e,autoGenerate:!1,applies:`live`,secrets:[],schema:t,base:n,user:{},value:n,revision:0},a=new q(this.owner,{namespace:e,browserView:i},this.mirror,`browser`,this.schema);return this.forms.set(e,a),a}whileServed(e,t){let n,r=()=>{let r=new Set(this.mirror.getSnapshot().view?.namespaces.map(e=>e.ns)??[]),i=e.some(e=>r.has(e));i&&n===void 0?n=t(r):!i&&n!==void 0&&(n(),n=void 0)},i=this.mirror.subscribe(r);return this.mirror.ensure(),r(),()=>{i(),n?.(),n=void 0}}},Y=class{ctx;persistence;store;inFlight;rerun=!1;generation=0;constructor(e,t=`host`){this.ctx=e,this.persistence=t,this.store=(0,i.createSnapshotStore)({status:t===`host`?`idle`:`unavailable`,view:void 0,error:null})}getSnapshot(){return this.store.getSnapshot()}subscribe(e){return this.store.subscribe(e)}load(){if(this.persistence===`memory`)return Promise.resolve();if(this.inFlight!==void 0)return this.rerun=!0,this.inFlight;let e=Promise.resolve().then(()=>this.run());return this.inFlight=e,e}ensure(){return this.persistence===`memory`?Promise.resolve():this.inFlight===void 0?this.getSnapshot().status===`idle`?this.load():Promise.resolve():this.inFlight}acceptView(e){let t=this.store.getSnapshot();if(this.generation+=1,this.inFlight!==void 0&&(this.rerun=!0),t.view===void 0)return;let n=t.view.namespaces.some(t=>t.ns===e.ns)?t.view.namespaces.map(t=>t.ns===e.ns?e:t):[...t.view.namespaces,e];this.store.set({...t,view:{...t.view,namespaces:n}})}namespace(e){return this.store.getSnapshot().view?.namespaces.find(t=>t.ns===e)}async run(){try{do{let e=this.store.getSnapshot();e.status===`idle`&&this.store.set({...e,status:`loading`}),this.rerun=!1;let t=++this.generation,n;try{let e=await this.ctx.remote.settings.describe();n=e.ok?{view:e.value}:{failure:e.error.message}}catch(e){n={failure:e instanceof Error?e.message:String(e)}}if(t===this.generation){if(`view`in n)this.store.set({status:`ready`,view:n.view,error:null});else{let e=this.store.getSnapshot();this.store.set({status:e.view===void 0?`idle`:`ready`,view:e.view,error:n.failure})}}}while(this.shouldRerun())}finally{this.inFlight=void 0}}shouldRerun(){return this.rerun}};let X=[`remote`,`remote.settings`];function Z(e){let t=new B(e),n=`host`,r=new Y(e,n);e.effect(()=>{let t=[e.remote.$on(`settings/document-updated`,()=>{r.load()}),e.on(`connection/reset`,()=>{r.load()})];return r.ensure(),()=>{for(let e of t)e()}},`ui-settings: describe mirror invalidations`),new J(e,{mirror:r,schema:t,persistence:n})}return n.apply=Z,n.inject=X,t.exports}});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings-general`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-ui-slots"),i=e("@deepseek-ai/dsh-client-ui-primitives"),a=e("@deepseek-ai/dsh-client-store"),o=e("react"),s=e("react-dom"),c=e("react/jsx-runtime");function l(){return(0,a.defineStore)({init:()=>({open:!1,activeId:void 0}),actions:{open:e=>{e.open=!0},close:e=>{e.open=!1,e.activeId=void 0},select:(e,t)=>{e.activeId=t},openSection:(e,t)=>{e.activeId=t,e.open=!0}}})}function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}let f=`@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(f)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=f,e.textContent=`.f-TuTG_triggerRow{flex:none;align-items:center;gap:8px;width:calc(100% + 4px);margin:4px -2px;display:flex;position:relative}.f-TuTG_triggerRow.f-TuTG_railRow{width:36px;margin:8px 0 10px}.f-TuTG_trigger{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;width:auto;min-width:0;height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;flex:1;align-items:center;gap:8px;margin:0;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.f-TuTG_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_trigger.f-TuTG_rail{flex:none;justify-content:center;gap:0;width:36px;height:36px;margin:0;padding:0}.f-TuTG_triggerLabel{white-space:nowrap;overflow:hidden}.f-TuTG_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.f-TuTG_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute}.f-TuTG_panel{z-index:1;width:1040px;height:min(800px, calc(100vh - 2 * max(24px, var(--dsh-frame-overlay-top,24px))));border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);max-width:calc(100vw - 48px);box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);display:flex;position:relative;overflow:hidden}.f-TuTG_panel:focus{outline:none}.f-TuTG_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.f-TuTG_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.f-TuTG_navList{flex-direction:column;gap:4px;display:flex;overflow-y:auto}.f-TuTG_navCell{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.f-TuTG_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.f-TuTG_navCell.f-TuTG_active{background:var(--dsw-specific-sidebar-nav-item-active)}.f-TuTG_navIcon{flex:none}.f-TuTG_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.f-TuTG_content{flex-direction:column;flex:1;min-width:0;display:flex}.f-TuTG_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.f-TuTG_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.f-TuTG_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.f-TuTG_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}@media (width<=600px){.f-TuTG_panel{max-width:calc(100vw - 24px);height:calc(100dvh - 2 * max(12px, env(safe-area-inset-top), env(safe-area-inset-bottom)));flex-direction:column}.f-TuTG_nav{gap:12px;width:100%;padding:16px 12px 8px}.f-TuTG_navTitle{padding:0 44px 0 4px}.f-TuTG_navList{flex-direction:row;overflow-x:auto}.f-TuTG_navCell{flex:none;height:44px}.f-TuTG_content{min-height:0}.f-TuTG_header{height:auto;padding:0 16px}.f-TuTG_close{width:44px;height:44px;position:absolute;top:6px;right:6px}.f-TuTG_options{padding:0 16px 16px}}.f-TuTG_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}`,document.head.appendChild(e)}var p={actions:`f-TuTG_actions`,active:`f-TuTG_active`,close:`f-TuTG_close`,content:`f-TuTG_content`,header:`f-TuTG_header`,hiddenLabel:`f-TuTG_hiddenLabel`,mask:`f-TuTG_mask`,nav:`f-TuTG_nav`,navCell:`f-TuTG_navCell`,navIcon:`f-TuTG_navIcon`,navLabel:`f-TuTG_navLabel`,navList:`f-TuTG_navList`,navTitle:`f-TuTG_navTitle`,options:`f-TuTG_options`,overlay:`f-TuTG_overlay`,panel:`f-TuTG_panel`,rail:`f-TuTG_rail`,railRow:`f-TuTG_railRow`,trigger:`f-TuTG_trigger`,triggerLabel:`f-TuTG_triggerLabel`,triggerRow:`f-TuTG_triggerRow`};let m=`@deepseek-ai/dsh-client-ui-settings-general/DesktopUpdateIndicator.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(m)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=m,e.textContent=`.NQzlxG_indicator{box-sizing:border-box;border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-brand-primary-new-colorprimary-new-color);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent);text-align:left;white-space:nowrap;cursor:pointer;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;display:inline-grid}.NQzlxG_icon{place-items:center;width:14px;height:14px;display:grid}.NQzlxG_badge{inset-inline-end:2px;corner-shape:round;background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);border-radius:50%;width:6px;height:6px;position:absolute;top:2px}.NQzlxG_errorDot{corner-shape:round;background:currentColor;border-radius:50%;width:6px;height:6px}.NQzlxG_spinner{animation:1s linear infinite NQzlxG_spin}@keyframes NQzlxG_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.NQzlxG_spinner{animation:none}}.NQzlxG_indicator[aria-disabled=true]{cursor:default}`,document.head.appendChild(e)}var h={badge:`NQzlxG_badge`,errorDot:`NQzlxG_errorDot`,icon:`NQzlxG_icon`,indicator:`NQzlxG_indicator`,spin:`NQzlxG_spin`,spinner:`NQzlxG_spinner`};let g=/* @__PURE__ */ new Set([`checking`,`downloading`,`verifying`,`installing`]);function _(e,t){let n={idle:``,checking:t(`desktop.update.checking`),available:t(`desktop.update.available`),downloading:t(`desktop.update.progress`,{percent:e.percent??0}),verifying:t(`desktop.update.verifying`),installing:t(`desktop.update.installing`),ready:t(`desktop.update.ready`),error:t(`desktop.update.retry`)}[e.phase];return e.phase===`checking`||e.phase===`verifying`||e.phase===`installing`?{label:n,detail:e.version??n}:e.phase===`error`?{label:n,detail:{check:t(`desktop.update.checkFailed`),"check-network":t(`desktop.update.checkNetworkFailed`),download:t(`desktop.update.downloadFailed`),"download-network":t(`desktop.update.downloadNetworkFailed`),install:t(`desktop.update.installFailed`),"install-network":t(`desktop.update.installNetworkFailed`),"stop-failed":t(`desktop.update.stopFailed`),"tasks-changed":t(`desktop.update.tasksChanged`),"tasks-unavailable":t(`desktop.update.tasksUnavailable`)}[e.failure??`install`]}:e.phase===`downloading`&&e.version!==void 0?{label:n,detail:t(`desktop.update.downloadDetail`,{percent:e.percent??0,version:e.version})}:{label:n,detail:e.version===void 0?n:t(`desktop.update.versionDetail`,{label:n,version:e.version})}}function v({wide:e,hidden:t,t:n,view:r,onOpen:a}){let{presentation:o,failed:s,opening:l}=r;if(!e||t||!s&&(o===void 0||o.phase===`idle`))return null;let u=n(`desktop.update.retry`),d=o===void 0?{label:u,detail:u}:_(o,n),f=s?u:d.label,p=s||o?.phase===`error`,m=l||o!==void 0&&g.has(o.phase);return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:s?u:d.detail,side:`top`,children:/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:h.indicator,"aria-label":f,"aria-disabled":m,onClick:()=>{m||a()},children:[/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.icon,"aria-hidden":`true`,children:p?/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.errorDot}):m?/* @__PURE__ */ (0,c.jsx)(i.IconLoadingOutlineRegular,{className:h.spinner,size:14}):/* @__PURE__ */ (0,c.jsx)(i.IconDownloadOutlineRegular,{size:14})}),/* @__PURE__ */ (0,c.jsx)(`span`,{children:f})]})})}function y({useDesktopUpdate:e,useConnectionState:t,t:n}){let{presentation:r,failed:a}=e(e=>e),o=t(e=>e);if((o===`disconnected`||o===`connecting`)&&r?.phase!==`installing`||!a&&(r===void 0||r.phase===`idle`))return null;let s=n(`desktop.update.retry`),l=r===void 0?{label:s,detail:s}:_(r,n),u=a?s:l.label;return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:a?u:l.detail,side:`right`,children:/* @__PURE__ */ (0,c.jsx)(`span`,{role:`img`,"aria-label":u,className:h.badge})})}function b(e){return e===`account`||e===`codexhost-accounts`?/* @__PURE__ */ (0,c.jsx)(i.IconUserOutlineMedium,{className:p.navIcon,size:16}):e===`models`||e===`codexhost-usage-statistics`?/* @__PURE__ */ (0,c.jsx)(i.IconDataOutlineMedium,{className:p.navIcon,size:16}):e===`agent-presets`?/* @__PURE__ */ (0,c.jsx)(i.IconAgentPresetOutlineMedium,{className:p.navIcon,size:16}):e===`plugins`||e===`codexhost-connections`?/* @__PURE__ */ (0,c.jsx)(i.IconPersonalizationOutlineMedium,{className:p.navIcon,size:16}):e===`archived-sessions`?/* @__PURE__ */ (0,c.jsx)(i.IconArchiveOutlineMedium,{className:p.navIcon,size:16}):/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{className:p.navIcon,size:16})}function x({rows:e,renderSlot:t,activeId:n,onSelect:r,onClose:a}){let l=e.find(e=>e.id===n)?.id??e[0]?.id,u=(0,o.useId)(),f=(0,o.useRef)(null);return(0,i.useModalLayer)(f,!0,a),(0,s.createPortal)(/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.overlay,role:`presentation`,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.mask,"aria-hidden":`true`,onClick:a}),/* @__PURE__ */ (0,c.jsxs)(`div`,{ref:f,tabIndex:-1,"data-shortcut-modal":`settings`,className:p.panel,role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,children:[/* @__PURE__ */ (0,c.jsxs)(`nav`,{className:p.nav,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navTitle,id:u,tabIndex:-1,"data-modal-autofocus":l===void 0?``:void 0,children:t(`settings.header`,{})}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navList,children:e.map(e=>/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:d(p.navCell,e.id===l&&p.active),"aria-current":e.id===l?`true`:void 0,"data-modal-autofocus":e.id===l?``:void 0,onClick:()=>{r(e.id)},children:[b(e.id),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.navLabel,children:e.label})]},e.id))})]}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.content,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.header,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.actions,children:t(`settings.action`,{})}),/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:p.close,onClick:a,children:[/* @__PURE__ */ (0,c.jsx)(i.IconCloseOutlineRegular,{size:14}),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.hiddenLabel,children:t(`settings.close`,{})})]})]}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.options,children:l!==void 0&&t(`settings.section`,{close:a},{only:l})})]})]})]}),document.body)}function S(e){let{wide:t,reconnect:n,useConnectionState:r,useSections:a,useOnboardingSteps:s,useSessions:l,renderSlot:u,t:f,useDesktopUpdate:m,openDesktopUpdate:h,useStore:g,actions:_,useShortcuts:y}=e,{open:b,activeId:S}=g(e=>e),C=y(e=>e.find(e=>e.id===`settings.open`)),{close:w,openSection:T}=_;(0,o.useEffect)(()=>{if(window.location.hash!==`#connect-devices`)return;T(`codexhost-connect-devices`);let e=new URL(window.location.href);e.hash=``,window.history.replaceState(window.history.state,``,e.href)},[T]);let[E,D]=(0,o.useState)(),[O,k]=(0,o.useState)(()=>/* @__PURE__ */ new Set),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),P=(0,o.useRef)(void 0),F=a(e=>e),I=m(e=>e),L=r(e=>e),R=(0,o.useRef)(L),z=s(e=>e),B=l(e=>{let t=Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0);return e.phase===`ready`&&(t===void 0||t.blank)}),V=E===void 0?B?z.find(e=>!O.has(e.id)):void 0:z.find(e=>e.id===E);(0,o.useEffect)(()=>{B||k(/* @__PURE__ */ new Set)},[B]);let H=(0,o.useRef)(V);(0,o.useEffect)(()=>{let e=H.current===void 0&&V!==void 0;H.current=V,e&&b&&w()},[V,b,w]),(0,o.useLayoutEffect)(()=>{let e=R.current;R.current=L,L===`connected`?(e===`disconnected`||e===`connecting`)&&j(!0):j(!1)},[L]),(0,o.useLayoutEffect)(()=>{if(!A||M)return;let e=window.setTimeout(()=>{j(!1)},2e3);return()=>{window.clearTimeout(e)}},[A,M]),(0,o.useLayoutEffect)(()=>{if(L===`connecting`){P.current=Date.now();return}let e=P.current;if(e===void 0)return;P.current=void 0;let t=800-(Date.now()-e);if(t<=0)return;N(!0);let n=window.setTimeout(()=>{N(!1)},t);return()=>{window.clearTimeout(n),N(!1)}},[L]);let U=(0,o.useCallback)(e=>{D(void 0),k(t=>t.has(e)?t:/* @__PURE__ */ new Set([...t,e]))},[]),W;return L===`connecting`||M?W=`connecting`:L===`disconnected`?W=`disconnected`:A&&(W=`recovered`),/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:d(p.triggerRow,!t&&p.railRow),children:[u(`settings.launcher`,{wide:t,settingsOpen:b,openSettings:_.open,...C?.keys.length?{settingsShortcut:{keys:C.keys,aria:C.aria}}:{},openOnboarding:e=>{w(),D(e)}},{fallback:/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{disabled:b,label:f(`trigger`),shortcutKeys:C?.keys,children:/* @__PURE__ */ (0,c.jsx)(`button`,{type:`button`,className:d(p.trigger,!t&&p.rail),"aria-label":f(`trigger`),"aria-keyshortcuts":C?.aria,"aria-haspopup":`dialog`,"aria-expanded":b,onClick:()=>{_.open()},children:u(`settings.trigger`,{wide:t})})})}),/* @__PURE__ */ (0,c.jsx)(i.ConnectionIndicator,{state:t&&I.presentation?.phase!==`installing`?W:void 0,disconnectedLabel:f(`connection.error`),connectingLabel:f(`connection.connecting`),recoveredLabel:f(`connection.connected`),reconnectActionLabel:f(`connection.reconnect`),restartActionLabel:f(`connection.restart`),onReconnect:n}),/* @__PURE__ */ (0,c.jsx)(v,{wide:t,hidden:W!==void 0&&I.presentation?.phase!==`installing`,t:f,view:I,onOpen:h})]}),b&&/* @__PURE__ */ (0,c.jsx)(x,{rows:F,renderSlot:u,activeId:S,onSelect:_.select,onClose:w}),V!==void 0&&u(`settings.onboarding`,{stepId:V.id,explicit:E!==void 0,complete:()=>{U(V.id)},openSection:T},{only:V.id})]})}var C=class{bridge;store=(0,a.createSnapshotStore)({failed:!1,opening:!1});live=!0;received=!1;unsubscribe;constructor(e){this.bridge=e,this.unsubscribe=e?.subscribe(e=>{this.live&&(this.received=!0,this.store.set({...this.store.getSnapshot(),presentation:e,failed:!1}))}),e?.status().then(e=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),presentation:e})},()=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),failed:!0})})}open(){if(!this.live||this.bridge===void 0)return;let e=this.store.getSnapshot();e.opening||e.presentation!==void 0&&[`checking`,`downloading`,`verifying`,`installing`].includes(e.presentation.phase)||(this.store.set({...e,opening:!0}),this.bridge.open().catch(()=>{this.live&&this.store.set({...this.store.getSnapshot(),failed:!0})}).finally(()=>{this.live&&this.store.set({...this.store.getSnapshot(),opening:!1})}))}dispose(){this.live=!1,this.unsubscribe?.()}};let w=`@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(w)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=w,e.textContent=`.JK2ZxG_triggerLabel{white-space:nowrap;overflow:hidden}`,document.head.appendChild(e)}var T={triggerLabel:`JK2ZxG_triggerLabel`};function E({wide:e,t}){return/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{size:e?16:18}),e&&/* @__PURE__ */ (0,c.jsx)(`span`,{className:T.triggerLabel,children:t(`trigger`)})]})}function D({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`title`)})}function O({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`close`)})}let k=`@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(k)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=k,e.textContent=`.GkoitG_section{flex-direction:column;width:100%;display:flex}.GkoitG_heading{margin-bottom:28px}.GkoitG_title{color:var(--dsw-alias-label-primary);letter-spacing:-.5px;margin:0;font-size:24px;font-weight:600;line-height:32px}.GkoitG_description{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.GkoitG_group+.GkoitG_group{margin-top:28px}.GkoitG_groupTitle{color:var(--dsw-alias-label-primary);margin:0 0 10px;font-size:13px;font-weight:600;line-height:20px}.GkoitG_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px}.GkoitG_item{min-width:0;margin:0 20px}.GkoitG_item+.GkoitG_item{border-top:1px solid var(--dsw-alias-border-l1)}.GkoitG_item>[data-slot="settings.general.item"]>*{border-bottom:none}.GkoitG_footer{margin-top:8px}@media (width<=600px){.GkoitG_heading{margin-bottom:24px}.GkoitG_group+.GkoitG_group{margin-top:24px}.GkoitG_item{margin:0 12px}}`,document.head.appendChild(e)}var A={card:`GkoitG_card`,description:`GkoitG_description`,footer:`GkoitG_footer`,group:`GkoitG_group`,groupTitle:`GkoitG_groupTitle`,heading:`GkoitG_heading`,item:`GkoitG_item`,section:`GkoitG_section`,title:`GkoitG_title`};let j=[{title:`general.display`,items:[`language`,`appearance`,`font-size`]},{title:`general.interaction`,items:[`transcript-view`,`developer-tools`,`shortcuts`,`link-opening`,`composer-enter`]},{title:`general.notifications`,items:[`codexhost.notifications`]}],M=new Set(j.flatMap(e=>e.items));function N({renderSlot:e,t,useItems:n}){let r=(0,o.useId)(),i=n(e=>e),a=j.map(e=>({title:e.title,items:i.filter(t=>e.items.includes(t))}));return a.push({title:`general.other`,items:i.filter(e=>e!==`current-version`&&!M.has(e))}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:A.section,children:[/* @__PURE__ */ (0,c.jsxs)(`header`,{className:A.heading,children:[/* @__PURE__ */ (0,c.jsx)(`h2`,{className:A.title,children:t(`general.nav`)}),/* @__PURE__ */ (0,c.jsx)(`p`,{className:A.description,children:t(`general.description`)})]}),a.filter(e=>e.items.length>0).map(n=>/* @__PURE__ */ (0,c.jsxs)(`section`,{className:A.group,"aria-labelledby":`${r}-${n.title}`,children:[/* @__PURE__ */ (0,c.jsx)(`h3`,{className:A.groupTitle,id:`${r}-${n.title}`,children:t(n.title)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.card,children:n.items.map(t=>/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.item,children:e(`settings.general.item`,{},{only:t})},t))})]},n.title)),i.includes(`current-version`)&&/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.footer,children:e(`settings.general.item`,{},{only:`current-version`})})]})}let P=`@deepseek-ai/dsh-client-ui-settings-general/CurrentVersionRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(P)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=P,e.textContent=`.Ve8J0W_row{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;padding:16px 0;font-size:14px;line-height:22px}`,document.head.appendChild(e)}var F={row:`Ve8J0W_row`};function I({t:e}){let t={}.DSH_CLIENT_VERSION;return t===void 0?null:/* @__PURE__ */ (0,c.jsx)(`div`,{className:F.row,children:e(`general.currentVersion`,{version:t})})}let L=`@deepseek-ai/dsh-client-ui-settings-general/DeveloperToolsRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(L)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=L,e.textContent=`.OciNza_row{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:24px;padding:16px 0;display:flex}.OciNza_title{font-size:14px;line-height:20px}.OciNza_description{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px;line-height:18px}`,document.head.appendChild(e)}var R={description:`OciNza_description`,row:`OciNza_row`,title:`OciNza_title`};function z({useDeveloperTools:e,setEnabled:t,t:n}){let r=e(e=>e),[a,s]=(0,o.useState)(!1),[l,u]=(0,o.useState)(!1);return/* @__PURE__ */ (0,c.jsxs)(`div`,{className:R.row,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.title,children:n(`developerTools.title`)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.description,children:n(`developerTools.description`)}),l&&/* @__PURE__ */ (0,c.jsx)(`div`,{role:`alert`,children:n(`developerTools.error`)})]}),/* @__PURE__ */ (0,c.jsx)(i.Switch,{checked:r,disabled:a,label:n(`developerTools.title`),onChange:e=>{u(!1),s(!0),t(e).catch(()=>{u(!0)}).finally(()=>{s(!1)})}})]})}let B=`@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(B)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=B,e.textContent=`.cOdd9G_action{align-items:center;gap:8px;min-width:0;display:flex}.cOdd9G_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}`,document.head.appendChild(e)}var V={action:`cOdd9G_action`,error:`cOdd9G_error`};function H({controller:e,useSnapshot:t,t:n}){let r=t(e=>e);return(0,o.useEffect)(()=>{e.load()},[e]),r.status===`ready`?/* @__PURE__ */ (0,c.jsxs)(`div`,{className:V.action,children:[r.error===null?null:/* @__PURE__ */ (0,c.jsx)(`span`,{className:V.error,role:`alert`,children:n(`openDocument.error`)}),/* @__PURE__ */ (0,c.jsx)(i.Button,{variant:`outline`,size:`sm`,disabled:r.opening,onClick:()=>{e.open()},children:n(`openDocument`)})]}):null}var U=class{ctx;describeFace;store=(0,a.createSnapshotStore)({status:`idle`,opening:!1,error:null});following;constructor(e,t){this.ctx=e,this.describeFace=t}async load(){this.following??=this.describeFace.subscribe(()=>{this.derive()}),this.store.update(e=>{e.status=`loading`,e.error=null}),await this.describeFace.ensure(),this.derive()}async open(){let e=this.store.getSnapshot();if(!(e.status!==`ready`||e.opening)){this.store.update(e=>{e.opening=!0,e.error=null});try{let e=await this.ctx.remote.settings.openSettingsDocument();if(!e.ok){let{message:t}=e.error;this.store.update(e=>{e.error=t})}}finally{this.store.update(e=>{e.opening=!1})}}}dispose(){this.following?.(),this.following=void 0}derive(){let e=this.describeFace.getSnapshot();if(e.view===void 0){e.error!==null&&this.store.update(t=>{t.status=`unavailable`,t.error=e.error});return}let{hasDocument:t}=e.view;this.store.update(e=>{e.status=t?`ready`:`unavailable`,e.error=null})}};let W={trigger:`设置`,"shortcut.open":`打开设置`,"desktop.update.available":`新版本`,"desktop.update.checking":`正在检查更新…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`正在校验更新文件…`,"desktop.update.installing":`正在准备重启…`,"desktop.update.ready":`安装并重启`,"desktop.update.retry":`重试更新`,"desktop.update.versionDetail":`{label}:{version}`,"desktop.update.downloadDetail":`正在下载更新:{percent}%
|
|
1
|
+
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-settings-general`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-ui-slots"),i=e("@deepseek-ai/dsh-client-ui-primitives"),a=e("@deepseek-ai/dsh-client-store"),o=e("react"),s=e("react-dom"),c=e("react/jsx-runtime");function l(){return(0,a.defineStore)({init:()=>({open:!1,activeId:void 0}),actions:{open:e=>{e.open=!0},close:e=>{e.open=!1,e.activeId=void 0},select:(e,t)=>{e.activeId=t},openSection:(e,t)=>{e.activeId=t,e.open=!0}}})}function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}let f=`@deepseek-ai/dsh-client-ui-settings-general/SettingsRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(f)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=f,e.textContent=`.f-TuTG_triggerRow{flex:none;align-items:center;gap:8px;width:calc(100% + 4px);margin:4px -2px;display:flex;position:relative}.f-TuTG_triggerRow.f-TuTG_railRow{width:36px;margin:8px 0 10px}.f-TuTG_trigger{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;width:auto;min-width:0;height:42px;color:var(--dsw-alias-label-primary);background:0 0;border:none;flex:1;align-items:center;gap:8px;margin:0;padding:0 10px 0 8px;font-family:inherit;font-size:14px;line-height:22px;display:flex;overflow:hidden}.f-TuTG_trigger:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_trigger.f-TuTG_rail{flex:none;justify-content:center;gap:0;width:36px;height:36px;margin:0;padding:0}.f-TuTG_triggerLabel{white-space:nowrap;overflow:hidden}.f-TuTG_overlay{z-index:1000;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.f-TuTG_mask{inset:var(--dsh-frame-chrome-top,0px) 0 0;background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);position:absolute}.f-TuTG_panel{z-index:1;width:1040px;height:min(800px, calc(100vh - 2 * max(24px, var(--dsh-frame-overlay-top,24px))));border-radius:var(--dsw-radius-panel);background:var(--dsw-alias-bg-layer-2);max-width:calc(100vw - 48px);box-shadow:var(--dsw-elevation-prominent);--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);display:flex;position:relative;overflow:hidden}.f-TuTG_panel:focus{outline:none}.f-TuTG_nav{box-sizing:border-box;flex-direction:column;flex:none;gap:18px;width:188px;padding:22px 12px 0;display:flex}.f-TuTG_navTitle{color:var(--dsw-alias-label-primary);padding:0 12px;font-size:16px;font-weight:500;line-height:24px}.f-TuTG_navList{flex-direction:column;gap:4px;display:flex;overflow-y:auto}.f-TuTG_navCell{box-sizing:border-box;border-radius:var(--dsw-radius-md);cursor:pointer;height:40px;color:var(--dsw-alias-label-primary);text-align:left;background:0 0;border:none;align-items:center;gap:8px;padding:9px 16px 9px 12px;font-family:inherit;font-size:14px;font-weight:400;line-height:22px;display:flex}.f-TuTG_navCell:hover{background:var(--dsw-specific-sidebar-nav-item-hover)}.f-TuTG_navCell.f-TuTG_active{background:var(--dsw-specific-sidebar-nav-item-active)}.f-TuTG_navIcon{flex:none}.f-TuTG_navLabel{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;overflow:hidden}.f-TuTG_content{flex-direction:column;flex:1;min-width:0;display:flex}.f-TuTG_header{box-sizing:border-box;flex:none;justify-content:space-between;align-items:flex-start;gap:8px;height:54px;padding:20px 14px 8px 10px;display:flex}.f-TuTG_actions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}.f-TuTG_close{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-primary);background:0 0;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.f-TuTG_close:hover{background:var(--dsw-alias-interactive-bg-hover)}.f-TuTG_options{flex:1;min-height:0;padding:0 24px 24px;overflow-y:auto}@media (width<=600px){.f-TuTG_panel{max-width:calc(100vw - 24px);height:calc(100dvh - 2 * max(12px, env(safe-area-inset-top), env(safe-area-inset-bottom)));flex-direction:column}.f-TuTG_nav{gap:12px;width:100%;padding:16px 12px 8px}.f-TuTG_navTitle{padding:0 44px 0 4px}.f-TuTG_navList{flex-direction:row;overflow-x:auto}.f-TuTG_navCell{flex:none;height:44px}.f-TuTG_content{min-height:0}.f-TuTG_header{height:auto;padding:0 16px}.f-TuTG_close{width:44px;height:44px;position:absolute;top:6px;right:6px}.f-TuTG_options{padding:0 16px 16px}}.f-TuTG_hiddenLabel{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}`,document.head.appendChild(e)}var p={actions:`f-TuTG_actions`,active:`f-TuTG_active`,close:`f-TuTG_close`,content:`f-TuTG_content`,header:`f-TuTG_header`,hiddenLabel:`f-TuTG_hiddenLabel`,mask:`f-TuTG_mask`,nav:`f-TuTG_nav`,navCell:`f-TuTG_navCell`,navIcon:`f-TuTG_navIcon`,navLabel:`f-TuTG_navLabel`,navList:`f-TuTG_navList`,navTitle:`f-TuTG_navTitle`,options:`f-TuTG_options`,overlay:`f-TuTG_overlay`,panel:`f-TuTG_panel`,rail:`f-TuTG_rail`,railRow:`f-TuTG_railRow`,trigger:`f-TuTG_trigger`,triggerLabel:`f-TuTG_triggerLabel`,triggerRow:`f-TuTG_triggerRow`};let m=`@deepseek-ai/dsh-client-ui-settings-general/DesktopUpdateIndicator.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(m)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=m,e.textContent=`.NQzlxG_indicator{box-sizing:border-box;border:1px solid color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 20%, transparent);border-radius:var(--dsw-radius-sm);height:28px;color:var(--dsw-alias-brand-primary-new-colorprimary-new-color);background:color-mix(in srgb, var(--dsw-alias-brand-primary-new-colorprimary-new-color) 8%, transparent);text-align:left;white-space:nowrap;cursor:pointer;flex:none;grid-template-columns:14px max-content;align-items:center;column-gap:4px;padding:0 8px;font-family:inherit;font-size:12px;font-weight:500;line-height:18px;display:inline-grid}.NQzlxG_icon{place-items:center;width:14px;height:14px;display:grid}.NQzlxG_badge{inset-inline-end:2px;corner-shape:round;background:var(--dsw-alias-brand-primary-new-colorprimary-new-color);border-radius:50%;width:6px;height:6px;position:absolute;top:2px}.NQzlxG_errorDot{corner-shape:round;background:currentColor;border-radius:50%;width:6px;height:6px}.NQzlxG_spinner{animation:1s linear infinite NQzlxG_spin}@keyframes NQzlxG_spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.NQzlxG_spinner{animation:none}}.NQzlxG_indicator[aria-disabled=true]{cursor:default}`,document.head.appendChild(e)}var h={badge:`NQzlxG_badge`,errorDot:`NQzlxG_errorDot`,icon:`NQzlxG_icon`,indicator:`NQzlxG_indicator`,spin:`NQzlxG_spin`,spinner:`NQzlxG_spinner`};let g=/* @__PURE__ */ new Set([`checking`,`downloading`,`verifying`,`installing`]);function _(e,t){let n={idle:``,checking:t(`desktop.update.checking`),available:t(`desktop.update.available`),downloading:t(`desktop.update.progress`,{percent:e.percent??0}),verifying:t(`desktop.update.verifying`),installing:t(`desktop.update.installing`),ready:t(`desktop.update.ready`),error:t(`desktop.update.retry`)}[e.phase];return e.phase===`checking`||e.phase===`verifying`||e.phase===`installing`?{label:n,detail:e.version??n}:e.phase===`error`?{label:n,detail:{check:t(`desktop.update.checkFailed`),"check-network":t(`desktop.update.checkNetworkFailed`),download:t(`desktop.update.downloadFailed`),"download-network":t(`desktop.update.downloadNetworkFailed`),install:t(`desktop.update.installFailed`),"install-network":t(`desktop.update.installNetworkFailed`),"stop-failed":t(`desktop.update.stopFailed`),"tasks-changed":t(`desktop.update.tasksChanged`),"tasks-unavailable":t(`desktop.update.tasksUnavailable`)}[e.failure??`install`]}:e.phase===`downloading`&&e.version!==void 0?{label:n,detail:t(`desktop.update.downloadDetail`,{percent:e.percent??0,version:e.version})}:{label:n,detail:e.version===void 0?n:t(`desktop.update.versionDetail`,{label:n,version:e.version})}}function v({wide:e,hidden:t,t:n,view:r,onOpen:a}){let{presentation:o,failed:s,opening:l}=r;if(!e||t||!s&&(o===void 0||o.phase===`idle`))return null;let u=n(`desktop.update.retry`),d=o===void 0?{label:u,detail:u}:_(o,n),f=s?u:d.label,p=s||o?.phase===`error`,m=l||o!==void 0&&g.has(o.phase);return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:s?u:d.detail,side:`top`,children:/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:h.indicator,"aria-label":f,"aria-disabled":m,onClick:()=>{m||a()},children:[/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.icon,"aria-hidden":`true`,children:p?/* @__PURE__ */ (0,c.jsx)(`span`,{className:h.errorDot}):m?/* @__PURE__ */ (0,c.jsx)(i.IconLoadingOutlineRegular,{className:h.spinner,size:14}):/* @__PURE__ */ (0,c.jsx)(i.IconDownloadOutlineRegular,{size:14})}),/* @__PURE__ */ (0,c.jsx)(`span`,{children:f})]})})}function y({useDesktopUpdate:e,useConnectionState:t,t:n}){let{presentation:r,failed:a}=e(e=>e),o=t(e=>e);if((o===`disconnected`||o===`connecting`)&&r?.phase!==`installing`||!a&&(r===void 0||r.phase===`idle`))return null;let s=n(`desktop.update.retry`),l=r===void 0?{label:s,detail:s}:_(r,n),u=a?s:l.label;return/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{label:a?u:l.detail,side:`right`,children:/* @__PURE__ */ (0,c.jsx)(`span`,{role:`img`,"aria-label":u,className:h.badge})})}function b(e){return e===`account`||e===`codexhost-accounts`?/* @__PURE__ */ (0,c.jsx)(i.IconUserOutlineMedium,{className:p.navIcon,size:16}):e===`models`||e===`codexhost-usage-statistics`?/* @__PURE__ */ (0,c.jsx)(i.IconDataOutlineMedium,{className:p.navIcon,size:16}):e===`agent-presets`?/* @__PURE__ */ (0,c.jsx)(i.IconAgentPresetOutlineMedium,{className:p.navIcon,size:16}):e===`plugins`||e===`codexhost-connections`?/* @__PURE__ */ (0,c.jsx)(i.IconPersonalizationOutlineMedium,{className:p.navIcon,size:16}):e===`archived-sessions`?/* @__PURE__ */ (0,c.jsx)(i.IconArchiveOutlineMedium,{className:p.navIcon,size:16}):/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{className:p.navIcon,size:16})}function x({rows:e,renderSlot:t,activeId:n,onSelect:r,onClose:a}){let l=e.find(e=>e.id===n)?.id??e[0]?.id,u=(0,o.useId)(),f=(0,o.useRef)(null);return(0,i.useModalLayer)(f,!0,a),(0,s.createPortal)(/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.overlay,role:`presentation`,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.mask,"aria-hidden":`true`,onClick:a}),/* @__PURE__ */ (0,c.jsxs)(`div`,{ref:f,tabIndex:-1,"data-shortcut-modal":`settings`,className:p.panel,role:`dialog`,"aria-modal":`true`,"aria-labelledby":u,children:[/* @__PURE__ */ (0,c.jsxs)(`nav`,{className:p.nav,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navTitle,id:u,tabIndex:-1,"data-modal-autofocus":l===void 0?``:void 0,children:t(`settings.header`,{})}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.navList,children:e.map(e=>/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:d(p.navCell,e.id===l&&p.active),"aria-current":e.id===l?`true`:void 0,"data-modal-autofocus":e.id===l?``:void 0,onClick:()=>{r(e.id)},children:[b(e.id),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.navLabel,children:e.label})]},e.id))})]}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.content,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:p.header,children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.actions,children:t(`settings.action`,{})}),/* @__PURE__ */ (0,c.jsxs)(`button`,{type:`button`,className:p.close,onClick:a,children:[/* @__PURE__ */ (0,c.jsx)(i.IconCloseOutlineRegular,{size:14}),/* @__PURE__ */ (0,c.jsx)(`span`,{className:p.hiddenLabel,children:t(`settings.close`,{})})]})]}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:p.options,children:l!==void 0&&t(`settings.section`,{close:a},{only:l})})]})]})]}),document.body)}function S(e){let{wide:t,reconnect:n,useConnectionState:r,useSections:a,useOnboardingSteps:s,useSessions:l,renderSlot:u,t:f,useDesktopUpdate:m,openDesktopUpdate:h,useStore:g,actions:_,useShortcuts:y}=e,{open:b,activeId:S}=g(e=>e),C=y(e=>e.find(e=>e.id===`settings.open`)),{close:w,openSection:T}=_;(0,o.useEffect)(()=>{if(window.location.hash!==`#connect-devices`)return;T(`codexhost-connect-devices`);let e=new URL(window.location.href);e.hash=``,window.history.replaceState(window.history.state,``,e.href)},[T]);let[E,D]=(0,o.useState)(),[O,k]=(0,o.useState)(()=>/* @__PURE__ */ new Set),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),P=(0,o.useRef)(void 0),F=a(e=>e),I=m(e=>e),L=r(e=>e),R=(0,o.useRef)(L),z=s(e=>e),B=l(e=>{let t=Object.values(e.byId).find(e=>(e.retainedBy.mainView??0)>0);return e.phase===`ready`&&(t===void 0||t.blank)}),V=E===void 0?B?z.find(e=>!O.has(e.id)):void 0:z.find(e=>e.id===E);(0,o.useEffect)(()=>{B||k(/* @__PURE__ */ new Set)},[B]);let H=(0,o.useRef)(V);(0,o.useEffect)(()=>{let e=H.current===void 0&&V!==void 0;H.current=V,e&&b&&w()},[V,b,w]),(0,o.useLayoutEffect)(()=>{let e=R.current;R.current=L,L===`connected`?(e===`disconnected`||e===`connecting`)&&j(!0):j(!1)},[L]),(0,o.useLayoutEffect)(()=>{if(!A||M)return;let e=window.setTimeout(()=>{j(!1)},2e3);return()=>{window.clearTimeout(e)}},[A,M]),(0,o.useLayoutEffect)(()=>{if(L===`connecting`){P.current=Date.now();return}let e=P.current;if(e===void 0)return;P.current=void 0;let t=800-(Date.now()-e);if(t<=0)return;N(!0);let n=window.setTimeout(()=>{N(!1)},t);return()=>{window.clearTimeout(n),N(!1)}},[L]);let U=(0,o.useCallback)(e=>{D(void 0),k(t=>t.has(e)?t:/* @__PURE__ */ new Set([...t,e]))},[]),W;return L===`connecting`||M?W=`connecting`:L===`disconnected`?W=`disconnected`:A&&(W=`recovered`),/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{className:d(p.triggerRow,!t&&p.railRow),children:[u(`settings.launcher`,{wide:t,settingsOpen:b,openSettings:_.open,...C?.keys.length?{settingsShortcut:{keys:C.keys,aria:C.aria}}:{},openOnboarding:e=>{w(),D(e)}},{fallback:/* @__PURE__ */ (0,c.jsx)(i.Tooltip,{disabled:b,label:f(`trigger`),shortcutKeys:C?.keys,children:/* @__PURE__ */ (0,c.jsx)(`button`,{type:`button`,className:d(p.trigger,!t&&p.rail),"aria-label":f(`trigger`),"aria-keyshortcuts":C?.aria,"aria-haspopup":`dialog`,"aria-expanded":b,onClick:()=>{_.open()},children:u(`settings.trigger`,{wide:t})})})}),/* @__PURE__ */ (0,c.jsx)(i.ConnectionIndicator,{state:t&&I.presentation?.phase!==`installing`?W:void 0,disconnectedLabel:f(`connection.error`),connectingLabel:f(`connection.connecting`),recoveredLabel:f(`connection.connected`),reconnectActionLabel:f(`connection.reconnect`),restartActionLabel:f(`connection.restart`),onReconnect:n}),/* @__PURE__ */ (0,c.jsx)(v,{wide:t,hidden:W!==void 0&&I.presentation?.phase!==`installing`,t:f,view:I,onOpen:h})]}),b&&/* @__PURE__ */ (0,c.jsx)(x,{rows:F,renderSlot:u,activeId:S,onSelect:_.select,onClose:w}),V!==void 0&&u(`settings.onboarding`,{stepId:V.id,explicit:E!==void 0,complete:()=>{U(V.id)},openSection:T},{only:V.id})]})}var C=class{bridge;store=(0,a.createSnapshotStore)({failed:!1,opening:!1});live=!0;received=!1;unsubscribe;constructor(e){this.bridge=e,this.unsubscribe=e?.subscribe(e=>{this.live&&(this.received=!0,this.store.set({...this.store.getSnapshot(),presentation:e,failed:!1}))}),e?.status().then(e=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),presentation:e})},()=>{this.live&&!this.received&&this.store.set({...this.store.getSnapshot(),failed:!0})})}open(){if(!this.live||this.bridge===void 0)return;let e=this.store.getSnapshot();e.opening||e.presentation!==void 0&&[`checking`,`downloading`,`verifying`,`installing`].includes(e.presentation.phase)||(this.store.set({...e,opening:!0}),this.bridge.open().catch(()=>{this.live&&this.store.set({...this.store.getSnapshot(),failed:!0})}).finally(()=>{this.live&&this.store.set({...this.store.getSnapshot(),opening:!1})}))}dispose(){this.live=!1,this.unsubscribe?.()}};let w=`@deepseek-ai/dsh-client-ui-settings-general/chrome.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(w)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=w,e.textContent=`.JK2ZxG_triggerLabel{white-space:nowrap;overflow:hidden}`,document.head.appendChild(e)}var T={triggerLabel:`JK2ZxG_triggerLabel`};function E({wide:e,t}){return/* @__PURE__ */ (0,c.jsxs)(c.Fragment,{children:[/* @__PURE__ */ (0,c.jsx)(i.IconSettingsOutlineMedium,{size:e?16:18}),e&&/* @__PURE__ */ (0,c.jsx)(`span`,{className:T.triggerLabel,children:t(`trigger`)})]})}function D({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`title`)})}function O({t:e}){return/* @__PURE__ */ (0,c.jsx)(c.Fragment,{children:e(`close`)})}let k=`@deepseek-ai/dsh-client-ui-settings-general/GeneralSection.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(k)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=k,e.textContent=`.GkoitG_section{flex-direction:column;width:100%;display:flex}.GkoitG_heading{margin-bottom:28px}.GkoitG_title{color:var(--dsw-alias-label-primary);letter-spacing:-.5px;margin:0;font-size:24px;font-weight:600;line-height:32px}.GkoitG_description{color:var(--dsw-alias-label-secondary);margin:8px 0 0;font-size:13px;line-height:20px}.GkoitG_group+.GkoitG_group{margin-top:28px}.GkoitG_groupTitle{color:var(--dsw-alias-label-primary);margin:0 0 10px;font-size:13px;font-weight:600;line-height:20px}.GkoitG_card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);border-radius:12px}.GkoitG_item{min-width:0;margin:0 20px}.GkoitG_item+.GkoitG_item{border-top:1px solid var(--dsw-alias-border-l1)}.GkoitG_item>[data-slot="settings.general.item"]>*{border-bottom:none}.GkoitG_footer{margin-top:8px}@media (width<=600px){.GkoitG_heading{margin-bottom:24px}.GkoitG_group+.GkoitG_group{margin-top:24px}.GkoitG_item{margin:0 12px}}`,document.head.appendChild(e)}var A={card:`GkoitG_card`,description:`GkoitG_description`,footer:`GkoitG_footer`,group:`GkoitG_group`,groupTitle:`GkoitG_groupTitle`,heading:`GkoitG_heading`,item:`GkoitG_item`,section:`GkoitG_section`,title:`GkoitG_title`};let j=[{title:`general.display`,items:[`language`,`appearance`,`font-size`,`workspace.recent-navigation`]},{title:`general.interaction`,items:[`transcript-view`,`developer-tools`,`shortcuts`,`link-opening`,`composer-enter`]},{title:`general.notifications`,items:[`codexhost.notifications`]}],M=new Set(j.flatMap(e=>e.items));function N({renderSlot:e,t,useItems:n}){let r=(0,o.useId)(),i=n(e=>e),a=j.map(e=>({title:e.title,items:i.filter(t=>e.items.includes(t))}));return a.push({title:`general.other`,items:i.filter(e=>e!==`current-version`&&!M.has(e))}),/* @__PURE__ */ (0,c.jsxs)(`div`,{className:A.section,children:[/* @__PURE__ */ (0,c.jsxs)(`header`,{className:A.heading,children:[/* @__PURE__ */ (0,c.jsx)(`h2`,{className:A.title,children:t(`general.nav`)}),/* @__PURE__ */ (0,c.jsx)(`p`,{className:A.description,children:t(`general.description`)})]}),a.filter(e=>e.items.length>0).map(n=>/* @__PURE__ */ (0,c.jsxs)(`section`,{className:A.group,"aria-labelledby":`${r}-${n.title}`,children:[/* @__PURE__ */ (0,c.jsx)(`h3`,{className:A.groupTitle,id:`${r}-${n.title}`,children:t(n.title)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.card,children:n.items.map(t=>/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.item,children:e(`settings.general.item`,{},{only:t})},t))})]},n.title)),i.includes(`current-version`)&&/* @__PURE__ */ (0,c.jsx)(`div`,{className:A.footer,children:e(`settings.general.item`,{},{only:`current-version`})})]})}let P=`@deepseek-ai/dsh-client-ui-settings-general/CurrentVersionRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(P)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=P,e.textContent=`.Ve8J0W_row{color:var(--dsw-alias-label-primary);overflow-wrap:anywhere;padding:16px 0;font-size:14px;line-height:22px}`,document.head.appendChild(e)}var F={row:`Ve8J0W_row`};function I({t:e}){let t={}.DSH_CLIENT_VERSION;return t===void 0?null:/* @__PURE__ */ (0,c.jsx)(`div`,{className:F.row,children:e(`general.currentVersion`,{version:t})})}let L=`@deepseek-ai/dsh-client-ui-settings-general/DeveloperToolsRow.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(L)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=L,e.textContent=`.OciNza_row{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:24px;padding:16px 0;display:flex}.OciNza_title{font-size:14px;line-height:20px}.OciNza_description{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px;line-height:18px}`,document.head.appendChild(e)}var R={description:`OciNza_description`,row:`OciNza_row`,title:`OciNza_title`};function z({useDeveloperTools:e,setEnabled:t,t:n}){let r=e(e=>e),[a,s]=(0,o.useState)(!1),[l,u]=(0,o.useState)(!1);return/* @__PURE__ */ (0,c.jsxs)(`div`,{className:R.row,children:[/* @__PURE__ */ (0,c.jsxs)(`div`,{children:[/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.title,children:n(`developerTools.title`)}),/* @__PURE__ */ (0,c.jsx)(`div`,{className:R.description,children:n(`developerTools.description`)}),l&&/* @__PURE__ */ (0,c.jsx)(`div`,{role:`alert`,children:n(`developerTools.error`)})]}),/* @__PURE__ */ (0,c.jsx)(i.Switch,{checked:r,disabled:a,label:n(`developerTools.title`),onChange:e=>{u(!1),s(!0),t(e).catch(()=>{u(!0)}).finally(()=>{s(!1)})}})]})}let B=`@deepseek-ai/dsh-client-ui-settings-general/SettingsDocumentAction.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(B)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-settings-general`,e.dataset.pluginCss=B,e.textContent=`.cOdd9G_action{align-items:center;gap:8px;min-width:0;display:flex}.cOdd9G_error{max-width:180px;color:var(--dsw-alias-state-error-primary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}`,document.head.appendChild(e)}var V={action:`cOdd9G_action`,error:`cOdd9G_error`};function H({controller:e,useSnapshot:t,t:n}){let r=t(e=>e);return(0,o.useEffect)(()=>{e.load()},[e]),r.status===`ready`?/* @__PURE__ */ (0,c.jsxs)(`div`,{className:V.action,children:[r.error===null?null:/* @__PURE__ */ (0,c.jsx)(`span`,{className:V.error,role:`alert`,children:n(`openDocument.error`)}),/* @__PURE__ */ (0,c.jsx)(i.Button,{variant:`outline`,size:`sm`,disabled:r.opening,onClick:()=>{e.open()},children:n(`openDocument`)})]}):null}var U=class{ctx;describeFace;store=(0,a.createSnapshotStore)({status:`idle`,opening:!1,error:null});following;constructor(e,t){this.ctx=e,this.describeFace=t}async load(){this.following??=this.describeFace.subscribe(()=>{this.derive()}),this.store.update(e=>{e.status=`loading`,e.error=null}),await this.describeFace.ensure(),this.derive()}async open(){let e=this.store.getSnapshot();if(!(e.status!==`ready`||e.opening)){this.store.update(e=>{e.opening=!0,e.error=null});try{let e=await this.ctx.remote.settings.openSettingsDocument();if(!e.ok){let{message:t}=e.error;this.store.update(e=>{e.error=t})}}finally{this.store.update(e=>{e.opening=!1})}}}dispose(){this.following?.(),this.following=void 0}derive(){let e=this.describeFace.getSnapshot();if(e.view===void 0){e.error!==null&&this.store.update(t=>{t.status=`unavailable`,t.error=e.error});return}let{hasDocument:t}=e.view;this.store.update(e=>{e.status=t?`ready`:`unavailable`,e.error=null})}};let W={trigger:`设置`,"shortcut.open":`打开设置`,"desktop.update.available":`新版本`,"desktop.update.checking":`正在检查更新…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`正在校验更新文件…`,"desktop.update.installing":`正在准备重启…`,"desktop.update.ready":`安装并重启`,"desktop.update.retry":`重试更新`,"desktop.update.versionDetail":`{label}:{version}`,"desktop.update.downloadDetail":`正在下载更新:{percent}%
|
|
2
2
|
目标版本:{version}`,"desktop.update.checkFailed":`检查更新失败,请稍后重试。`,"desktop.update.downloadFailed":`下载更新失败,请重试。`,"desktop.update.installFailed":`安装更新失败,请稍后重试。`,"desktop.update.checkNetworkFailed":`检查更新失败,请检查网络连接后重试。`,"desktop.update.downloadNetworkFailed":`下载更新失败,请检查网络连接后重试。`,"desktop.update.installNetworkFailed":`安装更新失败,请检查网络连接后重试。`,"desktop.update.stopFailed":`未能安全停止任务,更新尚未安装,请稍后重试。`,"desktop.update.tasksChanged":`有新任务开始运行,请重新确认是否停止任务并更新。`,"desktop.update.tasksUnavailable":`无法确认任务状态,请在工作区就绪后重试更新。`,title:`设置`,close:`关闭`,openDocument:`打开配置文件`,"openDocument.error":`无法打开配置文件`,"general.nav":`通用设置`,"general.description":`调整界面显示、阅读与交互偏好。`,"general.display":`显示与语言`,"general.interaction":`交互与阅读`,"general.notifications":`通知`,"general.other":`其他设置`,"general.currentVersion":`当前版本:{version}`,"developerTools.title":`显示代码工作视图`,"developerTools.error":`保存失败,请重试`,"developerTools.description":`在对话中显示代码 diff 和工具调用详情`,"connection.error":`连接异常,刷新重试`,"connection.connecting":`重新连接中`,"connection.connected":`连接成功`,"connection.reconnect":`连接异常,点击立即重连`,"connection.restart":`连接中断,正在重试,点击立即重连`},G={trigger:`Settings`,"shortcut.open":`Open settings`,"desktop.update.available":`Update`,"desktop.update.checking":`Checking for updates…`,"desktop.update.progress":`{percent}%`,"desktop.update.verifying":`Verifying update files…`,"desktop.update.installing":`Preparing to restart…`,"desktop.update.ready":`Install and Restart`,"desktop.update.retry":`Retry update`,"desktop.update.versionDetail":`{label}: {version}`,"desktop.update.downloadDetail":`Downloading update: {percent}%
|
|
3
3
|
Target version: {version}`,"desktop.update.checkFailed":`Could not check for updates. Please try again later.`,"desktop.update.downloadFailed":`Could not download the update. Please try again.`,"desktop.update.installFailed":`Could not install the update. Please try again later.`,"desktop.update.checkNetworkFailed":`Could not check for updates. Check your connection and try again.`,"desktop.update.downloadNetworkFailed":`Could not download the update. Check your connection and try again.`,"desktop.update.installNetworkFailed":`Could not install the update. Check your connection and try again.`,"desktop.update.stopFailed":`Could not safely stop the tasks. The update has not been installed. Please try again later.`,"desktop.update.tasksChanged":`New tasks have started. Confirm again to stop the tasks and update.`,"desktop.update.tasksUnavailable":`Task status is unavailable. Try updating again when the workspace is ready.`,title:`Settings`,close:`Close`,openDocument:`Open configuration file`,"openDocument.error":`Could not open configuration file`,"general.nav":`General`,"general.description":`Adjust your display, reading, and interaction preferences.`,"general.display":`Display & language`,"general.interaction":`Interaction & reading`,"general.notifications":`Notifications`,"general.other":`Other settings`,"general.currentVersion":`Current version: {version}`,"developerTools.title":`Show coding view`,"developerTools.error":`Could not save. Please try again.`,"developerTools.description":`Shows code diffs and detailed tool output in conversations`,"connection.error":`Disconnected`,"connection.connecting":`Reconnecting`,"connection.connected":`Connected`,"connection.reconnect":`Disconnected, reconnect now`,"connection.restart":`Reconnecting, reconnect now`},K=`settings`,q=[`slots`,`locale`,`connection`,`remote`,`remote.settings`,`configForms`,`shortcuts`];function J(e){e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`developer-tools`,order:15,locale:K,inject:()=>({hooks:{developerTools:e.configForms.developerTools.enabled},setEnabled:t=>e.configForms.developerTools.setEnabled(t)})},z)),e.slots.inject(`settings.general.item`,()=>e.slots.register({name:`settings.general.item`,id:`current-version`,order:100,locale:K},I)),e.effect(()=>e.locale.register(K,{zh:W,en:G}),`ui-settings-general: dictionaries`);let t=e.get(`connection`),n=globalThis.dshDesktop,a=new C(n?.protocolVersion===1?n.updates:void 0);e.effect(()=>()=>{a.dispose()},`ui-settings-general: desktop update carrier`),e.slots.inject(`sidebar.toggle.badge`,()=>e.slots.register({name:`sidebar.toggle.badge`,locale:K,inject:()=>({hooks:{desktopUpdate:a.store,connectionState:t.state}})},y));let o=e.locale.bind(K),s=e.remote.$host.isLoopback?new U(e,e.configForms.describe()):void 0,c=s===void 0?void 0:()=>({controller:s,hooks:{snapshot:s.store}});e.effect(()=>()=>{s?.dispose()},`ui-settings-general: document action directory`);let u=-1,d=-1,f=[],p=-1,m=[],h=()=>({openDesktopUpdate:()=>{a.open()},reconnect:()=>{t.reconnect()},hooks:{shortcuts:e.shortcuts.catalog,desktopUpdate:a.store,connectionState:t.state,sections:{getSnapshot:()=>{let t=e.slots.getVersion(`settings.section`),n=e.locale.getSnapshot().revision;return(t!==u||n!==d)&&(u=t,d=n,f=e.slots.entries(`settings.section`).map(e=>({
|
|
4
4
|
/* v8 ignore next -- list-slot registration requires id (SlotCore rejects an entry without one) */
|
|
5
5
|
id:e.options.id??``,order:e.options.order??0,label:(0,r.resolveSlotLabel)(e.options.label)??``})).sort((e,t)=>e.order-t.order)),f},subscribe:t=>{let n=e.slots.subscribe(`settings.section`,t),r=e.locale.subscribe(t);return()=>{n(),r()}}},onboardingSteps:{getSnapshot:()=>{let t=e.slots.getVersion(`settings.onboarding`);return t!==p&&(p=t,m=e.slots.entries(`settings.onboarding`).map(e=>({
|
|
6
6
|
/* v8 ignore next -- list-slot registration requires id */
|
|
7
|
-
id:e.options.id??``,order:e.options.order??0})).sort((e,t)=>e.order-t.order)),m},subscribe:t=>e.slots.subscribe(`settings.onboarding`,t)}}});e.slots.inject(`sidebar.settings`,()=>{let t=l(),n=t.create(),r={...t,create:()=>n},a=e.shortcuts.register({id:`settings.open`,label:()=>o(`shortcut.open`),aliases:[`settings`,`preferences`],defaults:{"desktop:macos":{code:`Comma`,modifiers:[`primary`]},"desktop:windows":{code:`Comma`,modifiers:[`primary`]},"desktop:linux":{code:`Comma`,modifiers:[`primary`]},"web:macos":{code:`Comma`,modifiers:[`primary`,`alt`]},"web:windows":{code:`Comma`,modifiers:[`primary`,`alt`]}},regions:[`page`,`editable`,`terminal`],modals:[`settings`],resolve:({modal:e})=>e!==null&&e!==`settings`?{status:`blocked`,reason:`modal`}:{status:`handled`,run:()=>{e===`settings`?(0,i.closeTopModal)(document):n.actions.open()}}}),
|
|
7
|
+
id:e.options.id??``,order:e.options.order??0})).sort((e,t)=>e.order-t.order)),m},subscribe:t=>e.slots.subscribe(`settings.onboarding`,t)}}});e.slots.inject(`sidebar.settings`,()=>{let t=l(),n=t.create(),r={...t,create:()=>n},a=e.reflect.provide(`settingsNavigation`,{openSection:e=>n.actions.openSection(e)}),s=e.shortcuts.register({id:`settings.open`,label:()=>o(`shortcut.open`),aliases:[`settings`,`preferences`],defaults:{"desktop:macos":{code:`Comma`,modifiers:[`primary`]},"desktop:windows":{code:`Comma`,modifiers:[`primary`]},"desktop:linux":{code:`Comma`,modifiers:[`primary`]},"web:macos":{code:`Comma`,modifiers:[`primary`,`alt`]},"web:windows":{code:`Comma`,modifiers:[`primary`,`alt`]}},regions:[`page`,`editable`,`terminal`],modals:[`settings`],resolve:({modal:e})=>e!==null&&e!==`settings`?{status:`blocked`,reason:`modal`}:{status:`handled`,run:()=>{e===`settings`?(0,i.closeTopModal)(document):n.actions.open()}}}),c=e.slots.register({name:`sidebar.settings`,locale:K,store:r,children:{"settings.launcher":{kind:`single`,scope:`root`},"settings.trigger":{kind:`single`,scope:`root`},"settings.header":{kind:`single`,scope:`root`},"settings.action":{kind:`list`,scope:`root`},"settings.close":{kind:`single`,scope:`root`},"settings.section":{kind:`list`,scope:`root`},"settings.onboarding":{kind:`list`,scope:`root`}},inject:h},S);return()=>{s(),c(),a()}}),e.slots.inject(`settings.trigger`,()=>e.slots.register({name:`settings.trigger`,locale:K},E)),e.slots.inject(`settings.header`,()=>e.slots.register({name:`settings.header`,locale:K},D)),c!==void 0&&e.slots.inject(`settings.action`,()=>e.slots.register({name:`settings.action`,id:`open-document`,order:0,locale:K,inject:c},H)),e.slots.inject(`settings.close`,()=>e.slots.register({name:`settings.close`,locale:K},O)),e.slots.inject(`settings.section`,()=>e.slots.register({name:`settings.section`,id:`general`,order:0,label:()=>o(`general.nav`),locale:K,children:{"settings.general.item":{kind:`list`,scope:`root`}},inject:()=>{let t=-1,n=[];return{hooks:{items:{getSnapshot:()=>{let r=e.slots.getVersion(`settings.general.item`);return r!==t&&(t=r,n=[...new Set([...e.slots.entries(`settings.general.item`)].sort((e,t)=>(e.options.order??0)-(t.options.order??0)).flatMap(e=>e.options.id?[e.options.id]:[]))]),n},subscribe:t=>e.slots.subscribe(`settings.general.item`,t)}}}}},N))}return n.SettingsDocumentStore=U,n.apply=J,n.inject=q,t.exports}});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-sidebar`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-store"),i=e("@deepseek-ai/dsh-client-ui-slots"),a=e("@deepseek-ai/dsh-client-ui-primitives"),o=e("react/jsx-runtime"),s=e("react"),c=`@deepseek-ai/dsh-client-ui-sidebar/HeaderLeadingControls.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(c)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=c,e.textContent=`.fqofDG_controls{align-items:center;gap:8px;display:flex}.fqofDG_iconButton{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.fqofDG_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}`,document.head.appendChild(e)}var l={controls:`fqofDG_controls`,iconButton:`fqofDG_iconButton`};function u({toggleSidebar:e,startSession:t,useShortcuts:n,t:r}){let i=n(e=>e.find(e=>e.id===`sidebar.left.toggle`)),s=n(e=>e.find(e=>e.id===`session.new`));return/* @__PURE__ */ (0,o.jsxs)(`div`,{className:l.controls,children:[/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`toggle.open`),shortcutKeys:i?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`toggle.open`),"aria-keyshortcuts":i?.aria,onClick:()=>{e()},children:/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{size:16})})}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`session.new.label`),shortcutKeys:s?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`session.new.label`),"aria-keyshortcuts":s?.aria,onClick:()=>{t()},children:/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:16})})})]})}function d(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function f(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d(e))&&(r&&(r+=` `),r+=t);return r}let p=`@deepseek-ai/dsh-client-ui-sidebar/SidebarRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(p)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=p,e.textContent=`.W2Gj0G_root{--ch-sidebar-text-primary:#1a1c1f;--ch-sidebar-text-muted:#1a1c1f7e;--dsw-font-family:-apple-system, "system-ui", "Segoe UI", sans-serif;--dsw-alias-label-primary:color-mix(in oklab, var(--ch-sidebar-text-primary) 85%, transparent);--dsw-alias-label-secondary:color-mix(in srgb, var(--ch-sidebar-text-primary) 65%, transparent);--dsw-alias-label-tertiary:var(--ch-sidebar-text-muted);--dsw-alias-label-caption:var(--ch-sidebar-text-muted);--dsh-sidebar-inline-padding:12px;height:100%;padding:6px var(--dsh-sidebar-inline-padding);box-sizing:border-box;background:var(--dsw-specific-sidebar-fill);color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);font-synthesis-weight:none;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);flex-direction:column;font-size:14px;font-weight:430;line-height:20px;display:flex}body[data-ds-dark-theme] .W2Gj0G_root{--ch-sidebar-text-primary:#fff;--ch-sidebar-text-muted:#ffffff7f}[data-platform=darwin] .W2Gj0G_root{background:0 0}[data-phone-drawer] .W2Gj0G_root{background:0 0;max-width:100%}.W2Gj0G_root.W2Gj0G_collapsed{padding:18px 10px 6px}[data-windows-titlebar] .W2Gj0G_root .W2Gj0G_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] .W2Gj0G_toggle{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;position:fixed;left:12px}[data-windows-titlebar] .W2Gj0G_root.W2Gj0G_collapsed .W2Gj0G_logoRow{height:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_brand{padding-left:4px}[data-windows-titlebar] .W2Gj0G_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] .W2Gj0G_brandMark{transform:translate(1px)}[data-windows-titlebar] .W2Gj0G_brandName{font-weight:400}[data-windows-titlebar] .W2Gj0G_root.W2Gj0G_collapsed{padding:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_panelList,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_regionArea,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--dsh-windows-menu-start:84px}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_newSession{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;border:none;margin:0;padding:0;position:fixed;left:48px}[data-windows-titlebar] .W2Gj0G_railIn .W2Gj0G_iconButton,[data-windows-titlebar] .W2Gj0G_railIn .W2Gj0G_newSession{animation:none}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_newSession{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:50%}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:inline}.W2Gj0G_root.W2Gj0G_quietBars{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.W2Gj0G_fading>*{opacity:0;transition:opacity .15s var(--ds-ease-in-out)}.W2Gj0G_wide{animation:W2Gj0G_wide-in .2s var(--ds-ease-in-out)}@keyframes W2Gj0G_wide-in{0%{opacity:0}}.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_regionArea{animation:W2Gj0G_rail-in .15s var(--ds-ease-in-out) backwards}.W2Gj0G_railIn .W2Gj0G_footArea{animation:W2Gj0G_rail-fade-in .15s var(--ds-ease-in-out) backwards}@keyframes W2Gj0G_rail-in{0%{opacity:0;transform:translate(49px)}}@keyframes W2Gj0G_rail-fade-in{0%{opacity:0}}.W2Gj0G_topStrip{box-sizing:border-box;height:52px;margin:-6px calc(-1 * var(--dsh-sidebar-inline-padding)) 0;flex:none;justify-content:flex-end;align-items:center;padding:0 12px 2px;display:flex}[data-fullscreen] .W2Gj0G_topStrip{justify-content:flex-start}.W2Gj0G_topStrip+.W2Gj0G_logoRow{margin-top:-12px}.W2Gj0G_logoRow{box-sizing:border-box;flex:none;justify-content:flex-end;align-items:center;gap:8px;height:60px;margin-bottom:4px;padding:8px 0 8px 4px;display:flex;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_logoRow{justify-content:flex-start;height:36px;margin-bottom:12px;padding:0;overflow:visible}.W2Gj0G_brand{min-width:0;color:inherit;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;padding:0;display:inline-flex;overflow:hidden}[data-platform=darwin] .W2Gj0G_brand{cursor:default}.W2Gj0G_brandIdentity{align-items:center;gap:8px;min-width:0;height:24px;display:inline-flex}.W2Gj0G_brandMark{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_brandName{letter-spacing:.04em;align-items:center;gap:6px;min-width:0;height:24px;font-size:18px;font-weight:600;line-height:24px;display:inline-flex}.W2Gj0G_fallbackBrandName{letter-spacing:0;white-space:nowrap;font-size:17px}.W2Gj0G_localBuildBrand{white-space:nowrap;flex-direction:column;flex:none;justify-content:center;align-items:flex-start;gap:1px;height:24px;display:inline-flex}.W2Gj0G_localBuildTitle{letter-spacing:0;font-size:12px;line-height:13px}.W2Gj0G_iconButton{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}.W2Gj0G_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_iconButton.W2Gj0G_toggle:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_collapsed .W2Gj0G_iconButton{border-radius:var(--dsw-radius-md);width:36px;height:36px}.W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:none}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_panelIcon{display:inline}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_railMark{display:none}.W2Gj0G_railMark{justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_collapsed .W2Gj0G_iconButton{color:var(--dsw-alias-label-primary)}.W2Gj0G_buildVersion{height:10px;color:var(--dsw-alias-label-primary-inverted);background:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);white-space:nowrap;border-radius:2px;flex:none;align-items:center;padding:0 3px;font-size:6px;font-weight:500;line-height:10px;display:inline-flex}.W2Gj0G_newSession{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;gap:0;margin:0 0 2px;padding:6px 8px;font-family:inherit;font-size:14px;font-weight:430;line-height:21px;display:flex;position:relative;overflow:hidden;container-type:inline-size}.W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}[data-platform=darwin] .W2Gj0G_newSession{background:#ffffff8c}[data-platform=darwin] .W2Gj0G_newSession:hover{background:#ffffff4d}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession{background:#ffffff26}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession:hover{background:#fff3}.W2Gj0G_collapsed .W2Gj0G_newSession{background:0 0;border-color:#0000;align-self:flex-start;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.W2Gj0G_collapsed .W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_newSessionLabel{white-space:nowrap;max-width:200px;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_newSessionLabel{max-width:0}.W2Gj0G_newSessionLabelMask{flex:1;min-width:0}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionLabelMask:has(+.W2Gj0G_newSessionShortcut){overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.W2Gj0G_newSessionContent{justify-content:flex-start;align-items:center;gap:8px;width:100cqw;display:flex}.W2Gj0G_newSessionContent>svg{flex:none}.W2Gj0G_collapsed .W2Gj0G_newSessionContent{justify-content:center}@media (hover:none),(pointer:coarse){.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession,.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_panelRow{min-height:44px}}.W2Gj0G_newSessionShortcut{opacity:0;pointer-events:none;flex:none;font-weight:400;display:inline-flex}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionShortcut{opacity:1}.W2Gj0G_panelList{flex-direction:column;flex:none;gap:4px;margin-bottom:16px;display:flex}.W2Gj0G_panelRow{box-sizing:border-box;border-radius:var(--dsw-radius-md);min-height:36px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0;padding:7px 8px;line-height:22px;display:flex}.W2Gj0G_panelRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_panelRow.W2Gj0G_panelActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.W2Gj0G_panelRow:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_panelGlyph{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_panelTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_panelList{gap:12px;margin-bottom:12px}.W2Gj0G_collapsed .W2Gj0G_panelRow{width:36px;height:36px;color:var(--dsw-alias-label-primary);justify-content:center;margin:0;padding:0}.W2Gj0G_regionArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-sidebar-inline-padding));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_regionArea{margin-left:0;margin-right:0;padding-left:0}.W2Gj0G_footArea{flex-direction:column;flex:none;display:flex}.W2Gj0G_settingsArea,.W2Gj0G_footerActions{flex:none;width:100%;min-width:0}.W2Gj0G_footerActions{display:flex}.W2Gj0G_collapsed .W2Gj0G_footArea{align-items:center}.W2Gj0G_collapsed .W2Gj0G_settingsArea,.W2Gj0G_collapsed .W2Gj0G_footerActions{justify-content:center;width:auto;display:flex}@media (prefers-reduced-motion:reduce){.W2Gj0G_wide,.W2Gj0G_fading>*,.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_footArea,.W2Gj0G_railIn .W2Gj0G_regionArea{transition:none;animation:none}}`,document.head.appendChild(e)}var m={brand:`W2Gj0G_brand`,brandIdentity:`W2Gj0G_brandIdentity`,brandMark:`W2Gj0G_brandMark`,brandName:`W2Gj0G_brandName`,buildVersion:`W2Gj0G_buildVersion`,collapsed:`W2Gj0G_collapsed`,fading:`W2Gj0G_fading`,fallbackBrandName:`W2Gj0G_fallbackBrandName`,footArea:`W2Gj0G_footArea`,footerActions:`W2Gj0G_footerActions`,iconButton:`W2Gj0G_iconButton`,localBuildBrand:`W2Gj0G_localBuildBrand`,localBuildTitle:`W2Gj0G_localBuildTitle`,logoRow:`W2Gj0G_logoRow`,newSession:`W2Gj0G_newSession`,newSessionContent:`W2Gj0G_newSessionContent`,newSessionLabel:`W2Gj0G_newSessionLabel`,newSessionLabelMask:`W2Gj0G_newSessionLabelMask`,newSessionShortcut:`W2Gj0G_newSessionShortcut`,panelActive:`W2Gj0G_panelActive`,panelGlyph:`W2Gj0G_panelGlyph`,panelIcon:`W2Gj0G_panelIcon`,panelList:`W2Gj0G_panelList`,panelRow:`W2Gj0G_panelRow`,panelTitle:`W2Gj0G_panelTitle`,quietBars:`W2Gj0G_quietBars`,"rail-fade-in":`W2Gj0G_rail-fade-in`,"rail-in":`W2Gj0G_rail-in`,railIn:`W2Gj0G_railIn`,railMark:`W2Gj0G_railMark`,regionArea:`W2Gj0G_regionArea`,root:`W2Gj0G_root`,settingsArea:`W2Gj0G_settingsArea`,toggle:`W2Gj0G_toggle`,topStrip:`W2Gj0G_topStrip`,wide:`W2Gj0G_wide`,"wide-in":`W2Gj0G_wide-in`};function h(){let e={}.DSH_CLIENT_VERSION;if(e===void 0)return;let t={}.DSH_CLIENT_COMMIT_HASH;return e+(t===void 0?``:`-${t}`)+({}.DSH_CLIENT_GIT_DIRTY===`true`?`-dirty`:``)}function g({id:e,label:t,wide:n,usePanelInfo:r,selectPanel:i,renderSlot:s}){let c=r(t=>t.activePanelId===e);return/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:t,delayMs:500,disabled:n,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.panelRow,c&&m.panelActive),"aria-label":t,"aria-current":c?`page`:void 0,onClick:()=>{i(e)},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.panelGlyph,"aria-hidden":`true`,children:s(`sidebar.panellist`,{size:n?16:18,active:c},{only:e})}),n&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.panelTitle,m.wide),children:t})]})})}function _({collapsed:e,width:t,startSession:n,toggleSidebar:r,selectPanel:i,usePanels:c,useShortcuts:l,usePanelInfo:u,t:d,renderSlot:p}){let _=c(e=>e),v=l(e=>e.find(e=>e.id===`sidebar.left.toggle`)),y=l(e=>e.find(e=>e.id===`session.new`)),b=d(e?`toggle.open`:`toggle.collapse`),[x,S]=(0,s.useState)(e);(0,s.useEffect)(()=>{if(!e){S(!1);return}let t=window.setTimeout(()=>{S(!0)},150);return()=>{window.clearTimeout(t)}},[e]);let C=document.documentElement.hasAttribute(`data-windows-titlebar`),w=C?!e:!e||!x,T=C?`bottom`:`right`,E=(0,s.useRef)(t);e||(E.current=t);let D=(0,s.useRef)(!e);e||(D.current=!0);let O=(0,s.useRef)(null),[k,A]=(0,s.useState)(!1),j=(0,s.useRef)(void 0),M=()=>{j.current===void 0&&(j.current=window.setTimeout(()=>{j.current=void 0,A(!1)},2e3))},N=()=>{window.clearTimeout(j.current),j.current=void 0};(0,s.useEffect)(()=>{if(!k)return;let e=e=>{let t=O.current?.getBoundingClientRect();
|
|
1
|
+
window.__ModuleLoader__.load({id:`@deepseek-ai/dsh-client-ui-sidebar`,factory:e=>{var t={exports:{}},n=t.exports;Object.defineProperty(n,Symbol.toStringTag,{value:`Module`});let r=e("@deepseek-ai/dsh-client-store"),i=e("@deepseek-ai/dsh-client-ui-slots"),a=e("@deepseek-ai/dsh-client-ui-primitives"),o=e("react/jsx-runtime"),s=e("react"),c=`@deepseek-ai/dsh-client-ui-sidebar/HeaderLeadingControls.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(c)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=c,e.textContent=`.fqofDG_controls{align-items:center;gap:8px;display:flex}.fqofDG_iconButton{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}.fqofDG_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}`,document.head.appendChild(e)}var l={controls:`fqofDG_controls`,iconButton:`fqofDG_iconButton`};function u({toggleSidebar:e,startSession:t,useShortcuts:n,t:r}){let i=n(e=>e.find(e=>e.id===`sidebar.left.toggle`)),s=n(e=>e.find(e=>e.id===`session.new`));return/* @__PURE__ */ (0,o.jsxs)(`div`,{className:l.controls,children:[/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`toggle.open`),shortcutKeys:i?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`toggle.open`),"aria-keyshortcuts":i?.aria,onClick:()=>{e()},children:/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{size:16})})}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:r(`session.new.label`),shortcutKeys:s?.keys,delayMs:500,children:/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:l.iconButton,"aria-label":r(`session.new.label`),"aria-keyshortcuts":s?.aria,onClick:()=>{t()},children:/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:16})})})]})}function d(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=d(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function f(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=d(e))&&(r&&(r+=` `),r+=t);return r}let p=`@deepseek-ai/dsh-client-ui-sidebar/SidebarRoot.module.css`;if(typeof document<`u`&&document.querySelector(`style[data-plugin-css=`+JSON.stringify(p)+`]`)===null){let e=document.createElement(`style`);e.dataset.plugin=`@deepseek-ai/dsh-client-ui-sidebar`,e.dataset.pluginCss=p,e.textContent=`.W2Gj0G_root{--ch-sidebar-text-primary:#1a1c1f;--ch-sidebar-text-muted:#1a1c1f7e;--dsw-font-family:-apple-system, "system-ui", "Segoe UI", sans-serif;--dsw-alias-label-primary:color-mix(in oklab, var(--ch-sidebar-text-primary) 85%, transparent);--dsw-alias-label-secondary:color-mix(in srgb, var(--ch-sidebar-text-primary) 65%, transparent);--dsw-alias-label-tertiary:var(--ch-sidebar-text-muted);--dsw-alias-label-caption:var(--ch-sidebar-text-muted);--dsh-sidebar-inline-padding:12px;height:100%;padding:6px var(--dsh-sidebar-inline-padding);box-sizing:border-box;background:var(--dsw-specific-sidebar-fill);color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);font-synthesis-weight:none;--dsh-scrollbar-thumb:var(--dsw-alias-scrollbar-bg-l2);--dsh-scrollbar-thumb-hover:var(--dsw-alias-scrollbar-hover-l2);flex-direction:column;font-size:14px;font-weight:430;line-height:20px;display:flex}body[data-ds-dark-theme] .W2Gj0G_root{--ch-sidebar-text-primary:#fff;--ch-sidebar-text-muted:#ffffff7f}[data-platform=darwin] .W2Gj0G_root{background:0 0}[data-phone-drawer] .W2Gj0G_root{background:0 0;max-width:100%}.W2Gj0G_root.W2Gj0G_collapsed{padding:18px 10px 6px}[data-windows-titlebar] .W2Gj0G_root .W2Gj0G_logoRow{height:40px;margin:0;padding:0}[data-windows-titlebar] .W2Gj0G_toggle{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;position:fixed;left:12px}[data-windows-titlebar] .W2Gj0G_root.W2Gj0G_collapsed .W2Gj0G_logoRow{height:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_brand{padding-left:4px}[data-windows-titlebar] .W2Gj0G_brandIdentity{transform:translateY(1px)}[data-windows-titlebar] .W2Gj0G_brandMark{transform:translate(1px)}[data-windows-titlebar] .W2Gj0G_brandName{font-weight:400}[data-windows-titlebar] .W2Gj0G_root.W2Gj0G_collapsed{padding:0}[data-windows-titlebar] .W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession{margin-top:8px;margin-left:0}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_panelList,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_regionArea,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_footArea{display:none}html[data-windows-titlebar]:has([data-sidebar-collapsed=true]){--dsh-windows-menu-start:84px}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_newSession{top:calc((var(--dsh-windows-titlebar-height) - 28px) / 2);z-index:30;-webkit-app-region:no-drag;border:none;margin:0;padding:0;position:fixed;left:48px}[data-windows-titlebar] .W2Gj0G_railIn .W2Gj0G_iconButton,[data-windows-titlebar] .W2Gj0G_railIn .W2Gj0G_newSession{animation:none}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle,[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_newSession{corner-shape:round;width:28px;height:28px;color:var(--dsw-alias-label-secondary);border-radius:50%}[data-windows-titlebar] .W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:inline}.W2Gj0G_root.W2Gj0G_quietBars{--dsh-scrollbar-thumb:transparent;--dsh-scrollbar-thumb-hover:transparent}.W2Gj0G_fading>*{opacity:0;transition:opacity .15s var(--ds-ease-in-out)}.W2Gj0G_wide{animation:W2Gj0G_wide-in .2s var(--ds-ease-in-out)}@keyframes W2Gj0G_wide-in{0%{opacity:0}}.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_regionArea{animation:W2Gj0G_rail-in .15s var(--ds-ease-in-out) backwards}.W2Gj0G_railIn .W2Gj0G_footArea{animation:W2Gj0G_rail-fade-in .15s var(--ds-ease-in-out) backwards}@keyframes W2Gj0G_rail-in{0%{opacity:0;transform:translate(49px)}}@keyframes W2Gj0G_rail-fade-in{0%{opacity:0}}.W2Gj0G_topStrip{box-sizing:border-box;height:52px;margin:-6px calc(-1 * var(--dsh-sidebar-inline-padding)) 0;flex:none;justify-content:flex-end;align-items:center;padding:0 12px 2px;display:flex}[data-fullscreen] .W2Gj0G_topStrip{justify-content:flex-start}.W2Gj0G_topStrip+.W2Gj0G_logoRow{margin-top:-12px}.W2Gj0G_logoRow{box-sizing:border-box;flex:none;justify-content:flex-end;align-items:center;gap:8px;height:60px;margin-bottom:4px;padding:8px 0 8px 4px;display:flex;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_logoRow{justify-content:flex-start;height:36px;margin-bottom:12px;padding:0;overflow:visible}.W2Gj0G_brand{min-width:0;color:inherit;cursor:pointer;background:0 0;border:none;flex:1;align-items:center;padding:0;display:inline-flex;overflow:hidden}[data-platform=darwin] .W2Gj0G_brand{cursor:default}.W2Gj0G_brandIdentity{align-items:center;gap:8px;min-width:0;height:24px;display:inline-flex}.W2Gj0G_brandMark{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_brandName{letter-spacing:.04em;align-items:center;gap:6px;min-width:0;height:24px;font-size:18px;font-weight:600;line-height:24px;display:inline-flex}.W2Gj0G_fallbackBrandName{letter-spacing:0;white-space:nowrap;font-size:17px}.W2Gj0G_localBuildBrand{white-space:nowrap;flex-direction:column;flex:none;justify-content:center;align-items:flex-start;gap:1px;height:24px;display:inline-flex}.W2Gj0G_localBuildTitle{letter-spacing:0;font-size:12px;line-height:13px}.W2Gj0G_iconButton{border-radius:var(--dsw-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-secondary);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}.W2Gj0G_iconButton:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_iconButton.W2Gj0G_toggle:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_collapsed .W2Gj0G_iconButton{border-radius:var(--dsw-radius-md);width:36px;height:36px}.W2Gj0G_collapsed .W2Gj0G_toggle .W2Gj0G_panelIcon{display:none}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_panelIcon{display:inline}.W2Gj0G_collapsed .W2Gj0G_toggle:hover .W2Gj0G_railMark{display:none}.W2Gj0G_railMark{justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_collapsed .W2Gj0G_iconButton{color:var(--dsw-alias-label-primary)}.W2Gj0G_buildVersion{height:10px;color:var(--dsw-alias-label-primary-inverted);background:var(--dsw-alias-label-primary);font-family:var(--ds-font-family-code);white-space:nowrap;border-radius:2px;flex:none;align-items:center;padding:0 3px;font-size:6px;font-weight:500;line-height:10px;display:inline-flex}.W2Gj0G_newSession{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-label-primary);cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;gap:0;margin:0 0 2px;padding:6px 8px;font-family:inherit;font-size:14px;font-weight:430;line-height:21px;display:flex;position:relative;overflow:hidden;container-type:inline-size}.W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}[data-platform=darwin] .W2Gj0G_newSession{background:#ffffff8c}[data-platform=darwin] .W2Gj0G_newSession:hover{background:#ffffff4d}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession{background:#ffffff26}[data-platform=darwin] [data-ds-dark-theme] .W2Gj0G_newSession:hover{background:#fff3}.W2Gj0G_collapsed .W2Gj0G_newSession{background:0 0;border-color:#0000;align-self:flex-start;gap:0;width:36px;height:36px;margin:0 0 12px;padding:0}.W2Gj0G_collapsed .W2Gj0G_newSession:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_newSessionLabel{white-space:nowrap;max-width:200px;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_newSessionLabel{max-width:0}.W2Gj0G_newSessionLabelMask{flex:1;min-width:0}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionLabelMask:has(+.W2Gj0G_newSessionShortcut){overflow:hidden;mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.W2Gj0G_newSessionContent{justify-content:flex-start;align-items:center;gap:8px;width:100cqw;display:flex}.W2Gj0G_newSessionContent>svg{flex:none}.W2Gj0G_collapsed .W2Gj0G_newSessionContent{justify-content:center}@media (hover:none),(pointer:coarse){.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_newSession,.W2Gj0G_root:not(.W2Gj0G_collapsed) .W2Gj0G_panelRow{min-height:44px}}.W2Gj0G_newSessionShortcut{opacity:0;pointer-events:none;flex:none;font-weight:400;display:inline-flex}.W2Gj0G_newSession:is(:hover,:focus-visible) .W2Gj0G_newSessionShortcut{opacity:1}.W2Gj0G_panelList{flex-direction:column;flex:none;gap:4px;margin-bottom:16px;display:flex}.W2Gj0G_panelList:empty{display:none}.W2Gj0G_panelRow{box-sizing:border-box;border-radius:var(--dsw-radius-md);min-height:36px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0;padding:7px 8px;line-height:22px;display:flex}.W2Gj0G_panelRow:hover{background:var(--dsw-alias-interactive-bg-hover)}.W2Gj0G_panelRow.W2Gj0G_panelActive{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.W2Gj0G_panelRow:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.W2Gj0G_panelGlyph{flex:none;justify-content:center;align-items:center;display:inline-flex}.W2Gj0G_panelTitle{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_panelList{gap:12px;margin-bottom:12px}.W2Gj0G_collapsed .W2Gj0G_panelRow{width:36px;height:36px;color:var(--dsw-alias-label-primary);justify-content:center;margin:0;padding:0}.W2Gj0G_regionArea{min-height:0;margin-left:-4px;margin-right:calc(-1 * var(--dsh-sidebar-inline-padding));flex-direction:column;flex:1;padding-left:4px;display:flex;overflow:hidden}.W2Gj0G_collapsed .W2Gj0G_regionArea{margin-left:0;margin-right:0;padding-left:0}.W2Gj0G_footArea{flex-direction:column;flex:none;display:flex}.W2Gj0G_settingsArea,.W2Gj0G_footerActions{flex:none;width:100%;min-width:0}.W2Gj0G_footerActions{display:flex}.W2Gj0G_collapsed .W2Gj0G_footArea{align-items:center}.W2Gj0G_collapsed .W2Gj0G_settingsArea,.W2Gj0G_collapsed .W2Gj0G_footerActions{justify-content:center;width:auto;display:flex}@media (prefers-reduced-motion:reduce){.W2Gj0G_wide,.W2Gj0G_fading>*,.W2Gj0G_railIn .W2Gj0G_iconButton,.W2Gj0G_railIn .W2Gj0G_newSession,.W2Gj0G_railIn .W2Gj0G_panelList,.W2Gj0G_railIn .W2Gj0G_footArea,.W2Gj0G_railIn .W2Gj0G_regionArea{transition:none;animation:none}}`,document.head.appendChild(e)}var m={brand:`W2Gj0G_brand`,brandIdentity:`W2Gj0G_brandIdentity`,brandMark:`W2Gj0G_brandMark`,brandName:`W2Gj0G_brandName`,buildVersion:`W2Gj0G_buildVersion`,collapsed:`W2Gj0G_collapsed`,fading:`W2Gj0G_fading`,fallbackBrandName:`W2Gj0G_fallbackBrandName`,footArea:`W2Gj0G_footArea`,footerActions:`W2Gj0G_footerActions`,iconButton:`W2Gj0G_iconButton`,localBuildBrand:`W2Gj0G_localBuildBrand`,localBuildTitle:`W2Gj0G_localBuildTitle`,logoRow:`W2Gj0G_logoRow`,newSession:`W2Gj0G_newSession`,newSessionContent:`W2Gj0G_newSessionContent`,newSessionLabel:`W2Gj0G_newSessionLabel`,newSessionLabelMask:`W2Gj0G_newSessionLabelMask`,newSessionShortcut:`W2Gj0G_newSessionShortcut`,panelActive:`W2Gj0G_panelActive`,panelGlyph:`W2Gj0G_panelGlyph`,panelIcon:`W2Gj0G_panelIcon`,panelList:`W2Gj0G_panelList`,panelRow:`W2Gj0G_panelRow`,panelTitle:`W2Gj0G_panelTitle`,quietBars:`W2Gj0G_quietBars`,"rail-fade-in":`W2Gj0G_rail-fade-in`,"rail-in":`W2Gj0G_rail-in`,railIn:`W2Gj0G_railIn`,railMark:`W2Gj0G_railMark`,regionArea:`W2Gj0G_regionArea`,root:`W2Gj0G_root`,settingsArea:`W2Gj0G_settingsArea`,toggle:`W2Gj0G_toggle`,topStrip:`W2Gj0G_topStrip`,wide:`W2Gj0G_wide`,"wide-in":`W2Gj0G_wide-in`};function h(){let e={}.DSH_CLIENT_VERSION;if(e===void 0)return;let t={}.DSH_CLIENT_COMMIT_HASH;return e+(t===void 0?``:`-${t}`)+({}.DSH_CLIENT_GIT_DIRTY===`true`?`-dirty`:``)}function g({id:e,label:t,wide:n,usePanelInfo:r,selectPanel:i,renderSlot:s}){let c=r(t=>t.activePanelId===e);return/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:t,delayMs:500,disabled:n,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.panelRow,c&&m.panelActive),"aria-label":t,"aria-current":c?`page`:void 0,onClick:()=>{i(e)},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.panelGlyph,"aria-hidden":`true`,children:s(`sidebar.panellist`,{size:n?16:18,active:c},{only:e})}),n&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.panelTitle,m.wide),children:t})]})})}function _({collapsed:e,width:t,startSession:n,toggleSidebar:r,selectPanel:i,usePanels:c,useShortcuts:l,usePanelInfo:u,t:d,renderSlot:p}){let _=c(e=>e),v=l(e=>e.find(e=>e.id===`sidebar.left.toggle`)),y=l(e=>e.find(e=>e.id===`session.new`)),b=d(e?`toggle.open`:`toggle.collapse`),[x,S]=(0,s.useState)(e);(0,s.useEffect)(()=>{if(!e){S(!1);return}let t=window.setTimeout(()=>{S(!0)},150);return()=>{window.clearTimeout(t)}},[e]);let C=document.documentElement.hasAttribute(`data-windows-titlebar`),w=C?!e:!e||!x,T=C?`bottom`:`right`,E=(0,s.useRef)(t);e||(E.current=t);let D=(0,s.useRef)(!e);e||(D.current=!0);let O=(0,s.useRef)(null),[k,A]=(0,s.useState)(!1),j=(0,s.useRef)(void 0),M=()=>{j.current===void 0&&(j.current=window.setTimeout(()=>{j.current=void 0,A(!1)},2e3))},N=()=>{window.clearTimeout(j.current),j.current=void 0};(0,s.useEffect)(()=>{if(!k)return;let e=e=>{let t=O.current?.getBoundingClientRect();
|
|
2
2
|
/* v8 ignore next -- the listener only exists while the column is mounted and revealed. */
|
|
3
|
-
t!==void 0&&(e.clientX>=t.left&&e.clientX<t.right&&e.clientY>=t.top&&e.clientY<t.bottom?N():M())};return document.addEventListener(`pointermove`,e),()=>{document.removeEventListener(`pointermove`,e),N()}},[k]);let P=h(),F=(0,a.isDarwinDesktop)(),I=/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:b,shortcutKeys:v?.keys,delayMs:500,side:T,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.iconButton,m.toggle),"aria-label":b,"aria-keyshortcuts":v?.aria,onClick:()=>{r()},children:[!w&&!C&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.railMark,"aria-hidden":`true`,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{className:m.panelIcon,size:w||C?16:18}),!w&&p(`sidebar.toggle.badge`,{})]})});return/* @__PURE__ */ (0,o.jsxs)(`div`,{ref:O,className:f(m.root,!w&&m.collapsed,!w&&D.current&&m.railIn,e&&w&&m.fading,!k&&m.quietBars),style:w?{width:e?E.current:t}:void 0,onPointerEnter:()=>{N(),A(!0)},onPointerLeave:()=>{M()},children:[F&&/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.topStrip,"data-window-drag":!0,children:I}),/* @__PURE__ */ (0,o.jsxs)(`div`,{className:m.logoRow,"data-window-drag":!0,children:[w&&(()=>{let e=/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.brandIdentity,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandMark,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandName,children:p(`sidebar.brand.name`,{},{fallback:P===void 0?/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.fallbackBrandName,children:d(`brand.localBuild`)}):/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.localBuildBrand,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.localBuildTitle,children:d(`brand.localBuild`)}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.buildVersion,children:P})]})})})]});return F?/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.brand,m.wide),children:e}):/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:f(m.brand,m.wide),"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:e})})(),!F&&I]}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:d(`session.new.label`),shortcutKeys:y?.keys,delayMs:500,side:T,disabled:w,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:m.newSession,"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionLabelMask,children:/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.newSessionContent,children:[w?/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineMedium,{size:18}):/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:C?16:18}),w&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.newSessionLabel,m.wide),children:d(`session.new`)})]})}),w&&y!==void 0&&y.keys.length>0&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionShortcut,"aria-hidden":`true`,children:/* @__PURE__ */ (0,o.jsx)(a.ShortcutKeys,{keys:y.keys})})]})})
|
|
3
|
+
t!==void 0&&(e.clientX>=t.left&&e.clientX<t.right&&e.clientY>=t.top&&e.clientY<t.bottom?N():M())};return document.addEventListener(`pointermove`,e),()=>{document.removeEventListener(`pointermove`,e),N()}},[k]);let P=h(),F=(0,a.isDarwinDesktop)(),I=/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:b,shortcutKeys:v?.keys,delayMs:500,side:T,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:f(m.iconButton,m.toggle),"aria-label":b,"aria-keyshortcuts":v?.aria,onClick:()=>{r()},children:[!w&&!C&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.railMark,"aria-hidden":`true`,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(a.IconPanelLeftOutlineRegular,{className:m.panelIcon,size:w||C?16:18}),!w&&p(`sidebar.toggle.badge`,{})]})});return/* @__PURE__ */ (0,o.jsxs)(`div`,{ref:O,className:f(m.root,!w&&m.collapsed,!w&&D.current&&m.railIn,e&&w&&m.fading,!k&&m.quietBars),style:w?{width:e?E.current:t}:void 0,onPointerEnter:()=>{N(),A(!0)},onPointerLeave:()=>{M()},children:[F&&/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.topStrip,"data-window-drag":!0,children:I}),/* @__PURE__ */ (0,o.jsxs)(`div`,{className:m.logoRow,"data-window-drag":!0,children:[w&&(()=>{let e=/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.brandIdentity,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandMark,children:p(`sidebar.brand.mark`,{size:24},{fallback:/* @__PURE__ */ (0,o.jsx)(a.FishLogo,{size:24})})}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.brandName,children:p(`sidebar.brand.name`,{},{fallback:P===void 0?/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.fallbackBrandName,children:d(`brand.localBuild`)}):/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.localBuildBrand,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.localBuildTitle,children:d(`brand.localBuild`)}),/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.buildVersion,children:P})]})})})]});return F?/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.brand,m.wide),children:e}):/* @__PURE__ */ (0,o.jsx)(`button`,{type:`button`,className:f(m.brand,m.wide),"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:e})})(),!F&&I]}),/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:d(`session.new.label`),shortcutKeys:y?.keys,delayMs:500,side:T,disabled:w,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:m.newSession,"aria-label":d(`session.new.label`),"aria-keyshortcuts":y?.aria,onClick:()=>{n()},children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionLabelMask,children:/* @__PURE__ */ (0,o.jsxs)(`span`,{className:m.newSessionContent,children:[w?/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineMedium,{size:18}):/* @__PURE__ */ (0,o.jsx)(a.IconNewChatOutlineRegular,{size:C?16:18}),w&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.newSessionLabel,m.wide),children:d(`session.new`)})]})}),w&&y!==void 0&&y.keys.length>0&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.newSessionShortcut,"aria-hidden":`true`,children:/* @__PURE__ */ (0,o.jsx)(a.ShortcutKeys,{keys:y.keys})})]})}),/* @__PURE__ */ (0,o.jsxs)(`nav`,{className:m.panelList,"aria-label":d(`panels.label`),children:[_.map(({id:e,label:t})=>/* @__PURE__ */ (0,o.jsx)(g,{id:e,label:t,wide:w,usePanelInfo:u,selectPanel:i,renderSlot:p},e)),p(`sidebar.primary.action`,{size:w?16:18,renderAction:({label:e,icon:t,onClick:n})=>/* @__PURE__ */ (0,o.jsx)(a.Tooltip,{label:e,delayMs:500,disabled:w,children:/* @__PURE__ */ (0,o.jsxs)(`button`,{type:`button`,className:m.panelRow,"aria-label":e,onClick:n,children:[/* @__PURE__ */ (0,o.jsx)(`span`,{className:m.panelGlyph,"aria-hidden":`true`,children:t}),w&&/* @__PURE__ */ (0,o.jsx)(`span`,{className:f(m.panelTitle,m.wide),children:e})]})})})]}),/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.regionArea,children:p(`sidebar.workspaces`,{wide:w,expandSidebar:()=>{e&&r()}})}),/* @__PURE__ */ (0,o.jsxs)(`div`,{className:m.footArea,children:[/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.footerActions,children:p(`sidebar.footer.action`,{wide:w})}),/* @__PURE__ */ (0,o.jsx)(`div`,{className:m.settingsArea,children:p(`sidebar.settings`,{wide:w})})]})]})}let v={"session.new":`新会话`,"session.new.label":`新建会话`,"toggle.open":`打开侧边栏`,"toggle.collapse":`收起侧边栏`,"panels.label":`全局面板`},y={"session.new":`New Session`,"session.new.label":`New session`,"toggle.open":`Open sidebar`,"toggle.collapse":`Collapse sidebar`,"panels.label":`Global panels`},b=`sidebar`,x=[`slots`,`layout`,`uiWorkspace`,`locale`,`shortcuts`];function S(e){let t=e.get(`uiWorkspace`);e.effect(()=>e.locale.register(b,{zh:v,en:y}),`ui-sidebar: dictionaries`);let n=(0,r.createSnapshotStore)([]),a=()=>{let t=e.slots.entriesOfSlot(`sidebar.panellist`).map(({options:e})=>{let t=e.id;return{id:t,order:e.order??0,label:(0,i.resolveSlotLabel)(e.label)??t}}).sort((e,t)=>e.order-t.order),r=n.getSnapshot();r.length===t.length&&r.every((e,n)=>{let r=t[n];return e.id===r.id&&e.order===r.order&&e.label===r.label})||n.set(t)};e.effect(()=>e.slots.subscribe(`sidebar.panellist`,a),`ui-sidebar: panel entries`),e.effect(()=>e.locale.subscribe(a),`ui-sidebar: panel labels`);let o=()=>({startSession:e=>{t.startSession(e)},toggleSidebar:()=>{e.layout.toggleSidebar()},selectPanel:t=>{(t===`plugins`||t===`schedules`)&&e.get(`productAnalytics`)?.track(`sidebar_menu_click`,{menu_name:t===`plugins`?`plugin`:`cron`}),e.layout.selectPanel(t)},hooks:{panels:n,shortcuts:e.shortcuts.catalog}});e.slots.inject(`sidebar`,()=>e.slots.register({name:`sidebar`,locale:b,children:{"sidebar.brand.mark":{kind:`single`,scope:`root`},"sidebar.brand.name":{kind:`single`,scope:`root`},"sidebar.toggle.badge":{kind:`single`,scope:`root`},"sidebar.panellist":{kind:`list`,scope:`root`},"sidebar.primary.action":{kind:`list`,scope:`root`},"sidebar.workspaces":{kind:`single`,scope:`root`},"sidebar.settings":{kind:`single`,scope:`root`},"sidebar.footer.action":{kind:`list`,scope:`root`}},inject:o},_)),e.slots.inject(`shell.leading`,()=>e.slots.register({name:`shell.leading`,locale:b,inject:o},u)),a()}return n.apply=S,n.inject=x,t.exports}});
|