opencami 1.8.13 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/client/assets/{CSPContext-DATmz4sz.js → CSPContext-TfUptlEu.js} +1 -1
- package/dist/client/assets/{DirectionContext-FHFKdJq_.js → DirectionContext-CQMv7g2N.js} +1 -1
- package/dist/client/assets/_sessionKey-DYknvaDS.js +23 -0
- package/dist/client/assets/agents-DNywJUai.js +2 -0
- package/dist/client/assets/{agents-screen-C58VLjES.js → agents-screen-fSZJpRi_.js} +1 -1
- package/dist/client/assets/bots-Bqjqhws8.js +2 -0
- package/dist/client/assets/{bots-screen-B8h4Y1VL.js → bots-screen-4yT-e3cM.js} +1 -1
- package/dist/client/assets/{button-BcUmP7JL.js → button-DqP4GZwZ.js} +1 -1
- package/dist/client/assets/{composite--BBbKdxm.js → composite-BLgu_EOL.js} +1 -1
- package/dist/client/assets/{connect-BmwKnEFP.js → connect-CiqRvR6s.js} +1 -1
- package/dist/client/assets/{dashboard-BWQl_-2-.js → dashboard-CyWDWpbj.js} +1 -1
- package/dist/client/assets/{event-BxzjTPjG.js → event-2_Dxdv7h.js} +1 -1
- package/dist/client/assets/{file-explorer-screen-BAbbb_R4.js → file-explorer-screen-CZ2QKk-0.js} +1 -1
- package/dist/client/assets/files-Cbhud0J8.js +2 -0
- package/dist/client/assets/{follow-up-suggestions-Bq-xR5GV.js → follow-up-suggestions-Bi3Ci2my.js} +1 -1
- package/dist/client/assets/{index-BTtT4Vbb.js → index-C_gsW9fo.js} +1 -1
- package/dist/client/assets/{index-rOr2i8gW.js → index-ygitKeM-.js} +1 -1
- package/dist/client/assets/{keyboard-shortcuts-dialog-BA8cBwWm.js → keyboard-shortcuts-dialog-z-amTZVi.js} +1 -1
- package/dist/client/assets/{main-_1IghVZn.js → main-ZBMVSJTF.js} +3 -3
- package/dist/client/assets/{markdown-CqIcraPO.js → markdown-CHUjmWcv.js} +1 -1
- package/dist/client/assets/memory-BRa-0plj.js +2 -0
- package/dist/client/assets/{memory-screen-GBzowsnE.js → memory-screen-C_ZNDGLd.js} +1 -1
- package/dist/client/assets/{menu--FXN_JCl.js → menu-CB88T7R1.js} +1 -1
- package/dist/client/assets/{opencami-logo-BFo87CeM.js → opencami-logo-C0Kj1DiT.js} +1 -1
- package/dist/client/assets/{proxy-CJ6-TEKD.js → proxy-D-juuhw6.js} +1 -1
- package/dist/client/assets/{react-BRYbnjMp.js → react-Akh4y69S.js} +1 -1
- package/dist/client/assets/{search-dialog-CJS2GUnE.js → search-dialog-BasfzCyM.js} +1 -1
- package/dist/client/assets/{search-sources-badge-D0YArqfp.js → search-sources-badge-DwFHWd7S.js} +1 -1
- package/dist/client/assets/{session-export-dialog-Bc9YEPLs.js → session-export-dialog-CAl3iJnD.js} +1 -1
- package/dist/client/assets/{settings-dialog-SDzqDXsx.js → settings-dialog-C8OoRXwX.js} +1 -1
- package/dist/client/assets/skills-Cx12984a.js +2 -0
- package/dist/client/assets/{skills-panel-DIalYvpW.js → skills-panel-B7BRAofP.js} +1 -1
- package/dist/client/assets/styles-CXa-SiWC.css +1 -0
- package/dist/client/assets/{switch-BwmDNR0d.js → switch-DYEbEgy5.js} +1 -1
- package/dist/client/assets/{tabs-T1fJbUsm.js → tabs-eiBvL0H7.js} +1 -1
- package/dist/client/assets/{thinking-DUdE6Iej.js → thinking-CariuioI.js} +1 -1
- package/dist/client/assets/{tooltip-DexBPu8g.js → tooltip-CekkGEYG.js} +1 -1
- package/dist/client/assets/{use-file-explorer-state-eXs92yKN.js → use-file-explorer-state-Dfyh4GwR.js} +1 -1
- package/dist/client/assets/{useBaseUiId-DN9cOflS.js → useBaseUiId-DLhdkHJl.js} +1 -1
- package/dist/client/assets/{useCompositeItem-B_J-cnZX.js → useCompositeItem-DTSTTR0Z.js} +1 -1
- package/dist/client/assets/{useControlled-DeDLOsPR.js → useControlled-CpliTEve.js} +1 -1
- package/dist/client/assets/{useMutation-TzgejsE_.js → useMutation-CpD2Pn0F.js} +1 -1
- package/dist/client/assets/{useOnFirstRender-S4-xcV93.js → useOnFirstRender-DsFYFJoB.js} +1 -1
- package/dist/client/assets/{useQuery-BdjM5kzn.js → useQuery-DMTgpIql.js} +1 -1
- package/dist/server/assets/{_sessionKey-DBzlGMo3.js → _sessionKey-Bhksr7VP.js} +139 -46
- package/dist/server/assets/{_tanstack-start-manifest_v-CX4xb59U.js → _tanstack-start-manifest_v-D-5ReiD4.js} +1 -1
- package/dist/server/assets/{follow-up-suggestions-BmSFSY87.js → follow-up-suggestions-B3hol2KT.js} +2 -2
- package/dist/server/assets/{index-C1dylvu-.js → index-4G_4vZNY.js} +1 -1
- package/dist/server/assets/{router-CL6A11qi.js → router-C9JRmWMm.js} +63 -244
- package/dist/server/assets/{search-dialog-D8DvpPZw.js → search-dialog-CTJULPB8.js} +2 -2
- package/dist/server/assets/{settings-dialog-CeP-J_NJ.js → settings-dialog-B5yR2pBy.js} +2 -2
- package/dist/server/assets/{thinking-ClIWjSbx.js → thinking-CHx4Oouj.js} +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/_sessionKey-D2ZMdqJ0.js +0 -23
- package/dist/client/assets/agents-9A0buuwT.js +0 -2
- package/dist/client/assets/bots-Lqt92ma0.js +0 -2
- package/dist/client/assets/files-DvIFms9G.js +0 -2
- package/dist/client/assets/memory-B3LyVZwO.js +0 -2
- package/dist/client/assets/skills-BVLjvrPU.js +0 -2
- package/dist/client/assets/styles-b2XYKZYx.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as t}from"./main-_1IghVZn.js";import{c as Fe}from"./react-BRYbnjMp.js";import{B as O,H as C,V as Ke,z as ze,f as Be,P as Re,S as Me,g as De,R as _e,s as Ue,j as Ye,c as L,o as Ge,v as He,k as qe,m as Je,n as Xe,h as $e,J as Y,t as Qe}from"./button-BcUmP7JL.js";import{D as Ze,a as et,b as tt,c as at,d as G}from"./use-file-explorer-state-eXs92yKN.js";import{S as m}from"./switch-BwmDNR0d.js";import{T as y,a as v,b as j}from"./tabs-T1fJbUsm.js";import{u as rt}from"./index-BTtT4Vbb.js";import{u as st,g as H}from"./_sessionKey-D2ZMdqJ0.js";import"./useOnFirstRender-S4-xcV93.js";import"./useBaseUiId-DN9cOflS.js";import"./event-BxzjTPjG.js";import"./visuallyHidden-COI6QeQH.js";import"./composite--BBbKdxm.js";import"./useControlled-DeDLOsPR.js";import"./useCompositeItem-B_J-cnZX.js";import"./DirectionContext-FHFKdJq_.js";import"./CSPContext-DATmz4sz.js";import"./useQuery-BdjM5kzn.js";import"./tooltip-DexBPu8g.js";import"./useMutation-TzgejsE_.js";import"./menu--FXN_JCl.js";import"./opencami-logo-BFo87CeM.js";import"./proxy-CJ6-TEKD.js";import"./markdown-CqIcraPO.js";import"./index-T4TOjvD0.js";function lt(){if(typeof window>"u")return!1;try{return window.localStorage.getItem("feature_artifacts")==="true"}catch{return!1}}const nt=Fe()(n=>({isEnabled:lt(),isPanelOpen:!1,content:"",type:null,setArtifact:function(h,a){n({content:h,type:a,isPanelOpen:!0})},clearArtifact:function(){n({content:"",type:null})},openPanel:function(){n({isPanelOpen:!0})},closePanel:function(){n({isPanelOpen:!1})},setEnabled:function(h){if(typeof window<"u")try{window.localStorage.setItem("feature_artifacts",String(h))}catch{}n({isEnabled:h})}}));function x({title:n,tabId:l,activeTab:h,children:a}){const c=l&&h&&l!==h;return t.jsxs("div",{className:L("border-b border-primary-200 py-2 last:border-0",c&&"md:hidden"),children:[t.jsx("h3",{className:"mb-1.5 text-sm font-semibold text-primary-700",children:n}),t.jsx("div",{className:"space-y-1.5",children:a})]})}function s({label:n,description:l,inline:h,children:a}){return h?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex-1 select-none",children:[t.jsx("div",{className:"text-[13px] font-medium text-primary-800",children:n}),l&&t.jsx("div",{className:"text-xs text-primary-500",children:l})]}),t.jsx("div",{className:"flex items-center gap-2",children:a})]}):t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"select-none",children:[t.jsx("div",{className:"text-[13px] font-medium text-primary-800",children:n}),l&&t.jsx("div",{className:"text-xs text-primary-500",children:l})]}),t.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:a})]})}const te=[{value:"14px",label:"S"},{value:"16px",label:"M"},{value:"18px",label:"L"},{value:"20px",label:"XL"}],W=[{value:"system",label:"System",cssValue:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',previewClass:"font-sans"},{value:"inter",label:"Inter",cssValue:'"Inter", sans-serif',previewClass:'font-["Inter",sans-serif]'},{value:"roboto",label:"Roboto",cssValue:'"Roboto", sans-serif',previewClass:'font-["Roboto",sans-serif]'}],ae=[{value:"compact",label:"Compact"},{value:"comfortable",label:"Comfortable"},{value:"spacious",label:"Spacious"}],F=[{value:"green",label:"Green",accent:"#22c55e",hover:"#16a34a",light:"rgba(34, 197, 94, 0.10)",fg:"#ffffff"},{value:"blue",label:"Blue",accent:"#3b82f6",hover:"#2563eb",light:"rgba(59, 130, 246, 0.10)",fg:"#ffffff"},{value:"purple",label:"Purple",accent:"#8b5cf6",hover:"#7c3aed",light:"rgba(139, 92, 246, 0.10)",fg:"#ffffff"},{value:"orange",label:"Orange",accent:"#f97316",hover:"#ea580c",light:"rgba(249, 115, 22, 0.10)",fg:"#ffffff"},{value:"pink",label:"Pink",accent:"#ec4899",hover:"#db2777",light:"rgba(236, 72, 153, 0.10)",fg:"#ffffff"},{value:"red",label:"Red",accent:"#ef4444",hover:"#dc2626",light:"rgba(239, 68, 68, 0.10)",fg:"#ffffff"},{value:"cyan",label:"Cyan",accent:"#06b6d4",hover:"#0891b2",light:"rgba(6, 182, 212, 0.10)",fg:"#ffffff"},{value:"yellow",label:"Yellow",accent:"#eab308",hover:"#ca8a04",light:"rgba(234, 179, 8, 0.10)",fg:"#ffffff"},{value:"white",label:"White",accent:"#ffffff",hover:"#e5e5e5",light:"rgba(255, 255, 255, 0.10)",fg:"#1a1a1a"}],K=[{value:"narrow",label:"Narrow",cssValue:"640px"},{value:"medium",label:"Medium",cssValue:"800px"},{value:"wide",label:"Wide",cssValue:"1000px"},{value:"full",label:"Full",cssValue:"100%"}],z=[{value:"compact",label:"Compact",cssValue:"200px"},{value:"normal",label:"Normal",cssValue:"260px"},{value:"wide",label:"Wide",cssValue:"320px"},{value:"xl",label:"XL",cssValue:"400px"}],re=[{value:"default",label:"Default"},{value:"bubbles",label:"Bubbles"},{value:"minimal",label:"Minimal"}];function q(n){return te.some(l=>l.value===n)}function J(n){return W.some(l=>l.value===n)}function X(n){return ae.some(l=>l.value===n)}function $(n){return F.some(l=>l.value===n)}function Q(n){return K.some(l=>l.value===n)}function Z(n){return z.some(l=>l.value===n)}function ee(n){return re.some(l=>l.value===n)}function Vt({open:n,onOpenChange:l,onClose:h}){const{settings:a,updateSettings:c}=rt(),{settings:u,updateSettings:b,status:w,testApiKey:se}=st(),[p,le]=o.useState("appearance"),[g,R]=o.useState(u.llmApiKey),[M,D]=o.useState(!1),[S,k]=o.useState(null),[ne,ie]=o.useState(()=>{if(typeof window>"u")return"16px";try{const e=localStorage.getItem("opencami-text-size");if(e&&q(e))return e}catch{}return"16px"}),[oe,ce]=o.useState(()=>{if(typeof window>"u")return!0;try{const e=localStorage.getItem("opencami-tts-enabled");return e===null?!0:e==="true"}catch{return!0}}),[_,de]=o.useState(()=>{if(typeof window>"u")return"auto";try{return localStorage.getItem("opencami-tts-provider")||"auto"}catch{return"auto"}}),[ue,me]=o.useState(()=>{if(typeof window>"u")return"nova";try{return localStorage.getItem("opencami-tts-voice")||"nova"}catch{return"nova"}}),[he,pe]=o.useState(()=>{if(typeof window>"u")return"auto";try{return localStorage.getItem("opencami-stt-provider")||"auto"}catch{return"auto"}});o.useEffect(()=>{if(!(typeof window>"u"))try{const e=localStorage.getItem("opencami-font-family");e&&J(e)?(I(e),a.fontFamily!==e&&c({fontFamily:e})):I(a.fontFamily);const r=localStorage.getItem("opencami-density");r&&X(r)?(N(r),a.density!==r&&c({density:r})):N(a.density);const i=localStorage.getItem("opencami-accent-color");i&&$(i)?(P(i),a.accentColor!==i&&c({accentColor:i})):P(a.accentColor);const d=localStorage.getItem("opencami-chat-width");d&&Q(d)?(A(d),a.chatWidth!==d&&c({chatWidth:d})):A(a.chatWidth);const f=localStorage.getItem("opencami-sidebar-width");f&&Z(f)?(E(f),a.sidebarWidth!==f&&c({sidebarWidth:f})):E(a.sidebarWidth);const V=localStorage.getItem("opencami-bubble-style");V&&ee(V)?(T(V),a.bubbleStyle!==V&&c({bubbleStyle:V})):T(a.bubbleStyle)}catch{I(a.fontFamily),N(a.density),P(a.accentColor),A(a.chatWidth),E(a.sidebarWidth),T(a.bubbleStyle)}},[]),o.useEffect(()=>{I(a.fontFamily)},[a.fontFamily]),o.useEffect(()=>{N(a.density)},[a.density]),o.useEffect(()=>{P(a.accentColor)},[a.accentColor]),o.useEffect(()=>{A(a.chatWidth)},[a.chatWidth]),o.useEffect(()=>{E(a.sidebarWidth)},[a.sidebarWidth]),o.useEffect(()=>{T(a.bubbleStyle)},[a.bubbleStyle]);const fe=e=>{de(e);try{localStorage.setItem("opencami-tts-provider",e)}catch{}},xe=e=>{me(e);try{localStorage.setItem("opencami-tts-voice",e)}catch{}},be=e=>{pe(e);try{localStorage.setItem("opencami-stt-provider",e)}catch{}};function ge(e){typeof document>"u"||document.documentElement.style.setProperty("--opencami-text-size",e)}function I(e){if(typeof document>"u")return;const i=W.find(d=>d.value===e)?.cssValue??W[0].cssValue;document.documentElement.style.setProperty("--opencami-font-family",i)}function N(e){if(typeof document>"u")return;const r=document.documentElement;if(r.style.setProperty("--opencami-density",e),e==="compact"){r.style.setProperty("--opencami-msg-padding-y","0.25rem"),r.style.setProperty("--opencami-msg-gap","0.25rem"),r.style.setProperty("--opencami-user-bubble-py","0.4rem");return}if(e==="spacious"){r.style.setProperty("--opencami-msg-padding-y","1.25rem"),r.style.setProperty("--opencami-msg-gap","1rem"),r.style.setProperty("--opencami-user-bubble-py","1rem");return}r.style.setProperty("--opencami-msg-padding-y","0.75rem"),r.style.setProperty("--opencami-msg-gap","0.5rem"),r.style.setProperty("--opencami-user-bubble-py","0.625rem")}function P(e){if(typeof document>"u")return;const r=F.find(d=>d.value===e)??F[0],i=document.documentElement;i.style.setProperty("--opencami-accent",r.accent),i.style.setProperty("--opencami-accent-hover",r.hover),i.style.setProperty("--opencami-accent-light",r.light),i.style.setProperty("--opencami-accent-fg",r.fg)}function A(e){if(typeof document>"u")return;const r=K.find(i=>i.value===e)??K[2];document.documentElement.style.setProperty("--opencami-chat-width",r.cssValue)}function E(e){if(typeof document>"u")return;const r=z.find(i=>i.value===e)??z[1];document.documentElement.style.setProperty("--opencami-sidebar-width",r.cssValue)}function T(e){typeof document>"u"||document.documentElement.setAttribute("data-opencami-bubble-style",e)}const ye=e=>{if(q(e)){ie(e),ge(e);try{localStorage.setItem("opencami-text-size",e)}catch{}}},ve=e=>{if(J(e)){I(e),c({fontFamily:e});try{localStorage.setItem("opencami-font-family",e)}catch{}}},je=e=>{if(X(e)){N(e),c({density:e});try{localStorage.setItem("opencami-density",e)}catch{}}},we=e=>{if($(e)){P(e),c({accentColor:e});try{localStorage.setItem("opencami-accent-color",e)}catch{}}},Se=e=>{if(Q(e)){A(e),c({chatWidth:e});try{localStorage.setItem("opencami-chat-width",e)}catch{}}},Ce=e=>{if(Z(e)){E(e),c({sidebarWidth:e});try{localStorage.setItem("opencami-sidebar-width",e)}catch{}}},ke=e=>{if(ee(e)){T(e),c({bubbleStyle:e});try{localStorage.setItem("opencami-bubble-style",e)}catch{}}},Ie=e=>{ce(e);try{localStorage.setItem("opencami-tts-enabled",String(e))}catch{}window.dispatchEvent(new StorageEvent("storage",{key:"opencami-tts-enabled",newValue:String(e)}))},[U,Ne]=o.useState(!1),B=o.useRef(null),[Pe,Ae]=o.useState(()=>{if(typeof window>"u")return!0;try{const e=localStorage.getItem("opencami-personas-enabled");return e===null?!0:e==="true"}catch{return!0}});o.useEffect(()=>{let e=!0;async function r(){B.current?.abort();const i=new AbortController;B.current=i;try{const d=await fetch("/api/personas",{signal:i.signal});if(!d.ok)return;const f=await d.json();e&&f.ok&&Ne(f.available)}catch(d){if(d instanceof Error&&d.name==="AbortError")return}}return r(),()=>{e=!1,B.current?.abort()}},[]);const Ee=e=>{Ae(e);try{localStorage.setItem("opencami-personas-enabled",String(e))}catch{}window.dispatchEvent(new StorageEvent("storage",{key:"opencami-personas-enabled",newValue:String(e)}))},Te=async()=>{if(g.trim()){D(!0),k(null);try{const e=await se(g.trim());k(e),e.valid&&b({llmApiKey:g.trim()})}finally{D(!1)}}},Ve=()=>{b({llmApiKey:g.trim()}),k(null)},Oe=()=>{R(""),b({llmApiKey:""}),k(null)},Le=[{value:"system",label:"Auto",icon:Ge},{value:"light",label:"Light",icon:He},{value:"dark",label:"Dark",icon:qe},{value:"chameleon",label:"Cham",icon:Je},{value:"frost-light",label:"Ice",icon:Xe}];function We(e){if(typeof document>"u")return;const r=document.documentElement,i=window.matchMedia("(prefers-color-scheme: dark)");r.classList.remove("light","dark","system","chameleon","frost","frost-light","frost-dark"),r.style.colorScheme="",r.classList.add(e);const d=e==="frost-light",f=e==="frost-dark";(d||f)&&r.classList.add("frost"),f&&r.classList.add("dark"),e==="system"&&i.matches&&r.classList.add("dark"),d&&(r.classList.remove("dark"),r.style.colorScheme="light")}return t.jsx(Ze,{open:n,onOpenChange:l,children:t.jsx(et,{className:"w-[min(680px,92vw)] max-h-[85vh] overflow-y-auto",children:t.jsxs("div",{className:"p-3",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{children:[t.jsx(tt,{className:"mb-1",children:"Settings"}),t.jsx(at,{className:"hidden",children:"Configure OpenCami"})]}),t.jsx(G,{render:t.jsx(O,{size:"icon-sm",variant:"ghost",className:"text-primary-500 hover:bg-primary-100 hover:text-primary-700","aria-label":"Close",children:t.jsx(C,{icon:Ke,size:20,strokeWidth:1.5})})})]}),t.jsxs("div",{className:"mt-2 flex md:flex-row flex-col md:gap-3 gap-0 md:min-h-[400px]",children:[t.jsx("nav",{className:"hidden md:flex flex-col gap-0.5 min-w-[160px] border-r border-primary-200 pr-3",children:[{id:"connection",label:"Connection",icon:ze},{id:"appearance",label:"Appearance",icon:Be},{id:"chat",label:"Chat",icon:Re},{id:"workspace",label:"Workspace",icon:Me},{id:"personas",label:"Personas",icon:De},{id:"voice",label:"Voice",icon:_e},{id:"llm",label:"LLM Features",icon:Ue},{id:"about",label:"About",icon:Ye}].map(e=>t.jsxs("button",{onClick:()=>le(e.id),className:L("flex items-center gap-2 px-2.5 py-1.5 rounded-md text-sm text-left transition-colors",p===e.id?"text-primary-900 font-medium":"text-primary-600 hover:text-primary-900 hover:bg-primary-50"),style:p===e.id?{backgroundColor:"var(--opencami-accent-light)"}:void 0,children:[t.jsx(C,{icon:e.icon,size:16,strokeWidth:1.5}),e.label]},e.id))}),t.jsxs("div",{className:"flex-1 overflow-y-auto md:max-h-[calc(85vh-90px)] max-h-none",children:[t.jsx(x,{title:"Connection",tabId:"connection",activeTab:p,children:t.jsx(s,{inline:!0,label:"Status",children:t.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-green-600",children:[t.jsx("span",{className:"size-2 rounded-full bg-green-500"}),"Connected"]})})}),t.jsxs(x,{title:"Appearance",tabId:"appearance",activeTab:p,children:[t.jsx(s,{label:"Theme",children:t.jsx(y,{value:a.theme,onValueChange:e=>{const r=e;We(r),c({theme:r})},children:t.jsx(v,{variant:"default",className:"gap-1.5 flex-wrap *:data-[slot=tab-indicator]:duration-0",children:Le.map(e=>t.jsxs(j,{value:e.value,className:"text-[11px] px-1 py-0.5 gap-0.5",children:[e.icon&&t.jsx(C,{icon:e.icon,size:13,strokeWidth:1.5}),t.jsx("span",{children:e.label})]},e.value))})})}),t.jsx(s,{label:"Accent Color",children:t.jsx("div",{className:"flex gap-0.5 flex-wrap",children:F.map(e=>{const r=a.accentColor===e.value;return t.jsx("button",{type:"button",onClick:()=>we(e.value),className:L("flex items-center justify-center rounded-md p-1 transition-all duration-150",r?"scale-110":"hover:bg-primary-50 hover:scale-105"),children:t.jsx("span",{className:L("size-6 rounded-full transition-shadow duration-150",r?"ring-2 ring-offset-2":"border-2 border-primary-200"),style:{backgroundColor:e.accent,...r?{"--tw-ring-color":e.accent}:{}}})},e.value)})})}),t.jsx(s,{label:"Text Size",children:t.jsx(y,{value:ne,onValueChange:ye,children:t.jsx(v,{variant:"default",className:"gap-2 *:data-[slot=tab-indicator]:duration-0",children:te.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"tabular-nums text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Font",children:t.jsx(y,{value:a.fontFamily,onValueChange:ve,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:W.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",style:{fontFamily:e.cssValue},children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Density",children:t.jsx(y,{value:a.density,onValueChange:je,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:ae.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Bubbles",children:t.jsx(y,{value:a.bubbleStyle,onValueChange:ke,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:re.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Chat Width",children:t.jsx(y,{value:a.chatWidth,onValueChange:Se,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:K.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Sidebar",children:t.jsx(y,{value:a.sidebarWidth,onValueChange:Ce,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:z.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})})]}),t.jsxs(x,{title:"Chat",tabId:"chat",activeTab:p,children:[t.jsx(s,{inline:!0,label:"Show tool messages",children:t.jsx(m,{checked:a.showToolMessages,onCheckedChange:e=>c({showToolMessages:e})})}),t.jsx(s,{inline:!0,label:"Show reasoning blocks",children:t.jsx(m,{checked:a.showReasoningBlocks,onCheckedChange:e=>c({showReasoningBlocks:e})})}),t.jsx(s,{inline:!0,label:"Show search sources",children:t.jsx(m,{checked:a.showSearchSources,onCheckedChange:e=>c({showSearchSources:e})})}),t.jsx(s,{inline:!0,label:"Inline File Preview",description:"Make file paths in messages clickable to preview file contents",children:t.jsx(m,{checked:a.inlineFilePreview,onCheckedChange:e=>c({inlineFilePreview:e})})})]}),t.jsxs(x,{title:"Workspace",tabId:"workspace",activeTab:p,children:[t.jsx(s,{inline:!0,label:"File Explorer",description:"Browse and edit workspace files from the sidebar",children:t.jsx(m,{checked:(()=>{try{const e=localStorage.getItem("opencami-file-explorer");return e===null?!0:e==="true"}catch{return!0}})(),onCheckedChange:e=>{localStorage.setItem("opencami-file-explorer",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Memory Viewer",description:"Browse and edit MEMORY.md and daily memory files",children:t.jsx(m,{checked:(()=>{try{const e=localStorage.getItem("opencami-memory-viewer");return e===null?!0:e==="true"}catch{return!0}})(),onCheckedChange:e=>{localStorage.setItem("opencami-memory-viewer",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Agent Manager (Beta)",description:"Show Agent Manager in sidebar for creating and managing agents",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-agent-manager")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-agent-manager",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Skills Browser (Beta)",description:"Browse and install skills from ClawHub",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-skills-browser")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-skills-browser",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Cron Jobs Panel (Beta)",description:"Show Cron Jobs in sidebar for managing OpenClaw cron schedules",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-cron-manager")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-cron-manager",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Dashboard (Beta)",description:"Show Dashboard in sidebar with system and gateway widgets",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("feature_dashboard")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("feature_dashboard",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Artifacts Preview (Beta)",description:"Show live HTML/SVG preview panel when AI generates code",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("feature_artifacts")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("feature_artifacts",String(e)),nt.getState().setEnabled(e)}})})]}),t.jsxs(x,{title:"Personas",tabId:"personas",activeTab:p,children:[U?t.jsx(s,{inline:!0,label:"Persona Picker",description:"Show persona picker in chat (20 personalities)",children:t.jsx(m,{checked:Pe,onCheckedChange:Ee})}):t.jsx(s,{inline:!0,label:"Persona Picker",description:"Install the Personas skill to unlock 20 AI personalities",children:t.jsx(m,{checked:!1,disabled:!0})}),!U&&t.jsx("div",{className:"pt-1",children:t.jsx("a",{href:"https://www.clawhub.ai/robbyczgw-cla/personas",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary-600 hover:text-primary-900 hover:underline",children:"Get it on ClawHub →"})})]}),t.jsxs(x,{title:"Text-to-Speech",tabId:"voice",activeTab:p,children:[t.jsx(s,{inline:!0,label:"Voice Playback",description:"Add a 🔊 button to AI messages for text-to-speech",children:t.jsx(m,{checked:oe,onCheckedChange:Ie})}),t.jsx(s,{inline:!0,label:"TTS Provider",description:"Choose which service generates speech",children:t.jsxs("select",{value:_,onChange:e=>fe(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"auto",children:"Auto"}),t.jsx("option",{value:"elevenlabs",children:"ElevenLabs"}),t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"edge",children:"Edge TTS (free)"})]})}),_==="openai"&&t.jsx(s,{inline:!0,label:"Voice",description:"OpenAI voice selection",children:t.jsx("select",{value:ue,onChange:e=>xe(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:["alloy","echo","fable","onyx","nova","shimmer"].map(e=>t.jsx("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})})]}),t.jsx(x,{title:"Speech-to-Text",tabId:"voice",activeTab:p,children:t.jsx(s,{inline:!0,label:"STT Provider",description:"Choose which service transcribes your voice",children:t.jsxs("select",{value:he,onChange:e=>be(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"auto",children:"Auto"}),t.jsx("option",{value:"elevenlabs",children:"ElevenLabs"}),t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"browser",children:"Browser (free)"})]})})}),t.jsxs(x,{title:"LLM Features",tabId:"llm",activeTab:p,children:[t.jsxs("div",{className:"text-xs text-primary-500 mb-3",children:["Enhance session titles and follow-up suggestions using an LLM provider.",w.hasEnvKey&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has OPENAI_API_KEY configured"}),w.hasOpenRouterKey&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has OPENROUTER_API_KEY configured"}),w.hasKilocodeKey&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has KILOCODE_API_KEY configured"})]}),t.jsx(s,{inline:!0,label:"Provider",description:"Choose LLM provider for titles & follow-ups",children:t.jsxs("select",{value:u.llmProvider,onChange:e=>{const r=e.target.value;b({llmProvider:r,llmBaseUrl:"",llmModel:""})},className:"px-2 py-1 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"openrouter",children:"OpenRouter"}),t.jsx("option",{value:"kilocode",children:"Kilo Gateway"}),t.jsx("option",{value:"ollama",children:"Ollama (local)"}),t.jsx("option",{value:"custom",children:"Custom"})]})}),t.jsx(s,{inline:!0,label:"Smart session titles",description:"Generate concise titles using AI",children:t.jsx(m,{checked:u.useLlmTitles,onCheckedChange:e=>b({useLlmTitles:e}),disabled:!w.isAvailable})}),t.jsx(s,{inline:!0,label:"Smart follow-up suggestions",description:"AI-generated contextual follow-ups",children:t.jsx(m,{checked:u.useLlmFollowUps,onCheckedChange:e=>b({useLlmFollowUps:e}),disabled:!w.isAvailable})}),t.jsxs("div",{className:"mt-2 space-y-2",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-primary-500 mb-1",children:"Model"}),t.jsx("input",{type:"text",value:u.llmModel,onChange:e=>b({llmModel:e.target.value}),placeholder:H(u.llmProvider).model||"model-name",className:"w-full px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"})]}),(u.llmProvider==="custom"||u.llmProvider==="ollama")&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-primary-500 mb-1",children:"Base URL"}),t.jsx("input",{type:"text",value:u.llmBaseUrl,onChange:e=>b({llmBaseUrl:e.target.value}),placeholder:H(u.llmProvider).baseUrl||"https://...",className:"w-full px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"})]})]}),t.jsxs("div",{className:"mt-4 pt-3 border-t border-primary-100",children:[t.jsx("div",{className:"text-sm text-primary-800 mb-2",children:u.llmProvider==="ollama"?"API Key (optional)":"API Key"}),t.jsx("div",{className:"text-xs text-primary-500 mb-2",children:u.llmProvider==="ollama"?"Not required for local Ollama":w.hasEnvKey&&u.llmProvider==="openai"?"Optional: Override server key with your own":`Required for ${u.llmProvider==="openrouter"?"OpenRouter":u.llmProvider==="kilocode"?"Kilo Gateway":"LLM features"} (stored locally)`}),t.jsxs("div",{className:"text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded-md px-2 py-1.5 mb-2",children:["⚠️ ",t.jsx("strong",{children:"Security Note:"})," API keys are stored in your browser's localStorage. This is convenient but not secure for shared computers. For production use, configure keys server-side via environment variables (OPENAI_API_KEY, OPENROUTER_API_KEY, KILOCODE_API_KEY)."]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("input",{type:"password",value:g,onChange:e=>{R(e.target.value),k(null)},placeholder:"sk-...",className:"flex-1 px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"}),t.jsx(O,{size:"sm",variant:"outline",onClick:Te,disabled:!g.trim()||M,className:"min-w-[60px]",children:M?t.jsx(C,{icon:$e,size:16,className:"animate-spin"}):"Test"})]}),S&&t.jsxs("div",{className:`mt-2 flex items-center gap-1.5 text-xs ${S.valid?"text-green-600":"text-red-600"}`,children:[t.jsx(C,{icon:S.valid?Y:Qe,size:14}),S.valid?"API key is valid":S.error||"Invalid API key"]}),u.llmApiKey&&t.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-green-600 flex items-center gap-1",children:[t.jsx(C,{icon:Y,size:14}),"Key saved"]}),t.jsx(O,{size:"sm",variant:"ghost",onClick:Oe,className:"text-xs text-red-600 hover:text-red-700 hover:bg-red-50",children:"Clear"})]}),g&&g!==u.llmApiKey&&!S?.valid&&t.jsx(O,{size:"sm",variant:"outline",onClick:Ve,className:"mt-2 w-full",children:"Save without testing"})]})]}),t.jsxs(x,{title:"About",tabId:"about",activeTab:p,children:[t.jsx("div",{className:"text-sm text-primary-800",children:"OpenCami"}),t.jsxs("div",{className:"flex gap-4 pt-2",children:[t.jsx("a",{href:"https://github.com/robbyczgw-cla/opencami",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary-600 hover:text-primary-900 hover:underline",children:"GitHub"}),t.jsx("a",{href:"https://docs.openclaw.ai",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary-600 hover:text-primary-900 hover:underline",children:"OpenClaw docs"})]})]})]})]}),t.jsx("div",{className:"mt-2 flex justify-end",children:t.jsx(G,{onClick:h,children:"Close"})})]})})})}export{Vt as SettingsDialog};
|
|
1
|
+
import{r as o,j as t}from"./main-ZBMVSJTF.js";import{c as Fe}from"./react-Akh4y69S.js";import{B as O,H as C,V as Ke,z as ze,f as Be,P as Re,S as Me,g as De,R as _e,s as Ue,j as Ye,c as L,o as Ge,v as He,k as qe,m as Je,n as Xe,h as $e,J as Y,t as Qe}from"./button-DqP4GZwZ.js";import{D as Ze,a as et,b as tt,c as at,d as G}from"./use-file-explorer-state-Dfyh4GwR.js";import{S as m}from"./switch-DYEbEgy5.js";import{T as y,a as v,b as j}from"./tabs-eiBvL0H7.js";import{u as rt}from"./index-C_gsW9fo.js";import{u as st,g as H}from"./_sessionKey-DYknvaDS.js";import"./useOnFirstRender-DsFYFJoB.js";import"./useBaseUiId-DLhdkHJl.js";import"./event-2_Dxdv7h.js";import"./visuallyHidden-COI6QeQH.js";import"./composite-BLgu_EOL.js";import"./useControlled-CpliTEve.js";import"./useCompositeItem-DTSTTR0Z.js";import"./DirectionContext-CQMv7g2N.js";import"./CSPContext-TfUptlEu.js";import"./useQuery-DMTgpIql.js";import"./tooltip-CekkGEYG.js";import"./useMutation-CpD2Pn0F.js";import"./menu-CB88T7R1.js";import"./opencami-logo-C0Kj1DiT.js";import"./proxy-D-juuhw6.js";import"./markdown-CHUjmWcv.js";import"./index-T4TOjvD0.js";function lt(){if(typeof window>"u")return!1;try{return window.localStorage.getItem("feature_artifacts")==="true"}catch{return!1}}const nt=Fe()(n=>({isEnabled:lt(),isPanelOpen:!1,content:"",type:null,setArtifact:function(h,a){n({content:h,type:a,isPanelOpen:!0})},clearArtifact:function(){n({content:"",type:null})},openPanel:function(){n({isPanelOpen:!0})},closePanel:function(){n({isPanelOpen:!1})},setEnabled:function(h){if(typeof window<"u")try{window.localStorage.setItem("feature_artifacts",String(h))}catch{}n({isEnabled:h})}}));function x({title:n,tabId:l,activeTab:h,children:a}){const c=l&&h&&l!==h;return t.jsxs("div",{className:L("border-b border-primary-200 py-2 last:border-0",c&&"md:hidden"),children:[t.jsx("h3",{className:"mb-1.5 text-sm font-semibold text-primary-700",children:n}),t.jsx("div",{className:"space-y-1.5",children:a})]})}function s({label:n,description:l,inline:h,children:a}){return h?t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex-1 select-none",children:[t.jsx("div",{className:"text-[13px] font-medium text-primary-800",children:n}),l&&t.jsx("div",{className:"text-xs text-primary-500",children:l})]}),t.jsx("div",{className:"flex items-center gap-2",children:a})]}):t.jsxs("div",{className:"space-y-1",children:[t.jsxs("div",{className:"select-none",children:[t.jsx("div",{className:"text-[13px] font-medium text-primary-800",children:n}),l&&t.jsx("div",{className:"text-xs text-primary-500",children:l})]}),t.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:a})]})}const te=[{value:"14px",label:"S"},{value:"16px",label:"M"},{value:"18px",label:"L"},{value:"20px",label:"XL"}],W=[{value:"system",label:"System",cssValue:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',previewClass:"font-sans"},{value:"inter",label:"Inter",cssValue:'"Inter", sans-serif',previewClass:'font-["Inter",sans-serif]'},{value:"roboto",label:"Roboto",cssValue:'"Roboto", sans-serif',previewClass:'font-["Roboto",sans-serif]'}],ae=[{value:"compact",label:"Compact"},{value:"comfortable",label:"Comfortable"},{value:"spacious",label:"Spacious"}],F=[{value:"green",label:"Green",accent:"#22c55e",hover:"#16a34a",light:"rgba(34, 197, 94, 0.10)",fg:"#ffffff"},{value:"blue",label:"Blue",accent:"#3b82f6",hover:"#2563eb",light:"rgba(59, 130, 246, 0.10)",fg:"#ffffff"},{value:"purple",label:"Purple",accent:"#8b5cf6",hover:"#7c3aed",light:"rgba(139, 92, 246, 0.10)",fg:"#ffffff"},{value:"orange",label:"Orange",accent:"#f97316",hover:"#ea580c",light:"rgba(249, 115, 22, 0.10)",fg:"#ffffff"},{value:"pink",label:"Pink",accent:"#ec4899",hover:"#db2777",light:"rgba(236, 72, 153, 0.10)",fg:"#ffffff"},{value:"red",label:"Red",accent:"#ef4444",hover:"#dc2626",light:"rgba(239, 68, 68, 0.10)",fg:"#ffffff"},{value:"cyan",label:"Cyan",accent:"#06b6d4",hover:"#0891b2",light:"rgba(6, 182, 212, 0.10)",fg:"#ffffff"},{value:"yellow",label:"Yellow",accent:"#eab308",hover:"#ca8a04",light:"rgba(234, 179, 8, 0.10)",fg:"#ffffff"},{value:"white",label:"White",accent:"#ffffff",hover:"#e5e5e5",light:"rgba(255, 255, 255, 0.10)",fg:"#1a1a1a"}],K=[{value:"narrow",label:"Narrow",cssValue:"640px"},{value:"medium",label:"Medium",cssValue:"800px"},{value:"wide",label:"Wide",cssValue:"1000px"},{value:"full",label:"Full",cssValue:"100%"}],z=[{value:"compact",label:"Compact",cssValue:"200px"},{value:"normal",label:"Normal",cssValue:"260px"},{value:"wide",label:"Wide",cssValue:"320px"},{value:"xl",label:"XL",cssValue:"400px"}],re=[{value:"default",label:"Default"},{value:"bubbles",label:"Bubbles"},{value:"minimal",label:"Minimal"}];function q(n){return te.some(l=>l.value===n)}function J(n){return W.some(l=>l.value===n)}function X(n){return ae.some(l=>l.value===n)}function $(n){return F.some(l=>l.value===n)}function Q(n){return K.some(l=>l.value===n)}function Z(n){return z.some(l=>l.value===n)}function ee(n){return re.some(l=>l.value===n)}function Vt({open:n,onOpenChange:l,onClose:h}){const{settings:a,updateSettings:c}=rt(),{settings:u,updateSettings:b,status:w,testApiKey:se}=st(),[p,le]=o.useState("appearance"),[g,R]=o.useState(u.llmApiKey),[M,D]=o.useState(!1),[S,k]=o.useState(null),[ne,ie]=o.useState(()=>{if(typeof window>"u")return"16px";try{const e=localStorage.getItem("opencami-text-size");if(e&&q(e))return e}catch{}return"16px"}),[oe,ce]=o.useState(()=>{if(typeof window>"u")return!0;try{const e=localStorage.getItem("opencami-tts-enabled");return e===null?!0:e==="true"}catch{return!0}}),[_,de]=o.useState(()=>{if(typeof window>"u")return"auto";try{return localStorage.getItem("opencami-tts-provider")||"auto"}catch{return"auto"}}),[ue,me]=o.useState(()=>{if(typeof window>"u")return"nova";try{return localStorage.getItem("opencami-tts-voice")||"nova"}catch{return"nova"}}),[he,pe]=o.useState(()=>{if(typeof window>"u")return"auto";try{return localStorage.getItem("opencami-stt-provider")||"auto"}catch{return"auto"}});o.useEffect(()=>{if(!(typeof window>"u"))try{const e=localStorage.getItem("opencami-font-family");e&&J(e)?(I(e),a.fontFamily!==e&&c({fontFamily:e})):I(a.fontFamily);const r=localStorage.getItem("opencami-density");r&&X(r)?(N(r),a.density!==r&&c({density:r})):N(a.density);const i=localStorage.getItem("opencami-accent-color");i&&$(i)?(P(i),a.accentColor!==i&&c({accentColor:i})):P(a.accentColor);const d=localStorage.getItem("opencami-chat-width");d&&Q(d)?(A(d),a.chatWidth!==d&&c({chatWidth:d})):A(a.chatWidth);const f=localStorage.getItem("opencami-sidebar-width");f&&Z(f)?(E(f),a.sidebarWidth!==f&&c({sidebarWidth:f})):E(a.sidebarWidth);const V=localStorage.getItem("opencami-bubble-style");V&&ee(V)?(T(V),a.bubbleStyle!==V&&c({bubbleStyle:V})):T(a.bubbleStyle)}catch{I(a.fontFamily),N(a.density),P(a.accentColor),A(a.chatWidth),E(a.sidebarWidth),T(a.bubbleStyle)}},[]),o.useEffect(()=>{I(a.fontFamily)},[a.fontFamily]),o.useEffect(()=>{N(a.density)},[a.density]),o.useEffect(()=>{P(a.accentColor)},[a.accentColor]),o.useEffect(()=>{A(a.chatWidth)},[a.chatWidth]),o.useEffect(()=>{E(a.sidebarWidth)},[a.sidebarWidth]),o.useEffect(()=>{T(a.bubbleStyle)},[a.bubbleStyle]);const fe=e=>{de(e);try{localStorage.setItem("opencami-tts-provider",e)}catch{}},xe=e=>{me(e);try{localStorage.setItem("opencami-tts-voice",e)}catch{}},be=e=>{pe(e);try{localStorage.setItem("opencami-stt-provider",e)}catch{}};function ge(e){typeof document>"u"||document.documentElement.style.setProperty("--opencami-text-size",e)}function I(e){if(typeof document>"u")return;const i=W.find(d=>d.value===e)?.cssValue??W[0].cssValue;document.documentElement.style.setProperty("--opencami-font-family",i)}function N(e){if(typeof document>"u")return;const r=document.documentElement;if(r.style.setProperty("--opencami-density",e),e==="compact"){r.style.setProperty("--opencami-msg-padding-y","0.25rem"),r.style.setProperty("--opencami-msg-gap","0.25rem"),r.style.setProperty("--opencami-user-bubble-py","0.4rem");return}if(e==="spacious"){r.style.setProperty("--opencami-msg-padding-y","1.25rem"),r.style.setProperty("--opencami-msg-gap","1rem"),r.style.setProperty("--opencami-user-bubble-py","1rem");return}r.style.setProperty("--opencami-msg-padding-y","0.75rem"),r.style.setProperty("--opencami-msg-gap","0.5rem"),r.style.setProperty("--opencami-user-bubble-py","0.625rem")}function P(e){if(typeof document>"u")return;const r=F.find(d=>d.value===e)??F[0],i=document.documentElement;i.style.setProperty("--opencami-accent",r.accent),i.style.setProperty("--opencami-accent-hover",r.hover),i.style.setProperty("--opencami-accent-light",r.light),i.style.setProperty("--opencami-accent-fg",r.fg)}function A(e){if(typeof document>"u")return;const r=K.find(i=>i.value===e)??K[2];document.documentElement.style.setProperty("--opencami-chat-width",r.cssValue)}function E(e){if(typeof document>"u")return;const r=z.find(i=>i.value===e)??z[1];document.documentElement.style.setProperty("--opencami-sidebar-width",r.cssValue)}function T(e){typeof document>"u"||document.documentElement.setAttribute("data-opencami-bubble-style",e)}const ye=e=>{if(q(e)){ie(e),ge(e);try{localStorage.setItem("opencami-text-size",e)}catch{}}},ve=e=>{if(J(e)){I(e),c({fontFamily:e});try{localStorage.setItem("opencami-font-family",e)}catch{}}},je=e=>{if(X(e)){N(e),c({density:e});try{localStorage.setItem("opencami-density",e)}catch{}}},we=e=>{if($(e)){P(e),c({accentColor:e});try{localStorage.setItem("opencami-accent-color",e)}catch{}}},Se=e=>{if(Q(e)){A(e),c({chatWidth:e});try{localStorage.setItem("opencami-chat-width",e)}catch{}}},Ce=e=>{if(Z(e)){E(e),c({sidebarWidth:e});try{localStorage.setItem("opencami-sidebar-width",e)}catch{}}},ke=e=>{if(ee(e)){T(e),c({bubbleStyle:e});try{localStorage.setItem("opencami-bubble-style",e)}catch{}}},Ie=e=>{ce(e);try{localStorage.setItem("opencami-tts-enabled",String(e))}catch{}window.dispatchEvent(new StorageEvent("storage",{key:"opencami-tts-enabled",newValue:String(e)}))},[U,Ne]=o.useState(!1),B=o.useRef(null),[Pe,Ae]=o.useState(()=>{if(typeof window>"u")return!0;try{const e=localStorage.getItem("opencami-personas-enabled");return e===null?!0:e==="true"}catch{return!0}});o.useEffect(()=>{let e=!0;async function r(){B.current?.abort();const i=new AbortController;B.current=i;try{const d=await fetch("/api/personas",{signal:i.signal});if(!d.ok)return;const f=await d.json();e&&f.ok&&Ne(f.available)}catch(d){if(d instanceof Error&&d.name==="AbortError")return}}return r(),()=>{e=!1,B.current?.abort()}},[]);const Ee=e=>{Ae(e);try{localStorage.setItem("opencami-personas-enabled",String(e))}catch{}window.dispatchEvent(new StorageEvent("storage",{key:"opencami-personas-enabled",newValue:String(e)}))},Te=async()=>{if(g.trim()){D(!0),k(null);try{const e=await se(g.trim());k(e),e.valid&&b({llmApiKey:g.trim()})}finally{D(!1)}}},Ve=()=>{b({llmApiKey:g.trim()}),k(null)},Oe=()=>{R(""),b({llmApiKey:""}),k(null)},Le=[{value:"system",label:"Auto",icon:Ge},{value:"light",label:"Light",icon:He},{value:"dark",label:"Dark",icon:qe},{value:"chameleon",label:"Cham",icon:Je},{value:"frost-light",label:"Ice",icon:Xe}];function We(e){if(typeof document>"u")return;const r=document.documentElement,i=window.matchMedia("(prefers-color-scheme: dark)");r.classList.remove("light","dark","system","chameleon","frost","frost-light","frost-dark"),r.style.colorScheme="",r.classList.add(e);const d=e==="frost-light",f=e==="frost-dark";(d||f)&&r.classList.add("frost"),f&&r.classList.add("dark"),e==="system"&&i.matches&&r.classList.add("dark"),d&&(r.classList.remove("dark"),r.style.colorScheme="light")}return t.jsx(Ze,{open:n,onOpenChange:l,children:t.jsx(et,{className:"w-[min(680px,92vw)] max-h-[85vh] overflow-y-auto",children:t.jsxs("div",{className:"p-3",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{children:[t.jsx(tt,{className:"mb-1",children:"Settings"}),t.jsx(at,{className:"hidden",children:"Configure OpenCami"})]}),t.jsx(G,{render:t.jsx(O,{size:"icon-sm",variant:"ghost",className:"text-primary-500 hover:bg-primary-100 hover:text-primary-700","aria-label":"Close",children:t.jsx(C,{icon:Ke,size:20,strokeWidth:1.5})})})]}),t.jsxs("div",{className:"mt-2 flex md:flex-row flex-col md:gap-3 gap-0 md:min-h-[400px]",children:[t.jsx("nav",{className:"hidden md:flex flex-col gap-0.5 min-w-[160px] border-r border-primary-200 pr-3",children:[{id:"connection",label:"Connection",icon:ze},{id:"appearance",label:"Appearance",icon:Be},{id:"chat",label:"Chat",icon:Re},{id:"workspace",label:"Workspace",icon:Me},{id:"personas",label:"Personas",icon:De},{id:"voice",label:"Voice",icon:_e},{id:"llm",label:"LLM Features",icon:Ue},{id:"about",label:"About",icon:Ye}].map(e=>t.jsxs("button",{onClick:()=>le(e.id),className:L("flex items-center gap-2 px-2.5 py-1.5 rounded-md text-sm text-left transition-colors",p===e.id?"text-primary-900 font-medium":"text-primary-600 hover:text-primary-900 hover:bg-primary-50"),style:p===e.id?{backgroundColor:"var(--opencami-accent-light)"}:void 0,children:[t.jsx(C,{icon:e.icon,size:16,strokeWidth:1.5}),e.label]},e.id))}),t.jsxs("div",{className:"flex-1 overflow-y-auto md:max-h-[calc(85vh-90px)] max-h-none",children:[t.jsx(x,{title:"Connection",tabId:"connection",activeTab:p,children:t.jsx(s,{inline:!0,label:"Status",children:t.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-green-600",children:[t.jsx("span",{className:"size-2 rounded-full bg-green-500"}),"Connected"]})})}),t.jsxs(x,{title:"Appearance",tabId:"appearance",activeTab:p,children:[t.jsx(s,{label:"Theme",children:t.jsx(y,{value:a.theme,onValueChange:e=>{const r=e;We(r),c({theme:r})},children:t.jsx(v,{variant:"default",className:"gap-1.5 flex-wrap *:data-[slot=tab-indicator]:duration-0",children:Le.map(e=>t.jsxs(j,{value:e.value,className:"text-[11px] px-1 py-0.5 gap-0.5",children:[e.icon&&t.jsx(C,{icon:e.icon,size:13,strokeWidth:1.5}),t.jsx("span",{children:e.label})]},e.value))})})}),t.jsx(s,{label:"Accent Color",children:t.jsx("div",{className:"flex gap-0.5 flex-wrap",children:F.map(e=>{const r=a.accentColor===e.value;return t.jsx("button",{type:"button",onClick:()=>we(e.value),className:L("flex items-center justify-center rounded-md p-1 transition-all duration-150",r?"scale-110":"hover:bg-primary-50 hover:scale-105"),children:t.jsx("span",{className:L("size-6 rounded-full transition-shadow duration-150",r?"ring-2 ring-offset-2":"border-2 border-primary-200"),style:{backgroundColor:e.accent,...r?{"--tw-ring-color":e.accent}:{}}})},e.value)})})}),t.jsx(s,{label:"Text Size",children:t.jsx(y,{value:ne,onValueChange:ye,children:t.jsx(v,{variant:"default",className:"gap-2 *:data-[slot=tab-indicator]:duration-0",children:te.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"tabular-nums text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Font",children:t.jsx(y,{value:a.fontFamily,onValueChange:ve,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:W.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",style:{fontFamily:e.cssValue},children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Density",children:t.jsx(y,{value:a.density,onValueChange:je,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:ae.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Bubbles",children:t.jsx(y,{value:a.bubbleStyle,onValueChange:ke,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:re.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Chat Width",children:t.jsx(y,{value:a.chatWidth,onValueChange:Se,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:K.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})}),t.jsx(s,{inline:!0,label:"Sidebar",children:t.jsx(y,{value:a.sidebarWidth,onValueChange:Ce,children:t.jsx(v,{variant:"default",className:"gap-1 *:data-[slot=tab-indicator]:duration-0",children:z.map(e=>t.jsx(j,{value:e.value,children:t.jsx("span",{className:"text-xs",children:e.label})},e.value))})})})]}),t.jsxs(x,{title:"Chat",tabId:"chat",activeTab:p,children:[t.jsx(s,{inline:!0,label:"Show tool messages",children:t.jsx(m,{checked:a.showToolMessages,onCheckedChange:e=>c({showToolMessages:e})})}),t.jsx(s,{inline:!0,label:"Show reasoning blocks",children:t.jsx(m,{checked:a.showReasoningBlocks,onCheckedChange:e=>c({showReasoningBlocks:e})})}),t.jsx(s,{inline:!0,label:"Show search sources",children:t.jsx(m,{checked:a.showSearchSources,onCheckedChange:e=>c({showSearchSources:e})})}),t.jsx(s,{inline:!0,label:"Inline File Preview",description:"Make file paths in messages clickable to preview file contents",children:t.jsx(m,{checked:a.inlineFilePreview,onCheckedChange:e=>c({inlineFilePreview:e})})})]}),t.jsxs(x,{title:"Workspace",tabId:"workspace",activeTab:p,children:[t.jsx(s,{inline:!0,label:"File Explorer",description:"Browse and edit workspace files from the sidebar",children:t.jsx(m,{checked:(()=>{try{const e=localStorage.getItem("opencami-file-explorer");return e===null?!0:e==="true"}catch{return!0}})(),onCheckedChange:e=>{localStorage.setItem("opencami-file-explorer",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Memory Viewer",description:"Browse and edit MEMORY.md and daily memory files",children:t.jsx(m,{checked:(()=>{try{const e=localStorage.getItem("opencami-memory-viewer");return e===null?!0:e==="true"}catch{return!0}})(),onCheckedChange:e=>{localStorage.setItem("opencami-memory-viewer",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Agent Manager (Beta)",description:"Show Agent Manager in sidebar for creating and managing agents",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-agent-manager")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-agent-manager",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Skills Browser (Beta)",description:"Browse and install skills from ClawHub",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-skills-browser")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-skills-browser",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Cron Jobs Panel (Beta)",description:"Show Cron Jobs in sidebar for managing OpenClaw cron schedules",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("opencami-cron-manager")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("opencami-cron-manager",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Dashboard (Beta)",description:"Show Dashboard in sidebar with system and gateway widgets",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("feature_dashboard")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("feature_dashboard",String(e)),window.location.reload()}})}),t.jsx(s,{inline:!0,label:"Artifacts Preview (Beta)",description:"Show live HTML/SVG preview panel when AI generates code",children:t.jsx(m,{checked:(()=>{try{return localStorage.getItem("feature_artifacts")==="true"}catch{return!1}})(),onCheckedChange:e=>{localStorage.setItem("feature_artifacts",String(e)),nt.getState().setEnabled(e)}})})]}),t.jsxs(x,{title:"Personas",tabId:"personas",activeTab:p,children:[U?t.jsx(s,{inline:!0,label:"Persona Picker",description:"Show persona picker in chat (20 personalities)",children:t.jsx(m,{checked:Pe,onCheckedChange:Ee})}):t.jsx(s,{inline:!0,label:"Persona Picker",description:"Install the Personas skill to unlock 20 AI personalities",children:t.jsx(m,{checked:!1,disabled:!0})}),!U&&t.jsx("div",{className:"pt-1",children:t.jsx("a",{href:"https://www.clawhub.ai/robbyczgw-cla/personas",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary-600 hover:text-primary-900 hover:underline",children:"Get it on ClawHub →"})})]}),t.jsxs(x,{title:"Text-to-Speech",tabId:"voice",activeTab:p,children:[t.jsx(s,{inline:!0,label:"Voice Playback",description:"Add a 🔊 button to AI messages for text-to-speech",children:t.jsx(m,{checked:oe,onCheckedChange:Ie})}),t.jsx(s,{inline:!0,label:"TTS Provider",description:"Choose which service generates speech",children:t.jsxs("select",{value:_,onChange:e=>fe(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"auto",children:"Auto"}),t.jsx("option",{value:"elevenlabs",children:"ElevenLabs"}),t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"edge",children:"Edge TTS (free)"})]})}),_==="openai"&&t.jsx(s,{inline:!0,label:"Voice",description:"OpenAI voice selection",children:t.jsx("select",{value:ue,onChange:e=>xe(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:["alloy","echo","fable","onyx","nova","shimmer"].map(e=>t.jsx("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})})]}),t.jsx(x,{title:"Speech-to-Text",tabId:"voice",activeTab:p,children:t.jsx(s,{inline:!0,label:"STT Provider",description:"Choose which service transcribes your voice",children:t.jsxs("select",{value:he,onChange:e=>be(e.target.value),className:"rounded-md border border-primary-200 bg-surface px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"auto",children:"Auto"}),t.jsx("option",{value:"elevenlabs",children:"ElevenLabs"}),t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"browser",children:"Browser (free)"})]})})}),t.jsxs(x,{title:"LLM Features",tabId:"llm",activeTab:p,children:[t.jsxs("div",{className:"text-xs text-primary-500 mb-3",children:["Enhance session titles and follow-up suggestions using an LLM provider.",w.hasEnvKey&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has OPENAI_API_KEY configured"}),w.hasOpenRouterKey&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has OPENROUTER_API_KEY configured"}),w.hasKilocodeKey&&t.jsx("span",{className:"block mt-1 text-green-600",children:"✓ Server has KILOCODE_API_KEY configured"})]}),t.jsx(s,{inline:!0,label:"Provider",description:"Choose LLM provider for titles & follow-ups",children:t.jsxs("select",{value:u.llmProvider,onChange:e=>{const r=e.target.value;b({llmProvider:r,llmBaseUrl:"",llmModel:""})},className:"px-2 py-1 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500",children:[t.jsx("option",{value:"openai",children:"OpenAI"}),t.jsx("option",{value:"openrouter",children:"OpenRouter"}),t.jsx("option",{value:"kilocode",children:"Kilo Gateway"}),t.jsx("option",{value:"ollama",children:"Ollama (local)"}),t.jsx("option",{value:"custom",children:"Custom"})]})}),t.jsx(s,{inline:!0,label:"Smart session titles",description:"Generate concise titles using AI",children:t.jsx(m,{checked:u.useLlmTitles,onCheckedChange:e=>b({useLlmTitles:e}),disabled:!w.isAvailable})}),t.jsx(s,{inline:!0,label:"Smart follow-up suggestions",description:"AI-generated contextual follow-ups",children:t.jsx(m,{checked:u.useLlmFollowUps,onCheckedChange:e=>b({useLlmFollowUps:e}),disabled:!w.isAvailable})}),t.jsxs("div",{className:"mt-2 space-y-2",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-primary-500 mb-1",children:"Model"}),t.jsx("input",{type:"text",value:u.llmModel,onChange:e=>b({llmModel:e.target.value}),placeholder:H(u.llmProvider).model||"model-name",className:"w-full px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"})]}),(u.llmProvider==="custom"||u.llmProvider==="ollama")&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-primary-500 mb-1",children:"Base URL"}),t.jsx("input",{type:"text",value:u.llmBaseUrl,onChange:e=>b({llmBaseUrl:e.target.value}),placeholder:H(u.llmProvider).baseUrl||"https://...",className:"w-full px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"})]})]}),t.jsxs("div",{className:"mt-4 pt-3 border-t border-primary-100",children:[t.jsx("div",{className:"text-sm text-primary-800 mb-2",children:u.llmProvider==="ollama"?"API Key (optional)":"API Key"}),t.jsx("div",{className:"text-xs text-primary-500 mb-2",children:u.llmProvider==="ollama"?"Not required for local Ollama":w.hasEnvKey&&u.llmProvider==="openai"?"Optional: Override server key with your own":`Required for ${u.llmProvider==="openrouter"?"OpenRouter":u.llmProvider==="kilocode"?"Kilo Gateway":"LLM features"} (stored locally)`}),t.jsxs("div",{className:"text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded-md px-2 py-1.5 mb-2",children:["⚠️ ",t.jsx("strong",{children:"Security Note:"})," API keys are stored in your browser's localStorage. This is convenient but not secure for shared computers. For production use, configure keys server-side via environment variables (OPENAI_API_KEY, OPENROUTER_API_KEY, KILOCODE_API_KEY)."]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("input",{type:"password",value:g,onChange:e=>{R(e.target.value),k(null)},placeholder:"sk-...",className:"flex-1 px-3 py-1.5 text-sm rounded-md border border-primary-200 bg-surface focus:outline-none focus:ring-2 focus:ring-primary-500"}),t.jsx(O,{size:"sm",variant:"outline",onClick:Te,disabled:!g.trim()||M,className:"min-w-[60px]",children:M?t.jsx(C,{icon:$e,size:16,className:"animate-spin"}):"Test"})]}),S&&t.jsxs("div",{className:`mt-2 flex items-center gap-1.5 text-xs ${S.valid?"text-green-600":"text-red-600"}`,children:[t.jsx(C,{icon:S.valid?Y:Qe,size:14}),S.valid?"API key is valid":S.error||"Invalid API key"]}),u.llmApiKey&&t.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-green-600 flex items-center gap-1",children:[t.jsx(C,{icon:Y,size:14}),"Key saved"]}),t.jsx(O,{size:"sm",variant:"ghost",onClick:Oe,className:"text-xs text-red-600 hover:text-red-700 hover:bg-red-50",children:"Clear"})]}),g&&g!==u.llmApiKey&&!S?.valid&&t.jsx(O,{size:"sm",variant:"outline",onClick:Ve,className:"mt-2 w-full",children:"Save without testing"})]})]}),t.jsxs(x,{title:"About",tabId:"about",activeTab:p,children:[t.jsx("div",{className:"text-sm text-primary-800",children:"OpenCami"}),t.jsxs("div",{className:"flex gap-4 pt-2",children:[t.jsx("a",{href:"https://github.com/robbyczgw-cla/opencami",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary-600 hover:text-primary-900 hover:underline",children:"GitHub"}),t.jsx("a",{href:"https://docs.openclaw.ai",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary-600 hover:text-primary-900 hover:underline",children:"OpenClaw docs"})]})]})]})]}),t.jsx("div",{className:"mt-2 flex justify-end",children:t.jsx(G,{onClick:h,children:"Close"})})]})})})}export{Vt as SettingsDialog};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/skills-panel-B7BRAofP.js","assets/main-ZBMVSJTF.js","assets/button-DqP4GZwZ.js","assets/tabs-eiBvL0H7.js","assets/useControlled-CpliTEve.js","assets/useBaseUiId-DLhdkHJl.js","assets/useCompositeItem-DTSTTR0Z.js","assets/DirectionContext-CQMv7g2N.js","assets/event-2_Dxdv7h.js","assets/composite-BLgu_EOL.js","assets/CSPContext-TfUptlEu.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r as t,_ as r}from"./main-ZBMVSJTF.js";const l=t.lazy(()=>r(()=>import("./skills-panel-B7BRAofP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(s=>({default:s.SkillsPanel})));function a(){return e.jsx(t.Suspense,{fallback:e.jsx("div",{className:"flex h-screen items-center justify-center text-primary-500 text-sm",children:"Loading…"}),children:e.jsx(l,{})})}export{a as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,j as e,L as H}from"./main-
|
|
1
|
+
import{r as o,j as e,L as H}from"./main-ZBMVSJTF.js";import{H as m,r as W,h as f,d as D,D as A,y as E,J as I,e as R,A as _,B as J,i as F}from"./button-DqP4GZwZ.js";import{T as K,a as Q,b as k}from"./tabs-eiBvL0H7.js";import"./useControlled-CpliTEve.js";import"./useBaseUiId-DLhdkHJl.js";import"./useCompositeItem-DTSTTR0Z.js";import"./DirectionContext-CQMv7g2N.js";import"./event-2_Dxdv7h.js";import"./composite-BLgu_EOL.js";import"./CSPContext-TfUptlEu.js";async function v(s){const n=await fetch(s);if(!n.ok)throw new Error(`HTTP ${n.status}`);const r=await n.json();if(!r.ok)throw new Error(r.error||"Unknown error");return r.skills}function b(){const[s,n]=o.useState([]),[r,l]=o.useState(!0),[c,a]=o.useState(null),i=o.useCallback(async()=>{l(!0),a(null);try{const t=await v("/api/skills?action=installed");n(t)}catch(t){a(t instanceof Error?t.message:String(t))}finally{l(!1)}},[]);return o.useEffect(()=>{i()},[i]),{skills:s,loading:r,error:c,refresh:i}}function Z(s,n){const[r,l]=o.useState([]),[c,a]=o.useState(!0),[i,t]=o.useState(null);return o.useEffect(()=>{let x=!1;return a(!0),t(null),v(`/api/skills?action=explore&sort=${s}&limit=${n}`).then(d=>{x||l(d)}).catch(d=>{x||t(d instanceof Error?d.message:String(d))}).finally(()=>{x||a(!1)}),()=>{x=!0}},[s,n]),{skills:r,loading:c,error:i}}function q(s){const[n,r]=o.useState([]),[l,c]=o.useState(!1),[a,i]=o.useState(null),t=o.useRef(null);return o.useEffect(()=>{if(t.current&&clearTimeout(t.current),!s.trim()){r([]),c(!1);return}return c(!0),t.current=setTimeout(()=>{v(`/api/skills?action=search&q=${encodeURIComponent(s)}&limit=10`).then(r).catch(x=>i(x instanceof Error?x.message:String(x))).finally(()=>c(!1))},400),()=>{t.current&&clearTimeout(t.current)}},[s]),{skills:n,loading:l,error:a}}function V(){const[s,n]=o.useState([]),[r,l]=o.useState(!0),[c,a]=o.useState(null),i=o.useCallback(async()=>{l(!0),a(null);try{const t=await v("/api/skills?action=my-skills");n(t)}catch(t){a(t instanceof Error?t.message:String(t))}finally{l(!1)}},[]);return o.useEffect(()=>{i()},[i]),{skills:s,loading:r,error:c,refresh:i}}function G(){const[s,n]=o.useState([]),[r,l]=o.useState(!0),[c,a]=o.useState(null),i=o.useCallback(async()=>{l(!0),a(null);try{const t=await v("/api/skills?action=recommended");n(t)}catch(t){a(t instanceof Error?t.message:String(t))}finally{l(!1)}},[]);return o.useEffect(()=>{i()},[i]),{skills:s,loading:r,error:c,refresh:i}}function M(){const[s,n]=o.useState(null),[r,l]=o.useState(null);return{install:o.useCallback(async a=>{n(a),l(null);try{const t=await(await fetch("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"install",slug:a})})).json();if(!t.ok)throw new Error(t.error||"Install failed")}catch(i){throw l(i instanceof Error?i.message:String(i)),i}finally{n(null)}},[]),installing:s,error:r}}function X(){const[s,n]=o.useState(null),[r,l]=o.useState(null);return{update:o.useCallback(async a=>{n(a),l(null);try{const t=await(await fetch("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update",slug:a})})).json();if(!t.ok)throw new Error(t.error||"Update failed")}catch(i){throw l(i instanceof Error?i.message:String(i)),i}finally{n(null)}},[]),updating:s,error:r}}const Y=new Set(["openclaw","clawhub","anthropic","robbyczgw-cla"]),ee=100;function U(s,n){if(n)return{type:"installed",label:"Installed"};const r=s.publisher||s.author||"",l=s.stats?.downloads||0;return Y.has(r.toLowerCase())||l>=ee?{type:"verified",label:"Verified"}:{type:"community",label:"Community"}}function $({type:s,label:n}){const r={verified:"bg-emerald-50 text-emerald-600 border-emerald-100",community:"bg-primary-50 text-primary-500 border-primary-100",installed:"bg-sky-50 text-sky-600 border-sky-100"};return e.jsxs("span",{className:`inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full border ${r[s]}`,title:`${n} Skill`,children:[e.jsx(m,{icon:s==="installed"?I:F,size:10,strokeWidth:2}),n]})}function B({skill:s,installed:n,installing:r,onInstall:l,onUpdate:c,updating:a,showUpdate:i,onClick:t}){const x=s.slug||"",d=s.displayName||x,p=s.summary,h=s.version||s.latestVersion?.version||"",y=s.stats?.downloads,j=U(s,n);return e.jsxs("div",{className:`
|
|
2
2
|
group rounded-lg border border-primary-100 bg-surface p-4
|
|
3
3
|
transition-all duration-150 ease-out
|
|
4
4
|
${t?"cursor-pointer hover:border-primary-200 hover:shadow-sm":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--font-mono:"JetBrains Mono", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-600:oklch(66.6% .179 58.318);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-600:oklch(54.1% .281 293.009);--color-zinc-800:oklch(27.4% .006 286.033);--color-neutral-50:oklch(98.5% 0 0);--color-neutral-100:oklch(97% 0 0);--color-neutral-300:oklch(87% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-500:oklch(55.6% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-neutral-900:oklch(20.5% 0 0);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-surface:var(--color-white);--color-ink:var(--color-black);--color-primary-50:oklch(99.2% .002 80);--color-primary-100:oklch(98.21% 0 89.88);--color-primary-200:oklch(94.61% 0 89.88);--color-primary-300:oklch(95% .004 80);--color-primary-400:oklch(87.5% .005 80);--color-primary-500:oklch(78.5% .006 80);--color-primary-600:oklch(67% .007 80);--color-primary-700:oklch(56% .006 80);--color-primary-800:oklch(45% .005 80);--color-primary-900:oklch(35% .004 80);--color-primary-950:oklch(25% .003 80)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-2{inset:calc(var(--spacing) * 2)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-1{top:calc(var(--spacing) * -1)}.-top-1\.5{top:calc(var(--spacing) * -1.5)}.top-1\/2{top:50%}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-1\.5{right:calc(var(--spacing) * -1.5)}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-10{right:calc(var(--spacing) * 10)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-10{bottom:calc(var(--spacing) * 10)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.my-3{margin-block:calc(var(--spacing) * 3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-4{margin-bottom:calc(var(--spacing) * -4)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.-ml-1\.5{margin-left:calc(var(--spacing) * -1.5)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-square{aspect-ratio:1}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.h-\(--active-tab-height\){height:var(--active-tab-height)}.h-\(--collapsible-panel-height\){height:var(--collapsible-panel-height)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-\[calc\(100vh-48px\)\]{height:calc(100vh - 48px)}.h-\[calc\(var\(--thumb-size\)\+2px\)\]{height:calc(var(--thumb-size) + 2px)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-44{max-height:calc(var(--spacing) * 44)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[88vh\]{max-height:88vh}.max-h-\[300px\]{max-height:300px}.max-h-\[360px\]{max-height:360px}.max-h-\[calc\(88vh-72px\)\]{max-height:calc(88vh - 72px)}.max-h-none{max-height:none}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-\[28px\]{min-height:28px}.min-h-\[36px\]{min-height:36px}.min-h-\[60vh\]{min-height:60vh}.min-h-\[340px\]{min-height:340px}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-\(--active-tab-width\){width:var(--active-tab-width)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-32{width:calc(var(--spacing) * 32)}.w-\[300px\]{width:300px}.w-\[calc\(var\(--thumb-size\)\*2-2px\)\]{width:calc(var(--thumb-size) * 2 - 2px)}.w-\[min\(380px\,90vw\)\]{width:min(380px,90vw)}.w-\[min\(400px\,92vw\)\]{width:min(400px,92vw)}.w-\[min\(420px\,90vw\)\]{width:min(420px,90vw)}.w-\[min\(500px\,92vw\)\]{width:min(500px,92vw)}.w-\[min\(600px\,92vw\)\]{width:min(600px,92vw)}.w-\[min\(680px\,92vw\)\]{width:min(680px,92vw)}.w-\[min\(1000px\,95vw\)\]{width:min(1000px,95vw)}.w-\[var\(--opencami-sidebar-width\)\]{width:var(--opencami-sidebar-width)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[85\%\]{max-width:85%}.max-w-\[140px\]{max-width:140px}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[300px\]{max-width:300px}.max-w-\[var\(--opencami-chat-width\)\]{max-width:var(--opencami-chat-width)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-\[60px\]{min-width:60px}.min-w-\[80px\]{min-width:80px}.min-w-\[90px\]{min-width:90px}.min-w-\[110px\]{min-width:110px}.min-w-\[140px\]{min-width:140px}.min-w-\[160px\]{min-width:160px}.min-w-\[180px\]{min-width:180px}.min-w-\[190px\]{min-width:190px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.origin-left{transform-origin:0}.origin-top-right{transform-origin:100% 0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\(--active-tab-left\){--tw-translate-x:var(--active-tab-left);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-\(--active-tab-bottom\){--tw-translate-y:calc(var(--active-tab-bottom) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-4{--tw-translate-y:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-98{--tw-scale-x:98%;--tw-scale-y:98%;--tw-scale-z:98%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[shimmer_2s_infinite_linear\]{animation:2s linear infinite shimmer}.animate-\[shimmer_4s_infinite_linear\]{animation:4s linear infinite shimmer}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.cursor-wait{cursor:wait}.touch-manipulation{touch-action:manipulation}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.scroll-mt-0{scroll-margin-top:calc(var(--spacing) * 0)}.scroll-mt-4{scroll-margin-top:calc(var(--spacing) * 4)}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_1fr_auto_auto\]{grid-template-columns:auto 1fr auto auto}.grid-cols-\[auto_minmax\(0\,1fr\)\]{grid-template-columns:auto minmax(0,1fr)}.flex-col{flex-direction:column}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[var\(--opencami-msg-gap\)\]{gap:var(--opencami-msg-gap)}.gap-px{gap:1px}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 10) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 10) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-0\.5{column-gap:calc(var(--spacing) * .5)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-primary-100>:not(:last-child)){border-color:var(--color-primary-100)}:where(.divide-primary-200>:not(:last-child)){border-color:var(--color-primary-200)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\(--thumb-size\){border-radius:var(--thumb-size)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[12px\]{border-radius:12px}.rounded-\[20px\]{border-radius:20px}.rounded-\[22px\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-amber-100{border-color:var(--color-amber-100)}.border-amber-200{border-color:var(--color-amber-200)}.border-current{border-color:currentColor}.border-cyan-500\/10{border-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/10{border-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500) 30%,transparent)}}.border-emerald-100{border-color:var(--color-emerald-100)}.border-primary-50{border-color:var(--color-primary-50)}.border-primary-100{border-color:var(--color-primary-100)}.border-primary-200{border-color:var(--color-primary-200)}.border-primary-200\/70{border-color:#edededb3}@supports (color:color-mix(in lab,red,red)){.border-primary-200\/70{border-color:color-mix(in oklab,var(--color-primary-200) 70%,transparent)}}.border-primary-200\/80{border-color:#edededcc}@supports (color:color-mix(in lab,red,red)){.border-primary-200\/80{border-color:color-mix(in oklab,var(--color-primary-200) 80%,transparent)}}.border-primary-300{border-color:var(--color-primary-300)}.border-primary-400{border-color:var(--color-primary-400)}.border-primary-700{border-color:var(--color-primary-700)}.border-primary-900{border-color:var(--color-primary-900)}.border-red-100{border-color:var(--color-red-100)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-300\/40{border-color:#ffa3a366}@supports (color:color-mix(in lab,red,red)){.border-red-300\/40{border-color:color-mix(in oklab,var(--color-red-300) 40%,transparent)}}.border-sky-100{border-color:var(--color-sky-100)}.border-transparent{border-color:#0000}.border-violet-100{border-color:var(--color-violet-100)}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-t-transparent{border-top-color:#0000}.bg-\[var\(--opencami-accent\)\]{background-color:var(--opencami-accent)}.bg-\[var\(--opencami-accent-light\)\]{background-color:var(--opencami-accent-light)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-cyan-500\/5{background-color:#00b7d70d}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/5{background-color:color-mix(in oklab,var(--color-cyan-500) 5%,transparent)}}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-cyan-500\/20{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/20{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-ink\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-ink\/40{background-color:color-mix(in oklab,var(--color-ink) 40%,transparent)}}.bg-neutral-50{background-color:var(--color-neutral-50)}.bg-neutral-800{background-color:var(--color-neutral-800)}.bg-neutral-900\/95{background-color:#171717f2}@supports (color:color-mix(in lab,red,red)){.bg-neutral-900\/95{background-color:color-mix(in oklab,var(--color-neutral-900) 95%,transparent)}}.bg-primary-50{background-color:var(--color-primary-50)}.bg-primary-50\/50{background-color:#fdfcfb80}@supports (color:color-mix(in lab,red,red)){.bg-primary-50\/50{background-color:color-mix(in oklab,var(--color-primary-50) 50%,transparent)}}.bg-primary-50\/60{background-color:#fdfcfb99}@supports (color:color-mix(in lab,red,red)){.bg-primary-50\/60{background-color:color-mix(in oklab,var(--color-primary-50) 60%,transparent)}}.bg-primary-50\/90{background-color:#fdfcfbe6}@supports (color:color-mix(in lab,red,red)){.bg-primary-50\/90{background-color:color-mix(in oklab,var(--color-primary-50) 90%,transparent)}}.bg-primary-100{background-color:var(--color-primary-100)}.bg-primary-100\/70{background-color:#f9f9f9b3}@supports (color:color-mix(in lab,red,red)){.bg-primary-100\/70{background-color:color-mix(in oklab,var(--color-primary-100) 70%,transparent)}}.bg-primary-200{background-color:var(--color-primary-200)}.bg-primary-400{background-color:var(--color-primary-400)}.bg-primary-500{background-color:var(--color-primary-500)}.bg-primary-600{background-color:var(--color-primary-600)}.bg-primary-700{background-color:var(--color-primary-700)}.bg-primary-950{background-color:var(--color-primary-950)}.bg-primary-950\/20{background-color:#22212033}@supports (color:color-mix(in lab,red,red)){.bg-primary-950\/20{background-color:color-mix(in oklab,var(--color-primary-950) 20%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-surface{background-color:var(--color-surface)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-white{background-color:var(--color-white)}.bg-yellow-200{background-color:var(--color-yellow-200)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-size-\[200\%_auto\]{background-size:200%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-px{padding:1px}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-\[var\(--opencami-msg-padding-y\)\]{padding-block:var(--opencami-msg-padding-y)}.py-\[var\(--opencami-user-bubble-py\)\]{padding-block:var(--opencami-user-bubble-py)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-0\.5{padding-right:calc(var(--spacing) * .5)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-\[18px\]{padding-left:18px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-\[\"Inter\"\,sans-serif\]{font-family:Inter,sans-serif}.font-\[\"Roboto\"\,sans-serif\]{font-family:Roboto,sans-serif}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-\[450\]{--tw-font-weight:450;font-weight:450}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-balance{text-wrap:balance}.text-pretty{text-wrap:pretty}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[var\(--opencami-accent\)\]{color:var(--opencami-accent)}.text-\[var\(--opencami-accent-fg\)\]{color:var(--opencami-accent-fg)}.text-amber-400{color:var(--color-amber-400)}.text-amber-600{color:var(--color-amber-600)}.text-blue-500{color:var(--color-blue-500)}.text-blue-700{color:var(--color-blue-700)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-cyan-500\/70{color:#00b7d7b3}@supports (color:color-mix(in lab,red,red)){.text-cyan-500\/70{color:color-mix(in oklab,var(--color-cyan-500) 70%,transparent)}}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-green-600{color:var(--color-green-600)}.text-green-600\/80{color:#00a544cc}@supports (color:color-mix(in lab,red,red)){.text-green-600\/80{color:color-mix(in oklab,var(--color-green-600) 80%,transparent)}}.text-green-700{color:var(--color-green-700)}.text-primary-50{color:var(--color-primary-50)}.text-primary-100{color:var(--color-primary-100)}.text-primary-300{color:var(--color-primary-300)}.text-primary-400{color:var(--color-primary-400)}.text-primary-500{color:var(--color-primary-500)}.text-primary-500\/70{color:#bbb9b5b3}@supports (color:color-mix(in lab,red,red)){.text-primary-500\/70{color:color-mix(in oklab,var(--color-primary-500) 70%,transparent)}}.text-primary-500\/75{color:#bbb9b5bf}@supports (color:color-mix(in lab,red,red)){.text-primary-500\/75{color:color-mix(in oklab,var(--color-primary-500) 75%,transparent)}}.text-primary-500\/80{color:#bbb9b5cc}@supports (color:color-mix(in lab,red,red)){.text-primary-500\/80{color:color-mix(in oklab,var(--color-primary-500) 80%,transparent)}}.text-primary-600{color:var(--color-primary-600)}.text-primary-600\/80{color:#979590cc}@supports (color:color-mix(in lab,red,red)){.text-primary-600\/80{color:color-mix(in oklab,var(--color-primary-600) 80%,transparent)}}.text-primary-700{color:var(--color-primary-700)}.text-primary-700\/80{color:#767471cc}@supports (color:color-mix(in lab,red,red)){.text-primary-700\/80{color:color-mix(in oklab,var(--color-primary-700) 80%,transparent)}}.text-primary-800{color:var(--color-primary-800)}.text-primary-900{color:var(--color-primary-900)}.text-primary-950{color:var(--color-primary-950)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-600\/80{color:#e40014cc}@supports (color:color-mix(in lab,red,red)){.text-red-600\/80{color:color-mix(in oklab,var(--color-red-600) 80%,transparent)}}.text-red-700{color:var(--color-red-700)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-transparent{color:#0000}.text-violet-600{color:var(--color-violet-600)}.text-white{color:var(--color-white)}.text-yellow-600{color:var(--color-yellow-600)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.decoration-\[var\(--opencami-accent-light\)\]{-webkit-text-decoration-color:var(--opencami-accent-light);text-decoration-color:var(--opencami-accent-light)}.decoration-primary-300{-webkit-text-decoration-color:var(--color-primary-300);text-decoration-color:var(--color-primary-300)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow-sm\/5{--tw-shadow-alpha:5%;--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,oklab(0% 0 0/.05)), 0 1px 2px -1px var(--tw-shadow-color,oklab(0% 0 0/.05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0px_12px_32px_0px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:0px 12px 32px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-surface{--tw-ring-color:var(--color-surface)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-ink\/10{outline-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.outline-ink\/10{outline-color:color-mix(in oklab,var(--color-ink) 10%,transparent)}}.outline-primary-900\/10{outline-color:#3c3a381a}@supports (color:color-mix(in lab,red,red)){.outline-primary-900\/10{outline-color:color-mix(in oklab,var(--color-primary-900) 10%,transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,box-shadow\]{transition-property:background-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,background-color\,box-shadow\]{transition-property:color,background-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,translate\]{transition-property:width,translate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--thumb-size\:--spacing\(5\)\]{--thumb-size:calc(var(--spacing) * 5)}.\[transition\:translate_\.15s\,border-radius_\.15s\,scale_\.1s_\.1s\,transform-origin_\.15s\]{transition:translate .15s,border-radius .15s,scale .1s .1s,transform-origin .15s}.group-focus-within\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:h-2:is(:where(.group):hover *){height:calc(var(--spacing) * 2)}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:scale-100:is(:where(.group):hover *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:text-primary-600:is(:where(.group):hover *){color:var(--color-primary-600)}.group-hover\:text-primary-700:is(:where(.group):hover *){color:var(--color-primary-700)}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/scroll-area\:opacity-100:is(:where(.group\/scroll-area):hover *){opacity:1}}.group-data-panel-open\:rotate-90:is(:where(.group)[data-panel-open] *){rotate:90deg}.group-data-panel-open\:rotate-180:is(:where(.group)[data-panel-open] *){rotate:180deg}.marker\:text-primary-400 ::marker{color:var(--color-primary-400)}.marker\:text-primary-400::marker{color:var(--color-primary-400)}.marker\:text-primary-400 ::-webkit-details-marker{color:var(--color-primary-400)}.marker\:text-primary-400::-webkit-details-marker{color:var(--color-primary-400)}.marker\:text-primary-500 ::marker{color:var(--color-primary-500)}.marker\:text-primary-500::marker{color:var(--color-primary-500)}.marker\:text-primary-500 ::-webkit-details-marker{color:var(--color-primary-500)}.marker\:text-primary-500::-webkit-details-marker{color:var(--color-primary-500)}.selection\:bg-blue-800\/50 ::selection{background-color:#193cb880}@supports (color:color-mix(in lab,red,red)){.selection\:bg-blue-800\/50 ::selection{background-color:color-mix(in oklab,var(--color-blue-800) 50%,transparent)}}.selection\:bg-blue-800\/50::selection{background-color:#193cb880}@supports (color:color-mix(in lab,red,red)){.selection\:bg-blue-800\/50::selection{background-color:color-mix(in oklab,var(--color-blue-800) 50%,transparent)}}.placeholder\:text-primary-300::placeholder{color:var(--color-primary-300)}.placeholder\:text-primary-400::placeholder{color:var(--color-primary-400)}.placeholder\:text-primary-500::placeholder{color:var(--color-primary-500)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media(hover:hover){.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-primary-100:hover{border-color:var(--color-primary-100)}.hover\:border-primary-200:hover{border-color:var(--color-primary-200)}.hover\:border-primary-300:hover{border-color:var(--color-primary-300)}.hover\:bg-\[var\(--opencami-accent-hover\)\]:hover{background-color:var(--opencami-accent-hover)}.hover\:bg-cyan-500\/5:hover{background-color:#00b7d70d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-cyan-500\/5:hover{background-color:color-mix(in oklab,var(--color-cyan-500) 5%,transparent)}}.hover\:bg-cyan-500\/20:hover{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.hover\:bg-cyan-500\/20:hover{background-color:color-mix(in oklab,var(--color-cyan-500) 20%,transparent)}}.hover\:bg-neutral-800\/80:hover{background-color:#262626cc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-neutral-800\/80:hover{background-color:color-mix(in oklab,var(--color-neutral-800) 80%,transparent)}}.hover\:bg-primary-50:hover{background-color:var(--color-primary-50)}.hover\:bg-primary-50\/50:hover{background-color:#fdfcfb80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary-50\/50:hover{background-color:color-mix(in oklab,var(--color-primary-50) 50%,transparent)}}.hover\:bg-primary-100:hover{background-color:var(--color-primary-100)}.hover\:bg-primary-200:hover{background-color:var(--color-primary-200)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-50\/80:hover{background-color:#fef2f2cc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-50\/80:hover{background-color:color-mix(in oklab,var(--color-red-50) 80%,transparent)}}.hover\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-primary-600:hover{color:var(--color-primary-600)}.hover\:text-primary-700:hover{color:var(--color-primary-700)}.hover\:text-primary-800:hover{color:var(--color-primary-800)}.hover\:text-primary-900:hover{color:var(--color-primary-900)}.hover\:text-primary-950:hover{color:var(--color-primary-950)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-primary-600:hover{-webkit-text-decoration-color:var(--color-primary-600);text-decoration-color:var(--color-primary-600)}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:border-primary-300:focus{border-color:var(--color-primary-300)}.focus\:border-primary-400:focus{border-color:var(--color-primary-400)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-primary-500:focus{--tw-ring-color:var(--color-primary-500)}.focus\:ring-primary-500\/20:focus{--tw-ring-color:#bbb9b533}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary-500\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-primary-500) 20%, transparent)}}.focus\:ring-offset-1:focus{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:rounded-lg:focus-visible{border-radius:var(--radius-lg)}.focus-visible\:bg-primary-50:focus-visible{background-color:var(--color-primary-50)}.focus-visible\:bg-primary-100:focus-visible{background-color:var(--color-primary-100)}.focus-visible\:text-primary-900:focus-visible{color:var(--color-primary-900)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[var\(--opencami-accent\)\]:focus-visible{--tw-ring-color:var(--opencami-accent)}.focus-visible\:ring-primary-300:focus-visible{--tw-ring-color:var(--color-primary-300)}.focus-visible\:ring-primary-950:focus-visible{--tw-ring-color:var(--color-primary-950)}.focus-visible\:ring-red-300:focus-visible{--tw-ring-color:var(--color-red-300)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover){.disabled\:hover\:border-primary-200:disabled:hover{border-color:var(--color-primary-200)}.disabled\:hover\:bg-primary-50:disabled:hover{background-color:var(--color-primary-50)}}:where(:is([role=switch]:active,[data-slot=label]:active)) .in-\[\[role\=switch\]\:active\,\[data-slot\=label\]\:active\]\:rounded-\[var\(--thumb-size\)\/calc\(var\(--thumb-size\)\*1\.1\)\]{border-radius:var(--thumb-size)/calc(var(--thumb-size) * 1.1)}:where(:is([role=switch]:active,[data-slot=label]:active)) .in-\[\[role\=switch\]\:active\,\[data-slot\=label\]\:active\]\:not-data-disabled\:scale-x-110:not([data-disabled]){--tw-scale-x:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.aria-expanded\:bg-primary-200[aria-expanded=true]{background-color:var(--color-primary-200)}.aria-expanded\:opacity-100[aria-expanded=true]{opacity:1}.data-active\:text-primary-900[data-active]{color:var(--color-primary-900)}.data-checked\:origin-\[var\(--thumb-size\)_50\%\][data-checked]{transform-origin:var(--thumb-size) 50%}.data-checked\:translate-x-\[calc\(var\(--thumb-size\)-4px\)\][data-checked]{--tw-translate-x:calc(var(--thumb-size) - 4px);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-checked\:bg-primary-900[data-checked]{background-color:var(--color-primary-900)}.data-disabled\:pointer-events-none[data-disabled]{pointer-events:none}.data-disabled\:opacity-64[data-disabled]{opacity:.64}.data-ending-style\:h-0[data-ending-style]{height:calc(var(--spacing) * 0)}.data-highlighted\:bg-primary-100[data-highlighted]{background-color:var(--color-primary-100)}.data-highlighted\:bg-red-50\/80[data-highlighted]{background-color:#fef2f2cc}@supports (color:color-mix(in lab,red,red)){.data-highlighted\:bg-red-50\/80[data-highlighted]{background-color:color-mix(in oklab,var(--color-red-50) 80%,transparent)}}.data-hovering\:opacity-100[data-hovering]{opacity:1}.data-panel-open\:text-primary-700[data-panel-open]{color:var(--color-primary-700)}.data-scrolling\:opacity-100[data-scrolling]{opacity:1}.data-starting-style\:h-0[data-starting-style]{height:calc(var(--spacing) * 0)}.data-unchecked\:bg-primary-200[data-unchecked]{background-color:var(--color-primary-200)}.data-\[orientation\=horizontal\]\:h-0\.5[data-orientation=horizontal]{height:calc(var(--spacing) * .5)}.data-\[orientation\=horizontal\]\:translate-y-px[data-orientation=horizontal]{--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[orientation\=horizontal\]\:py-1[data-orientation=horizontal]{padding-block:calc(var(--spacing) * 1)}.data-\[orientation\=vertical\]\:w-0\.5[data-orientation=vertical]{width:calc(var(--spacing) * .5)}.data-\[orientation\=vertical\]\:w-full[data-orientation=vertical]{width:100%}.data-\[orientation\=vertical\]\:-translate-x-px[data-orientation=vertical]{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[orientation\=vertical\]\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\[orientation\=vertical\]\:flex-row[data-orientation=vertical]{flex-direction:row}.data-\[orientation\=vertical\]\:justify-start[data-orientation=vertical]{justify-content:flex-start}.data-\[orientation\=vertical\]\:px-1[data-orientation=vertical]{padding-inline:calc(var(--spacing) * 1)}:is(.\*\:data-\[slot\=tab-indicator\]\:duration-0>*)[data-slot=tab-indicator]{--tw-duration:0s;transition-duration:0s}.data-\[state\=closed\]\:scale-95[data-state=closed]{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[state\=closed\]\:opacity-0[data-state=closed]{opacity:0}.data-\[state\=open\]\:scale-100[data-state=open]{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}@media(min-width:40rem){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:flex{display:flex}.sm\:max-w-\[768px\]{max-width:768px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:\[--thumb-size\:--spacing\(4\)\]{--thumb-size:calc(var(--spacing) * 4)}}@media(min-width:48rem){.md\:right-5{right:calc(var(--spacing) * 5)}.md\:left-5{left:calc(var(--spacing) * 5)}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:inline{display:inline}.md\:h-full{height:100%}.md\:max-h-\[calc\(85vh-90px\)\]{max-height:calc(85vh - 90px)}.md\:min-h-\[400px\]{min-height:400px}.md\:w-72{width:calc(var(--spacing) * 72)}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[18rem_1fr\]{grid-template-columns:18rem 1fr}.md\:flex-row{flex-direction:row}.md\:gap-3{gap:calc(var(--spacing) * 3)}:where(.md\:space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.md\:px-5{padding-inline:calc(var(--spacing) * 5)}.md\:pb-3{padding-bottom:calc(var(--spacing) * 3)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}.dark\:border-neutral-700:where(.dark,.dark *){border-color:var(--color-neutral-700)}.dark\:border-primary-700:where(.dark,.dark *){border-color:var(--color-primary-700)}.dark\:border-red-800:where(.dark,.dark *){border-color:var(--color-red-800)}.dark\:border-red-900\/40:where(.dark,.dark *){border-color:#82181a66}@supports (color:color-mix(in lab,red,red)){.dark\:border-red-900\/40:where(.dark,.dark *){border-color:color-mix(in oklab,var(--color-red-900) 40%,transparent)}}.dark\:bg-neutral-700:where(.dark,.dark *){background-color:var(--color-neutral-700)}.dark\:bg-neutral-800:where(.dark,.dark *){background-color:var(--color-neutral-800)}.dark\:bg-neutral-900:where(.dark,.dark *){background-color:var(--color-neutral-900)}.dark\:bg-primary-200:where(.dark,.dark *){background-color:var(--color-primary-200)}.dark\:bg-primary-700:where(.dark,.dark *){background-color:var(--color-primary-700)}.dark\:bg-red-900\/20:where(.dark,.dark *){background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/20:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-900) 20%,transparent)}}.dark\:bg-red-950\/40:where(.dark,.dark *){background-color:#46080966}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-950\/40:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-red-950) 40%,transparent)}}.dark\:bg-surface\/40:where(.dark,.dark *){background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.dark\:bg-surface\/40:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-surface) 40%,transparent)}}.dark\:bg-zinc-800:where(.dark,.dark *){background-color:var(--color-zinc-800)}.dark\:text-emerald-400:where(.dark,.dark *){color:var(--color-emerald-400)}.dark\:text-neutral-100:where(.dark,.dark *){color:var(--color-neutral-100)}.dark\:text-neutral-300:where(.dark,.dark *){color:var(--color-neutral-300)}.dark\:text-neutral-400:where(.dark,.dark *){color:var(--color-neutral-400)}.dark\:text-neutral-500:where(.dark,.dark *){color:var(--color-neutral-500)}.dark\:text-primary-400:where(.dark,.dark *){color:var(--color-primary-400)}.dark\:text-primary-500:where(.dark,.dark *){color:var(--color-primary-500)}.dark\:text-primary-600:where(.dark,.dark *){color:var(--color-primary-600)}.dark\:text-primary-700:where(.dark,.dark *){color:var(--color-primary-700)}.dark\:text-red-200:where(.dark,.dark *){color:var(--color-red-200)}.dark\:text-red-400:where(.dark,.dark *){color:var(--color-red-400)}.dark\:text-white:where(.dark,.dark *){color:var(--color-white)}.dark\:text-yellow-400:where(.dark,.dark *){color:var(--color-yellow-400)}@media(hover:hover){.dark\:hover\:bg-neutral-800:where(.dark,.dark *):hover{background-color:var(--color-neutral-800)}}.\[\&_\.line\]\:break-words .line{overflow-wrap:break-word}.\[\&_\.line\]\:whitespace-pre-wrap .line{white-space:pre-wrap}.\[\&_\.line\]\:before\:mr-4 .line:before{content:var(--tw-content);margin-right:calc(var(--spacing) * 4)}.\[\&_\.line\]\:before\:inline-block .line:before{content:var(--tw-content);display:inline-block}.\[\&_\.line\]\:before\:w-8 .line:before{content:var(--tw-content);width:calc(var(--spacing) * 8)}.\[\&_\.line\]\:before\:text-right .line:before{content:var(--tw-content);text-align:right}.\[\&_\.line\]\:before\:text-primary-500\/60 .line:before{content:var(--tw-content);color:#bbb9b599}@supports (color:color-mix(in lab,red,red)){.\[\&_\.line\]\:before\:text-primary-500\/60 .line:before{color:color-mix(in oklab,var(--color-primary-500) 60%,transparent)}}.\[\&_\.line\]\:before\:content-\[counter\(line\)\] .line:before{--tw-content:counter(line);content:var(--tw-content)}.\[\&_\.line\]\:before\:select-none .line:before{content:var(--tw-content);-webkit-user-select:none;user-select:none}.\[\&_\.line\]\:before\:\[counter-increment\:line\] .line:before{content:var(--tw-content);counter-increment:line}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:-mx-0\.5 svg{margin-inline:calc(var(--spacing) * -.5)}.\[\&_svg\]\:size-5 svg{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\"size-\"\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\:hover\:not\(\:has\(button\:hover\)\)\]\:bg-primary-200:hover:not(:has(button:hover)){background-color:var(--color-primary-200)}.\[\&\>pre\]\:w-full>pre{width:100%}.\[\&\>pre\]\:max-w-full>pre{max-width:100%}.\[\&\>pre\]\:min-w-0>pre{min-width:calc(var(--spacing) * 0)}.\[\&\>pre\]\:overflow-x-auto>pre{overflow-x:auto}.\[\&\>pre\]\:px-3>pre{padding-inline:calc(var(--spacing) * 3)}.\[\&\>pre\]\:py-3>pre{padding-block:calc(var(--spacing) * 3)}.\[\&\>pre\]\:break-words>pre{overflow-wrap:break-word}.\[\&\>pre\]\:whitespace-pre>pre{white-space:pre}.\[\&\>pre\]\:whitespace-pre-wrap>pre{white-space:pre-wrap}.\[\&\>pre\]\:\[counter-reset\:line\]>pre{counter-reset:line}.\[\&\[hidden\]\:not\(\[hidden\=\"until-found\"\]\)\]\:hidden[hidden]:not([hidden=until-found]){display:none}}.root{isolation:isolate}html{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.safe-area-top{padding-top:env(safe-area-inset-top)}:root{--opencami-text-size:16px;--opencami-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--opencami-density:comfortable;--opencami-msg-padding-y:.75rem;--opencami-msg-gap:.5rem;--opencami-user-bubble-py:.625rem;--opencami-accent:#22c55e;--opencami-accent-hover:#16a34a;--opencami-accent-light:#22c55e1a;--opencami-accent-fg:#fff;--opencami-chat-width:1000px;--opencami-sidebar-width:260px}.opencami-text-size{font-size:var(--opencami-text-size)}.dark{color-scheme:dark;--color-primary-50:oklch(15.5% 0 89.88);--color-primary-100:oklch(18.5% 0 89.88);--color-primary-200:oklch(26.5% 0 89.88);--color-primary-300:oklch(32% .004 80);--color-primary-400:oklch(40% .005 80);--color-primary-500:oklch(52% .005 80);--color-primary-600:oklch(63% .005 80);--color-primary-700:oklch(73% .005 80);--color-primary-800:oklch(82% .004 80);--color-primary-900:oklch(89% .003 80);--color-primary-950:oklch(94% .002 80);--color-surface:oklch(21.5% 0 89.88);--color-ink:oklch(94% .002 80);--color-surface-deep:oklch(14% 0 89.88)}.light,.system{color-scheme:light}@media(prefers-color-scheme:dark){.system{color-scheme:dark;--color-primary-50:oklch(15.5% 0 89.88);--color-primary-100:oklch(18.5% 0 89.88);--color-primary-200:oklch(26.5% 0 89.88);--color-primary-300:oklch(32% .004 80);--color-primary-400:oklch(40% .005 80);--color-primary-500:oklch(52% .005 80);--color-primary-600:oklch(63% .005 80);--color-primary-700:oklch(73% .005 80);--color-primary-800:oklch(82% .004 80);--color-primary-900:oklch(89% .003 80);--color-primary-950:oklch(94% .002 80);--color-surface:oklch(21.5% 0 89.88);--color-ink:oklch(94% .002 80);--color-surface-deep:oklch(14% 0 89.88)}}.chameleon{color-scheme:light;--color-primary-50:oklch(97.5% .012 155);--color-primary-100:oklch(95.5% .018 155);--color-primary-200:oklch(91.5% .025 155);--color-primary-300:oklch(86% .035 160);--color-primary-400:oklch(75% .045 165);--color-primary-500:oklch(62% .055 168);--color-primary-600:oklch(50% .055 168);--color-primary-700:oklch(42% .045 165);--color-primary-800:oklch(35% .035 160);--color-primary-900:oklch(28% .025 155);--color-primary-950:oklch(22% .018 155);--color-surface:oklch(98% .008 155);--color-ink:oklch(25% .025 155)}.frost{color-scheme:light;--color-primary-50:oklch(98.5% .008 250);--color-primary-100:oklch(96% .01 250);--color-primary-200:oklch(90.5% .015 250);--color-primary-300:oklch(84% .018 250);--color-primary-400:oklch(73% .02 250);--color-primary-500:oklch(60% .02 250);--color-primary-600:oklch(50% .018 250);--color-primary-700:oklch(40% .015 250);--color-primary-800:oklch(30% .012 250);--color-primary-900:oklch(24% .01 250);--color-primary-950:oklch(18% .008 250);--color-surface:oklch(99% .005 250);--color-ink:oklch(24% .01 250)}.frost.dark:not(.frost-light),.frost-dark{color-scheme:dark;--color-primary-50:oklch(15% .01 260);--color-primary-100:oklch(19% .012 260);--color-primary-200:oklch(24% .014 260);--color-primary-300:oklch(34% .014 260);--color-primary-400:oklch(44% .012 260);--color-primary-500:oklch(56% .012 260);--color-primary-600:oklch(68% .01 260);--color-primary-700:oklch(76% .01 260);--color-primary-800:oklch(86% .008 260);--color-primary-900:oklch(93% .005 260);--color-primary-950:oklch(97% .003 260);--color-surface:oklch(6% .008 260);--color-ink:oklch(97% .003 260)}@media(prefers-color-scheme:dark){.frost:not(.frost-light):not(:where(.light,.light *)){color-scheme:dark;--color-primary-50:oklch(15% .01 260);--color-primary-100:oklch(19% .012 260);--color-primary-200:oklch(24% .014 260);--color-primary-300:oklch(34% .014 260);--color-primary-400:oklch(44% .012 260);--color-primary-500:oklch(56% .012 260);--color-primary-600:oklch(68% .01 260);--color-primary-700:oklch(76% .01 260);--color-primary-800:oklch(86% .008 260);--color-primary-900:oklch(93% .005 260);--color-primary-950:oklch(97% .003 260);--color-surface:oklch(6% .008 260);--color-ink:oklch(97% .003 260)}}html.frost body{background:radial-gradient(1200px 700px at -10% -10%,var(--opencami-accent),transparent 60%),radial-gradient(900px 500px at 110% -5%,var(--opencami-accent),transparent 65%),linear-gradient(180deg,#ffffff59,#fff3)}@supports (color:color-mix(in lab,red,red)){html.frost body{background:radial-gradient(1200px 700px at -10% -10%,color-mix(in srgb,var(--opencami-accent) 14%,transparent),transparent 60%),radial-gradient(900px 500px at 110% -5%,color-mix(in srgb,var(--opencami-accent) 10%,transparent),transparent 65%),linear-gradient(180deg,#ffffff59,#fff3)}}html.frost.dark:not(.frost-light) body,html.frost-dark body{background:radial-gradient(1200px 700px at -10% -10%,var(--opencami-accent),transparent 62%),radial-gradient(900px 500px at 110% -5%,var(--opencami-accent),transparent 68%),linear-gradient(180deg,#0a0c12eb,#0a0c12db)}@supports (color:color-mix(in lab,red,red)){html.frost.dark:not(.frost-light) body,html.frost-dark body{background:radial-gradient(1200px 700px at -10% -10%,color-mix(in srgb,var(--opencami-accent) 18%,transparent),transparent 62%),radial-gradient(900px 500px at 110% -5%,color-mix(in srgb,var(--opencami-accent) 14%,transparent),transparent 68%),linear-gradient(180deg,#0a0c12eb,#0a0c12db)}}@media(prefers-color-scheme:dark){html.frost:not(.frost-light) body{background:radial-gradient(1200px 700px at -10% -10%,var(--opencami-accent),transparent 62%),radial-gradient(900px 500px at 110% -5%,var(--opencami-accent),transparent 68%),linear-gradient(180deg,#0a0c12eb,#0a0c12db)}@supports (color:color-mix(in lab,red,red)){html.frost:not(.frost-light) body{background:radial-gradient(1200px 700px at -10% -10%,color-mix(in srgb,var(--opencami-accent) 18%,transparent),transparent 62%),radial-gradient(900px 500px at 110% -5%,color-mix(in srgb,var(--opencami-accent) 14%,transparent),transparent 68%),linear-gradient(180deg,#0a0c12eb,#0a0c12db)}}}.frost aside,.frost .tauri-drag-header,.frost .DialogPopup,.frost [role=dialog],.frost .opencami-frost-panel,.frost .bg-surface.cursor-text{-webkit-backdrop-filter:blur(20px)}.frost aside,.frost .tauri-drag-header,.frost .bg-surface.cursor-text{box-shadow:0 8px 32px #00000014;background:#fff9!important;border-color:#ffffff4d!important}@media(prefers-color-scheme:dark){.frost:not(.frost-light) aside,.frost:not(.frost-light) .tauri-drag-header,.frost:not(.frost-light) .bg-surface.cursor-text{box-shadow:0 8px 32px #00000059;background:#0f0f0fb3!important;border-color:#ffffff29!important}}.frost .group.inline-flex.items-center.justify-between{border:1px solid #0000}.frost .group.inline-flex.items-center.justify-between:hover{background:#fff6;border-color:#ffffff52}.frost .group.inline-flex.items-center.justify-between.bg-\[var\(--opencami-accent-light\)\]{box-shadow:0 0 0 1px var(--opencami-accent),0 8px 24px var(--opencami-accent)}@supports (color:color-mix(in lab,red,red)){.frost .group.inline-flex.items-center.justify-between.bg-\[var\(--opencami-accent-light\)\]{box-shadow:0 0 0 1px color-mix(in srgb,var(--opencami-accent) 38%,transparent),0 8px 24px color-mix(in srgb,var(--opencami-accent) 22%,transparent)}}.frost .opencami-message-user{background:var(--opencami-accent)}@supports (color:color-mix(in lab,red,red)){.frost .opencami-message-user{background:color-mix(in srgb,var(--opencami-accent) 18%,#ffffff80)}}.frost .opencami-message-user{border:1px solid var(--opencami-accent)}@supports (color:color-mix(in lab,red,red)){.frost .opencami-message-user{border:1px solid color-mix(in srgb,var(--opencami-accent) 28%,#fff6)}}.frost .opencami-message-user{box-shadow:0 4px 16px #00000014}.frost .opencami-message-assistant{background:#ffffff59;border:1px solid #ffffff3d;border-radius:14px;padding:.5rem .75rem}@media(prefers-color-scheme:dark){.frost:not(.frost-light) .opencami-message-assistant{background:#16181e80;border-color:#ffffff26}}.frost [data-slot=tabs-list],.frost [role=menu],.frost [data-slot=button][class*=outline],.frost [role=dialog]{-webkit-backdrop-filter:blur(20px)}.frost [role=dialog],.frost [role=menu]{background:#ffffff8c;border:1px solid #ffffff4d;box-shadow:0 8px 32px #0000001a}@media(prefers-color-scheme:dark){.frost:not(.frost-light) [role=dialog],.frost:not(.frost-light) [role=menu]{background:#0f0f0fb8;border-color:#ffffff2e;box-shadow:0 8px 32px #00000059}}@media(pointer:coarse),(max-width:768px){.frost aside,.frost .tauri-drag-header,.frost .DialogPopup,.frost [role=dialog],.frost .opencami-frost-panel,.frost .bg-surface.cursor-text,.frost [data-slot=tabs-list],.frost [role=menu],.frost [data-slot=button][class*=outline]{-webkit-backdrop-filter:blur(8px)}.frost aside,.frost .tauri-drag-header,.frost .bg-surface.cursor-text,.frost [role=dialog],.frost [role=menu]{background:#ffffffd1!important;border-color:#ffffff6b!important}.frost .opencami-message-assistant{background:#ffffff94;border-color:#ffffff4d}}@media(pointer:coarse),(max-width:768px)and (prefers-color-scheme:dark){.frost:not(.frost-light) aside,.frost:not(.frost-light) .tauri-drag-header,.frost:not(.frost-light) .bg-surface.cursor-text,.frost:not(.frost-light) [role=dialog],.frost:not(.frost-light) [role=menu]{background:#0f0f0fd6!important;border-color:#ffffff38!important}.frost:not(.frost-light) .opencami-message-assistant{background:#16181ead;border-color:#ffffff2e}}.frost .opencami-accent-bg,.frost .opencami-accent-bg-hover:hover,.frost [data-slot=button]:focus-visible{box-shadow:0 0 0 1px var(--opencami-accent),0 8px 24px var(--opencami-accent)}@supports (color:color-mix(in lab,red,red)){.frost .opencami-accent-bg,.frost .opencami-accent-bg-hover:hover,.frost [data-slot=button]:focus-visible{box-shadow:0 0 0 1px color-mix(in srgb,var(--opencami-accent) 42%,transparent),0 8px 24px color-mix(in srgb,var(--opencami-accent) 24%,transparent)}}html,body{margin:calc(var(--spacing) * 0);font-family:var(--opencami-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);letter-spacing:-.15px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overscroll-behavior:none}.font-sans{letter-spacing:-.15px}.inline-code{background:var(--color-primary-100);border:1px solid var(--color-primary-200);color:var(--color-primary-900);white-space:nowrap;border-radius:.5rem;padding:.1rem .4rem;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.95em}.code-block .shiki{margin:0;background:0 0!important}.code-block .shiki code{font-size:.875rem;line-height:1.5;display:block}code{font-family:JetBrains Mono,Menlo,Monaco,Consolas,Courier New,monospace}@keyframes shimmer{0%{background-position:200%}to{background-position:-200%}}@keyframes stream-fade-in{0%{opacity:.4}to{opacity:1}}.stream-fade-in{animation:.25s ease-out stream-fade-in}@media(max-width:768px){.stream-fade-in{animation-duration:.16s}.opencami-message-highlight{animation-duration:1s}.group\/scroll-area,[data-radix-scroll-area-viewport],[data-slot=scroll-area-viewport]{-webkit-overflow-scrolling:touch}}@keyframes message-highlight-pulse{0%{background-color:color-mix(in srgb,var(--opencami-accent,#22c55e) 18%,transparent)}to{background-color:#0000}}.opencami-message-highlight{border-radius:.75rem;animation:1.8s ease-out message-highlight-pulse}@media(prefers-reduced-motion:reduce){.stream-fade-in,.opencami-message-highlight{animation:none}*{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.tauri-drag-header{padding-left:2rem}html.tauri .tauri-drag-header{padding-left:5rem}@supports (padding-left:env(titlebar-area-x)){html.tauri .tauri-drag-header{padding-left:calc(env(titlebar-area-x) + env(titlebar-area-width) + .5rem)}}::selection{background:var(--opencami-accent-light)}.opencami-accent-text{color:var(--opencami-accent)}.opencami-accent-bg{background:var(--opencami-accent);color:var(--opencami-accent-fg)}.opencami-accent-bg-hover:hover{background:var(--opencami-accent-hover)}.opencami-accent-soft{background:var(--opencami-accent-light);color:var(--opencami-accent)}.opencami-message-item{contain:content}.group\/scroll-area,[data-radix-scroll-area-viewport],[data-slot=scroll-area-viewport],.opencami-scroll-viewport{will-change:transform;backface-visibility:hidden;transform:translateZ(0)}img[loading=lazy]{contain:content}[data-opencami-bubble-style=bubbles] .opencami-message-assistant{background:var(--color-primary-100);max-width:80%;padding:.75rem 1rem}[data-opencami-bubble-style=bubbles] .opencami-message-user{background:var(--opencami-accent);color:var(--opencami-accent-fg);max-width:80%}[data-opencami-bubble-style=minimal] .opencami-message-assistant,[data-opencami-bubble-style=minimal] .opencami-message-user{background:0 0;border-radius:0;max-width:100%;padding:0}[data-opencami-bubble-style=minimal] .opencami-message-item{border-top:1px solid var(--color-primary-200);padding-top:.75rem}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,w as he,j as R}from"./main-
|
|
1
|
+
import{r as a,w as he,j as R}from"./main-ZBMVSJTF.js";import{ac as J,af as f,ab as M,C as pe,E as ve,ad as be,ag as W,c as U}from"./button-DqP4GZwZ.js";import{u as ge}from"./useControlled-CpliTEve.js";import{a as V,u as C,e as G,d as ye,f as xe,g as ke,n as Ce}from"./useBaseUiId-DLhdkHJl.js";import{v as Ie,a as Re}from"./visuallyHidden-COI6QeQH.js";const Q=a.createContext(void 0);function Ee(){const e=a.useContext(Q);if(e===void 0)throw new Error(J(63));return e}let H=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Ve={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},we={valid(e){return e===null?null:e?{[H.valid]:""}:{[H.invalid]:""}}};let Y=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const X={...we,checked(e){return e?{[Y.checked]:""}:{[Y.unchecked]:""}}};function Pe(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Me=a.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:f,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Z(){return a.useContext(Me)}const Se=a.createContext({invalid:void 0,name:void 0,validityData:{state:Ve,errors:[],error:"",value:"",initialValue:null},setValidityData:f,disabled:void 0,touched:!1,setTouched:f,dirty:!1,setDirty:f,filled:!1,setFilled:f,focused:!1,setFocused:f,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=M)=>e,getInputValidationProps:(e=M)=>e,inputRef:{current:null},commit:async()=>{}}});function S(e=!0){const t=a.useContext(Se);if(t.setValidityData===f&&!e)throw new Error(J(28));return t}function Te(e){const{enabled:t=!0,value:i,id:s,name:y,controlRef:o,commit:c}=e,{formRef:m}=Z(),{invalid:h,markedDirtyRef:p,validityData:v,setValidityData:r}=S(),n=V(e.getValue);C(()=>{if(!t)return;let l=i;l===void 0&&(l=n()),v.initialValue===null&&l!==null&&r(x=>({...x,initialValue:l}))},[t,r,i,v.initialValue,n]),C(()=>{!t||!s||m.current.fields.set(s,{getValue:n,name:y,controlRef:o,validityData:Pe(v,h),validate(l=!0){let x=i;x===void 0&&(x=n()),p.current=!0,l?he.flushSync(()=>c(x)):c(x)}})},[c,o,t,m,n,s,h,p,y,v,i]),C(()=>{const l=m.current.fields;return()=>{s&&l.delete(s)}},[m,s])}const ze=a.createContext({controlId:void 0,registerControlId:f,labelId:void 0,setLabelId:f,messageIds:[],setMessageIds:f,getDescriptionProps:e=>e});function $(){return a.useContext(ze)}function _e(e={}){const{id:t,implicit:i=!1,controlRef:s}=e,{controlId:y,registerControlId:o}=$(),c=G(t),m=i?y:void 0,h=pe(()=>Symbol("labelable-control")),p=a.useRef(!1),v=a.useRef(t!=null),r=V(()=>{!p.current||o===f||(p.current=!1,o(h.current,void 0))});return C(()=>{if(o===f)return;let n;if(i){const l=s?.current;ye(l)&&l.closest("label")!=null?n=t??null:n=m??c}else if(t!=null)v.current=!0,n=t;else if(v.current)n=c;else{r();return}if(n===void 0){r();return}p.current=!0,o(h.current,n)},[t,s,m,o,i,c,h,r]),a.useEffect(()=>r,[r]),y??c}function Be(e,t){const i=a.useRef(e),s=V(t);C(()=>{i.current!==e&&s(i.current)},[e,s]),C(()=>{i.current=e},[e])}const Fe=a.forwardRef(function(t,i){const{checked:s,className:y,defaultChecked:o,id:c,inputRef:m,name:h,nativeButton:p=!1,onCheckedChange:v,readOnly:r=!1,required:n=!1,disabled:l=!1,render:x,uncheckedValue:T,value:w,...A}=t,{clearErrors:ee}=Z(),{state:z,setTouched:te,setDirty:ne,validityData:ae,setFilled:P,setFocused:_,shouldValidateOnChange:ie,validationMode:se,disabled:re,name:le,validation:b}=S(),{labelId:de}=$(),g=re||l,k=le??h,B=V(v),I=a.useRef(null),F=ve(I,m,b.inputRef),E=a.useRef(null),K=G(),L=_e({id:c,implicit:!1,controlRef:E}),j=p?void 0:L,[d,O]=ge({controlled:s,default:!!o,name:"Switch",state:"checked"});Te({id:K,commit:b.commit,value:d,controlRef:E,name:k,getValue:()=>d}),C(()=>{I.current&&P(I.current.checked)},[I,P]),Be(d,()=>{ee(k),ne(d!==ae.initialValue),P(d),ie()?b.commit(d):b.commit(d,!0)});const{getButtonProps:oe,buttonRef:ce}=xe({disabled:g,native:p}),ue={id:p?L:K,role:"switch","aria-checked":d,"aria-readonly":r||void 0,"aria-required":n||void 0,"aria-labelledby":de,onFocus(){g||_(!0)},onBlur(){const u=I.current;!u||g||(te(!0),_(!1),se==="onBlur"&&b.commit(u.checked))},onClick(u){r||g||(u.preventDefault(),I.current?.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:u.shiftKey,ctrlKey:u.ctrlKey,altKey:u.altKey,metaKey:u.metaKey})))}},fe=a.useMemo(()=>be({checked:d,disabled:g,id:j,name:k,required:n,style:k?Ie:Re,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:F,onChange(u){if(u.nativeEvent.defaultPrevented)return;const q=u.target.checked,D=ke(Ce,u.nativeEvent);B?.(q,D),!D.isCanceled&&O(q)},onFocus(){E.current?.focus()}},b.getInputValidationProps,w!==void 0?{value:w}:M),[d,g,F,j,k,B,n,O,b,w]),N=a.useMemo(()=>({...z,checked:d,disabled:g,readOnly:r,required:n}),[z,d,g,r,n]),me=W("span",t,{state:N,ref:[i,E,ce],props:[ue,b.getValidationProps,A,oe],stateAttributesMapping:X});return R.jsxs(Q.Provider,{value:N,children:[me,!d&&k&&T!==void 0&&R.jsx("input",{type:"hidden",name:k,value:T}),R.jsx("input",{...fe})]})}),Ke=a.forwardRef(function(t,i){const{render:s,className:y,...o}=t,{state:c}=S(),m=Ee(),h={...c,...m};return W("span",t,{state:h,ref:i,stateAttributesMapping:X,props:o})});function De({className:e,...t}){return R.jsx(Fe,{className:U("inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200 [--thumb-size:--spacing(5)] focus-visible:ring-2 focus-visible:ring-primary-950 focus-visible:ring-offset-1 focus-visible:ring-offset-background data-checked:bg-primary-900 data-unchecked:bg-primary-200 data-disabled:opacity-64 sm:[--thumb-size:--spacing(4)]",e),"data-slot":"switch",...t,children:R.jsx(Ke,{className:U("pointer-events-none block aspect-square h-full origin-left in-[[role=switch]:active,[data-slot=label]:active]:not-data-disabled:scale-x-110 in-[[role=switch]:active,[data-slot=label]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.1)] rounded-(--thumb-size) bg-primary-50 shadow-sm/5 will-change-transform [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s] data-checked:origin-[var(--thumb-size)_50%] data-checked:translate-x-[calc(var(--thumb-size)-4px)]"),"data-slot":"switch-thumb"})})}export{De as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as z}from"./main-_1IghVZn.js";import{ac as ht,ag as q,E as Rt,ah as et,ab as yt,c as Z}from"./button-BcUmP7JL.js";import{u as Et}from"./useControlled-DeDLOsPR.js";import{h as Mt,i as Ct,a as Y,u as nt,e as St,f as wt,g as it,n as at,C as Pt}from"./useBaseUiId-DN9cOflS.js";import{C as gt,u as At,g as Ht,a as Lt,c as Dt,i as J,b as Ot,d as kt,e as zt,f as _t,h as Kt}from"./useCompositeItem-B_J-cnZX.js";import{r as st,u as bt}from"./DirectionContext-FHFKdJq_.js";import{s as rt,A as Nt,a as Bt,i as lt,b as U,c as Q,H as Wt,E as jt,d as ct,e as tt,V as Ft,f as Yt,g as $t,h as Vt,M as Gt}from"./composite--BBbKdxm.js";import{d as Ut,o as ut,e as Zt,u as Xt}from"./event-BxzjTPjG.js";import{u as qt}from"./CSPContext-DATmz4sz.js";function Jt(){const[,t]=o.useState({});return o.useCallback(()=>{t({})},[])}function dt(t){const a=Mt(t);let l=parseFloat(a.width)||0,b=parseFloat(a.height)||0;const s=Ct(t),i=s?t.offsetWidth:l,r=s?t.offsetHeight:b;return(st(l)!==i||st(b)!==r)&&(l=i,b=r),{width:l,height:b}}const pt=o.createContext(void 0);function X(){const t=o.useContext(pt);if(t===void 0)throw new Error(ht(64));return t}let Qt=(function(t){return t.activationDirection="data-activation-direction",t.orientation="data-orientation",t})({});const ot={tabActivationDirection:t=>({[Qt.activationDirection]:t})},te=o.forwardRef(function(a,l){const{className:b,defaultValue:s=0,onValueChange:i,orientation:r="horizontal",render:w,value:I,...P}=a,y=bt(),E=Object.hasOwn(a,"defaultValue"),d=o.useRef([]),[k,D]=o.useState(()=>new Map),[x,R]=Et({controlled:I,default:s,name:"Tabs",state:"value"}),v=I!==void 0,[h,c]=o.useState(()=>new Map),[M,p]=o.useState("none"),g=Y((e,m)=>{i?.(e,m),!m.isCanceled&&(R(e),p(m.activationDirection))}),f=Y((e,m)=>{D(u=>{if(u.get(e)===m)return u;const T=new Map(u);return T.set(e,m),T})}),A=Y((e,m)=>{D(u=>{if(!u.has(e)||u.get(e)!==m)return u;const T=new Map(u);return T.delete(e),T})}),n=o.useCallback(e=>k.get(e),[k]),C=o.useCallback(e=>{for(const m of h.values())if(e===m?.value)return m?.id},[h]),O=o.useCallback(e=>{if(e===void 0)return null;for(const[m,u]of h.entries())if(u!=null&&e===(u.value??u.index))return m;return null},[h]),L=o.useMemo(()=>({direction:y,getTabElementBySelectedValue:O,getTabIdByPanelValue:C,getTabPanelIdByValue:n,onValueChange:g,orientation:r,registerMountedTabPanel:f,setTabMap:c,unregisterMountedTabPanel:A,tabActivationDirection:M,value:x}),[y,O,C,n,g,r,f,c,A,M,x]),S=o.useMemo(()=>{for(const e of h.values())if(e!=null&&e.value===x)return e},[h,x]),H=o.useMemo(()=>{for(const e of h.values())if(e!=null&&!e.disabled)return e.value},[h]);nt(()=>{if(v||h.size===0)return;const e=S?.disabled,m=S==null&&x!==null;if(E&&e&&x===s||!e&&!m)return;const T=H??null;x!==T&&(R(T),p("none"))},[s,H,E,v,S,p,R,h,x]);const K=q("div",a,{state:{orientation:r,tabActivationDirection:M},ref:l,props:P,stateAttributesMapping:ot});return z.jsx(pt.Provider,{value:L,children:z.jsx(gt,{elementsRef:d,children:K})})}),mt="data-composite-item-active",vt=o.createContext(void 0);function xt(){const t=o.useContext(vt);if(t===void 0)throw new Error(ht(65));return t}const ee=o.forwardRef(function(a,l){const{className:b,disabled:s=!1,render:i,value:r,id:w,nativeButton:I=!0,...P}=a,{value:y,getTabPanelIdByValue:E,orientation:d}=X(),{activateOnFocus:k,highlightedTabIndex:D,onTabActivation:x,setHighlightedTabIndex:R,tabsListElement:v}=xt(),h=St(w),c=o.useMemo(()=>({disabled:s,id:h,value:r}),[s,h,r]),{compositeProps:M,compositeRef:p,index:g}=At({metadata:c}),f=r===y,A=o.useRef(!1);nt(()=>{if(A.current){A.current=!1;return}if(!(f&&g>-1&&D!==g))return;const u=v;if(u!=null){const T=Ut(ut(u));if(T&&Zt(u,T))return}s||R(g)},[f,g,D,R,s,v]);const{getButtonProps:n,buttonRef:C}=wt({disabled:s,native:I,focusableWhenDisabled:!0}),O=E(r),L=o.useRef(!1),S=o.useRef(!1);function H(u){f||s||x(r,it(at,u.nativeEvent,void 0,{activationDirection:"none"}))}function _(u){f||(g>-1&&!s&&R(g),!s&&k&&(!L.current||L.current&&S.current)&&x(r,it(at,u.nativeEvent,void 0,{activationDirection:"none"})))}function K(u){if(f||s)return;L.current=!0;function T(){L.current=!1,S.current=!1}(!u.button||u.button===0)&&(S.current=!0,ut(u.currentTarget).addEventListener("pointerup",T,{once:!0}))}return q("button",a,{state:{disabled:s,active:f,orientation:d},ref:[l,C,p],props:[M,{role:"tab","aria-controls":O,"aria-selected":f,id:h,onClick:H,onFocus:_,onPointerDown:K,[mt]:f?"":void 0,onKeyDownCapture(){A.current=!0}},P,n]})}),ne='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let F=(function(t){return t.activeTabLeft="--active-tab-left",t.activeTabRight="--active-tab-right",t.activeTabTop="--active-tab-top",t.activeTabBottom="--active-tab-bottom",t.activeTabWidth="--active-tab-width",t.activeTabHeight="--active-tab-height",t})({});const oe={...ot,activeTabPosition:()=>null,activeTabSize:()=>null},ie=o.forwardRef(function(a,l){const{className:b,render:s,renderBeforeHydration:i=!1,...r}=a,{nonce:w}=qt(),{getTabElementBySelectedValue:I,orientation:P,tabActivationDirection:y,value:E}=X(),{tabsListElement:d}=xt(),[k,D]=o.useState(!1),{value:x}=X();Xt(()=>D(!0));const R=Jt();o.useEffect(()=>{if(E!=null&&d!=null&&typeof ResizeObserver<"u"){const H=new ResizeObserver(R);return H.observe(d),()=>{H.disconnect()}}},[E,d,R]);let v=0,h=0,c=0,M=0,p=0,g=0,f=!1;if(E!=null&&d!=null){const H=I(E);if(f=!0,H!=null){const{width:_,height:K}=dt(H),{width:e,height:m}=dt(d),u=H.getBoundingClientRect(),T=d.getBoundingClientRect(),j=e>0?T.width/e:1,G=m>0?T.height/m:1;if(Math.abs(j)>Number.EPSILON&&Math.abs(G)>Number.EPSILON){const N=u.left-T.left,$=u.top-T.top;v=N/j+d.scrollLeft-d.clientLeft,c=$/G+d.scrollTop-d.clientTop}else v=H.offsetLeft,c=H.offsetTop;p=_,g=K,h=d.scrollWidth-v-p,M=d.scrollHeight-c-g}}const A=o.useMemo(()=>f?{left:v,right:h,top:c,bottom:M}:null,[v,h,c,M,f]),n=o.useMemo(()=>f?{width:p,height:g}:null,[p,g,f]),C=o.useMemo(()=>{if(f)return{[F.activeTabLeft]:`${v}px`,[F.activeTabRight]:`${h}px`,[F.activeTabTop]:`${c}px`,[F.activeTabBottom]:`${M}px`,[F.activeTabWidth]:`${p}px`,[F.activeTabHeight]:`${g}px`}},[v,h,c,M,p,g,f]),O=f&&p>0&&g>0,S=q("span",a,{state:{orientation:P,activeTabPosition:A,activeTabSize:n,tabActivationDirection:y},ref:l,props:[{role:"presentation",style:C,hidden:!O},r,{suppressHydrationWarning:!0}],stateAttributesMapping:oe});return x==null?null:z.jsxs(o.Fragment,{children:[S,!k&&i&&z.jsx("script",{nonce:w,dangerouslySetInnerHTML:{__html:ne},suppressHydrationWarning:!0})]})});function ae(t){return t==null||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}const se=[];function re(t){const{itemSizes:a,cols:l=1,loopFocus:b=!0,dense:s=!1,orientation:i="both",direction:r,highlightedIndex:w,onHighlightedIndexChange:I,rootRef:P,enableHomeAndEndKeys:y=!1,stopEventPropagation:E=!1,disabledIndices:d,modifierKeys:k=se}=t,[D,x]=o.useState(0),R=l>1,v=o.useRef(null),h=Rt(v,P),c=o.useRef([]),M=o.useRef(!1),p=w??D,g=Y((n,C=!1)=>{if((I??x)(n),C){const O=c.current[n];rt(v.current,O,r,i)}}),f=Y(n=>{if(n.size===0||M.current)return;M.current=!0;const C=Array.from(n.keys()),O=C.find(S=>S?.hasAttribute(mt))??null,L=O?C.indexOf(O):-1;L!==-1&&g(L),rt(v.current,O,r,i)}),A=o.useMemo(()=>({"aria-orientation":i==="both"?void 0:i,ref:h,onFocus(n){!v.current||!lt(n.target)||n.target.setSelectionRange(0,n.target.value.length??0)},onKeyDown(n){const C=y?Nt:Bt;if(!C.has(n.key)||le(n,k)||!v.current)return;const L=r==="rtl",S=L?ct:Q,H={horizontal:S,vertical:U,both:S}[i],_=L?Q:ct,K={horizontal:_,vertical:tt,both:_}[i];if(lt(n.target)&&!ae(n.target)){const B=n.target.selectionStart,N=n.target.selectionEnd,$=n.target.value??"";if(B==null||n.shiftKey||B!==N||n.key!==K&&B<$.length||n.key!==H&&B>0)return}let e=p;const m=Ht(c,d),u=Lt(c,d);if(R){const B=a||Array.from({length:c.current.length},()=>({width:1,height:1})),N=Dt(B,l,s),$=N.findIndex(W=>W!=null&&!J(c,W,d)),Tt=N.reduce((W,V,It)=>V!=null&&!J(c,V,d)?It:W,-1);e=N[Ot({current:N.map(W=>W?c.current[W]:null)},{event:n,orientation:i,loopFocus:b,cols:l,disabledIndices:zt([...d||c.current.map((W,V)=>J(c,V)?V:void 0),void 0],N),minIndex:$,maxIndex:Tt,prevIndex:kt(p>u?m:p,B,N,l,n.key===U?"bl":n.key===Q?"tr":"tl"),rtl:L})]}const T={horizontal:[S],vertical:[U],both:[S,U]}[i],j={horizontal:[_],vertical:[tt],both:[_,tt]}[i],G=R?C:{horizontal:y?$t:Vt,vertical:y?Ft:Yt,both:C}[i];y&&(n.key===Wt?e=m:n.key===jt&&(e=u)),e===p&&(T.includes(n.key)||j.includes(n.key))&&(b&&e===u&&T.includes(n.key)?e=m:b&&e===m&&j.includes(n.key)?e=u:e=_t(c,{startingIndex:e,decrement:j.includes(n.key),disabledIndices:d})),e!==p&&!Kt(c,e)&&(E&&n.stopPropagation(),G.has(n.key)&&n.preventDefault(),g(e,!0),queueMicrotask(()=>{c.current[e]?.focus()}))}}),[l,s,r,d,c,y,p,R,a,b,h,k,g,i,E]);return o.useMemo(()=>({props:A,highlightedIndex:p,onHighlightedIndexChange:g,elementsRef:c,disabledIndices:d,onMapChange:f,relayKeyboardEvent:A.onKeyDown}),[A,p,g,c,d,f])}function le(t,a){for(const l of Gt.values())if(!a.includes(l)&&t.getModifierState(l))return!0;return!1}function ce(t){const{render:a,className:l,refs:b=et,props:s=et,state:i=yt,stateAttributesMapping:r,highlightedIndex:w,onHighlightedIndexChange:I,orientation:P,dense:y,itemSizes:E,loopFocus:d,cols:k,enableHomeAndEndKeys:D,onMapChange:x,stopEventPropagation:R=!0,rootRef:v,disabledIndices:h,modifierKeys:c,highlightItemOnHover:M=!1,tag:p="div",...g}=t,f=bt(),{props:A,highlightedIndex:n,onHighlightedIndexChange:C,elementsRef:O,onMapChange:L,relayKeyboardEvent:S}=re({itemSizes:E,cols:k,loopFocus:d,dense:y,orientation:P,highlightedIndex:w,onHighlightedIndexChange:I,rootRef:v,stopEventPropagation:R,enableHomeAndEndKeys:D,direction:f,disabledIndices:h,modifierKeys:c}),H=q(p,t,{state:i,ref:b,props:[A,...s,g],stateAttributesMapping:r}),_=o.useMemo(()=>({highlightedIndex:n,onHighlightedIndexChange:C,highlightItemOnHover:M,relayKeyboardEvent:S}),[n,C,M,S]);return z.jsx(Pt.Provider,{value:_,children:z.jsx(gt,{elementsRef:O,onMapChange:K=>{x?.(K),L(K)},children:H})})}const ue=o.forwardRef(function(a,l){const{activateOnFocus:b=!1,className:s,loopFocus:i=!0,render:r,...w}=a,{getTabElementBySelectedValue:I,onValueChange:P,orientation:y,value:E,setTabMap:d,tabActivationDirection:k}=X(),[D,x]=o.useState(0),[R,v]=o.useState(null),h=de(E,y,R,I),c=Y((f,A)=>{if(f!==E){const n=h(f);A.activationDirection=n,P(f,A)}}),M={orientation:y,tabActivationDirection:k},p={"aria-orientation":y==="vertical"?"vertical":void 0,role:"tablist"},g=o.useMemo(()=>({activateOnFocus:b,highlightedTabIndex:D,onTabActivation:c,setHighlightedTabIndex:x,tabsListElement:R,value:E}),[b,D,c,x,R,E]);return z.jsx(vt.Provider,{value:g,children:z.jsx(ce,{render:r,className:s,state:M,refs:[l,v],props:[p,w],stateAttributesMapping:ot,highlightedIndex:D,enableHomeAndEndKeys:!0,loopFocus:i,orientation:y,onHighlightedIndexChange:x,onMapChange:d,disabledIndices:et})})});function ft(t,a){const{left:l,top:b}=t.getBoundingClientRect(),{left:s,top:i}=a.getBoundingClientRect(),r=l-s,w=b-i;return{left:r,top:w}}function de(t,a,l,b){const[s,i]=o.useState(null);return nt(()=>{if(t==null||l==null){i(null);return}const r=b(t);if(r==null){i(null);return}const{left:w,top:I}=ft(r,l);i(a==="horizontal"?w:I)},[a,b,l,t]),o.useCallback(r=>{if(r===t)return"none";if(r==null)return i(null),"none";if(r!=null&&l!=null){const w=b(r);if(w!=null){const{left:I,top:P}=ft(w,l);if(s==null)return i(a==="horizontal"?I:P),"none";if(a==="horizontal"){if(I<s)return i(I),"left";if(I>s)return i(I),"right"}else{if(P<s)return i(P),"up";if(P>s)return i(P),"down"}}}return"none"},[b,a,s,l,t])}function Ie({className:t,...a}){return z.jsx(te,{className:Z("flex flex-col gap-2 data-[orientation=vertical]:flex-row",t),"data-slot":"tabs",...a})}function Re({variant:t="default",className:a,children:l,...b}){return z.jsxs(ue,{className:Z("relative z-0 flex w-fit items-center justify-center gap-x-0.5 text-primary-600","data-[orientation=vertical]:flex-col",t==="default"?"p-0.5 text-primary-600/80":"data-[orientation=vertical]:px-1 data-[orientation=horizontal]:py-1",a),"data-slot":"tabs-list",...b,children:[l,z.jsx(ie,{className:Z("-translate-y-(--active-tab-bottom) absolute bottom-0 left-0 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) transition-[width,translate] duration-200 ease-in-out",t==="underline"?"data-[orientation=vertical]:-translate-x-px z-10 bg-[var(--opencami-accent)] data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5 data-[orientation=horizontal]:translate-y-px":"z-0 rounded-md bg-[var(--opencami-accent-light)]"),"data-slot":"tab-indicator"})]})}function ye({className:t,...a}){return z.jsx(ee,{className:Z('[&_svg]:-mx-0.5 relative z-10 flex h-8 shrink-0 grow cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium outline-none transition-[color,background-color,box-shadow] hover:text-primary-900 focus-visible:ring-2 focus-visible:ring-[var(--opencami-accent)] data-disabled:pointer-events-none data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start data-active:text-primary-900 data-disabled:opacity-64 [&_svg:not([class*="size-"])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0',t),"data-slot":"tabs-tab",...a})}export{Ie as T,Re as a,ye as b};
|
|
1
|
+
import{r as o,j as z}from"./main-ZBMVSJTF.js";import{ac as ht,ag as q,E as Rt,ah as et,ab as yt,c as Z}from"./button-DqP4GZwZ.js";import{u as Et}from"./useControlled-CpliTEve.js";import{h as Mt,i as Ct,a as Y,u as nt,e as St,f as wt,g as it,n as at,C as Pt}from"./useBaseUiId-DLhdkHJl.js";import{C as gt,u as At,g as Ht,a as Lt,c as Dt,i as J,b as Ot,d as kt,e as zt,f as _t,h as Kt}from"./useCompositeItem-DTSTTR0Z.js";import{r as st,u as bt}from"./DirectionContext-CQMv7g2N.js";import{s as rt,A as Nt,a as Bt,i as lt,b as U,c as Q,H as Wt,E as jt,d as ct,e as tt,V as Ft,f as Yt,g as $t,h as Vt,M as Gt}from"./composite-BLgu_EOL.js";import{d as Ut,o as ut,e as Zt,u as Xt}from"./event-2_Dxdv7h.js";import{u as qt}from"./CSPContext-TfUptlEu.js";function Jt(){const[,t]=o.useState({});return o.useCallback(()=>{t({})},[])}function dt(t){const a=Mt(t);let l=parseFloat(a.width)||0,b=parseFloat(a.height)||0;const s=Ct(t),i=s?t.offsetWidth:l,r=s?t.offsetHeight:b;return(st(l)!==i||st(b)!==r)&&(l=i,b=r),{width:l,height:b}}const pt=o.createContext(void 0);function X(){const t=o.useContext(pt);if(t===void 0)throw new Error(ht(64));return t}let Qt=(function(t){return t.activationDirection="data-activation-direction",t.orientation="data-orientation",t})({});const ot={tabActivationDirection:t=>({[Qt.activationDirection]:t})},te=o.forwardRef(function(a,l){const{className:b,defaultValue:s=0,onValueChange:i,orientation:r="horizontal",render:w,value:I,...P}=a,y=bt(),E=Object.hasOwn(a,"defaultValue"),d=o.useRef([]),[k,D]=o.useState(()=>new Map),[x,R]=Et({controlled:I,default:s,name:"Tabs",state:"value"}),v=I!==void 0,[h,c]=o.useState(()=>new Map),[M,p]=o.useState("none"),g=Y((e,m)=>{i?.(e,m),!m.isCanceled&&(R(e),p(m.activationDirection))}),f=Y((e,m)=>{D(u=>{if(u.get(e)===m)return u;const T=new Map(u);return T.set(e,m),T})}),A=Y((e,m)=>{D(u=>{if(!u.has(e)||u.get(e)!==m)return u;const T=new Map(u);return T.delete(e),T})}),n=o.useCallback(e=>k.get(e),[k]),C=o.useCallback(e=>{for(const m of h.values())if(e===m?.value)return m?.id},[h]),O=o.useCallback(e=>{if(e===void 0)return null;for(const[m,u]of h.entries())if(u!=null&&e===(u.value??u.index))return m;return null},[h]),L=o.useMemo(()=>({direction:y,getTabElementBySelectedValue:O,getTabIdByPanelValue:C,getTabPanelIdByValue:n,onValueChange:g,orientation:r,registerMountedTabPanel:f,setTabMap:c,unregisterMountedTabPanel:A,tabActivationDirection:M,value:x}),[y,O,C,n,g,r,f,c,A,M,x]),S=o.useMemo(()=>{for(const e of h.values())if(e!=null&&e.value===x)return e},[h,x]),H=o.useMemo(()=>{for(const e of h.values())if(e!=null&&!e.disabled)return e.value},[h]);nt(()=>{if(v||h.size===0)return;const e=S?.disabled,m=S==null&&x!==null;if(E&&e&&x===s||!e&&!m)return;const T=H??null;x!==T&&(R(T),p("none"))},[s,H,E,v,S,p,R,h,x]);const K=q("div",a,{state:{orientation:r,tabActivationDirection:M},ref:l,props:P,stateAttributesMapping:ot});return z.jsx(pt.Provider,{value:L,children:z.jsx(gt,{elementsRef:d,children:K})})}),mt="data-composite-item-active",vt=o.createContext(void 0);function xt(){const t=o.useContext(vt);if(t===void 0)throw new Error(ht(65));return t}const ee=o.forwardRef(function(a,l){const{className:b,disabled:s=!1,render:i,value:r,id:w,nativeButton:I=!0,...P}=a,{value:y,getTabPanelIdByValue:E,orientation:d}=X(),{activateOnFocus:k,highlightedTabIndex:D,onTabActivation:x,setHighlightedTabIndex:R,tabsListElement:v}=xt(),h=St(w),c=o.useMemo(()=>({disabled:s,id:h,value:r}),[s,h,r]),{compositeProps:M,compositeRef:p,index:g}=At({metadata:c}),f=r===y,A=o.useRef(!1);nt(()=>{if(A.current){A.current=!1;return}if(!(f&&g>-1&&D!==g))return;const u=v;if(u!=null){const T=Ut(ut(u));if(T&&Zt(u,T))return}s||R(g)},[f,g,D,R,s,v]);const{getButtonProps:n,buttonRef:C}=wt({disabled:s,native:I,focusableWhenDisabled:!0}),O=E(r),L=o.useRef(!1),S=o.useRef(!1);function H(u){f||s||x(r,it(at,u.nativeEvent,void 0,{activationDirection:"none"}))}function _(u){f||(g>-1&&!s&&R(g),!s&&k&&(!L.current||L.current&&S.current)&&x(r,it(at,u.nativeEvent,void 0,{activationDirection:"none"})))}function K(u){if(f||s)return;L.current=!0;function T(){L.current=!1,S.current=!1}(!u.button||u.button===0)&&(S.current=!0,ut(u.currentTarget).addEventListener("pointerup",T,{once:!0}))}return q("button",a,{state:{disabled:s,active:f,orientation:d},ref:[l,C,p],props:[M,{role:"tab","aria-controls":O,"aria-selected":f,id:h,onClick:H,onFocus:_,onPointerDown:K,[mt]:f?"":void 0,onKeyDownCapture(){A.current=!0}},P,n]})}),ne='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let F=(function(t){return t.activeTabLeft="--active-tab-left",t.activeTabRight="--active-tab-right",t.activeTabTop="--active-tab-top",t.activeTabBottom="--active-tab-bottom",t.activeTabWidth="--active-tab-width",t.activeTabHeight="--active-tab-height",t})({});const oe={...ot,activeTabPosition:()=>null,activeTabSize:()=>null},ie=o.forwardRef(function(a,l){const{className:b,render:s,renderBeforeHydration:i=!1,...r}=a,{nonce:w}=qt(),{getTabElementBySelectedValue:I,orientation:P,tabActivationDirection:y,value:E}=X(),{tabsListElement:d}=xt(),[k,D]=o.useState(!1),{value:x}=X();Xt(()=>D(!0));const R=Jt();o.useEffect(()=>{if(E!=null&&d!=null&&typeof ResizeObserver<"u"){const H=new ResizeObserver(R);return H.observe(d),()=>{H.disconnect()}}},[E,d,R]);let v=0,h=0,c=0,M=0,p=0,g=0,f=!1;if(E!=null&&d!=null){const H=I(E);if(f=!0,H!=null){const{width:_,height:K}=dt(H),{width:e,height:m}=dt(d),u=H.getBoundingClientRect(),T=d.getBoundingClientRect(),j=e>0?T.width/e:1,G=m>0?T.height/m:1;if(Math.abs(j)>Number.EPSILON&&Math.abs(G)>Number.EPSILON){const N=u.left-T.left,$=u.top-T.top;v=N/j+d.scrollLeft-d.clientLeft,c=$/G+d.scrollTop-d.clientTop}else v=H.offsetLeft,c=H.offsetTop;p=_,g=K,h=d.scrollWidth-v-p,M=d.scrollHeight-c-g}}const A=o.useMemo(()=>f?{left:v,right:h,top:c,bottom:M}:null,[v,h,c,M,f]),n=o.useMemo(()=>f?{width:p,height:g}:null,[p,g,f]),C=o.useMemo(()=>{if(f)return{[F.activeTabLeft]:`${v}px`,[F.activeTabRight]:`${h}px`,[F.activeTabTop]:`${c}px`,[F.activeTabBottom]:`${M}px`,[F.activeTabWidth]:`${p}px`,[F.activeTabHeight]:`${g}px`}},[v,h,c,M,p,g,f]),O=f&&p>0&&g>0,S=q("span",a,{state:{orientation:P,activeTabPosition:A,activeTabSize:n,tabActivationDirection:y},ref:l,props:[{role:"presentation",style:C,hidden:!O},r,{suppressHydrationWarning:!0}],stateAttributesMapping:oe});return x==null?null:z.jsxs(o.Fragment,{children:[S,!k&&i&&z.jsx("script",{nonce:w,dangerouslySetInnerHTML:{__html:ne},suppressHydrationWarning:!0})]})});function ae(t){return t==null||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}const se=[];function re(t){const{itemSizes:a,cols:l=1,loopFocus:b=!0,dense:s=!1,orientation:i="both",direction:r,highlightedIndex:w,onHighlightedIndexChange:I,rootRef:P,enableHomeAndEndKeys:y=!1,stopEventPropagation:E=!1,disabledIndices:d,modifierKeys:k=se}=t,[D,x]=o.useState(0),R=l>1,v=o.useRef(null),h=Rt(v,P),c=o.useRef([]),M=o.useRef(!1),p=w??D,g=Y((n,C=!1)=>{if((I??x)(n),C){const O=c.current[n];rt(v.current,O,r,i)}}),f=Y(n=>{if(n.size===0||M.current)return;M.current=!0;const C=Array.from(n.keys()),O=C.find(S=>S?.hasAttribute(mt))??null,L=O?C.indexOf(O):-1;L!==-1&&g(L),rt(v.current,O,r,i)}),A=o.useMemo(()=>({"aria-orientation":i==="both"?void 0:i,ref:h,onFocus(n){!v.current||!lt(n.target)||n.target.setSelectionRange(0,n.target.value.length??0)},onKeyDown(n){const C=y?Nt:Bt;if(!C.has(n.key)||le(n,k)||!v.current)return;const L=r==="rtl",S=L?ct:Q,H={horizontal:S,vertical:U,both:S}[i],_=L?Q:ct,K={horizontal:_,vertical:tt,both:_}[i];if(lt(n.target)&&!ae(n.target)){const B=n.target.selectionStart,N=n.target.selectionEnd,$=n.target.value??"";if(B==null||n.shiftKey||B!==N||n.key!==K&&B<$.length||n.key!==H&&B>0)return}let e=p;const m=Ht(c,d),u=Lt(c,d);if(R){const B=a||Array.from({length:c.current.length},()=>({width:1,height:1})),N=Dt(B,l,s),$=N.findIndex(W=>W!=null&&!J(c,W,d)),Tt=N.reduce((W,V,It)=>V!=null&&!J(c,V,d)?It:W,-1);e=N[Ot({current:N.map(W=>W?c.current[W]:null)},{event:n,orientation:i,loopFocus:b,cols:l,disabledIndices:zt([...d||c.current.map((W,V)=>J(c,V)?V:void 0),void 0],N),minIndex:$,maxIndex:Tt,prevIndex:kt(p>u?m:p,B,N,l,n.key===U?"bl":n.key===Q?"tr":"tl"),rtl:L})]}const T={horizontal:[S],vertical:[U],both:[S,U]}[i],j={horizontal:[_],vertical:[tt],both:[_,tt]}[i],G=R?C:{horizontal:y?$t:Vt,vertical:y?Ft:Yt,both:C}[i];y&&(n.key===Wt?e=m:n.key===jt&&(e=u)),e===p&&(T.includes(n.key)||j.includes(n.key))&&(b&&e===u&&T.includes(n.key)?e=m:b&&e===m&&j.includes(n.key)?e=u:e=_t(c,{startingIndex:e,decrement:j.includes(n.key),disabledIndices:d})),e!==p&&!Kt(c,e)&&(E&&n.stopPropagation(),G.has(n.key)&&n.preventDefault(),g(e,!0),queueMicrotask(()=>{c.current[e]?.focus()}))}}),[l,s,r,d,c,y,p,R,a,b,h,k,g,i,E]);return o.useMemo(()=>({props:A,highlightedIndex:p,onHighlightedIndexChange:g,elementsRef:c,disabledIndices:d,onMapChange:f,relayKeyboardEvent:A.onKeyDown}),[A,p,g,c,d,f])}function le(t,a){for(const l of Gt.values())if(!a.includes(l)&&t.getModifierState(l))return!0;return!1}function ce(t){const{render:a,className:l,refs:b=et,props:s=et,state:i=yt,stateAttributesMapping:r,highlightedIndex:w,onHighlightedIndexChange:I,orientation:P,dense:y,itemSizes:E,loopFocus:d,cols:k,enableHomeAndEndKeys:D,onMapChange:x,stopEventPropagation:R=!0,rootRef:v,disabledIndices:h,modifierKeys:c,highlightItemOnHover:M=!1,tag:p="div",...g}=t,f=bt(),{props:A,highlightedIndex:n,onHighlightedIndexChange:C,elementsRef:O,onMapChange:L,relayKeyboardEvent:S}=re({itemSizes:E,cols:k,loopFocus:d,dense:y,orientation:P,highlightedIndex:w,onHighlightedIndexChange:I,rootRef:v,stopEventPropagation:R,enableHomeAndEndKeys:D,direction:f,disabledIndices:h,modifierKeys:c}),H=q(p,t,{state:i,ref:b,props:[A,...s,g],stateAttributesMapping:r}),_=o.useMemo(()=>({highlightedIndex:n,onHighlightedIndexChange:C,highlightItemOnHover:M,relayKeyboardEvent:S}),[n,C,M,S]);return z.jsx(Pt.Provider,{value:_,children:z.jsx(gt,{elementsRef:O,onMapChange:K=>{x?.(K),L(K)},children:H})})}const ue=o.forwardRef(function(a,l){const{activateOnFocus:b=!1,className:s,loopFocus:i=!0,render:r,...w}=a,{getTabElementBySelectedValue:I,onValueChange:P,orientation:y,value:E,setTabMap:d,tabActivationDirection:k}=X(),[D,x]=o.useState(0),[R,v]=o.useState(null),h=de(E,y,R,I),c=Y((f,A)=>{if(f!==E){const n=h(f);A.activationDirection=n,P(f,A)}}),M={orientation:y,tabActivationDirection:k},p={"aria-orientation":y==="vertical"?"vertical":void 0,role:"tablist"},g=o.useMemo(()=>({activateOnFocus:b,highlightedTabIndex:D,onTabActivation:c,setHighlightedTabIndex:x,tabsListElement:R,value:E}),[b,D,c,x,R,E]);return z.jsx(vt.Provider,{value:g,children:z.jsx(ce,{render:r,className:s,state:M,refs:[l,v],props:[p,w],stateAttributesMapping:ot,highlightedIndex:D,enableHomeAndEndKeys:!0,loopFocus:i,orientation:y,onHighlightedIndexChange:x,onMapChange:d,disabledIndices:et})})});function ft(t,a){const{left:l,top:b}=t.getBoundingClientRect(),{left:s,top:i}=a.getBoundingClientRect(),r=l-s,w=b-i;return{left:r,top:w}}function de(t,a,l,b){const[s,i]=o.useState(null);return nt(()=>{if(t==null||l==null){i(null);return}const r=b(t);if(r==null){i(null);return}const{left:w,top:I}=ft(r,l);i(a==="horizontal"?w:I)},[a,b,l,t]),o.useCallback(r=>{if(r===t)return"none";if(r==null)return i(null),"none";if(r!=null&&l!=null){const w=b(r);if(w!=null){const{left:I,top:P}=ft(w,l);if(s==null)return i(a==="horizontal"?I:P),"none";if(a==="horizontal"){if(I<s)return i(I),"left";if(I>s)return i(I),"right"}else{if(P<s)return i(P),"up";if(P>s)return i(P),"down"}}}return"none"},[b,a,s,l,t])}function Ie({className:t,...a}){return z.jsx(te,{className:Z("flex flex-col gap-2 data-[orientation=vertical]:flex-row",t),"data-slot":"tabs",...a})}function Re({variant:t="default",className:a,children:l,...b}){return z.jsxs(ue,{className:Z("relative z-0 flex w-fit items-center justify-center gap-x-0.5 text-primary-600","data-[orientation=vertical]:flex-col",t==="default"?"p-0.5 text-primary-600/80":"data-[orientation=vertical]:px-1 data-[orientation=horizontal]:py-1",a),"data-slot":"tabs-list",...b,children:[l,z.jsx(ie,{className:Z("-translate-y-(--active-tab-bottom) absolute bottom-0 left-0 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) transition-[width,translate] duration-200 ease-in-out",t==="underline"?"data-[orientation=vertical]:-translate-x-px z-10 bg-[var(--opencami-accent)] data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5 data-[orientation=horizontal]:translate-y-px":"z-0 rounded-md bg-[var(--opencami-accent-light)]"),"data-slot":"tab-indicator"})]})}function ye({className:t,...a}){return z.jsx(ee,{className:Z('[&_svg]:-mx-0.5 relative z-10 flex h-8 shrink-0 grow cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium outline-none transition-[color,background-color,box-shadow] hover:text-primary-900 focus-visible:ring-2 focus-visible:ring-[var(--opencami-accent)] data-disabled:pointer-events-none data-[orientation=vertical]:w-full data-[orientation=vertical]:justify-start data-active:text-primary-900 data-disabled:opacity-64 [&_svg:not([class*="size-"])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0',t),"data-slot":"tabs-tab",...a})}export{Ie as T,Re as a,ye as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,r as s}from"./main-
|
|
1
|
+
import{j as t,r as s}from"./main-ZBMVSJTF.js";import{C as a,a as m,b as p}from"./_sessionKey-DYknvaDS.js";import{H as l,T as c,B as d}from"./button-DqP4GZwZ.js";import"./useQuery-DMTgpIql.js";import"./tooltip-CekkGEYG.js";import"./useOnFirstRender-DsFYFJoB.js";import"./useBaseUiId-DLhdkHJl.js";import"./event-2_Dxdv7h.js";import"./visuallyHidden-COI6QeQH.js";import"./DirectionContext-CQMv7g2N.js";import"./useMutation-CpD2Pn0F.js";import"./use-file-explorer-state-Dfyh4GwR.js";import"./composite-BLgu_EOL.js";import"./react-Akh4y69S.js";import"./useControlled-CpliTEve.js";import"./CSPContext-TfUptlEu.js";import"./menu-CB88T7R1.js";import"./useCompositeItem-DTSTTR0Z.js";import"./opencami-logo-C0Kj1DiT.js";import"./proxy-D-juuhw6.js";import"./markdown-CHUjmWcv.js";import"./index-C_gsW9fo.js";import"./index-T4TOjvD0.js";function x(){const[i,e]=s.useState(()=>typeof window<"u"?window.innerWidth<768:!1);return s.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia("(max-width: 767px)"),o=n=>e(n.matches);return r.addEventListener("change",o),e(r.matches),()=>r.removeEventListener("change",o)},[]),i}function P({content:i}){const e=x();return t.jsx("div",{className:"inline-flex flex-col",children:t.jsxs(a,{defaultOpen:!e,children:[t.jsxs(m,{render:t.jsx(d,{variant:"ghost",className:"h-auto gap-1.5 px-1.5 py-0.5 -mx-2"}),children:[t.jsx("span",{className:"text-sm font-medium text-primary-900",children:"Thinking"}),t.jsx(l,{icon:c,size:14,strokeWidth:1.5,className:"text-primary-900 transition-transform duration-150 group-data-panel-open:rotate-180"})]}),t.jsx(p,{children:t.jsx("div",{className:"pt-1 mb-3",children:t.jsx("p",{className:"text-sm text-primary-700 whitespace-pre-wrap",children:i})})})]})})}export{P as Thinking};
|