vendor: 10,298 bytes, line 1
1import{r as d,o as K,v as ts,j as e,l as ss,n as te,m as ue,p as W,x as V,y as as,w as ls}from"./vendor-radix-DzOO2cmU.js";import{a2 as nt,u as B,t as w,l as rs,c as E,b as ct,D as ns,Y as cs,I as os,B as L,X as Se,U as Re,g as is,a1 as Ce,L as ds,a8 as Pe,R as ps,a9 as _e,ab as De,C as ke,G as Q,F as ot,q as G,K as it,ao as oe,ap as ie,ag as dt,aq as de,i as xs,d as ms,e as us,aA as gs,v as pt,f as hs}from"./index-CEKQWnFw.js";import{N as xt}from"./NaturoBadge-Bug18job.js";import{C as fs}from"./checkbox-Bb_Tkyap.js";import{R as se,a as ae,b as le}from"./responsive-dialog-h7eh7D4e.js";import{S as Ke,a as Ze,b as et,c as tt,d as Z}from"./select-D5Q49XkM.js";import{W as st}from"./index-Qs1HBGJt.js";import{U as bs}from"./UpgradeModal-BGzOlZ-m.js";import{V as mt}from"./vitalityReportForm-ClslsXPf.js";import{S as vs}from"./ScoreVisualization-RC6PWIVl.js";import{A as js}from"./arrow-up-down-DPQXolNg.js";import{F as Ae}from"./filter-DrDsKjAC.js";import{T as Fs}from"./trash-2-DYcI4TNY.js";import{A as Ie}from"./award-B0VP6cGs.js";import{E as ee}from"./eye-DijmpF25.js";import{C as ut}from"./clipboard-list-CDQYHFck.js";import{M as gt,D as ht}from"./moon-To3SirN9.js";import{A as ft}from"./apple-Du0cEOEq.js";import{T as ys}from"./thumbs-down-CJokegTo.js";import{C as at}from"./chevron-down-B4pxCOFm.js";import{T as Ns}from"./trending-up-BOhZUbe4.js";import{F as ws}from"./flame-BHlRP074.js";import"./vendor-react-BN0qJr-I.js";import"./vendor-trpc-D7HyxgAF.js";import"./star-BYX1e-9P.js";import"./useAssessmentTranslations-YoBNIIyn.js";import"./activity-rrQc1hWz.js";import"./zap-Bg6XuuJR.js";function Ss(t,r){return d.useReducer((l,a)=>r[l][a]??l,t)}var Oe="ScrollArea",[bt]=ss(Oe),[Cs,_]=bt(Oe),vt=d.forwardRef((t,r)=>{const{__scopeScrollArea:l,type:a="hover",dir:s,scrollHideDelay:o=600,...p}=t,[c,x]=d.useState(null),[m,g]=d.useState(null),[v,h]=d.useState(null),[j,C]=d.useState(null),[k,z]=d.useState(null),[D,H]=d.useState(0),[Y,U]=d.useState(0),[I,$]=d.useState(!1),[O,X]=d.useState(!1),y=K(r,M=>x(M)),S=ts(s);return e.jsx(Cs,{scope:l,type:a,dir:S,scrollHideDelay:o,scrollArea:c,viewport:m,onViewportChange:g,content:v,onContentChange:h,scrollbarX:j,onScrollbarXChange:C,scrollbarXEnabled:I,onScrollbarXEnabledChange:$,scrollbarY:k,onScrollbarYChange:z,scrollbarYEnabled:O,onScrollbarYEnabledChange:X,onCornerWidthChange:H,onCornerHeightChange:U,children:e.jsx(te.div,{dir:S,...p,ref:y,style:{position:"relative","--radix-scroll-area-corner-width":D+"px","--radix-scroll-area-corner-height":Y+"px",...t.style}})})});vt.displayName=Oe;var jt="ScrollAreaViewport",Ft=d.forwardRef((t,r)=>{const{__scopeScrollArea:l,children:a,nonce:s,...o}=t,p=_(jt,l),c=d.useRef(null),x=K(r,c,p.onViewportChange);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),e.jsx(te.div,{"data-radix-scroll-area-viewport":"",...o,ref:x,style:{overflowX:p.scrollbarXEnabled?"scroll":"hidden",overflowY:p.scrollbarYEnabled?"scroll":"hidden",...t.style},children:e.jsx("div",{ref:p.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});Ft.displayName=jt;var T="ScrollAreaScrollbar",yt=d.forwardRef((t,r)=>{const{forceMount:l,...a}=t,s=_(T,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:p}=s,c=t.orientation==="horizontal";return d.useEffect(()=>(c?o(!0):p(!0),()=>{c?o(!1):p(!1)}),[c,o,p]),s.type==="hover"?e.jsx(Ps,{...a,ref:r,forceMount:l}):s.type==="scroll"?e.jsx(As,{...a,ref:r,forceMount:l}):s.type==="auto"?e.jsx(Nt,{...a,ref:r,forceMount:l}):s.type==="always"?e.jsx(Me,{...a,ref:r}):null});yt.displayName=T;var Ps=d.forwardRef((t,r)=>{const{forceMount:l,...a}=t,s=_(T,t.__scopeScrollArea),[o,p]=d.useState(!1);return d.useEffect(()=>{const c=s.scrollArea;let x=0;if(c){const m=()=>{window.clearTimeout(x),p(!0)},g=()=>{x=window.setTimeout(()=>p(!1),s.scrollHideDelay)};return c.addEventListener("pointerenter",m),c.addEventListener("pointerleave",g),()=>{window.clearTimeout(x),c.removeEventListener("pointerenter",m),c.removeEventListener("pointerleave",g)}}},[s.scrollArea,s.scrollHideDelay]),e.jsx(ue,{present:l||o,children:e.jsx(Nt,{"data-state":o?"visible":"hidden",...a,ref:r})})}),As=d.forwardRef((t,r)=>{const{forceMount:l,...a}=t,s=_(T,t.__scopeScrollArea),o=t.orientation==="horizontal",p=he(()=>x("SCROLL_END"),100),[c,x]=Ss("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(c==="idle"){const m=window.setTimeout(()=>x("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(m)}},[c,s.scrollHideDelay,x]),d.useEffect(()=>{const m=s.viewport,g=o?"scrollLeft":"scrollTop";if(m){let v=m[g];const h=()=>{const j=m[g];v!==j&&(x("SCROLL"),p()),v=j};return m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,o,x,p]),e.jsx(ue,{present:l||c!=="hidden",children:e.jsx(Me,{"data-state":c==="hidden"?"hidden":"visible",...a,ref:r,onPointerEnter:W(t.onPointerEnter,()=>x("POINTER_ENTER")),onPointerLeave:W(t.onPointerLeave,()=>x("POINTER_LEAVE"))})})}),Nt=d.forwardRef((t,r)=>{const l=_(T,t.__scopeScrollArea),{forceMount:a,...s}=t,[o,p]=d.useState(!1),c=t.orientation==="horizontal",x=he(()=>{if(l.viewport){const m=l.viewport.offsetWidth<l.viewport.scrollWidth,g=l.viewport.offsetHeight<l.viewport.scrollHeight;p(c?m:g)}},10);return J(l.viewport,x),J(l.content,x),e.jsx(ue,{present:a||o,children:e.jsx(Me,{"data-state":o?"visible":"hidden",...s,ref:r})})}),Me=d.forwardRef((t,r)=>{const{orientation:l="vertical",...a}=t,s=_(T,t.__scopeScrollArea),o=d.useRef(null),p=d.useRef(0),[c,x]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=At(c.viewport,c.content),g={...a,sizes:c,onSizesChange:x,hasThumb:m>0&&m<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>p.current=0,onThumbPointerDown:h=>p.current=h};function v(h,j){return Ts(h,p.current,c,j)}return l==="horizontal"?e.jsx(Rs,{...g,ref:r,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollLeft,j=lt(h,c,s.dir);o.current.style.transform=`translate3d(${j}px, 0, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollLeft=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollLeft=v(h,s.dir))}}):l==="vertical"?e.jsx(_s,{...g,ref:r,onThumbPositionChange:()=>{if(s.viewport&&o.current){const h=s.viewport.scrollTop,j=lt(h,c);o.current.style.transform=`translate3d(0, ${j}px, 0)`}},onWheelScroll:h=>{s.viewport&&(s.viewport.scrollTop=h)},onDragScroll:h=>{s.viewport&&(s.viewport.scrollTop=v(h))}}):null}),Rs=d.forwardRef((t,r)=>{const{sizes:l,onSizesChange:a,...s}=t,o=_(T,t.__scopeScrollArea),[p,c]=d.useState(),x=d.useRef(null),m=K(r,x,o.onScrollbarXChange);return d.useEffect(()=>{x.current&&c(getComputedStyle(x.current))},[x]),e.jsx(St,{"data-orientation":"horizontal",...s,ref:m,sizes:l,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ge(l)+"px",...t.style},onThumbPointerDown:g=>t.onThumbPointerDown(g.x),onDragScroll:g=>t.onDragScroll(g.x),onWheelScroll:(g,v)=>{if(o.viewport){const h=o.viewport.scrollLeft+g.deltaX;t.onWheelScroll(h),_t(h,v)&&g.preventDefault()}},onResize:()=>{x.current&&o.viewport&&p&&a({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:x.current.clientWidth,paddingStart:me(p.paddingLeft),paddingEnd:me(p.paddingRight)}})}})}),_s=d.forwardRef((t,r)=>{const{sizes:l,onSizesChange:a,...s}=t,o=_(T,t.__scopeScrollArea),[p,c]=d.useState(),x=d.useRef(null),m=K(r,x,o.onScrollbarYChange);return d.useEffect(()=>{x.current&&c(getComputedStyle(x.current))},[x]),e.jsx(St,{"data-orientation":"vertical",...s,ref:m,sizes:l,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ge(l)+"px",...t.style},onThumbPointerDown:g=>t.onThumbPointerDown(g.y),onDragScroll:g=>t.onDragScroll(g.y),onWheelScroll:(g,v)=>{if(o.viewport){const h=o.viewport.scrollTop+g.deltaY;t.onWheelScroll(h),_t(h,v)&&g.preventDefault()}},onResize:()=>{x.current&&o.viewport&&p&&a({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:x.current.clientHeight,paddingStart:me(p.paddingTop),paddingEnd:me(p.paddingBottom)}})}})}),[Ds,wt]=bt(T),St=d.forwardRef((t,r)=>{const{__scopeScrollArea:l,sizes:a,hasThumb:s,onThumbChange:o,onThumbPointerUp:p,onThumbPointerDown:c,onThumbPositionChange:x,onDragScroll:m,onWheelScroll:g,onResize:v,...h}=t,j=_(T,l),[C,k]=d.useState(null),z=K(r,y=>k(y)),D=d.useRef(null),H=d.useRef(""),Y=j.viewport,U=a.content-a.viewport,I=V(g),$=V(x),O=he(v,10);function X(y){if(D.current){const S=y.clientX-D.current.left,M=y.clientY-D.current.top;m({x:S,y:M})}}return d.useEffect(()=>{const y=S=>{const M=S.target;C?.contains(M)&&I(S,U)};return document.addEventListener("wheel",y,{passive:!1}),()=>document.removeEventListener("wheel",y,{passive:!1})},[Y,C,U,I]),d.useEffect($,[a,$]),J(C,O),J(j.content,O),e.jsx(Ds,{scope:l,scrollbar:C,hasThumb:s,onThumbChange:V(o),onThumbPointerUp:V(p),onThumbPositionChange:$,onThumbPointerDown:V(c),children:e.jsx(te.div,{...h,ref:z,style:{position:"absolute",...h.style},onPointerDown:W(t.onPointerDown,y=>{y.button===0&&(y.target.setPointerCapture(y.pointerId),D.current=C.getBoundingClientRect(),H.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j.viewport&&(j.viewport.style.scrollBehavior="auto"),X(y))}),onPointerMove:W(t.onPointerMove,X),onPointerUp:W(t.onPointerUp,y=>{const S=y.target;S.hasPointerCapture(y.pointerId)&&S.releasePointerCapture(y.pointerId),document.body.style.webkitUserSelect=H.current,j.viewport&&(j.viewport.style.scrollBehavior=""),D.current=null})})})}),xe="ScrollAreaThumb",Ct=d.forwardRef((t,r)=>{const{forceMount:l,...a}=t,s=wt(xe,t.__scopeScrollArea);return e.jsx(ue,{present:l||s.hasThumb,children:e.jsx(ks,{ref:r,...a})})}),ks=d.forwardRef((t,r)=>{const{__scopeScrollArea:l,style:a,...s}
1=t,o=_(xe,l),p=wt(xe,l),{onThumbPositionChange:c}=p,x=K(r,v=>p.onThumbChange(v)),m=d.useRef(void 0),g=he(()=>{m.current&&(m.current(),m.current=void 0)},100);return d.useEffect(()=>{const v=o.viewport;if(v){const h=()=>{if(g(),!m.current){const j=Ls(v,c);m.current=j,c()}};return c(),v.addEventListener("scroll",h),()=>v.removeEventListener("scroll",h)}},[o.viewport,g,c]),e.jsx(te.div,{"data-state":p.hasThumb?"visible":"hidden",...s,ref:x,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:W(t.onPointerDownCapture,v=>{const j=v.target.getBoundingClientRect(),C=v.clientX-j.left,k=v.clientY-j.top;p.onThumbPointerDown({x:C,y:k})}),onPointerUp:W(t.onPointerUp,p.onThumbPointerUp)})});Ct.displayName=xe;var ze="ScrollAreaCorner",Pt=d.forwardRef((t,r)=>{const l=_(ze,t.__scopeScrollArea),a=!!(l.scrollbarX&&l.scrollbarY);return l.type!=="scroll"&&a?e.jsx(Es,{...t,ref:r}):null});Pt.displayName=ze;var Es=d.forwardRef((t,r)=>{const{__scopeScrollArea:l,...a}=t,s=_(ze,l),[o,p]=d.useState(0),[c,x]=d.useState(0),m=!!(o&&c);return J(s.scrollbarX,()=>{const g=s.scrollbarX?.offsetHeight||0;s.onCornerHeightChange(g),x(g)}),J(s.scrollbarY,()=>{const g=s.scrollbarY?.offsetWidth||0;s.onCornerWidthChange(g),p(g)}),m?e.jsx(te.div,{...a,ref:r,style:{width:o,height:c,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function me(t){return t?parseInt(t,10):0}function At(t,r){const l=t/r;return isNaN(l)?0:l}function ge(t){const r=At(t.viewport,t.content),l=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=(t.scrollbar.size-l)*r;return Math.max(a,18)}function Ts(t,r,l,a="ltr"){const s=ge(l),o=s/2,p=r||o,c=s-p,x=l.scrollbar.paddingStart+p,m=l.scrollbar.size-l.scrollbar.paddingEnd-c,g=l.content-l.viewport,v=a==="ltr"?[0,g]:[g*-1,0];return Rt([x,m],v)(t)}function lt(t,r,l="ltr"){const a=ge(r),s=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,o=r.scrollbar.size-s,p=r.content-r.viewport,c=o-a,x=l==="ltr"?[0,p]:[p*-1,0],m=ls(t,x);return Rt([0,p],[0,c])(m)}function Rt(t,r){return l=>{if(t[0]===t[1]||r[0]===r[1])return r[0];const a=(r[1]-r[0])/(t[1]-t[0]);return r[0]+a*(l-t[0])}}function _t(t,r){return t>0&&t<r}var Ls=(t,r=()=>{})=>{let l={left:t.scrollLeft,top:t.scrollTop},a=0;return(function s(){const o={left:t.scrollLeft,top:t.scrollTop},p=l.left!==o.left,c=l.top!==o.top;(p||c)&&r(),l=o,a=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(a)};function he(t,r){const l=V(t),a=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(a.current),[]),d.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(l,r)},[l,r])}function J(t,r){const l=V(r);as(()=>{let a=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(l)});return s.observe(t),()=>{window.cancelAnimationFrame(a),s.unobserve(t)}}},[t,l])}var Is=vt,Os=Ft,Ms=Pt;function zs({className:t,children:r,...l}){return e.jsxs(Is,{"data-loc":"client/src/components/ui/scroll-area.tsx:12","data-slot":"scroll-area",className:nt("relative",t),...l,children:[e.jsx(Os,{"data-loc":"client/src/components/ui/scroll-area.tsx:17","data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:r}),e.jsx(Hs,{"data-loc":"client/src/components/ui/scroll-area.tsx:23"}),e.jsx(Ms,{"data-loc":"client/src/components/ui/scroll-area.tsx:24"})]})}function Hs({className:t,orientation:r="vertical",...l}){return e.jsx(yt,{"data-loc":"client/src/components/ui/scroll-area.tsx:35","data-slot":"scroll-area-scrollbar",orientation:r,className:nt("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t),...l,children:e.jsx(Ct,{"data-loc":"client/src/components/ui/scroll-area.tsx:48","data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const Ee={},Te={},Le={};for(const t of mt){Le[t.id]=t.title.replace(/^\d+\.\s*/,"");for(const r of t.criteria)Ee[`${t.id}.${r.id}`]=r.label,Ee[r.id]=r.label;if(t.signs)for(const r of t.signs)Te[`${t.id}.${r.id}`]=r.label,Te[r.id]=r.label}function rt(t,r){if(r[t])return r[t];const l=t.split(".");return l.length===2&&r[l[1]]?r[l[1]]:t.replace(/_/g," ").replace(/\./g," ⺠").replace(/\b\w/g,a=>a.toUpperCase())}function Us(t){const r=[{value:"homme",display:t("clients.genderMale")},{value:"femme",display:t("clients.genderFemale")},{value:"autre",display:t("clients.genderOther")}];return{gender:{label:t("feed.filters.genderLabel"),field:"clientGender",options:r},chiefComplaint:{label:"Motif principal",field:"assessment.chief_complaint",options:["Fatigue","Digestion","Stress/Anxiété","Sommeil","Poids","Hormonal","Douleurs
1/Inflammation","Immunité","Peau","Optimisation vitalité"].map(l=>({value:l,display:l}))},sleepIssues:{label:"Sommeil (symptômes)",field:"assessment.sleep",options:[{value:"sleep_onset",display:"Difficulté d'endormissement"},{value:"sleep_awakenings",display:"Réveils nocturnes"},{value:"sleep_early_wake",display:"Réveil trop tôt"},{value:"sleep_non_restorative",display:"Sommeil non réparateur"},{value:"sleep_day_sleepiness",display:"Somnolence diurne"},{value:"sleep_snoring",display:"Ronflements / apnée"}]},digestionIssues:{label:"Digestion (symptômes)",field:"assessment.digestion",options:[{value:"dig_bloating",display:"Ballonnements"},{value:"dig_reflux",display:"Reflux / brûlures"},{value:"dig_gas",display:"Gaz / flatulences"},{value:"dig_abdominal_pain",display:"Douleurs abdominales"},{value:"dig_constipation",display:"Constipation"},{value:"dig_diarrhea",display:"Diarrhée"},{value:"dig_irregular_transit",display:"Transit irrégulier"}]},stressIssues:{label:"Stress & mental",field:"assessment.stress",options:[{value:"psy_rumination",display:"Rumination"},{value:"psy_irritability",display:"Irritabilité"},{value:"psy_anxiety",display:"Anxiété"},{value:"psy_overload",display:"Surcharge mentale"},{value:"psy_disconnect",display:"Difficulté à déconnecter"},{value:"psy_low_mood",display:"Humeur basse"}]},nutritionProfile:{label:"Alimentation",field:"assessment.nutrition",options:[{value:"nut_snacking",display:"Grignotage"},{value:"nut_sugar_daily",display:"Sucré quotidien"},{value:"nut_ultra_processed",display:"Ultra-transformés"}]},movementProfile:{label:"Activité physique",field:"assessment.movement",options:[{value:"mov_sedentary",display:"Sédentarité"},{value:"mov_joint_pain",display:"Douleurs articulaires"},{value:"mov_slow_recovery",display:"Récupération lente"}]},immunityIssues:{label:"Immunité & inflammation",field:"assessment.immunity",options:[{value:"imm_infections",display:"Infections répétées"},{value:"imm_allergies",display:"Allergies"},{value:"imm_inflammation_pain",display:"Inflammation / douleurs"}]},hormonalIssues:{label:"Système hormonal",field:"assessment.hormonal",options:[{value:"f_cycle_irregular",display:"Cycle irrégulier"},{value:"f_period_pain",display:"Douleurs de règles"},{value:"f_pms",display:"SPM"},{value:"m_low_libido",display:"Baisse de libido"}]},skinIssues:{label:"Peau, cheveux & ongles",field:"assessment.skin",options:[{value:"emu_skin_issues",display:"Problèmes de peau"}]},reportGlobalLevel:{label:"Niveau de vitalité global",field:"report.globalLevel",options:[{value:"1",display:"1 â Très faible"},{value:"2",display:"2 â Faible"},{value:"3",display:"3 â Moyen"},{value:"4",display:"4 â Bon"},{value:"5",display:"5 â Excellent"}]},reportPrioritySystems:{label:"Systèmes prioritaires (bilan)",field:"report.prioritySystems",options:mt.map(l=>({value:l.id,display:l.title.replace(/^\d+\.\s*/,"")}))}}}function Dt(t){if(!t)return null;const r=String(t).trim();if(!r)return null;try{const l=JSON.parse(r);return typeof l=="object"&&l!==null?l:{recommendations:r}}catch{return{recommendations:r}}}function $s(t){const r=Dt(t);if(!r)return"";const l=[];return r.objectives&&l.push(r.objectives),r.recommendations&&l.push(r.recommendations),l.join(" â ")}const kt={nutrition:ft,physicalActivity:ht,stressManagement:it,sleepHygiene:gt,naturalSupport:G},pe=["nutrition","physicalActivity","stressManagement","sleepHygiene","naturalSupport"];function Sa(){const{t}=B(),r=d.useMemo(()=>Us(t),[t]),l=w.useUtils(),{user:a}=rs(),{data:s,isLoading:o}=w.feed.list.useQuery(),p=w.feed.markSeen.useMutation({onSuccess:()=>{l.feed.newCount.invalidate()}}),c=w.community.markSeen.useMutation({onSuccess:()=>{l.community.unreadRepliesCount?.invalidate?.()}});d.useEffect(()=>{a&&s&&(p.mutate(),c.mutate())},[a,!!s]);const x=w.feed.toggleReaction.useMutation({onSuccess:()=>{l.feed.list.invalidate(),l.tutorial.getProgress.invalidate()},onError:()=>{E.error(t("feed.reactionError"))}}),m=w.hygieneProgram.unpublish.useMutation({onSuccess:()=>{l.feed.list.invalidate(),E.success(t("feed.unpublishSuccess","Publication retirée du fil d'actualité"))},onError:()=>{E.error(t("feed.unpublishError","Erreur lors de la dépublication"))}}
1),g=a?.role==="admin",[v,h]=d.useState(!1),[j,C]=d.useState(""),[k,z]=d.useState(""),[D,H]=d.useState({}),[Y,U]=d.useState(null),{data:I,isLoading:$}=w.community.list.useQuery({limit:20,offset:0}),[O,X]=d.useState(null),{data:y}=w.community.getReplies.useQuery({postId:O},{enabled:O!==null}),S=w.community.create.useMutation({onSuccess:()=>{l.community.list.invalidate(),h(!1),C(""),z(""),E.success("Publication envoyée à la communauté !")},onError:()=>{E.error("Erreur lors de la publication.")}}),M=w.community.like.useMutation({onSuccess:()=>{l.community.list.invalidate()}}),fe=w.community.addReply.useMutation({onSuccess:(u,n)=>{l.community.list.invalidate(),l.community.getReplies.invalidate({postId:n.postId}),H(f=>({...f,[n.postId]:""})),U(null),E.success("Réponse ajoutée !")},onError:()=>{E.error("Erreur lors de la réponse.")}}),Et=w.community.delete.useMutation({onSuccess:()=>{l.community.list.invalidate(),E.success("Publication supprimée.")}}),Tt=[{label:"Anamnèses",value:"anamneses"},{label:"Bilans de vitalité",value:"bilans_vitalite"},{label:"Programmes",value:"programmes"},{label:"Interactions médicamenteuses",value:"interactions_medicamenteuses"},{label:"Cas client",value:"cas_client"},{label:"Ressources",value:"ressources"},{label:"Autre",value:"autre"}],[re,Lt]=d.useState(""),[,It]=ct(),[Ot,ne]=d.useState(!1),[Mt,zt]=d.useState(new Set(["gender"])),[q,He]=d.useState({}),[be,Ht]=d.useState("recent"),[Ut,$t]=d.useState(null),[Vt,Ue]=d.useState(null),[$e,Ve]=d.useState(null),[We,Be]=d.useState(null),[Ye,ve]=d.useState(null),[je,Xe]=d.useState({alimentation:"",activitePhysique:"",gestionStress:"",hygieneSommeil:"",soutienNaturel:""}),Fe=w.comment.createOnProgram.useMutation({onSuccess:()=>{l.feed.list.invalidate(),l.comment.listByProgram.invalidate(),Xe({alimentation:"",activitePhysique:"",gestionStress:"",hygieneSommeil:"",soutienNaturel:""}),Ue(null),E.success(t("feedDetail.vitalityAssessmentAdded"))},onError:()=>{E.error(t("feed.reactionError"))}}),[qe,Ge]=d.useState(null),[Wt,Bt]=d.useState(!1),[Yt,Gs]=d.useState(""),{data:Xt}=w.subscription.getCurrentUsage.useQuery(),qt=Xt?.plan??"etudiant",[Qs,Gt]=d.useState(()=>{try{const u=localStorage.getItem("vitagram_viewed_diagnostics");return u?new Set(JSON.parse(u)):new Set}catch{return new Set}}),Qt=d.useCallback(u=>{Gt(n=>{const f=new Set(n);f.add(u);try{localStorage.setItem("vitagram_viewed_diagnostics",JSON.stringify(Array.from(f)))}catch{}return f})},[]),ye=d.useCallback((u,n,f)=>{u.stopPropagation(),x.mutate({programId:n,reactionType:f})},[x]),Jt=u=>{zt(n=>{const f=new Set(n);return f.has(u)?f.delete(u):f.add(u),f})},Qe=(u,n)=>{He(f=>{const F={...f};return F[u]?F[u]=new Set(F[u]):F[u]=new Set,F[u].has(n)?F[u].delete(n):F[u].add(n),F[u].size===0&&delete F[u],F})},Kt=()=>He({}),ce=Object.values(q).reduce((u,n)=>u+n.size,0),Ne=d.useMemo(()=>s?s.filter(n=>{if(re){const f=re.toLowerCase();if(!`${n.title} ${n.clientCode} ${n.authorName} ${n.nutrition??""} ${n.physicalActivity??""} ${n.stressManagement??""} ${n.sleepHygiene??""} ${n.naturalSupport??""}`.toLowerCase().includes(f))return!1}for(const[f,F]of Object.entries(q)){if(F.size===0)continue;const A=r[f];if(A){if(A.field==="clientGender"){const i=(n.clientGender??"").toLowerCase();if(!i||!Array.from(F).some(N=>i===N.toLowerCase()))return!1}else if(A.field==="assessment.chief_complaint"){const i=n.assessmentResponses;if(!i)return!1;const b=i.chief_complaint;if(!b||!Array.from(F).some(P=>b===P))return!1}else if(A.field.startsWith("assessment.")){const i=n.assessmentResponses;if(!i||!Array.from(F).some(P=>{const R=i[P];return R==null?!1:typeof R=="number"?R>=2:typeof R=="string"?R!==""&&R!=="Non"&&R!=="0":!1}))return!1}else if(A.field==="report.globalLevel"){const i=n.reportGlobalLevel;if(i==null||!Array.from(F).some(N=>String(i)===N))return!1}else if(A.field==="report.prioritySystems"){const i=n.reportPrioritySystems;if(!i||!Array.isArray(i)||!Array.from(F).some(N=>i.includes(N)))return!1}}}return!0}).sort((n,f)=>{switch(be){case"recent":return new Date(f.publishedAt).getTime()-new Date(n.publishedAt).getTime();case"oldest":return new Date(n.publishedAt).getTime()-new Date(f.publishedAt).getTime();case"comments":return(f.commentCount??0)-(n.commentCount??0);case"diagnostics":return(f.diagnosticCount??0)-(n.diagnosticCount??0);default:return 0}}):[],[s,re,q,be,r]),we=d.useMemo(()=>{const u=[];
1if(I)for(const n of I)u.push({type:"post",date:new Date(n.createdAt).getTime(),post:n});for(const n of Ne)u.push({type:"program",date:new Date(n.publishedAt).getTime(),program:n});return u.sort((n,f)=>f.date-n.date),u},[I,Ne]),Je=u=>e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:477",className:`${u?"":"hidden md:block"}`,children:e.jsxs(ke,{"data-loc":"client/src/pages/Feed.tsx:478",className:`overflow-hidden ${u?"border-0 rounded-none":"border-gold/10"}`,children:[e.jsxs(ms,{"data-loc":"client/src/pages/Feed.tsx:479",className:`flex-row items-center justify-between ${u?"px-4":"px-5"}`,children:[e.jsxs(us,{"data-loc":"client/src/pages/Feed.tsx:480",className:"text-base font-heading text-navy flex items-center gap-2",children:[e.jsx(Ae,{"data-loc":"client/src/pages/Feed.tsx:481",className:"h-4 w-4"}),t("feed.filters.title")]}),ce>0&&e.jsx(L,{"data-loc":"client/src/pages/Feed.tsx:485",variant:"ghost",size:"sm",onClick:Kt,className:"text-xs text-muted-foreground hover:text-navy",children:t("feed.filters.clearAll")})]}),e.jsx(gs,{"data-loc":"client/src/pages/Feed.tsx:490",className:"bg-gold/10"}),e.jsx(zs,{"data-loc":"client/src/pages/Feed.tsx:491",className:u?"h-[calc(100vh-180px)]":"h-[calc(100vh-240px)]",children:e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:492",className:"divide-y divide-gold/10",children:Object.entries(r).map(([n,f])=>{const F=Mt.has(n),A=q[n]?.size??0;return e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:497",className:"border-b border-gold/10 last:border-b-0",children:[e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:498",onClick:()=>Jt(n),className:"flex items-center justify-between w-full px-4 py-3.5 text-left hover:bg-gold/5 transition-colors",children:[e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:502",className:"text-sm font-medium text-navy flex items-center gap-2",children:[f.label,A>0&&e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:505",className:"bg-gradient-to-r from-purple-500 to-pink-500 text-white text-xs px-1.5 py-0.5 rounded-full min-w-[20px] text-center",children:A})]}),F?e.jsx(at,{"data-loc":"client/src/pages/Feed.tsx:511",className:"h-4 w-4 text-muted-foreground"}):e.jsx(pt,{"data-loc":"client/src/pages/Feed.tsx:513",className:"h-4 w-4 text-muted-foreground"})]}),F&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:517",className:"px-4 pb-3 space-y-2",children:f.options.map(i=>{const b=q[n]?.has(i.value)??!1;return e.jsxs("label",{"data-loc":"client/src/pages/Feed.tsx:521",className:"flex items-center gap-3 cursor-pointer group py-1",children:[e.jsx(fs,{"data-loc":"client/src/pages/Feed.tsx:525",checked:b,onCheckedChange:()=>Qe(n,i.value),className:"border-gold/30 data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-purple-500 data-[state=checked]:to-pink-500 data-[state=checked]:border-purple-500"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:530",className:"text-sm text-foreground group-hover:text-navy transition-colors",children:i.display})]},i.value)})})]},n)})})}),u&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:544",className:"p-4 border-t border-gold/10 bg-white",children:e.jsx(L,{"data-loc":"client/src/pages/Feed.tsx:545",onClick:()=>ne(!1),className:"w-full bg-gradient-to-r from-purple-600 via-pink-500 to-orange-400 text-white hover:opacity-90",children:t("feed.filters.seeResults",{count:Ne.length})})})]})}),Zt=u=>{let n=0;for(const f of pe)u[f]&&String(u[f]).trim().length>0&&n++;return n};return e.jsxs(ns,{"data-loc":"client/src/pages/Feed.tsx:567",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:568",className:"grid grid-cols-1 md:grid-cols-[280px_1fr] lg:grid-cols-[320px_1fr] gap-6 items-start",children:[Je(!1),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:573",className:"w-full space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:575",className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:576",className:"flex items-center gap-2",children:e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:577",className:"relative w-full max-w-xs",children:[e.jsx(cs,{"data-loc":"client/src/pages/Feed.tsx:578",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(os,{"data-loc":"client/src/pages/Feed.tsx:579",placeholder:t("feed.searchPlaceholder"),value:re,onChange:u=>Lt(u.target.value),className:"pl-10"})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:588",className:"flex items-center gap-2",children:[e.jsxs(Ke,{"data-loc":"client/src/pages/Feed.tsx:589",value:be,onValueChange:u=>Ht(u),children:[e.jsxs(Ze,{"data-loc":"client/src/pages/Feed.tsx:590",className:"w-auto text-xs","data-tutorial":"sort-feed",children:[e.jsx(js,{"data-loc":"client/src/pages/Feed.tsx:591",className:"h-3 w-3 mr-2"}),e.jsx(et,{"data-loc":"client/src/pages/Feed.tsx:592",placeholder:t("feed.sort.placeholder")})]}),e.jsxs(tt,{"data-loc":"client/src/pages/Feed.tsx:594",children:[e.jsx(Z,{"data-loc":"client/src/pages/Feed.tsx:595",value:"recent",children:t("feed.sort.recent")}
1),e.jsx(Z,{"data-loc":"client/src/pages/Feed.tsx:596",value:"oldest",children:t("feed.sort.oldest")}),e.jsx(Z,{"data-loc":"client/src/pages/Feed.tsx:597",value:"comments",children:t("feed.sort.comments")}),e.jsx(Z,{"data-loc":"client/src/pages/Feed.tsx:598",value:"diagnostics",children:t("feed.sort.diagnostics")})]})]}),e.jsxs(L,{"data-loc":"client/src/pages/Feed.tsx:603",variant:"outline",size:"icon",onClick:()=>ne(!0),className:"md:hidden relative",children:[e.jsx(Ae,{"data-loc":"client/src/pages/Feed.tsx:609",className:"h-4 w-4"}),ce>0&&e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:611",className:"absolute -top-1 -right-1 h-4 w-4 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white text-[10px] flex items-center justify-center border-2 border-background",children:ce})]})]})]}),Ot&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:621",className:"fixed inset-0 bg-black/40 z-40 md:hidden",onClick:()=>ne(!1),children:e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:622",className:"absolute inset-y-0 left-0 w-full max-w-sm bg-stone-50 shadow-lg flex flex-col",onClick:u=>u.stopPropagation(),children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:623",className:"flex items-center justify-between px-4 py-3 border-b border-gold/10 bg-white",children:[e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:624",className:"text-base font-heading text-navy flex items-center gap-2",children:[e.jsx(Ae,{"data-loc":"client/src/pages/Feed.tsx:625",className:"h-4 w-4"}),t("feed.filters.title")]}),e.jsx(L,{"data-loc":"client/src/pages/Feed.tsx:628",variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>ne(!1),children:e.jsx(Se,{"data-loc":"client/src/pages/Feed.tsx:629",className:"h-5 w-5"})})]}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:632",className:"flex-1 overflow-hidden",children:Je(!0)})]})}),ce>0&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:641",className:"flex flex-wrap gap-2",children:Object.entries(q).map(([u,n])=>Array.from(n).map(f=>e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:644",onClick:()=>Qe(u,f),className:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs bg-purple-50 text-purple-700 border border-purple-200 hover:bg-purple-100 transition-colors",children:[f,e.jsx(Se,{"data-loc":"client/src/pages/Feed.tsx:650",className:"h-3 w-3"})]},`${u}-${f}`)))}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:658",className:"flex items-center justify-between",children:[e.jsxs("h2",{"data-loc":"client/src/pages/Feed.tsx:659",className:"font-heading text-base font-semibold text-navy flex items-center gap-2",children:[e.jsx(Re,{"data-loc":"client/src/pages/Feed.tsx:660",className:"h-4 w-4 text-gold"}),"Communauté"]}),e.jsxs(L,{"data-loc":"client/src/pages/Feed.tsx:663",size:"sm",onClick:()=>h(u=>!u),className:"bg-navy text-cream hover:bg-navy/90 gap-1.5 text-xs",children:[e.jsx(is,{"data-loc":"client/src/pages/Feed.tsx:668",className:"h-3.5 w-3.5"}),"Publier"]})]}),v&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:675",className:"bg-white rounded-lg border border-gold/20 p-4 space-y-3",children:[e.jsxs(Ke,{"data-loc":"client/src/pages/Feed.tsx:676",value:j,onValueChange:C,children:[e.jsx(Ze,{"data-loc":"client/src/pages/Feed.tsx:677",className:"text-sm",children:e.jsx(et,{"data-loc":"client/src/pages/Feed.tsx:678",placeholder:"Choisir un thème..."})}),e.jsx(tt,{"data-loc":"client/src/pages/Feed.tsx:680",children:Tt.map(u=>e.jsx(Z,{"data-loc":"client/src/pages/Feed.tsx:682",value:u.value,children:u.label},u.value))})]}),e.jsx(Ce,{"data-loc":"client/src/pages/Feed.tsx:686",placeholder:"Partagez une question, un cas client, une ressource... (max 500 caractères)",value:k,onChange:u=>z(u.target.value.slice(0,500)),rows:3,className:"text-sm resize-none"}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:693",className:"flex items-center justify-between",children:[e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:694",className:"text-xs text-muted-foreground",children:[k.length,"/500"]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:695",className:"flex gap-2",children:[e.jsx(L,{"data-loc":"client/src/pages/Feed.tsx:696",variant:"outline",size:"sm",onClick:()=>{h(!1),C(""),z("")},children:"Annuler"}),e.jsxs(L,{"data-loc":"client/src/pages/Feed.tsx:699",size:"sm",disabled:!j||k.trim().length<10||S.isPending,onClick:()=>
1S.mutate({theme:j,content:k.trim()}),className:"bg-navy text-cream hover:bg-navy/90",children:[S.isPending?e.jsx(ds,{"data-loc":"client/src/pages/Feed.tsx:705",className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Pe,{"data-loc":"client/src/pages/Feed.tsx:705",className:"h-3.5 w-3.5"}),"Envoyer"]})]})]})]}),o||$?e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:715",className:"text-center py-12 text-muted-foreground",children:t("feed.loading")}):we.length===0?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:717",className:"text-center py-16",children:[e.jsx(ps,{"data-loc":"client/src/pages/Feed.tsx:718",className:"h-12 w-12 text-gold/40 mx-auto mb-4"}),e.jsx("h3",{"data-loc":"client/src/pages/Feed.tsx:719",className:"font-heading text-lg font-semibold text-navy mb-2",children:t("feed.noProgramsFound")}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:720",className:"text-muted-foreground text-sm",children:t("feed.noProgramsFoundWithoutFilters")})]}):e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:723",className:"space-y-4",children:[e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:724",className:"text-sm text-muted-foreground",children:[we.length," publications"]}),we.map(u=>{if(u.type==="post"){const i=u.post;return e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:729",className:"bg-white rounded-lg border border-gold/15 p-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:731",className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:732",className:"flex items-center gap-2.5",children:[e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:733",className:"h-8 w-8 rounded-full bg-navy/10 flex items-center justify-center text-navy font-semibold text-xs flex-shrink-0",children:(i.author?.name||"?").split(" ").map(b=>b[0]).join("").slice(0,2).toUpperCase()}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:736",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:737",className:"text-sm font-semibold text-navy leading-tight",children:i.author?.name}),e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:738",className:"text-xs text-muted-foreground",children:[i.author?.status||"Naturopathe"," · ",new Date(i.createdAt).toLocaleDateString("fr-FR",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:741",className:"flex items-center gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:742",className:"inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium bg-gold/10 text-gold border border-gold/20",children:i.themeLabel}),(g||i.userId===a?.id)&&e.jsx("button",{"data-loc":"client/src/pages/Feed.tsx:744",onClick:()=>{confirm("Supprimer cette publication ?")&&Et.mutate({postId:i.id})},className:"ml-1 p-1 rounded text-red-400 hover:text-red-600 hover:bg-red-50 transition-colors",children:e.jsx(Fs,{"data-loc":"client/src/pages/Feed.tsx:748",className:"h-3.5 w-3.5"})})]})]}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:755",className:"text-sm text-foreground leading-relaxed",children:i.content}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:758",className:"flex items-center gap-4 pt-1",children:[e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:759",onClick:()=>M.mutate({postId:i.id}),className:`flex items-center gap-1.5 text-xs transition-colors ${i.likedByMe?"text-red-500":"text-muted-foreground hover:text-red-400"}`,children:[e.jsx(_e,{"data-loc":"client/src/pages/Feed.tsx:765",className:`h-3.5 w-3.5 ${i.likedByMe?"fill-current":""}`}),i.likesCount," j'aime"]}),e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:768",onClick:()=>{const b=Y===i.id?null:i.id;U(b),X(b)},className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-navy transition-colors",children:[e.jsx(De,{"data-loc":"client/src/pages/Feed.tsx:776",className:"h-3.5 w-3.5"}),i.repliesCount," réponse",i.repliesCount!==1?"s":""]})]}),O===i.id&&y&&y.length>0&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:783",className:"space-y-2 pt-1 border-t border-gold/10",children:y.map(b=>e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:785",className:"flex gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:786",className:"h-6 w-6 rounded-full bg-gold/10 flex items-center justify-center text-gold font-semibold text-[10px] flex-shrink-0 mt-0.5",children:(b.author?.name||"?").split(" ").map(N=>N[0]).join("").slice(0,2).toUpperCase()}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:789",className:"flex-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:790",className:"text-xs font-semibold text-navy",children:[b.author?.name," ",e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:790",className:"font-normal text-muted-foreground",children:["· ",new Date(b.createdAt).toLocaleDateString("fr-FR",{day:"numeric",month:"short"})]})]}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:791",className:"text-xs text-foreground",children:b.content})]})]},b.id))}),Y===i.id&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:800",className:"flex gap-2 pt-1",children:[e.jsx(Ce,{"data-loc":"client/src/pages/Feed.tsx:801",placeholder:"Votre réponse...",value:D[i.id]||"",onChange:b=>H(N=>({...N,[i.id]:b.target.value.slice(0,300)})),rows:2,className:"text-xs resize-none flex-1"}),e.jsx(L,{"data-loc":"client/src/pages/Feed.tsx:808",size:"sm",disabled:!(D[i.id]||"").trim()||fe.isPending,onClick:()=>fe.mutate({postId:i.id,content:(D[i.id]||"").trim()}),className:"bg-navy text-cream hover:bg-navy/90 self-end",children:e.jsx(Pe,{"data-loc":"client/src/pages/Feed.tsx:814",className:"h-3.5 w-3.5"})})]})]},`post-${i.id}`)}const n=u.program,f=Zt(n),F=Ut===n.id,A=Vt===n.id;return e.jsxs(ke,{"data-loc":"client/src/pages/Feed.tsx:828",className:"border-gold/15 hover:shadow-sm transition-shadow",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:833",className:"mx-4 mt-4 mb-2 p-3 rounded-lg bg-cream/60 border border-gold/15 relative",children:[g&&e.jsx("button",{"data-loc":"client/src/pages/Feed.tsx:835",onClick:i=>{i.stopPropagation(),confirm(t("feed.unpublishConfirm","Retirer cette publication du fil d'actualité ?"))&&m.mutate({id:n.id})},className:"absolute top-2 right-2 p-1 rounded-full bg-red-50 hover:bg-red-100 text-red-500 hover:text-red-700 transition-colors",title:t("feed.unpublish","Dépublier"),children:e.jsx(Se,{"data-loc":"client/src/pages/Feed.tsx:845",className:"h-3.5 w-3.5"})}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:848",className:"flex items-center gap-3",children:[n.authorAvatarUrl?e.jsx("img",{"data-loc":"client/src/pages/Feed.tsx:850",loading:"lazy",src:n.authorAvatarUrl,alt:n.authorName??"",className:"w-11 h-11 rounded-full object-cover shrink-0 ring-2 ring-gold/20"}):e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:856",className:"w-11 h-11 rounded-full bg-navy/10 flex items-center justify-center shrink-0 ring-2 ring-gold/20",children:e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:857",className:"text-sm font-bold text-navy",children:n.authorName?.charAt(0)?.toUpperCase()??"N"})}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:862",className:"flex-1 min-w-0",children:e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:863",className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:864",className:"font-semibold text-navy text-sm",children:n.authorName??t("feed.item.naturopath")}),(n.authorReputation??0)>0&&e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:866",className:"inline-flex items-center gap-0.5 text-[10px] text-amber-600 bg-amber-50 px-1.5 py-0.5 rounded-full",children:[e.jsx(Ie,{"data-loc":"client/src/pages/Feed.tsx:867",className:"h-2.5 w-2.5"}),n.authorReputation]}),e.jsx(xt,{"data-loc":"client/src/pages/Feed.tsx:871",status:n.authorNaturoStatus,isVerified:n.authorIsCertificateVerified,plan:n.authorPlan}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:876",className:"text-[10px] text-muted-foreground",children:"·"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:877",className:"text-xs text-muted-foreground",children:n.publishedAt?new Date(n.publishedAt).toLocaleDateString(Q(),{day:"numeric",month:"short"}):""})]})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:887",className:"px-4 pb-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:888",className:"font-heading text-base text-navy font-semibold leading-tight",children:n.title}),(()=>{const i=pe.map(P=>$s(n[P])).find(P=>P&&P.length>0);if(!i)return null;const b=150,N=i.length>b;return e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:898",className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:[N?i.slice(0,b)+"â¦":i,N&&e.jsx("button",{"data-loc":"client/src/pages/Feed.tsx:901",onClick:P=>{P.stopPropagation(),ve(n.id)},className:"ml-1 text-purple-600 hover:text-purple-800 font-medium",children:t("feed.item.seeMore","Voir plus")})]})})()]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:914",className:"px-4 pb-2 flex flex-wrap items-center gap-2",children:[n.assessmentId&&e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:916",onClick:i=>{i.stopPropagation(),Ve(n.id)},className:"inline-flex items-center gap-1.5 text-[11px] px-2.5 py-1 rounded-full bg-blue-50 text-blue-700 border border-blue-200 hover:bg-blue-100 transition-colors",title:t("feed.item.viewAnamnesis"),children:[e.jsx(ee,{"data-loc":"client/src/pages/Feed.tsx:921",className:"h-3 w-3"}),e.jsx(ot,{"data-loc":"client/src/pages/Feed.tsx:922",className:"h-3 w-3"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:923",children:t("feed.item.anamnesis")})]}),n.vitalityReportId&&e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:927",onClick:i=>{i.stopPropagation(),Be(n.id)},className:"inline-flex items-center gap-1.5 text-[11px] px-2.5 py-1 rounded-full bg-purple-50 text-purple-700 border border-purple-200 hover:bg-purple-100 transition-colors",title:t("feed.item.viewVitalityReport"),children:[e.jsx(ee,{"data-loc":"client/src/pages/Feed.tsx:932",className:"h-3 w-3"}),e.jsx(ut,{"data-loc":"client/src/pages/Feed.tsx:933",className:"h-3 w-3"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:934",children:t("feed.item.vitalityReport")})]}),e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:937",onClick:i=>{i.stopPropagation(),ve(n.id)},className:"inline-flex items-center gap-1.5 text-[11px] px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-700 border border-emerald-200 hover:bg-emerald-100 transition-colors",title:t("feed.item.viewProgramPopup"),
1children:[e.jsx(ee,{"data-loc":"client/src/pages/Feed.tsx:942",className:"h-3 w-3"}),e.jsx(G,{"data-loc":"client/src/pages/Feed.tsx:943",className:"h-3 w-3"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:944",children:t("feed.item.viewProgramPopup")})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:949",className:"px-4 pb-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:950",className:"text-xs text-muted-foreground mb-1.5",children:t("feed.item.axesChosenBy")}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:951",className:"flex flex-wrap gap-1.5",children:pe.map(i=>{const b=kt[i];return n[i]&&String(n[i]).trim().length>0?e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:957",className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full bg-emerald-50 text-emerald-700 border border-emerald-200",children:[e.jsx(b,{"data-loc":"client/src/pages/Feed.tsx:961",className:"h-3.5 w-3.5"}),t(`hygienePrograms.sections.${i}`)]},i):null})}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:967",className:"flex items-center gap-1.5 mt-2",children:e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:968",className:`text-[10px] font-bold px-1.5 py-0.5 rounded-full ${f>=4?"bg-green-100 text-green-700":f>=2?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700"}`,children:[f,"/5 ",t("hygienePrograms.sectionsCompleted")]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:979",className:"px-4 pb-2 flex items-center gap-1.5 flex-wrap",children:[e.jsxs(oe,{"data-loc":"client/src/pages/Feed.tsx:980",children:[e.jsx(ie,{"data-loc":"client/src/pages/Feed.tsx:981",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:982","data-tutorial":"react-post",onClick:i=>ye(i,n.id,"like"),className:`inline-flex items-center gap-0.5 px-2.5 py-1 rounded-full text-xs transition-all hover:scale-105 ${n.userReactions?.includes("like")?"bg-blue-200 text-blue-800 ring-1 ring-blue-300":"bg-blue-50 text-blue-600 hover:bg-blue-100"}`,children:[e.jsx(dt,{"data-loc":"client/src/pages/Feed.tsx:987",className:`h-3.5 w-3.5 ${n.userReactions?.includes("like")?"fill-current":""}`}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:988",className:"font-medium",children:n.reactions?.like??0})]})}),e.jsx(de,{"data-loc":"client/src/pages/Feed.tsx:991",children:t("feed.tooltipLike","J'approuve ce programme")})]}),e.jsxs(oe,{"data-loc":"client/src/pages/Feed.tsx:993",children:[e.jsx(ie,{"data-loc":"client/src/pages/Feed.tsx:994",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:995",onClick:i=>ye(i,n.id,"dislike"),className:`inline-flex items-center gap-0.5 px-2.5 py-1 rounded-full text-xs transition-all hover:scale-105 ${n.userReactions?.includes("dislike")?"bg-gray-200 text-gray-800 ring-1 ring-gray-300":"bg-gray-50 text-gray-600 hover:bg-gray-100"}`,children:[e.jsx(ys,{"data-loc":"client/src/pages/Feed.tsx:999",className:`h-3.5 w-3.5 ${n.userReactions?.includes("dislike")?"fill-current":""}`}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1000",className:"font-medium",children:n.reactions?.dislike??0})]})}),e.jsx(de,{"data-loc":"client/src/pages/Feed.tsx:1003",children:t("feed.tooltipDislike","Je désapprouve ce programme")})]}),e.jsxs(oe,{"data-loc":"client/src/pages/Feed.tsx:1005",children:[e.jsx(ie,{"data-loc":"client/src/pages/Feed.tsx:1006",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:1007",onClick:i=>ye(i,n.id,"heart"),className:`inline-flex items-center gap-0.5 px-2.5 py-1 rounded-full text-xs transition-all hover:scale-105 ${n.userReactions?.includes("heart")?"bg-pink-200 text-pink-800 ring-1 ring-pink-300":"bg-pink-50 text-pink-600 hover:bg-pink-100"}`,children:[e.jsx(_e,{"data-loc":"client/src/pages/Feed.tsx:1011",className:`h-3.5 w-3.5 ${n.userReactions?.includes("heart")?"fill-current":""}`}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1012",className:"font-medium",children:n.reactions?.heart??0})]})}),e.jsx(de,{"data-loc":"client/src/pages/Feed.tsx:1015",children:t("feed.tooltipHeart","J'adore ce programme")})]}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1017",className:"h-4 w-px bg-gold/15"}),e.jsxs(oe,{"data-loc":"client/src/pages/Feed.tsx:1018",children:[e.jsx(ie,{"data-loc":"client/src/pages/Feed.tsx:1019",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:1020","data-tutorial":"comment-post",onClick:i=>{i.stopPropagation(),It(`/pro/feed/${n.id}?tab=comment`)},className:"inline-flex items-center gap-0.5 px-2.5 py-1 rounded-full text-xs transition-all hover:scale-105 bg-amber-50 text-amber-700 hover:bg-amber-100",children:[e.jsx(De,{"data-loc":"client/src/pages/Feed.tsx:1025",className:"h-3.5 w-3.5"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1026",className:"font-medium",children:n.commentCount})]})}),e.jsx(de,{"data-loc":"client/src/pages/Feed.tsx:1029",children:t("feed.tooltipComment","Commenter ce programme")})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1035",className:"px-4 pb-3 grid grid-cols-1 sm:grid-cols-2 gap-1.5",children:[e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:1036","data-tutorial":"diagnose-post",className:"instagram-gradient-btn flex items-center gap-2 px-4 py-2.5 rounded-xl text-white text-[13px] font-semibold shadow-lg hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all",onClick:i=>{i.stopPropagation(),Ue(A?null:n.id),F&&$t(null)},children:[e.jsx(G,{"data-loc":"client/src/pages/Feed.tsx:1045",className:"h-4 w-4 shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1046",className:"flex-1 text-left truncate",children:t("feed.item.proposeNewProgram")}),A?e.jsx(xs,{"data-loc":"client/src/pages/Feed.tsx:1047",className:"h-4 w-4 shrink-0"}):e.jsx(at,{"data-loc":"client/src/pages/Feed.tsx:1047",className:"h-4 w-4 shrink-0"})]}),(n.diagnosticCount??0)>0&&e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:1051",className:"flex items-center gap-1.5 px-2 py-1 rounded-full bg-purple-600 text-white text-[11px] hover:bg-purple-700 transition-colors",onClick:i=>{i.stopPropagation(),Ge(n.id),Qt(n.id)},children:[e.jsx(Re,{"data-loc":"client/src/pages/Feed.tsx:1059",className:"h-3 w-3 shrink-0"}),e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1060",className:"flex-1 text-left truncate",children:[t("feed.item.viewAllProposals","Voir les programmes proposés")," (",n.diagnosticCount,")"]}),e.jsx(ee,{"data-loc":"client/src/pages/Feed.tsx:1061",className:"h-3 w-3 shrink-0"})]})]}),A&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1075",className:"border-t border-gold/10 bg-emerald-50/30 px-4 py-4 space-y-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1076",className:"text-xs text-muted-foreground",children:t("feedDetail.pillarInstructions")}),[{key:"alimentation",label:t("feedDetail.pillarFood"),placeholder:t("feedDetail.pillarFoodPlaceholder"),icon:ft},{key:"activitePhysique",label:t("feedDetail.pillarExercise"),placeholder:t("feedDetail.pillarExercisePlaceholder"),icon:ht},{key:"gestionStress",label:t("feedDetail.pillarStress"),placeholder:t("feedDetail.pillarStressPlaceholder"),icon:it},{key:"hygieneSommeil",label:t("feedDetail.pillarSleep"),placeholder:t("feedDetail.pillarSleepPlaceholder"),icon:gt},{key:"soutienNaturel",label:t("feedDetail.pillarNatural"),placeholder:t("feedDetail.pillarNaturalPlaceholder"),icon:G}].map(({key:i,label:b,placeholder:N,icon:P})=>e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1084",children:[e.jsxs("label",{"data-loc":"client/src/pages/Feed.tsx:1085",className:"flex items-center gap-1.5 text-xs font-semibold text-navy mb-1",children:[e.jsx(P,{"data-loc":"client/src/pages/Feed.tsx:1086",className:"h-3.5 w-3.5 text-emerald-600"}),b]}),e.jsx(Ce,{"data-loc":"client/src/pages/Feed.tsx:1089",placeholder:N,className:"text-xs min-h-[60
1px] resize-none bg-white",value:je[i],onChange:R=>Xe(es=>({...es,[i]:R.target.value})),onClick:R=>R.stopPropagation()})]},i)),e.jsxs(L,{"data-loc":"client/src/pages/Feed.tsx:1098",size:"sm",className:"w-full gap-1.5 bg-emerald-600 hover:bg-emerald-700 text-white",disabled:Fe.isPending||!Object.values(je).some(i=>i.trim()),onClick:i=>{i.stopPropagation();const b=Object.entries(je).filter(([,N])=>N.trim()).map(([N,P])=>`## ${{alimentation:t("feedDetail.pillarFood"),activitePhysique:t("feedDetail.pillarExercise"),gestionStress:t("feedDetail.pillarStress"),hygieneSommeil:t("feedDetail.pillarSleep"),soutienNaturel:t("feedDetail.pillarNatural")}[N]} 2${P}`);Fe.mutate({programId:n.id,content:b.join(` 3 4`),commentType:"diagnostic"})},children:[e.jsx(Pe,{"data-loc":"client/src/pages/Feed.tsx:1117",className:"h-3.5 w-3.5"}),Fe.isPending?"...":t("feedDetail.publishProposal","Publier la proposition")]})]})]},`program-${n.id}`)})]})]})]}),e.jsx(Bs,{"data-loc":"client/src/pages/Feed.tsx:1131"}),e.jsx(Ys,{"data-loc":"client/src/pages/Feed.tsx:1134",programId:$e,open:$e!==null,onClose:()=>Ve(null)}),e.jsx(Xs,{"data-loc":"client/src/pages/Feed.tsx:1141",programId:We,open:We!==null,onClose:()=>Be(null)}),e.jsx(qs,{"data-loc":"client/src/pages/Feed.tsx:1148",programId:Ye,open:Ye!==null,onClose:()=>ve(null)}),e.jsx(Vs,{"data-loc":"client/src/pages/Feed.tsx:1155",programId:qe,open:qe!==null,onClose:()=>Ge(null)}),e.jsx(bs,{"data-loc":"client/src/pages/Feed.tsx:1162",open:Wt,onClose:()=>Bt(!1),currentPlan:qt||"etudiant",reason:Yt})]})}function Vs({programId:t,open:r,onClose:l}){const{t:a}=B(),[s,o]=d.useState(null),{data:p,isLoading:c}=w.comment.listByProgram.useQuery({programId:t},{enabled:r&&t!==null&&t>0}),x=d.useMemo(()=>p?p.filter(m=>m.comment?.commentType==="diagnostic"||m.commentType==="diagnostic"):[],[p]);return e.jsxs(e.Fragment,{children:[e.jsxs(se,{"data-loc":"client/src/pages/Feed.tsx:1189",open:r,onOpenChange:m=>{m||(l(),o(null))},children:[e.jsx(ae,{"data-loc":"client/src/pages/Feed.tsx:1190",children:e.jsxs(le,{"data-loc":"client/src/pages/Feed.tsx:1191",className:"flex items-center gap-2",children:[e.jsx(Re,{"data-loc":"client/src/pages/Feed.tsx:1192",className:"h-5 w-5 text-purple-600"}),a("feed.item.proposedPrograms","Programmes proposés")]})}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1196",className:"px-4 pb-4 space-y-3",children:[c&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1198",className:"flex items-center justify-center py-8",children:e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1199",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-purple-600"})}),!c&&x.length===0&&e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1203",className:"text-sm text-muted-foreground text-center py-6",children:a("feed.item.noProposals","Aucune proposition pour le moment.")}),!c&&x.map(m=>{const g=m.comment||m;return e.jsxs("button",{"data-loc":"client/src/pages/Feed.tsx:1208",onClick:()=>o(m),className:"w-full text-left bg-white rounded-lg border border-purple-100 hover:border-purple-300 p-3 flex items-center gap-3 transition-all hover:shadow-sm",children:[m.authorAvatarUrl?e.jsx("img",{"data-loc":"client/src/pages/Feed.tsx:1214",loading:"lazy",src:m.authorAvatarUrl,alt:"",className:"w-10 h-10 rounded-full object-cover shrink-0"}):e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1216",className:"w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center text-sm font-bold text-purple-600 shrink-0",children:m.authorName?.charAt(0)?.toUpperCase()??"?"}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1220",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1221",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1222",className:"text-sm font-semibold text-navy",children:m.authorName}),(m.authorNaturoStatus==="certified"||m.authorIsCertificateVerified)&&e.jsx(Ie,{"data-loc":"client/src/pages/Feed.tsx:1224",className:"h-3.5 w-3.5 text-emerald-500"})]}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1227",className:"text-[10px] text-muted-foreground",children:g.createdAt?new Date(g.createdAt).toLocaleDateString(Q()):""})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1231",className:"flex items-center gap-1 text-purple-500",children:[e.jsx(ee,{"data-loc":"client/src/pages/Feed.tsx:1232",className:"h-4 w-4"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1233",className:"text-xs font-medium",children:a("feed.item.viewProgram","Voir")}),e.jsx(pt,{"data-loc":"client/src/pages/Feed.tsx:1234",className:"h-4 w-4"})]})]},g.id)})]})]}),e.jsx(Ws,{"data-loc":"client/src/pages/Feed.tsx:1243",comment:s,open:s!==null,onClose:()=>o(null)})]})}
4function Ws({comment:t,open:r,onClose:l}){const{t:a}=B();if(!t)return null;const s=t.comment||t;return e.jsxs(se,{"data-loc":"client/src/pages/Feed.tsx:1259",open:r,onOpenChange:o=>{o||l()},children:[e.jsx(ae,{"data-loc":"client/src/pages/Feed.tsx:1260",children:e.jsxs(le,{"data-loc":"client/src/pages/Feed.tsx:1261",className:"flex items-center gap-2",children:[e.jsx(G,{"data-loc":"client/src/pages/Feed.tsx:1262",className:"h-5 w-5 text-emerald-600"}),e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1263",className:"truncate",children:[a("feed.item.programBy","Programme proposé par")," ",t.authorName]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1266",className:"px-4 pb-4 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1268",className:"flex items-center gap-3 p-3 bg-purple-50/50 rounded-lg",children:[t.authorAvatarUrl?e.jsx("img",{"data-loc":"client/src/pages/Feed.tsx:1270",loading:"lazy",src:t.authorAvatarUrl,alt:"",className:"w-10 h-10 rounded-full object-cover shrink-0"}):e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1272",className:"w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center text-sm font-bold text-purple-600 shrink-0",children:t.authorName?.charAt(0)?.toUpperCase()??"?"}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1276",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1277",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1278",className:"text-sm font-semibold text-navy",children:t.authorName}),(t.authorNaturoStatus==="certified"||t.authorIsCertificateVerified)&&e.jsx(Ie,{"data-loc":"client/src/pages/Feed.tsx:1280",className:"h-3.5 w-3.5 text-emerald-500"})]}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1283",className:"text-xs text-muted-foreground",children:s.createdAt?new Date(s.createdAt).toLocaleDateString(Q()):""})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1290",className:"max-w-none text-foreground/85 text-sm [&_h1]:text-base [&_h1]:font-semibold [&_h1]:mt-3 [&_h1]:mb-1 [&_h2]:text-sm [&_h2]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1 [&_h3]:text-sm [&_h3]:font-semibold [&_h3]:mt-2 [&_h3]:mb-0.5 [&_h4]:text-sm [&_h4]:font-semibold [&_h4]:mt-2 [&_h4]:mb-0.5 [&_p]:text-sm [&_p]:my-1 [&_ul]:text-sm [&_ul]:my-1 [&_ol]:text-sm [&_ol]:my-1 [&_li]:text-sm [&_li]:my-0.5 [&_strong]:font-semibold",children:e.jsx(st,{"data-loc":"client/src/pages/Feed.tsx:1291",children:s.content})}),t.replies&&t.replies.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1296",className:"border-t border-purple-100 pt-3 space-y-2",children:[e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:1297",className:"text-sm font-semibold text-purple-600",children:[a("feed.item.replies","Réponses")," (",t.replies.length,")"]}),t.replies.map(o=>e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1301",className:"bg-purple-50/50 rounded-lg p-3 space-y-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1302",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1303",className:"text-sm font-semibold text-navy",children:o.authorName}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1304",className:"text-[10px] text-muted-foreground",children:o.comment?.createdAt||o.createdAt?new Date(o.comment?.createdAt||o.createdAt).toLocaleDateString(Q()):""})]}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1308",className:"text-sm text-foreground/80",children:e.jsx(st,{"data-loc":"client/src/pages/Feed.tsx:1309",children:o.comment?.content||o.content})})]},o.comment?.id||o.id))]})]})]})}function Bs(){const{t}=B(),[,r]=ct(),{data:l}=w.feed.trending.useQuery();return!l||l.length===0?null:e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1328",className:"mt-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1329",className:"flex items-center gap-2 mb-4",children:[e.jsx(Ns,{"data-loc":"client/src/pages/Feed.tsx:1330",className:"h-5 w-5 text-gold-dark"}),e.jsx("h2",{"data-loc":"client/src/pages/Feed.tsx:1331",className:"font-heading font-bold text-navy text-lg",children:t("feed.discover.title","Découverte")}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1334",className:"text-xs text-muted-foreground",children:t("feed.discover.subt
4itle","Programmes les plus populaires")})]}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1338",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:l.map((a,s)=>e.jsx(ke,{"data-loc":"client/src/pages/Feed.tsx:1340",className:"cursor-pointer hover:shadow-md transition-all border-gold/10 hover:border-gold/30",onClick:()=>r(`/pro/feed/${a.id}`),children:e.jsx(hs,{"data-loc":"client/src/pages/Feed.tsx:1345",className:"p-3",children:e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1346",className:"flex items-start gap-2",children:[s<3&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1348",className:`w-6 h-6 rounded-full flex items-center justify-center shrink-0 text-xs font-bold ${s===0?"bg-amber-100 text-amber-700":s===1?"bg-gray-100 text-gray-600":"bg-orange-50 text-orange-600"}`,children:s+1}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1356",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1357",className:"text-sm font-medium text-navy truncate",children:a.title}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1358",className:"flex items-center gap-1.5 mt-1",children:[e.jsx(xt,{"data-loc":"client/src/pages/Feed.tsx:1359",status:a.authorNaturoStatus,isVerified:a.authorIsCertificateVerified,plan:a.authorPlan}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1360",className:"text-[10px] text-muted-foreground truncate",children:a.authorName})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1362",className:"flex items-center gap-2 mt-1.5 text-[10px] text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1363",className:"inline-flex items-center gap-0.5",children:[e.jsx(dt,{"data-loc":"client/src/pages/Feed.tsx:1364",className:"h-2.5 w-2.5"})," ",a.reactions?.like??0]}),e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1366",className:"inline-flex items-center gap-0.5",children:[e.jsx(_e,{"data-loc":"client/src/pages/Feed.tsx:1367",className:"h-2.5 w-2.5"})," ",a.reactions?.heart??0]}),e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1369",className:"inline-flex items-center gap-0.5",children:[e.jsx(De,{"data-loc":"client/src/pages/Feed.tsx:1370",className:"h-2.5 w-2.5"})," ",a.commentCount]}),a.score>0&&e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1373",className:"inline-flex items-center gap-0.5 text-amber-600",children:[e.jsx(ws,{"data-loc":"client/src/pages/Feed.tsx:1374",className:"h-2.5 w-2.5"})," ",a.score]})]})]})]})})},a.id))})]})}function Ys({programId:t,open:r,onClose:l}){const{t:a}=B(),{data:s,isLoading:o}=w.feed.getAssessmentForProgram.useQuery({programId:t},{enabled:r&&t!==null});return e.jsxs(se,{"data-loc":"client/src/pages/Feed.tsx:1398",open:r,onOpenChange:p=>{p||l()},children:[e.jsx(ae,{"data-loc":"client/src/pages/Feed.tsx:1399",children:e.jsxs(le,{"data-loc":"client/src/pages/Feed.tsx:1400",className:"flex items-center gap-2",children:[e.jsx(ot,{"data-loc":"client/src/pages/Feed.tsx:1401",className:"h-5 w-5 text-blue-600"}),a("feed.item.anamnesis")]})}),o&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1406",className:"flex items-center justify-center py-12",children:e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1407",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"})}),!o&&!s&&e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1411",className:"text-sm text-muted-foreground py-6 text-center",children:a("feed.item.noAnamnesis")}),!o&&s&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1416",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1417",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.clientGender&&e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1418",children:s.clientGender}),s.createdAt&&e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1419",children:["· ",new Date(s.createdAt).toLocaleDateString(Q())]})]}),e.jsx("h3",{"data-loc":"client/src/pages/Feed.tsx:1421",className:"font-semibold text-navy",children:s.title}),s.responses!=null&&typeof s.responses=="object"?e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1425",className:"space-y-3",children:Object.entries(s.responses).map(([p,c])=>{if(c==null||c==="")return null;const x=a(`assessmentForm.questions.${p}.label`,p),m=Array.isArray(c)?c.join(", "):String(c);return e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1431",className:"border-b border-gray-100 pb-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1432",className:"text-xs font-medium text-navy/70",children:x}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1433",className:"text-sm text-foreground",children:m})]},p)})}
4):null,s.scores!=null&&typeof s.scores=="object"&&typeof s.scores.IGV=="number"?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1442",className:"mt-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1443",className:"text-xs font-semibold text-blue-700 mb-2",children:a("feed.item.scores")}),e.jsx(vs,{"data-loc":"client/src/pages/Feed.tsx:1444",scores:s.scores})]}):null,[{key:"chiefComplaint",label:a("feed.item.chiefComplaint")},{key:"medicalHistory",label:a("feed.item.medicalHistory")},{key:"lifestyle",label:a("feed.item.lifestyle")},{key:"diet",label:a("feed.item.diet")},{key:"sleep",label:a("feed.item.sleep")},{key:"stress",label:a("feed.item.stress")},{key:"exercise",label:a("feed.item.exercise")},{key:"digestiveHealth",label:a("feed.item.digestiveHealth")},{key:"skinHealth",label:a("feed.item.skinHealth")},{key:"energyLevel",label:a("feed.item.energyLevel")},{key:"emotionalState",label:a("feed.item.emotionalState")},{key:"observations",label:a("feed.item.observations")}].map(({key:p,label:c})=>{const x=s[p];return x?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1466",className:"border-b border-gray-100 pb-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1467",className:"text-xs font-medium text-navy/70",children:c}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1468",className:"text-sm text-foreground whitespace-pre-line",children:x})]},p):null})]})]})}function Xs({programId:t,open:r,onClose:l}){const{t:a}=B(),{data:s,isLoading:o}=w.feed.getVitalityReportForProgram.useQuery({programId:t},{enabled:r&&t!==null}),p={1:a("feed.item.veryLow","Très faible"),2:a("feed.item.low","Faible"),3:a("feed.item.medium","Moyen"),4:a("feed.item.good","Bon"),5:a("feed.item.excellent","Excellent")};return e.jsxs(se,{"data-loc":"client/src/pages/Feed.tsx:1495",open:r,onOpenChange:c=>{c||l()},children:[e.jsx(ae,{"data-loc":"client/src/pages/Feed.tsx:1496",children:e.jsxs(le,{"data-loc":"client/src/pages/Feed.tsx:1497",className:"flex items-center gap-2",children:[e.jsx(ut,{"data-loc":"client/src/pages/Feed.tsx:1498",className:"h-5 w-5 text-purple-600"}),a("feed.item.vitalityReport")]})}),o&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1503",className:"flex items-center justify-center py-12",children:e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1504",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-purple-600"})}),!o&&!s&&e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1508",className:"text-sm text-muted-foreground py-6 text-center",children:a("feed.item.noVitalityReport")}),!o&&s&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1513",className:"space-y-4",children:[e.jsx("h3",{"data-loc":"client/src/pages/Feed.tsx:1514",className:"font-semibold text-navy",children:s.title}),s.createdAt&&e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1516",className:"text-xs text-muted-foreground",children:new Date(s.createdAt).toLocaleDateString(Q())}),typeof s.globalLevel=="number"&&s.globalLevel>0?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1521",className:"p-3 rounded-lg bg-purple-50/50 border border-purple-100",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1522",className:"text-xs font-semibold text-purple-700 mb-1",children:a("vitalityReports.globalLevel")}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1523",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1524",className:"flex gap-0.5",children:[1,2,3,4,5].map(c=>e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1526",className:`w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold ${c<=s.globalLevel?"bg-purple-600 text-white":"bg-purple-100 text-purple-300"}`,children:c},c))}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1538",className:"text-sm font-medium text-purple-700",children:p[s.globalLevel]??""})]})]}):null,(()=>{const c=s.ratings;return c&&typeof c=="object"&&Object.keys(c).length>0?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1547",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1548",className:"text-xs font-semibold text-navy/70",children:a("feed.item.ratings")}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1549",className:"grid grid-cols-1 sm:grid-cols-2 gap-1.5",children:Object.entries(s.ratings).map(([x,m])=>e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1551",className:"flex items-center justify-between text-xs bg-gray-50 rounded px-2 py-1.5",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1552",className:"text-navy/70 truncate mr-2",children:rt(x,Ee)}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1553",className:"flex gap-0.5 shrink-0",children:[1,2,3,4,5].map(g=>e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1555",className:`w-3.5 h-3.5 rounded-full ${g<=m?"bg-purple-500":"bg-gray-200"}`},g))})]},x))})]}):null})(),(()=>{const c=s.signs;return c&&typeof c=="object"&&Object.keys(c).length>0?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1571",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1572",className:"text-xs font-semibold text-navy/70",children:a("vitalityReports.observedSigns")}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1573",className:"flex flex-wrap gap-1.5",children:Object.entries(s.signs).filter(([,x])=>x).map(([x])=>e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1577",className:"text-[10px] px-2 py-0.5 rounded-full bg-amber-50 text-amber-700 border border-amber-200",children:rt(x,Te)},x))})]}):null})(),(()=>{const c=s.sectionNotes;return c&&typeof c=="object"&&Object.keys(c).length>0?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1587",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1588",className:"text-xs font-semibold text-navy/70",children:a("vitalityReports.practitionerNotes")}),Object.entries(s.sectionNotes).map(([x,m])=>m?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1592",className:"border-b border-gray-100 pb-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1593",className:"text-[10px] font-medium text-navy/50",children:Le[x]??x}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1594",className:"text-sm text-foreground whitespace-pre-line",children:m})]},x):null)]}):null})(),(()=>{const c=s.prioritySystems;return c&&Array.isArray(c)&&c.length>0?e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1603",className:"space-y-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1604",className:"text-xs font-semibold text-navy/70",children:a("vitalityReports.prioritySystems")}),e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1605",className:"flex flex-wrap gap-1.5",children:c.map((x,m)=>e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1607",className:"text-xs px-2 py-0.5 rounded-full bg-red-50 text-red-700 border border-red-200 font-medium",children:Le[x]??x},m))})]}):null})(),(s.priority1||s.priority2||s.priority3)&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1617",className:"p-3 rounded-lg bg-amber-50/50 border border-amber-100 space-y-1.5",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1618",className:"text-xs font-semibold text-amber-700",children:a("vitalityReports.priorities")}),s.priority1&&e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:1619",className:"text-sm text-foreground",children:["1. ",s.priority1]}),s.priority2&&e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:1620",className:"text-sm text-foreground",children:["2. ",s.priority2]}),s.priority3&&e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:1621",className:"text-sm text-foreground",children:["3. ",s.priority3]})]}),s.synthesisNotes&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1627",className:"border-t border-gray-100 pt-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1628",className:"text-xs font-semibold text-navy/70 mb-1",children:a("vitalityReports.synthesisNotes")}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1629",className:"text-sm text-foreground whitespace-pre-line",children:s.synthesisNotes})]})]})]})}function qs({programId:t,open:r,onClose:l}){const{t:a}=B(),{data:s}=w.feed.list.useQuery(),o=d.useMemo(()=>!s||!t?null:s.find(p=>p.id===t)??null,[s,t]);return e.jsxs(se,{"data-loc":"client/src/pages/Feed.tsx:1651",open:r,onOpenChange:p=>{p||l()},children:[e.jsx(ae,{"data-loc":"client/src/pages/Feed.tsx:1652",children:e.jsxs(le,{"data-loc":"client/src/pages/Feed.tsx:1653",className:"flex items-center gap-2",children:[e.jsx(G,{"data-loc":"client/src/pages/Feed.tsx:1654",className:"h-5 w-5 text-emerald-600"}),a("feed.item.viewProgramPopup")]})}),!o&&e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1659",className:"flex items-center justify-center py-12",children:e.jsx("div",{"data-loc":"client/src/pages/Feed.tsx:1660",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-emerald-600"})}),o&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1664",className:"space-y-4",children:[e.jsx("h3",{"data-loc":"client/src/pages/Feed.tsx:1665",className:"font-semibold text-navy",children:o.title}),e.jsxs("p",{"data-loc":"client/src/pages/Feed.tsx:1666",className:"text-xs text-muted-foreground",children:[a("feed.item.naturopath"),": ",o.authorName,o.publishedAt&&e.jsxs(e.Fragment,{children:[" · ",new Date(o.publishedAt).toLocaleDateString()]})]}),pe.map(p=>{const c=Dt(o[p]);if(!c)return null;const x=kt[p];return e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1679",className:"space-y-1.5 border-b border-emerald-100 pb-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1680",className:"flex items-center gap-1.5",children:[e.jsx(x,{"data-loc":"client/src/pages/Feed.tsx:1681",className:"h-4 w-4 text-emerald-600"}),e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1682",className:"text-sm font-semibold text-navy",children:a(`hygienePrograms.sections.${p}`)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1684",className:"pl-5.5 space-y-1",children:[c.objectives&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1686",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1687",className:"text-[10px] font-semibold text-muted-foreground uppercase",children:a("hygienePrograms.objectives","Objectifs")}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1688",className:"text-sm text-foreground
4/80",children:c.objectives})]}),c.recommendations&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1692",children:[e.jsx("span",{"data-loc":"client/src/pages/Feed.tsx:1693",className:"text-[10px] font-semibold text-muted-foreground uppercase",children:a("hygienePrograms.recommendations","Recommandations")}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1694",className:"text-sm text-foreground/80 whitespace-pre-wrap",children:c.recommendations})]}),e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1697",className:"flex flex-wrap gap-3 text-xs text-muted-foreground",children:[c.duration&&e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1699",children:[a("hygienePrograms.duration","Durée")," : ",c.duration]}),c.frequency&&e.jsxs("span",{"data-loc":"client/src/pages/Feed.tsx:1702",children:[a("hygienePrograms.frequency","Fréquence")," : ",c.frequency]})]}),c.notes&&e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1706",className:"text-sm italic text-muted-foreground",children:c.notes})]})]},p)}),o.additionalNotes&&e.jsxs("div",{"data-loc":"client/src/pages/Feed.tsx:1715",className:"border-t border-emerald-100 pt-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1716",className:"text-xs font-semibold text-navy/70 mb-1",children:a("hygienePrograms.additionalNotes","Notes additionnelles")}),e.jsx("p",{"data-loc":"client/src/pages/Feed.tsx:1717",className:"text-sm text-foreground whitespace-pre-line",children:o.additionalNotes})]})]})]})}export{Sa 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.