@nextclaw/ui 0.6.10 → 0.6.12
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/.eslintrc.cjs +10 -0
- package/CHANGELOG.md +16 -0
- package/dist/assets/ChannelsList-DBDjwf-X.js +1 -0
- package/dist/assets/ChatPage-C18sGGk1.js +36 -0
- package/dist/assets/DocBrowser-ZOplDEMS.js +1 -0
- package/dist/assets/LogoBadge-2LMzEMwe.js +1 -0
- package/dist/assets/MarketplacePage-D4JHYcB5.js +49 -0
- package/dist/assets/ModelConfig-DZVvdLFq.js +1 -0
- package/dist/assets/ProvidersList-Dum31480.js +1 -0
- package/dist/assets/{RuntimeConfig-BO6s-ls-.js → RuntimeConfig-4sb3mpkd.js} +1 -1
- package/dist/assets/SearchConfig-B4u_MxRG.js +1 -0
- package/dist/assets/{SecretsConfig-mayFdxpM.js → SecretsConfig-BQXblZvb.js} +2 -2
- package/dist/assets/SessionsConfig-Jk29xjQU.js +2 -0
- package/dist/assets/{card-BP5YnL-G.js → card-BekAnCgX.js} +1 -1
- package/dist/assets/config-layout-BHnOoweL.js +1 -0
- package/dist/assets/index-BXwjfCEO.css +1 -0
- package/dist/assets/index-Dl6t70wA.js +8 -0
- package/dist/assets/{input-B1D2QX0O.js → input-MMn_Na9q.js} +1 -1
- package/dist/assets/{label-DW0j-fXA.js → label-Dg2ydpN0.js} +1 -1
- package/dist/assets/{page-layout-Ch-H9gD-.js → page-layout-7K0rcz0I.js} +1 -1
- package/dist/assets/session-run-status-CAdjSqeb.js +3 -0
- package/dist/assets/{switch-_cZHlGKB.js → switch-DnDMlDVu.js} +1 -1
- package/dist/assets/{tabs-custom-ARxqYYjG.js → tabs-custom-khLM8lWj.js} +1 -1
- package/dist/assets/{useConfirmDialog-BaU7nIat.js → useConfirmDialog-BYA1XnVU.js} +2 -2
- package/dist/assets/{vendor-C--HHaLf.js → vendor-d7E8OgNx.js} +84 -84
- package/dist/index.html +3 -3
- package/package.json +4 -2
- package/src/App.tsx +3 -2
- package/src/api/config.ts +212 -200
- package/src/api/types.ts +93 -24
- package/src/components/chat/ChatConversationPanel.tsx +102 -121
- package/src/components/chat/ChatPage.tsx +165 -437
- package/src/components/chat/ChatSidebar.tsx +30 -36
- package/src/components/chat/ChatThread.tsx +73 -131
- package/src/components/chat/chat-input/ChatInputBarView.tsx +82 -0
- package/src/components/chat/chat-input/ChatInputBottomToolbar.tsx +71 -0
- package/src/components/chat/chat-input/components/ChatInputModelStateHint.tsx +39 -0
- package/src/components/chat/chat-input/components/ChatInputSelectedSkillsSection.tsx +31 -0
- package/src/components/chat/chat-input/components/ChatInputSlashPanelSection.tsx +112 -0
- package/src/components/chat/chat-input/components/bottom-toolbar/ChatInputAttachButton.tsx +24 -0
- package/src/components/chat/chat-input/components/bottom-toolbar/ChatInputModelSelector.tsx +58 -0
- package/src/components/chat/chat-input/components/bottom-toolbar/ChatInputSendControls.tsx +56 -0
- package/src/components/chat/chat-input/components/bottom-toolbar/ChatInputSessionTypeSelector.tsx +40 -0
- package/src/components/chat/chat-input/useChatInputBarController.ts +313 -0
- package/src/components/chat/chat-input.types.ts +15 -0
- package/src/components/chat/chat-page-data.ts +121 -0
- package/src/components/chat/chat-page-runtime.ts +221 -0
- package/src/components/chat/chat-session-route.ts +59 -0
- package/src/components/chat/chat-stream/nextbot-parsers.ts +52 -0
- package/src/components/chat/chat-stream/nextbot-runtime-agent.ts +413 -0
- package/src/components/chat/chat-stream/stream-event-adapter.ts +98 -0
- package/src/components/chat/chat-stream/transport.ts +159 -0
- package/src/components/chat/chat-stream/types.ts +76 -0
- package/src/components/chat/managers/chat-input.manager.ts +142 -0
- package/src/components/chat/managers/chat-run-status.manager.ts +32 -0
- package/src/components/chat/managers/chat-session-list.manager.ts +77 -0
- package/src/components/chat/managers/chat-stream-actions.manager.ts +34 -0
- package/src/components/chat/managers/chat-thread.manager.ts +86 -0
- package/src/components/chat/managers/chat-ui.manager.ts +65 -0
- package/src/components/chat/presenter/chat-presenter-context.tsx +25 -0
- package/src/components/chat/presenter/chat.presenter.ts +32 -0
- package/src/components/chat/stores/chat-input.store.ts +62 -0
- package/src/components/chat/stores/chat-run-status.store.ts +30 -0
- package/src/components/chat/stores/chat-session-list.store.ts +34 -0
- package/src/components/chat/stores/chat-thread.store.ts +52 -0
- package/src/components/chat/useChatRuntimeController.ts +134 -0
- package/src/components/chat/useChatSessionTypeState.ts +148 -0
- package/src/components/common/MaskedInput.tsx +1 -1
- package/src/components/config/SearchConfig.tsx +297 -0
- package/src/components/layout/Sidebar.tsx +6 -1
- package/src/hooks/useConfig.ts +48 -1
- package/src/hooks/useObservable.ts +20 -0
- package/src/lib/chat-message.ts +2 -202
- package/src/lib/chat-runtime-utils.ts +250 -0
- package/src/lib/i18n.ts +31 -0
- package/tsconfig.json +2 -1
- package/vite.config.ts +2 -1
- package/dist/assets/ChannelsList-TyMb5Mgz.js +0 -1
- package/dist/assets/ChatPage-CQerYqvy.js +0 -34
- package/dist/assets/DocBrowser-CNtrA0ps.js +0 -1
- package/dist/assets/LogoBadge-BLqiOM5D.js +0 -1
- package/dist/assets/MarketplacePage-CotZxxNe.js +0 -49
- package/dist/assets/ModelConfig-CCsQ8KFq.js +0 -1
- package/dist/assets/ProvidersList-BYYX5K_g.js +0 -1
- package/dist/assets/SessionsConfig-DAIczdBj.js +0 -2
- package/dist/assets/index-BUiahmWm.css +0 -1
- package/dist/assets/index-D6_5HaDl.js +0 -7
- package/dist/assets/session-run-status-BUYsQeWs.js +0 -5
- package/src/components/chat/ChatInputBar.tsx +0 -590
- package/src/components/chat/useChatStreamController.ts +0 -591
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,j as t,D as oe,a_ as ae,a$ as ne,aE as W,a1 as ie,w as le,b0 as ce,q as de,aA as ue,b1 as me}from"./vendor-d7E8OgNx.js";import{Y as we,D as Y,t as i,c as X,_ as xe}from"./index-Dl6t70wA.js";function pe(){const{isOpen:T,mode:g,tabs:A,activeTabId:N,currentTab:x,currentUrl:l,navVersion:p,close:F,toggleMode:$,goBack:I,goForward:_,canGoBack:O,canGoForward:G,navigate:y,syncUrl:S,setActiveTab:V,closeTab:H,openNewTab:q}=we(),[k,j]=s.useState(""),[E,C]=s.useState(!1),[J,h]=s.useState(!1),[d,D]=s.useState(()=>({x:Math.max(40,window.innerWidth-520),y:80})),[n,B]=s.useState({w:480,h:600}),[L,K]=s.useState(420),u=s.useRef(null),m=s.useRef(null),b=s.useRef(null),z=s.useRef(null),P=s.useRef(p),a=(x==null?void 0:x.kind)==="docs";s.useEffect(()=>{if(!a){j("");return}try{const e=new URL(l);j(e.pathname)}catch{j(l)}},[l,N,a]),s.useEffect(()=>{var e;if(a){if(p!==P.current){P.current=p;return}if((e=z.current)!=null&&e.contentWindow)try{const r=new URL(l).pathname;z.current.contentWindow.postMessage({type:"docs-navigate",path:r},"*")}catch{}}},[l,p,a]),s.useEffect(()=>{g==="floating"&&D(e=>({x:Math.max(40,window.innerWidth-n.w-40),y:e.y}))},[g,n.w]),s.useEffect(()=>{const e=r=>{var o;a&&((o=r.data)==null?void 0:o.type)==="docs-route-change"&&typeof r.data.url=="string"&&S(r.data.url)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[S,a]);const Q=s.useCallback(e=>{if(e.preventDefault(),!a)return;const r=k.trim();r&&(r.startsWith("/")?y(`${Y}${r}`):r.startsWith("http")?y(r):y(`${Y}/${r}`))},[k,y,a]),Z=s.useCallback(e=>{g==="floating"&&(C(!0),u.current={startX:e.clientX,startY:e.clientY,startPosX:d.x,startPosY:d.y})},[g,d]);s.useEffect(()=>{if(!E)return;const e=o=>{u.current&&D({x:u.current.startPosX+(o.clientX-u.current.startX),y:u.current.startPosY+(o.clientY-u.current.startY)})},r=()=>{C(!1),u.current=null};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",r),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",r)}},[E]);const M=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),h(!0);const r=e.currentTarget.dataset.axis;m.current={startX:e.clientX,startY:e.clientY,startW:n.w,startH:n.h};const o=w=>{m.current&&B(v=>({w:r==="y"?v.w:Math.max(360,m.current.startW+(w.clientX-m.current.startX)),h:r==="x"?v.h:Math.max(400,m.current.startH+(w.clientY-m.current.startY))}))},f=()=>{h(!1),m.current=null,window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",f)};window.addEventListener("mousemove",o),window.addEventListener("mouseup",f)},[n]),ee=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),h(!0),b.current={startX:e.clientX,startW:L};const r=f=>{if(!b.current)return;const w=b.current.startX-f.clientX;K(Math.max(320,Math.min(860,b.current.startW+w)))},o=()=>{h(!1),b.current=null,window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",o)},[L]),te=s.useCallback(e=>{e.preventDefault(),e.stopPropagation(),h(!0);const r=e.clientX,o=n.w,f=d.x,w=re=>{const se=r-re.clientX,U=Math.max(360,o+se);B(R=>({...R,w:U})),D(R=>({...R,x:f-(U-o)}))},v=()=>{h(!1),window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",v)};window.addEventListener("mousemove",w),window.addEventListener("mouseup",v)},[n.w,d.x]);if(!T)return null;const c=g==="docked";return t.jsxs("div",{className:X("flex flex-col bg-white overflow-hidden relative",c?"h-full border-l border-gray-200 shrink-0":"rounded-2xl shadow-2xl border border-gray-200"),style:c?{width:L}:{position:"fixed",left:d.x,top:d.y,width:n.w,height:n.h,zIndex:9999},children:[c&&t.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:ee}),t.jsxs("div",{className:X("flex items-center justify-between px-4 py-2.5 bg-gray-50 border-b border-gray-200 shrink-0 select-none",!c&&"cursor-grab active:cursor-grabbing"),onMouseDown:c?void 0:Z,children:[t.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[t.jsx(oe,{className:"w-4 h-4 text-primary shrink-0"}),t.jsx("span",{className:"text-sm font-semibold text-gray-900 truncate",children:i("docBrowserTitle")})]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("button",{onClick:$,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:c?i("docBrowserFloatMode"):i("docBrowserDockMode"),children:c?t.jsx(ae,{className:"w-3.5 h-3.5"}):t.jsx(ne,{className:"w-3.5 h-3.5"})}),t.jsx("button",{onClick:F,className:"hover:bg-gray-200 rounded-md p-1.5 text-gray-500 hover:text-gray-700 transition-colors",title:i("docBrowserClose"),children:t.jsx(W,{className:"w-3.5 h-3.5"})})]})]}),t.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-2 bg-white border-b border-gray-100 overflow-x-auto custom-scrollbar",children:[A.map(e=>{const r=e.id===N;return t.jsxs("div",{className:X("inline-flex items-center gap-1 h-7 px-1.5 rounded-lg text-xs border max-w-[220px] shrink-0 transition-colors",r?"bg-blue-50 border-blue-300 text-blue-700":"bg-gray-50 border-gray-200 text-gray-600 hover:bg-gray-100"),children:[t.jsx("button",{type:"button",onClick:()=>V(e.id),className:"truncate text-left px-1",title:e.title,children:e.title||i("docBrowserTabUntitled")}),t.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),H(e.id)},className:"rounded p-0.5 hover:bg-black/10","aria-label":i("docBrowserCloseTab"),children:t.jsx(W,{className:"w-3 h-3"})})]},e.id)}),t.jsx("button",{onClick:()=>q(void 0,{kind:"docs",title:"Docs"}),className:"inline-flex items-center justify-center w-7 h-7 rounded-lg border border-gray-200 bg-white text-gray-600 hover:bg-gray-100 shrink-0",title:i("docBrowserNewTab"),children:t.jsx(ie,{className:"w-3.5 h-3.5"})})]}),a&&t.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-2 bg-white border-b border-gray-100 shrink-0",children:[t.jsx("button",{onClick:I,disabled:!O,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:t.jsx(le,{className:"w-4 h-4"})}),t.jsx("button",{onClick:_,disabled:!G,className:"p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-600 transition-colors",children:t.jsx(ce,{className:"w-4 h-4"})}),t.jsxs("form",{onSubmit:Q,className:"flex-1 relative",children:[t.jsx(de,{className:"w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),t.jsx("input",{type:"text",value:k,onChange:e=>j(e.target.value),placeholder:i("docBrowserSearchPlaceholder"),className:"w-full h-8 pl-8 pr-3 rounded-lg bg-gray-50 border border-gray-200 text-xs text-gray-700 focus:outline-none focus:ring-1 focus:ring-primary/30 focus:border-primary/40 transition-colors placeholder:text-gray-400"})]})]}),t.jsxs("div",{className:"flex-1 relative overflow-hidden",children:[t.jsx("iframe",{ref:z,src:l,className:"absolute inset-0 w-full h-full border-0",title:(x==null?void 0:x.title)||"NextClaw Docs",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",allow:"clipboard-read; clipboard-write"},`${N}:${p}`),(J||E)&&t.jsx("div",{className:"absolute inset-0 z-10"})]}),a&&xe(l)&&t.jsx("div",{className:"flex items-center justify-between px-4 py-2 bg-gray-50 border-t border-gray-200 shrink-0",children:t.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer","data-doc-external":!0,className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary-hover font-medium transition-colors",children:[i("docBrowserOpenExternal"),t.jsx(ue,{className:"w-3 h-3"})]})}),!c&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"absolute top-0 left-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:te}),t.jsx("div",{className:"absolute top-0 right-0 w-1.5 h-full cursor-ew-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:M,"data-axis":"x"}),t.jsx("div",{className:"absolute bottom-0 left-0 h-1.5 w-full cursor-ns-resize z-20 hover:bg-primary/10 transition-colors",onMouseDown:M,"data-axis":"y"}),t.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 cursor-se-resize z-30 flex items-center justify-center text-gray-300 hover:text-gray-500 transition-colors",onMouseDown:M,children:t.jsx(me,{className:"w-3 h-3 rotate-[-45deg]"})})]})]})}export{pe as DocBrowser};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as d}from"./vendor-d7E8OgNx.js";import{c as a}from"./index-Dl6t70wA.js";const c={active:{dot:"bg-emerald-500",text:"text-emerald-600",bg:"bg-emerald-50"},ready:{dot:"bg-emerald-500",text:"text-emerald-600",bg:"bg-emerald-50"},inactive:{dot:"bg-gray-300",text:"text-gray-400",bg:"bg-gray-100/80"},setup:{dot:"bg-gray-300",text:"text-gray-400",bg:"bg-gray-100/80"},warning:{dot:"bg-amber-400",text:"text-amber-600",bg:"bg-amber-50"}};function b({status:s,label:r,className:n}){const t=c[s];return e.jsxs("div",{className:a("inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full px-2 py-0.5",t.bg,n),children:[e.jsx("span",{className:a("h-1.5 w-1.5 rounded-full",t.dot)}),e.jsx("span",{className:a("text-[11px] font-medium",t.text),children:r})]})}function p({name:s,src:r,className:n,imgClassName:t,fallback:o}){const[l,g]=d.useState(!1),i=!!r&&!l;return e.jsx("div",{className:a("inline-flex shrink-0 items-center justify-center overflow-hidden",n),children:i?e.jsx("img",{src:r,alt:`${s} logo`,className:a("block h-6 w-6 object-contain",t),onError:()=>g(!0),draggable:!1}):o??e.jsx("span",{className:"text-lg font-bold uppercase",children:s.slice(0,1)})})}export{p as L,b as S};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import{r as c,j as s,aj as Ve,ah as Je,ai as Xe,an as Pe,ak as Ye,ao as We,ap as O,al as je,am as Ze,aq as et,aw as tt,ax as at,aV as nt,aW as st,ay as rt,u as Ie,a as Ne,b as Ee,d as G,aJ as ot,aK as lt,aX as it}from"./vendor-d7E8OgNx.js";import{c as Me,X as F,t as d,i as ct,Y as ut,S as dt,e as pt,f as mt,g as gt,h as Te}from"./index-Dl6t70wA.js";import{T as ft}from"./tabs-custom-khLM8lWj.js";import{P as Re,u as xt}from"./useConfirmDialog-BYA1XnVU.js";import{P as ht,a as yt}from"./page-layout-7K0rcz0I.js";var[V]=et("Tooltip",[je]),J=je(),Le="TooltipProvider",bt=700,te="tooltip.open",[kt,se]=V(Le),De=e=>{const{__scopeTooltip:t,delayDuration:a=bt,skipDelayDuration:n=300,disableHoverableContent:r=!1,children:o}=e,i=c.useRef(!0),g=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const h=u.current;return()=>window.clearTimeout(h)},[]),s.jsx(kt,{scope:t,isOpenDelayedRef:i,delayDuration:a,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:g,onPointerInTransitChange:c.useCallback(h=>{g.current=h},[]),disableHoverableContent:r,children:o})};De.displayName=Le;var H="Tooltip",[vt,K]=V(H),$e=e=>{const{__scopeTooltip:t,children:a,open:n,defaultOpen:r,onOpenChange:o,disableHoverableContent:i,delayDuration:g}=e,u=se(H,e.__scopeTooltip),h=J(t),[p,y]=c.useState(null),v=Ve(),x=c.useRef(0),w=i??u.disableHoverableContent,f=g??u.delayDuration,S=c.useRef(!1),[I,C]=Je({prop:n,defaultProp:r??!1,onChange:T=>{T?(u.onOpen(),document.dispatchEvent(new CustomEvent(te))):u.onClose(),o==null||o(T)},caller:H}),E=c.useMemo(()=>I?S.current?"delayed-open":"instant-open":"closed",[I]),P=c.useCallback(()=>{window.clearTimeout(x.current),x.current=0,S.current=!1,C(!0)},[C]),M=c.useCallback(()=>{window.clearTimeout(x.current),x.current=0,C(!1)},[C]),D=c.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>{S.current=!0,C(!0),x.current=0},f)},[f,C]);return c.useEffect(()=>()=>{x.current&&(window.clearTimeout(x.current),x.current=0)},[]),s.jsx(Xe,{...h,children:s.jsx(vt,{scope:t,contentId:v,open:I,stateAttribute:E,trigger:p,onTriggerChange:y,onTriggerEnter:c.useCallback(()=>{u.isOpenDelayedRef.current?D():P()},[u.isOpenDelayedRef,D,P]),onTriggerLeave:c.useCallback(()=>{w?M():(window.clearTimeout(x.current),x.current=0)},[M,w]),onOpen:P,onClose:M,disableHoverableContent:w,children:a})})};$e.displayName=H;var ae="TooltipTrigger",_e=c.forwardRef((e,t)=>{const{__scopeTooltip:a,...n}=e,r=K(ae,a),o=se(ae,a),i=J(a),g=c.useRef(null),u=Pe(t,g,r.onTriggerChange),h=c.useRef(!1),p=c.useRef(!1),y=c.useCallback(()=>h.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),s.jsx(Ye,{asChild:!0,...i,children:s.jsx(We.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...n,ref:u,onPointerMove:O(e.onPointerMove,v=>{v.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(r.onTriggerEnter(),p.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{r.onTriggerLeave(),p.current=!1}),onPointerDown:O(e.onPointerDown,()=>{r.open&&r.onClose(),h.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:O(e.onFocus,()=>{h.current||r.onOpen()}),onBlur:O(e.onBlur,r.onClose),onClick:O(e.onClick,r.onClose)})})});_e.displayName=ae;var re="TooltipPortal",[wt,Tt]=V(re,{forceMount:void 0}),Oe=e=>{const{__scopeTooltip:t,forceMount:a,children:n,container:r}=e,o=K(re,t);return s.jsx(wt,{scope:t,forceMount:a,children:s.jsx(Re,{present:a||o.open,children:s.jsx(Ze,{asChild:!0,container:r,children:n})})})};Oe.displayName=re;var U="TooltipContent",Ae=c.forwardRef((e,t)=>{const a=Tt(U,e.__scopeTooltip),{forceMount:n=a.forceMount,side:r="top",...o}=e,i=K(U,e.__scopeTooltip);return s.jsx(Re,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Ue,{side:r,...o,ref:t}):s.jsx(St,{side:r,...o,ref:t})})}),St=c.forwardRef((e,t)=>{const a=K(U,e.__scopeTooltip),n=se(U,e.__scopeTooltip),r=c.useRef(null),o=Pe(t,r),[i,g]=c.useState(null),{trigger:u,onClose:h}=a,p=r.current,{onPointerInTransitChange:y}=n,v=c.useCallback(()=>{g(null),y(!1)},[y]),x=c.useCallback((w,f)=>{const S=w.currentTarget,I={x:w.clientX,y:w.clientY},C=Nt(I,S.getBoundingClientRect()),E=Et(I,C),P=Mt(f.getBoundingClientRect()),M=Lt([...E,...P]);g(M),y(!0)},[y]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(u&&p){const w=S=>x(S,p),f=S=>x(S,u);return u.addEventListener("pointerleave",w),p.addEventListener("pointerleave",f),()=>{u.removeEventListener("pointerleave",w),p.removeEventListener("pointerleave",f)}}},[u,p,x,v]),c.useEffect(()=>{if(i){const w=f=>{const S=f.target,I={x:f.clientX,y:f.clientY},C=(u==null?void 0:u.contains(S))||(p==null?void 0:p.contains(S)),E=!Rt(I,i);C?v():E&&(v(),h())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,p,i,h,v]),s.jsx(Ue,{...e,ref:o})}),[Ct,Pt]=V(H,{isInside:!1}),jt=st("TooltipContent"),Ue=c.forwardRef((e,t)=>{const{__scopeTooltip:a,children:n,"aria-label":r,onEscapeKeyDown:o,onPointerDownOutside:i,...g}=e,u=K(U,a),h=J(a),{onClose:p}=u;return c.useEffect(()=>(document.addEventListener(te,p),()=>document.removeEventListener(te,p)),[p]),c.useEffect(()=>{if(u.trigger){const y=v=>{const x=v.target;x!=null&&x.contains(u.trigger)&&p()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[u.trigger,p]),s.jsx(tt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:y=>y.preventDefault(),onDismiss:p,children:s.jsxs(at,{"data-state":u.stateAttribute,...h,...g,ref:t,style:{...g.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(jt,{children:n}),s.jsx(Ct,{scope:a,isInside:!0,children:s.jsx(nt,{id:u.contentId,role:"tooltip",children:r||n})})]})})});Ae.displayName=U;var Fe="TooltipArrow",It=c.forwardRef((e,t)=>{const{__scopeTooltip:a,...n}=e,r=J(a);return Pt(Fe,a).isInside?null:s.jsx(rt,{...r,...n,ref:t})});It.displayName=Fe;function Nt(e,t){const a=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(a,n,r,o)){case o:return"left";case r:return"right";case a:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Et(e,t,a=5){const n=[];switch(t){case"top":n.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":n.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":n.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":n.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return n}function Mt(e){const{top:t,right:a,bottom:n,left:r}=e;return[{x:r,y:t},{x:a,y:t},{x:a,y:n},{x:r,y:n}]}function Rt(e,t){const{x:a,y:n}=e;let r=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const g=t[o],u=t[i],h=g.x,p=g.y,y=u.x,v=u.y;p>n!=v>n&&a<(y-h)*(n-p)/(v-p)+h&&(r=!r)}return r}function Lt(e){const t=e.slice();return t.sort((a,n)=>a.x<n.x?-1:a.x>n.x?1:a.y<n.y?-1:a.y>n.y?1:0),Dt(t)}function Dt(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(r.y-i.y)>=(o.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const a=[];for(let n=e.length-1;n>=0;n--){const r=e[n];for(;a.length>=2;){const o=a[a.length-1],i=a[a.length-2];if((o.x-i.x)*(r.y-i.y)>=(o.y-i.y)*(r.x-i.x))a.pop();else break}a.push(r)}return a.pop(),t.length===1&&a.length===1&&t[0].x===a[0].x&&t[0].y===a[0].y?t:t.concat(a)}var $t=De,_t=$e,Ot=_e,At=Oe,ze=Ae;const Ut=$t,W=_t,Z=Ot,Q=c.forwardRef(({className:e,sideOffset:t=4,...a},n)=>s.jsx(At,{children:s.jsx(ze,{ref:n,sideOffset:t,className:Me("z-[var(--z-tooltip)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Q.displayName=ze.displayName;function X(e){return e==="plugin"?"plugins":"skills"}async function Ft(e){var o,i;const t=new URLSearchParams,a=X(e.type);(o=e.q)!=null&&o.trim()&&t.set("q",e.q.trim()),(i=e.tag)!=null&&i.trim()&&t.set("tag",e.tag.trim()),e.sort&&t.set("sort",e.sort),typeof e.page=="number"&&Number.isFinite(e.page)&&t.set("page",String(Math.max(1,Math.trunc(e.page)))),typeof e.pageSize=="number"&&Number.isFinite(e.pageSize)&&t.set("pageSize",String(Math.max(1,Math.trunc(e.pageSize))));const n=t.toString(),r=await F.get(n?`/api/marketplace/${a}/items?${n}`:`/api/marketplace/${a}/items`);if(!r.ok)throw new Error(r.error.message);return r.data}async function zt(e){const t=await F.get(`/api/marketplace/skills/items/${encodeURIComponent(e)}/content`);if(!t.ok)throw new Error(t.error.message);return t.data}async function qt(e){const t=await F.get(`/api/marketplace/plugins/items/${encodeURIComponent(e)}/content`);if(!t.ok)throw new Error(t.error.message);return t.data}async function Ht(e){const t=X(e.type),a=await F.post(`/api/marketplace/${t}/install`,e);if(!a.ok)throw new Error(a.error.message);return a.data}async function Kt(e){const t=X(e),a=await F.get(`/api/marketplace/${t}/installed`);if(!a.ok)throw new Error(a.error.message);return a.data}async function Bt(e){const t=X(e.type),a=await F.post(`/api/marketplace/${t}/manage`,e);if(!a.ok)throw new Error(a.error.message);return a.data}function Qt(e){return Ie({queryKey:["marketplace-items",e],queryFn:()=>Ft(e),staleTime:15e3})}function Gt(e){return Ie({queryKey:["marketplace-installed",e],queryFn:()=>Kt(e),staleTime:1e4})}function Vt(){const e=Ne();return Ee({mutationFn:t=>Ht(t),onSuccess:t=>{e.invalidateQueries({queryKey:["marketplace-installed",t.type]}),e.refetchQueries({queryKey:["marketplace-installed",t.type],type:"active"}),e.refetchQueries({queryKey:["marketplace-items"],type:"active"});const a=t.type==="plugin"?d("marketplaceInstallSuccessPlugin"):d("marketplaceInstallSuccessSkill");G.success(t.message||a)},onError:t=>{G.error(t.message||d("marketplaceInstallFailed"))}})}function Jt(){const e=Ne();return Ee({mutationFn:t=>Bt(t),onSuccess:t=>{e.invalidateQueries({queryKey:["marketplace-installed",t.type]}),e.invalidateQueries({queryKey:["marketplace-items"]}),e.refetchQueries({queryKey:["marketplace-installed",t.type],type:"active"}),e.refetchQueries({queryKey:["marketplace-items"],type:"active"});const a=t.action==="enable"?d("marketplaceEnableSuccess"):t.action==="disable"?d("marketplaceDisableSuccess"):d("marketplaceUninstallSuccess");G.success(t.message||a)},onError:t=>{G.error(t.message||d("marketplaceOperationFailed"))}})}const Xt=12;function ne(e){return(e??"").trim().toLowerCase()}function A(e,t){const a=ne(t);return a.length>0?`${e}:${a}`:""}function Yt(e){const t=new Map;for(const a of e){const n=[a.install.spec,a.slug,a.id];for(const r of n){const o=A(a.type,r);!o||t.has(o)||t.set(o,a)}}return t}function Wt(e){const t=new Map;for(const a of e){const n=[a.spec,a.id,a.label];for(const r of n){const o=A(a.type,r);!o||t.has(o)||t.set(o,a)}}return t}function Se(e,t){const a=[e.install.spec,e.slug,e.id];for(const n of a){const r=A(e.type,n);if(!r)continue;const o=t.get(r);if(o)return o}}function Zt(e,t){const a=t.get(A(e.type,e.spec));if(a)return a;const n=t.get(A(e.type,e.id));return n||t.get(A(e.type,e.label))}function ea(e){const t=e.trim().toLowerCase().replace(/_/g,"-"),a=t.split("-")[0],n=[t,a,"en"];return Array.from(new Set(n.filter(Boolean)))}function ee(e){return e.trim().toLowerCase().replace(/_/g,"-")}function oe(e,t,a){var n;if(e){const r=Object.entries(e).map(([o,i])=>({locale:ee(o),text:typeof i=="string"?i.trim():""})).filter(o=>o.text.length>0);if(r.length>0){const o=new Map(r.map(i=>[i.locale,i.text]));for(const i of a){const g=ee(i),u=o.get(g);if(u)return u}for(const i of a){const g=ee(i).split("-")[0];if(!g)continue;const u=r.find(h=>h.locale===g||h.locale.startsWith(`${g}-`));if(u)return u.text}return((n=r[0])==null?void 0:n.text)??""}}return(t==null?void 0:t.trim())??""}function ta(e,t,a,n){const r=ne(a);if(!r)return!0;const o=oe(t==null?void 0:t.summaryI18n,t==null?void 0:t.summary,n);return[e.id,e.spec,e.label,t==null?void 0:t.name,t==null?void 0:t.slug,t==null?void 0:t.summary,o,...(t==null?void 0:t.tags)??[]].map(g=>ne(g)).filter(Boolean).some(g=>g.includes(r))}function aa(e){const t=["bg-amber-600","bg-orange-500","bg-yellow-600","bg-emerald-600","bg-teal-600","bg-cyan-600","bg-stone-600","bg-rose-500","bg-violet-500"];let a=0;for(let n=0;n<e.length;n++)a=e.charCodeAt(n)+((a<<5)-a);return t[Math.abs(a)%t.length]}function na({name:e,fallback:t}){const a=e||t,n=a.substring(0,2).toUpperCase(),r=aa(a);return s.jsx("div",{className:Me("flex items-center justify-center w-10 h-10 rounded-xl text-white font-semibold text-sm shrink-0",r),children:n})}function N(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function q(e){var g,u,h,p;const t=((g=e.metadataRaw)==null?void 0:g.trim())||"-",a=((u=e.contentRaw)==null?void 0:u.trim())||"-",n=(h=e.summary)==null?void 0:h.trim(),r=(p=e.description)==null?void 0:p.trim(),o=!!r&&r!==n,i=`<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>${N(e.title)}</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root { color-scheme: light; }
|
|
9
|
+
body { margin: 0; background: #f7f9fc; color: #0f172a; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
|
|
10
|
+
.wrap { max-width: 980px; margin: 0 auto; padding: 28px 20px 40px; }
|
|
11
|
+
.hero { border: 1px solid #dbeafe; border-radius: 16px; background: linear-gradient(180deg, #eff6ff, #ffffff); padding: 20px; box-shadow: 0 6px 20px rgba(30, 64, 175, 0.08); }
|
|
12
|
+
.hero h1 { margin: 0; font-size: 26px; }
|
|
13
|
+
.meta { margin-top: 8px; color: #475569; font-size: 13px; overflow-wrap: anywhere; word-break: break-word; }
|
|
14
|
+
.summary { margin-top: 14px; font-size: 14px; line-height: 1.7; color: #334155; }
|
|
15
|
+
.grid { display: grid; grid-template-columns: 260px 1fr; gap: 14px; margin-top: 16px; }
|
|
16
|
+
.card { border: 1px solid #e2e8f0; background: #fff; border-radius: 14px; overflow: hidden; }
|
|
17
|
+
.card h2 { margin: 0; padding: 12px 14px; font-size: 13px; font-weight: 700; color: #1d4ed8; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
|
|
18
|
+
.card .body { padding: 12px 14px; font-size: 13px; color: #334155; line-height: 1.7; }
|
|
19
|
+
.code { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.6; margin: 0; }
|
|
20
|
+
.tags { margin-top: 10px; }
|
|
21
|
+
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 4px 9px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: 11px; }
|
|
22
|
+
.source { color: #2563eb; text-decoration: none; overflow-wrap: anywhere; word-break: break-all; }
|
|
23
|
+
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<main class="wrap">
|
|
28
|
+
<section class="hero">
|
|
29
|
+
<h1>${N(e.title)}</h1>
|
|
30
|
+
<div class="meta">${N(e.typeLabel)} · ${N(e.spec)}${e.author?` · ${N(e.author)}`:""}</div>
|
|
31
|
+
${n?`<p class="summary">${N(n)}</p>`:""}
|
|
32
|
+
${o?`<p class="summary">${N(r)}</p>`:""}
|
|
33
|
+
${e.tags&&e.tags.length>0?`<div class="tags">${e.tags.map(y=>`<span class="tag">${N(y)}</span>`).join("")}</div>`:""}
|
|
34
|
+
${e.sourceUrl?`<p class="meta" style="margin-top:12px;">${N(e.sourceLabel??"Source")}: <a class="source" href="${N(e.sourceUrl)}" target="_blank" rel="noopener noreferrer">${N(e.sourceUrl)}</a></p>`:""}
|
|
35
|
+
</section>
|
|
36
|
+
|
|
37
|
+
<section class="grid">
|
|
38
|
+
<article class="card">
|
|
39
|
+
<h2>Metadata</h2>
|
|
40
|
+
<div class="body"><pre class="code">${N(t)}</pre></div>
|
|
41
|
+
</article>
|
|
42
|
+
<article class="card">
|
|
43
|
+
<h2>Content</h2>
|
|
44
|
+
<div class="body"><pre class="code">${N(a)}</pre></div>
|
|
45
|
+
</article>
|
|
46
|
+
</section>
|
|
47
|
+
</main>
|
|
48
|
+
</body>
|
|
49
|
+
</html>`;return`data:text/html;charset=utf-8,${encodeURIComponent(i)}`}function sa(e){return s.jsx("div",{className:"mb-4",children:s.jsxs("div",{className:"flex gap-3 items-center",children:[s.jsxs("div",{className:"flex-1 min-w-0 relative",children:[s.jsx(it,{className:"h-4 w-4 text-gray-400 absolute left-3 top-1/2 -translate-y-1/2"}),s.jsx("input",{value:e.searchText,onChange:t=>e.onSearchTextChange(t.target.value),placeholder:e.searchPlaceholder,className:"w-full h-9 border border-gray-200/80 rounded-xl pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40"})]}),e.scope==="all"&&s.jsxs(dt,{value:e.sort,onValueChange:t=>e.onSortChange(t),children:[s.jsx(pt,{className:"h-9 w-[150px] shrink-0 rounded-lg",children:s.jsx(mt,{})}),s.jsxs(gt,{children:[s.jsx(Te,{value:"relevance",children:d("marketplaceSortRelevance")}),s.jsx(Te,{value:"updated",children:d("marketplaceSortUpdated")})]})]})]})})}function Ce(e){var I,C,E,P,M,D;const t=e.record,a=(t==null?void 0:t.type)==="plugin"?t:void 0,n=((I=e.item)==null?void 0:I.type)??(t==null?void 0:t.type),r=((C=e.item)==null?void 0:C.name)??(t==null?void 0:t.label)??(t==null?void 0:t.id)??(t==null?void 0:t.spec)??d("marketplaceUnknownItem"),o=oe((E=e.item)==null?void 0:E.summaryI18n,(P=e.item)==null?void 0:P.summary,e.localeFallbacks)||(t?d("marketplaceInstalledLocalSummary"):""),i=((M=e.item)==null?void 0:M.install.spec)??(t==null?void 0:t.spec)??"",g=(t==null?void 0:t.id)||(t==null?void 0:t.spec),u=!!g&&e.manageState.isPending&&e.manageState.targetId===g,h=!!a,p=(t==null?void 0:t.type)==="plugin"&&t.origin!=="bundled",y=(t==null?void 0:t.type)==="skill"&&t.source==="workspace",v=!!(p||y),x=t?t.enabled===!1||t.runtimeStatus==="disabled":!1,w=(D=e.item)==null?void 0:D.install.spec,f=typeof w=="string"&&e.installState.installingSpecs.has(w),S=n==="plugin"?d("marketplaceTypePlugin"):n==="skill"?d("marketplaceTypeSkill"):d("marketplaceTypeExtension");return s.jsxs("article",{onClick:e.onOpen,className:"group bg-white border border-gray-200/40 hover:border-blue-300/80 rounded-2xl px-5 py-4 hover:shadow-md shadow-sm transition-all flex items-start gap-3.5 justify-between cursor-pointer",children:[s.jsxs("div",{className:"flex gap-3 min-w-0 flex-1 h-full items-start",children:[s.jsx(na,{name:r,fallback:i||d("marketplaceTypeExtension")}),s.jsx("div",{className:"min-w-0 flex-1 flex flex-col justify-center h-full",children:s.jsxs(Ut,{delayDuration:400,children:[s.jsxs(W,{children:[s.jsx(Z,{asChild:!0,children:s.jsx("div",{className:"text-[14px] font-semibold text-gray-900 truncate leading-tight",children:r})}),s.jsx(Q,{className:"max-w-[300px] text-xs",children:r})]}),s.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5 mb-1.5",children:[s.jsx("span",{className:"text-[11px] text-gray-500 font-medium",children:S}),i&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-[10px] text-gray-300",children:"•"}),s.jsxs(W,{children:[s.jsx(Z,{asChild:!0,children:s.jsx("span",{className:"text-[11px] text-gray-400 truncate max-w-full font-mono",children:i})}),s.jsx(Q,{className:"max-w-[300px] text-xs font-mono break-all",children:i})]})]})]}),s.jsxs(W,{children:[s.jsx(Z,{asChild:!0,children:s.jsx("p",{className:"text-[12px] text-gray-500/90 line-clamp-1 transition-colors leading-relaxed text-left",children:o})}),o&&s.jsx(Q,{className:"max-w-[400px] text-xs leading-relaxed",children:o})]})]})})]}),s.jsxs("div",{className:"shrink-0 flex items-center h-full",children:[e.item&&!t&&s.jsx("button",{onClick:T=>{T.stopPropagation(),e.onInstall(e.item)},disabled:f,className:"inline-flex items-center gap-1.5 h-8 px-4 rounded-xl text-xs font-medium bg-primary text-white hover:bg-primary-600 disabled:opacity-50 transition-colors",children:f?d("marketplaceInstalling"):d("marketplaceInstall")}),a&&h&&s.jsx("button",{disabled:e.manageState.isPending,onClick:T=>{T.stopPropagation(),e.onManage(x?"enable":"disable",a)},className:"inline-flex items-center h-8 px-4 rounded-xl text-xs font-medium border border-gray-200/80 text-gray-600 bg-white hover:bg-gray-50 hover:border-gray-300 disabled:opacity-50 transition-colors",children:u&&e.manageState.action!=="uninstall"?e.manageState.action==="enable"?d("marketplaceEnabling"):d("marketplaceDisabling"):x?d("marketplaceEnable"):d("marketplaceDisable")}),t&&v&&s.jsx("button",{disabled:e.manageState.isPending,onClick:T=>{T.stopPropagation(),e.onManage("uninstall",t)},className:"inline-flex items-center h-8 px-4 rounded-xl text-xs font-medium border border-rose-100 text-rose-500 bg-white hover:bg-rose-50 hover:border-rose-200 disabled:opacity-50 transition-colors",children:u&&e.manageState.action==="uninstall"?d("marketplaceRemoving"):d("marketplaceUninstall")})]})]})}function ra(e){return s.jsxs("div",{className:"mt-4 flex items-center justify-end gap-2",children:[s.jsx("button",{className:"h-8 px-3 rounded-xl border border-gray-200/80 text-sm text-gray-600 disabled:opacity-40",onClick:e.onPrev,disabled:e.page<=1||e.busy,children:d("prev")}),s.jsx("div",{className:"text-sm text-gray-600 min-w-20 text-center",children:e.totalPages===0?"0 / 0":`${e.page} / ${e.totalPages}`}),s.jsx("button",{className:"h-8 px-3 rounded-xl border border-gray-200/80 text-sm text-gray-600 disabled:opacity-40",onClick:e.onNext,disabled:e.totalPages===0||e.page>=e.totalPages||e.busy,children:d("next")})]})}function oa(e={}){var fe,xe,he,ye,be,ke,ve,we;const t=ot(),a=lt(),{language:n}=ct(),r=ut(),o=e.forcedType,i=c.useMemo(()=>o==="plugins"||o==="skills"?o:a.type==="plugins"||a.type==="skills"?a.type:null,[o,a.type]);c.useEffect(()=>{o||i||t("/marketplace/plugins",{replace:!0})},[o,i,t]);const g=i==="skills"?"skill":"plugin",u=c.useMemo(()=>ea(n),[n]),p=g==="plugin"?{pageTitle:"marketplacePluginsPageTitle",pageDescription:"marketplacePluginsPageDescription",tabMarketplace:"marketplaceTabMarketplacePlugins",tabInstalled:"marketplaceTabInstalledPlugins",searchPlaceholder:"marketplaceSearchPlaceholderPlugins",sectionCatalog:"marketplaceSectionPlugins",sectionInstalled:"marketplaceSectionInstalledPlugins",errorLoadData:"marketplaceErrorLoadingPluginsData",errorLoadInstalled:"marketplaceErrorLoadingInstalledPlugins",emptyData:"marketplaceNoPlugins",emptyInstalled:"marketplaceNoInstalledPlugins",installedCountSuffix:"marketplaceInstalledPluginsCountSuffix"}:{pageTitle:"marketplaceSkillsPageTitle",pageDescription:"marketplaceSkillsPageDescription",tabMarketplace:"marketplaceTabMarketplaceSkills",tabInstalled:"marketplaceTabInstalledSkills",searchPlaceholder:"marketplaceSearchPlaceholderSkills",sectionCatalog:"marketplaceSectionSkills",sectionInstalled:"marketplaceSectionInstalledSkills",errorLoadData:"marketplaceErrorLoadingSkillsData",errorLoadInstalled:"marketplaceErrorLoadingInstalledSkills",emptyData:"marketplaceNoSkills",emptyInstalled:"marketplaceNoInstalledSkills",installedCountSuffix:"marketplaceInstalledSkillsCountSuffix"},[y,v]=c.useState(""),[x,w]=c.useState(""),[f,S]=c.useState("all"),[I,C]=c.useState("relevance"),[E,P]=c.useState(1),[M,D]=c.useState(new Set);c.useEffect(()=>{const l=setTimeout(()=>{P(1),w(y.trim())},250);return()=>clearTimeout(l)},[y]),c.useEffect(()=>{P(1)},[g]);const T=Gt(g),R=Qt({q:x||void 0,type:g,sort:I,page:E,pageSize:Xt}),qe=Vt(),$=Jt(),{confirm:He,ConfirmDialog:Ke}=xt(),B=c.useMemo(()=>{var l;return((l=T.data)==null?void 0:l.records)??[]},[(fe=T.data)==null?void 0:fe.records]),_=c.useMemo(()=>{var l;return((l=R.data)==null?void 0:l.items)??[]},[(xe=R.data)==null?void 0:xe.items]),le=c.useMemo(()=>Yt(_),[_]),ie=c.useMemo(()=>Wt(B),[B]),z=c.useMemo(()=>{const l=B.filter(m=>m.type===g).map(m=>({key:`${m.type}:${m.spec}:${m.id??""}`,record:m,item:Zt(m,le)})).filter(m=>ta(m.record,m.item,x,u));return l.sort((m,k)=>{const j=m.record.installedAt?Date.parse(m.record.installedAt):Number.NaN,b=k.record.installedAt?Date.parse(k.record.installedAt):Number.NaN,L=!Number.isNaN(j),Ge=!Number.isNaN(b);return L&&Ge&&j!==b?b-j:m.record.spec.localeCompare(k.record.spec)}),l},[B,g,le,x,u]),ce=f==="installed"?z.length:((he=R.data)==null?void 0:he.total)??0,Y=f==="installed"?1:((ye=R.data)==null?void 0:ye.totalPages)??0,Be=c.useMemo(()=>f==="installed"?T.isLoading?d("loading"):`${z.length} ${d(p.installedCountSuffix)}`:R.data?`${_.length} / ${ce}`:d("loading"),[f,T.isLoading,z.length,R.data,_.length,ce,p.installedCountSuffix]),ue={installingSpecs:M},de={isPending:$.isPending,targetId:((be=$.variables)==null?void 0:be.id)||((ke=$.variables)==null?void 0:ke.spec),action:(ve=$.variables)==null?void 0:ve.action},Qe=[{id:"all",label:d(p.tabMarketplace)},{id:"installed",label:d(p.tabInstalled),count:((we=T.data)==null?void 0:we.total)??0}],pe=async l=>{const m=l.install.spec;if(!M.has(m)){D(k=>{const j=new Set(k);return j.add(m),j});try{await qe.mutateAsync({type:l.type,spec:m,kind:l.install.kind,...l.type==="skill"?{skill:l.slug,installPath:`skills/${l.slug}`}:{}})}catch{}finally{D(k=>{if(!k.has(m))return k;const j=new Set(k);return j.delete(m),j})}}},me=async(l,m)=>{if($.isPending)return;const k=m.id||m.spec;k&&(l==="uninstall"&&!await He({title:`${d("marketplaceUninstallTitle")} ${k}?`,description:d("marketplaceUninstallDescription"),confirmLabel:d("marketplaceUninstall"),variant:"destructive"})||$.mutate({type:m.type,action:l,id:k,spec:m.spec}))},ge=async(l,m)=>{const k=(l==null?void 0:l.name)??(m==null?void 0:m.label)??(m==null?void 0:m.id)??(m==null?void 0:m.spec)??d("marketplaceUnknownItem");if(!l){const b=q({title:k,typeLabel:(m==null?void 0:m.type)==="plugin"?d("marketplaceTypePlugin"):d("marketplaceTypeSkill"),spec:(m==null?void 0:m.spec)??"-",summary:d("marketplaceInstalledLocalSummary"),metadataRaw:JSON.stringify(m??{},null,2),contentRaw:"-"});r.open(b,{newTab:!0,title:k,kind:"content"});return}const j=oe(l.summaryI18n,l.summary,u);if(l.type==="skill"){try{const b=await zt(l.slug),L=q({title:k,typeLabel:d("marketplaceTypeSkill"),spec:l.install.spec,summary:j,metadataRaw:b.metadataRaw,contentRaw:b.bodyRaw||b.raw,sourceUrl:b.sourceUrl,sourceLabel:`Source (${b.source})`,tags:l.tags,author:l.author});r.open(L,{newTab:!0,title:k,kind:"content"})}catch(b){const L=q({title:k,typeLabel:d("marketplaceTypeSkill"),spec:l.install.spec,summary:j,metadataRaw:JSON.stringify({error:b instanceof Error?b.message:String(b)},null,2),contentRaw:d("marketplaceOperationFailed")});r.open(L,{newTab:!0,title:k,kind:"content"})}return}try{const b=await qt(l.slug),L=q({title:k,typeLabel:d("marketplaceTypePlugin"),spec:l.install.spec,summary:j,metadataRaw:b.metadataRaw,contentRaw:b.bodyRaw||b.raw||l.summary,sourceUrl:b.sourceUrl,sourceLabel:`Source (${b.source})`,tags:l.tags,author:l.author});r.open(L,{newTab:!0,title:k,kind:"content"})}catch(b){const L=q({title:k,typeLabel:d("marketplaceTypePlugin"),spec:l.install.spec,summary:j,metadataRaw:JSON.stringify({error:b instanceof Error?b.message:String(b)},null,2),contentRaw:"-"});r.open(L,{newTab:!0,title:k,kind:"content"})}};return s.jsxs(ht,{className:"flex h-full min-h-0 flex-col pb-0",children:[s.jsx(yt,{title:d(p.pageTitle),description:d(p.pageDescription)}),s.jsx(ft,{tabs:Qe,activeTab:f,onChange:l=>{S(l),P(1)},className:"mb-4"}),s.jsx(sa,{scope:f,searchText:y,searchPlaceholder:d(p.searchPlaceholder),sort:I,onSearchTextChange:v,onSortChange:l=>{P(1),C(l)}}),s.jsxs("section",{className:"flex min-h-0 flex-1 flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-[14px] font-semibold text-gray-900",children:f==="installed"?d(p.sectionInstalled):d(p.sectionCatalog)}),s.jsx("span",{className:"text-[12px] text-gray-500",children:Be})]}),f==="all"&&R.isError&&s.jsxs("div",{className:"p-4 rounded-xl bg-rose-50 border border-rose-200 text-rose-700 text-sm",children:[d(p.errorLoadData),": ",R.error.message]}),f==="installed"&&T.isError&&s.jsxs("div",{className:"p-4 rounded-xl bg-rose-50 border border-rose-200 text-rose-700 text-sm",children:[d(p.errorLoadInstalled),": ",T.error.message]}),s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto custom-scrollbar pr-1",children:[s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-3",children:[f==="all"&&_.map(l=>s.jsx(Ce,{item:l,record:Se(l,ie),localeFallbacks:u,installState:ue,manageState:de,onOpen:()=>void ge(l,Se(l,ie)),onInstall:pe,onManage:me},l.id)),f==="installed"&&z.map(l=>s.jsx(Ce,{item:l.item,record:l.record,localeFallbacks:u,installState:ue,manageState:de,onOpen:()=>void ge(l.item,l.record),onInstall:pe,onManage:me},l.key))]}),f==="all"&&!R.isLoading&&!R.isError&&_.length===0&&s.jsx("div",{className:"text-[13px] text-gray-500 py-8 text-center",children:d(p.emptyData)}),f==="installed"&&!T.isLoading&&!T.isError&&z.length===0&&s.jsx("div",{className:"text-[13px] text-gray-500 py-8 text-center",children:d(p.emptyInstalled)})]})]}),f==="all"&&s.jsx("div",{className:"shrink-0",children:s.jsx(ra,{page:E,totalPages:Y,busy:R.isFetching,onPrev:()=>P(l=>Math.max(1,l-1)),onNext:()=>P(l=>Y>0?Math.min(Y,l+1):l+1)})}),s.jsx(Ke,{})]})}const pa=Object.freeze(Object.defineProperty({__proto__:null,MarketplacePage:oa},Symbol.toStringTag,{value:"Module"}));export{oa as M,Ut as T,W as a,Z as b,Q as c,pa as d,Gt as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as i,Z as q,k as z,p as G,D as K,_ as Y,a0 as Z}from"./vendor-d7E8OgNx.js";import{P as $,a as J,B as Q}from"./page-layout-7K0rcz0I.js";import{C as U}from"./card-BekAnCgX.js";import{I as A}from"./input-MMn_Na9q.js";import{L as _}from"./label-Dg2ydpN0.js";import{c as L,u as X,a as H,b as ee,d as se,t as c,S as te,e as ae,f as le,g as re,h as ne,D as oe}from"./index-Dl6t70wA.js";import{h as R}from"./config-hints-CApS3K_7.js";import{b as ie,f as ce,t as T,c as de}from"./provider-models-y4mUDcGF.js";function h({className:o,...l}){return e.jsx("div",{className:L("animate-pulse rounded-md bg-slate-200",o),...l})}function me(o){const l=new Set;for(const u of o){const m=u.trim();m.length>0&&l.add(m)}return[...l]}function xe({id:o,value:l,onChange:u,options:m,placeholder:N,className:w,inputClassName:y,emptyText:b,createText:f,maxItems:v=Number.POSITIVE_INFINITY,onEnter:M}){const[C,r]=i.useState(!1),d=i.useMemo(()=>me(m),[m]),a=l.trim().toLowerCase(),g=i.useMemo(()=>{const s=d.map((x,j)=>({option:x,index:j}));a.length>0&&s.sort((x,j)=>{const S=x.option.toLowerCase(),k=j.option.toLowerCase(),D=S===a?0:S.startsWith(a)?1:S.includes(a)?2:3,I=k===a?0:k.startsWith(a)?1:k.includes(a)?2:3;return D!==I?D-I:x.index-j.index});const p=s.map(x=>x.option);return Number.isFinite(v)?p.slice(0,Math.max(1,v)):p},[d,a,v]),n=l.trim().length>0&&d.some(s=>s===l.trim());return e.jsxs("div",{className:L("relative",w),onBlur:()=>{setTimeout(()=>r(!1),120)},children:[e.jsx(A,{id:o,value:l,onFocus:()=>r(!0),onChange:s=>{u(s.target.value),C||r(!0)},onKeyDown:s=>{s.key==="Enter"&&(M&&(s.preventDefault(),M()),r(!1))},placeholder:N,className:L("pr-10",y)}),e.jsx("button",{type:"button",onMouseDown:s=>s.preventDefault(),onClick:()=>r(s=>!s),className:"absolute inset-y-0 right-0 inline-flex w-10 items-center justify-center text-gray-400 hover:text-gray-600","aria-label":"toggle model options",children:e.jsx(q,{className:"h-4 w-4"})}),C&&e.jsx("div",{className:"absolute z-20 mt-1 w-full overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg",children:e.jsxs("div",{className:"max-h-60 overflow-y-auto py-1",children:[!n&&l.trim().length>0&&e.jsxs("button",{type:"button",onMouseDown:s=>s.preventDefault(),onClick:()=>{u(l.trim()),r(!1)},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-gray-50",children:[e.jsx(z,{className:"h-4 w-4 text-transparent"}),e.jsx("span",{className:"truncate text-gray-700",children:f?f.replace("{value}",l.trim()):l.trim()})]}),g.map(s=>e.jsxs("button",{type:"button",onMouseDown:p=>p.preventDefault(),onClick:()=>{u(s),r(!1)},className:"flex w-full items-center gap-2 px-3 py-2 text-left text-sm hover:bg-gray-50",children:[e.jsx(z,{className:L("h-4 w-4",s===l.trim()?"text-primary":"text-transparent")}),e.jsx("span",{className:"truncate text-gray-700",children:s})]},s)),g.length===0&&l.trim().length===0&&e.jsx("div",{className:"px-3 py-2 text-sm text-gray-500",children:b??"No models available"})]})})]})}function ye(){const{data:o,isLoading:l}=X(),{data:u}=H(),{data:m}=ee(),N=se(),[w,y]=i.useState(""),[b,f]=i.useState(""),[v,M]=i.useState(""),C=m==null?void 0:m.uiHints,r=R("agents.defaults.model",C),d=R("agents.defaults.workspace",C),a=i.useMemo(()=>ie({meta:u,config:o}),[o,u]),g=i.useMemo(()=>new Map(a.map(t=>[t.name,t])),[a]),n=g.get(w)??a[0],s=(n==null?void 0:n.name)??"",p=i.useMemo(()=>(n==null?void 0:n.aliases)??[],[n]),x=i.useMemo(()=>(n==null?void 0:n.models)??[],[n]);i.useEffect(()=>{w||a.length===0||y(a[0].name)},[w,a]),i.useEffect(()=>{var E,F,B;if(!((E=o==null?void 0:o.agents)!=null&&E.defaults))return;const t=(o.agents.defaults.model||"").trim(),P=ce(t,a)??((F=a[0])==null?void 0:F.name)??"",W=((B=g.get(P))==null?void 0:B.aliases)??[];y(P),f(T(t,W)),M(o.agents.defaults.workspace||"")},[o,a,g]);const j=i.useMemo(()=>{const t=new Set;for(const O of x){const P=O.trim();P&&t.add(P)}return[...t]},[x]),S=i.useMemo(()=>{const t=T(b,p);return t?de((n==null?void 0:n.prefix)??"",t):""},[b,n,p]),k=c("modelIdentifierHelp")||(r==null?void 0:r.help)||"",D=t=>{y(t),f("")},I=t=>{f(T(t,p))},V=t=>{t.preventDefault(),N.mutate({model:S})};return l?e.jsxs("div",{className:"max-w-2xl space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{className:"h-8 w-32"}),e.jsx(h,{className:"h-4 w-48"})]}),e.jsxs(U,{className:"rounded-2xl border-gray-200 p-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsx(h,{className:"h-12 w-12 rounded-xl"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{className:"h-5 w-24"}),e.jsx(h,{className:"h-3 w-32"})]})]}),e.jsx(h,{className:"h-4 w-20 mb-2"}),e.jsx(h,{className:"h-10 w-full rounded-xl"})]}),e.jsxs(U,{className:"rounded-2xl border-gray-200 p-6",children:[e.jsx(h,{className:"h-5 w-24 mb-2"}),e.jsx(h,{className:"h-10 w-full rounded-xl"})]})]}):e.jsxs($,{children:[e.jsx(J,{title:c("modelPageTitle"),description:c("modelPageDescription")}),e.jsxs("form",{onSubmit:V,className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[e.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:e.jsx(G,{className:"h-5 w-5"})}),e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:c("defaultModel")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(_,{htmlFor:"model",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(r==null?void 0:r.label)??"Model Name"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx("div",{className:"sm:w-[38%] sm:min-w-[170px]",children:e.jsxs(te,{value:s,onValueChange:D,children:[e.jsx(ae,{className:"h-10 w-full rounded-xl",children:e.jsx(le,{placeholder:c("providersSelectPlaceholder")})}),e.jsx(re,{children:a.map(t=>e.jsx(ne,{value:t.name,children:t.displayName},t.name))})]})}),e.jsx("span",{className:"hidden h-10 items-center justify-center leading-none text-lg font-semibold text-gray-300 sm:inline-flex",children:"/"}),e.jsx(xe,{id:"model",value:b,onChange:I,options:j,placeholder:(r==null?void 0:r.placeholder)??"gpt-5.1",className:"sm:flex-1",inputClassName:"h-10 rounded-xl",emptyText:c("modelPickerNoOptions"),createText:c("modelPickerUseCustom")},s)]}),e.jsx("p",{className:"text-xs text-gray-400",children:k}),e.jsx("p",{className:"text-xs text-gray-500",children:c("modelInputCustomHint")}),e.jsxs("a",{href:`${oe}/guide/model-selection`,className:"inline-flex items-center gap-1.5 text-xs text-primary hover:text-primary-hover transition-colors",children:[e.jsx(K,{className:"h-3.5 w-3.5"}),c("channelsGuideTitle")]})]})]}),e.jsxs("div",{className:"p-8 rounded-2xl bg-white border border-gray-200 shadow-card",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl bg-primary flex items-center justify-center text-white",children:e.jsx(Y,{className:"h-5 w-5"})}),e.jsx("h3",{className:"text-lg font-bold text-gray-900",children:c("workspace")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(_,{htmlFor:"workspace",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:(d==null?void 0:d.label)??"Default Path"}),e.jsx(A,{id:"workspace",value:v,onChange:t=>M(t.target.value),placeholder:(d==null?void 0:d.placeholder)??"/path/to/workspace",className:"rounded-xl"})]})]})]}),e.jsx("div",{className:"flex justify-end pt-4",children:e.jsx(Q,{type:"submit",disabled:N.isPending,size:"lg",children:N.isPending?e.jsx(Z,{className:"h-5 w-5 animate-spin"}):c("saveChanges")})})]})]})}export{ye as ModelConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,aL as ht,aM as xt,aF as Xe,a1 as Ce,a as pt,d as z,aE as He,aN as ft,C as yt,aO as gt,q as jt,K as bt}from"./vendor-d7E8OgNx.js";import{c as ie,t as a,u as Ze,a as et,b as tt,F as vt,G as wt,H as Nt,I as Ct,J as At,K as Pt,M as Mt,S as We,e as qe,f as Ue,g as Ge,h as Qe,N as St}from"./index-Dl6t70wA.js";import{B,P as It,a as Dt}from"./page-layout-7K0rcz0I.js";import{I as q}from"./input-MMn_Na9q.js";import{L as R}from"./label-Dg2ydpN0.js";import{S as st,L as Et}from"./LogoBadge-2LMzEMwe.js";import{h as re}from"./config-hints-CApS3K_7.js";import{c as Lt,b as kt,C as $t,a as Bt}from"./config-layout-BHnOoweL.js";import{T as Tt}from"./tabs-custom-khLM8lWj.js";function Ft({isSet:t,className:i,value:r,onChange:l,placeholder:m,...j}){const[h,x]=c.useState(!1),[f,b]=c.useState(!1),v=typeof r=="string"&&r.length>0,D=t&&!v&&!f;return e.jsxs("div",{className:"relative",children:[D?e.jsx("div",{onClick:()=>b(!0),className:ie("flex h-9 w-full rounded-xl border border-gray-200/80 bg-white px-3.5 py-2 text-sm text-gray-500 cursor-text items-center pr-12",i),children:"••••••••••••"}):e.jsx(q,{type:h?"text":"password",className:ie("pr-12",i),value:r,onChange:l,onBlur:()=>{v||b(!1)},placeholder:m,autoFocus:f,...j}),e.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex gap-1",children:(t||v)&&e.jsx(B,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>x(!h),children:h?e.jsx(ht,{className:"h-4 w-4"}):e.jsx(xt,{className:"h-4 w-4"})})})]})}function Kt({value:t,onChange:i,className:r}){const l=t?Object.entries(t):[],m=(x,f,b)=>{const v=[...l];v[x]=[f,b],i(Object.fromEntries(v))},j=()=>{i({...t,"":""})},h=x=>{const f=l.filter((b,v)=>v!==x);i(Object.fromEntries(f))};return e.jsxs("div",{className:ie("space-y-2",r),children:[l.map(([x,f],b)=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx(q,{type:"text",value:x,onChange:v=>m(b,v.target.value,f),placeholder:a("headerName"),className:"flex-1"}),e.jsx(q,{type:"text",value:f,onChange:v=>m(b,x,v.target.value),placeholder:a("headerValue"),className:"flex-1"}),e.jsx(B,{type:"button",variant:"ghost",size:"icon",onClick:()=>h(b),children:e.jsx(Xe,{className:"h-4 w-4 text-red-500"})})]},b)),e.jsxs(B,{type:"button",variant:"outline",size:"sm",onClick:j,children:[e.jsx(Ce,{className:"h-4 w-4 mr-2"}),a("add")]})]})}const zt={displayName:"",apiKeySet:!1,apiBase:null,extraHeaders:null,wireApi:null,models:[]};function ne(t){if(!t)return null;const i=Object.entries(t).map(([r,l])=>[r.trim(),l]).filter(([r])=>r.length>0);return i.length===0?null:Object.fromEntries(i)}function Ve(t,i){const r=ne(t),l=ne(i);if(r===null&&l===null)return!0;if(!r||!l)return!1;const m=Object.entries(r).sort(([h],[x])=>h.localeCompare(x)),j=Object.entries(l).sort(([h],[x])=>h.localeCompare(x));return m.length!==j.length?!1:m.every(([h,x],f)=>h===j[f][0]&&x===j[f][1])}function we(t){if(!t||t.length===0)return[];const i=new Set;for(const r of t){const l=r.trim();l&&i.add(l)}return[...i]}function Ot(t,i){const r=t.trim();if(!r||!i.trim())return r;const l=`${i.trim()}/`;return r.startsWith(l)?r.slice(l.length):r}function xe(t,i){let r=t.trim();if(!r)return"";for(const l of i){const m=l.trim();m&&(r=Ot(r,m))}return r.trim()}function Ne(t,i){return t.length!==i.length?!1:t.every((r,l)=>r===i[l])}function _t(t,i){const r=[...t];for(const l of i)r.includes(l)||r.push(l);return r}function Rt(t,i){return i.length===0?t:i.every(l=>!t.includes(l))?_t(t,i):i}function Ht(t,i){return Ne(t,i)?[]:t}function Wt(t){var f,b,v,D,E;const{providerName:i,methods:r,defaultMethodId:l,language:m}=t;if(r.length===0)return"";const j=new Map;for(const P of r){const N=P.id.trim();N&&j.set(N.toLowerCase(),N)}const h=(...P)=>{for(const N of P){const C=j.get(N.toLowerCase());if(C)return C}},x=l==null?void 0:l.trim();if(i==="minimax-portal"){if(m==="zh")return h("cn","china-mainland")??h(x??"")??((f=r[0])==null?void 0:f.id)??"";if(m==="en")return h("global","intl","international")??h(x??"")??((b=r[0])==null?void 0:b.id)??""}if(x){const P=h(x);if(P)return P}return m==="zh"?h("cn")??((v=r[0])==null?void 0:v.id)??"":m==="en"?h("global")??((D=r[0])==null?void 0:D.id)??"":((E=r[0])==null?void 0:E.id)??""}function Ye(t){return t.required&&t.hasDefault&&t.optionCount>1&&t.optionCount<=3}function Je(t){const{value:i,onChange:r,options:l}=t;return e.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(m=>{const j=m.value===i;return e.jsx("button",{type:"button",onClick:()=>r(m.value),"aria-pressed":j,className:`rounded-full border px-3 py-1.5 text-xs font-medium transition-colors ${j?"border-primary bg-primary text-white shadow-sm":"border-gray-200 bg-white text-gray-700 hover:border-primary/40 hover:text-primary"}`,children:m.label},m.value)})})}function qt({providerName:t,onProviderDeleted:i}){var Te,Fe,Ke,ze,Oe,_e,Re;const r=pt(),{data:l}=Ze(),{data:m}=et(),{data:j}=tt(),h=vt(),x=wt(),f=Nt(),b=Ct(),v=At(),D=Pt(),[E,P]=c.useState(""),[N,C]=c.useState(""),[O,X]=c.useState(null),[u,g]=c.useState("auto"),[w,A]=c.useState([]),[T,M]=c.useState(""),[$,H]=c.useState(""),[Z,le]=c.useState(!1),[pe,oe]=c.useState(!1),[ce,_]=c.useState(null),[Ae,L]=c.useState(""),[Pe,de]=c.useState(""),ue=c.useRef(null),n=m==null?void 0:m.providers.find(s=>s.name===t),k=(t?l==null?void 0:l.providers[t]:null)??zt,me=j==null?void 0:j.uiHints,U=!!(n!=null&&n.isCustom),G=t?re(`providers.${t}.apiKey`,me):void 0,F=t?re(`providers.${t}.apiBase`,me):void 0,fe=t?re(`providers.${t}.extraHeaders`,me):void 0,ye=t?re(`providers.${t}.wireApi`,me):void 0,Me=(n==null?void 0:n.displayName)||t||"",Q=(k.displayName||"").trim()||Me,at=$.trim()||Q||t||a("providersSelectPlaceholder"),Se=(n==null?void 0:n.modelPrefix)||t||"",V=c.useMemo(()=>we([Se,t||""]),[Se,t]),ge=(n==null?void 0:n.defaultApiBase)||"",ee=k.apiBase||ge,je=ne(k.extraHeaders||null),te=k.wireApi||(n==null?void 0:n.defaultWireApi)||"auto",be=c.useMemo(()=>we(((n==null?void 0:n.defaultModels)??[]).map(s=>xe(s,V))),[n==null?void 0:n.defaultModels,V]),Ie=c.useMemo(()=>we((k.models??[]).map(s=>xe(s,V))),[k.models,V]),se=c.useMemo(()=>Rt(be,Ie),[be,Ie]),W=Mt(),rt=((Te=n==null?void 0:n.apiBaseHelp)==null?void 0:Te[W])||((Fe=n==null?void 0:n.apiBaseHelp)==null?void 0:Fe.en)||(F==null?void 0:F.help)||a("providerApiBaseHelp"),o=n==null?void 0:n.auth,S=c.useMemo(()=>(o==null?void 0:o.methods)??[],[o==null?void 0:o.methods]),De=c.useMemo(()=>S.map(s=>{var d,p;return{value:s.id,label:((d=s.label)==null?void 0:d[W])||((p=s.label)==null?void 0:p.en)||s.id}}),[S,W]),he=c.useMemo(()=>Wt({providerName:t,methods:S,defaultMethodId:o==null?void 0:o.defaultMethodId,language:W}),[t,o==null?void 0:o.defaultMethodId,S,W]),Y=c.useMemo(()=>{var d;if(!S.length)return"";const s=Pe.trim();return s&&S.some(p=>p.id===s)?s:he||((d=S[0])==null?void 0:d.id)||""},[Pe,he,S]),J=c.useMemo(()=>S.find(s=>s.id===Y),[S,Y]),Ee=((Ke=J==null?void 0:J.hint)==null?void 0:Ke[W])||((ze=J==null?void 0:J.hint)==null?void 0:ze.en)||"",nt=Ye({required:(o==null?void 0:o.kind)==="device_code",hasDefault:!!((Oe=o==null?void 0:o.defaultMethodId)!=null&&Oe.trim()),optionCount:S.length}),Le=((_e=o==null?void 0:o.note)==null?void 0:_e[W])||((Re=o==null?void 0:o.note)==null?void 0:Re.en)||(o==null?void 0:o.displayName)||"",ve=((n==null?void 0:n.wireApiOptions)||["auto","chat","responses"]).map(s=>({value:s,label:s==="chat"?a("wireApiChat"):s==="responses"?a("wireApiResponses"):a("wireApiAuto")})),it=Ye({required:!!(n!=null&&n.supportsWireApi),hasDefault:typeof(n==null?void 0:n.defaultWireApi)=="string"&&n.defaultWireApi.length>0,optionCount:ve.length}),I=c.useCallback(()=>{ue.current!==null&&(window.clearTimeout(ue.current),ue.current=null)},[]),ke=c.useCallback((s,d)=>{I(),ue.current=window.setTimeout(()=>{(async()=>{if(t)try{const p=await v.mutateAsync({provider:t,data:{sessionId:s}});if(p.status==="pending"){L(a("providerAuthWaitingBrowser")),ke(s,p.nextPollMs??d);return}if(p.status==="authorized"){_(null),I(),L(a("providerAuthCompleted")),z.success(a("providerAuthCompleted")),r.invalidateQueries({queryKey:["config"]}),r.invalidateQueries({queryKey:["config-meta"]});return}_(null),I(),L(p.message||`Authorization ${p.status}.`),z.error(p.message||`Authorization ${p.status}.`)}catch(p){_(null),I();const y=p instanceof Error?p.message:String(p);L(y),z.error(`Authorization failed: ${y}`)}})()},Math.max(1e3,d))},[I,v,t,r]);c.useEffect(()=>{if(!t){P(""),C(""),X(null),g("auto"),A([]),M(""),H(""),_(null),L(""),de(""),I();return}P(""),C(ee),X(k.extraHeaders||null),g(te),A(se),M(""),H(Q),_(null),L(""),de(he),I()},[t,ee,k.extraHeaders,te,se,Q,he,I]),c.useEffect(()=>()=>I(),[I]);const $e=c.useMemo(()=>{if(!t)return!1;const s=E.trim().length>0,d=N.trim()!==ee.trim(),p=!Ve(O,je),y=n!=null&&n.supportsWireApi?u!==te:!1,K=!Ne(w,se),ae=U?$.trim()!==Q:!1;return s||d||p||y||K||ae},[t,U,$,Q,E,N,ee,O,je,n==null?void 0:n.supportsWireApi,u,te,w,se]),Be=()=>{const s=xe(T,V);if(s){if(w.includes(s)){M("");return}A(d=>[...d,s]),M("")}},lt=s=>{if(s.preventDefault(),!t)return;const d={},p=E.trim(),y=N.trim(),K=ne(O),ae=$.trim();U&&ae!==Q&&(d.displayName=ae.length>0?ae:null),p.length>0&&(d.apiKey=p),y!==ee.trim()&&(d.apiBase=y.length>0&&y!==ge?y:null),Ve(K,je)||(d.extraHeaders=K),n!=null&&n.supportsWireApi&&u!==te&&(d.wireApi=u),Ne(w,se)||(d.models=Ht(w,be)),h.mutate({provider:t,data:d})},ot=async()=>{if(!t)return;const s=w.find(y=>y.trim().length>0)??"",d=xe(s,V),p={apiBase:N.trim(),extraHeaders:ne(O),model:d||null};E.trim().length>0&&(p.apiKey=E.trim()),n!=null&&n.supportsWireApi&&(p.wireApi=u);try{const y=await f.mutateAsync({provider:t,data:p});if(y.success){z.success(`${a("providerTestConnectionSuccess")} (${y.latencyMs}ms)`);return}const K=[`provider=${y.provider}`,`latency=${y.latencyMs}ms`];y.model&&K.push(`model=${y.model}`),z.error(`${a("providerTestConnectionFailed")}: ${y.message} | ${K.join(" | ")}`)}catch(y){const K=y instanceof Error?y.message:String(y);z.error(`${a("providerTestConnectionFailed")}: ${K}`)}},ct=async()=>{if(!(!t||!U||!window.confirm(a("providerDeleteConfirm"))))try{await x.mutateAsync({provider:t}),i==null||i(t)}catch{}},dt=async()=>{if(!(!t||(o==null?void 0:o.kind)!=="device_code"))try{L("");const s=await b.mutateAsync({provider:t,data:Y?{methodId:Y}:{}});if(!s.sessionId||!s.verificationUri)throw new Error(a("providerAuthStartFailed"));_(s.sessionId),L(`${a("providerAuthOpenPrompt")}${s.userCode}${a("providerAuthOpenPromptSuffix")}`),window.open(s.verificationUri,"_blank","noopener,noreferrer"),ke(s.sessionId,s.intervalMs)}catch(s){const d=s instanceof Error?s.message:String(s);_(null),I(),L(d),z.error(`${a("providerAuthStartFailed")}: ${d}`)}},ut=async()=>{if(!(!t||(o==null?void 0:o.kind)!=="device_code"))try{I(),_(null);const s=await D.mutateAsync({provider:t}),d=s.expiresAt?` (expires: ${s.expiresAt})`:"";L(`${a("providerAuthImportStatusPrefix")}${d}`),z.success(a("providerAuthImportSuccess")),r.invalidateQueries({queryKey:["config"]}),r.invalidateQueries({queryKey:["config-meta"]})}catch(s){const d=s instanceof Error?s.message:String(s);L(d),z.error(`${a("providerAuthImportFailed")}: ${d}`)}};if(!t||!n)return e.jsx("div",{className:Lt,children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-gray-900",children:a("providersSelectTitle")}),e.jsx("p",{className:"mt-2 text-sm text-gray-500",children:a("providersSelectDescription")})]})});const mt=k.apiKeySet?a("statusReady"):a("statusSetup");return e.jsxs("div",{className:kt,children:[e.jsx("div",{className:"border-b border-gray-100 px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"truncate text-lg font-semibold text-gray-900",children:at}),e.jsxs("div",{className:"flex items-center gap-3",children:[U&&e.jsx("button",{type:"button",onClick:ct,disabled:x.isPending,className:"text-gray-400 hover:text-red-500 transition-colors",title:a("providerDelete"),children:e.jsx(Xe,{className:"h-4 w-4"})}),e.jsx(st,{status:k.apiKeySet?"ready":"setup",label:mt})]})]})}),e.jsxs("form",{onSubmit:lt,className:"flex min-h-0 flex-1 flex-col",children:[e.jsxs("div",{className:"min-h-0 flex-1 space-y-5 overflow-y-auto px-6 py-5",children:[U&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{htmlFor:"providerDisplayName",className:"text-sm font-medium text-gray-900",children:a("providerDisplayName")}),e.jsx(q,{id:"providerDisplayName",type:"text",value:$,onChange:s=>H(s.target.value),placeholder:Me||a("providerDisplayNamePlaceholder"),className:"rounded-xl"}),e.jsx("p",{className:"text-xs text-gray-500",children:a("providerDisplayNameHelpShort")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{htmlFor:"apiKey",className:"text-sm font-medium text-gray-900",children:(G==null?void 0:G.label)??a("apiKey")}),e.jsx(Ft,{id:"apiKey",value:E,isSet:k.apiKeySet,onChange:s=>P(s.target.value),placeholder:(G==null?void 0:G.placeholder)??a("enterApiKey"),className:"rounded-xl"}),e.jsx("p",{className:"text-xs text-gray-500",children:a("leaveBlankToKeepUnchanged")})]}),(o==null?void 0:o.kind)==="device_code"&&e.jsxs("div",{className:"space-y-2 rounded-xl border border-primary/20 bg-primary-50/50 p-3",children:[e.jsx(R,{className:"text-sm font-medium text-gray-900",children:o.displayName||a("providerAuthSectionTitle")}),Le?e.jsx("p",{className:"text-xs text-gray-600",children:Le}):null,S.length>1?e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{className:"text-xs font-medium text-gray-700",children:a("providerAuthMethodLabel")}),nt?e.jsx(Je,{value:Y,onChange:de,options:De}):e.jsxs(We,{value:Y,onValueChange:de,children:[e.jsx(qe,{className:"h-8 rounded-lg bg-white",children:e.jsx(Ue,{placeholder:a("providerAuthMethodPlaceholder")})}),e.jsx(Ge,{children:De.map(s=>e.jsx(Qe,{value:s.value,children:s.label},s.value))})]}),Ee?e.jsx("p",{className:"text-xs text-gray-500",children:Ee}):null]}):null,e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(B,{type:"button",variant:"outline",size:"sm",onClick:dt,disabled:b.isPending||!!ce,children:b.isPending?a("providerAuthStarting"):ce?a("providerAuthAuthorizing"):a("providerAuthAuthorizeInBrowser")}),o.supportsCliImport?e.jsx(B,{type:"button",variant:"outline",size:"sm",onClick:ut,disabled:D.isPending,children:D.isPending?a("providerAuthImporting"):a("providerAuthImportFromCli")}):null,ce?e.jsxs("span",{className:"text-xs text-gray-500",children:[a("providerAuthSessionLabel"),": ",ce.slice(0,8),"…"]}):null]}),Ae?e.jsx("p",{className:"text-xs text-gray-600",children:Ae}):null]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{htmlFor:"apiBase",className:"text-sm font-medium text-gray-900",children:(F==null?void 0:F.label)??a("apiBase")}),e.jsx(q,{id:"apiBase",type:"text",value:N,onChange:s=>C(s.target.value),placeholder:ge||(F==null?void 0:F.placeholder)||"https://api.example.com",className:"rounded-xl"}),e.jsx("p",{className:"text-xs text-gray-500",children:rt})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(R,{className:"text-sm font-medium text-gray-900",children:a("providerModelsTitle")}),!pe&&e.jsxs("button",{type:"button",onClick:()=>oe(!0),className:"text-xs text-primary hover:text-primary/80 font-medium flex items-center gap-1",children:[e.jsx(Ce,{className:"h-3 w-3"}),a("providerAddModel")]})]}),pe&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{value:T,onChange:s=>M(s.target.value),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),Be()),s.key==="Escape"&&(oe(!1),M(""))},placeholder:a("providerModelInputPlaceholder"),className:"flex-1 rounded-xl",autoFocus:!0}),e.jsx(B,{type:"button",size:"sm",onClick:Be,disabled:T.trim().length===0,children:a("add")}),e.jsx(B,{type:"button",size:"sm",variant:"ghost",onClick:()=>{oe(!1),M("")},children:e.jsx(He,{className:"h-4 w-4"})})]}),w.length===0?e.jsxs("div",{className:"rounded-xl border border-dashed border-gray-200 bg-gray-50 px-4 py-6 text-center",children:[e.jsx("p",{className:"text-sm text-gray-500",children:a("providerModelsEmptyShort")}),!pe&&e.jsx("button",{type:"button",onClick:()=>oe(!0),className:"mt-2 text-sm text-primary hover:text-primary/80 font-medium",children:a("providerAddFirstModel")})]}):e.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(s=>e.jsxs("div",{className:"group inline-flex max-w-full items-center gap-1 rounded-full border border-gray-200 bg-white px-3 py-1.5",children:[e.jsx("span",{className:"max-w-[180px] truncate text-sm text-gray-800 sm:max-w-[240px]",children:s}),e.jsx("button",{type:"button",onClick:()=>A(d=>d.filter(p=>p!==s)),className:"inline-flex h-5 w-5 items-center justify-center rounded-full text-gray-400 transition-opacity hover:bg-gray-100 hover:text-gray-600 opacity-100 md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100","aria-label":a("remove"),children:e.jsx(He,{className:"h-3 w-3"})})]},s))})]}),e.jsxs("div",{className:"border-t border-gray-100 pt-4",children:[e.jsxs("button",{type:"button",onClick:()=>le(!Z),className:"flex w-full items-center justify-between text-sm text-gray-600 hover:text-gray-900 transition-colors",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ft,{className:"h-3.5 w-3.5"}),a("providerAdvancedSettings")]}),e.jsx(yt,{className:`h-4 w-4 transition-transform ${Z?"rotate-180":""}`})]}),Z&&e.jsxs("div",{className:"mt-4 space-y-5",children:[n.supportsWireApi&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{htmlFor:"wireApi",className:"text-sm font-medium text-gray-900",children:(ye==null?void 0:ye.label)??a("wireApi")}),it?e.jsx(Je,{value:u,onChange:s=>g(s),options:ve}):e.jsxs(We,{value:u,onValueChange:s=>g(s),children:[e.jsx(qe,{className:"rounded-xl",children:e.jsx(Ue,{})}),e.jsx(Ge,{children:ve.map(s=>e.jsx(Qe,{value:s.value,children:s.label},s.value))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(R,{className:"text-sm font-medium text-gray-900",children:(fe==null?void 0:fe.label)??a("extraHeaders")}),e.jsx(Kt,{value:O,onChange:X}),e.jsx("p",{className:"text-xs text-gray-500",children:a("providerExtraHeadersHelpShort")})]})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-gray-100 px-6 py-4",children:[e.jsxs(B,{type:"button",variant:"outline",size:"sm",onClick:ot,disabled:f.isPending,children:[e.jsx(gt,{className:"mr-1.5 h-4 w-4"}),f.isPending?a("providerTestingConnection"):a("providerTestConnection")]}),e.jsx(B,{type:"submit",disabled:h.isPending||!$e,children:h.isPending?a("saving"):$e?a("save"):a("unchanged")})]})]})]})}function Ut(t){if(!t)return null;try{const i=new URL(t),r=i.pathname&&i.pathname!=="/"?i.pathname:"";return`${i.host}${r}`}catch{return t.replace(/^https?:\/\//,"")}}function ns(){const{data:t}=Ze(),{data:i}=et(),{data:r}=tt(),l=St(),[m,j]=c.useState("installed"),[h,x]=c.useState(),[f,b]=c.useState(""),v=r==null?void 0:r.uiHints,D=(i==null?void 0:i.providers)??[],E=(t==null?void 0:t.providers)??{},P=D.filter(u=>{var g;return(g=E[u.name])==null?void 0:g.apiKeySet}).length,N=[{id:"installed",label:a("providersTabConfigured"),count:P},{id:"all",label:a("providersTabAll"),count:D.length}],C=c.useMemo(()=>{const u=(i==null?void 0:i.providers)??[],g=(t==null?void 0:t.providers)??{},w=f.trim().toLowerCase();return u.filter(A=>{var T;return m==="installed"?!!((T=g[A.name])!=null&&T.apiKeySet):!0}).filter(A=>{var $,H;return w?(((H=($=g[A.name])==null?void 0:$.displayName)==null?void 0:H.trim())||A.displayName||A.name).toLowerCase().includes(w)||A.name.toLowerCase().includes(w):!0})},[i,t,m,f]);c.useEffect(()=>{if(C.length===0){x(void 0);return}C.some(g=>g.name===h)||x(C[0].name)},[C,h]);const O=h,X=async()=>{try{const u=await l.mutateAsync({data:{}});j("all"),b(""),x(u.name)}catch{}};return!t||!i?e.jsx("div",{className:"p-8",children:a("providersLoading")}):e.jsxs(It,{children:[e.jsx(Dt,{title:a("providersPageTitle"),description:a("providersPageDescription")}),e.jsxs("div",{className:$t,children:[e.jsxs("section",{className:Bt,children:[e.jsxs("div",{className:"border-b border-gray-100 px-4 pt-4 pb-3 space-y-3",children:[e.jsx(Tt,{tabs:N,activeTab:m,onChange:j,className:"mb-0"}),e.jsxs(B,{type:"button",variant:"outline",className:"w-full justify-center",onClick:X,disabled:l.isPending,children:[e.jsx(Ce,{className:"mr-2 h-4 w-4"}),l.isPending?a("saving"):a("providerAddCustom")]})]}),e.jsx("div",{className:"border-b border-gray-100 px-4 py-3",children:e.jsxs("div",{className:"relative",children:[e.jsx(jt,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),e.jsx(q,{value:f,onChange:u=>b(u.target.value),placeholder:a("providersFilterPlaceholder"),className:"h-10 rounded-xl pl-9"})]})}),e.jsxs("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto p-3",children:[C.map(u=>{var le;const g=t.providers[u.name],w=!!(g!=null&&g.apiKeySet),A=O===u.name,T=((le=g==null?void 0:g.displayName)==null?void 0:le.trim())||u.displayName||u.name,M=re(`providers.${u.name}`,v),$=(g==null?void 0:g.apiBase)||u.defaultApiBase||"",Z=Ut($)||(M==null?void 0:M.help)||a("providersDefaultDescription");return e.jsx("button",{type:"button",onClick:()=>x(u.name),className:ie("w-full rounded-xl border p-2.5 text-left transition-all",A?"border-primary/30 bg-primary-50/40 shadow-sm":"border-gray-200/70 bg-white hover:border-gray-300 hover:bg-gray-50/70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(Et,{name:u.name,src:u.logo?`/logos/${u.logo}`:null,className:ie("h-10 w-10 rounded-lg border",w?"border-primary/30 bg-white":"border-gray-200/70 bg-white"),imgClassName:"h-5 w-5 object-contain",fallback:e.jsx("span",{className:"text-sm font-semibold uppercase text-gray-500",children:u.name[0]})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold text-gray-900",children:T}),e.jsx("p",{className:"line-clamp-1 text-[11px] text-gray-500",children:Z})]})]}),e.jsx(st,{status:w?"ready":"setup",label:w?a("statusReady"):a("statusSetup"),className:"min-w-[56px] justify-center"})]})},u.name)}),C.length===0&&e.jsxs("div",{className:"flex h-full min-h-[220px] flex-col items-center justify-center rounded-xl border border-dashed border-gray-200 bg-gray-50/70 py-10 text-center",children:[e.jsx("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-white",children:e.jsx(bt,{className:"h-5 w-5 text-gray-300"})}),e.jsx("p",{className:"text-sm font-medium text-gray-700",children:a("providersNoMatch")})]})]})]}),e.jsx(qt,{providerName:O,onProviderDeleted:u=>{u===h&&x(void 0)}})]})]})}export{ns as ProvidersList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,j as e,
|
|
1
|
+
import{r as p,j as e,aF as ee,a1 as ae,aS as de,d as se}from"./vendor-d7E8OgNx.js";import{u as me,b as he,Q as ue,t,S as te,e as re,f as ne,g as le,h as S}from"./index-Dl6t70wA.js";import{P as pe,a as xe,B as w}from"./page-layout-7K0rcz0I.js";import{C as R,b as $,c as z,d as D,a as L}from"./card-BekAnCgX.js";import{I as i}from"./input-MMn_Na9q.js";import{S as ge}from"./switch-DnDMlDVu.js";import{h as x}from"./config-hints-CApS3K_7.js";const je=[{value:"main",label:"main"},{value:"per-peer",label:"per-peer"},{value:"per-channel-peer",label:"per-channel-peer"},{value:"per-account-channel-peer",label:"per-account-channel-peer"}];function fe(){return{id:"",default:!1,workspace:"",model:"",engine:"",contextTokens:void 0,maxToolIterations:void 0}}function ve(){return{agentId:"",match:{channel:"",accountId:""}}}function ce(d){const b=d.trim();if(!b)return;const j=Number.parseInt(b,10);return Number.isFinite(j)?j:void 0}function Se(){const{data:d,isLoading:b}=me(),{data:j}=he(),A=ue(),[_,N]=p.useState([]),[q,E]=p.useState([]),[F,K]=p.useState("per-channel-peer"),[V,Q]=p.useState(0),[U,G]=p.useState(2e5),[J,W]=p.useState("native");p.useEffect(()=>{var a,r,n;d&&(N((d.agents.list??[]).map(s=>({id:s.id??"",default:!!s.default,workspace:s.workspace??"",model:s.model??"",engine:s.engine??"",contextTokens:s.contextTokens,maxToolIterations:s.maxToolIterations}))),E((d.bindings??[]).map(s=>{var c,l,o;return{agentId:s.agentId??"",match:{channel:((c=s.match)==null?void 0:c.channel)??"",accountId:((l=s.match)==null?void 0:l.accountId)??"",peer:(o=s.match)!=null&&o.peer?{kind:s.match.peer.kind,id:s.match.peer.id}:void 0}}})),K(((a=d.session)==null?void 0:a.dmScope)??"per-channel-peer"),Q(((n=(r=d.session)==null?void 0:r.agentToAgent)==null?void 0:n.maxPingPongTurns)??0),G(d.agents.defaults.contextTokens??2e5),W(d.agents.defaults.engine??"native"))},[d]);const u=j==null?void 0:j.uiHints,h=x("session.dmScope",u),f=x("session.agentToAgent.maxPingPongTurns",u),v=x("agents.defaults.contextTokens",u),I=x("agents.defaults.engine",u),O=x("agents.list.*.contextTokens",u),B=x("agents.list.*.engine",u),y=x("agents.list",u),k=x("bindings",u),oe=p.useMemo(()=>{const a=new Set(["main"]);return _.forEach(r=>{const n=r.id.trim();n&&a.add(n)}),a},[_]),g=(a,r)=>{N(n=>n.map((s,c)=>c===a?{...s,...r}:s))},T=(a,r)=>{E(n=>n.map((s,c)=>c===a?r:s))},ie=()=>{try{const a=_.map((s,c)=>{var m,C,P;const l=s.id.trim();if(!l)throw new Error(t("agentIdRequiredError").replace("{index}",String(c)));const o={id:l};return s.default&&(o.default=!0),(m=s.workspace)!=null&&m.trim()&&(o.workspace=s.workspace.trim()),(C=s.model)!=null&&C.trim()&&(o.model=s.model.trim()),(P=s.engine)!=null&&P.trim()&&(o.engine=s.engine.trim()),typeof s.contextTokens=="number"&&(o.contextTokens=Math.max(1e3,s.contextTokens)),typeof s.maxToolIterations=="number"&&(o.maxToolIterations=s.maxToolIterations),o}),r=a.map(s=>s.id).filter((s,c,l)=>l.indexOf(s)!==c);if(r.length>0){se.error(`${t("duplicateAgentId")}: ${r[0]}`);return}const n=q.map((s,c)=>{var X,Y,Z,H;const l=s.agentId.trim(),o=s.match.channel.trim(),m=((X=s.match.accountId)==null?void 0:X.trim())??"",C=(Y=s.match.peer)==null?void 0:Y.kind,P=((H=(Z=s.match.peer)==null?void 0:Z.id)==null?void 0:H.trim())??"";if(!l)throw new Error(t("bindingAgentIdRequired").replace("{index}",String(c)));if(!oe.has(l))throw new Error(`${t("bindingAgentIdNotFound").replace("{index}",String(c))}: ${l}`);if(!o)throw new Error(t("bindingChannelRequired").replace("{index}",String(c)));const M={agentId:l,match:{channel:o}};if(m&&(M.match.accountId=m),C){if(!P)throw new Error(t("bindingPeerIdRequired").replace("{index}",String(c)));M.match.peer={kind:C,id:P}}return M});A.mutate({data:{agents:{defaults:{contextTokens:Math.max(1e3,U),engine:J.trim()||"native"},list:a},bindings:n,session:{dmScope:F,agentToAgent:{maxPingPongTurns:Math.min(5,Math.max(0,V))}}}})}catch(a){const r=a instanceof Error?a.message:String(a);se.error(r)}};return b||!d?e.jsx("div",{className:"p-8 text-gray-400",children:t("runtimeLoading")}):e.jsxs(pe,{className:"space-y-6",children:[e.jsx(xe,{title:t("runtimePageTitle"),description:t("runtimePageDescription")}),e.jsxs(R,{children:[e.jsxs($,{children:[e.jsx(z,{children:(h==null?void 0:h.label)??t("dmScope")}),e.jsx(D,{children:(h==null?void 0:h.help)??t("dmScopeHelp")})]}),e.jsxs(L,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium text-gray-800",children:(v==null?void 0:v.label)??t("defaultContextTokens")}),e.jsx(i,{type:"number",min:1e3,step:1e3,value:U,onChange:a=>G(Math.max(1e3,Number.parseInt(a.target.value,10)||1e3))}),e.jsx("p",{className:"text-xs text-gray-500",children:(v==null?void 0:v.help)??t("defaultContextTokensHelp")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium text-gray-800",children:(I==null?void 0:I.label)??t("defaultEngine")}),e.jsx(i,{value:J,onChange:a=>W(a.target.value),placeholder:t("defaultEnginePlaceholder")}),e.jsx("p",{className:"text-xs text-gray-500",children:(I==null?void 0:I.help)??t("defaultEngineHelp")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium text-gray-800",children:(h==null?void 0:h.label)??t("dmScope")}),e.jsxs(te,{value:F,onValueChange:a=>K(a),children:[e.jsx(re,{children:e.jsx(ne,{})}),e.jsx(le,{children:je.map(a=>e.jsx(S,{value:a.value,children:a.label},a.value))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium text-gray-800",children:(f==null?void 0:f.label)??t("maxPingPongTurns")}),e.jsx(i,{type:"number",min:0,max:5,value:V,onChange:a=>Q(Math.max(0,Number.parseInt(a.target.value,10)||0))}),e.jsx("p",{className:"text-xs text-gray-500",children:(f==null?void 0:f.help)??t("maxPingPongTurnsHelp")})]})]})]}),e.jsxs(R,{children:[e.jsxs($,{children:[e.jsx(z,{children:(y==null?void 0:y.label)??t("agentList")}),e.jsx(D,{children:(y==null?void 0:y.help)??t("agentListHelp")})]}),e.jsxs(L,{className:"space-y-3",children:[_.map((a,r)=>e.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(i,{value:a.id,onChange:n=>g(r,{id:n.target.value}),placeholder:t("agentIdPlaceholder")}),e.jsx(i,{value:a.workspace??"",onChange:n=>g(r,{workspace:n.target.value}),placeholder:t("workspaceOverridePlaceholder")}),e.jsx(i,{value:a.model??"",onChange:n=>g(r,{model:n.target.value}),placeholder:t("modelOverridePlaceholder")}),e.jsx(i,{value:a.engine??"",onChange:n=>g(r,{engine:n.target.value}),placeholder:(B==null?void 0:B.label)??t("engineOverridePlaceholder")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsx(i,{type:"number",min:1e3,step:1e3,value:a.contextTokens??"",onChange:n=>g(r,{contextTokens:ce(n.target.value)}),placeholder:(O==null?void 0:O.label)??t("contextTokensPlaceholder")}),e.jsx(i,{type:"number",min:1,value:a.maxToolIterations??"",onChange:n=>g(r,{maxToolIterations:ce(n.target.value)}),placeholder:t("maxToolsPlaceholder")})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[e.jsx(ge,{checked:!!a.default,onCheckedChange:n=>{if(!n){g(r,{default:!1});return}N(s=>s.map((c,l)=>({...c,default:l===r})))}}),e.jsx("span",{children:t("defaultAgent")})]}),e.jsxs(w,{type:"button",variant:"outline",size:"sm",onClick:()=>N(n=>n.filter((s,c)=>c!==r)),children:[e.jsx(ee,{className:"h-4 w-4 mr-1"}),t("remove")]})]})]},`${r}-${a.id}`)),e.jsxs(w,{type:"button",variant:"outline",onClick:()=>N(a=>[...a,fe()]),children:[e.jsx(ae,{className:"h-4 w-4 mr-2"}),t("addAgent")]})]})]}),e.jsxs(R,{children:[e.jsxs($,{children:[e.jsx(z,{children:(k==null?void 0:k.label)??t("bindings")}),e.jsx(D,{children:(k==null?void 0:k.help)??t("bindingsHelp")})]}),e.jsxs(L,{className:"space-y-3",children:[q.map((a,r)=>{var s,c;const n=((s=a.match.peer)==null?void 0:s.kind)??"";return e.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:[e.jsx(i,{value:a.agentId,onChange:l=>T(r,{...a,agentId:l.target.value}),placeholder:t("targetAgentIdPlaceholder")}),e.jsx(i,{value:a.match.channel,onChange:l=>T(r,{...a,match:{...a.match,channel:l.target.value}}),placeholder:t("channelPlaceholder")}),e.jsx(i,{value:a.match.accountId??"",onChange:l=>T(r,{...a,match:{...a.match,accountId:l.target.value}}),placeholder:t("accountIdOptionalPlaceholder")}),e.jsxs(te,{value:n||"__none__",onValueChange:l=>{var m;const o=l==="__none__"?"":l;if(!o){T(r,{...a,match:{...a.match,peer:void 0}});return}T(r,{...a,match:{...a.match,peer:{kind:o,id:((m=a.match.peer)==null?void 0:m.id)??""}}})},children:[e.jsx(re,{children:e.jsx(ne,{})}),e.jsxs(le,{children:[e.jsx(S,{value:"__none__",children:t("peerKindOptional")}),e.jsx(S,{value:"direct",children:"direct"}),e.jsx(S,{value:"group",children:"group"}),e.jsx(S,{value:"channel",children:"channel"})]})]}),e.jsx(i,{value:((c=a.match.peer)==null?void 0:c.id)??"",onChange:l=>T(r,{...a,match:{...a.match,peer:n?{kind:n,id:l.target.value}:void 0}}),placeholder:t("peerIdPlaceholder")})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(w,{type:"button",variant:"outline",size:"sm",onClick:()=>E(l=>l.filter((o,m)=>m!==r)),children:[e.jsx(ee,{className:"h-4 w-4 mr-1"}),t("remove")]})})]},`${r}-${a.agentId}`)}),e.jsxs(w,{type:"button",variant:"outline",onClick:()=>E(a=>[...a,ve()]),children:[e.jsx(ae,{className:"h-4 w-4 mr-2"}),t("addBinding")]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(w,{type:"button",onClick:ie,disabled:A.isPending,children:[e.jsx(de,{className:"h-4 w-4 mr-2"}),A.isPending?t("saving"):t("saveRuntimeSettings")]})})]})}export{Se as RuntimeConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,j as e,q as X,aA as Z,K as $}from"./vendor-d7E8OgNx.js";import{P as ee,a as se,B as j}from"./page-layout-7K0rcz0I.js";import{I as h}from"./input-MMn_Na9q.js";import{L as c}from"./label-Dg2ydpN0.js";import{u as ae,a as re,E as le,t as a,c as k,S as b,e as y,f as g,g as N,h as x}from"./index-Dl6t70wA.js";import{C as te,a as ce,b as ne}from"./config-layout-BHnOoweL.js";const ie=[{value:"noLimit",label:"searchFreshnessNoLimit"},{value:"oneDay",label:"searchFreshnessOneDay"},{value:"oneWeek",label:"searchFreshnessOneWeek"},{value:"oneMonth",label:"searchFreshnessOneMonth"},{value:"oneYear",label:"searchFreshnessOneYear"}];function ve(){var O;const{data:u}=ae(),{data:n}=re(),m=le(),i=(n==null?void 0:n.search)??[],r=u==null?void 0:u.search,[t,f]=l.useState("bocha"),[S,P]=l.useState("bocha"),[d,C]=l.useState(["bocha"]),[w,A]=l.useState("10"),[B,T]=l.useState(""),[D,K]=l.useState("https://api.bocha.cn/v1/web-search"),[E,L]=l.useState(!0),[U,F]=l.useState("noLimit"),[R,V]=l.useState(""),[I,_]=l.useState("https://api.search.brave.com/res/v1/web/search");l.useEffect(()=>{r&&(f(r.provider),P(r.provider),C(r.enabledProviders),A(String(r.defaults.maxResults)),K(r.providers.bocha.baseUrl),L(!!r.providers.bocha.summary),F(r.providers.bocha.freshness??"noLimit"),_(r.providers.brave.baseUrl))},[r]);const v=l.useMemo(()=>i.find(s=>s.name===t),[i,t]),G=r==null?void 0:r.providers[t],p=d.includes(t),H=(r==null?void 0:r.providers.bocha.docsUrl)??((O=n==null?void 0:n.search.find(s=>s.name==="bocha"))==null?void 0:O.docsUrl)??"https://open.bocha.cn",W=p?a("searchProviderDeactivate"):a("searchProviderActivate"),M=(s=d,o=S)=>({provider:o,enabledProviders:s,defaults:{maxResults:Number(w)||10},providers:{bocha:{apiKey:B||void 0,baseUrl:D,summary:E,freshness:U},brave:{apiKey:R||void 0,baseUrl:I}}}),Y=()=>{const s=p?d.filter(o=>o!==t):[...d,t];C(s),m.mutate({data:M(s)})},q=s=>{P(s)},z=s=>{s.preventDefault(),m.mutate({data:M()})};return!r||i.length===0?e.jsx("div",{className:"p-8",children:a("loading")}):e.jsxs(ee,{children:[e.jsx(se,{title:a("searchPageTitle"),description:a("searchPageDescription")}),e.jsxs("div",{className:te,children:[e.jsxs("section",{className:ce,children:[e.jsx("div",{className:"border-b border-gray-100 px-4 py-4",children:e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-gray-500",children:a("searchChannels")})}),e.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto p-3",children:i.map(s=>{const o=r.providers[s.name],J=d.includes(s.name),Q=t===s.name;return e.jsx("button",{type:"button",onClick:()=>f(s.name),className:k("w-full rounded-xl border p-3 text-left transition-all",Q?"border-primary/30 bg-primary-50/40 shadow-sm":"border-gray-200/70 bg-white hover:border-gray-300 hover:bg-gray-50/70"),children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold text-gray-900",children:s.displayName}),e.jsx("p",{className:"line-clamp-2 text-[11px] text-gray-500",children:s.name==="bocha"?a("searchProviderBochaDescription"):a("searchProviderBraveDescription")})]}),e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsx("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-[11px] font-medium text-gray-600",children:o.apiKeySet?a("searchStatusConfigured"):a("searchStatusNeedsSetup")}),J?e.jsx("span",{className:"rounded-full bg-emerald-50 px-2 py-0.5 text-[11px] font-medium text-emerald-700",children:a("searchProviderActivated")}):null]})]})},s.name)})})]}),e.jsx("form",{onSubmit:z,className:k(ne,"p-6"),children:!v||!G?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-gray-500",children:a("searchNoProviderSelected")}):e.jsxs("div",{className:"space-y-6 overflow-y-auto",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl bg-primary text-white",children:e.jsx(X,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:v.displayName}),e.jsx("p",{className:"text-sm text-gray-500",children:v.description})]})]}),e.jsx(j,{type:"button",variant:p?"secondary":"outline",className:"rounded-xl",onClick:Y,children:W})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("searchActiveProvider")}),e.jsxs(b,{value:S,onValueChange:q,children:[e.jsx(y,{className:"rounded-xl",children:e.jsx(g,{})}),e.jsx(N,{children:i.map(s=>e.jsx(x,{value:s.name,children:s.displayName},s.name))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("searchDefaultMaxResults")}),e.jsx(h,{value:w,onChange:s=>A(s.target.value),inputMode:"numeric",className:"rounded-xl"})]})]}),t==="bocha"?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("apiKey")}),e.jsx(h,{type:"password",value:B,onChange:s=>T(s.target.value),placeholder:r.providers.bocha.apiKeyMasked||a("enterApiKey"),className:"rounded-xl"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("searchProviderBaseUrl")}),e.jsx(h,{value:D,onChange:s=>K(s.target.value),className:"rounded-xl"})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("searchProviderSummary")}),e.jsxs(b,{value:E?"true":"false",onValueChange:s=>L(s==="true"),children:[e.jsx(y,{className:"rounded-xl",children:e.jsx(g,{})}),e.jsxs(N,{children:[e.jsx(x,{value:"true",children:a("enabled")}),e.jsx(x,{value:"false",children:a("disabled")})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("searchProviderFreshness")}),e.jsxs(b,{value:U,onValueChange:F,children:[e.jsx(y,{className:"rounded-xl",children:e.jsx(g,{})}),e.jsx(N,{children:ie.map(s=>e.jsx(x,{value:s.value,children:a(s.label)},s.value))})]})]})]}),e.jsx("div",{className:"space-y-2",children:e.jsx("a",{href:H,target:"_blank",rel:"noreferrer",children:e.jsxs(j,{type:"button",variant:"outline",className:"rounded-xl",children:[e.jsx(Z,{className:"mr-2 h-4 w-4"}),a("searchProviderOpenDocs")]})})})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("apiKey")}),e.jsx(h,{type:"password",value:R,onChange:s=>V(s.target.value),placeholder:r.providers.brave.apiKeyMasked||a("enterApiKey"),className:"rounded-xl"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:a("searchProviderBaseUrl")}),e.jsx(h,{value:I,onChange:s=>_(s.target.value),className:"rounded-xl"})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(j,{type:"submit",disabled:m.isPending,children:[e.jsx($,{className:"mr-2 h-4 w-4"}),m.isPending?a("saving"):a("saveChanges")]})})]})})]})]})}export{ve as SearchConfig};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as u,j as e,
|
|
1
|
+
import{r as u,j as e,aF as H,a1 as L,aS as z,d as G}from"./vendor-d7E8OgNx.js";import{u as J,W as K,t as a,S as x,e as m,f as p,g as j,h as o}from"./index-Dl6t70wA.js";import{P as Q,a as X,B as _}from"./page-layout-7K0rcz0I.js";import{C as R,b as T,c as M,d as O,a as A}from"./card-BekAnCgX.js";import{I as h}from"./input-MMn_Na9q.js";import{L as k}from"./label-Dg2ydpN0.js";import{S as Y}from"./switch-DnDMlDVu.js";const U=["env","file","exec"];function N(n=""){return{alias:n,source:"env",prefix:"",path:"",command:"",argsText:"",cwd:"",timeoutMs:5e3}}function Z(){return{path:"",source:"env",provider:"",id:""}}function ee(n,l){return l.source==="env"?{...N(n),source:"env",prefix:l.prefix??""}:l.source==="file"?{...N(n),source:"file",path:l.path}:{...N(n),source:"exec",command:l.command,argsText:(l.args??[]).join(`
|
|
2
2
|
`),cwd:l.cwd??"",timeoutMs:l.timeoutMs??5e3}}function se(n){return n.source==="env"?{source:"env",...n.prefix.trim()?{prefix:n.prefix.trim()}:{}}:n.source==="file"?{source:"file",path:n.path.trim(),format:"json"}:{source:"exec",command:n.command.trim(),args:n.argsText.split(`
|
|
3
|
-
`).map(l=>l.trim()).filter(Boolean),...n.cwd.trim()?{cwd:n.cwd.trim()}:{},timeoutMs:Math.max(1,Math.trunc(n.timeoutMs||5e3))}}function oe(){const{data:n,isLoading:l}=
|
|
3
|
+
`).map(l=>l.trim()).filter(Boolean),...n.cwd.trim()?{cwd:n.cwd.trim()}:{},timeoutMs:Math.max(1,Math.trunc(n.timeoutMs||5e3))}}function oe(){const{data:n,isLoading:l}=J(),P=K(),[D,y]=u.useState(!0),[F,E]=u.useState(""),[I,S]=u.useState(""),[V,$]=u.useState(""),[C,f]=u.useState([]),[q,v]=u.useState([]);u.useEffect(()=>{const s=n==null?void 0:n.secrets;if(!s){y(!0),E(""),S(""),$(""),f([]),v([]);return}y(!!s.enabled),E(s.defaults.env??""),S(s.defaults.file??""),$(s.defaults.exec??"");const t=Object.entries(s.providers).map(([c,i])=>ee(c,i)),r=Object.entries(s.refs).map(([c,i])=>({path:c,source:i.source,provider:i.provider??"",id:i.id}));f(t),v(r)},[n==null?void 0:n.secrets]);const w=u.useMemo(()=>{const s=C.map(t=>t.alias.trim()).filter(Boolean);return Array.from(new Set(s))},[C]),d=(s,t)=>{f(r=>r.map((c,i)=>i===s?{...c,...t}:c))},b=(s,t)=>{v(r=>r.map((c,i)=>i===s?{...c,...t}:c))},W=()=>{try{const s={};for(const[r,c]of C.entries()){const i=c.alias.trim();if(!i)throw new Error(`${a("providerAlias")} #${r+1} ${a("isRequired")}`);if(s[i])throw new Error(`${a("providerAlias")}: ${i} (${a("duplicate")})`);if(c.source==="file"&&!c.path.trim())throw new Error(`${a("secretFilePath")} #${r+1} ${a("isRequired")}`);if(c.source==="exec"&&!c.command.trim())throw new Error(`${a("secretExecCommand")} #${r+1} ${a("isRequired")}`);s[i]=se(c)}const t={};for(const[r,c]of q.entries()){const i=c.path.trim(),B=c.id.trim();if(!i)throw new Error(`${a("secretConfigPath")} #${r+1} ${a("isRequired")}`);if(!B)throw new Error(`${a("secretId")} #${r+1} ${a("isRequired")}`);const g=c.provider.trim();if(g&&!s[g])throw new Error(`${a("secretProviderAlias")}: ${g} ${a("notFound")}`);t[i]={source:c.source,...g?{provider:g}:{},id:B}}P.mutate({data:{enabled:D,defaults:{env:F.trim()||null,file:I.trim()||null,exec:V.trim()||null},providers:s,refs:t}})}catch(s){const t=s instanceof Error?s.message:String(s);G.error(t)}};return l?e.jsx("div",{className:"p-8 text-gray-400",children:a("loading")}):e.jsxs(Q,{className:"space-y-6",children:[e.jsx(X,{title:a("secretsPageTitle"),description:a("secretsPageDescription")}),e.jsxs(R,{children:[e.jsxs(T,{children:[e.jsx(M,{children:a("secrets")}),e.jsx(O,{children:a("secretsEnabledHelp")})]}),e.jsxs(A,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-gray-200 p-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-800",children:a("enabled")}),e.jsx("p",{className:"text-xs text-gray-500",children:a("secretsEnabledHelp")})]}),e.jsx(Y,{checked:D,onCheckedChange:y})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{children:a("defaultEnvProvider")}),e.jsxs(x,{value:F||"__none__",onValueChange:s=>E(s==="__none__"?"":s),children:[e.jsx(m,{children:e.jsx(p,{placeholder:a("noneOption")})}),e.jsxs(j,{children:[e.jsx(o,{value:"__none__",children:a("noneOption")}),w.map(s=>e.jsx(o,{value:s,children:s},s))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{children:a("defaultFileProvider")}),e.jsxs(x,{value:I||"__none__",onValueChange:s=>S(s==="__none__"?"":s),children:[e.jsx(m,{children:e.jsx(p,{placeholder:a("noneOption")})}),e.jsxs(j,{children:[e.jsx(o,{value:"__none__",children:a("noneOption")}),w.map(s=>e.jsx(o,{value:s,children:s},s))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(k,{children:a("defaultExecProvider")}),e.jsxs(x,{value:V||"__none__",onValueChange:s=>$(s==="__none__"?"":s),children:[e.jsx(m,{children:e.jsx(p,{placeholder:a("noneOption")})}),e.jsxs(j,{children:[e.jsx(o,{value:"__none__",children:a("noneOption")}),w.map(s=>e.jsx(o,{value:s,children:s},s))]})]})]})]})]})]}),e.jsxs(R,{children:[e.jsxs(T,{children:[e.jsx(M,{children:a("secretProvidersTitle")}),e.jsx(O,{children:a("secretProvidersDescription")})]}),e.jsxs(A,{className:"space-y-3",children:[C.map((s,t)=>e.jsxs("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsx(h,{value:s.alias,onChange:r=>d(t,{alias:r.target.value}),placeholder:a("providerAlias")}),e.jsxs(x,{value:s.source,onValueChange:r=>d(t,{source:r}),children:[e.jsx(m,{children:e.jsx(p,{})}),e.jsx(j,{children:U.map(r=>e.jsx(o,{value:r,children:r},r))})]}),e.jsxs(_,{type:"button",variant:"outline",onClick:()=>f(r=>r.filter((c,i)=>i!==t)),children:[e.jsx(H,{className:"h-4 w-4 mr-2"}),a("removeProvider")]})]}),s.source==="env"&&e.jsx(h,{value:s.prefix,onChange:r=>d(t,{prefix:r.target.value}),placeholder:a("envPrefix")}),s.source==="file"&&e.jsx(h,{value:s.path,onChange:r=>d(t,{path:r.target.value}),placeholder:a("secretFilePath")}),s.source==="exec"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{value:s.command,onChange:r=>d(t,{command:r.target.value}),placeholder:a("secretExecCommand")}),e.jsx("textarea",{className:"min-h-[84px] w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs font-mono",value:s.argsText,onChange:r=>d(t,{argsText:r.target.value}),placeholder:a("secretExecArgs")}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsx(h,{value:s.cwd,onChange:r=>d(t,{cwd:r.target.value}),placeholder:a("secretExecCwd")}),e.jsx(h,{type:"number",min:1,value:s.timeoutMs,onChange:r=>d(t,{timeoutMs:Number.parseInt(r.target.value,10)||5e3}),placeholder:a("secretExecTimeoutMs")})]})]})]},`provider-${t}`)),e.jsxs(_,{type:"button",variant:"outline",onClick:()=>f(s=>[...s,N()]),children:[e.jsx(L,{className:"h-4 w-4 mr-2"}),a("addSecretProvider")]})]})]}),e.jsxs(R,{children:[e.jsxs(T,{children:[e.jsx(M,{children:a("secretRefsTitle")}),e.jsx(O,{children:a("secretRefsDescription")})]}),e.jsxs(A,{className:"space-y-3",children:[q.map((s,t)=>e.jsx("div",{className:"rounded-xl border border-gray-200 p-3 space-y-3",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(h,{value:s.path,onChange:r=>b(t,{path:r.target.value}),placeholder:a("secretConfigPath")}),e.jsx(h,{value:s.id,onChange:r=>b(t,{id:r.target.value}),placeholder:a("secretId")}),e.jsxs(x,{value:s.source,onValueChange:r=>b(t,{source:r}),children:[e.jsx(m,{children:e.jsx(p,{})}),e.jsx(j,{children:U.map(r=>e.jsx(o,{value:r,children:r},r))})]}),e.jsxs("div",{className:"grid grid-cols-[1fr_auto] gap-2",children:[e.jsxs(x,{value:s.provider||"__none__",onValueChange:r=>b(t,{provider:r==="__none__"?"":r}),children:[e.jsx(m,{children:e.jsx(p,{placeholder:a("secretProviderAlias")})}),e.jsxs(j,{children:[e.jsx(o,{value:"__none__",children:a("noneOption")}),w.map(r=>e.jsx(o,{value:r,children:r},r))]})]}),e.jsx(_,{type:"button",variant:"outline",onClick:()=>v(r=>r.filter((c,i)=>i!==t)),children:e.jsx(H,{className:"h-4 w-4"})})]})]})},`ref-${t}`)),e.jsxs(_,{type:"button",variant:"outline",onClick:()=>v(s=>[...s,Z()]),children:[e.jsx(L,{className:"h-4 w-4 mr-2"}),a("addSecretRef")]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(_,{type:"button",onClick:W,disabled:P.isPending,children:[e.jsx(z,{className:"h-4 w-4 mr-2"}),P.isPending?a("saving"):a("save")]})})]})}export{oe as SecretsConfig};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r,j as e,aG as U,q as J,aT as A,aQ as X,x as Z,M as q,aU as ee,a8 as se,a9 as te}from"./vendor-d7E8OgNx.js";import{u as ae}from"./useConfirmDialog-BYA1XnVU.js";import{q as re,p as ne,s as le,R as ie,U as oe,t,c as i,S as de,e as ce,f as xe,g as me,h as I,V as ue,k as he}from"./index-Dl6t70wA.js";import{P as ge,a as fe,B as f}from"./page-layout-7K0rcz0I.js";import{I as k}from"./input-MMn_Na9q.js";import{b as ye,c as pe,S as be,e as je}from"./session-run-status-CAdjSqeb.js";const y="__unknown_channel__";function ve(a){return he(a)}function j(a){const l=a.indexOf(":");return l<=0?y:a.slice(0,l).trim()||y}function C(a){return a===y?t("sessionsUnknownChannel"):a}function Ne({session:a,channel:l,runStatus:d,isSelected:x,onSelect:n}){const p=C(l),m=a.label||a.key.split(":").pop()||a.key;return e.jsxs("button",{onClick:n,className:i("w-full text-left p-3.5 rounded-xl transition-all duration-200 outline-none focus:outline-none focus:ring-0 group",x?"bg-brand-50 border border-brand-100/50":"bg-transparent border border-transparent hover:bg-gray-50/80"),children:[e.jsxs("div",{className:"flex items-start justify-between mb-1.5",children:[e.jsx("div",{className:i("font-semibold truncate pr-2 flex-1 text-sm",x?"text-brand-800":"text-gray-900"),children:m}),e.jsx("div",{className:i("text-[10px] font-bold px-2 py-0.5 rounded-full shrink-0 capitalize",x?"bg-white text-brand-600 shadow-[0_1px_2px_rgba(0,0,0,0.02)]":"bg-gray-100 text-gray-500"),children:p})]}),e.jsxs("div",{className:i("flex items-center text-xs justify-between mt-2 font-medium",x?"text-brand-600/80":"text-gray-400"),children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:d?e.jsx(be,{status:d}):null}),e.jsx(ee,{className:"w-3.5 h-3.5 opacity-70"}),e.jsx("span",{className:"truncate max-w-[100px]",children:ue(a.updatedAt)})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(q,{className:"w-3.5 h-3.5 opacity-70"}),e.jsx("span",{children:a.messageCount})]})]})]})}function we({message:a}){const l=a.role.toLowerCase()==="user",d=je(a.content).trim();return e.jsx("div",{className:i("flex w-full mb-6",l?"justify-end":"justify-start"),children:e.jsxs("div",{className:i("max-w-[85%] rounded-[1.25rem] p-5 flex gap-3 text-sm",l?"bg-primary text-white rounded-tr-sm":"bg-gray-50 text-gray-800 rounded-tl-sm border border-gray-100/50"),children:[e.jsx("div",{className:"shrink-0 pt-0.5",children:l?e.jsx(se,{className:"w-4 h-4 text-primary-100"}):e.jsx(te,{className:"w-4 h-4 text-gray-400"})}),e.jsxs("div",{className:"flex-1 space-y-1 overflow-x-hidden",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-4 mb-2",children:[e.jsx("span",{className:i("font-semibold text-xs",l?"text-primary-50":"text-gray-900 capitalize"),children:a.role}),e.jsx("span",{className:i("text-[10px]",l?"text-primary-200":"text-gray-400"),children:ve(a.timestamp)})]}),e.jsx("div",{className:"whitespace-pre-wrap break-words leading-relaxed text-[15px]",children:d||"-"})]})]})})}function _e(){var R,B,E,K;const[a,l]=r.useState(""),[d]=r.useState(100),[x]=r.useState(0),[n,p]=r.useState(null),[m,Q]=r.useState("all"),[M,v]=r.useState(""),[L,N]=r.useState(""),[w,S]=r.useState(!1),F=r.useMemo(()=>({q:a.trim()||void 0,limit:d,activeMinutes:x}),[a,d,x]),g=re(F),D=ne({states:["queued","running"],limit:200}),u=le(n,200),b=ie(),_=oe(),{confirm:P,ConfirmDialog:V}=ae(),c=r.useMemo(()=>{var s;return((s=g.data)==null?void 0:s.sessions)??[]},[(R=g.data)==null?void 0:R.sessions]),z=r.useMemo(()=>{var s;return ye(((s=D.data)==null?void 0:s.runs)??[])},[(B=D.data)==null?void 0:B.runs]),O=r.useMemo(()=>pe(z),[z]),o=r.useMemo(()=>c.find(s=>s.key===n),[c,n]),$=r.useMemo(()=>{const s=new Set;for(const h of c)s.add(j(h.key));return Array.from(s).sort((h,T)=>h===y?1:T===y?-1:h.localeCompare(T))},[c]),H=r.useMemo(()=>m==="all"?c:c.filter(s=>j(s.key)===m),[c,m]);r.useEffect(()=>{o?(v(o.label||""),N(o.preferredModel||"")):(v(""),N("")),S(!1)},[o]);const G=()=>{n&&(b.mutate({key:n,data:{label:M.trim()||null,preferredModel:L.trim()||null}}),S(!1))},W=async()=>{if(!n)return;await P({title:t("sessionsClearHistory")+"?",variant:"destructive",confirmLabel:t("sessionsClearHistory")})&&b.mutate({key:n,data:{clearHistory:!0}})},Y=async()=>{if(!n)return;await P({title:t("sessionsDeleteConfirm")+"?",variant:"destructive",confirmLabel:t("sessionsDeleteConfirm")})&&_.mutate({key:n},{onSuccess:()=>p(null)})};return e.jsxs(ge,{fullHeight:!0,children:[e.jsx(fe,{title:t("sessionsPageTitle"),description:t("sessionsPageDescription")}),e.jsxs("div",{className:"flex-1 flex gap-6 min-h-0 relative",children:[e.jsxs("div",{className:"w-[320px] flex flex-col shrink-0 bg-white rounded-2xl shadow-sm border border-gray-200 overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-4 border-b border-gray-100 bg-white z-10 shrink-0 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-[11px] font-semibold text-gray-400 uppercase tracking-wider",children:[c.length," ",t("sessionsListTitle")]}),e.jsx(f,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-lg text-gray-400 hover:text-gray-700 hover:bg-gray-100",onClick:()=>g.refetch(),children:e.jsx(U,{className:i("h-3.5 w-3.5",g.isFetching&&"animate-spin")})})]}),e.jsxs(de,{value:m,onValueChange:Q,children:[e.jsx(ce,{className:"w-full h-8.5 rounded-lg bg-gray-50/50 hover:bg-gray-100 border-gray-200 focus:ring-0 shadow-none text-xs font-medium text-gray-700",children:e.jsx(xe,{placeholder:t("sessionsAllChannels")})}),e.jsxs(me,{className:"rounded-xl shadow-lg border-gray-100 max-w-[280px]",children:[e.jsx(I,{value:"all",className:"rounded-lg text-xs",children:t("sessionsAllChannels")}),$.map(s=>e.jsx(I,{value:s,className:"rounded-lg text-xs truncate pr-6",children:C(s)},s))]})]}),e.jsxs("div",{className:"relative w-full",children:[e.jsx(J,{className:"h-3.5 w-3.5 absolute left-3 top-2.5 text-gray-400"}),e.jsx(k,{value:a,onChange:s=>l(s.target.value),placeholder:t("sessionsSearchPlaceholder"),className:"pl-8 h-8.5 rounded-lg bg-gray-50/50 border-gray-200 focus-visible:bg-white text-xs"})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-1 pb-10 custom-scrollbar relative",children:g.isLoading?e.jsx("div",{className:"text-sm text-gray-400 p-4 text-center",children:t("sessionsLoading")}):H.length===0?e.jsxs("div",{className:"text-sm text-gray-400 p-4 text-center border-2 border-dashed border-gray-100 rounded-xl mt-4",children:[e.jsx(A,{className:"w-8 h-8 mx-auto mb-2 text-gray-300"}),t("sessionsEmpty")]}):H.map(s=>e.jsx(Ne,{session:s,channel:j(s.key),runStatus:O.get(s.key),isSelected:n===s.key,onSelect:()=>p(s.key)},s.key))})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden relative bg-white rounded-2xl shadow-sm border border-gray-200",children:[(b.isPending||_.isPending)&&e.jsx("div",{className:"absolute top-0 left-0 w-full h-1 bg-primary/20 overflow-hidden z-20",children:e.jsx("div",{className:"h-full bg-primary animate-pulse w-1/3 rounded-r-full"})}),n&&o?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"shrink-0 border-b border-gray-100 bg-white px-8 py-5 z-10 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-[14px] bg-gray-50 border border-gray-100 flex items-center justify-center text-gray-400 shrink-0",children:e.jsx(X,{className:"h-6 w-6"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2.5 mb-1.5",children:[e.jsx("h3",{className:"text-lg font-bold text-gray-900 tracking-tight",children:o.label||o.key.split(":").pop()||o.key}),e.jsx("span",{className:"text-[10px] font-bold px-2 py-0.5 rounded-full bg-gray-100 text-gray-500 uppercase tracking-widest",children:C(j(o.key))})]}),e.jsx("div",{className:"text-xs text-gray-500 font-mono break-all line-clamp-1 opacity-70",title:n,children:n})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs(f,{variant:"outline",size:"sm",onClick:()=>S(!w),className:i("h-8.5 rounded-lg shadow-none border-gray-200 transition-all text-xs font-semibold",w?"bg-gray-100 text-gray-900":"hover:bg-gray-50 hover:text-gray-900"),children:[e.jsx(Z,{className:"w-3.5 h-3.5 mr-1.5"}),t("sessionsMetadata")]}),e.jsx(f,{variant:"outline",size:"sm",onClick:W,className:"h-8.5 rounded-lg shadow-none hover:bg-gray-50 hover:text-gray-900 border-gray-200 text-xs font-semibold text-gray-500",children:t("sessionsClearHistory")}),e.jsx(f,{variant:"outline",size:"sm",onClick:Y,className:"h-8.5 rounded-lg shadow-none hover:bg-red-50 hover:text-red-600 hover:border-red-200 border-gray-200 text-xs font-semibold text-red-500",children:t("delete")})]})]}),w&&e.jsxs("div",{className:"flex items-center gap-3 bg-gray-50/50 p-3 rounded-lg border border-gray-100 animate-slide-in",children:[e.jsx(k,{placeholder:t("sessionsLabelPlaceholder"),value:M,onChange:s=>v(s.target.value),className:"h-8 text-sm bg-white"}),e.jsx(k,{placeholder:t("sessionsModelPlaceholder"),value:L,onChange:s=>N(s.target.value),className:"h-8 text-sm bg-white"}),e.jsx(f,{size:"sm",onClick:G,className:"h-8 px-4 shrink-0 shadow-none",disabled:b.isPending,children:t("sessionsSaveMeta")})]})]}),e.jsxs("div",{className:`flex-1 overflow-y-auto p-6 relative
|
|
2
|
+
[&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:bg-gray-300/80 [&::-webkit-scrollbar-thumb]:rounded-full`,children:[u.isLoading&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50/50 backdrop-blur-sm z-10",children:e.jsxs("div",{className:"flex flex-col items-center gap-3 animate-pulse",children:[e.jsx(U,{className:"w-6 h-6 text-primary animate-spin"}),e.jsx("span",{className:"text-sm font-medium text-gray-500",children:t("sessionsHistoryLoading")})]})}),u.error&&e.jsx("div",{className:"text-center p-6 bg-red-50 rounded-xl text-red-600 border border-red-100 text-sm",children:u.error.message}),!u.isLoading&&((E=u.data)==null?void 0:E.messages.length)===0&&e.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-400",children:[e.jsx(q,{className:"w-12 h-12 mb-3 text-gray-300"}),e.jsx("p",{className:"text-sm",children:t("sessionsEmpty")})]}),e.jsx("div",{className:"max-w-3xl mx-auto",children:(((K=u.data)==null?void 0:K.messages)??[]).map((s,h)=>e.jsx(we,{message:s},`${s.timestamp}-${h}`))})]})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-gray-400 p-8 h-full bg-white",children:[e.jsx("div",{className:"w-20 h-20 bg-gray-50 rounded-3xl flex items-center justify-center mb-6 border border-gray-100 shadow-[0_2px_8px_-2px_rgba(0,0,0,0.02)] rotate-3",children:e.jsx(A,{className:"h-8 w-8 text-gray-300 -rotate-3"})}),e.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-2",children:t("sessionsNoSelectionTitle")}),e.jsx("p",{className:"text-sm text-center max-w-sm leading-relaxed",children:t("sessionsNoSelectionDescription")})]})]})]}),e.jsx(V,{})]})}export{_e as SessionsConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as t}from"./vendor-
|
|
1
|
+
import{r as s,j as t}from"./vendor-d7E8OgNx.js";import{c as d}from"./index-Dl6t70wA.js";const i=s.forwardRef(({className:a,hover:e=!0,...r},o)=>t.jsx("div",{ref:o,className:d("rounded-2xl border border-gray-200/50 bg-white text-card-foreground shadow-card transition-all duration-base",e&&"hover:shadow-card-hover hover:border-gray-200",a),...r}));i.displayName="Card";const c=s.forwardRef(({className:a,...e},r)=>t.jsx("div",{ref:r,className:d("flex flex-col space-y-1.5 p-6",a),...e}));c.displayName="CardHeader";const l=s.forwardRef(({className:a,...e},r)=>t.jsx("h3",{ref:r,className:d("text-[15px] font-semibold leading-tight tracking-tight text-gray-900",a),...e}));l.displayName="CardTitle";const n=s.forwardRef(({className:a,...e},r)=>t.jsx("p",{ref:r,className:d("text-[13px] text-gray-400 leading-relaxed",a),...e}));n.displayName="CardDescription";const p=s.forwardRef(({className:a,...e},r)=>t.jsx("div",{ref:r,className:d("p-6 pt-0",a),...e}));p.displayName="CardContent";const x=s.forwardRef(({className:a,...e},r)=>t.jsx("div",{ref:r,className:d("flex items-center justify-between p-6 pt-0",a),...e}));x.displayName="CardFooter";export{i as C,p as a,c as b,l as c,n as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const x="grid min-h-0 grid-cols-1 gap-5 xl:grid-cols-[340px_minmax(0,1fr)]",e="flex min-h-[520px] min-h-0 min-w-0 flex-col overflow-hidden rounded-2xl border border-gray-200/70 bg-white shadow-card xl:h-[calc(100vh-180px)] xl:min-h-[600px] xl:max-h-[860px]",r="flex min-h-[520px] min-h-0 min-w-0 flex-col overflow-hidden rounded-2xl border border-gray-200/70 bg-white shadow-card xl:h-[calc(100vh-180px)] xl:min-h-[600px] xl:max-h-[860px]",l="flex min-h-[520px] min-w-0 items-center justify-center overflow-hidden rounded-2xl border border-gray-200/70 bg-white px-6 text-center xl:h-[calc(100vh-180px)] xl:min-h-[600px] xl:max-h-[860px]";export{x as C,e as a,r as b,l as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:hsl(var(--gray-200))}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--font-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:hsl(var(--gray-400))}input::placeholder,textarea::placeholder{opacity:1;color:hsl(var(--gray-400))}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--brand-50: 94 20% 95%;--brand-100: 94 20% 90%;--brand-200: 94 18% 80%;--brand-300: 94 16% 65%;--brand-400: 94 16% 50%;--brand-500: 94 13% 37%;--brand-600: 94 13% 30%;--brand-700: 94 15% 25%;--brand-800: 94 20% 18%;--brand-900: 94 25% 12%;--gray-50: 45 25% 97%;--gray-100: 45 14% 94%;--gray-200: 45 14% 88%;--gray-300: 45 10% 80%;--gray-400: 45 10% 60%;--gray-500: 45 10% 50%;--gray-600: 45 3% 39%;--gray-700: 45 5% 25%;--gray-800: 45 5% 20%;--gray-900: 45 5% 12%;--background: var(--gray-50);--background-secondary: var(--gray-100);--background-tertiary: var(--gray-200);--foreground: var(--gray-800);--foreground-secondary: var(--gray-700);--foreground-tertiary: var(--gray-500);--foreground-muted: var(--gray-400);--primary: var(--brand-500);--primary-hover: var(--brand-600);--primary-active: var(--brand-700);--primary-foreground: 0 0% 100%;--secondary: var(--gray-100);--secondary-hover: var(--gray-200);--secondary-foreground: var(--gray-800);--accent: var(--brand-50);--accent-foreground: var(--brand-700);--muted: var(--gray-100);--muted-foreground: var(--gray-500);--destructive: 0 84% 60%;--destructive-foreground: 0 0% 98%;--success: 142 76% 36%;--success-foreground: 0 0% 100%;--warning: 38 92% 50%;--warning-foreground: 0 0% 100%;--card: 0 0% 100%;--card-foreground: var(--gray-800);--card-border: var(--gray-200);--popover: 0 0% 100%;--popover-foreground: var(--gray-800);--border: var(--gray-200);--border-hover: var(--gray-300);--border-active: var(--brand-500);--input: 0 0% 100%;--input-border: var(--gray-200);--input-focus: var(--brand-500);--ring: var(--brand-500);--ring-offset: var(--gray-50);--space-0: 0px;--space-1: 4px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--space-10: 40px;--space-12: 48px;--space-16: 64px;--space-20: 80px;--space-24: 96px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-3xl: 24px;--radius-full: 9999px;--shadow-xs: 0 1px 2px 0 rgb(30 20 10 / .04);--shadow-sm: 0 1px 3px 0 rgb(30 20 10 / .06), 0 1px 2px -1px rgb(30 20 10 / .04);--shadow-md: 0 4px 6px -1px rgb(30 20 10 / .06), 0 2px 4px -2px rgb(30 20 10 / .04);--shadow-lg: 0 10px 15px -3px rgb(30 20 10 / .06), 0 4px 6px -4px rgb(30 20 10 / .04);--shadow-xl: 0 20px 25px -5px rgb(30 20 10 / .08), 0 8px 10px -6px rgb(30 20 10 / .04);--shadow-2xl: 0 25px 50px -12px rgb(30 20 10 / .15);--shadow-card: 0 0 8px 0 rgba(0, 0, 0, .04);--shadow-card-hover: 0 0 16px 0 rgba(0, 0, 0, .06);--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;--text-xs: 12px;--text-sm: 14px;--text-base: 16px;--text-lg: 18px;--text-xl: 20px;--text-2xl: 24px;--text-3xl: 30px;--text-4xl: 36px;--text-5xl: 48px;--font-normal: 400;--font-medium: 500;--font-semibold: 600;--font-bold: 700;--leading-tight: 1.25;--leading-snug: 1.375;--leading-normal: 1.5;--leading-relaxed: 1.625;--tracking-tight: -.025em;--tracking-normal: 0;--tracking-wide: .025em;--transition-fast: .15s ease;--transition-base: .2s ease;--transition-slow: .3s ease;--z-dropdown: 100;--z-sticky: 200;--z-fixed: 300;--z-modal-backdrop: 400;--z-modal: 500;--z-popover: 600;--z-tooltip: 700}:root[data-theme=cool]{--brand-50: 214 100% 97%;--brand-100: 214 95% 93%;--brand-200: 213 97% 87%;--brand-300: 212 96% 78%;--brand-400: 213 94% 68%;--brand-500: 217 91% 60%;--brand-600: 221 83% 53%;--brand-700: 224 76% 48%;--brand-800: 226 71% 40%;--brand-900: 224 64% 33%;--gray-50: 210 20% 98%;--gray-100: 220 14% 96%;--gray-200: 220 13% 91%;--gray-300: 216 12% 84%;--gray-400: 218 11% 65%;--gray-500: 220 9% 46%;--gray-600: 215 14% 34%;--gray-700: 217 19% 27%;--gray-800: 220 26% 18%;--gray-900: 224 39% 11%;--background: var(--gray-50);--background-secondary: var(--gray-100);--background-tertiary: var(--gray-200);--foreground: var(--gray-800);--foreground-secondary: var(--gray-700);--foreground-tertiary: var(--gray-500);--foreground-muted: var(--gray-400);--primary: var(--brand-500);--primary-hover: var(--brand-600);--primary-active: var(--brand-700);--secondary: var(--gray-100);--secondary-hover: var(--gray-200);--secondary-foreground: var(--gray-800);--accent: var(--brand-50);--accent-foreground: var(--brand-700);--muted: var(--gray-100);--muted-foreground: var(--gray-500);--card: 0 0% 100%;--card-foreground: var(--gray-800);--card-border: var(--gray-200);--popover: 0 0% 100%;--popover-foreground: var(--gray-800);--border: var(--gray-200);--border-hover: var(--gray-300);--border-active: var(--brand-500);--input: 0 0% 100%;--input-border: var(--gray-200);--input-focus: var(--brand-500);--ring: var(--brand-500);--ring-offset: var(--gray-50);--shadow-xs: 0 1px 2px 0 rgb(15 23 42 / .04);--shadow-sm: 0 1px 3px 0 rgb(15 23 42 / .06), 0 1px 2px -1px rgb(15 23 42 / .04);--shadow-md: 0 4px 6px -1px rgb(15 23 42 / .06), 0 2px 4px -2px rgb(15 23 42 / .04);--shadow-lg: 0 10px 15px -3px rgb(15 23 42 / .06), 0 4px 6px -4px rgb(15 23 42 / .04);--shadow-xl: 0 20px 25px -5px rgb(15 23 42 / .08), 0 8px 10px -6px rgb(15 23 42 / .04);--shadow-2xl: 0 25px 50px -12px rgb(15 23 42 / .14)}:root{--radius: .75rem}*{border-color:hsl(var(--border))}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-sans);overflow:hidden}*{scrollbar-width:thin;scrollbar-color:hsl(var(--gray-300)) transparent}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[70\]{z-index:70}.z-\[var\(--z-popover\,50\)\]{z-index:var(--z-popover,50)}.z-\[var\(--z-tooltip\)\]{z-index:var(--z-tooltip)}.m-2{margin:.5rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-0{height:0px}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[17px\]{height:17px}.h-\[180px\]{height:180px}.h-\[18px\]{height:18px}.h-\[22px\]{height:22px}.h-\[2px\]{height:2px}.h-\[calc\(100vh-80px\)\]{height:calc(100vh - 80px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.max-h-\[220px\]{max-height:220px}.max-h-\[320px\]{max-height:320px}.min-h-0{min-height:0px}.min-h-\[120px\]{min-height:120px}.min-h-\[220px\]{min-height:220px}.min-h-\[240px\]{min-height:240px}.min-h-\[42px\]{min-height:42px}.min-h-\[520px\]{min-height:520px}.min-h-\[68px\]{min-height:68px}.min-h-\[84px\]{min-height:84px}.w-1\.5{width:.375rem}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[150px\]{width:150px}.w-\[160px\]{width:160px}.w-\[17px\]{width:17px}.w-\[220px\]{width:220px}.w-\[240px\]{width:240px}.w-\[280px\]{width:280px}.w-\[320px\]{width:320px}.w-\[360px\]{width:360px}.w-\[62\%\]{width:62%}.w-\[78\%\]{width:78%}.w-\[84\%\]{width:84%}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-20{min-width:5rem}.min-w-\[100px\]{min-width:100px}.min-w-\[140px\]{min-width:140px}.min-w-\[180px\]{min-width:180px}.min-w-\[18px\]{min-width:18px}.min-w-\[220px\]{min-width:220px}.min-w-\[240px\]{min-width:240px}.min-w-\[56px\]{min-width:56px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-6xl{max-width:72rem}.max-w-\[100px\]{max-width:100px}.max-w-\[180px\]{max-width:180px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-\[420px\]{max-width:420px}.max-w-\[85\%\]{max-width:85%}.max-w-\[92\%\]{max-width:92%}.max-w-\[calc\(100vw-1\.5rem\)\]{max-width:calc(100vw - 1.5rem)}.max-w-\[min\(1120px\,100\%\)\]{max-width:min(1120px,100%)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-3{--tw-rotate: -3deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-3{--tw-rotate: 3deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-\[-45deg\]{--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes fadeIn{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.animate-fade-in{animation:fadeIn .4s cubic-bezier(.16,1,.3,1) forwards}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes slideIn{0%{opacity:0;transform:translate(-12px)}to{opacity:1;transform:translate(0)}}.animate-slide-in{animation:slideIn .35s cubic-bezier(.16,1,.3,1) forwards}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-ns-resize{cursor:ns-resize}.cursor-pointer{cursor:pointer}.cursor-se-resize{cursor:se-resize}.cursor-text{cursor:text}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.grid-cols-\[minmax\(0\,1fr\)_0\.875rem\]{grid-template-columns:minmax(0,1fr) .875rem}.grid-cols-\[minmax\(260px\,340px\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(260px,340px) minmax(0,1fr)}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-3\.5{gap:.875rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:calc(var(--radius) + 8px)}.rounded-3xl{border-radius:1.5rem}.rounded-\[1\.25rem\]{border-radius:1.25rem}.rounded-\[14px\]{border-radius:14px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-tr-sm{border-top-right-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[\#dde0ea\]{--tw-border-opacity: 1;border-color:rgb(221 224 234 / var(--tw-border-opacity, 1))}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-200\/70{border-color:#fde68ab3}.border-amber-200\/80{border-color:#fde68acc}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-border\/40{border-color:hsl(var(--border) / .4)}.border-gray-100{border-color:hsl(var(--gray-100))}.border-gray-100\/50{border-color:hsl(var(--gray-100) / .5)}.border-gray-200{border-color:hsl(var(--gray-200))}.border-gray-200\/40{border-color:hsl(var(--gray-200) / .4)}.border-gray-200\/50{border-color:hsl(var(--gray-200) / .5)}.border-gray-200\/60{border-color:hsl(var(--gray-200) / .6)}.border-gray-200\/70{border-color:hsl(var(--gray-200) / .7)}.border-gray-200\/80{border-color:hsl(var(--gray-200) / .8)}.border-gray-300{border-color:hsl(var(--gray-300))}.border-orange-200\/80{border-color:#fed7aacc}.border-primary{border-color:hsl(var(--primary))}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-primary\/30{border-color:hsl(var(--primary) / .3)}.border-red-100{--tw-border-opacity: 1;border-color:rgb(254 226 226 / var(--tw-border-opacity, 1))}.border-rose-100{--tw-border-opacity: 1;border-color:rgb(255 228 230 / var(--tw-border-opacity, 1))}.border-rose-200{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-100\/40{background-color:#fef3c766}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-50\/60{background-color:#fffbeb99}.bg-amber-50\/70{background-color:#fffbebb3}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-black\/40{background-color:#0006}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-card\/40{background-color:hsl(var(--card) / .4)}.bg-cyan-600{--tw-bg-opacity: 1;background-color:rgb(8 145 178 / var(--tw-bg-opacity, 1))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-gray-100\/80{background-color:hsl(var(--gray-100) / .8)}.bg-gray-200{background-color:hsl(var(--gray-200))}.bg-gray-200\/80{background-color:hsl(var(--gray-200) / .8)}.bg-gray-300{background-color:hsl(var(--gray-300))}.bg-gray-50\/50{background-color:hsl(var(--gray-50) / .5)}.bg-gray-50\/70{background-color:hsl(var(--gray-50) / .7)}.bg-muted{background-color:hsl(var(--muted))}.bg-orange-50\/70{background-color:#fff7edb3}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-50\/40{background-color:hsl(var(--brand-50) / .4)}.bg-primary-50\/50{background-color:hsl(var(--brand-50) / .5)}.bg-primary-700\/60{background-color:hsl(var(--brand-700) / .6)}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.bg-rose-500{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-stone-600{--tw-bg-opacity: 1;background-color:rgb(87 83 78 / var(--tw-bg-opacity, 1))}.bg-teal-600{--tw-bg-opacity: 1;background-color:rgb(13 148 136 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-violet-500{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/80{background-color:#fffc}.bg-white\/90{background-color:#ffffffe6}.bg-white\/95{background-color:#fffffff2}.bg-yellow-600{--tw-bg-opacity: 1;background-color:rgb(202 138 4 / var(--tw-bg-opacity, 1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-l{background-image:linear-gradient(to left,var(--tw-gradient-stops))}.from-gray-50\/60{--tw-gradient-from: hsl(var(--gray-50) / .6) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--gray-50) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.to-white\/10{--tw-gradient-to: rgb(255 255 255 / .1) var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-10{padding-bottom:2.5rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-5{padding-bottom:1.25rem}.pl-2{padding-left:.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[28px\]{font-size:28px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-5{line-height:1.25rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[-0\.01em\]{letter-spacing:-.01em}.tracking-\[-0\.02em\]{letter-spacing:-.02em}.tracking-\[0\.16em\]{letter-spacing:.16em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-700\/80{color:#b45309cc}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-800\/90{color:#92400ee6}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-amber-900\/80{color:#78350fcc}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-gray-300{color:hsl(var(--gray-300))}.text-gray-400{color:hsl(var(--gray-400))}.text-gray-500\/90{color:hsl(var(--gray-500) / .9)}.text-gray-700{color:hsl(var(--gray-700))}.text-gray-800{color:hsl(var(--gray-800))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-100{color:hsl(var(--brand-100))}.text-primary-200{color:hsl(var(--brand-200))}.text-primary-300{color:hsl(var(--brand-300))}.text-primary-50{color:hsl(var(--brand-50))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-rose-500{--tw-text-opacity: 1;color:rgb(244 63 94 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.mix-blend-multiply{mix-blend-mode:multiply}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_1px_2px_rgba\(0\,0\,0\,0\.02\)\]{--tw-shadow: 0 1px 2px rgba(0,0,0,.02);--tw-shadow-colored: 0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_2px_8px_-2px_rgba\(0\,0\,0\,0\.02\)\]{--tw-shadow: 0 2px 8px -2px rgba(0,0,0,.02);--tw-shadow-colored: 0 2px 8px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-card{--tw-shadow: var(--shadow-card);--tw-shadow-colored: var(--shadow-card);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-card{--tw-shadow-color: hsl(var(--card));--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.ring-offset-white{--tw-ring-offset-color: #fff}.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-md{--tw-backdrop-blur: blur(12px);-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-blur-sm{--tw-backdrop-blur: blur(4px);-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,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200,.duration-base{transition-duration:.2s}.duration-fast{transition-duration:.15s}.duration-slow{transition-duration:.3s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.duration-150{animation-duration:.15s}.duration-200,.duration-base{animation-duration:.2s}.duration-fast{animation-duration:.15s}.duration-slow{animation-duration:.3s}.running{animation-play-state:running}.bg-brand-50{background-color:hsl(var(--brand-50))}.text-brand-600{color:hsl(var(--brand-600))}.bg-gray-50{background-color:hsl(var(--gray-50))}.bg-gray-100{background-color:hsl(var(--gray-100))}.text-gray-500{color:hsl(var(--gray-500))}.text-gray-600{color:hsl(var(--gray-600))}.text-gray-900{color:hsl(var(--gray-900))}.shadow-card{box-shadow:var(--shadow-card)}.custom-scrollbar::-webkit-scrollbar{width:5px;height:5px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{background:hsl(var(--gray-300));border-radius:6px}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:hsl(var(--gray-400))}.shadow-card{box-shadow:0 1px 3px -1px #1e140a08,0 1px 2px -1px #1e140a05}@keyframes fadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slideIn{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes scaleIn{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@keyframes pulse-soft{0%,to{opacity:1}50%{opacity:.85}}.animate-fade-in{animation:fadeIn .35s cubic-bezier(.16,1,.3,1) forwards}.animate-slide-in{animation:slideIn .3s cubic-bezier(.16,1,.3,1) forwards}.animate-scale-in{animation:scaleIn .3s cubic-bezier(.16,1,.3,1) forwards}.animate-pulse-soft{animation:pulse-soft 3s ease-in-out infinite}.chat-markdown{--md-text: #0f172a;--md-muted: #334155;--md-border: rgba(148, 163, 184, .34);--md-link: hsl(var(--primary));--md-inline-code-bg: rgba(15, 23, 42, .08);--md-inline-code-color: #1e293b;--md-blockquote-border: rgba(14, 165, 233, .45);--md-blockquote-bg: rgba(14, 165, 233, .08);--md-code-surface: #0b1220;--md-code-toolbar-bg: rgba(15, 23, 42, .56);--md-code-toolbar-border: rgba(148, 163, 184, .3);--md-code-text: #e5e7eb;--md-table-head-bg: rgba(148, 163, 184, .14);color:var(--md-text);font-size:.925rem;line-height:1.72;word-break:break-word}.chat-markdown-user{--md-text: rgba(255, 255, 255, .97);--md-muted: rgba(219, 234, 254, .92);--md-border: rgba(191, 219, 254, .35);--md-link: #dbeafe;--md-inline-code-bg: rgba(15, 23, 42, .35);--md-inline-code-color: #eff6ff;--md-blockquote-border: rgba(191, 219, 254, .8);--md-blockquote-bg: rgba(15, 23, 42, .2);--md-code-surface: rgba(2, 6, 23, .92);--md-code-toolbar-bg: rgba(2, 6, 23, .88);--md-code-toolbar-border: rgba(191, 219, 254, .26);--md-code-text: #e2e8f0;--md-table-head-bg: rgba(191, 219, 254, .16)}.chat-markdown>*+*{margin-top:.72rem}.chat-markdown p,.chat-markdown li,.chat-markdown blockquote{color:var(--md-text)}.chat-markdown h1,.chat-markdown h2,.chat-markdown h3,.chat-markdown h4,.chat-markdown h5,.chat-markdown h6{margin:.2rem 0 0;font-weight:700;line-height:1.35;letter-spacing:-.01em}.chat-markdown h1{font-size:1.22rem}.chat-markdown h2{font-size:1.12rem}.chat-markdown h3{font-size:1.02rem}.chat-markdown h4,.chat-markdown h5,.chat-markdown h6{font-size:.96rem}.chat-markdown ul,.chat-markdown ol{margin:.35rem 0;padding-left:1.5rem;list-style-position:outside}.chat-markdown ul{list-style-type:disc}.chat-markdown ol{list-style-type:decimal}.chat-markdown ul ul{list-style-type:circle}.chat-markdown ul ul ul{list-style-type:square}.chat-markdown ol ol{list-style-type:lower-alpha}.chat-markdown ol ol ol{list-style-type:lower-roman}.chat-markdown li{display:list-item}.chat-markdown li::marker{color:#334155e6;font-weight:600}.chat-markdown li+li{margin-top:.25rem}.chat-markdown li>p{margin:0}.chat-markdown ul.contains-task-list,.chat-markdown ol.contains-task-list{list-style:none;padding-left:.2rem}.chat-markdown li.task-list-item{display:flex;align-items:flex-start;gap:.52rem}.chat-markdown-user li::marker{color:#dbeafef2}.chat-markdown .chat-task-checkbox{position:relative;top:.2rem;width:.92rem;height:.92rem;cursor:default}.chat-markdown hr{border:0;border-top:1px solid var(--md-border);margin:.92rem 0}.chat-markdown a{color:var(--md-link);text-decoration-line:underline;text-decoration-thickness:1.2px;text-underline-offset:2px;word-break:break-all}.chat-markdown .chat-link-invalid{color:var(--md-muted);text-decoration-line:underline;text-decoration-style:dotted}.chat-markdown code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.82rem}.chat-markdown .chat-inline-code,.chat-markdown :not(pre)>code{padding:.1rem .35rem;border-radius:.4rem;background:var(--md-inline-code-bg);color:var(--md-inline-code-color);border:1px solid var(--md-border);font-weight:520}.chat-codeblock{margin:.2rem 0 .1rem;border:1px solid var(--md-code-toolbar-border);border-radius:.78rem;overflow:hidden;background:var(--md-code-surface)}.chat-codeblock-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.43rem .58rem;background:var(--md-code-toolbar-bg);border-bottom:1px solid var(--md-code-toolbar-border)}.chat-codeblock-language{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--md-code-text);opacity:.8}.chat-codeblock-copy{display:inline-flex;align-items:center;gap:.3rem;font-size:.7rem;font-weight:600;color:var(--md-code-text);border:1px solid var(--md-code-toolbar-border);border-radius:.48rem;padding:.18rem .36rem;background:transparent;cursor:pointer;transition:background-color .15s ease,border-color .15s ease}.chat-codeblock-copy:hover{background:#94a3b833}.chat-codeblock pre{margin:0;padding:.75rem .82rem .8rem;overflow-x:auto;background:transparent}.chat-codeblock code{display:block;min-width:-moz-max-content;min-width:max-content;white-space:pre;line-height:1.58;color:var(--md-code-text)}.chat-table-wrap{margin:.15rem 0;border:1px solid var(--md-border);border-radius:.72rem;overflow-x:auto}.chat-markdown table{width:100%;min-width:420px;border-collapse:separate;border-spacing:0;font-size:.82rem}.chat-markdown thead{background:var(--md-table-head-bg)}.chat-markdown th,.chat-markdown td{padding:.45rem .58rem;border-bottom:1px solid var(--md-border);text-align:left;vertical-align:top}.chat-markdown th+th,.chat-markdown td+td{border-left:1px solid var(--md-border)}.chat-markdown tbody tr:last-child td{border-bottom:none}.chat-markdown th,.chat-markdown strong{font-weight:650}.chat-markdown img{max-width:100%;border-radius:.75rem;border:1px solid var(--md-border)}.chat-markdown blockquote{margin:.2rem 0;border-left:3px solid var(--md-blockquote-border);border-radius:0 .55rem .55rem 0;padding:.45rem .72rem;background:var(--md-blockquote-bg);color:var(--md-muted)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:font-normal::-moz-placeholder{font-weight:400}.placeholder\:font-normal::placeholder{font-weight:400}.placeholder\:text-gray-300::-moz-placeholder{color:hsl(var(--gray-300))}.placeholder\:text-gray-300::placeholder{color:hsl(var(--gray-300))}.placeholder\:text-gray-400::-moz-placeholder{color:hsl(var(--gray-400))}.placeholder\:text-gray-400::placeholder{color:hsl(var(--gray-400))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:border-blue-300\/80:hover{border-color:#93c5fdcc}.hover\:border-gray-200:hover{border-color:hsl(var(--gray-200))}.hover\:border-gray-300:hover{border-color:hsl(var(--gray-300))}.hover\:border-primary\/40:hover{border-color:hsl(var(--primary) / .4)}.hover\:border-red-200:hover{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.hover\:border-rose-200:hover{--tw-border-opacity: 1;border-color:rgb(254 205 211 / var(--tw-border-opacity, 1))}.hover\:bg-\[\#e4e7ef\]:hover{--tw-bg-opacity: 1;background-color:rgb(228 231 239 / var(--tw-bg-opacity, 1))}.hover\:bg-black\/10:hover{background-color:#0000001a}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-gray-100\/70:hover{background-color:hsl(var(--gray-100) / .7)}.hover\:bg-gray-100\/80:hover{background-color:hsl(var(--gray-100) / .8)}.hover\:bg-gray-200:hover{background-color:hsl(var(--gray-200))}.hover\:bg-gray-200\/60:hover{background-color:hsl(var(--gray-200) / .6)}.hover\:bg-gray-200\/80:hover{background-color:hsl(var(--gray-200) / .8)}.hover\:bg-gray-300\/80:hover{background-color:hsl(var(--gray-300) / .8)}.hover\:bg-gray-50\/70:hover{background-color:hsl(var(--gray-50) / .7)}.hover\:bg-gray-50\/80:hover{background-color:hsl(var(--gray-50) / .8)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary-600:hover{background-color:hsl(var(--brand-600))}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.hover\:bg-rose-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/50:hover{background-color:#ffffff80}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-gray-700:hover{color:hsl(var(--gray-700))}.hover\:text-gray-800:hover{color:hsl(var(--gray-800))}.hover\:text-primary:hover{color:hsl(var(--primary))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-primary\/80:hover{color:hsl(var(--primary) / .8)}.hover\:text-red-300:hover{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-card-hover:hover{--tw-shadow: var(--shadow-card-hover);--tw-shadow-colored: var(--shadow-card-hover);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:bg-gray-50:hover{background-color:hsl(var(--gray-50))}.hover\:bg-gray-100:hover{background-color:hsl(var(--gray-100))}.hover\:text-gray-500:hover{color:hsl(var(--gray-500))}.hover\:text-gray-600:hover{color:hsl(var(--gray-600))}.hover\:text-gray-900:hover{color:hsl(var(--gray-900))}.hover\:shadow-card-hover:hover{box-shadow:var(--shadow-card-hover);box-shadow:0 8px 20px -4px #1e140a0f,0 4px 8px -4px #1e140a08}.focus\:border-primary\/40:focus{border-color:hsl(var(--primary) / .4)}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary\/30:focus{--tw-ring-color: hsl(var(--primary) / .3)}.focus\:ring-primary\/40:focus{--tw-ring-color: hsl(var(--primary) / .4)}.focus\:bg-gray-100:focus{background-color:hsl(var(--gray-100))}.focus-visible\:bg-white:focus-visible{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-primary:focus-visible{--tw-ring-color: hsl(var(--primary))}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-white:focus-visible{--tw-ring-offset-color: #fff}.active\:cursor-grabbing:active{cursor:grabbing}.active\:bg-primary-700:active{background-color:hsl(var(--brand-700))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group\/action:hover .group-hover\/action\:translate-x-0\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-gray-800{color:hsl(var(--gray-800))}.group:hover .group-hover\:text-primary{color:hsl(var(--primary))}.group:hover .group-hover\:opacity-100{opacity:1}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:bg-emerald-500[data-state=checked]{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}@media not all and (min-width:1024px){.max-lg\:w-full{width:100%}}@media(min-width:640px){.sm\:inline-flex{display:inline-flex}.sm\:w-\[38\%\]{width:38%}.sm\:min-w-\[170px\]{min-width:170px}.sm\:max-w-\[240px\]{max-width:240px}.sm\:flex-1{flex:1 1 0%}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:gap-0{gap:0px}.sm\:gap-3{gap:.75rem}.sm\:text-left{text-align:left}}@media(min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:opacity-0{opacity:0}.group:focus-within .md\:group-focus-within\:opacity-100{opacity:1}.group:hover .md\:group-hover\:opacity-100{opacity:1}}@media(min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:1280px){.xl\:flex{display:flex}.xl\:h-\[calc\(100vh-180px\)\]{height:calc(100vh - 180px)}.xl\:h-full{height:100%}.xl\:max-h-\[860px\]{max-height:860px}.xl\:min-h-0{min-height:0px}.xl\:min-h-\[600px\]{min-height:600px}.xl\:flex-1{flex:1 1 0%}.xl\:grid-cols-\[340px_minmax\(0\,1fr\)\]{grid-template-columns:340px minmax(0,1fr)}.xl\:flex-col{flex-direction:column}.xl\:overflow-hidden{overflow:hidden}.xl\:pb-0{padding-bottom:0}}@media(min-width:1536px){.\32xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&\:\:-webkit-scrollbar-thumb\]\:rounded-full::-webkit-scrollbar-thumb{border-radius:9999px}.\[\&\:\:-webkit-scrollbar-thumb\]\:bg-gray-300\/80::-webkit-scrollbar-thumb{background-color:hsl(var(--gray-300) / .8)}.\[\&\:\:-webkit-scrollbar\]\:w-2::-webkit-scrollbar{width:.5rem}.\[\&\>\:last-child\]\:hidden>:last-child{display:none}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}
|