sliccy 5.93.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/assets/{account-store-Rezs4Mdy.js → account-store-1UxZZYot.js} +1 -1
- package/dist/ui/assets/{account-store-CUoIEOta.js → account-store-CoEbR8IP.js} +1 -1
- package/dist/ui/assets/adobe-BiqU9VhB.js +1 -0
- package/dist/ui/assets/adobe-DhTbIgp7.js +2 -0
- package/dist/ui/assets/{apps-D3jaj1qM.js → apps-VwQ7fzrl.js} +1 -1
- package/dist/ui/assets/{azure-openai-DaOvkAkp.js → azure-openai-BHlnftx0.js} +1 -1
- package/dist/ui/assets/{azure-openai-BPLw3gtS.js → azure-openai-BXMALzXh.js} +1 -1
- package/dist/ui/assets/{cerebras-Bg-ivo-a.js → cerebras-Bp2zTaoz.js} +1 -1
- package/dist/ui/assets/{cerebras-z_mrGhla.js → cerebras-Dplgh_2B.js} +1 -1
- package/dist/ui/assets/{connect-surface-CWV8VTum.js → connect-surface-C_jiytTb.js} +1 -1
- package/dist/ui/assets/{fs-CFKDx79w.js → fs-4BQlEjvr.js} +2 -2
- package/dist/ui/assets/{fs-BIIUldyQ.js → fs-DrHA-Qkm.js} +1 -1
- package/dist/ui/assets/{github-_7Uss9E8.js → github-DyOXWanU.js} +1 -1
- package/dist/ui/assets/{github-fzID4Do2.js → github-QcvWHn3I.js} +2 -2
- package/dist/ui/assets/{github-copilot-EPI58Toz.js → github-copilot-CZADPLMA.js} +1 -1
- package/dist/ui/assets/{github-copilot-C-WRXO-z.js → github-copilot-Cf1lPECi.js} +1 -1
- package/dist/ui/assets/{kernel-worker-nhAL8tTX.js → kernel-worker-VO3L2Ult.js} +18 -18
- package/dist/ui/assets/{local-llm-y0xFiB7I.js → local-llm-BgiR6n9l.js} +1 -1
- package/dist/ui/assets/{local-llm-DqZ44TA6.js → local-llm-DhXYXdke.js} +1 -1
- package/dist/ui/assets/{main-BEsbN7vQ.js → main-DcDECk9y.js} +3 -3
- package/dist/ui/assets/{mount-B6qlLpm-.js → mount-B1yPu12s.js} +1 -1
- package/dist/ui/assets/{mount-DRUe-JFc.js → mount-DxaIo1IT.js} +2 -2
- package/dist/ui/assets/{mount-recovery-D59qMjTh.js → mount-recovery-B3msdMNw.js} +1 -1
- package/dist/ui/assets/{new-session-BQA84FeN.js → new-session-DFWUbXLl.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-BjjgaBeB.js → oauth-bootstrap-LfEu4WMi.js} +2 -2
- package/dist/ui/assets/{openai-codex-TzottxEv.js → openai-codex-CL0hMP8b.js} +1 -1
- package/dist/ui/assets/{openai-codex-DkXF2xa_.js → openai-codex-z2N9DiAy.js} +1 -1
- package/dist/ui/assets/{openrouter-DnDFXmps.js → openrouter-R2QAY6e6.js} +1 -1
- package/dist/ui/assets/{openrouter-C2OdDSHO.js → openrouter-l0QYSIC2.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-VENIWG-h.js → openrouter-oauth-4TEzRdyY.js} +1 -1
- package/dist/ui/assets/{openrouter-oauth-CBBtx-4B.js → openrouter-oauth-C3sxAHfO.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-BsPD2lhO.js → panel-rpc-handlers-BaEwxcQV.js} +2 -2
- package/dist/ui/assets/{provider-8kF4dUdh.js → provider-CsSSIcIc.js} +2 -2
- package/dist/ui/assets/{provider-nxSYEFpP.js → provider-CtlDtnOa.js} +1 -1
- package/dist/ui/assets/{provider-settings-CCInBCuD.js → provider-settings-Cz2FV2d9.js} +1 -1
- package/dist/ui/assets/{provider-settings-BgxG7kN0.js → provider-settings-dgEnu-5e.js} +1 -1
- package/dist/ui/assets/provider-store-access-YBY5iHvU.js +1 -0
- package/dist/ui/assets/{provider-store-access-DkwkEWa7.js → provider-store-access-kvioZc4y.js} +2 -2
- package/dist/ui/assets/{providers-CFXex9E9.js → providers-Bz9FE02M.js} +1 -1
- package/dist/ui/assets/{providers-mvUhAGvh.js → providers-thSf1-ol.js} +2 -2
- package/dist/ui/assets/{quick-llm-BIdLELzr.js → quick-llm-DfYxuHPN.js} +1 -1
- package/dist/ui/assets/{session-freezer-Brvk45S_.js → session-freezer-CCypF0Z-.js} +2 -2
- package/dist/ui/assets/{setup-standalone-prelude-B88_HW5U.js → setup-standalone-prelude-CnAJpYLY.js} +1 -1
- package/dist/ui/assets/{setup-sudo-BBJ4XY8c.js → setup-sudo-CjxeTe9H.js} +2 -2
- package/dist/ui/assets/{skills-Deg_M4W7.js → skills-BLHoUeA3.js} +1 -1
- package/dist/ui/assets/{src-mCXOSBtK.js → src-DBJkwKxU.js} +151 -121
- package/dist/ui/assets/{store-TK0c4Yol.js → store-DdLFCC1G.js} +1 -1
- package/dist/ui/assets/{sudo-7bjdH96i.js → sudo-_3e-ochk.js} +1 -1
- package/dist/ui/assets/upgrade-detection-Civm25hY.js +1 -0
- package/dist/ui/assets/{wc-attach-BJk2fkdb.js → wc-attach-CS88afdI.js} +2 -2
- package/dist/ui/assets/{wc-extension-BalHDBf4.js → wc-extension-CbTPqK8d.js} +2 -2
- package/dist/ui/assets/{wc-follower-DGtQfR--.js → wc-follower-DTgIN9jO.js} +3 -3
- package/dist/ui/assets/{wc-live-BAMxmdC8.js → wc-live-Bq1VW5y3.js} +3 -3
- package/dist/ui/assets/{wc-nav-CQo-WpZ8.js → wc-nav-B4CDuJGd.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-ByValFHJ.js → wc-onboarding-CdmUaTYO.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-BHHAniZt.js → wc-placeholder-BGwPy2ab.js} +2 -2
- package/dist/ui/assets/{wc-settings-MCWFCQF7.js → wc-settings-C9cWaDOV.js} +2 -2
- package/dist/ui/assets/{wc-shell-CLoaOqT4.js → wc-shell-CfZlMjmj.js} +4 -4
- package/dist/ui/assets/{wc-sprinkles-C-gdmpIP.js → wc-sprinkles-HWImF1Nz.js} +2 -2
- package/dist/ui/assets/{wc-tray-DtzKYJ_A.js → wc-tray-CEqMv5Tp.js} +2 -2
- package/dist/ui/assets/{xai-grok-B6A9A3R3.js → xai-grok-CF2oSH25.js} +1 -1
- package/dist/ui/assets/{xai-grok-D7Cbm0BG.js → xai-grok-j3l-WHO1.js} +1 -1
- package/dist/ui/index.html +6 -6
- package/dist/ui/packages/webapp/index.html +6 -6
- package/package.json +1 -1
- package/dist/ui/assets/adobe-CvDgYAF9.js +0 -2
- package/dist/ui/assets/adobe-DBCji4oa.js +0 -1
- package/dist/ui/assets/provider-store-access-C_xyl9se.js +0 -1
- package/dist/ui/assets/upgrade-detection-CYJQ0HM7.js +0 -1
|
@@ -1639,7 +1639,7 @@ slicc-composer .slicc-composer__ptt.is-picking {
|
|
|
1639
1639
|
animation-name: none;
|
|
1640
1640
|
}
|
|
1641
1641
|
}
|
|
1642
|
-
`,Ht=`slicc-composer-style`;function Ut(e){if(e.getElementById(Ht))return;let t=e.createElement(`style`);t.id=Ht,t.textContent=Vt,(e.head??e.documentElement).appendChild(t)}var Wt=1e3,Gt=60,Kt=1e4,qt=45e3,Jt=1500;function Yt(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>i(n),t);e.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e instanceof Error?e:Error(String(e)))})})}var Xt=`slicc-composer:mic-device`;function Zt(){try{return typeof localStorage>`u`?null:localStorage.getItem(Xt)}catch{return null}}function Qt(e){try{if(typeof localStorage>`u`)return;e?localStorage.setItem(Xt,e):localStorage.removeItem(Xt)}catch{}}function $t(e){return e==null||!Number.isFinite(e)?``:e<60?`~${Math.max(1,Math.round(e))}s`:`~${Math.floor(e/60)}m ${Math.round(e%60)}s`}w(`slicc-composer`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;#n=null;#r=`idle`;#i=!1;#a=0;#o=null;#s=null;#c=null;#l=null;#u=null;#d=`unknown`;#f=Zt();#p=null;#m=null;#h=null;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;#S=null;#C=null;#w=[];connectedCallback(){Ut(this.ownerDocument),this.#T(),this.addEventListener(`pointerdown`,this.#E)}disconnectedCallback(){this.removeEventListener(`pointerdown`,this.#E),this.#c?.cancel(),this.#c=null,this.#j(),this.#i=!1,this.#o=null,this.#a++,this.#z(),this.#L(),this.#m&&clearTimeout(this.#m),this.#m=null,this.#R(),this.#G(),this.#ee()}attributeChangedCallback(){}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get speech(){return this.#u??=s(),this.#u}set speech(e){this.#u=e,this.#d=`unknown`}get device(){return this.#f}set device(e){this.#f=e,Qt(e)}get inner(){return this.#T(),this.#e}append(...e){this.#T(),this.#e.append(...e)}#T(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-composer__inner`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-composer__inner`,this.#e.setAttribute(`part`,`inner`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}#E=e=>{if(!this.hasAttribute(`ptt`)||!e.isPrimary||this.#i||e.button!==0||this.#r===`finalizing`||this.#r===`picking`)return;let t=e.target?.closest?.(`textarea`);if(!(t instanceof HTMLTextAreaElement)||!this.contains(t)||t.value!==``)return;this.#i=!0,this.#a++,this.#o=t,this.#s=e.pointerId;try{this.setPointerCapture(e.pointerId)}catch{}let n=this.ownerDocument;n.addEventListener(`pointerup`,this.#M),this.addEventListener(`pointercancel`,this.#N),n.addEventListener(`selectionchange`,this.#D);let r=this.#a;this.#h=setTimeout(()=>{this.#L(),this.#O(this.speech,r)},400)};#D=()=>{if(!this.#h)return;let e=this.ownerDocument.getSelection();!e||e.isCollapsed||e.toString()===``||(this.#i=!1,this.#a++,this.#o=null,this.#L(),this.#z(),this.#R())};async#O(e,t){let n=await Promise.race([e.permission().then(e=>(this.#d=e,e)),new Promise(e=>setTimeout(()=>e(`pending`),Gt))]);if(!(t!==this.#a||!this.#i)){if(n===`granted`){this.#A(e,t);return}if(n===`denied`){this.#q(`denied`);return}this.#q(`enable`),this.#m=setTimeout(()=>{this.#m=null,this.#k(e,t)},Wt),n===`pending`&&e.permission().then(n=>{this.#d=n,!(t!==this.#a||!this.#i||this.#r!==`enable`)&&(n===`granted`?(this.#I(),this.#A(e,t)):n===`denied`&&(this.#I(),this.#q(`denied`)))})}}#k(e,t){t!==this.#a||!this.#i||this.#r!==`enable`||(this.#v=null,this.#q(`prompting`),Yt(e.requestPermission(),Kt,Error(`Microphone didn't respond. Check your mic, then hold again.`)).then(n=>{this.#d=n?`granted`:`denied`,n&&e.warmup(),t===this.#a&&(n&&this.#i?this.#A(e,t):n?this.#ee():this.#i?this.#q(`denied`):this.#ee())}).catch(e=>{this.#d=`denied`,t===this.#a&&(this.#i?(this.#v=e instanceof Error?e.message:String(e),this.#q(`denied`)):this.#ee())}))}#A(e,t){this.#r=`recording`,this.#q(`recording`),e.warmup(),this.#g?.(),this.#g=e.onStatus(e=>{this.#_=e,this.#Q()});let n=e.microphones();n.then(e=>{t===this.#a&&(this.#f??(this.#p=o(e)),i(e)&&this.#$(e))}).catch(()=>{});let r=(this.#f==null?Yt(n,Jt,Error(`microphone enumeration timed out`)).then(e=>o(e)).catch(()=>null):Promise.resolve(this.#f)).then(n=>e.start({deviceId:n??void 0,onPartial:e=>{t===this.#a&&this.#Z(e)},onError:e=>{t===this.#a&&this.#Z(e,!0)}}));this.#l=r,r.then(e=>{if(this.#l===r){if(this.#l=null,t!==this.#a||this.#r!==`recording`){e.cancel();return}this.#c=e}}).catch(e=>{this.#l===r&&(this.#l=null,t===this.#a&&this.#Z(e instanceof Error?e.message:String(e),!0))})}#j(){let e=this.#l;this.#l=null,e&&e.then(e=>e.cancel(),()=>{})}#M=e=>{if(!this.#i||this.#s!=null&&e.pointerId!==this.#s)return;let t=this.#S,n=!1;if(this.#r===`recording`&&t&&!t.hidden)if(e.composedPath().includes(t))n=!0;else{let r=this.ownerDocument.elementFromPoint(e.clientX,e.clientY);n=r!=null&&t.contains(r)}if(n){this.#i=!1,this.#z(),this.#R(),this.#c?.cancel(),this.#c=null,this.#j(),this.#o=null,this.#B();return}this.#P(!0)};#N=e=>{this.#s!=null&&e.pointerId!==this.#s||this.#P(!1)};#P(e){if(!this.#i)return;switch(this.#i=!1,this.#L(),this.#z(),this.#R(),this.#r){case`enable`:this.#I(),this.#o=null,this.#ee();return;case`prompting`:this.#o=null;return;case`denied`:this.#o=null,this.#ee();return;case`recording`:break;default:this.#o=null,this.#ee();return}let t=this.#c;this.#c=null;let n=this.#l;if(this.#l=null,!e){t?.cancel(),n&&n.then(e=>e.cancel(),()=>{}),this.#o=null,this.#ee();return}if(!t&&!n){this.#o=null,this.#ee();return}this.#r=`finalizing`,this.#Z(`Transcribing…`);let r=this.#a;Yt((t?Promise.resolve(t):n).then(e=>e.stop()),qt,Error(`finalize timed out`)).then(e=>{r===this.#a&&(this.#ee(),this.#F(e))}).catch(()=>{r===this.#a&&(this.#ee(),this.#o=null)})}#F(e){let t=this.#o;if(this.#o=null,!t)return;let n=e.trim();if(!n){t.focus();return}t.value=t.value?/\s$/.test(t.value)?t.value+n:`${t.value} ${n}`:n,t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.focus();let r=t.closest(`slicc-input-card`);r&&typeof r.submit==`function`?r.submit(`dictation`):t.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:t.value,source:`dictation`}}))}#I(){this.#m&&clearTimeout(this.#m),this.#m=null}#L(){this.#h&&clearTimeout(this.#h),this.#h=null,this.ownerDocument.removeEventListener(`selectionchange`,this.#D)}#R(){this.ownerDocument.removeEventListener(`pointerup`,this.#M),this.removeEventListener(`pointercancel`,this.#N)}#z(){let e=this.#s;if(this.#s=null,e!=null)try{this.releasePointerCapture(e)}catch{}}#B(){this.#r=`picking`,this.#X(`picking`),this.#y&&(this.#y.textContent=`Choose a microphone`),this.#b&&(this.#b.hidden=!0),this.#V();let e=this.ownerDocument;e.addEventListener(`pointerdown`,this.#U,!0),e.addEventListener(`keydown`,this.#W,!0)}#V(){let e=this.#S;if(!e||this.#C)return;let t=E(`div`,{class:`slicc-composer__ptt-device-menu`,role:`menu`}),r=null,i=this.#f??this.#p;for(let e of this.#w){let a=e.deviceId===i,o=E(`button`,{type:`button`,class:`slicc-composer__ptt-device-item`,role:`menuitemradio`,"aria-checked":a?`true`:`false`,"data-device-id":e.deviceId},e.label,E(`span`,{class:`tick`},n(`check`,{size:14})));o.addEventListener(`click`,()=>{this.device=e.deviceId,this.#K()}),(a||!r)&&(r=o),t.appendChild(o)}this.#C=t,e.appendChild(t),this.#H(t,e),r?.focus()}#H(e,t){let n=t.getBoundingClientRect(),r=(window.innerHeight||document.documentElement.clientHeight)-n.bottom-6-8,i=n.top-6-8,a=e.offsetHeight>r&&i>r;e.classList.toggle(`slicc-composer__ptt-device-menu--up`,a);let o=Math.max(a?i:r,0);e.style.maxHeight=`${Math.min(320,o)}px`}#U=e=>{this.#S&&e.composedPath().includes(this.#S)||this.#K()};#W=e=>{e.key===`Escape`&&(e.stopPropagation(),this.#K())};#G(){let e=this.ownerDocument;e.removeEventListener(`pointerdown`,this.#U,!0),e.removeEventListener(`keydown`,this.#W,!0)}#K(){this.#G(),this.#ee()}#q(e){switch(this.#r=e,this.#n||(this.#n=E(`div`,{class:`slicc-composer__ptt`,"data-ptt":!0,role:`button`}),this.appendChild(this.#n)),this.#X(e),e){case`enable`:this.#J(n(`mic`,{size:28}),`Hold to enable push to talk`,this.#Y(`Requesting microphone access when the bar fills`)),this.#n.setAttribute(`aria-label`,`Hold to enable push to talk`);break;case`prompting`:this.#J(n(`mic`,{size:28}),`Allow microphone access in the browser prompt`,this.#Y(`Waiting for permission…`)),this.#n.setAttribute(`aria-label`,`Waiting for microphone permission`);break;case`denied`:{let e=this.#v?`Microphone unavailable`:`Microphone access is blocked`,t=this.#v??`Enable the microphone for this site in your browser settings, then hold again.`;this.#J(n(`mic-off`,{size:28}),e,E(`div`,{class:`slicc-composer__ptt-load-text`},t)),this.#n.setAttribute(`aria-label`,e);break}case`recording`:{this.#S=E(`div`,{class:`slicc-composer__ptt-device`,hidden:!0}),this.#b=E(`div`,{class:`slicc-composer__ptt-caption`,"aria-live":`polite`,hidden:!0}),this.#x=E(`div`,{class:`slicc-composer__ptt-status`,hidden:!0});let e=E(`div`,{class:`slicc-composer__ptt-microw`},E(`div`,{class:`slicc-composer__ptt-mic`},n(`mic`,{size:28})),this.#S);this.#y=E(`div`,{class:`slicc-composer__ptt-label`},`Listening — release to send`),this.#n.replaceChildren(e,this.#y,this.#b,this.#x),this.#n.setAttribute(`aria-label`,`Listening — release to send`),this.#Q();break}}}#J(e,t,n){this.#n&&(this.#y=E(`div`,{class:`slicc-composer__ptt-label`},t),this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#n.replaceChildren(E(`div`,{class:`slicc-composer__ptt-mic`},e),this.#y,n))}#Y(e){return E(`div`,{class:`slicc-composer__ptt-load`},E(`span`,{class:`slicc-composer__ptt-load-text`},e),E(`div`,{class:`slicc-composer__ptt-bar`},E(`div`,{class:`slicc-composer__ptt-bar-fill`})))}#X(e){this.#n&&(this.#n.classList.remove(`is-enable`,`is-prompting`,`is-denied`,`is-recording`,`is-finalizing`,`is-picking`),e!==`idle`&&this.#n.classList.add(`is-${e}`))}#Z(e,t=!1){let n=this.#b;if(!n)return;let r=e.trim().split(/\s+/).filter(Boolean);if(r.length===0){n.hidden=!0;return}n.textContent=r.slice(-8).join(` `),n.classList.toggle(`is-error`,t),n.hidden=!1}#Q(){let e=this.#x;if(!e)return;let t=this.#_;if(t?.state===`downloading`){if(t.download){let n=$t(t.download.etaSeconds??null);e.textContent=n?`Better speech recognition downloading · ready in ${n}`:`Better speech recognition downloading…`}else e.textContent=`Preparing enhanced speech…`;e.classList.remove(`is-error`),e.hidden=!1}else t?.state===`ready`&&t.engine===`enhanced`?(e.textContent=`Enhanced speech recognition`,e.classList.remove(`is-error`),e.hidden=!1):t?.state===`unavailable`&&t.message?(e.textContent=t.message,e.classList.add(`is-error`),e.hidden=!1):(e.classList.remove(`is-error`),e.hidden=!0)}#$(e){let t=this.#S;if(!t)return;this.#w=e;let r=E(`button`,{type:`button`,class:`slicc-composer__ptt-device-btn`,"aria-label":`Choose a microphone`,"aria-haspopup":`menu`,title:`Choose a microphone`},n(`chevron-down`,{size:12}));r.addEventListener(`pointerdown`,e=>e.stopPropagation()),t.replaceChildren(r),t.hidden=!1}#ee(){this.#g?.(),this.#g=null,this.#n?.remove(),this.#n=null,this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#p=null,this.#v=null,this.#r=`idle`}});var en=`
|
|
1642
|
+
`,Ht=`slicc-composer-style`;function Ut(e){if(e.getElementById(Ht))return;let t=e.createElement(`style`);t.id=Ht,t.textContent=Vt,(e.head??e.documentElement).appendChild(t)}var Wt=1e3,Gt=60,Kt=1e4,qt=45e3,Jt=1500;function N(e,t,n){return new Promise((r,i)=>{let a=setTimeout(()=>i(n),t);e.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e instanceof Error?e:Error(String(e)))})})}var P=`slicc-composer:mic-device`;function Yt(){try{return typeof localStorage>`u`?null:localStorage.getItem(P)}catch{return null}}function Xt(e){try{if(typeof localStorage>`u`)return;e?localStorage.setItem(P,e):localStorage.removeItem(P)}catch{}}function Zt(e){return e==null||!Number.isFinite(e)?``:e<60?`~${Math.max(1,Math.round(e))}s`:`~${Math.floor(e/60)}m ${Math.round(e%60)}s`}w(`slicc-composer`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;#n=null;#r=`idle`;#i=!1;#a=0;#o=null;#s=null;#c=null;#l=null;#u=null;#d=`unknown`;#f=Yt();#p=null;#m=null;#h=null;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;#S=null;#C=null;#w=[];connectedCallback(){Ut(this.ownerDocument),this.#T(),this.addEventListener(`pointerdown`,this.#E)}disconnectedCallback(){this.removeEventListener(`pointerdown`,this.#E),this.#c?.cancel(),this.#c=null,this.#j(),this.#i=!1,this.#o=null,this.#a++,this.#z(),this.#L(),this.#m&&clearTimeout(this.#m),this.#m=null,this.#R(),this.#G(),this.#ee()}attributeChangedCallback(){}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get speech(){return this.#u??=s(),this.#u}set speech(e){this.#u=e,this.#d=`unknown`}get device(){return this.#f}set device(e){this.#f=e,Xt(e)}get inner(){return this.#T(),this.#e}append(...e){this.#T(),this.#e.append(...e)}#T(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-composer__inner`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-composer__inner`,this.#e.setAttribute(`part`,`inner`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}#E=e=>{if(!this.hasAttribute(`ptt`)||!e.isPrimary||this.#i||e.button!==0||this.#r===`finalizing`||this.#r===`picking`)return;let t=e.target?.closest?.(`textarea`);if(!(t instanceof HTMLTextAreaElement)||!this.contains(t)||t.value!==``)return;this.#i=!0,this.#a++,this.#o=t,this.#s=e.pointerId;try{this.setPointerCapture(e.pointerId)}catch{}let n=this.ownerDocument;n.addEventListener(`pointerup`,this.#M),this.addEventListener(`pointercancel`,this.#N),n.addEventListener(`selectionchange`,this.#D);let r=this.#a;this.#h=setTimeout(()=>{this.#L(),this.#O(this.speech,r)},400)};#D=()=>{if(!this.#h)return;let e=this.ownerDocument.getSelection();!e||e.isCollapsed||e.toString()===``||(this.#i=!1,this.#a++,this.#o=null,this.#L(),this.#z(),this.#R())};async#O(e,t){let n=await Promise.race([e.permission().then(e=>(this.#d=e,e)),new Promise(e=>setTimeout(()=>e(`pending`),Gt))]);if(!(t!==this.#a||!this.#i)){if(n===`granted`){this.#A(e,t);return}if(n===`denied`){this.#q(`denied`);return}this.#q(`enable`),this.#m=setTimeout(()=>{this.#m=null,this.#k(e,t)},Wt),n===`pending`&&e.permission().then(n=>{this.#d=n,!(t!==this.#a||!this.#i||this.#r!==`enable`)&&(n===`granted`?(this.#I(),this.#A(e,t)):n===`denied`&&(this.#I(),this.#q(`denied`)))})}}#k(e,t){t!==this.#a||!this.#i||this.#r!==`enable`||(this.#v=null,this.#q(`prompting`),N(e.requestPermission(),Kt,Error(`Microphone didn't respond. Check your mic, then hold again.`)).then(n=>{this.#d=n?`granted`:`denied`,n&&e.warmup(),t===this.#a&&(n&&this.#i?this.#A(e,t):n?this.#ee():this.#i?this.#q(`denied`):this.#ee())}).catch(e=>{this.#d=`denied`,t===this.#a&&(this.#i?(this.#v=e instanceof Error?e.message:String(e),this.#q(`denied`)):this.#ee())}))}#A(e,t){this.#r=`recording`,this.#q(`recording`),e.warmup(),this.#g?.(),this.#g=e.onStatus(e=>{this.#_=e,this.#Q()});let n=e.microphones();n.then(e=>{t===this.#a&&(this.#f??(this.#p=o(e)),i(e)&&this.#$(e))}).catch(()=>{});let r=(this.#f==null?N(n,Jt,Error(`microphone enumeration timed out`)).then(e=>o(e)).catch(()=>null):Promise.resolve(this.#f)).then(n=>e.start({deviceId:n??void 0,onPartial:e=>{t===this.#a&&this.#Z(e)},onError:e=>{t===this.#a&&this.#Z(e,!0)}}));this.#l=r,r.then(e=>{if(this.#l===r){if(this.#l=null,t!==this.#a||this.#r!==`recording`){e.cancel();return}this.#c=e}}).catch(e=>{this.#l===r&&(this.#l=null,t===this.#a&&this.#Z(e instanceof Error?e.message:String(e),!0))})}#j(){let e=this.#l;this.#l=null,e&&e.then(e=>e.cancel(),()=>{})}#M=e=>{if(!this.#i||this.#s!=null&&e.pointerId!==this.#s)return;let t=this.#S,n=!1;if(this.#r===`recording`&&t&&!t.hidden)if(e.composedPath().includes(t))n=!0;else{let r=this.ownerDocument.elementFromPoint(e.clientX,e.clientY);n=r!=null&&t.contains(r)}if(n){this.#i=!1,this.#z(),this.#R(),this.#c?.cancel(),this.#c=null,this.#j(),this.#o=null,this.#B();return}this.#P(!0)};#N=e=>{this.#s!=null&&e.pointerId!==this.#s||this.#P(!1)};#P(e){if(!this.#i)return;switch(this.#i=!1,this.#L(),this.#z(),this.#R(),this.#r){case`enable`:this.#I(),this.#o=null,this.#ee();return;case`prompting`:this.#o=null;return;case`denied`:this.#o=null,this.#ee();return;case`recording`:break;default:this.#o=null,this.#ee();return}let t=this.#c;this.#c=null;let n=this.#l;if(this.#l=null,!e){t?.cancel(),n&&n.then(e=>e.cancel(),()=>{}),this.#o=null,this.#ee();return}if(!t&&!n){this.#o=null,this.#ee();return}this.#r=`finalizing`,this.#Z(`Transcribing…`);let r=this.#a;N((t?Promise.resolve(t):n).then(e=>e.stop()),qt,Error(`finalize timed out`)).then(e=>{r===this.#a&&(this.#ee(),this.#F(e))}).catch(()=>{r===this.#a&&(this.#ee(),this.#o=null)})}#F(e){let t=this.#o;if(this.#o=null,!t)return;let n=e.trim();if(!n){t.focus();return}t.value=t.value?/\s$/.test(t.value)?t.value+n:`${t.value} ${n}`:n,t.dispatchEvent(new Event(`input`,{bubbles:!0})),t.focus();let r=t.closest(`slicc-input-card`);r&&typeof r.submit==`function`?r.submit(`dictation`):t.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:t.value,source:`dictation`}}))}#I(){this.#m&&clearTimeout(this.#m),this.#m=null}#L(){this.#h&&clearTimeout(this.#h),this.#h=null,this.ownerDocument.removeEventListener(`selectionchange`,this.#D)}#R(){this.ownerDocument.removeEventListener(`pointerup`,this.#M),this.removeEventListener(`pointercancel`,this.#N)}#z(){let e=this.#s;if(this.#s=null,e!=null)try{this.releasePointerCapture(e)}catch{}}#B(){this.#r=`picking`,this.#X(`picking`),this.#y&&(this.#y.textContent=`Choose a microphone`),this.#b&&(this.#b.hidden=!0),this.#V();let e=this.ownerDocument;e.addEventListener(`pointerdown`,this.#U,!0),e.addEventListener(`keydown`,this.#W,!0)}#V(){let e=this.#S;if(!e||this.#C)return;let t=E(`div`,{class:`slicc-composer__ptt-device-menu`,role:`menu`}),r=null,i=this.#f??this.#p;for(let e of this.#w){let a=e.deviceId===i,o=E(`button`,{type:`button`,class:`slicc-composer__ptt-device-item`,role:`menuitemradio`,"aria-checked":a?`true`:`false`,"data-device-id":e.deviceId},e.label,E(`span`,{class:`tick`},n(`check`,{size:14})));o.addEventListener(`click`,()=>{this.device=e.deviceId,this.#K()}),(a||!r)&&(r=o),t.appendChild(o)}this.#C=t,e.appendChild(t),this.#H(t,e),r?.focus()}#H(e,t){let n=t.getBoundingClientRect(),r=(window.innerHeight||document.documentElement.clientHeight)-n.bottom-6-8,i=n.top-6-8,a=e.offsetHeight>r&&i>r;e.classList.toggle(`slicc-composer__ptt-device-menu--up`,a);let o=Math.max(a?i:r,0);e.style.maxHeight=`${Math.min(320,o)}px`}#U=e=>{this.#S&&e.composedPath().includes(this.#S)||this.#K()};#W=e=>{e.key===`Escape`&&(e.stopPropagation(),this.#K())};#G(){let e=this.ownerDocument;e.removeEventListener(`pointerdown`,this.#U,!0),e.removeEventListener(`keydown`,this.#W,!0)}#K(){this.#G(),this.#ee()}#q(e){switch(this.#r=e,this.#n||(this.#n=E(`div`,{class:`slicc-composer__ptt`,"data-ptt":!0,role:`button`}),this.appendChild(this.#n)),this.#X(e),e){case`enable`:this.#J(n(`mic`,{size:28}),`Hold to enable push to talk`,this.#Y(`Requesting microphone access when the bar fills`)),this.#n.setAttribute(`aria-label`,`Hold to enable push to talk`);break;case`prompting`:this.#J(n(`mic`,{size:28}),`Allow microphone access in the browser prompt`,this.#Y(`Waiting for permission…`)),this.#n.setAttribute(`aria-label`,`Waiting for microphone permission`);break;case`denied`:{let e=this.#v?`Microphone unavailable`:`Microphone access is blocked`,t=this.#v??`Enable the microphone for this site in your browser settings, then hold again.`;this.#J(n(`mic-off`,{size:28}),e,E(`div`,{class:`slicc-composer__ptt-load-text`},t)),this.#n.setAttribute(`aria-label`,e);break}case`recording`:{this.#S=E(`div`,{class:`slicc-composer__ptt-device`,hidden:!0}),this.#b=E(`div`,{class:`slicc-composer__ptt-caption`,"aria-live":`polite`,hidden:!0}),this.#x=E(`div`,{class:`slicc-composer__ptt-status`,hidden:!0});let e=E(`div`,{class:`slicc-composer__ptt-microw`},E(`div`,{class:`slicc-composer__ptt-mic`},n(`mic`,{size:28})),this.#S);this.#y=E(`div`,{class:`slicc-composer__ptt-label`},`Listening — release to send`),this.#n.replaceChildren(e,this.#y,this.#b,this.#x),this.#n.setAttribute(`aria-label`,`Listening — release to send`),this.#Q();break}}}#J(e,t,n){this.#n&&(this.#y=E(`div`,{class:`slicc-composer__ptt-label`},t),this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#n.replaceChildren(E(`div`,{class:`slicc-composer__ptt-mic`},e),this.#y,n))}#Y(e){return E(`div`,{class:`slicc-composer__ptt-load`},E(`span`,{class:`slicc-composer__ptt-load-text`},e),E(`div`,{class:`slicc-composer__ptt-bar`},E(`div`,{class:`slicc-composer__ptt-bar-fill`})))}#X(e){this.#n&&(this.#n.classList.remove(`is-enable`,`is-prompting`,`is-denied`,`is-recording`,`is-finalizing`,`is-picking`),e!==`idle`&&this.#n.classList.add(`is-${e}`))}#Z(e,t=!1){let n=this.#b;if(!n)return;let r=e.trim().split(/\s+/).filter(Boolean);if(r.length===0){n.hidden=!0;return}n.textContent=r.slice(-8).join(` `),n.classList.toggle(`is-error`,t),n.hidden=!1}#Q(){let e=this.#x;if(!e)return;let t=this.#_;if(t?.state===`downloading`){if(t.download){let n=Zt(t.download.etaSeconds??null);e.textContent=n?`Better speech recognition downloading · ready in ${n}`:`Better speech recognition downloading…`}else e.textContent=`Preparing enhanced speech…`;e.classList.remove(`is-error`),e.hidden=!1}else t?.state===`ready`&&t.engine===`enhanced`?(e.textContent=`Enhanced speech recognition`,e.classList.remove(`is-error`),e.hidden=!1):t?.state===`unavailable`&&t.message?(e.textContent=t.message,e.classList.add(`is-error`),e.hidden=!1):(e.classList.remove(`is-error`),e.hidden=!0)}#$(e){let t=this.#S;if(!t)return;this.#w=e;let r=E(`button`,{type:`button`,class:`slicc-composer__ptt-device-btn`,"aria-label":`Choose a microphone`,"aria-haspopup":`menu`,title:`Choose a microphone`},n(`chevron-down`,{size:12}));r.addEventListener(`pointerdown`,e=>e.stopPropagation()),t.replaceChildren(r),t.hidden=!1}#ee(){this.#g?.(),this.#g=null,this.#n?.remove(),this.#n=null,this.#y=null,this.#b=null,this.#x=null,this.#S=null,this.#C=null,this.#w=[],this.#p=null,this.#v=null,this.#r=`idle`}});var Qt=`
|
|
1643
1643
|
slicc-composer-capture {
|
|
1644
1644
|
position: relative;
|
|
1645
1645
|
display: block;
|
|
@@ -1843,7 +1843,7 @@ slicc-composer-capture .slicc-capture__timer {
|
|
|
1843
1843
|
slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
1844
1844
|
display: none;
|
|
1845
1845
|
}
|
|
1846
|
-
`,tn=`slicc-composer-capture-style`;function nn(e){if(e.getElementById(tn))return;let t=e.createElement(`style`);t.id=tn,t.textContent=en,(e.head??e.documentElement).appendChild(t)}var rn=`photo`,an=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function on(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of an)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function sn(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}w(`slicc-composer-capture`,class extends HTMLElement{static observedAttributes=[`mode`,`preferred-device`,`preferred-audio-device`];media=null;recorderFactory=null;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!1;#u=null;#d=null;#f=null;#p=[];#m=0;#h=null;#g=null;#_=e=>{e.key===`Escape`&&this.#g&&this.#L()};connectedCallback(){nn(this.ownerDocument),this.#H(),this.ownerDocument.addEventListener(`keydown`,this.#_)}disconnectedCallback(){if(this.ownerDocument.removeEventListener(`keydown`,this.#_),this.#N(),this.#P(),this.#I(),this.#g){let e=this.#g;this.#g=null,e(null)}}attributeChangedCallback(e,t,n){e===`mode`&&this.#l&&this.#z(n??rn)}get mode(){return this.getAttribute(`mode`)===`video`?`video`:`photo`}set mode(e){e==null?this.removeAttribute(`mode`):this.setAttribute(`mode`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}get preferredAudioDevice(){return this.getAttribute(`preferred-audio-device`)}set preferredAudioDevice(e){e==null?this.removeAttribute(`preferred-audio-device`):this.setAttribute(`preferred-audio-device`,e)}#v(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}#y(e,t){return this.recorderFactory?this.recorderFactory(e,t):new MediaRecorder(e,t)}async open(e){this.#H(),e&&(this.mode=e),this.#z(this.mode);let t=this.#v();if(!t)return null;try{this.#u=await this.#b(t,this.preferredDevice,this.preferredAudioDevice,this.mode)}catch{return null}return this.#S(),this.#C(this.#u),await this.#w(t),await this.#T(t),this.hidden=!1,new Promise(e=>{this.#g=e})}async#b(e,t,n,r){let i=await this.#x(e,n,r);if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}},audio:i})}catch{}try{return await e.getUserMedia({video:!0,audio:i})}catch(t){if(i===!1)throw t;return this.#r.textContent=`Microphone unavailable — recording video only.`,e.getUserMedia({video:!0,audio:!1})}}async#x(e,t,n){if(n!==`video`)return!1;if(t)return{deviceId:{exact:t}};let r=[];try{r=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{r=[]}let i=o(a(r,`microphone`));return!i||{deviceId:{exact:i}}}#S(){this.#d=this.#u?.getAudioTracks()[0]??null}#C(e){this.#e.srcObject=e,this.#e.muted=!0,this.#e.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#e.toggleAttribute(`data-mirrored`,t!==`environment`)}async#w(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}let n=a(t,`camera`);this.#t.replaceChildren(...n.map(e=>E(`option`,{value:e.deviceId},e.label)));let r=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;r&&(this.#t.value=r),this.#t.toggleAttribute(`hidden`,!i(n))}async#T(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{t=[]}let n=a(t,`microphone`);this.#n.replaceChildren(...n.map(e=>E(`option`,{value:e.deviceId},e.label)));let r=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??o(n);r&&n.some(e=>e.deviceId===r)&&(this.#n.value=r),this.#E()}#E(){if(!this.#n)return;let e=this.#n.options.length>=2,t=this.mode===`video`&&e;this.#n.toggleAttribute(`hidden`,!t)}async#D(e){let t=this.#v();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#F();let r=n;if(this.mode===`video`&&this.#d&&this.#d.readyState===`live`)r.addTrack(this.#d);else if(this.mode===`video`)try{let e=await t.getUserMedia({audio:await this.#x(t,this.preferredAudioDevice,`video`)});for(let t of e.getAudioTracks())this.#d=t,r.addTrack(t)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}this.#u=r,this.#C(r),this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`camera`},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}async#O(e){let t=this.#v();if(!t||!this.#u)return;this.#r.textContent=``;let n;try{n=await t.getUserMedia({audio:{deviceId:{exact:e}}})}catch{this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}let r=n.getAudioTracks()[0];if(!r){this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}if(this.#d){try{this.#u.removeTrack(this.#d)}catch{}this.#d.stop()}this.#u.addTrack(r),this.#d=r,this.preferredAudioDevice=e,this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`microphone`},bubbles:!0,composed:!0}))}#k(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#e.videoWidth,e.height=this.#e.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#e,0,0);let t=`image/png`,n=e.toDataURL(t);this.#R({kind:`image`,dataUrl:n,mimeType:t,width:e.width,height:e.height})}#A(){if(!this.#u||this.#f)return;this.#p=[];let e=on(),t;try{t=this.#y(this.#u,{mimeType:e})}catch{this.#r.textContent=`Recording is not supported in this browser.`;return}t.ondataavailable=e=>{e.data&&e.data.size>0&&this.#p.push(e.data)},t.onstop=()=>this.#M(e);try{t.start()}catch{this.#r.textContent=`Could not start recording.`;return}this.#f=t,this.#m=Date.now(),this.#n.disabled=!0,this.#t.disabled=!0,this.#i.hidden=!1,this.#i.textContent=sn(0),this.#h=setInterval(()=>{this.#i.textContent=sn(Date.now()-this.#m)},250),this.#B()}#j(){let e=this.#f;if(e)try{e.state!==`inactive`&&e.stop()}catch{this.#M(e.mimeType||`video/webm`)}}#M(e){let t=this.#m?Date.now()-this.#m:0;this.#N();let n=this.#f?.mimeType||e||`video/webm`,r=new Blob(this.#p,{type:n});this.#p=[],this.#f=null,this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1);let i=typeof URL<`u`?URL.createObjectURL(r):void 0;this.#R({kind:`video`,blob:r,dataUrl:i,mimeType:n,width:this.#e.videoWidth,height:this.#e.videoHeight,durationMs:t})}#N(){this.#h!=null&&(clearInterval(this.#h),this.#h=null),this.#i.hidden=!0,this.#i.textContent=``,this.#m=0}#P(){let e=this.#f;if(this.#f=null,this.#p=[],this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1),e){e.ondataavailable=null,e.onstop=null;try{e.state!==`inactive`&&e.stop()}catch{}}}#F(){for(let e of this.#u?.getVideoTracks()??[])e.stop()}#I(){for(let e of this.#u?.getTracks()??[])e.stop();this.#u=null,this.#d=null,this.#e&&(this.#e.srcObject=null)}#L(){this.dispatchEvent(new CustomEvent(`slicc-capture-cancel`,{bubbles:!0,composed:!0})),this.#R(null)}#R(e){e&&this.dispatchEvent(new CustomEvent(`slicc-capture`,{detail:e,bubbles:!0,composed:!0})),this.#N(),this.#P(),this.#I();let t=this.#g;this.#g=null,this.hidden=!0,t?.(e)}#z(e){let t=e===`video`;this.#s.setAttribute(`aria-pressed`,String(!t)),this.#c.setAttribute(`aria-pressed`,String(t)),this.#r.textContent=t?`Mic on — video will record audio.`:``,this.#B(),this.#E()}#B(){let e=this.#a;if(e.replaceChildren(),this.mode===`photo`){e.className=`slicc-capture__btn slicc-capture__btn--primary`,e.setAttribute(`part`,`snap`),e.setAttribute(`aria-label`,`Snap photo`),e.append(n(`camera`,{size:14}),document.createTextNode(` Snap`));return}this.#f?(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`stop`),e.setAttribute(`aria-label`,`Stop recording`),e.append(E(`span`,{class:`slicc-capture__square`}),document.createTextNode(` Stop`))):(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`record`),e.setAttribute(`aria-label`,`Start recording`),e.append(E(`span`,{class:`slicc-capture__dot`}),document.createTextNode(` Record`)))}#V(){if(this.mode===`photo`){this.#k();return}this.#f?this.#j():this.#A()}#H(){if(this.#l)return;this.#l=!0,this.#e=E(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=E(`div`,{class:`slicc-capture__status`}),this.#t=E(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=E(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=E(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},n(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=E(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},n(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=E(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=E(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=E(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},n(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=E(`button`,{type:`button`,class:`slicc-capture__btn slicc-capture__btn--primary`,part:`snap`,"aria-label":`Snap photo`}),this.#a.addEventListener(`click`,()=>this.#V());let t=E(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,E(`span`,{class:`slicc-capture__spacer`}),this.#i,this.#a,e);this.replaceChildren(this.#e,this.#r,t,this.#o),this.#z(this.mode)}async#U(){if(this.mode=`video`,!this.#u||this.#u.getAudioTracks().length>0)return;let e=this.#v();if(!e)return;let t=this.#u.getVideoTracks()[0]?.getSettings?.().deviceId??this.preferredDevice??null,n=await this.#x(e,this.preferredAudioDevice,`video`);try{let r=t?await e.getUserMedia({video:{deviceId:{exact:t}},audio:n}):await e.getUserMedia({video:!0,audio:n});this.#I(),this.#u=r,this.#S(),this.#C(r),await this.#T(e)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}}});var cn=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],ln={off:{label:`Secco`,gloss:`bone dry — not a drop (ask any prosecco)`,tint:`var(--txt-3)`},low:{label:`Goccia`,gloss:`one drop — bar-speak: «macchiato, solo una goccia»`,tint:`color-mix(in srgb, var(--violet) 20%, var(--txt-3))`},medium:{label:`Bagnato`,gloss:`properly wet`,tint:`color-mix(in srgb, var(--violet) 40%, var(--txt-3))`},high:{label:`Affogato`,gloss:`drowned — the menu item itself`,tint:`color-mix(in srgb, var(--violet) 60%, var(--txt-3))`},xhigh:{label:`Inzuppato`,gloss:`soaked through, biscotto-style`,tint:`color-mix(in srgb, var(--violet) 80%, var(--txt-3))`},max:{label:`Sprofondato`,gloss:`sunk to the bottom`,tint:`var(--violet)`}},un=`max`,dn=`Opus 4.8`,fn=[{name:`Opus 4.8`,provider:`Anthropic`,id:`claude-opus-4-8`},{name:`Sonnet 4.6`,provider:`Anthropic`,id:`claude-sonnet-4-6`},{name:`Haiku 4.5`,provider:`Anthropic`,id:`claude-haiku-4-5`}],pn=8;function mn(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var hn=`max`,gn=13;function _n(){return n(`sparkles`,{size:gn,class:`ic`,part:`model-icon`})}function vn(){return n(`brain`,{size:gn,class:`brain`,part:`brain`})}function yn(){return n(`chevron-down`,{size:11,part:`caret`})}var N=`http://www.w3.org/2000/svg`;function bn(){let e=document.createElementNS(N,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(N,`defs`),n=document.createElementNS(N,`linearGradient`);n.setAttribute(`id`,`meta-rainbow`),n.setAttribute(`x1`,`0`),n.setAttribute(`y1`,`0`),n.setAttribute(`x2`,`1`),n.setAttribute(`y2`,`0`);for(let[e,t]of[[`0%`,`#f43f5e`],[`28%`,`#f59e0b`],[`64%`,`#06b6d4`],[`100%`,`#8b5cf6`]]){let r=document.createElementNS(N,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var xn=D(`
|
|
1846
|
+
`,$t=`slicc-composer-capture-style`;function en(e){if(e.getElementById($t))return;let t=e.createElement(`style`);t.id=$t,t.textContent=Qt,(e.head??e.documentElement).appendChild(t)}var tn=`photo`,nn=[`video/webm;codecs=vp9,opus`,`video/webm;codecs=vp8,opus`,`video/webm`];function rn(){if(typeof MediaRecorder>`u`)return`video/webm`;for(let e of nn)if(MediaRecorder.isTypeSupported?.(e))return e;return`video/webm`}function an(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}w(`slicc-composer-capture`,class extends HTMLElement{static observedAttributes=[`mode`,`preferred-device`,`preferred-audio-device`];media=null;recorderFactory=null;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=!1;#u=null;#d=null;#f=null;#p=[];#m=0;#h=null;#g=null;#_=e=>{e.key===`Escape`&&this.#g&&this.#L()};connectedCallback(){en(this.ownerDocument),this.#H(),this.ownerDocument.addEventListener(`keydown`,this.#_)}disconnectedCallback(){if(this.ownerDocument.removeEventListener(`keydown`,this.#_),this.#N(),this.#P(),this.#I(),this.#g){let e=this.#g;this.#g=null,e(null)}}attributeChangedCallback(e,t,n){e===`mode`&&this.#l&&this.#z(n??tn)}get mode(){return this.getAttribute(`mode`)===`video`?`video`:`photo`}set mode(e){e==null?this.removeAttribute(`mode`):this.setAttribute(`mode`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}get preferredAudioDevice(){return this.getAttribute(`preferred-audio-device`)}set preferredAudioDevice(e){e==null?this.removeAttribute(`preferred-audio-device`):this.setAttribute(`preferred-audio-device`,e)}#v(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}#y(e,t){return this.recorderFactory?this.recorderFactory(e,t):new MediaRecorder(e,t)}async open(e){this.#H(),e&&(this.mode=e),this.#z(this.mode);let t=this.#v();if(!t)return null;try{this.#u=await this.#b(t,this.preferredDevice,this.preferredAudioDevice,this.mode)}catch{return null}return this.#S(),this.#C(this.#u),await this.#w(t),await this.#T(t),this.hidden=!1,new Promise(e=>{this.#g=e})}async#b(e,t,n,r){let i=await this.#x(e,n,r);if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}},audio:i})}catch{}try{return await e.getUserMedia({video:!0,audio:i})}catch(t){if(i===!1)throw t;return this.#r.textContent=`Microphone unavailable — recording video only.`,e.getUserMedia({video:!0,audio:!1})}}async#x(e,t,n){if(n!==`video`)return!1;if(t)return{deviceId:{exact:t}};let r=[];try{r=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{r=[]}let i=o(a(r,`microphone`));return!i||{deviceId:{exact:i}}}#S(){this.#d=this.#u?.getAudioTracks()[0]??null}#C(e){this.#e.srcObject=e,this.#e.muted=!0,this.#e.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#e.toggleAttribute(`data-mirrored`,t!==`environment`)}async#w(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}let n=a(t,`camera`);this.#t.replaceChildren(...n.map(e=>E(`option`,{value:e.deviceId},e.label)));let r=this.#u?.getVideoTracks()[0]?.getSettings?.().deviceId;r&&(this.#t.value=r),this.#t.toggleAttribute(`hidden`,!i(n))}async#T(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`audioinput`)}catch{t=[]}let n=a(t,`microphone`);this.#n.replaceChildren(...n.map(e=>E(`option`,{value:e.deviceId},e.label)));let r=this.#d?.getSettings?.().deviceId??this.preferredAudioDevice??o(n);r&&n.some(e=>e.deviceId===r)&&(this.#n.value=r),this.#E()}#E(){if(!this.#n)return;let e=this.#n.options.length>=2,t=this.mode===`video`&&e;this.#n.toggleAttribute(`hidden`,!t)}async#D(e){let t=this.#v();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#F();let r=n;if(this.mode===`video`&&this.#d&&this.#d.readyState===`live`)r.addTrack(this.#d);else if(this.mode===`video`)try{let e=await t.getUserMedia({audio:await this.#x(t,this.preferredAudioDevice,`video`)});for(let t of e.getAudioTracks())this.#d=t,r.addTrack(t)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}this.#u=r,this.#C(r),this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`camera`},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}async#O(e){let t=this.#v();if(!t||!this.#u)return;this.#r.textContent=``;let n;try{n=await t.getUserMedia({audio:{deviceId:{exact:e}}})}catch{this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}let r=n.getAudioTracks()[0];if(!r){this.#r.textContent=`Could not switch microphone — keeping the current one.`;return}if(this.#d){try{this.#u.removeTrack(this.#d)}catch{}this.#d.stop()}this.#u.addTrack(r),this.#d=r,this.preferredAudioDevice=e,this.dispatchEvent(new CustomEvent(`slicc-capture-device-change`,{detail:{deviceId:e,kind:`microphone`},bubbles:!0,composed:!0}))}#k(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#e.videoWidth,e.height=this.#e.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#e,0,0);let t=`image/png`,n=e.toDataURL(t);this.#R({kind:`image`,dataUrl:n,mimeType:t,width:e.width,height:e.height})}#A(){if(!this.#u||this.#f)return;this.#p=[];let e=rn(),t;try{t=this.#y(this.#u,{mimeType:e})}catch{this.#r.textContent=`Recording is not supported in this browser.`;return}t.ondataavailable=e=>{e.data&&e.data.size>0&&this.#p.push(e.data)},t.onstop=()=>this.#M(e);try{t.start()}catch{this.#r.textContent=`Could not start recording.`;return}this.#f=t,this.#m=Date.now(),this.#n.disabled=!0,this.#t.disabled=!0,this.#i.hidden=!1,this.#i.textContent=an(0),this.#h=setInterval(()=>{this.#i.textContent=an(Date.now()-this.#m)},250),this.#B()}#j(){let e=this.#f;if(e)try{e.state!==`inactive`&&e.stop()}catch{this.#M(e.mimeType||`video/webm`)}}#M(e){let t=this.#m?Date.now()-this.#m:0;this.#N();let n=this.#f?.mimeType||e||`video/webm`,r=new Blob(this.#p,{type:n});this.#p=[],this.#f=null,this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1);let i=typeof URL<`u`?URL.createObjectURL(r):void 0;this.#R({kind:`video`,blob:r,dataUrl:i,mimeType:n,width:this.#e.videoWidth,height:this.#e.videoHeight,durationMs:t})}#N(){this.#h!=null&&(clearInterval(this.#h),this.#h=null),this.#i.hidden=!0,this.#i.textContent=``,this.#m=0}#P(){let e=this.#f;if(this.#f=null,this.#p=[],this.#n&&(this.#n.disabled=!1),this.#t&&(this.#t.disabled=!1),e){e.ondataavailable=null,e.onstop=null;try{e.state!==`inactive`&&e.stop()}catch{}}}#F(){for(let e of this.#u?.getVideoTracks()??[])e.stop()}#I(){for(let e of this.#u?.getTracks()??[])e.stop();this.#u=null,this.#d=null,this.#e&&(this.#e.srcObject=null)}#L(){this.dispatchEvent(new CustomEvent(`slicc-capture-cancel`,{bubbles:!0,composed:!0})),this.#R(null)}#R(e){e&&this.dispatchEvent(new CustomEvent(`slicc-capture`,{detail:e,bubbles:!0,composed:!0})),this.#N(),this.#P(),this.#I();let t=this.#g;this.#g=null,this.hidden=!0,t?.(e)}#z(e){let t=e===`video`;this.#s.setAttribute(`aria-pressed`,String(!t)),this.#c.setAttribute(`aria-pressed`,String(t)),this.#r.textContent=t?`Mic on — video will record audio.`:``,this.#B(),this.#E()}#B(){let e=this.#a;if(e.replaceChildren(),this.mode===`photo`){e.className=`slicc-capture__btn slicc-capture__btn--primary`,e.setAttribute(`part`,`snap`),e.setAttribute(`aria-label`,`Snap photo`),e.append(n(`camera`,{size:14}),document.createTextNode(` Snap`));return}this.#f?(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`stop`),e.setAttribute(`aria-label`,`Stop recording`),e.append(E(`span`,{class:`slicc-capture__square`}),document.createTextNode(` Stop`))):(e.className=`slicc-capture__btn slicc-capture__btn--rec`,e.setAttribute(`part`,`record`),e.setAttribute(`aria-label`,`Start recording`),e.append(E(`span`,{class:`slicc-capture__dot`}),document.createTextNode(` Record`)))}#V(){if(this.mode===`photo`){this.#k();return}this.#f?this.#j():this.#A()}#H(){if(this.#l)return;this.#l=!0,this.#e=E(`video`,{class:`slicc-capture__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#e.muted=!0,this.#r=E(`div`,{class:`slicc-capture__status`}),this.#t=E(`select`,{class:`slicc-capture__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#t.addEventListener(`change`,()=>{this.#D(this.#t.value)}),this.#n=E(`select`,{class:`slicc-capture__select`,part:`audio-picker`,"aria-label":`Microphone`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#O(this.#n.value)}),this.#s=E(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`true`,"aria-label":`Photo`},n(`image`,{size:14})),this.#s.addEventListener(`click`,()=>{this.mode=`photo`}),this.#c=E(`button`,{type:`button`,class:`slicc-capture__mode-btn`,part:`mode`,"aria-pressed":`false`,"aria-label":`Video`},n(`video`,{size:14})),this.#c.addEventListener(`click`,()=>{this.#U()});let e=E(`div`,{class:`slicc-capture__mode`,role:`group`,"aria-label":`Capture mode`},this.#s,this.#c);this.#i=E(`span`,{class:`slicc-capture__timer`,hidden:!0}),this.#o=E(`button`,{type:`button`,class:`slicc-capture__close`,part:`cancel`,"aria-label":`Cancel`},n(`x`,{size:14})),this.#o.addEventListener(`click`,()=>this.#L()),this.#a=E(`button`,{type:`button`,class:`slicc-capture__btn slicc-capture__btn--primary`,part:`snap`,"aria-label":`Snap photo`}),this.#a.addEventListener(`click`,()=>this.#V());let t=E(`div`,{class:`slicc-capture__bar`},this.#t,this.#n,E(`span`,{class:`slicc-capture__spacer`}),this.#i,this.#a,e);this.replaceChildren(this.#e,this.#r,t,this.#o),this.#z(this.mode)}async#U(){if(this.mode=`video`,!this.#u||this.#u.getAudioTracks().length>0)return;let e=this.#v();if(!e)return;let t=this.#u.getVideoTracks()[0]?.getSettings?.().deviceId??this.preferredDevice??null,n=await this.#x(e,this.preferredAudioDevice,`video`);try{let r=t?await e.getUserMedia({video:{deviceId:{exact:t}},audio:n}):await e.getUserMedia({video:!0,audio:n});this.#I(),this.#u=r,this.#S(),this.#C(r),await this.#T(e)}catch{this.#r.textContent=`Microphone unavailable — recording video only.`}}});var on=[`off`,`low`,`medium`,`high`,`xhigh`,`max`],sn={off:{label:`Secco`,gloss:`bone dry — not a drop (ask any prosecco)`,tint:`var(--txt-3)`},low:{label:`Goccia`,gloss:`one drop — bar-speak: «macchiato, solo una goccia»`,tint:`color-mix(in srgb, var(--violet) 20%, var(--txt-3))`},medium:{label:`Bagnato`,gloss:`properly wet`,tint:`color-mix(in srgb, var(--violet) 40%, var(--txt-3))`},high:{label:`Affogato`,gloss:`drowned — the menu item itself`,tint:`color-mix(in srgb, var(--violet) 60%, var(--txt-3))`},xhigh:{label:`Inzuppato`,gloss:`soaked through, biscotto-style`,tint:`color-mix(in srgb, var(--violet) 80%, var(--txt-3))`},max:{label:`Sprofondato`,gloss:`sunk to the bottom`,tint:`var(--violet)`}},cn=`max`,ln=`Opus 4.8`,un=[{name:`Opus 4.8`,provider:`Anthropic`,id:`claude-opus-4-8`},{name:`Sonnet 4.6`,provider:`Anthropic`,id:`claude-sonnet-4-6`},{name:`Haiku 4.5`,provider:`Anthropic`,id:`claude-haiku-4-5`}],dn=8;function fn(e){let t=typeof e==`string`?{name:e}:e;return{...t,name:t.name,id:t.id??t.name}}var pn=`max`,mn=13;function hn(){return n(`sparkles`,{size:mn,class:`ic`,part:`model-icon`})}function gn(){return n(`brain`,{size:mn,class:`brain`,part:`brain`})}function _n(){return n(`chevron-down`,{size:11,part:`caret`})}var F=`http://www.w3.org/2000/svg`;function vn(){let e=document.createElementNS(F,`svg`);e.setAttribute(`width`,`0`),e.setAttribute(`height`,`0`),e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`style`,`position:absolute`);let t=document.createElementNS(F,`defs`),n=document.createElementNS(F,`linearGradient`);n.setAttribute(`id`,`meta-rainbow`),n.setAttribute(`x1`,`0`),n.setAttribute(`y1`,`0`),n.setAttribute(`x2`,`1`),n.setAttribute(`y2`,`0`);for(let[e,t]of[[`0%`,`#f43f5e`],[`28%`,`#f59e0b`],[`64%`,`#06b6d4`],[`100%`,`#8b5cf6`]]){let r=document.createElementNS(F,`stop`);r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n.appendChild(r)}return t.appendChild(n),e.appendChild(t),e}var yn=D(`
|
|
1847
1847
|
:host{display:block;}
|
|
1848
1848
|
*{box-sizing:border-box;}
|
|
1849
1849
|
.meta{display:flex;align-items:center;gap:8px;max-width:680px;margin:11px auto 0;font-family:var(--ui);}
|
|
@@ -1900,7 +1900,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
|
1900
1900
|
/* Narrow / extension-sidebar: the ⏎ / ⇧⏎ keyboard hints don't fit (and touch
|
|
1901
1901
|
users have no keyboard) — drop them regardless of the narrow-chat attribute. */
|
|
1902
1902
|
@media (max-width: 560px){ .hint{display:none;} }
|
|
1903
|
-
`);w(`slicc-composer-meta`,class extends HTMLElement{static observedAttributes=[`model`,`thinking`,`narrow`,`no-thinking`];#e;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=null;#l=!1;#u=!1;#d=``;#f=e=>{let t=e.composedPath();this.#l&&!t.includes(this)&&this.#S(),this.#u&&!t.includes(this)&&this.#D()};#p=e=>{e.key===`Escape`&&(this.#l&&(e.stopPropagation(),this.#S(),this.#r?.focus()),this.#u&&(e.stopPropagation(),this.#D(),this.#i?.focus()))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
1903
|
+
`);w(`slicc-composer-meta`,class extends HTMLElement{static observedAttributes=[`model`,`thinking`,`narrow`,`no-thinking`];#e;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=null;#l=!1;#u=!1;#d=``;#f=e=>{let t=e.composedPath();this.#l&&!t.includes(this)&&this.#S(),this.#u&&!t.includes(this)&&this.#D()};#p=e=>{e.key===`Escape`&&(this.#l&&(e.stopPropagation(),this.#S(),this.#r?.focus()),this.#u&&(e.stopPropagation(),this.#D(),this.#i?.focus()))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[yn]}connectedCallback(){this.#g()}disconnectedCallback(){this.#y(),document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)}attributeChangedCallback(){this.isConnected&&this.#g()}get model(){return this.getAttribute(`model`)??ln}set model(e){e==null?this.removeAttribute(`model`):this.setAttribute(`model`,e)}get models(){return(this.#c??[...un]).map(e=>typeof e==`string`?e:{...e})}set models(e){this.#c=Array.isArray(e)?e.slice():null,this.isConnected&&this.#g()}get#m(){return(this.#c??un).map(fn)}get#h(){return this.#c!==null&&this.#c.length===0}get thinking(){let e=this.getAttribute(`thinking`);return on.includes(e??``)?e:pn}set thinking(e){this.setAttribute(`thinking`,e)}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){this.toggleAttribute(`narrow`,e)}get noThinking(){return this.hasAttribute(`no-thinking`)}set noThinking(e){this.toggleAttribute(`no-thinking`,e)}get accented(){return this.thinking===cn}#g(){this.#y();let e=this.model,t=this.thinking,r=sn[t],i=t===cn,a=this.#h,o=a?E(`button`,{type:`button`,class:`ctl msel`,part:`model`},hn(),` `,`Add AI`):E(`button`,{type:`button`,class:`ctl msel`,part:`model`,"aria-haspopup":`menu`,"aria-expanded":`false`},hn(),` `,e,` `,E(`span`,{class:`cx`},_n())),s=E(`div`,{class:`menu`,part:`model-menu`,role:`menu`});if(this.#m.length>dn){let e=E(`input`,{class:`msearch`,part:`model-search`,type:`text`,placeholder:`Search models…`,"aria-label":`Search models`});e.value=this.#d,e.addEventListener(`input`,()=>{this.#d=e.value,this.#_()}),e.addEventListener(`click`,e=>e.stopPropagation()),s.append(e)}this.#s=E(`div`,{class:`mlist`,role:`none`}),s.append(this.#s);let c=E(`div`,{class:`mwrap`},o,s),l=!this.noThinking&&!a,u=null;if(l){let e=gn();e.style.color=r.tint;let a=E(`button`,{type:`button`,class:`ctl tsel${i?` x`:``}`,part:`thinking`,title:r.gloss,"aria-haspopup":`menu`,"aria-expanded":`false`},e,` `,E(`span`,{class:`tlabel`},r.label),` `,E(`span`,{class:`cx`},_n()));a.style.setProperty(`--tw`,r.tint);let o=E(`div`,{class:`menu tmenu`,part:`thinking-menu`,role:`menu`}),s=E(`div`,{class:`mlist`,role:`none`});for(let e of on){let r=sn[e],i=E(`button`,{type:`button`,class:`mitem titem`,role:`menuitemradio`,"data-level":e,"aria-selected":e===t?`true`:`false`,title:r.gloss},E(`span`,{class:`mname`},r.label),E(`span`,{class:`tick`},n(`check`,{size:14})));i.addEventListener(`click`,()=>this.#k(e)),s.append(i)}o.append(s),u=E(`div`,{class:`twrap`},a,o)}let d=E(`slot`,{name:`hint`});T(d,[E(`span`,{class:`kbd`},`⏎`),` send `,E(`span`,{class:`sep`}),` `,E(`span`,{class:`kbd`},`⇧⏎`),` newline`]);let f=E(`div`,{class:`meta`,part:`meta`},c,u??!1,E(`div`,{class:`mspacer`}),E(`span`,{class:`hint`,part:`hint`},d));this.#e.replaceChildren(vn(),f),this.#a=c,this.#o=this.#e.querySelector(`.twrap`),this.#r=this.#e.querySelector(`.msel`),this.#i=this.#e.querySelector(`.tsel`),this.#_(),this.#C(),this.#O(),this.#v()}#_(){let e=this.#s;if(!e)return;let t=this.#d.trim().toLowerCase(),r=this.#m.filter(e=>!t||`${e.name} ${e.provider??``}`.toLowerCase().includes(t)),i=this.model,a=[];for(let e of r){let t=e.name===i,r=E(`button`,{type:`button`,class:`mitem`,role:`menuitemradio`,"data-id":e.id,"aria-selected":t?`true`:`false`},E(`span`,{class:`mname`},e.name),e.provider?E(`span`,{class:`mprov`},e.provider):!1,E(`span`,{class:`tick`},n(`check`,{size:14})));r.addEventListener(`click`,()=>this.#w(e.id)),a.push(r)}e.replaceChildren(...a.length?a:[E(`div`,{class:`mempty`},`No models match.`)])}#v(){this.#r&&(this.#t=e=>{if(e.stopPropagation(),this.#h){this.dispatchEvent(new CustomEvent(`add-ai`,{bubbles:!0,composed:!0}));return}this.#b()},this.#r.addEventListener(`click`,this.#t)),this.#i&&(this.#n=()=>this.#T(),this.#i.addEventListener(`click`,this.#n))}#y(){this.#r&&this.#t&&this.#r.removeEventListener(`click`,this.#t),this.#i&&this.#n&&this.#i.removeEventListener(`click`,this.#n),this.#t=null,this.#n=null,this.#r=null,this.#i=null,this.#a=null,this.#o=null,this.#s=null}get menuOpen(){return this.#l}openMenu(){this.#h||this.#x()}#b(){this.#l?this.#S():this.#x()}#x(){if(this.#l)return;this.#D(),this.#l=!0,this.#d=``,this.#_(),this.#C();let e=this.#e.querySelector(`.msearch`);e&&(e.value=``,requestAnimationFrame(()=>e.focus())),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0)}#S(){this.#l&&(this.#l=!1,this.#C(),this.#u||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#C(){this.#a?.classList.toggle(`open`,this.#l),this.#r?.setAttribute(`aria-expanded`,this.#l?`true`:`false`)}#w(e){let t=this.#m.find(t=>t.id===e)??{name:e,id:e,provider:void 0};this.#S(),t.name!==this.model&&(this.model=t.name),this.dispatchEvent(new CustomEvent(`model-change`,{detail:{model:t.name,provider:t.provider,id:t.id},bubbles:!0,composed:!0}))}#T(){this.#u?this.#D():this.#E()}#E(){this.#u||(this.#S(),this.#u=!0,this.#O(),document.addEventListener(`mousedown`,this.#f),document.addEventListener(`keydown`,this.#p,!0))}#D(){this.#u&&(this.#u=!1,this.#O(),this.#l||(document.removeEventListener(`mousedown`,this.#f),document.removeEventListener(`keydown`,this.#p,!0)))}#O(){this.#o?.classList.toggle(`open`,this.#u),this.#i?.setAttribute(`aria-expanded`,this.#u?`true`:`false`)}#k(e){this.#D(),this.thinking=e,this.dispatchEvent(new CustomEvent(`thinking-change`,{detail:{thinking:e,label:sn[e].label,accented:e===cn},bubbles:!0,composed:!0}))}});async function bn(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function xn(e,t={}){let n=(e??``).trim().toLowerCase();if(n===``)return null;let r=await bn(n),i=t.size??80,a=t.fallback??`mp`;return`https://www.gravatar.com/avatar/${r}?s=${i}&d=${encodeURIComponent(a)}`}var Sn=D(`
|
|
1904
1904
|
:host { display: inline-flex; }
|
|
1905
1905
|
:host([hidden]) { display: none; }
|
|
1906
1906
|
|
|
@@ -2103,7 +2103,7 @@ slicc-composer-capture .slicc-capture__timer[hidden] {
|
|
|
2103
2103
|
}
|
|
2104
2104
|
.glyph.is-press { transform: none; }
|
|
2105
2105
|
}
|
|
2106
|
-
`),
|
|
2106
|
+
`),I=18,Cn=72,wn=`http://www.w3.org/2000/svg`,Tn=15,En=.25;function Dn(e){let t=document.createElementNS(wn,`svg`);t.setAttribute(`width`,`36`),t.setAttribute(`height`,`36`),t.setAttribute(`viewBox`,`0 0 36 36`),t.setAttribute(`fill`,`none`),t.setAttribute(`aria-hidden`,`true`);let n=2*Math.PI*Tn,r=e=>{let t=document.createElementNS(wn,`circle`);return t.setAttribute(`cx`,`18`),t.setAttribute(`cy`,`18`),t.setAttribute(`r`,String(Tn)),t.setAttribute(`fill`,`none`),t.setAttribute(`stroke-width`,`2.5`),t.setAttribute(`stroke-linecap`,`round`),t.setAttribute(`class`,e),t};t.appendChild(r(`ring-track`));let i=r(`ring-arc`),a=e==null?En:Math.max(0,Math.min(1,e));return i.setAttribute(`stroke-dasharray`,`${n*a} ${n}`),e!=null&&i.setAttribute(`transform`,`rotate(-90 18 18)`),t.appendChild(i),t}function On(e){return e===`tool`?`tool`:`thinking`}function kn(e){if(e==null||e.trim()===``)return null;let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(1,t)):null}w(`slicc-send-button`,class extends HTMLElement{static observedAttributes=[`disabled`,`busy`,`phase`,`progress`,`email`,`src`,`label`];#e;#t=null;#n=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Sn]}connectedCallback(){this.#d()}attributeChangedCallback(){this.isConnected&&this.#d()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,!!e)}get phase(){return On(this.getAttribute(`phase`))}set phase(e){this.setAttribute(`phase`,On(e))}get progress(){return kn(this.getAttribute(`progress`))}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(e))}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#r=()=>{if(!this.disabled){if(this.busy){this.dispatchEvent(new CustomEvent(`stop`,{bubbles:!0,composed:!0}));return}this.#l(),this.dispatchEvent(new CustomEvent(`send`,{bubbles:!0,composed:!0}))}};#i(){return this.#e.querySelector(`.glyph`)}#a=()=>{this.disabled||this.busy||this.#i()?.classList.add(`is-hover`)};#o=()=>{this.#i()?.classList.remove(`is-hover`,`is-press`)};#s=()=>{if(this.disabled||this.busy)return;let e=this.#i();e?.classList.add(`is-press`),e?.classList.remove(`is-hover`)};#c=()=>{this.#i()?.classList.remove(`is-press`)};#l(){let e=this.#e.querySelector(`.glyph`);e&&(e.classList.remove(`is-whoosh`),e.offsetWidth,e.classList.add(`is-whoosh`),e.addEventListener(`animationend`,()=>e.classList.remove(`is-whoosh`),{once:!0}))}#u(){let e=++this.#n;if(!this.#t)return;let t=t=>{if(e!==this.#n)return;let n=this.#t;if(n)if(n.querySelector(`.face`)?.remove(),t){let e=document.createElement(`img`);e.className=`face`,e.setAttribute(`part`,`face`),e.alt=``,e.src=t,n.prepend(e),n.classList.add(`has-face`)}else n.classList.remove(`has-face`)},n=this.src;if(n){t(n);return}let r=this.email;if(!r||r.trim()===``){t(null);return}t(null),xn(r,{size:Cn}).then(t).catch(()=>t(null))}#d(){let e=this.busy,t=this.disabled,r=e&&this.phase===`tool`,i=this.label??(e?`Stop`:`Send`),a;if(r){let e=this.progress,t=e==null;a=E(`slot`,{name:`busy`},E(`span`,{class:`stop`,part:`stop`},n(`square`,{size:I})),E(`span`,{class:`spinner${t?` is-indeterminate`:``}`,part:`spinner`},Dn(e)))}else a=e?E(`slot`,{name:`busy`},E(`span`,{class:`stop`,part:`stop`},n(`square`,{size:I}),E(`span`,{class:`stop-fill`},n(`square`,{size:I})))):E(`slot`,null,E(`span`,{class:`glyph`,part:`glyph`},n(`arrow-up`,{size:I})));let o=E(`button`,{part:`button`,class:`send${e?` is-busy`:``}${r?` is-tool`:``}`,type:`button`,title:i,"aria-label":i,disabled:t||void 0},a);this.#e.replaceChildren(o),this.#t=o,this.#t.addEventListener(`click`,this.#r),this.#t.addEventListener(`pointerenter`,this.#a),this.#t.addEventListener(`pointerleave`,this.#o),this.#t.addEventListener(`pointerdown`,this.#s),this.#t.addEventListener(`pointerup`,this.#c),this.#u()}});var An=`
|
|
2107
2107
|
slicc-input-card {
|
|
2108
2108
|
display: block;
|
|
2109
2109
|
}
|
|
@@ -2157,7 +2157,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2157
2157
|
flex: 1;
|
|
2158
2158
|
min-width: 0;
|
|
2159
2159
|
}
|
|
2160
|
-
`,
|
|
2160
|
+
`,jn=`slicc-input-card-style`;function Mn(e){if(e.getElementById(jn))return;let t=e.createElement(`style`);t.id=jn,t.textContent=An,(e.head??e.documentElement).appendChild(t)}var Nn=`Ask sliccy, or describe a change…`;w(`slicc-input-card`,class extends HTMLElement{static observedAttributes=[`value`,`placeholder`,`suggestion`,`disabled`];#e;#t;#n;#r=!1;connectedCallback(){Mn(this.ownerDocument),this.#i(),this.#a(),this.#u()}attributeChangedCallback(e,t,n){!this.#r||t===n||(this.#a(),e===`value`&&this.#u())}get value(){return this.#r?this.#t.value:this.getAttribute(`value`)??``}set value(e){let t=e??``;this.#r&&(this.#t.value=t,this.#u()),t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t)}get placeholder(){return this.getAttribute(`placeholder`)??Nn}set placeholder(e){e==null?this.removeAttribute(`placeholder`):this.setAttribute(`placeholder`,e)}get suggestion(){return this.getAttribute(`suggestion`)}set suggestion(e){e==null||e===``?this.removeAttribute(`suggestion`):this.setAttribute(`suggestion`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,!!e)}focus(e){this.#i(),this.#t.focus(e)}clear(){this.value=``}#i(){if(this.#r)return;this.#r=!0;let e=this.ownerDocument,t=Array.from(this.children).filter(e=>e.getAttribute(`slot`)===`toolbar`);if(this.replaceChildren(),this.#e=e.createElement(`div`),this.#e.className=`slicc-input-card__card`,this.#e.setAttribute(`part`,`card`),this.#t=e.createElement(`textarea`),this.#t.className=`ta`,this.#t.setAttribute(`part`,`textarea`),this.#t.rows=1,this.#n=e.createElement(`div`),this.#n.className=`toolbar`,this.#n.setAttribute(`part`,`toolbar`),t.length>0)for(let e of t)this.#n.appendChild(e);else this.#n.append(E(`slicc-add-menu`),E(`slicc-send-button`));this.#e.append(this.#t,this.#n),this.appendChild(this.#e),this.#t.addEventListener(`input`,this.#o),this.#t.addEventListener(`keydown`,this.#s),this.#n.addEventListener(`send`,this.#c)}#a(){if(!this.#r)return;let e=this.#t;e.placeholder=this.suggestion??this.placeholder,e.disabled=this.disabled;let t=this.getAttribute(`value`)??``;e.value!==t&&(e.value=t)}#o=e=>{e.stopPropagation();let t=this.#t.value;t===``?this.removeAttribute(`value`):this.setAttribute(`value`,t),this.#u(),this.dispatchEvent(new CustomEvent(`input`,{bubbles:!0,composed:!0,detail:{value:t}}))};#s=e=>{if(e.isComposing)return;if(e.key===`Enter`&&!e.shiftKey&&!e.altKey){e.preventDefault(),this.#l(void 0,e.ctrlKey||e.metaKey);return}if(e.key===`Tab`&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let t=this.suggestion;if(t&&this.#t.value===``){e.preventDefault(),this.removeAttribute(`suggestion`);let n=this.#t;n.value=t,n.setSelectionRange(t.length,t.length),n.dispatchEvent(new Event(`input`,{bubbles:!0}))}return}let t=this.#t,n=t.selectionStart===t.selectionEnd;e.key===`ArrowUp`&&n&&t.selectionStart===0?(e.preventDefault(),this.dispatchEvent(new CustomEvent(`history-up`,{bubbles:!0,composed:!0}))):e.key===`ArrowDown`&&n&&t.selectionStart===t.value.length&&this.dispatchEvent(new CustomEvent(`history-down`,{bubbles:!0,composed:!0}))};#c=e=>{e.stopPropagation(),this.#l()};submit(e){this.#i(),this.#l(e)}focusEnd(){if(!this.#r)return;let e=this.#t;e.focus();let t=e.value.length;e.setSelectionRange(t,t)}#l(e,t){if(this.disabled)return;let n=this.#t.value;n.trim()!==``&&(this.removeAttribute(`suggestion`),this.dispatchEvent(new CustomEvent(`submit`,{bubbles:!0,composed:!0,detail:{value:n,...e?{source:e}:{},...t?{steer:!0}:{}}})))}#u(){if(!this.#r)return;let e=this.#t;e.style.height=`auto`;let t=e.scrollHeight;e.style.height=`${Math.min(t,140)}px`,e.style.overflowY=t>140?`auto`:`hidden`}});var Pn=D(`
|
|
2161
2161
|
:host{display:block;font-family:var(--ui);}
|
|
2162
2162
|
:host(:not([count])),:host([count="0"]),:host([count="-0"]){display:none;}
|
|
2163
2163
|
.wrap{display:flex;flex-direction:column;align-items:stretch;gap:6px;}
|
|
@@ -2178,7 +2178,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2178
2178
|
:host-context(body.dark) .dismiss:hover,:host-context(body.dark) .dismiss:focus-visible,
|
|
2179
2179
|
:host-context(.dark) .dismiss:hover,:host-context(.dark) .dismiss:focus-visible,
|
|
2180
2180
|
:host-context([data-theme="dark"]) .dismiss:hover,:host-context([data-theme="dark"]) .dismiss:focus-visible{background:color-mix(in srgb,#0a0a0a 14%,transparent);}
|
|
2181
|
-
`),
|
|
2181
|
+
`),Fn=[{rot:0,x:0,y:0},{rot:-2,x:-3,y:-2},{rot:2,x:3,y:-4},{rot:-3,x:-5,y:-6},{rot:3,x:5,y:-8},{rot:-1,x:-2,y:-10},{rot:1,x:2,y:-12}];function In(e){return Fn[Math.min(e,Fn.length-1)]??Fn[0]}w(`slicc-queued-stack`,class extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Pn]}connectedCallback(){this.#i()}get count(){return this.#t.length}setMessages(e){this.#t=e.slice(),this.setAttribute(`count`,String(this.#t.length)),this.#i()}#n(e){this.dispatchEvent(new CustomEvent(`slicc-queued-remove`,{detail:{id:e},bubbles:!0,composed:!0}))}#r(e,t,r,i){let{rot:a,x:o,y:s}=In(t),c=r?`none`:`translate(${o}px, ${s}px) rotate(${a}deg)`,l=`card${r?` is-front`:``}${t===0?``:t===1?` is-back`:` is-deep`}`,u=r?`card front`:`card`,d=`transform:${c};z-index:${i};`,f=[E(`span`,{class:`bubble`},e.text)];if(e.attachments&&e.attachments>0&&f.push(E(`span`,{class:`attach`},`+${e.attachments}`)),r){let t=E(`button`,{type:`button`,class:`dismiss`,part:`dismiss`,"aria-label":`Remove queued message`},n(`x`,{size:14}));t.addEventListener(`click`,t=>{t.stopPropagation(),this.#n(e.id)}),f.push(t)}return E(`div`,{class:l,part:u,style:d},...f)}#i(){if(this.#t.length===0){this.#e.replaceChildren();return}let e=this.#t.length,t=[];for(let n=e-1;n>=0;n--){let r=e-1-n,i=r===0,a=n+1,o=this.#t[n];o&&t.push(this.#r(o,r,i,a))}let r=E(`div`,{class:`stack`,part:`stack`},...t),i=E(`div`,{class:`wrap`},E(`span`,{class:`badge`,part:`badge`},n(`clock`,{size:11}),`${e} queued`),r);this.#e.replaceChildren(i)}});var Ln=1e3;function Rn(e,t){let n=t.longPressMs??1e3,r=t.modifierClickAsLongPress??!0,i=null,a=!1,o=()=>{t.onPressEnd?.()},s=()=>{i!==null&&(clearTimeout(i),i=null),o()},c=e=>{e.button===0&&(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(a=!1,s(),t.onPressStart?.(e),i=setTimeout(()=>{a=!0,o(),i=null,t.onLongPress()},n)))},l=()=>s(),u=()=>s(),d=()=>s(),f=()=>s(),p=e=>{if(a){a=!1,e.preventDefault();return}if((e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)&&r){e.preventDefault(),t.onLongPress();return}t.onShortClick(e)};return e.addEventListener(`mousedown`,c),e.addEventListener(`mouseup`,l),e.addEventListener(`mouseleave`,u),e.addEventListener(`blur`,d),e.addEventListener(`contextmenu`,f),e.addEventListener(`click`,p),{destroy:()=>{s(),e.removeEventListener(`mousedown`,c),e.removeEventListener(`mouseup`,l),e.removeEventListener(`mouseleave`,u),e.removeEventListener(`blur`,d),e.removeEventListener(`contextmenu`,f),e.removeEventListener(`click`,p)}}}var zn=D(`
|
|
2182
2182
|
:host { display: inline-grid; }
|
|
2183
2183
|
:host([hidden]) { display: none; }
|
|
2184
2184
|
|
|
@@ -2260,7 +2260,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2260
2260
|
|
|
2261
2261
|
.glyph { display: grid; place-items: center; line-height: 1; }
|
|
2262
2262
|
.glyph svg { display: block; }
|
|
2263
|
-
`),
|
|
2263
|
+
`),Bn=`square`,Vn=18;w(`slicc-dock-item`,class extends HTMLElement{static observedAttributes=[`item-id`,`kind`,`hue`,`icon`,`tip`,`active`,`lit`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[zn]}disconnectedCallback(){this.#t?.destroy(),this.#t=null}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get itemId(){return this.getAttribute(`item-id`)}set itemId(e){e==null?this.removeAttribute(`item-id`):this.setAttribute(`item-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get hue(){return this.getAttribute(`hue`)}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get icon(){return this.getAttribute(`icon`)??Bn}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get tip(){return this.getAttribute(`tip`)}set tip(e){e==null?this.removeAttribute(`tip`):this.setAttribute(`tip`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,!!e)}get lit(){return this.hasAttribute(`lit`)}set lit(e){this.toggleAttribute(`lit`,!!e)}#n(){let e=[`di`];this.kind===`sprinkle`&&e.push(`sp`),this.active&&e.push(`on`),this.lit&&e.push(`lit`);let t=this.tip,r=n(this.icon,{size:Vn,part:`icon`}),i=t??this.itemId??`dock item`,a=E(`button`,{type:`button`,part:`button`,class:e.join(` `),"aria-label":i,"aria-pressed":this.active?`true`:`false`},E(`span`,{class:`glyph`,part:`glyph`},E(`slot`,null,r)),t?E(`span`,{class:`tip`,part:`tip`},t):null),o=this.hue;o&&a.style.setProperty(`--h`,o),this.#t?.destroy(),this.#t=Rn(a,{onShortClick:this.#r,onLongPress:()=>this.#i(`longpress`)}),this.#e.replaceChildren(a)}#r=()=>{this.#i(this.active?`collapse`:`select`)};#i(e){this.dispatchEvent(new CustomEvent(e,{detail:{id:this.itemId},bubbles:!0,composed:!0}))}});var Hn=[{id:`browser`,icon:`globe`,label:`Browser · CDP`,kind:`tool`},{id:`files`,icon:`folder`,label:`Files · VFS`,kind:`tool`},{id:`term`,icon:`square-terminal`,label:`Terminal`,kind:`tool`},{id:`memory`,icon:`brain`,label:`Memory`,kind:`tool`},{id:`monitor`,icon:`activity`,label:`Monitor`,kind:`tool`}],Un={id:`new`,icon:`plus`,label:`New sprinkle`,kind:`sprinkle`},Wn=`
|
|
2264
2264
|
.slicc-dock {
|
|
2265
2265
|
flex: 0 0 48px;
|
|
2266
2266
|
box-sizing: border-box;
|
|
@@ -2281,7 +2281,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2281
2281
|
margin: 2px 0;
|
|
2282
2282
|
}
|
|
2283
2283
|
.slicc-dock .grow { flex: 1; }
|
|
2284
|
-
`,
|
|
2284
|
+
`,Gn=`slicc-dock-style`;function Kn(e){if(e.getElementById(Gn))return;let t=e.createElement(`style`);t.id=Gn,t.textContent=Wn,(e.head??e.documentElement).appendChild(t)}function qn(e){return e===`sprinkle`?`sprinkle`:`tool`}w(`slicc-dock`,class extends HTMLElement{static get observedAttributes(){return[`active`,`system-tools`]}#e=[];#t=null;#n=null;#r=null;#i=!1;connectedCallback(){Kn(this.ownerDocument),this.classList.add(`slicc-dock`),this.setAttribute(`part`,`rail`),this.setAttribute(`role`,`toolbar`),this.setAttribute(`aria-orientation`,`vertical`),this.#i||=(this.#a(),!0),this.#t||(this.#t=e=>this.#u(e),this.#n=e=>this.#d(e),this.#r=e=>this.#f(e),this.addEventListener(`select`,this.#t),this.addEventListener(`collapse`,this.#n),this.addEventListener(`longpress`,this.#r)),this.#c()}disconnectedCallback(){this.#t&&=(this.removeEventListener(`select`,this.#t),null),this.#n&&=(this.removeEventListener(`collapse`,this.#n),null),this.#r&&=(this.removeEventListener(`longpress`,this.#r),null)}attributeChangedCallback(e){this.#i&&(e===`active`?this.#l():e===`system-tools`&&this.#c())}get items(){return this.#e.map(e=>({...e}))}set items(e){this.#e=Array.isArray(e)?e.map(e=>({...e})):[],this.#i&&this.isConnected&&this.#c()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get systemTools(){return this.hasAttribute(`system-tools`)}set systemTools(e){this.toggleAttribute(`system-tools`,!!e)}selectItem(e){this.active=e,this.dispatchEvent(new CustomEvent(`slicc-dock-select`,{detail:{id:e,kind:this.#o(e)},bubbles:!0,composed:!0}))}clearActive(){this.active=null}collapse(){let e=this.active;this.active=null,e!=null&&this.dispatchEvent(new CustomEvent(`slicc-dock-collapse`,{detail:{id:e},bubbles:!0,composed:!0}))}#a(){let e=[...this.querySelectorAll(`slicc-dock-item`)];if(e.length===0)return;let t=[];for(let n of e){let e=qn(n.getAttribute(`kind`)),r=n.getAttribute(`item-id`)??n.dataset.t??n.getAttribute(`tip`)??``;e===`tool`||r===`new`||r===``||t.push({id:r,icon:n.getAttribute(`icon`)??void 0,label:n.getAttribute(`tip`)??void 0,kind:`sprinkle`,hue:n.getAttribute(`hue`)??void 0})}for(let t of e)t.remove();this.#e.length===0&&(this.#e=t)}#o(e){return Hn.some(t=>t.id===e)?`tool`:e===Un.id?`sprinkle`:this.#e.find(t=>t.id===e)?.kind??`tool`}#s(e,t){let n=e.id,r=qn(e.kind),i=e.icon??``,a=e.label??n,o=t!=null&&t===n,s=e.hue;return E(`slicc-dock-item`,{"data-t":n,"item-id":n,kind:r,icon:i||!1,tip:a,hue:s||!1,active:o})}#c(){let e=this.active,t=[];for(let n of this.#e)qn(n.kind)===`sprinkle`&&t.push(this.#s(n,e));if(t.push(this.#s(Un,e)),t.push(E(`div`,{class:`grow`})),this.systemTools){t.push(E(`div`,{class:`div`}));for(let n of Hn)t.push(this.#s(n,e))}this.replaceChildren(),T(this,t)}#l(){let e=this.active;for(let t of this.querySelectorAll(`slicc-dock-item`))t.toggleAttribute(`active`,t.dataset.t===e)}#u(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.selectItem(t))}#d(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&(this.active=t),this.collapse())}#f(e){let t=this.#p(e);t!=null&&(e.stopPropagation(),this.active!==t&&this.selectItem(t),this.dispatchEvent(new CustomEvent(`slicc-dock-longpress`,{detail:{id:t,kind:this.#o(t)},bubbles:!0,composed:!0})))}#p(e){let t=e.detail;if(t&&typeof t.id==`string`)return t.id;let n=e.target?.closest(`slicc-dock-item`);return n&&this.contains(n)?n.dataset.t??null:null}});var Jn=D(`
|
|
2285
2285
|
:host { display: none; }
|
|
2286
2286
|
:host([open]) { display: block; }
|
|
2287
2287
|
.overlay {
|
|
@@ -2358,7 +2358,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2358
2358
|
color: rgba(255,255,255,.7); font-family: var(--ui); font-size: 14px;
|
|
2359
2359
|
}
|
|
2360
2360
|
@media (prefers-reduced-motion: reduce) { .overlay, .card { transition: none; } }
|
|
2361
|
-
`),
|
|
2361
|
+
`),Yn=`Open tabs`;w(`slicc-tab-overlay`,class extends HTMLElement{static observedAttributes=[`open`,`heading`];#e;#t=[];#n=null;#r=null;#i=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#u(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Jn]}connectedCallback(){this.#s(),this.#c()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#i,!0)}attributeChangedCallback(e){this.isConnected&&(e===`open`?this.#c():this.#s())}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get heading(){return this.getAttribute(`heading`)??Yn}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tabs(){return this.#t.map(e=>({...e}))}set tabs(e){this.#t=Array.isArray(e)?e.map(e=>({...e})):[],this.isConnected&&this.#s()}show(){this.open||=!0}hide(){this.open&&this.#u(`api`)}#a(){let e=E(`button`,{class:`close`,part:`close`,type:`button`,"aria-label":`Close tabs overlay`},n(`x`,{size:18}));return e.addEventListener(`click`,()=>this.#u(`close-button`)),e}#o(e){let t=e.title??e.id,r=e.screenshot?E(`img`,{class:`shot`,part:`shot`,src:e.screenshot,alt:t,loading:`lazy`}):E(`div`,{class:`shot ph`,part:`shot`},n(`globe`,{size:28})),i=E(`button`,{class:`x`,part:`card-close`,type:`button`,"aria-label":`Close ${t}`},n(`x`,{size:14}));i.addEventListener(`click`,t=>{t.stopPropagation(),this.#l(`tab-close`,e.id)});let a=E(`div`,{class:`label`},E(`span`,{class:`name`,part:`title`},t),e.url?E(`span`,{class:`url`},e.url):null),o=E(`div`,{class:e.active?`card on`:`card`,part:`card`,role:`button`,tabindex:`0`,"data-tab-id":e.id,"aria-label":t,"aria-current":e.active?`true`:!1},r,E(`div`,{class:`meta`},a,i));return o.addEventListener(`click`,()=>this.#l(`tab-activate`,e.id)),o.addEventListener(`keydown`,t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),this.#l(`tab-activate`,e.id))}),o}#s(){let e=E(`div`,{class:`bar`,part:`bar`},E(`span`,{class:`title`},this.heading),E(`span`,{class:`count`},String(this.#t.length)),E(`span`,{class:`grow`}),this.#a()),t;if(this.#t.length===0)t=E(`div`,{class:`empty`},`No open tabs.`);else{t=E(`div`,{class:`grid`,part:`grid`,role:`list`});for(let e of this.#t)t.appendChild(this.#o(e))}this.#n=E(`div`,{class:`overlay`,part:`overlay`},e,t),this.#n.addEventListener(`mousedown`,e=>{e.target===this.#n&&this.#u(`backdrop`)}),this.#e.replaceChildren(this.#n)}#c(){this.open?(this.#r=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#i,!0),requestAnimationFrame(()=>this.#n?.querySelector(`.close`)?.focus())):(document.removeEventListener(`keydown`,this.#i,!0),this.#r?.focus?.(),this.#r=null)}#l(e,t){this.dispatchEvent(new CustomEvent(e,{detail:{id:t},bubbles:!0,composed:!0}))}#u(e){this.open=!1,this.dispatchEvent(new CustomEvent(`overlay-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}});var L=`#3b6cb2`,Xn=`
|
|
2362
2362
|
.slicc-freezer {
|
|
2363
2363
|
position: fixed;
|
|
2364
2364
|
left: 0;
|
|
@@ -2442,12 +2442,12 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2442
2442
|
|
|
2443
2443
|
/* ice-blue accent while a freezer context is active (prototype _ctxAccent) —
|
|
2444
2444
|
tints the toggle + the new-chat icon; cards keep their snow palette. */
|
|
2445
|
-
.slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${
|
|
2445
|
+
.slicc-freezer[ctx] .fztgl { color: var(--fz-ctx, ${L}); border-color: color-mix(in srgb, var(--fz-ctx, ${L}) 40%, var(--line)); }
|
|
2446
2446
|
.slicc-freezer[ctx] ::part(new-icon),
|
|
2447
2447
|
.slicc-freezer[ctx] slicc-freezer-new::part(new-icon) {
|
|
2448
|
-
background: color-mix(in srgb, var(--fz-ctx, ${
|
|
2449
|
-
border-color: color-mix(in srgb, var(--fz-ctx, ${
|
|
2450
|
-
color: var(--fz-ctx, ${
|
|
2448
|
+
background: color-mix(in srgb, var(--fz-ctx, ${L}) 14%, var(--canvas));
|
|
2449
|
+
border-color: color-mix(in srgb, var(--fz-ctx, ${L}) 40%, var(--line));
|
|
2450
|
+
color: var(--fz-ctx, ${L});
|
|
2451
2451
|
}
|
|
2452
2452
|
|
|
2453
2453
|
/* match-hidden: search filtered a session row out (only meaningful when open,
|
|
@@ -2455,7 +2455,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2455
2455
|
prototype .fzcard row. */
|
|
2456
2456
|
.slicc-freezer[open] slicc-freezer-card.match-hidden,
|
|
2457
2457
|
.slicc-freezer[open] .fzcard.match-hidden { display: none; }
|
|
2458
|
-
|
|
2458
|
+
`,Zn=`slicc-freezer-style`;function Qn(e){if(e.getElementById(Zn))return;let t=e.createElement(`style`);t.id=Zn,t.textContent=Xn,(e.head??e.documentElement).appendChild(t)}var R=`http://www.w3.org/2000/svg`;function $n(){let e=document.createElementNS(R,`svg`);for(let[t,n]of[[`width`,`14`],[`height`,`14`],[`viewBox`,`0 0 16 16`],[`fill`,`none`],[`stroke`,`currentColor`],[`stroke-width`,`1.6`],[`stroke-linecap`,`round`],[`stroke-linejoin`,`round`],[`aria-hidden`,`true`]])e.setAttribute(t,n);let t=document.createElementNS(R,`rect`);for(let[e,n]of[[`x`,`2.5`],[`y`,`3.5`],[`width`,`11`],[`height`,`9`],[`rx`,`1.5`]])t.setAttribute(e,n);let n=document.createElementNS(R,`line`);for(let[e,t]of[[`x1`,`6`],[`y1`,`3.5`],[`x2`,`6`],[`y2`,`12.5`]])n.setAttribute(e,t);let r=document.createElementNS(R,`polyline`);return r.setAttribute(`points`,`9,6.5 10.5,8 9,9.5`),e.append(t,n,r),e}w(`slicc-freezer`,class extends HTMLElement{static observedAttributes=[`open`,`ctx`,`search-placeholder`];#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){Qn(this.ownerDocument),this.classList.add(`slicc-freezer`),this.setAttribute(`part`,`freezer`),this.hasAttribute(`aria-label`)||this.setAttribute(`aria-label`,`Past sessions (freezer)`),this.#s(),this.#l(),this.#u()}disconnectedCallback(){this.#a&&this.#t&&(this.#t.removeEventListener(`click`,this.#a),this.#a=null),this.#o&&this.#n&&(this.#n.removeEventListener(`input`,this.#o),this.#o=null)}attributeChangedCallback(e,t,n){this.#i&&(e===`open`?(this.#l(),this.#u()):e===`search-placeholder`&&(this.#n.placeholder=n??`search past sessions`))}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get ctx(){return this.hasAttribute(`ctx`)}set ctx(e){this.toggleAttribute(`ctx`,e)}get searchPlaceholder(){return this.getAttribute(`search-placeholder`)??`search past sessions`}set searchPlaceholder(e){e==null?this.removeAttribute(`search-placeholder`):this.setAttribute(`search-placeholder`,e)}get query(){return this.#i?this.#n.value:``}set query(e){this.#s(),this.#n.value=e,this.#d()}get rail(){return this.#s(),this.#r}toggle(e){let t=e??!this.open;t===this.open&&this.#l(),this.open=t,this.#l(),this.#u(),this.dispatchEvent(new CustomEvent(`freezer-toggle`,{detail:{open:t},bubbles:!0,composed:!0}))}append(...e){this.#s(),this.#r.append(...e),this.#u()}#s(){if(this.#i)return;let e=this.querySelector(`:scope > .fzh`),t=this.querySelector(`:scope > .fzrail`);if(e instanceof HTMLElement&&t instanceof HTMLElement){this.#c(e,t);return}let n=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&(e.classList.contains(`fzh`)||e.classList.contains(`fzrail`)))),r=this.ownerDocument,i=r.createElement(`div`);i.className=`fzh`,i.setAttribute(`part`,`header`);let a=r.createElement(`button`);a.className=`fztgl`,a.type=`button`,a.setAttribute(`part`,`toggle`),a.setAttribute(`aria-label`,`Toggle freezer`),a.append($n());let o=r.createElement(`input`);o.className=`fzsearch`,o.type=`text`,o.setAttribute(`part`,`search`),o.placeholder=this.searchPlaceholder,o.setAttribute(`aria-label`,`Search past sessions`),i.append(a,o);let s=r.createElement(`div`);s.className=`fzrail`,s.setAttribute(`part`,`rail`);for(let e of n)s.appendChild(e);this.replaceChildren(i,s),this.#c(i,s)}#c(e,t){this.#i=!0,this.#e=e,this.#r=t;let n=e.querySelector(`.fztgl`),r=e.querySelector(`.fzsearch`);n&&(this.#t=n),r&&(this.#n=r),this.#t&&!this.#a&&(this.#a=()=>this.toggle(),this.#t.addEventListener(`click`,this.#a)),this.#n&&!this.#o&&(this.#o=()=>this.#d(),this.#n.addEventListener(`input`,this.#o))}#l(){if(!this.#t)return;let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),this.#t.title=e?`Collapse freezer`:`Expand freezer`}#u(){if(!this.#i)return;let e=this.open,t=this.#r.querySelectorAll(`slicc-freezer-card, slicc-freezer-new`);for(let n of t)n.toggleAttribute(`expanded`,e)}#d(){let e=this.#n.value.trim().toLowerCase(),t=this.#r.querySelectorAll(`slicc-freezer-card, .fzcard`);for(let n of t){let t=(n.textContent??``).toLowerCase();n.classList.toggle(`match-hidden`,e.length>0&&!t.includes(e))}}});var er=14,tr=D(`
|
|
2459
2459
|
:host {
|
|
2460
2460
|
display: inline-grid;
|
|
2461
2461
|
place-items: center;
|
|
@@ -2491,7 +2491,7 @@ slicc-input-card .toolbar slicc-add-menu {
|
|
|
2491
2491
|
nothing is slotted */
|
|
2492
2492
|
::slotted(*), .ic { line-height: 1; }
|
|
2493
2493
|
.ic { display: block; }
|
|
2494
|
-
`);w(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
2494
|
+
`);w(`slicc-snowflake`,class extends HTMLElement{static observedAttributes=[`thawed`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[tr];let e=E(`span`,{class:`snow`,part:`badge`},E(`slot`,null,n(`snowflake`,{size:er,part:`glyph`,class:`ic`})));this.#e.replaceChildren(e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}});var nr=`
|
|
2495
2495
|
slicc-freezer-card {
|
|
2496
2496
|
position: relative;
|
|
2497
2497
|
display: flex;
|
|
@@ -2584,7 +2584,7 @@ slicc-freezer-card .slicc-fzcard__meta {
|
|
|
2584
2584
|
slicc-freezer-card[thawed] {
|
|
2585
2585
|
background: color-mix(in srgb, var(--rose) 12%, transparent);
|
|
2586
2586
|
}
|
|
2587
|
-
`,
|
|
2587
|
+
`,rr=`slicc-freezer-card-style`;function ir(e){if(e.getElementById(rr))return;let t=e.createElement(`style`);t.id=rr,t.textContent=nr,(e.head??e.documentElement).appendChild(t)}var ar=1400,or=14;w(`slicc-freezer-card`,class extends HTMLElement{static observedAttributes=[`title`,`meta`,`slug`,`icon`,`thawed`];#e;#t;#n;#r;#i=null;#a=null;#o=!1;#s=null;#c=()=>this.#u();#l=()=>{if(!this.#i)return;let e=this.getBoundingClientRect();this.#i.style.setProperty(`--tip-x`,`${e.right+8}px`),this.#i.style.setProperty(`--tip-y`,`${e.top+e.height/2}px`)};connectedCallback(){ir(this.ownerDocument),this.#d(),this.#f()}disconnectedCallback(){this.removeEventListener(`click`,this.#c),this.removeEventListener(`pointerenter`,this.#l),this.removeEventListener(`focusin`,this.#l),this.#s!=null&&(clearTimeout(this.#s),this.#s=null)}attributeChangedCallback(e,t,n){t===n||!this.#o||(e===`thawed`?this.#e.toggleAttribute(`thawed`,n!==null):e===`icon`?this.#p():this.#f())}get title(){return this.getAttribute(`title`)??``}set title(e){e==null?this.removeAttribute(`title`):this.setAttribute(`title`,e)}get meta(){return this.getAttribute(`meta`)??``}set meta(e){e==null?this.removeAttribute(`meta`):this.setAttribute(`meta`,e)}get slug(){return this.getAttribute(`slug`)??``}set slug(e){e==null?this.removeAttribute(`slug`):this.setAttribute(`slug`,e)}get icon(){return this.getAttribute(`icon`)}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get thawed(){return this.hasAttribute(`thawed`)}set thawed(e){this.toggleAttribute(`thawed`,e)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){this.toggleAttribute(`hidden`,e)}get badge(){return this.#d(),this.#e}#u(){this.dispatchEvent(new CustomEvent(`freezer-card-select`,{bubbles:!0,composed:!0,detail:{slug:this.slug}})),this.flashThaw()}flashThaw(e=ar){this.#s!=null&&clearTimeout(this.#s),this.thawed=!0,this.#s=setTimeout(()=>{this.thawed=!1,this.#s=null},e)}#d(){if(this.#o)return;this.#o=!0;let e=this.querySelector(`:scope > .slicc-fzcard__text`);if(e instanceof HTMLElement){this.#t=e,this.#n=e.querySelector(`.slicc-fzcard__title`),this.#r=e.querySelector(`.slicc-fzcard__meta`),this.#e=this.querySelector(`:scope > slicc-snowflake`),this.#i=this.querySelector(`:scope > .slicc-fzcard__tip`),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l);return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-snowflake`),this.#e.setAttribute(`part`,`badge`),this.#n=E(`div`,{class:`slicc-fzcard__title`,part:`title`}),this.#r=E(`div`,{class:`slicc-fzcard__meta`,part:`meta`}),this.#t=E(`div`,{class:`slicc-fzcard__text`,part:`text`},this.#n,this.#r);for(let e of t)this.#n.appendChild(e);this.#i=E(`span`,{class:`slicc-fzcard__tip`,part:`tip`,"aria-hidden":`true`}),this.replaceChildren(this.#e,this.#t,this.#i),this.addEventListener(`click`,this.#c),this.addEventListener(`pointerenter`,this.#l),this.addEventListener(`focusin`,this.#l)}#f(){if(!this.#o)return;let e=this.getAttribute(`title`);e!=null&&(this.#n.textContent=e),this.#r.textContent=this.meta,this.#i&&(this.#i.textContent=e??(this.#n.textContent||``)),this.#e.toggleAttribute(`thawed`,this.thawed),this.#p()}#p(){if(!this.#o)return;let e=this.getAttribute(`icon`);if(e){let t=n(e,{size:or,class:`ic`,part:`icon`});this.#a?this.#a.replaceWith(t):this.#e.appendChild(t),this.#a=t}else this.#a&&=(this.#a.remove(),null)}});var sr=`square-pen`,cr=`loader-circle`,lr=16,ur=`New chat`,dr=350,fr=[[`save`,`archive`,`Save & start new`],[`skip`,`fast-forward`,`New chat — skip memory`],[`erase`,`trash-2`,`Erase & start new`]],pr=D(`
|
|
2588
2588
|
:host { display: block; }
|
|
2589
2589
|
:host([hidden]) { display: none; }
|
|
2590
2590
|
*{ box-sizing: border-box; }
|
|
@@ -2729,67 +2729,18 @@ slicc-freezer-card[thawed] {
|
|
|
2729
2729
|
.fznew, .nlbl { transition: none; }
|
|
2730
2730
|
.fznew-spinner svg { animation: none; }
|
|
2731
2731
|
}
|
|
2732
|
-
`);w(`slicc-freezer-new`,class extends HTMLElement{static observedAttributes=[`expanded`,`label`,`busy`,`progress`];#e;#t=null;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
2732
|
+
`);w(`slicc-freezer-new`,class extends HTMLElement{static observedAttributes=[`expanded`,`label`,`busy`,`progress`];#e;#t=null;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[pr]}connectedCallback(){this.#a()}disconnectedCallback(){this.#n?.destroy(),this.#n=null,this.#c()}attributeChangedCallback(e){e===`progress`&&this.#i()||this.isConnected&&this.#a()}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}get label(){return this.getAttribute(`label`)??ur}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){this.toggleAttribute(`busy`,e)}get progress(){let e=this.getAttribute(`progress`);if(e==null)return null;let t=Number.parseFloat(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):null}set progress(e){e==null?this.removeAttribute(`progress`):this.setAttribute(`progress`,String(Math.min(1,Math.max(0,e))))}#i(){let e=this.#e.querySelector(`.fznew-ring`);return!e||!this.busy||!this.hasAttribute(`progress`)?!1:(e.style.setProperty(`--fznew-progress`,String(this.progress??0)),!0)}#a(){let e=this.label,t=this.busy,r=t&&this.hasAttribute(`progress`),i=E(`span`,{class:`nico`,part:`badge`},t?E(`span`,{class:`fznew-spinner`,part:`spinner`},r?E(`span`,{class:`fznew-ring`,part:`ring`,style:`--fznew-progress:${this.progress??0}`}):null,n(cr,{size:lr,part:`icon`})):E(`slot`,{name:`icon`},n(sr,{size:lr,part:`icon`}))),a=E(`span`,{class:`nlbl`,part:`label`},E(`slot`,null,e)),o=E(`button`,{class:`fznew`,part:`button`,type:`button`,"aria-label":e,title:e,"aria-busy":t?`true`:void 0},i,a);this.#t=o,this.#s(o),this.#e.replaceChildren(o,this.#o())}#o(){let e=E(`div`,{class:`fznew-options`,part:`options`});for(let[t,r,i]of fr){let a=E(`button`,{class:`fznew-opt fznew-opt--${t}`,part:`option-${t}`,type:`button`},n(r,{size:13}),E(`span`,{class:`fznew-opt__text`},i));a.addEventListener(`click`,()=>this.#l(t)),e.appendChild(a)}return e}#s(e){this.#n?.destroy(),this.#c(),this.#n=Rn(e,{onLongPress:()=>{if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#l(`erase`)},onShortClick:()=>{if(this.#r!==null){this.#c(),this.#l(`skip`);return}this.#r=setTimeout(()=>{this.#r=null,this.#l(`save`)},dr)}})}#c(){this.#r!==null&&(clearTimeout(this.#r),this.#r=null)}#l(e){e===`save`&&(this.busy=!0),this.dispatchEvent(new CustomEvent(`new-chat-${e}`,{bubbles:!0,composed:!0}))}});var mr=`attribute vec2 a_pos; void main(){ gl_Position = vec4(a_pos,0.0,1.0); }`,hr=`precision highp float;
|
|
2733
2733
|
uniform vec2 u_res; uniform float u_time; uniform float u_energy;
|
|
2734
2734
|
uniform vec2 u_center; uniform vec3 u_evt; uniform float u_freeze; uniform float u_dark;
|
|
2735
|
-
uniform float
|
|
2736
|
-
uniform float u_blink; uniform float u_thick; uniform vec3 u_tint; uniform float u_scroll;
|
|
2735
|
+
uniform float u_falloff; uniform float u_life; uniform vec3 u_tint; uniform float u_scroll;
|
|
2737
2736
|
uniform float u_brightness; uniform float u_contrast; uniform float u_noise; uniform float u_blur;
|
|
2738
|
-
vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,
|
|
2737
|
+
vec3 themeBg(){ return mix(vec3(0.97,0.95,0.89), vec3(0.09,0.08,0.06), u_dark); }`,z=`
|
|
2739
2738
|
float hash21(vec2 p){ p=fract(p*vec2(123.34,456.21)); p+=dot(p,p+45.32); return fract(p.x*p.y); }
|
|
2740
2739
|
float vnoise(vec2 p){ vec2 i=floor(p),f=fract(p);
|
|
2741
2740
|
float a=hash21(i),b=hash21(i+vec2(1.,0.)),c=hash21(i+vec2(0.,1.)),d=hash21(i+vec2(1.,1.));
|
|
2742
2741
|
vec2 u=f*f*(3.-2.*f); return mix(mix(a,b,u.x),mix(c,d,u.x),u.y); }
|
|
2743
2742
|
float fbm(vec2 p){ float v=0.,a=0.5; for(int i=0;i<5;i++){ v+=a*vnoise(p); p=p*2.02+vec2(7.1,3.7); a*=0.5;} return v; }
|
|
2744
|
-
vec2 warp(vec2 p, float t){ float a=fbm(p+vec2(0.0,1.7)+t*0.10); float b=fbm(p+vec2(5.2,1.3)-t*0.08); return p+0.85*vec2(a,b); }`,
|
|
2745
|
-
float cellCycle(vec2 q){ float s=hash21(q+11.7);
|
|
2746
|
-
return 0.5+0.32*sin(u_time*u_blink+s*6.2831)+0.18*sin(u_time*0.6*u_blink+s*19.0); }
|
|
2747
|
-
void main(){
|
|
2748
|
-
vec2 uv=gl_FragCoord.xy/u_res; float aspect=u_res.x/u_res.y;
|
|
2749
|
-
vec2 p=uv-0.5; p.x*=aspect; vec2 c=u_center-0.5; c.x*=aspect;
|
|
2750
|
-
vec3 bg=themeBg(); float dist=length(p-c);
|
|
2751
|
-
/* Chat scroll pans the (periodic) lattice with the content. */
|
|
2752
|
-
p.y-=u_scroll;
|
|
2753
|
-
float ca=cos(0.7853981634), sa=sin(0.7853981634);
|
|
2754
|
-
vec2 pr=mat2(ca,-sa,sa,ca)*p; float cells=12.0; vec2 g=pr*cells; g.x+=g.y*0.5;
|
|
2755
|
-
vec2 id=floor(g); vec2 f=fract(g)-0.5;
|
|
2756
|
-
float dia=mix(length(f),abs(f.x)+abs(f.y),0.82);
|
|
2757
|
-
float ph=hash21(id)*6.2831; float radius=0.42+0.05*sin(u_time*0.5+ph);
|
|
2758
|
-
float aa=2.2/cells; float outline=smoothstep(u_thick+aa,u_thick,abs(dia-radius));
|
|
2759
|
-
float seedDen=clamp(u_density+u_energy*0.20*exp(-dist*2.0),0.0,1.0);
|
|
2760
|
-
float selfCyc=cellCycle(id); float selfSoft=smoothstep(-0.05,0.05,seedDen-selfCyc);
|
|
2761
|
-
float selfHard=step(selfCyc,seedDen); float nbs=0.0;
|
|
2762
|
-
for(int j=-1;j<=1;j++){ for(int i=-1;i<=1;i++){ if(i==0&&j==0) continue;
|
|
2763
|
-
vec2 nb=id+vec2(float(i),float(j)); nbs+=step(cellCycle(nb),seedDen); } }
|
|
2764
|
-
float survive=smoothstep(1.5,1.9,nbs)-smoothstep(3.1,3.5,nbs);
|
|
2765
|
-
float birth=smoothstep(2.6,3.0,nbs)-smoothstep(3.0,3.4,nbs);
|
|
2766
|
-
float gol=clamp(selfHard*survive+(1.0-selfHard)*birth,0.0,1.0);
|
|
2767
|
-
float golMix=1.0-smoothstep(0.0,max(u_life,0.001),dist);
|
|
2768
|
-
float onState=mix(selfSoft,gol,golMix);
|
|
2769
|
-
float falloff=clamp(1.0-u_falloff*max(dist-0.12,0.0),0.0,1.0);
|
|
2770
|
-
falloff=clamp(falloff+u_energy*0.30*exp(-dist*2.0),0.0,1.0); onState*=falloff;
|
|
2771
|
-
float bevel=clamp(0.5-(f.x-f.y)*0.9,0.0,1.0);
|
|
2772
|
-
vec3 lineCol=mix(vec3(0.78,0.55,0.30),vec3(0.86,0.62,0.36),u_dark);
|
|
2773
|
-
vec3 hiCol=mix(vec3(0.90,0.72,0.46),vec3(0.92,0.74,0.48),u_dark);
|
|
2774
|
-
vec3 tint=mix(lineCol,hiCol,bevel*0.6); float stroke=outline*onState;
|
|
2775
|
-
// Low-contrast lattice: chat prose sits DIRECTLY on this field (the frosted
|
|
2776
|
-
// reading card is gone), so strokes stay close to the base color — toward
|
|
2777
|
-
// the light bg in light mode, toward the dark bg in dark mode.
|
|
2778
|
-
vec3 col=mix(bg,tint,clamp(stroke*0.20,0.0,0.20));
|
|
2779
|
-
col+=u_evt*u_energy*stroke*exp(-dist*dist*4.0)*0.18;
|
|
2780
|
-
/* Cone-only post: a noise/grain layer whose sample frequency is driven by
|
|
2781
|
-
u_blur (high blur => low frequency / soft, low blur => sharp grain), then
|
|
2782
|
-
contrast around 0.5 and brightness as a multiplier. The JS getters bake in
|
|
2783
|
-
tuned defaults (brightness=1.2, contrast=0.75, noise=0.04, blur=0.09); at
|
|
2784
|
-
the shader level the identity is still u_noise=0, u_contrast=1, u_brightness=1. */
|
|
2785
|
-
float noiseFreq=mix(80.0,4.0,clamp(u_blur,0.0,1.0));
|
|
2786
|
-
float grain=fbm(uv*noiseFreq)-0.5;
|
|
2787
|
-
col+=u_noise*grain;
|
|
2788
|
-
col=(col-0.5)*u_contrast+0.5;
|
|
2789
|
-
col*=u_brightness;
|
|
2790
|
-
col=clamp(col,0.0,1.0);
|
|
2791
|
-
gl_FragColor=vec4(col,1.0);
|
|
2792
|
-
}`,scoop:`${L}${R}
|
|
2743
|
+
vec2 warp(vec2 p, float t){ float a=fbm(p+vec2(0.0,1.7)+t*0.10); float b=fbm(p+vec2(5.2,1.3)-t*0.08); return p+0.85*vec2(a,b); }`,gr=`${hr}${z}
|
|
2793
2744
|
vec3 pal(float t){ vec3 strawberry=vec3(1.0,0.45,0.62); vec3 vanilla=vec3(1.0,0.95,0.82);
|
|
2794
2745
|
vec3 pistachio=vec3(0.60,0.86,0.52);
|
|
2795
2746
|
vec3 col=mix(strawberry,vanilla,smoothstep(0.0,0.5,t)); col=mix(col,pistachio,smoothstep(0.5,1.0,t)); return col; }
|
|
@@ -2808,7 +2759,7 @@ void main(){
|
|
|
2808
2759
|
ice*=0.95+0.08*sin(u_time*0.4); float mask=smoothstep(0.62,0.0,r);
|
|
2809
2760
|
vec3 col=mix(bg,ice,clamp(mask,0.0,1.0)*0.80); col+=ice*mask*hl*0.12;
|
|
2810
2761
|
gl_FragColor=vec4(col,1.0);
|
|
2811
|
-
}`,
|
|
2762
|
+
}`,_r=`${hr}${z}
|
|
2812
2763
|
/* Inside-of-a-freezer ground: icy WHITE in light mode (never the warm theme
|
|
2813
2764
|
canvas — blue-on-beige read as sand, not frost), cold blue-black in dark. */
|
|
2814
2765
|
vec3 freezerBg(){ return mix(vec3(0.965,0.98,1.0), vec3(0.05,0.08,0.13), u_dark); }
|
|
@@ -2832,23 +2783,102 @@ void main(){
|
|
|
2832
2783
|
float rim=smoothstep(0.05,0.0,abs(edge))*0.6; col+=rim*iceCol;
|
|
2833
2784
|
/* The field is a BACKGROUND: chat prose sits directly on it, so the final
|
|
2834
2785
|
wash pins the whole pattern close to the icy ground — the same ~20%
|
|
2835
|
-
deviation budget the cone
|
|
2786
|
+
deviation budget the cone glass uses. */
|
|
2836
2787
|
col=mix(freezerBg(),col,0.22);
|
|
2837
2788
|
gl_FragColor=vec4(col,1.0);
|
|
2838
|
-
}
|
|
2789
|
+
}`,vr=`${hr}${z}
|
|
2790
|
+
uniform float u_speed;
|
|
2791
|
+
vec2 sugarHash(vec2 p){ p=vec2(dot(p,vec2(127.1,311.7)),dot(p,vec2(269.5,183.3))); return fract(sin(p)*43758.5453123); }
|
|
2792
|
+
vec3 sugarVoronoi(vec2 p,float t){
|
|
2793
|
+
vec2 n=floor(p),f=fract(p),nearPt=vec2(0.0),nearCell=vec2(0.0); float minDist=8.0;
|
|
2794
|
+
for(int j=-1;j<=1;j++){ for(int i=-1;i<=1;i++){ vec2 g=vec2(float(i),float(j));
|
|
2795
|
+
vec2 o=sugarHash(n+g)*0.5+0.25; o=0.5+0.4*sin(t*0.3+6.2831*o); vec2 d=g+o-f; float dd=dot(d,d);
|
|
2796
|
+
if(dd<minDist){ minDist=dd; nearPt=d; nearCell=n+g; } } }
|
|
2797
|
+
float edge=8.0;
|
|
2798
|
+
for(int j=-1;j<=1;j++){ for(int i=-1;i<=1;i++){ vec2 g=vec2(float(i),float(j));
|
|
2799
|
+
vec2 o=sugarHash(n+g)*0.5+0.25; o=0.5+0.4*sin(t*0.3+6.2831*o); vec2 d=g+o-f; vec2 delta=d-nearPt;
|
|
2800
|
+
if(dot(delta,delta)>0.001) edge=min(edge,dot(0.5*(nearPt+d),normalize(delta))); } }
|
|
2801
|
+
return vec3(sqrt(minDist),edge,hash21(nearCell));
|
|
2802
|
+
}
|
|
2803
|
+
float sugarEdge(vec2 p,float t){
|
|
2804
|
+
vec2 n=floor(p),f=fract(p),nearPt=vec2(0.0); float minDist=8.0;
|
|
2805
|
+
for(int j=-1;j<=1;j++){ for(int i=-1;i<=1;i++){ vec2 g=vec2(float(i),float(j));
|
|
2806
|
+
vec2 o=sugarHash(n+g); o=0.5+0.35*sin(t*0.5+6.2831*o); vec2 d=g+o-f; float dd=dot(d,d);
|
|
2807
|
+
if(dd<minDist){ minDist=dd; nearPt=d; } } }
|
|
2808
|
+
float edge=8.0;
|
|
2809
|
+
for(int j=-1;j<=1;j++){ for(int i=-1;i<=1;i++){ vec2 g=vec2(float(i),float(j));
|
|
2810
|
+
vec2 o=sugarHash(n+g); o=0.5+0.35*sin(t*0.5+6.2831*o); vec2 d=g+o-f; vec2 delta=d-nearPt;
|
|
2811
|
+
if(dot(delta,delta)>0.001) edge=min(edge,dot(0.5*(nearPt+d),normalize(delta))); } }
|
|
2812
|
+
return edge;
|
|
2813
|
+
}
|
|
2814
|
+
vec3 sugarLattice(vec2 p,float scale){
|
|
2815
|
+
float ca=cos(0.7853981634), sa=sin(0.7853981634);
|
|
2816
|
+
vec2 pr=mat2(ca,-sa,sa,ca)*p; vec2 g=pr*scale; g.x+=g.y*0.5;
|
|
2817
|
+
vec2 id=floor(g), f=fract(g)-0.5;
|
|
2818
|
+
float edge=min(0.5-abs(f.x),0.5-abs(f.y));
|
|
2819
|
+
return vec3(length(f)*0.70710678,edge,hash21(id));
|
|
2820
|
+
}
|
|
2821
|
+
void main(){
|
|
2822
|
+
vec2 uv=gl_FragCoord.xy/u_res; float aspect=u_res.x/u_res.y;
|
|
2823
|
+
vec2 p=(gl_FragCoord.xy-u_res*0.5)/min(u_res.x,u_res.y); p.y-=u_scroll;
|
|
2824
|
+
vec2 parallax=-(u_center-0.5)*0.15*sign(u_speed); float t=u_time*(u_life+0.15)*u_speed;
|
|
2825
|
+
p+=vec2(sin(p.y*12.0+t*2.3),cos(p.x*10.0+t*1.7))*0.003;
|
|
2826
|
+
float sugarCoverage=clamp(u_freeze/2.2,0.0,1.0);
|
|
2827
|
+
float waffleMask=step(0.82,sugarCoverage);
|
|
2828
|
+
float scale=mix(2.9,6.6,smoothstep(0.0,0.75,sugarCoverage));
|
|
2829
|
+
vec3 voronoiMacro=sugarVoronoi((p+parallax)*scale+0.5,t);
|
|
2830
|
+
vec3 latticeMacro=sugarLattice(p+parallax,8.0);
|
|
2831
|
+
vec3 macro=mix(voronoiMacro,latticeMacro,waffleMask);
|
|
2832
|
+
float microEdge=sugarEdge((p+parallax*2.5)*9.0+vec2(3.7,1.2),t*0.7);
|
|
2833
|
+
float crackPulse=0.5+0.3*sin(t*1.5)+0.2*sin(t*2.7+1.0);
|
|
2834
|
+
float softness=clamp(u_blur,0.0,1.0);
|
|
2835
|
+
float macroWidth=mix(0.025,0.085,softness)*crackPulse;
|
|
2836
|
+
float microWidth=mix(0.015,0.055,softness)*crackPulse;
|
|
2837
|
+
float seamStrength=mix(1.0,0.28,softness);
|
|
2838
|
+
float macroCrack=(1.0-smoothstep(0.0,macroWidth,macro.y))*seamStrength;
|
|
2839
|
+
float microCrack=(1.0-smoothstep(0.0,microWidth,microEdge))*seamStrength;
|
|
2840
|
+
float crack=clamp(macroCrack+microCrack*0.4,0.0,1.0);
|
|
2841
|
+
float macroGlow=1.0-smoothstep(0.0,macroWidth*4.0,macro.y);
|
|
2842
|
+
float microGlow=1.0-smoothstep(0.0,microWidth*3.0,microEdge);
|
|
2843
|
+
float glow=macroGlow*0.7+microGlow*0.3;
|
|
2844
|
+
float thickness=0.6+0.4*macro.z, hue=macro.z*0.3;
|
|
2845
|
+
vec3 amber=mix(vec3(0.78,0.585,0.424),vec3(0.34,0.16,0.035),u_dark);
|
|
2846
|
+
vec3 caramel=mix(vec3(0.831,0.647,0.455),vec3(0.46,0.22,0.045),u_dark);
|
|
2847
|
+
vec3 deepAmber=mix(vec3(0.29,0.125,0.0),vec3(0.10,0.035,0.0),u_dark);
|
|
2848
|
+
vec3 glass=mix(deepAmber,mix(amber,caramel,hue),thickness);
|
|
2849
|
+
glass=mix(glass*1.1,glass*0.85,smoothstep(0.0,0.5,macro.x));
|
|
2850
|
+
vec3 rose=mix(vec3(0.90,0.65,0.60),vec3(0.42,0.19,0.10),u_dark);
|
|
2851
|
+
glass=mix(glass,rose,glow*(0.3+0.2*sin(macro.z*12.0+t*0.8))*0.25);
|
|
2852
|
+
glass=mix(glass,u_tint,0.06);
|
|
2853
|
+
float fill=mix(1.0,0.35,smoothstep(0.45,0.75,sugarCoverage));
|
|
2854
|
+
fill=mix(fill,0.75,waffleMask); glass=mix(themeBg(),glass,fill);
|
|
2855
|
+
vec3 crackLight=mix(vec3(1.0,0.91,0.75),vec3(0.74,0.38,0.10),u_dark);
|
|
2856
|
+
vec3 crackBright=mix(vec3(1.0,0.96,0.90),vec3(0.90,0.52,0.16),u_dark);
|
|
2857
|
+
vec3 lightCol=mix(crackLight,crackBright,crack); float bleed=clamp(0.55+u_falloff*1.5,0.4,1.3);
|
|
2858
|
+
vec3 col=mix(glass,lightCol*0.8,glow*bleed*0.5); col=mix(col,lightCol,crack*bleed);
|
|
2859
|
+
float sss=0.5+0.5*sin(p.x*3.0+t*0.5)*sin(p.y*2.5+t*0.3); col+=vec3(0.05,0.03,0.01)*sss*thickness;
|
|
2860
|
+
float vig=smoothstep(0.0,1.0,1.0-dot(p*0.8,p*0.8)); col*=0.6+0.4*vig; col=pow(col,vec3(0.95));
|
|
2861
|
+
float focus=length(vec2((uv.x-u_center.x)*aspect,uv.y-u_center.y)); col+=u_evt*u_energy*exp(-focus*focus*10.0)*0.12;
|
|
2862
|
+
/* Background budget: clamp the hero treatment, then expose at most 20%. */
|
|
2863
|
+
vec3 bg=themeBg(); col=mix(bg,clamp(col,0.0,1.0),0.20);
|
|
2864
|
+
float noiseFreq=mix(80.0,4.0,clamp(u_blur,0.0,1.0)); float grain=fbm(uv*noiseFreq)-0.5;
|
|
2865
|
+
col+=u_noise*grain; col=(col-0.5)*u_contrast+0.5; col*=u_brightness; col=clamp(col,0.0,1.0);
|
|
2866
|
+
col=clamp(col,max(bg-vec3(0.20),vec3(0.0)),min(bg+vec3(0.20),vec3(1.0)));
|
|
2867
|
+
gl_FragColor=vec4(col,1.0);
|
|
2868
|
+
}`,B={caramel:{mode:`cone`,tint:`#d08a3c`,brightness:1.1,contrast:1.1,noise:.025,blur:.14,coverage:.28,speed:.25},"caramel-soft":{mode:`cone`,tint:`#d08a3c`,brightness:1.2,contrast:.75,noise:.025,blur:.14,coverage:.28,speed:1},frosted:{mode:`cone`,tint:`#ead9bd`,brightness:1,contrast:.55,noise:.005,blur:.9,coverage:.08,speed:1},brittle:{mode:`cone`,tint:`#ffd089`,brightness:.96,contrast:1.2,noise:.055,blur:.02,coverage:.68,speed:1},"waffle-glass":{mode:`cone`,tint:`#d3a15f`,brightness:1,contrast:.9,noise:.02,blur:.08,coverage:.9,speed:1}},yr={cone:vr,scoop:gr,freezer:_r},br=new Set([`cone`,`scoop`,`freezer`]),xr={cone:`radial-gradient(120% 120% at 35% 45%, color-mix(in srgb,#d08a3c 20%,var(--bg)) 0%, var(--bg) 70%)`,scoop:`radial-gradient(120% 120% at 40% 50%, color-mix(in srgb,#ff9bc0 40%,var(--bg)) 0%, var(--bg) 62%)`,freezer:`radial-gradient(120% 120% at 0% 100%, color-mix(in srgb,#7fb0e6 55%,var(--bg)) 0%, var(--bg) 70%)`},Sr=D(`
|
|
2839
2869
|
:host { position: relative; display: block; pointer-events: none; }
|
|
2840
2870
|
.canvas, .fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
|
|
2841
2871
|
.fallback { display: none; }
|
|
2842
2872
|
:host([no-webgl]) .canvas { display: none; }
|
|
2843
|
-
:host([no-webgl]) .fallback { display: block; }`),
|
|
2873
|
+
:host([no-webgl]) .fallback { display: block; }`),Cr=2,wr=.35,Tr=[`u_res`,`u_scroll`,`u_time`,`u_energy`,`u_center`,`u_evt`,`u_freeze`,`u_dark`,`u_falloff`,`u_life`,`u_tint`,`u_brightness`,`u_contrast`,`u_noise`,`u_blur`,`u_speed`];function V(e,t,n,r){return Number.isFinite(e)?Math.max(t,Math.min(n,e)):r}function H(e,t){if(!e||typeof getComputedStyle!=`function`)return t;let n=document.createElement(`span`);n.style.color=e,n.style.display=`none`,document.body.appendChild(n);let r=getComputedStyle(n).color;n.remove();let i=r.match(/[\d.]+/g)?.map(Number);return!i||i.length<3?t:[i[0]/255,i[1]/255,i[2]/255]}var Er=class extends HTMLElement{static observedAttributes=[`mode`,`tint`,`coverage`,`intensity`,`scroll`,`brightness`,`contrast`,`noise`,`blur`,`speed`];#e;#t=null;#n=null;#r=null;#i={};#a=null;#o={};#s=-1;#c=0;#l=0;#u=0;#d=null;#f=!1;#p=[.816,.541,.235];#m=[.957,.247,.369];#h=0;#g=null;#_=null;#v=null;#y=null;#b=null;#x=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Sr];let e=E(`canvas`,{class:`canvas`,part:`canvas`}),t=E(`div`,{class:`fallback`,part:`fallback`,"aria-hidden":`true`});this.#e.replaceChildren(e,t),this.#t=e}connectedCallback(){if(this.#f=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches,this.#S(),!this.#k()){this.setAttribute(`no-webgl`,``);return}this.removeAttribute(`no-webgl`),typeof ResizeObserver<`u`&&(this.#d=new ResizeObserver(()=>this.#C()),this.#d.observe(this)),this.#w(),this.#T(),this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()}disconnectedCallback(){this.#L(),this.#d?.disconnect(),this.#d=null,this.#g?.disconnect(),this.#g=null,this.#_&&this.#v&&this.#_.removeEventListener(`change`,this.#v),this.#_=null,this.#v=null,this.#R()}attributeChangedCallback(e){if(this.isConnected){if((e===`tint`||e===`mode`)&&this.#w(),e===`mode`&&this.#n&&this.mode!==this.#y&&this.#O()){this.#F(),this.#S();return}this.#S(),this.#C()}}get mode(){let e=this.getAttribute(`mode`);return e&&br.has(e)?e:`cone`}set mode(e){this.setAttribute(`mode`,e)}get coverage(){let e=this.mode===`cone`?B.caramel.coverage:.66;return V(Number.parseFloat(this.getAttribute(`coverage`)??``),0,1,e)}set coverage(e){this.setAttribute(`coverage`,String(e))}get intensity(){return V(Number.parseFloat(this.getAttribute(`intensity`)??``),0,4,1)}set intensity(e){this.setAttribute(`intensity`,String(e))}get scrollOffset(){let e=Number.parseFloat(this.getAttribute(`scroll`)??``);return Number.isFinite(e)?e:0}set scrollOffset(e){this.setAttribute(`scroll`,String(e))}get brightness(){return V(Number.parseFloat(this.getAttribute(`brightness`)??``),.5,1.5,B.caramel.brightness)}set brightness(e){this.setAttribute(`brightness`,String(e))}get contrast(){return V(Number.parseFloat(this.getAttribute(`contrast`)??``),.5,2,B.caramel.contrast)}set contrast(e){this.setAttribute(`contrast`,String(e))}get noise(){return V(Number.parseFloat(this.getAttribute(`noise`)??``),0,.3,B.caramel.noise)}set noise(e){this.setAttribute(`noise`,String(e))}get blurAmount(){return V(Number.parseFloat(this.getAttribute(`blur`)??``),0,1,B.caramel.blur)}set blurAmount(e){this.setAttribute(`blur`,String(e))}get speed(){return V(Number.parseFloat(this.getAttribute(`speed`)??``),0,2,B.caramel.speed)}set speed(e){this.setAttribute(`speed`,String(e))}get noWebgl(){return this.hasAttribute(`no-webgl`)}pulse(e=1){this.#u=Math.min(1.4,this.#u+e),this.#f&&this.#F()}#S(){let e=this.#e.querySelector(`.fallback`);e&&(e.style.background=xr[this.mode])}#C(){this.#f&&this.#n&&this.#F()}#w(){let e=this.getAttribute(`tint`)??(this.mode===`cone`?B.caramel.tint:``);this.#p=H(e,[.545,.361,.965]),this.#m=H(e,[.957,.247,.369]),this.#h=this.#P()}#T(){let e=()=>{this.#w(),this.#C()};if(typeof MutationObserver<`u`){this.#g=new MutationObserver(e);for(let e of[document.documentElement,document.body])e&&this.#g.observe(e,{attributes:!0,attributeFilter:[`class`,`data-theme`]})}typeof matchMedia==`function`&&(this.#_=matchMedia(`(prefers-color-scheme: dark)`),this.#v=e,this.#_.addEventListener(`change`,this.#v))}#E(e,t,n){let r=e.createShader(t);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(e.deleteShader(r),null)):null}#D(e){let t=this.#n;if(!t)return null;let n=this.#E(t,t.VERTEX_SHADER,mr),r=this.#E(t,t.FRAGMENT_SHADER,yr[e]);if(!n||!r)return n&&t.deleteShader(n),r&&t.deleteShader(r),null;let i=t.createProgram();if(!i)return t.deleteShader(n),t.deleteShader(r),null;if(t.attachShader(i,n),t.attachShader(i,r),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))return t.deleteProgram(i),t.deleteShader(n),t.deleteShader(r),null;let a=t.getAttribLocation(i,`a_pos`),o={};for(let e of Tr)o[e]=t.getUniformLocation(i,e);return{program:i,vs:n,fs:r,aPos:a,loc:o}}#O(){let e=this.#n;if(!e)return!1;let t=this.mode,n=this.#i[t];if(!n){let e=this.#D(t);if(!e)return!1;this.#i[t]=e,n=e}return this.#r=n.program,this.#s=n.aPos,this.#o=n.loc,e.useProgram(n.program),this.#y=t,!0}#k(){let e=this.#t;if(!e)return!1;let t={premultipliedAlpha:!0,alpha:!0,antialias:!0},n=null;try{n=e.getContext(`webgl`,t)??e.getContext(`experimental-webgl`,t)}catch{n=null}return n?(this.#n=n,this.#j(e),this.#A()?!0:(this.#R(),!1)):!1}#A(){let e=this.#n;if(!e||!this.#O())return!1;let t=e.createBuffer();return t?(this.#a=t,e.bindBuffer(e.ARRAY_BUFFER,t),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),e.STATIC_DRAW),!0):!1}#j(e){this.#M(e),this.#b=e=>{e.preventDefault(),this.#L(),this.#i={},this.#r=null,this.#y=null,this.#o={},this.#a=null},this.#x=()=>{!this.isConnected||!this.#n||(this.#i={},this.#A()&&(this.#l=performance.now()/1e3,this.#f?this.#F():this.#I()))},e.addEventListener(`webglcontextlost`,this.#b,!1),e.addEventListener(`webglcontextrestored`,this.#x,!1)}#M(e){this.#b&&e.removeEventListener(`webglcontextlost`,this.#b),this.#x&&e.removeEventListener(`webglcontextrestored`,this.#x),this.#b=null,this.#x=null}#N(){let e=this.#t;if(!e)return;let t=Math.min(Cr,typeof window<`u`&&window.devicePixelRatio||1),n=Math.max(1,e.clientWidth*t|0),r=Math.max(1,e.clientHeight*t|0);(e.width!==n||e.height!==r)&&(e.width=n,e.height=r)}#P(){if(typeof getComputedStyle!=`function`)return 0;let e=getComputedStyle(this).getPropertyValue(`--ink`).trim();if(!e)return 0;let[t,n,r]=H(e,[0,0,0]);return+(.2126*t+.7152*n+.0722*r>.5)}#F(){let e=this.#n,t=this.#t,n=this.#r;if(!e||!t||!n||!this.#a)return;this.#N();let r=performance.now()/1e3-this.#l,i=.5+.5*Math.sin(r*.12),a=.5+.5*Math.sin(r*.097+1),o=.2*(1-i)+.46*i,s=.74*(1-a)+.3*a,c=this.#h,l=this.#p,u=this.#m;e.viewport(0,0,t.width,t.height),e.useProgram(n),e.bindBuffer(e.ARRAY_BUFFER,this.#a),e.enableVertexAttribArray(this.#s),e.vertexAttribPointer(this.#s,2,e.FLOAT,!1,0,0);let d=this.#o;e.uniform2f(d.u_res??null,t.width,t.height),e.uniform1f(d.u_time??null,r),e.uniform1f(d.u_energy??null,this.#u),e.uniform2f(d.u_center??null,o,s),e.uniform3f(d.u_evt??null,u[0],u[1],u[2]),e.uniform1f(d.u_freeze??null,V(this.coverage*this.intensity,0,1,.66)*2.2),e.uniform1f(d.u_dark??null,c),e.uniform1f(d.u_scroll??null,this.scrollOffset*wr/Math.max(1,t.clientHeight||t.height)),e.uniform1f(d.u_falloff??null,.3),e.uniform1f(d.u_life??null,.35),e.uniform3f(d.u_tint??null,l[0],l[1],l[2]),e.uniform1f(d.u_brightness??null,this.brightness),e.uniform1f(d.u_contrast??null,this.contrast),e.uniform1f(d.u_noise??null,this.noise),e.uniform1f(d.u_blur??null,this.blurAmount),e.uniform1f(d.u_speed??null,this.speed),e.drawArrays(e.TRIANGLES,0,3),this.#u*=.95,this.#u<.001&&(this.#u=0)}#I(){if(this.#c)return;let e=()=>{this.#F(),this.#c=requestAnimationFrame(e)};this.#c=requestAnimationFrame(e)}#L(){this.#c&&cancelAnimationFrame(this.#c),this.#c=0}#R(){let e=this.#n,t=this.#t;if(t&&this.#M(t),e){this.#a&&e.deleteBuffer(this.#a);for(let t of Object.values(this.#i))t&&(e.deleteProgram(t.program),e.deleteShader(t.vs),e.deleteShader(t.fs));e.getExtension(`WEBGL_lose_context`)?.loseContext()}this.#n=null,this.#r=null,this.#i={},this.#o={},this.#a=null,this.#y=null}};w(`slicc-shader`,Er),w(`slicc-frost-shader`,class extends Er{connectedCallback(){this.getAttribute(`mode`)!==`freezer`&&this.setAttribute(`mode`,`freezer`),super.connectedCallback()}});var Dr=`# Memory
|
|
2844
2874
|
|
|
2845
|
-
`,
|
|
2875
|
+
`,Or=[`**Evidence first:** inspect the smallest relevant surface before editing and record the observed state.`,`**Narrow plans:** keep one measurable outcome, one implementation pass, and one verification pass.`,`**Runtime state:** prefer browser-owned storage and keep the relay stateless whenever practical.`,`**Failure boundaries:** external work needs a timeout, a useful error category, and an explicit retry decision.`,"**Keyboard parity:** interactive rows remain focusable and respond to both `Enter` and `Space`.",`**Memory rendering:** preserve Markdown meaning while sanitizing untrusted tags at the DOM boundary.`,`**Cross-runtime parity:** shared events need matching page, worker, extension, and follower handling.`,`**Verification records:** report the exact command, outcome, and scope instead of writing only “tests pass”.`,`**Synthetic data:** use neutral paths, reserved domains, and conspicuously invented identifiers in fixtures.`,`**Collaboration:** coordinate public-barrel edits before overlapping with another active implementation.`],kr=["Keep the durable rule beside `packages/example.ts` so later work can reproduce the decision without a transcript.",`Preserve selection, expansion, and scroll state when a refresh replaces visible children.`,`Run the focused regression first; broaden to package and repository gates only after the hypothesis holds.`,'Treat A & B, “quoted labels”, arrows →, and `<preview mode="safe">` as text rather than executable markup.',`Prefer a reversible patch over a destructive command when the target was inferred rather than supplied.`,`Stop exploring when another read no longer changes the hypothesis; switch to a test or focused question.`,`Document the invalidation trigger when cached data can become stale, and retain a correctness bypass.`,`Release every listener, timer, observer, channel, and object URL during the matching teardown path.`,`Keep logs to operation name, duration, status, and a synthetic correlation label; omit payload contents.`],Ar=Or.flatMap(e=>kr.map(t=>`- ${e} ${t}`)),jr=[`- Keep diffs small.`,`- Prefer native APIs.`,`- Ship docs with code.`,`- No surprise deploys.`,"- **Continuation stress:** preserve one logical memory across source lines,\n carrying `inline-code`, emphasis, and an arrow → without creating another row.",'- **Escaping stress:** render `<preview mode="safe">`, A & B, “quotes”, and `score > threshold` as inert content.',`- **Reserved link:** [the synthetic reference](https://example.invalid/memory) exists only to exercise link rendering.`,`- **Medium tail:** before rebuilding a filtered collection, capture the query, focused control, selected row, group expansion, and scroll anchor; restore only state that still refers to surviving items.`,`- **Long tail:** ${`A long-lived panel decision was reviewed in sequence: a compact sample initially hid scale problems; a larger dataset exposed discarded provenance and summaries cut mid-phrase; Markdown stress then revealed literal markers; keyboard review found pointer-only activation; narrow layouts showed metadata competing with the primary text; refresh testing exposed lost search, focus, expansion, and scroll state; cross-runtime review found a missing follower path; failure testing identified an unbounded request; cleanup testing found a retained observer; and final verification required the focused test, package suite, coverage gate, and build. `.repeat(2).trim()}`,`- **Folded long tail:** a remote action keeps one event contract and preserves error categories across serialization,
|
|
2846
2876
|
terminates pending requests on disconnect, and verifies timeout plus malformed-response behavior,
|
|
2847
|
-
while this third source line remains part of the same bullet and contains “quotes”, A & B, and <angle brackets>.`],
|
|
2848
|
-
`)}\n`}
|
|
2849
|
-
`),`${
|
|
2877
|
+
while this third source line remains part of the same bullet and contains “quotes”, A & B, and <angle brackets>.`],Mr=[...Ar,...jr],Nr=[[`2099-01-03`,`compaction`],[`2099-01-10`,`new-session`],[`2099-01-18`,`compaction`],[`2099-02-02`,`pending-enrichment`],[`2099-02-14`,`new-session`],[`2099-03-01`,`compaction`],[`2099-03-21`,`pending-enrichment`],[`2099-04-05`,`compaction`],[`2099-04-19`,`new-session`],[`2099-05-07`,`compaction`]];function Pr(e,t,n){return`## Auto-extracted (${e}, ${t})\n\n${n.join(`
|
|
2878
|
+
`)}\n`}Dr+Nr.map(([e,t],n)=>Pr(e,t,Mr.slice(n*10,n*10+10))).join(`
|
|
2879
|
+
`),`${Dr}${Mr.join(`
|
|
2850
2880
|
`)}`,[`# Project Northstar`,``,`Role: Kestrel (primary engineering agent)`,`Workspace: /workspaces/northstar`,`Snapshot: 2032-04-18T14:15:51.712Z`,``,`## Operating agreements`,"- **Keep Northstar changes reviewable:** issue #501 requires one concern per branch in `packages/northstar-shell/src/` with fixtures under `/workspaces/northstar/testdata/`; run `keel verify --scope shell` before asking Mina Kestrel for `review_ready` status. The branch note in `packages/northstar-shell/reviews/` explains the user-visible outcome, the measured baseline, and the exact rollback point so another engineer can judge the change without reconstructing the session.","- **Prefer evidence before edits:** issue #502 starts with traces from `packages/telemetry/src/` and a reproduction in `/workspaces/northstar/repros/`; record the failing `trace_id` and the smallest useful `fixture_seed` before changing code. The supporting report in `packages/telemetry/reports/` separates observed behavior from a proposed cause and includes the command, expected result, actual result, and environment assumptions.","- **Use the native release path:** issue #503 sends text-only patches through `packages/release-tools/src/` and stores large binary fixtures in `/workspaces/northstar/artifacts/`; invoke `keel publish --dry-run` and confirm `release_manifest_v3` before upload. The release record in `packages/release-tools/records/` names every artifact, its content digest, the verification run that produced it, and the person who approved promotion.","- **Never merge on assumption:** issue #504 leaves the candidate in `packages/change-gate/src/` until `/workspaces/northstar/reviews/` contains an explicit approval; use `keel review status` and preserve the requested `merge_strategy`. The decision log in `packages/change-gate/decisions/` states whether history must remain linear and whether a reviewer requested a merge commit for audit context.",``,`## Repository and release workflow`,"- **Branch from the verified base:** issue #505 creates work in `packages/release-tools/branches/` and writes the base proof to `/workspaces/northstar/checkpoints/`; `keel branch create` must report the expected `base_oid`. The branch receipt in `packages/release-tools/receipts/` also captures the remote name and fetch time, which makes stale-base failures obvious during review.","- **Rebase only when linear history is required:** issue #506 keeps merge-preserving work in `packages/change-gate/policies/` and conflict notes in `/workspaces/northstar/reviews/`; choose `merge_commit` or `linear_rebase` from the recorded policy, never from habit. Guidance under packages/change-gate/guides/rebase/ requires a fresh verification run after conflict resolution because a clean textual rebase does not prove unchanged behavior.","- **Treat remote deletion as a gated operation:** issue #507 resolves the exact ref through `packages/release-tools/refs/` and snapshots it in `/workspaces/northstar/checkpoints/`; call `keel ref delete --confirm` only after `ref_guard` matches. The recovery note under packages/release-tools/guides/restore/ retains the deleted object identifier and a tested restore command until the review window closes.",``,`## Aurora renderer bootstrap — desktop preview (Session April 02)`,"- **Create the preview shell:** issue #508 keeps the host in `packages/aurora-preview/src/` and its deterministic scene data in `/workspaces/northstar/fixtures/aurora/`; start `keel preview aurora` with `scene_seed_2048`. A walkthrough under packages/aurora-preview/guides/startup/ lists the expected loading, ready, degraded, and failed states so reviewers know whether the shell or renderer owns a defect.","- **Load the renderer through its public package:** issue #509 imports `@northstar/aurora` from `/workspaces/northstar/apps/desktop/` and pins `aurora_protocol_v6`; the preview must not reach the private `renderer_singleton`. Contract notes under packages/aurora-preview/guides/contracts/ describe the mount lifecycle and require the host to release observers, workers, and object URLs during teardown.","- **Keep browser and desktop entry points equivalent:** issue #510 compares `packages/aurora-preview/browser/` with `/workspaces/northstar/apps/desktop/`; both expose `mountAuroraPreview` and accept `preview_transport`. Parity evidence under packages/aurora-preview/reviews/parity/ records the same scene, viewport, theme, keyboard path, and frame checksum for each host.","- **Pass viewer identity without personal data:** issue #511 reads `packages/aurora-preview/config/` and `/workspaces/northstar/fixtures/viewers/`; use `viewer_alpha` plus `tenant_sandbox`, never an account copied from production. The fixture catalog under packages/aurora-preview/fixtures/viewers/ explains each synthetic role and deliberately omits names, credentials, message history, and customer content.","- **Document the development-only compositor:** the guide in `packages/aurora-preview/docs/` points to `/workspaces/northstar/examples/compositor/`; `keel preview --inspect` exposes `frame_budget_ms` for local diagnosis. The inspector reports dropped frames, long tasks, active workers, and selected fallback mode without changing the scheduling decisions being measured.","- **Bundle Aurora without runtime network fetches:** build `packages/aurora-preview/bundle/` into `/workspaces/northstar/artifacts/aurora/` with `rook bundle --target desktop`; the output registers `aurora_bundle_hash` and embeds shader tables, icon atlases, locale data, fallback fonts, protocol schemas, worker bootstrap code, source labels, feature defaults, accessibility metadata, safe demo accounts, and the exact scene seed used by review. The host imports one local module, validates the manifest before evaluation, rejects unknown capabilities, records a structured startup trace, and keeps every optional adapter behind a capability check. When the packager rewrites an external import, inspect the emitted dependency map rather than adding a global shim. The accepted bundle must boot with the network disabled, survive a renderer restart, restore the selected scene, preserve focus order, report missing GPU features as a visible diagnostic, and produce the same frame checksum in Chromium and the desktop shell. Store the checksum beside the manifest, not in application code, so a fixture update is reviewable without touching runtime behavior.","- **Aurora offline recovery drill for the desktop preview** uses `packages/aurora-preview/fallback/` and `/workspaces/northstar/apps/desktop/assets/` with `aurora_fallback_entry` after `gpu_probe_result` records unsupported adapter evidence then the host verifies the local manifest restores the selected scene preserves keyboard focus retains the review viewport loads bundled fonts rejects network requests emits a visible diagnostic stores the frame checksum beside the artifact compares browser and desktop output keeps the original trace identifier and leaves the normal renderer untouched for the next controlled restart",``,`## Signal audio service — capture and transcription pipeline`,"- **Keep voice fixtures synthetic:** write generated samples to `packages/signal-audio/fixtures/` and metadata to `/workspaces/northstar/testdata/audio/`; select `signal_voice_cedar` with `sample_rate_24000`. The catalog under packages/signal-audio/guides/fixtures/ states how each sample was generated and which timing, silence, overlap, and clipping cases it is meant to exercise.","- **Resolve credentials through the fixture broker:** configure `packages/signal-audio/auth/` from `/workspaces/northstar/config/local/`; `keel secret lease signal` returns `signal_lease_ref` without exposing token material. The runbook under packages/signal-audio/guides/auth/ distinguishes a missing lease, an expired lease, provider denial, and an unavailable broker so recovery remains specific.","- **Use the streaming endpoint for long utterances:** send chunks from `packages/signal-audio/stream/` through `/workspaces/northstar/repros/audio/`; the client tracks `utterance_seq` and rejects a stale `transcript_epoch`. Evidence under packages/signal-audio/reviews/streaming/ includes chunk timing and final ordering, making dropped, duplicated, and late frames visible without retaining spoken content.","- **Preserve binary audio until decoding succeeds:** `packages/signal-audio/codecs/` writes to `/workspaces/northstar/artifacts/audio/`; `signal_decode_pcm` returns `decoded_frame_count` before text normalization. Notes under packages/signal-audio/guides/codecs/ require the original byte length, channel count, sample rate, and decoder warning before any waveform is discarded.",``,`## Harbor control-plane CLI (Session April 05, #401)`,"- **Define Harbor as a thin API client:** keep commands in `packages/harbor-cli/src/` and contract fixtures in `/workspaces/northstar/testdata/harbor/`; `harbor project list` emits `harbor_result_v2`. This boundary keeps command behavior easy to inspect, lets the service remain the source of truth, and gives every failure one clear place for diagnosis.","- **Store only a broker reference:** `packages/harbor-cli/auth/` reads `/workspaces/northstar/config/local/`; `harbor auth login` persists `credential_handle`, never a bearer value. A later command can ask the broker for a short lease while the terminal, history, trace, and saved configuration remain free of secret material.","- **Normalize boolean flags at the boundary:** `packages/harbor-cli/args/` tests `/workspaces/northstar/repros/harbor/`; `--include-paused=false` becomes `include_paused` rather than a truthy string. The same rule covers an omitted flag, an explicit true value, and a false value so script behavior does not depend on parser accident.","- **Do not edit remote files with shell redirection:** fetch through `packages/harbor-cli/files/` into `/workspaces/northstar/checkpoints/`; `harbor file replace` validates `remote_etag` before committing. The client first writes a complete local draft, shows a compact difference, and sends the whole document only after the expected revision still matches.","- **Read structured responses before printing:** `packages/harbor-cli/output/` stores schemas under `/workspaces/northstar/testdata/schemas/`; `harbor --format json` preserves `error_code` and nested causes. Human output may become shorter, but machine output must retain every field needed for retry, support, audit, and a later automated decision.","- **Refresh expired leases once:** `packages/harbor-cli/retry/` records attempts in `/workspaces/northstar/traces/`; `harbor_lease_expired` may trigger one `credential_refresh`, not a loop. A second denial is returned with the first request identity and lease age so the operator sees a stable failure rather than repeated login work.","- **Map provider failures to actionable hints:** `packages/harbor-cli/errors/` uses `/workspaces/northstar/docs/runbooks/`; `deployment_policy_denied` points to `harbor deployment inspect`. Each hint names the blocked resource, the required capability, and a safe read-only command that can confirm policy state before any new request.",``,`## Atlas runtime and plugin packaging (Session April 07, #418)`,"- **Build Atlas from a readable entry module:** `packages/atlas-runtime/src/` produces `/workspaces/northstar/artifacts/atlas/`; `rook build atlas` keeps `atlas_entrypoint` stable. The entry names each adapter and capability in one visible table, which makes bundle review possible without following generated glue across many small files.","- **Install plugins into an isolated sandbox:** `packages/atlas-runtime/plugins/` expands under `/workspaces/northstar/sandboxes/atlas/`; `atlas plugin inspect` verifies `plugin_manifest_v4`. Extraction rejects parent traversal, absolute names, duplicate entries, and unsupported links before any plugin code can observe the host or write outside its assigned directory.","- **Share filesystem adapters across hosts:** `packages/atlas-runtime/adapters/` is tested against `/workspaces/northstar/testdata/files/`; `atlas_read_bytes` and `atlas_write_atomic` retain binary data. Browser and desktop implementations must agree on path normalization, missing file behavior, atomic replacement, permission denial, and the byte count returned after a write.","- **Externalize host-owned modules:** `packages/atlas-runtime/build/` writes `/workspaces/northstar/artifacts/maps/`; `rook bundle --external host` marks `host_module_table` in the manifest. The loader resolves only names declared by that table and reports an absent host module before plugin startup rather than after partial state has changed.","- **Preserve integer field types during schema conversion:** `packages/atlas-runtime/schema/` compares `/workspaces/northstar/testdata/events/`; `packet_sequence` stays numeric in `atlas_event_v3`. The conversion test also covers zero, the largest safe value, a missing optional field, and an invalid string so type loss cannot hide in ordinary data.","- **Treat unknown extensions as data:** `packages/atlas-runtime/loader/` copies `/workspaces/northstar/fixtures/plugins/`; `atlas_load_module` uses `declared_media_type` instead of filename guessing. This permits a host to choose the correct evaluator while an untrusted plugin cannot change execution mode by selecting a familiar suffix.","- **Verify large artifacts through content hashes:** `packages/atlas-runtime/cache/` indexes `/workspaces/northstar/artifacts/atlas/`; `atlas artifact verify` checks `sha256_digest` before activation. Size and digest are checked after download and again before load, with one clear error that names which step observed an unexpected value.","- **Detect build drift against one canonical artifact:** `packages/atlas-runtime/ci/` reads `/workspaces/northstar/checkpoints/builds/`; `keel drift atlas` compares `canonical_bundle_id` rather than tool banners. A green result means the committed artifact matches the verified build output, not merely that two tools printed a similar version name.",``,`## Relay deployment automation (Session April 09, #433)`,"- **Acquire deployment credentials per operation:** `packages/relay-deploy/auth/` resolves `/workspaces/northstar/config/relay/`; `relay credential lease` returns `relay_lease_id`. The lease is bound to one provider and action, expires quickly, and can be revoked without changing local configuration or any unrelated deployment session.","- **Use immutable release descriptors:** `packages/relay-deploy/manifests/` publishes `/workspaces/northstar/artifacts/releases/`; `relay deploy plan` pins `release_descriptor_sha`. Review therefore covers the exact image, configuration, migration, and rollback input that promotion will consume rather than a mutable branch or floating tag.","- **Model provider capabilities explicitly:** `packages/relay-deploy/providers/` tests `/workspaces/northstar/testdata/providers/`; `provider_capability_set` prevents unsupported preview creation. A plan can explain which feature is absent and offer a compatible path before it asks a remote service to begin work.","- **Write remote documents atomically:** `packages/relay-deploy/files/` stages `/workspaces/northstar/checkpoints/remote/`; `relay file put` requires `expected_revision`. This prevents a short replacement from leaving stale tail content and prevents a concurrent operator from losing a newer remote change.","- **Keep retry policy narrow:** `packages/relay-deploy/retry/` reads `/workspaces/northstar/docs/runbooks/`; `relay_retryable_error` excludes policy denials and invalid manifests. Delay includes a firm attempt limit and a stable request identity so a temporary transport fault cannot become duplicate provider work.","- **Promote the artifact already tested:** `packages/relay-deploy/promote/` selects `/workspaces/northstar/artifacts/releases/`; `relay promote` verifies `tested_artifact_sha`. The command refuses a rebuild during promotion because even an equivalent source revision can yield a different dependency graph or bundle digest.",``,`## Orbit browser collaboration (Session April 11, #447)`,"- **Represent each shared tab as an Orbit room:** `packages/orbit-collab/rooms/` persists `/workspaces/northstar/testdata/orbit/`; `orbit room create` returns `room_epoch` and `participant_slot`. Room identity stays stable across transport replacement, while a new epoch makes every participant reject late state from a connection that no longer owns the session.","- **Send cursor updates as replaceable state:** `packages/orbit-collab/presence/` replays `/workspaces/northstar/fixtures/presence/`; `orbit_presence_v5` coalesces superseded coordinates. Presence may be lost without harming the document because the next update replaces it, which keeps interaction smooth under delay without building an unbounded queue.","- **Keep durable messages separate from presence:** `packages/orbit-collab/messages/` writes `/workspaces/northstar/checkpoints/orbit/`; `orbit message append` assigns `message_sequence`. A message is acknowledged only after durable storage, and replay begins after the highest sequence already seen so reconnect cannot create a duplicate conversation entry.","- **Recover from a stale browser execution context:** `packages/orbit-collab/browser/` logs `/workspaces/northstar/traces/orbit/`; `orbit context renew` increments `context_generation`. The old context is detached before a new observer is added, preventing both generations from sending navigation and focus events for the same visible tab.","- **Capture collaboration evidence through the public surface:** `packages/orbit-collab/qa/` stores `/workspaces/northstar/artifacts/screens/`; `keel orbit snapshot` records `active_room_id`. Review uses the same controls available to a person, then records visible member state, selected room, pending draft, and transport health beside the image.","- **Preserve pending input during reconnect:** `packages/orbit-collab/drafts/` tests `/workspaces/northstar/repros/reconnect/`; `draft_revision` survives one `transport_rebind`. The draft remains local until send succeeds, and a successful acknowledgement clears only the revision that was actually delivered rather than newer text still being edited.",``,`## Incident review — reconnect storm (Session April 12)`,"- **Root cause was competing transport owners:** `packages/orbit-collab/transport/` and `/workspaces/northstar/repros/reconnect/` both advanced `room_epoch`; the fix elects one `transport_owner`. The incident began when a browser wake event and a network return event each created a connection before either could observe the other.","- **The retry loop hid the first useful error:** `packages/orbit-collab/retry/` now records `/workspaces/northstar/traces/incidents/`; `first_failure_code` is retained in `reconnect_report`. Later timeout noise remains available in the trace, but the summary leads with the event that first moved the room away from healthy state.","- **Recovery must preserve the draft and selected room:** `packages/orbit-collab/state/` replays `/workspaces/northstar/fixtures/recovery/`; `orbit_recover_state` restores `active_room_id`. The acceptance check covers unsent text, keyboard focus, scroll position, participant order, and exactly one successful delivery after transport recovery.",``,`## Mobile companion sync (Session April 14, #462)`,"- **Pair the companion with an ephemeral code:** `packages/mobile-sync/pairing/` verifies `/workspaces/northstar/testdata/pairing/`; `mobile_pair_code` expires with `pairing_epoch`. Approval shows the synthetic device name and requested capability before either side accepts, and cancellation invalidates the code immediately rather than waiting for normal expiry.","- `packages/mobile-sync/outbox/` mirrors `/workspaces/northstar/fixtures/offline/`; `mobile_outbox_flush` preserves ordering after a network transition. Each item carries a local sequence and stable identity, so a retry can continue after the last acknowledgement without losing or repeating an action.","- `packages/mobile-sync/media/` writes `/workspaces/northstar/artifacts/mobile/`; `mobile_media_chunk` carries a checksum before upload. The receiver verifies every chunk before assembly and reports the first damaged range, which permits a narrow retry instead of sending the complete recording again.","- `packages/mobile-sync/notifications/` reads `/workspaces/northstar/testdata/push/`; `notification_dedupe_key` prevents duplicate alerts after resume. Foreground delivery updates visible state without another banner, while background delivery presents one alert that opens the exact room named by the event.","- `packages/mobile-sync/state/` compares `/workspaces/northstar/checkpoints/mobile/`; `mobile_state_merge` rejects an older `device_epoch`. Merge keeps local draft content, accepts newer durable state, and records a conflict when both sides changed the same preference after their common revision.","- `packages/mobile-sync/diagnostics/` exports `/workspaces/northstar/traces/mobile/`; `mobile_diag_bundle` removes payload text but keeps timing. The bundle includes version, platform, connection change, queue depth, retry count, and state generation so support can reason about order without reading user content.","- `packages/mobile-sync/accessibility/` tests `/workspaces/northstar/fixtures/a11y/`; `focus_restore_target` survives a view rebuild. The check follows pairing, room choice, draft entry, send, background, and resume with a keyboard so focus order is verified through a complete task.","- `packages/mobile-sync/release/` stages `/workspaces/northstar/artifacts/mobile/`; `mobile_release_channel` defaults to the review track. Promotion requires the same signed archive that passed device smoke review, with no rebuild or configuration change between approval and publication.","- `packages/mobile-sync/qa/` records `/workspaces/northstar/reviews/mobile/`; `mobile_smoke_matrix` covers offline launch, resume, and re-pairing. Each case states the initial network and account state, the exact action, the visible result, and the durable state expected after another launch.",``,`## Release readiness (Session April 16)`,"- `packages/release-checks/lint/` scans `/workspaces/northstar/checkpoints/release/`; `keel verify lint` writes `lint_run_id` for the candidate. Review links that identity rather than a copied summary so any warning, formatter change, or excluded file remains visible in its original context.","- `packages/release-checks/types/` scans `/workspaces/northstar/checkpoints/release/`; `keel verify types` records `type_graph_hash`. A later source or dependency change invalidates that graph and requires another check before the candidate can share the earlier result.","- `packages/release-checks/tests/` reads `/workspaces/northstar/testdata/`; `keel verify tests` stores `test_matrix_id`. The matrix names every package, host, browser, and fixture group that ran, making an omitted surface as visible as a failed assertion.","- `packages/release-checks/coverage/` reads `/workspaces/northstar/artifacts/coverage/`; `keel verify coverage` compares `coverage_floor_set`.","- `packages/release-checks/build/` emits `/workspaces/northstar/artifacts/builds/`; `keel verify build` stamps `bundle_manifest_sha`.","- `packages/release-checks/smoke/` stores `/workspaces/northstar/reviews/smoke/`; `keel verify smoke` requires `reviewer_ack`.",``,`## Durable project reference`,``,`### People and product context`,"- Mina Kestrel leads Northstar product engineering; the synthetic team directory lives in `packages/project-context/people/` and uses `mina_kestrel` plus `product_lead`.","- Oren Vale owns the Aurora renderer; notes in `packages/project-context/people/` use `oren_vale` and `rendering_owner`.","- Jules Rowan owns Harbor and Relay; entries in `packages/project-context/people/` use `jules_rowan` and `control_plane_owner`.","- Nia Ember owns Signal audio; records in `packages/project-context/people/` use `nia_ember` and `audio_owner`.","- Kestrel is the primary engineering agent; `/workspaces/northstar/agents/` maps `agent_kestrel` to `northstar_generalist`.","- Northstar is a fictional collaborative desktop environment; `/workspaces/northstar/docs/` defines `northstar_product` and `desktop_collaboration`.","- Aurora renders local workspaces and review scenes; `/workspaces/northstar/docs/` defines `aurora_renderer` and `scene_protocol_v6`.","- Atlas hosts sandboxed extensions; `/workspaces/northstar/docs/` defines `atlas_runtime` and `plugin_manifest_v4`.","- Harbor manages control-plane resources; `/workspaces/northstar/docs/` defines `harbor_cli` and `harbor_result_v2`.","- Relay promotes verified artifacts; `/workspaces/northstar/docs/` defines `relay_deploy` and `release_descriptor_sha`.","- Orbit synchronizes shared browser state; `/workspaces/northstar/docs/` defines `orbit_collab` and `room_epoch`.","- Signal captures and transcribes synthetic audio; `/workspaces/northstar/docs/` defines `signal_audio` and `utterance_seq`.","- Keel is the repository and verification CLI; `/workspaces/northstar/docs/` defines `keel_cli` and `verification_run`.","- Rook is the deterministic package builder; `/workspaces/northstar/docs/` defines `rook_builder` and `bundle_manifest`.","- The demo tenant is always synthetic; `/workspaces/northstar/fixtures/` uses `tenant_sandbox` and `viewer_alpha`.","- Review accounts use the reserved invalid domain; `/workspaces/northstar/fixtures/` stores `mina@example.invalid` and `oren@example.invalid`.","- Dates and identifiers describe an invented future project; `/workspaces/northstar/docs/` labels `fixture_provenance` and `synthetic_only`.","- Product decisions favor understandable failure states; `/workspaces/northstar/docs/` records `visible_diagnostics` and `recoverable_actions`.",``,`### Engineering preferences`,"- Keep each review branch narrow; `/workspaces/northstar/reviews/` records `change_scope` and `review_owner`.","- Prefer native text patches for source changes; `/workspaces/northstar/checkpoints/` records `patch_digest` and `base_oid`.","- Wait on CI through the supported command; `/workspaces/northstar/checkpoints/` stores `verification_run` and `final_status`.","- Never commit credential material; `/workspaces/northstar/config/` contains `credential_handle` and `lease_expiry` only.","- Require explicit confirmation before production promotion; `/workspaces/northstar/reviews/` stores `promotion_approval` and `rollback_plan`.","- Reproduce failures before changing a workaround; `/workspaces/northstar/repros/` stores `fixture_seed` and `first_failure_code`.","- Diagnose invisible failures with traffic and state metrics; `/workspaces/northstar/traces/` tracks `request_count` and `state_generation`.","- Use exact units instead of ambiguous shorthand; `/workspaces/northstar/docs/` prefers `approximately` and `milliseconds`.","- Keep secrets inside the broker boundary; `/workspaces/northstar/config/` exposes `credential_handle` and `provider_scope`.","- Report regressions with measured before and after values; `/workspaces/northstar/reviews/` records `baseline_metric` and `candidate_metric`.",``,`### Repository and verification map`,"- The monorepo root is `/workspaces/northstar/`; `packages/northstar-shell` contains the desktop host and `keel verify shell` is its focused gate.","- Aurora lives in `/workspaces/northstar/packages/`; `@northstar/aurora` is the public package and `aurora_protocol_v6` is the renderer contract.","- Atlas lives in `/workspaces/northstar/packages/`; `@northstar/atlas-runtime` owns plugin loading and `plugin_manifest_v4` is its schema.","- Harbor and Relay live in `/workspaces/northstar/packages/`; `@northstar/harbor-cli` owns commands and `release_descriptor_sha` identifies promotion input.","- Orbit and Signal live in `/workspaces/northstar/packages/`; `@northstar/orbit-collab` owns shared state and `utterance_seq` orders audio text.","- All synthetic fixtures live in `/workspaces/northstar/testdata/`; `keel verify fixtures` checks privacy and `fixture_provenance` marks their source.",``,`### Infrastructure and operations`,"- The local control plane uses `/workspaces/northstar/config/`; `harbor_local_profile` selects the sandbox and `credential_handle` references broker state.","- Preview artifacts use `/workspaces/northstar/artifacts/`; `aurora_bundle_hash` identifies the renderer and `canonical_bundle_id` drives drift checks.","- Deployment manifests use `/workspaces/northstar/artifacts/`; `release_descriptor_sha` pins content and `tested_artifact_sha` gates promotion.","- Collaboration traces use `/workspaces/northstar/traces/`; `room_epoch` identifies a session and `context_generation` identifies browser renewal.","- Mobile diagnostics use `/workspaces/northstar/traces/`; `mobile_diag_bundle` strips content and `device_epoch` orders state.","- Incident runbooks use `/workspaces/northstar/docs/`; `first_failure_code` names the initiating fault and `rollback_plan` names recovery.","- Review evidence uses `/workspaces/northstar/reviews/`; `baseline_metric` and `candidate_metric` keep UI judgments quantitative.","- Production promotion remains disabled in this fixture; `/workspaces/northstar/config/` sets `production_enabled` false and `tenant_sandbox` as the only tenant."].join(`
|
|
2851
|
-
`)+``;var
|
|
2881
|
+
`)+``;var Fr=new Set([`user`,`feedback`,`project`]),Ir={user:{hue:`--rose`,label:`user`},feedback:{hue:`--cyan`,label:`feedback`},project:{hue:`--violet`,label:`project`}};function Lr(e){return e===`feedback`||e===`project`?e:`user`}var Rr=D(`
|
|
2852
2882
|
:host {
|
|
2853
2883
|
display: inline-flex;
|
|
2854
2884
|
vertical-align: middle;
|
|
@@ -2870,13 +2900,13 @@ void main(){
|
|
|
2870
2900
|
background: color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-fill), var(--canvas));
|
|
2871
2901
|
border: 1px solid color-mix(in srgb, var(--mtag-hue, var(--rose)) var(--mtag-border), var(--line));
|
|
2872
2902
|
}
|
|
2873
|
-
`),
|
|
2903
|
+
`),zr=`slicc-memtag-dark`,Br=`
|
|
2874
2904
|
.dark slicc-memtag,
|
|
2875
2905
|
[data-theme="dark"] slicc-memtag {
|
|
2876
2906
|
--mtag-fill: 22%;
|
|
2877
2907
|
--mtag-border: 38%;
|
|
2878
2908
|
}
|
|
2879
|
-
`;function
|
|
2909
|
+
`;function Vr(e){if(e.getElementById(zr))return;let t=e.createElement(`style`);t.id=zr,t.textContent=Br,(e.head??e.documentElement).appendChild(t)}w(`slicc-memtag`,class extends HTMLElement{static observedAttributes=[`type`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Rr]}connectedCallback(){Vr(this.ownerDocument),this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get type(){return Lr(this.getAttribute(`type`))}set type(e){this.setAttribute(`type`,Fr.has(e)?e:`user`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let{hue:e,label:t}=Ir[this.type],n=this.label??E(`slot`,null,t),r=E(`span`,{class:`mtag`,part:`tag`,style:`--mtag-hue:var(${e})`},n);this.#e.replaceChildren(r)}});var Hr=`
|
|
2880
2910
|
slicc-memrow {
|
|
2881
2911
|
display: block;
|
|
2882
2912
|
border: 1px solid var(--line);
|
|
@@ -2983,7 +3013,7 @@ slicc-memrow.fresh {
|
|
|
2983
3013
|
background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
|
|
2984
3014
|
border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
|
|
2985
3015
|
}
|
|
2986
|
-
`,
|
|
3016
|
+
`,Ur=`slicc-memrow-style`,Wr=96,Gr=12;function Kr(e,t){if(e.length<=Wr)return{heading:e,summary:t};let n=e.slice(0,97).lastIndexOf(` `),r=n>=Gr?n:Wr,i=e.slice(r).trim();return{heading:e.slice(0,r).trim(),summary:[i,t].filter(Boolean).join(` `)}}function qr(e){if(e.getElementById(Ur))return;let t=e.createElement(`style`);t.id=Ur,t.textContent=Hr,(e.head??e.documentElement).appendChild(t)}function Jr(e){return e===`feedback`||e===`project`?e:`user`}w(`slicc-memrow`,class extends HTMLElement{static get observedAttributes(){return[`heading`,`summary`,`tag`,`fresh`,`expanded`]}#e=!1;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=0;#c=!1;#l=!1;#u=null;#d=null;#f=null;connectedCallback(){qr(this.ownerDocument),this.#e||this.#p(),this.#m(),this.#y(),this.#h()}disconnectedCallback(){this.#b(),this.#o?.disconnect(),this.#o=null,this.#s&&cancelAnimationFrame(this.#s),this.#s=0}attributeChangedCallback(){this.#e&&this.#m()}get heading(){return this.getAttribute(`heading`)??``}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get summary(){return this.getAttribute(`summary`)??``}set summary(e){e==null?this.removeAttribute(`summary`):this.setAttribute(`summary`,e)}get tag(){return Jr(this.getAttribute(`tag`))}set tag(e){this.setAttribute(`tag`,e)}get fresh(){return this.hasAttribute(`fresh`)}set fresh(e){this.toggleAttribute(`fresh`,e)}get expanded(){return this.hasAttribute(`expanded`)}set expanded(e){this.toggleAttribute(`expanded`,e)}setHeadingContent(e){this.#c=!0,this.#n?this.#n.replaceChildren(e):this.#u=e}setBodyContent(e){this.#l=!0,this.#i?this.#i.replaceChildren(e):this.#d=e,this.#g()}#p(){this.#e=!0;let e=this.ownerDocument.createElement(`button`);e.className=`mt`,e.type=`button`;let t=this.ownerDocument.createElement(`b`),n=this.ownerDocument.createElement(`slicc-memtag`);e.append(t,n);let r=this.ownerDocument.createElement(`div`);for(r.className=`ms`;this.firstChild;)r.appendChild(this.firstChild);this.#u&&t.replaceChildren(this.#u),this.#d&&r.replaceChildren(this.#d),this.#u=null,this.#d=null,this.append(e,r),this.#t=e,this.#n=t,this.#r=n,this.#i=r}#m(){let e=this.#n,t=this.#r,n=this.#i;if(!e||!t||!n)return;let r=Kr(this.heading,this.summary);this.#c||(e.textContent=r.heading);let i=this.tag;if(t.className=``,t.hidden=!this.hasAttribute(`tag`),t.setAttribute(`type`,i),t.textContent=``,!this.#l){let e=n.firstChild,t=r.summary;e&&e.nodeType===Node.TEXT_NODE?e.textContent=t:t&&n.insertBefore(this.ownerDocument.createTextNode(t),e)}this.classList.toggle(`fresh`,this.fresh),this.#v(),this.#g()}#h(){let e=this.#i;!e||this.#o||(this.#o=new ResizeObserver(()=>this.#g()),this.#o.observe(e),this.#g())}#g(){!this.isConnected||this.expanded||(this.#s&&cancelAnimationFrame(this.#s),this.#s=requestAnimationFrame(()=>{this.#s=0;let e=this.#i;!e||this.expanded||(e.scrollHeight>e.clientHeight+1?this.#_():this.#a?.remove(),this.#v())}))}#_(){if(!this.#a){let e=this.ownerDocument.createElement(`button`);e.className=`mexpand`,e.type=`button`,e.addEventListener(`click`,e=>{e.stopPropagation(),this.expanded=!this.expanded}),this.#a=e}this.#a.isConnected||this.append(this.#a)}#v(){let e=this.#a;if(!e?.isConnected)return;let t=this.expanded;e.textContent=t?`Show less`:`Show more`,e.setAttribute(`aria-expanded`,String(t))}#y(){this.#f||(this.#f=e=>this.#x(e),this.addEventListener(`click`,this.#f))}#b(){this.#f&&=(this.removeEventListener(`click`,this.#f),null)}#x(e){this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{heading:this.heading,summary:this.summary,tag:this.tag,sourceEvent:e}}))}});var Yr=`
|
|
2987
3017
|
slicc-memory-panel{display:flex;flex-direction:column;min-height:0;overflow:hidden;background:var(--canvas);color:var(--ink);font-family:var(--ui)}
|
|
2988
3018
|
slicc-memory-panel .mp-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:12px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--canvas) 94%,var(--violet))}
|
|
2989
3019
|
slicc-memory-panel .mp-search{display:flex;align-items:center;min-width:0;border:1px solid var(--line);border-radius:10px;background:var(--canvas);padding:0 10px}
|
|
@@ -3016,7 +3046,7 @@ slicc-memory-panel .mp-rows{padding:0;border-top:0}
|
|
|
3016
3046
|
slicc-memory-panel slicc-memrow{border:0;border-radius:0;border-top:1px solid var(--line);margin:0;padding:7px 12px}
|
|
3017
3047
|
slicc-memory-panel slicc-memrow .mt b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
3018
3048
|
slicc-memory-panel slicc-memrow .ms{-webkit-line-clamp:1;margin-top:2px;font-size:11px}
|
|
3019
|
-
`,
|
|
3049
|
+
`,Xr=`slicc-memory-panel-style`;function Zr(e){if(e.getElementById(Xr))return;let t=e.createElement(`style`);t.id=Xr,t.textContent=Yr,(e.head??e.documentElement).append(t)}function Qr(e){return e.getAttribute(`section`)?.trim()||`General`}function U(e){let t=new Map;for(let n of e){let e=Qr(n),r=t.get(e)??[];r.push(n),t.set(e,r)}return t}var $r=2,ei=[`user`,`feedback`,`project`];function ti(e){for(let t of ei)if(e.filter(e=>e.getAttribute(`tag`)===t).length*2>e.length)return t;return null}function ni(e,t){let n=ti(t);n&&e.setAttribute(`data-suppress-${n}`,``)}function ri(e){let t=/^Auto-extracted \((?:(\d{4})-(\d{2})-(\d{2}),\s*)?([^)]+)\)$/.exec(e);if(!t){let t=/\(([^)]*\bsessions?\b[^)]*)\)/i.exec(e);return t?{name:`${e.slice(0,t.index)} ${e.slice(t.index+t[0].length)}`.replace(/\s+[—–-]\s*$/,``).replace(/\s+/g,` `).trim()||`Session memory`,source:t[1]}:{name:e,source:``}}let[,n,r,i,a]=t;if(!n||!r||!i)return{name:`Auto-extracted`,source:a};let o=new Date(Date.UTC(Number(n),Number(r)-1,Number(i)));return{name:new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`}).format(o),source:a.replaceAll(`-`,` `)}}w(`slicc-memory-panel`,class extends HTMLElement{#e=[];#t=null;#n=null;#r=null;#i=null;#a=``;#o=`all`;#s=new Set;#c=!1;connectedCallback(){Zr(this.ownerDocument),this.#c||this.#u(),this.#h()}setRows(e){let t=new Set(U(this.#e).keys());this.#e=e.filter(e=>e.matches(`slicc-memrow`)),this.#l();let n=[...U(this.#e).keys()],r=new Set;for(let e of n)(!t.has(e)||this.#s.has(e))&&r.add(e);this.#s=r,this.#c&&this.#h()}#l(){let e=this.#i;if(e){for(let t of e.options){if(t.value===`all`)continue;let e=!this.#e.some(e=>e.getAttribute(`tag`)===t.value);t.hidden=e,t.disabled=e}e.value=this.#o}}#u(){this.#c=!0;let e=E(`input`,{type:`search`,placeholder:`Search memories…`,"aria-label":`Search memories`}),t=E(`select`,{class:`mp-filter`,"aria-label":`Filter memories by tag`},E(`option`,{value:`all`},`All tags`),E(`option`,{value:`user`},`User`),E(`option`,{value:`feedback`},`Feedback`),E(`option`,{value:`project`},`Project`)),n=E(`div`,{class:`mp-count`,role:`status`,"aria-live":`polite`}),r=E(`div`,{class:`mp-toolbar`},E(`label`,{class:`mp-search`},e),t,n),i=E(`div`,{class:`mp-body`});e.addEventListener(`input`,()=>{this.#a=e.value.trim().toLowerCase(),this.#h()}),t.addEventListener(`change`,()=>{this.#o=t.value,this.#h()}),this.replaceChildren(r,i),this.#t=i,this.#n=n,this.#r=e,this.#i=t,this.#l()}#d(){return this.#e.filter(e=>this.#o!==`all`&&e.getAttribute(`tag`)!==this.#o?!1:!this.#a||[e.getAttribute(`heading`),e.getAttribute(`summary`),e.getAttribute(`section`),e.getAttribute(`tag`),e.textContent].filter(Boolean).join(` `).toLowerCase().includes(this.#a))}#f(e){return E(`div`,{class:`mp-empty`},E(`strong`,null,e?`No matching memories`:`No memories yet`),E(`span`,null,e?`Try a different search or tag.`:`Memories extracted from conversations will appear here.`))}#p(e,t){let n=ri(e),r=E(`details`,{class:`mp-group`},E(`summary`,{class:`mp-section`},E(`span`,{class:`mp-section-name`},n.name),...n.source?[E(`span`,{class:`mp-section-source`},n.source)]:[],E(`span`,{class:`mp-section-count`},`${t.length}`)),E(`div`,{class:`mp-rows`},...t));return r.open=this.#a?!0:this.#s.has(e),r.addEventListener(`toggle`,()=>{r.open?this.#s.add(e):this.#s.delete(e)}),ni(r,t),r}#m(e){let t=E(`div`,{class:`mp-flat`},...e);return ni(t,e),t}#h(){let e=this.#t;if(!e)return;let t=this.#d();if(this.#r&&(this.#r.placeholder=`Search ${this.#e.length} memories…`),this.#n&&(this.#n.textContent=`${t.length} of ${this.#e.length} memories`),this.#e.length===0){e.replaceChildren(this.#f(!1));return}if(t.length===0){e.replaceChildren(this.#f(!0));return}let n=U(t);if(n.size<$r){e.replaceChildren(this.#m(t));return}e.replaceChildren(...[...n].map(([e,t])=>this.#p(e,t)))}});var ii=`
|
|
3020
3050
|
slicc-palette-grid {
|
|
3021
3051
|
display: block;
|
|
3022
3052
|
flex: 1;
|
|
@@ -3035,7 +3065,7 @@ slicc-palette-grid .palgrid {
|
|
|
3035
3065
|
grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
|
|
3036
3066
|
gap: 10px;
|
|
3037
3067
|
}
|
|
3038
|
-
`,
|
|
3068
|
+
`,ai=`slicc-palette-grid-style`;function oi(e){if(e.getElementById(ai))return;let t=e.createElement(`style`);t.id=ai,t.textContent=ii,(e.head??e.documentElement).appendChild(t)}var si=[{label:`canvas #faf6f1`,color:`#faf6f1`},{label:`cone #ef7000`,color:`#ef7000`},{label:`scoop #8b5cf6`,color:`#8b5cf6`},{label:`scoop #06b6d4`,color:`#06b6d4`},{label:`scoop #f43f5e`,color:`#f43f5e`},{label:`ink #0a0a0a`,color:`#0a0a0a`}],ci=`brand palette · tokens`;w(`slicc-palette-grid`,class extends HTMLElement{static get observedAttributes(){return[`heading`]}#e=!1;#t=null;#n=null;#r=[];#i=null;#a=null;connectedCallback(){oi(this.ownerDocument),this.#e||this.#o(),this.#s(),this.#l()}disconnectedCallback(){this.#u()}attributeChangedCallback(){this.#e&&this.#s()}get heading(){return this.getAttribute(`heading`)??ci}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get tokens(){return(this.#i??si).map(e=>({...e}))}set tokens(e){this.#i=Array.isArray(e)?e.map(e=>({label:String(e.label??``),color:String(e.color??``)})):null,this.#e&&this.#c()}#o(){for(this.#e=!0,this.#r=[];this.firstChild;)this.#r.push(this.firstChild),this.removeChild(this.firstChild);let e=this.ownerDocument.createElement(`h4`),t=this.ownerDocument.createElement(`div`);t.className=`palgrid`,this.append(e,t),this.#t=e,this.#n=t,this.#c()}#s(){this.#t&&(this.#t.textContent=this.heading)}#c(){let e=this.#n;if(e){e.replaceChildren();for(let t of this.#r)e.appendChild(t);for(let t of this.tokens){let n=this.ownerDocument.createElement(`slicc-palette-cell`);n.setAttribute(`color`,t.color),n.setAttribute(`label`,t.label),e.appendChild(n)}}}#l(){this.#a||(this.#a=e=>{let t=e.detail??{};this.dispatchEvent(new CustomEvent(`select`,{bubbles:!0,composed:!0,detail:{label:t.label??``,color:t.color??``,sourceEvent:e}}))},this.addEventListener(`palette-select`,this.#a))}#u(){this.#a&&=(this.removeEventListener(`palette-select`,this.#a),null)}});var li=D(`
|
|
3039
3069
|
:host { display: inline-block; position: relative; font-family: var(--ui); }
|
|
3040
3070
|
.trigger {
|
|
3041
3071
|
display: inline-flex; align-items: center; justify-content: center;
|
|
@@ -3076,7 +3106,7 @@ slicc-palette-grid .palgrid {
|
|
|
3076
3106
|
.item .ic { flex: 0 0 auto; display: flex; color: var(--txt-2, #505050); }
|
|
3077
3107
|
.item.danger .ic { color: var(--rose, #f43f5e); }
|
|
3078
3108
|
@media (prefers-reduced-motion: reduce) { .pop { transition: none; } }
|
|
3079
|
-
`);w(`slicc-avatar-menu`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t;#n;#r=[];#i=null;#a=e=>{this.open&&!e.composedPath().includes(this)&&this.hide()};#o=e=>{e.key===`Escape`&&this.open&&(this.hide(),this.#t.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3109
|
+
`);w(`slicc-avatar-menu`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t;#n;#r=[];#i=null;#a=e=>{this.open&&!e.composedPath().includes(this)&&this.hide()};#o=e=>{e.key===`Escape`&&this.open&&(this.hide(),this.#t.focus())};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[li],this.#t=E(`button`,{class:`trigger`,part:`trigger`,type:`button`,"aria-haspopup":`menu`,"aria-expanded":`false`},E(`slot`)),this.#n=E(`div`,{class:`pop`,part:`popover`,role:`menu`}),this.#e.replaceChildren(this.#t,this.#n),this.#t.addEventListener(`click`,()=>this.toggle())}connectedCallback(){this.#c()}disconnectedCallback(){document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o)}attributeChangedCallback(e){if(e===`open`){let e=this.open;this.#t.setAttribute(`aria-expanded`,e?`true`:`false`),e?(document.addEventListener(`mousedown`,this.#a),document.addEventListener(`keydown`,this.#o)):(document.removeEventListener(`mousedown`,this.#a),document.removeEventListener(`keydown`,this.#o))}}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get user(){return this.#i}set user(e){this.#i=e,this.#c()}get items(){return this.#r.map(e=>({...e}))}set items(e){this.#r=Array.isArray(e)?e.map(e=>({...e})):[],this.#c()}show(){this.open||(this.open=!0,this.#s())}hide(){this.open&&(this.open=!1,this.#s())}toggle(){this.open?this.hide():this.show()}#s(){this.dispatchEvent(new CustomEvent(`slicc-avatar-menu-toggle`,{detail:{open:this.open},bubbles:!0,composed:!0}))}#c(){let e=[];if(this.#i){let t=E(`div`,{class:`user`},E(`div`,{class:`name`},this.#i.name));this.#i.provider&&t.append(E(`div`,{class:`prov`},this.#i.provider)),e.push(t)}for(let t of this.#r)if(t.kind===`separator`)e.push(E(`div`,{class:`sep`,role:`separator`}));else if(t.kind===`caption`)e.push(E(`div`,{class:`cap`},t.label??``));else{let r=E(`button`,{class:`item${t.danger?` danger`:``}`,part:`item`,type:`button`,role:`menuitem`,"data-id":t.id??``,disabled:t.disabled?!0:void 0});t.icon&&r.append(E(`span`,{class:`ic`},n(t.icon,{size:16}))),r.append(E(`span`,{class:`lb`},t.label??``)),t.disabled||r.addEventListener(`click`,()=>this.#l(t.id??``)),e.push(r)}this.#n.replaceChildren(...e)}#l(e){this.dispatchEvent(new CustomEvent(`slicc-avatar-action`,{detail:{id:e},bubbles:!0,composed:!0})),this.hide()}});var ui=`
|
|
3080
3110
|
.slicc-nav {
|
|
3081
3111
|
display: flex;
|
|
3082
3112
|
align-items: center;
|
|
@@ -3103,7 +3133,7 @@ slicc-palette-grid .palgrid {
|
|
|
3103
3133
|
@media (max-width: 560px) {
|
|
3104
3134
|
.slicc-nav { gap: 8px; padding: 0 10px; }
|
|
3105
3135
|
}
|
|
3106
|
-
`,
|
|
3136
|
+
`,di=`slicc-nav-style`;function fi(e){if(e.getElementById(di))return;let t=e.createElement(`style`);t.id=di,t.textContent=ui,(e.head??e.documentElement).appendChild(t)}w(`slicc-nav`,class extends HTMLElement{static observedAttributes=[`accent`];#e=!1;connectedCallback(){fi(this.ownerDocument),this.classList.add(`slicc-nav`),this.setAttribute(`part`,`bar`),this.#t(),this.#n(this.getAttribute(`accent`))}attributeChangedCallback(e,t,n){e!==`accent`||t===n||this.isConnected&&(this.#n(n),this.dispatchEvent(new CustomEvent(`slicc-nav-accent-change`,{detail:{accent:n},bubbles:!0,composed:!0})))}get accent(){return this.getAttribute(`accent`)}set accent(e){e==null?this.removeAttribute(`accent`):this.setAttribute(`accent`,e)}get spacer(){return this.#t(),this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)}#t(){if(this.#e||(this.#e=!0,this.querySelector(`:scope > .slicc-nav__spacer, :scope > .spacer`)))return;let e=this.ownerDocument.createElement(`div`);e.className=`slicc-nav__spacer`,e.setAttribute(`part`,`spacer`),e.setAttribute(`aria-hidden`,`true`);let t=this.querySelector(`:scope > slicc-floatbar, :scope > slicc-theme-toggle, :scope > slicc-avatar`);t?this.insertBefore(e,t):this.appendChild(e)}#n(e){e==null||e.trim()===``?this.style.removeProperty(`--ctx`):this.style.setProperty(`--ctx`,e)}});var pi=D(`
|
|
3107
3137
|
:host {
|
|
3108
3138
|
position: fixed;
|
|
3109
3139
|
z-index: 110;
|
|
@@ -3141,7 +3171,7 @@ slicc-palette-grid .palgrid {
|
|
|
3141
3171
|
.item.destructive {
|
|
3142
3172
|
color: var(--red, #e53e3e);
|
|
3143
3173
|
}
|
|
3144
|
-
`),
|
|
3174
|
+
`),mi=null,W=null,G=null,hi=class e extends HTMLElement{#e;#t=void 0;#n=null;#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[pi]}connectedCallback(){this.#e.addEventListener(`click`,this.#i)}disconnectedCallback(){this.#e.removeEventListener(`click`,this.#i)}#i=t=>{let n=t.target.closest(`[data-action]`);if(!n)return;let r=n.dataset.action;(this.#r??this.#n??this).dispatchEvent(new CustomEvent(`overflow-action`,{bubbles:!0,composed:!0,detail:{action:r,context:this.#t}})),e.hide()};static show(t){e.hide();let r=document.createElement(`slicc-overflow-menu`);r.#t=t.context,r.#n=t.anchor,r.#r=t.dispatchTarget??null;let i=t.items.filter(e=>e.visible!==!1),a=E(`div`,{class:`menu`});for(let e of i){let t=e.destructive?`item destructive`:`item`,r=[];e.icon&&r.push(n(e.icon,{size:14})),r.push(e.label);let i=E(`button`,{class:t,"data-action":e.id},...r);a.appendChild(i)}r.#e.appendChild(a),document.body.appendChild(r),mi=r;let o=t.anchor.getBoundingClientRect(),s=r.getBoundingClientRect(),c=o.bottom+4;c+s.height>window.innerHeight&&(c=o.top-s.height-4);let l=o.right-s.width;l<4&&(l=o.left),r.style.top=`${c}px`,r.style.left=`${l}px`,W=t=>{t.key===`Escape`&&e.hide()},G=n=>{let i=n.composedPath();!i.includes(r)&&!i.includes(t.anchor)&&e.hide()},document.addEventListener(`keydown`,W),document.addEventListener(`pointerdown`,G,{capture:!0})}static hide(){mi&&=(mi.remove(),null),W&&=(document.removeEventListener(`keydown`,W),null),G&&=(document.removeEventListener(`pointerdown`,G,{capture:!0}),null)}};w(`slicc-overflow-menu`,hi);var gi=D(`
|
|
3145
3175
|
:host { display: none; }
|
|
3146
3176
|
:host([open]) { display: block; }
|
|
3147
3177
|
.overlay {
|
|
@@ -3186,7 +3216,7 @@ slicc-palette-grid .palgrid {
|
|
|
3186
3216
|
@media (prefers-reduced-motion: reduce) {
|
|
3187
3217
|
.overlay, .dialog { transition: none; }
|
|
3188
3218
|
}
|
|
3189
|
-
`);w(`slicc-dialog`,class extends HTMLElement{static observedAttributes=[`open`,`heading`,`description`,`no-close-button`];#e;#t;#n;#r;#i;#a;#o=null;#s=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#c(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3219
|
+
`);w(`slicc-dialog`,class extends HTMLElement{static observedAttributes=[`open`,`heading`,`description`,`no-close-button`];#e;#t;#n;#r;#i;#a;#o=null;#s=e=>{e.key===`Escape`&&this.open&&(e.stopPropagation(),this.#c(`escape`))};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[gi],this.#r=E(`div`,{class:`title`,part:`title`,id:`slicc-dialog-title`}),this.#i=E(`div`,{class:`desc`,part:`description`}),this.#a=E(`button`,{class:`x`,part:`close`,type:`button`,"aria-label":`Close`},n(`x`,{size:18}));let e=E(`div`,{class:`body`},E(`slot`)),t=E(`div`,{class:`footer`},E(`slot`,{name:`footer`}));this.#n=E(`div`,{class:`dialog`,part:`dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`slicc-dialog-title`,tabindex:`-1`},this.#a,this.#r,this.#i,e,t),this.#t=E(`div`,{class:`overlay`,part:`overlay`},this.#n),this.#e.replaceChildren(this.#t),this.#a.addEventListener(`click`,()=>this.#c(`close-button`)),this.#t.addEventListener(`mousedown`,e=>{e.target===this.#t&&!this.persistent&&this.#c(`backdrop`)})}connectedCallback(){this.#u()}disconnectedCallback(){document.removeEventListener(`keydown`,this.#s,!0)}attributeChangedCallback(e){e===`open`?this.#u():this.#l()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get heading(){return this.getAttribute(`heading`)}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get description(){return this.getAttribute(`description`)}set description(e){e==null?this.removeAttribute(`description`):this.setAttribute(`description`,e)}get persistent(){return this.hasAttribute(`persistent`)}set persistent(e){this.toggleAttribute(`persistent`,e)}show(){this.open||=!0}hide(){this.open&&this.#c(`api`)}#c(e){this.open=!1,this.dispatchEvent(new CustomEvent(`slicc-dialog-close`,{detail:{reason:e},bubbles:!0,composed:!0}))}#l(){this.#r.textContent=this.heading??``,this.#r.style.display=this.heading?``:`none`,this.#i.textContent=this.description??``,this.#i.style.display=this.description?``:`none`,this.#a.style.display=this.hasAttribute(`no-close-button`)?`none`:``}#u(){this.#l(),this.open?(this.#o=this.getRootNode().activeElement,document.addEventListener(`keydown`,this.#s,!0),requestAnimationFrame(()=>this.#n.focus())):(document.removeEventListener(`keydown`,this.#s,!0),this.#o?.focus?.(),this.#o=null)}});var _i=`
|
|
3190
3220
|
slicc-camera-dialog slicc-dialog::part(dialog) {
|
|
3191
3221
|
width: min(560px, 92vw);
|
|
3192
3222
|
}
|
|
@@ -3253,7 +3283,7 @@ slicc-camera-dialog .slicc-camera__btn--snap {
|
|
|
3253
3283
|
slicc-camera-dialog .slicc-camera__btn--snap:hover {
|
|
3254
3284
|
background: color-mix(in srgb, var(--ink) 85%, var(--canvas));
|
|
3255
3285
|
}
|
|
3256
|
-
`,
|
|
3286
|
+
`,vi=`slicc-camera-dialog-style`;function yi(e){if(e.getElementById(vi))return;let t=e.createElement(`style`);t.id=vi,t.textContent=_i,(e.head??e.documentElement).appendChild(t)}var bi=`Take a photo`;w(`slicc-camera-dialog`,class extends HTMLElement{static observedAttributes=[`heading`,`preferred-device`];media=null;#e;#t;#n;#r;#i=!1;#a=null;#o=null;connectedCallback(){yi(this.ownerDocument),this.#h()}disconnectedCallback(){this.#m()}attributeChangedCallback(e){e===`heading`&&this.#i&&this.#e.setAttribute(`heading`,this.heading)}get heading(){return this.getAttribute(`heading`)??bi}set heading(e){e==null?this.removeAttribute(`heading`):this.setAttribute(`heading`,e)}get preferredDevice(){return this.getAttribute(`preferred-device`)}set preferredDevice(e){e==null?this.removeAttribute(`preferred-device`):this.setAttribute(`preferred-device`,e)}#s(){return this.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async open(){this.#h();let e=this.#s();if(!e)return null;try{this.#a=await this.#c(e,this.preferredDevice)}catch{return null}return this.#l(this.#a),await this.#u(e),this.#e.setAttribute(`heading`,this.heading),this.#e.show?.(),new Promise(e=>{this.#o=e})}async#c(e,t){if(t)try{return await e.getUserMedia({video:{deviceId:{exact:t}}})}catch{}return e.getUserMedia({video:!0})}#l(e){this.#t.srcObject=e,this.#t.play?.()?.catch(()=>void 0);let t=e.getVideoTracks()[0]?.getSettings?.().facingMode;this.#t.toggleAttribute(`data-mirrored`,t!==`environment`)}async#u(e){let t=[];try{t=(await e.enumerateDevices()).filter(e=>e.kind===`videoinput`)}catch{t=[]}this.#n.replaceChildren(...t.map((e,t)=>E(`option`,{value:e.deviceId},e.label||`Camera ${t+1}`)));let n=this.#a?.getVideoTracks()[0]?.getSettings?.().deviceId;n&&(this.#n.value=n),this.#n.toggleAttribute(`hidden`,t.length<2)}async#d(e){let t=this.#s();if(t){this.#r.textContent=``;try{let n=await t.getUserMedia({video:{deviceId:{exact:e}}});this.#m(),this.#a=n,this.#l(n),this.dispatchEvent(new CustomEvent(`slicc-camera-device-change`,{detail:{deviceId:e},bubbles:!0,composed:!0}))}catch{this.#r.textContent=`Could not switch camera — keeping the current one.`}}}#f(){let e=this.ownerDocument.createElement(`canvas`);if(e.width=this.#t.videoWidth,e.height=this.#t.videoHeight,e.width===0||e.height===0){this.#r.textContent=`No frame yet — give the camera a moment.`;return}e.getContext(`2d`)?.drawImage(this.#t,0,0);let t=e.toDataURL(`image/png`);this.dispatchEvent(new CustomEvent(`slicc-camera-capture`,{detail:{dataUrl:t},bubbles:!0,composed:!0})),this.#p(t)}#p(e){this.#m();let t=this.#o;this.#o=null,this.#e.hide?.(),t?.(e)}#m(){for(let e of this.#a?.getTracks()??[])e.stop();this.#a=null,this.#t&&(this.#t.srcObject=null)}#h(){if(this.#i)return;this.#i=!0,this.#t=E(`video`,{class:`slicc-camera__video`,part:`video`,autoplay:!0,muted:!0,playsinline:!0}),this.#n=E(`select`,{class:`slicc-camera__select`,part:`picker`,"aria-label":`Camera`,hidden:!0}),this.#n.addEventListener(`change`,()=>{this.#d(this.#n.value)}),this.#r=E(`div`,{class:`slicc-camera__status`});let e=E(`button`,{type:`button`,class:`slicc-camera__btn`,part:`cancel`,slot:`footer`},`Cancel`);e.addEventListener(`click`,()=>this.#p(null));let t=E(`button`,{type:`button`,class:`slicc-camera__btn slicc-camera__btn--snap`,part:`snap`,slot:`footer`},n(`camera`,{size:14}),` Snap`);t.addEventListener(`click`,()=>this.#f());let r=E(`div`,{class:`slicc-camera__body`},this.#t,this.#n,this.#r);this.#e=this.ownerDocument.createElement(`slicc-dialog`),this.#e.setAttribute(`heading`,this.heading),this.#e.append(r,e,t),this.#e.addEventListener(`slicc-dialog-close`,()=>{this.#o&&this.#p(null)}),this.append(this.#e)}});var K={debug(e,t){t===void 0?console.debug(`[slicc-permissions] ${e}`):console.debug(`[slicc-permissions] ${e}`,t)},error(e,t){t===void 0?console.error(`[slicc-permissions] ${e}`):console.error(`[slicc-permissions] ${e}`,t)}},xi=new Set([`microphone`,`camera`]);function Si(e){return typeof navigator>`u`||!navigator.permissions?.query?Promise.resolve(`prompt`):navigator.permissions.query({name:e}).then(e=>e.state)}var Ci=`
|
|
3257
3287
|
slicc-permissions {
|
|
3258
3288
|
/* Invisible host by default — only the drop overlay paints, and only
|
|
3259
3289
|
while a folder drag is in flight. Hosts can give the element a fixed
|
|
@@ -3424,7 +3454,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3424
3454
|
transform: translateX(-50%) translateY(0);
|
|
3425
3455
|
}
|
|
3426
3456
|
}
|
|
3427
|
-
`,
|
|
3457
|
+
`,wi=`slicc-permissions-style`;function Ti(e){if(e.getElementById(wi))return;let t=e.createElement(`style`);t.id=wi,t.textContent=Ci,(e.head??e.documentElement).appendChild(t)}function q(e){let t=e.dataTransfer?.types;if(!t)return!1;for(let e=0;e<t.length;e++)if(t[e]===`Files`)return!0;return!1}var Ei=class extends HTMLElement{providers={};permissionQuery=null;#e;#t=!1;#n=0;#r=null;connectedCallback(){Ti(this.ownerDocument),this.#C();let e=this.ownerDocument;e.addEventListener(`dragenter`,this.#v),e.addEventListener(`dragover`,this.#y),e.addEventListener(`dragleave`,this.#b),e.addEventListener(`drop`,this.#x)}disconnectedCallback(){let e=this.ownerDocument;e.removeEventListener(`dragenter`,this.#v),e.removeEventListener(`dragover`,this.#y),e.removeEventListener(`dragleave`,this.#b),e.removeEventListener(`drop`,this.#x),this.#n=0,this.removeAttribute(`data-dropping`),this.#r&&this.#r.cancel()}async request(e,t){switch(e){case`camera`:return this.#o(t);case`microphone`:return this.#s(t);case`screenshare`:return this.#l(t);case`usb`:return this.#u(t);case`hid`:return this.#d(t);case`serial`:return this.#f(t);case`filesystem`:return this.#p();case`popup`:return this.#m(t);default:return null}}async prompt(e){if(!e.kinds.length)return{status:`granted`,grants:[]};if(e.skipIfGranted){let t=await this.#i(e);if(t)return t}return this.#r&&this.#r.cancel(),new Promise(t=>{this.#w(e,t)})}async#i(e){if(!e.kinds.every(e=>xi.has(e)))return K.debug(`prompt: showing dialog (a gesture-bound kind was requested)`,{kinds:e.kinds}),null;let t=this.permissionQuery??Si,n;try{n=await Promise.all(e.kinds.map(e=>t(e)))}catch(e){return K.error(`prompt: permission query threw; showing dialog`,e),null}if(K.debug(`prompt: queried permission state`,{kinds:e.kinds,states:n}),!n.every(e=>e===`granted`))return K.debug(`prompt: not all kinds granted; showing dialog`),null;let r=[];for(let t of e.kinds){let n=await this.request(t,e.requestOptions?.[t]);if(!n)return K.error(`prompt: acquisition failed after granted state`,{kind:t}),{status:`error`,grants:r,reason:`error`};r.push(n)}return K.debug(`prompt: short-circuited dialog (already granted)`,{kinds:e.kinds}),{status:`granted`,grants:r}}#a(){return this.providers.media??(typeof navigator<`u`?navigator.mediaDevices:null)??null}async#o(e){let t=this.#a();if(!t)return this.#g(`camera`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{video:!0});return this.#h({kind:`camera`,stream:n})}catch(e){return this.#_(`camera`,e)}}async#s(e){let t=this.#a();if(!t)return this.#g(`microphone`,`unavailable`,`mediaDevices unavailable`);try{let n=await t.getUserMedia(e?.constraints??{audio:!0});return this.#h({kind:`microphone`,stream:n})}catch(e){return this.#_(`microphone`,e)}}#c(){if(this.providers.screenshare)return this.providers.screenshare;let e=typeof navigator<`u`?navigator.mediaDevices:void 0;return e&&typeof e.getDisplayMedia==`function`?{getDisplayMedia:t=>e.getDisplayMedia(t)}:null}async#l(e){let t=this.#c();if(!t)return this.#g(`screenshare`,`unavailable`,`getDisplayMedia unavailable`);try{let n=await t.getDisplayMedia(e?.constraints??{video:!0});return this.#h({kind:`screenshare`,stream:n})}catch(e){return this.#_(`screenshare`,e)}}async#u(e){let t=this.providers.usb??globalThis.navigator?.usb??null;if(!t?.requestDevice)return this.#g(`usb`,`unavailable`,`WebUSB unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]});return n?this.#h({kind:`usb`,device:n}):this.#g(`usb`,`cancelled`)}catch(e){return this.#_(`usb`,e)}}async#d(e){let t=this.providers.hid??globalThis.navigator?.hid??null;if(!t?.requestDevice)return this.#g(`hid`,`unavailable`,`WebHID unavailable`);try{let n=await t.requestDevice({filters:e?.filters??[]}),r=Array.isArray(n)?n:n?[n]:[];return r.length===0?this.#g(`hid`,`cancelled`):this.#h({kind:`hid`,device:r[0],devices:r})}catch(e){return this.#_(`hid`,e)}}async#f(e){let t=this.providers.serial??globalThis.navigator?.serial??null;if(!t?.requestPort)return this.#g(`serial`,`unavailable`,`Web Serial unavailable`);try{let n=await t.requestPort(e?.filters?.length?{filters:e.filters}:{});return n?this.#h({kind:`serial`,port:n}):this.#g(`serial`,`cancelled`)}catch(e){return this.#_(`serial`,e)}}async#p(){let e=this.providers.filesystem??(typeof window<`u`&&`showDirectoryPicker`in window&&window||null);if(!e?.showDirectoryPicker)return this.#g(`filesystem`,`unavailable`,`showDirectoryPicker unavailable`);try{let t=await e.showDirectoryPicker({mode:`readwrite`});return this.#h({kind:`filesystem`,handle:t,source:`picker`,permission:`granted`})}catch(e){return this.#_(`filesystem`,e)}}#m(e){let t=e?.url;if(!t)return this.#g(`popup`,`error`,`popup request missing url`);let n=e?.features??`width=500,height=700,popup=yes`,r=this.providers.popup??(typeof window<`u`?{open:(e,t)=>window.open(e,`_blank`,t)}:null);if(!r)return this.#g(`popup`,`unavailable`,`window.open unavailable`);let i;try{i=r.open(t,n)}catch(e){return this.#_(`popup`,e)}return i?this.#h({kind:`popup`,window:i}):this.#g(`popup`,`error`,`window.open returned null (popup blocked?)`)}#h(e){return this.dispatchEvent(new CustomEvent(`slicc-permission-grant`,{detail:e,bubbles:!0,composed:!0})),e}#g(e,t,n){return this.dispatchEvent(new CustomEvent(`slicc-permission-deny`,{detail:{kind:e,reason:t,message:n},bubbles:!0,composed:!0})),null}#_(e,t){return t instanceof Error&&(t.name===`AbortError`||t.name===`NotFoundError`)?this.#g(e,`cancelled`):this.#g(e,`error`,t instanceof Error?t.message:String(t))}#v=e=>{q(e)&&(e.preventDefault(),this.#n++,this.setAttribute(`data-dropping`,``))};#y=e=>{q(e)&&e.preventDefault()};#b=e=>{q(e)&&(this.#n=Math.max(0,this.#n-1),this.#n===0&&this.removeAttribute(`data-dropping`))};#x=e=>{if(!q(e))return;e.preventDefault(),this.#n=0,this.removeAttribute(`data-dropping`);let t=e.dataTransfer?.items;if(!t?.length)return;let n=[];for(let e=0;e<t.length;e++){let r=t[e];r.kind!==`file`||typeof r.getAsFileSystemHandle!=`function`||n.push(r.getAsFileSystemHandle())}n.length!==0&&this.#S(n)};async#S(e){let t;try{t=await Promise.all(e)}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}let n=t.find(e=>e?.kind===`directory`);if(!n){this.#g(`filesystem`,`cancelled`,`no directory in drop`);return}let r=n,i;if(r.requestPermission)try{i=await r.requestPermission({mode:`readwrite`})}catch(e){this.#g(`filesystem`,`error`,e instanceof Error?e.message:String(e));return}else i=`granted`;if(i!==`granted`){this.#g(`filesystem`,`cancelled`,`permission ${i}`);return}this.#h({kind:`filesystem`,handle:n,source:`drop`,permission:i})}#C(){if(this.#t)return;this.#t=!0;let e=E(`div`,{class:`slicc-permissions__drop-inner`},n(`folder-up`,{size:32}),E(`div`,null,`Drop a folder to mount it (read-write)`));this.#e=E(`div`,{class:`slicc-permissions__drop`,part:`drop`,"aria-hidden":`true`},e),this.append(this.#e)}#w(e,t){let r=e.heading??ki(e.kinds),i=e.grantLabel??`Allow`,a=e.cancelLabel??`Cancel`,o=`slicc-permissions__heading-${Math.random().toString(36).slice(2,8)}`,s=`slicc-permissions__desc-${Math.random().toString(36).slice(2,8)}`,c=E(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`ghost`,part:`prompt-cancel`},a),l=E(`button`,{type:`button`,class:`slicc-permissions__prompt-btn`,"data-variant":`primary`,part:`prompt-grant`},i),u=E(`div`,{class:`slicc-permissions__prompt-icons`,"aria-hidden":`true`},...e.kinds.map(e=>E(`span`,{class:`slicc-permissions__prompt-icon`},n(Di(e),{size:22})))),d=E(`div`,{class:`slicc-permissions__prompt`,part:`prompt`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":o,"aria-describedby":s,tabindex:`-1`,popover:`manual`},u,E(`h2`,{class:`slicc-permissions__prompt-heading`,id:o},r),E(`p`,{class:`slicc-permissions__prompt-desc`,id:s},e.description),E(`div`,{class:`slicc-permissions__prompt-actions`},c,l));this.append(d);let f=d;if(typeof f.showPopover==`function`)try{f.showPopover()}catch{}let p=!1,m=this.ownerDocument.activeElement??null,h=()=>{if(d.removeEventListener(`keydown`,_),d.remove(),m&&typeof m.focus==`function`)try{m.focus()}catch{}this.#r=null},g=(n,r)=>{if(!p){p=!0;for(let t of e.kinds)this.#g(t,n,r);h(),t({status:`cancelled`,grants:[],reason:n,message:r})}},_=e=>{if(e.key===`Escape`){e.preventDefault(),g(`cancelled`);return}if(e.key===`Tab`){let t=[c,l],n=this.ownerDocument.activeElement,r=t.indexOf(n);if(r===-1){t[0].focus(),e.preventDefault();return}(e.shiftKey?t[(r-1+t.length)%t.length]:t[(r+1)%t.length]).focus(),e.preventDefault()}};c.addEventListener(`click`,()=>g(`cancelled`)),l.addEventListener(`click`,async()=>{if(p)return;p=!0,l.disabled=!0,c.disabled=!0;let n=[],r=null;for(let t of e.kinds){let i=await this.request(t,e.requestOptions?.[t]);if(i)n.push(i);else{r={kind:t,reason:`cancelled`};break}}let i=r?e.kinds.indexOf(r.kind):-1;if(r&&i>=0)for(let t=i+1;t<e.kinds.length;t++)this.#g(e.kinds[t],`cancelled`);h(),t(r?{status:`cancelled`,grants:n,reason:`cancelled`}:{status:`granted`,grants:n})}),d.addEventListener(`keydown`,_),this.#r={cancel:()=>g(`cancelled`)},requestAnimationFrame(()=>{d.setAttribute(`data-open`,``),l.focus()})}};function Di(e){switch(e){case`camera`:return`camera`;case`microphone`:return`mic`;case`screenshare`:return`monitor-up`;case`usb`:return`usb`;case`hid`:return`keyboard`;case`serial`:return`cable`;case`filesystem`:return`folder`;case`popup`:return`external-link`}}function Oi(e){switch(e){case`camera`:return`camera`;case`microphone`:return`microphone`;case`screenshare`:return`screen`;case`usb`:return`USB device`;case`hid`:return`HID device`;case`serial`:return`serial port`;case`filesystem`:return`folder`;case`popup`:return`sign-in window`}}function ki(e){if(e.length===1)return`Allow access to your ${Oi(e[0])}?`;let t=e.map(Oi),n=t.pop();return`Allow access to your ${t.join(`, `)} and ${n}?`}w(`slicc-permissions`,Ei);var Ai=new Set([`top`,`bottom`,`left`,`right`]),ji=D(`
|
|
3428
3458
|
:host { position: relative; display: inline-flex; }
|
|
3429
3459
|
:host([hidden]) { display: none; }
|
|
3430
3460
|
.tip {
|
|
@@ -3449,7 +3479,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3449
3479
|
:host(:hover) .tip[data-p="right"], :host(:focus-within) .tip[data-p="right"], :host([open]) .tip[data-p="right"] { transform: translate(0, -50%); }
|
|
3450
3480
|
.tip:empty { display: none; }
|
|
3451
3481
|
@media (prefers-reduced-motion: reduce) { .tip { transition: none; } }
|
|
3452
|
-
`);w(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3482
|
+
`);w(`slicc-tooltip`,class extends HTMLElement{static observedAttributes=[`label`,`placement`];#e;#t;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ji],this.#t=E(`span`,{class:`tip`,part:`tip`,role:`tooltip`,"aria-hidden":`true`}),this.#e.replaceChildren(E(`slot`),this.#t)}connectedCallback(){this.#n()}attributeChangedCallback(){this.#n()}get label(){return this.getAttribute(`label`)??``}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get placement(){let e=this.getAttribute(`placement`);return e&&Ai.has(e)?e:`top`}set placement(e){this.setAttribute(`placement`,e)}#n(){this.#t.textContent=this.label,this.#t.setAttribute(`data-p`,this.placement)}});var Mi=18,Ni=16,Pi=50,Fi=85,Ii=2.2,J={cx:55,cy:50,r:38},Li={cx:145,cy:50,r:38},Ri=`http://www.w3.org/2000/svg`;function Y(e,t,...n){let r=document.createElementNS(Ri,e);if(t)for(let[e,n]of Object.entries(t))r.setAttribute(e,String(n));for(let e of n)r.appendChild(e);return r}var zi={cone:{vb:`70 330 440 570`,eyes:{top:-18.5,left:17,width:70,height:44},zoom:3,glyph:96},scoop:{vb:`0 0 580 470`,eyes:{top:30,left:15,width:70,height:45},zoom:2.65,glyph:96}},Bi={cone:`#D2691E`,scoop:`#FFB6C1`};function Vi(e){return e<=Pi?1:e>=Fi?Ii:1+(e-Pi)/(Fi-Pi)*(Ii-1)}function Hi(e){let t=e.replace(`#`,``);t.length===3&&(t=t.split(``).map(e=>e+e).join(``));let n=Number.parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255}}function Ui(e,t,n){return`#${[e,t,n].map(e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)).join(``)}`}function Wi(e,t){let{r:n,g:r,b:i}=Hi(e),a=t<0?0:255,o=Math.abs(t);return Ui(n+(a-n)*o,r+(a-r)*o,i+(a-i)*o)}function Gi(e,t,n){return[Y(`path`,{d:`M108.22,414.88l189.84,460.03c1.36,3.3,6.09,3.16,7.25-.22l159.34-463.34c.87-2.53-1.03-5.16-3.7-5.13l-349.18,3.32c-2.74.03-4.59,2.82-3.55,5.35Z`,fill:e,stroke:t,"stroke-linejoin":`round`,"stroke-width":20}),Y(`path`,{d:`M261.93,482.48h0c15.03-15.03,4.46-40.72-16.79-40.83h0c-21.37-.11-32.14,25.72-17.03,40.83h0c9.34,9.34,24.48,9.34,33.82,0Z`,fill:n}),Y(`path`,{d:`M384.85,527.49l-51.82,51.82c-2.24,2.24-2.24,5.86,0,8.1l55.71,55.71c2.24,2.24,5.86,2.24,8.1,0h0c.62-.62,1.08-1.36,1.37-2.19l26.52-77.11c.71-2.07.18-4.36-1.37-5.91l-30.41-30.41c-2.24-2.24-5.86-2.24-8.1,0Z`,fill:n}),Y(`rect`,{x:274.59,y:463.59,width:84.73,height:95.66,rx:42.36,ry:42.36,transform:`translate(-268.79 373.91) rotate(-45)`,fill:n}),Y(`rect`,{x:291.06,y:603.84,width:72.24,height:90.24,rx:36.12,ry:36.12,transform:`translate(-363.06 421.43) rotate(-45)`,fill:n}),Y(`path`,{d:`M371.7,684.58l-25.94,25.94c-2.24,2.24-2.24,5.86,0,8.1l12.67,12.67c2.99,2.99,8.09,1.82,9.46-2.19l13.28-38.61c1.97-5.74-5.17-10.2-9.46-5.91Z`,fill:n}),Y(`path`,{d:`M159.42,564.14l2.73,6.83c1.52,3.82,6.46,4.83,9.37,1.93l2.05-2.05c2.24-2.24,2.24-5.86,0-8.1l-4.78-4.78c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}),Y(`path`,{d:`M243.92,633.11l-48.65-48.65c-5.24-5.24-13.74-5.24-18.99,0h0c-3.8,3.8-4.97,9.49-2.98,14.47l27.77,69.54c3.58,8.95,15.14,11.33,21.96,4.51l20.89-20.89c5.24-5.24,5.24-13.74,0-18.99Z`,fill:n}),Y(`path`,{d:`M211.32,533.1h0c14.11-14.11,14.11-36.98,0-51.08l-34.94-34.94c-.72-.72-.72-1.89,0-2.62h0c1.16-1.16.34-3.15-1.3-3.16l-11.23-.06c-25.62-.13-43.23,25.72-33.73,49.51l5.37,13.45c1.82,4.55,4.54,8.68,8,12.15l16.74,16.74c14.11,14.11,36.98,14.11,51.08,0Z`,fill:n}),Y(`path`,{d:`M263.74,792.53h0c-5.69,5.69-7.45,14.23-4.46,21.71l22.5,56.36c6.92,17.34,31.68,16.74,37.75-.92l8.66-25.2c2.5-7.28.64-15.35-4.8-20.79l-31.17-31.17c-7.87-7.87-20.62-7.87-28.48,0Z`,fill:n}),Y(`path`,{d:`M392.94,503.07l40.81-40.81c2.24-2.24,5.86-2.24,8.1,0l.06.06c2.24,2.24,2.24,5.86,0,8.1l-40.81,40.81c-2.24,2.24-2.24,5.86,0,8.1l22.48,22.48c2.99,2.99,8.09,1.82,9.46-2.19l30.71-89.32c1.27-3.71-1.47-7.57-5.39-7.59l-120.63-.6c-5.11-.03-7.69,6.16-4.08,9.77l51.18,51.18c2.24,2.24,5.86,2.24,8.1,0Z`,fill:n}),Y(`rect`,{x:217.18,y:527.25,width:72.24,height:95.66,rx:36.12,ry:36.12,transform:`translate(-332.45 347.55) rotate(-45)`,fill:n}),Y(`path`,{d:`M350.28,739.46h0c-9.24-9.24-24.22-9.24-33.46,0l-13.94,13.94c-9.24,9.24-9.24,24.22,0,33.46l6.81,6.81c12.37,12.37,33.42,7.5,39.1-9.04l7.13-20.75c2.94-8.55.75-18.03-5.64-24.42Z`,fill:n}),Y(`path`,{d:`M234.18,749.12l13.2,33.06c1.52,3.82,6.46,4.83,9.37,1.93l9.93-9.93c2.24-2.24,2.24-5.86,0-8.1l-23.13-23.13c-4.4-4.4-11.67.39-9.37,6.17Z`,fill:n}),Y(`rect`,{x:236.26,y:661.25,width:67.04,height:90.24,rx:33.52,ry:33.52,transform:`translate(-420.46 397.65) rotate(-45)`,fill:n}),Y(`ellipse`,{cx:288.37,cy:404.38,rx:182.34,ry:67.01,fill:e,stroke:t,"stroke-miterlimit":10,"stroke-width":20})]}function Ki(e,t){return[Y(`path`,{d:`M566.75,340.67c0-29.85-12.97-56.87-33.96-76.47,4.8-9.98,7.44-20.71,7.44-31.9,0-38.29-30.62-71.33-74.92-86.77.33-3.07.51-6.17.51-9.3,0-69.72-84.29-126.24-188.26-126.24s-188.26,56.52-188.26,126.24c0,4,.29,7.95.83,11.86-34.94,15.4-58.48,44.25-58.48,77.34,0,18.21,7.15,35.15,19.39,49.26-25.1,19.88-41.05,49.47-41.05,82.54,0,59.85,52.15,108.37,116.49,108.37,10.83,0,21.3-1.4,31.26-3.98,31.42,41.91,83.55,69.34,142.55,69.34,64.73,0,121.2-33,151.11-81.94,63.8-.57,115.34-48.85,115.34-108.34Z`,fill:e,stroke:t,"stroke-width":20})]}function qi(e,t,n,r,i){return[Y(`g`,{class:`eye-blink eye-${r}`},Y(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),Y(`g`,{class:`pupil pupil-${r}`},Y(`circle`,{cx:e,cy:t,r:i,fill:`#000`}),Y(`circle`,{cx:e-i*.3,cy:t-i*.35,r:i*.4,fill:`#fff`})))]}function Ji(e,t,n){return[Y(`circle`,{cx:e,cy:t,r:n,fill:`#fff`,stroke:`#000`,"stroke-width":4}),Y(`line`,{x1:e-15,y1:t-15,x2:e+15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`}),Y(`line`,{x1:e+15,y1:t-15,x2:e-15,y2:t+15,stroke:`#000`,"stroke-width":8,"stroke-linecap":`round`})]}function Yi(e,t){if(e===`none`)return null;let n=J,r=Li;return Y(`svg`,{class:`eyes-svg`,viewBox:`0 0 200 100`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`},...e===`dead`?[...Ji(n.cx,n.cy,n.r),...Ji(r.cx,r.cy,r.r)]:[...qi(n.cx,n.cy,n.r,`l`,t),...qi(r.cx,r.cy,r.r,`r`,t)])}function Xi(e,t,n,r,i,a){let o=r-t,s=i-n,c=Math.hypot(o,s),l=Math.min(c,a),u=c>0?o/c*l:0,d=c>0?s/c*l:0;e.setAttribute(`transform`,`translate(${u},${d})`)}var Zi=D(`
|
|
3453
3483
|
:host{position:relative;display:inline-block;--pill-w:190px;--label:#eef1f6;--icon-tint:color-mix(in oklab,var(--accent) 22%,transparent);}
|
|
3454
3484
|
@media (prefers-color-scheme: light){:host(:not([theme="dark"])){--label:#1b2030;--icon-tint:color-mix(in oklab,var(--accent) 30%,#fff);}}
|
|
3455
3485
|
/* The library's class-based dark scope (body.dark / .dark / [data-theme=dark])
|
|
@@ -3496,7 +3526,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3496
3526
|
:host([compact]:hover) .tip,:host([compact]:focus-within) .tip{opacity:1;transform:translateX(-50%);}
|
|
3497
3527
|
@media (max-width:560px){ :host(:hover) .tip,:host(:focus-within) .tip{opacity:1;transform:translateX(-50%);} }
|
|
3498
3528
|
@media (prefers-reduced-motion: reduce){ .tip{transition:none;} }
|
|
3499
|
-
`);w(`slicc-pill`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`active`,`label`,`pupil`,`fill`,`theme`];#e;#t=null;#n=null;#r=null;#i=null;#a=
|
|
3529
|
+
`);w(`slicc-pill`,class extends HTMLElement{static observedAttributes=[`type`,`color`,`eyes`,`active`,`label`,`pupil`,`fill`,`theme`];#e;#t=null;#n=null;#r=null;#i=null;#a=Ni;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Zi]}connectedCallback(){this.#o(),this.#s()}disconnectedCallback(){this.#c()}attributeChangedCallback(){this.isConnected&&(this.#o(),this.#s())}get type(){return this.getAttribute(`type`)===`cone`?`cone`:`scoop`}set type(e){this.setAttribute(`type`,e===`cone`?`cone`:`scoop`)}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get eyeState(){let e=this.getAttribute(`eyes`);return e===`none`||e===`dead`?e:`open`}set eyeState(e){this.setAttribute(`eyes`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get compact(){return this.hasAttribute(`compact`)}set compact(e){this.toggleAttribute(`compact`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get theme(){let e=this.getAttribute(`theme`);return e===`light`||e===`dark`?e:null}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get pupilScale(){let e=Number.parseFloat(this.getAttribute(`pupil`)??``);if(Number.isFinite(e))return Math.max(.3,Math.min(2.4,e));let t=Number.parseFloat(this.getAttribute(`fill`)??``);return Number.isFinite(t)?Vi(Math.max(0,Math.min(100,t))):1}#o(){let e=this.type,t=zi[e],n=this.color??Bi[e],r=this.active,i=this.label,a=e===`cone`?Gi(n,Wi(n,-.38),Wi(n,.3)):Ki(n,Wi(n,-.32)),o=t.eyes,s=(o.left+o.width/2)/100,c=(o.top+o.height/2)/100,l=((.5-t.zoom*s)*100).toFixed(2),u=((.5-t.zoom*c)*100).toFixed(2),d=o.left/100,f=(o.left+o.width)/100,p=o.top/100,m=(o.top+o.height)/100,h=Math.min(0,d),g=Math.max(1,f),_=Math.min(0,p),v=Math.max(1,m),y=Math.min(1,1/Math.max(g-h,v-_)),ee=((.5-y*(h+g)/2)*100).toFixed(2),b=((.5-y*(_+v)/2)*100).toFixed(2),te=Mi*this.pupilScale;this.#a=Math.max(2,Math.min(Ni,J.r-te-4));let ne=Y(`svg`,{class:`glyph`,viewBox:t.vb,preserveAspectRatio:`xMidYMid meet`,style:`--g:${t.glyph}%`},...a),x=Yi(this.eyeState,te),S=E(`span`,{class:`eyes`,style:`top:${o.top}%;left:${o.left}%;width:${o.width}%;height:${o.height}%`});x&&S.append(x);let re=E(`span`,{class:`icon`,part:`icon`},E(`span`,{class:`icon-inner`,style:`--tx:${l}%;--ty:${u}%;--zoom:${t.zoom};--ox:${ee}%;--oy:${b}%;--ozoom:${y.toFixed(4)}`},ne,S)),ie=E(`span`,{class:`label`,part:`label`},i??E(`slot`)),ae=E(`button`,{class:`pill ${r?`active`:``}`,part:`pill`,style:`--accent:${n}`,"aria-label":i||!1},re,ie),oe=i?E(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},i):null;this.#e.replaceChildren(ae,...oe?[oe]:[]),this.#n=this.#e.querySelector(`.pupil-l`),this.#r=this.#e.querySelector(`.pupil-r`),this.#i=this.#e.querySelector(`.eyes-svg`)}#s(){let e=this.eyeState===`open`&&this.type===`cone`;e&&!this.#t?(this.#t=e=>this.#l(e),document.addEventListener(`mousemove`,this.#t)):!e&&this.#t&&this.#c()}#c(){this.#t&&=(document.removeEventListener(`mousemove`,this.#t),null)}#l(e){if(!this.#i||!this.#n||!this.#r)return;let t=this.#i.getBoundingClientRect();if(!t.width||!t.height)return;let n=(e.clientX-t.left)*(200/t.width),r=(e.clientY-t.top)*(100/t.height);Xi(this.#n,J.cx,J.cy,n,r,this.#a),Xi(this.#r,Li.cx,Li.cy,n,r,this.#a)}});var Qi=D(`
|
|
3500
3530
|
:host {
|
|
3501
3531
|
display: inline-grid;
|
|
3502
3532
|
place-items: center;
|
|
@@ -3543,7 +3573,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3543
3573
|
object-fit: cover;
|
|
3544
3574
|
display: block;
|
|
3545
3575
|
}
|
|
3546
|
-
`)
|
|
3576
|
+
`),$i=class extends HTMLElement{static observedAttributes=[`initials`,`name`,`src`,`email`,`size`,`label`];#e;#t=0;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Qi],this.addEventListener(`click`,this.#i),this.addEventListener(`keydown`,this.#a)}connectedCallback(){this.hasAttribute(`role`)||this.setAttribute(`role`,`button`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,`0`),this.#o()}disconnectedCallback(){this.#t++}attributeChangedCallback(e,t,n){e===`size`&&this.#r(n),this.isConnected&&this.#o()}get initials(){return this.getAttribute(`initials`)}set initials(e){e==null?this.removeAttribute(`initials`):this.setAttribute(`initials`,e)}get name(){return this.getAttribute(`name`)}set name(e){e==null?this.removeAttribute(`name`):this.setAttribute(`name`,e)}get src(){return this.getAttribute(`src`)}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get email(){return this.getAttribute(`email`)}set email(e){e==null?this.removeAttribute(`email`):this.setAttribute(`email`,e)}get size(){return this.getAttribute(`size`)}set size(e){e==null?this.removeAttribute(`size`):this.setAttribute(`size`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get resolvedInitials(){let e=this.initials;return e!=null&&e.trim()!==``?e.trim().slice(0,2).toUpperCase():ta(this.name)||`?`}async gravatarUrl(e=this.email){let t=e?.trim().toLowerCase();return t?`https://www.gravatar.com/avatar/${await ea(t)}?s=${this.#n()}&d=404`:null}#n(){let e=this.getBoundingClientRect().width;return Math.max(1,Math.round((e>0?e:30)*2))}#r(e){e==null||e.trim()===``?this.style.removeProperty(`--avatar-size`):this.style.setProperty(`--avatar-size`,e)}#i=()=>{this.dispatchEvent(new CustomEvent(`slicc-avatar-click`,{bubbles:!0,composed:!0}))};#a=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.click())};#o(){let e=++this.#t,t=this.src,n=this.email,r=this.resolvedInitials,i=this.label??this.name??(r===`?`?`Account`:r);this.setAttribute(`aria-label`,i);let a=[E(`span`,{class:`ini`,part:`initials`},r)];if(t){let n=E(`img`,{class:`img`,part:`image`,src:t,alt:i});n.addEventListener(`load`,()=>{e===this.#t&&this.#e.querySelector(`.me`)?.classList.add(`has-img`)}),n.addEventListener(`error`,()=>{e===this.#t&&(n.remove(),this.#e.querySelector(`.me`)?.classList.remove(`has-img`))}),a.push(n)}let o=E(`div`,{class:`me`,part:`avatar`},E(`slot`,null,...a));this.#e.replaceChildren(o),!t&&n&&this.#s(n,e)}#s(e,t){this.gravatarUrl(e).then(e=>{if(!e||t!==this.#t)return;let n=new Image;n.onload=()=>{if(t!==this.#t||!this.isConnected)return;let n=this.#e.querySelector(`.me`);n&&(n.style.backgroundImage=`url("${e}")`,n.classList.add(`has-img`))},n.src=e}).catch(()=>{})}};async function ea(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}function ta(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}w(`slicc-avatar`,$i);var na=D(`
|
|
3547
3577
|
:host { display: inline-flex; flex: 0 0 auto; }
|
|
3548
3578
|
:host([hidden]) { display: none; }
|
|
3549
3579
|
.col {
|
|
@@ -3564,7 +3594,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3564
3594
|
.col:hover { background: var(--ghost); color: var(--ink); }
|
|
3565
3595
|
.icon { display: inline-flex; place-items: center; pointer-events: none; }
|
|
3566
3596
|
.icon svg { display: block; }
|
|
3567
|
-
`),
|
|
3597
|
+
`),ra=`panel-right-close`,ia=`Collapse`,aa=16;w(`slicc-collapse-btn`,class extends HTMLElement{static observedAttributes=[`label`,`icon`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[na]}connectedCallback(){this.#n()}attributeChangedCallback(){this.isConnected&&this.#n()}get label(){return this.getAttribute(`label`)??ia}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get icon(){return this.getAttribute(`icon`)??ra}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}#n(){let e=this.label,t=n(this.icon,{size:aa,part:`icon`}),r=E(`button`,{class:`col`,part:`button`,type:`button`,"aria-label":e,title:e},E(`slot`,null,E(`span`,{class:`icon`},t)));r.addEventListener(`click`,this.#r),this.#t=r,this.#e.replaceChildren(r)}#r=()=>{this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0}))}});var oa=5,sa=1;function ca(e){return e.replace(`claude-`,``)}function la(e){return e==null||e===0?``:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}K`:String(e)}function ua(e){if(e.length<=oa)return{individuals:e,buckets:[]};let t=[...e].sort((e,t)=>t.cost-e.cost),n=t.slice(0,oa),r=[],i={count:0,cost:0};for(let e of t.slice(oa))i.count+=1,i.cost+=e.cost,i.cost>=sa&&(r.push(i),i={count:0,cost:0});if(i.count>0){let e=r.at(-1);e?(e.count+=i.count,e.cost+=i.cost):r.push(i)}return{individuals:n,buckets:r}}var da=D(`
|
|
3568
3598
|
:host {
|
|
3569
3599
|
position: absolute;
|
|
3570
3600
|
top: calc(100% + 8px);
|
|
@@ -3688,7 +3718,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3688
3718
|
font-variant-numeric: tabular-nums;
|
|
3689
3719
|
color: var(--ink);
|
|
3690
3720
|
}
|
|
3691
|
-
`);w(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3721
|
+
`);w(`slicc-cost-overlay`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n=[];#r=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[da]}connectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#i()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,!!e)}get models(){return this.#t}set models(e){this.#t=e,this.isConnected&&this.#i()}get scoops(){return this.#n}set scoops(e){this.#n=e,this.isConnected&&this.#i()}get total(){return this.#r}set total(e){this.#r=e!=null&&Number.isFinite(e)?e:null,this.isConnected&&this.#i()}#i(){let e=[];if(this.#t.length>0){let t=this.#t.map(e=>{let t=la(e.tokens);return E(`div`,{class:`model-row`},E(`span`,{class:`model-name`},ca(e.model)),t?E(`span`,{class:`model-tokens`},t):!1,E(`span`,{class:`model-cost`},`$${e.cost.toFixed(2)}`))});e.push(E(`div`,{class:`section section--models`},E(`div`,{class:`section-title`},`BY MODEL`),...t))}if(this.#n.length>0){let t=ua(this.#n),n=t.individuals.map(e=>E(`div`,{class:`scoop-row`},E(`span`,{class:`scoop-name`},e.name),E(`span`,{class:`scoop-cost`},`$${e.cost.toFixed(2)}`))),r=t.buckets.map(e=>E(`div`,{class:`bucket-row`,part:`bucket`},`${e.count} ${e.count===1?`agent`:`agents`} · $${e.cost.toFixed(2)}`));e.push(E(`div`,{class:`section section--scoops`},E(`div`,{class:`section-title`},`BY AGENT`),...n,...r))}let t=this.#r??this.#t.reduce((e,t)=>e+t.cost,0);e.push(E(`div`,{class:`total-row`},E(`span`,{class:`total-label`},`Total`),E(`span`,{class:`total-cost`},`$${t.toFixed(2)}`)));let n=E(`div`,{class:`card`},...e);this.#e.replaceChildren(n)}});var fa=D(`
|
|
3692
3722
|
:host {
|
|
3693
3723
|
display: flex;
|
|
3694
3724
|
align-items: center;
|
|
@@ -3717,7 +3747,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3717
3747
|
min-width: 0;
|
|
3718
3748
|
background: var(--line, #e5e5e5);
|
|
3719
3749
|
}
|
|
3720
|
-
`);w(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3750
|
+
`);w(`slicc-day-separator`,class extends HTMLElement{static observedAttributes=[`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[fa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label??E(`slot`);this.#e.replaceChildren(E(`span`,{class:`label`,part:`label`},e))}});var pa=`CLI float`;function ma(e){if(e==null)return null;let t=e.trim();if(t===``)return null;let n=Number.parseFloat(t.replace(/^\$/,``));return Number.isFinite(n)?n:null}function ha(e){let t=ma(e);return t==null?null:`$${t.toFixed(2)}`}function ga(e){return`${ha(e)??`$0.00`}/h`}var _a=`(max-width: 560px)`,va=D(`
|
|
3721
3751
|
:host {
|
|
3722
3752
|
position: relative;
|
|
3723
3753
|
display: inline-flex;
|
|
@@ -3828,7 +3858,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3828
3858
|
@media (prefers-reduced-motion: reduce) {
|
|
3829
3859
|
.tip { transition: none; }
|
|
3830
3860
|
}
|
|
3831
|
-
`);w(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`rate`,`spent`];#e;#t;#n=()=>{this.isConnected&&this.#c()};#r=null;#i=[];#a=[];#o;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3861
|
+
`);w(`slicc-floatbar`,class extends HTMLElement{static observedAttributes=[`label`,`linked`,`online`,`rate`,`spent`];#e;#t;#n=()=>{this.isConnected&&this.#c()};#r=null;#i=[];#a=[];#o;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[va],this.#t=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(_a):null}connectedCallback(){this.#t?.addEventListener(`change`,this.#n),this.#l()}disconnectedCallback(){this.#t?.removeEventListener(`change`,this.#n),clearTimeout(this.#o)}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.#l()}get label(){return this.getAttribute(`label`)??pa}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get linked(){return this.hasAttribute(`linked`)}set linked(e){this.toggleAttribute(`linked`,!!e)}get online(){return this.hasAttribute(`online`)}set online(e){this.toggleAttribute(`online`,!!e)}get spent(){return this.getAttribute(`spent`)}set spent(e){e==null?this.removeAttribute(`spent`):this.setAttribute(`spent`,String(e))}get rate(){return this.getAttribute(`rate`)}set rate(e){e==null?this.removeAttribute(`rate`):this.setAttribute(`rate`,String(e))}get costModels(){return this.#i}set costModels(e){this.#i=e,this.#r&&(this.#r.models=e)}get costScoops(){return this.#a}set costScoops(e){this.#a=e,this.#r&&(this.#r.scoops=e)}#s(){let e=[this.label];return e.push(ga(this.rate)),e.push(this.online?`online`:`offline`),e.join(` · `)}#c(){this.#t?.matches?this.setAttribute(`title`,this.#s()):this.removeAttribute(`title`)}#l(){let e=[];this.online&&e.push(E(`span`,{class:`fdot`,part:`dot`})),e.push(E(`span`,{class:`label`,part:`label`},E(`slot`,null,this.label))),e.push(E(`span`,{class:`sep`,part:`sep`}));let t=E(`span`,{class:`spent`,part:`spent rate`},n(`circle-dollar-sign`,{size:12}),E(`span`,{class:`amount`},ga(this.rate)));t.addEventListener(`mouseenter`,()=>this.#u()),t.addEventListener(`mouseleave`,()=>this.#d()),e.push(t),e.push(E(`span`,{class:`tip`,part:`tip`,"aria-hidden":`true`},this.#s())),this.#r=null,this.#e.replaceChildren(...e),this.#c()}#u(){if(clearTimeout(this.#o),!this.#r){let e=document.createElement(`slicc-cost-overlay`);e.models=this.#i,e.scoops=this.#a,e.total=ma(this.spent),e.addEventListener(`mouseenter`,()=>this.#u()),e.addEventListener(`mouseleave`,()=>this.#d()),this.#e.appendChild(e),this.#r=e}this.#r.toggleAttribute(`open`,!0)}#d(){this.#o=setTimeout(()=>{this.#r&&this.#r.removeAttribute(`open`)},150)}});var ya=D(`
|
|
3832
3862
|
:host { display: inline-grid; }
|
|
3833
3863
|
:host([hidden]) { display: none; }
|
|
3834
3864
|
.iconbtn {
|
|
@@ -3857,7 +3887,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3857
3887
|
.iconbtn:disabled:hover { background: var(--canvas); color: var(--txt-2); }
|
|
3858
3888
|
.icon { display: grid; place-items: center; pointer-events: none; }
|
|
3859
3889
|
.icon svg { display: block; }
|
|
3860
|
-
`),
|
|
3890
|
+
`),ba=`plus`,xa=16;w(`slicc-icon-button`,class extends HTMLElement{static observedAttributes=[`icon`,`disabled`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[ya]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get icon(){return this.getAttribute(`icon`)??ba}set icon(e){e==null?this.removeAttribute(`icon`):this.setAttribute(`icon`,e)}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){e?this.setAttribute(`disabled`,``):this.removeAttribute(`disabled`)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.label,t=E(`slot`,null,E(`span`,{class:`icon`},n(this.icon,{size:xa,part:`icon`}))),r=E(`button`,{type:`button`,class:`iconbtn`,part:`button`,"aria-label":e??void 0,title:e??void 0,disabled:this.disabled},t);this.#e.replaceChildren(r)}});var Sa=D(`
|
|
3861
3891
|
:host { display: inline-flex; align-items: center; height: var(--ctl-h, 30px); font-family: var(--ui); line-height: 1; }
|
|
3862
3892
|
.logo { font-weight: 600; font-size: 14px; letter-spacing: -0.02em; color: var(--ink); }
|
|
3863
3893
|
.b {
|
|
@@ -3866,7 +3896,7 @@ slicc-permissions .slicc-permissions__prompt-btn:disabled {
|
|
|
3866
3896
|
}
|
|
3867
3897
|
/* Narrow / extension-sidebar: drop the gradient suffix badge to save width. */
|
|
3868
3898
|
@media (max-width: 560px) { .b { display: none; } }
|
|
3869
|
-
`);w(`slicc-logo`,class extends HTMLElement{static observedAttributes=[`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3899
|
+
`);w(`slicc-logo`,class extends HTMLElement{static observedAttributes=[`badge`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Sa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}#t(){let e=E(`span`,{class:`logo`,part:`logo`},`sliccy`);this.badge&&e.append(E(`span`,{class:`b`,part:`badge`},this.badge)),this.#e.replaceChildren(e)}});var Ca=`
|
|
3870
3900
|
slicc-pane {
|
|
3871
3901
|
display: flex;
|
|
3872
3902
|
flex-direction: column;
|
|
@@ -3905,7 +3935,7 @@ slicc-pane .slicc-pane__body {
|
|
|
3905
3935
|
min-height: 0;
|
|
3906
3936
|
overflow: auto;
|
|
3907
3937
|
}
|
|
3908
|
-
`,
|
|
3938
|
+
`,wa=`slicc-pane-style`;function Ta(e){if(e.getElementById(wa))return;let t=e.createElement(`style`);t.id=wa,t.textContent=Ca,(e.head??e.documentElement).appendChild(t)}w(`slicc-pane`,class extends HTMLElement{static observedAttributes=[`elevated`];#e;#t;#n=!1;connectedCallback(){Ta(this.ownerDocument),this.#r()}attributeChangedCallback(e,t,n){e===`elevated`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-pane-change`,{bubbles:!0,composed:!0,detail:{elevated:n!==null}}))}get elevated(){return this.hasAttribute(`elevated`)}set elevated(e){e?this.setAttribute(`elevated`,``):this.removeAttribute(`elevated`)}#r(){if(this.#n)return;this.#n=!0;let e=Array.from(this.childNodes).filter(e=>!(e instanceof HTMLElement&&e.classList.contains(`slicc-pane__surface`))),t=this.ownerDocument.createElement(`div`);t.className=`slicc-pane__surface`,t.setAttribute(`part`,`surface`),this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-pane__header`,this.#e.setAttribute(`part`,`header`),this.#t=this.ownerDocument.createElement(`div`),this.#t.className=`slicc-pane__body`,this.#t.setAttribute(`part`,`body`),t.append(this.#e,this.#t);for(let t of e)t instanceof HTMLElement&&t.getAttribute(`slot`)===`header`?this.#e.appendChild(t):this.#t.appendChild(t);this.appendChild(t)}});function Ea(e){return e===`tool`||e===`sprinkle`}var Da=D(`
|
|
3909
3939
|
:host { display: none; flex: 0 0 auto; }
|
|
3910
3940
|
:host([kind="tool"]), :host([kind="sprinkle"]) { display: inline-block; }
|
|
3911
3941
|
.ptag {
|
|
@@ -3924,7 +3954,7 @@ slicc-pane .slicc-pane__body {
|
|
|
3924
3954
|
background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
|
|
3925
3955
|
border-color: color-mix(in srgb, var(--violet) 38%, var(--line));
|
|
3926
3956
|
}
|
|
3927
|
-
`);w(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
3957
|
+
`);w(`slicc-pane-tag`,class extends HTMLElement{static observedAttributes=[`kind`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Da]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get kind(){let e=this.getAttribute(`kind`);return Ea(e)?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}#t(){let e=E(`span`,{class:`ptag`,part:`tag`},E(`slot`,null,this.kind??``));this.#e.replaceChildren(e)}});var Oa=`
|
|
3928
3958
|
slicc-press-button {
|
|
3929
3959
|
display: inline-flex;
|
|
3930
3960
|
}
|
|
@@ -4016,7 +4046,7 @@ slicc-press-button {
|
|
|
4016
4046
|
animation: none;
|
|
4017
4047
|
}
|
|
4018
4048
|
}
|
|
4019
|
-
`,
|
|
4049
|
+
`,ka=`slicc-press-button-style`;function Aa(e){if(e.getElementById(ka))return;let t=e.createElement(`style`);t.id=ka,t.textContent=Oa,(e.head??e.documentElement).appendChild(t)}var ja=`slicc-press-btn`,Ma=`is-squish`,Na=`is-wobble`;w(`slicc-press-button`,class extends HTMLElement{static get observedAttributes(){return[`label`,`tooltip`,`tooltip-pos`,`disabled`]}innerBtn=null;pressLayer=null;handle=null;initialized=!1;pendingShortTimer=null;pendingShortEvent=null;animEndListener=null;connectedCallback(){Aa(this.ownerDocument),this.initialized?this.handle===null&&this.attachGesture():this.initialize(),this.syncAttributes()}disconnectedCallback(){this.handle?.destroy(),this.handle=null,this.clearPendingShort(),this.clearRipple(),this.clearAnimation()}attributeChangedCallback(){this.initialized&&this.syncAttributes()}get disabled(){return this.hasAttribute(`disabled`)}set disabled(e){this.toggleAttribute(`disabled`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get tooltip(){return this.getAttribute(`tooltip`)}set tooltip(e){e==null?this.removeAttribute(`tooltip`):this.setAttribute(`tooltip`,e)}setIcon(e){this.initialized||this.initialize();let t=this.innerBtn,n=this.pressLayer;for(let e of Array.from(t.childNodes))e!==n&&e.remove();let r=new DOMParser().parseFromString(e,`text/html`).body;for(;r.firstChild;)t.appendChild(r.firstChild)}focus(e){this.initialized||this.initialize(),this.innerBtn?.focus(e)}initialize(){this.initialized=!0;let e=E(`span`,{class:`${ja}__press-layer`,part:`press-layer`}),t=E(`button`,{type:`button`,class:`${ja}__btn`,part:`button`},e);for(;this.firstChild;)t.appendChild(this.firstChild);this.appendChild(t),this.innerBtn=t,this.pressLayer=e,this.attachGesture()}syncAttributes(){let e=this.innerBtn;if(!e)return;let t=this.getAttribute(`label`);t==null?e.removeAttribute(`aria-label`):e.setAttribute(`aria-label`,t);let n=this.getAttribute(`tooltip`);n==null?delete e.dataset.tooltip:e.dataset.tooltip=n;let r=this.getAttribute(`tooltip-pos`);r==null?delete e.dataset.tooltipPos:e.dataset.tooltipPos=r,this.hasAttribute(`disabled`)?e.setAttribute(`disabled`,``):e.removeAttribute(`disabled`)}longPressMs(){let e=this.getAttribute(`long-press-ms`);if(e==null)return Ln;let t=Number(e);return Number.isFinite(t)&&t>0?t:Ln}doubleClickMs(){let e=this.getAttribute(`double-click-ms`);if(e==null)return 350;let t=Number(e);return Number.isFinite(t)&&t>0?t:350}doubleClickDisabled(){return this.hasAttribute(`disable-double-click`)}emit(e,t){e===`short-click`?this.playAnimation(Ma):e===`double-click`&&this.playAnimation(Na);let n=t?{sourceEvent:t}:{};this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}playAnimation(e){let t=this.innerBtn;if(!t)return;this.clearAnimation(),t.offsetWidth,t.classList.add(e);let n=e=>{e.target===t&&this.clearAnimation()};this.animEndListener=n,t.addEventListener(`animationend`,n)}clearAnimation(){let e=this.innerBtn;e&&(this.animEndListener&&=(e.removeEventListener(`animationend`,this.animEndListener),null),e.classList.remove(Ma,Na))}clearPendingShort(){this.pendingShortTimer!==null&&(clearTimeout(this.pendingShortTimer),this.pendingShortTimer=null),this.pendingShortEvent=null}attachGesture(){this.handle=Rn(this,{longPressMs:this.longPressMs(),onPressStart:e=>this.paintRipple(e),onPressEnd:()=>this.clearRipple(),onLongPress:()=>{if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`);return}this.emit(`long-press`)},onShortClick:e=>{if(this.doubleClickDisabled()){this.emit(`short-click`,e);return}if(this.pendingShortTimer!==null){this.clearPendingShort(),this.emit(`double-click`,e);return}this.pendingShortEvent=e,this.pendingShortTimer=setTimeout(()=>{this.pendingShortTimer=null;let e=this.pendingShortEvent;this.pendingShortEvent=null,this.emit(`short-click`,e??void 0)},this.doubleClickMs())}})}paintRipple(e){this.clearRipple();let t=this.pressLayer;if(!t)return;let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=Math.max(r,n.width-r),o=Math.max(i,n.height-i),s=Math.ceil(Math.hypot(a,o))+2,c=this.ownerDocument.createElement(`span`);c.className=`${ja}__press`,c.style.left=`${r}px`,c.style.top=`${i}px`,c.style.width=`0px`,c.style.height=`0px`,c.style.transitionDuration=`${this.longPressMs()}ms`,t.appendChild(c),requestAnimationFrame(()=>{c.isConnected&&(c.style.width=`${s*2}px`,c.style.height=`${s*2}px`)})}clearRipple(){let e=this.pressLayer;if(e)for(;e.firstChild;)e.firstChild.remove()}});var Pa=D(`
|
|
4020
4050
|
:host { display: inline-flex; }
|
|
4021
4051
|
:host([hidden]) { display: none; }
|
|
4022
4052
|
|
|
@@ -4046,7 +4076,7 @@ slicc-press-button {
|
|
|
4046
4076
|
outline: 2px solid var(--violet);
|
|
4047
4077
|
outline-offset: 2px;
|
|
4048
4078
|
}
|
|
4049
|
-
`);w(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4079
|
+
`);w(`slicc-swatch`,class extends HTMLElement{static observedAttributes=[`color`,`hue`,`selected`,`label`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Pa]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get color(){return this.getAttribute(`color`)}set color(e){e==null?this.removeAttribute(`color`):this.setAttribute(`color`,e)}get hue(){return this.hasAttribute(`hue`)}set hue(e){this.toggleAttribute(`hue`,!!e)}get selected(){return this.hasAttribute(`selected`)}set selected(e){this.toggleAttribute(`selected`,!!e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#t(){let e=this.color,t=[`sw`];this.hue&&t.push(`hue`),this.selected&&t.push(`on`);let n=E(`button`,{type:`button`,part:`button`,class:t.join(` `),"aria-pressed":this.selected?`true`:`false`,"aria-label":this.label??e??`color swatch`},E(`slot`));e&&n.style.setProperty(`--swatch-color`,e),n.addEventListener(`click`,this.#n),this.#e.replaceChildren(n)}#n=()=>{this.selected=!0,this.dispatchEvent(new CustomEvent(`select`,{detail:{color:this.color},bubbles:!0,composed:!0}))}});var Fa=new Set([`rose`,`cyan`,`violet`,`amber`,`waffle`,`green`]),Ia=D(`
|
|
4050
4080
|
:host {
|
|
4051
4081
|
display: inline-flex;
|
|
4052
4082
|
vertical-align: middle;
|
|
@@ -4106,7 +4136,7 @@ slicc-press-button {
|
|
|
4106
4136
|
:host-context(.dark)[hue="amber"] .tag, :host-context([data-theme="dark"])[hue="amber"] .tag { background: color-mix(in srgb, var(--amber) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--amber) 38%, var(--line)); }
|
|
4107
4137
|
:host-context(.dark)[hue="waffle"] .tag, :host-context([data-theme="dark"])[hue="waffle"] .tag { background: color-mix(in srgb, var(--waffle) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--waffle) 38%, var(--line)); }
|
|
4108
4138
|
:host-context(.dark)[hue="green"] .tag, :host-context([data-theme="dark"])[hue="green"] .tag { background: color-mix(in srgb, var(--green) 22%, var(--canvas)); border-color: color-mix(in srgb, var(--green) 38%, var(--line)); }
|
|
4109
|
-
`);w(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4139
|
+
`);w(`slicc-tag`,class extends HTMLElement{static observedAttributes=[`hue`,`label`,`dot`];#e;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[Ia]}connectedCallback(){this.#t()}attributeChangedCallback(){this.isConnected&&this.#t()}get hue(){let e=this.getAttribute(`hue`);return e&&Fa.has(e)?e:null}set hue(e){e==null?this.removeAttribute(`hue`):this.setAttribute(`hue`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get dot(){return this.hasAttribute(`dot`)}set dot(e){e?this.setAttribute(`dot`,``):this.removeAttribute(`dot`)}#t(){let e=this.label??E(`slot`),t=E(`span`,{class:`tag`,part:`tag`},this.dot?E(`span`,{class:`dot`,part:`dot`}):null,E(`span`,{class:`label`,part:`label`},e));this.#e.replaceChildren(t)}});var La=D(`
|
|
4110
4140
|
:host {
|
|
4111
4141
|
position: fixed;
|
|
4112
4142
|
inset: 0;
|
|
@@ -4201,7 +4231,7 @@ video {
|
|
|
4201
4231
|
color: var(--txt-3, #717171);
|
|
4202
4232
|
font-size: 13px;
|
|
4203
4233
|
}
|
|
4204
|
-
`),
|
|
4234
|
+
`),X=null,Z=null,Ra=class e extends HTMLElement{#e;#t=[];constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[La]}disconnectedCallback(){for(let e of this.#t)URL.revokeObjectURL(e);this.#t.length=0,X===this&&(X=null)}static open(t){e.close();let r=document.createElement(`slicc-quick-look`),i=t.path.split(`/`).pop()||t.path,a=E(`div`,{class:`backdrop`}),o=E(`button`,{class:`x`});o.appendChild(n(`x`,{size:14}));let s=E(`div`,{class:`header`},i,o),c=E(`div`,{class:`content`});c.appendChild(r.#r(t));let l=E(`div`,{class:`panel`},s,c);l.tabIndex=-1,r.#e.append(a,l),document.body.appendChild(r),X=r,l.focus(),a.addEventListener(`click`,()=>r.#n(`backdrop`)),o.addEventListener(`click`,()=>r.#n(`close-button`)),Z&&document.removeEventListener(`keydown`,Z),Z=e=>{e.key===`Escape`&&r.#n(`escape`)},document.addEventListener(`keydown`,Z)}static close(){if(X){for(let e of X.#t)URL.revokeObjectURL(e);X.remove(),X=null}Z&&=(document.removeEventListener(`keydown`,Z),null)}#n(t){this.dispatchEvent(new CustomEvent(`quick-look-close`,{bubbles:!0,composed:!0,detail:{reason:t}})),e.close()}#r(e){let t=e.mimeType;if(t.startsWith(`text/`)||t===`application/json`)return E(`pre`,null,typeof e.content==`string`?e.content:new TextDecoder().decode(e.content));if(t.startsWith(`image/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`img`),i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r.alt=e.path.split(`/`).pop()||``,r}if(t.startsWith(`audio/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`audio`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}if(t.startsWith(`video/`)){let n=new Blob([typeof e.content==`string`?new TextEncoder().encode(e.content):e.content],{type:t}),r=document.createElement(`video`);r.controls=!0;let i=URL.createObjectURL(n);return this.#t.push(i),r.src=i,r}return E(`div`,{class:`fallback`},`Preview not available for this file type (${za(typeof e.content==`string`?e.content.length:e.content.byteLength)})`)}};function za(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}w(`slicc-quick-look`,Ra);var Ba=`
|
|
4205
4235
|
.slicc-chatpane {
|
|
4206
4236
|
flex: 0 0 auto;
|
|
4207
4237
|
width: calc(100% - 48px);
|
|
@@ -4246,7 +4276,7 @@ video {
|
|
|
4246
4276
|
-webkit-mask-image: none;
|
|
4247
4277
|
mask-image: none;
|
|
4248
4278
|
}
|
|
4249
|
-
`,
|
|
4279
|
+
`,Va=`slicc-chatpane-style`;function Ha(e){if(e.getElementById(Va))return;let t=e.createElement(`style`);t.id=Va,t.textContent=Ba,(e.head??e.documentElement).appendChild(t)}var Ua=[`slicc-chat-thread`,`slicc-composer`];w(`slicc-chatpane`,class extends HTMLElement{static observedAttributes=[`narrow`];#e=null;#t=!1;connectedCallback(){Ha(this.ownerDocument),this.classList.add(`slicc-chatpane`),this.setAttribute(`part`,`pane`),this.#t=!0,this.#n(),this.#r()}disconnectedCallback(){this.#e?.disconnect(),this.#e=null}attributeChangedCallback(e,t,n){e!==`narrow`||t===n||this.isConnected&&(this.#n(),this.dispatchEvent(new CustomEvent(`slicc-chatpane-narrow-change`,{detail:{narrow:this.narrow},bubbles:!0,composed:!0})))}get narrow(){return this.hasAttribute(`narrow`)}set narrow(e){e?this.setAttribute(`narrow`,``):this.removeAttribute(`narrow`)}get nav(){return this.querySelector(`:scope > slicc-nav`)}get thread(){return this.querySelector(`:scope > slicc-chat-thread`)}get composer(){return this.querySelector(`:scope > slicc-composer`)}#n(){if(!this.#t)return;let e=this.narrow;for(let t of Ua)for(let n of this.querySelectorAll(`:scope > ${t}`))e?n.setAttribute(`open`,``):n.removeAttribute(`open`)}#r(){this.#e||(this.#e=new MutationObserver(()=>this.#n()),this.#e.observe(this,{childList:!0}))}});var Wa=`
|
|
4250
4280
|
.slicc-shell { display: flex; flex: 1; min-height: 0; }
|
|
4251
4281
|
.slicc-shell > slicc-chatpane,
|
|
4252
4282
|
.slicc-shell > .chatpane {
|
|
@@ -4341,7 +4371,7 @@ video {
|
|
|
4341
4371
|
/* Hide the resize divider on narrow viewports (overlay mode). */
|
|
4342
4372
|
.slicc-shell > .slicc-shell__divider { display: none !important; }
|
|
4343
4373
|
}
|
|
4344
|
-
`,
|
|
4374
|
+
`,Ga=`slicc-shell-style`;function Ka(e){if(e.getElementById(Ga))return;let t=e.createElement(`style`);t.id=Ga,t.textContent=Wa,(e.head??e.documentElement).appendChild(t)}w(`slicc-shell`,class e extends HTMLElement{static observedAttributes=[`open`,`url-state`];#e=null;#t=null;#n=!1;#r=null;#i=e=>{if(!this.urlState)return;let t=e.detail?.id;typeof t==`string`&&k(`ws`,t)};#a=()=>{this.urlState&&k(`ws`,null)};#o=()=>{if(!this.urlState)return;let e=O(`ws`);e?this.#s(e):this.open&&this.collapse()};connectedCallback(){if(Ka(this.ownerDocument),this.classList.add(`slicc-shell`),this.setAttribute(`part`,`shell`),this.#n=!0,this.#p(),this.#m(),this.#c(),this.#e=e=>{let t=e.detail?.id;typeof t==`string`&&this.select(t)},this.#t=()=>this.collapse(),this.addEventListener(`dock-select`,this.#e),this.addEventListener(`dock-collapse`,this.#t),this.addEventListener(`slicc-dock-select`,this.#i),this.addEventListener(`slicc-dock-collapse`,this.#a),this.urlState){window.addEventListener(`popstate`,this.#o);let e=O(`ws`);e&&queueMicrotask(()=>this.#s(e))}}disconnectedCallback(){this.#e&&this.removeEventListener(`dock-select`,this.#e),this.#t&&this.removeEventListener(`dock-collapse`,this.#t),this.#e=null,this.#t=null,this.removeEventListener(`slicc-dock-select`,this.#i),this.removeEventListener(`slicc-dock-collapse`,this.#a),window.removeEventListener(`popstate`,this.#o),this.#r?.remove(),this.#r=null}get urlState(){return this.hasAttribute(`url-state`)}set urlState(e){this.toggleAttribute(`url-state`,e)}#s(e){this.dock?.selectItem?.(e)}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.#c()}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}get chatpane(){return this.querySelector(`:scope > slicc-chatpane, :scope > .chatpane`)}get workbench(){return this.querySelector(`:scope > slicc-workbench-pane, :scope > .workbench`)}get dock(){return this.querySelector(`:scope > slicc-dock, :scope > .dock`)}select(e){this.open=!0,this.#l(e),this.dispatchEvent(new CustomEvent(`slicc-shell-select`,{detail:{id:e},bubbles:!0,composed:!0}))}collapse(){this.open=!1,this.dock?.clearActive?.(),this.dispatchEvent(new CustomEvent(`slicc-shell-collapse`,{bubbles:!0,composed:!0}))}#c(){if(!this.#n)return;let e=this.open;this.chatpane?.toggleAttribute(`narrow`,e),this.workbench?.toggleAttribute(`open`,e)}#l(e){this.dock?.selectItem?.(e);let t=this.workbench;t?.selectSurface&&t.selectSurface(e),this.#c()}static#u=`slicc-shell-chat-w`;static#d=.2;static#f=.8;#p(){if(this.#r)return;let e=this.workbench;if(!e)return;let t=this.ownerDocument.createElement(`div`);t.className=`slicc-shell__divider`,t.setAttribute(`role`,`separator`),t.setAttribute(`aria-orientation`,`vertical`),this.insertBefore(t,e),this.#r=t,this.#h(t)}#m(){try{let t=localStorage.getItem(e.#u);t&&this.style.setProperty(`--slicc-chat-w`,t)}catch{}}#h(t){t.addEventListener(`pointerdown`,n=>{if(n.button!==0)return;n.preventDefault(),t.setPointerCapture(n.pointerId),this.toggleAttribute(`dragging`,!0);let r=t=>{let n=this.getBoundingClientRect();if(n.width<=0)return;let r=t.clientX-n.left,i=Math.max(e.#d,Math.min(e.#f,r/n.width));this.style.setProperty(`--slicc-chat-w`,`${(i*100).toFixed(1)}%`)},i=()=>{this.removeAttribute(`dragging`),t.removeEventListener(`pointermove`,r),t.removeEventListener(`pointerup`,i),t.removeEventListener(`pointercancel`,i);try{let t=this.style.getPropertyValue(`--slicc-chat-w`);t&&localStorage.setItem(e.#u,t)}catch{}};t.addEventListener(`pointermove`,r),t.addEventListener(`pointerup`,i),t.addEventListener(`pointercancel`,i)}),t.addEventListener(`dblclick`,()=>{this.style.removeProperty(`--slicc-chat-w`);try{localStorage.removeItem(e.#u)}catch{}})}});var qa=D(`
|
|
4345
4375
|
:host{display:inline-block;}
|
|
4346
4376
|
.switcher-more{position:relative;}
|
|
4347
4377
|
.morebtn{display:none;font:inherit;font-size:13px;font-weight:600;color:var(--txt-2);background:transparent;border:1px solid var(--line);border-radius:9999px;height:var(--ctl-h,30px);padding:0 11px;cursor:pointer;line-height:1;align-items:center;}
|
|
@@ -4363,10 +4393,10 @@ video {
|
|
|
4363
4393
|
.pop slicc-pill::part(label){display:block;}
|
|
4364
4394
|
.pop slicc-pill::part(tip){display:none;}
|
|
4365
4395
|
}
|
|
4366
|
-
`);w(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a=e=>{this.open&&!this.contains(e.target)&&this.close()};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[
|
|
4396
|
+
`);w(`slicc-scoop-overflow`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=[];#n;#r;#i;#a=e=>{this.open&&!this.contains(e.target)&&this.close()};constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[qa]}connectedCallback(){this.#o()}disconnectedCallback(){document.removeEventListener(`click`,this.#a)}attributeChangedCallback(e){e===`open`&&this.#n&&this.#c()}get items(){return this.#t}set items(e){this.#t=Array.isArray(e)?e:[],this.isConnected&&this.#s()}get count(){return this.#t.length}get hasOverflow(){return this.#t.length>0}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e)}show(){this.open||=!0}close(){this.open&&=!1}toggle(){this.open=!this.open}#o(){let e=E(`slot`,{name:`more`},`⋯`);this.#r=E(`button`,{class:`morebtn`,part:`more`,type:`button`,title:`More scoops`,"aria-haspopup":`true`,"aria-expanded":`false`},e),this.#i=E(`div`,{class:`pop`,part:`pop`}),this.#n=E(`div`,{class:`switcher-more`,part:`wrap`},this.#r,this.#i),this.#r.addEventListener(`click`,e=>{e.stopPropagation(),this.toggle()}),this.#e.replaceChildren(this.#n),this.#s(),this.#c()}#s(){let e=this.#t.length;if(e>0?this.setAttribute(`count`,String(e)):this.removeAttribute(`count`),this.#n.classList.toggle(`has-overflow`,e>0),this.#r.setAttribute(`aria-haspopup`,`true`),e===0){this.#i.replaceChildren(E(`slot`,{name:`empty`})),this.open&&this.close();return}let t=[];this.#t.forEach((e,n)=>{let r=e.id,i=e.label??e.id,a=E(`slicc-pill`,{class:`scoop`,part:`pill`,"data-k":r,type:e.type===`cone`?`cone`:`scoop`,eyes:e.eyes===`open`||e.eyes===`dead`?e.eyes:`none`,color:e.color??!1,label:i,style:`--i:${n}`});a.addEventListener(`click`,()=>{let e=a.dataset.k??``,t=this.#t.find(t=>t.id===e);this.#l(e,t?.label??e)}),t.push(a)}),this.#i.replaceChildren(...t)}#c(){let e=this.open;this.#n.classList.toggle(`open`,e),this.#r.setAttribute(`aria-expanded`,e?`true`:`false`),document.removeEventListener(`click`,this.#a),e&&document.addEventListener(`click`,this.#a)}#l(e,t){this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,label:t},bubbles:!0,composed:!0})),this.close()}});var Ja={cone:`var(--waffle)`,researcher:`var(--cyan)`,designer:`var(--violet)`,tester:`var(--amber)`,triage:`var(--green)`},Ya=40,Xa=6,Za=`
|
|
4367
4397
|
.slicc-scoop-switcher {
|
|
4368
4398
|
display: flex;
|
|
4369
|
-
gap: ${
|
|
4399
|
+
gap: ${Xa}px;
|
|
4370
4400
|
flex-wrap: nowrap;
|
|
4371
4401
|
min-width: 0;
|
|
4372
4402
|
overflow: hidden;
|
|
@@ -4414,7 +4444,7 @@ video {
|
|
|
4414
4444
|
.slicc-scoop-switcher .scoop { width: 34px; }
|
|
4415
4445
|
.slicc-scoop-switcher slicc-pill.scoop { --pill-w: 34px; }
|
|
4416
4446
|
}
|
|
4417
|
-
`,
|
|
4447
|
+
`,Qa=`slicc-scoop-switcher-style`;function $a(e){if(e.getElementById(Qa))return;let t=e.createElement(`style`);t.id=Qa,t.textContent=Za,(e.head??e.documentElement).appendChild(t)}function eo(e){return Ja[e]??`var(--rose)`}function to(e,t){let n=e.getAttribute(`eyes`);return n===`open`||n===`none`||n===`dead`?n:t}w(`slicc-scoop-switcher`,class extends HTMLElement{static get observedAttributes(){return[`active`,`attention`]}#e=[];#t=null;#n=null;#r=!1;#i=null;#a=null;#o=!1;#s=null;#c=e=>{let t=this.#p(e);t!==this.#s&&(this.#s=t,this.#h())};#l=()=>{this.#s!==null&&(this.#s=null,this.#h())};connectedCallback(){$a(this.ownerDocument),this.classList.add(`slicc-scoop-switcher`),this.setAttribute(`part`,`row`),this.#o||=(this.#d(),!0),this.#a||(this.#a=e=>this.#y(e),this.addEventListener(`click`,this.#a)),this.addEventListener(`pointerover`,this.#c),this.addEventListener(`pointerleave`,this.#l),this.#f(),this.#b(),requestAnimationFrame(()=>this.reflow())}disconnectedCallback(){this.#n?.disconnect(),this.#n=null,this.#i!==null&&(cancelAnimationFrame(this.#i),this.#i=null),this.#a&&=(this.removeEventListener(`click`,this.#a),null),this.removeEventListener(`pointerover`,this.#c),this.removeEventListener(`pointerleave`,this.#l)}attributeChangedCallback(e){this.#o&&(e===`active`?this.#g():e===`attention`&&this.#h())}get scoops(){return this.#e.map(e=>({...e}))}set scoops(e){this.#e=Array.isArray(e)?e.map(e=>({...e})):[],this.#o&&this.isConnected&&(this.#f(),this.reflow())}get attention(){return this.getAttribute(`attention`)}set attention(e){e==null?this.removeAttribute(`attention`):this.setAttribute(`attention`,e)}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}reflow(){if(!(!this.isConnected||this.#r)){this.#r=!0;try{this.#u()}finally{this.#r=!1}}}#u(){let e=[...this.querySelectorAll(`slicc-pill.scoop`)];for(let t of e)t.classList.remove(`hide`);let t=e.filter(e=>e.offsetParent!==null||e.offsetWidth>0);if(t.length===0){this.#_([]);return}let n=this.clientWidth;if(n<=0){this.#_([]),requestAnimationFrame(()=>{this.isConnected&&this.clientWidth>0&&this.reflow()});return}let r=t.map(e=>e.offsetWidth);if(r.reduce((e,t)=>e+t,0)+Xa*Math.max(0,t.length-1)<=n+1){this.#_([]);return}let i=Math.max(0,n-Ya),a=[],o=0;t.forEach((e,t)=>{if(t===0){o+=r[t];return}let n=Xa+r[t];a.length===0&&o+n<=i?o+=n:(e.classList.add(`hide`),a.push(e))}),this.#_(a)}select(e){this.active=e;let t=this.#e.find(t=>t.key===e)?.label??e;this.dispatchEvent(new CustomEvent(`slicc-scoop-select`,{detail:{id:e,key:e,label:t},bubbles:!0,composed:!0}))}#d(){let e=[...this.querySelectorAll(`slicc-pill`)];if(e.length===0)return;let t=e.map(e=>{let t=e.dataset.k??e.getAttribute(`label`)??``,n=e.getAttribute(`type`)===`cone`?`cone`:`scoop`;return{key:t,type:n,color:e.getAttribute(`color`)??void 0,label:e.getAttribute(`label`)??t,eyes:to(e,n===`cone`?`open`:`none`),ephemeral:e.classList.contains(`ephemeral`)}});for(let t of e)t.remove();this.#e.length===0&&(this.#e=t)}#f(){let e=this.active,t=this.#e.map(t=>{let n=t.key,r=t.type===`cone`||n===`cone`?`cone`:`scoop`,i=t.label??n,a=t.eyes??(r===`cone`?`open`:`none`),o=e!=null&&e===n,s=eo(n);return E(`slicc-pill`,{class:`scoop${t.ephemeral?` ephemeral`:``}`,"data-k":n,type:r,color:t.color?t.color:!1,eyes:a,fill:typeof t.fill==`number`&&Number.isFinite(t.fill)?String(Math.round(Math.min(100,Math.max(0,t.fill)))):!1,label:i,active:o,style:`--h:${s}`})});this.replaceChildren(...t),this.#h()}#p(e){let t=e.target?.closest?.(`slicc-pill.scoop`);return t&&this.contains(t)?t.dataset.k??null:null}#m(e){let t=this.#e.find(t=>t.key===e),n=t?.type===`cone`||e===`cone`?`cone`:`scoop`;return t?.eyes??(n===`cone`?`open`:`none`)}#h(){let e=this.attention;for(let t of this.querySelectorAll(`slicc-pill.scoop`)){let n=t.dataset.k??``,r=this.#s===null?e!==null&&e===n:this.#s===n,i=this.#m(n);t.setAttribute(`eyes`,r?i:`none`),t.toggleAttribute(`blink`,r&&this.#s===null&&i===`open`)}}#g(){let e=this.active;for(let t of this.querySelectorAll(`slicc-pill.scoop`)){let n=t.dataset.k===e;t.classList.toggle(`active`,n),t.toggleAttribute(`active`,n)}}#_(e){if(e.length===0){this.#t&&(this.#t.items=[]);return}let t=this.#v();t.items=e.map(e=>{let t=e.dataset.k??``;return{id:t,label:e.getAttribute(`label`)??t,type:e.getAttribute(`type`)===`cone`?`cone`:`scoop`,color:e.getAttribute(`color`)??void 0,eyes:to(e,e.getAttribute(`type`)===`cone`?`open`:`none`)}})}#v(){if(this.#t)return this.#t;let e=this.ownerDocument.createElement(`slicc-scoop-overflow`);return e.addEventListener(`slicc-scoop-select`,e=>{let t=e.detail?.id;typeof t==`string`&&(e.stopPropagation(),this.select(t))}),this.after(e),this.#t=e,e}#y(e){let t=e.target?.closest(`slicc-pill.scoop`);if(!t||!this.contains(t))return;let n=t.dataset.k;n&&this.select(n)}#b(){this.#n||typeof ResizeObserver>`u`||(this.#n=new ResizeObserver(()=>{this.#i===null&&(this.#i=requestAnimationFrame(()=>{this.#i=null,this.reflow()}))}),this.#n.observe(this),this.parentElement&&this.#n.observe(this.parentElement))}});var no=`/**
|
|
4418
4448
|
* SLICC design tokens — lifted verbatim from the prototype
|
|
4419
4449
|
* (proto/StellarRubySwift.html :root + body.dark). Light is the default; dark is
|
|
4420
4450
|
* opt-in. Per project decision the prototype's token vocabulary and light-default
|
|
@@ -4478,7 +4508,7 @@ video {
|
|
|
4478
4508
|
--shaderbg: #171410;
|
|
4479
4509
|
--shadow-pane: rgba(0, 0, 0, 0.35) 0 8px 26px -10px;
|
|
4480
4510
|
}
|
|
4481
|
-
|
|
4511
|
+
`,ro=`slicc-tokens`;function io(e=document){if(e.getElementById(ro))return;let t=e.createElement(`style`);t.id=ro,t.textContent=no,(e.head??e.documentElement).appendChild(t)}function Q(e,t=document.body){t.classList.toggle(`dark`,e===`dark`),t.setAttribute(`data-theme`,e)}function ao(e=document.body){if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>Q(t.matches?`dark`:`light`,e);return n(),t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}var oo=D(`
|
|
4482
4512
|
:host { display: inline-flex; flex: 0 0 auto; }
|
|
4483
4513
|
.themetgl {
|
|
4484
4514
|
font: inherit; font-family: var(--ui); font-size: 14px; line-height: 1;
|
|
@@ -4490,7 +4520,7 @@ video {
|
|
|
4490
4520
|
}
|
|
4491
4521
|
.themetgl:hover { background: color-mix(in srgb, var(--ink) 8%, var(--ghost)); }
|
|
4492
4522
|
.themetgl svg { display: block; }
|
|
4493
|
-
`),
|
|
4523
|
+
`),so=16,co={light:`moon`,dark:`sun`},lo={light:`Switch to dark mode`,dark:`Switch to light mode`};w(`slicc-theme-toggle`,class extends HTMLElement{static observedAttributes=[`theme`];#e;#t=null;#n=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[oo];let e=E(`button`,{class:`themetgl`,part:`button`,type:`button`,"aria-pressed":`false`},E(`slot`,{name:`glyph-light`},n(co.light,{size:so})),E(`slot`,{name:`glyph-dark`,hidden:!0},n(co.dark,{size:so})));this.#e.replaceChildren(e),this.#t=e}connectedCallback(){this.#t?.addEventListener(`click`,this.#i),this.#a(this.theme??`light`,{silent:!0})}disconnectedCallback(){this.#t?.removeEventListener(`click`,this.#i)}attributeChangedCallback(e,t,n){e!==`theme`||t===n||this.#n||this.isConnected&&this.#a(this.#r(n)??`light`,{silent:!0})}get theme(){return this.#r(this.getAttribute(`theme`))}set theme(e){this.#a(e===`dark`?`dark`:`light`,{silent:!0})}get pressed(){return this.theme===`dark`}#r(e){return e===`dark`?`dark`:e===`light`?`light`:null}#i=()=>{this.#a(this.theme===`dark`?`light`:`dark`)};#a(e,t={}){this.#n=!0;try{if(Q(e),this.getAttribute(`theme`)!==e&&this.setAttribute(`theme`,e),this.#t){this.#t.setAttribute(`aria-pressed`,e===`dark`?`true`:`false`),this.#t.title=lo[e];let t=this.#e.querySelector(`slot[name="glyph-light"]`),n=this.#e.querySelector(`slot[name="glyph-dark"]`);t?.toggleAttribute(`hidden`,e===`dark`),n?.toggleAttribute(`hidden`,e===`light`)}for(let t of document.querySelectorAll(`slicc-pill, slicc-add-menu`))t.setAttribute(`theme`,e)}finally{this.#n=!1}t.silent||this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}}),w(`slicc-theme`,class extends HTMLElement{static observedAttributes=[`theme`];connectedCallback(){io(this.ownerDocument),this.classList.add(`slicc-theme`),this.#e()}attributeChangedCallback(e,t,n){e===`theme`&&t!==n&&this.isConnected&&this.#e()}get theme(){return this.getAttribute(`theme`)===`dark`?`dark`:`light`}set theme(e){this.setAttribute(`theme`,e===`dark`?`dark`:`light`)}#e(){let e=this.theme;Q(e,this),this.dispatchEvent(new CustomEvent(`slicc-theme-change`,{detail:{theme:e},bubbles:!0,composed:!0}))}});function uo(e){switch(e.slice(e.lastIndexOf(`.`)).toLowerCase()){case`.png`:case`.jpg`:case`.jpeg`:case`.gif`:case`.webp`:case`.svg`:return`image`;case`.mp3`:case`.wav`:case`.ogg`:case`.m4a`:case`.flac`:return`music`;case`.mp4`:case`.webm`:case`.mov`:case`.avi`:return`film`;case`.json`:return`braces`;case`.md`:return`file-text`;case`.html`:case`.htm`:return`globe`;case`.css`:return`palette`;case`.ts`:case`.js`:case`.tsx`:case`.jsx`:case`.mjs`:case`.cjs`:return`file-code`;case`.zip`:case`.tar`:case`.gz`:case`.bz2`:return`file-archive`;case`.pdf`:return`file-text`;default:return`file`}}function fo(e){return e<1024?e+` B`:e<1024*1024?(e/1024).toFixed(1)+`K`:e<1024*1024*1024?(e/(1024*1024)).toFixed(1)+`M`:(e/(1024*1024*1024)).toFixed(1)+`G`}var po=`
|
|
4494
4524
|
slicc-file-tree {
|
|
4495
4525
|
width: 190px;
|
|
4496
4526
|
flex: 0 0 auto;
|
|
@@ -4638,7 +4668,7 @@ slicc-file-tree .actions button:active {
|
|
|
4638
4668
|
[data-theme="dark"] slicc-file-tree .dir.on {
|
|
4639
4669
|
background: color-mix(in srgb, var(--violet) 22%, var(--canvas));
|
|
4640
4670
|
}
|
|
4641
|
-
`,
|
|
4671
|
+
`,mo=`slicc-file-tree-style`;function ho(e){if(e.getElementById(mo))return;let t=e.createElement(`style`);t.id=mo,t.textContent=po,(e.head??e.documentElement).appendChild(t)}function go(e,t){let r=[];for(let i of e)if(i.kind===`group`)r.push(E(`div`,{class:`grp`},i.label));else if(i.kind===`dir`){let e=t.has(i.id);r.push(E(`div`,{class:e?`dir open`:`dir`,"data-dir-id":i.id,"aria-expanded":e?`true`:`false`,tabindex:`0`},n(`chevron-right`,{size:14,class:`chev`}),i.label));let a=E(`div`,{class:`children`,hidden:!e||void 0});T(a,go(i.children??[],t)),r.push(a)}else{let e=E(`div`,{class:`actions`},E(`button`,{"data-action":`preview`,type:`button`},n(`eye`,{size:14})),E(`button`,{"data-action":`reference`,type:`button`},n(`at-sign`,{size:14})),E(`button`,{"data-action":`download`,type:`button`},n(`arrow-down-to-line`,{size:14})),E(`button`,{"data-action":`overflow`,type:`button`},n(`ellipsis`,{size:14}))),t=E(`div`,{class:`f`,"data-id":i.id,tabindex:`0`},n(uo(i.label),{size:12,class:`ficon`}),i.label,e);i.size!=null&&t.appendChild(E(`span`,{class:`sz`},fo(i.size))),r.push(t)}return r}var _o=class extends HTMLElement{static get observedAttributes(){return[`selected`]}#e=null;#t=new Map;#n=new Set;#r=!1;#i=null;#a=null;#o=null;connectedCallback(){ho(this.ownerDocument),this.#r||=(this.#e??(this.#e=this.#l(),this.#f()),!0),this.#u(),this.#h(),this.#g()}disconnectedCallback(){this.#i&&=(this.removeEventListener(`click`,this.#i),null),this.#a&&=(this.removeEventListener(`keydown`,this.#a),null),this.#o!=null&&(clearTimeout(this.#o),this.#o=null)}attributeChangedCallback(e){e===`selected`&&this.#r&&this.isConnected&&this.#c()}get items(){return this.#e?this.#e.slice():[]}set items(e){let t=!this.#r;this.#e=Array.isArray(e)?e.slice():[],this.#r=!0,t&&this.#f(),this.isConnected&&(this.#u(),this.#h())}toggleDir(e){if(!this.#p(e,this.#e??[]))return;let t=!this.#n.has(e);t?this.#n.add(e):this.#n.delete(e),this.#u(),this.dispatchEvent(new CustomEvent(`dir-toggle`,{bubbles:!0,composed:!0,detail:{id:e,open:t}}))}isDirOpen(e){return this.#n.has(e)}get selected(){return this.getAttribute(`selected`)}set selected(e){e==null?this.removeAttribute(`selected`):this.setAttribute(`selected`,e)}selectFile(e){let t=this.querySelector(`.f[data-id="${$(e)}"]`);if(!t)return;this.#s(e,t);let n=this.#t.get(e)??e;this.dispatchEvent(new CustomEvent(`file-select`,{bubbles:!0,composed:!0,detail:{id:e,path:n}}))}#s(e,t){this.getAttribute(`selected`)!==e&&this.setAttribute(`selected`,e),this.#c(),t.focus()}#c(){let e=this.getAttribute(`selected`);for(let t of this.querySelectorAll(`.f, .dir`))t.classList.toggle(`on`,(t.dataset.id??t.dataset.dirId)===e)}#l(){let e=[];for(let t of Array.from(this.children)){if(!(t instanceof HTMLElement))continue;let n=(t.textContent??``).trim();if(n)if(t.classList.contains(`grp`)||t.hasAttribute(`data-group`)||t.dataset.group!=null)e.push({kind:`group`,label:n});else{let r=t.dataset.id??t.id??n;e.push({kind:`file`,id:r,label:n})}}return e}#u(){let e=this.contains(document.activeElement),t=this.#e??[];this.#t.clear(),this.#d(t),this.replaceChildren(...go(t,this.#n)),this.#c();let n=this.getAttribute(`selected`);e&&n!=null&&this.querySelector(`.f[data-id="${$(n)}"], .dir[data-dir-id="${$(n)}"]`)?.focus()}#d(e){for(let t of e)t.kind===`file`?this.#t.set(t.id,t.path??t.label):t.kind===`dir`&&(this.#t.set(t.id,t.path??t.id),this.#d(t.children??[]))}#f(){this.#n.clear();let e=t=>{for(let n of t)n.kind===`dir`&&(n.open&&this.#n.add(n.id),e(n.children??[]))};e(this.#e??[])}#p(e,t){for(let n of t)if(n.kind===`dir`&&(n.id===e||this.#p(e,n.children??[])))return!0;return!1}#m(e){let t=e.dataset.action,n=e.closest(`.f`);if(!n)return!1;let r=n.dataset.id;if(r==null)return!1;let i=this.#t.get(r)??r;return t===`preview`?this.dispatchEvent(new CustomEvent(`file-preview`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`reference`?this.dispatchEvent(new CustomEvent(`file-reference`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`download`?this.dispatchEvent(new CustomEvent(`file-download`,{bubbles:!0,composed:!0,detail:{id:r,path:i}})):t===`overflow`&&this.dispatchEvent(new CustomEvent(`file-overflow`,{bubbles:!0,composed:!0,detail:{id:r,path:i,anchor:e}})),!0}#h(){this.#i||(this.#i=e=>{let t=e.target,n=t?.closest(`[data-action]`);if(n&&this.contains(n)&&this.#m(n))return;let r=t?.closest(`.dir`);if(r&&this.contains(r)){let e=r.dataset.dirId;e!=null&&(this.#s(e,r),this.toggleDir(e));return}let i=t?.closest(`.f`);if(!i||!this.contains(i))return;let a=i.dataset.id;a!=null&&this.selectFile(a)},this.addEventListener(`click`,this.#i))}#g(){this.#a||(this.#a=e=>{if(e.key!==`c`||!(e.ctrlKey||e.metaKey))return;let t=this.getAttribute(`selected`);if(t==null)return;let n=this.querySelector(`.f[data-id="${$(t)}"], .dir[data-dir-id="${$(t)}"]`);if(!n)return;e.preventDefault();let r=this.#t.get(t)??t;navigator.clipboard?.writeText(r).then(()=>{this.#o!=null&&clearTimeout(this.#o),n.classList.add(`ft-copy-flash`),this.#o=setTimeout(()=>{n.classList.remove(`ft-copy-flash`),this.#o=null},300)}).catch(()=>void 0)},this.addEventListener(`keydown`,this.#a))}};function $(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}w(`slicc-file-tree`,_o);var vo=`
|
|
4642
4672
|
slicc-surface {
|
|
4643
4673
|
position: absolute;
|
|
4644
4674
|
inset: 0;
|
|
@@ -4670,7 +4700,7 @@ slicc-surface:fullscreen {
|
|
|
4670
4700
|
background: var(--canvas, #fff);
|
|
4671
4701
|
position: fixed;
|
|
4672
4702
|
}
|
|
4673
|
-
`,
|
|
4703
|
+
`,yo=`slicc-surface-style`;function bo(e){if(e.getElementById(yo))return;let t=e.createElement(`style`);t.id=yo,t.textContent=vo,(e.head??e.documentElement).appendChild(t)}function xo(e){return e===`block`||e===`column`?e:`flex`}w(`slicc-surface`,class extends HTMLElement{static observedAttributes=[`surface-id`,`active`,`layout`];connectedCallback(){bo(this.ownerDocument),this.#e()}attributeChangedCallback(e,t,n){this.isConnected&&(e===`surface-id`?this.#e():e===`active`&&t!==n&&this.dispatchEvent(new CustomEvent(`surface-toggle`,{bubbles:!0,composed:!0,detail:{surfaceId:this.surfaceId,active:this.active,layout:this.layout}})))}get surfaceId(){return this.getAttribute(`surface-id`)}set surfaceId(e){e==null?this.removeAttribute(`surface-id`):this.setAttribute(`surface-id`,e)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get layout(){return xo(this.getAttribute(`layout`))}set layout(e){this.setAttribute(`layout`,xo(e))}#e(){let e=this.surfaceId;e==null?delete this.dataset.s:this.dataset.s=e}});var So=D(`
|
|
4674
4704
|
:host{display:inline-flex;white-space:nowrap;}
|
|
4675
4705
|
.tab{display:inline-flex;align-items:center;gap:7px;font-family:var(--ui);font-size:12px;color:var(--txt-2);background:transparent;border:1px solid transparent;border-radius:8px;padding:6px 10px;cursor:pointer;white-space:nowrap;}
|
|
4676
4706
|
.tab:hover{background:var(--ghost);color:var(--ink);}
|
|
@@ -4686,7 +4716,7 @@ slicc-surface:fullscreen {
|
|
|
4686
4716
|
.x{margin-left:3px;width:15px;height:15px;border-radius:4px;display:grid;place-items:center;color:var(--txt-3);}
|
|
4687
4717
|
.x:hover{background:var(--line);color:var(--ink);}
|
|
4688
4718
|
.sg svg,.x svg{display:block;}
|
|
4689
|
-
`),
|
|
4719
|
+
`),Co=13;w(`slicc-tab`,class extends HTMLElement{static observedAttributes=[`tab-id`,`kind`,`active`,`closable`,`badge`,`glyph`,`label`,`theme`];#e;#t=null;constructor(){super(),this.#e=this.attachShadow({mode:`open`}),this.#e.adoptedStyleSheets=[So]}connectedCallback(){this.#n(),this.#r()}disconnectedCallback(){this.#i()}attributeChangedCallback(){this.isConnected&&this.#n()}get tabId(){return this.getAttribute(`tab-id`)}set tabId(e){e==null?this.removeAttribute(`tab-id`):this.setAttribute(`tab-id`,e)}get kind(){return this.getAttribute(`kind`)===`sprinkle`?`sprinkle`:`tool`}set kind(e){this.setAttribute(`kind`,e===`sprinkle`?`sprinkle`:`tool`)}get active(){return this.hasAttribute(`active`)}set active(e){this.toggleAttribute(`active`,e)}get closable(){return this.hasAttribute(`closable`)}set closable(e){this.toggleAttribute(`closable`,e)}get badge(){return this.getAttribute(`badge`)}set badge(e){e==null?this.removeAttribute(`badge`):this.setAttribute(`badge`,e)}get glyph(){return this.getAttribute(`glyph`)}set glyph(e){e==null?this.removeAttribute(`glyph`):this.setAttribute(`glyph`,e)}get label(){return this.getAttribute(`label`)}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}#n(){let e=this.kind===`sprinkle`,t=E(`button`,{class:`tab${e?` sp`:``}${this.active?` on`:``}`,part:`tab`,type:`button`});if(this.tabId!=null&&t.setAttribute(`data-t`,this.tabId),e){let e=this.badge??`sparkles`;t.append(E(`span`,{class:`sg`,part:`badge`,"aria-hidden":`true`},n(e,{size:Co})))}else this.glyph!=null&&t.append(E(`span`,{class:`gl`,part:`glyph`,"aria-hidden":`true`},this.glyph));let r=this.label;t.append(r==null?E(`slot`):document.createTextNode(r)),this.closable&&t.append(E(`span`,{class:`x`,part:`close`,"data-close":``,role:`button`,"aria-label":`Close tab`},n(`x`,{size:Co}))),this.#e.replaceChildren(t)}#r(){this.#t||(this.#t=e=>this.#a(e),this.#e.addEventListener(`click`,this.#t))}#i(){this.#t&&=(this.#e.removeEventListener(`click`,this.#t),null)}#a(e){let t=e.target,n={tabId:this.tabId};if(t?.closest(`[data-close]`)){e.stopPropagation(),this.dispatchEvent(new CustomEvent(`close`,{detail:n,bubbles:!0,composed:!0}));return}this.dispatchEvent(new CustomEvent(`select`,{detail:n,bubbles:!0,composed:!0}))}});var wo=`
|
|
4690
4720
|
slicc-tab-bar {
|
|
4691
4721
|
display: flex;
|
|
4692
4722
|
align-items: center;
|
|
@@ -4698,7 +4728,7 @@ slicc-tab-bar {
|
|
|
4698
4728
|
slicc-tab-bar[hidden] {
|
|
4699
4729
|
display: none;
|
|
4700
4730
|
}
|
|
4701
|
-
`,
|
|
4731
|
+
`,To=`slicc-tab-bar-style`;function Eo(e){if(e.getElementById(To))return;let t=e.createElement(`style`);t.id=To,t.textContent=wo,(e.head??e.documentElement).appendChild(t)}function Do(e){return e===`sprinkle`?`sprinkle`:`tool`}w(`slicc-tab-bar`,class extends HTMLElement{static observedAttributes=[`active`];#e=[];#t=!1;#n=null;#r=null;#i=null;connectedCallback(){Eo(this.ownerDocument),this.#c(),this.#p()}disconnectedCallback(){this.#l(),this.#t=!1}attributeChangedCallback(e){e===`active`&&this.isConnected&&this.#o()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get tabs(){return this.#e.map(e=>({...e}))}set tabs(e){this.#e=(e??[]).map(e=>({...e})),this.active!=null&&!this.#e.some(e=>e.id===this.active)&&this.#a(this.#e[0]?.id??null),this.#t=!1,this.isConnected&&this.#p()}addTab(e){let t={...e,kind:Do(e.kind)},n=this.#e.findIndex(e=>e.id===t.id);return n>=0?this.#e[n]=t:this.#e.push(t),this.#t=!1,this.isConnected&&this.#p(),this.selectTab(t.id),t}removeTab(e){let t=this.#e.findIndex(t=>t.id===e);if(t<0)return;let n=this.active===e;if(this.#e.splice(t,1),this.#t=!1,this.isConnected&&this.#p(),this.dispatchEvent(new CustomEvent(`tab-close`,{detail:{id:e},bubbles:!0,composed:!0})),n){let e=this.#e[0]?.id??null;e==null?this.#a(null):this.selectTab(e)}}selectTab(e){this.#e.some(t=>t.id===e)&&this.active!==e&&(this.#a(e),this.dispatchEvent(new CustomEvent(`tab-select`,{detail:{id:e},bubbles:!0,composed:!0})))}#a(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e),this.#o()}#o(){let e=this.active;for(let t of this.querySelectorAll(`:scope > slicc-tab`)){let n=t.getAttribute(`tab-id`);t.toggleAttribute(`active`,n!=null&&n===e)}}#s(e){if(!(e instanceof Element))return null;let t=e.closest(`slicc-tab`);return!t||t.parentElement!==this?null:t.getAttribute(`tab-id`)}#c(){this.#r||(this.#r=e=>this.#u(e),this.#i=e=>this.#d(e),this.addEventListener(`select`,this.#r),this.addEventListener(`close`,this.#i),this.#n=e=>this.#f(e),this.addEventListener(`click`,this.#n))}#l(){this.#r&&this.removeEventListener(`select`,this.#r),this.#i&&this.removeEventListener(`close`,this.#i),this.#n&&this.removeEventListener(`click`,this.#n),this.#r=null,this.#i=null,this.#n=null}#u(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.selectTab(t))}#d(e){if(e.target===this)return;let t=this.#s(e.target);t!=null&&(e.stopPropagation(),this.removeTab(t))}#f(e){let t=e.target;if(!(t instanceof Element))return;let n=t.closest(`slicc-tab`);if(!n||n.parentElement!==this)return;let r=n.getAttribute(`tab-id`);if(r==null)return;let i=t.closest(`.x, [data-close]`);if(i&&n.contains(i)){e.stopPropagation(),this.removeTab(r);return}this.selectTab(r)}#p(){if(this.#t)return;this.#t=!0;let e=this.active,t=[];for(let n of this.#e){let r=Do(n.kind);r!==`tool`&&t.push(E(`slicc-tab`,{"tab-id":n.id,kind:r,label:n.label,part:`tab`,closable:n.closable?!0:void 0,badge:n.badge||void 0,glyph:n.glyph||void 0,active:e!=null&&e===n.id||void 0}))}this.replaceChildren(...t)}});var Oo=`/**
|
|
4702
4732
|
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
4703
4733
|
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4704
4734
|
* https://github.com/chjj/term.js
|
|
@@ -4983,7 +5013,7 @@ slicc-tab-bar[hidden] {
|
|
|
4983
5013
|
.xterm .xterm-scrollable-element > .shadow.top.left {
|
|
4984
5014
|
box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
|
|
4985
5015
|
}
|
|
4986
|
-
`,
|
|
5016
|
+
`,ko={background:`#0c0c0e`,foreground:`#e7e7ea`,cursor:`#e7e7ea`,cursorAccent:`#0c0c0e`,selectionBackground:`#8b5cf64d`,selectionForeground:`#ffffff`,black:`#0c0c0e`,red:`#f43f5e`,green:`#5bd17b`,yellow:`#f59e0b`,blue:`#3b82f6`,magenta:`#8b5cf6`,cyan:`#06b6d4`,white:`#e7e7ea`,brightBlack:`#8a8a93`,brightRed:`#fb7185`,brightGreen:`#86efac`,brightYellow:`#fbbf24`,brightBlue:`#60a5fa`,brightMagenta:`#a78bfa`,brightCyan:`#22d3ee`,brightWhite:`#ffffff`},Ao=`
|
|
4987
5017
|
:host {
|
|
4988
5018
|
display: flex;
|
|
4989
5019
|
flex-direction: column;
|
|
@@ -5024,7 +5054,7 @@ slicc-tab-bar[hidden] {
|
|
|
5024
5054
|
/* xterm.js wants its container to size the canvas; let it fill. */
|
|
5025
5055
|
.host .xterm { height: 100%; }
|
|
5026
5056
|
.host .xterm-viewport { overflow-y: auto; }
|
|
5027
|
-
`,
|
|
5057
|
+
`,jo=null;function Mo(){return jo||=[D(Oo),D(Ao)],jo}var No=class extends HTMLElement{static observedAttributes=[`label`,`hide-header`];#e;#t=null;#n=null;#r=null;#i=null;#a=[];#o=!1;constructor(){super(),this.#e=this.attachShadow({mode:`open`})}connectedCallback(){this.#o=!1,this.#s(),this.#c()}disconnectedCallback(){this.#l()}attributeChangedCallback(e){if(this.isConnected&&e===`label`){let e=this.#e.querySelector(`.title`);e&&(e.textContent=this.label)}}get label(){return this.getAttribute(`label`)??`Terminal`}set label(e){e==null?this.removeAttribute(`label`):this.setAttribute(`label`,e)}get hideHeader(){return this.hasAttribute(`hide-header`)}set hideHeader(e){this.toggleAttribute(`hide-header`,e)}get terminal(){return this.#n}write(e){this.#n?this.#n.write(e):this.#a.push(e)}writeln(e){this.#n?this.#n.writeln(e):this.#a.push(`${e}\r\n`)}clear(){this.#n?this.#n.clear():this.#a.length=0}focus(){this.#n?.focus()}fit(){this.#r?.fit()}#s(){if(this.#t)return;this.#e.adoptedStyleSheets=Mo();let e=E(`div`,{class:`hd`,part:`header`},n(`terminal`,{size:14}),E(`span`,{class:`title`},this.label),E(`span`,{class:`spacer`})),t=E(`div`,{class:`host`,part:`host`});this.#e.replaceChildren(e,t),this.#t=t}async#c(){if(this.#n||this.#o)return;let[{Terminal:e},{FitAddon:n}]=await Promise.all([t(()=>import(`./xterm-U4TA8lIC.js`),[]),t(()=>import(`./addon-fit-DIOBYJe3.js`),[])]);if(this.#o||!this.#t)return;let r=new e({cursorBlink:!Po(),fontSize:12,lineHeight:1.25,fontFamily:`'IBM Plex Mono', 'Source Code Pro', 'JetBrains Mono', ui-monospace, monospace`,theme:ko,convertEol:!0,scrollback:2e3}),i=new n;if(r.loadAddon(i),r.open(this.#t),r.onData(e=>{this.dispatchEvent(new CustomEvent(`terminal-data`,{detail:e,bubbles:!0,composed:!0}))}),this.#n=r,this.#r=i,i.fit(),this.#a.length){for(let e of this.#a)r.write(e);this.#a.length=0}typeof ResizeObserver==`function`&&(this.#i=new ResizeObserver(()=>this.#r?.fit()),this.#i.observe(this.#t))}#l(){this.#o=!0,this.#i?.disconnect(),this.#i=null,this.#n?.dispose(),this.#n=null,this.#r=null,this.#a.length=0}};function Po(){return typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}w(`slicc-terminal`,No);var Fo=`
|
|
5028
5058
|
slicc-workbench-body {
|
|
5029
5059
|
flex: 1;
|
|
5030
5060
|
min-height: 0;
|
|
@@ -5045,7 +5075,7 @@ slicc-workbench-body > * {
|
|
|
5045
5075
|
slicc-workbench-body > .slicc-wbbody__active {
|
|
5046
5076
|
display: flex;
|
|
5047
5077
|
}
|
|
5048
|
-
`,
|
|
5078
|
+
`,Io=`slicc-workbench-body-style`,Lo=`slicc-wbbody__active`,Ro=`slicc-surface`;function zo(e){if(e.getElementById(Io))return;let t=e.createElement(`style`);t.id=Io,t.textContent=Fo,(e.head??e.documentElement).appendChild(t)}w(`slicc-workbench-body`,class extends HTMLElement{static observedAttributes=[`active`];#e=!1;#t=new MutationObserver(()=>this.#i());connectedCallback(){zo(this.ownerDocument),this.#e=!0,this.#i(),this.#t.observe(this,{childList:!0})}disconnectedCallback(){this.#e=!1,this.#t.disconnect()}attributeChangedCallback(e,t,n){t!==n&&e===`active`&&this.#e&&this.#i()}get active(){return this.getAttribute(`active`)}set active(e){e==null?this.removeAttribute(`active`):this.setAttribute(`active`,e)}get activeSurface(){let e=this.active;return e==null?null:this.#n().find(t=>this.#r(t)===e)??null}get surfaces(){return this.#n()}selectSurface(e){let t=this.active;e!==t&&(this.setAttribute(`active`,e),this.#e||this.#i(),this.dispatchEvent(new CustomEvent(`slicc-surface-change`,{bubbles:!0,composed:!0,detail:{id:e,previous:t}})))}#n(){let e=[];for(let t of Array.from(this.children))t instanceof HTMLElement&&t.localName===Ro&&e.push(t);return e}#r(e){return e.getAttribute(`surface-id`)||e.getAttribute(`data-s`)||e.id}#i(){let e=this.active;for(let t of this.#n()){let n=e!=null&&this.#r(t)===e;t.classList.toggle(Lo,n),t.toggleAttribute(`active`,n)}}});var Bo=`
|
|
5049
5079
|
slicc-workbench-header {
|
|
5050
5080
|
flex: 0 0 auto;
|
|
5051
5081
|
display: flex;
|
|
@@ -5072,7 +5102,7 @@ slicc-workbench-header > slicc-collapse-btn {
|
|
|
5072
5102
|
slicc-workbench-header > slicc-tab-bar {
|
|
5073
5103
|
min-width: 0;
|
|
5074
5104
|
}
|
|
5075
|
-
`,
|
|
5105
|
+
`,Vo=`slicc-workbench-header-style`;function Ho(e){if(e.getElementById(Vo))return;let t=e.createElement(`style`);t.id=Vo,t.textContent=Bo,(e.head??e.documentElement).appendChild(t)}w(`slicc-workbench-header`,class extends HTMLElement{static observedAttributes=[`kind`];#e;#t=!1;connectedCallback(){Ho(this.ownerDocument),this.#n(),this.#r(),this.addEventListener(`collapse`,this.#i)}disconnectedCallback(){this.removeEventListener(`collapse`,this.#i)}attributeChangedCallback(e){e===`kind`&&this.isConnected&&this.#r()}get kind(){let e=this.getAttribute(`kind`);return e===`tool`||e===`sprinkle`?e:null}set kind(e){e==null?this.removeAttribute(`kind`):this.setAttribute(`kind`,e)}get spacer(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > .slicc-wbhead__spacer`);if(e instanceof HTMLElement){this.#e=e;return}this.#e=this.ownerDocument.createElement(`div`),this.#e.className=`slicc-wbhead__spacer`,this.#e.setAttribute(`part`,`spacer`);let t=this.querySelector(`:scope > slicc-pane-tag`),n=this.querySelector(`:scope > slicc-collapse-btn`);this.appendChild(this.#e),t&&this.appendChild(t),n&&this.appendChild(n)}#r(){let e=this.querySelector(`:scope > slicc-pane-tag`);if(!e)return;let t=this.kind;t==null?e.removeAttribute(`kind`):e.setAttribute(`kind`,t)}#i=e=>{e.target!==this&&(e.stopPropagation(),this.dispatchEvent(new CustomEvent(`collapse`,{bubbles:!0,composed:!0})))}});var Uo=`
|
|
5076
5106
|
slicc-workbench-pane {
|
|
5077
5107
|
display: flex;
|
|
5078
5108
|
flex-direction: column;
|
|
@@ -5111,7 +5141,7 @@ slicc-workbench-pane slicc-pane .slicc-pane__body {
|
|
|
5111
5141
|
flex-direction: column;
|
|
5112
5142
|
min-height: 0;
|
|
5113
5143
|
}
|
|
5114
|
-
`,
|
|
5144
|
+
`,Wo=`slicc-workbench-pane-style`;function Go(e){if(e.getElementById(Wo))return;let t=e.createElement(`style`);t.id=Wo,t.textContent=Uo,(e.head??e.documentElement).appendChild(t)}w(`slicc-workbench-pane`,class extends HTMLElement{static observedAttributes=[`open`];#e;#t=!1;connectedCallback(){Go(this.ownerDocument),this.#n()}attributeChangedCallback(e,t,n){e===`open`&&t!==n&&this.isConnected&&this.dispatchEvent(new CustomEvent(`slicc-workbench-pane-toggle`,{bubbles:!0,composed:!0,detail:{open:n!==null}}))}get open(){return this.hasAttribute(`open`)}set open(e){e?this.setAttribute(`open`,``):this.removeAttribute(`open`)}get pane(){return this.#n(),this.#e}#n(){if(this.#t)return;this.#t=!0;let e=this.querySelector(`:scope > slicc-pane`);if(e instanceof HTMLElement){this.#e=e;return}let t=Array.from(this.childNodes);this.#e=this.ownerDocument.createElement(`slicc-pane`),this.#e.setAttribute(`elevated`,``),this.#e.setAttribute(`part`,`pane`);for(let e of t)this.#e.appendChild(e);this.appendChild(this.#e)}});var Ko=`slicc_monitor_collapsed`;function qo(){try{let e=localStorage.getItem(Ko);return new Set(e?JSON.parse(e):[])}catch{return new Set}}function Jo(e){try{localStorage.setItem(Ko,JSON.stringify([...e]))}catch{}}var Yo=`
|
|
5115
5145
|
slicc-monitor {
|
|
5116
5146
|
display: block;
|
|
5117
5147
|
font-family: var(--ui);
|
|
@@ -5236,4 +5266,4 @@ slicc-monitor {
|
|
|
5236
5266
|
color: var(--txt-3);
|
|
5237
5267
|
font-size: 11px;
|
|
5238
5268
|
}
|
|
5239
|
-
`,
|
|
5269
|
+
`,Xo=`slicc-monitor-style`;function Zo(e){if(e.getElementById(Xo))return;let t=e.createElement(`style`);t.id=Xo,t.textContent=Yo,(e.head??e.documentElement).appendChild(t)}function Qo(e){return E(`div`,{class:`monitor-row`},E(`span`,{class:e.error?`monitor-row__dot monitor-row__dot--error`:e.active?`monitor-row__dot monitor-row__dot--active`:`monitor-row__dot`}),E(`span`,{class:`monitor-row__name`},e.name),E(`span`,{class:`monitor-row__meta`},e.meta))}function $o(e,t,n){let r=t.has(e.id),i=e.count===0?`monitor-section monitor-section--empty`:`monitor-section`,a=[E(`span`,{class:`monitor-section__toggle`},r?`▸`:`▾`),E(`span`,{class:`monitor-section__title`},e.label)];e.meta&&a.push(E(`span`,{class:`monitor-section__meta`},e.meta)),a.push(E(`span`,{class:`monitor-section__count`},String(e.count)));let o=E(`button`,{class:`monitor-section__header`,type:`button`},...a);o.setAttribute(`aria-expanded`,String(!r)),o.addEventListener(`click`,()=>n(e.id));let s=E(`div`,{class:`monitor-section__body`});r&&s.setAttribute(`hidden`,``);for(let t of e.rows)s.appendChild(Qo(t));return E(`div`,{class:i,"data-section":e.id},o,s)}w(`slicc-monitor`,class extends HTMLElement{#e=[];#t=new Set;#n=!1;connectedCallback(){Zo(this.ownerDocument),this.#n||=(this.#t=qo(),!0),this.#e.length>0&&this.#r()}get sections(){return this.#e.map(e=>({...e,rows:e.rows.slice()}))}set sections(e){this.#e=Array.isArray(e)?e.map(e=>({...e,rows:e.rows.slice()})):[],this.isConnected&&this.#r()}#r(){let e=E(`div`,{class:`monitor-toolbar`},E(`button`,{class:`monitor-toolbar__refresh`,type:`button`},`↻ Refresh`)),t=e.querySelector(`.monitor-toolbar__refresh`);t&&t.addEventListener(`click`,()=>{this.dispatchEvent(new CustomEvent(`slicc-monitor-refresh`,{bubbles:!0,composed:!0}))});let n=[e];for(let e of this.#e)n.push($o(e,this.#t,e=>{this.#t.has(e)?this.#t.delete(e):this.#t.add(e),Jo(this.#t),this.#r()}));this.replaceChildren(),T(this,n)}});var es=e({DEFAULT_LAUNCHER_CORNER:()=>u,DEFAULT_LAUNCHER_FOLLOWER_STATUS:()=>p,HOLD_TO_ENABLE_MS:()=>Wt,LAUNCHER_FOLLOWER_STATUS_ATTR:()=>m,MACHINE_WRITTEN_MEMORY_PATH:()=>MACHINE_WRITTEN_MEMORY_PATH,REDACTED_REAL_WORLD_MEMORY_PATH:()=>REDACTED_REAL_WORLD_MEMORY_PATH,SYNTHETIC_MEMORY_PATH:()=>SYNTHETIC_MEMORY_PATH,SliccImagePreview:()=>Lt,TOKENS_CSS:()=>no,ensureGlobalTokens:()=>io,followSystemTheme:()=>ao,setTheme:()=>Q});export{hi as a,Ra as i,io as n,ao as r,es as t};
|