PageSourceSearch

http://parisobs.com/_next/static/chunks/8381-12f26aa31f986216.js

js parisobs.com collected 2026-10-04 01:42:59 UTC 117,591 bytes, 7 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8381],{9686:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("circle-minus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]])},13663:(e,t,s)=>{s.d(t,{S:()=>n});var a=s(73154);s(96810);let n=e=>(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 800 140",...e,"data-sentry-element":"svg","data-sentry-component":"PostHogLogo","data-sentry-source-file":"PosthogLogo.tsx",children:(0,a.jsxs)("g",{fill:"none","data-sentry-element":"g","data-sentry-source-file":"PosthogLogo.tsx",children:[(0,a.jsx)("path",{fill:"#1D4AFF",d:"M55.383 75.225c-1.874 3.748-7.222 3.748-9.096 0l-4.482-8.963a5.085 5.085 0 0 1 0-4.548l4.482-8.964c1.874-3.748 7.222-3.748 9.096 0l4.482 8.964a5.084 5.084 0 0 1 0 4.548l-4.482 8.963Zm0 50.836c-1.874 3.747-7.222 3.747-9.096 0l-4.482-8.964a5.085 5.085 0 0 1 0-4.548l4.482-8.964c1.874-3.748 7.222-3.748 9.096 0l4.482 8.964a5.084 5.084 0 0 1 0 4.548l-4.482 8.964Z","data-sentry-element":"path","data-sentry-source-file":"PosthogLogo.tsx"}),(0,a.jsx)("path",{fill:"#F9BD2B",d:"M0 106.765c0-4.53 5.477-6.8 8.68-3.596l23.307 23.307c3.204 3.204.935 8.68-3.595 8.68H5.085A5.085 5.085 0 0 1 0 130.073v-23.307Zm0-24.55c0 1.35.536 2.643 1.49 3.596l47.856 47.856a5.086 5.086 0 0 0 3.595 1.49h26.286c4.53 0 6.799-5.477 3.595-8.681L8.681 52.334C5.477 49.131 0 51.4 0 55.93v26.286Zm0-50.834c0 1.348.536 2.642 1.49 3.595l98.69 98.691a5.086 5.086 0 0 0 3.596 1.49h26.285c4.53 0 6.8-5.477 3.596-8.681L8.681 1.5C5.477-1.704 0 .565 0 5.095v26.286Zm50.835 0c0 1.348.536 2.642 1.49 3.595l91.5 91.5c3.203 3.204 8.68.935 8.68-3.596V96.595a5.086 5.086 0 0 0-1.49-3.596l-91.5-91.5c-3.203-3.203-8.68-.934-8.68 3.596v26.286ZM110.35 1.5c-3.203-3.204-8.68-.935-8.68 3.595v26.286c0 1.348.536 2.642 1.49 3.595l40.664 40.665c3.204 3.204 8.68.935 8.68-3.596V45.76a5.086 5.086 0 0 0-1.489-3.596L110.35 1.5Z","data-sentry-element":"path","data-sentry-source-file":"PosthogLogo.tsx"}),(0,a.jsx)("path",{fill:"currentColor",className:"bg-primary",d:"m216.24 107.388-47.864-47.863c-3.204-3.204-8.681-.935-8.681 3.595v66.952a5.085 5.085 0 0 0 5.085 5.085h74.142a5.085 5.085 0 0 0 5.085-5.085v-6.097c0-2.809-2.286-5.052-5.07-5.414a39.27 39.27 0 0 1-22.698-11.173Zm-32.145 11.502a8.137 8.137 0 0 1-8.133-8.134 8.137 8.137 0 0 1 8.133-8.134 8.137 8.137 0 0 1 8.134 8.134 8.137 8.137 0 0 1-8.134 8.134Z","data-sentry-element":"path","data-sentry-source-file":"PosthogLogo.tsx"}),(0,a.jsx)("path",{fill:"#1D4AFF",d:"M0 130.072a5.085 5.085 0 0 0 5.085 5.085h23.307c4.53 0 6.799-5.477 3.595-8.681L8.681 103.169C5.477 99.966 0 102.235 0 106.765v23.307Zm50.835-86.418L8.68 1.5C5.477-1.704 0 .565 0 5.095v26.286c0 1.348.536 2.642 1.49 3.595l49.345 49.346V43.654ZM8.68 52.334C5.477 49.131 0 51.4 0 55.93v26.286c0 1.348.536 2.642 1.49 3.595l49.345 49.346V94.489L8.68 52.334Z","data-sentry-element":"path","data-sentry-source-file":"PosthogLogo.tsx"}),(0,a.jsx)("path",{fill:"#F54E00",d:"M101.67 45.76a5.083 5.083 0 0 0-1.49-3.596L59.516 1.5c-3.204-3.204-8.681-.935-8.681 3.595v26.286c0 1.348.536 2.642 1.49 3.595l49.345 49.346V45.76Zm-50.835 89.397h28.392c4.53 0 6.799-5.477 3.595-8.681L50.835 94.489v40.668Zm0-91.503v38.562c0 1.348.536 2.642 1.49 3.595l49.345 49.346V96.595a5.084 5.084 0 0 0-1.49-3.596L50.835 43.654Z","data-sentry-element":"path","data-sentry-source-file":"PosthogLogo.tsx"}),(0,a.jsx)("path",{fill:"currentColor",d:"M303.32 114.86h20.888V80.22h17.452c19.17 0 31.466-11.37 31.466-28.954 0-17.584-12.295-28.954-31.466-28.954h-38.34v92.547Zm20.888-52.488V40.16h15.337c7.932 0 12.692 4.23 12.692 11.105 0 6.876-4.76 11.106-12.692 11.106h-15.337Zm86.71 53.545c20.36 0 35.167-14.543 35.167-34.375 0-19.831-14.807-34.374-35.167-34.374-20.625 0-35.168 14.543-35.168 34.374 0 19.832 14.543 34.375 35.168 34.375Zm-15.866-34.375c0-10.577 6.346-17.848 15.866-17.848 9.386 0 15.733 7.271 15.733 17.848 0 10.577-6.347 17.849-15.733 17.849-9.52 0-15.866-7.272-15.866-17.849Zm84.462 34.375c15.601 0 26.178-9.784 26.178-21.286 0-26.97-35.829-18.245-35.829-28.822 0-2.908 3.04-4.759 7.404-4.759 4.495 0 9.916 2.776 11.634 8.858l15.601-6.479c-3.04-9.65-14.279-16.261-27.896-16.261-14.676 0-23.798 8.725-23.798 19.17 0 25.252 35.3 18.245 35.3 28.69 0 3.702-3.437 6.214-8.594 6.214-7.403 0-12.56-5.156-14.146-11.37l-15.601 6.081c3.438 10.
1048 13.486 19.964 29.747 19.964Zm76.43-1.718-1.321-16.791c-2.248 1.19-5.157 1.586-7.536 1.586-4.76 0-7.933-3.437-7.933-9.387V64.355h16.13v-16.13h-16.13V28.923h-19.435v19.302h-10.577v16.13h10.577v27.764c0 16.13 10.974 23.798 25.384 23.798 3.967 0 7.669-.66 10.842-1.718Zm67.764-91.887v35.961h-36.755v-35.96h-20.89v92.546h20.89V76.122h36.755v38.737h21.021V22.312h-21.021Zm67.386 93.605c20.36 0 35.168-14.543 35.168-34.375 0-19.831-14.807-34.374-35.168-34.374-20.625 0-35.168 14.543-35.168 34.374 0 19.832 14.543 34.375 35.168 34.375ZM675.23 81.542c0-10.577 6.346-17.848 15.865-17.848 9.387 0 15.733 7.271 15.733 17.848 0 10.577-6.346 17.849-15.733 17.849-9.519 0-15.865-7.272-15.865-17.849Zm88.545 31.202c7.272 0 13.75-2.512 17.188-6.875v6.346c0 7.404-5.95 12.56-15.072 12.56-6.479 0-12.164-3.173-13.09-8.594l-17.715 2.777c2.38 12.56 15.204 21.022 30.805 21.022 20.492 0 34.11-12.032 34.11-29.88V48.225h-19.17v5.685c-3.57-4.098-9.652-6.742-17.452-6.742-18.51 0-30.144 12.692-30.144 32.788 0 20.096 11.634 32.788 30.54 32.788ZM752.14 79.956c0-9.916 5.817-16.262 14.807-16.262 9.123 0 14.94 6.346 14.94 16.262s-5.817 16.262-14.94 16.262c-8.99 0-14.807-6.346-14.807-16.262Z","data-sentry-element":"path","data-sentry-source-file":"PosthogLogo.tsx"})]})})},16058:(e,t,s)=>{s.d(t,{Y:()=>f,k:()=>j});var a=s(73154),n=s(86843),r=s(93367),l=s(96810),i=s(65295),o=s(14183),c=s(56664),d=s(18799),u=s(36157),m=s(92125),x=s(90270),p=s(57299),h=s(70883),y=s(81509),g=s(28353);function j(e){let t=r.FH.useUtils(),s=(0,m.B)(),c=(0,d.lp)({projectId:e.entityId,scope:"apiKeys:CUD"}),p=(0,u.du)({organizationId:e.entityId,scope:"organization:CRUD_apiKeys"}),y="project"===e.scope?c:p,g=r.FH.projectApiKeys.create.useMutation({onSuccess:()=>t.projectApiKeys.invalidate()}),j=r.FH.organizationApiKeys.create.useMutation({onSuccess:()=>t.organizationApiKeys.invalidate()}),[v,b]=(0,l.useState)(!1),[N,C]=(0,l.useState)(""),[A,L]=(0,l.useState)(null),w=()=>{"project"===e.scope?g.mutateAsync({projectId:e.entityId,note:N||void 0}).then(t=>{let{secretKey:a,publicKey:n}=t;L({secretKey:a,publicKey:n}),s("".concat(e.scope,"_settings:api_key_create"))}).catch(e=>{console.error(e)}):j.mutateAsync({orgId:e.entityId,note:N||void 0}).then(t=>{let{secretKey:a,publicKey:n}=t;L({secretKey:a,publicKey:n}),s("".concat(e.scope,"_settings:api_key_create"))}).catch(e=>{console.error(e)})};return y?(0,a.jsxs)(o.lG,{open:v,onOpenChange:e=>{b(e),e||(L(null),C(""))},"data-sentry-element":"Dialog","data-sentry-component":"CreateApiKeyButton","data-sentry-source-file":"CreateApiKeyButton.tsx",children:[(0,a.jsx)(o.zM,{asChild:!0,"data-sentry-element":"DialogTrigger","data-sentry-source-file":"CreateApiKeyButton.tsx",children:(0,a.jsxs)(n.$,{variant:"secondary","data-sentry-element":"Button","data-sentry-source-file":"CreateApiKeyButton.tsx",children:[(0,a.jsx)(i.A,{className:"-ml-0.5 mr-1.5 h-5 w-5","aria-hidden":"true","data-sentry-element":"PlusIcon","data-sentry-source-file":"CreateApiKeyButton.tsx"}),"Create new API keys"]})}),(0,a.jsxs)(o.Cf,{onPointerDownOutside:e=>e.preventDefault(),"data-sentry-element":"DialogContent","data-sentry-source-file":"CreateApiKeyButton.tsx",children:[(0,a.jsx)(o.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"CreateApiKeyButton.tsx",children:(0,a.jsx)(o.L3,{"data-sentry-element":"DialogTitle","data-sentry-source-file":"CreateApiKeyButton.tsx",children:A?"API Keys":"Create API Keys"})}),(0,a.jsx)(o.R4,{"data-sentry-element":"DialogBody","data-sentry-source-file":"CreateApiKeyButton.tsx",children:A?(0,a.jsx)(f,{scope:e.scope,generatedKeys:A}):(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(h.J,{htmlFor:"note",children:"Note (optional)"}),(0,a.jsx)(x.p,{id:"note",placeholder:"Production key",value:N,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"===e.key&&w()},className:"mt-1.5"})]})})}),!A&&(0,a.jsx)(o.Es,{children:(0,a.jsx)(n.$,{onClick:w,loading:g.isPending||j.isPending,children:"Create API keys"})})]})]}):null}let f=e=>{var t,s;let{scope:n,generatedKeys:r,className:l}=e,i=(0,p.j)(r);return(0,a.jsxs)("div",{className:(0,y.cn)("space-y-6",l),"data-sentry-component":"ApiKeyRender","data-sentry-source-file":"CreateApiKeyButton.tsx",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(g.iK,{title:"Secret Key","data-sentry-element":"SubHeader","data-sentry-source-file":"CreateApiKeyButton.tsx"}),(0,a.jsxs)("div",{className:"text-sm text-muted-foreground",children:["This key can only be viewed once. You can always create new keys in the ",n," settings."]}),(0,a.jsx)(c.xi,{content:null!=(t=null==r?void 0:r.secretKey)?t:"Loading ...",className:"mt-2","data-sentry-element":"CodeView","data-sentry-source-file":"CreateApiKeyButton.tsx"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(g.iK,{title:"Public Key","data-sentry-element":"SubHeader","data-sentry-source-file":"CreateApiKeyButton.tsx"}),(0,a.jsx)(c.xi,{content:null!=(s=null==r?void 0:r.publicKey)?s:"Lo
1ading ...",className:"mt-2","data-sentry-element":"CodeView","data-sentry-source-file":"CreateApiKeyButton.tsx"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(g.iK,{title:".env","data-sentry-element":"SubHeader","data-sentry-source-file":"CreateApiKeyButton.tsx"}),(0,a.jsx)(c.xi,{content:i,className:"mt-2","data-sentry-element":"CodeView","data-sentry-source-file":"CreateApiKeyButton.tsx"})]})]})}},17982:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},21520:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("circle-user-round",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},22566:(e,t,s)=>{s.d(t,{V:()=>y});var a=s(73154),n=s(17663),r=s(93367),l=s(86053),i=s(6300),o=s(83255),c=s(325),d=s(81509),u=s(69448),m=s(34283),x=s(15081),p=s(34664),h=s(45596);function y(e){var t,s;let[y,g]=(0,i.useQueryParams)({pageIndex:(0,i.withDefault)(i.NumberParam,0),pageSize:(0,i.withDefault)(i.NumberParam,50)}),j=r.FH.auditLogs.all.useQuery({projectId:"project"===e.scope?e.projectId:"",page:y.pageIndex,limit:y.pageSize},{enabled:"project"===e.scope}),f=r.FH.auditLogs.allByOrg.useQuery({orgId:"organization"===e.scope?e.orgId:"",page:y.pageIndex,limit:y.pageSize},{enabled:"organization"===e.scope}),v="project"===e.scope?j:f,b="project"===e.scope?"auditLogs":"orgAuditLogs",[N,C]=(0,u.Fn)(b,"s"),A=[{accessorKey:"createdAt",header:"Time",cell:e=>e.getValue().toLocaleString()},{accessorKey:"actor",header:"Actor",headerTooltip:{description:"The actor within Langfuse who performed the action."},cell:e=>{var t,s,n,r,l,i,o,u;let m=e.getValue();if((null==m?void 0:m.type)==="USER"){let e=m.body;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(c.eu,{className:"h-6 w-6",children:[(null==e?void 0:e.image)&&(0,a.jsx)(c.BK,{src:e.image,alt:null!=(n=null==e?void 0:e.name)?n:"User"}),(0,a.jsx)(c.q5,{children:null!=(l=null!=(r=null==e||null==(t=e.name)?void 0:t.charAt(0))?r:null==e||null==(s=e.email)?void 0:s.charAt(0))?l:"U"})]}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm",!(null==e?void 0:e.name)&&"text-muted-foreground"),children:null!=(o=null!=(i=null==e?void 0:e.name)?i:null==e?void 0:e.email)?o:e.id})]})}if((null==m?void 0:m.type)==="API_KEY"){let e=m.body;return(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"text-sm",children:null!=(u=null==e?void 0:e.publicKey)?u:null==e?void 0:e.id})})}return null}},{accessorKey:"resourceType",header:"Resource Type"},{accessorKey:"resourceId",header:"Resource ID"},{accessorKey:"action",header:"Action"},{accessorKey:"before",header:"Before",size:300,cell:e=>{let t=e.getValue();return t?(0,a.jsx)(o.z,{data:t,singleLine:"s"===N}):null}},{accessorKey:"after",header:"After",size:300,cell:e=>{let t=e.getValue();return t?(0,a.jsx)(o.z,{data:t,singleLine:"s"===N}):null}}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.w,{columns:A,rowHeight:N,setRowHeight:C,actionButtons:"project"===e.scope?[(0,a.jsx)(p.d,{projectId:e.projectId,tableName:h.BatchExportTableName.AuditLogs,filterState:[],orderByState:{column:"createdAt",order:"DESC"}},"audit-logs-export")]:[],className:"px-0","data-sentry-element":"DataTableToolbar","data-sentry-source-file":"AuditLogsTable.tsx"}),(0,a.jsx)(x.E,{"data-sentry-element":"SettingsTableCard","data-sentry-source-file":"AuditLogsTable.tsx",children:(0,a.jsx)(n.b,{tableName:b,columns:A,data:v.isPending?{isLoading:!0,isError:!1}:v.isError?{isLoading:!1,isError:!0,error:v.error.message}:{isLoading:!1,isError:!1,data:(0,l.$P)(v.data,"data",[])},pagination:{totalCount:null!=(s=null==(t=v.data)?void 0:t.totalCount)?s:0,onChange:g,state:y},rowHeight:N,"data-sentry-element":"DataTable","data-sentry-source-file":"AuditLogsTable.tsx"})})]})}},29260:(e,t,s)=>{s.r(t),s.d(t,{default:()=>tc,getProjectSettingsPages:()=>to,useProjectSettingsPages:()=>ti});var a=s(73154),n=s(28353),r=s(31806),l=s(86843),i=s(14183),o=s(10873),c=s(90270),d=s(93367),u=s(41454),m=s(17020),x=s(33100),p=s(92125),h=s(98084),y=s(18799),g=s(82145);function j(){let e=(0,p.B)(),{project:t,organization:s}=(0,h.B2)(),n=((null==s?void 0:s.name)+"/"+(null==t?void 0:t.name)).replaceAll(" ","-").toLowerCase(),r=u.Ikc({name:u.YjP().includes(n,{message:'Please confirm with "'.concat(n,'"')})}),j=(0,y.lp)({projectId:null==t?void 0:t.id,scope:"project:delete"}),f=d.FH.projects.delete.useMutation(),v=(0,m.mN)({resolver:(0,x.u)(r),defaultValues:{name:""}});return(0,a.jsxs)(i.lG,{"data-sentry-element":"Dialog","data-sentry-component":"DeleteProjectButton","data-sentry-source-file":"DeleteProjectButton.tsx",children:[(0,a.jsx)(i.zM,{asChild:!0,"data-sentry-element":"DialogTrigger","data-sentry-source-file":"DeleteProjectButton.tsx",children:(0,a.jsx)(l.$,{variant:"destructive-secondary",disabled:!j,"data-sentry-element":"Button","data-sentry-source-file":"DeleteProjectButton.tsx",children:"Delete Project"})}),(0,a.jsxs)(i.Cf,{className:"sm:max-w-[425px]","data-sentry-element":"DialogContent","data-sentry-source-file":"DeleteProjectButton.tsx",children:[(0,a.jsxs)(i.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"DeleteProjectButton.tsx",children:[(0,a.jsx)(i.L3,{className:"text-lg font-semibold","data-sentry-element":"DialogTitle","data-sentry-source-file":"DeleteProjectButton.tsx",children:"Delete Project"}),(0,a.jsx)(i.rr,{className:" ","data-sentry-element":"DialogDescription","data-sentry-source-file":"DeleteProjectButton.tsx",children:'To confirm, type "'.concat(n,'" in the input box ')})]}),(0,a.jsx)(o.lV,{...v,"data-sentry-element":"Form","data-sentry-source-file":"DeleteProjectButton.tsx",children:(0,a.jsxs)("form",{onSubmit:v.handleSubmit(()=>{t&&(e("project_settings:project_delete"),f.mutateAsync({projectId:t.id}).then(()=>{var e;window.location.href=null!=(e=g._.NEXT_PUBLIC_BASE_PATH)?e:"/"}).catch(e=>{console.error(e)}))}),className:"space-y-8",children:[(0,a.jsx)(i.R4,{"data-sentry-element":"DialogBody","data-sentry-source-file":"DeleteProjectButton.tsx",children:(0,a.jsx)(o.zB,{control:v.control,name:"name",render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.MJ,{children:(0,a.jsx)(c.p,{placeholder:n,...t})}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"DeleteProjectButton.tsx"})}),(0,a.jsx)(i.Es,{"data-sentry-element":"DialogFooter","data-sentry-source-file":"DeleteProjectButton.tsx",children:(0,a.jsx)(l.$,{type:"submit",variant:"destructive",loading:f.isPending,className:"w-full","data-sentry-element":"Button","data-sentry-source-file":"DeleteProjectButton.tsx",children:"Delete project"})})]})})]})]})}var f=s(25277),v=s(56664),b=s(90391);function N(){var e,t;let s=(0,b.l)();return(0,a.jsxs)("div",{"data-sentry-component":"HostNameProject","data-sentry-source-file":"HostNameProject.tsx",children:[(0,a.jsx)(n.Ay,{title:"Host Name","data-sentry-element":"Header","data-sentry-source-file":"HostNameProject.tsx"}),(0,a.jsx)(f.Zp,{className:"mb-4 p-3","data-sentry-element":"Card","data-sentry-source-file":"HostNameProject.tsx",children:(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)("div",{className:"mb-2 text-sm",children:"When connecting to Langfuse, use this hostname / baseurl."}),(0,a.jsx)(v.xi,{content:"".concat(null!=(e=null==s?void 0:s.hostname)?e:window.origin).concat(null!=(t=g._.NEXT_PUBLIC_BASE_PATH)?t:""),"data-sentry-element":"CodeView","data-sentry-source-file":"HostNameProject.tsx"})]})})]})}var C=s(88285),A=s(72764),L=s(38834);function w(){var e,t;let{update:s}
1=(0,L.useSession)(),{project:r}=(0,h.B2)(),i=(0,p.B)(),u=(0,y.lp)({projectId:null==r?void 0:r.id,scope:"project:update"}),g=(0,m.mN)({resolver:(0,x.u)(C.q),defaultValues:{name:""}}),j=d.FH.projects.update.useMutation({onSuccess:e=>{s()},onError:e=>g.setError("name",{message:e.message})});return(0,a.jsxs)("div",{"data-sentry-component":"RenameProject","data-sentry-source-file":"RenameProject.tsx",children:[(0,a.jsx)(n.Ay,{title:"Project Name","data-sentry-element":"Header","data-sentry-source-file":"RenameProject.tsx"}),(0,a.jsxs)(f.Zp,{className:"mb-4 p-3","data-sentry-element":"Card","data-sentry-source-file":"RenameProject.tsx",children:[""!==g.getValues().name?(0,a.jsxs)("p",{className:"mb-4 text-sm text-primary",children:['Your Project will be renamed from "',null!=(e=null==r?void 0:r.name)?e:"",'" to "',(0,a.jsx)("b",{children:g.watch().name}),'".']}):(0,a.jsxs)("p",{className:"mb-4 text-sm text-primary",children:['Your Project is currently named "',(0,a.jsx)("b",{children:null!=(t=null==r?void 0:r.name)?t:""}),'".']}),(0,a.jsx)(o.lV,{...g,"data-sentry-element":"Form","data-sentry-source-file":"RenameProject.tsx",children:(0,a.jsxs)("form",{onSubmit:g.handleSubmit(function(e){u&&r&&(i("project_settings:rename_form_submit"),j.mutateAsync({projectId:r.id,newName:e.name}).then(()=>{g.reset()}).catch(e=>{console.error(e)}))}),className:"flex-1",id:"rename-project-form",children:[(0,a.jsx)(o.zB,{control:g.control,name:"name",render:e=>{var t;let{field:s}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.MJ,{children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(c.p,{placeholder:null!=(t=null==r?void 0:r.name)?t:"",...s,className:"flex-1",disabled:!u}),!u&&(0,a.jsx)("span",{title:"No access",children:(0,a.jsx)(A.A,{className:"absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 transform text-muted"})})]})}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"RenameProject.tsx"}),u&&(0,a.jsx)(l.$,{variant:"secondary",type:"submit",loading:j.isPending,disabled:""===g.getValues().name||!u,className:"mt-4",children:"Save"})]})})]})]})}var P=s(68389),S=s.n(P),M=s(55247),D=s(96810),I=s(25525),T=s(2198),K=s(79071),B=s(60965),k=s(83675),z=s(17982);function F(e){let{apiKey:t,projectId:s,open:n,onOpenChange:r}=e,[o,c]=(0,D.useState)(!1),d=(0,b.l)(),u=void 0!==n?n:o,m=r||c;return(0,y.lp)({projectId:s,scope:"llmApiKeys:update"})?(0,a.jsxs)(i.lG,{open:u,onOpenChange:m,"data-sentry-element":"Dialog","data-sentry-component":"UpdateLLMApiKeyDialog","data-sentry-source-file":"UpdateLLMApiKeyDialog.tsx",children:[(0,a.jsx)(i.zM,{asChild:!0,"data-sentry-element":"DialogTrigger","data-sentry-source-file":"UpdateLLMApiKeyDialog.tsx",children:(0,a.jsx)(l.$,{variant:"ghost",size:"icon","data-sentry-element":"Button","data-sentry-source-file":"UpdateLLMApiKeyDialog.tsx",children:(0,a.jsx)(z.A,{className:"h-4 w-4","data-sentry-element":"PencilIcon","data-sentry-source-file":"UpdateLLMApiKeyDialog.tsx"})})}),(0,a.jsxs)(i.Cf,{className:"max-h-[90%] min-w-[40vw] overflow-auto",onClick:e=>e.stopPropagation(),"data-sentry-element":"DialogContent","data-sentry-source-file":"UpdateLLMApiKeyDialog.tsx",children:[(0,a.jsx)(i.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"UpdateLLMApiKeyDialog.tsx",children:(0,a.jsx)(i.L3,{"data-sentry-element":"DialogTitle","data-sentry-source-file":"UpdateLLMApiKeyDialog.tsx",children:"Update LLM Connection"})}),u&&(0,a.jsx)(k.h,{projectId:s,onSuccess:()=>m(!1),customization:d,mode:"update",existingKey:t})]})]}):null}function E(e){var t,s,r;let[l,i]=(0,D.useState)(null),[o,c]=(0,D.useState)(!1),u=(0,y.lp)({projectId:e.projectId,scope:"llmApiKeys:read"}),m=d.FH.llmApiKey.all.useQuery({projectId:e.projectId},{enabled:u}),x=null==(t=m.data)?void 0:t.data.some(e=>e.extraHeaderKeys.length>0);return u?(0,a.jsxs)("div",{id:"llm-api-keys","data-sentry-component":"LlmApiKeyList","data-sentry-source-file":"LLMApiKeyList.tsx",children:[(0,a.jsx)(n.Ay,{title:"LLM Connections","data-sentry-element":"Header","data-sentry-source-file":"LLMApiKeyList.tsx"}),(0,a.jsx)("p",{className:"mb-4 text-sm",children:"Connect your LLM services to enable evaluations and playground features. Your provider will charge based on usage."}),(0,a.jsx)(f.Zp,{className:"mb-4 overflow-auto","data-sentry-element":"Card","data-sentry-source-file":"LLMApiKeyList.tsx",children:(0,a.jsxs)(I.XI,{"data-sentry-element":"Table","data-sentry-source-file":"LLMApiKeyList.tsx",children:[(0,a.jsx)(I.A0,{"data-sentry-element":"TableHeader","data-sentry-source-file":"LLMApiKeyList.tsx",children:(0,a.jsxs)(I.Hj,{"data-sentry-element":"TableRow","data-sentry-source-file":"LLMApiKeyList.tsx",children:[(0,a.jsx)(I.nd,{className:"text-primary md:table-cell","data-sentry-element":"TableHead","data-sentry-source-file":"LLMApiKeyList.tsx",children:"Provider"}),(0,a.jsx)(I.nd,{className:"text-primary md:table-cell","data-sentry-element":"TableHead","data-sentry-source-file":"LLMApiKeyList.tsx",children:"Adapter"}),(0,a.jsx)(I.nd,{className:"text-primary md:table-cell","data-sentry-element":"TableHead","data-sentry-source-file":"LLMApiKeyList.tsx",children:"Base URL"}),(0,a.jsx)(I.nd,{className:"text-primary","data-sentry-element":"TableHead","data-sentry-source-file":"LLMApiKeyList.tsx",children:"API Key"}),x?(0,a.jsx)(I.nd,{className:"text-primary",children:"Extra headers"}):null,(0,a.jsx)(I.nd,{"data-sentry-element":"TableHead","data-sentry-source-file":"LLMApiKeyList.tsx"})]})}),(0,a.jsx)(I.BF,{className:"text-muted-foreground","data-sentry-element":"TableBody","data-sentry-source-file":"LLMApiKeyList.tsx",children:(null==(s=m.data)?void 0:s.data.length)===0?(0,a.jsx)(I.Hj,{children:(0,a.jsx)(I.nA,{colSpan:6,className:"text-center",children:"None"})}):null==(r=m.data)?void 0:r.data.map(t=>{var s,n;return(0,a.jsxs)(I.Hj,{className:"cursor-default hover:bg-primary-foreground",onClick:()=>i(t.id),children:[(0,a.jsx)(I.nA,{className:"font-mono",children:t.provider}),(0,a.jsx)(I.nA,{className:"font-mono",children:t.adapter}),(0,a.jsx)(I.nA,{className:"max-w-md overflow-auto font-mono",children:null!=(s=t.baseURL)?s:"default"}),(0,a.jsx)(I.nA,{className:"font-mono",children:t.displaySecretKey}),x?(0,a.jsxs)(I.nA,{children:[" ",t.extraHeaderKeys.join(", ")," "]}):null,(0,a.jsx)(I.nA,{className:"text-right",children:(0,a.jsxs)("div",{className:"flex justify-end space-x-2",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)(F,{apiKey:{...t,secretKey:t.displaySecretKey,extraHeaders:t.extraHeaderKeys.join(","),config:null!=(n=t.config)?n:null},projectId:e.projectId,open:l===t.id,onOpenChange:e=>{e?i(t.id):i(null)}}),(0,a.jsx)(H,{projectId:e.projectId,apiKeyId:t.id})]})})]},t.id)})})]})}),(0,a.jsx)(B.b,{open:o,setOpen:c,"data-sentry-element":"CreateLLMApiKeyDialog","data-sentry-source-file":"LLMApiKeyList.tsx"})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)(n.Ay,{title:"LLM Connections"}),(0,a.jsxs)(K.Fc,{children:[(0,a.jsx)(K.XL,{children:"Access Denied"}),(0,a.jsx)(K.TN,{children:"You do not have permission to view LLM API keys for this project."})]})]})}function H(e){let t=(0,p.B)(),s=(0,y.lp)({projectId:e.projectId,scope:"llmApiKeys:delete"}),n=d.FH.useUtils(),r=d.FH.llmApiKey.delete.useMutation({onSuccess:()=>n.llmApiKey.invalidate()}),[o,c]=(0,D.useState)(!1);return s?(0,a.jsxs)(i.lG,{open:o,onOpenChange:c,"data-sentry-element":"Dialog","data-sentry-component":"DeleteApiKeyButton","data-sentry-source-file":"LLMApiKeyList.tsx",children:[(0,a.jsx)(i.zM,{asChild:!0,"data-sentry-element":"DialogTrigger","data-sentry-source-file":"LLMApiKeyList.tsx",children:(0,a.jsx)(l.$,{variant:"ghost",size:"icon","data-sentry-element":"Button","data-sentry-source-file":"LLMApiKeyList.tsx",children:(0,a.jsx)(M.A,{className:"h-4 w-4","data-sentry-element":"TrashIcon","data-sentry-source-file":"LLMApiKeyList.tsx"})})}),(0,a.jsxs)(i.Cf,{"data-sentry-element":"DialogContent","data-sentry-source-file":"LLMApiKeyList.tsx",children:[(0,a.jsxs)(i.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"LLMApiKeyList.tsx",children:[(0,a.jsx)(i.L3,{className:"mb-5","data-sentry-element":"DialogTitle","data-sentry-source-file":"LLMApiKeyList.tsx",children:"Delete LLM Connection"}),(0,a.jsx)(T.rr,{"data-sentry-element":"DialogDescription","data-sentry-source-file":"LLMApiKeyList.tsx",children:"Are you sure you want to delete this connection? This action cannot be undone."})]}),(0,a.jsxs)(i.Es,{"data-sentry-element":"DialogFooter","data-sentry-source-file":"LLMApiKeyList.tsx",children:[(0,a.jsx)(l.$,{variant:"destructive",onClick:()=>{r.mutateAsync({projectId:e.projectId,id:e.apiKeyId}).then(()=>{t("project_settings:llm_api_key_delete"),c(!1)}).catch(e=>{console.error(e)})},loading:r.isPending,"data-sentry-element":"Button","data-sentry-source-file":"LLMApiKeyList.tsx",children:"Permanently delete"}),(0,a.jsx)(l.$,{variant:"ghost",onClick:()=>c(!1),"data-sentry-element":"Button","data-sentry-source-file":"LLMApiKeyList.tsx",children:"Cancel"})]})]})]}):null}var V=s(34507),U=s(20058),_=s(76004),R=s(13663),O=s(64495),$=s(36157),Z=s(93323),G=s(13640),Y=s(62583);function q(){var e,t,s,n;
1let r=(0,p.B)(),y=(0,L.useSession)(),{project:g,organization:j}=(0,h.B2)(),f=(0,$.du)({organizationId:null==j?void 0:j.id,scope:"projects:transfer_org"}),v=null!=(n=(null!=(s=null==(t=y.data)||null==(e=t.user)?void 0:e.organizations)?s:[]).filter(e=>(0,$.s8)({session:y.data,organizationId:e.id,scope:"projects:transfer_org"})))?n:[],b=((null==j?void 0:j.name)+"/"+(null==g?void 0:g.name)).replaceAll(" ","-").toLowerCase(),N=u.Ikc({name:u.YjP().includes(b,{message:'Please confirm with "'.concat(b,'"')}),projectId:u.YjP()}),C=d.FH.projects.transfer.useMutation({onSuccess:async()=>{(0,Y.G)({title:"Project transferred",description:"The project is successfully transferred to the new organization. Redirecting..."}),await new Promise(e=>setTimeout(e,5e3)),y.update(),window.location.href="/"}}),A=(0,m.mN)({resolver:(0,x.u)(N),defaultValues:{name:"",projectId:""}});return(0,a.jsxs)(i.lG,{"data-sentry-element":"Dialog","data-sentry-component":"TransferProjectButton","data-sentry-source-file":"TransferProjectButton.tsx",children:[(0,a.jsx)(i.zM,{asChild:!0,"data-sentry-element":"DialogTrigger","data-sentry-source-file":"TransferProjectButton.tsx",children:(0,a.jsx)(l.$,{variant:"destructive-secondary",disabled:!f,"data-sentry-element":"Button","data-sentry-source-file":"TransferProjectButton.tsx",children:"Transfer Project"})}),(0,a.jsxs)(i.Cf,{className:"sm:max-w-[425px]","data-sentry-element":"DialogContent","data-sentry-source-file":"TransferProjectButton.tsx",children:[(0,a.jsxs)(i.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"TransferProjectButton.tsx",children:[(0,a.jsx)(i.L3,{className:"text-lg font-semibold","data-sentry-element":"DialogTitle","data-sentry-source-file":"TransferProjectButton.tsx",children:"Transfer Project"}),(0,a.jsxs)(K.Fc,{className:"mt-2","data-sentry-element":"Alert","data-sentry-source-file":"TransferProjectButton.tsx",children:[(0,a.jsx)(G.A,{className:"h-4 w-4","data-sentry-element":"TriangleAlert","data-sentry-source-file":"TransferProjectButton.tsx"}),(0,a.jsx)(K.XL,{"data-sentry-element":"AlertTitle","data-sentry-source-file":"TransferProjectButton.tsx",children:"Warning"}),(0,a.jsxs)(K.TN,{"data-sentry-element":"AlertDescription","data-sentry-source-file":"TransferProjectButton.tsx",children:["Transferring the project will move it to a different organization:",(0,a.jsxs)("ul",{className:"list-disc pl-4",children:[(0,a.jsx)("li",{children:"Members who are not part of the new organization will lose access."}),(0,a.jsx)("li",{children:"The project remains fully operational as API keys, settings, and data will remain unchanged. All features (e.g. tracing, prompt management) will continue to work without interruption."})]})]})]})]}),(0,a.jsx)(o.lV,{...A,"data-sentry-element":"Form","data-sentry-source-file":"TransferProjectButton.tsx",children:(0,a.jsxs)("form",{onSubmit:A.handleSubmit(e=>{g&&(r("project_settings:project_delete"),C.mutate({projectId:g.id,targetOrgId:e.projectId}))}),className:"space-y-8",children:[(0,a.jsxs)(i.R4,{"data-sentry-element":"DialogBody","data-sentry-source-file":"TransferProjectButton.tsx",children:[(0,a.jsx)(o.zB,{control:A.control,name:"projectId",render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.lR,{children:"Select New Organization"}),(0,a.jsx)(o.MJ,{children:(0,a.jsxs)(Z.l6,{onValueChange:t.onChange,value:t.value,disabled:C.isPending,children:[(0,a.jsx)(Z.bq,{children:(0,a.jsx)(Z.yv,{placeholder:"Select organization"})}),(0,a.jsx)(Z.gC,{children:v.filter(e=>e.id!==(null==j?void 0:j.id)).map(e=>(0,a.jsx)(Z.eb,{value:e.id,children:e.name},e.id))})]})}),(0,a.jsx)(o.Rr,{children:"Transfer this project to another organization where you have the ability to create projects."}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"TransferProjectButton.tsx"}),(0,a.jsx)(o.zB,{control:A.control,name:"name",render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.lR,{children:"Confirm"}),(0,a.jsx)(o.MJ,{children:(0,a.jsx)(c.p,{placeholder:b,...t})}),(0,a.jsx)(o.Rr,{children:'To confirm, type "'.concat(b,'" in the input box ')}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"TransferProjectButton.tsx"})]}),(0,a.jsx)(i.Es,{"data-sentry-element":"DialogFooter","data-sentry-source-file":"TransferProjectButton.tsx",children:(0,a.jsx)(l.$,{type:"submit",variant:"destructive",loading:C.isPending,className:"w-full","data-sentry-element":"Button","data-sentry-source-file":"TransferProjectButton.tsx",children:"Transfer project"})})]})})]})]})}var J=s(41659),Q=s(39156),W=s(37942),X=s(68048),ee=s(17663),et=s(86053),es=s(97390),ea=s(6300),en=s(80263),er=s(91163),el=s(325),ei=s(53524),eo=s(79940);function ec(e){var t,s;let[n,r]=(0,ea.useQueryParams)({pageIndex:(0,ea.withDefault)(ea.NumberParam,0),pageSize:(0,ea.withDefault)(ea.NumberParam,10)}),[l,i]=(0,D.useState)(!1),[o,c]=(0,D.useState)(null),u=d.FH.batchExport.all.useQuery({projectId:e.projectId,limit:n.pageSize,page:n.pageIndex}),m=d.FH.batchExport.cancel.useMutation({onSuccess:()=>{u.refetch(),i(!1),c(null)}}),x=(0,y.lp)({projectId:e.projectId,scope:"batchExports:create"}),p=[{accessorKey:"name",id:"name",header:"Name",size:200,cell:e=>{let{row:t}=e,s=t.getValue("name"),{createdAt:n,finishedAt:r}=t.original;return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"whitespace-break-spaces",children:s}),(0,a.jsx)(ei.Bc,{children:(0,a.jsxs)(ei.m_,{children:[(0,a.jsx)(ei.k$,{children:(0,a.jsx)(en.A,{className:"size-3 text-muted-foreground"})}),(0,a.jsx)(ei.ZI,{children:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{children:["Created: ",new Date(n).toLocaleStr
1ing()]}),(0,a.jsxs)("div",{children:["Finished:"," ",r?new Date(r).toLocaleString():"-"]})]})})]})})]})}},{accessorKey:"status",id:"status",header:"Status",size:90,cell:e=>{let t=e.getValue();return(0,a.jsx)(es.W,{type:t.toLowerCase(),className:"capitalize"})}},{accessorKey:"url",id:"url",header:"Download URL",size:130,cell:e=>{let t=e.getValue();return t?"expired"===t?(0,a.jsx)("span",{className:"text-muted-foreground",children:"Expired"}):(0,a.jsx)(X.r,{href:t,icon:(0,a.jsx)(er.A,{size:16}),size:"sm",children:"Download"}):null}},{accessorKey:"format",id:"format",header:"Format",size:70},{accessorKey:"user",id:"user",header:"Created By",size:150,cell:e=>{var t,s,n;let{row:r}=e,l=r.getValue("user");return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(el.eu,{className:"h-7 w-7",children:(0,a.jsx)(el.BK,{src:null!=(t=null==l?void 0:l.image)?t:void 0,alt:null!=(s=null==l?void 0:l.name)?s:"User Avatar"})}),(0,a.jsx)("span",{children:null!=(n=null==l?void 0:l.name)?n:"Unknown"})]})}},{accessorKey:"log",id:"log",header:"Log",size:300,cell:e=>{let t=e.getValue();return null!=t?t:null}},{accessorKey:"actions",id:"actions",header:"Actions",size:100,cell:t=>{let{row:s}=t,n=s.original.id,r=s.getValue("status");return"QUEUED"!==r&&"PROCESSING"!==r?null:(0,a.jsxs)(eo.Lt,{open:l&&o===n,onOpenChange:e=>{e||(i(!1),c(null))},children:[(0,a.jsx)(eo.tv,{asChild:!0,children:(0,a.jsx)(X.r,{hasAccess:x,size:"sm",onClick:()=>{c(n),i(!0)},children:"Cancel"})}),(0,a.jsxs)(eo.EO,{children:[(0,a.jsxs)(eo.wd,{children:[(0,a.jsx)(eo.r7,{children:"Cancel batch export?"}),(0,a.jsx)(eo.$v,{children:"Are you sure you want to cancel this batch export? This action cannot be undone."})]}),(0,a.jsxs)(eo.ck,{children:[(0,a.jsx)(eo.Zr,{children:"No, keep it"}),(0,a.jsx)(eo.Rx,{onClick:()=>{m.mutate({projectId:e.projectId,batchExportId:n})},children:"Yes, cancel export"})]})]})]})}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(ee.b,{tableName:"batchExports",columns:p,data:u.isPending?{isLoading:!0,isError:!1}:u.isError?{isLoading:!1,isError:!0,error:u.error.message}:{isLoading:!1,isError:!1,data:(0,et.$P)(u.data,"exports",[])},pagination:{totalCount:null!=(s=null==(t=u.data)?void 0:t.totalCount)?s:null,onChange:r,state:n},"data-sentry-element":"DataTable","data-sentry-source-file":"BatchExportsTable.tsx"})})}var ed=s(15081);function eu(e){let t=(0,y.lp)({projectId:e.projectId,scope:"batchExports:read"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Ay,{title:"Exports","data-sentry-element":"Header","data-sentry-source-file":"BatchExportsSettingsPage.tsx"}),(0,a.jsx)("p",{className:"mb-4 text-sm",children:"Export large datasets in your preferred format via the export buttons across Langfuse. Exports are processed asynchronously and remain available for download for one hour. You will receive an email notification once your export is ready."}),t?(0,a.jsx)(ed.E,{children:(0,a.jsx)(ec,{projectId:e.projectId})}):(0,a.jsxs)(K.Fc,{children:[(0,a.jsx)(K.XL,{children:"Access Denied"}),(0,a.jsx)(K.TN,{children:"You do not have permission to view batch exports."})]})]})}var em=s(11058);function ex(e){var t,s;let[n,r]=(0,ea.useQueryParams)({pageIndex:(0,ea.withDefault)(ea.NumberParam,0),pageSize:(0,ea.withDefault)(ea.NumberParam,10)}),l=d.FH.batchAction.all.useQuery({projectId:e.projectId,limit:n.pageSize,page:n.pageIndex}),i=[{accessorKey:"actionType",id:"actionType",header:"Action Type",size:200,cell:e=>{let{row:t}=e,s=t.getValue("actionType").split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return(0,a.jsx)("span",{children:s})}},{accessorKey:"tableName",id:"tableName",header:"Table",size:120,cell:e=>{let{row:t}=e,s=t.getValue("tableName");return(0,a.jsx)("span",{className:"capitalize",children:s})}},{accessorKey:"status",id:"status",header:"Status",size:110,cell:e=>{let{row:t}=e,s=t.getValue("status");return(0,a.jsx)(es.W,{type:s.toLowerCase(),className:"capitalize"})}},{accessorKey:"progress",id:"progress",header:"Progress",size:150,cell:e=>{var t,s;let{row:n}=e,r=n.original.totalCount,l=null!=(t=n.original.processedCount)?t:0,i=null!=(s=n.original.failedCount)?s:0;return r?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"text-sm",children:[l," / ",r]}),i>0&&(0,a.jsxs)("div",{className:"text-xs text-destructive",children:[i," failed"]})]}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"})}},{accessorKey:"createdAt",id:"createdAt",header:"Created",size:150,cell:e=>{let{row:t}=e,s=t.getValue("createdAt");return(0,a.jsx)(em.t,{date:s})}},{accessorKey:"finishedAt",id:"finishedAt",header:"Finished",size:150,cell:e=>{let{row:t}=e,s=t.getValue("finishedAt");return s?(0,a.jsx)(em.t,{date:s}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"-"})}},{accessorKey:"user",id:"user",header:"Created By",size:150,cell:e=>{var t,s,n;let{row:r}=e,l=r.getValue("user");return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(el.eu,{className:"h-7 w-7",children:(0,a.jsx)(el.BK,{src:null!=(t=null==l?void 0:l.image)?t:void 0,alt:null!=(s=null==l?void 0:l.name)?s:"User Avatar"})}),(0,a.jsx)("span",{children:null!=(n=null==l?void 0:l.name)?n:"Unknown"})]})}},{accessorKey:"log",id:"log",header:"Log",size:300,cell:e=>{let{row:t}=e,s=t.getValue("log");return s?(0,a.jsx)(ei.Bc,{children:(0,a.jsxs)(ei.m_,{children:[(0,a.jsx)(ei.k$,{children:(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(en.A,{className:"h-3 w-3 text-muted-foreground"}),(0,a.jsx)("span",{className:"max-w-[250px] truncate text-xs",children:s})]})}),(0,a.jsx)(ei.ZI,{className:"max-w-md",children:(0,a.jsx)("pre",{className:"max-h-60 overflow-auto whitespace-pre-wrap text-xs",children:s})})]})}):null}}];return(0,a.jsx)(ee.b,{tableName:"batchActions",columns:i,data:l.isPending?{isLoading:!0,isError:!1}:l.isError?{isLoading:!1,isError:!0,error:l.error.message}:{isLoading:!1,isError:!1,data:(0,et.$P)(l.data,"batchActions",[])},pagination:{totalCount:null!=(s=null==(t=l.data)?void 0:t.totalCount)?s:0,onChange:r,state:n},"data-sentry-element":"DataTable","data-sentry-component":"BatchActionsTable","data-sentry-source-file":"BatchActionsTable.tsx"})}function ep(e){let t=(0,y.lp)({projectId:e.projectId,scope:"datasets:CUD"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Ay,{title:"Batch Actions","data-sentry-element":"Header","data-sentry-source-file":"BatchActionsSettingsPage.tsx"}),(0,a.jsx)("p",{className:"mb-4 text-sm",children:"Track the status of bulk operations performed on tables, such as adding observations to datasets, deleting traces, and adding items to annotation queues. Actions are processed asynchronously in the background."}),t?(0,a.jsx)(ed.E,{children:(0,a.jsx)(ex,{projectId:e.projectId})}):(0,a.jsxs)(K.Fc,{children:[(0,a.jsx)(K.XL,{children:"Access Denied"}),(0,a.jsx)(K.TN,{children:"You do not have permission to view batch actions."})]})]})}var eh=s(22566);function ey(e){let t=(0,y.lp)({projectId:e.projectId,scope:"auditLogs:read"}),s=(0,J.Jz)("audit-logs")?t?(0,a.jsx)(eh.V,{scope:"project",projectId:e.projectId}):(0,a.jsxs)(K.Fc,{children:[(0,a.jsx)(K.XL,{children:"Access Denied"}),(0,a.jsx)(K.TN,{children:"Contact your project administrator to request access."})]}):(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Audit logs are an Enterprise feature. Upgrade your plan to track all changes made to your project."});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Ay,{title:"Audit Logs","data-sentry-element":"Header","data-sentry-source-file":"AuditLogsSettingsPage.tsx"}),(0,a.jsx)("p",{className:"mb-2 text-sm text-muted-foreground",children:"Track who changed what in your project and when. Monitor settings, configurations, and data changes over time. Reach out to the Langfuse team if you require more detailed/filtered audit logs."}),s]})}var eg=s(44879),ej=s(51742),ef=s(83255),ev=s(69448),eb=s(34283),eN=s(94401),eC=s(37583),eA=s(45120),eL=s(65807),ew=s(92065),eP=s(45024),eS=s(16549);let eM=e=>{let{modelName:t,prices:s,priceUnit:n,rowHeight:r}=e,[l,i]=(0,D.useState)(!1),{priceUnitMultiplier:o}=(0,eP.a)(),c=(0,D.useMemo)(()=>Math.max(...Object.values(null!=s?s:{}).map(e=>(0,eS.V)(e,o))),[s,o]);return s?(0,a.jsx)(a.Fragment,{children:0===Object.keys(s).length?(0,a.jsx)("p",{children:"No prices"}):Object.keys(s).length<=("m"===r?4:2)?(0,a.jsx)("div",{className:"grid w-full grid-cols-[2fr,3fr] gap-x-2",children:Object.entries(s).map(e=>{let[t,s]=e;return(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"truncate font-mono text-xs font-medium",title:t,children:t},"".concat(t,"-label")),(0,a.jsxs)("span",{className:"text-left font-mono text-xs font-medium tabular-nums",children:["$",new ew.A(s).mul(o).toFixed(c)]},"".concat(t,"-price"))]},t)})}):(0,a.jsx)(ei.Bc,{children:(0,a.jsxs)(ei.m_,{open:l,onOpenChange:i,children:[(0,a.jsxs)(ei.k$,{className:"flex cursor-pointer items-center gap-2 pr-[1rem] text-xs",onClick:()=>i(!l),children:[(0,a.jsx)(en.A,{className:"h-3 w-3"}),Object.keys(s).length," prices set"]}),(0,a.jsx)(ei.ZI,{className:"min-w-[16rem] grow p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-semibold",children:"Price breakdown"}),(0,a.jsx)("span",{className:"font-mono text-xs font-medium",children:t})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex justify-between font-mono text-xs font-semibold",children:[(0,a.jsx)("span",{className:"mr-4",children:"Usage Type"}),(0,a.jsxs)("span",{children:["Price ",n]})]}),Object.entries(s).map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{className:"flex justify-between font-mono text-xs",children:[(0,a.jsx)("span",{className:"mr-4",children:t}),(0,a.jsx)("span",{children:"$"+new ew.A(s).mul(o).toFixed(c)})]},t)})]})]})})]})})}):null};var eD=s(21520),eI=s(65295),eT=s(84750),eK=s(11021),eB=s(47249),ek=s(34242),ez=s(71553);let eF={modelName:"Standardized model name. Generations are assigned to this model name if they match the `matchPattern` upon ingestion.",matchPattern:"Regex pattern to match `model` parameter of generations to model pricing",tokenizerId:"Tokenizer used for this model to calculate token counts if none are ingested. Pick from list of supported tokenizers.",config:"Some tokenizers require additional configuration (e.g. openai tiktoken). See docs for details.",maintainer:"Maintainer of the model. Langfuse managed models can be cloned, user managed models can be edited and deleted. To supersede a Langfuse managed model, set the custom model name to the Langfuse model name.",lastUsed:"Start time of the latest generation using this model"};function eE(e){var t,s,n,r;let{projectId:l}=e,i=(0,Q.useRouter)(),o=(0,p.B)(),[c,u]=(0,ej.P)(0,50,{page:"pageIndex",limit:"pageSize"}),[m,x]=(0,ea.useQueryParams)({search:(0,ea.withDefault)(ea.StringParam,"")}),h=m.search,g=d.FH.models.getAll.useQuery({page:c.pageIndex,limit:c.pageSize,projectId:l,searchString:h},{refetchOnWindowFocus:!1,refetchOnMount:!0,refetchOnReconnect:!1,staleTime:6e5}),j=null!=(n=null==(t=g.data)?void 0:t.totalCount)?n:null,f=null!=(r=null==(s=g.data)?void 0:s.models.map(e=>e.id))?r:[],v=d.FH.models.lastUsedByModelIds.useQuery({projectId:l,modelIds:f},{enabled:g.isSuccess&&f.length>0,refetchOnWindowFocus:!1,refetchOnMount:!0,refetchOnReconnect:!1,staleTime:6e5}),{priceUnit:b}=(0,eP.a)(),[N,C]=(0,ev.Fn)("models","m"),A=(0,y.lp)({projectId:l,scope:"models:CUD"}),L=[{accessorKey:"modelName",id:"modelName",header:"Model Name",headerTooltip:{description:eF.modelName},cell:e=>{let{row:t}=e;return(0,a.jsx)("span",{className:"truncate font-mono text-xs font-semibold",children:t.original.modelName})},size:120},{accessorKey:"maintainer",id:"maintainer",header:"Maintainer",headerTooltip:{description:eF.maintainer},size:60,cell:e=>{let{row:t}=e,s="Langfuse"===t.original.maintainer;return(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsxs)(ei.m_,{children:[(0,a.jsx)(ei.k$,{children:s?(0,a.jsx)(eK.h,{size:16}):(0,a.jsx)(eD.A,{className:"h-4 w-4"})}),(0,a.jsx)(ei.ZI,{children:s?"Langfuse maintained":"User maintained"})]})})}},{accessorKey:"matchPattern",id:"matchPattern",headerTooltip:{description:eF.matchPattern},header:"Match Pattern",size:200,cell:e=>{let{row:t}=e,s=t.getValue("matchPattern");return s?(0,a.jsx)("span",{className:"truncate font-mono text-xs",children:s}):null}},{accessorKey:"prices",id:"prices",header:()=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{children:["Prices ",b]}),(0,a.jsx)(eB.V,{})]}),size:120,cell:e=>{let{row:t}=e,s=t.getValue("prices");return(0,a.jsx)(eM,{modelName:t.original.modelName,prices:s,priceUnit:b,rowHeight:N})},enableHiding:!0},{accessorKey:"tokenizerId",id:"tokenizerId",header:"Tokenizer",headerTooltip:{description:eF.tokenizerId},enableHiding:!0,size:120},{accessorKey:"config",id:"config",header:"Tokenizer Configuration",headerTooltip:{description:eF.config},enableHiding:!0,size:120,cell:e=>{let{row:t}=e,s=t.getValue("config");return s?(0,a.jsx)(ef.z,{data:s,singleLine:"s"===N}):null}},{accessorKey:"lastUsed",id:"lastUsed",header:"Last used",headerTooltip:{description:eF.lastUsed},enableHiding:!0,size:120,cell:e=>{var t;let{row:s}=e;if(!v.data)return(0,a.jsx)(eT.E,{className:"h-4 w-20"});let n=v.data[s.original.modelId];
1return null!=(t=null==n?void 0:n.toLocaleString())?t:""}},{accessorKey:"actions",header:"Actions",size:120,cell:e=>{let{row:t}=e;return"Langfuse"!==t.original.maintainer?(0,a.jsxs)("div",{className:"flex items-center gap-2",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)(eA.K,{projectId:l,modelData:t.original.serverResponse}),(0,a.jsx)(eC.l,{projectId:l,modelData:t.original.serverResponse})]}):(0,a.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,a.jsx)(eL.V,{projectId:l,modelData:t.original.serverResponse})})}}],[w,P]=(0,eg.A)("modelsColumnVisibility",L),[S,M]=(0,eN.A)("modelsColumnOrder",L);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eb.w,{columns:L,columnVisibility:w,setColumnVisibility:P,columnOrder:S,setColumnOrder:M,rowHeight:N,setRowHeight:C,searchConfig:{updateQuery:e=>{x({search:e})},tableAllowsFullTextSearch:!0,currentQuery:h},actionButtons:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ez.V,{projectId:l}),(0,a.jsx)(ek.b,{projectId:l,action:"create",children:(0,a.jsx)(X.r,{variant:"secondary",icon:(0,a.jsx)(eI.A,{className:"h-4 w-4"}),hasAccess:A,onClick:()=>o("models:new_form_open"),children:"Add Model Definition"})})]}),className:"px-0","data-sentry-element":"DataTableToolbar","data-sentry-source-file":"models.tsx"}),(0,a.jsx)(ed.E,{className:"max-h-[75dvh]","data-sentry-element":"SettingsTableCard","data-sentry-source-file":"models.tsx",children:(0,a.jsx)(ee.b,{tableName:"models",columns:L,data:g.isPending?{isLoading:!0,isError:!1}:g.isError?{isLoading:!1,isError:!0,error:g.error.message}:{isLoading:!1,isError:!1,data:(0,et.$P)(g.data,"models",[]).map(e=>(e=>{var t;let s=e.pricingTiers.find(e=>e.isDefault),a=null==s?void 0:s.prices;return{modelId:e.id,maintainer:e.projectId?"User":"Langfuse",modelName:e.modelName,matchPattern:e.matchPattern,prices:a,tokenizerId:null!=(t=e.tokenizerId)?t:void 0,config:e.tokenizerConfig,serverResponse:e}})(e))},pagination:{totalCount:j,onChange:u,state:c},columnVisibility:w,onColumnVisibilityChange:P,columnOrder:S,onColumnOrderChange:M,rowHeight:N,onRowClick:e=>{i.push("/project/".concat(l,"/settings/models/").concat(e.modelId))},"data-sentry-element":"DataTable","data-sentry-source-file":"models.tsx"})})]})}function eH(e){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Ay,{title:"Model Definitions","data-sentry-element":"Header","data-sentry-source-file":"ModelSettings.tsx"}),(0,a.jsx)("p",{className:"mb-2 text-sm",children:"A configuration that stores pricing information for an LLM model. Model definitions specify the cost per input and output token, enabling Langfuse to automatically calculate the price of generations based on token usage."}),(0,a.jsx)(eE,{projectId:e.projectId,"data-sentry-element":"ModelTable","data-sentry-source-file":"ModelSettings.tsx"})]})}let eV=u.Ikc({retention:u.auy.number().int("Must be an integer").refine(e=>0===e||e>=3,{message:"Value must be 0 or at least 3 days"})});function eU(){var e,t,s;let{update:r}=(0,L.useSession)(),{project:l}=(0,h.B2)(),i=(0,p.B)(),u=(0,y.lp)({projectId:null==l?void 0:l.id,scope:"project:update"}),g=(0,J.Jz)("data-retention"),j=(0,m.mN)({resolver:(0,x.u)(eV),defaultValues:{retention:null!=(e=null==l?void 0:l.retentionDays)?e:0}}),v=d.FH.projects.setRetention.useMutation({onSuccess:e=>{r()},onError:e=>j.setError("retention",{message:e.message})});return(0,a.jsxs)("div",{"data-sentry-component":"ConfigureRetention","data-sentry-source-file":"ConfigureRetention.tsx",children:[(0,a.jsx)(n.Ay,{title:"Data Retention","data-sentry-element":"Header","data-sentry-source-file":"ConfigureRetention.tsx"}),(0,a.jsxs)(f.Zp,{className:"mb-4 p-3","data-sentry-element":"Card","data-sentry-source-file":"ConfigureRetention.tsx",children:[(0,a.jsx)("p",{className:"mb-4 text-sm text-primary",children:"Data retention automatically deletes events older than the specified number of days. The value must be 0 or at least 3 days. Set to 0 to retain data indefinitely. The deletion happens asynchronously, i.e. event may be available for a while after they expired."}),j.getValues().retention&&j.getValues().retention!==(null==l?void 0:l.retentionDays)?(0,a.jsxs)("p",{className:"mb-4 text-sm text-primary",children:["Your Project's retention will be set from \"",null!=(t=null==l?void 0:l.retentionDays)?t:"Indefinite",'" to "',0===Number(j.watch("retention"))?"Indefinite":Number(j.watch("retention")),'" days.']}):(null==l?void 0:l.retentionDays)?(0,a.jsxs)("p",{className:"mb-4 text-sm text-primary",children:["Your Project's current retention is \"",null!=(s=null==l?void 0:l.retentionDays)?s:"",'" days.']}):(0,a.jsx)("p",{className:"mb-4 text-sm text-primary",children:"Your Project retains data indefinitely."}),(0,a.jsx)(o.lV,{...j,"data-sentry-element":"Form","data-sentry-source-file":"ConfigureRetention.tsx",children:(0,a.jsxs)("form",{onSubmit:j.handleSubmit(function(e){u&&l&&(i("project_settings:retention_form_submit"),v.mutateAsync({projectId:l.id,retention:e.retention||null}).then(()=>{j.reset()}).catch(e=>{console.error(e)}))}
1),className:"flex-1",id:"set-retention-project-form",children:[(0,a.jsx)(o.zB,{control:j.control,name:"retention",render:e=>{var t,s,n;let{field:r}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.MJ,{children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(c.p,{type:"number",step:"1",placeholder:null!=(s=null==l||null==(t=l.retentionDays)?void 0:t.toString())?s:"",...r,value:null!=(n=r.value)?n:"",className:"flex-1",disabled:!u||!g}),!u&&(0,a.jsx)("span",{title:"No access",children:(0,a.jsx)(A.A,{className:"absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 transform text-muted"})})]})}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"ConfigureRetention.tsx"}),(0,a.jsx)(X.r,{variant:"secondary",hasAccess:u,hasEntitlement:g,loading:v.isPending,disabled:null===j.getValues().retention,className:"mt-4",type:"submit","data-sentry-element":"ActionButton","data-sentry-source-file":"ConfigureRetention.tsx",children:"Save"})]})})]})]})}var e_=s(8913),eR=s(41641),eO=s(31642),e$=s(92273),eZ=s(81509),eG=s(95266),eY=s(97638),eq=s(45596);let eJ=u.z.object({label:eq.PromptLabelSchema});function eQ(e){let{projectId:t}=e,s=(0,y.lp)({projectId:t,scope:"promptProtectedLabels:CUD"}),r=(0,J.Jz)("prompt-protected-labels"),i=(0,m.mN)({resolver:(0,x.u)(eJ),defaultValues:{label:""}}
1),c=d.FH.useUtils(),{data:u=[]}=d.FH.prompts.getProtectedLabels.useQuery({projectId:t},{enabled:!!t}),{data:p=[]}=d.FH.prompts.allLabels.useQuery({projectId:t},{enabled:!!t}),h=p.filter(e=>!u.includes(e)&&e!==eq.LATEST_PROMPT_LABEL),g=d.FH.prompts.addProtectedLabel.useMutation({onSuccess:()=>{c.prompts.getProtectedLabels.invalidate(),i.reset()}}),j=d.FH.prompts.removeProtectedLabel.useMutation({onSuccess:()=>{c.prompts.getProtectedLabels.invalidate()}}),[v,b]=D.useState(!1);return(0,a.jsxs)("div",{"data-sentry-component":"ProtectedLabelsSettings","data-sentry-source-file":"ProtectedLabelsSettings.tsx",children:[(0,a.jsx)(n.Ay,{title:"Protected Prompt Labels","data-sentry-element":"Header","data-sentry-source-file":"ProtectedLabelsSettings.tsx"}),(0,a.jsxs)(f.Zp,{className:"mb-4 p-3","data-sentry-element":"Card","data-sentry-source-file":"ProtectedLabelsSettings.tsx",children:[(0,a.jsx)("p",{className:"mb-4 text-sm text-primary",children:"Protected labels can only be modified by users with admin or owner access. This prevents other users from changing or removing these labels from prompts."}),(0,a.jsx)("div",{className:"mb-4 flex flex-wrap gap-2",children:u.map(e=>(0,a.jsx)(es.W,{type:e,className:"break-all sm:break-normal",isLive:e===eq.PRODUCTION_LABEL,children:s&&r&&(0,a.jsx)(l.$,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:()=>{confirm('Are you sure you want to remove the protected label "'.concat(e,'"?'))&&j.mutate({projectId:t,label:e})},children:(0,a.jsx)(eR.A,{className:"h-3 w-3"})})},e))}),(0,a.jsx)(o.lV,{...i,"data-sentry-element":"Form","data-sentry-source-file":"ProtectedLabelsSettings.tsx",children:(0,a.jsxs)("form",{onSubmit:i.handleSubmit(function(e){g.mutate({projectId:t,label:e.label})}),className:"flex items-start gap-2",children:[(0,a.jsx)(o.zB,{control:i.control,name:"label",render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{className:"flex-1",children:[(0,a.jsxs)(eY.AM,{open:v,onOpenChange:b,children:[(0,a.jsx)(eY.Wv,{asChild:!0,children:(0,a.jsx)(o.MJ,{children:(0,a.jsxs)(l.$,{variant:"outline",role:"combobox","aria-expanded":v,className:(0,eZ.cn)("w-full justify-between",!t.value&&"text-muted-foreground"),disabled:!s||!r,children:[t.value||"Select or enter a label",(0,a.jsx)(eO.A,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})})}),(0,a.jsx)(eY.hl,{className:"w-full p-0",children:(0,a.jsxs)(eG.uB,{children:[(0,a.jsx)(eG.G7,{placeholder:"Search or enter a new label...",onValueChange:e=>{t.onChange(e)}}),(0,a.jsx)(eG.xL,{children:"No label found"}),(0,a.jsx)(eG.L$,{children:h.map(e=>(0,a.jsxs)(eG.h_,{value:e,onSelect:()=>{t.onChange(e),b(!1)},children:[(0,a.jsx)(e$.A,{className:(0,eZ.cn)("mr-2 h-4 w-4",t.value===e?"opacity-100":"opacity-0")}),e]},e))})]})})]}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"ProtectedLabelsSettings.tsx"}),(0,a.jsx)(X.r,{type:"submit",variant:"secondary",loading:g.isPending,hasAccess:s,hasEntitlement:r,"data-sentry-element":"ActionButton","data-sentry-source-file":"ProtectedLabelsSettings.tsx",children:"Add"})]})})]})]})}var eW=s(78225),eX=s(51092),e0=s(88997),e1=s(89822),e2=s(88377),e4=s(59895),e5=s(42349);let e3=e=>{let{configId:t,projectId:s,isArchived:n,name:r}=e,i=(0,p.B)(),{emptySelectedConfigIds:o,setEmptySelectedConfigIds:c}=(0,e5.G)(),u=(0,y.lp)({projectId:s,scope:"scoreConfigs:CUD"}),m=d.FH.useUtils(),x=d.FH.scoreConfigs.update.useMutation({onSuccess:()=>void m.scoreConfigs.invalidate()});return(0,a.jsxs)(eY.AM,{"data-sentry-element":"Popover","data-sentry-component":"ArchiveScoreConfigButton","data-sentry-source-file":"ArchiveScoreConfigButton.tsx",children:[(0,a.jsx)(eY.Wv,{asChild:!0,"data-sentry-element":"PopoverTrigger","data-sentry-source-file":"ArchiveScoreConfigButton.tsx",children:(0,a.jsxs)(l.$,{variant:"ghost",className:"flex w-full items-center justify-start",disabled:!u,onClick:e=>{e.stopPropagation(),i("score_configs:archive_form_open")},"data-sentry-element":"Button","data-sentry-source-file":"ArchiveScoreConfigButton.tsx",children:[(0,a.jsx)(e4.A,{className:"mr-2 h-4 w-4","data-sentry-element":"Archive","data-sentry-source-file":"ArchiveScoreConfigButton.tsx"}),"Archive"]})}),(0,a.jsxs)(eY.hl,{onClick:e=>e.stopPropagation(),className:"max-w-[500px]","data-sentry-element":"PopoverContent","data-sentry-source-file":"ArchiveScoreConfigButton.tsx",children:[(0,a.jsx)("h2",{className:"text-md mb-3 font-semibold",children:n?"Restore config":"Archive config"}),(0,a.jsxs)("p",{className:"mb-3 text-sm",children:["Your config is currently"," ",n?'archived. Restore if you want to use "'.concat(r,'" in annotation again.'):'active. Archive if you no longer want to use "'.concat(r,'" in annotation. Historic "').concat(r,'" scores will still be shown and can be deleted. You can restore your config at any point.')]}),(0,a.jsx)("div",{className:"flex justify-end space-x-4",children:(0,a.jsx)(l.$,{type:"button",variant:n?"default":"destructive",loading:x.isPending,onClick:()=>{x.mutateAsync({projectId:s,id:t,isArchived:!n}),c(o.filter(e=>e!==t)),i("score_configs:archive_form_submit")},"data-sentry-element":"Button","data-sentry-source-file":"ArchiveScoreConfigButton.tsx",children:"Confirm"})})]})]})};var e8=s(61653),e6=s(35157);let e9=u.z.object({name:u.z.string().min(1).max(35),description:u.z.string().optional(),dataType:u.z.enum(["CATEGORICAL","NUMERIC","BOOLEAN"]),minValue:u.z.coerce.number().optional(),maxValue:u.z.coerce.number().optional(),categories:u.z.array(eq.ScoreConfigCategory).optional()}),e7=e9.extend({id:u.z.string()}),te=u.z.object({name:u.z.string().min(1).max(35),description:u.z.string().optional()}).and(u.z.discriminatedUnion("dataType",[eq.NumericConfigFields,eq.CategoricalConfigFields,eq.BooleanConfigFields]).superRefine(eq.validateNumericRangeFields));function tt(e){let{projectId:t,id:s,open:n,onOpenChange:r,defaultValues:u}=e,[h,g]=(0,D.useState)(null),j=(0,p.B)(),f=(0,y.lp)({projectId:t,scope:"scoreConfigs:CUD"}),v=d.FH.useUtils(),b=d.FH.scoreConfigs.create.useMutation({onSuccess:()=>v.scoreConfigs.invalidate(),onError:e=>{var t;return g(null!=(t=e.message)?t:"An error occurred while creating config.")}}),N=d.FH.scoreConfigs.update.useMutation({onSuccess:()=>v.scoreConfigs.invalidate(),onError:e=>{var t;return g(null!=(t=e.message)?t:"An error occurred while updating config.")}}),C=(0,m.mN)({resolver:(0,x.u)(s?e7:e9),defaultValues:null!=u?u:{dataType:eq.ScoreConfigDataType.NUMERIC,minValue:void 0,maxValue:void 0,name:""}}),{fields:A,append:L,remove:w,replace:P}=(0,m.jz)({control:C.control,name:"categories"});if(!f)return null;async function S(e){var a,n,l,i;let o=(e=>{var t,s;let a=te.safeParse({...e,categories:(null==(t=e.categories)?void 0:t.length)?e.categories:void 0});return a.error?null==(s=a.error)?void 0:s.issues.map(e=>e.message).join(", "):null})(e);if(g(o),await C.trigger()&&!o)if(s)return N.mutateAsync({...e,projectId:t,id:s,description:null!=(n=e.description)?n:null,categories:(null==(a=e.categories)?void 0:a.length)?e.categories:void 0}).then(()=>{j("score_configs:update_form_submit",{dataType:e.dataType}),C.reset(),r(!1)});else return b.mutateAsync({projectId:t,...e,description:null!=(i=e.description)?i:null,categories:(null==(l=e.categories)?void 0:l.length)?e.categories:void 0}).then(()=>{j("score_configs:create_form_submit",{dataType:e.dataType}),C.reset(),r(!1)})}return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(i.lG,{open:n,onOpenChange:e=>{C.reset(),g(null),r(e)},"data-sentry-element":"Dialog","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:[(0,a.jsx)(i.zM,{asChild:!0,"data-sentry-element":"DialogTrigger","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:(0,a.jsxs)(l.$,{variant:"secondary",loading:b.isPending,"data-sentry-element":"Button","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:[(0,a.jsx)(eI.A,{className:"-ml-0.5 mr-1.5 h-4 w-4","aria-hidden":"true","data-sentry-element":"PlusIcon","data-sentry-source-file":"UpsertScoreConfigDialog.tsx"}),s?"Update score config":"Add new score config"]})}),(0,a.jsxs)(i.Cf,{className:"max-h-[90vh] overflow-y-auto","data-sentry-element":"DialogContent","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:[(0,a.jsx)(i.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:(0,a.jsx)(i.L3,{"data-sentry-element":"DialogTitle","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:s?"Update score config":"Add new score config"})}),(0,a.jsx)(o.lV,{...C,"data-sentry-element":"Form","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:(0,a.jsxs)("form",{className:"space-y-6",onSubmit:C.handleSubmit(S),children:[(0,a.jsxs)(i.R4,{"data-sentry-element":"DialogBody","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:[(0,a.jsx)(o.zB,{control:C.control,name:"name",render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.lR,{children:"Name"}),(0,a.jsx)(o.MJ,{children:(0,a.jsx)(c.p,{...t,type:"text",onBlur:e=>t.onChange(e.target.value.trimEnd())})}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"UpsertScoreConfigDialog.tsx"}),(0,a.jsx)(o.zB,{control:C.control,name:"dataType",render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.lR,{children:"Data type"}),(0,a.jsxs)(Z.l6,{disabled:!!s,defaultValue:t.value,onValueChange:e=>
1{t.onChange(e),C.clearErrors(),(0,eX.o3)(e)?C.setValue("categories",void 0):(C.setValue("minValue",void 0),C.setValue("maxValue",void 0),(0,eX.zE)(e)?P([{label:"True",value:1},{label:"False",value:0}]):P([{label:"",value:0}]))},children:[(0,a.jsx)(o.MJ,{children:(0,a.jsx)(Z.bq,{children:(0,a.jsx)(Z.yv,{placeholder:"Select a data type"})})}),(0,a.jsx)(Z.gC,{children:Object.values(eq.ScoreConfigDataType).map(e=>(0,a.jsx)(Z.eb,{value:e,children:e},e))})]}),(0,a.jsx)(o.C5,{})]})},"data-sentry-element":"FormField","data-sentry-source-file":"UpsertScoreConfigDialog.tsx"}),(0,eX.o3)(C.getValues("dataType"))?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.zB,{control:C.control,name:"minValue",render:e=>{var t;let{field:s}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.lR,{children:"Minimum (optional) "}),(0,a.jsx)(o.MJ,{children:(0,a.jsx)(c.p,{...s,value:null!=(t=s.value)?t:"",onChange:e=>{let t=e.target.value;s.onChange(""===t?void 0:Number(t))},type:"number"})}),(0,a.jsx)(o.C5,{})]})}}),(0,a.jsx)(o.zB,{control:C.control,name:"maxValue",render:e=>{var t;let{field:s}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.lR,{children:"Maximum (optional)"}),(0,a.jsx)(o.MJ,{children:(0,a.jsx)(c.p,{...s,value:null!=(t=s.value)?t:"",onChange:e=>{let t=e.target.value;s.onChange(""===t?void 0:Number(t))},type:"number"})}),(0,a.jsx)(o.C5,{})]})}})]}):(0,a.jsx)("div",{className:"grid grid-flow-row gap-2",children:(0,a.jsx)(o.zB,{control:C.control,name:"categories",render:()=>(0,a.jsxs)(a.Fragment,{children:[A.length>0&&(0,a.jsxs)("div",{className:"mb-2 grid grid-cols-[1fr,3fr] items-center gap-2 text-left sm:grid-cols-[1fr,7fr]",children:[(0,a.jsxs)(o.lR,{className:"grid grid-flow-col",children:["Value",(0,a.jsx)(e6.A,{description:"This is how the ".concat((0,eX.dL)(C.getValues("dataType"))?"category":"boolean"," label is mapped to an integer value internally.")})]}),(0,a.jsx)(o.lR,{children:"Label"})]}),A.map((e,t)=>(0,a.jsxs)("div",{className:"items-top mb-2 grid grid-cols-[1fr,3fr] gap-2 text-left sm:grid-cols-[1fr,7fr]",children:[(0,a.jsx)(o.zB,{control:C.control,name:"categories.".concat(t,".value"),render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.MJ,{children:(0,a.jsx)(c.p,{...t,readOnly:!0,disabled:!0,inputMode:"numeric",className:"text-center"})}),(0,a.jsx)(o.C5,{})]})}}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr,auto] gap-2",children:[(0,a.jsx)(o.zB,{control:C.control,name:"categories.".concat(t,".label"),render:e=>{let{field:t}=e;return(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.MJ,{children:(0,a.jsx)(c.p,{...t,type:"text",onBlur:e=>t.onChange(e.target.value.trimEnd()),readOnly:(0,eX.zE)(C.getValues("dataType"))})}),(0,a.jsx)(o.C5,{})]})}}),(0,eX.dL)(C.getValues("dataType"))&&(0,a.jsx)(l.$,{onClick:()=>w(t),variant:"outline",size:"icon",disabled:0===t||t!==A.length-1,children:(0,a.jsx)(M.A,{className:"h-4 w-4"})})]})]},"".concat(e.id,"-langfuseObject"))),(0,eX.dL)(C.getValues("dataType"))&&(0,a.jsx)("div",{className:"grid-cols-auto grid",children:(0,a.jsx)(l.$,{type:"button",variant:"secondary",disabled:(0,eX.zE)(C.getValues("dataType"))&&2===A.length,onClick:()=>L({label:"",value:A.length}),children:"Add category"})})]})})}),(0,a.jsx)(o.zB,{control:C.control,name:"description",render:e=>{var t;let{field:s}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(o.eI,{children:[(0,a.jsx)(o.lR,{children:"Description (optional)"}),(0,a.jsx)(o.MJ,{children:(0,a.jsx)(e8.T,{...s,placeholder:"Provide an optional description of the score config...",value:null!=(t=s.value)?t:void 0})}),(0,a.jsx)(o.C5,{})]})})},"data-sentry-element":"FormField","data-sentry-source-file":"UpsertScoreConfigDialog.tsx"})]}),(0,a.jsx)(i.Es,{"data-sentry-element":"DialogFooter","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:(0,a.jsxs)("div",{className:"flex w-full flex-col items-end gap-4",children:[h?(0,a.jsxs)("p",{className:"text-red w-full text-center",children:[(0,a.jsx)("span",{className:"font-bold",children:"Error:"})," ",h]}):null,(0,a.jsx)(l.$,{type:"submit",loading:b.isPending||N.isPending,"data-sentry-element":"Button","data-sentry-source-file":"UpsertScoreConfigDialog.tsx",children:"Submit"})]})})]})})]})]})})}function ts(e){var t,s,n,r,i,o,c;let{projectId:u}=e,[m,x]=(0,D.useState)(null),[p,h]=(0,D.useState)(!1),[g,j]=(0,ej.P)(0,50,{page:"pageIndex",limit:"pageSize"}),f=(0,y.lp)({projectId:u,scope:"scoreConfigs:CUD"}),[v,b]=(0,ev.Fn)("scoreConfigs","s"),N=d.FH.scoreConfigs.all.useQuery({projectId:u,page:g.pageIndex,limit:g.pageSize},{enabled:f}),C=d.FH.scoreConfigs.byId.useQuery({projectId:u,id:m},{enabled:!!m&&f}),A=null!=(r=null==(t=N.data)?void 0:t.totalCount)?r:null,L=[{accessorKey:"name",id:"name",header:"Name",enableHiding:!0},{accessorKey:"dataType",id:"dataType",header:"Data Type",size:80,enableHiding:!0},{accessorKey:"range",id:"range",header:"Range",enableHiding:!0,size:300,cell:e=>{let{row:t}=e,s=function(e){var t,s,a;let{range:n,dataType:r}=e;return(0,eX.o3)(r)?{Minimum:null!=(t=n.minValue)?t:"-∞",Maximum:null!=(s=n.maxValue)?s:"∞"}:(0,eX.dL)(r)||(0,eX.zE)(r)?(null!=(a=n.categories)?a:[]).reduce((e,t)=>
1(e[t.value]=t.label,e),{}):void 0}(t.original);return s?(0,a.jsx)(ef.z,{data:s,singleLine:"s"===v}):null}},{accessorKey:"description",id:"description",header:"Description",enableHiding:!0,cell:e=>{let{row:t}=e,s=t.original.description;return s?(0,a.jsx)(ef.z,{data:s,singleLine:"s"===v}):null}},{accessorKey:"id",id:"id",header:"Config ID",enableHiding:!0,defaultHidden:!0},{accessorKey:"createdAt",id:"createdAt",header:"Created At",enableHiding:!0,defaultHidden:!0},{accessorKey:"isArchived",id:"isArchived",header:"Status",size:80,enableHiding:!0,cell:e=>{let{row:t}=e,{isArchived:s}=t.original;return s?"Archived":"Active"}},{accessorKey:"action",header:"Action",size:70,isFixedPosition:!0,enableHiding:!0,cell:e=>{let{row:t}=e,{id:s,isArchived:n,name:r}=t.original;return(0,a.jsxs)(e2.rI,{children:[(0,a.jsx)(e2.ty,{asChild:!0,children:(0,a.jsx)(l.$,{variant:"ghost",children:(0,a.jsx)(e0.A,{className:"h-4 w-4"})})}),(0,a.jsxs)(e2.SQ,{children:[(0,a.jsxs)(e2._2,{"aria-label":"edit",onClick:()=>x(s),children:[(0,a.jsx)(e1.A,{className:"mr-2 h-4 w-4"}),"Edit"]},s),(0,a.jsx)(e2._2,{asChild:!0,children:(0,a.jsx)(e3,{configId:s,projectId:u,isArchived:n,name:r})},"archive")]})]})}}],[w,P]=(0,eg.A)("scoreConfigsColumnVisibility",L),[S,M]=(0,eN.A)("scoreConfigsColumnOrder",L);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eb.w,{columns:L,columnVisibility:w,setColumnVisibility:P,columnOrder:S,setColumnOrder:M,rowHeight:v,setRowHeight:b,actionButtons:(0,a.jsx)(tt,{projectId:u,open:p,onOpenChange:h},"new-config-dialog"),className:"px-0","data-sentry-element":"DataTableToolbar","data-sentry-source-file":"score-configs.tsx"}),(0,a.jsx)(ed.E,{"data-sentry-element":"SettingsTableCard","data-sentry-source-file":"score-configs.tsx",children:(0,a.jsx)(ee.b,{tableName:"scoreConfigs",columns:L,data:N.isPending?{isLoading:!0,isError:!1}:N.isError?{isLoading:!1,isError:!0,error:N.error.message}:{isLoading:!1,isError:!1,data:null==(s=N.data)?void 0:s.configs.map(e=>({id:e.id,name:e.name,dataType:e.dataType,description:e.description,createdAt:e.createdAt.toLocaleString(),updatedAt:e.updatedAt.toLocaleString(),range:{maxValue:e.maxValue,minValue:e.minValue,categories:e.categories},isArchived:e.isArchived}))},pagination:{totalCount:A,onChange:j,state:g},columnVisibility:w,onColumnVisibilityChange:P,columnOrder:S,onColumnOrderChange:M,rowHeight:v,className:"gap-2","data-sentry-element":"DataTable","data-sentry-source-file":"score-configs.tsx"})}),!!m&&C.isSuccess&&(0,a.jsx)(tt,{id:m,projectId:u,open:!!m&&C.isSuccess,onOpenChange:e=>{e||x(null)},defaultValues:C.data?{id:m,name:C.data.name,dataType:C.data.dataType,minValue:null!=(i=C.data.minValue)?i:void 0,maxValue:null!=(o=C.data.maxValue)?o:void 0,description:null!=(c=C.data.description)?c:void 0,categories:(null==(n=C.data.categories)?void 0:n.length)?C.data.categories:void 0}:void 0},m)]})}function ta(e){let{projectId:t}=e;return(0,y.lp)({projectId:t,scope:"scoreConfigs:read"})?(0,a.jsxs)("div",{id:"score-configs","data-sentry-component":"ScoreConfigSettings","data-sentry-source-file":"ScoreConfigSettings.tsx",children:[(0,a.jsx)(n.Ay,{title:"Score Configs","data-sentry-element":"Header","data-sentry-source-file":"ScoreConfigSettings.tsx"}),(0,a.jsxs)("p",{className:"mb-2 text-sm",children:["Score configs define which scores are available for"," ",(0,a.jsx)("a",{href:"https://langfuse.com/docs/evaluation/evaluation-methods/annotation",className:"underline",target:"_blank",rel:"noopener noreferrer",children:"annotation"})," ","in your project. Please note that all score configs are immutable."]}),(0,a.jsx)(ts,{projectId:t,"data-sentry-element":"ScoreConfigsTable","data-sentry-source-file":"ScoreConfigSettings.tsx"})]}):null}var tn=s(70883),tr=s(1597);function tl(){var e;let t=(0,Q.useRouter)().query.projectId,[s,r]=(0,D.useState)(!1),l=(0,y.lp)({projectId:t,scope:"project:read"}),{data:i,isLoading:o,refetch:c}=d.FH.notificationPreferences.getForProject.useQuery({projectId:t},{enabled:!!t}),u=d.FH.notificationPreferences.update.useMutation({onSuccess:()=>{c()}}),m=async e=>{r(!0),await u.mutateAsync({projectId:t,channel:"EMAIL",type:"COMMENT_MENTION",enabled:e}),r(!1)};if(o||!i)return(0,a.jsxs)("div",{children:[(0,a.jsx)(n.Ay,{title:"Notification Settings"}),(0,a.jsx)(f.Zp,{className:"mt-4",children:(0,a.jsx)(f.Wu,{className:"p-6",children:(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading preferences..."})})})]});let x=i.find(e=>"EMAIL"===e.channel&&"COMMENT_MENTION"===e.type);return(0,a.jsxs)("div",{"data-sentry-component":"NotificationSettings","data-sentry-source-file":"NotificationSettings.tsx",children:[(0,a.jsx)(n.Ay,{title:"Notification Settings","data-sentry-element":"Header","data-sentry-source-file":"NotificationSettings.tsx"}),(0,a.jsx)(f.Zp,{className:"mt-4","data-sentry-element":"Card","data-sentry-source-file":"NotificationSettings.tsx",children:(0,a.jsxs)(f.Wu,{className:"space-y-6 p-6","data-sentry-element":"CardContent","data-sentry-source-file":"NotificationSettings.tsx",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-medium",children:"Email Notifications"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Manage your email notification preferences for this project."})]}),(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[(0,a.jsxs)("div",{className:"space-y-0.5",children:[(0,a.jsx)(tn.J,{htmlFor:"comment-mention",className:"text-base","data-sentry-element":"Label","data-sentry-source-file":"NotificationSettings.tsx",children:"Comment Mentions"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Receive an email when someone mentions you in a comment"})]}),(0,a.jsx)(tr.d,{id:"comment-mention",checked:null==(e=null==x?void 0:x.enabled)||e,onCheckedChange:m,disabled:s||!l,"data-sentry-element":"Switch","data-sentry-source-file":"NotificationSettings.tsx"})]})})]})}),u.isError&&(0,a.jsx)("div",{className:"mt-4 rounded-lg border border-destructive bg-destructive/10 p-4",children:(0,a.jsx)("p",{className:"text-sm text-destructive",children:"Failed to update notification preference. Please try again."})})]})}function ti(){let e=(0,Q.useRouter)(),{project:t,organization:s}=(0,h.B2)(),a=(0,J.Jz)("cloud-billing"),n=(0,J.Jz)("data-retention"),r=(0,J.Jz)("prompt-protected-labels");return t&&s&&e.query.projectId?to({project:t,organization:s,showBillingSettings:a,showRetentionSettings:n,showLLMConnectionsSettings:!0,showProtectedLabelsSettings:r}):[]}let to=e=>{let{project:t,organization:s,showBillingSettings:l,showRetentionSettings:i,showLLMConnectionsSettings:o,showProtectedLabelsSettings:c}=e;return[{title:"General",slug:"index",cmdKKeywords:["name","id","delete","transfer","ownership"],content:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(N,{}),(0,a.jsx)(w,{}),i&&(0,a.jsx)(eU,{}),(0,a.jsxs)("div",{children:[(0,a.jsx)(n.Ay,{title:"Debug Information"}),(0,a.jsx)(v.GJ,{title:"Metadata",json:{project:{name:t.name,id:t.
1id,...t.metadata},org:{name:s.name,id:s.id,...s.metadata},...g._.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION&&{cloudRegion:g._.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION}}})]}),(0,a.jsx)(W.L,{items:[{title:"Transfer ownership",description:"Transfer this project to another organization where you have the ability to create projects.",button:(0,a.jsx)(q,{})},{title:"Delete this project",description:"Once you delete a project, there is no going back. Please be certain.",button:(0,a.jsx)(j,{})}]})]})},{title:"API Keys",slug:"api-keys",cmdKKeywords:["auth","public key","secret key"],content:(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsx)(r.S,{entityId:t.id,scope:"project"})})},{title:"LLM Connections",slug:"llm-connections",cmdKKeywords:["llm","provider","openai","anthropic","azure","playground","evaluation","endpoint","api"],content:(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsx)(E,{projectId:t.id})}),show:o},{title:"Model Definitions",slug:"models",cmdKKeywords:["cost","token"],content:(0,a.jsx)(eH,{projectId:t.id})},{title:"Protected Prompt Labels",slug:"protected-prompt-labels",cmdKKeywords:["prompt","label","protect","lock"],content:(0,a.jsx)(eQ,{projectId:t.id}),show:c},{title:"Scores Configs",slug:"scores",cmdKKeywords:["config"],content:(0,a.jsx)(ta,{projectId:t.id})},{title:"Members",slug:"members",cmdKKeywords:["invite","user"],content:(0,a.jsxs)("div",{children:[(0,a.jsx)(n.Ay,{title:"Project Members"}),(0,a.jsx)(_.s,{orgId:s.id,project:{id:t.id,name:t.name},showSettingsCard:!0}),(0,a.jsx)("div",{children:(0,a.jsx)(U.I,{orgId:s.id,projectId:t.id})})]})},{title:"Integrations",slug:"integrations",cmdKKeywords:["posthog","mixpanel","analytics"],content:(0,a.jsx)(td,{projectId:t.id})},{title:"Exports",slug:"exports",cmdKKeywords:["csv","download","json","batch"],content:(0,a.jsx)(eu,{projectId:t.id})},{title:"Batch Actions",slug:"batch-actions",cmdKKeywords:["bulk","batch","action","dataset","delete"],content:(0,a.jsx)(ep,{projectId:t.id})},{title:"Audit Logs",slug:"audit-logs",cmdKKeywords:["trail"],content:(0,a.jsx)(ey,{projectId:t.id})},{title:"Notifications",slug:"notifications",cmdKKeywords:["inbox","email","mention","alert"],content:(0,a.jsx)(tl,{})},{title:"Billing",slug:"billing",href:"/organization/".concat(s.id,"/settings/billing"),show:l},{title:"Organization Settings",slug:"organization",href:"/organization/".concat(s.id,"/settings")}]};function tc(){let{project:e,organization:t}=(0,h.B2)(),s=(0,Q.useRouter)(),n=ti();return e&&t?(0,a.jsx)(e_.A,{headerProps:{title:"Project Settings"},"data-sentry-element":"ContainerPage","data-sentry-component":"SettingsPage","data-sentry-source-file":"index.tsx",children:(0,a.jsx)(V.a,{activeSlug:s.query.page,pages:n,"data-sentry-element":"PagedSettingsContainer","data-sentry-source-file":"index.tsx"})}):null}let td=e=>{let t=(0,y.lp)({projectId:e.projectId,scope:"integrations:CRUD"}),s=(0,J.Jz)("scheduled-blob-exports");return(0,a.jsxs)("div",{"data-sentry-component":"Integrations","data-sentry-source-file":"index.tsx",children:[(0,a.jsx)(n.Ay,{title:"Integrations","data-sentry-element":"Header","data-sentry-source-file":"index.tsx"}),(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)(f.Zp,{className:"p-3","data-sentry-element":"Card","data-sentry-source-file":"index.tsx",children:[(0,a.jsx)(R.S,{className:"mb-4 w-40 text-foreground","data-sentry-element":"PostHogLogo","data-sentry-source-file":"index.tsx"}),(0,a.jsx)("p",{className:"mb-4 text-sm text-primary",children:"We have teamed up with PostHog (OSS product analytics) to make Langfuse Events/Metrics available in your Posthog Dashboards."}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(X.r,{variant:"secondary",hasAccess:t,href:"/project/".concat(e.projectId,"/settings/integrations/posthog"),"data-sentry-element":"ActionButton","data-sentry-source-file":"index.tsx",children:"Configure"}),(0,a.jsx)(l.$,{asChild:!0,variant:"ghost","data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:(0,a.jsx)(S(),{href:"https://langfuse.com/integrations/analytics/posthog",target:"_blank","data-sentry-element":"Link","data-sentry-source-file":"index.tsx",children:"Integration Docs ↗"})})]})]}),(0,a.jsxs)(f.Zp,{className:"p-3","data-sentry-element":"Card","data-sentry-source-file":"index.tsx",children:[(0,a.jsx)(O.O,{className:"mb-4 w-20 text-foreground","data-sentry-element":"MixpanelLogo","data-sentry-source-file":"index.tsx"}),(0,a.jsx)("p",{className:"mb-4 text-sm text-primary",children:"Integrate with Mixpanel to sync your Langfuse traces, generations, and scores for advanced product analytics and insights."}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(X.r,{variant:"secondary",hasAccess:t,href:"/project/".concat(e.projectId,"/settings/integrations/mixpanel"),"data-sentry-element":"ActionButton","data-sentry-source-file":"index.tsx",children:"Configure"}),(0,a.jsx)(l.$,{asChild:!0,variant:"ghost","data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:(0,a.jsx)(S(),{href:"https://langfuse.com/integrations/analytics/mixpanel",target:"_blank","data-sentry-element":"Link","data-sentry-source-file":"index.tsx",children:"Integration Docs ↗"})})]})]}),(0,a.jsxs)(f.Zp,{className:"p-3","data-sentry-element":"Card","data-sentry-source-file":"index.tsx",children:[(0,a.jsx)("span",{className:"font-semibold",children:"Blob Storage"}),(0,a.jsx)("p",{className:"mb-4 text-sm text-primary",children:"Configure scheduled exports of your trace data to S3 compatible storages or Azure Blob Storage. Set up a scheduled export to your own storage for data analysis or backup purposes."}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(X.r,{variant:"secondary",hasAccess:t,hasEntitlement:s,href:"/project/".concat(e.projectId,"/settings/integrations/blobstorage"),"data-sentry-element":"ActionButton","data-sentry-source-file":"index.tsx",children:"Configure"}),(0,a.jsx)(l.$,{asChild:!0,variant:"ghost","data-sentry-element":"Button","data-sentry-source-file":"index.tsx",children:(0,a.jsx)(S(),{href:"https://langfuse.com/docs/query-traces#blob-storage",target:"_blank","data-sentry-element":"Link","data-sentry-source-file":"index.tsx",children:"Integration Docs ↗"})})]})]}),(0,a.jsxs)(f.Zp,{className:"p-3","data-sentry-element":"Card","data-sentry-source-file":"index.tsx",children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,a.jsx)(eW.A,{className:"h-5 w-5 text-foreground","data-sentry-element":"Slack","data-sentry-source-file":"index.tsx"}),(0,a.jsx)("span",{className:"font-semibold",children:"Slack"})]}),(0,a.jsx)("p",{className:"mb-4 text-sm text-primary",children:"Connect a Slack workspace and create channel automations to receive Langfuse alerts natively in Slack."}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)(X.r,{variant:"secondary",hasAccess:t,href:"/project/".concat(e.projectId,"/settings/integrations/slack"),"data-sentry-element":"ActionButton","data-sentry-source-file":"index.tsx",children:"Configure"})})]})]})]})}},31806:(e,t,s)=>{s.d(t,{S:()=>C});var a=s(73154),n=s(28353),r=s(86843),l=s(25277),i=s(56664),o=s(90270),c=s(14183),d=s(25525),u=s(92125),m=s(16058),x=s(18799),p=s(36157),h=s(93367),y=s(2198),g=s(55247),j=s(96810),f=s(79071),v=s(28878),b=s.n(v),N=s(57299);function C(e){var t,s;let{entityId:r,scope:o}=e,c=(0,N.j)();if(!r)throw Error("".concat(o,"Id is required for ApiKeyList with scope ").concat(o));let u=(0,x.lp)({projectId:e.entityId,scope:"apiKeys:CUD"}),y=(0,p.du)({organizationId:e.entityId,scope:"organization:CRUD_apiKeys"}),g="project"===e.scope?u:y,j=h.FH.projectApiKeys.byProjectId.useQuery({projectId:r},{enabled:u&&"project"===e.scope}),v=h.FH.organizationApiKeys.byOrganizationId.useQuery({orgId:r},{enabled:y&&"organization"===e.scope}),C="project"===e.scope?j:v;return g?(0,a.jsxs)("div",{className:"space-y-4","data-sentry-component":"ApiKeyList","data-sentry-source-file":"ApiKeyList.tsx",children:[(0,a.jsx)(n.Ay,{title:b()("".concat(o," API keys")),help:{description:"Learn more about ".concat(o," API keys"),href:"project"===o?"https://langfuse.com/docs/api#authentication":"https://langfuse.com/docs/api#org-scoped-routes"}
1,actionButtons:(0,a.jsx)(m.k,{entityId:r,scope:o}),"data-sentry-element":"Header","data-sentry-source-file":"ApiKeyList.tsx"}),(0,a.jsx)(i.xi,{content:c,title:".env","data-sentry-element":"CodeView","data-sentry-source-file":"ApiKeyList.tsx"}),(0,a.jsx)(l.Zp,{className:"mb-4 overflow-hidden","data-sentry-element":"Card","data-sentry-source-file":"ApiKeyList.tsx",children:(0,a.jsxs)(d.XI,{"data-sentry-element":"Table","data-sentry-source-file":"ApiKeyList.tsx",children:[(0,a.jsx)(d.A0,{"data-sentry-element":"TableHeader","data-sentry-source-file":"ApiKeyList.tsx",children:(0,a.jsxs)(d.Hj,{"data-sentry-element":"TableRow","data-sentry-source-file":"ApiKeyList.tsx",children:[(0,a.jsx)(d.nd,{className:"hidden text-primary md:table-cell","data-sentry-element":"TableHead","data-sentry-source-file":"ApiKeyList.tsx",children:"Created"}),(0,a.jsx)(d.nd,{className:"text-primary","data-sentry-element":"TableHead","data-sentry-source-file":"ApiKeyList.tsx",children:"Note"}),(0,a.jsx)(d.nd,{className:"text-primary","data-sentry-element":"TableHead","data-sentry-source-file":"ApiKeyList.tsx",children:"Public Key"}),(0,a.jsx)(d.nd,{className:"text-primary","data-sentry-element":"TableHead","data-sentry-source-file":"ApiKeyList.tsx",children:"Secret Key"}),(0,a.jsx)(d.nd,{"data-sentry-element":"TableHead","data-sentry-source-file":"ApiKeyList.tsx"})]})}),(0,a.jsx)(d.BF,{className:"text-muted-foreground","data-sentry-element":"TableBody","data-sentry-source-file":"ApiKeyList.tsx",children:(null==(t=C.data)?void 0:t.length)===0?(0,a.jsx)(d.Hj,{children:(0,a.jsx)(d.nA,{colSpan:5,className:"text-center",children:"None"})}):null==(s=C.data)?void 0:s.map(e=>(0,a.jsxs)(d.Hj,{className:"hover:bg-primary-foreground",children:[(0,a.jsx)(d.nA,{className:"hidden md:table-cell",children:e.createdAt.toLocaleDateString()}),(0,a.jsx)(d.nA,{children:(0,a.jsx)(L,{apiKey:e,entityId:r,scope:o})}),(0,a.jsx)(d.nA,{className:"font-mono",children:(0,a.jsx)(i.xi,{className:"inline-block text-xs",content:e.publicKey})}),(0,a.jsx)(d.nA,{className:"font-mono",children:e.displaySecretKey}),(0,a.jsx)(d.nA,{children:(0,a.jsx)(A,{entityId:r,apiKeyId:e.id,scope:o})})]},e.id))})]})})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)(n.Ay,{title:"API Keys"}),(0,a.jsxs)(f.Fc,{children:[(0,a.jsx)(f.XL,{children:"Access Denied"}),(0,a.jsxs)(f.TN,{children:["You do not have permission to view API keys for this ",o,"."]})]})]})}function A(e){let{entityId:t,apiKeyId:s,scope:n}=e,l=(0,u.B)(),i=(0,x.lp)({projectId:e.entityId,scope:"apiKeys:CUD"}),o=(0,p.du)({organizationId:e.entityId,scope:"organization:CRUD_apiKeys"}),d="project"===e.scope?i:o,m=h.FH.useUtils(),f=h.FH.projectApiKeys.delete.useMutation({onSuccess:()=>m.projectApiKeys.invalidate()}),v=h.FH.organizationApiKeys.delete.useMutation({onSuccess:()=>m.organizationApiKeys.invalidate()}),[b,N]=(0,j.useState)(!1);return d?(0,a.jsxs)(c.lG,{open:b,onOpenChange:N,"data-sentry-element":"Dialog","data-sentry-component":"DeleteApiKeyButton","data-sentry-source-file":"ApiKeyList.tsx",children:[(0,a.jsx)(c.zM,{asChild:!0,"data-sentry-element":"DialogTrigger","data-sentry-source-file":"ApiKeyList.tsx",children:(0,a.jsx)(r.$,{variant:"ghost",size:"icon","data-sentry-element":"Button","data-sentry-source-file":"ApiKeyList.tsx",children:(0,a.jsx)(g.A,{className:"h-4 w-4","data-sentry-element":"TrashIcon","data-sentry-source-file":"ApiKeyList.tsx"})})}),(0,a.jsxs)(c.Cf,{"data-sentry-element":"DialogContent","data-sentry-source-file":"ApiKeyList.tsx",children:[(0,a.jsxs)(c.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"ApiKeyList.tsx",children:[(0,a.jsx)(c.L3,{className:"mb-5","data-sentry-element":"DialogTitle","data-sentry-source-file":"ApiKeyList.tsx",children:"Delete API key"}),(0,a.jsx)(y.rr,{"data-sentry-element":"DialogDescription","data-sentry-source-file":"ApiKeyList.tsx",children:"Are you sure you want to delete this API key? This action cannot be undone."})]}),(0,a.jsxs)(c.Es,{"data-sentry-element":"DialogFooter","data-sentry-source-file":"ApiKeyList.tsx",children:[(0,a.jsx)(r.$,{variant:"destructive",onClick:()=>{"project"===n?f.mutateAsync({projectId:t,id:s}).then(()=>{l("".concat(n,"_settings:api_key_delete")),N(!1)}).catch(e=>{console.error(e)}):v.mutateAsync({orgId:t,id:s}).then(()=>{l("".concat(n,"_settings:api_key_delete")),N(!1)}).catch(e=>{console.error(e)})},loading:v.isPending||f.isPending,"data-sentry-element":"Button","data-sentry-source-file":"ApiKeyList.tsx",children:"Permanently delete"}),(0,a.jsx)(r.$,{variant:"ghost",onClick:()=>N(!1),"data-sentry-element":"Button","data-sentry-source-file":"ApiKeyList.tsx",children:"Cancel"})]})]})]}):null}function L(e){var t;
1let{apiKey:s,entityId:n,scope:r}=e,l=h.FH.useUtils(),i=(0,x.lp)({projectId:n,scope:"apiKeys:CUD"}),c=(0,p.du)({organizationId:n,scope:"organization:CRUD_apiKeys"}),d=h.FH.projectApiKeys.updateNote.useMutation({onSuccess:()=>l.projectApiKeys.invalidate()}),u=h.FH.organizationApiKeys.updateNote.useMutation({onSuccess:()=>l.organizationApiKeys.invalidate()}),[m,y]=(0,j.useState)(null!=(t=s.note)?t:""),[g,f]=(0,j.useState)(!1);return("project"===r?i:c)?g?(0,a.jsx)(o.p,{value:m,onChange:e=>y(e.target.value),onBlur:()=>{f(!1),m!==s.note&&("project"===r?d.mutate({projectId:n,keyId:s.id,note:m}):u.mutate({orgId:n,keyId:s.id,note:m}))},autoFocus:!0,className:"h-8"}):(0,a.jsx)("div",{onClick:()=>f(!0),className:"-mx-2 cursor-pointer rounded px-2 py-1 hover:bg-secondary/50","data-sentry-component":"ApiKeyNote","data-sentry-source-file":"ApiKeyList.tsx",children:m||"Click to add note"}):null!=m?m:""}},34507:(e,t,s)=>{s.d(t,{a:()=>d});var a=s(73154),n=s(81509),r=s(16609),l=s(68389),i=s.n(l),o=s(93323),c=s(39156);let d=e=>{var t;let{pages:s,activeSlug:l}=e,d=(0,c.useRouter)(),u=s.filter(e=>!("show"in e)||("function"==typeof e.show?e.show():e.show)),m=null!=(t=u.find(e=>e.slug===l))?t:u[0],x=e=>{let t=d.asPath.split("/");"settings"!==t[t.length-1]&&t.pop(),"index"!==e&&t.push(e),d.push(t.join("/"))};return(0,a.jsx)("main",{className:"flex flex-1 flex-col gap-4 py-4 md:gap-8","data-sentry-component":"PagedSettingsContainer","data-sentry-source-file":"PagedSettingsContainer.tsx",children:(0,a.jsxs)("div",{className:"grid w-full items-start gap-4 md:grid-cols-[150px_1fr] lg:grid-cols-[220px_1fr]",children:[(0,a.jsx)("nav",{className:"block md:hidden",children:(0,a.jsxs)(o.l6,{onValueChange:e=>{let t=u.find(t=>t.slug===e);t&&"href"in t?d.push(t.href):x(e)},value:m.slug,"data-sentry-element":"Select","data-sentry-source-file":"PagedSettingsContainer.tsx",children:[(0,a.jsx)(o.bq,{"data-sentry-element":"SelectTrigger","data-sentry-source-file":"PagedSettingsContainer.tsx",children:(0,a.jsx)(o.yv,{placeholder:"Select a page","data-sentry-element":"SelectValue","data-sentry-source-file":"PagedSettingsContainer.tsx"})}),(0,a.jsx)(o.gC,{"data-sentry-element":"SelectContent","data-sentry-source-file":"PagedSettingsContainer.tsx",children:u.map(e=>(0,a.jsxs)(o.eb,{value:e.slug,children:[e.title,"href"in e&&(0,a.jsx)(r.A,{size:14,className:"ml-1 inline"})]},e.title))})]})}),(0,a.jsx)("nav",{className:"hidden gap-4 text-sm text-muted-foreground md:sticky md:top-5 md:grid","x-chunk":"dashboard-04-chunk-0",children:u.map(e=>"href"in e?(0,a.jsxs)(i(),{href:e.href,className:"flex flex-row items-center gap-2 font-semibold",children:[e.title,(0,a.jsx)(r.A,{size:14,className:"inline"})]},e.title):(0,a.jsx)("span",{onClick:()=>x(e.slug),className:(0,n.cn)("cursor-pointer font-semibold",e.slug===m.slug&&"text-primary"),children:e.title},e.title))}),(0,a.jsx)("div",{className:"w-full overflow-hidden p-1",children:m&&"content"in m?m.content:null})]})})}},37583:(e,t,s)=>{s.d(t,{l:()=>d});var a=s(73154),n=s(96810),r=s(86843),l=s(97638),i=s(92125),o=s(18799),c=s(93367);let d=e=>{let{modelData:t,projectId:s,onSuccess:d}=e,[u,m]=(0,n.useState)(!1),x=c.FH.useUtils(),p=(0,i.B)(),h=c.FH.models.delete.useMutation({onSuccess:()=>{x.models.invalidate(),null==d||d()}}),y=(0,o.lp)({projectId:s,scope:"models:CUD"});return(0,a.jsxs)(l.AM,{open:u,onOpenChange:()=>m(!u),"data-sentry-element":"Popover","data-sentry-component":"DeleteModelButton","data-sentry-source-file":"DeleteModelButton.tsx",children:[(0,a.jsx)(l.Wv,{asChild:!0,"data-sentry-element":"PopoverTrigger","data-sentry-source-file":"DeleteModelButton.tsx",children:(0,a.jsx)(r.$,{variant:"outline",title:"Delete model",disabled:!y,className:"flex items-center border-light-red","data-sentry-element":"Button","data-sentry-source-file":"DeleteModelButton.tsx",children:(0,a.jsx)("span",{className:"text-dark-red",children:"Delete"})})}),(0,a.jsxs)(l.hl,{"data-sentry-element":"PopoverContent","data-sentry-source-file":"DeleteModelButton.tsx",children:[(0,a.jsx)("h2",{className:"text-md mb-3 font-semibold",children:"Please confirm"}),(0,a.jsx)("p",{className:"mb-3 text-sm",children:"This action permanently deletes this model definition."}),(0,a.jsx)("div",{className:"flex justify-end space-x-4",children:(0,a.jsx)(r.$,{type:"button",variant:"destructive",loading:h.isPending,onClick:()=>{p("models:delete_button_click"),h.mutateAsync({projectId:s,modelId:t.id}),m(!1)},"data-sentry-element":"Button","data-sentry-source-file":"DeleteModelButton.tsx",children:"Delete Model"})})]})]})}},37942:(e,t,s)=>{s.d(t,{L:()=>r});var a=s(73154),n=s(28353);s(96810);let r=e=>{let{items:t}=e;return(0,a.jsxs)("div",{className:"space-y-3","data-sentry-component":"SettingsDangerZone","data-sentry-source-file":"SettingsDangerZone.tsx",children:[(0,a.jsx)(n.Ay,{title:"Danger Zone","data-sentry-element":"Header","data-sentry-source-file":"SettingsDangerZone.tsx"}),(0,a.jsx)("div",{className:"rounded-lg border",children:t.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b p-3 last:border-b-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-sm",children:e.description})]}),e.button]},t))})]})}},45024:(e,t,s)=>{s.d(t,{a:()=>i});var a=s(96810),n=s(80539),r=s(79551);let l={[r.Go.PerUnit]:1,[r.Go.Per1KUnits]:1e3,[r.Go.Per1MUnits]:1e6},i=()=>{let[e,t]=(0,n.A)("priceUnit",r.Go.PerUnit),s=(0,a.useMemo)(()=>l[e],[e]);return{priceUnit:e,setPriceUnit:t,priceUnitMultiplier:s}}},45120:(e,t,s)=>{s.d(t,{K:()=>i});var a=s(73154),n=s(86843),r=s(18799),l=s(34242);let i=e=>{let{modelData:t,projectId:s}=e,i=(0,r.lp)({projectId:s,scope:"models:CUD"});return(0,a.jsx)(l.b,{modelData:t,projectId:s,action:"edit","data-sentry-element":"UpsertModelFormDialog","data-sentry-component":"EditModelButton","data-sentry-source-file":"EditModelButton.tsx",children:(0,a.jsx)(n.$,{variant:"outline",disabled:!i,title:"Edit model",className:"flex items-center","data-sentry-element":"Button","data-sentry-source-file":"EditModelButton.tsx",children:(0,a.jsx)("span",{children:"Edit"})})})}},47249:(e,t,s)=>{s.d(t,{V:()=>d});var a=s(73154),n=s(21),r=s(86843),l=s(97638),i=s(93323),o=s(79551),c=s(45024);let d=()=>{let{priceUnit:e,setPriceUnit:t}=(0,c.a)();return(0,a.jsxs)(l.AM,{"data-sentry-element":"Popover","data-sentry-component":"PriceUnitSelector","data-sentry-source-file":"PriceUnitSelector.tsx",children:[(0,a.jsx)(l.Wv,{asChild:!0,"data-sentry-element":"PopoverTrigger","data-sentry-source-file":"PriceUnitSelector.tsx",children:(0,a.jsx)(r.$,{size:"icon",variant:"ghost","data-sentry-element":"Button","data-sentry-source-file":"PriceUnitSelector.tsx",children:(0,a.jsx)(n.A,{className:"h-4 w-4","data-sentry-element":"ChevronDownIcon","data-sentry-source-file":"PriceUnitSelector.tsx"})})}),(0,a.jsx)(l.hl,{className:"w-[200px] p-0","data-sentry-element":"PopoverContent","data-sentry-source-file":"PriceUnitSelector.tsx",children:(0,a.jsxs)(i.l6,{value:e,onValueChange:e=>t(e),"data-sentry-element":"Select","data-sentry-source-file":"PriceUnitSelector.tsx",children:[(0,a.jsx)(i.bq,{className:"w-full","data-sentry-element":"SelectTrigger","data-sentry-source-file":"PriceUnitSelector.tsx",children:(0,a.jsx)(i.yv,{placeholder:"Select unit","data-sentry-element":"SelectValue","data-sentry-source-file":"PriceUnitSelector.tsx"})}),(0,a.jsx)(i.gC,{"data-sentry-element":"SelectContent","data-sentry-source-file":"PriceUnitSelector.tsx",children:Object.values(o.Go).map(e=>(0,a.jsx)(i.eb,{value:e,children:e},e))})]})})]})}},48201:(e,t,s)=>{s.d(t,{k:()=>l,q:()=>i});var a=s(73154),n=s(96810);let r=(0,n.createContext)(void 0);function l(e){let{children:t}
1=e,[s,l]=(0,n.useState)({filters:[],sorting:null,pagination:{pageIndex:0,pageSize:50},search:{query:null,type:["id"]}}),i=(0,n.useMemo)(()=>({tableState:s,setTableState:l}),[s]);return(0,a.jsx)(r.Provider,{value:i,"data-sentry-element":"PeekTableStateContext.Provider","data-sentry-component":"PeekTableStateProvider","data-sentry-source-file":"PeekTableStateContext.tsx",children:t})}function i(){return(0,n.useContext)(r)}},57299:(e,t,s)=>{s.d(t,{j:()=>r});var a=s(90391),n=s(82145);function r(e){var t,s;let r=(0,a.l)(),l="".concat(null!=(t=null==r?void 0:r.hostname)?t:window.origin).concat(null!=(s=n._.NEXT_PUBLIC_BASE_PATH)?s:"");return e?'LANGFUSE_SECRET_KEY="'.concat(e.secretKey,'"\nLANGFUSE_PUBLIC_KEY="').concat(e.publicKey,'"\nLANGFUSE_BASE_URL="').concat(l,'"'):'LANGFUSE_SECRET_KEY="sk-lf-..."\nLANGFUSE_PUBLIC_KEY="pk-lf-..."\nLANGFUSE_BASE_URL="'.concat(l,'"')}},59895:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]])},60222:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]])},64495:(e,t,s)=>{s.d(t,{O:()=>n});var a=s(73154);s(96810);let n=e=>(0,a.jsx)("svg",{viewBox:"0 0 371.61 88",width:"1em",height:"1em",fill:"none","aria-hidden":"true",focusable:"false",...e,"data-sentry-element":"svg","data-sentry-component":"MixpanelLogo","data-sentry-source-file":"MixpanelLogo.tsx",children:(0,a.jsx)("path",{d:"M0,68.26h22.29v-2.37h-1.67c-3.26,0-4.04-0.89-4.04-4.14V32.36c2.27-3.85,5.33-6.32,9.18-6.32 c4.84,0,7.79,3.55,7.79,10.26v25.45c0,3.26-0.79,4.14-3.95,4.14h-1.78v2.37h21.8V65.9h-1.58c-3.26,0-4.04-0.89-4.04-4.14V35.21 c0-0.89,0-1.78-0.1-2.66c2.17-3.95,5.43-6.51,9.27-6.51c4.84,0,7.8,3.55,7.8,10.26v25.45c0,3.26-0.79,4.14-3.95,4.14h-1.78v2.37 h21.8V65.9h-1.48c-3.36,0-4.14-0.89-4.14-4.14V35.21c0-9.96-5.62-15.49-13.81-15.49c-6.11,0-11.44,3.36-14.3,10.06 c-1.67-6.51-6.61-10.06-13.12-10.06c-5.82,0-10.85,3.15-13.62,9.47v-8.29H0v2.37h1.97c3.36,0,4.14,0.89,4.14,4.14v34.33 c0,3.26-0.79,4.14-4.14,4.14H0V68.26z M90.17,13.02c3.55,0,6.51-2.96,6.51-6.51c0-3.55-2.96-6.51-6.51-6.51 c-3.55,0-6.51,2.96-6.51,6.51C83.66,10.06,86.62,13.02,90.17,13.02z M79.12,68.26h21.9v-2.37h-1.48c-3.26,0-4.04-0.89-4.04-4.14 V20.91H78.92v2.37h1.97c3.36,0,4.14,0.89,4.14,4.14v34.33c0,3.26-0.79,4.14-4.14,4.14h-1.78L79.12,68.26L79.12,68.26z M117,40.45 h6.31c-1.58-0.99-2.17-2.37-2.96-4.93l-2.37-8.78c-1.08-3.95-1.97-5.82-6.31-5.82h-9.07v2.37h1.29c2.66,0,2.96,0.99,3.75,3.95 l2.07,7.7C110.79,38.68,112.48,40.45,117,40.45L117,40.45z M131.61,40.45h6.31c4.54,0,6.11-1.78,7.2-5.52l2.07-7.7 c0.79-2.96,1.18-3.95,3.75-3.95h1.29v-2.37h-8.98c-4.44,0-5.33,1.78-6.32,5.82l-2.37,8.78C133.78,38.17,133.18,39.46,131.61,40.45z M123.32,48.73h8.29v-8.29h-8.29V48.73z M102.6,68.27h9.07c4.34,0,5.23-1.88,6.31-5.82l2.37-8.78c0.79-2.56,1.38-3.95,2.96-4.93 H117c-4.54,0-6.22,1.78-7.3,5.52l-2.07,7.7c-0.79,2.96-1.08,3.95-3.75,3.95h-1.29L102.6,68.27L102.6,68.27z M143.24,68.27h8.98 V65.9h-1.29c-2.56,0-2.96-0.99-3.75-3.95l-2.07-7.7c-1.08-3.75-2.66-5.52-7.2-5.52h-6.3c1.58,0.99,2.15,2.27,2.94,4.93l2.37,8.78 C137.91,66.49,138.8,68.27,143.24,68.27L143.24,68.27z M153.5,88h22.88v-2.37h-2.37c-3.15,0-3.95-0.89-3.95-4.14V62.65 c2.86,4.24,7.7,6.81,13.42,6.81c10.75,0,19.33-9.47,19.33-25.84c0-14.8-8.09-23.87-18.55-23.87c-6.11,0-11.25,3.55-14.21,9.86 v-8.68h-16.58v2.37h1.97c3.26,0,4.14,0.89,4.14,4.14v54.05c0,3.26-0.89,4.14-4.14,4.14h-1.97v2.37L153.5,88z M180.54,25.85 c6.41,0,11.64,6.02,11.64,17.95c0,13.02-4.84,20.13-11.44,20.13c-4.25,0-7.99-2.27-10.66-6.22V33.24 C172.64,28.41,176.3,25.84,180.54,25.85L180.54,25.85z M218.42,69.26c6.41,0,11.54-3.06,15.39-9.96v1.08 c0,5.92,3.75,8.48,9.96,8.48c1.88,0,4.25-0.19,5.82-0.69v-2.47c-0.79,0.19-1.38,0.3-1.97,0.3c-2.47,0-3.26-1.48-3.26-3.85V36.9 c0-11.64-6.51-17.17-17.46-17.17c-7.3,0-14.4,3.36-18.94,6.91l1.58,2.77c4.74-3.26,9.37-5.13,14.4-5.13 c6.51,0,9.86,3.55,9.86,11.84v2.17l-12.14,4.74c-11.05,4.54-15.1,8.78-15.1,15.19C206.57,64.62,211.11,69.26,218.42,69.26 L218.42,69.26z M216.94,55.64c0-4.93,2.86-8.48,8.68-11.05l8.19-3.55v15.39c-3.06,4.24-6.61,6.71-10.46,6.71 C219.51,63.14,216.95,60.48,216.94,55.64L216.94,55.64z M251.56,68.27h22.5V65.9h-1.88c-3.26,0-4.04-0.89-4.04-4.14v-29.3 c2.27-3.95,5.62-6.41,9.57-6.41c5.13,0,8.39,3.55,8.39,10.26v25.45c0,3.26-0.79,4.14-3.95,4.14h-1.88v2.37h22.39V65.9h-1.97 c-3.36,0-4.14-0.89-4.14-4.14V35.21c0-9.96-5.92-15.49-14.3-15.49c-6.11,0-11.25,3.15-14.11,9.47v-8.29h-16.58v2.37h1.97 c3.36,0,4.14,0.89,4.14,4.14v34.33c0,3.26-0.79,4.14-4.14,4.14h-1.97L251.56,68.27L251.56,68.27z M328.31,69.45 c6.51,0,12.63-2.96,17.07-6.51l-1.48-2.17c-3.95,2.86-8.39,4.14-12.53,4.14c-10.06,0-15.98-7.1-15.98-20.91v-1.78h31.17 c-0.19-13.32-8.39-22.39-20.32-22.39c-11.93,0-21.51,10.75-21.51,24.96C304.74,60.39,313.62,69.46,328.31,69.45L328.31,69.45z M326.34,22.29c5.92,0,9.57,6.41,10.16,17.26h-20.91C316.48,28.61,320.62,22.29,326.34,22.29L326.34,22.29z M348.73,68.26h22.88 v-2.37h-2.27c-3.26,0-4.04-0.89-4.04-4.14V1.18h-16.58v2.37h1.97c3.26,0,4.14,0.89,4.14,4.14v54.06c0,3.26-0.89,4.14-4.14,4.14 h-1.97L348.73,68.26L348.73,68.26z",fill:"
1currentColor","data-sentry-element":"path","data-sentry-source-file":"MixpanelLogo.tsx"})})},65807:(e,t,s)=>{s.d(t,{V:()=>i});var a=s(73154),n=s(86843),r=s(18799),l=s(34242);let i=e=>{let{modelData:t,projectId:s}=e,i=(0,r.lp)({projectId:s,scope:"models:CUD"});return(0,a.jsx)(l.b,{modelData:t,projectId:s,action:"clone","data-sentry-element":"UpsertModelFormDialog","data-sentry-component":"CloneModelButton","data-sentry-source-file":"CloneModelButton.tsx",children:(0,a.jsx)(n.$,{variant:"outline",disabled:!i,title:"Clone model",className:"flex items-center","data-sentry-element":"Button","data-sentry-source-file":"CloneModelButton.tsx",children:(0,a.jsx)("span",{children:"Clone"})})})}},68842:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("square-arrow-out-up-right",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]])},71553:(e,t,s)=>{s.d(t,{V:()=>M});var a=s(73154),n=s(96810),r=s(68048),l=s(68389),i=s.n(l),o=s(14183),c=s(90270),d=s(86843),u=s(93367),m=s(78512),x=s(60222);function p(e){let{usageDetails:t,onChange:s}=e,[r,l]=(0,n.useState)(Object.entries(t).map(e=>{let[t,s]=e;return{key:t,value:s}})),i=e=>{l(e),s(Object.fromEntries(e.filter(e=>""!==e.key.trim()).map(e=>[e.key,e.value])))},o=e=>{i(Object.entries(e).map(e=>{let[t,s]=e;return{key:t,value:s}}))};return(0,a.jsxs)("div",{className:"space-y-4","data-sentry-component":"UsageDetailsEditor","data-sentry-source-file":"UsageDetailsEditor.tsx",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"pb-2 text-sm font-medium",children:"Usage Details (optional)"}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Add usage details to test pricing tier matching. Leave empty to match the default tier."})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Prefill from template:"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"outline",size:"sm",onClick:()=>o({input:1e3,output:500}),"data-sentry-element":"Button","data-sentry-source-file":"UsageDetailsEditor.tsx",children:"OpenAI"}),(0,a.jsx)(d.$,{type:"button",variant:"outline",size:"sm",onClick:()=>o({input_tokens:1e3,output_tokens:500,cache_read_input_tokens:0}),"data-sentry-element":"Button","data-sentry-source-file":"UsageDetailsEditor.tsx",children:"Anthropic"})]})]}),r.length>0?(0,a.jsxs)("div",{className:"space-y-2 rounded-lg border p-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[1fr,1fr,auto] gap-2 text-sm font-medium",children:[(0,a.jsx)("div",{children:"Usage Type"}),(0,a.jsx)("div",{children:"Value"}),(0,a.jsx)("div",{className:"w-10"})]}),r.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr,1fr,auto] gap-2",children:[(0,a.jsx)(c.p,{placeholder:"e.g. input",value:e.key,onChange:e=>((e,t)=>{let s=[...r];s[e]={...s[e],key:t},i(s)})(t,e.target.value)}),(0,a.jsx)(c.p,{type:"number",placeholder:"0",value:e.value,onChange:e=>((e,t)=>{let s=[...r];s[e]={...s[e],value:t},i(s)})(t,parseFloat(e.target.value)||0)}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{i(r.filter((e,s)=>s!==t))},children:(0,a.jsx)(m.A,{className:"h-4 w-4"})})]},t))]}):null,(0,a.jsxs)(d.$,{type:"button",variant:"ghost",onClick:()=>{i([...r,{key:"",value:0}])},className:"w-full","data-sentry-element":"Button","data-sentry-source-file":"UsageDetailsEditor.tsx",children:[(0,a.jsx)(x.A,{className:"mr-2 h-4 w-4","data-sentry-element":"PlusCircle","data-sentry-source-file":"UsageDetailsEditor.tsx"}),"Add Usage Type"]})]})}var h=s(25277),y=s(67716);function g(e){let{model:t}=e,s=!t.projectId;return(0,a.jsxs)(h.Zp,{"data-sentry-element":"Card","data-sentry-component":"MatchedModelCard","data-sentry-source-file":"MatchedModelCard.tsx",children:[(0,a.jsx)(h.aR,{className:"pb-3","data-sentry-element":"CardHeader","data-sentry-source-file":"MatchedModelCard.tsx",children:(0,a.jsx)(h.ZB,{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground","data-sentry-element":"CardTitle","data-sentry-source-file":"MatchedModelCard.tsx",children:"Matched Model"})}),(0,a.jsxs)(h.Wu,{className:"space-y-3","data-sentry-element":"CardContent","data-sentry-source-file":"MatchedModelCard.tsx",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-base font-semibold",children:t.modelName}),s&&(0,a.jsx)(y.E,{variant:"secondary",className:"text-xs",children:"Langfuse"})]}),(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:"Pattern:"}),(0,a.jsx)("code",{className:"block break-all rounded bg-muted/50 p-2 text-xs",children:t.matchPattern})]})]})]})}var j=s(45024),f=s(92065),v=s(16549);function b(e){let{tier:t}=e,{priceUnit:s,priceUnitMultiplier:r}=(0,j.a)(),l=(0,n.useMemo)(()=>Math.max(...Object.values(t.prices).map(e=>(0,v.V)(e,r))),[t.prices,r]);return(0,a.jsxs)(h.Zp,{"data-sentry-element":"Card","data-sentry-component":"MatchedTierCard","data-sentry-source-file":"MatchedTierCard.tsx",children:[(0,a.jsx)(h.aR,{className:"pb-3","data-sentry-element":"CardHeader","data-sentry-source-file":"MatchedTierCard.tsx",children:(0,a.jsx)(h.ZB,{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground","data-sentry-element":"CardTitle","data-sentry-source-file":"MatchedTierCard.tsx",children:"Matched Pricing Tier"})}),(0,a.jsxs)(h.Wu,{className:"space-y-4","data-sentry-element":"CardContent","data-sentry-source-file":"MatchedTierCard.tsx",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-base font-semibold",children:t.name}),t.isDefault&&(0,a.jsx)(y.E,{variant:"secondary",className:"text-xs",children:"Default"}),(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["Pri
1ority: ",t.priority]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-2 text-xs font-medium text-muted-foreground",children:["Prices (per ",s,"):"]}),(0,a.jsx)("div",{className:"space-y-1.5",children:Object.entries(t.prices).map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{className:"flex items-center justify-between rounded bg-muted/50 px-3 py-1.5",children:[(0,a.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:[t,":"]}),(0,a.jsxs)("span",{className:"font-mono text-sm font-semibold",children:["$",new f.A(s).mul(r).toFixed(l)]})]},t)})})]})]})]})}var N=s(36932);function C(e){let{modelName:t}=e;return(0,a.jsxs)(h.Zp,{className:"border-destructive/50 bg-destructive/5","data-sentry-element":"Card","data-sentry-component":"NoMatchDisplay","data-sentry-source-file":"NoMatchDisplay.tsx",children:[(0,a.jsx)(h.aR,{"data-sentry-element":"CardHeader","data-sentry-source-file":"NoMatchDisplay.tsx",children:(0,a.jsxs)(h.ZB,{className:"flex items-center gap-2 text-base text-destructive","data-sentry-element":"CardTitle","data-sentry-source-file":"NoMatchDisplay.tsx",children:[(0,a.jsx)(N.A,{className:"h-5 w-5","data-sentry-element":"AlertCircle","data-sentry-source-file":"NoMatchDisplay.tsx"}),"No Match Found"]})}),(0,a.jsxs)(h.Wu,{className:"space-y-4","data-sentry-element":"CardContent","data-sentry-source-file":"NoMatchDisplay.tsx",children:[(0,a.jsxs)("p",{className:"text-sm",children:['No model configuration matches "',t,'" in this project.']}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-2 text-sm font-medium",children:"Suggestions:"}),(0,a.jsxs)("ul",{className:"list-inside list-disc space-y-1 text-sm text-muted-foreground",children:[(0,a.jsx)("li",{children:"Check your model name spelling"}),(0,a.jsx)("li",{children:"View existing models and their match patterns"}),(0,a.jsx)("li",{children:"Create a new model definition"})]})]})]})]})}var A=s(51883),L=s(84893),w=s(68842);function P(e){let{projectId:t,open:s,onOpenChange:r}=e,[l,m]=(0,n.useState)(""),[x,h]=(0,n.useState)({}),[y,j]=(0,n.useState)(!1),{data:f,isLoading:v,error:N,refetch:P}=u.FH.models.testMatch.useQuery({projectId:t,modelName:l,usageDetails:x},{enabled:!1});return(0,n.useEffect)(()=>{s||(m(""),h({}),j(!1))},[s]),(0,a.jsx)(o.lG,{open:s,onOpenChange:r,"data-sentry-element":"Dialog","data-sentry-component":"TestModelMatchDialog","data-sentry-source-file":"TestModelMatchDialog.tsx",children:(0,a.jsx)(o.Cf,{size:"lg",className:"min-h-[62vh] overflow-y-auto","data-sentry-element":"DialogContent","data-sentry-source-file":"TestModelMatchDialog.tsx",children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),l.trim()&&(j(!0),P())},className:"flex flex-1 flex-col",children:[(0,a.jsxs)(o.c7,{"data-sentry-element":"DialogHeader","data-sentry-source-file":"TestModelMatchDialog.tsx",children:[(0,a.jsx)(o.L3,{"data-sentry-element":"DialogTitle","data-sentry-source-file":"TestModelMatchDialog.tsx",children:"Test Model Match"}),(0,a.jsx)(o.rr,{className:"mt-1","data-sentry-element":"DialogDescription","data-sentry-source-file":"TestModelMatchDialog.tsx",children:"Test which model and pricing tier your ingestion data would match against."})]}),(0,a.jsxs)(o.R4,{className:"grid grid-cols-[1fr,1px,1fr] gap-6","data-sentry-element":"DialogBody","data-sentry-source-file":"TestModelMatchDialog.tsx",children:[(0,a.jsxs)("div",{className:"flex flex-col justify-between space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Model Name *"}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"The model name on your generations."}),(0,a.jsx)(c.p,{placeholder:"e.g. gpt-4-turbo",value:l,onChange:e=>m(e.target.value.trim()),autoFocus:!0,required:!0,"data-sentry-element":"Input","data-sentry-source-file":"TestModelMatchDialog.tsx"})]}),(0,a.jsx)(p,{usageDetails:x,onChange:h,"data-sentry-element":"UsageDetailsEditor","data-sentry-source-file":"TestModelMatchDialog.tsx"})]}),(0,a.jsxs)("div",{className:"flex gap-2 border-t pt-4",children:[(0,a.jsx)(d.$,{type:"button",variant:"outline",onClick:()=>r(!1),className:"flex-1","data-sentry-element":"Button","data-sentry-source-file":"TestModelMatchDialog.tsx",children:"Close"}),(0,a.jsx)(d.$,{type:"submit",disabled:!l.trim()||v,className:"flex-1","data-sentry-element":"Button","data-sentry-source-file":"TestModelMatchDialog.tsx",children:"Test Match"})]})]}),(0,a.jsx)("div",{className:"bg-border"}),(0,a.jsxs)("div",{className:"flex flex-col justify-between",children:[(0,a.jsx)("div",{className:"space-y-4 overflow-y-auto pb-4",children:y&&(0,a.jsxs)(a.Fragment,{children:[v&&(0,a.jsxs)("div",{className:"flex min-h-[300px] items-center justify-center gap-2 rounded-lg border bg-muted/30 p-6 text-muted-foreground",children:[(0,a.jsx)(A.A,{className:"h-5 w-5 animate-spin"}),(0,a.jsx)("span",{children:"Testing match..."})]}),N&&(0,a.jsxs)("div",{className:"rounded-lg border border-destructive/50 bg-destructive/5 p-4 text-sm text-destructive",children:["Error: ",N.message]}),!v&&!N&&f&&(0,a.jsx)(a.Fragment,{children:f.matched?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-green-200 bg-green-50 px-4 py-2.5 dark:border-green-900 dark:bg-green-950",children:[(0,a.jsx)(L.A,{className:"h-4 w-4 text-green-600 dark:text-green-400"}),(0,a.jsx)("span",{className:"text-sm font-medium text-green-900 dark:text-green-100",children:"Match Found"})]}),(0,a.jsx)(g,{projectId:t,model:f.model,pricingTierId:f.matchedTier.id}),(0,a.jsx)(b,{tier:f.matchedTier})]}):(0,a.jsx)(C,{modelName:l})})]})}),y&&!v&&!N&&(null==f?void 0:f.matched)&&(0,a.jsx)("div",{className:"border-t pt-4",children:(0,a.jsx)(d.$,{variant:"outline",asChild:!0,className:"w-full",children:(0,a.jsxs)(i(),{href:"/project/".concat(t,"/settings/models/").concat(f.model.id,"?pricingTier=").concat(f.matchedTier.id),target:"_blank",children:["View Model Details",(0,a.jsx)(w.A,{className:"ml-2 h-4 w-4"})]})})})]})]})]})})})}var S=s(55210);function M(e){let{projectId:t,variant:s}
1=e,[l,i]=(0,n.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.r,{variant:null!=s?s:"secondary",icon:(0,a.jsx)(S.A,{className:"h-4 w-4"}),onClick:()=>i(!0),"data-testid":"test-model-match-button","data-sentry-element":"ActionButton","data-sentry-source-file":"TestModelMatchButton.tsx",children:"Test Model Match"}),(0,a.jsx)(P,{projectId:t,open:l,onOpenChange:i,"data-sentry-element":"TestModelMatchDialog","data-sentry-source-file":"TestModelMatchButton.tsx"})]})}},78225:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("slack",[["rect",{width:"3",height:"8",x:"13",y:"2",rx:"1.5",key:"diqz80"}],["path",{d:"M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5",key:"183iwg"}],["rect",{width:"3",height:"8",x:"8",y:"14",rx:"1.5",key:"hqg7r1"}],["path",{d:"M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5",key:"76g71w"}],["rect",{width:"8",height:"3",x:"14",y:"13",rx:"1.5",key:"1kmz0a"}],["path",{d:"M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5",key:"jc4sz0"}],["rect",{width:"8",height:"3",x:"2",y:"8",rx:"1.5",key:"1omvl4"}],["path",{d:"M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5",key:"16f3cl"}]])},79940:(e,t,s)=>{s.d(t,{Lt:()=>K,Rx:()=>U,Zr:()=>_,EO:()=>z,$v:()=>V,ck:()=>E,wd:()=>F,r7:()=>H,tv:()=>B});var a=s(73154),n=s(96810),r=s(80111),l=s(92905),i=s(2198),o=s(29950),c=s(76657),d="AlertDialog",[u,m]=(0,r.A)(d,[i.Hs]),x=(0,i.Hs)(),p=e=>{let{__scopeAlertDialog:t,...s}=e,n=x(t);return(0,a.jsx)(i.bL,{...n,...s,modal:!0})};p.displayName=d;var h=n.forwardRef((e,t)=>{let{__scopeAlertDialog:s,...n}=e,r=x(s);return(0,a.jsx)(i.l9,{...r,...n,ref:t})});h.displayName="AlertDialogTrigger";var y=e=>{let{__scopeAlertDialog:t,...s}=e,n=x(t);return(0,a.jsx)(i.ZL,{...n,...s})};y.displayName="AlertDialogPortal";var g=n.forwardRef((e,t)=>{let{__scopeAlertDialog:s,...n}=e,r=x(s);return(0,a.jsx)(i.hJ,{...r,...n,ref:t})});g.displayName="AlertDialogOverlay";var j="AlertDialogContent",[f,v]=u(j),b=(0,c.Dc)("AlertDialogContent"),N=n.forwardRef((e,t)=>{let{__scopeAlertDialog:s,children:r,...c}=e,d=x(s),u=n.useRef(null),m=(0,l.s)(t,u),p=n.useRef(null);return(0,a.jsx)(i.G$,{contentName:j,titleName:C,docsSlug:"alert-dialog",children:(0,a.jsx)(f,{scope:s,cancelRef:p,children:(0,a.jsxs)(i.UC,{role:"alertdialog",...d,...c,ref:m,onOpenAutoFocus:(0,o.mK)(c.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,a.jsx)(b,{children:r}),(0,a.jsx)(D,{contentRef:u})]})})})});N.displayName=j;var C="AlertDialogTitle",A=n.forwardRef((e,t)=>{let{__scopeAlertDialog:s,...n}=e,r=x(s);return(0,a.jsx)(i.hE,{...r,...n,ref:t})});A.displayName=C;var L="AlertDialogDescription",w=n.forwardRef((e,t)=>{let{__scopeAlertDialog:s,...n}=e,r=x(s);return(0,a.jsx)(i.VY,{...r,...n,ref:t})});w.displayName=L;var P=n.forwardRef((e,t)=>{let{__scopeAlertDialog:s,...n}=e,r=x(s);return(0,a.jsx)(i.bm,{...r,...n,ref:t})});P.displayName="AlertDialogAction";var S="AlertDialogCancel",M=n.forwardRef((e,t)=>{let{__scopeAlertDialog:s,...n}=e,{cancelRef:r}=v(S,s),o=x(s),c=(0,l.s)(t,r);return(0,a.jsx)(i.bm,{...o,...n,ref:c})});M.displayName=S;var D=({contentRef:e})=>{let t=`\`${j}\` requires a description for the component to be accessible for screen reader users.
2
3You can add a description to the \`${j}\` by passing a \`${L}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
5Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${j}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
7For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return n.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},I=s(81509),T=s(86843);let K=p,B=h,k=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(g,{className:(0,I.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:t})});k.displayName=g.displayName;let z=n.forwardRef((e,t)=>
7{let{className:s,...n}=e;return(0,a.jsxs)(y,{children:[(0,a.jsx)(k,{}),(0,a.jsx)(N,{ref:t,className:(0,I.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...n})]})});z.displayName=N.displayName;let F=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,I.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s,"data-sentry-component":"AlertDialogHeader","data-sentry-source-file":"alert-dialog.tsx"})};F.displayName="AlertDialogHeader";let E=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,I.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s,"data-sentry-component":"AlertDialogFooter","data-sentry-source-file":"alert-dialog.tsx"})};E.displayName="AlertDialogFooter";let H=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(A,{ref:t,className:(0,I.cn)("text-lg font-semibold",s),...n})});H.displayName=A.displayName;let V=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(w,{ref:t,className:(0,I.cn)("text-sm text-muted-foreground",s),...n})});V.displayName=w.displayName;let U=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(P,{ref:t,className:(0,I.cn)((0,T.r)(),s),...n})});U.displayName=P.displayName;let _=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)(M,{ref:t,className:(0,I.cn)((0,T.r)({variant:"outline"}),"mt-2 sm:mt-0",s),...n})});_.displayName=M.displayName},84893:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(22222).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.