mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-17 18:06:06 +00:00
1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,48456,e=>{"use strict";let t=(0,e.i(83227).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],48456)},4480,(e,t,a)=>{t.exports=e.r(96387)},56907,20317,e=>{"use strict";var t=e.i(15742);e.i(81795).BackendClient,e.s([],56907),e.s(["httpClient",()=>t.backendClient],20317)},21984,e=>{"use strict";var t=e.i(2962);e.s(["ChevronDown",()=>t.default])},2147,e=>{"use strict";var t=e.i(60498),a=e.i(49311);e.i(16312);var r=e.i(45855),n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{let o=(0,r.createSlot)(`Primitive.${n}`),i=a.forwardRef((e,a)=>{let{asChild:r,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(r?o:n,{...i,ref:a})});return i.displayName=`Primitive.${n}`,{...e,[n]:i}},{}),o="horizontal",i=["horizontal","vertical"],l=a.forwardRef((e,a)=>{var r;let{decorative:l,orientation:s=o,...c}=e,u=(r=s,i.includes(r))?s:o;return(0,t.jsx)(n.div,{"data-orientation":u,...l?{role:"none"}:{"aria-orientation":"vertical"===u?u:void 0,role:"separator"},...c,ref:a})});l.displayName="Separator";var s=e.i(14407);function c({className:e,orientation:a="horizontal",decorative:r=!0,...n}){return(0,t.jsx)(l,{"data-slot":"separator",decorative:r,orientation:a,className:(0,s.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}e.s(["Separator",()=>c],2147)},66413,e=>{e.v("/_next/static/media/langbot-logo.41703e3d.webp")},28963,e=>{"use strict";let t={src:e.i(66413).default,width:548,height:548,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRkgBAABXRUJQVlA4TDwBAAAvB8ABEM1VICICHghADgIAAID9kaQyqoQRAgYAAAAAAAAAAgAAAAAAAAAAAAAAAAA8CEQq2ACp+X0AAIAHApCDAAAAcP73X1iZlvQiAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAi9FlrQzHkgaDkIAAAA579vFdLQshAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAARI60WJXS80AGDQAAAADOfwgAAAAAAAAAAA4AAAAAAAAAAAAAAADgCAAAAAAAAAAAQq7H/N7TgYqB84swNqv3dIDSDJdp2dhYkABUvKcDlW46uNVkSJ+yZV9U4QEqBAwpu54oU8IbpObN2wr6M3CUFHW4lf3rrTUAUGQIBOO8K7pPO55sLEIJUvNE2HEP7tzbr5Fu5+TMkYCxWePXLpbO8zf0qxUBY7MC"};e.s(["default",0,t])},47108,29136,23371,e=>{"use strict";var t=e.i(83227);let a=(0,t.default)("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);e.s(["Moon",()=>a],47108);let r=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",()=>r],29136);let n=(0,t.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",()=>n],23371)},67046,e=>{"use strict";var t=e.i(60498),a=e.i(49311),r=e.i(47977);let n=(0,e.i(83227).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.i(26128);var o=e.i(91830),i=e.i(18090);function l({triggerClassName:e,onOpenChange:l}){let{t:s}=(0,o.useTranslation)(),[c,u]=(0,a.useState)(i.default.language);(0,a.useEffect)(()=>{d()},[]);let d=()=>{"zh-CN"===i.default.language||"zh-Hans"===i.default.language?(u("zh-Hans"),localStorage.setItem("langbot_language","zh-Hans")):"zh-TW"===i.default.language||"zh-Hant"===i.default.language?(u("zh-Hant"),localStorage.setItem("langbot_language","zh-Hant")):"ja"===i.default.language||"ja-JP"===i.default.language?(u("ja-JP"),localStorage.setItem("langbot_language","ja-JP")):(u("en-US"),localStorage.setItem("langbot_language","en-US"));let e=localStorage.getItem("langbot_language");if(e)i.default.changeLanguage(e),u(e);else{let e=navigator.language;if(e){let t="zh-Hans";t="zh-CN"===e?"zh-Hans":"zh-TW"===e?"zh-Hant":"ja"===e||"ja-JP"===e?"ja-JP":"en-US",i.default.changeLanguage(t),u(t),localStorage.setItem("langbot_language",t)}}};return(0,t.jsxs)(r.Select,{value:c,onValueChange:e=>{i.default.changeLanguage(e),u(e),localStorage.setItem("langbot_language",e),window.location.reload()},onOpenChange:l,children:[(0,t.jsxs)(r.SelectTrigger,{className:e||"w-[140px]",children:[(0,t.jsx)(n,{className:"h-4 w-4 mr-2"}),(0,t.jsx)(r.SelectValue,{placeholder:s("common.language")})]}),(0,t.jsxs)(r.SelectContent,{children:[(0,t.jsx)(r.SelectItem,{value:"zh-Hans",children:"简体中文"}),(0,t.jsx)(r.SelectItem,{value:"zh-Hant",children:"繁體中文"}),(0,t.jsx)(r.SelectItem,{value:"en-US",children:"English"}),(0,t.jsx)(r.SelectItem,{value:"ja-JP",children:"日本語"})]})]})}e.s(["LanguageSelector",()=>l],67046)},29601,e=>{"use strict";var t=e.i(60498),a=e.i(14407);function r({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...r})})}function n({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...r})}function o({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...r})}function i({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...r})}function l({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.cn)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}function s({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}e.s(["Table",()=>r,"TableBody",()=>o,"TableCell",()=>s,"TableHead",()=>l,"TableHeader",()=>n,"TableRow",()=>i])},78083,e=>{"use strict";var t=e.i(60498),a=e.i(45855),r=e.i(63686),n=e.i(14407);let o=(0,r.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:r,asChild:i=!1,...l}){let s=i?a.Slot:"span";return(0,t.jsx)(s,{"data-slot":"badge",className:(0,n.cn)(o({variant:r}),e),...l})}e.s(["Badge",()=>i])},56604,e=>{"use strict";let t=(0,e.i(83227).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",()=>t],56604)},37106,e=>{"use strict";var t=e.i(94424);e.s(["ChevronRight",()=>t.default])},70917,86759,e=>{"use strict";var t=e.i(60498),a=e.i(49311),r=e.i(15822),n=e.i(67658),o=e.i(87881),i=e.i(30479),l=e.i(21619),s=e.i(4372),c=e.i(41296),u=e.i(60677),d=e.i(9252),f="rovingFocusGroup.onEntryFocus",A={bubbles:!1,cancelable:!0},g="RovingFocusGroup",[v,h,p]=(0,o.createCollection)(g),[b,m]=(0,n.createContextScope)(g,[p]),[x,y]=b(g),w=a.forwardRef((e,a)=>(0,t.jsx)(v.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(v.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(k,{...e,ref:a})})}));w.displayName=g;var k=a.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,orientation:l,loop:v=!1,dir:p,currentTabStopId:b,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:y,onEntryFocus:w,preventScrollOnEntryFocus:k=!1,...j}=e,C=a.useRef(null),S=(0,i.useComposedRefs)(n,C),T=(0,d.useDirection)(p),[z,R]=(0,u.useControllableState)({prop:b,defaultProp:m??null,onChange:y,caller:g}),[D,H]=a.useState(!1),E=(0,c.useCallbackRef)(w),N=h(o),P=a.useRef(!1),[M,F]=a.useState(0);return a.useEffect(()=>{let e=C.current;if(e)return e.addEventListener(f,E),()=>e.removeEventListener(f,E)},[E]),(0,t.jsx)(x,{scope:o,orientation:l,dir:T,loop:v,currentTabStopId:z,onItemFocus:a.useCallback(e=>R(e),[R]),onItemShiftTab:a.useCallback(()=>H(!0),[]),onFocusableItemAdd:a.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>F(e=>e-1),[]),children:(0,t.jsx)(s.Primitive.div,{tabIndex:D||0===M?-1:0,"data-orientation":l,...j,ref:S,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{P.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!P.current;if(e.target===e.currentTarget&&t&&!D){let t=new CustomEvent(f,A);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=N().filter(e=>e.focusable);I([e.find(e=>e.active),e.find(e=>e.id===z),...e].filter(Boolean).map(e=>e.ref.current),k)}}P.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>H(!1))})})}),j="RovingFocusGroupItem",C=a.forwardRef((e,n)=>{let{__scopeRovingFocusGroup:o,focusable:i=!0,active:c=!1,tabStopId:u,children:d,...f}=e,A=(0,l.useId)(),g=u||A,p=y(j,o),b=p.currentTabStopId===g,m=h(o),{onFocusableItemAdd:x,onFocusableItemRemove:w,currentTabStopId:k}=p;return a.useEffect(()=>{if(i)return x(),()=>w()},[i,x,w]),(0,t.jsx)(v.ItemSlot,{scope:o,id:g,focusable:i,active:c,children:(0,t.jsx)(s.Primitive.span,{tabIndex:b?0:-1,"data-orientation":p.orientation,...f,ref:n,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{i?p.onItemFocus(g):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>p.onItemFocus(g)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,a){var r;let n=(r=e.key,"rtl"!==a?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return S[n]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){var a,r;"prev"===t&&n.reverse();let o=n.indexOf(e.currentTarget);n=p.loop?(a=n,r=o+1,a.map((e,t)=>a[(r+t)%a.length])):n.slice(o+1)}setTimeout(()=>I(n))}}),children:"function"==typeof d?d({isCurrentTabStop:b,hasTabStop:null!=k}):d})})});C.displayName=j;var S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function I(e,t=!1){let a=document.activeElement;for(let r of e)if(r===a||(r.focus({preventScroll:t}),document.activeElement!==a))return}e.s(["Item",()=>C,"Root",()=>w,"createRovingFocusGroupScope",()=>m],86759);var T=e.i(33036),z="Tabs",[R,D]=(0,n.createContextScope)(z,[m]),H=m(),[E,N]=R(z),P=a.forwardRef((e,a)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:i,orientation:c="horizontal",dir:f,activationMode:A="automatic",...g}=e,v=(0,d.useDirection)(f),[h,p]=(0,u.useControllableState)({prop:n,onChange:o,defaultProp:i??"",caller:z});return(0,t.jsx)(E,{scope:r,baseId:(0,l.useId)(),value:h,onValueChange:p,orientation:c,dir:v,activationMode:A,children:(0,t.jsx)(s.Primitive.div,{dir:v,"data-orientation":c,...g,ref:a})})});P.displayName=z;var M="TabsList",F=a.forwardRef((e,a)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,i=N(M,r),l=H(r);return(0,t.jsx)(w,{asChild:!0,...l,orientation:i.orientation,dir:i.dir,loop:n,children:(0,t.jsx)(s.Primitive.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:a})})});F.displayName=M;var U="TabsTrigger",B=a.forwardRef((e,a)=>{let{__scopeTabs:n,value:o,disabled:i=!1,...l}=e,c=N(U,n),u=H(n),d=V(c.baseId,o),f=q(c.baseId,o),A=o===c.value;return(0,t.jsx)(C,{asChild:!0,...u,focusable:!i,active:A,children:(0,t.jsx)(s.Primitive.button,{type:"button",role:"tab","aria-selected":A,"aria-controls":f,"data-state":A?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:d,...l,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(o)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(o)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==c.activationMode;A||i||!e||c.onValueChange(o)})})})});B.displayName=U;var L="TabsContent",_=a.forwardRef((e,r)=>{let{__scopeTabs:n,value:o,forceMount:i,children:l,...c}=e,u=N(L,n),d=V(u.baseId,o),f=q(u.baseId,o),A=o===u.value,g=a.useRef(A);return a.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(T.Presence,{present:i||A,children:({present:a})=>(0,t.jsx)(s.Primitive.div,{"data-state":A?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!a,id:f,tabIndex:0,...c,ref:r,style:{...e.style,animationDuration:g.current?"0s":void 0},children:a&&l})})});function V(e,t){return`${e}-trigger-${t}`}function q(e,t){return`${e}-content-${t}`}_.displayName=L;var K=e.i(14407);function Q({className:e,...a}){return(0,t.jsx)(P,{"data-slot":"tabs",className:(0,K.cn)("flex flex-col gap-2",e),...a})}function J({className:e,...a}){return(0,t.jsx)(F,{"data-slot":"tabs-list",className:(0,K.cn)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...a})}function O({className:e,...a}){return(0,t.jsx)(B,{"data-slot":"tabs-trigger",className:(0,K.cn)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...a})}function G({className:e,...a}){return(0,t.jsx)(_,{"data-slot":"tabs-content",className:(0,K.cn)("flex-1 outline-none",e),...a})}e.s(["Tabs",()=>Q,"TabsContent",()=>G,"TabsList",()=>J,"TabsTrigger",()=>O],70917)},17755,18941,e=>{"use strict";let t=(0,e.i(83227).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],17755);var a=e.i(69371);e.s(["Check",()=>a.default],18941)},79154,e=>{"use strict";let t=(0,e.i(83227).default)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",()=>t],79154)}]); |