1import{t as e}from"./jsx-runtime-DOlcsXOY.js";import{t}from"./utils-DSGxxePe.js";import{t as n}from"./circle-check-DkGH1MFZ.js";import{t as r}from"./loader-circle-C6C0ebAY.js";import{Gn as i}from"./main-BXplHZqW.js";var a=e(),o={saveMedicalRecord:{loading:`Saving medical record...`,success:`Saved medical record`,error:`Failed to save medical record`},scheduleNotification:{loading:`Scheduling notification...`,success:`Scheduled notification`,error:`Failed to schedule notification`},searchPetInfo:{loading:`Searching pet info...`,success:`Found pet info`,error:`Failed to search pet info`},saveDiaryEntry:{loading:`Saving diary entry...`,success:`Saved diary entry`,error:`Failed to save diary entry`},saveFeedingPlan:{loading:`Saving feeding plan...`,success:`Saved feeding plan`,error:`Failed to save feeding plan`},searchKnowledgeBase:{loading:`Searching knowledge base...`,success:`Searched knowledge base`,error:`Knowledge search failed`},webSearch:{loading:`Checking the web...`,success:`Checked the web`,error:`Web check failed`},calcDose:{loading:`Calculating dose...`,success:`Calculated dose`,error:`Dose calculation failed`},emitDoseCard:{loading:`Preparing dose card...`,success:`Prepared dose card`,error:`Dose card failed`},calcDripRate:{loading:`Calculating drip rate...`,success:`Calculated drip rate`,error:`Drip-rate calculation failed`},calcBsa:{loading:`Calculating BSA...`,success:`Calculated BSA`,error:`BSA calculation failed`},calcFluidMaintenance:{loading:`Calculating fluids...`,success:`Calculated fluids`,error:`Fluid calculation failed`}};function s(e){return e.replace(/([A-Z])/g,` $1`).toLowerCase().trim()}function c(e){let t=s(e);return{loading:`Running ${t}...`,success:`Completed ${t}`,error:`Failed to run ${t}`}}function l(e,t){return(o[e]??c(e))[t]}function u(e){return e===`output-error`||e===`error`||e===`failed`?`error`:e===`output-available`||e===`result`||e===`completed`||e===`complete`||e===`success`?`success`:`loading`}function d(e){if(e.type!==`data-tool-status`||!e.data||typeof e.data!=`object`)return null;let t=e.data,n=typeof t.tool==`string`?t.tool:typeof t.toolName==`string`?t.toolName:null;return n?{toolName:n,state:u(typeof t.state==`string`?t.state:e.state),errorText:e.errorText}:null}function f(e){return d(e)||(e.type===`dynamic-tool`?{toolName:e.toolName??`unknown`,state:u(e.state),errorText:e.errorText}:e.type.startsWith(`tool-`)?{toolName:e.type.replace(`tool-`,``),state:u(e.state),errorText:e.errorText}:null)}function p(e,t,n=``){return n.trim().length>0?[]:m(e,t).filter(e=>e.status.state!==`error`)}function m(e,t){return t.flatMap((t,n)=>{let r=f(t);return r?[{key:t.toolCallId??`${e}-${t.type}-${r.toolName}-${r.state}-${n}`,status:r}]:[]})}function h(e){return e.map(e=>{if(e.type!==`tool-invocation`)return e;let t=e.toolInvocation;return t?.toolName?{type:`tool-${t.toolName}`,toolCallId:t.toolCallId||``,state:t.state===`result`?`output-available`:t.state===`error`?`output-error`:t.state,output:t.result,input:t.args,errorText:t.errorText}:e})}function g({status:e,className:o}){let s=l(e.toolName,e.state),c=e.state===`error`?`text-status-bad`:e.state===`success`?`text-text-secondary`:`text-text-tertiary`;return(0,a.jsxs)(`div`,{className:t(`flex items-center gap-2 text-sm`,o),children:[e.state===`loading`?(0,a.jsx)(r,{className:t(`size-4 animate-spin`,c)}):e.state===`error`?(0,a.jsx)(i,{className:t(`size-4`,c)}):(0,a.jsx)(n,{className:t(`size-4`,c)}),(0,a.jsx)(`span`,{className:t(e.state===`error`?`text-status-bad`:`text-text-secondary`),children:s}),e.state===`error`&&e.errorText?(0,a.jsx)(`span`,{className:`text-text-tertiary`,children:e.errorText}):null]})}export{h as a,p as i,f as n,m as r,g as t};
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.