1import{j as e}from"./vendor-ui-CcT6p1TC.js";import{r as o}from"./vendor-react-l2v3jlXS.js";import{u as ye,b as X,a as Z}from"./vendor-query-0S8RWxwY.js";import{e as Ne,s as O,ag as _e,a2 as $,a3 as me,X as _,g as j,Q as xe,ah as Be,ai as Re,au as Qe,aj as He,a7 as he,m as S,av as we,t as p,aw as Ue,ax as We,ay as Xe}from"./index-BDHAr9_M.js";import{C as P,a as q,c as E,b as B,d as pe}from"./card-Cd1QhWAU.js";import{S as R,a as Q,b as H,c as U,d as y}from"./select-qKb53okq.js";import{T as Ze,a as Ye,b as ge,c as D,d as es,e as V}from"./table-DyGKVTmw.js";import{C as ss}from"./checkbox-DDwn8TuR.js";import{T as ts}from"./textarea-CD9yvLlq.js";import{P as as,U as ns}from"./progress-CNbN5Aat.js";import{C as W}from"./circle-check-big-XwdodvFA.js";import{T as rs}from"./triangle-alert-DYGYfdCg.js";import{L as ls}from"./languages-DL3p2miy.js";import{D as is}from"./download-Cy0DSbES.js";import{C as cs}from"./copy-CJp2Y0bq.js";import"./vendor-recharts-D1mehUCX.js";import"./vendor-helmet-BI-z9MaL.js";import"./vendor-supabase-D4IPYmL8.js";import"./vendor-i18n-CIM3QP6o.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const je=Ne("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const os=Ne("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]),ds=()=>ye({queryKey:["translations","all"],queryFn:async()=>{const{data:r,error:m}=await O.from("translations").select("*").order("language").order("key");if(m)throw m;return r},staleTime:60*1e3}),us=()=>{const r=X();return Z({mutationFn:async m=>{const{error:l}=await O.from("translations").update({status:"approved",updated_at:new Date().toISOString()}).in("id",m);if(l)throw l},onSuccess:()=>{r.invalidateQueries({queryKey:["translations"]})}})},ms=()=>{const r=X();return Z({mutationFn:async m=>{const{error:l}=await O.from("translations").update({status:"exported",updated_at:new Date().toISOString()}).in("id",m);if(l)throw l},onSuccess:()=>{r.invalidateQueries({queryKey:["translations"]})}})},xs=()=>{const r=X();return Z({mutationFn:async m=>{const l=m.map(i=>({key:i.key,language:i.language,value:i.value,section:i.section||i.key.split(".")[0],status:"exported",source:"imported",is_active:!0,updated_at:new Date().toISOString()})),h=100;let d=0;for(let i=0;i<l.length;i+=h){const u=l.slice(i,i+h),{error:v,data:k}=await O.from("translations").upsert(u,{onConflict:"key,language",ignoreDuplicates:!1}).select();if(v)throw v;d+=(k==null?void 0:k.length)||u.length}return{count:d}},onSuccess:()=>{r.invalidateQueries({queryKey:["translations"]})}})},z={hi:"Hindi (हिà¤à¤¦à¥)",ar:"Arabic (Ø§ÙØ¹Ø±Ø¨ÙØ©)",es:"Spanish (Español)"},fe={en:we,hi:Ue,ar:We,es:Xe},G=(r,m="")=>Object.keys(r).reduce((l,h)=>{const d=m?`${m}.${h}`:h;return typeof r[h]=="object"&&r[h]!==null&&!Array.isArray(r[h])?Object.assign(l,G(r[h],d)):l[d]=r[h],l},{}),ve=r=>{const m={};return Object.entries(r).forEach(([l,h])=>{const d=l.split(".");let i=m;for(let u=0;u<d.length-1;u++)i[d[u]]||(i[d[u]]={}),i=i[d[u]];i[d[d.length-1]]=h}),m};function Ds(){const[r,m]=o.useState("hi"),[l,h]=o.useState("all"),[d,i]=o.useState("all"),[u,v]=o.useState(new Set),[k,K]=o.useState(""),[Y,J]=o.useState(!1),[be,ee]=o.useState(!1),[n,w]=o.useState(null),T=o.useRef(null),{data:N,isLoading:Se,refetch:se}=ds(),te=us();ms();const ke=xs(),[ae,ne]=o.useState(!1),{data:A}=ye({queryKey:["api-usage-translate"],queryFn:async()=>{const{data:s,error:t}=await O.from("api_usage_logs").select("*").eq("function_name","translate").order("created_at",{ascending:!1}).limit(100);if(t)throw t;return s}}),I=o.useMemo(()=>G(we),[]),re=o.useMemo(()=>G(fe[r]),[r]),le=o.useMemo(()=>N?new Map(N.filter(s=>s.language===r).map(s=>[s.key,s])):new Map,[N,r]),Ce=o.useMemo(()=>{const s=new Set;
11return Object.keys(I).forEach(t=>{const a=t.split(".")[0];s.add(a)}),Array.from(s).sort()},[I]),F=o.useMemo(()=>Object.entries(I).map(([s,t])=>{const a=le.get(s),c=re[s];return{key:s,englishValue:t,dbValue:(a==null?void 0:a.value)||null,staticValue:c||null,status:(a==null?void 0:a.status)||(c?"exported":"missing"),dbId:(a==null?void 0:a.id)||null,source:(a==null?void 0:a.source)||(c?"static":null),inSync:(a==null?void 0:a.value)===c}}),[I,le,re]),M=o.useMemo(()=>F.filter(s=>!(l!=="all"&&!s.key.startsWith(l+".")||d!=="all"&&s.status!==d)),[F,l,d]),f=o.useMemo(()=>{const s={missing:0,generated:0,approved:0,exported:0,inSync:0};return F.forEach(t=>{t.status==="missing"?s.missing++:t.status==="generated"?s.generated++:t.status==="approved"?s.approved++:t.status==="exported"&&s.exported++,t.inSync&&s.inSync++}),s},[F]),ie=o.useMemo(()=>A?A.reduce((s,t)=>({totalTokens:s.totalTokens+(t.total_tokens||0),estimatedCost:s.estimatedCost+(Number(t.cost_estimate)||0)}),{totalTokens:0,estimatedCost:0}):{totalTokens:0,estimatedCost:0},[A]),Te=s=>{v(t=>{const a=new Set(t);return a.has(s)?a.delete(s):a.add(s),a})},Ae=()=>{const s=M.filter(t=>t.status==="missing"||!t.dbValue).map(t=>t.key);v(new Set(s))},Me=()=>{v(new Set(M.map(s=>s.key)))},Oe=()=>{v(new Set)},Ie=()=>{T.current&&(T.current.abort(),T.current=null),J(!1),w(s=>s?{...s,status:"cancelled",message:"Cancelled by user"}:null),p({title:"Translation Cancelled",description:"Any completed translations were saved."})},Fe=s=>{if(!s||s.chunk===0)return"Calculating...";const a=(Date.now()-s.startTime)/s.chunk,c=s.chunks-s.chunk,g=a*c;return g<1e3?"Almost done...":g<6e4?`~${Math.ceil(g/1e3)} seconds remaining`:`~${Math.ceil(g/6e4)} minutes remaining`},ce=async()=>{var a;if(u.size===0){p({title:"No keys selected",description:"Please select at least one key to translate.",variant:"destructive"});return}T.current=new AbortController,J(!0),K("");const s=u.size,t=Math.ceil(s/20);w({current:0,total:s,chunk:0,chunks:t,status:"translating",message:"Starting translation...",failedItems:[],startTime:Date.now()});try{const c=Array.from(u).map(x=>({key:x,value:I[x]}));w(x=>x?{...x,message:`Sending ${s} keys to translate...`}:null);const g=await O.functions.invoke("translate",{body:{texts:c,targetLanguage:r,context:`Corporate website translation for DKEGL (packaging company). Section: ${l}`,saveToDatabase:!0}});if((a=T.current)!=null&&a.signal.aborted)return;if(g.error)throw g.error;const{translations:b,saved_count:L,chunks_processed:de,chunks_failed:Ke,failed_items:C,partial:Je}=g.data,ue={};b.forEach(x=>{ue[x.key]=x.value});const Le=ve(ue);K(JSON.stringify(Le,null,2)),Je?(w(x=>x?{...x,current:b.length,chunk:de,chunks:de+Ke,status:"partial",message:`${b.length} translated, ${(C==null?void 0:C.length)||0} failed`,failedItems:C||[]}:null),p({title:"Partial Success",description:`${b.length} translations saved. ${(C==null?void 0:C.length)||0} failed.`,variant:"default"})):(w(x=>x?{...x,current:x.total,chunk:x.chunks,status:"success",message:"Complete!",failedItems:[]}:null),p({title:"Translation Complete",description:`Generated ${b.length} translations. ${L} saved to database.`}),v(new Set)),se()}catch(c){console.error("Translation error:",c),w(g=>g?{...g,status:"error",message:c.message||"Translation failed"}:null),p({title:"Translation Failed",description:c.message||"An error occurred during translation.",variant:"destructive"})}finally{J(!1),T.current=null}},De=async()=>{if(!(n!=null&&n.failedItems.length))return;const s=n.failedItems.map(t=>t.key);v(new Set(s)),w(null),setTimeout(()=>{ce()},100)},oe=()=>{w(null)},Ve=async()=>{const s=M.filter(t=>u.has(t.key)&&t.dbId).map(t=>t.dbId);if(s.length===0){p({title:"No database entries to approve",description:"Selected keys must have database entries.",variant:"destructive"});return}try{await te.mutateAsync(s),p({title:"Approved",description:`${s.length} translations marked as approved.`}),v(new Set)}catch{p({title:"Approval failed",variant:"destructive"})}},ze=()=>{const s=M.filter(a=>a.dbValue&&(a.status==="approved"||a.status==="generated")).reduce((a,c)=>(a[c.key]=c.dbValue,a),{});if(Object.keys(s).length===0){p({title:"Nothing to export",description:"No approved or generated translations foun
11d.",variant:"destructive"});return}const t=ve(s);K(JSON.stringify(t,null,2)),p({title:"Export ready",description:`${Object.keys(s).length} translations ready to copy to locale file.`})},$e=async()=>{ne(!0);try{const s=[],t=["hi","ar","es"];for(const c of t){const g=G(fe[c]);Object.entries(g).forEach(([b,L])=>{s.push({key:b,language:c,value:L,section:b.split(".")[0]})})}const a=await ke.mutateAsync(s);p({title:"Seeding complete",description:`Imported ${a.count} translations to database.`}),se()}catch(s){console.error("Seeding error:",s),p({title:"Seeding failed",description:s.message||"Failed to seed translations.",variant:"destructive"})}finally{ne(!1)}},Pe=async()=>{try{await navigator.clipboard.writeText(k),ee(!0),setTimeout(()=>ee(!1),2e3),p({title:"Copied to clipboard",description:`Paste into src/locales/${r}/common.json`})}catch{p({title:"Copy failed",description:"Please select and copy manually.",variant:"destructive"})}},qe=(s,t)=>s==="missing"?e.jsxs(S,{variant:"destructive",className:"gap-1",children:[e.jsx(me,{className:"h-3 w-3"}),"Missing"]}):s==="generated"?e.jsxs(S,{variant:"secondary",className:"gap-1 bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",children:[e.jsx(je,{className:"h-3 w-3"}),"Generated"]}):s==="approved"?e.jsxs(S,{variant:"secondary",className:"gap-1 bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:[e.jsx(W,{className:"h-3 w-3"}),"Approved"]}):s==="exported"?e.jsxs(S,{variant:"default",className:"gap-1",children:[e.jsx(os,{className:"h-3 w-3"}),"Exported",t&&e.jsx(he,{className:"h-3 w-3"})]}):e.jsx(S,{variant:"outline",children:s}),Ee=(N==null?void 0:N.length)||0,Ge=n?n.current/n.total*100:0;return e.jsx(_e,{children:e.jsxs("div",{className:"space-y-6",children:[n&&n.status!=="idle"&&e.jsxs("div",{className:"fixed bottom-4 right-4 w-96 p-4 bg-card border rounded-lg shadow-lg z-50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[n.status==="translating"&&e.jsx($,{className:"h-4 w-4 animate-spin text-primary"}),n.status==="success"&&e.jsx(W,{className:"h-4 w-4 text-green-500"}),n.status==="partial"&&e.jsx(rs,{className:"h-4 w-4 text-yellow-500"}),n.status==="error"&&e.jsx(me,{className:"h-4 w-4 text-destructive"}),n.status==="cancelled"&&e.jsx(_,{className:"h-4 w-4 text-muted-foreground"}),e.jsxs("span",{className:"text-sm font-medium",children:[n.status==="translating"&&`Translating to ${z[r]}`,n.status==="success"&&"Translation Complete",n.status==="partial"&&"Partial Success",n.status==="error"&&"Translation Failed",n.status==="cancelled"&&"Cancelled"]})]}),n.status==="translating"?e.jsx(j,{variant:"ghost",size:"sm",onClick:Ie,children:e.jsx(_,{className:"h-4 w-4"})}):e.jsx(j,{variant:"ghost",size:"sm",onClick:oe,children:e.jsx(_,{className:"h-4 w-4"})})]}),e.jsx(as,{value:Ge,className:"mb-2 h-2"}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{children:[n.status==="translating"&&e.jsxs(e.Fragment,{children:["Chunk ",n.chunk,"/",n.chunks," ⢠",n.current,"/",n.total," keys"]}),n.status!=="translating"&&n.message]}),n.status==="translating"&&e.jsx("span",{children:Fe(n)})]}),n.status==="partial"&&n.failedItems.length>0&&e.jsxs("div",{className:"mt-3 flex gap-2",children:[e.jsxs(j,{size:"sm",variant:"outline",onClick:De,className:"flex-1",children:[e.jsx(xe,{className:"h-3 w-3 mr-1"}),"Retry ",n.failedItems.length," Failed"]}),e.jsx(j,{size:"sm",variant:"ghost",onClick:oe,children:"Dismiss"})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-2",children:[e.jsx(ls,{className:"h-8 w-8"}),"Translations Manager"]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Generate AI translations â Save to database â Export to JSON files"})]}),e.jsxs(Be,{children:[e.jsx(Re,{asChild:!0,children:e.jsx(j,{variant:"ghost",size:"icon",className:"h-8 w-8",children:e.jsx(Qe,{className:"h-4 w-4 text-muted-foreground"})})}),e.jsxs(He,{side:"bottom",className:"max-w-xs",children:[e.jsx("p",{className:"font-semibold mb-1",children:"Status Guide:"}),e.jsxs("ul",{className:"text-xs space-y-1",children:[e.jsxs("li",{children:[e.jsx("span",{className:"text-destructive",children:"Missing"})," = Not in JSON or DB"]}),e.jsxs("li",{children:[e.jsx("span",{className:"text-yellow-600",children:"Generated"})," = AI created, in DB, not exported"]}),e.jsxs("li",{children:[e.jsx("span",{className:"text-blue-600",children:"Approved"})," = Reviewed, ready to export"]}),e.jsxs("li",{children:[e.jsx("span",{className:"text-primary",children:"Exported"})," = Already in JSON file"]})]})]})]})]}),e.jsxs("div",{className:"flex gap-2",children:[Ee===0&&e.jsx(j,{variant:"secondary",onClick:$e,disabled:ae,children:ae?e.jsxs(e.Fragment,{children:[e.jsx($,{className:"h-4 w-4 mr-2 animate-spin"}),"Seeding..."]}):e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"h-4 w-4 mr-2"}),"Seed from JSON"]})}),e.jsxs(j,{variant:"outline",onClick:ze,children:[e.jsx(is,{className:"h-4 w-4 mr-2"}),"Export Approved"]}),e.jsx(j,{onClick:ce,disabled:Y||u.size===0,children:Y?e.jsxs(e.Fragment,{children:[e.jsx($,{className:"h-4 w-4 mr-2 animate-spin"}),"Translating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(xe,{className:"h-4 w-4 mr-2"}),"Generate (",u.size,")"]})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs(P,{className:"lg:col-span-2",children:[e.jsxs(q,{className:"pb-4",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Target Language"}),e.jsxs(R,{value:r,onValueChange:s=>m(s),children:[e.jsx(Q,{children:e.jsx(H,{})}),e.jsxs(U,{children:[e.jsx(y,{value:"hi",children:z.hi}),e.jsx(y,{value:"ar",children:z.ar}),e.jsx(y,{value:"es",children:z.es})]})]})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Section"}),e.jsxs(R,{value:l,onValueChange:h,children:[e.jsx(Q,{children:e.jsx(H,{})}),e.jsxs(U,{children:[e.jsx(y,{value:"all",children:"All Sections"}),Ce.map(s=>e.jsx(y,{value:s,children:s},s))]})]})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Status"}),e.jsxs(R,{value:d,onValueChange:i,children:[e.jsx(Q,{children:e.jsx(H,{})}),e.jsxs(U,{children:[e.jsx(y,{value:"all",children:"All Status"}),e.jsxs(y,{value:"missing",children:["Missing (",f.missing,")"]}),e.jsxs(y,{value:"generated",children:["Generated (",f.generated,")"]}),e.jsxs(y,{value:"approved",children:["Approved (",f.approved,")"]}),e.jsxs(y,{value:"exported",children:["Exported (",f.exported,")"]})]})]})]})]}),e.jsxs("div",{className:"flex gap-2 mt-4",children:[e.jsx(j,{variant:"outline",size:"sm",onClick:Ae,children:"Select Missing"}),e.jsx(j,{variant:"outline",size:"sm",onClick:Me,children:"Select All Visible"}),e.jsx(j,{variant:"outline",size:"sm",onClick:Oe,children:"Clear"}),u.size>0&&e.jsxs(j,{variant:"outline",size:"sm",onClick:Ve,disabled:te.isPending,children:[e.jsx(W,{className:"h-4 w-4 mr-1"}),"Approve Selected"]})]})]}),e.jsxs(E,{children:[e.jsx("div",{className:"border rounded-lg max-h-[400px] overflow-auto",children:Se?e.jsx("div",{className:"flex items-center justify-center p-8",children:e.jsx($,{className:"h-6 w-6 animate-spin"})}):e.jsxs(Ze,{children:[e.jsx(Ye,{children:e.jsxs(ge,{children:[e.jsx(D,{className:"w-10"}),e.jsx(D,{className:"w-1/4",children:"Key"}),e.jsx(D,{className:"w-1/4",children:"English"}),e.jsx(D,{className:"w-1/4",children:z[r]}),e.jsx(D,{className:"w-1/6",children:"Status"})]})}),e.jsx(es,{children:M.map(s=>e.jsxs(ge,{className:s.status==="missing"?"bg-destructive/5":"",children:[e.jsx(V,{children:e.jsx(ss,{checked:u.has(s.key),onCheckedChange:()=>Te(s.key)})}),e.jsx(V,{className:"font-mono text-xs",children:s.key}),e.jsx(V,{className:"text-sm truncate max-w-[150px]",title:s.englishValue,children:s.englishValue}),e.jsxs(V,{className:"text-sm truncate max-w-[150px]",title:s.dbValue||s.staticValue||"",children:[s.dbValue||s.staticValue||"-",s.dbValue&&s.source==="openai"&&e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:"(AI)"})]}),e.jsx(V,{children:qe(s.status,s.inSync)})]},s.key))})]})}),e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Showing ",M.length," of ",F.length," keys â¢",f.missing," missing ⢠",f.generated," generated ⢠",f.approved," approved ⢠",f.exported," exported"]})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(P,{children:[e.jsxs(q,{className:"pb-2",children:[e.jsx(B,{className:"text-lg",children:"JSON Output"}),e.jsxs(pe,{children:["Copy to src/locales/",r,"/common.json"]})]}),e.jsxs(E,{children:[e.jsx(ts,{value:k,readOnly:!0,placeholder:"Generated translations will appear here...",className:"font-mono text-xs h-[200px]"}),e.jsx(j,{variant:"outline",className:"w-full mt-2",onClick:Pe,disabled:!k,children:be?e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"h-4 w-4 mr-2"}),"Copied!"]}):e.jsxs(e.Fragment,{children:[e.jsx(cs,{className:"h-4 w-4 mr-2"}),"Copy to Clipboard"]})})]})]}),e.jsxs(P,{children:[e.jsx(q,{className:"pb-2",children:e.jsxs(B,{className:"text-lg flex items-center gap-2",children:[e.jsx(je,{className:"h-4 w-4"}),"Database Status"]})}),e.jsxs(E,{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Total in DB:"}),e.jsx("span",{className:"font-medium",children:(N==null?void 0:N.filter(s=>s.language===r).length)||0})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Generated:"}),e.jsx(S,{variant:"secondary",children:f.generated})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Approved:"}),e.jsx(S,{variant:"secondary",children:f.approved})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"In Sync with JSON:"}),e.jsx(S,{variant:"default",children:f.inSync})]})]})]}),e.jsxs(P,{children:[e.jsxs(q,{className:"pb-2",children:[e.jsx(B,{className:"text-lg",children:"API Usage"}),e.jsx(pe,{children:"OpenAI translation costs"})]}),e.jsxs(E,{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Total Tokens:"}),e.jsx("span",{className:"font-medium",children:ie.totalTokens.toLocaleStr
11ing()})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Estimated Cost:"}),e.jsxs("span",{className:"font-medium",children:["$",ie.estimatedCost.toFixed(4)]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"API Calls:"}),e.jsx("span",{className:"font-medium",children:(A==null?void 0:A.length)||0})]})]})]})]})]})]})})}export{Ds as TranslationsManager,Ds as default};
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.