PageSourceSearch

https://laiglesiafiel.com/assets/MinuteEditorPage-90f4f03b.js

js laiglesiafiel.com collected 2026-10-02 01:36:32 UTC 59,688 bytes, 94 lines download raw bytes

1import{j as e,bB as Rs,bp as Ls,ag as fe,r as ye,Q as we,A as Ms,q as ve,ay as je,ah as Ps,av as ls,bK as $s,bP as Fs,au as gs,cm as Os,z as J,T as ms,bC as _s,s as hs,ey as qs,dt as Hs,L as R,d3 as ps,cj as ne,v as us,ev as Ne,E as Bs,bk as bs,X as Gs,ez as Ws,eA as Vs,bf as Us,d2 as Qs,dm as Ks,dL as Js,du as Xs,dE as Ys,eB as Zs}from"./vendor-ui-fc56ca80.js";import{r as n,i as et,e as st}from"./vendor-react-f9ccc48d.js";import{R as tt}from"./quill.snow-2c352c31.js";import os from"./purify.es-4f2d013f.js";import{F as at,u as rt}from"./useMinutes-96d3858a.js";import{h as it,u as Ce,bJ as Ae,B as c,K as H,M as B,N as G,O as W,z as ie,T as nt,I as le,c as ke,az as V,Q as be}from"./index-90016d22.js";import{N as lt,a4 as ds}from"./vendor-firebase-a557f106.js";import{A as ot,a as dt,b as ct}from"./avatar-4e73900d.js";import{T as xt,a as gt,b as mt,c as ht}from"./tooltip-7a6a4bd3.js";import{u as oe}from"./vendor-utils-323b9898.js";import"./vendor-charts-9af8b7c0.js";import"./auditService-c0bc5cfa.js";function pt(){const{churchData:a}=it(),{toast:y}=Ce(),[l,p]=n.useState(!1),t=new at,o=n.useCallback(async x=>{if(!(a!=null&&a.id))return[];p(!0);try{return await t.findByMinute(a.id,x)}catch(b){return console.error("Error fetching action items:",b),y({title:"Error",description:"No se pudieron cargar las tareas.",variant:"destructive"}),[]}finally{p(!1)}},[a==null?void 0:a.id]),u=n.useCallback(async x=>{p(!0);try{return await t.delete(x),y({title:"Éxito",description:"Tarea eliminada."}),!0}catch(b){return console.error("Error deleting action item:",b),y({title:"Error",description:"No se pudo eliminar la tarea.",variant:"destructive"}),!1}finally{p(!1)}},[]),v=n.useCallback(async(x,b)=>{p(!0);try{return await t.update(x,b),!0}catch(A){return console.error("Error updating action item:",A),y({title:"Error",description:"No se pudo actualizar la tarea.",variant:"destructive"}),!1}finally{p(!1)}},[]);return{findByMinute:o,deleteActionItem:u,updateActionItem:v,loading:l}}function ut({minuteId:a,refreshTrigger:y}){const{t:l}=oe("salomon"),{findByMinute:p,deleteActionItem:t,loading:o}=pt(),{members:u}=Ae(),[v,x]=n.useState([]),[b,A]=n.useState(!0),E=async()=>{const f=await p(a);x(f)};n.useEffect(()=>{a&&E()},[a,y]);const j=async f=>{confirm(l("analysis.tasks.deleteConfirm"))&&await t(f)&&x(k=>k.filter(g=>g.id!==f))},T=f=>{switch(f){case"HIGH":return e.jsx(Ms,{className:"h-4 w-4 text-red-500"});case"MEDIUM":return e.jsx(ye,{className:"h-4 w-4 text-amber-500"});case"LOW":return e.jsx(we,{className:"h-4 w-4 text-blue-500"});default:return e.jsx(ye,{className:"h-4 w-4 text-gray-400"})}};return o&&v.length===0?e.jsx("div",{className:"p-4 text-center text-sm text-gray-500 dark:text-slate-400",children:l("analysis.tasks.loading")}):v.length===0?e.jsx("div",{className:"p-8 text-center border-t border-gray-100 dark:border-slate-700/50",children:e.jsx("p",{className:"text-sm text-gray-400 dark:text-slate-500 italic",children:l("analysis.tasks.empty")})}):e.jsxs("div",{className:"flex flex-col p-4 border-t border-gray-100 dark:border-slate-700/50 bg-gray-50/50 dark:bg-slate-800/50",children:[e.jsxs("button",{onClick:()=>A(!b),className:"flex items-center justify-between w-full mb-2 group",children:[e.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 dark:text-slate-400 group-hover:text-gray-600 dark:group-hover:text-slate-300 transition-colors",children:[l("analysis.tasks.title")," (",v.length,")"]}),b?e.jsx(Rs,{className:"h-3.5 w-3.5 text-gray-400 dark:text-slate-500 group-hover:text-gray-600 dark:group-hover:text-slate-300 transition-colors"}):e.jsx(Ls,{className:"h-3.5 w-3.5 text-gray-400 dark:text-slate-500 group-hover:text-gray-600 dark:group-hover:text-slate-300 transition-colors"})]}),b&&e.jsx("div",{className:"space-y-2 max-h-[300px] overflow-y-auto pr-1 custom-scrollbar",children:v.map(f=>{const h=u.find(z=>z.id===f.assigneeId),k=h?`${h.firstName} ${h.lastName}`:l("analysis.tasks.unknown"),g=h?`${h.firstName[0]}${h.lastName[0]}`:"??";return e.jsxs("div",{className:"bg-white dark:bg-slate-800/80 p-2.5 rounded-lg border dark:border-slate-700/50 shadow-sm flex flex-col gap-1.5 group hover:shadow-md dark:hover:shadow-[0_4px_12px_rgba(0,0,0,0.3)] transition-all",children:[e.jsxs("div",{className:"flex justify-between items-start gap-2",children:[e.jsx("p",{className:"text-xs text-gray-800 dark:text-slate-200 font-medium leading-normal line-clamp-2",children:f.description}),e.jsx(c,{variant:"ghost",size:"icon",onClick:()=>j(f.id),className:"h-5 w-5 text-gray-400 dark:text-slate-500 hover:text-red-500 dark:hover:text-red-400 -mt-1 -mr-1 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(fe,{className:"h-3 w-3"})})]}),e.jsxs("div",{className:"flex items-center justify-between mt-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs(ot,{className:"h-4 w-4",children:[e.jsx(dt,{src:h==null?void 0:h.photoURL}),e.jsx(ct,{className:"text-[8px] bg-indigo-50 dark:bg-indigo-900/30 text-indigo-600 dark:text-indigo-400",children:g})]}),e.jsx("span",{className:"text-[10px] text-gray-500 dark:text-slate-400 truncate max-w-[120px]",children:k})]}),e.jsx(xt,{children:e.jsxs(gt,{children:[e.jsx(mt,{children:T(f.priority)}),e.jsx(ht,{children:e.jsxs("p",{className:"text-xs capitalize",children:[l("analysis.tasks.priority"),": ",f.priority.toLowerCase()]})})]})})]})]},f.id)})}),e.jsx("style",{children:`
2                .custom-scrollbar::-webkit-scrollbar {
3                    width: 4px;
4                }
5                .custom-scrollbar::-webkit-scrollbar-track {
6                    background: transparent;
7                }
8                .custom-scrollbar::-webkit-scrollbar-thumb {
9                    background: #e5e7eb;
10                    border-radius: 4px;
11                }
12                .custom-scrollbar::-webkit-scrollbar-thumb:hover {
13                    background: #d1d5db;
14                }
15            `})]})}function bt({isOpen:a,onClose:y,onCreate:l,minuteId:p}){const{members:t}=Ae(),[o,u]=n.useState(""),[v,x]=n.useState(""),[b,A]=n.useState(""),[E,j]=n.useState(!1),T=n.useRef(null),[f,h]=n.useState("MEDIUM"),[k,g]=n.useState(""),[z,w]=n.useState(!1);n.useEffect(()=>{const m=L=>{T.current&&!T.current.contains(L.target)&&j(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const I=t.filter(m=>`${m.firstName} ${m.lastName}`.toLowerCase().includes(b.toLowerCase())),D=t.find(m=>m.id===v),C=async m=>{if(m.preventDefault(),!(!o||!v)){w(!0);try{await l({minuteId:p,description:o,assigneeId:v,priority:f,dueDate:k?new Date(k):void 0}),y(),u(""),x(""),A(""),h("MEDIUM"),g("")}catch(L){console.error(L)}finally{w(!1)}}};return e.jsx(H,{open:a,onOpenChange:y,children:e.jsxs(B,{className:"sm:max-w-[425px]",children:[e.jsx(G,{children:e.jsx(W,{children:"Asignar Tarea"})}),e.jsxs("form",{onSubmit:C,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(ie,{htmlFor:"description",children:"Descripción"}),e.jsx(nt,{id:"description",placeholder:"¿Qué se debe hacer?",value:o,onChange:m=>u(m.target.value),required:!0})]}),e.jsxs("div",{className:"space-y-2 flex flex-col relative",ref:T,children:[e.jsx(ie,{htmlFor:"assignee-input",children:"Responsable"}),e.jsxs("div",{className:"relative",children:[e.jsx(ve,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(le,{id:"assignee-input",placeholder:"Buscar responsable...",className:"pl-8",value:D&&!E?`${D.firstName} ${D.lastName}`:b,onChange:m=>{A(m.target.value),j(!0),v&&x("")},onFocus:()=>{j(!0),D&&A(`${D.firstName} ${D.lastName}`)},autoComplete:"off"})]}),E&&e.jsx("div",{className:"absolute top-[70px] z-50 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in fade-in-0 zoom-in-95",children:e.jsx("ul",{className:"max-h-[200px] overflow-auto p-1",children:I.length===0?e.jsx("li",{className:"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm text-muted-foreground justify-center",children:"No se encontraron miembros."}):I.map(m=>e.jsxs("li",{className:ke("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-accent hover:text-accent-foreground cursor-pointer transition-colors",v===m.id&&"bg-accent text-accent-foreground"),onClick:()=>{x(m.id),A(`${m.firstName} ${m.lastName}`),j(!1)},children:[e.jsx(je,{className:ke("mr-2 h-4 w-4",v===m.id?"opacity-100":"opacity-0")}),m.firstName," ",m.lastName]},m.id))})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(ie,{htmlFor:"priority",children:"Prioridad"}),e.jsx("div",{className:"relative",children:e.jsxs("select",{className:"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
15ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",value:f,onChange:m=>h(m.target.value),children:[e.jsx("option",{value:"LOW",children:"Baja"}),e.jsx("option",{value:"MEDIUM",children:"Media"}),e.jsx("option",{value:"HIGH",children:"Alta"})]})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ie,{htmlFor:"dueDate",children:"Fecha Límite"}),e.jsx(le,{id:"dueDate",type:"date",value:k,onChange:m=>g(m.target.value)})]})]}),e.jsxs(V,{children:[e.jsx(c,{type:"button",variant:"outline",onClick:y,disabled:z,children:"Cancelar"}),e.jsx(c,{type:"submit",disabled:z||!v,children:z?"Creando...":"Asignar Tarea"})]})]})]})})}function ft(){const[a,y]=n.useState(!1),[l,p]=n.useState(!1),[t,o]=n.useState(null),u=lt(),v=ds(u,"analyzeMinuteContent"),x=ds(u,"polishMinuteText"),b=n.useRef(null),A=n.useCallback((j,T,f)=>{b.current&&clearTimeout(b.current),!(!j||j.replace(/<[^>]*>/g,"").trim().length<50)&&(b.current=setTimeout(async()=>{var h,k;y(!0);try{const g=j.replace(/<[^>]+>/g," "),w=(await v({content:g,type:T,language:f})).data,I=((h=w.alerts)==null?void 0:h.slice(0,3))||[],D=3-I.length,C=D>0?((k=w.suggestions)==null?void 0:k.slice(0,D))||[]:[];o({...w,alerts:I,suggestions:C})}catch(g){console.error("Salomon Analysis Failed:",g)}finally{y(!1)}},2500))},[]),E=n.useCallback(async(j,T,f,h)=>{if(!j||j.replace(/<[^>]+>/g,"").trim().length<5)return null;p(!0);try{return(await x({content:j,topicTitle:T,type:f,language:h})).data}catch(k){return console.error("Salomon Polish Failed:",k),null}finally{p(!1)}},[]);return{analyzeContent:A,polishText:E,isAnalyzing:a,isPolishing:l,result:t}}const cs=({type:a,severity:y="info",title:l,quote:p,message:t})=>{const{t:o}=oe("salomon"),{toast:u}=Ce(),[v,x]=n.useState(!1),[b,A]=n.useState(!1),[E,j]=n.useState(14),T=p?`"${p}"
16
17---
18${t}`:t,f=async()=>{try{await navigator.clipboard.writeText(T),A(!0),u({title:o("analysis.card.copied"),description:o("analysis.card.copiedDesc")}),setTimeout(()=>A(!1),2e3)}catch(w){console.error("Failed to copy text",w)}},h=t.length>150,k=h?`${t.substring(0,150)}...`:t,g=()=>a==="suggestion"?e.jsx(J,{className:"h-4 w-4 text-indigo-500 dark:text-indigo-400 mt-0.5"}):y==="warning"||y==="HIGH"?e.jsx(ms,{className:"h-4 w-4 mt-0.5 text-amber-600 dark:text-amber-500"}):e.jsx(_s,{className:"h-4 w-4 mt-0.5 text-blue-500 dark:text-blue-400"}),z=()=>a==="suggestion"?"border-indigo-100 dark:border-indigo-500/30":y==="warning"||y==="HIGH"?"border-amber-200 dark:border-amber-500/30 bg-amber-50/30 dark:bg-amber-500/10":"border-blue-100 dark:border-blue-500/30 bg-blue-50/10 dark:bg-blue-500/10";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:ke("bg-white dark:bg-slate-800 p-3 rounded-lg border shadow-[0_2px_8px_-2px_rgba(0,0,0,0.05)] hover:shadow-md transition-shadow",z()),children:e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("div",{className:"shrink-0",children:g()}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex justify-between items-start mb-1",children:[l&&e.jsx("h4",{className:"text-xs font-semibold text-gray-800 dark:text-slate-200 break-words pr-2",children:l}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[(h||p)&&e.jsx("button",{onClick:()=>x(!0),className:"p-1 text-gray-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors rounded hover:bg-indigo-50 dark:hover:bg-indigo-500/20",title:o("analysis.card.viewFull"),children:e.jsx(Ps,{className:"h-3 w-3"})}),e.jsx("button",{onClick:f,className:"p-1 text-gray-400 hover:text-gray-700 dark:hover:text-slate-300 transition-colors rounded hover:bg-gray-100 dark:hover:bg-slate-700",title:o("analysis.card.copyText"),children:b?e.jsx(je,{className:"h-3 w-3 text-green-500"}):e.jsx(ls,{className:"h-3 w-3"})})]})]}),p&&e.jsxs("p",{className:"text-[10px] italic text-gray-400 dark:text-slate-500 leading-relaxed mb-1.5 border-l-2 border-gray-200 dark:border-slate-700 pl-2 line-clamp-2",children:['"',p,'"']}),e.jsx("p",{className:"text-[11px] text-gray-600 dark:text-slate-300 leading-relaxed break-words whitespace-pre-wrap",children:k}),(h||p)&&e.jsx("button",{onClick:()=>x(!0),className:"mt-1 text-[10px] font-medium text-indigo-500 hover:text-indigo-700 dark:text-indigo-400 dark:hover:text-indigo-300 hover:underline",children:o("analysis.card.seeMore")})]})]})}),e.jsx(H,{open:v,onOpenChange:x,children:e.jsxs(B,{className:"sm:max-w-lg max-h-[85vh] overflow-y-auto w-[95vw]",children:[e.jsx(G,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(W,{className:"flex items-center gap-2 text-base",children:l||o(a==="suggestion"?"analysis.card.suggestionTitle":"analysis.card.alertTitle")}),e.jsxs("div",{className:"flex items-center gap-1 bg-gray-100 dark:bg-slate-800 rounded-lg p-1 mr-8",children:[e.jsx(c,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 hover:bg-white dark:hover:bg-slate-700",onClick:()=>j(w=>Math.max(12,w-1)),disabled:E<=12,children:e.jsx($s,{className:"h-3 w-3"})}),e.jsx("span",{className:"text-xs font-medium w-4 text-center select-none text-gray-500 dark:text-slate-400",children:e.jsx(Fs,{className:"h-3 w-3 mx-auto"})}),e.jsx(c,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 hover:bg-white dark:hover:bg-slate-700",onClick:()=>j(w=>Math.min(24,w+1)),disabled:E>=24,children:e.jsx(gs,{className:"h-3 w-3"})})]})]})}),e.jsxs("div",{className:"mt-2 space-y-3",style:{fontSize:`${E}px`},children:[p&&e.jsxs("div",{className:"rounded-md border border-gray-200 dark:border-slate-700 bg-gray-50 dark:bg-slate-800/50 overflow-hidden",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 border-b border-gray-200 dark:border-slate-700 bg-gray-100/80 dark:bg-slate-800",children:[e.jsx(Os,{className:"h-3 w-3 text-gray-400 dark:text-slate-500"}),e.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-slate-500 uppercase tracking-wider",children:"Fragmento del Acta"})]}),e.jsxs("p",{className:"px-4 py-3 italic text-gray-600 dark:text-slate-400 leading-relaxed whitespace-pre-wrap",children:['"',p,'"']}
18)]}),p&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-px bg-gray-100 dark:bg-slate-700"}),e.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-slate-500 uppercase tracking-wider",children:"Análisis"}),e.jsx("div",{className:"flex-1 h-px bg-gray-100 dark:bg-slate-700"})]}),e.jsx("div",{className:"text-gray-700 dark:text-slate-300 leading-relaxed whitespace-pre-wrap bg-white dark:bg-slate-800 p-4 rounded-md border border-gray-100 dark:border-slate-700",children:t})]}),e.jsxs(V,{className:"sm:justify-end gap-2 mt-4",children:[e.jsx(c,{variant:"secondary",size:"sm",onClick:()=>x(!1),children:o("analysis.card.close")}),e.jsxs(c,{variant:"default",size:"sm",onClick:f,className:"gap-2 bg-indigo-600 hover:bg-indigo-700 text-white",children:[b?e.jsx(je,{className:"h-4 w-4"}):e.jsx(ls,{className:"h-4 w-4"}),o(b?"analysis.card.copied":"analysis.card.copyText")]})]})]})})]})},xs={DRAFT:{label:"Borrador",className:"bg-gray-100 text-gray-600 border border-gray-200",icon:Gs},IN_REVIEW:{label:"En Revisión",className:"bg-amber-100 text-amber-700 border border-amber-200",icon:Ws},APPROVED:{label:"Aprobada",className:"bg-green-100 text-green-700 border border-green-200",icon:we}},yt=({minute:a,isDirty:y,isSaving:l,isLocked:p,isPolishing:t,isSendingToReview:o,isRevertingToDraft:u,isRemindingPending:v,isNotifyingConvocados:x,isLeftSidebarOpen:b,isRightSidebarOpen:A,editorContent:E,onNavigateBack:j,onSave:T,onPolish:f,onSendToReview:h,onRevertToDraft:k,onRemindPending:g,onNotifyConvocados:z,onPreview:w,onToggleLeftSidebar:I,onToggleRightSidebar:D})=>{var _,X;const{t:C}=oe("salomon"),m=a.status??"DRAFT",L=xs[m]??xs.DRAFT,de=L.icon,U=((_=a.signatures)==null?void 0:_.filter(xe=>xe.status==="SIGNED").length)??0,$=((X=a.attendees)==null?void 0:X.length)??0,ce=E.replace(/<[^>]+>/g,"").trim().length>=5;return e.jsxs("header",{className:"shrink-0 bg-white dark:bg-slate-800 border-b border-gray-200/80 dark:border-slate-700/80 z-30 shadow-[0_1px_8px_-4px_rgba(0,0,0,0.08)]",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 border-b border-gray-100 dark:border-slate-700/50",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(c,{variant:"ghost",size:"icon",className:"h-8 w-8 text-gray-400 hover:text-gray-700",onClick:j,title:"Volver al listado",children:e.jsx(hs,{className:"h-4 w-4"})}),!b&&e.jsx(c,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-400 hover:text-indigo-600",onClick:I,title:C("editor.showAgenda"),children:e.jsx(qs,{className:"h-4 w-4"})})]}),e.jsx("div",{className:"h-5 w-px bg-gray-200 dark:bg-slate-700"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xs font-semibold text-gray-500 dark:text-slate-400 uppercase tracking-wider",children:a.type==="ELDERS_MEETING"?C("editor.eldersMeeting"):C("editor.officialMeeting")}),e.jsx("span",{className:"text-gray-300 dark:text-slate-600 text-xs",children:"•"}),e.jsx("span",{className:"text-xs text-gray-500 dark:text-slate-400",children:a.date.toLocaleDateString("es-CL",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}),a.location&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-300 dark:text-slate-600 text-xs",children:"•"}),e.jsx("span",{className:"text-xs text-gray-400 dark:text-slate-500",children:a.location})]})]})}),e.jsx("div",{className:"flex items-center gap-1.5 text-xs shrink-0",children:l?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-1.5 h-1.5 bg-amber-400 rounded-full animate-pulse"}),e.jsx("span",{className:"text-amber-600 font-medium",children:C("editor.saving")})]}):y?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-1.5 h-1.5 bg-amber-500 rounded-full"}),e.jsx("span",{className:"text-amber-600 font-medium",children:C("editor.unsavedChanges")})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"w-1.5 h-1.5 bg-emerald-400 rounded-full"}),e.jsx("span",{className:"text-gray-400 dark:text-slate-500",children:C("editor.saved")})]})}),!A&&e.jsx(c,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-400 hover:text-indigo-600",onClick:D,title:C("editor.showAssistant"),children:e.jsx(Hs,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2",children:[e.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold shrink-0 ${L.className}`,children:[e.jsx(de,{className:"h-3.5 w-3.5"}),L.label,m==="IN_REVIEW"&&$>0&&e.jsxs("span",{className:"ml-1 opacity-70",children:["(",U,"/",$,")"]})]}),e.jsx("div",{className:"h-4 w-px bg-gray-200 dark:bg-slate-700 mx-1"}),a.status==="DRAFT"&&e.jsxs(e.Fragment,{children:[e.jsxs(c,{size:"sm",className:"h-7 text-xs bg-indigo-600 hover:bg-indigo-700 text-white gap-1.5 font-medium",onClick:h,disabled:o,children:[o?e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ps,{className:"h-3.5 w-3.5"}),o?"Enviando...":"Enviar a Revisión"]}),e.jsxs(c,{size:"sm",variant:"outline",className:"h-7 text-xs text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800/60 hover:bg-blue-50 dark:hover:bg-blue-900/30 gap-1.5",onClick:z,disabled:x||$===0,children:[x?e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ne,{className:"h-3.5 w-3.5"}),"Notificar Convocados"]})]}),a.status==="IN_REVIEW"&&e.jsxs(e.Fragment,{children:[e.jsxs(c,{size:"sm",variant:"outline",className:"h-7 text-xs text-amber-700 dark:text-amber-400 border-amber-300 dark:border-amber-800/60 hover:bg-amber-50 dark:hover:bg-amber-900/30 gap-1.5",onClick:g,disabled:v||U===$,children:[v?e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(ne,{className:"h-3.5 w-3.5"}),"Recordar Pendientes"]}),e.jsxs(c,{size:"sm",variant:"outline",className:"h-7 text-xs text-gray-600 dark:text-slate-300 border-gray-200 dark:border-slate-600 hover:bg-gray-50 dark:hover:bg-slate-700 gap-1.5",onClick:k,disabled:u,children:[u?e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(us,{className:"h-3.5 w-3.5"}),"Devolver a Borrador"]})]}),e.jsx("div",{className:"flex-1"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[!p&&e.jsxs(c,{variant:"ghost",size:"sm",className:"h-7 text-xs font-medium text-violet-600 dar
18k:text-violet-400 hover:text-violet-700 dark:hover:text-violet-300 hover:bg-violet-50 dark:hover:bg-violet-900/30 gap-1.5",onClick:f,disabled:t||!ce,title:"Mejorar redacción con Salomon AI",children:[t?e.jsx(R,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Ne,{className:"h-3.5 w-3.5"}),t?"Mejorando...":"Mejorar"]}),e.jsxs(c,{variant:"ghost",size:"sm",className:"h-7 text-xs text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-slate-200 hover:bg-gray-100 dark:hover:bg-slate-700 gap-1.5",onClick:w,children:[e.jsx(Bs,{className:"h-3.5 w-3.5"}),C("editor.preview")]}),e.jsxs(c,{variant:"ghost",size:"sm",className:"h-7 text-xs text-gray-500 dark:text-slate-400 hover:text-gray-700 dark:hover:text-slate-200 hover:bg-gray-100 dark:hover:bg-slate-700 gap-1.5",onClick:()=>window.print(),children:[e.jsx(bs,{className:"h-3.5 w-3.5"}),"Imprimir"]}),!p&&e.jsx(c,{onClick:T,disabled:l||!y,size:"sm",className:`h-7 text-xs font-semibold transition-all ${y?"bg-indigo-600 text-white hover:bg-indigo-700 shadow-sm":"bg-gray-100 dark:bg-slate-700 text-gray-400 dark:text-slate-500 cursor-default"}`,children:C(l?"editor.saving":"editor.save")})]})]})]})},zt=()=>{var Ge,We,Ve,Ue,Qe,Ke,Je,Xe,Ye,Ze,es,ss,ts,as,rs,is;const{t:a,i18n:y}=oe("salomon"),{id:l}
18=et(),p=st(),[t,o]=n.useState(null),[u,v]=n.useState(null),[x,b]=n.useState(""),[A,E]=n.useState(""),j=x!==A,{analyzeContent:T,polishText:f,isAnalyzing:h,isPolishing:k,result:g}=ft(),[z,w]=n.useState(!1),I=h||z,[D,C]=n.useState(!1),[m,L]=n.useState("");n.useEffect(()=>{h||w(!1)},[h]);const[de,U]=n.useState(!1),$=n.useRef(null),[ce,_]=n.useState(!1),[X,xe]=n.useState(0),{subscribeToMinute:fs,updateMinute:M,createActionItem:ys}=rt(),{members:F}=Ae(),{toast:S}=Ce(),[ge,Se]=n.useState("agenda"),[Y,Ee]=n.useState(""),[vs,Z]=n.useState(!1),[ee,Te]=n.useState(""),[js,me]=n.useState(!1),[Ie,De]=n.useState(!0),[ze,Re]=n.useState(!0),[se,Le]=n.useState(!1),[te,Me]=n.useState(!1),[he,Pe]=n.useState(!1),[Ns,ae]=n.useState(!1),[re,$e]=n.useState(!1),O=!!t&&t.status!=="DRAFT";n.useEffect(()=>l?fs(l,r=>{r&&o(i=>i?{...i,status:r.status,signatures:r.signatures,salomonAnalysis:r.salomonAnalysis,updatedAt:r.updatedAt}:(r.topics.length>0&&(v(r.topics[0].id),b(r.topics[0].discussion),E(r.topics[0].discussion)),r))}):void 0,[l]),n.useEffect(()=>{g&&!h&&t&&l&&(async()=>{const r=g.alerts.map(d=>({severity:d.type==="warning"?"HIGH":"LOW",title:d.title,quote:d.quote,message:d.message})),i=g.suggestions.map(d=>({severity:"LOW",title:"Sugerencia",message:d})),N={analyzedAt:new Date,complianceScore:100-g.alerts.length*10,summary:a("analysis.autoAnalysis"),alerts:[...r,...i]};await M(l,{...t,salomonAnalysis:N}),o(d=>d?{...d,salomonAnalysis:N}:null),S({title:a("analysis.govUpdated"),description:a("analysis.analysisSaved")})})()},[g,h]);const Fe=()=>{if(t){w(!0);const s=t.topics.sort((r,i)=>r.order-i.order).map(r=>
18{const i=r.id===u?x:r.discussion;return`Punto ${r.order}: ${r.title}
19${i}`}).join(`
20
21`);T(s,t.type||"ELDERS_MEETING",y.language)}},ks=async()=>{if(!t||!u||!x)return;const s=t.topics.find(i=>i.id===u),r=await f(x,(s==null?void 0:s.title)||"Punto de Agenda",t.type||"ELDERS_MEETING",y.language);r?(L(r.polished),C(!0)):S({title:"Error",description:"No se pudo mejorar el texto. Intenta nuevamente.",variant:"destructive"})},ws=()=>{const s=m.split(`
22`).filter(Boolean).map(r=>`<p>${r}</p>`).join("");b(s),C(!1),S({title:"✨ Redacción aplicada",description:"El texto fue actualizado. Recuerda guardar el acta."})},pe=async()=>{if(!(!t||!l)){U(!0);try{const s={...t};if(u&&(s.topics=t.topics.map(r=>r.id===u?{...r,discussion:x}:r)),g){const r=g.alerts.map(d=>({severity:d.type==="warning"?"HIGH":"LOW",title:d.title,quote:d.quote,message:d.message})),i=g.suggestions.map(d=>({severity:"LOW",title:"Sugerencia",message:d})),N=[...r,...i].slice(0,3);s.salomonAnalysis={analyzedAt:new Date,complianceScore:100-g.alerts.length*10,summary:a("analysis.autoAnalysis"),alerts:N},console.log("Saving Minute with Analysis:",s.salomonAnalysis,"Original Alerts:",g.alerts)}else console.log("No AI analysis result to save.");await M(l,s),o(s),E(x),S({title:a("editor.saved"),description:a("toasts.draftSaved")})}catch(s){console.error(s),S({title:a("common.error"),description:a("toasts.saveError"),variant:"destructive"})}finally{U(!1)}}},Oe=async()=>{if(!(!t||!l)){Le(!0);try{await pe(),await M(l,{...t,status:"IN_REVIEW"}),o(s=>s?{...s,status:"IN_REVIEW"}:null),S({title:"Acta enviada a revisión",description:"Los asistentes recibirán una notificación para firmar el acta."})}catch{S({title:"Error",description:"No se pudo enviar el acta a revisión.",variant:"destructive"})}finally{Le(!1)}}},_e=async()=>{if(!(!t||!l)){Me(!0);try{await M(l,{...t,lastRemindedAt:Date.now()}),o(s=>s?{...s,lastRemindedAt:Date.now()}:null),S({title:"Recordatorio enviado",description:"Se ha enviado una notificación push a los asistentes que aún no firman."})}catch{S({title:"Error",description:"No se pudo enviar el recordatorio.",variant:"destructive"})}finally{Me(!1)}}},qe=async()=>{if(!(!t||!l)){$e(!0);try{await M(l,{lastNotifiedCreatedAt:Date.now()}),S({title:"Convocatoria enviada",description:"Se ha notificado a todos los asistentes de la reunión."})}catch{S({title:"Error",description:"No se pudo enviar la convocatoria.",variant:"destructive"})}finally{$e(!1)}}},Cs=async()=>{if(!(!t||!l)){Pe(!0);try{await M(l,{status:"DRAFT",signatures:[]}),o(s=>s?{...s,status:"DRAFT",signatures:[]}:null),ae(!1),S({title:"Acta devuelta a Borrador",description:"Las firmas recogidas han sido eliminadas. El acta puede editarse nuevamente."})}catch{S({title:"Error",description:"No se pudo devolver el acta a Borrador.",variant:"destructive"})}finally{Pe(!1)}}},As=async s=>{j&&await pe(),Ss(s)},Ss=s=>{if(t&&u){const i=t.topics.map(N=>N.id===u?{...N,discussion:x}:N);o({...t,topics:i})}const r=t==null?void 0:t.topics.find(i=>i.id===s);
22r&&(v(s),b(r.discussion),E(r.discussion))},Es=()=>{Te(""),Z(!0)},He=()=>{if(ee&&t&&l){const s={id:crypto.randomUUID(),title:ee,discussion:"",decisions:[],startTime:new Date,order:t.topics.length+1},r=[...t.topics,s];o({...t,topics:r}),u||(v(s.id),b("")),Z(!1)}},Ts=(s,r)=>{const i=prompt("Nuevo título:",r);if(i&&t){const N=t.topics.map(d=>d.id===s?{...d,title:i}:d);o({...t,topics:N})}},Is=s=>{if(confirm(a("editor.deleteTopicConfirm"))&&t){const r=t.topics.filter(i=>i.id!==s);o({...t,topics:r}),u===s&&(v(r.length>0?r[0].id:null),b(r.length>0?r[0].discussion:""))}},Be=(s,r)=>{if(!t)return;let i=[...t.attendees],N=[...t.absent];r?(i=i.filter(d=>d!==s),N.includes(s)||N.push(s)):(N=N.filter(d=>d!==s),i.includes(s)||i.push(s)),o({...t,attendees:i,absent:N})},Ds=()=>{if($.current){const s=$.current.getEditor(),r=s.getLength();r>0&&s.insertText(r,`
23`);const i=s.getLength();s.insertText(i,"ACUERDO: ",{bold:!0}),s.setSelection(i+9),S({title:a("analysis.agreementAdded"),description:a("analysis.agreementInserted")})}},zs=async s=>{await ys(s),xe(r=>r+1),_(!1)};if(!t)return e.jsx("div",{className:"flex items-center justify-center h-screen",children:a("editor.loading")});const ue=t.topics.find(s=>s.id===u);return e.jsxs("div",{className:"flex flex-col h-[calc(100vh-4rem)] bg-gray-50/50 dark:bg-slate-900 font-sans overflow-hidden -m-4 sm:-m-6",children:[e.jsx("style",{children:`
24                /* Fixed Sticky Toolbar (Snow Theme) */
25                .ql-toolbar.ql-snow {
26                    border: none !important;
27                    background: white;
28                    border-bottom: 1px solid #f3f4f6 !important;
29                    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Softer shadow */
30                    border-radius: 0 !important; /* Full width feel or just top rounded? Let's keep it clean */
31                    position: sticky;
32                    top: 0px; /* Sticks to the top of the editor container */
33                    z-index: 40;
34                    margin: 0 !important;
35                    padding: 0.75rem 1rem !important;
36                    opacity: 1; 
37                    transform: none;
38                    pointer-events: all;
39                }
40
41                .dark .ql-toolbar.ql-snow {
42                    background: #1e293b;
43                    border-bottom: 1px solid #334155 !important;
44                }
45
46                .dark .ql-toolbar.ql-snow .ql-stroke {
47                    stroke: #cbd5e1;
48                }
49                .dark .ql-toolbar.ql-snow .ql-fill {
50                    fill: #cbd5e1;
51                }
52                .dark .ql-toolbar.ql-snow .ql-picker {
53                    color: #cbd5e1;
54                }
55
56                /* Ensure pagination/paper feel logic doesn't break */
57                .editor-paper-container {
58                    padding-top: 0; /* Toolbar is inside now */
59                    overflow: hidden; /* Contains the sticky toolbar if needed, though sticky needs overflow visible on parent usually. */
60                }
61                
62                /* We need ensuring the parent of sticky allows sticking. 
63                   The direct parent is .editor-paper-container. 
64                   .flex-1.overflow-y-auto is the scroll container.
65                */
66
67                .ql-container.ql-snow {
68                    border: none !important;
69                }
70                
71                .ql-editor {
72                    font-size: 1.125rem !important; /* 18px */
73                    line-height: 1.75 !important;
74                    padding: 3rem !important; /* Generous padding for paper feel */
75                    font-family: 'Inter', sans-serif;
76                    min-height: 1100px; /* Ensure editor itself pushes the paper height */
77                    color: #111827;
78                }
79                .dark .ql-editor {
80                    color: #f1f5f9;
81                }
82
83                .ql-editor p {
84                    margin-bottom: 1.15em !important;
85                }
86
87                .ql-editor.ql-blank::before {
88                    left: 3rem !important;
89                    right: 3rem !important;
90                }
91                .no-scrollbar::-webkit-scrollbar {
92                    display: none;
93                }
94            `}),e.jsx(yt,{minute:t,isDirty:j,isSaving:de,isLocked:O,isPolishing:k,isSendingToReview:se,isRevertingToDraft:he,isRemindingPending:te,isNotifyingConvocados:re,isLeftSidebarOpen:Ie,isRightSidebarOpen:ze,editorContent:x,onNavigateBack:()=>p("/app/salomon/minutes"),onSave:pe,onPolish:ks,onSendToReview:Oe,onRevertToDraft:()=>ae(!0),onRemindPending:_e,onNotifyConvocados:qe,onPreview:()=>me(!0),onToggleLeftSidebar:()=>De(!0),onToggleRightSidebar:()=>Re(!0)}),e.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[Ie&&e.jsxs("div",{className:"w-72 bg-white dark:bg-slate-800 border-r border-gray-100 dark:border-slate-700 flex flex-col shadow-[4px_0_24px_-12px_rgba(0,0,0,0.05)] z-20",children:[e.jsxs("div",{className:"px-4 py-4 border-b border-gray-50 dark:border-slate-700/50 flex justify-between items-center bg-gray-50/30 dark:bg-slate-800/50",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(c,{variant:"ghost",size:"icon",className:"h-7 w-7 text-gray-400 hover:text-gray-900 dark:hover:text-slate-100 shrink-0",onClick:()=>p("/app/salomon/minutes"),children:e.jsx(hs,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"text-xs font-bold text-gray-900 dark:text-slate-100 truncate uppercase tracking-widest",children:t.type==="ELDERS_MEETING"?a("editor.elders"):a("editor.official")}),e.jsxs("p",{className:"text-[10px] text-gray-500 dark:text-slate-400 truncate",children:[t.date.toLocaleDateString()," ",t.location&&`• ${t.location}`]})]})]}),e.jsx(c,{variant:"ghost",size:"icon",onClick:()=>De(!1),className:"h-7 w-7 text-gray-300 dark:text-slate-500 hover:text-gray-500 dark:hover:text-slate-300",title:a("editor.hideAgenda"),children:e.jsx(Vs,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex border-b border-gray-100 dark:border-slate-700/50 p-1 bg-gray-50/30 dark:bg-slate-800/50",children:[e.jsx("button",{onClick:()=>Se("agenda"),className:`flex-1 py-1.5 rounded text-[10px] font-bold uppercase tracking-wider transition-all ${ge==="agenda"?"bg-white dark:bg-slate-700 text-gray-900 dark:text-slate-100 shadow-sm":"text-gray-400 dark:text-slate-400 hover:text-gray-600 dark:hover:text-slate-300"}`,children:a("editor.agenda")}),e.jsx("button",{onClick:()=>Se("attendees"),className:`flex-1 py-1.5 rounded text-[10px] font-bold uppercase tracking-wider transition-all ${ge==="attendees"?"bg-white dark:bg-slate-700 text-gray-900 dark:text-slate-100 shadow-sm":"text-gray-400 dark:text-slate-400 hover:text-gray-600 dark:hover:text-slate-300"}`,children:a("editor.attendees")})]}),ge==="agenda"?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:t.topics.map((s,r)=>e.jsxs("div",{className:`group relative pl-4 pr-3 py-3 cursor-pointer transition-all ${u===s.id?"bg-indigo-50/50 dark:bg-indigo-900/20":"hover:bg-gray-50 dark:hover:bg-slate-700/50"}`,onClick:()=>As(s.id),children:[u===s.id&&e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-indigo-600 dark:bg-indigo-400"}),e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"min-w-0 pr-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[e.jsx("span",{className:`text-[10px] font-mono ${u===s.id?"text-indigo-500 dark:text-indigo-400":"text-gray-400 dark:text-slate-500"}`,children:String(r+1).padStart(2,"0")}),O&&e.jsx(us,{className:"h-2.5 w-2.5 text-amber-400 flex-shrink-0"})]}),e.jsx("span",{className:`text-sm leading-snug block line-clamp-2 ${u===s.id?"font-semibold text-gray-900 dark:text-slate-100":"text-gray-600 dark:text-slate-300"}`,children:s.title})]})}),!O&&e.jsxs("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 flex items-center bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm rounded shadow-sm border border-gray-100 dark:border-slate-700 p-0.5",children:[e.jsx("button",{className:"text-gray-400 dark:text-slate-400 hover:text-indigo-600 dark:hover:text-indigo-400 p-1 rounded hover:bg-indigo-50 dark:hover:bg-indigo-900/30",onClick:i=>{i.stopPropagation(),Ts(s.id,s.title)},children:e.jsx(Us,{className:"h-3 w-3"})}),e.jsx("button",{className:"text-gray-400 dark:text-slate-400 hover:text-red-600 dark:hover:text-red-400 p-1 rounded hover:bg-red-50 dark:hover:bg-red-900/30",onClick:i=>{i.stopPropagation(),Is(s.id)},children:e.jsx(fe,{className:"h-3 w-3"})})]})]},s.id))}),e.jsx("div",{className:"p-4 border-t border-gray-200 dark:border-slate-700 space-y-3",children:e.jsxs("button",{onClick:Es,className:"w-full py-2 border-2 border-dashed border-gray-300 dark:border-slate-600 rounded-md text-gray-500 dark:text-slate-400 hover:border-gray-400 dark:hover:border-slate-500 hover:text-gray-600 dark:hover:text-slate-300 transition-colors text-sm font-medium flex items-center justify-center",children:[e.jsx(gs,{className:"h-4 w-4 mr-2"}),a("editor.addTopic")]})})]}):e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-end mb-2",children:[e.jsx("h4",{className:"text-xs font-bold text-gray-400 dark:text-slate-500 uppercase tracking-wider",children:a("attendance.addAttendee")}),e.jsxs("span",{className:"text-[10px] text-indigo-500 dark:text-indigo-400 font-medium opacity-80 flex items-center gap-1",children:[e.jsx(ve,{className:"h-3 w-3"})," Buscar nombre"]})]}),e.jsxs("div",{className:"relative group",children:[e.jsx(ve,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-gray-400 dark:text-slate-500 group-focus-within:text-indigo-500 dark:group-focus-within:text-indigo-400 transition-colors"}),e.jsx(le,{placeholder:"Ej. Juan Pérez...",className:"pl-9 text-sm focus:border-indigo-500 dark:focus:border-indigo-400 transition-colors bg-white dark:bg-slate-800 dark:border-slate-700 shadow-sm",value:Y,onChange:s=>Ee(s.target.value)})]}),Y.length>0&&e.jsxs("div",{className:"mt-2 border dark:border-slate-700 rounded-md shadow-sm bg-white dark:bg-slate-800 max-h-40 overflow-y-auto w-full z-10 relative",children:[F.filter(s=>
94!t.attendees.includes(s.id)&&`${s.firstName||""} ${s.lastName||""}`.toLowerCase().includes(Y.toLowerCase())).map(s=>e.jsxs("button",{className:"w-full text-left px-3 py-2 text-sm dark:text-slate-200 hover:bg-indigo-50 dark:hover:bg-slate-700 flex items-center justify-between group",onClick:async()=>{const r=[...t.attendees,s.id];if(o({...t,attendees:r}),Ee(""),t.status==="IN_REVIEW"&&l)try{await M(l,{attendees:r}),confirm(`¿Deseas notificar a ${s.firstName} ${s.lastName} para que revise y firme el acta?`)&&(await M(l,{lastRemindedAt:Date.now()}),S({title:"Notificación enviada",description:"Se ha enviado una notificación a los asistentes pendientes de firma."}))}catch{S({title:"Error",description:"No se pudo guardar el cambio.",variant:"destructive"})}},children:[e.jsxs("span",{children:[s.firstName," ",s.lastName]}),e.jsx("span",{className:"text-xs text-indigo-600 dark:text-indigo-400 font-medium opacity-0 group-hover:opacity-100",children:"Agregar"})]},s.id)),F.filter(s=>!t.attendees.includes(s.id)&&`${s.firstName||""} ${s.lastName||""}`.toLowerCase().includes(Y.toLowerCase())).length===0&&e.jsx("div",{className:"px-3 py-2 text-xs text-gray-400 dark:text-slate-500",children:a("attendance.noMembersFound")})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-bold text-gray-400 dark:text-slate-500 uppercase tracking-wider mb-2 flex justify-between",children:[e.jsx("span",{children:a("attendance.present")}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[(((Ge=t.rsvpConfirmed)==null?void 0:Ge.length)??0)>0&&e.jsxs("span",{className:"bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-400 px-1.5 py-0.5 rounded-full text-[10px] font-semibold",title:"Confirmados via app",children:["✓ ",((We=t.rsvpConfirmed)==null?void 0:We.length)??0]}),e.jsx("span",{className:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 px-1.5 py-0.5 rounded-full text-[10px]",children:t.attendees.length})]})]}),e.jsxs("div",{className:"space-y-1",children:[t.attendees.map(s=>{const r=F.find(P=>P.id===s);if(!r)return null;const N=(t.rsvpConfirmed||[]).includes(s),d=(t.absent||[]).includes(s);return e.jsxs("div",{className:`flex items-center justify-between group p-1.5 rounded border border-transparent hover:border-gray-100 dark:hover:border-slate-700 ${d?"bg-red-50/60 hover:bg-red-50 dark:bg-red-900/20 dark:hover:bg-red-900/40":"hover:bg-gray-50 dark:hover:bg-slate-800/80"}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsxs("span",{className:`text-sm truncate ${d?"text-gray-400 line-through":"text-gray-700 dark:text-gray-300"}`,children:[r.firstName," ",r.lastName]}),N?e.jsx("span",{className:"shrink-0 inline-flex items-center gap-0.5 bg-emerald-50 dark:bg-emerald-900/30 text-emerald-600 dark:text-emerald-400 border border-emerald-200 dark:border-emerald-800/50 px-1.5 py-0.5 rounded-full text-[10px] font-medium",children:"✓ Confirmó"}):d?e.jsx("span",{className:"shrink-0 inline-flex items-center gap-0.5 bg-red-50 dark:bg-red-900/30 text-red-500 dark:text-red-400 border border-red-200 dark:border-red-800/50 px-1.5 py-0.5 rounded-full text-[10px] font-medium",children:"✗ No asistirá"}):e.jsx("span",{className:"shrink-0 inline-flex items-center bg-white dark:bg-slate-800 text-gray-500 dark:text-gray-400 border border-gray-200 dark:border-slate-700 px-1.5 py-0.5 rounded-full text-[10px]",children:"Pendiente"})]}),e.jsxs("div",{className:"flex items-center opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{onClick:()=>Be(s,!0),className:"text-gray-400 hover:text-amber-500 p-1",title:a("attendance.markAbsent"),children:e.jsx(Qs,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:async()=>{const P=t.attendees.filter(q=>q!==s),Q=(t.signatures||[]).filter(q=>q.userId!==s);if(o({...t,attendees:P,signatures:Q}),l)try{await M(l,{attendees:P,signatures:Q})}catch{S({title:"Error",description:"No se pudo guardar el cambio.",variant:"destructive"})}},className:"text-gray-400 hover:text-red-500 p-1",title:a("attendance.remove"),children:e.jsx(fe,{className:"h-3.5 w-3.5"})})]})]},s)}),t.attendees.length===0&&e.jsx("p",{className:"text-xs text-gray-400 italic",children:a("attendance.noAttendees")})]})]}),t.absent&&t.absent.length>0&&e.jsxs("div",{className:"pt-4 border-t border-gray-100 mt-4",children:[e.jsxs("h4",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-2 flex justify-between",children:[e.jsx("span",{children:a("attendance.absent")}),e.jsx("span",{className:"bg-amber-100 text-amber-700 px-1.5 py-0.5 rounded-full text-[10px]",children:t.absent.length})]}),e.jsx("div",{className:"space-y-1",children:t.absent.map(s=>{const r=F.find(i=>i.id===s);return r?e.jsxs("div",{className:"flex items-center justify-between group p-1.5 rounded hover:bg-gray-50 dark:hover:bg-slate-800/80 border border-transparent hover:border-gray-100 dark:hover:border-slate-700 bg-amber-50/50 dark:bg-amber-900/10",children:[e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400 italic",children:[r.firstName," ",r.lastName]}),e.jsx("div",{className:"flex items-center opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("button",{onClick:()=>Be(s,!1),className:"text-gray-400 hover:text-green-600 p-1",title:a("attendance.markPresent"),children:e.jsx(Ks,{className:"h-3.5 w-3.5"})})})]},s):null})})]}),e.jsxs("div",{className:"pt-4 border-t border-gray-100 mt-4",children:[e.jsx("h4",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-2",children:a("attendance.externalGuests")}),e.jsx("textarea",{className:"w-full text-sm border-gray-300 dark:border-slate-700 dark:bg-slate-800 dark:text-gray-200 rounded-md shadow-sm focus:border-indigo-500 focus:ring-indigo-500 min-h-[60
94px]",placeholder:a("attendance.guestPlaceholder"),value:((Ve=t.guests)==null?void 0:Ve.join(", "))||"",onChange:s=>{const r=s.target.value.split(",").map(i=>i.trim()).filter(Boolean);o({...t,guests:r})}})]})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col bg-white dark:bg-slate-900 min-w-0",children:[e.jsxs("div",{className:"px-6 py-2 border-b border-gray-100 dark:border-slate-700 bg-gray-50/50 dark:bg-slate-800 flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-gray-400 font-medium uppercase tracking-wider",children:"Punto activo:"}),e.jsx("span",{className:"text-sm font-semibold text-gray-700 truncate",children:(ue==null?void 0:ue.title)||"—"}),O&&e.jsx("span",{className:"ml-auto text-[10px] text-amber-600 bg-amber-50 border border-amber-200 px-2 py-0.5 rounded-full font-medium",children:"Solo lectura"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto bg-gray-50/50 dark:bg-slate-900/50 flex justify-center p-4 lg:p-6 no-scrollbar",children:e.jsx("div",{className:"editor-paper-container w-full max-w-5xl bg-white dark:bg-slate-800 shadow-sm border border-gray-200/60 dark:border-slate-700/60 min-h-[1100px] flex flex-col relative transition-all duration-300",children:e.jsx(tt,{ref:$,theme:"snow",value:x,onChange:O?()=>{}:b,readOnly:O,className:`quill-editor flex-1 flex flex-col ${O?"opacity-80":""}`,placeholder:"Escribe aquí el acta de la reunión...",modules:{toolbar:[[{header:[1,2,!1]}],[{size:["small",!1,"large","huge"]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["link","clean"]]}})})})]}),ze&&e.jsxs("div",{className:"w-80 bg-white dark:bg-slate-800 border-l border-gray-100 dark:border-slate-700 flex flex-col shadow-[-4px_0_24px_-12px_rgba(0,0,0,0.05)] z-20",children:[e.jsxs("div",{className:"p-4 border-b border-gray-50 dark:border-slate-700 bg-gray-50/30 dark:bg-slate-800/30 flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[e.jsx(Js,{className:"h-4 w-4 text-indigo-600"}),e.jsx("h3",{className:"text-sm font-bold text-gray-900 dark:text-gray-100 uppercase tracking-wider",children:a("analysis.title")})]}),e.jsx("p",{className:"text-[10px] text-gray-500 dark:text-gray-400",children:a("analysis.subtitle")})]}),e.jsx(c,{variant:"ghost",size:"icon",onClick:()=>Re(!1),className:"h-7 w-7 text-gray-300 dark:text-gray-600 hover:text-gray-500 dark:hover:text-gray-400 -mt-1 -mr-1",title:a("editor.hideAssistant"),children:e.jsx(Xs,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-gray-50/50 dark:bg-slate-900/50",children:[t&&e.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-lg border border-gray-100 dark:border-slate-700 shadow-sm overflow-hidden mb-1",children:[e.jsxs("div",{className:"px-3 py-2 border-b border-gray-50 dark:border-slate-700 flex justify-between items-center",children:[e.jsx("span",{className:"text-xs font-bold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:"Estado del Acta"}),e.jsx("span",{className:`text-[10px] font-semibold px-2 py-0.5 rounded-full ${t.status==="APPROVED"?"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400":t.status==="IN_REVIEW"?"bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400":"bg-gray-100 dark:bg-slate-700 text-gray-500 dark:text-slate-300"}`,children:t.status==="APPROVED"?"Aprobada":t.status==="IN_REVIEW"?"En Revisión":"Borrador"})]}),t.status==="DRAFT"&&e.jsxs("div",{className:"p-3 border-b border-gray-50 dark:border-slate-700 flex flex-col gap-2",children:[e.jsxs(c,{size:"sm",className:"w-full text-xs bg-indigo-600 hover:bg-indigo-700 text-white",onClick:Oe,disabled:se,children:[se?e.jsx(R,{className:"h-3 w-3 mr-2 animate-spin"}):e.jsx(ps,{className:"h-3 w-3 mr-2"}),se?"Enviando...":"Enviar a Revisión"]}),e.jsxs(c,{size:"sm",variant:"outline",className:"w-full text-xs text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800/60 hover:bg-blue-50 dark:hover:bg-blue-900/30",onClick:qe,disabled:re||(((Ue=t.attendees)==null?void 0:Ue.length)||0)===0,children:[re?e.jsx(R,{className:"h-3 w-3 mr-2 animate-spin"}):e.jsx(ne,{className:"h-3 w-3 mr-2"}),re?"Enviando...":"Notificar Convocados"]}),e.jsx("p",{className:"text-[10px] text-gray-400 text-center",children:"Notifica asistentes de la reunión"})]}),t.status==="IN_REVIEW"&&e.jsxs("div",{className:"p-3 border-b border-gray-50 flex flex-col gap-2",children:[e.jsxs(c,{size:"sm",variant:"outline",className:"w-full text-xs text-amber-700 border-amber-200 hover:bg-amber-50",onClick:_e,disabled:te||(((Qe=t.signatures)==null?void 0:Qe.filter(s=>s.status==="SIGNED").length)||0)===(((Ke=t.attendees)==null?void 0:Ke.length)||0),children:[te?e.jsx(R,{className:"h-3 w-3 mr-2 animate-spin"}):e.jsx(ne,{className:"h-3 w-3 mr-2"}),te?"Enviando...":"Recordar Pendientes"]}),e.jsx("p",{className:"text-[10px] text-gray-400 text-center",children:"Notificará solo a los que aún no firman"})]}),e.jsxs("div",{className:"p-3",children:[e.jsxs("p",{className:"text-[10px] text-gray-400 uppercase font-semibold mb-2",children:["Firmas (",((Je=t.signatures)==null?void 0:Je.filter(s=>s.status==="SIGNED").length)||0,"/",((Xe=t.attendees)==null?void 0:Xe.length)||0,")"]}),((Ye=t.attendees)==null?void 0:Ye.length)===0&&e.jsx("p",{className:"text-xs text-gray-400 italic",children:"Sin asistentes convocados"}),(Ze=t.attendees)==null?void 0:Ze.map((s,r)=>{var q;const i=F.find(K=>K.id===s),N=i?`${i.firstName} ${i.lastName}`.trim().toLowerCase():"",d=(q=t.signatures)==null?void 0:q.find(K=>{var ns;return K.userId===s||(i==null?void 0:i.userId)&&K.userId===i.userId||N.length>4&&((ns=K.userName)==null?void 0:ns.trim().toLowerCase().includes(N))}),P=(d==null?void 0:d.status)==="SIGNED",Q=i?`${i.firstName} ${i.lastName}`:s.substring(0,8)+"...";return e.jsxs("div",{className:`flex items-center gap-2 mb-1.5 rounded-md px-2 py-1.5 transition-colors border ${P?"bg-green-50 dark:bg-green-900/20 border-green-100 dark:border-green-900/50":"bg-white dark:bg-slate-800 border-gray-200 dark:border-slate-700"}`,children:[P?e.jsx(we,{className:"h-3.5 w-3.5 text-green-500 flex-shrink-0"}):e.jsx(ye,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0"}),e.jsx("span",{className:`text-xs truncate flex-1 ${P?"text-green-700 dark:text-green-400 font-medium":"text-gray-600 dark:text-gray-300"}`,title:Q,children:Q}),P&&(d==null?void 0:d.signedAt)&&e.jsx("span",{className:"text-[10px] text-green-500 flex-shrink-0",children:new Date(d.signedAt).toLocaleDateString("es-CL",{day:"2-digit",month:"2-digit"})})]},r)})]})]}),I&&e.jsxs("div",{className:"bg-white dark:bg-slate-800 p-3 rounded-lg border border-indigo-100 dark:border-indigo-500/30 shadow-sm animate-pulse",children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[e.jsx(J,{className:"h-3 w-3 text-indigo-400"}),e.jsx("span",{className:"text-xs font-medium text-indigo-600",children:a("editor.analyzingDiscussion")})]}),e.jsx("div",{className:"h-2 bg-indigo-50 rounded w-3/4"})]}),!I&&!g&&(!((es=t==null?void 0:t.salomonAnalysis)!=null&&es.alerts)||t.salomonAnalysis.alerts.length===0)&&e.jsxs("div",{className:"text-center py-4 px-4 bg-white dark:bg-slate-800 rounded border border-dashed border-gray-200 dark:border-slate-700",children:[e.jsx(J,{className:"h-6 w-6 text-indigo-200 dark:text-indigo-500/50 mx-auto mb-2"}),e.jsx("p",{className:"text-xs text-gray-400 mb-3",children:a("editor.analysisPrompt")}),e.jsxs(c,{size:"sm",variant:"outline",onClick:Fe,disabled:I,className:"w-full text-xs text-indigo-600 border-indigo-200 hover:bg-indigo-50",children:[I?e.jsx(R,{className:"h-3 w-3 mr-2 animate-spin"}):null,a(I?"editor.analyzing":"editor.analyzeNow")]})]}),(g||((ss=t==null?void 0:t.salomonAnalysis)==null?void 0:ss.alerts)&&t.salomonAnalysis.alerts.length>0)&&e.jsxs(c,{size:"sm",variant:"outline",onClick:Fe,disabled:I,className:"w-full mb-3 text-xs border-dashed border-indigo-200 text-indigo-600 hover:bg-indigo-50",children:[I?e.jsx(R,{className:"h-3 w-3 mr-2 animate-spin"}):e.jsx(J,{className:"h-3 w-3 mr-2"}),a("editor.reAnalyze")]}),(rs=(g==null?void 0:g.alerts)||((as=(ts=t==null?void 0:t.salomonAnalysis)==null?void 0:ts.alerts)==null?void 0:as.map(s=>({type:s.severity==="HIGH"?"warning":"info",title:s.severity==="HIGH"?a("editor.conflictDetected"):a("editor.observation"),quote:s.quote,message:s.message}))))==null?void 0:rs.map((s,r)=>e.jsx(cs,{type:"alert",severity:s.severity==="HIGH"||s.type==="warning"||s.type==="check"?"warning":"info",title:s.title||(s.severity==="HIGH"?a("editor.conflictDetected"):a("editor.observation")),quote:s.quote,message:s.message},`alert-${r}`)),(is=g==null?void 0:g.suggestions)==null?void 0:is.map((s,r)=>e.jsx(cs,{type:"suggestion",message:s},`sugg-${r}`)),e.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-100 dark:border-slate-700",children:[e.jsx("h4",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-2",children:a("analysis.tools")}),e.jsxs("button",{onClick:Ds,className:"w-full text-left p-2 hover:bg-gray-50 dark:hover:bg-slate-700 rounded text-sm text-gray-600 dark:text-slate-300 flex items-center group transition-colors",children:[e.jsx("span",{className:"w-8 h-8 bg-gray-100 dark:bg-slate-800 rounded flex items-center justify-center mr-3 group-hover:bg-white dark:group-hover:bg-slate-600 text-gray-500 dark:text-slate-400 group-hover:text-indigo-600 dark:group-hover:text-indigo-400 border border-transparent group-hover:border-gray-200 dark:group-hover:border-slate-500 transition-colors",children:e.jsx(Ys,{className:"h-4 w-4"})}),a("analysis.createAgreement")]}),e.jsxs("button",{onClick:()=>_(!0),className:"w-full text-left p-2 hover:bg-gray-50 dark:hover:bg-slate-700 rounded text-sm text-gray-600 dark:text-slate-300 flex items-center group transition-colors",children:[e.jsx("span",{className:"w-8 h-8 bg-gray-100 dark:bg-slate-800 rounded flex items-center justify-center mr-3 group-hover:bg-white dark:group-hover:bg-slate-600 text-gray-500 dark:text-slate-400 group-hover:text-amber-600 dar
94k:group-hover:text-amber-500 border border-transparent group-hover:border-gray-200 dark:group-hover:border-slate-500 transition-colors",children:e.jsx(Zs,{className:"h-4 w-4"})}),a("analysis.assignTask")]})]}),e.jsx(ut,{minuteId:l||"",refreshTrigger:X})]})]}),e.jsx(bt,{isOpen:ce,onClose:()=>_(!1),minuteId:l||"",onCreate:zs}),e.jsx(H,{open:vs,onOpenChange:Z,children:e.jsxs(B,{children:[e.jsxs(G,{children:[e.jsx(W,{children:a("dialogs.addTopicTitle")}),e.jsx(be,{children:a("dialogs.addTopicDesc")})]}),e.jsx("div",{className:"py-4",children:e.jsx(le,{value:ee,onChange:s=>Te(s.target.value),placeholder:a("editor.topicSample"),onKeyDown:s=>s.key==="Enter"&&He()})}),e.jsxs(V,{children:[e.jsx(c,{variant:"outline",onClick:()=>Z(!1),children:a("common.cancel")}),e.jsx(c,{onClick:He,disabled:!ee.trim(),children:a("editor.createTopic")})]})]})}),e.jsx(H,{open:Ns,onOpenChange:ae,children:e.jsxs(B,{className:"max-w-md",children:[e.jsxs(G,{children:[e.jsxs(W,{className:"flex items-center gap-2 text-amber-700",children:[e.jsx(ms,{className:"h-5 w-5"}),"Devolver a Borrador"]}),e.jsxs(be,{className:"pt-2 text-gray-600",children:["Esta acción revoca el estado de revisión y ",e.jsx("strong",{children:"elimina todas las firmas recogidas"})," hasta ahora. Los asistentes deberán volver a firmar cuando se reenvíe a revisión.",e.jsx("br",{}),e.jsx("br",{}),"¿Estás seguro de que deseas continuar?"]})]}),e.jsxs(V,{className:"gap-2",children:[e.jsx(c,{variant:"outline",onClick:()=>ae(!1),children:"Cancelar"}),e.jsx(c,{className:"bg-amber-600 hover:bg-amber-700 text-white",onClick:Cs,disabled:he,children:he?e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-4 w-4 animate-spin mr-2"}),"Revirtiendo..."]}):"Sí, devolver a Borrador"})]})]})}),e.jsx(H,{open:js,onOpenChange:me,children:e.jsxs(B,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsx(G,{children:e.jsx(W,{children:a("dialogs.previewTitle")})}),e.jsxs("div",{className:"bg-white dark:bg-slate-800 p-8 border dark:border-slate-700 shadow-sm my-4 print-content",id:"print-area",children:[e.jsxs("div",{className:"text-center border-b dark:border-slate-700 pb-6 mb-6",children:[e.jsxs("h1",{className:"text-xl font-bold uppercase tracking-widest text-gray-900 dark:text-white mb-2",children:["Iglesia Fiel - ",t.type==="ELDERS_MEETING"?a("editor.eldersMeeting"):a("editor.officialMeeting")]}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[t.date.toLocaleDateString(y.language,{weekday:"long",year:"numeric",month:"long",day:"numeric"}),t.location&&` • ${t.location}`]})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h3",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-3 border-b border-gray-100 dark:border-slate-700 pb-1",children:"Asistencia"}),e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"block font-medium text-gray-700 dark:text-slate-300 mb-1",children:[a("attendance.present"),":"]}),e.jsx("ul",{className:"list-disc list-inside text-gray-600 dark:text-slate-400",children:F.filter(s=>t.attendees.includes(s.id)).map(s=>e.jsxs("li",{children:[s.firstName," ",s.lastName]},s.id))})]}),t.absent&&t.absent.length>0&&e.jsxs("div",{children:[e.jsxs("span",{className:"block font-medium text-gray-700 dark:text-slate-300 mb-1",children:[a("attendance.absent"),":"]}),e.jsx("ul",{className:"list-disc list-inside text-gray-600 dark:text-slate-400",children:F.filter(s=>t.absent.includes(s.id)).map(s=>e.jsxs("li",{children:[s.firstName," ",s.lastName]},s.id))})]})]})]}),e.jsx("div",{className:"space-y-8",children:t.topics.sort((s,r)=>s.order-r.order).map((s,r)=>e.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none text-gray-800 dark:text-slate-300",children:[e.jsxs("h3",{className:"text-lg font-bold text-gray-900 dark:text-slate-100 mb-2 border-l-4 border-indigo-500 pl-3",children:[r+1,". ",s.title]}),e.jsx("div",{dangerouslySetInnerHTML:{__html:os.sanitize(s.discussion||"")}})]},s.id))})]}),e.jsxs(V,{className:"gap-2",children:[e.jsx(c,{variant:"outline",onClick:()=>me(!1),children:a("dialogs.close")}),e.jsxs(c,{onClick:()=>window.print(),children:[e.jsx(bs,{className:"h-4 w-4 mr-2"}),a("dialogs.print")]})]})]})}),e.jsx(H,{open:D,onOpenChange:C,children:e.jsxs(B,{className:"max-w-4xl max-h-[90vh] flex flex-col",children:[e.jsxs(G,{children:[e.jsxs(W,{className:"flex items-center gap-2 text-violet-700",children:[e.jsx(Ne,{className:"h-5 w-5"}),"Propuesta de redacción — Salomon AI"]}),e.jsx(be,{children:'Revisa y edita la propuesta antes de aplicarla. No se realizará ningún cambio hasta que presiones "Aplicar".'})]}),e.jsxs("div",{className:"flex-1 grid grid-cols-2 gap-4 overflow-hidden mt-2",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-xs font-bold uppercase tracking-wider text-gray-400",children:"Original"}),e.jsx("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-md p-4 text-sm text-gray-600 overflow-y-auto min-h-[300px] max-h-[calc(90vh-240px)] leading-relaxed",dangerouslySetInnerHTML:{__html:os.sanitize(x||"")}})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("span",{className:"text-xs font-bold uppercase tracking-wider text-violet-500 flex items-center gap-1",children:[e.jsx(J,{className:"h-3 w-3"}),"Propuesta IA ",e.jsx("span",{className:"text-gray-300 ml-1 font-normal normal-case tracking-normal",children:"(editable)"})]}),e.jsx("textarea",{className:"flex-1 bg-violet-50/40 border border-violet-200 rounded-md p-4 text-sm text-gray-800 resize-none outline-none focus:ring-2 focus:ring-violet-300 leading-relaxed min-h-[300px] max-h-[calc(90vh-240px)] overflow-y-auto font-sans",value:m,onChange:s=>L(s.target.value)})]})]}),e.jsxs(V,{className:"gap-2 pt-2 border-t border-gray-100",children:[e.jsx(c,{variant:"outline",onClick:()=>C(!1),children:"Descartar"}),e.jsxs(c,{className:"bg-violet-600 hover:bg-violet-700 text-white gap-2",onClick:ws,children:[e.jsx(Ne,{className:"h-4 w-4"}),"Aplicar redacción"]})]})]})})]})]})};export{zt as MinuteEditorPage,zt 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.