@tsiky/components-r19 7.0.19 → 7.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -8333,7 +8333,7 @@
8333
8333
  &:hover:not(:disabled) {
8334
8334
  background-color: ${e=>e.$active?"var(--color-primary)":"var(--color-background, #f3f4f6)"};
8335
8335
  }
8336
- `,s3e="_mpRoot_31595_1",d3e="_mpHeader_31595_22",l3e="_mpTitle_31595_31",h3e="_mpList_31595_35",u3e="_mpVertical_31595_41",p3e="_mpHorizontal_31595_46",y3e="_mpItem_31595_55",k3e="_mpClickable_31595_95",m3e="_mpLeft_31595_117",f3e="_mpIcon_31595_125",g3e="_mpMeta_31595_140",v3e="_mpLabel_31595_145",x3e="_mpDate_31595_154",M3e="_mpRight_31595_160",_3e="_mpValue_31595_168",L3e="_mpHint_31595_176",I3e="_mpBadge_31595_180",b3e="_mpBadgeTop_31595_199",w3e="_mpBadgeSub_31595_206",C3e="_mpBadgeSmall_31595_213",N3e="_mpPill_31595_229",S3e="_mpRounded_31595_232",j3e="_mpCompact_31595_236",$3e="_compactItemWrapper_31595_252",q3e="_mpSummaryRoot_31595_265",A3e="_mpSummaryInner_31595_269",z3e="_mpSummaryFlex_31595_284",P3e="_mpSummaryCardWrapperHorizontal_31595_292",V3e="_mpSummaryCardWrapper_31595_292",T3e="_mpSummaryCardHorizontal_31595_303",H3e="_mpSummaryCard_31595_292",D3e="_mpSummaryValue_31595_321",B3e="_mpSummaryLabel_31595_327",R3e="_mpSummaryBadge_31595_338",F3e="_mpSummaryBadgeSub_31595_357",E3e="_mpEmpty_31595_365",O3e="_mpSummaryVertical_31595_372",U3e="_mpIconSquare_31595_380",ee={mpRoot:s3e,mpHeader:d3e,mpTitle:l3e,mpList:h3e,mpVertical:u3e,mpHorizontal:p3e,mpItem:y3e,mpClickable:k3e,mpLeft:m3e,mpIcon:f3e,mpMeta:g3e,mpLabel:v3e,mpDate:x3e,mpRight:M3e,mpValue:_3e,mpHint:L3e,mpBadge:I3e,mpBadgeTop:b3e,mpBadgeSub:w3e,mpBadgeSmall:C3e,mpPill:N3e,mpRounded:S3e,mpCompact:j3e,compactItemWrapper:$3e,mpSummaryRoot:q3e,mpSummaryInner:A3e,mpSummaryFlex:z3e,mpSummaryCardWrapperHorizontal:P3e,mpSummaryCardWrapper:V3e,mpSummaryCardHorizontal:T3e,mpSummaryCard:H3e,mpSummaryValue:D3e,mpSummaryLabel:B3e,mpSummaryBadge:R3e,mpSummaryBadgeSub:F3e,mpEmpty:E3e,mpSummaryVertical:O3e,mpIconSquare:U3e},Vt=(e,t=1)=>{if(!e||typeof e!="string")return`rgba(124, 58, 237, ${t})`;const n=e.trim();if(n.toLowerCase()==="transparent")return"rgba(0,0,0,0)";if(/^rgba?\(/i.test(n))return/^rgba\(/i.test(n)?n.replace(/rgba\(([^)]+),\s*([0-9.]+)\s*\)$/,(d,l)=>`rgba(${l.split(",").map(u=>u.trim()).slice(0,3).join(", ")}, ${t})`):n;let c=n.replace("#","").toLowerCase();if(c.length===3&&(c=c.split("").map(d=>d+d).join("")),!/^[0-9a-f]{6}$/i.test(c))return`rgba(124, 58, 237, ${t})`;const i=parseInt(c.slice(0,2),16),r=parseInt(c.slice(2,4),16),s=parseInt(c.slice(4,6),16);return`rgba(${i}, ${r}, ${s}, ${t})`},W3e=({item:e,shape:t,onItemClick:n,color:c,renderItem:i})=>{const r=k.useCallback(()=>{n?.(e)},[n,e]),s=[ee.mpItem,t==="pill"?ee.mpPill:ee.mpRounded,n?ee.mpClickable:""].filter(Boolean).join(" ");if(i)return o.jsx("div",{className:s,role:n?"button":"group",tabIndex:n?0:-1,onClick:r,onKeyDown:y=>{n&&(y.key==="Enter"||y.key===" ")&&(n(e),y.preventDefault())},"aria-label":n?`Voir les détails de ${e.label}`:void 0,children:i(e)});const d=n?"button":"div",l=n?{onClick:r,className:s,type:"button","aria-label":`Voir les détails de ${e.label}`}:{className:s,role:"group"},h=e.iconComponent,u=e.iconSquareBg,p=e.iconColor;return o.jsxs(d,{...l,children:[o.jsxs("div",{className:ee.mpLeft,children:[h?o.jsx("div",{className:ee.mpIconSquare,style:{background:u??Vt(p??c??"#7c3aed",1),border:`1px solid ${Vt(p??c??"#7c3aed",.18)}`,color:p??"#ffffff"},children:k.createElement(h,{size:20,color:p??"#fff",strokeWidth:1.8})}):e.icon?o.jsx("div",{className:ee.mpIcon,children:e.icon}):null,o.jsxs("div",{className:ee.mpMeta,children:[o.jsx("div",{className:ee.mpLabel,children:e.label}),e.subLabel&&o.jsx("div",{className:ee.mpDate,children:e.subLabel}),e.date&&o.jsx("div",{className:ee.mpDate,children:e.date})]})]}),o.jsxs("div",{className:ee.mpRight,children:[o.jsx("div",{className:ee.mpValue,style:{color:e.valueColor??c??void 0},children:e.value}),e.badge?o.jsxs("div",{className:[ee.mpBadge,e.badge.small?ee.mpBadgeSmall:""].join(" "),style:{backgroundColor:e.badge.bg??Vt(e.badge.color||c||"#7c3aed",.12),borderColor:e.badge.bg?"transparent":Vt(e.badge.color||c||"#7c3aed",.18),color:e.badge.color??e.badge.textColor??"#0f172a",fontWeight:600},children:[o.jsx("div",{className:ee.mpBadgeTop,children:e.badge.text}),e.badge.subText&&o.jsx("div",{className:ee.mpBadgeSub,children:e.badge.subText})]}):e.hint?o.jsx("div",{className:ee.mpHint,children:e.hint}):null]})]})},G3e=k.memo(W3e),$j=({title:e,right:t})=>!e&&!t?null:o.jsxs("div",{className:ee.mpHeader,children:[o.jsx("div",{className:ee.mpTitle,children:e}),o.jsx("div",{children:t})]}),qj=(e,t=1)=>{try{return Vt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},K3e=({item:e})=>o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:14,borderRadius:12,minHeight:88,boxSizing:"border-box",background:e.bgColor??"transparent",border:`1px solid ${e.borderColor??"transparent"}`,boxShadow:"0 4px 10px rgba(15,23,42,0.03)"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[o.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#475569"},children:e.label}),o.jsx("div",{style:{fontSize:26,fontWeight:900,color:"#0f172a",lineHeight:1},children:e.value})]}),o.jsx("div",{title:String(e.label),style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:10,background:e.iconSquareBg??qj("#7c3aed",.12),border:`1px solid ${qj(e.iconColor??"#7c3aed",.12)}`,boxShadow:"none"},children:e.iconComponent?k.createElement(e.iconComponent,{size:18,color:e.iconColor??"#7c3aed",strokeWidth:1.6}):null})]}),Z3e=({item:e,bg:t,onClick:n,width:c,height:i,extraStyle:r})=>o.jsxs("div",{className:ee.mpSummaryCard,style:{background:t,width:c??void 0,height:i??void 0,...r??{}},role:n?"button":"group",tabIndex:n?0:-1,onClick:()=>n?.(e),children:[o.jsx("div",{className:ee.mpSummaryLabel,children:e.label}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:e.valueColor??"#2a24deff"},children:e.value}),e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]})]}),Aj=(e,t=1)=>{try{return Vt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},zj=e=>o.jsxs("div",{style:{display:"grid",gridTemplateRows:"auto 1fr",width:"100%",gap:8,alignItems:"center",boxSizing:"border-box",minWidth:0},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between-left",alignItems:"baseline",gap:10,width:"100%"},children:[o.jsx("div",{style:{fontWeight:700,fontSize:"clamp(14px, 1.2vw, 16px)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:e.label}),e.subLabel?o.jsx("div",{style:{fontSize:"clamp(13px, 1.1vw, 15px)",fontWeight:600,whiteSpace:"nowrap"},children:e.subLabel}):null]}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:15,width:"100%"},children:[o.jsx("div",{style:{fontWeight:900,fontSize:"clamp(16px, 1.6vw, 20px)",color:e.valueColor,lineHeight:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.value}),e.badge?o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"8px 12px",borderRadius:10,backgroundColor:e.badge.bg?e.badge.bg:Aj("#7c3aed",.08),border:`1px solid ${e.badge.bg?e.badge.bg:Aj("#7c3aed",.12)}`,color:e.badge.textColor||"#0f172a",fontWeight:700,fontSize:"clamp(12px, 1.2vw, 14px)",width:"120px",height:"52px",textAlign:"center",boxSizing:"border-box",overflow:"hidden",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",lineHeight:1.2,flexShrink:0},children:[o.jsx("div",{style:{fontSize:14,fontWeight:800,lineHeight:1.2,letterSpacing:"0.02em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.text}),e.badge.subText?o.jsx("div",{style:{fontSize:13,marginTop:4,fontWeight:700,letterSpacing:"0.01em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.subText}):null]}):null]})]}),Pj=(e,t)=>{try{if(typeof e=="function"){const n=e(t);if(n!==void 0)return n}}catch{}try{return k.createElement(e,{item:t})}catch(n){return console.warn("chooseDefaultRender: impossible de rendre CompactRenderer",n),null}},X3e=e=>{switch(e){case"image":return t=>k.createElement(K3e,{item:t});case"pertinence":return t=>k.createElement(Z3e,{item:t});case"alternateHorizontal":return t=>Pj(zj,t);case"compact":return t=>Pj(zj,t);case"summary":return;case"default":default:return}},wA=({item:e,orientation:t,bg:n,border:c,valueColor:i,onClick:r,width:s,height:d,extraStyle:l})=>{const u=t==="horizontal"?ee.mpSummaryCardHorizontal:ee.mpSummaryCard;return o.jsxs("div",{className:u,style:{background:n,border:`1px solid ${c}`,width:s??void 0,height:d??void 0,...l??{}},role:r?"button":"group",tabIndex:r?0:-1,onClick:()=>r?.(e),children:[e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:i},children:e.value}),o.jsx("div",{className:ee.mpSummaryLabel,children:e.label})]})},Y3e=["transparent","transparent","transparent","transparent"],J3e=["transparent","transparent","transparent","transparent"],Q3e=["#059669","#2563eb","#b45309","#7c3aed"],eme=(e,t=1)=>{try{return Vt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},CA=e=>{const{items:t=[],layout:n="vertical",orientation:c="auto",shape:i="rounded",color:r="#7c3aed",compact:s=!1,title:d,onItemClick:l,className:h="",loading:u=!1,emptyMessage:p="Aucun élément",renderItem:y,summary:f=!1,summaryBgColors:g=Y3e,summaryBorderColors:m=J3e,summaryValueColors:x=Q3e,preset:M,background:v}=e,{itemsContainerStyle:L,itemsContainerClassName:b,summaryGridColumns:C,compactItemWidth:S,compactItemHeight:_,compactItemStyle:I,summaryCardWidth:j,summaryCardHeight:N,summaryCardStyle:w}=e,$=n==="vertical",V={"--mp-accent":r,"--mp-accent-soft":eme(r,.08),"--mp-bg-primary":v},T=[ee.mpRoot,$?ee.mpVertical:ee.mpHorizontal,s?ee.mpCompact:"",f?ee.mpSummaryRoot:"",c!=="auto"?c==="vertical"?ee.mpOrientationVertical:ee.mpOrientationHorizontal:"",h].filter(Boolean).join(" "),z=k.useMemo(()=>y||(X3e(M)??void 0),[y,M]);if(f){const A=c==="horizontal"?ee.mpSummaryFlex:ee.mpSummaryVertical,B={...(C?{display:"grid",gridTemplateColumns:`repeat(${C}, 1fr)`,gap:18,alignItems:"stretch",width:"100%"}:void 0)??{},...L??{}};return o.jsxs("div",{className:T,style:V,"aria-busy":u,children:[d&&o.jsx($j,{title:d}),o.jsx("div",{className:ee.mpSummaryInner,children:o.jsx("div",{className:`${A} ${b??""}`,style:B,children:t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map((F,P)=>{const O=F.bgColor??g[P%g.length],J=F.borderColor??m[P%m.length],E=F.valueColor??x[P%x.length];return z?o.jsx("div",{className:c==="horizontal"?ee.mpSummaryCardWrapperHorizontal:ee.mpSummaryCardWrapper,style:{width:j??void 0,height:N??void 0,...w??{}},children:z(F,P)},F.id):o.jsx(wA,{item:F,orientation:c==="horizontal"?"horizontal":"vertical",bg:O,border:J,valueColor:E,onClick:l,width:j??void 0,height:N??void 0,extraStyle:w},F.id)})})})]})}return o.jsxs("div",{className:T,style:V,"aria-busy":u,children:[d&&o.jsx($j,{title:d}),o.jsx("div",{className:ee.mpList,style:L,children:u?o.jsx("div",{className:ee.mpEmpty,children:"Chargement…"}):t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map(A=>{const q=s?{width:S??void 0,height:_??void 0,boxSizing:"border-box",...I??{}}:void 0;return o.jsx("div",{className:s?ee.compactItemWrapper:void 0,style:q,children:o.jsx(G3e,{item:A,shape:i,onItemClick:l,color:r,renderItem:z?B=>z(B,t.indexOf(B)):void 0})},A.id)})})]})};k.memo(CA);const tme=({a11yConfig:e,width:t,height:n,colors:c={text:"#0b1220",background:"#fff",contentBackground:"#efeff0"},titles:i={},placeholder:r="Loading Chart",style:s,className:d="",children:l,padding:h="1rem",variant:u="default",showBorder:p=!1,titleKey:y,leftTitleKey:f})=>{const g=t?typeof t=="number"?`${t}px`:t:void 0,m=n?typeof n=="number"?`${n}px`:n:void 0,x=r&&typeof r=="object"&&!k.isValidElement(r)&&("text"in r||"subtext"in r||"icon"in r||"background"in r||"iconSize"in r),M=x?r:void 0,v=M?.icon?Mt[M.icon]:void 0,L=28,b=M?.iconSize??L,C=["chart-container",`variant-${u}`,p?"with-border":"",d].filter(Boolean).join(" "),S=c.contentBackground??void 0,_=typeof h=="number"?`${h}px`:h;return o.jsxs("div",{className:C,style:{width:g,height:m,color:c.text,background:c.background,display:"flex",flexDirection:"column",boxSizing:"border-box",padding:_,...s},children:[o.jsxs("div",{className:"chart-header",children:[o.jsxs("div",{title:Y(e,f||y),className:"chart-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.left,i.leftSubtitle&&o.jsx("div",{className:"chart-subtitle-left",children:i.leftSubtitle})]}),o.jsx("div",{className:"chart-title-right",children:i.right})]}),o.jsx("div",{className:"chart-content",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:S},children:l||(x&&M?o.jsxs("div",{className:"placeholder",role:"status","aria-live":"polite",children:[v&&o.jsx("div",{className:"placeholder-icon",style:{width:b,height:b},children:o.jsx(v,{color:M.iconColor??"currentColor",size:typeof b=="number"?b:parseInt(String(b),10)||L})}),M.text&&o.jsx("div",{className:"placeholder-text",children:M.text}),M.subtext&&o.jsx("div",{className:"placeholder-subtext",children:M.subtext})]}):o.jsx("div",{className:"placeholder-node",role:"status","aria-live":"polite",children:r}))})]})},sC=({id:e,size:t="100%",background:n,icon:c,text:i,subtext:r,onClose:s,onClick:d,style:l,className:h="",colorTextPrimary:u,colorTextSub:p,model:y,fontSize:f,fontWeight:g,a11yConfig:m,titleKey:x})=>{const M=c||y?.icon,v=typeof M=="string",L=v?Mt[M]:null,b=v?null:M;return o.jsxs("div",{id:e,className:`alert ${h}`,style:{width:typeof t=="number"?`${t}px`:t,background:n||y?.background,pointerEvents:"auto",cursor:d?"pointer":"default",...l},role:"alert",onClick:d,title:Y(m,x),children:[L&&o.jsx(L,{className:"alert-icon",size:20,color:u||y?.colorTextPrimary}),b!=null&&o.jsx("span",{className:"alert-icon",style:{display:"flex",alignItems:"center",color:u||y?.colorTextPrimary,flexShrink:0},children:b}),o.jsxs("div",{className:"alert-content",children:[o.jsx("span",{className:"alert-text",style:{color:u||y?.colorTextPrimary,fontSize:f,fontWeight:g},children:i}),r&&o.jsx("span",{className:"alert-subtext",style:{color:p||y?.colorTextSub},children:r})]}),s&&o.jsx("button",{className:"alert-close",onClick:s,"aria-label":"Fermer",children:"✕"})]})},NA=k.createContext(null),ame=(e="alert")=>`${e}_${Math.random().toString(36).slice(2,9)}`,nme=({children:e,defaultDuration:t=4e3,maxAlerts:n,containerClassName:c,containerStyle:i})=>{const[r,s]=k.useState([]),d=k.useRef(new Map),l=k.useRef(null),[h,u]=k.useState(null),[p,y]=k.useState(void 0),f=k.useRef(n);k.useEffect(()=>()=>{d.current.forEach(w=>window.clearTimeout(w)),d.current.clear()},[]);const g=(w,$)=>{const V=$===void 0||$===0?t:$;if(V===-1)return;const T=window.setTimeout(()=>{M(w)},V);d.current.set(w,T)},m=w=>{const $=d.current.get(w);$&&(window.clearTimeout($),d.current.delete(w))},x=w=>{const $=ame(),V={...w,id:$,createdAt:Date.now()};return s(T=>{const z=[V,...T],A=f.current;return typeof A=="number"&&A>=0&&z.length>A?(z.slice(A).forEach(B=>m(B.id)),z.slice(0,A)):z}),g($,w.duration),$},M=w=>{m(w),s($=>$.filter(V=>V.id!==w))},v=(w,$)=>{s(V=>V.map(T=>T.id===w?{...T,...$}:T))},L=()=>{d.current.forEach(w=>window.clearTimeout(w)),d.current.clear(),s([])},b=k.useCallback((w,$)=>{w&&window.getComputedStyle(w).position==="static"&&(w.style.position="relative"),u(V=>V===w?V:w),y($)},[]),C=()=>r.slice(),S=k.useMemo(()=>({showAlert:x,dismissAlert:M,updateAlert:v,clearAlerts:L,setContainerRef:b,getAlertsSnapshot:C}),[r]),_=h,I=_?!!p:!1,j=o.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",pointerEvents:"none",zIndex:10001,padding:"8px 4px",...I?{top:"auto",left:"auto",right:"auto",alignItems:"flex-end"}:null,..._?p:null},children:o.jsx(Ple,{mode:"popLayout",children:r.map(w=>o.jsx(nC.div,{initial:{opacity:0,y:-10,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.98},transition:{type:"spring",damping:25,stiffness:300},style:{width:I?"auto":"100%",pointerEvents:"auto",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.12)",borderRadius:"8px",marginBottom:"6px",backgroundColor:w.background||w.model?.background||"var(--color-background, #fff)",border:"1px solid rgba(0, 0, 0, 0.08)",overflow:"hidden"},children:o.jsx(sC,{id:w.id,text:w.text,subtext:w.subtext,icon:w.icon,background:"transparent",colorTextPrimary:w.colorTextPrimary,colorTextSub:w.colorTextSub,model:w.model,onClose:()=>M(w.id),size:I?"auto":"100%",style:{boxShadow:"none",...I?{whiteSpace:"nowrap"}:null}})},w.id))})}),N=o.jsx("div",{ref:w=>{h||(l.current=w)},className:c,style:{width:"100%",position:"relative",...i},"aria-live":"polite",children:j});return o.jsxs(NA.Provider,{value:S,children:[_?Lw.createPortal(j,_):N,e]})},ome=()=>{const e=k.useContext(NA);if(!e)throw new Error("useAlerts must be used inside an AlertsProvider");return e},cme={default:{background:"#f3f4f6",icon:"Info",colorTextPrimary:"#111827",colorTextSub:"#4b5563"},info:{background:"#dbeafe",icon:"Info",colorTextPrimary:"#1e40af",colorTextSub:"#3b82f6"},success:{background:"#dcfce7",icon:"CheckCircle2",colorTextPrimary:"#166534",colorTextSub:"#22c55e"},warning:{background:"#fef3c7",icon:"AlertTriangle",colorTextPrimary:"#92400e",colorTextSub:"#f59e0b"},error:{background:"#fee2e2",icon:"XCircle",colorTextPrimary:"#991b1b",colorTextSub:"#ef4444"}},ime="_container_18zbo_1",rme="_icon_18zbo_9",sme="_selectWrapper_18zbo_23",Ub={container:ime,icon:rme,selectWrapper:sme},dme=({options:e,defaultValue:t,onChange:n,label:c})=>{const[i,r]=k.useState(t||e[0]?.value||""),s=d=>{r(d),n?.(d)};return o.jsxs("div",{className:Ub.container,children:[o.jsxs("div",{className:Ub.icon,children:[o.jsx(w1,{size:18}),o.jsx("p",{children:c})]}),o.jsx("div",{className:Ub.selectWrapper,children:o.jsx(oC,{field:{name:"periode",label:"",options:e},value:i,onChange:s,onBlur:()=>{}})})]})},lme=250,hme=k.forwardRef(({title:e,subtitle:t,size:n="420px",beforeOpen:c,afterOpen:i,beforeClose:r,afterClose:s,style:d,className:l="",children:h,closeOnOverlayClick:u=!0,showCloseButton:p=!0},y)=>{const[f,g]=k.useState(!1),[m,x]=k.useState(!1),M=k.useRef(null),v=k.useRef(null),L=k.useRef(null),b=k.useRef(null);k.useEffect(()=>{const _=M.current;if(!_)return;const I=_.parentElement;return I?(window.getComputedStyle(I).position==="static"&&(I.setAttribute("data-scp-prev-position",I.style.position??""),I.style.position="relative",I.setAttribute("data-scp-position-changed","true")),()=>{if(I.getAttribute("data-scp-position-changed")==="true"){const N=I.getAttribute("data-scp-prev-position")??"";I.style.position=N,I.removeAttribute("data-scp-position-changed"),I.removeAttribute("data-scp-prev-position")}}):void 0},[]),k.useImperativeHandle(y,()=>({open:()=>{f||(c?.(),x(!1),g(!0))},close:()=>{f&&(r?.(),x(!1),g(!1))},toggle:()=>{f?(r?.(),x(!1),g(!1)):(c?.(),x(!1),g(!0))}}),[f,c,r]),k.useEffect(()=>{const _=v.current;b.current&&(window.clearTimeout(b.current),b.current=null);const I=j=>{if(j.target===_&&!(j.propertyName!=="transform"&&j.propertyName!=="opacity"))if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{L.current?.focus()}catch{}}};return _&&(_.addEventListener("transitionend",I),b.current=window.setTimeout(()=>{if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{L.current?.focus()}catch{}}},lme+60)),f&&(L.current=document.activeElement),()=>{_&&_.removeEventListener("transitionend",I),b.current&&(window.clearTimeout(b.current),b.current=null)}},[f,i,s]),k.useEffect(()=>{const _=I=>{I.key==="Escape"&&f&&(r?.(),x(!1),g(!1))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[f,r]);const C=()=>{u&&(r?.(),x(!1),g(!1))},S=typeof n=="number"?`${n}px`:n;return o.jsxs("div",{ref:M,className:`scp-inline-root ${f?"open":""}`,"aria-hidden":!f,children:[o.jsx("div",{className:`scp-overlay ${f?"visible":""}`,onMouseDown:C,role:"presentation"}),o.jsxs("aside",{className:`scp-panel ${f?"in":"out"} ${m?"interactive":""} ${l}`,style:{width:S,...d},ref:v,tabIndex:-1,role:"dialog","aria-label":e,children:[o.jsxs("div",{className:"scp-header",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"scp-title",children:e}),t&&o.jsx("div",{className:"scp-subtitle",children:t})]}),p&&o.jsx("button",{className:"scp-close","aria-label":"Close",onClick:()=>{r?.(),x(!1),g(!1)},children:o.jsx(tt,{size:18})})]}),o.jsx("div",{className:"scp-body",children:h})]})]})});function ume(e){const t=k.useRef("");k.useEffect(()=>{if(e){t.current=document.body.style.overflow,document.body.style.overflow="hidden";return}document.body.style.overflow=t.current||""},[e])}const pme="_container_1pfsp_1",yme="_title_1pfsp_8",Vj={container:pme,title:yme},kme=({title:e,fontSize:t,barColor:n,className:c="",style:i={}})=>{const r={...i,"--title-font-size":t,"--bar-color":n};return o.jsx("div",{className:`${Vj.container} ${c}`,style:r,children:o.jsx("h2",{className:Vj.title,children:e})})},mme="_modalOverlay_1878x_1",fme="_modalContainer_1878x_16",gme="_modalTitle_1878x_29",vme="_modalInput_1878x_38",xme="_modalTextarea_1878x_39",Mme="_modalActions_1878x_70",_me="_cancelBtn_1878x_77",Lme="_saveBtn_1878x_99",Ime="_inputError_1878x_141",bme="_inlineAlert_1878x_146",ot={modalOverlay:mme,modalContainer:fme,modalTitle:gme,modalInput:vme,modalTextarea:xme,modalActions:Mme,cancelBtn:_me,saveBtn:Lme,inputError:Ime,inlineAlert:bme},Hc=({isOpen:e,onClose:t,onSave:n,title:c="Ajouter un élément",fields:i,initialValues:r={},errorMessage:s="",disableSave:d,onFieldChange:l,confirmText:h="Valider",cancelText:u="Annuler"})=>{const[p,y]=k.useState({}),f=k.useRef(null),[g,m]=k.useState(!1),[x,M]=k.useState(!1),v=k.useRef(null);if(k.useEffect(()=>{if(!e)return;const _={};for(const I of i)_[I.name]=Object.prototype.hasOwnProperty.call(r,I.name)?r[I.name]:"";return y(_),requestAnimationFrame(()=>{f.current?.focus();const I=f.current;if(I&&typeof I.selectionStart=="number"){const j=String(I.value??"").length;I.setSelectionRange(j,j)}}),()=>{v.current&&(window.clearTimeout(v.current),v.current=null)}},[e]),k.useEffect(()=>{s&&e?(M(!0),v.current&&(window.clearTimeout(v.current),v.current=null),v.current=window.setTimeout(()=>{M(!1),v.current=null},3e3)):(M(!1),v.current&&(window.clearTimeout(v.current),v.current=null))},[s,e]),!e)return null;const L=(_,I)=>{y(j=>({...j,[_]:I})),l&&l(_,I)},b=async()=>{if(!Object.values(p).some(_=>_===""||_===void 0))try{m(!0);const _=await n(p);if(typeof _=="string"&&_==="duplicate-same"){m(!1);return}y({}),m(!1),t()}catch(_){console.error("AddItemModal onSave error:",_),m(!1),t()}},C=_=>{_.target===_.currentTarget&&t()},S=_=>_.stopPropagation();return o.jsx("div",{className:ot.modalOverlay,onMouseDown:C,role:"dialog","aria-modal":"true",children:o.jsxs("div",{className:ot.modalContainer,onMouseDown:S,onClick:S,children:[o.jsx("h2",{className:ot.modalTitle,children:c}),i.map((_,I)=>{const j=p[_.name]??"",N=I===0&&!!s,w={name:_.name,placeholder:_.placeholder||_.label,value:String(j),onChange:$=>L(_.name,$.target.value),className:_.type==="textarea"?`${ot.modalTextarea} ${N?ot.inputError:""}`:`${ot.modalInput} ${N?ot.inputError:""}`,tabIndex:0,disabled:g};return I===0&&(w.ref=$=>{f.current=$}),o.jsxs("div",{style:{marginBottom:8},children:[_.type==="textarea"?o.jsx("textarea",{rows:_.rows||4,...w}):o.jsx("input",{type:_.type||"text",...w}),I===0&&x&&s&&o.jsx("div",{style:{marginTop:8},children:o.jsx(sC,{text:s,background:"#fff5f5",colorTextPrimary:"#ef4444",onClose:()=>M(!1),className:ot.inlineAlert})})]},_.name)}),o.jsxs("div",{className:ot.modalActions,children:[o.jsx("button",{className:ot.cancelBtn,onClick:t,type:"button",disabled:g,children:u}),o.jsx("button",{className:ot.saveBtn,onClick:b,type:"button",disabled:g||!!d,children:g?"En cours...":h})]})]})})},wme=({title:e,keyCount:t,onAddKey:n,a11yConfig:c})=>{const[i,r]=k.useState(!1),s=d=>{const l=d.key;n&&l&&n(l)};return o.jsxs("div",{className:"header-container",children:[o.jsxs("div",{className:"header-info",children:[o.jsx("h1",{title:Y(c,e),children:e}),o.jsxs("p",{children:[t," clés"]})]}),o.jsxs("button",{onClick:()=>r(!0),className:"add-key-button",children:[o.jsx(Ac,{className:"add-key-icon"}),"Clé"]}),o.jsx(Hc,{isOpen:i,title:"Ajouter une clé",onClose:()=>r(!1),onSave:s,fields:[{name:"key",label:"Nouvelle clé",placeholder:"Entrer une nouvelle clé"}]})]})},Cme=({modules:e,onEdit:t,onDelete:n,onAddModule:c,onSelectModule:i,addModalFields:r,addModalTitle:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(null),[p,y]=k.useState(null),[f,g]=k.useState(!1),m=()=>l(!0),x=()=>l(!1),M=_=>{if(c){const I=_.code?.trim()||_.id?.trim(),j=_.title?.trim(),N=I||j||String(Date.now()),w=j||I||`Module ${N}`;c({id:N,title:w,subtitle:"",translations:{}})}x()},v=(_,I)=>{_.stopPropagation(),u(I)},L=()=>u(null),b=_=>{if(!h){L();return}const I={...h,title:_.title||h.title,subtitle:""};t&&t(I),L()},C=(_,I)=>{_.stopPropagation(),n&&n(I)},S=_=>{y(_.id),i&&i(_)};return f?o.jsx("div",{className:"module-sidebar collapsed",children:o.jsx(a1,{size:20,className:"menu-toggle",onClick:()=>g(!1)})}):o.jsxs("div",{className:"module-sidebar",children:[o.jsxs("div",{className:"sidebar-header",children:[o.jsxs("span",{className:"header-text",children:["Modules (",e.length,")"]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(qc,{size:18,className:"header-folder",onClick:m}),o.jsx(a1,{size:18,className:"header-menu",onClick:()=>g(!0)})]})]}),o.jsx("hr",{className:"divider"}),o.jsx("div",{className:"module-list",children:e.map(_=>{const I=Object.keys(_.translations||{}).length,j=I>0||_.id===p;return o.jsxs("div",{className:`module-item ${_.id===p?"selected":""}`,onClick:()=>S(_),role:"button",tabIndex:0,onKeyDown:N=>{N.key==="Enter"&&S(_)},children:[o.jsxs("div",{className:"module-left",children:[o.jsx($1,{size:16,className:"item-folder"}),o.jsxs("div",{className:"module-info",children:[o.jsxs("div",{className:"module-title",children:[_.title,j&&o.jsxs("span",{className:"count",children:[" ",I," "]})]}),_.subtitle?o.jsx("div",{className:"module-subtitle",children:_.subtitle}):null]})]}),o.jsxs("div",{className:"module-actions",children:[t&&o.jsx(n1,{onClick:N=>v(N,_),color:"#777",size:16}),n&&o.jsx(yt,{onClick:N=>C(N,_.id),color:"#777",size:16})]})]},_.id)})}),o.jsx(Hc,{isOpen:d,onClose:x,onSave:M,title:s||"Ajouter un module",fields:r&&r.length?r.map(_=>({name:_.name,label:_.label,type:_.type,placeholder:_.placeholder,rows:_.rows})):[{name:"title",label:"Titre",placeholder:"Titre du module"}]}),h&&o.jsx(Hc,{isOpen:!!h,onClose:L,onSave:b,title:"Éditer le module",initialValues:{title:h.title},fields:[{name:"title",label:"Titre",placeholder:"Titre du module"}]})]})},SA=({placeholder:e="Rechercher une clé ou traduction...",value:t="",onChange:n,iconPosition:c="left",iconColor:i="#9ca3af",a11yConfig:r,className:s})=>o.jsxs("div",{className:`search-container icon-${c}`,title:Y(r,e),children:[o.jsx("div",{className:"search-icon-wrapper",children:o.jsx(z1,{className:"search-icon",color:i})}),o.jsx("input",{type:"text",placeholder:e,value:t,onChange:d=>n?.(d.target.value),className:`search-input ${s}`})]}),Nme=({keyName:e,translations:t,availableLanguages:n,onDeleteKey:c,onEditKey:i,onEditTranslation:r,onDeleteTranslation:s,onAddTranslation:d,draggable:l=!1,checkDuplicateLocal:h})=>{const[u,p]=k.useState(!1),[y,f]=k.useState(""),[g,m]=k.useState(null),[x,M]=k.useState(""),[v,L]=k.useState(""),[b,C]=k.useState(!1),[S,_]=k.useState(!1),[I,j]=k.useState(null),[N,w]=k.useState(!1),$=t.map(P=>P.language),V=n.filter(P=>!$.includes(P.code)),T=()=>{y&&v.trim()&&(d?.(e,y,v.trim()),f(""),L(""),p(!1))},z=(P,O)=>{m(P),M(O)},A=P=>{r?.(e,P,x),m(null),M("")},q=()=>{m(null),M("")},B=async P=>{const O=P.name?.trim();if(O){if(j(null),w(!1),O===e||!i)return C(!1),"ok";try{const J=await i(e,O);if(typeof J=="string"&&J==="ok")C(!1),j(null);else{if(typeof J=="string"&&J==="duplicate-same")return j("Une clé existe déjà dans ce module."),w(!0),"duplicate-same";if(typeof J=="string"&&J==="duplicate-other")return C(!1),j(null),"duplicate-other";C(!1)}}catch(J){console.error("Erreur handleRenameSave:",J),j("Erreur lors du renommage.")}}},F=(P,O)=>{if(P!=="name")return;const J=O.trim();j(null),w(!1),J&&typeof h=="function"&&(h(J,e)?(j("Une clé existe déjà dans ce module."),w(!0)):(j(null),w(!1)))};return o.jsxs("div",{className:`translation-key ${S?"collapsed":"expanded"} ${l?"draggable":""}`,children:[o.jsxs("div",{className:"card-header",children:[o.jsxs("div",{className:"header-left",children:[o.jsx("button",{className:"collapse-button",onClick:()=>_(!S),title:S?"Déplier":"Replier",children:S?o.jsx(N1,{className:"collapse-icon"}):o.jsx(Tt,{className:"collapse-icon"})}),o.jsx("h3",{className:"card-title",title:e,children:e})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx("button",{className:"action-button",onClick:P=>{P.stopPropagation(),C(!0)},title:"Renommer la clé",children:o.jsx(gt,{className:"action-icon"})}),o.jsx("button",{onClick:P=>{P.stopPropagation(),c?.(e)},className:"action-button delete",title:"Supprimer la clé",children:o.jsx(yt,{className:"action-icon"})})]})]}),o.jsx("div",{className:`translations-container ${S?"":"expanded"}`,children:!l&&o.jsxs(o.Fragment,{children:[t.map(P=>o.jsxs("div",{className:"translation-row",children:[o.jsx("div",{className:"language-code",children:P.language}),o.jsx("div",{className:"translation-content",children:g===P.language?o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"text",value:x,onChange:O=>M(O.target.value),className:"edit-input",autoFocus:!0,onKeyDown:O=>{O.key==="Enter"&&A(P.language),O.key==="Escape"&&q()}}),o.jsx("button",{onClick:()=>A(P.language),className:"save-button",disabled:!x.trim(),children:"Enregistrer"}),o.jsx("button",{onClick:q,className:"cancel-button",children:o.jsx(tt,{className:"action-icon"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"translation-text",title:P.value,children:P.value}),o.jsx("button",{onClick:()=>z(P.language,P.value),className:"edit-button",title:"Éditer la traduction",children:o.jsx(gt,{className:"action-icon"})}),o.jsx("button",{onClick:()=>s?.(e,P.language),className:"delete-translation-button",title:"Supprimer la traduction",children:o.jsx(tt,{className:"action-icon"})})]})})]},P.language)),u?o.jsxs("div",{className:"add-language-row",children:[o.jsx("div",{className:"language-code",children:"+"}),o.jsxs("div",{className:"add-language-content",children:[o.jsx("div",{className:"language-select-container",children:o.jsxs("select",{value:y,onChange:P=>f(P.target.value),className:"language-select",children:[o.jsx("option",{value:"",children:"Sélectionnez la langue"}),V.map(P=>o.jsxs("option",{value:P.code,children:[P.name," (",P.code,")"]},P.code))]})}),y&&o.jsx("input",{type:"text",value:v,onChange:P=>L(P.target.value),placeholder:"Entrez la traduction...",className:"translation-input",onKeyDown:P=>{P.key==="Enter"&&T(),P.key==="Escape"&&(p(!1),f(""),L(""))}}),o.jsx("button",{onClick:T,disabled:!y||!v.trim(),className:"save-button",children:"Ajouter"}),o.jsx("button",{onClick:()=>{p(!1),f(""),L("")},className:"cancel-button",children:o.jsx(tt,{className:"action-icon"})})]})]}):o.jsxs("button",{onClick:()=>p(!0),className:"show-add-button",disabled:V.length===0,children:[o.jsx("span",{className:"plus-icon",children:"+"}),"Ajouter une langue"]})]})}),l&&o.jsxs("div",{className:"drag-overlay",children:[o.jsx(a.Move,{size:24,strokeWidth:1.5}),o.jsx("span",{children:"Glisser pour réorganiser"})]}),o.jsx(Hc,{isOpen:b,onClose:()=>{C(!1),j(null),w(!1)},onSave:B,onFieldChange:F,title:"Renommer la clé",initialValues:{name:e},fields:[{name:"name",label:"Nom de la clé",placeholder:"Nom de la clé"}],errorMessage:I||"",disableSave:N})]})},Sme="_wrapper_1wvht_1",jme="_leftGroup_1wvht_12",$me="_filterButton_1wvht_21",qme="_open_1wvht_42",Ame="_filterIcon_1wvht_42",zme="_infoText_1wvht_58",Pme="_pickerContainer_1wvht_66",Vme="_srOnly_1wvht_79",Tme="_pickerLabel_1wvht_91",Hme="_datetime_1wvht_98",Dme="_rightGroup_1wvht_107",Bme="_searchInputWrap_1wvht_116",Rme="_searchInput_1wvht_116",Fme="_searchIcon_1wvht_152",Fe={wrapper:Sme,leftGroup:jme,filterButton:$me,open:qme,filterIcon:Ame,infoText:zme,pickerContainer:Pme,srOnly:Vme,pickerLabel:Tme,datetime:Hme,rightGroup:Dme,searchInputWrap:Bme,searchInput:Rme,searchIcon:Fme};function Eme({onDateChange:e,onSearch:t,initialDate:n}){const[c,i]=k.useState(!1),[r,s]=k.useState(n??""),d=k.useRef(null);k.useEffect(()=>{function p(y){const f=y.target;d.current&&f&&!d.current.contains(f)&&i(!1)}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),k.useEffect(()=>{n&&s(n)},[n]);const l=()=>i(p=>!p),h=p=>{const y=p.target.value;s(y),e?.(y)},u=p=>{t?.(p.target.value)};return o.jsxs("div",{className:Fe.wrapper,ref:d,children:[o.jsxs("div",{className:Fe.leftGroup,children:[o.jsxs("button",{type:"button",className:`${Fe.filterButton} ${c?Fe.open:""}`,onClick:l,"aria-expanded":c,"aria-haspopup":"dialog","aria-controls":"entry-datetime",children:[o.jsx("span",{children:"Entry time"}),o.jsx("svg",{className:Fe.filterIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M10 18h4v-2h-4v2zm-7-8v2h18V10H3zm3-6v2h12V4H6z"})})]}),o.jsx("div",{className:Fe.infoText,children:"Confidence interval: step ± 15' / exit ± 30'"}),c&&o.jsxs("div",{className:Fe.pickerContainer,role:"dialog","aria-label":"Choisir la date et l’heure",children:[o.jsx("label",{className:Fe.pickerLabel,htmlFor:"entry-datetime",children:o.jsx("span",{className:Fe.srOnly,children:"Choisir la date et l’heure"})}),o.jsx("input",{id:"entry-datetime",className:Fe.datetime,type:"datetime-local",value:r,onChange:h,"aria-label":"Date et heure d’entrée"})]})]}),o.jsx("div",{className:Fe.rightGroup,children:o.jsxs("div",{className:Fe.searchInputWrap,children:[o.jsx("input",{className:Fe.searchInput,placeholder:"Search...",onChange:u,"aria-label":"Search"}),o.jsx("svg",{className:Fe.searchIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16a6.471 6.471 0 004.23-1.57l.27.28v.79L20 20.49 21.49 19l-5.99-5zM10 15.5A5.5 5.5 0 1115.5 10 5.5 5.5 0 0110 15.5z"})})]})})]})}const Ome=({className:e="",style:t={},title:n,titleClassName:c="",titleStyle:i,data:r,lineClasses:s={},renderCell:d,bg:l,titleBg:h,titleColor:u,itemBg:p,emptyContent:y,colGap:f="1rem"})=>{const g=Array.isArray(r)?r:[],m=g.length===0,x=g.every(b=>typeof b=="string"),M=g.some(b=>Array.isArray(b)),v=(b,C,S)=>d?d(b,C,S):o.jsx("span",{className:"slb-cell-text",children:b}),L=f?{"--col-gap":f}:void 0;return m?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{...i,background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-empty",children:y??null})]}):x&&!M?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("ul",{className:"slb-list",children:g.map((b,C)=>o.jsx("li",{className:`slb-item ${s[C]||""}`,style:{background:p??void 0},children:v(b,C,0)},C))})]}):o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-grid",style:L,children:g.map((b,C)=>{const S=s[C]||"";if(Array.isArray(b)){const[_,I]=b;return o.jsxs("div",{className:`slb-row ${S}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(_,C,0)}),o.jsx("div",{className:"slb-grid-right",children:v(I,C,1)})]},C)}return o.jsxs("div",{className:`slb-row ${S}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(b,C,0)}),o.jsx("div",{className:"slb-grid-right slb-empty-cell","aria-hidden":"true"})]},C)})})]})},Ume=({className:e="",style:t={},title:n,titleColor:c,data:i=[],badgeColor:r="#0ea5e9",badgeColors:s={},badgePadding:d="8px 16px",badgeWidth:l,itemBg:h,lineClasses:u={},colGap:p="1rem"})=>{const y=i.some(g=>Array.isArray(g)),f=p?{"--col-gap":p}:void 0;return o.jsxs("div",{className:`clb-root ${e}`,style:{...t},children:[n&&o.jsx("div",{className:"clb-title",style:c?{color:c}:void 0,children:n}),o.jsx("div",{className:"clb-grid",style:f,children:i.map((g,m)=>{const x=u[m]||"";if(Array.isArray(g)){const[M,v]=g,L=s[m]||r;return o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col",children:o.jsx("div",{className:"counter-badge",style:{background:L,padding:d,width:l,minWidth:l},children:M})}),o.jsx("div",{className:"clb-text",children:v})]},m)}return y?o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col clb-empty-badge"}),o.jsx("div",{className:"clb-text",children:g})]},m):o.jsx("div",{className:`clb-fullrow ${x}`,style:{background:h??void 0},children:o.jsx("span",{children:g})},m)})})]})},Wme=({className:e="",style:t={},title:n,items:c=[],titleBg:i,titleColor:r,itemBg:s,lineClasses:d={},renderTrendIcon:l,colGap:h="1rem"})=>{const u=h?{"--col-gap":h}:void 0;return o.jsxs("div",{className:`tlb-root ${e}`,style:{...t,background:s??void 0},children:[n&&o.jsx("div",{className:"tlb-title",style:{background:i??void 0,color:r??void 0},children:n}),o.jsx("div",{className:"tlb-grid",style:u,children:c.map((p,y)=>{const f=d[y]||"";return o.jsxs("div",{className:`tlb-row ${f}`,style:{background:s??void 0},children:[o.jsx("div",{className:"tlb-label",children:p.label}),o.jsxs("div",{className:"tlb-value-group",children:[o.jsx("div",{className:"tlb-icon-col",children:l?l(p):p.icon??null}),o.jsxs("div",{className:"tlb-value-wrap",children:[o.jsx("div",{className:"tlb-value",children:p.value}),typeof p.delta<"u"&&o.jsx("div",{className:`tlb-delta ${p.delta>0?"positive":p.delta<0?"negative":"neutral"}`,children:p.deltaLabel??String(p.delta)})]})]})]},y)})})]})},Gme=({className:e="",style:t={},children:n,gap:c="1rem"})=>o.jsx("div",{className:`frc-root ${e}`,style:{...t,"--frc-gap":c},children:k.Children.map(n,i=>o.jsx("div",{className:"frc-item",children:i}))}),Kme=({className:e="",style:t={},children:n,gap:c="1rem",background:i="#D9EEF5"})=>o.jsx("div",{className:`lcc-root ${e}`,style:{background:i,...t,"--lcc-gap":c},children:k.Children.map(n,r=>o.jsx("div",{className:"lcc-cell",children:r}))}),Zme="_overlay_3x4or_2",Xme="_fadeIn_3x4or_1",Yme="_popup_3x4or_17",Jme="_slideUp_3x4or_1",Qme="_header_3x4or_28",e6e="_body_3x4or_40",t6e="_footer_3x4or_51",a6e="_cancelButton_3x4or_59",n6e="_confirmButton_3x4or_77",o6e="_warning_3x4or_97",c6e="_danger_3x4or_106",i6e="_info_3x4or_115",Nt={overlay:Zme,fadeIn:Xme,popup:Yme,slideUp:Jme,header:Qme,body:e6e,footer:t6e,cancelButton:a6e,confirmButton:n6e,warning:o6e,danger:c6e,info:i6e},r6e=({isOpen:e,title:t,message:n,onConfirm:c,onCancel:i,confirmText:r="Confirmer",cancelText:s="Annuler",type:d="warning"})=>{if(!e)return null;const l=u=>{u.target===u.currentTarget&&i()},h=u=>{u.key==="Escape"&&i(),u.key==="Enter"&&u.ctrlKey&&c()};return o.jsx("div",{className:Nt.overlay,onClick:l,onKeyDown:h,role:"dialog","aria-labelledby":"confirmation-title","aria-describedby":"confirmation-message",children:o.jsxs("div",{className:`${Nt.popup} ${Nt[d]}`,children:[o.jsx("div",{className:Nt.header,children:o.jsx("h3",{id:"confirmation-title",children:t})}),o.jsx("div",{className:Nt.body,children:o.jsx("p",{id:"confirmation-message",children:n})}),o.jsxs("div",{className:Nt.footer,children:[o.jsx("button",{className:Nt.cancelButton,onClick:i,type:"button",children:s}),o.jsx("button",{className:Nt.confirmButton,onClick:c,type:"button",autoFocus:!0,children:r})]})]})})},s6e=()=>{const[e,t]=k.useState({isOpen:!1,title:"",message:"",onConfirm:null}),n=k.useCallback((r,s,d)=>{t({isOpen:!0,title:r,message:s,onConfirm:d})},[]),c=k.useCallback(()=>{t(r=>({...r,isOpen:!1,onConfirm:null}))},[]),i=k.useCallback(()=>{e.onConfirm?.(),c()},[e.onConfirm,c]);return{isOpen:e.isOpen,title:e.title,message:e.message,showConfirmation:n,hideConfirmation:c,handleConfirm:i}},d6e="_container_145xs_1",l6e="_selectButton_145xs_7",h6e="_disabled_145xs_22",u6e="_error_145xs_39",p6e="_outline_145xs_52",y6e="_filled_145xs_58",k6e="_sm_145xs_67",m6e="_md_145xs_73",f6e="_lg_145xs_79",g6e="_buttonContent_145xs_85",v6e="_label_145xs_93",x6e="_placeholder_145xs_103",M6e="_iconsContainer_145xs_108",_6e="_loadingSpinner_145xs_115",L6e="_spin_145xs_1",I6e="_arrowIcon_145xs_133",b6e="_arrowIconOpen_145xs_141",w6e="_dropdown_145xs_146",C6e="_dropdownIn_145xs_1",N6e="_searchContainer_145xs_173",S6e="_searchInputWrapper_145xs_179",j6e="_searchIcon_145xs_185",$6e="_searchInput_145xs_179",q6e="_optionsList_145xs_210",A6e="_noResults_145xs_235",z6e="_option_145xs_210",P6e="_optionHighlighted_145xs_265",V6e="_optionSelected_145xs_270",T6e="_optionDisabled_145xs_281",H6e="_optionLabel_145xs_287",D6e="_checkIcon_145xs_295",B6e="_widthFull_145xs_303",R6e="_width64_145xs_306",F6e="_width80_145xs_309",E6e="_width96_145xs_312",le={container:d6e,selectButton:l6e,disabled:h6e,error:u6e,default:"_default_145xs_48",outline:p6e,filled:y6e,sm:k6e,md:m6e,lg:f6e,buttonContent:g6e,label:v6e,placeholder:x6e,iconsContainer:M6e,loadingSpinner:_6e,spin:L6e,arrowIcon:I6e,arrowIconOpen:b6e,dropdown:w6e,dropdownIn:C6e,searchContainer:N6e,searchInputWrapper:S6e,searchIcon:j6e,searchInput:$6e,optionsList:q6e,noResults:A6e,option:z6e,optionHighlighted:P6e,optionSelected:V6e,optionDisabled:T6e,optionLabel:H6e,checkIcon:D6e,widthFull:B6e,width64:R6e,width80:F6e,width96:E6e},li=4,Tj=8,O6e=({options:e,value:t,onChange:n,placeholder:c="Sélectionner une option...",disabled:i=!1,loading:r=!1,error:s=!1,className:d="",size:l="md",variant:h="default",width:u="w-full",dropdownPosition:p="auto"})=>{const[y,f]=k.useState(!1),[g,m]=k.useState(""),[x,M]=k.useState(0),[v,L]=k.useState({top:0,left:0,width:0}),[b,C]=k.useState("bottom"),[S,_]=k.useState(null),I=k.useRef(null),j=k.useRef(null),N=k.useRef(null),w=k.useMemo(()=>g?e.filter(E=>E.label.toLowerCase().includes(g.toLowerCase())):e,[e,g]),$=e.find(E=>E.value===t),V=k.useCallback(()=>{if(I.current){const E=I.current.getBoundingClientRect();L({top:E.top,left:E.left,width:E.width})}},[]),T=k.useCallback(()=>{if(!I.current)return;const E=I.current.getBoundingClientRect(),K=E.top-li-Tj,ue=window.innerHeight-E.bottom-li-Tj;let ce;p!=="auto"?ce=p:ce=(j.current?.scrollHeight??0)<=ue?"bottom":K>ue?"top":"bottom",C(xe=>xe===ce?xe:ce),_(Math.max(ce==="bottom"?ue:K,0))},[p]),z=k.useCallback(()=>{V(),T()},[V,T]);k.useEffect(()=>(y&&(z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z)),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}),[y,z]),k.useLayoutEffect(()=>{y&&T()},[y,T]),k.useEffect(()=>{const E=K=>{I.current&&!I.current.contains(K.target)&&j.current&&!j.current.contains(K.target)&&(f(!1),m(""))};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]),k.useEffect(()=>{M(0)},[w]);const A=E=>{E.disabled||(n?.(E.value,E),f(!1),m(""))},q=E=>{m(E.target.value),y||f(!0)},B=E=>{if(!y){(E.key==="ArrowDown"||E.key==="Enter")&&f(!0);return}switch(E.key){case"ArrowDown":E.preventDefault(),M(K=>K<w.length-1?K+1:K);break;case"ArrowUp":E.preventDefault(),M(K=>K>0?K-1:K);break;case"Enter":E.preventDefault(),w[x]&&A(w[x]);break;case"Escape":f(!1),m("");break}},F=()=>[le.selectButton,le[l],le[h],i?le.disabled:"",s?le.error:"",d].filter(Boolean).join(" "),P=()=>{switch(u){case"w-64":return le.width64;case"w-80":return le.width80;case"w-96":return le.width96;default:return le.widthFull}},O=(E,K)=>[le.option,K===x?le.optionHighlighted:"",E.value===t?le.optionSelected:"",E.disabled?le.optionDisabled:""].filter(Boolean).join(" "),J={position:"fixed",top:b==="bottom"?v.top+(I.current?.offsetHeight||0)+li:"auto",bottom:b==="top"?window.innerHeight-v.top+li:"auto",left:v.left,width:v.width,maxHeight:S!=null?`${S}px`:void 0,zIndex:9999};return o.jsxs("div",{className:`${le.container} ${P()}`,children:[o.jsx("button",{ref:I,className:F(),onClick:()=>!i&&f(!y),onKeyDown:B,tabIndex:i?-1:0,type:"button","aria-haspopup":"listbox","aria-expanded":y,disabled:i,children:o.jsxs("div",{className:le.buttonContent,children:[o.jsx("span",{className:`${le.label} ${$?"":le.placeholder}`,children:$?$.label:c}),o.jsxs("div",{className:le.iconsContainer,children:[r&&o.jsx("div",{className:le.loadingSpinner}),o.jsx("svg",{className:`${le.arrowIcon} ${y?le.arrowIconOpen:""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),y&&Lw.createPortal(o.jsxs("div",{className:`${le.dropdown} ${P()}`,style:J,ref:j,children:[o.jsx("div",{className:le.searchContainer,children:o.jsxs("div",{className:le.searchInputWrapper,children:[o.jsx("svg",{className:le.searchIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),o.jsx("input",{ref:N,type:"text",value:g,onChange:q,placeholder:"Rechercher...",className:le.searchInput,autoFocus:!0})]})}),o.jsx("div",{className:le.optionsList,children:w.length===0?o.jsx("div",{className:le.noResults,children:"Aucun résultat trouvé"}):o.jsx("ul",{role:"listbox",children:w.map((E,K)=>o.jsx("li",{className:O(E,K),onClick:()=>A(E),onMouseEnter:()=>M(K),role:"option","aria-selected":E.value===t,"aria-disabled":E.disabled,children:o.jsxs("div",{className:le.buttonContent,children:[o.jsx("span",{className:le.optionLabel,title:E.label,children:E.label}),E.value===t&&o.jsx("svg",{className:le.checkIcon,fill:"currentColor",viewBox:"0 0 20 20",children:o.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]})},E.value))})})]}),document.body)]})},U6e="_container_uq7pt_1",W6e="_item_uq7pt_7",G6e="_mainValue_uq7pt_13",K6e="_label_uq7pt_17",Z6e="_subValue_uq7pt_22",X6e="_subValueWrapper_uq7pt_27",Y6e="_subSeparator_uq7pt_32",Ye={container:U6e,item:W6e,mainValue:G6e,label:K6e,subValue:Z6e,subValueWrapper:X6e,subSeparator:Y6e},J6e=({dms:e,stats:t=[],itemWidth:n="120px",valueFontSize:c="28px",valueFontWeight:i=700,subFontSize:r="16px",subFontWeight:s=600,backgroundColor:d="#ffffff",labelColor:l="#6b7280",valueColor:h="#000000"})=>{const u=(p,y,f)=>{const[g,m]=p.split("/").map(x=>x.trim());return o.jsxs("span",{className:Ye.subValueWrapper,children:[o.jsx("span",{className:Ye.subLeft,style:{color:y},children:g}),o.jsx("span",{className:Ye.subSeparator,children:" / "}),o.jsx("span",{className:Ye.subRight,style:{color:f},children:m})]})};return o.jsxs("div",{className:Ye.container,style:{backgroundColor:d},children:[e&&o.jsxs("div",{className:Ye.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ye.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:e}),o.jsx("div",{className:Ye.label,style:{color:l},children:"DMS"})]}),t.map((p,y)=>o.jsxs("div",{className:Ye.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ye.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:p.value}),o.jsx("div",{className:Ye.label,style:{color:l},children:p.label}),o.jsx("div",{className:Ye.subValue,style:{fontSize:r,fontWeight:s},children:p.subValue&&u(p.subValue,p.subLeftColor,p.subRightColor)})]},y))]})},Q6e="_encours_16ist_1",efe="_header_16ist_19",tfe="_iconWrap_16ist_27",afe="_title_16ist_36",nfe="_items_16ist_47",ofe="_spaceEvenly_16ist_56",cfe="_item_16ist_47",ife="_valueContainer_16ist_86",rfe="_value_16ist_86",sfe="_label_16ist_108",dt={encours:Q6e,header:efe,iconWrap:tfe,title:afe,items:nfe,spaceEvenly:ofe,item:cfe,valueContainer:ife,value:rfe,label:sfe},jc=e=>typeof e=="number"?`${e}px`:typeof e=="string"?e:void 0;function dfe(e,t){const n={},c={};return e.valueColor&&(n.color=e.valueColor),e.valueFontSize!==void 0?n.fontSize=jc(e.valueFontSize):t.defaultValueFontSize!==void 0&&(n.fontSize=jc(t.defaultValueFontSize)),e.valueFontWeight!==void 0?n.fontWeight=e.valueFontWeight:t.defaultValueFontWeight!==void 0&&(n.fontWeight=t.defaultValueFontWeight),e.labelColor&&(c.color=e.labelColor),e.labelFontSize!==void 0?c.fontSize=jc(e.labelFontSize):t.defaultLabelFontSize!==void 0&&(c.fontSize=jc(t.defaultLabelFontSize)),e.labelFontWeight!==void 0?c.fontWeight=e.labelFontWeight:t.defaultLabelFontWeight!==void 0&&(c.fontWeight=t.defaultLabelFontWeight),{valueStyle:n,labelStyle:c}}function lfe(){return o.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.4"}),o.jsx("path",{d:"M8 12h8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}function hfe(e){const{title:t,titleColor:n,titleFontSize:c,titleFontWeight:i,icon:r,iconSize:s=18,iconColor:d,defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p,data:y,style:f,bg:g="#ffffff",width:m,gap:x,className:M,ariaLabel:v}=e,L=r?Mt[r]:void 0,b={background:g,width:jc(m),...f},C={};n&&(C.color=n),c!==void 0&&(C.fontSize=jc(c)),i!==void 0&&(C.fontWeight=i);const S={};return d&&(S.color=d),o.jsxs("section",{className:`${dt.encours} ${M??""}`,style:b,"aria-label":v??t,children:[o.jsxs("div",{className:dt.header,children:[o.jsx("div",{className:dt.iconWrap,"aria-hidden":!0,style:S,children:L?o.jsx(L,{size:typeof s=="number"?s:void 0}):o.jsx(lfe,{})}),o.jsx("div",{className:dt.title,style:C,children:t})]}),o.jsx("div",{className:`${dt.items} ${x===void 0?dt.spaceEvenly:""}`,role:"list",style:x!==void 0?{gap:`${x}px`}:{},children:y.map((_,I)=>{const{valueStyle:j,labelStyle:N}=dfe(_,{defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p});return o.jsx("div",{className:dt.item,role:"listitem",style:{..._.background?{background:_.background}:{},..._.width?{width:jc(_.width)}:{}},children:o.jsxs("div",{className:dt.valueContainer,children:[o.jsx("div",{className:dt.value,style:j,children:_.value}),_.label&&o.jsx("div",{className:dt.label,style:N,children:_.label})]})},`${String(_.label??_.value)}-${I}`)})})]})}const ufe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-360 280-559h400z"})),jA=k.memo(ufe),pfe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m280-400 200-201 200 201z"})),yfe=k.memo(pfe),kfe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#0087BD",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm3.983-3.55q.1 0 .192-.033a.36.36 0 0 0 .158-.117l4.117-4.133q.15-.15.15-.35a.54.54 0 0 0-.15-.367.52.52 0 0 0-.358-.133.5.5 0 0 0-.359.15l-3.75 3.75L5.35 7.583a.48.48 0 0 0-.7 0q-.15.15-.15.367 0 .216.15.35l1.983 2a.48.48 0 0 0 .35.15"})),mfe=k.memo(kfe),ffe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#1E2122",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm0-1h10V3H3z"})),gfe=k.memo(ffe),vfe=({items:e,onSave:t,loading:n,disabled:c,saveLabel:i,savingLabel:r,buttonTitle:s,size:d=16,colors:l={bg:"#DADADA",activeBg:"var(--color-primary)",circle:"#FFFFFF",icon:"#1C1B1F",icon2:"#FFFFFF"},style:h,a11yConfig:u})=>{const[p,y]=k.useState(!1),[f,g]=k.useState(e),[m,x]=k.useState(!1);if(k.useEffect(()=>{x(!0)},[]),k.useEffect(()=>{g(e)},[e]),!m)return null;const M=(b,C)=>{C<4||g(S=>S.map(_=>_.component_key===b?{..._,visible:!_.visible}:_))},v=()=>{t(f),y(!1)},L=Y(u,s);return o.jsxs("div",{style:{position:"relative",display:"inline-block",...h},children:[o.jsxs("div",{onClick:()=>{c||y(!p)},style:{display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",borderRadius:4,transition:"background 0.2s"},title:L,children:[o.jsx(l$,{width:d,height:d,fill:l?.icon||"currentColor",style:{transition:"color 0.2s"}}),p?o.jsx(yfe,{width:d,height:d,fill:l?.icon||"currentColor"}):o.jsx(jA,{width:d,height:d,fill:l?.icon||"currentColor"})]}),p&&o.jsxs("div",{style:{position:"absolute",top:"120%",right:0,minWidth:260,background:"#fff",borderRadius:"0.25rem",boxShadow:"0px 3px 7px 0px rgba(17, 20, 21, 0.05),0px 14px 14px 0px rgba(17, 20, 21, 0.04),0px 30px 18px 0px rgba(17, 20, 21, 0.03), 0px 54px 22px 0px rgba(17, 20, 21, 0.01),0px 85px 24px 0px rgba(17, 20, 21, 0)",zIndex:235465456,padding:"0 0 0.5rem 0"},children:[o.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:f.map((b,C)=>o.jsxs(k.Fragment,{children:[o.jsxs("li",{onClick:()=>M(b.component_key,C),style:{display:"flex",alignItems:"center",padding:"0.5rem",cursor:C<4?"not-allowed":"pointer",transition:"background 0.2s"},onMouseEnter:S=>{C>=4&&(S.currentTarget.style.background="#F9FAFB")},onMouseLeave:S=>{C>=4&&(S.currentTarget.style.background="transparent")},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:8,flexShrink:0},children:b.visible?o.jsx(mfe,{width:20,height:20,fill:l?.activeBg||"var(--color-primary, #008FBB)"}):o.jsx(gfe,{width:20,height:20,fill:"#D1D5DB"})}),o.jsx("span",{style:{fontSize:"14px",color:"#111827",fontWeight:400,userSelect:"none"},children:b.label})]}),C===3&&o.jsx("div",{style:{height:1,background:"#E5E7EB",margin:"4px 0"}})]},b.component_key))}),o.jsx("div",{style:{padding:"12px 16px 0 16px",display:"flex",justifyContent:"flex-end"},children:o.jsx("button",{type:"button",onClick:v,disabled:n,style:{padding:"6px 16px",borderRadius:4,border:"none",background:"var(--color-primary, #008FBB)",color:"#fff",fontSize:"14px",fontWeight:500,cursor:n?"not-allowed":"pointer",transition:"opacity 0.2s",opacity:n?.7:1},children:n?r:i})})]})]})},xfe="_container_zhny9_1",Mfe="_card_zhny9_15",_fe="_footer_zhny9_33",Lfe="_noPaddingMobile_zhny9_51",hi={container:xfe,card:Mfe,footer:_fe,noPaddingMobile:Lfe},Ife="_board_95t8m_1",bfe="_clickable_95t8m_21",wfe="_sideBar_95t8m_26",Cfe="_boardContent_95t8m_32",Nfe="_orange_95t8m_40",Sfe="_red_95t8m_44",jfe="_green_95t8m_48",$fe="_grey_95t8m_52",qfe="_lightGrey_95t8m_56",Afe="_big_95t8m_61",zfe="_medium_95t8m_66",Pfe="_headerRow_95t8m_70",Vfe="_iconWrapper_95t8m_75",Tfe="_headerTitle_95t8m_80",Hfe="_valueArea_95t8m_89",Dfe="_titleWhite_95t8m_99",Bfe="_titleBlack_95t8m_103",Rfe="_valueWhite_95t8m_108",Ffe="_valueBlack_95t8m_112",Efe="_valueBlue_95t8m_116",Ofe="_bars_95t8m_121",Ufe="_bar_95t8m_121",Wfe="_barDark_95t8m_135",Gfe="_barDim_95t8m_139",Kfe="_predictionSection_95t8m_143",Zfe="_predictionHeader_95t8m_155",Xfe="_predictionBody_95t8m_162",Yfe="_hasPrediction_95t8m_170",Ve={board:Ife,clickable:bfe,sideBar:wfe,boardContent:Cfe,orange:Nfe,red:Sfe,green:jfe,grey:$fe,lightGrey:qfe,big:Afe,medium:zfe,headerRow:Pfe,iconWrapper:Vfe,headerTitle:Tfe,valueArea:Hfe,titleWhite:Dfe,titleBlack:Bfe,valueWhite:Rfe,valueBlack:Ffe,valueBlue:Efe,bars:Ofe,bar:Ufe,barDark:Wfe,barDim:Gfe,predictionSection:Kfe,predictionHeader:Zfe,predictionBody:Xfe,hasPrediction:Yfe},Jfe=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${Ve.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${Ve.bar} ${r<c?"":e?Ve.barDark:Ve.barDim}`},r))})},xt=({a11yConfig:e,iconName:t,label:n,value:c,backgroundColor:i="green",bars:r,lightBars:s=5,size:d="big",valueScale:l,width:h,height:u,className:p="",style:y,titleColor:f="white",valueColor:g="white",titleFontSize:m,titleFontWeight:x,valueFontSize:M,valueFontWeight:v,barColor:L,justifyContent:b="space-between",alignItems:C="flex-start",cardGap:S="",onClick:_,iconColor:I,titleKey:j,predictionValue:N,predictionLabel:w})=>{const $=r!=="none",V=r==="endingDark",{padding:T,...z}=y||{},A=h===void 0&&u===void 0&&i===void 0&&Object.keys(z).length===0?void 0:{...h!==void 0?{width:h}:{},...u!==void 0?{height:u}:{},...i!==void 0?{backgroundColor:i}:{},...z},q=`${Ve.board} ${Ve[d]} ${N!==void 0?Ve.hasPrediction:""} ${p}`;return o.jsxs("div",{className:q,onClick:_,style:l!==void 0?{...A,"--ds-value-scale":l}:A,children:[L&&o.jsx("div",{className:Ve.sideBar,style:{backgroundColor:L}}),o.jsxs("div",{className:Ve.boardContent,style:{padding:T,gap:S},children:[o.jsxs("div",{className:Ve.headerRow,style:{justifyContent:b,alignItems:C},children:[t&&o.jsx("div",{className:Ve.iconWrapper,style:{color:I},children:t}),o.jsx("div",{className:`${Ve.headerTitle} header-title-data-board`,children:o.jsx("span",{title:Y(e,j),"aria-label":e?.description,style:{color:f,...m?{fontSize:m}:{},...x?{fontWeight:x}:{}},children:n})}),$?o.jsx(Jfe,{endingDark:V,lightCount:s}):null]}),o.jsx("div",{className:Ve.valueArea,style:{color:g,...M?{fontSize:M}:{},...v?{fontWeight:v}:{}},children:c})]}),N!==void 0&&o.jsxs("div",{className:Ve.predictionSection,children:[o.jsx("div",{className:Ve.predictionHeader,children:w??"PRED."}),o.jsx("div",{className:Ve.predictionBody,children:N})]})]})},Qfe="_wrapper_1ydle_10",e8e="_hosp_1ydle_19",t8e="_headerRow_1ydle_54",a8e="_iconWrapper_1ydle_61",n8e="_headerTitle_1ydle_67",o8e="_hospValue_1ydle_76",c8e="_side_1ydle_88",i8e="_mini_1ydle_100",r8e="_miniLabel_1ydle_131",s8e="_miniValue_1ydle_140",d8e="_miniBars_1ydle_150",l8e="_bars_1ydle_155",h8e="_bar_1ydle_155",u8e="_barDark_1ydle_169",p8e="_barDim_1ydle_173",He={wrapper:Qfe,hosp:e8e,headerRow:t8e,iconWrapper:a8e,headerTitle:n8e,hospValue:o8e,side:c8e,mini:i8e,miniLabel:r8e,miniValue:s8e,miniBars:d8e,bars:l8e,bar:h8e,barDark:u8e,barDim:p8e},y8e=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${He.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${He.bar} ${r<c?"":e?He.barDark:He.barDim}`},r))})},$A=({left:e,right:t,className:n="",style:c,miniTilesCount:i=3})=>{const r=e.bars??"endingDark",s=r!=="none",d=r==="endingDark",l={...c,"--mini-tiles-count":i};return o.jsxs("div",{className:`${He.wrapper} ${n} data-four-boards`,style:l,children:[o.jsxs("div",{className:`${He.hosp} ${e.className||""}`,onClick:e.onClick,style:{...e.width?{width:e.width}:{},...e.height?{height:e.height}:{},...e.backgroundColor?{backgroundColor:e.backgroundColor}:{},...e.style||{}},title:Y(e.a11yConfig,e.titleKey),children:[o.jsxs("div",{className:He.headerRow,children:[o.jsxs("div",{className:`${He.iconWrapper} icon-wrapper-data-four-boards`,children:[e.iconName&&o.jsx("span",{style:{color:e.iconColor},children:e.iconName}),o.jsx("span",{className:He.headerTitle,style:{color:e.titleColor||"white",...e.titleFontSize?{fontSize:e.titleFontSize}:{},...e.titleFontWeight?{fontWeight:e.titleFontWeight}:{}},title:Y(e.a11yConfig,e.titleKey),children:e.label})]}),s?o.jsx(y8e,{endingDark:d,lightCount:e.lightBars??5}):null]}),o.jsx("div",{className:He.hospValue,style:{color:e.valueColor||"white",...e.valueScale!==void 0?{"--ds-value-scale":e.valueScale}:{},...e.valueFontSize?{fontSize:e.valueFontSize}:{},...e.valueFontWeight?{fontWeight:e.valueFontWeight}:{}},children:e.value})]}),o.jsx("div",{className:He.side,children:t.map((h,u)=>o.jsxs("div",{className:`${He.mini} ${h.className||""} icon-wrapper-data-four-boards`,onClick:h.onClick,style:{...h.width?{width:h.width}:{},...h.height?{height:h.height}:{},...h.backgroundColor?{backgroundColor:h.backgroundColor}:{},...h.style||{}},title:Y(h.a11yConfig,h.titleKey),children:[o.jsxs("span",{className:He.miniLabel,style:{color:h.titleColor||"white",textAlign:"right",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...h.titleFontSize?{fontSize:h.titleFontSize}:{},...h.titleFontWeight?{fontWeight:h.titleFontWeight}:{}},title:Y(h.a11yConfig,h.titleKey),children:[h.iconName&&o.jsx("span",{style:{color:h.iconColor},children:h.iconName}),h.label]}),o.jsx("span",{className:`${He.miniValue} mini-value-data-four-boards`,style:{color:h.valueColor||"white",textAlign:"right",...h.valueScale!==void 0?{"--ds-value-scale":h.valueScale}:{},...h.valueFontSize?{fontSize:h.valueFontSize}:{},...h.valueFontWeight?{fontWeight:h.valueFontWeight}:{}},children:h.value}),o.jsx("div",{className:He.miniBars})]},h.id??`${h.label}-${u}`))})]})},k8e=({items:e,footerLabel:t,width:n,height:c,size:i=320,style:r,className:s="",backgroundColor:d,titleFontSize:l,titleFontWeight:h,valueFontSize:u,valueFontWeight:p,noPaddingLeftRight:y=!1,onItemClick:f})=>{const g={width:n??i,height:c,backgroundColor:d??"var(--ds-navy)",...r},m=e[0],x=e[1],M=e.slice(2,5);return o.jsxs("div",{style:g,className:`${hi.container} ${y?hi.noPaddingMobile:""} ${s}`,children:[o.jsxs("div",{className:hi.card,children:[m?o.jsx(xt,{a11yConfig:m.a11yConfig,label:m.label,value:m.value,backgroundColor:m.backgroundColor,bars:m.bars,lightBars:m.lightBars,size:m.size??"big",valueScale:m.valueScale,width:m.width,height:m.height,titleColor:"white",valueColor:"white",titleFontSize:m.titleFontSize??l,titleFontWeight:m.titleFontWeight??h,valueFontSize:m.valueFontSize??u,valueFontWeight:m.valueFontWeight??p,titleKey:m.titleKey,onClick:v=>f?.(0,v)}):null,x&&M.length>0?o.jsx($A,{left:{a11yConfig:x.a11yConfig,id:x.id,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,valueScale:x.valueScale,width:x.width,height:x.height,titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,titleKey:x.titleKey,onClick:v=>f?.(1,v)},right:M.map((v,L)=>({a11yConfig:v.a11yConfig,id:v.id,label:v.label,value:v.value,backgroundColor:v.backgroundColor,bars:v.bars,lightBars:v.lightBars,valueScale:v.valueScale,width:v.width,height:v.height,titleFontSize:v.titleFontSize??l,titleFontWeight:v.titleFontWeight??h,valueFontSize:v.valueFontSize??u,valueFontWeight:v.valueFontWeight??p,titleKey:v.titleKey,onClick:b=>f?.(2+L,b)}))}):x&&M.length===0?o.jsx(xt,{a11yConfig:x.a11yConfig,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,size:x.size??"big",valueScale:x.valueScale,width:x.width,height:x.height,titleColor:"white",valueColor:"white",titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,onClick:v=>f?.(1,v)}):null]}),t&&o.jsx("div",{className:hi.footer,children:t})]})},m8e=({x:e,y:t,width:n,payload:c,fontSize:i,fontWeight:r,stroke:s})=>o.jsx("g",{transform:`translate(${e},${t})`,children:o.jsx("foreignObject",{x:-n,y:-35,width:n,height:70,style:{overflow:"visible"},children:o.jsx("div",{style:{fontSize:i,fontWeight:r,color:s,lineHeight:"1.2",display:"flex",justifyContent:"flex-end",textAlign:"right",alignItems:"center",height:"100%",width:"100%",paddingRight:"8px",boxSizing:"border-box"},children:o.jsx("span",{style:{overflowWrap:"break-word",whiteSpace:"normal",display:"block",maxWidth:"100%"},children:c.value})})})}),f8e=({data:e,height:t=360,barColor:n="#0284C7",tooltipEnabled:c=!0,backgroundColor:i="transparent",legendTextColor:r="var(--color-text)",barHeight:s=40,yAxisWidth:d=120,fontSize:l="12px",fontWeight:h="400",domain:u,xAxisLabel:p,margin:y={top:20,right:60,bottom:40,left:0},valueFormatter:f,tickFormatter:g,labelDataKey:m="percentage",isAnimationActive:x=!0})=>{const M=(y.top??20)+(y.bottom??40)+e.length*(s+20),v=Math.max(M,t),L=k.useMemo(()=>{if(!e||e.length===0)return d;const I=(parseFloat(l)||12)*.7,N=Math.max(...e.map(w=>(w.label||"").length))*I+16;return Math.min(Math.max(N,40),d)},[e,l,d]),b=_=>g?g(_):_?.toString()||"",C=_=>f&&m==="value"?f(_):_==null||_===""?"":m==="percentage"?`${_}%`:_.toString(),S=(_,I,j)=>{if(typeof _!="number")return _;const N=f?f(_):_.toString(),w=j?.payload?.percentage;return typeof w=="number"&&Number.isFinite(w)&&m==="percentage"?`${N} (${w.toFixed(1)}%)`:N};return o.jsx("div",{style:{backgroundColor:i,width:"100%"},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:v,children:o.jsxs(a.BarChart,{data:e,layout:"vertical",margin:y,children:[o.jsx(a.CartesianGrid,{opacity:.4,stroke:"#E5E7EB",vertical:!1,horizontal:!0}),o.jsx(a.XAxis,{type:"number",domain:u||[0,"auto"],axisLine:!1,tickLine:!1,fontSize:l,fontWeight:h,stroke:r,tickFormatter:b,label:p?{value:p,position:"insideBottom",offset:-10,style:{textAnchor:"middle",fill:r,fontSize:12,fontWeight:"500"}}:void 0}),o.jsx(a.YAxis,{type:"category",dataKey:"label",stroke:r,axisLine:!1,tickLine:!1,width:L,interval:0,fontSize:l,fontWeight:h,tick:o.jsx(m8e,{fontSize:l,fontWeight:h,stroke:r})}),c&&o.jsx(a.Tooltip,{formatter:S,labelStyle:{color:"var(--color-text)"}}),o.jsx(a.Bar,{dataKey:"value",fill:n,radius:0,barSize:s,isAnimationActive:x,children:o.jsx(a.LabelList,{dataKey:m,position:"right",offset:10,formatter:C,fill:r,fontSize:l,fontWeight:h})})]})})})},g8e="_menu_10i6j_1",v8e="_menuRow_10i6j_18",x8e="_separator_10i6j_33",M8e="_rowLabel_10i6j_39",_8e="_rowLeadingIcon_10i6j_47",L8e="_rowIcon_10i6j_54",Wc={menu:g8e,menuRow:v8e,separator:x8e,rowLabel:M8e,rowLeadingIcon:_8e,rowIcon:L8e},I8e=k.forwardRef(function({isVisible:t,onClose:n,items:c,style:i,position:r,bg:s},d){const l=k.useRef(null),h=d||l;if(k.useEffect(()=>{if(!t)return;const y=f=>{h.current&&!h.current.contains(f.target)&&n?.()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t,n]),!t)return null;const p={...{top:r?.top,left:r?.left,right:r?.right,bottom:r?.bottom},...s&&{backgroundColor:s},...i};return o.jsx("div",{ref:h,role:"menu",className:Wc.menu,style:p,children:c.map(y=>{if(y.type==="separator")return o.jsx("hr",{className:Wc.separator},y.id);const f=y,g=f.color?{color:f.color}:{},m=f.closeOnClick!==!1;return o.jsxs("button",{role:"menuitem",className:Wc.menuRow,style:g,onClick:()=>{f.onClick?.(),m&&n?.()},children:[o.jsxs("span",{className:Wc.rowLabel,children:[f.leadingIcon&&o.jsx("span",{className:Wc.rowLeadingIcon,children:f.leadingIcon}),o.jsx("span",{children:f.label})]}),f.icon&&o.jsx("span",{className:Wc.rowIcon,children:f.icon})]},f.id)})})}),qA=({user:e,logoutHref:t,logoutTarget:n="_self",onLogout:c,profileHref:i,profileLinkTarget:r="_self",backgroundColor:s="transparent",textColor:d="inherit",roleColor:l="#888",avatarSize:h="32px",padding:u="10px",gap:p="12px",emailFontSize:y="14px",emailFontWeight:f=600,roleFontSize:g="12px",roleFontWeight:m,avatarColor:x="#5b8fb9",backgroundColorAvatar:M="#f1f4f5",dropdownMenuItems:v,dropdownMenuStyle:L,dropdownMenuOffset:b,statusDotColor:C,a11yConfig:S,style:_,className:I=""})=>{const{user:j}=mt(),N=e||j,{currentTheme:w,switchTheme:$}=wL(),V=k.useRef(null),T=k.useRef(null),[z,A]=k.useState(!1),[q,B]=k.useState({}),F=k.useMemo(()=>{const ae=[],ne=({variant:pe})=>pe==="sun"?o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("circle",{cx:"12",cy:"12",r:"4"})}):o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});i&&(ae.push({id:"profile",type:"action",label:"Mon profil",onClick:()=>{typeof window>"u"||(r==="_blank"?window.open(i,"_blank","noopener,noreferrer"):window.location.assign(i))}}),ae.push({id:"sep-profile",type:"separator"}));const de=w==="dark";return ae.push({id:"theme",type:"action",label:de?"Mode clair":"Mode sombre",icon:o.jsx(ne,{variant:de?"sun":"moon"}),onClick:()=>{$(de?"light":"dark")}}),(t||c)&&(ae.push({id:"sep-theme",type:"separator"}),ae.push({id:"logout",type:"action",label:"Se déconnecter",danger:!0,onClick:()=>{if(t){if(typeof window>"u")return;n==="_blank"?window.open(t,"_blank","noopener,noreferrer"):window.location.assign(t);return}c?.()}})),ae},[w,t,n,c,i,r,$]),P=v??F,O=()=>{if(!V.current){A(ae=>!ae);return}if(!z){const ae=V.current.getBoundingClientRect(),ne=window.innerWidth,de=window.innerHeight,pe=200,me=200,U=4,X=b?.x??0,re=b?.y??0,Be=ne-ae.right>=pe+U;B(Be?{top:ae.bottom-me+re,left:ae.right+U+X}:{bottom:de-ae.top+re,left:ae.left+X})}A(ae=>!ae)};if(k.useEffect(()=>{if(!z||!V.current)return;const ae=()=>{const ne=V.current.getBoundingClientRect(),de=window.innerWidth,pe=window.innerHeight,me=200,U=200,X=4,re=b?.x??0,je=b?.y??0,ge=de-ne.right>=me+X;B(ge?{top:ne.bottom-U+je,left:ne.right+X+re}:{bottom:pe-ne.top+je,left:ne.left+re})};return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),()=>{window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae)}},[z,b]),k.useEffect(()=>{if(!z||!V.current||!T.current)return;const ae=()=>{const de=V.current.getBoundingClientRect(),pe=T.current.getBoundingClientRect(),me=b?.x??0,U=b?.y??0;B(X=>X.left!==void 0&&X.top!==void 0&&X.left>=de.right-1?{top:de.bottom-pe.height+U,left:X.left+me}:X)},ne=requestAnimationFrame(()=>{setTimeout(ae,0)});return()=>cancelAnimationFrame(ne)},[z,b]),!N)return null;const J=N,E=parseInt(h,10)||40,K=`${E*.375}px`,ue=`${E*1.375}px`,ce=`${E*.2}px`,xe=`${E*.6}px`,ie=()=>{const ae=parseInt(h,10)||40,ne=Math.max(8,ae*.34375),de=Math.max(2,ae*.05);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{position:"relative",flexShrink:0,userSelect:"none"},children:[J.image?o.jsx("img",{src:J.image,alt:`${J.prenom} ${J.nom}`,style:{width:h,height:h,borderRadius:"50%",objectFit:"cover",userSelect:"none"}}):o.jsxs("div",{style:{width:h,height:h,position:"relative",borderRadius:"50%",backgroundColor:M,overflow:"hidden",userSelect:"none"},children:[o.jsx("div",{style:{width:K,height:K,borderRadius:"50%",backgroundColor:x,position:"absolute",top:ce,left:"50%",transform:"translateX(-50%)",zIndex:2,userSelect:"none"}}),o.jsx("div",{style:{width:ue,height:ue,borderRadius:"50%",backgroundColor:x,position:"absolute",top:xe,left:"50%",transform:"translateX(-50%)",zIndex:1,userSelect:"none"}})]}),C&&o.jsx("div",{style:{position:"absolute",bottom:de,right:de,width:`${ne}px`,height:`${ne}px`,borderRadius:"50%",backgroundColor:C,border:"2px solid white",zIndex:10}})]}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",minWidth:0,flex:1},children:[o.jsx("span",{style:{fontWeight:f,fontSize:y,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.email,children:J.email}),o.jsx("span",{style:{color:l,fontSize:g,fontWeight:m,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.role,children:J.role})]})]})};return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:V,className:`user-info ${I}`,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,backgroundColor:s,gap:p,color:d,width:"100%",boxSizing:"border-box",cursor:"pointer",userSelect:"none",..._},onClick:O,title:Y(S,J.role),role:"button",tabIndex:0,children:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:p,flex:1,minWidth:0},children:o.jsx(ie,{})})}),o.jsx(I8e,{ref:T,isVisible:z,onClose:()=>A(!1),items:P,style:L,position:q})]})},b8e="_navItem_16uqf_1",w8e="_label_16uqf_14",C8e="_icon_16uqf_26",m1={navItem:b8e,label:w8e,icon:C8e},dC=({label:e,labelKey:t,onClick:n,href:c,isActive:i,icon:r,style:s,className:d="",highlightColor:l="#00aec7",color:h="#333",activeColor:u="#00aec7",highlightBackgroundColor:p="rgba(0, 0, 0, 0.05)",fontSize:y="15px",fontWeight:f="500",sidebarCollapsed:g=!1,padding:m="10px 16px",borderWidth:x="4px",iconGap:M="12px",disabled:v=!1,disabledColor:L,a11yConfig:b})=>{const C=()=>{v||n?.()},S=o.jsxs(o.Fragment,{children:[r&&o.jsx("span",{className:m1.icon,style:{marginRight:g?0:M},children:r}),!g&&o.jsx("span",{className:m1.label,children:e})]}),_=()=>{if(!i)return"transparent";const j=N=>{const w=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return w?{r:parseInt(w[1],16),g:parseInt(w[2],16),b:parseInt(w[3],16)}:null};if(l.startsWith("#")){const N=j(l);if(N)return`rgba(${N.r}, ${N.g}, ${N.b}, 0.08)`}else if(l.startsWith("rgb")){const N=l.match(/\d+/g);if(N&&N.length>=3)return`rgba(${N[0]}, ${N[1]}, ${N[2]}, 0.08)`}return p},I={onClick:C,className:`${m1.navItem} ${i?m1.active:""} ${d} ${v?m1.disabled:""}`,style:{padding:m,color:i?u:v?L||"#999":h,borderLeft:i?`${x} solid ${l}`:`${x} solid transparent`,backgroundColor:_(),fontSize:y,fontWeight:f,cursor:v?"not-allowed":"pointer",textDecoration:"none",...s},"aria-disabled":v};return c&&!n&&!v?o.jsx("a",{href:c,...I,title:Y(b,t),children:S}):o.jsx("div",{...I,role:n?"button":void 0,tabIndex:n&&!v?0:void 0,title:Y(b,t),children:S})},N8e="_navbar_y5tex_1",S8e="_topSection_y5tex_9",j8e="_logoContainer_y5tex_14",$8e="_collapseToggle_y5tex_20",q8e="_collapsedRail_y5tex_37",A8e="_collapsedToggle_y5tex_44",z8e="_sectionsContainer_y5tex_67",P8e="_sectionTitle_y5tex_73",V8e="_sectionItems_y5tex_78",T8e="_bottomSection_y5tex_83",H8e="_versionContainer_y5tex_102",Je={navbar:N8e,topSection:S8e,logoContainer:j8e,collapseToggle:$8e,collapsedRail:q8e,collapsedToggle:A8e,sectionsContainer:z8e,sectionTitle:P8e,sectionItems:V8e,bottomSection:T8e,versionContainer:H8e},D8e=({logoProps:e,logoSpacing:t,navItems:n,padding:c="24px 16px",sectionSpacing:i="32px",itemSpacing:r="4px",backgroundColor:s="#fff",highlightColor:d="#00aec7",highlightBackgroundColor:l="rgba(0, 0, 0, 0.05)",version:h,navSectionStyle:u,navLinkStyle:p,navItemPadding:y="10px 16px",navItemBorderWidth:f="4px",navItemIconGap:g="12px",navItemFontSize:m="15px",navItemFontWeight:x="500",navItemColor:M,sectionTitlePadding:v="16px",sectionTitleFontSize:L="11px",sectionTitleColor:b="#999",sectionTitleWeight:C="500",versionFontSize:S="12px",versionFontWeight:_="400",versionColor:I="#999",userInfoProps:j,style:N,className:w="",width:$="280px",showLogo:V=!0,versionA11yConfig:T,displayNone:z=!1,showCollapseToggle:A=!1,collapsed:q=!1,onCollapseToggle:B,collapseToggleLabel:F="Toggle sidebar",collapseToggleIconPath:P="/icon/dock_to_left.svg"})=>{const O=mt(),J=O.activeNav,E=O.setActiveNav,K=O.user,ue=j.user||K;return A&&q?o.jsx("div",{className:`${Je.collapsedRail} ${w}`,style:{display:z?"none":"flex"},children:o.jsx("button",{type:"button",className:Je.collapsedToggle,onClick:B,"aria-label":F,children:o.jsx(xw,{path:P,width:18,height:18})})}):o.jsxs("div",{className:`${Je.navbar} ${w}`,style:{width:$,backgroundColor:s,padding:c,display:z?"none":"flex",...N},children:[o.jsxs("div",{className:Je.topSection,style:{gap:t},children:[V&&o.jsxs("div",{className:Je.logoContainer,children:[o.jsx(bL,{...e}),A&&o.jsx("button",{type:"button",className:Je.collapseToggle,onClick:B,"aria-label":F,children:o.jsx(xw,{path:P,width:20,height:20})})]}),o.jsx("div",{className:Je.sectionsContainer,style:{gap:i},children:n.map((ce,xe)=>o.jsxs("div",{className:Je.section,children:[ce.title&&o.jsx("div",{className:Je.sectionTitle,title:Y(ce.a11yConfig,ce.titleKey),style:{fontSize:L,color:b,padding:v,fontWeight:C,border:"4px solid transparent",...u},children:ce.title}),o.jsx("div",{className:Je.sectionItems,style:{gap:r},children:ce.items.map(ie=>o.jsx(dC,{...ie,isActive:ie.isActive===null?ie.isActive:J===ie.id,onClick:()=>{ie.onClick&&ie.onClick(),ie.isActive==null&&E(ie.id)},highlightColor:d,activeColor:d,highlightBackgroundColor:l,padding:y,borderWidth:f,iconGap:g,fontSize:m,fontWeight:x,color:M,style:p},ie.id))})]},xe))})]}),o.jsxs("div",{className:Je.bottomSection,style:{gap:t},children:[o.jsx(qA,{...j,user:ue}),h&&o.jsx("div",{className:Je.versionContainer,title:Y(T,h),style:{fontSize:S,fontWeight:_,color:I},children:h})]})]})},B8e="_container_4qege_1",R8e="_titleContainer_4qege_10",F8e="_title_4qege_10",E8e="_inlineToggleContainer_4qege_24",O8e="_rightContentContainer_4qege_30",f1={container:B8e,titleContainer:R8e,title:F8e,inlineToggleContainer:E8e,rightContentContainer:O8e},U8e=({className:e="",style:t,fontSize:n="20px",fontWeight:c="bold",color:i="#000",padding:r="0",margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,navItems:y,allNavItems:f,formatTitle:g=M=>M,rightContent:m,inlineToggle:x})=>{const{activeNav:M}=mt(),v=y.find(b=>b.id===M)||f?.find(b=>b.id===M),L=v?g(v.label):M||"";return L?o.jsxs("div",{className:`${f1.container} ${e}`,style:{padding:r,margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,...t},children:[o.jsxs("div",{className:f1.titleContainer,children:[o.jsx("div",{className:f1.title,style:{fontSize:n,fontWeight:c,color:i},children:L}),x&&o.jsx("div",{className:f1.inlineToggleContainer,children:x})]}),m&&o.jsx("div",{className:f1.rightContentContainer,children:m})]}):null},W8e="_navItem_1hg26_1",G8e="_navItemIcon_1hg26_21",K8e="_navItemLabel_1hg26_29",Z8e="_navItemCount_1hg26_36",X8e="_navItemIndicator_1hg26_49",g1={navItem:W8e,navItemIcon:G8e,navItemLabel:K8e,navItemCount:Z8e,navItemIndicator:X8e},AA=({a11yConfig:e,label:t,isActive:n,onClick:c,href:i,labelKey:r,icon:s,count:d,activeColor:l="#00aec7",inactiveColor:h="#666",activeBackgroundColor:u="transparent",countBackgroundColor:p,countColor:y="#fff",countBorderRadius:f="10px",countPadding:g="2px 6px",countFontSize:m="12px",countFontWeight:x="500",indicatorColor:M="#00aec7",indicatorHeight:v="3px",padding:L="8px 4px",fontSize:b="14px",fontWeight:C="500",gap:S="8px",style:_,className:I="",disabled:j=!1,onNavigate:N})=>{const w=()=>{j||(c?.(),i&&(N?N(i):window.location.href=i))};return o.jsxs("div",{className:`${g1.navItem} ${I}`,onClick:w,title:Y(e,r),style:{gap:S,padding:L,color:n?l:h,backgroundColor:n?u:"transparent",fontSize:b,fontWeight:C,..._},children:[s&&o.jsx("span",{className:g1.navItemIcon,children:s}),o.jsx("span",{className:g1.navItemLabel,children:t}),d!==void 0&&o.jsx("span",{className:g1.navItemCount,style:{backgroundColor:p,color:y,borderRadius:f,padding:g,fontSize:m,fontWeight:x},children:d}),n&&!j&&o.jsx("div",{className:g1.navItemIndicator,style:{height:v,backgroundColor:M}})]})},Y8e="_container_13hsa_1",J8e="_groupHeader_13hsa_8",Q8e="_groupHeaderLeft_13hsa_18",ege="_groupIcon_13hsa_23",tge="_dropdown_13hsa_29",age="_item_13hsa_42",nge="_itemIcon_13hsa_65",oge="_chevron_13hsa_72",cge="_chevronOpen_13hsa_79",ft={container:Y8e,groupHeader:J8e,groupHeaderLeft:Q8e,groupIcon:ege,dropdown:tge,item:age,itemIcon:nge,chevron:oge,chevronOpen:cge},ige=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-344 240-584l43-43 197 197 197-197 43 43z"})),R1=k.memo(ige),zA=({groups:e,activeItemId:t,onItemClick:n,style:c,className:i,bgColor:r="transparent",color:s="var(--color-text)",headerBgColor:d="var(--color-indicator)",headerColor:l="var(--color-text)",headerBorderBottomColor:h="var(--color-border)",dropdownBgColor:u="var(--color-background)",itemBgColor:p="transparent",itemHoverBgColor:y="rgba(0,0,0,0.05)",itemColor:f="var(--color-text)",itemActiveColor:g="var(--color-primary)",itemActiveBorderColor:m="var(--color-primary)",itemDividerColor:x="var(--color-border)",iconColor:M="#555555",activeIconColor:v="var(--color-primary)",headerIconColor:L="var(--color-text)",chevronColor:b="var(--color-text)",iconSize:C=22,headerPadding:S="14px 20px",itemPadding:_="14px 20px",iconGap:I=14,borderRadius:j=0})=>{const[N,w]=k.useState(""),$=k.useRef(null);k.useEffect(()=>{const T=z=>{$.current&&!$.current.contains(z.target)&&w("")};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const V={backgroundColor:r,color:s,borderRadius:j,...c};return o.jsx("nav",{ref:$,className:[ft.container,i].filter(Boolean).join(" "),style:V,children:e.map(T=>{const z=N===T.id,A={backgroundColor:d,color:l,padding:S,borderBottom:`1px solid ${h}`,gap:I},q={backgroundColor:u};return o.jsxs("div",{children:[o.jsxs("div",{className:ft.groupHeader,style:A,onClick:()=>w(z?"":T.id),role:"button","aria-expanded":z,children:[o.jsxs("div",{className:ft.groupHeaderLeft,style:{gap:I},children:[T.icon&&o.jsx("span",{className:ft.groupIcon,style:{color:L,width:C,height:C},children:T.icon}),o.jsx("span",{children:T.label})]}),o.jsx("span",{className:[ft.chevron,z?ft.chevronOpen:""].join(" "),style:{color:b},children:o.jsx(R1,{width:18,height:18})})]}),z&&o.jsx("div",{className:ft.dropdown,style:q,children:T.items.map(B=>{const F=B.id===t,P={padding:_,gap:I,color:F?g:f,backgroundColor:p,"--item-border-width":F?"4px":"1px","--item-border-color":F?m:x};return o.jsxs("div",{className:ft.item,style:P,onClick:()=>{n?.(T.id,B.id),w("")},role:"menuitem",onMouseEnter:O=>{F||(O.currentTarget.style.backgroundColor=y)},children:[B.icon&&o.jsx("span",{className:ft.itemIcon,style:{color:F?v:M,width:C,height:C},children:B.icon}),o.jsx("span",{children:B.label})]},B.id)})})]},T.id)})})},rge="_subheaderContent_1glo8_1",sge="_navContainer_1glo8_11",dge="_rightContent_1glo8_45",Wb={subheaderContent:rge,navContainer:sge,rightContent:dge},lge=({subNavItems:e,backgroundColor:t="transparent",padding:n="0",margin:c,width:i,height:r="auto",border:s,borderBottom:d="none",itemGap:l="24px",actionsGap:h="16px",itemPadding:u="12px 0",itemFontSize:p="14px",itemFontWeight:y="500",activeItemColor:f="#00aec7",inactiveItemColor:g="#5c6975",indicatorHeight:m="3px",showDraggable:x=!1,showLegend:M=!1,showData:v=!1,className:L="",style:b,countBackgroundColor:C,countColor:S,countBorderRadius:_,countPadding:I,countFontSize:j,countFontWeight:N,navContainerClassName:w,navContainerStyle:$,rightContentClassName:V,rightContentStyle:T,rightActions:z,activeSwitcherColor:A,inactiveSwitcherColor:q,isMobile:B=!1,onNavigate:F})=>{const{activeSubNav:P,setActiveSubNav:O,navCounts:J,activeNav:E}=mt();if(B){const K=e.find(ce=>ce.id===P)||e[0],ue=[{id:"current-group",label:K?.label||E?.toUpperCase()||"MENU",icon:K?.icon,items:e.map(ce=>({id:ce.id,label:ce.label,icon:ce.icon}))}];return o.jsx("div",{className:L,style:b,children:o.jsx(zA,{groups:ue,activeItemId:P,onItemClick:(ce,xe)=>{const ie=e.find(ae=>ae.id===xe);ie&&(ie.onClick&&ie.onClick(),ie.href&&(F?F(ie.href):ie.onNavigate?ie.onNavigate(ie.href):window.location.href=ie.href),O(xe))},headerBgColor:t})})}return o.jsxs("div",{className:`${Wb.subheaderContent} ${L}`,style:{backgroundColor:t,padding:n,margin:c,width:i,height:r,border:s,borderBottom:d,...b},children:[o.jsx("div",{className:`${Wb.navContainer} ${w||""}`,style:{gap:l,...$},children:e.map(K=>{const ue=K.count!==void 0?K.count:J[K.id],ce=P===K.id||K.isActive;return o.jsx(AA,{...K,onNavigate:F||K.onNavigate,count:ue,isActive:ce,onClick:()=>{K.onClick&&K.onClick(),O(K.id)},activeColor:f,inactiveColor:g,countBackgroundColor:C,countColor:S,countBorderRadius:_,countPadding:I,countFontSize:j,countFontWeight:N,indicatorColor:f,indicatorHeight:m,padding:u,fontSize:p,fontWeight:y,gap:"8px",style:K.style},K.id)})}),o.jsxs("div",{className:`${Wb.rightContent} ${V||""}`,style:{gap:h,...T},children:[x&&o.jsx(yL,{size:20,colors:{bg:A,activeBg:q,icon:"#1C1B1F",icon2:"#FFFFFF"}}),M&&o.jsx(kL,{size:20,colors:{bg:A,activeBg:q,icon:"#1C1B1F",icon2:"#FFFFFF"}}),v&&o.jsx(mL,{size:20,colors:{bg:A,activeBg:q,icon:"#1C1B1F",icon2:"#FFFFFF"}}),z]})]})},hge=({onSwitch:e,size:t="20px",lightIconColor:n="#666",darkIconColor:c="#fff",backgroundColor:i="transparent",padding:r="8px",borderRadius:s="50%",style:d,className:l=""})=>{const[h,u]=k.useState(!1),{currentTheme:p,switchTheme:y}=wL(),f=p!="dark",g=()=>{y(f?"dark":"light"),e?.()};return k.useEffect(()=>{u(!0)},[]),!h||!p?o.jsx(o.Fragment,{}):o.jsx("div",{className:`theme-switcher ${l}`,onClick:g,style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i,padding:r,borderRadius:s,transition:"all 0.3s ease",...d},children:f?o.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):o.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:c,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"5"}),o.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),o.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),o.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),o.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),o.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),o.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),o.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),o.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})})},uge=({initialSortBy:e=null,initialSortOrder:t="asc",onSortChange:n})=>{const[c,i]=k.useState({sortBy:e,sortOrder:t,filters:{}}),r=k.useCallback(s=>{let d="asc";c.sortBy===s&&(d=c.sortOrder==="asc"?"desc":"asc");const l={...c,sortBy:s,sortOrder:d};i(l),n(s,d)},[c,n]);return{tableState:c,handleSort:r}},pge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-800v487L216-537l-56 57 320 320 320-320-56-57-224 224v-487z"})),yge=k.memo(pge),kge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-160v-487L216-423l-56-57 320-320 320 320-56 57-224-224v487z"})),mge=k.memo(kge),fge=({columns:e,sortBy:t,sortOrder:n,onSort:c,removeLabelSpan:i=!1})=>o.jsx("thead",{children:o.jsx("tr",{children:e.map((r,s)=>{const d=t===r.key,l=!!r.sortable;return o.jsx("th",{className:`${r.className||""}${l?" sortable":""}`,style:{width:r.width,textAlign:r.align||"left"},onClick:()=>l&&c(String(r.key)),title:Y(r.a11yConfig,r.titleKey),children:o.jsxs("div",{className:`th-content ${r.align?`align-${r.align}`:""}`,children:[i?r.label:o.jsx("span",{children:r.label}),l&&o.jsx("span",{className:"sort-icon-container",style:{display:"inline-flex",alignItems:"center"},children:d&&n==="asc"?o.jsx(mge,{width:16,height:16,style:{fill:"currentColor",transition:"all 0.2s ease"}}):o.jsx(yge,{width:16,height:16,style:{fill:"currentColor",opacity:d?1:.5,transition:"all 0.2s ease"}})})]})},String(r.key)||s)})})}),gge=({data:e,columns:t,rowKey:n,onRowClick:c,isLoading:i,text:r,rowStyle:s,rowClassName:d,renderSeparator:l})=>!e.length&&!i?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{colSpan:t.length,style:{textAlign:"center",padding:"32px"},children:o.jsx("span",{style:{color:"var(--table-text-muted)"},children:r?.noData||"Aucune donnée disponible"})})})}):o.jsx("tbody",{children:e.map((h,u)=>{const p=h[n],y=typeof p=="string"||typeof p=="number"?p:u,f=l?l(h):null;return o.jsx("tr",{onClick:()=>c&&c(h),style:{cursor:c?"pointer":"default",...s?s(h):{}},className:d?d(h,u):"",children:f?o.jsx("td",{colSpan:t.length,children:f}):t.map((g,m)=>o.jsx("td",{style:{width:g.width,textAlign:g.align||"left"},className:g.className,children:g.render?g.render(h):h[g.key]},`${String(g.key)}-${m}`))},y)})}),vge=({state:e,onPaginationChange:t,onLoadMore:n,infiniteScroll:c,hasMore:i,text:r,isLoading:s,pageSizeOptions:d})=>{const{page:l,pageSize:h,total:u}=e,p=h===-1?u:h,y=Math.ceil(u/p)||1,f=Math.min(Math.max(1,l),y),g=u===0?0:(f-1)*p+1,m=Math.min(f*p,u),x=b=>{t({page:b})},M=k.useMemo(()=>{if(y<=6)return Array.from({length:y},($,V)=>V+1);const S=Math.max(f-1,1),_=Math.min(f+1,y),I=S>2,j=_<y-2,N=1,w=y;if(!I&&j)return[...Array.from({length:5},(T,z)=>z+1),"...",y];if(I&&!j){const V=Array.from({length:5},(T,z)=>y-5+z+1);return[N,"...",...V]}if(I&&j){const $=Array.from({length:_-S+1},(V,T)=>S+T);return[N,"...",...$,"...",w]}return[]},[f,y]),v=!!(d&&d.length>0),L=!c&&h!==-1&&y>1&&o.jsxs("div",{className:"pagination-controls",children:[o.jsx("button",{className:"pagination-btn",onClick:()=>x(1),disabled:f===1,title:r?.first||"Premier",children:"<<"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f-1),disabled:f===1,title:r?.previous||"Précédent",children:"<"}),(M||[]).map((b,C)=>b==="..."?o.jsx("span",{style:{padding:"0 4px",color:"var(--table-text-muted)"},children:"..."},C):o.jsx("button",{className:`pagination-btn ${b===f?"active":""}`,onClick:()=>x(b),children:b},C)),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f+1),disabled:f===y,title:r?.next||"Suivant",children:">"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(y),disabled:f===y,title:r?.last||"Dernier",children:">>"})]});return o.jsxs("div",{className:"table-pagination",children:[o.jsx("div",{className:"pagination-summary",children:u>0?o.jsx("span",{children:r?.itemsRange?r.itemsRange(g,m,u):o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[g,"–",m]})," ",r?.of||"sur"," ",o.jsx("b",{children:u.toLocaleString()})," ",r?.items||"éléments"]})}):o.jsx("span",{children:r?.noResults||"0 résultats"})}),v?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-center",children:L}),o.jsxs("div",{className:"pagination-pagesize",children:[o.jsx("label",{htmlFor:"table-pagination-pagesize",children:r?.perPage||"Par page"}),o.jsx("select",{id:"table-pagination-pagesize",value:h,onChange:b=>t({pageSize:Number(b.target.value),page:1}),children:(d||[]).map(b=>o.jsx("option",{value:b,children:b},b))})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-spacer"}),L]}),!c&&n&&i&&o.jsx("div",{className:"pagination-load-more",children:o.jsx("button",{className:"btn-load-more",onClick:n,disabled:s,style:{padding:"8px 16px",backgroundColor:"white",border:"1px solid #ddd",borderRadius:"6px",cursor:s?"wait":"pointer",color:"#555",fontWeight:600},children:s?r?.loading||"Chargement...":r?.loadMore||"Charger plus"})})]})},lC=({data:e,columns:t,isLoading:n,pagination:c,onPaginationChange:i,onSortChange:r,rowKey:s,loaderSize:d=40,stickyHeader:l=!0,height:h,minHeight:u="200px",text:p,onLoadMore:y,infiniteScroll:f,hasMore:g,tableState:m,className:x,style:M,rowStyle:v,onRowClick:L,rowClassName:b,titleKey:C,removeLabelSpan:S=!1,a11yConfig:_,renderSeparator:I,pageSizeOptions:j})=>{const N=k.useMemo(()=>({...p}),[p]),w=k.useRef(null);k.useEffect(()=>{if(!f||!y||!g||n)return;const q=new IntersectionObserver(B=>{B[0].isIntersecting&&y()},{threshold:.1});return w.current&&q.observe(w.current),()=>q.disconnect()},[f,y,g,n]);const{tableState:$,handleSort:V}=uge({initialSortBy:null,onSortChange:r}),T=(m?.sortBy!==void 0?m.sortBy:$.sortBy)??void 0,z=m?.sortOrder!==void 0?m.sortOrder:$.sortOrder,A=q=>{const B=T,F=z;let P="asc";B===q&&(P=F==="asc"?"desc":"asc"),m?.sortBy!==void 0?r(q,P):V(q)};return o.jsxs("div",{className:`table-container ${x||""}`,style:M,title:Y(_,C),children:[o.jsxs("div",{className:"table-frame",style:{height:h??void 0,minHeight:u??void 0},children:[n&&o.jsx("div",{className:"table-loader-overlay",children:o.jsx("div",{className:"spinner",style:{width:d,height:d,borderTopColor:"var(--table-primary)"}})}),o.jsxs("div",{className:`table-wrapper ${l?"sticky-header":""}`,children:[o.jsxs("table",{className:"data-table",children:[o.jsx(fge,{columns:t,sortBy:T,sortOrder:z,onSort:A,removeLabelSpan:S}),o.jsx(gge,{data:e,columns:t.map(q=>({...q,render:q.render?B=>q.render(B,{}):void 0})),rowKey:s,onRowClick:L,isLoading:n,text:N,rowStyle:typeof v=="function"?v:v?()=>v:void 0,rowClassName:b,renderSeparator:I})]}),f&&o.jsx("div",{ref:w,style:{height:20,margin:10}})]})]}),o.jsx(vge,{state:c,onPaginationChange:i,text:N,onLoadMore:y,infiniteScroll:f,hasMore:g,isLoading:n,pageSizeOptions:j})]})};function PA(e,t,n,c,i,r,s){e.forEach(d=>{const l=d[n],h=d[t]??[],u=h.length>0,p=c.has(l);r.set(l,{level:i,hasChildren:u,isExpanded:p}),s.push(d),u&&p&&PA(h,t,n,c,i+1,r,s)})}const xge=({data:e,columns:t,rowKey:n,childrenKey:c="children",treeColumnKey:i,defaultExpandedKeys:r,expandedKeys:s,onExpandedKeysChange:d,indent:l=20,showFooter:h=!0,pagination:u,onPaginationChange:p,colors:y,rowClassName:f,...g})=>{const[m,x]=k.useState(()=>new Set(r)),M=s!==void 0,v=k.useMemo(()=>M?new Set(s):m,[M,s,m]),L=N=>{const w=new Set(v);w.has(N)?w.delete(N):w.add(N),M?d?.(Array.from(w)):x(w)},b=k.useMemo(()=>{if(!u||u.pageSize===-1)return e;const N=(u.page-1)*u.pageSize;return e.slice(N,N+u.pageSize)},[e,u]),{rows:C,meta:S}=k.useMemo(()=>{const N=new Map,w=[];return PA(b,c,n,v,0,N,w),{rows:w,meta:N}},[b,c,n,v]),_=k.useMemo(()=>t.reduce((N,w)=>{const $=w.width?parseInt(w.width,10):NaN;return N+(Number.isFinite($)?$:140)},0),[t]),I=k.useMemo(()=>t.map(N=>N.key!==i?N:{...N,render:w=>{const $=w[n],{level:V,hasChildren:T,isExpanded:z}=S.get($)??{level:0,hasChildren:!1,isExpanded:!1},A=N.render?N.render(w):w[N.key];return o.jsxs("span",{className:"htl-cell",style:{paddingLeft:V*l},children:[T?o.jsx("button",{type:"button",className:"htl-toggle",onClick:q=>{q.stopPropagation(),L($)},children:o.jsx(jA,{width:16,height:16,style:{fill:"currentColor",transform:z?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.15s ease"}})}):o.jsx("span",{className:"htl-toggle-spacer"}),A]})}}),[t,i,S,l,n]),j=(N,w)=>{const $=N[n],{level:V,hasChildren:T,isExpanded:z}=S.get($)??{level:0,hasChildren:!1,isExpanded:!1},A=["htl-row"];return V===0?(A.push("htl-root"),T&&z&&A.push("htl-root-expanded")):T&&A.push("htl-group"),f&&A.push(f(N,w,V)),A.join(" ")};return o.jsx("div",{className:`htl-wrapper ${h?"":"htl-no-footer"}`,style:{"--htl-active-bg":y?.activeRowBackground,"--htl-nested-bg":y?.groupRowBackground,"--htl-toggle-color":y?.toggleIconColor,"--htl-root-color":y?.rootTextColor,"--htl-table-min-width":`${_}px`},children:o.jsx(lC,{...g,data:C,columns:I,rowKey:n,rowClassName:j,pagination:u??{page:1,pageSize:C.length||1,total:C.length},onPaginationChange:p??(()=>{})})})},Mge="_datePickerContainer_1gx2l_3",_ge="_label_1gx2l_16",Lge="_displayNode_1gx2l_23",Ige="_datePickerButton_1gx2l_30",bge="_datePickerButtonDisabled_1gx2l_50",wge="_datePickerButtonOpen_1gx2l_59",Cge="_datePickerLabel_1gx2l_68",Nge="_placeholder_1gx2l_79",Sge="_trailingIcons_1gx2l_83",jge="_chevron_1gx2l_89",$ge="_clearButton_1gx2l_97",qge="_errorMessage_1gx2l_114",Age="_dropdown_1gx2l_119",zge="_calendarHeader_1gx2l_143",Pge="_navButton_1gx2l_152",Vge="_headerSelectors_1gx2l_171",Tge="_monthSelector_1gx2l_179",Hge="_yearSelector_1gx2l_180",Dge="_selectorButton_1gx2l_184",Bge="_selectorChevron_1gx2l_201",Rge="_selectorChevronOpen_1gx2l_206",Fge="_monthDropdown_1gx2l_210",Ege="_yearDropdown_1gx2l_211",Oge="_monthItem_1gx2l_231",Uge="_yearItem_1gx2l_232",Wge="_monthItemSelected_1gx2l_254",Gge="_yearItemSelected_1gx2l_255",Kge="_weekdays_1gx2l_259",Zge="_weekday_1gx2l_259",Xge="_calendarGrid_1gx2l_275",Yge="_dateCell_1gx2l_284",Jge="_dateCellSelected_1gx2l_307",Qge="_dateCellOtherMonth_1gx2l_311",e7e="_dateCellOtherMonthSelected_1gx2l_315",t7e="_calendarFooter_1gx2l_319",a7e="_cancelButton_1gx2l_327",n7e="_applyButton_1gx2l_328",o7e="_timePickerContainer_1gx2l_372",c7e="_timeGroup_1gx2l_381",i7e="_timeLabel_1gx2l_388",r7e="_timeInputWrapper_1gx2l_394",s7e="_timeInput_1gx2l_394",d7e="_timeSeparator_1gx2l_422",Z={datePickerContainer:Mge,label:_ge,displayNode:Lge,datePickerButton:Ige,datePickerButtonDisabled:bge,datePickerButtonOpen:wge,datePickerLabel:Cge,placeholder:Nge,trailingIcons:Sge,chevron:jge,clearButton:$ge,errorMessage:qge,dropdown:Age,calendarHeader:zge,navButton:Pge,headerSelectors:Vge,monthSelector:Tge,yearSelector:Hge,selectorButton:Dge,selectorChevron:Bge,selectorChevronOpen:Rge,monthDropdown:Fge,yearDropdown:Ege,monthItem:Oge,yearItem:Uge,monthItemSelected:Wge,yearItemSelected:Gge,weekdays:Kge,weekday:Zge,calendarGrid:Xge,dateCell:Yge,dateCellSelected:Jge,dateCellOtherMonth:Qge,dateCellOtherMonthSelected:e7e,calendarFooter:t7e,cancelButton:a7e,applyButton:n7e,timePickerContainer:o7e,timeGroup:c7e,timeLabel:i7e,timeInputWrapper:r7e,timeInput:s7e,timeSeparator:d7e},l7e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144zM480-80q-83 0-156-31.5T197-197t-85.5-127T80-480t31.5-156T197-763t127-85.5T480-880t156 31.5T763-763t85.5 127T880-480t-31.5 156T763-197t-127 85.5T480-80m0-80q134 0 227-93t93-227-93-227-227-93-227 93-93 227 93 227 227 93m0-320"})),h7e=k.memo(l7e),Hj=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],u7e=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],_w=({value:e,onChange:t,label:n,placeholder:c="Sélectionner une date...",className:i="",fullWidth:r=!0,disabled:s=!1,error:d,buttonHeight:l="2.75rem",buttonPadding:h="0.75rem 1rem 0.75rem 1rem",dropdownMaxHeight:u="auto",fontSize:p="0.875rem",iconSize:y="1.5rem",labelMarginBottom:f="0.5rem",errorMarginTop:g="0.25rem",dropdownMarginTop:m="0.25rem",itemPadding:x="0.5rem 0.75rem",fontWeight:M="400",buttonBgColor:v,buttonBorderColor:L,buttonTextColor:b,dropdownBgColor:C="#ffffff",itemHoverColor:S,selectedItemBgColor:_,iconColor:I,errorColor:j,labelColor:N,placeholderColor:w,borderRadius:$="var(--radius-content)",borderWidth:V="0.0625rem",boxShadow:T="0 0.25rem 0.75rem rgba(0, 0, 0, 0.1)",transitionDuration:z="0.2s",transitionTiming:A="ease",dateCellSize:q="2.5rem",headerTextColor:B="#6c757d",weekdayTextColor:F="#6c757d",currentMonthDateColor:P="#212529",otherMonthDateColor:O="#adb5bd",selectedDateBgColor:J="#00A6D9",selectedDateTextColor:E="#ffffff",cancelButtonBgColor:K="#e9ecef",cancelButtonTextColor:ue="#212529",applyButtonBgColor:ce="#00A6D9",applyButtonTextColor:xe="#ffffff",actionButtonPadding:ie,actionButtonFontSize:ae,width:ne,displayNode:de=void 0,displayMode:pe="auto",displayNodeAriaLabel:me,dropdownPosition:U="auto",dropdownAlignment:X="right",dropdownWidth:re,withBorder:je=!1,icon:Be,precision:ge="day",horizontalTimePicker:Se=!1,hoursLabel:Dc="Heures",minutesLabel:h1="Minutes",lowerLimit:oe=null,upperLimit:be=null,strictTimeLimits:DL=!1,outOfLimitsMessage:Le="La date/heure choisie est hors des limites autorisées",months:wt,weekdays:RA,cancelText:FA="Annuler",applyText:EA="Appliquer",prevMonthAriaLabel:OA="Mois précédent",nextMonthAriaLabel:UA="Mois suivant",calendarAriaLabel:WA="Sélecteur de date",openedAriaLabel:GA="Ouvrir le sélecteur de date",selectedDateAriaLabel:KA="Date sélectionnée: ",rotateIcon:ZA=!0,clearable:XA=!1,clearAriaLabel:YA="Effacer la date"})=>{const Ct=H=>{if(H instanceof Date)return isNaN(H.getTime())?null:H;if(typeof H=="string"&&H){const G=new Date(H);return isNaN(G.getTime())?null:G}return null},[Ge,Rt]=k.useState(!1),[u1,JA]=k.useState({top:0,left:0,width:0}),[hC,QA]=k.useState("bottom"),[uC,ez]=k.useState(null),[he,p1]=k.useState(Ct(e)||new Date),[y1,BL]=k.useState(Ct(e)),[Q1,RL]=k.useState(Ct(e)?.getHours()??0),[ei,FL]=k.useState(Ct(e)?.getMinutes()??0),[EL,Bc]=k.useState(!1),[OL,Rc]=k.useState(!1),UL=k.useRef(null),Fc=k.useRef(null),pC=k.useRef(null),WL=k.useRef(null),GL=k.useRef(null),yC=k.useRef(Ct(e)?.getTime());k.useEffect(()=>{const H=Ct(e),G=H?.getTime();G!==yC.current&&(yC.current=G,BL(H),H&&(p1(H),RL(H.getHours()),FL(H.getMinutes())))},[e]);const kC=k.useCallback(()=>{if(Fc.current){const H=Fc.current.getBoundingClientRect();JA({top:H.top,left:H.left,width:H.width})}},[]),mC=8,ti=k.useCallback(()=>{if(!Fc.current)return;const H=Fc.current.getBoundingClientRect(),G=(parseFloat(m.replace("rem",""))||0)*16,Me=H.top-G-mC,Te=window.innerHeight-H.bottom-G-mC;let ze;if(U!=="auto")ze=U;else{const Re=pC.current?.scrollHeight??0;ze=Re<=Te?"bottom":Re<=Me||Me>Te?"top":"bottom"}QA(Re=>Re===ze?Re:ze),ez(Math.max(ze==="bottom"?Te:Me,0))},[U,m]),Ec=k.useCallback(()=>{kC(),ti()},[kC,ti]);k.useEffect(()=>(Ge&&(Ec(),window.addEventListener("scroll",Ec,!0),window.addEventListener("resize",Ec)),()=>{window.removeEventListener("scroll",Ec,!0),window.removeEventListener("resize",Ec)}),[Ge,Ec]),k.useLayoutEffect(()=>{Ge&&ti()},[Ge,ti]),k.useEffect(()=>{const H=G=>{if(UL.current&&!UL.current.contains(G.target)){const Me=document.getElementById("datepicker-dropdown");if(Me&&Me.contains(G.target))return;Rt(!1),Bc(!1),Rc(!1)}WL.current&&!WL.current.contains(G.target)&&Bc(!1),GL.current&&!GL.current.contains(G.target)&&Rc(!1)};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]);const fC=H=>new Date(H.getFullYear(),H.getMonth()+1,0).getDate(),tz=H=>{const G=new Date(H.getFullYear(),H.getMonth(),1).getDay();return G===0?6:G-1},az=()=>{const H=[],G=tz(he),Me=fC(he),Te=new Date(he.getFullYear(),he.getMonth()-1,1),ze=fC(Te);for(let Ce=G-1;Ce>=0;Ce--)H.push(new Date(he.getFullYear(),he.getMonth()-1,ze-Ce));for(let Ce=1;Ce<=Me;Ce++)H.push(new Date(he.getFullYear(),he.getMonth(),Ce));const Re=42-H.length;for(let Ce=1;Ce<=Re;Ce++)H.push(new Date(he.getFullYear(),he.getMonth()+1,Ce));return H},nz=(H,G)=>!H||!G?!1:H.getDate()===G.getDate()&&H.getMonth()===G.getMonth()&&H.getFullYear()===G.getFullYear(),oz=H=>H.getMonth()===he.getMonth()&&H.getFullYear()===he.getFullYear(),ai=DL?H=>Math.floor(H.getTime()/6e4)*6e4:H=>new Date(H.getFullYear(),H.getMonth(),H.getDate()).getTime(),gC=H=>!(oe&&ai(H)<ai(oe)||be&&ai(H)>ai(be)),vC=y1?(()=>{const H=new Date(y1);return H.setHours(Q1),H.setMinutes(ei),H})():null,Oc=vC?!gC(vC):!1,ni=new Date(he.getFullYear(),he.getMonth()-1,1),oi=new Date(he.getFullYear(),he.getMonth()+1,1),KL=!!(oe&&(ni.getFullYear()<oe.getFullYear()||ni.getFullYear()===oe.getFullYear()&&ni.getMonth()<oe.getMonth())),ZL=!!(be&&(oi.getFullYear()>be.getFullYear()||oi.getFullYear()===be.getFullYear()&&oi.getMonth()>be.getMonth())),cz=()=>{KL||p1(ni)},iz=()=>{ZL||p1(oi)},rz=H=>{if(!s){const G=new Date(H);G.setHours(Q1),G.setMinutes(ei),BL(G)}},sz=()=>{if(!s){if(y1){const H=new Date(y1);if(H.setHours(Q1),H.setMinutes(ei),!gC(H))return;t(H)}else t(null);Rt(!1)}},dz=()=>{const H=Ct(e);BL(H),H&&(RL(H.getHours()),FL(H.getMinutes())),Rt(!1)},lz=H=>{p1(new Date(he.getFullYear(),H,1)),Bc(!1)},hz=H=>{p1(new Date(H,he.getMonth(),1)),Rc(!1)},uz=()=>{const H=he.getFullYear(),G=oe?oe.getFullYear():H-10,Me=be?be.getFullYear():H+10,Te=[];for(let ze=G;ze<=Me;ze++)Te.push(ze);return Te},pz=H=>{const G=he.getFullYear();return!!(oe&&(G<oe.getFullYear()||G===oe.getFullYear()&&H<oe.getMonth())||be&&(G>be.getFullYear()||G===be.getFullYear()&&H>be.getMonth()))},yz=H=>{if(!s)switch(H.key){case"Enter":case" ":H.preventDefault(),Rt(!Ge);break;case"Escape":Rt(!1),Bc(!1),Rc(!1);break;case"Tab":Ge&&(Rt(!1),Bc(!1),Rc(!1));break}},kz={width:ne||(r?"100%":"auto"),fontSize:p,fontWeight:M},mz={height:l,padding:h,backgroundColor:v||"#ffffff",border:je?void 0:"none",borderColor:d?j||"#dc3545":L||"#dee2e6",color:b||"#212529",borderRadius:$,borderWidth:V,fontWeight:M,transition:`all ${z} ${A}`},fz=Se?{flexDirection:"column",borderTop:"none",borderLeft:"1px solid #eee"}:{},gz=Se?{flex:1,minWidth:0}:void 0,vz=Se?{display:"flex",flexDirection:"row",alignItems:"stretch"}:void 0,xz={backgroundColor:C||"#ffffff",maxHeight:u==="auto"?uC!=null?`${uC}px`:void 0:u,overflowY:"auto",borderRadius:$,borderWidth:V,boxShadow:T,transition:`opacity ${z} ${A}, transform ${z} ${A}`,position:"fixed",top:hC==="bottom"?u1.top+(Fc.current?.offsetHeight||0)+parseFloat(m.replace("rem",""))*16:"auto",bottom:hC==="top"?window.innerHeight-u1.top+parseFloat(m.replace("rem",""))*16:"auto",left:X==="left"?u1.left:"auto",right:X==="right"?window.innerWidth-(u1.left+u1.width):"auto",width:re||"30vw",minWidth:re?void 0:0,zIndex:10001},xC={width:y,height:y,color:I||"#6c757d","--icon-rotation":ZA&&Ge?"rotate(180deg)":"rotate(0deg)"},Mz={color:N||"#212529",marginBottom:f,fontWeight:M},_z={color:w||"#6c757d"},Lz={color:j||"#dc3545",marginTop:g},Iz=az(),nt=Ct(e),MC=H=>`${H.getDate().toString().padStart(2,"0")}/${(H.getMonth()+1).toString().padStart(2,"0")}/${H.getFullYear()}`,_C=nt?ge==="minutes"?`${MC(nt)} ${nt.getHours().toString().padStart(2,"0")}:${nt.getMinutes().toString().padStart(2,"0")}`:MC(nt):"",LC=!!de&&(pe==="icon"||pe==="auto"&&!nt),bz=XA&&!LC&&!!nt&&!s,wz={width:"0.875rem",height:"0.875rem",color:I||"#6c757d"},Cz=me||(nt?`${KA}${_C}`:GA);return o.jsxs("div",{className:`${Z.datePickerContainer} ${i}`,ref:UL,style:kz,"data-fullwidth":r,"data-disabled":s,"data-error":!!d,children:[n&&o.jsx("label",{className:Z.label,style:Mz,children:n}),o.jsxs("button",{ref:Fc,type:"button",onClick:()=>!s&&Rt(!Ge),onKeyDown:yz,className:`
8336
+ `,s3e="_mpRoot_31595_1",d3e="_mpHeader_31595_22",l3e="_mpTitle_31595_31",h3e="_mpList_31595_35",u3e="_mpVertical_31595_41",p3e="_mpHorizontal_31595_46",y3e="_mpItem_31595_55",k3e="_mpClickable_31595_95",m3e="_mpLeft_31595_117",f3e="_mpIcon_31595_125",g3e="_mpMeta_31595_140",v3e="_mpLabel_31595_145",x3e="_mpDate_31595_154",M3e="_mpRight_31595_160",_3e="_mpValue_31595_168",L3e="_mpHint_31595_176",I3e="_mpBadge_31595_180",b3e="_mpBadgeTop_31595_199",w3e="_mpBadgeSub_31595_206",C3e="_mpBadgeSmall_31595_213",N3e="_mpPill_31595_229",S3e="_mpRounded_31595_232",j3e="_mpCompact_31595_236",$3e="_compactItemWrapper_31595_252",q3e="_mpSummaryRoot_31595_265",A3e="_mpSummaryInner_31595_269",z3e="_mpSummaryFlex_31595_284",P3e="_mpSummaryCardWrapperHorizontal_31595_292",V3e="_mpSummaryCardWrapper_31595_292",T3e="_mpSummaryCardHorizontal_31595_303",H3e="_mpSummaryCard_31595_292",D3e="_mpSummaryValue_31595_321",B3e="_mpSummaryLabel_31595_327",R3e="_mpSummaryBadge_31595_338",F3e="_mpSummaryBadgeSub_31595_357",E3e="_mpEmpty_31595_365",O3e="_mpSummaryVertical_31595_372",U3e="_mpIconSquare_31595_380",ee={mpRoot:s3e,mpHeader:d3e,mpTitle:l3e,mpList:h3e,mpVertical:u3e,mpHorizontal:p3e,mpItem:y3e,mpClickable:k3e,mpLeft:m3e,mpIcon:f3e,mpMeta:g3e,mpLabel:v3e,mpDate:x3e,mpRight:M3e,mpValue:_3e,mpHint:L3e,mpBadge:I3e,mpBadgeTop:b3e,mpBadgeSub:w3e,mpBadgeSmall:C3e,mpPill:N3e,mpRounded:S3e,mpCompact:j3e,compactItemWrapper:$3e,mpSummaryRoot:q3e,mpSummaryInner:A3e,mpSummaryFlex:z3e,mpSummaryCardWrapperHorizontal:P3e,mpSummaryCardWrapper:V3e,mpSummaryCardHorizontal:T3e,mpSummaryCard:H3e,mpSummaryValue:D3e,mpSummaryLabel:B3e,mpSummaryBadge:R3e,mpSummaryBadgeSub:F3e,mpEmpty:E3e,mpSummaryVertical:O3e,mpIconSquare:U3e},Vt=(e,t=1)=>{if(!e||typeof e!="string")return`rgba(124, 58, 237, ${t})`;const n=e.trim();if(n.toLowerCase()==="transparent")return"rgba(0,0,0,0)";if(/^rgba?\(/i.test(n))return/^rgba\(/i.test(n)?n.replace(/rgba\(([^)]+),\s*([0-9.]+)\s*\)$/,(d,l)=>`rgba(${l.split(",").map(u=>u.trim()).slice(0,3).join(", ")}, ${t})`):n;let c=n.replace("#","").toLowerCase();if(c.length===3&&(c=c.split("").map(d=>d+d).join("")),!/^[0-9a-f]{6}$/i.test(c))return`rgba(124, 58, 237, ${t})`;const i=parseInt(c.slice(0,2),16),r=parseInt(c.slice(2,4),16),s=parseInt(c.slice(4,6),16);return`rgba(${i}, ${r}, ${s}, ${t})`},W3e=({item:e,shape:t,onItemClick:n,color:c,renderItem:i})=>{const r=k.useCallback(()=>{n?.(e)},[n,e]),s=[ee.mpItem,t==="pill"?ee.mpPill:ee.mpRounded,n?ee.mpClickable:""].filter(Boolean).join(" ");if(i)return o.jsx("div",{className:s,role:n?"button":"group",tabIndex:n?0:-1,onClick:r,onKeyDown:y=>{n&&(y.key==="Enter"||y.key===" ")&&(n(e),y.preventDefault())},"aria-label":n?`Voir les détails de ${e.label}`:void 0,children:i(e)});const d=n?"button":"div",l=n?{onClick:r,className:s,type:"button","aria-label":`Voir les détails de ${e.label}`}:{className:s,role:"group"},h=e.iconComponent,u=e.iconSquareBg,p=e.iconColor;return o.jsxs(d,{...l,children:[o.jsxs("div",{className:ee.mpLeft,children:[h?o.jsx("div",{className:ee.mpIconSquare,style:{background:u??Vt(p??c??"#7c3aed",1),border:`1px solid ${Vt(p??c??"#7c3aed",.18)}`,color:p??"#ffffff"},children:k.createElement(h,{size:20,color:p??"#fff",strokeWidth:1.8})}):e.icon?o.jsx("div",{className:ee.mpIcon,children:e.icon}):null,o.jsxs("div",{className:ee.mpMeta,children:[o.jsx("div",{className:ee.mpLabel,children:e.label}),e.subLabel&&o.jsx("div",{className:ee.mpDate,children:e.subLabel}),e.date&&o.jsx("div",{className:ee.mpDate,children:e.date})]})]}),o.jsxs("div",{className:ee.mpRight,children:[o.jsx("div",{className:ee.mpValue,style:{color:e.valueColor??c??void 0},children:e.value}),e.badge?o.jsxs("div",{className:[ee.mpBadge,e.badge.small?ee.mpBadgeSmall:""].join(" "),style:{backgroundColor:e.badge.bg??Vt(e.badge.color||c||"#7c3aed",.12),borderColor:e.badge.bg?"transparent":Vt(e.badge.color||c||"#7c3aed",.18),color:e.badge.color??e.badge.textColor??"#0f172a",fontWeight:600},children:[o.jsx("div",{className:ee.mpBadgeTop,children:e.badge.text}),e.badge.subText&&o.jsx("div",{className:ee.mpBadgeSub,children:e.badge.subText})]}):e.hint?o.jsx("div",{className:ee.mpHint,children:e.hint}):null]})]})},G3e=k.memo(W3e),$j=({title:e,right:t})=>!e&&!t?null:o.jsxs("div",{className:ee.mpHeader,children:[o.jsx("div",{className:ee.mpTitle,children:e}),o.jsx("div",{children:t})]}),qj=(e,t=1)=>{try{return Vt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},K3e=({item:e})=>o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:14,borderRadius:12,minHeight:88,boxSizing:"border-box",background:e.bgColor??"transparent",border:`1px solid ${e.borderColor??"transparent"}`,boxShadow:"0 4px 10px rgba(15,23,42,0.03)"},children:[o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[o.jsx("div",{style:{fontSize:13,fontWeight:700,color:"#475569"},children:e.label}),o.jsx("div",{style:{fontSize:26,fontWeight:900,color:"#0f172a",lineHeight:1},children:e.value})]}),o.jsx("div",{title:String(e.label),style:{display:"flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:10,background:e.iconSquareBg??qj("#7c3aed",.12),border:`1px solid ${qj(e.iconColor??"#7c3aed",.12)}`,boxShadow:"none"},children:e.iconComponent?k.createElement(e.iconComponent,{size:18,color:e.iconColor??"#7c3aed",strokeWidth:1.6}):null})]}),Z3e=({item:e,bg:t,onClick:n,width:c,height:i,extraStyle:r})=>o.jsxs("div",{className:ee.mpSummaryCard,style:{background:t,width:c??void 0,height:i??void 0,...r??{}},role:n?"button":"group",tabIndex:n?0:-1,onClick:()=>n?.(e),children:[o.jsx("div",{className:ee.mpSummaryLabel,children:e.label}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:e.valueColor??"#2a24deff"},children:e.value}),e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]})]}),Aj=(e,t=1)=>{try{return Vt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},zj=e=>o.jsxs("div",{style:{display:"grid",gridTemplateRows:"auto 1fr",width:"100%",gap:8,alignItems:"center",boxSizing:"border-box",minWidth:0},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between-left",alignItems:"baseline",gap:10,width:"100%"},children:[o.jsx("div",{style:{fontWeight:700,fontSize:"clamp(14px, 1.2vw, 16px)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:e.label}),e.subLabel?o.jsx("div",{style:{fontSize:"clamp(13px, 1.1vw, 15px)",fontWeight:600,whiteSpace:"nowrap"},children:e.subLabel}):null]}),o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:15,width:"100%"},children:[o.jsx("div",{style:{fontWeight:900,fontSize:"clamp(16px, 1.6vw, 20px)",color:e.valueColor,lineHeight:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.value}),e.badge?o.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"8px 12px",borderRadius:10,backgroundColor:e.badge.bg?e.badge.bg:Aj("#7c3aed",.08),border:`1px solid ${e.badge.bg?e.badge.bg:Aj("#7c3aed",.12)}`,color:e.badge.textColor||"#0f172a",fontWeight:700,fontSize:"clamp(12px, 1.2vw, 14px)",width:"120px",height:"52px",textAlign:"center",boxSizing:"border-box",overflow:"hidden",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",lineHeight:1.2,flexShrink:0},children:[o.jsx("div",{style:{fontSize:14,fontWeight:800,lineHeight:1.2,letterSpacing:"0.02em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.text}),e.badge.subText?o.jsx("div",{style:{fontSize:13,marginTop:4,fontWeight:700,letterSpacing:"0.01em",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.badge.subText}):null]}):null]})]}),Pj=(e,t)=>{try{if(typeof e=="function"){const n=e(t);if(n!==void 0)return n}}catch{}try{return k.createElement(e,{item:t})}catch(n){return console.warn("chooseDefaultRender: impossible de rendre CompactRenderer",n),null}},X3e=e=>{switch(e){case"image":return t=>k.createElement(K3e,{item:t});case"pertinence":return t=>k.createElement(Z3e,{item:t});case"alternateHorizontal":return t=>Pj(zj,t);case"compact":return t=>Pj(zj,t);case"summary":return;case"default":default:return}},wA=({item:e,orientation:t,bg:n,border:c,valueColor:i,onClick:r,width:s,height:d,extraStyle:l})=>{const u=t==="horizontal"?ee.mpSummaryCardHorizontal:ee.mpSummaryCard;return o.jsxs("div",{className:u,style:{background:n,border:`1px solid ${c}`,width:s??void 0,height:d??void 0,...l??{}},role:r?"button":"group",tabIndex:r?0:-1,onClick:()=>r?.(e),children:[e.badge&&o.jsxs("div",{className:ee.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:ee.mpSummaryBadgeSub,children:e.badge.subText})]}),o.jsx("div",{className:ee.mpSummaryValue,style:{color:i},children:e.value}),o.jsx("div",{className:ee.mpSummaryLabel,children:e.label})]})},Y3e=["transparent","transparent","transparent","transparent"],J3e=["transparent","transparent","transparent","transparent"],Q3e=["#059669","#2563eb","#b45309","#7c3aed"],eme=(e,t=1)=>{try{return Vt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},CA=e=>{const{items:t=[],layout:n="vertical",orientation:c="auto",shape:i="rounded",color:r="#7c3aed",compact:s=!1,title:d,onItemClick:l,className:h="",loading:u=!1,emptyMessage:p="Aucun élément",renderItem:y,summary:f=!1,summaryBgColors:g=Y3e,summaryBorderColors:m=J3e,summaryValueColors:x=Q3e,preset:M,background:v}=e,{itemsContainerStyle:L,itemsContainerClassName:b,summaryGridColumns:C,compactItemWidth:S,compactItemHeight:_,compactItemStyle:I,summaryCardWidth:j,summaryCardHeight:N,summaryCardStyle:w}=e,$=n==="vertical",V={"--mp-accent":r,"--mp-accent-soft":eme(r,.08),"--mp-bg-primary":v},T=[ee.mpRoot,$?ee.mpVertical:ee.mpHorizontal,s?ee.mpCompact:"",f?ee.mpSummaryRoot:"",c!=="auto"?c==="vertical"?ee.mpOrientationVertical:ee.mpOrientationHorizontal:"",h].filter(Boolean).join(" "),z=k.useMemo(()=>y||(X3e(M)??void 0),[y,M]);if(f){const A=c==="horizontal"?ee.mpSummaryFlex:ee.mpSummaryVertical,B={...(C?{display:"grid",gridTemplateColumns:`repeat(${C}, 1fr)`,gap:18,alignItems:"stretch",width:"100%"}:void 0)??{},...L??{}};return o.jsxs("div",{className:T,style:V,"aria-busy":u,children:[d&&o.jsx($j,{title:d}),o.jsx("div",{className:ee.mpSummaryInner,children:o.jsx("div",{className:`${A} ${b??""}`,style:B,children:t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map((F,P)=>{const O=F.bgColor??g[P%g.length],J=F.borderColor??m[P%m.length],E=F.valueColor??x[P%x.length];return z?o.jsx("div",{className:c==="horizontal"?ee.mpSummaryCardWrapperHorizontal:ee.mpSummaryCardWrapper,style:{width:j??void 0,height:N??void 0,...w??{}},children:z(F,P)},F.id):o.jsx(wA,{item:F,orientation:c==="horizontal"?"horizontal":"vertical",bg:O,border:J,valueColor:E,onClick:l,width:j??void 0,height:N??void 0,extraStyle:w},F.id)})})})]})}return o.jsxs("div",{className:T,style:V,"aria-busy":u,children:[d&&o.jsx($j,{title:d}),o.jsx("div",{className:ee.mpList,style:L,children:u?o.jsx("div",{className:ee.mpEmpty,children:"Chargement…"}):t.length===0?o.jsx("div",{className:ee.mpEmpty,children:p}):t.map(A=>{const q=s?{width:S??void 0,height:_??void 0,boxSizing:"border-box",...I??{}}:void 0;return o.jsx("div",{className:s?ee.compactItemWrapper:void 0,style:q,children:o.jsx(G3e,{item:A,shape:i,onItemClick:l,color:r,renderItem:z?B=>z(B,t.indexOf(B)):void 0})},A.id)})})]})};k.memo(CA);const tme=({a11yConfig:e,width:t,height:n,colors:c={text:"#0b1220",background:"#fff",contentBackground:"#efeff0"},titles:i={},placeholder:r="Loading Chart",style:s,className:d="",children:l,padding:h="1rem",variant:u="default",showBorder:p=!1,titleKey:y,leftTitleKey:f})=>{const g=t?typeof t=="number"?`${t}px`:t:void 0,m=n?typeof n=="number"?`${n}px`:n:void 0,x=r&&typeof r=="object"&&!k.isValidElement(r)&&("text"in r||"subtext"in r||"icon"in r||"background"in r||"iconSize"in r),M=x?r:void 0,v=M?.icon?Mt[M.icon]:void 0,L=28,b=M?.iconSize??L,C=["chart-container",`variant-${u}`,p?"with-border":"",d].filter(Boolean).join(" "),S=c.contentBackground??void 0,_=typeof h=="number"?`${h}px`:h;return o.jsxs("div",{className:C,style:{width:g,height:m,color:c.text,background:c.background,display:"flex",flexDirection:"column",boxSizing:"border-box",padding:_,...s},children:[o.jsxs("div",{className:"chart-header",children:[o.jsxs("div",{title:Y(e,f||y),className:"chart-title-left",style:{display:"flex",alignItems:"center",gap:"8px"},children:[i.left,i.leftSubtitle&&o.jsx("div",{className:"chart-subtitle-left",children:i.leftSubtitle})]}),o.jsx("div",{className:"chart-title-right",children:i.right})]}),o.jsx("div",{className:"chart-content",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:S},children:l||(x&&M?o.jsxs("div",{className:"placeholder",role:"status","aria-live":"polite",children:[v&&o.jsx("div",{className:"placeholder-icon",style:{width:b,height:b},children:o.jsx(v,{color:M.iconColor??"currentColor",size:typeof b=="number"?b:parseInt(String(b),10)||L})}),M.text&&o.jsx("div",{className:"placeholder-text",children:M.text}),M.subtext&&o.jsx("div",{className:"placeholder-subtext",children:M.subtext})]}):o.jsx("div",{className:"placeholder-node",role:"status","aria-live":"polite",children:r}))})]})},sC=({id:e,size:t="100%",background:n,icon:c,text:i,subtext:r,onClose:s,onClick:d,style:l,className:h="",colorTextPrimary:u,colorTextSub:p,model:y,fontSize:f,fontWeight:g,a11yConfig:m,titleKey:x})=>{const M=c||y?.icon,v=typeof M=="string",L=v?Mt[M]:null,b=v?null:M;return o.jsxs("div",{id:e,className:`alert ${h}`,style:{width:typeof t=="number"?`${t}px`:t,background:n||y?.background,pointerEvents:"auto",cursor:d?"pointer":"default",...l},role:"alert",onClick:d,title:Y(m,x),children:[L&&o.jsx(L,{className:"alert-icon",size:20,color:u||y?.colorTextPrimary}),b!=null&&o.jsx("span",{className:"alert-icon",style:{display:"flex",alignItems:"center",color:u||y?.colorTextPrimary,flexShrink:0},children:b}),o.jsxs("div",{className:"alert-content",children:[o.jsx("span",{className:"alert-text",style:{color:u||y?.colorTextPrimary,fontSize:f,fontWeight:g},children:i}),r&&o.jsx("span",{className:"alert-subtext",style:{color:p||y?.colorTextSub},children:r})]}),s&&o.jsx("button",{className:"alert-close",onClick:s,"aria-label":"Fermer",children:"✕"})]})},NA=k.createContext(null),ame=(e="alert")=>`${e}_${Math.random().toString(36).slice(2,9)}`,nme=({children:e,defaultDuration:t=4e3,maxAlerts:n,containerClassName:c,containerStyle:i})=>{const[r,s]=k.useState([]),d=k.useRef(new Map),l=k.useRef(null),[h,u]=k.useState(null),[p,y]=k.useState(void 0),f=k.useRef(n);k.useEffect(()=>()=>{d.current.forEach(w=>window.clearTimeout(w)),d.current.clear()},[]);const g=(w,$)=>{const V=$===void 0||$===0?t:$;if(V===-1)return;const T=window.setTimeout(()=>{M(w)},V);d.current.set(w,T)},m=w=>{const $=d.current.get(w);$&&(window.clearTimeout($),d.current.delete(w))},x=w=>{const $=ame(),V={...w,id:$,createdAt:Date.now()};return s(T=>{const z=[V,...T],A=f.current;return typeof A=="number"&&A>=0&&z.length>A?(z.slice(A).forEach(B=>m(B.id)),z.slice(0,A)):z}),g($,w.duration),$},M=w=>{m(w),s($=>$.filter(V=>V.id!==w))},v=(w,$)=>{s(V=>V.map(T=>T.id===w?{...T,...$}:T))},L=()=>{d.current.forEach(w=>window.clearTimeout(w)),d.current.clear(),s([])},b=k.useCallback((w,$)=>{w&&window.getComputedStyle(w).position==="static"&&(w.style.position="relative"),u(V=>V===w?V:w),y($)},[]),C=()=>r.slice(),S=k.useMemo(()=>({showAlert:x,dismissAlert:M,updateAlert:v,clearAlerts:L,setContainerRef:b,getAlertsSnapshot:C}),[r]),_=h,I=_?!!p:!1,j=o.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,display:"flex",flexDirection:"column",alignItems:"center",pointerEvents:"none",zIndex:10001,padding:"8px 4px",...I?{top:"auto",left:"auto",right:"auto",alignItems:"flex-end"}:null,..._?p:null},children:o.jsx(Ple,{mode:"popLayout",children:r.map(w=>o.jsx(nC.div,{initial:{opacity:0,y:-10,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.98},transition:{type:"spring",damping:25,stiffness:300},style:{width:I?"auto":"100%",pointerEvents:"auto",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.12)",borderRadius:"8px",marginBottom:"6px",backgroundColor:w.background||w.model?.background||"var(--color-background, #fff)",border:"1px solid rgba(0, 0, 0, 0.08)",overflow:"hidden"},children:o.jsx(sC,{id:w.id,text:w.text,subtext:w.subtext,icon:w.icon,background:"transparent",colorTextPrimary:w.colorTextPrimary,colorTextSub:w.colorTextSub,model:w.model,onClose:()=>M(w.id),size:I?"auto":"100%",style:{boxShadow:"none",...I?{whiteSpace:"nowrap"}:null}})},w.id))})}),N=o.jsx("div",{ref:w=>{h||(l.current=w)},className:c,style:{width:"100%",position:"relative",...i},"aria-live":"polite",children:j});return o.jsxs(NA.Provider,{value:S,children:[_?Lw.createPortal(j,_):N,e]})},ome=()=>{const e=k.useContext(NA);if(!e)throw new Error("useAlerts must be used inside an AlertsProvider");return e},cme={default:{background:"#f3f4f6",icon:"Info",colorTextPrimary:"#111827",colorTextSub:"#4b5563"},info:{background:"#dbeafe",icon:"Info",colorTextPrimary:"#1e40af",colorTextSub:"#3b82f6"},success:{background:"#dcfce7",icon:"CheckCircle2",colorTextPrimary:"#166534",colorTextSub:"#22c55e"},warning:{background:"#fef3c7",icon:"AlertTriangle",colorTextPrimary:"#92400e",colorTextSub:"#f59e0b"},error:{background:"#fee2e2",icon:"XCircle",colorTextPrimary:"#991b1b",colorTextSub:"#ef4444"}},ime="_container_18zbo_1",rme="_icon_18zbo_9",sme="_selectWrapper_18zbo_23",Ub={container:ime,icon:rme,selectWrapper:sme},dme=({options:e,defaultValue:t,onChange:n,label:c})=>{const[i,r]=k.useState(t||e[0]?.value||""),s=d=>{r(d),n?.(d)};return o.jsxs("div",{className:Ub.container,children:[o.jsxs("div",{className:Ub.icon,children:[o.jsx(w1,{size:18}),o.jsx("p",{children:c})]}),o.jsx("div",{className:Ub.selectWrapper,children:o.jsx(oC,{field:{name:"periode",label:"",options:e},value:i,onChange:s,onBlur:()=>{}})})]})},lme=250,hme=k.forwardRef(({title:e,subtitle:t,size:n="420px",beforeOpen:c,afterOpen:i,beforeClose:r,afterClose:s,style:d,className:l="",children:h,closeOnOverlayClick:u=!0,showCloseButton:p=!0},y)=>{const[f,g]=k.useState(!1),[m,x]=k.useState(!1),M=k.useRef(null),v=k.useRef(null),L=k.useRef(null),b=k.useRef(null);k.useEffect(()=>{const _=M.current;if(!_)return;const I=_.parentElement;return I?(window.getComputedStyle(I).position==="static"&&(I.setAttribute("data-scp-prev-position",I.style.position??""),I.style.position="relative",I.setAttribute("data-scp-position-changed","true")),()=>{if(I.getAttribute("data-scp-position-changed")==="true"){const N=I.getAttribute("data-scp-prev-position")??"";I.style.position=N,I.removeAttribute("data-scp-position-changed"),I.removeAttribute("data-scp-prev-position")}}):void 0},[]),k.useImperativeHandle(y,()=>({open:()=>{f||(c?.(),x(!1),g(!0))},close:()=>{f&&(r?.(),x(!1),g(!1))},toggle:()=>{f?(r?.(),x(!1),g(!1)):(c?.(),x(!1),g(!0))}}),[f,c,r]),k.useEffect(()=>{const _=v.current;b.current&&(window.clearTimeout(b.current),b.current=null);const I=j=>{if(j.target===_&&!(j.propertyName!=="transform"&&j.propertyName!=="opacity"))if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{L.current?.focus()}catch{}}};return _&&(_.addEventListener("transitionend",I),b.current=window.setTimeout(()=>{if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{L.current?.focus()}catch{}}},lme+60)),f&&(L.current=document.activeElement),()=>{_&&_.removeEventListener("transitionend",I),b.current&&(window.clearTimeout(b.current),b.current=null)}},[f,i,s]),k.useEffect(()=>{const _=I=>{I.key==="Escape"&&f&&(r?.(),x(!1),g(!1))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[f,r]);const C=()=>{u&&(r?.(),x(!1),g(!1))},S=typeof n=="number"?`${n}px`:n;return o.jsxs("div",{ref:M,className:`scp-inline-root ${f?"open":""}`,"aria-hidden":!f,children:[o.jsx("div",{className:`scp-overlay ${f?"visible":""}`,onMouseDown:C,role:"presentation"}),o.jsxs("aside",{className:`scp-panel ${f?"in":"out"} ${m?"interactive":""} ${l}`,style:{width:S,...d},ref:v,tabIndex:-1,role:"dialog","aria-label":e,children:[o.jsxs("div",{className:"scp-header",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"scp-title",children:e}),t&&o.jsx("div",{className:"scp-subtitle",children:t})]}),p&&o.jsx("button",{className:"scp-close","aria-label":"Close",onClick:()=>{r?.(),x(!1),g(!1)},children:o.jsx(tt,{size:18})})]}),o.jsx("div",{className:"scp-body",children:h})]})]})});function ume(e){const t=k.useRef("");k.useEffect(()=>{if(e){t.current=document.body.style.overflow,document.body.style.overflow="hidden";return}document.body.style.overflow=t.current||""},[e])}const pme="_container_1pfsp_1",yme="_title_1pfsp_8",Vj={container:pme,title:yme},kme=({title:e,fontSize:t,barColor:n,className:c="",style:i={}})=>{const r={...i,"--title-font-size":t,"--bar-color":n};return o.jsx("div",{className:`${Vj.container} ${c}`,style:r,children:o.jsx("h2",{className:Vj.title,children:e})})},mme="_modalOverlay_1878x_1",fme="_modalContainer_1878x_16",gme="_modalTitle_1878x_29",vme="_modalInput_1878x_38",xme="_modalTextarea_1878x_39",Mme="_modalActions_1878x_70",_me="_cancelBtn_1878x_77",Lme="_saveBtn_1878x_99",Ime="_inputError_1878x_141",bme="_inlineAlert_1878x_146",ot={modalOverlay:mme,modalContainer:fme,modalTitle:gme,modalInput:vme,modalTextarea:xme,modalActions:Mme,cancelBtn:_me,saveBtn:Lme,inputError:Ime,inlineAlert:bme},Hc=({isOpen:e,onClose:t,onSave:n,title:c="Ajouter un élément",fields:i,initialValues:r={},errorMessage:s="",disableSave:d,onFieldChange:l,confirmText:h="Valider",cancelText:u="Annuler"})=>{const[p,y]=k.useState({}),f=k.useRef(null),[g,m]=k.useState(!1),[x,M]=k.useState(!1),v=k.useRef(null);if(k.useEffect(()=>{if(!e)return;const _={};for(const I of i)_[I.name]=Object.prototype.hasOwnProperty.call(r,I.name)?r[I.name]:"";return y(_),requestAnimationFrame(()=>{f.current?.focus();const I=f.current;if(I&&typeof I.selectionStart=="number"){const j=String(I.value??"").length;I.setSelectionRange(j,j)}}),()=>{v.current&&(window.clearTimeout(v.current),v.current=null)}},[e]),k.useEffect(()=>{s&&e?(M(!0),v.current&&(window.clearTimeout(v.current),v.current=null),v.current=window.setTimeout(()=>{M(!1),v.current=null},3e3)):(M(!1),v.current&&(window.clearTimeout(v.current),v.current=null))},[s,e]),!e)return null;const L=(_,I)=>{y(j=>({...j,[_]:I})),l&&l(_,I)},b=async()=>{if(!Object.values(p).some(_=>_===""||_===void 0))try{m(!0);const _=await n(p);if(typeof _=="string"&&_==="duplicate-same"){m(!1);return}y({}),m(!1),t()}catch(_){console.error("AddItemModal onSave error:",_),m(!1),t()}},C=_=>{_.target===_.currentTarget&&t()},S=_=>_.stopPropagation();return o.jsx("div",{className:ot.modalOverlay,onMouseDown:C,role:"dialog","aria-modal":"true",children:o.jsxs("div",{className:ot.modalContainer,onMouseDown:S,onClick:S,children:[o.jsx("h2",{className:ot.modalTitle,children:c}),i.map((_,I)=>{const j=p[_.name]??"",N=I===0&&!!s,w={name:_.name,placeholder:_.placeholder||_.label,value:String(j),onChange:$=>L(_.name,$.target.value),className:_.type==="textarea"?`${ot.modalTextarea} ${N?ot.inputError:""}`:`${ot.modalInput} ${N?ot.inputError:""}`,tabIndex:0,disabled:g};return I===0&&(w.ref=$=>{f.current=$}),o.jsxs("div",{style:{marginBottom:8},children:[_.type==="textarea"?o.jsx("textarea",{rows:_.rows||4,...w}):o.jsx("input",{type:_.type||"text",...w}),I===0&&x&&s&&o.jsx("div",{style:{marginTop:8},children:o.jsx(sC,{text:s,background:"#fff5f5",colorTextPrimary:"#ef4444",onClose:()=>M(!1),className:ot.inlineAlert})})]},_.name)}),o.jsxs("div",{className:ot.modalActions,children:[o.jsx("button",{className:ot.cancelBtn,onClick:t,type:"button",disabled:g,children:u}),o.jsx("button",{className:ot.saveBtn,onClick:b,type:"button",disabled:g||!!d,children:g?"En cours...":h})]})]})})},wme=({title:e,keyCount:t,onAddKey:n,a11yConfig:c})=>{const[i,r]=k.useState(!1),s=d=>{const l=d.key;n&&l&&n(l)};return o.jsxs("div",{className:"header-container",children:[o.jsxs("div",{className:"header-info",children:[o.jsx("h1",{title:Y(c,e),children:e}),o.jsxs("p",{children:[t," clés"]})]}),o.jsxs("button",{onClick:()=>r(!0),className:"add-key-button",children:[o.jsx(Ac,{className:"add-key-icon"}),"Clé"]}),o.jsx(Hc,{isOpen:i,title:"Ajouter une clé",onClose:()=>r(!1),onSave:s,fields:[{name:"key",label:"Nouvelle clé",placeholder:"Entrer une nouvelle clé"}]})]})},Cme=({modules:e,onEdit:t,onDelete:n,onAddModule:c,onSelectModule:i,addModalFields:r,addModalTitle:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(null),[p,y]=k.useState(null),[f,g]=k.useState(!1),m=()=>l(!0),x=()=>l(!1),M=_=>{if(c){const I=_.code?.trim()||_.id?.trim(),j=_.title?.trim(),N=I||j||String(Date.now()),w=j||I||`Module ${N}`;c({id:N,title:w,subtitle:"",translations:{}})}x()},v=(_,I)=>{_.stopPropagation(),u(I)},L=()=>u(null),b=_=>{if(!h){L();return}const I={...h,title:_.title||h.title,subtitle:""};t&&t(I),L()},C=(_,I)=>{_.stopPropagation(),n&&n(I)},S=_=>{y(_.id),i&&i(_)};return f?o.jsx("div",{className:"module-sidebar collapsed",children:o.jsx(a1,{size:20,className:"menu-toggle",onClick:()=>g(!1)})}):o.jsxs("div",{className:"module-sidebar",children:[o.jsxs("div",{className:"sidebar-header",children:[o.jsxs("span",{className:"header-text",children:["Modules (",e.length,")"]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(qc,{size:18,className:"header-folder",onClick:m}),o.jsx(a1,{size:18,className:"header-menu",onClick:()=>g(!0)})]})]}),o.jsx("hr",{className:"divider"}),o.jsx("div",{className:"module-list",children:e.map(_=>{const I=Object.keys(_.translations||{}).length,j=I>0||_.id===p;return o.jsxs("div",{className:`module-item ${_.id===p?"selected":""}`,onClick:()=>S(_),role:"button",tabIndex:0,onKeyDown:N=>{N.key==="Enter"&&S(_)},children:[o.jsxs("div",{className:"module-left",children:[o.jsx($1,{size:16,className:"item-folder"}),o.jsxs("div",{className:"module-info",children:[o.jsxs("div",{className:"module-title",children:[_.title,j&&o.jsxs("span",{className:"count",children:[" ",I," "]})]}),_.subtitle?o.jsx("div",{className:"module-subtitle",children:_.subtitle}):null]})]}),o.jsxs("div",{className:"module-actions",children:[t&&o.jsx(n1,{onClick:N=>v(N,_),color:"#777",size:16}),n&&o.jsx(yt,{onClick:N=>C(N,_.id),color:"#777",size:16})]})]},_.id)})}),o.jsx(Hc,{isOpen:d,onClose:x,onSave:M,title:s||"Ajouter un module",fields:r&&r.length?r.map(_=>({name:_.name,label:_.label,type:_.type,placeholder:_.placeholder,rows:_.rows})):[{name:"title",label:"Titre",placeholder:"Titre du module"}]}),h&&o.jsx(Hc,{isOpen:!!h,onClose:L,onSave:b,title:"Éditer le module",initialValues:{title:h.title},fields:[{name:"title",label:"Titre",placeholder:"Titre du module"}]})]})},SA=({placeholder:e="Rechercher une clé ou traduction...",value:t="",onChange:n,iconPosition:c="left",iconColor:i="#9ca3af",a11yConfig:r,className:s})=>o.jsxs("div",{className:`search-container icon-${c}`,title:Y(r,e),children:[o.jsx("div",{className:"search-icon-wrapper",children:o.jsx(z1,{className:"search-icon",color:i})}),o.jsx("input",{type:"text",placeholder:e,value:t,onChange:d=>n?.(d.target.value),className:`search-input ${s}`})]}),Nme=({keyName:e,translations:t,availableLanguages:n,onDeleteKey:c,onEditKey:i,onEditTranslation:r,onDeleteTranslation:s,onAddTranslation:d,draggable:l=!1,checkDuplicateLocal:h})=>{const[u,p]=k.useState(!1),[y,f]=k.useState(""),[g,m]=k.useState(null),[x,M]=k.useState(""),[v,L]=k.useState(""),[b,C]=k.useState(!1),[S,_]=k.useState(!1),[I,j]=k.useState(null),[N,w]=k.useState(!1),$=t.map(P=>P.language),V=n.filter(P=>!$.includes(P.code)),T=()=>{y&&v.trim()&&(d?.(e,y,v.trim()),f(""),L(""),p(!1))},z=(P,O)=>{m(P),M(O)},A=P=>{r?.(e,P,x),m(null),M("")},q=()=>{m(null),M("")},B=async P=>{const O=P.name?.trim();if(O){if(j(null),w(!1),O===e||!i)return C(!1),"ok";try{const J=await i(e,O);if(typeof J=="string"&&J==="ok")C(!1),j(null);else{if(typeof J=="string"&&J==="duplicate-same")return j("Une clé existe déjà dans ce module."),w(!0),"duplicate-same";if(typeof J=="string"&&J==="duplicate-other")return C(!1),j(null),"duplicate-other";C(!1)}}catch(J){console.error("Erreur handleRenameSave:",J),j("Erreur lors du renommage.")}}},F=(P,O)=>{if(P!=="name")return;const J=O.trim();j(null),w(!1),J&&typeof h=="function"&&(h(J,e)?(j("Une clé existe déjà dans ce module."),w(!0)):(j(null),w(!1)))};return o.jsxs("div",{className:`translation-key ${S?"collapsed":"expanded"} ${l?"draggable":""}`,children:[o.jsxs("div",{className:"card-header",children:[o.jsxs("div",{className:"header-left",children:[o.jsx("button",{className:"collapse-button",onClick:()=>_(!S),title:S?"Déplier":"Replier",children:S?o.jsx(N1,{className:"collapse-icon"}):o.jsx(Tt,{className:"collapse-icon"})}),o.jsx("h3",{className:"card-title",title:e,children:e})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx("button",{className:"action-button",onClick:P=>{P.stopPropagation(),C(!0)},title:"Renommer la clé",children:o.jsx(gt,{className:"action-icon"})}),o.jsx("button",{onClick:P=>{P.stopPropagation(),c?.(e)},className:"action-button delete",title:"Supprimer la clé",children:o.jsx(yt,{className:"action-icon"})})]})]}),o.jsx("div",{className:`translations-container ${S?"":"expanded"}`,children:!l&&o.jsxs(o.Fragment,{children:[t.map(P=>o.jsxs("div",{className:"translation-row",children:[o.jsx("div",{className:"language-code",children:P.language}),o.jsx("div",{className:"translation-content",children:g===P.language?o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"text",value:x,onChange:O=>M(O.target.value),className:"edit-input",autoFocus:!0,onKeyDown:O=>{O.key==="Enter"&&A(P.language),O.key==="Escape"&&q()}}),o.jsx("button",{onClick:()=>A(P.language),className:"save-button",disabled:!x.trim(),children:"Enregistrer"}),o.jsx("button",{onClick:q,className:"cancel-button",children:o.jsx(tt,{className:"action-icon"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"translation-text",title:P.value,children:P.value}),o.jsx("button",{onClick:()=>z(P.language,P.value),className:"edit-button",title:"Éditer la traduction",children:o.jsx(gt,{className:"action-icon"})}),o.jsx("button",{onClick:()=>s?.(e,P.language),className:"delete-translation-button",title:"Supprimer la traduction",children:o.jsx(tt,{className:"action-icon"})})]})})]},P.language)),u?o.jsxs("div",{className:"add-language-row",children:[o.jsx("div",{className:"language-code",children:"+"}),o.jsxs("div",{className:"add-language-content",children:[o.jsx("div",{className:"language-select-container",children:o.jsxs("select",{value:y,onChange:P=>f(P.target.value),className:"language-select",children:[o.jsx("option",{value:"",children:"Sélectionnez la langue"}),V.map(P=>o.jsxs("option",{value:P.code,children:[P.name," (",P.code,")"]},P.code))]})}),y&&o.jsx("input",{type:"text",value:v,onChange:P=>L(P.target.value),placeholder:"Entrez la traduction...",className:"translation-input",onKeyDown:P=>{P.key==="Enter"&&T(),P.key==="Escape"&&(p(!1),f(""),L(""))}}),o.jsx("button",{onClick:T,disabled:!y||!v.trim(),className:"save-button",children:"Ajouter"}),o.jsx("button",{onClick:()=>{p(!1),f(""),L("")},className:"cancel-button",children:o.jsx(tt,{className:"action-icon"})})]})]}):o.jsxs("button",{onClick:()=>p(!0),className:"show-add-button",disabled:V.length===0,children:[o.jsx("span",{className:"plus-icon",children:"+"}),"Ajouter une langue"]})]})}),l&&o.jsxs("div",{className:"drag-overlay",children:[o.jsx(a.Move,{size:24,strokeWidth:1.5}),o.jsx("span",{children:"Glisser pour réorganiser"})]}),o.jsx(Hc,{isOpen:b,onClose:()=>{C(!1),j(null),w(!1)},onSave:B,onFieldChange:F,title:"Renommer la clé",initialValues:{name:e},fields:[{name:"name",label:"Nom de la clé",placeholder:"Nom de la clé"}],errorMessage:I||"",disableSave:N})]})},Sme="_wrapper_1wvht_1",jme="_leftGroup_1wvht_12",$me="_filterButton_1wvht_21",qme="_open_1wvht_42",Ame="_filterIcon_1wvht_42",zme="_infoText_1wvht_58",Pme="_pickerContainer_1wvht_66",Vme="_srOnly_1wvht_79",Tme="_pickerLabel_1wvht_91",Hme="_datetime_1wvht_98",Dme="_rightGroup_1wvht_107",Bme="_searchInputWrap_1wvht_116",Rme="_searchInput_1wvht_116",Fme="_searchIcon_1wvht_152",Fe={wrapper:Sme,leftGroup:jme,filterButton:$me,open:qme,filterIcon:Ame,infoText:zme,pickerContainer:Pme,srOnly:Vme,pickerLabel:Tme,datetime:Hme,rightGroup:Dme,searchInputWrap:Bme,searchInput:Rme,searchIcon:Fme};function Eme({onDateChange:e,onSearch:t,initialDate:n}){const[c,i]=k.useState(!1),[r,s]=k.useState(n??""),d=k.useRef(null);k.useEffect(()=>{function p(y){const f=y.target;d.current&&f&&!d.current.contains(f)&&i(!1)}return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),k.useEffect(()=>{n&&s(n)},[n]);const l=()=>i(p=>!p),h=p=>{const y=p.target.value;s(y),e?.(y)},u=p=>{t?.(p.target.value)};return o.jsxs("div",{className:Fe.wrapper,ref:d,children:[o.jsxs("div",{className:Fe.leftGroup,children:[o.jsxs("button",{type:"button",className:`${Fe.filterButton} ${c?Fe.open:""}`,onClick:l,"aria-expanded":c,"aria-haspopup":"dialog","aria-controls":"entry-datetime",children:[o.jsx("span",{children:"Entry time"}),o.jsx("svg",{className:Fe.filterIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M10 18h4v-2h-4v2zm-7-8v2h18V10H3zm3-6v2h12V4H6z"})})]}),o.jsx("div",{className:Fe.infoText,children:"Confidence interval: step ± 15' / exit ± 30'"}),c&&o.jsxs("div",{className:Fe.pickerContainer,role:"dialog","aria-label":"Choisir la date et l’heure",children:[o.jsx("label",{className:Fe.pickerLabel,htmlFor:"entry-datetime",children:o.jsx("span",{className:Fe.srOnly,children:"Choisir la date et l’heure"})}),o.jsx("input",{id:"entry-datetime",className:Fe.datetime,type:"datetime-local",value:r,onChange:h,"aria-label":"Date et heure d’entrée"})]})]}),o.jsx("div",{className:Fe.rightGroup,children:o.jsxs("div",{className:Fe.searchInputWrap,children:[o.jsx("input",{className:Fe.searchInput,placeholder:"Search...",onChange:u,"aria-label":"Search"}),o.jsx("svg",{className:Fe.searchIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":!0,children:o.jsx("path",{fill:"currentColor",d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16a6.471 6.471 0 004.23-1.57l.27.28v.79L20 20.49 21.49 19l-5.99-5zM10 15.5A5.5 5.5 0 1115.5 10 5.5 5.5 0 0110 15.5z"})})]})})]})}const Ome=({className:e="",style:t={},title:n,titleClassName:c="",titleStyle:i,data:r,lineClasses:s={},renderCell:d,bg:l,titleBg:h,titleColor:u,itemBg:p,emptyContent:y,colGap:f="1rem"})=>{const g=Array.isArray(r)?r:[],m=g.length===0,x=g.every(b=>typeof b=="string"),M=g.some(b=>Array.isArray(b)),v=(b,C,S)=>d?d(b,C,S):o.jsx("span",{className:"slb-cell-text",children:b}),L=f?{"--col-gap":f}:void 0;return m?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{...i,background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-empty",children:y??null})]}):x&&!M?o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("ul",{className:"slb-list",children:g.map((b,C)=>o.jsx("li",{className:`slb-item ${s[C]||""}`,style:{background:p??void 0},children:v(b,C,0)},C))})]}):o.jsxs("div",{className:`slb-root ${e}`,style:{...t,background:l??void 0},children:[n&&o.jsx("div",{className:`slb-title ${c}`,style:{background:h??void 0,color:u??void 0},children:n}),o.jsx("div",{className:"slb-grid",style:L,children:g.map((b,C)=>{const S=s[C]||"";if(Array.isArray(b)){const[_,I]=b;return o.jsxs("div",{className:`slb-row ${S}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(_,C,0)}),o.jsx("div",{className:"slb-grid-right",children:v(I,C,1)})]},C)}return o.jsxs("div",{className:`slb-row ${S}`,style:{background:p??void 0},children:[o.jsx("div",{className:"slb-grid-left",children:v(b,C,0)}),o.jsx("div",{className:"slb-grid-right slb-empty-cell","aria-hidden":"true"})]},C)})})]})},Ume=({className:e="",style:t={},title:n,titleColor:c,data:i=[],badgeColor:r="#0ea5e9",badgeColors:s={},badgePadding:d="8px 16px",badgeWidth:l,itemBg:h,lineClasses:u={},colGap:p="1rem"})=>{const y=i.some(g=>Array.isArray(g)),f=p?{"--col-gap":p}:void 0;return o.jsxs("div",{className:`clb-root ${e}`,style:{...t},children:[n&&o.jsx("div",{className:"clb-title",style:c?{color:c}:void 0,children:n}),o.jsx("div",{className:"clb-grid",style:f,children:i.map((g,m)=>{const x=u[m]||"";if(Array.isArray(g)){const[M,v]=g,L=s[m]||r;return o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col",children:o.jsx("div",{className:"counter-badge",style:{background:L,padding:d,width:l,minWidth:l},children:M})}),o.jsx("div",{className:"clb-text",children:v})]},m)}return y?o.jsxs("div",{className:`clb-row ${x}`,style:{background:h??void 0},children:[o.jsx("div",{className:"clb-badge-col clb-empty-badge"}),o.jsx("div",{className:"clb-text",children:g})]},m):o.jsx("div",{className:`clb-fullrow ${x}`,style:{background:h??void 0},children:o.jsx("span",{children:g})},m)})})]})},Wme=({className:e="",style:t={},title:n,items:c=[],titleBg:i,titleColor:r,itemBg:s,lineClasses:d={},renderTrendIcon:l,colGap:h="1rem"})=>{const u=h?{"--col-gap":h}:void 0;return o.jsxs("div",{className:`tlb-root ${e}`,style:{...t,background:s??void 0},children:[n&&o.jsx("div",{className:"tlb-title",style:{background:i??void 0,color:r??void 0},children:n}),o.jsx("div",{className:"tlb-grid",style:u,children:c.map((p,y)=>{const f=d[y]||"";return o.jsxs("div",{className:`tlb-row ${f}`,style:{background:s??void 0},children:[o.jsx("div",{className:"tlb-label",children:p.label}),o.jsxs("div",{className:"tlb-value-group",children:[o.jsx("div",{className:"tlb-icon-col",children:l?l(p):p.icon??null}),o.jsxs("div",{className:"tlb-value-wrap",children:[o.jsx("div",{className:"tlb-value",children:p.value}),typeof p.delta<"u"&&o.jsx("div",{className:`tlb-delta ${p.delta>0?"positive":p.delta<0?"negative":"neutral"}`,children:p.deltaLabel??String(p.delta)})]})]})]},y)})})]})},Gme=({className:e="",style:t={},children:n,gap:c="1rem"})=>o.jsx("div",{className:`frc-root ${e}`,style:{...t,"--frc-gap":c},children:k.Children.map(n,i=>o.jsx("div",{className:"frc-item",children:i}))}),Kme=({className:e="",style:t={},children:n,gap:c="1rem",background:i="#D9EEF5"})=>o.jsx("div",{className:`lcc-root ${e}`,style:{background:i,...t,"--lcc-gap":c},children:k.Children.map(n,r=>o.jsx("div",{className:"lcc-cell",children:r}))}),Zme="_overlay_3x4or_2",Xme="_fadeIn_3x4or_1",Yme="_popup_3x4or_17",Jme="_slideUp_3x4or_1",Qme="_header_3x4or_28",e6e="_body_3x4or_40",t6e="_footer_3x4or_51",a6e="_cancelButton_3x4or_59",n6e="_confirmButton_3x4or_77",o6e="_warning_3x4or_97",c6e="_danger_3x4or_106",i6e="_info_3x4or_115",Nt={overlay:Zme,fadeIn:Xme,popup:Yme,slideUp:Jme,header:Qme,body:e6e,footer:t6e,cancelButton:a6e,confirmButton:n6e,warning:o6e,danger:c6e,info:i6e},r6e=({isOpen:e,title:t,message:n,onConfirm:c,onCancel:i,confirmText:r="Confirmer",cancelText:s="Annuler",type:d="warning"})=>{if(!e)return null;const l=u=>{u.target===u.currentTarget&&i()},h=u=>{u.key==="Escape"&&i(),u.key==="Enter"&&u.ctrlKey&&c()};return o.jsx("div",{className:Nt.overlay,onClick:l,onKeyDown:h,role:"dialog","aria-labelledby":"confirmation-title","aria-describedby":"confirmation-message",children:o.jsxs("div",{className:`${Nt.popup} ${Nt[d]}`,children:[o.jsx("div",{className:Nt.header,children:o.jsx("h3",{id:"confirmation-title",children:t})}),o.jsx("div",{className:Nt.body,children:o.jsx("p",{id:"confirmation-message",children:n})}),o.jsxs("div",{className:Nt.footer,children:[o.jsx("button",{className:Nt.cancelButton,onClick:i,type:"button",children:s}),o.jsx("button",{className:Nt.confirmButton,onClick:c,type:"button",autoFocus:!0,children:r})]})]})})},s6e=()=>{const[e,t]=k.useState({isOpen:!1,title:"",message:"",onConfirm:null}),n=k.useCallback((r,s,d)=>{t({isOpen:!0,title:r,message:s,onConfirm:d})},[]),c=k.useCallback(()=>{t(r=>({...r,isOpen:!1,onConfirm:null}))},[]),i=k.useCallback(()=>{e.onConfirm?.(),c()},[e.onConfirm,c]);return{isOpen:e.isOpen,title:e.title,message:e.message,showConfirmation:n,hideConfirmation:c,handleConfirm:i}},d6e="_container_wd1ci_1",l6e="_selectButton_wd1ci_7",h6e="_disabled_wd1ci_23",u6e="_error_wd1ci_40",p6e="_outline_wd1ci_53",y6e="_filled_wd1ci_59",k6e="_sm_wd1ci_68",m6e="_md_wd1ci_74",f6e="_lg_wd1ci_80",g6e="_buttonContent_wd1ci_86",v6e="_label_wd1ci_94",x6e="_placeholder_wd1ci_104",M6e="_iconsContainer_wd1ci_109",_6e="_loadingSpinner_wd1ci_116",L6e="_spin_wd1ci_1",I6e="_arrowIcon_wd1ci_135",b6e="_arrowIconOpen_wd1ci_143",w6e="_dropdown_wd1ci_148",C6e="_dropdownIn_wd1ci_1",N6e="_searchContainer_wd1ci_176",S6e="_searchInputWrapper_wd1ci_182",j6e="_searchIcon_wd1ci_188",$6e="_searchInput_wd1ci_182",q6e="_optionsList_wd1ci_213",A6e="_noResults_wd1ci_238",z6e="_option_wd1ci_213",P6e="_optionHighlighted_wd1ci_268",V6e="_optionSelected_wd1ci_273",T6e="_optionDisabled_wd1ci_284",H6e="_optionLabel_wd1ci_290",D6e="_checkIcon_wd1ci_298",B6e="_widthFull_wd1ci_306",R6e="_width64_wd1ci_310",F6e="_width80_wd1ci_314",E6e="_width96_wd1ci_318",le={container:d6e,selectButton:l6e,disabled:h6e,error:u6e,default:"_default_wd1ci_49",outline:p6e,filled:y6e,sm:k6e,md:m6e,lg:f6e,buttonContent:g6e,label:v6e,placeholder:x6e,iconsContainer:M6e,loadingSpinner:_6e,spin:L6e,arrowIcon:I6e,arrowIconOpen:b6e,dropdown:w6e,dropdownIn:C6e,searchContainer:N6e,searchInputWrapper:S6e,searchIcon:j6e,searchInput:$6e,optionsList:q6e,noResults:A6e,option:z6e,optionHighlighted:P6e,optionSelected:V6e,optionDisabled:T6e,optionLabel:H6e,checkIcon:D6e,widthFull:B6e,width64:R6e,width80:F6e,width96:E6e},li=4,Tj=8,O6e=({options:e,value:t,onChange:n,placeholder:c="Sélectionner une option...",disabled:i=!1,loading:r=!1,error:s=!1,className:d="",size:l="md",variant:h="default",width:u="w-full",dropdownPosition:p="auto"})=>{const[y,f]=k.useState(!1),[g,m]=k.useState(""),[x,M]=k.useState(0),[v,L]=k.useState({top:0,left:0,width:0}),[b,C]=k.useState("bottom"),[S,_]=k.useState(null),I=k.useRef(null),j=k.useRef(null),N=k.useRef(null),w=k.useMemo(()=>g?e.filter(E=>E.label.toLowerCase().includes(g.toLowerCase())):e,[e,g]),$=e.find(E=>E.value===t),V=k.useCallback(()=>{if(I.current){const E=I.current.getBoundingClientRect();L({top:E.top,left:E.left,width:E.width})}},[]),T=k.useCallback(()=>{if(!I.current)return;const E=I.current.getBoundingClientRect(),K=E.top-li-Tj,ue=window.innerHeight-E.bottom-li-Tj;let ce;p!=="auto"?ce=p:ce=(j.current?.scrollHeight??0)<=ue?"bottom":K>ue?"top":"bottom",C(xe=>xe===ce?xe:ce),_(Math.max(ce==="bottom"?ue:K,0))},[p]),z=k.useCallback(()=>{V(),T()},[V,T]);k.useEffect(()=>(y&&(z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z)),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}),[y,z]),k.useLayoutEffect(()=>{y&&T()},[y,T]),k.useEffect(()=>{const E=K=>{I.current&&!I.current.contains(K.target)&&j.current&&!j.current.contains(K.target)&&(f(!1),m(""))};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]),k.useEffect(()=>{M(0)},[w]);const A=E=>{E.disabled||(n?.(E.value,E),f(!1),m(""))},q=E=>{m(E.target.value),y||f(!0)},B=E=>{if(!y){(E.key==="ArrowDown"||E.key==="Enter")&&f(!0);return}switch(E.key){case"ArrowDown":E.preventDefault(),M(K=>K<w.length-1?K+1:K);break;case"ArrowUp":E.preventDefault(),M(K=>K>0?K-1:K);break;case"Enter":E.preventDefault(),w[x]&&A(w[x]);break;case"Escape":f(!1),m("");break}},F=()=>[le.selectButton,le[l],le[h],i?le.disabled:"",s?le.error:"",d].filter(Boolean).join(" "),P=()=>{switch(u){case"w-64":return le.width64;case"w-80":return le.width80;case"w-96":return le.width96;default:return le.widthFull}},O=(E,K)=>[le.option,K===x?le.optionHighlighted:"",E.value===t?le.optionSelected:"",E.disabled?le.optionDisabled:""].filter(Boolean).join(" "),J={position:"fixed",top:b==="bottom"?v.top+(I.current?.offsetHeight||0)+li:"auto",bottom:b==="top"?window.innerHeight-v.top+li:"auto",left:v.left,width:v.width,maxHeight:S!=null?`${S}px`:void 0,zIndex:9999};return o.jsxs("div",{className:`${le.container} ${P()}`,children:[o.jsx("button",{ref:I,className:F(),onClick:()=>!i&&f(!y),onKeyDown:B,tabIndex:i?-1:0,type:"button","aria-haspopup":"listbox","aria-expanded":y,disabled:i,children:o.jsxs("div",{className:le.buttonContent,children:[o.jsx("span",{className:`${le.label} ${$?"":le.placeholder}`,children:$?$.label:c}),o.jsxs("div",{className:le.iconsContainer,children:[r&&o.jsx("div",{className:le.loadingSpinner}),o.jsx("svg",{className:`${le.arrowIcon} ${y?le.arrowIconOpen:""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),y&&Lw.createPortal(o.jsxs("div",{className:`${le.dropdown} ${P()}`,style:J,ref:j,children:[o.jsx("div",{className:le.searchContainer,children:o.jsxs("div",{className:le.searchInputWrapper,children:[o.jsx("svg",{className:le.searchIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),o.jsx("input",{ref:N,type:"text",value:g,onChange:q,placeholder:"Rechercher...",className:le.searchInput,autoFocus:!0})]})}),o.jsx("div",{className:le.optionsList,children:w.length===0?o.jsx("div",{className:le.noResults,children:"Aucun résultat trouvé"}):o.jsx("ul",{role:"listbox",children:w.map((E,K)=>o.jsx("li",{className:O(E,K),onClick:()=>A(E),onMouseEnter:()=>M(K),role:"option","aria-selected":E.value===t,"aria-disabled":E.disabled,children:o.jsxs("div",{className:le.buttonContent,children:[o.jsx("span",{className:le.optionLabel,title:E.label,children:E.label}),E.value===t&&o.jsx("svg",{className:le.checkIcon,fill:"currentColor",viewBox:"0 0 20 20",children:o.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]})},E.value))})})]}),document.body)]})},U6e="_container_uq7pt_1",W6e="_item_uq7pt_7",G6e="_mainValue_uq7pt_13",K6e="_label_uq7pt_17",Z6e="_subValue_uq7pt_22",X6e="_subValueWrapper_uq7pt_27",Y6e="_subSeparator_uq7pt_32",Ye={container:U6e,item:W6e,mainValue:G6e,label:K6e,subValue:Z6e,subValueWrapper:X6e,subSeparator:Y6e},J6e=({dms:e,stats:t=[],itemWidth:n="120px",valueFontSize:c="28px",valueFontWeight:i=700,subFontSize:r="16px",subFontWeight:s=600,backgroundColor:d="#ffffff",labelColor:l="#6b7280",valueColor:h="#000000"})=>{const u=(p,y,f)=>{const[g,m]=p.split("/").map(x=>x.trim());return o.jsxs("span",{className:Ye.subValueWrapper,children:[o.jsx("span",{className:Ye.subLeft,style:{color:y},children:g}),o.jsx("span",{className:Ye.subSeparator,children:" / "}),o.jsx("span",{className:Ye.subRight,style:{color:f},children:m})]})};return o.jsxs("div",{className:Ye.container,style:{backgroundColor:d},children:[e&&o.jsxs("div",{className:Ye.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ye.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:e}),o.jsx("div",{className:Ye.label,style:{color:l},children:"DMS"})]}),t.map((p,y)=>o.jsxs("div",{className:Ye.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ye.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:p.value}),o.jsx("div",{className:Ye.label,style:{color:l},children:p.label}),o.jsx("div",{className:Ye.subValue,style:{fontSize:r,fontWeight:s},children:p.subValue&&u(p.subValue,p.subLeftColor,p.subRightColor)})]},y))]})},Q6e="_encours_16ist_1",efe="_header_16ist_19",tfe="_iconWrap_16ist_27",afe="_title_16ist_36",nfe="_items_16ist_47",ofe="_spaceEvenly_16ist_56",cfe="_item_16ist_47",ife="_valueContainer_16ist_86",rfe="_value_16ist_86",sfe="_label_16ist_108",dt={encours:Q6e,header:efe,iconWrap:tfe,title:afe,items:nfe,spaceEvenly:ofe,item:cfe,valueContainer:ife,value:rfe,label:sfe},jc=e=>typeof e=="number"?`${e}px`:typeof e=="string"?e:void 0;function dfe(e,t){const n={},c={};return e.valueColor&&(n.color=e.valueColor),e.valueFontSize!==void 0?n.fontSize=jc(e.valueFontSize):t.defaultValueFontSize!==void 0&&(n.fontSize=jc(t.defaultValueFontSize)),e.valueFontWeight!==void 0?n.fontWeight=e.valueFontWeight:t.defaultValueFontWeight!==void 0&&(n.fontWeight=t.defaultValueFontWeight),e.labelColor&&(c.color=e.labelColor),e.labelFontSize!==void 0?c.fontSize=jc(e.labelFontSize):t.defaultLabelFontSize!==void 0&&(c.fontSize=jc(t.defaultLabelFontSize)),e.labelFontWeight!==void 0?c.fontWeight=e.labelFontWeight:t.defaultLabelFontWeight!==void 0&&(c.fontWeight=t.defaultLabelFontWeight),{valueStyle:n,labelStyle:c}}function lfe(){return o.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[o.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.4"}),o.jsx("path",{d:"M8 12h8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]})}function hfe(e){const{title:t,titleColor:n,titleFontSize:c,titleFontWeight:i,icon:r,iconSize:s=18,iconColor:d,defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p,data:y,style:f,bg:g="#ffffff",width:m,gap:x,className:M,ariaLabel:v}=e,L=r?Mt[r]:void 0,b={background:g,width:jc(m),...f},C={};n&&(C.color=n),c!==void 0&&(C.fontSize=jc(c)),i!==void 0&&(C.fontWeight=i);const S={};return d&&(S.color=d),o.jsxs("section",{className:`${dt.encours} ${M??""}`,style:b,"aria-label":v??t,children:[o.jsxs("div",{className:dt.header,children:[o.jsx("div",{className:dt.iconWrap,"aria-hidden":!0,style:S,children:L?o.jsx(L,{size:typeof s=="number"?s:void 0}):o.jsx(lfe,{})}),o.jsx("div",{className:dt.title,style:C,children:t})]}),o.jsx("div",{className:`${dt.items} ${x===void 0?dt.spaceEvenly:""}`,role:"list",style:x!==void 0?{gap:`${x}px`}:{},children:y.map((_,I)=>{const{valueStyle:j,labelStyle:N}=dfe(_,{defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p});return o.jsx("div",{className:dt.item,role:"listitem",style:{..._.background?{background:_.background}:{},..._.width?{width:jc(_.width)}:{}},children:o.jsxs("div",{className:dt.valueContainer,children:[o.jsx("div",{className:dt.value,style:j,children:_.value}),_.label&&o.jsx("div",{className:dt.label,style:N,children:_.label})]})},`${String(_.label??_.value)}-${I}`)})})]})}const ufe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-360 280-559h400z"})),jA=k.memo(ufe),pfe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m280-400 200-201 200 201z"})),yfe=k.memo(pfe),kfe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#0087BD",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm3.983-3.55q.1 0 .192-.033a.36.36 0 0 0 .158-.117l4.117-4.133q.15-.15.15-.35a.54.54 0 0 0-.15-.367.52.52 0 0 0-.358-.133.5.5 0 0 0-.359.15l-3.75 3.75L5.35 7.583a.48.48 0 0 0-.7 0q-.15.15-.15.367 0 .216.15.35l1.983 2a.48.48 0 0 0 .35.15"})),mfe=k.memo(kfe),ffe=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("path",{fill:"#1E2122",d:"M3 14a.96.96 0 0 1-.7-.3.96.96 0 0 1-.3-.7V3q0-.4.3-.7T3 2h10q.4 0 .7.3t.3.7v10q0 .4-.3.7t-.7.3zm0-1h10V3H3z"})),gfe=k.memo(ffe),vfe=({items:e,onSave:t,loading:n,disabled:c,saveLabel:i,savingLabel:r,buttonTitle:s,size:d=16,colors:l={bg:"#DADADA",activeBg:"var(--color-primary)",circle:"#FFFFFF",icon:"#1C1B1F",icon2:"#FFFFFF"},style:h,a11yConfig:u})=>{const[p,y]=k.useState(!1),[f,g]=k.useState(e),[m,x]=k.useState(!1);if(k.useEffect(()=>{x(!0)},[]),k.useEffect(()=>{g(e)},[e]),!m)return null;const M=(b,C)=>{C<4||g(S=>S.map(_=>_.component_key===b?{..._,visible:!_.visible}:_))},v=()=>{t(f),y(!1)},L=Y(u,s);return o.jsxs("div",{style:{position:"relative",display:"inline-block",...h},children:[o.jsxs("div",{onClick:()=>{c||y(!p)},style:{display:"flex",alignItems:"center",cursor:c?"not-allowed":"pointer",borderRadius:4,transition:"background 0.2s"},title:L,children:[o.jsx(l$,{width:d,height:d,fill:l?.icon||"currentColor",style:{transition:"color 0.2s"}}),p?o.jsx(yfe,{width:d,height:d,fill:l?.icon||"currentColor"}):o.jsx(jA,{width:d,height:d,fill:l?.icon||"currentColor"})]}),p&&o.jsxs("div",{style:{position:"absolute",top:"120%",right:0,minWidth:260,background:"#fff",borderRadius:"0.25rem",boxShadow:"0px 3px 7px 0px rgba(17, 20, 21, 0.05),0px 14px 14px 0px rgba(17, 20, 21, 0.04),0px 30px 18px 0px rgba(17, 20, 21, 0.03), 0px 54px 22px 0px rgba(17, 20, 21, 0.01),0px 85px 24px 0px rgba(17, 20, 21, 0)",zIndex:235465456,padding:"0 0 0.5rem 0"},children:[o.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:f.map((b,C)=>o.jsxs(k.Fragment,{children:[o.jsxs("li",{onClick:()=>M(b.component_key,C),style:{display:"flex",alignItems:"center",padding:"0.5rem",cursor:C<4?"not-allowed":"pointer",transition:"background 0.2s"},onMouseEnter:S=>{C>=4&&(S.currentTarget.style.background="#F9FAFB")},onMouseLeave:S=>{C>=4&&(S.currentTarget.style.background="transparent")},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:8,flexShrink:0},children:b.visible?o.jsx(mfe,{width:20,height:20,fill:l?.activeBg||"var(--color-primary, #008FBB)"}):o.jsx(gfe,{width:20,height:20,fill:"#D1D5DB"})}),o.jsx("span",{style:{fontSize:"14px",color:"#111827",fontWeight:400,userSelect:"none"},children:b.label})]}),C===3&&o.jsx("div",{style:{height:1,background:"#E5E7EB",margin:"4px 0"}})]},b.component_key))}),o.jsx("div",{style:{padding:"12px 16px 0 16px",display:"flex",justifyContent:"flex-end"},children:o.jsx("button",{type:"button",onClick:v,disabled:n,style:{padding:"6px 16px",borderRadius:4,border:"none",background:"var(--color-primary, #008FBB)",color:"#fff",fontSize:"14px",fontWeight:500,cursor:n?"not-allowed":"pointer",transition:"opacity 0.2s",opacity:n?.7:1},children:n?r:i})})]})]})},xfe="_container_zhny9_1",Mfe="_card_zhny9_15",_fe="_footer_zhny9_33",Lfe="_noPaddingMobile_zhny9_51",hi={container:xfe,card:Mfe,footer:_fe,noPaddingMobile:Lfe},Ife="_board_95t8m_1",bfe="_clickable_95t8m_21",wfe="_sideBar_95t8m_26",Cfe="_boardContent_95t8m_32",Nfe="_orange_95t8m_40",Sfe="_red_95t8m_44",jfe="_green_95t8m_48",$fe="_grey_95t8m_52",qfe="_lightGrey_95t8m_56",Afe="_big_95t8m_61",zfe="_medium_95t8m_66",Pfe="_headerRow_95t8m_70",Vfe="_iconWrapper_95t8m_75",Tfe="_headerTitle_95t8m_80",Hfe="_valueArea_95t8m_89",Dfe="_titleWhite_95t8m_99",Bfe="_titleBlack_95t8m_103",Rfe="_valueWhite_95t8m_108",Ffe="_valueBlack_95t8m_112",Efe="_valueBlue_95t8m_116",Ofe="_bars_95t8m_121",Ufe="_bar_95t8m_121",Wfe="_barDark_95t8m_135",Gfe="_barDim_95t8m_139",Kfe="_predictionSection_95t8m_143",Zfe="_predictionHeader_95t8m_155",Xfe="_predictionBody_95t8m_162",Yfe="_hasPrediction_95t8m_170",Ve={board:Ife,clickable:bfe,sideBar:wfe,boardContent:Cfe,orange:Nfe,red:Sfe,green:jfe,grey:$fe,lightGrey:qfe,big:Afe,medium:zfe,headerRow:Pfe,iconWrapper:Vfe,headerTitle:Tfe,valueArea:Hfe,titleWhite:Dfe,titleBlack:Bfe,valueWhite:Rfe,valueBlack:Ffe,valueBlue:Efe,bars:Ofe,bar:Ufe,barDark:Wfe,barDim:Gfe,predictionSection:Kfe,predictionHeader:Zfe,predictionBody:Xfe,hasPrediction:Yfe},Jfe=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${Ve.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${Ve.bar} ${r<c?"":e?Ve.barDark:Ve.barDim}`},r))})},xt=({a11yConfig:e,iconName:t,label:n,value:c,backgroundColor:i="green",bars:r,lightBars:s=5,size:d="big",valueScale:l,width:h,height:u,className:p="",style:y,titleColor:f="white",valueColor:g="white",titleFontSize:m,titleFontWeight:x,valueFontSize:M,valueFontWeight:v,barColor:L,justifyContent:b="space-between",alignItems:C="flex-start",cardGap:S="",onClick:_,iconColor:I,titleKey:j,predictionValue:N,predictionLabel:w})=>{const $=r!=="none",V=r==="endingDark",{padding:T,...z}=y||{},A=h===void 0&&u===void 0&&i===void 0&&Object.keys(z).length===0?void 0:{...h!==void 0?{width:h}:{},...u!==void 0?{height:u}:{},...i!==void 0?{backgroundColor:i}:{},...z},q=`${Ve.board} ${Ve[d]} ${N!==void 0?Ve.hasPrediction:""} ${p}`;return o.jsxs("div",{className:q,onClick:_,style:l!==void 0?{...A,"--ds-value-scale":l}:A,children:[L&&o.jsx("div",{className:Ve.sideBar,style:{backgroundColor:L}}),o.jsxs("div",{className:Ve.boardContent,style:{padding:T,gap:S},children:[o.jsxs("div",{className:Ve.headerRow,style:{justifyContent:b,alignItems:C},children:[t&&o.jsx("div",{className:Ve.iconWrapper,style:{color:I},children:t}),o.jsx("div",{className:`${Ve.headerTitle} header-title-data-board`,children:o.jsx("span",{title:Y(e,j),"aria-label":e?.description,style:{color:f,...m?{fontSize:m}:{},...x?{fontWeight:x}:{}},children:n})}),$?o.jsx(Jfe,{endingDark:V,lightCount:s}):null]}),o.jsx("div",{className:Ve.valueArea,style:{color:g,...M?{fontSize:M}:{},...v?{fontWeight:v}:{}},children:c})]}),N!==void 0&&o.jsxs("div",{className:Ve.predictionSection,children:[o.jsx("div",{className:Ve.predictionHeader,children:w??"PRED."}),o.jsx("div",{className:Ve.predictionBody,children:N})]})]})},Qfe="_wrapper_1ydle_10",e8e="_hosp_1ydle_19",t8e="_headerRow_1ydle_54",a8e="_iconWrapper_1ydle_61",n8e="_headerTitle_1ydle_67",o8e="_hospValue_1ydle_76",c8e="_side_1ydle_88",i8e="_mini_1ydle_100",r8e="_miniLabel_1ydle_131",s8e="_miniValue_1ydle_140",d8e="_miniBars_1ydle_150",l8e="_bars_1ydle_155",h8e="_bar_1ydle_155",u8e="_barDark_1ydle_169",p8e="_barDim_1ydle_173",He={wrapper:Qfe,hosp:e8e,headerRow:t8e,iconWrapper:a8e,headerTitle:n8e,hospValue:o8e,side:c8e,mini:i8e,miniLabel:r8e,miniValue:s8e,miniBars:d8e,bars:l8e,bar:h8e,barDark:u8e,barDim:p8e},y8e=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${He.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${He.bar} ${r<c?"":e?He.barDark:He.barDim}`},r))})},$A=({left:e,right:t,className:n="",style:c,miniTilesCount:i=3})=>{const r=e.bars??"endingDark",s=r!=="none",d=r==="endingDark",l={...c,"--mini-tiles-count":i};return o.jsxs("div",{className:`${He.wrapper} ${n} data-four-boards`,style:l,children:[o.jsxs("div",{className:`${He.hosp} ${e.className||""}`,onClick:e.onClick,style:{...e.width?{width:e.width}:{},...e.height?{height:e.height}:{},...e.backgroundColor?{backgroundColor:e.backgroundColor}:{},...e.style||{}},title:Y(e.a11yConfig,e.titleKey),children:[o.jsxs("div",{className:He.headerRow,children:[o.jsxs("div",{className:`${He.iconWrapper} icon-wrapper-data-four-boards`,children:[e.iconName&&o.jsx("span",{style:{color:e.iconColor},children:e.iconName}),o.jsx("span",{className:He.headerTitle,style:{color:e.titleColor||"white",...e.titleFontSize?{fontSize:e.titleFontSize}:{},...e.titleFontWeight?{fontWeight:e.titleFontWeight}:{}},title:Y(e.a11yConfig,e.titleKey),children:e.label})]}),s?o.jsx(y8e,{endingDark:d,lightCount:e.lightBars??5}):null]}),o.jsx("div",{className:He.hospValue,style:{color:e.valueColor||"white",...e.valueScale!==void 0?{"--ds-value-scale":e.valueScale}:{},...e.valueFontSize?{fontSize:e.valueFontSize}:{},...e.valueFontWeight?{fontWeight:e.valueFontWeight}:{}},children:e.value})]}),o.jsx("div",{className:He.side,children:t.map((h,u)=>o.jsxs("div",{className:`${He.mini} ${h.className||""} icon-wrapper-data-four-boards`,onClick:h.onClick,style:{...h.width?{width:h.width}:{},...h.height?{height:h.height}:{},...h.backgroundColor?{backgroundColor:h.backgroundColor}:{},...h.style||{}},title:Y(h.a11yConfig,h.titleKey),children:[o.jsxs("span",{className:He.miniLabel,style:{color:h.titleColor||"white",textAlign:"right",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...h.titleFontSize?{fontSize:h.titleFontSize}:{},...h.titleFontWeight?{fontWeight:h.titleFontWeight}:{}},title:Y(h.a11yConfig,h.titleKey),children:[h.iconName&&o.jsx("span",{style:{color:h.iconColor},children:h.iconName}),h.label]}),o.jsx("span",{className:`${He.miniValue} mini-value-data-four-boards`,style:{color:h.valueColor||"white",textAlign:"right",...h.valueScale!==void 0?{"--ds-value-scale":h.valueScale}:{},...h.valueFontSize?{fontSize:h.valueFontSize}:{},...h.valueFontWeight?{fontWeight:h.valueFontWeight}:{}},children:h.value}),o.jsx("div",{className:He.miniBars})]},h.id??`${h.label}-${u}`))})]})},k8e=({items:e,footerLabel:t,width:n,height:c,size:i=320,style:r,className:s="",backgroundColor:d,titleFontSize:l,titleFontWeight:h,valueFontSize:u,valueFontWeight:p,noPaddingLeftRight:y=!1,onItemClick:f})=>{const g={width:n??i,height:c,backgroundColor:d??"var(--ds-navy)",...r},m=e[0],x=e[1],M=e.slice(2,5);return o.jsxs("div",{style:g,className:`${hi.container} ${y?hi.noPaddingMobile:""} ${s}`,children:[o.jsxs("div",{className:hi.card,children:[m?o.jsx(xt,{a11yConfig:m.a11yConfig,label:m.label,value:m.value,backgroundColor:m.backgroundColor,bars:m.bars,lightBars:m.lightBars,size:m.size??"big",valueScale:m.valueScale,width:m.width,height:m.height,titleColor:"white",valueColor:"white",titleFontSize:m.titleFontSize??l,titleFontWeight:m.titleFontWeight??h,valueFontSize:m.valueFontSize??u,valueFontWeight:m.valueFontWeight??p,titleKey:m.titleKey,onClick:v=>f?.(0,v)}):null,x&&M.length>0?o.jsx($A,{left:{a11yConfig:x.a11yConfig,id:x.id,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,valueScale:x.valueScale,width:x.width,height:x.height,titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,titleKey:x.titleKey,onClick:v=>f?.(1,v)},right:M.map((v,L)=>({a11yConfig:v.a11yConfig,id:v.id,label:v.label,value:v.value,backgroundColor:v.backgroundColor,bars:v.bars,lightBars:v.lightBars,valueScale:v.valueScale,width:v.width,height:v.height,titleFontSize:v.titleFontSize??l,titleFontWeight:v.titleFontWeight??h,valueFontSize:v.valueFontSize??u,valueFontWeight:v.valueFontWeight??p,titleKey:v.titleKey,onClick:b=>f?.(2+L,b)}))}):x&&M.length===0?o.jsx(xt,{a11yConfig:x.a11yConfig,label:x.label,value:x.value,backgroundColor:x.backgroundColor,bars:x.bars,lightBars:x.lightBars,size:x.size??"big",valueScale:x.valueScale,width:x.width,height:x.height,titleColor:"white",valueColor:"white",titleFontSize:x.titleFontSize??l,titleFontWeight:x.titleFontWeight??h,valueFontSize:x.valueFontSize??u,valueFontWeight:x.valueFontWeight??p,onClick:v=>f?.(1,v)}):null]}),t&&o.jsx("div",{className:hi.footer,children:t})]})},m8e=({x:e,y:t,width:n,payload:c,fontSize:i,fontWeight:r,stroke:s})=>o.jsx("g",{transform:`translate(${e},${t})`,children:o.jsx("foreignObject",{x:-n,y:-35,width:n,height:70,style:{overflow:"visible"},children:o.jsx("div",{style:{fontSize:i,fontWeight:r,color:s,lineHeight:"1.2",display:"flex",justifyContent:"flex-end",textAlign:"right",alignItems:"center",height:"100%",width:"100%",paddingRight:"8px",boxSizing:"border-box"},children:o.jsx("span",{style:{overflowWrap:"break-word",whiteSpace:"normal",display:"block",maxWidth:"100%"},children:c.value})})})}),f8e=({data:e,height:t=360,barColor:n="#0284C7",tooltipEnabled:c=!0,backgroundColor:i="transparent",legendTextColor:r="var(--color-text)",barHeight:s=40,yAxisWidth:d=120,fontSize:l="12px",fontWeight:h="400",domain:u,xAxisLabel:p,margin:y={top:20,right:60,bottom:40,left:0},valueFormatter:f,tickFormatter:g,labelDataKey:m="percentage",isAnimationActive:x=!0})=>{const M=(y.top??20)+(y.bottom??40)+e.length*(s+20),v=Math.max(M,t),L=k.useMemo(()=>{if(!e||e.length===0)return d;const I=(parseFloat(l)||12)*.7,N=Math.max(...e.map(w=>(w.label||"").length))*I+16;return Math.min(Math.max(N,40),d)},[e,l,d]),b=_=>g?g(_):_?.toString()||"",C=_=>f&&m==="value"?f(_):_==null||_===""?"":m==="percentage"?`${_}%`:_.toString(),S=(_,I,j)=>{if(typeof _!="number")return _;const N=f?f(_):_.toString(),w=j?.payload?.percentage;return typeof w=="number"&&Number.isFinite(w)&&m==="percentage"?`${N} (${w.toFixed(1)}%)`:N};return o.jsx("div",{style:{backgroundColor:i,width:"100%"},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:v,children:o.jsxs(a.BarChart,{data:e,layout:"vertical",margin:y,children:[o.jsx(a.CartesianGrid,{opacity:.4,stroke:"#E5E7EB",vertical:!1,horizontal:!0}),o.jsx(a.XAxis,{type:"number",domain:u||[0,"auto"],axisLine:!1,tickLine:!1,fontSize:l,fontWeight:h,stroke:r,tickFormatter:b,label:p?{value:p,position:"insideBottom",offset:-10,style:{textAnchor:"middle",fill:r,fontSize:12,fontWeight:"500"}}:void 0}),o.jsx(a.YAxis,{type:"category",dataKey:"label",stroke:r,axisLine:!1,tickLine:!1,width:L,interval:0,fontSize:l,fontWeight:h,tick:o.jsx(m8e,{fontSize:l,fontWeight:h,stroke:r})}),c&&o.jsx(a.Tooltip,{formatter:S,labelStyle:{color:"var(--color-text)"}}),o.jsx(a.Bar,{dataKey:"value",fill:n,radius:0,barSize:s,isAnimationActive:x,children:o.jsx(a.LabelList,{dataKey:m,position:"right",offset:10,formatter:C,fill:r,fontSize:l,fontWeight:h})})]})})})},g8e="_menu_10i6j_1",v8e="_menuRow_10i6j_18",x8e="_separator_10i6j_33",M8e="_rowLabel_10i6j_39",_8e="_rowLeadingIcon_10i6j_47",L8e="_rowIcon_10i6j_54",Wc={menu:g8e,menuRow:v8e,separator:x8e,rowLabel:M8e,rowLeadingIcon:_8e,rowIcon:L8e},I8e=k.forwardRef(function({isVisible:t,onClose:n,items:c,style:i,position:r,bg:s},d){const l=k.useRef(null),h=d||l;if(k.useEffect(()=>{if(!t)return;const y=f=>{h.current&&!h.current.contains(f.target)&&n?.()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t,n]),!t)return null;const p={...{top:r?.top,left:r?.left,right:r?.right,bottom:r?.bottom},...s&&{backgroundColor:s},...i};return o.jsx("div",{ref:h,role:"menu",className:Wc.menu,style:p,children:c.map(y=>{if(y.type==="separator")return o.jsx("hr",{className:Wc.separator},y.id);const f=y,g=f.color?{color:f.color}:{},m=f.closeOnClick!==!1;return o.jsxs("button",{role:"menuitem",className:Wc.menuRow,style:g,onClick:()=>{f.onClick?.(),m&&n?.()},children:[o.jsxs("span",{className:Wc.rowLabel,children:[f.leadingIcon&&o.jsx("span",{className:Wc.rowLeadingIcon,children:f.leadingIcon}),o.jsx("span",{children:f.label})]}),f.icon&&o.jsx("span",{className:Wc.rowIcon,children:f.icon})]},f.id)})})}),qA=({user:e,logoutHref:t,logoutTarget:n="_self",onLogout:c,profileHref:i,profileLinkTarget:r="_self",backgroundColor:s="transparent",textColor:d="inherit",roleColor:l="#888",avatarSize:h="32px",padding:u="10px",gap:p="12px",emailFontSize:y="14px",emailFontWeight:f=600,roleFontSize:g="12px",roleFontWeight:m,avatarColor:x="#5b8fb9",backgroundColorAvatar:M="#f1f4f5",dropdownMenuItems:v,dropdownMenuStyle:L,dropdownMenuOffset:b,statusDotColor:C,a11yConfig:S,style:_,className:I=""})=>{const{user:j}=mt(),N=e||j,{currentTheme:w,switchTheme:$}=wL(),V=k.useRef(null),T=k.useRef(null),[z,A]=k.useState(!1),[q,B]=k.useState({}),F=k.useMemo(()=>{const ae=[],ne=({variant:pe})=>pe==="sun"?o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("circle",{cx:"12",cy:"12",r:"4"})}):o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});i&&(ae.push({id:"profile",type:"action",label:"Mon profil",onClick:()=>{typeof window>"u"||(r==="_blank"?window.open(i,"_blank","noopener,noreferrer"):window.location.assign(i))}}),ae.push({id:"sep-profile",type:"separator"}));const de=w==="dark";return ae.push({id:"theme",type:"action",label:de?"Mode clair":"Mode sombre",icon:o.jsx(ne,{variant:de?"sun":"moon"}),onClick:()=>{$(de?"light":"dark")}}),(t||c)&&(ae.push({id:"sep-theme",type:"separator"}),ae.push({id:"logout",type:"action",label:"Se déconnecter",danger:!0,onClick:()=>{if(t){if(typeof window>"u")return;n==="_blank"?window.open(t,"_blank","noopener,noreferrer"):window.location.assign(t);return}c?.()}})),ae},[w,t,n,c,i,r,$]),P=v??F,O=()=>{if(!V.current){A(ae=>!ae);return}if(!z){const ae=V.current.getBoundingClientRect(),ne=window.innerWidth,de=window.innerHeight,pe=200,me=200,U=4,X=b?.x??0,re=b?.y??0,Be=ne-ae.right>=pe+U;B(Be?{top:ae.bottom-me+re,left:ae.right+U+X}:{bottom:de-ae.top+re,left:ae.left+X})}A(ae=>!ae)};if(k.useEffect(()=>{if(!z||!V.current)return;const ae=()=>{const ne=V.current.getBoundingClientRect(),de=window.innerWidth,pe=window.innerHeight,me=200,U=200,X=4,re=b?.x??0,je=b?.y??0,ge=de-ne.right>=me+X;B(ge?{top:ne.bottom-U+je,left:ne.right+X+re}:{bottom:pe-ne.top+je,left:ne.left+re})};return window.addEventListener("resize",ae),window.addEventListener("orientationchange",ae),()=>{window.removeEventListener("resize",ae),window.removeEventListener("orientationchange",ae)}},[z,b]),k.useEffect(()=>{if(!z||!V.current||!T.current)return;const ae=()=>{const de=V.current.getBoundingClientRect(),pe=T.current.getBoundingClientRect(),me=b?.x??0,U=b?.y??0;B(X=>X.left!==void 0&&X.top!==void 0&&X.left>=de.right-1?{top:de.bottom-pe.height+U,left:X.left+me}:X)},ne=requestAnimationFrame(()=>{setTimeout(ae,0)});return()=>cancelAnimationFrame(ne)},[z,b]),!N)return null;const J=N,E=parseInt(h,10)||40,K=`${E*.375}px`,ue=`${E*1.375}px`,ce=`${E*.2}px`,xe=`${E*.6}px`,ie=()=>{const ae=parseInt(h,10)||40,ne=Math.max(8,ae*.34375),de=Math.max(2,ae*.05);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{position:"relative",flexShrink:0,userSelect:"none"},children:[J.image?o.jsx("img",{src:J.image,alt:`${J.prenom} ${J.nom}`,style:{width:h,height:h,borderRadius:"50%",objectFit:"cover",userSelect:"none"}}):o.jsxs("div",{style:{width:h,height:h,position:"relative",borderRadius:"50%",backgroundColor:M,overflow:"hidden",userSelect:"none"},children:[o.jsx("div",{style:{width:K,height:K,borderRadius:"50%",backgroundColor:x,position:"absolute",top:ce,left:"50%",transform:"translateX(-50%)",zIndex:2,userSelect:"none"}}),o.jsx("div",{style:{width:ue,height:ue,borderRadius:"50%",backgroundColor:x,position:"absolute",top:xe,left:"50%",transform:"translateX(-50%)",zIndex:1,userSelect:"none"}})]}),C&&o.jsx("div",{style:{position:"absolute",bottom:de,right:de,width:`${ne}px`,height:`${ne}px`,borderRadius:"50%",backgroundColor:C,border:"2px solid white",zIndex:10}})]}),o.jsxs("div",{style:{display:"flex",flexDirection:"column",minWidth:0,flex:1},children:[o.jsx("span",{style:{fontWeight:f,fontSize:y,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.email,children:J.email}),o.jsx("span",{style:{color:l,fontSize:g,fontWeight:m,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:J.role,children:J.role})]})]})};return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:V,className:`user-info ${I}`,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,backgroundColor:s,gap:p,color:d,width:"100%",boxSizing:"border-box",cursor:"pointer",userSelect:"none",..._},onClick:O,title:Y(S,J.role),role:"button",tabIndex:0,children:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:p,flex:1,minWidth:0},children:o.jsx(ie,{})})}),o.jsx(I8e,{ref:T,isVisible:z,onClose:()=>A(!1),items:P,style:L,position:q})]})},b8e="_navItem_16uqf_1",w8e="_label_16uqf_14",C8e="_icon_16uqf_26",m1={navItem:b8e,label:w8e,icon:C8e},dC=({label:e,labelKey:t,onClick:n,href:c,isActive:i,icon:r,style:s,className:d="",highlightColor:l="#00aec7",color:h="#333",activeColor:u="#00aec7",highlightBackgroundColor:p="rgba(0, 0, 0, 0.05)",fontSize:y="15px",fontWeight:f="500",sidebarCollapsed:g=!1,padding:m="10px 16px",borderWidth:x="4px",iconGap:M="12px",disabled:v=!1,disabledColor:L,a11yConfig:b})=>{const C=()=>{v||n?.()},S=o.jsxs(o.Fragment,{children:[r&&o.jsx("span",{className:m1.icon,style:{marginRight:g?0:M},children:r}),!g&&o.jsx("span",{className:m1.label,children:e})]}),_=()=>{if(!i)return"transparent";const j=N=>{const w=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return w?{r:parseInt(w[1],16),g:parseInt(w[2],16),b:parseInt(w[3],16)}:null};if(l.startsWith("#")){const N=j(l);if(N)return`rgba(${N.r}, ${N.g}, ${N.b}, 0.08)`}else if(l.startsWith("rgb")){const N=l.match(/\d+/g);if(N&&N.length>=3)return`rgba(${N[0]}, ${N[1]}, ${N[2]}, 0.08)`}return p},I={onClick:C,className:`${m1.navItem} ${i?m1.active:""} ${d} ${v?m1.disabled:""}`,style:{padding:m,color:i?u:v?L||"#999":h,borderLeft:i?`${x} solid ${l}`:`${x} solid transparent`,backgroundColor:_(),fontSize:y,fontWeight:f,cursor:v?"not-allowed":"pointer",textDecoration:"none",...s},"aria-disabled":v};return c&&!n&&!v?o.jsx("a",{href:c,...I,title:Y(b,t),children:S}):o.jsx("div",{...I,role:n?"button":void 0,tabIndex:n&&!v?0:void 0,title:Y(b,t),children:S})},N8e="_navbar_y5tex_1",S8e="_topSection_y5tex_9",j8e="_logoContainer_y5tex_14",$8e="_collapseToggle_y5tex_20",q8e="_collapsedRail_y5tex_37",A8e="_collapsedToggle_y5tex_44",z8e="_sectionsContainer_y5tex_67",P8e="_sectionTitle_y5tex_73",V8e="_sectionItems_y5tex_78",T8e="_bottomSection_y5tex_83",H8e="_versionContainer_y5tex_102",Je={navbar:N8e,topSection:S8e,logoContainer:j8e,collapseToggle:$8e,collapsedRail:q8e,collapsedToggle:A8e,sectionsContainer:z8e,sectionTitle:P8e,sectionItems:V8e,bottomSection:T8e,versionContainer:H8e},D8e=({logoProps:e,logoSpacing:t,navItems:n,padding:c="24px 16px",sectionSpacing:i="32px",itemSpacing:r="4px",backgroundColor:s="#fff",highlightColor:d="#00aec7",highlightBackgroundColor:l="rgba(0, 0, 0, 0.05)",version:h,navSectionStyle:u,navLinkStyle:p,navItemPadding:y="10px 16px",navItemBorderWidth:f="4px",navItemIconGap:g="12px",navItemFontSize:m="15px",navItemFontWeight:x="500",navItemColor:M,sectionTitlePadding:v="16px",sectionTitleFontSize:L="11px",sectionTitleColor:b="#999",sectionTitleWeight:C="500",versionFontSize:S="12px",versionFontWeight:_="400",versionColor:I="#999",userInfoProps:j,style:N,className:w="",width:$="280px",showLogo:V=!0,versionA11yConfig:T,displayNone:z=!1,showCollapseToggle:A=!1,collapsed:q=!1,onCollapseToggle:B,collapseToggleLabel:F="Toggle sidebar",collapseToggleIconPath:P="/icon/dock_to_left.svg"})=>{const O=mt(),J=O.activeNav,E=O.setActiveNav,K=O.user,ue=j.user||K;return A&&q?o.jsx("div",{className:`${Je.collapsedRail} ${w}`,style:{display:z?"none":"flex"},children:o.jsx("button",{type:"button",className:Je.collapsedToggle,onClick:B,"aria-label":F,children:o.jsx(xw,{path:P,width:18,height:18})})}):o.jsxs("div",{className:`${Je.navbar} ${w}`,style:{width:$,backgroundColor:s,padding:c,display:z?"none":"flex",...N},children:[o.jsxs("div",{className:Je.topSection,style:{gap:t},children:[V&&o.jsxs("div",{className:Je.logoContainer,children:[o.jsx(bL,{...e}),A&&o.jsx("button",{type:"button",className:Je.collapseToggle,onClick:B,"aria-label":F,children:o.jsx(xw,{path:P,width:20,height:20})})]}),o.jsx("div",{className:Je.sectionsContainer,style:{gap:i},children:n.map((ce,xe)=>o.jsxs("div",{className:Je.section,children:[ce.title&&o.jsx("div",{className:Je.sectionTitle,title:Y(ce.a11yConfig,ce.titleKey),style:{fontSize:L,color:b,padding:v,fontWeight:C,border:"4px solid transparent",...u},children:ce.title}),o.jsx("div",{className:Je.sectionItems,style:{gap:r},children:ce.items.map(ie=>o.jsx(dC,{...ie,isActive:ie.isActive===null?ie.isActive:J===ie.id,onClick:()=>{ie.onClick&&ie.onClick(),ie.isActive==null&&E(ie.id)},highlightColor:d,activeColor:d,highlightBackgroundColor:l,padding:y,borderWidth:f,iconGap:g,fontSize:m,fontWeight:x,color:M,style:p},ie.id))})]},xe))})]}),o.jsxs("div",{className:Je.bottomSection,style:{gap:t},children:[o.jsx(qA,{...j,user:ue}),h&&o.jsx("div",{className:Je.versionContainer,title:Y(T,h),style:{fontSize:S,fontWeight:_,color:I},children:h})]})]})},B8e="_container_4qege_1",R8e="_titleContainer_4qege_10",F8e="_title_4qege_10",E8e="_inlineToggleContainer_4qege_24",O8e="_rightContentContainer_4qege_30",f1={container:B8e,titleContainer:R8e,title:F8e,inlineToggleContainer:E8e,rightContentContainer:O8e},U8e=({className:e="",style:t,fontSize:n="20px",fontWeight:c="bold",color:i="#000",padding:r="0",margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,navItems:y,allNavItems:f,formatTitle:g=M=>M,rightContent:m,inlineToggle:x})=>{const{activeNav:M}=mt(),v=y.find(b=>b.id===M)||f?.find(b=>b.id===M),L=v?g(v.label):M||"";return L?o.jsxs("div",{className:`${f1.container} ${e}`,style:{padding:r,margin:s,backgroundColor:d,width:l,height:h,border:u,borderRadius:p,...t},children:[o.jsxs("div",{className:f1.titleContainer,children:[o.jsx("div",{className:f1.title,style:{fontSize:n,fontWeight:c,color:i},children:L}),x&&o.jsx("div",{className:f1.inlineToggleContainer,children:x})]}),m&&o.jsx("div",{className:f1.rightContentContainer,children:m})]}):null},W8e="_navItem_1hg26_1",G8e="_navItemIcon_1hg26_21",K8e="_navItemLabel_1hg26_29",Z8e="_navItemCount_1hg26_36",X8e="_navItemIndicator_1hg26_49",g1={navItem:W8e,navItemIcon:G8e,navItemLabel:K8e,navItemCount:Z8e,navItemIndicator:X8e},AA=({a11yConfig:e,label:t,isActive:n,onClick:c,href:i,labelKey:r,icon:s,count:d,activeColor:l="#00aec7",inactiveColor:h="#666",activeBackgroundColor:u="transparent",countBackgroundColor:p,countColor:y="#fff",countBorderRadius:f="10px",countPadding:g="2px 6px",countFontSize:m="12px",countFontWeight:x="500",indicatorColor:M="#00aec7",indicatorHeight:v="3px",padding:L="8px 4px",fontSize:b="14px",fontWeight:C="500",gap:S="8px",style:_,className:I="",disabled:j=!1,onNavigate:N})=>{const w=()=>{j||(c?.(),i&&(N?N(i):window.location.href=i))};return o.jsxs("div",{className:`${g1.navItem} ${I}`,onClick:w,title:Y(e,r),style:{gap:S,padding:L,color:n?l:h,backgroundColor:n?u:"transparent",fontSize:b,fontWeight:C,..._},children:[s&&o.jsx("span",{className:g1.navItemIcon,children:s}),o.jsx("span",{className:g1.navItemLabel,children:t}),d!==void 0&&o.jsx("span",{className:g1.navItemCount,style:{backgroundColor:p,color:y,borderRadius:f,padding:g,fontSize:m,fontWeight:x},children:d}),n&&!j&&o.jsx("div",{className:g1.navItemIndicator,style:{height:v,backgroundColor:M}})]})},Y8e="_container_13hsa_1",J8e="_groupHeader_13hsa_8",Q8e="_groupHeaderLeft_13hsa_18",ege="_groupIcon_13hsa_23",tge="_dropdown_13hsa_29",age="_item_13hsa_42",nge="_itemIcon_13hsa_65",oge="_chevron_13hsa_72",cge="_chevronOpen_13hsa_79",ft={container:Y8e,groupHeader:J8e,groupHeaderLeft:Q8e,groupIcon:ege,dropdown:tge,item:age,itemIcon:nge,chevron:oge,chevronOpen:cge},ige=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M480-344 240-584l43-43 197 197 197-197 43 43z"})),R1=k.memo(ige),zA=({groups:e,activeItemId:t,onItemClick:n,style:c,className:i,bgColor:r="transparent",color:s="var(--color-text)",headerBgColor:d="var(--color-indicator)",headerColor:l="var(--color-text)",headerBorderBottomColor:h="var(--color-border)",dropdownBgColor:u="var(--color-background)",itemBgColor:p="transparent",itemHoverBgColor:y="rgba(0,0,0,0.05)",itemColor:f="var(--color-text)",itemActiveColor:g="var(--color-primary)",itemActiveBorderColor:m="var(--color-primary)",itemDividerColor:x="var(--color-border)",iconColor:M="#555555",activeIconColor:v="var(--color-primary)",headerIconColor:L="var(--color-text)",chevronColor:b="var(--color-text)",iconSize:C=22,headerPadding:S="14px 20px",itemPadding:_="14px 20px",iconGap:I=14,borderRadius:j=0})=>{const[N,w]=k.useState(""),$=k.useRef(null);k.useEffect(()=>{const T=z=>{$.current&&!$.current.contains(z.target)&&w("")};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const V={backgroundColor:r,color:s,borderRadius:j,...c};return o.jsx("nav",{ref:$,className:[ft.container,i].filter(Boolean).join(" "),style:V,children:e.map(T=>{const z=N===T.id,A={backgroundColor:d,color:l,padding:S,borderBottom:`1px solid ${h}`,gap:I},q={backgroundColor:u};return o.jsxs("div",{children:[o.jsxs("div",{className:ft.groupHeader,style:A,onClick:()=>w(z?"":T.id),role:"button","aria-expanded":z,children:[o.jsxs("div",{className:ft.groupHeaderLeft,style:{gap:I},children:[T.icon&&o.jsx("span",{className:ft.groupIcon,style:{color:L,width:C,height:C},children:T.icon}),o.jsx("span",{children:T.label})]}),o.jsx("span",{className:[ft.chevron,z?ft.chevronOpen:""].join(" "),style:{color:b},children:o.jsx(R1,{width:18,height:18})})]}),z&&o.jsx("div",{className:ft.dropdown,style:q,children:T.items.map(B=>{const F=B.id===t,P={padding:_,gap:I,color:F?g:f,backgroundColor:p,"--item-border-width":F?"4px":"1px","--item-border-color":F?m:x};return o.jsxs("div",{className:ft.item,style:P,onClick:()=>{n?.(T.id,B.id),w("")},role:"menuitem",onMouseEnter:O=>{F||(O.currentTarget.style.backgroundColor=y)},children:[B.icon&&o.jsx("span",{className:ft.itemIcon,style:{color:F?v:M,width:C,height:C},children:B.icon}),o.jsx("span",{children:B.label})]},B.id)})})]},T.id)})})},rge="_subheaderContent_1glo8_1",sge="_navContainer_1glo8_11",dge="_rightContent_1glo8_45",Wb={subheaderContent:rge,navContainer:sge,rightContent:dge},lge=({subNavItems:e,backgroundColor:t="transparent",padding:n="0",margin:c,width:i,height:r="auto",border:s,borderBottom:d="none",itemGap:l="24px",actionsGap:h="16px",itemPadding:u="12px 0",itemFontSize:p="14px",itemFontWeight:y="500",activeItemColor:f="#00aec7",inactiveItemColor:g="#5c6975",indicatorHeight:m="3px",showDraggable:x=!1,showLegend:M=!1,showData:v=!1,className:L="",style:b,countBackgroundColor:C,countColor:S,countBorderRadius:_,countPadding:I,countFontSize:j,countFontWeight:N,navContainerClassName:w,navContainerStyle:$,rightContentClassName:V,rightContentStyle:T,rightActions:z,activeSwitcherColor:A,inactiveSwitcherColor:q,isMobile:B=!1,onNavigate:F})=>{const{activeSubNav:P,setActiveSubNav:O,navCounts:J,activeNav:E}=mt();if(B){const K=e.find(ce=>ce.id===P)||e[0],ue=[{id:"current-group",label:K?.label||E?.toUpperCase()||"MENU",icon:K?.icon,items:e.map(ce=>({id:ce.id,label:ce.label,icon:ce.icon}))}];return o.jsx("div",{className:L,style:b,children:o.jsx(zA,{groups:ue,activeItemId:P,onItemClick:(ce,xe)=>{const ie=e.find(ae=>ae.id===xe);ie&&(ie.onClick&&ie.onClick(),ie.href&&(F?F(ie.href):ie.onNavigate?ie.onNavigate(ie.href):window.location.href=ie.href),O(xe))},headerBgColor:t})})}return o.jsxs("div",{className:`${Wb.subheaderContent} ${L}`,style:{backgroundColor:t,padding:n,margin:c,width:i,height:r,border:s,borderBottom:d,...b},children:[o.jsx("div",{className:`${Wb.navContainer} ${w||""}`,style:{gap:l,...$},children:e.map(K=>{const ue=K.count!==void 0?K.count:J[K.id],ce=P===K.id||K.isActive;return o.jsx(AA,{...K,onNavigate:F||K.onNavigate,count:ue,isActive:ce,onClick:()=>{K.onClick&&K.onClick(),O(K.id)},activeColor:f,inactiveColor:g,countBackgroundColor:C,countColor:S,countBorderRadius:_,countPadding:I,countFontSize:j,countFontWeight:N,indicatorColor:f,indicatorHeight:m,padding:u,fontSize:p,fontWeight:y,gap:"8px",style:K.style},K.id)})}),o.jsxs("div",{className:`${Wb.rightContent} ${V||""}`,style:{gap:h,...T},children:[x&&o.jsx(yL,{size:20,colors:{bg:A,activeBg:q,icon:"#1C1B1F",icon2:"#FFFFFF"}}),M&&o.jsx(kL,{size:20,colors:{bg:A,activeBg:q,icon:"#1C1B1F",icon2:"#FFFFFF"}}),v&&o.jsx(mL,{size:20,colors:{bg:A,activeBg:q,icon:"#1C1B1F",icon2:"#FFFFFF"}}),z]})]})},hge=({onSwitch:e,size:t="20px",lightIconColor:n="#666",darkIconColor:c="#fff",backgroundColor:i="transparent",padding:r="8px",borderRadius:s="50%",style:d,className:l=""})=>{const[h,u]=k.useState(!1),{currentTheme:p,switchTheme:y}=wL(),f=p!="dark",g=()=>{y(f?"dark":"light"),e?.()};return k.useEffect(()=>{u(!0)},[]),!h||!p?o.jsx(o.Fragment,{}):o.jsx("div",{className:`theme-switcher ${l}`,onClick:g,style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i,padding:r,borderRadius:s,transition:"all 0.3s ease",...d},children:f?o.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):o.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:c,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"5"}),o.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),o.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),o.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),o.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),o.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),o.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),o.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),o.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})})},uge=({initialSortBy:e=null,initialSortOrder:t="asc",onSortChange:n})=>{const[c,i]=k.useState({sortBy:e,sortOrder:t,filters:{}}),r=k.useCallback(s=>{let d="asc";c.sortBy===s&&(d=c.sortOrder==="asc"?"desc":"asc");const l={...c,sortBy:s,sortOrder:d};i(l),n(s,d)},[c,n]);return{tableState:c,handleSort:r}},pge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-800v487L216-537l-56 57 320 320 320-320-56-57-224 224v-487z"})),yge=k.memo(pge),kge=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-160v-487L216-423l-56-57 320-320 320 320-56 57-224-224v487z"})),mge=k.memo(kge),fge=({columns:e,sortBy:t,sortOrder:n,onSort:c,removeLabelSpan:i=!1})=>o.jsx("thead",{children:o.jsx("tr",{children:e.map((r,s)=>{const d=t===r.key,l=!!r.sortable;return o.jsx("th",{className:`${r.className||""}${l?" sortable":""}`,style:{width:r.width,textAlign:r.align||"left"},onClick:()=>l&&c(String(r.key)),title:Y(r.a11yConfig,r.titleKey),children:o.jsxs("div",{className:`th-content ${r.align?`align-${r.align}`:""}`,children:[i?r.label:o.jsx("span",{children:r.label}),l&&o.jsx("span",{className:"sort-icon-container",style:{display:"inline-flex",alignItems:"center"},children:d&&n==="asc"?o.jsx(mge,{width:16,height:16,style:{fill:"currentColor",transition:"all 0.2s ease"}}):o.jsx(yge,{width:16,height:16,style:{fill:"currentColor",opacity:d?1:.5,transition:"all 0.2s ease"}})})]})},String(r.key)||s)})})}),gge=({data:e,columns:t,rowKey:n,onRowClick:c,isLoading:i,text:r,rowStyle:s,rowClassName:d,renderSeparator:l})=>!e.length&&!i?o.jsx("tbody",{children:o.jsx("tr",{children:o.jsx("td",{colSpan:t.length,style:{textAlign:"center",padding:"32px"},children:o.jsx("span",{style:{color:"var(--table-text-muted)"},children:r?.noData||"Aucune donnée disponible"})})})}):o.jsx("tbody",{children:e.map((h,u)=>{const p=h[n],y=typeof p=="string"||typeof p=="number"?p:u,f=l?l(h):null;return o.jsx("tr",{onClick:()=>c&&c(h),style:{cursor:c?"pointer":"default",...s?s(h):{}},className:d?d(h,u):"",children:f?o.jsx("td",{colSpan:t.length,children:f}):t.map((g,m)=>o.jsx("td",{style:{width:g.width,textAlign:g.align||"left"},className:g.className,children:g.render?g.render(h):h[g.key]},`${String(g.key)}-${m}`))},y)})}),vge=({state:e,onPaginationChange:t,onLoadMore:n,infiniteScroll:c,hasMore:i,text:r,isLoading:s,pageSizeOptions:d})=>{const{page:l,pageSize:h,total:u}=e,p=h===-1?u:h,y=Math.ceil(u/p)||1,f=Math.min(Math.max(1,l),y),g=u===0?0:(f-1)*p+1,m=Math.min(f*p,u),x=b=>{t({page:b})},M=k.useMemo(()=>{if(y<=6)return Array.from({length:y},($,V)=>V+1);const S=Math.max(f-1,1),_=Math.min(f+1,y),I=S>2,j=_<y-2,N=1,w=y;if(!I&&j)return[...Array.from({length:5},(T,z)=>z+1),"...",y];if(I&&!j){const V=Array.from({length:5},(T,z)=>y-5+z+1);return[N,"...",...V]}if(I&&j){const $=Array.from({length:_-S+1},(V,T)=>S+T);return[N,"...",...$,"...",w]}return[]},[f,y]),v=!!(d&&d.length>0),L=!c&&h!==-1&&y>1&&o.jsxs("div",{className:"pagination-controls",children:[o.jsx("button",{className:"pagination-btn",onClick:()=>x(1),disabled:f===1,title:r?.first||"Premier",children:"<<"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f-1),disabled:f===1,title:r?.previous||"Précédent",children:"<"}),(M||[]).map((b,C)=>b==="..."?o.jsx("span",{style:{padding:"0 4px",color:"var(--table-text-muted)"},children:"..."},C):o.jsx("button",{className:`pagination-btn ${b===f?"active":""}`,onClick:()=>x(b),children:b},C)),o.jsx("button",{className:"pagination-btn",onClick:()=>x(f+1),disabled:f===y,title:r?.next||"Suivant",children:">"}),o.jsx("button",{className:"pagination-btn",onClick:()=>x(y),disabled:f===y,title:r?.last||"Dernier",children:">>"})]});return o.jsxs("div",{className:"table-pagination",children:[o.jsx("div",{className:"pagination-summary",children:u>0?o.jsx("span",{children:r?.itemsRange?r.itemsRange(g,m,u):o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[g,"–",m]})," ",r?.of||"sur"," ",o.jsx("b",{children:u.toLocaleString()})," ",r?.items||"éléments"]})}):o.jsx("span",{children:r?.noResults||"0 résultats"})}),v?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-center",children:L}),o.jsxs("div",{className:"pagination-pagesize",children:[o.jsx("label",{htmlFor:"table-pagination-pagesize",children:r?.perPage||"Par page"}),o.jsx("select",{id:"table-pagination-pagesize",value:h,onChange:b=>t({pageSize:Number(b.target.value),page:1}),children:(d||[]).map(b=>o.jsx("option",{value:b,children:b},b))})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pagination-spacer"}),L]}),!c&&n&&i&&o.jsx("div",{className:"pagination-load-more",children:o.jsx("button",{className:"btn-load-more",onClick:n,disabled:s,style:{padding:"8px 16px",backgroundColor:"white",border:"1px solid #ddd",borderRadius:"6px",cursor:s?"wait":"pointer",color:"#555",fontWeight:600},children:s?r?.loading||"Chargement...":r?.loadMore||"Charger plus"})})]})},lC=({data:e,columns:t,isLoading:n,pagination:c,onPaginationChange:i,onSortChange:r,rowKey:s,loaderSize:d=40,stickyHeader:l=!0,height:h,minHeight:u="200px",text:p,onLoadMore:y,infiniteScroll:f,hasMore:g,tableState:m,className:x,style:M,rowStyle:v,onRowClick:L,rowClassName:b,titleKey:C,removeLabelSpan:S=!1,a11yConfig:_,renderSeparator:I,pageSizeOptions:j})=>{const N=k.useMemo(()=>({...p}),[p]),w=k.useRef(null);k.useEffect(()=>{if(!f||!y||!g||n)return;const q=new IntersectionObserver(B=>{B[0].isIntersecting&&y()},{threshold:.1});return w.current&&q.observe(w.current),()=>q.disconnect()},[f,y,g,n]);const{tableState:$,handleSort:V}=uge({initialSortBy:null,onSortChange:r}),T=(m?.sortBy!==void 0?m.sortBy:$.sortBy)??void 0,z=m?.sortOrder!==void 0?m.sortOrder:$.sortOrder,A=q=>{const B=T,F=z;let P="asc";B===q&&(P=F==="asc"?"desc":"asc"),m?.sortBy!==void 0?r(q,P):V(q)};return o.jsxs("div",{className:`table-container ${x||""}`,style:M,title:Y(_,C),children:[o.jsxs("div",{className:"table-frame",style:{height:h??void 0,minHeight:u??void 0},children:[n&&o.jsx("div",{className:"table-loader-overlay",children:o.jsx("div",{className:"spinner",style:{width:d,height:d,borderTopColor:"var(--table-primary)"}})}),o.jsxs("div",{className:`table-wrapper ${l?"sticky-header":""}`,children:[o.jsxs("table",{className:"data-table",children:[o.jsx(fge,{columns:t,sortBy:T,sortOrder:z,onSort:A,removeLabelSpan:S}),o.jsx(gge,{data:e,columns:t.map(q=>({...q,render:q.render?B=>q.render(B,{}):void 0})),rowKey:s,onRowClick:L,isLoading:n,text:N,rowStyle:typeof v=="function"?v:v?()=>v:void 0,rowClassName:b,renderSeparator:I})]}),f&&o.jsx("div",{ref:w,style:{height:20,margin:10}})]})]}),o.jsx(vge,{state:c,onPaginationChange:i,text:N,onLoadMore:y,infiniteScroll:f,hasMore:g,isLoading:n,pageSizeOptions:j})]})};function PA(e,t,n,c,i,r,s){e.forEach(d=>{const l=d[n],h=d[t]??[],u=h.length>0,p=c.has(l);r.set(l,{level:i,hasChildren:u,isExpanded:p}),s.push(d),u&&p&&PA(h,t,n,c,i+1,r,s)})}const xge=({data:e,columns:t,rowKey:n,childrenKey:c="children",treeColumnKey:i,defaultExpandedKeys:r,expandedKeys:s,onExpandedKeysChange:d,indent:l=20,showFooter:h=!0,pagination:u,onPaginationChange:p,colors:y,rowClassName:f,...g})=>{const[m,x]=k.useState(()=>new Set(r)),M=s!==void 0,v=k.useMemo(()=>M?new Set(s):m,[M,s,m]),L=N=>{const w=new Set(v);w.has(N)?w.delete(N):w.add(N),M?d?.(Array.from(w)):x(w)},b=k.useMemo(()=>{if(!u||u.pageSize===-1)return e;const N=(u.page-1)*u.pageSize;return e.slice(N,N+u.pageSize)},[e,u]),{rows:C,meta:S}=k.useMemo(()=>{const N=new Map,w=[];return PA(b,c,n,v,0,N,w),{rows:w,meta:N}},[b,c,n,v]),_=k.useMemo(()=>t.reduce((N,w)=>{const $=w.width?parseInt(w.width,10):NaN;return N+(Number.isFinite($)?$:140)},0),[t]),I=k.useMemo(()=>t.map(N=>N.key!==i?N:{...N,render:w=>{const $=w[n],{level:V,hasChildren:T,isExpanded:z}=S.get($)??{level:0,hasChildren:!1,isExpanded:!1},A=N.render?N.render(w):w[N.key];return o.jsxs("span",{className:"htl-cell",style:{paddingLeft:V*l},children:[T?o.jsx("button",{type:"button",className:"htl-toggle",onClick:q=>{q.stopPropagation(),L($)},children:o.jsx(jA,{width:16,height:16,style:{fill:"currentColor",transform:z?"rotate(0deg)":"rotate(-90deg)",transition:"transform 0.15s ease"}})}):o.jsx("span",{className:"htl-toggle-spacer"}),A]})}}),[t,i,S,l,n]),j=(N,w)=>{const $=N[n],{level:V,hasChildren:T,isExpanded:z}=S.get($)??{level:0,hasChildren:!1,isExpanded:!1},A=["htl-row"];return V===0?(A.push("htl-root"),T&&z&&A.push("htl-root-expanded")):T&&A.push("htl-group"),f&&A.push(f(N,w,V)),A.join(" ")};return o.jsx("div",{className:`htl-wrapper ${h?"":"htl-no-footer"}`,style:{"--htl-active-bg":y?.activeRowBackground,"--htl-nested-bg":y?.groupRowBackground,"--htl-toggle-color":y?.toggleIconColor,"--htl-root-color":y?.rootTextColor,"--htl-table-min-width":`${_}px`},children:o.jsx(lC,{...g,data:C,columns:I,rowKey:n,rowClassName:j,pagination:u??{page:1,pageSize:C.length||1,total:C.length},onPaginationChange:p??(()=>{})})})},Mge="_datePickerContainer_1gx2l_3",_ge="_label_1gx2l_16",Lge="_displayNode_1gx2l_23",Ige="_datePickerButton_1gx2l_30",bge="_datePickerButtonDisabled_1gx2l_50",wge="_datePickerButtonOpen_1gx2l_59",Cge="_datePickerLabel_1gx2l_68",Nge="_placeholder_1gx2l_79",Sge="_trailingIcons_1gx2l_83",jge="_chevron_1gx2l_89",$ge="_clearButton_1gx2l_97",qge="_errorMessage_1gx2l_114",Age="_dropdown_1gx2l_119",zge="_calendarHeader_1gx2l_143",Pge="_navButton_1gx2l_152",Vge="_headerSelectors_1gx2l_171",Tge="_monthSelector_1gx2l_179",Hge="_yearSelector_1gx2l_180",Dge="_selectorButton_1gx2l_184",Bge="_selectorChevron_1gx2l_201",Rge="_selectorChevronOpen_1gx2l_206",Fge="_monthDropdown_1gx2l_210",Ege="_yearDropdown_1gx2l_211",Oge="_monthItem_1gx2l_231",Uge="_yearItem_1gx2l_232",Wge="_monthItemSelected_1gx2l_254",Gge="_yearItemSelected_1gx2l_255",Kge="_weekdays_1gx2l_259",Zge="_weekday_1gx2l_259",Xge="_calendarGrid_1gx2l_275",Yge="_dateCell_1gx2l_284",Jge="_dateCellSelected_1gx2l_307",Qge="_dateCellOtherMonth_1gx2l_311",e7e="_dateCellOtherMonthSelected_1gx2l_315",t7e="_calendarFooter_1gx2l_319",a7e="_cancelButton_1gx2l_327",n7e="_applyButton_1gx2l_328",o7e="_timePickerContainer_1gx2l_372",c7e="_timeGroup_1gx2l_381",i7e="_timeLabel_1gx2l_388",r7e="_timeInputWrapper_1gx2l_394",s7e="_timeInput_1gx2l_394",d7e="_timeSeparator_1gx2l_422",Z={datePickerContainer:Mge,label:_ge,displayNode:Lge,datePickerButton:Ige,datePickerButtonDisabled:bge,datePickerButtonOpen:wge,datePickerLabel:Cge,placeholder:Nge,trailingIcons:Sge,chevron:jge,clearButton:$ge,errorMessage:qge,dropdown:Age,calendarHeader:zge,navButton:Pge,headerSelectors:Vge,monthSelector:Tge,yearSelector:Hge,selectorButton:Dge,selectorChevron:Bge,selectorChevronOpen:Rge,monthDropdown:Fge,yearDropdown:Ege,monthItem:Oge,yearItem:Uge,monthItemSelected:Wge,yearItemSelected:Gge,weekdays:Kge,weekday:Zge,calendarGrid:Xge,dateCell:Yge,dateCellSelected:Jge,dateCellOtherMonth:Qge,dateCellOtherMonthSelected:e7e,calendarFooter:t7e,cancelButton:a7e,applyButton:n7e,timePickerContainer:o7e,timeGroup:c7e,timeLabel:i7e,timeInputWrapper:r7e,timeInput:s7e,timeSeparator:d7e},l7e=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m336-280 144-144 144 144 56-56-144-144 144-144-56-56-144 144-144-144-56 56 144 144-144 144zM480-80q-83 0-156-31.5T197-197t-85.5-127T80-480t31.5-156T197-763t127-85.5T480-880t156 31.5T763-763t85.5 127T880-480t-31.5 156T763-197t-127 85.5T480-80m0-80q134 0 227-93t93-227-93-227-227-93-227 93-93 227 93 227 227 93m0-320"})),h7e=k.memo(l7e),Hj=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],u7e=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],_w=({value:e,onChange:t,label:n,placeholder:c="Sélectionner une date...",className:i="",fullWidth:r=!0,disabled:s=!1,error:d,buttonHeight:l="2.75rem",buttonPadding:h="0.75rem 1rem 0.75rem 1rem",dropdownMaxHeight:u="auto",fontSize:p="0.875rem",iconSize:y="1.5rem",labelMarginBottom:f="0.5rem",errorMarginTop:g="0.25rem",dropdownMarginTop:m="0.25rem",itemPadding:x="0.5rem 0.75rem",fontWeight:M="400",buttonBgColor:v,buttonBorderColor:L,buttonTextColor:b,dropdownBgColor:C="#ffffff",itemHoverColor:S,selectedItemBgColor:_,iconColor:I,errorColor:j,labelColor:N,placeholderColor:w,borderRadius:$="var(--radius-content)",borderWidth:V="0.0625rem",boxShadow:T="0 0.25rem 0.75rem rgba(0, 0, 0, 0.1)",transitionDuration:z="0.2s",transitionTiming:A="ease",dateCellSize:q="2.5rem",headerTextColor:B="#6c757d",weekdayTextColor:F="#6c757d",currentMonthDateColor:P="#212529",otherMonthDateColor:O="#adb5bd",selectedDateBgColor:J="#00A6D9",selectedDateTextColor:E="#ffffff",cancelButtonBgColor:K="#e9ecef",cancelButtonTextColor:ue="#212529",applyButtonBgColor:ce="#00A6D9",applyButtonTextColor:xe="#ffffff",actionButtonPadding:ie,actionButtonFontSize:ae,width:ne,displayNode:de=void 0,displayMode:pe="auto",displayNodeAriaLabel:me,dropdownPosition:U="auto",dropdownAlignment:X="right",dropdownWidth:re,withBorder:je=!1,icon:Be,precision:ge="day",horizontalTimePicker:Se=!1,hoursLabel:Dc="Heures",minutesLabel:h1="Minutes",lowerLimit:oe=null,upperLimit:be=null,strictTimeLimits:DL=!1,outOfLimitsMessage:Le="La date/heure choisie est hors des limites autorisées",months:wt,weekdays:RA,cancelText:FA="Annuler",applyText:EA="Appliquer",prevMonthAriaLabel:OA="Mois précédent",nextMonthAriaLabel:UA="Mois suivant",calendarAriaLabel:WA="Sélecteur de date",openedAriaLabel:GA="Ouvrir le sélecteur de date",selectedDateAriaLabel:KA="Date sélectionnée: ",rotateIcon:ZA=!0,clearable:XA=!1,clearAriaLabel:YA="Effacer la date"})=>{const Ct=H=>{if(H instanceof Date)return isNaN(H.getTime())?null:H;if(typeof H=="string"&&H){const G=new Date(H);return isNaN(G.getTime())?null:G}return null},[Ge,Rt]=k.useState(!1),[u1,JA]=k.useState({top:0,left:0,width:0}),[hC,QA]=k.useState("bottom"),[uC,ez]=k.useState(null),[he,p1]=k.useState(Ct(e)||new Date),[y1,BL]=k.useState(Ct(e)),[Q1,RL]=k.useState(Ct(e)?.getHours()??0),[ei,FL]=k.useState(Ct(e)?.getMinutes()??0),[EL,Bc]=k.useState(!1),[OL,Rc]=k.useState(!1),UL=k.useRef(null),Fc=k.useRef(null),pC=k.useRef(null),WL=k.useRef(null),GL=k.useRef(null),yC=k.useRef(Ct(e)?.getTime());k.useEffect(()=>{const H=Ct(e),G=H?.getTime();G!==yC.current&&(yC.current=G,BL(H),H&&(p1(H),RL(H.getHours()),FL(H.getMinutes())))},[e]);const kC=k.useCallback(()=>{if(Fc.current){const H=Fc.current.getBoundingClientRect();JA({top:H.top,left:H.left,width:H.width})}},[]),mC=8,ti=k.useCallback(()=>{if(!Fc.current)return;const H=Fc.current.getBoundingClientRect(),G=(parseFloat(m.replace("rem",""))||0)*16,Me=H.top-G-mC,Te=window.innerHeight-H.bottom-G-mC;let ze;if(U!=="auto")ze=U;else{const Re=pC.current?.scrollHeight??0;ze=Re<=Te?"bottom":Re<=Me||Me>Te?"top":"bottom"}QA(Re=>Re===ze?Re:ze),ez(Math.max(ze==="bottom"?Te:Me,0))},[U,m]),Ec=k.useCallback(()=>{kC(),ti()},[kC,ti]);k.useEffect(()=>(Ge&&(Ec(),window.addEventListener("scroll",Ec,!0),window.addEventListener("resize",Ec)),()=>{window.removeEventListener("scroll",Ec,!0),window.removeEventListener("resize",Ec)}),[Ge,Ec]),k.useLayoutEffect(()=>{Ge&&ti()},[Ge,ti]),k.useEffect(()=>{const H=G=>{if(UL.current&&!UL.current.contains(G.target)){const Me=document.getElementById("datepicker-dropdown");if(Me&&Me.contains(G.target))return;Rt(!1),Bc(!1),Rc(!1)}WL.current&&!WL.current.contains(G.target)&&Bc(!1),GL.current&&!GL.current.contains(G.target)&&Rc(!1)};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[]);const fC=H=>new Date(H.getFullYear(),H.getMonth()+1,0).getDate(),tz=H=>{const G=new Date(H.getFullYear(),H.getMonth(),1).getDay();return G===0?6:G-1},az=()=>{const H=[],G=tz(he),Me=fC(he),Te=new Date(he.getFullYear(),he.getMonth()-1,1),ze=fC(Te);for(let Ce=G-1;Ce>=0;Ce--)H.push(new Date(he.getFullYear(),he.getMonth()-1,ze-Ce));for(let Ce=1;Ce<=Me;Ce++)H.push(new Date(he.getFullYear(),he.getMonth(),Ce));const Re=42-H.length;for(let Ce=1;Ce<=Re;Ce++)H.push(new Date(he.getFullYear(),he.getMonth()+1,Ce));return H},nz=(H,G)=>!H||!G?!1:H.getDate()===G.getDate()&&H.getMonth()===G.getMonth()&&H.getFullYear()===G.getFullYear(),oz=H=>H.getMonth()===he.getMonth()&&H.getFullYear()===he.getFullYear(),ai=DL?H=>Math.floor(H.getTime()/6e4)*6e4:H=>new Date(H.getFullYear(),H.getMonth(),H.getDate()).getTime(),gC=H=>!(oe&&ai(H)<ai(oe)||be&&ai(H)>ai(be)),vC=y1?(()=>{const H=new Date(y1);return H.setHours(Q1),H.setMinutes(ei),H})():null,Oc=vC?!gC(vC):!1,ni=new Date(he.getFullYear(),he.getMonth()-1,1),oi=new Date(he.getFullYear(),he.getMonth()+1,1),KL=!!(oe&&(ni.getFullYear()<oe.getFullYear()||ni.getFullYear()===oe.getFullYear()&&ni.getMonth()<oe.getMonth())),ZL=!!(be&&(oi.getFullYear()>be.getFullYear()||oi.getFullYear()===be.getFullYear()&&oi.getMonth()>be.getMonth())),cz=()=>{KL||p1(ni)},iz=()=>{ZL||p1(oi)},rz=H=>{if(!s){const G=new Date(H);G.setHours(Q1),G.setMinutes(ei),BL(G)}},sz=()=>{if(!s){if(y1){const H=new Date(y1);if(H.setHours(Q1),H.setMinutes(ei),!gC(H))return;t(H)}else t(null);Rt(!1)}},dz=()=>{const H=Ct(e);BL(H),H&&(RL(H.getHours()),FL(H.getMinutes())),Rt(!1)},lz=H=>{p1(new Date(he.getFullYear(),H,1)),Bc(!1)},hz=H=>{p1(new Date(H,he.getMonth(),1)),Rc(!1)},uz=()=>{const H=he.getFullYear(),G=oe?oe.getFullYear():H-10,Me=be?be.getFullYear():H+10,Te=[];for(let ze=G;ze<=Me;ze++)Te.push(ze);return Te},pz=H=>{const G=he.getFullYear();return!!(oe&&(G<oe.getFullYear()||G===oe.getFullYear()&&H<oe.getMonth())||be&&(G>be.getFullYear()||G===be.getFullYear()&&H>be.getMonth()))},yz=H=>{if(!s)switch(H.key){case"Enter":case" ":H.preventDefault(),Rt(!Ge);break;case"Escape":Rt(!1),Bc(!1),Rc(!1);break;case"Tab":Ge&&(Rt(!1),Bc(!1),Rc(!1));break}},kz={width:ne||(r?"100%":"auto"),fontSize:p,fontWeight:M},mz={height:l,padding:h,backgroundColor:v||"#ffffff",border:je?void 0:"none",borderColor:d?j||"#dc3545":L||"#dee2e6",color:b||"#212529",borderRadius:$,borderWidth:V,fontWeight:M,transition:`all ${z} ${A}`},fz=Se?{flexDirection:"column",borderTop:"none",borderLeft:"1px solid #eee"}:{},gz=Se?{flex:1,minWidth:0}:void 0,vz=Se?{display:"flex",flexDirection:"row",alignItems:"stretch"}:void 0,xz={backgroundColor:C||"#ffffff",maxHeight:u==="auto"?uC!=null?`${uC}px`:void 0:u,overflowY:"auto",borderRadius:$,borderWidth:V,boxShadow:T,transition:`opacity ${z} ${A}, transform ${z} ${A}`,position:"fixed",top:hC==="bottom"?u1.top+(Fc.current?.offsetHeight||0)+parseFloat(m.replace("rem",""))*16:"auto",bottom:hC==="top"?window.innerHeight-u1.top+parseFloat(m.replace("rem",""))*16:"auto",left:X==="left"?u1.left:"auto",right:X==="right"?window.innerWidth-(u1.left+u1.width):"auto",width:re||"30vw",minWidth:re?void 0:0,zIndex:10001},xC={width:y,height:y,color:I||"#6c757d","--icon-rotation":ZA&&Ge?"rotate(180deg)":"rotate(0deg)"},Mz={color:N||"#212529",marginBottom:f,fontWeight:M},_z={color:w||"#6c757d"},Lz={color:j||"#dc3545",marginTop:g},Iz=az(),nt=Ct(e),MC=H=>`${H.getDate().toString().padStart(2,"0")}/${(H.getMonth()+1).toString().padStart(2,"0")}/${H.getFullYear()}`,_C=nt?ge==="minutes"?`${MC(nt)} ${nt.getHours().toString().padStart(2,"0")}:${nt.getMinutes().toString().padStart(2,"0")}`:MC(nt):"",LC=!!de&&(pe==="icon"||pe==="auto"&&!nt),bz=XA&&!LC&&!!nt&&!s,wz={width:"0.875rem",height:"0.875rem",color:I||"#6c757d"},Cz=me||(nt?`${KA}${_C}`:GA);return o.jsxs("div",{className:`${Z.datePickerContainer} ${i}`,ref:UL,style:kz,"data-fullwidth":r,"data-disabled":s,"data-error":!!d,children:[n&&o.jsx("label",{className:Z.label,style:Mz,children:n}),o.jsxs("button",{ref:Fc,type:"button",onClick:()=>!s&&Rt(!Ge),onKeyDown:yz,className:`
8337
8337
  ${Z.datePickerButton}
8338
8338
  ${Ge?Z.datePickerButtonOpen:""}
8339
8339
  ${s?Z.datePickerButtonDisabled:""}
@@ -8344,7 +8344,7 @@
8344
8344
  `,style:je,disabled:d,"aria-expanded":ne,"aria-haspopup":"listbox","aria-labelledby":c?`${c}-label`:void 0,children:[o.jsxs("div",{className:Ne.selectButtonContent,style:be,children:[me?.icon&&o.jsx("span",{className:Ne.selectIcon,style:ge,children:me.icon}),o.jsx("span",{className:`${Ne.selectLabel} ${me?"":Ne.placeholder}`,style:me?void 0:Dc,children:me?me.label:i})]}),o.jsx(R1,{fill:"var(--color-text)",className:`${Ne.chevron} ${ne?Ne.chevronOpen:""}`,style:ge})]}),l&&o.jsx("div",{className:Ne.errorMessage,style:h1,children:l}),ne&&!d&&o.jsx("div",{className:Ne.dropdown,style:Be,role:"listbox","aria-label":c||"Options de sélection",children:o.jsx("div",{className:Ne.dropdownContent,style:DL,children:e.map(Le=>o.jsx("button",{type:"button",onClick:()=>U(Le.value),className:`
8345
8345
  ${Ne.item}
8346
8346
  ${t===Le.value?Ne.itemSelected:""}
8347
- `,style:{...oe,backgroundColor:t===Le.value?j||"#F0F4F6":"transparent"},onMouseEnter:wt=>{I&&(wt.currentTarget.style.backgroundColor=I)},onMouseLeave:wt=>{I&&(wt.currentTarget.style.backgroundColor=t===Le.value?j||"#F0F4F6":"transparent")},role:"option","aria-selected":t===Le.value,children:o.jsxs("div",{className:Ne.itemContent,style:be,children:[Le.icon&&o.jsx("span",{className:Ne.itemIcon,style:ge,children:Le.icon}),o.jsx("span",{className:Ne.itemLabel,children:Le.label})]})},Le.value))})})]})},$7e="_filterBar_1hlqe_3",q7e="_label_1hlqe_11",Dj={filterBar:$7e,label:q7e},A7e=({label:e="Filtres",startDate:t,endDate:n,granularity:c,onStartDateChange:i,onEndDateChange:r,onGranularityChange:s,granularityItems:d,startDatePlaceholder:l="Date début",endDatePlaceholder:h="Date fin",granularityPlaceholder:u="Sélectionner...",className:p="",disabled:y=!1,gap:f="0.75rem",labelFontSize:g="0.875rem",labelFontWeight:m="400",labelColor:x="#212529",labelMarginRight:M="1rem",startDateWidth:v,endDateWidth:L,selectWidth:b,datePickerProps:C={},selectProps:S={},rightContent:_,extraContent:I})=>{const j={fontSize:g,fontWeight:m,color:x,marginRight:M},N={gap:f};return o.jsxs("div",{className:`${Dj.filterBar} ${p}`,style:N,children:[e&&o.jsx("span",{className:Dj.label,style:j,children:e}),o.jsx(_w,{value:t,onChange:i,placeholder:l,fullWidth:!1,disabled:y,label:void 0,width:v,...C}),o.jsx(_w,{value:n,onChange:r,placeholder:h,fullWidth:!1,disabled:y,label:void 0,width:L,...C}),o.jsx(VA,{items:d,value:c,onChange:s,placeholder:u,fullWidth:!1,disabled:y,label:void 0,width:b,...S}),I,_&&o.jsx("div",{style:{marginLeft:"auto"},children:_})]})},z7e="_container_1x6mq_16",P7e="_disabled_1x6mq_26",V7e="_predStyle_1x6mq_32",T7e="_realStyle_1x6mq_36",H7e="_predGap_1x6mq_40",D7e="_realGap_1x6mq_44",B7e="_big_1x6mq_49",R7e="_medium_1x6mq_53",F7e="_iconWrapper_1x6mq_58",E7e="_predRelative_1x6mq_68",O7e="_realRelative_1x6mq_72",U7e="_iconImg_1x6mq_76",W7e="_content_1x6mq_84",G7e="_header_1x6mq_93",K7e="_predJustify_1x6mq_99",Z7e="_realJustify_1x6mq_103",X7e="_predHeaderLineHeight_1x6mq_116",Y7e="_realHeaderLineHeight_1x6mq_120",J7e="_title_1x6mq_129",Q7e="_titleBlack_1x6mq_144",eve="_titleWhite_1x6mq_148",tve="_subtitle_1x6mq_153",ave="_valueRowHorizontal_1x6mq_163",nve="_valueRowVertical_1x6mq_171",ove="_singleValue_1x6mq_180",cve="_primaryRow_1x6mq_184",ive="_maxBadge_1x6mq_191",rve="_valuePrimary_1x6mq_203",sve="_valuePrimaryBlack_1x6mq_210",dve="_valuePrimaryWhite_1x6mq_214",lve="_valueSlash_1x6mq_219",hve="_valueSecondary_1x6mq_226",uve="_valueSecondaryBlue_1x6mq_232",pve="_valueSecondaryWhite_1x6mq_236",yve="_valueSecondaryBlack_1x6mq_240",kve="_valueStacked_1x6mq_245",mve="_stackedTop_1x6mq_254",fve="_stackedBottom_1x6mq_255",ye={container:z7e,disabled:P7e,predStyle:V7e,realStyle:T7e,predGap:H7e,realGap:D7e,big:B7e,medium:R7e,iconWrapper:F7e,predRelative:E7e,realRelative:O7e,iconImg:U7e,content:W7e,header:G7e,predJustify:K7e,realJustify:Z7e,predHeaderLineHeight:X7e,realHeaderLineHeight:Y7e,title:J7e,titleBlack:Q7e,titleWhite:eve,subtitle:tve,valueRowHorizontal:ave,valueRowVertical:nve,singleValue:ove,primaryRow:cve,maxBadge:ive,valuePrimary:rve,valuePrimaryBlack:sve,valuePrimaryWhite:dve,valueSlash:lve,valueSecondary:hve,valueSecondaryBlue:uve,valueSecondaryWhite:pve,valueSecondaryBlack:yve,valueStacked:kve,stackedTop:mve,stackedBottom:fve},gve=({a11yConfig:e,iconName:t,title:n,subtitle:c,showSubtitle:i,realised:r="-",prediction:s="-",size:d="big",titleColor:l="black",valueColor:h="blue",realValueColor:u,predictionValueColor:p,className:y="",style:f="",variant:g="horizontal",showMax:m=!1,titleFontSize:x,titleFontWeight:M,subtitleFontSize:v,subtitleFontWeight:L,primaryFontSize:b,primaryFontWeight:C,secondaryFontSize:S,secondaryFontWeight:_,backgroundColor:I="#f2f9fc",gap:j="",disabled:N=!1,positionRelative:w="",justifyContent:$="",headerLineHeight:V="",headerMinHeight:T="",contentSpace:z="",titleKey:A,subtitleKey:q,subtitleA11yKey:B,maxBadgeKey:F,maxBadgeA11yKey:P,predictionKey:O,predictionA11yKey:J,realisedKey:E,realisedA11yKey:K})=>{const ue=i!==void 0?i:!!c,ce=`${ye.container} ${ye[d]} ${ye[f]} ${N?ye.disabled:""}`,xe=h==="white"?ye.valuePrimaryWhite:ye.valuePrimaryBlack,ie=h==="blue"?ye.valueSecondaryBlue:h==="white"?ye.valueSecondaryWhite:ye.valueSecondaryBlack,ae=U=>U===void 0?void 0:typeof U=="number"?`${U}px`:U,ne=U=>U===void 0?void 0:U,de=g==="vertical",pe=s!=null&&s!==""&&s!=="-"&&s!=="—",me=de?ye.valueRowVertical:ye.valueRowHorizontal;return o.jsxs("div",{className:`${ce} ${y}`,style:{backgroundColor:I},children:[t&&o.jsx("div",{className:`${ye.iconWrapper} ${ye[w]}`,children:t}),o.jsxs("div",{className:`${ye.content} ${ye[j]} ${pe?"":ye.singleValue} content-indicator-v2`,style:{justifyContent:z},children:[o.jsx("div",{className:`${ye.header} ${ye[$]} ${ye[V]} header-indicator-v2`,style:{minHeight:T},children:o.jsx("h6",{className:`${ye.title}`,style:{fontSize:ae(x),fontWeight:ne(M),color:l},title:Y(e,A),children:n})}),ue&&c?o.jsx("div",{className:"subtitle-container",children:o.jsx("span",{className:ye.subtitle,style:{fontSize:ae(v),fontWeight:ne(L)},title:Y(e,q,B),children:c})}):null,o.jsxs("div",{className:`${me} count-indicator-v2`,children:[o.jsxs("div",{className:ye.primaryRow,children:[m&&o.jsx("span",{className:`${ye.maxBadge} max-badge-indicator-v2`,title:Y(e,F,P),children:"MAX"}),o.jsx("span",{className:`${ye.valuePrimary} ${xe}`,style:{fontSize:ae(b||(!pe&&de?"1.75rem":void 0)),fontWeight:ne(C),color:u||void 0},title:Y(e,E,K),children:r})]}),pe&&o.jsxs(o.Fragment,{children:[!de&&o.jsx("span",{className:ye.valueSlash,style:{fontSize:ae(S),fontWeight:ne(_)},children:"/"}),o.jsx("span",{className:`${ye.valueSecondary} ${ie}`,style:{fontSize:ae(S),fontWeight:ne(_),color:p||void 0},title:Y(e,O,J),children:s})]})]})]})]})},vve="_banner_f10in_2",xve="_iep_f10in_14",Mve="_groupSmall_f10in_24",_ve="_genre_f10in_34",Lve="_gravite_f10in_42",Ive="_orientationContainer_f10in_48",bve="_service_f10in_61",wve="_roomBedContainer_f10in_71",Cve="_room_f10in_71",Nve="_bed_f10in_87",Sve="_bedUf_f10in_92",jve="_statusContainer_f10in_97",$ve="_status_f10in_97",qve="_centeredWarn_f10in_124",Ee={banner:vve,iep:xve,groupSmall:Mve,genre:_ve,gravite:Lve,orientationContainer:Ive,service:bve,roomBedContainer:wve,room:Cve,bed:Nve,bedUf:Sve,statusContainer:jve,status:$ve,centeredWarn:qve},Ave=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("mask",{id:"a",width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},te.createElement("path",{fill:"#D9D9D9",d:"M0 0h16v16H0z"})),te.createElement("g",{mask:"url(#a)"},te.createElement("path",{fill:"#C60000",d:"M.666 14 7.999 1.333 15.333 14zm2.3-1.333h10.067L7.999 4zm5.508-.859a.65.65 0 0 0 .192-.475.65.65 0 0 0-.192-.475.65.65 0 0 0-.475-.191.65.65 0 0 0-.475.191.65.65 0 0 0-.191.475q0 .285.191.475A.65.65 0 0 0 8 12a.65.65 0 0 0 .475-.192M7.333 10h1.333V6.667H7.333z"}))),Bj=k.memo(Ave),zve=({patient:e,genre:t,gravite:n,bed:c,bed_uf:i,room:r,orientation:s,status:d,backgroundColor:l="#ffffff",primaryFontColor:h="#111827",secondaryFontColor:u="#6b7280",statusFontColor:p="#0284c7",statusBackgroundColor:y="#e0f2fe",genreBackgroundColor:f="#9ca3af",genreFontSize:g,style:m,warn:x=!1,warnMessage:M,warnColor:v="#F94134"})=>o.jsxs("div",{className:Ee.banner,style:{backgroundColor:l,...m},children:[o.jsxs("div",{className:Ee.iep,children:[o.jsx("div",{style:{color:u},children:e.iep??"--"}),o.jsxs("div",{style:{color:h},children:[((e.nom||"").trim().split(/\s+/)[0]||"").substring(0,3).toUpperCase(),"."," ",((e.prenom||"").trim().split(/\s+/)[0]||"").substring(0,3).toLowerCase().replace(/^./,L=>L.toUpperCase()),".(",e.age,")"]})]}),o.jsxs("div",{className:Ee.groupSmall,children:[o.jsx("span",{className:`${Ee.genre} genre-info-banner`,style:{color:"#ffffff",background:f,fontSize:g},children:t??"--"}),o.jsx("span",{className:`${Ee.gravite} gravite-info-banner`,children:n??"--"})]}),o.jsx("div",{className:Ee.orientationContainer,children:o.jsx("div",{className:Ee.service,style:{color:h},children:s??"--"})}),o.jsxs("div",{className:Ee.roomBedContainer,children:[i&&o.jsx("span",{className:Ee.bedUf,children:i}),o.jsx("span",{className:Ee.room,children:r??"--"}),o.jsx("span",{className:Ee.bed,children:c??"--"})]}),o.jsxs("div",{className:Ee.statusContainer,children:[d?o.jsx("div",{className:`${Ee.status} status-info-banner`,style:{color:p,backgroundColor:y},children:d}):x&&o.jsxs("div",{className:Ee.centeredWarn,style:{textTransform:"uppercase"},children:[o.jsx(Bj,{color:v,width:20,height:20,style:{marginRight:"6px"}}),o.jsx("span",{style:{color:v,fontSize:"12px",fontWeight:600},children:M})]}),d&&x&&o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",color:v,fontSize:"10px",fontWeight:400,marginTop:"4px",textTransform:"uppercase"},children:[o.jsx(Bj,{color:v,width:12,height:12,style:{marginRight:"4px"}}),o.jsx("span",{children:M})]})]})]}),Pve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M200-200v-240h60v180h180v60zm500-320v-180H520v-60h240v240z"})),Vve=k.memo(Pve),Tve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m249-207-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231z"})),TA=k.memo(Tve),Hve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-440v240h-60v-180H200v-60zm140-320v180h180v60H520v-240z"})),Dve=k.memo(Hve),Bve="_overlay_1sx2l_1",Rve="_container_1sx2l_11",Fve="_fullscreen_1sx2l_24",Eve="_header_1sx2l_30",Ove="_headerActions_1sx2l_42",Uve="_iconButton_1sx2l_47",Wve="_body_1sx2l_58",Gve="_sidebar_1sx2l_65",Kve="_content_1sx2l_91",Zve="_contentHeader_1sx2l_98",Xve="_childrenWrapper_1sx2l_114",Yve="_footer_1sx2l_138",Jve="_baseButton_1sx2l_147",Qve="_noOverlay_1sx2l_161",e9e="_contained_1sx2l_169",$e={overlay:Bve,container:Rve,fullscreen:Fve,header:Eve,headerActions:Ove,iconButton:Uve,body:Wve,sidebar:Gve,content:Kve,contentHeader:Zve,childrenWrapper:Xve,footer:Yve,baseButton:Jve,noOverlay:Qve,contained:e9e},t9e=({headerText:e,headerTextColor:t="var(--color-text)",backgroundColor:n="var(--color-background)",headerFontSize:c="1rem",headerFontWeight:i="600",isOpen:r,onClose:s,leftButton:d,rightButton:l,children:h,contentTitle:u,contentBackgroundColor:p="var(--color-content-background)",sideContent:y,hideMaximize:f=!1,hideHeader:g=!1,hideSidebar:m=!1,onDelete:x,deleteLabel:M="Supprimer",width:v="75%",maxWidth:L="none",height:b="85%",maxHeight:C="85%",borderRadius:S="0.5rem",childrenPadding:_="1rem",overflow:I="auto",contentHeaderAction:j,contentFooterAction:N,footerOverride:w,hideFooter:$=!1,hideOverlay:V=!1,position:T,a11yConfig:z})=>{const[A,q]=k.useState(!1),B=k.useRef(null);if(k.useEffect(()=>{if(!r||!V)return;const P=O=>{(O.type==="scroll"||O.type==="wheel"||O.type==="touchmove"||B.current&&!B.current.contains(O.target))&&s()};return document.addEventListener("mousedown",P),document.addEventListener("scroll",P,!0),document.addEventListener("wheel",P,{passive:!0,capture:!0}),document.addEventListener("touchmove",P,{passive:!0,capture:!0}),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("scroll",P,!0),document.removeEventListener("wheel",P,!0),document.removeEventListener("touchmove",P,!0)}},[r,V,s]),!r)return null;const F=(P,O=!1)=>o.jsx(pL,{onClick:P.disabled?void 0:P.onClick,className:$e.baseButton,disabled:P.disabled,style:{background:P.backgroundColor??(O?"#008FBB":"#ffffff"),color:P.textColor??(O?"#ffffff":"#374151"),border:P.borderColor?`1px solid ${P.borderColor}`:O?"none":void 0,cursor:P.disabled?P.cursor??"not-allowed":P.cursor??"pointer",filter:P.disabled?P.filter??"grayscale(0.5)":P.filter??"none",opacity:P.disabled?.65:1},title:Y(P.a11yConfig,P.text),children:P.text});return o.jsx("div",{className:V?$e.noOverlay:$e.overlay,onClick:s,children:o.jsxs("div",{ref:B,className:`${$e.container} ${A?$e.fullscreen:""} ${V?$e.contained:""}`,onClick:P=>P.stopPropagation(),style:{width:A?"100%":v,maxWidth:A?"none":L,height:A?"100%":b,maxHeight:A?"100%":C,borderRadius:A?"0":S,overflow:I,...T||{}},children:[!g&&o.jsxs("header",{className:$e.header,style:{backgroundColor:n},children:[o.jsx("h2",{style:{fontSize:c,fontWeight:i,color:t},title:Y(z,e),children:e}),o.jsxs("div",{className:$e.headerActions,children:[!f&&o.jsx("button",{onClick:()=>q(!A),className:$e.iconButton,title:A?"Réduire":"Agrandir",children:A?o.jsx(Dve,{width:22,height:22,fill:t}):o.jsx(Vve,{width:22,height:22,fill:t})}),o.jsx("button",{onClick:s,className:$e.iconButton,title:"Fermer",children:o.jsx(TA,{width:22,height:22,fill:t})})]})]}),o.jsxs("div",{className:$e.body,style:{overflow:I},children:[y&&!m&&o.jsx("aside",{className:$e.sidebar,children:y}),o.jsxs("main",{className:$e.content,style:{backgroundColor:p,overflow:I},children:[u&&o.jsxs("header",{className:$e.contentHeader,style:{backgroundColor:n},children:[o.jsx("span",{style:{color:t},children:u}),j]}),o.jsx("div",{className:$e.childrenWrapper,style:{padding:_,overflow:I},children:h})]})]}),!$&&o.jsx("footer",{className:$e.footer,style:{backgroundColor:n},children:w!==void 0?w:o.jsxs(o.Fragment,{children:[x&&o.jsx(pL,{onClick:x,className:$e.baseButton,style:{background:"#fee2e2",color:"#ef4444",marginRight:"auto",border:"none"},children:M}),N,F(d),F(l,!0)]})})]})})},a9e="_container_1vb1c_1",n9e="_searchWrapper_1vb1c_10",o9e="_navItems_1vb1c_17",Gb={container:a9e,searchWrapper:n9e,navItems:o9e},c9e=({items:e,activeId:t,activeColor:n="#00aec7",backgroundColor:c="#fff",textColor:i="#000",onItemClick:r,searchValue:s="",onSearchChange:d,searchPlaceholder:l="Rechercher",width:h="100%",className:u=""})=>o.jsxs("div",{className:`${Gb.container} ${u}`,style:{width:h,backgroundColor:c,color:i},children:[o.jsx("div",{className:Gb.searchWrapper,children:o.jsx(SA,{value:s,onChange:d,placeholder:l,iconPosition:"right",iconColor:"var(--color-text)"})}),o.jsx("div",{className:Gb.navItems,children:e.map(p=>o.jsx(dC,{id:p.id,label:p.label,icon:p.icon,isActive:t===p.id,onClick:()=>r?.(p.id),activeColor:n,color:i,fontWeight:"600",fontSize:"0.75rem",padding:"0.75rem 1rem",iconGap:"0.5rem"},p.id))})]}),i9e=({modules:e,selectedModuleId:t,onSelectModule:n,onAddModule:c,onItemAdd:i,onEditModule:r,onDeleteModule:s,onReorder:d,title:l="Modules",titleKey:h,addModuleTitle:u="Ajouter un module",addModuleLabel:p="Titre",addModulePlaceholder:y="Nom du module",renameModuleTitle:f="Renommer le module",renameModuleLabel:g="Titre",renameModulePlaceholder:m="Nom du module",confirmText:x="Valider",cancelText:M="Annuler",headerLabel:v,headerLabelKey:L,showAddIcon:b=!0,showCount:C=!0,showToggle:S=!1,showActions:_=!0,onToggle:I,a11yConfig:j})=>{const[N,w]=k.useState(!1),[$,V]=k.useState(null),[T,z]=k.useState(null),[A,q]=k.useState(null),[B,F]=k.useState(null),P=()=>{F(U=>U===null?"asc":U==="asc"?"desc":null),I&&I()},O=k.useMemo(()=>B?[...e].sort((U,X)=>{const re=U.title.toLowerCase(),je=X.title.toLowerCase();return B==="asc"?re.localeCompare(je):je.localeCompare(re)}):e,[e,B]),J=()=>w(!0),E=()=>w(!1),K=U=>{const X=U.title?.trim();X&&c&&c(X),E()},ue=(U,X)=>{U.stopPropagation(),V(X)},ce=()=>V(null),xe=U=>{const X=U.title?.trim();$&&X&&r&&r($,X),ce()},ie=(U,X)=>{U.stopPropagation(),s&&s(X)},ae=(U,X)=>{U.stopPropagation(),i&&i(X)},ne=(U,X)=>{z(X),U.dataTransfer.effectAllowed="move"},de=(U,X)=>{T!==null&&(U.preventDefault(),U.dataTransfer.dropEffect="move",X!==A&&q(X))},pe=(U,X)=>{if(U.preventDefault(),T===null||T===X||!d)return;const re=[...O],[je]=re.splice(T,1);re.splice(X,0,je),F(null),d(re),z(null),q(null)},me=()=>{z(null),q(null)};return o.jsxs("div",{className:"module-sidebar-v2",children:[o.jsx("div",{className:"sidebar-header",children:v?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-label-container",onClick:P,children:[o.jsx("div",{className:"header-label",title:Y(j,L),children:v}),B==="asc"?o.jsx(e1,{size:12,className:"header-toggle-icon",strokeWidth:3}):o.jsx(Qc,{size:12,className:"header-toggle-icon",strokeWidth:3})]}),b&&o.jsx(qc,{size:18,className:"add-view-icon",onClick:J})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-title",title:Y(j,h),children:[S&&(B==="asc"?o.jsx(e1,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:P}):o.jsx(Qc,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:P})),l," ",C&&`(${O.length})`]}),b&&o.jsx(qc,{size:18,className:"add-view-icon",onClick:J})]})}),o.jsx("div",{className:"module-list",children:O.map((U,X)=>o.jsxs("div",{className:`module-item ${U.id===t?"selected":""} ${A===X&&T!==X?"drag-over":""} ${T===X?"dragging":""}`,onClick:()=>n&&n(U),draggable:!!d,onDragStart:d?re=>ne(re,X):void 0,onDragOver:d?re=>de(re,X):void 0,onDrop:d?re=>pe(re,X):void 0,onDragEnd:d?me:void 0,children:[U.icon||o.jsx(q1,{size:18,className:"drag-handle"}),o.jsxs("div",{className:"module-content",title:Y(U.a11yConfig,U.titleKey),children:[o.jsx("div",{className:"module-title",children:U.title}),U.subtitle&&o.jsx("div",{className:"module-subtitle",children:U.subtitle})]}),typeof U.count<"u"&&o.jsx("span",{className:"module-count",children:U.count}),_&&o.jsxs("div",{className:"module-actions",children:[i&&o.jsx(Ac,{size:14,className:"action-icon add",onClick:re=>ae(re,U)}),r&&o.jsx(vt,{size:12,className:"action-icon edit",onClick:re=>ue(re,U)}),s&&o.jsx(yt,{size:12,className:"action-icon delete",onClick:re=>ie(re,U)})]})]},U.id))}),o.jsx(Hc,{isOpen:N,onClose:E,onSave:K,title:u,fields:[{name:"title",label:p,placeholder:y}],confirmText:x,cancelText:M}),$&&o.jsx(Hc,{isOpen:!!$,onClose:ce,onSave:xe,title:f,initialValues:{title:$.title},fields:[{name:"title",label:g,placeholder:m}],confirmText:x,cancelText:M})]})},r9e=({mod:e,index:t,total:n,isSelected:c,onSelectModule:i})=>o.jsxs("div",{className:`module-item${c?" selected":""}`,onClick:()=>i?.(e),"aria-posinset":t+1,"aria-setsize":n,role:"listitem",children:[e.icon,o.jsxs("div",{className:"module-content",title:Y(e.a11yConfig,e.titleKey),children:[o.jsx("div",{className:"module-title",children:e.title}),e.subtitle&&o.jsx("div",{className:"module-subtitle",children:e.subtitle})]})]}),s9e=({modules:e,selectedModuleId:t,onSelectModule:n,title:c="Modules",titleKey:i,showCount:r=!0,showSearch:s=!0,searchValue:d,searchPlaceholder:l,onSearchTyping:h,onSearchSubmit:u,searchDebounceMs:p=300,isLoading:y=!1,loadingComponent:f,emptyComponent:g,a11yConfig:m,borderColor:x,hoverBackgroundColor:M,selectedBackgroundColor:v})=>{const[L,b]=k.useState(d??""),C=k.useRef(null);k.useEffect(()=>{d!==void 0&&b(d)},[d]),k.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const S=j=>{const N=j.target.value;b(N),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{h?.(N)},p)},_=j=>{j.key==="Enter"&&u?.(L)},I={"--smsb-border-color":x??"var(--color-border, #efefef)","--smsb-hover-background":M??"var(--color-content-background, #f8fafc)","--smsb-selected-background":v??"var(--color-neutral, #f4f4f4)"};return o.jsxs("div",{className:"searchable-module-sidebar",style:I,children:[o.jsx("div",{className:"sidebar-header",children:o.jsxs("div",{className:"header-title",title:Y(m,i),children:[c," ",r&&`(${e.length})`]})}),s&&o.jsx("div",{className:"sidebar-search",children:o.jsx("input",{type:"text",className:"search-input",value:L,placeholder:l,onChange:S,onKeyDown:_})}),o.jsx("div",{className:"module-list",children:y?f:e.length===0?g:e.map((j,N)=>o.jsx(r9e,{mod:j,index:N,total:e.length,isSelected:j.id===t,onSelectModule:n},j.id))})]})},d9e=({keyName:e,translations:t,availableLanguages:n,onChange:c,onRename:i,onDelete:r,a11yConfig:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(e),[p,y]=k.useState(null),[f,g]=k.useState(""),[m,x]=k.useState(!1),[M,v]=k.useState(""),[L,b]=k.useState(""),C=k.useMemo(()=>{const A={};return Array.isArray(t)&&t.forEach(q=>{q&&q.language&&(A[q.language.toUpperCase()]=q.value)}),A},[t]),S=k.useMemo(()=>n,[n]),_=()=>{l(!1),h!==e&&h.trim()!==""?i&&i(h.trim()):u(e)},I=A=>{A.key==="Enter"?_():A.key==="Escape"&&(u(e),l(!1))},j=A=>{const q=A.toUpperCase();y(q),g(C[q]||"")},N=()=>{p&&(c(p,f),y(null),g(""))},w=A=>{A.key==="Enter"?N():A.key==="Escape"&&(y(null),g(""))},$=()=>{x(!0),S.length>0&&v(S[0].toUpperCase()),b("")},V=()=>{M&&L.trim()&&(c(M,L.trim()),x(!1),v(""),b(""))},T=()=>{x(!1),v(""),b("")},z=A=>{A.key==="Enter"?V():A.key==="Escape"&&T()};return o.jsxs("div",{className:"translation-key-v2",children:[o.jsxs("div",{className:"header",children:[d?o.jsx("input",{className:"key-name-input",value:h,onChange:A=>u(A.target.value),onBlur:_,onKeyDown:I,autoFocus:!0}):o.jsx("h3",{className:"header-title",title:Y(s,e),children:e}),o.jsxs("div",{className:"header-actions",children:[o.jsx(vt,{size:16,className:"action-icon edit",onClick:()=>l(!0)}),o.jsx(yt,{size:16,className:"action-icon delete",onClick:r})]})]}),o.jsxs("div",{className:"translations-list",children:[n.map(A=>{const q=A.toUpperCase(),B=C[q]||"",F=p===q;return o.jsxs("div",{className:"lang-row",children:[o.jsx("div",{className:"lang-label",children:q}),F?o.jsx("input",{className:"translation-input editing",value:f,onChange:P=>g(P.target.value),onBlur:N,onKeyDown:w,placeholder:"Entrez la traduction...",autoFocus:!0}):o.jsx("div",{className:`translation-value ${B?"":"empty"}`,onClick:()=>j(A),title:"Cliquer pour éditer",children:B||"Cliquer pour ajouter..."})]},A)}),m?o.jsxs("div",{className:"lang-row add-row",children:[o.jsx("select",{className:"lang-select",value:M,onChange:A=>v(A.target.value),children:S.map(A=>o.jsx("option",{value:A.toUpperCase(),children:A.toUpperCase()},A))}),o.jsx("input",{className:"translation-input editing",value:L,onChange:A=>b(A.target.value),onKeyDown:z,placeholder:"Mot",autoFocus:!0}),o.jsxs("div",{className:"add-actions",children:[o.jsx(C1,{size:18,className:"action-icon confirm",onClick:V}),o.jsx(tt,{size:18,className:"action-icon cancel",onClick:T})]})]}):S.length>0&&o.jsxs("button",{className:"add-translation-btn",onClick:$,children:[o.jsx(Ac,{size:16}),o.jsx("span",{children:"Ajouter"})]})]})]})},l9e="_overlay_17ypf_1",h9e="_modal_17ypf_15",u9e="_body_17ypf_27",p9e="_footer_17ypf_46",y9e="_confirmButton_17ypf_55",k9e="_danger_17ypf_71",m9e="_cancelButton_17ypf_75",St={overlay:l9e,modal:h9e,body:u9e,footer:p9e,confirmButton:y9e,danger:k9e,cancelButton:m9e},f9e=({isOpen:e,message:t,onConfirm:n,onCancel:c,confirmText:i="Confirmer",cancelText:r="Annuler",isDanger:s=!1,hideFooter:d=!1,secondaryConfirmText:l,onSecondaryConfirm:h,footerStyle:u,cancelButtonStyle:p,confirmButtonStyle:y})=>e?o.jsx("div",{className:St.overlay,onClick:c,children:o.jsxs("div",{className:St.modal,onClick:f=>f.stopPropagation(),children:[o.jsx("div",{className:St.body,children:typeof t=="string"?o.jsx("p",{children:t}):t}),!d&&o.jsxs("div",{className:St.footer,style:u,children:[r&&o.jsx("button",{className:St.cancelButton,onClick:c,style:p,children:r}),l&&h&&o.jsx("button",{className:St.confirmButton,onClick:h,children:l}),i&&o.jsx("button",{className:`${St.confirmButton} ${s?St.danger:""}`,onClick:n,style:y,children:i})]})]})}):null,g9e="_card_1ildr_1",v9e="_topIcon_1ildr_17",x9e="_title_1ildr_24",M9e="_text_1ildr_31",_9e="_bottomIcon_1ildr_37",v1={card:g9e,topIcon:v9e,title:x9e,text:M9e,bottomIcon:_9e},L9e=({topIcon:e,title:t,text:n,bottomIcon:c,onClick:i,className:r="",headerTextColor:s="#000",textColor:d="#4b5563",backgroundColor:l="#fff",a11yConfig:h})=>o.jsxs("div",{className:`${v1.card} ${r}`,onClick:i,role:i?"button":void 0,tabIndex:i?0:void 0,style:{backgroundColor:l},title:Y(h,t),children:[e&&o.jsx("div",{className:v1.topIcon,children:e}),o.jsx("h3",{className:v1.title,style:{color:s},children:t}),o.jsx("p",{className:v1.text,style:{color:d},children:n}),c&&o.jsx("div",{className:v1.bottomIcon,children:c})]}),I9e="_container_1bmmf_1",b9e="_disabled_1bmmf_9",w9e="_selectBox_1bmmf_14",C9e="_selectBoxOpen_1bmmf_36",N9e="_tagsContainer_1bmmf_41",S9e="_tagsContainerWrap_1bmmf_51",j9e="_tag_1bmmf_41",$9e="_tagLabel_1bmmf_72",q9e="_removeBtnContainer_1bmmf_78",A9e="_removeBtn_1bmmf_78",z9e="_searchInput_1bmmf_103",P9e="_placeholder_1bmmf_123",V9e="_actions_1bmmf_130",T9e="_clearBtn_1bmmf_137",H9e="_chevron_1bmmf_159",D9e="_chevronOpen_1bmmf_165",B9e="_dropdown_1bmmf_169",R9e="_option_1bmmf_183",F9e="_optionHeader_1bmmf_196",E9e="_noOptions_1bmmf_212",O9e="_overflowBlock_1bmmf_219",U9e="_overflowEllipsis_1bmmf_226",W9e="_overflowBadge_1bmmf_233",G9e="_overflowBadgeWrap_1bmmf_256",K9e="_overflowDropdown_1bmmf_262",Z9e="_overflowDropdownItem_1bmmf_278",X9e="_overflowDropdownItemLabel_1bmmf_289",Y9e="_overflowDropdownItemRemove_1bmmf_296",se={container:I9e,disabled:b9e,selectBox:w9e,selectBoxOpen:C9e,tagsContainer:N9e,tagsContainerWrap:S9e,tag:j9e,tagLabel:$9e,removeBtnContainer:q9e,removeBtn:A9e,searchInput:z9e,placeholder:P9e,actions:V9e,clearBtn:T9e,chevron:H9e,chevronOpen:D9e,dropdown:B9e,option:R9e,optionHeader:F9e,noOptions:E9e,overflowBlock:O9e,overflowEllipsis:U9e,overflowBadge:W9e,overflowBadgeWrap:G9e,overflowDropdown:K9e,overflowDropdownItem:Z9e,overflowDropdownItemLabel:X9e,overflowDropdownItemRemove:Y9e},J9e=({options:e,noOptionsMessage:t="",value:n,onChange:c,placeholder:i="Sélectionner...",isSearchable:r=!0,className:s="",disabled:d=!1,allowWrap:l=!1})=>{const[h,u]=k.useState(!1),[p,y]=k.useState(""),f=k.useRef(null),g=k.useRef(null),m=k.useRef(null),x=k.useRef(null),[M,v]=k.useState(null),[L,b]=k.useState(!1),C=k.useRef([]),S=k.useRef(null),_=k.useMemo(()=>{const q=new Map(e.map(B=>[B.value,B]));return n.map(B=>q.get(B)).filter(B=>B!==void 0)},[e,n]),I=k.useMemo(()=>e.filter(q=>!n.includes(q.value)),[e,n]),j=k.useMemo(()=>{let q=I;return p&&(q=q.filter(B=>B.label.toLowerCase().includes(p.toLowerCase()))),q.filter((B,F)=>{if(!B.isHeader)return!0;for(let P=F+1;P<q.length&&!q[P].isHeader;P++)return!0;return!1})},[I,p]);k.useEffect(()=>{const q=B=>{const F=B.target;f.current&&!f.current.contains(F)&&(u(!1),y(""),v(null),b(!1))};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]),k.useEffect(()=>{if(l)return;if(_.length===0){v(null),C.current=[];return}_.length>C.current.length&&v(null);const q=()=>{const O=m.current,J=x.current;if(!O||!J)return;const E=J.getBoundingClientRect().width,K=J.querySelector(`.${se.actions}`),ue=K?K.getBoundingClientRect().width:80,ce=56,xe=r?80:0,ie=16,ae=Array.from(O.querySelectorAll(`.${se.tag}`));ae.length===_.length&&(C.current=ae.map(ge=>{const Se=ge.getBoundingClientRect(),Dc=ge.scrollWidth;return Math.max(Se.width,Dc,ge.offsetWidth||0)}));const ne=C.current,de=ne.length>0?ne.reduce((ge,Se)=>ge+Se,0)/ne.length:120,pe=_.length<=ne.length?ne.slice(0,_.length):[...ne,...Array(_.length-ne.length).fill(de)],me=4,U=Math.max(0,E-ue-xe-ie);let X=0,re=0;for(let ge=0;ge<_.length;ge++){const Se=pe[ge]??120;if(X+Se+me>U)break;X+=Se+me,re++}if(re>=_.length){v(null);return}const je=Math.max(0,E-ce-ue-xe-ie);X=0;let Be=0;for(let ge=0;ge<_.length;ge++){const Se=pe[ge]??120;if(X+Se+me>je)break;X+=Se+me,Be++}Be<_.length&&Be>0?v(Be):v(null)},B=requestAnimationFrame(()=>{q()}),F=setTimeout(q,100),P=new ResizeObserver(()=>{q()});return x.current&&P.observe(x.current),()=>{cancelAnimationFrame(B),clearTimeout(F),P.disconnect()}},[_,r,h,l]);const N=()=>{if(d)return;const q=!h;q&&b(!1),u(q),q&&r&&setTimeout(()=>g.current?.focus(),0)},w=q=>{if(n.includes(q.value))return;b(!1);const B=[..._,q];c(B),y(""),v(null),u(!1)},$=q=>{q.preventDefault(),q.stopPropagation(),b(B=>!B)},V=M!=null&&M<_.length?_.slice(M):[],T=(q,B)=>{B.stopPropagation();const F=_.filter(P=>P.value!==q);c(F)},z=q=>{q.stopPropagation(),c([])},A=q=>{q.stopPropagation(),h||u(!0)};return o.jsxs("div",{className:`${se.container} ${s} ${d?se.disabled:""}`,ref:f,children:[o.jsxs("div",{ref:x,className:`${se.selectBox} ${h?se.selectBoxOpen:""}`,onClick:N,role:"combobox","aria-expanded":h,"aria-haspopup":"listbox",children:[o.jsxs("div",{className:`${se.tagsContainer} ${l?se.tagsContainerWrap:""}`,ref:m,children:[M!==null&&M>0?_.slice(0,M).map((q,B)=>o.jsxs("div",{className:se.tag,children:[o.jsx("div",{className:se.tagLabel,children:o.jsx("span",{children:q.label})}),o.jsx("div",{className:se.removeBtnContainer,children:o.jsx("button",{type:"button",className:se.removeBtn,onClick:F=>T(q.value,F),"aria-label":`Supprimer ${q.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${q.value}-${B}`)):_.map((q,B)=>o.jsxs("div",{className:se.tag,children:[o.jsx("div",{className:se.tagLabel,children:o.jsx("span",{children:q.label})}),o.jsx("div",{className:se.removeBtnContainer,children:o.jsx("button",{type:"button",className:se.removeBtn,onClick:F=>T(q.value,F),"aria-label":`Supprimer ${q.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${q.value}-${B}`)),r?o.jsx("input",{ref:g,type:"text",className:se.searchInput,placeholder:_.length===0?i:"",value:p,onChange:q=>{y(q.target.value),h||u(!0)},onClick:A,disabled:d}):_.length===0&&o.jsx("span",{className:se.placeholder,children:i})]}),!l&&M!==null&&M<_.length&&o.jsxs("div",{className:se.overflowBlock,children:[o.jsx("span",{className:se.overflowEllipsis,children:"..."}),o.jsxs("div",{className:se.overflowBadgeWrap,children:[o.jsx("button",{ref:S,type:"button",className:se.overflowBadge,onClick:$,"aria-label":`Afficher ${V.length} éléments cachés`,children:V.length}),L&&V.length>0&&o.jsx("div",{className:se.overflowDropdown,role:"list","aria-label":"Éléments cachés",children:V.map((q,B)=>o.jsxs("div",{className:se.overflowDropdownItem,children:[o.jsx("span",{className:se.overflowDropdownItemLabel,children:q.label}),o.jsx("button",{type:"button",className:se.overflowDropdownItemRemove,onClick:F=>{F.stopPropagation(),T(q.value,F)},"aria-label":`Supprimer ${q.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]},`hidden-${q.value}-${B}`))})]})]}),o.jsxs("div",{className:se.actions,children:[_.length>0&&o.jsx("button",{type:"button",className:se.clearBtn,onClick:z,"aria-label":"Effacer tout",children:o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:o.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),o.jsx("svg",{className:`${se.chevron} ${h?se.chevronOpen:""}`,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M6 9l6 6 6-6"})})]})]}),h&&!d&&o.jsx("div",{className:se.dropdown,role:"listbox",children:j.length>0?j.map((q,B)=>o.jsx("div",{className:`${se.option} ${q.isHeader?se.optionHeader:""}`,onClick:()=>!q.isHeader&&w(q),role:"option","aria-selected":!1,children:q.label},`opt-${q.value}-${B}`)):o.jsx("div",{className:se.noOptions,children:t})})]})},Q9e="_container_h7jek_1",Rj={container:Q9e},exe=({a11yConfigs:e=[],titleKeys:t=[],labels:n=[],data:c=[],selectedUfs:i=[],icons:r=[],lastCardTextColor:s="black",boardColors:d={},order:l})=>{const h=k.useMemo(()=>{const g=i.length===0?c:c.filter(x=>x&&i.includes(String(x.uf).replace(/^0+/,""))),m=new Set;return g.filter(x=>{if(!x||!x.uf)return!1;const M=String(x.uf).replace(/^0+/,"");return m.has(M)?!1:(m.add(M),!0)})},[c,i]),u=k.useMemo(()=>h.reduce((g,m)=>({disponibles:g.disponibles+(m.totalAvailable??m.disponibles??0),homme:g.homme+(m.availableMen??m.disponibleHomme??0),femme:g.femme+(m.availableWomen??m.disponibleFemme??0),indifferencie:g.indifferencie+(m.availableIndifferentSex??m.indifferences??0),sorties:g.sorties+(m.outToday??m.sortie24??0),occupiedBed:g.occupiedBed+(m.occupiedBed??0),patientsPresents:g.patientsPresents+(m.patientsPresents??0),occupationRate:g.occupationRate+(m.occupationRate??0),occupesRaw:g.occupesRaw+(m.occupesRaw??0),ouvertsRaw:g.ouvertsRaw+(m.ouvertsRaw??0)}),{disponibles:0,homme:0,femme:0,indifferencie:0,sorties:0,occupiedBed:0,patientsPresents:0,occupationRate:0,occupesRaw:0,ouvertsRaw:0}),[h]),p=g=>d.disponibles?d.disponibles:g>3?"#35994E":g>=1?"#EF6C00":"#C62828",y={bars:"none",justifyContent:"flexStart",alignItems:"center",valueFontWeight:"400",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}},f=(g,m)=>{const x=l!==void 0&&m===l.length-1;switch(g){case"disponibles":return{...y,value:u.disponibles.toLocaleString("fr-FR"),backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",titleColor:"white",valueColor:"white"};case"occupiedBed":return{...y,value:u.occupiedBed.toLocaleString("fr-FR"),backgroundColor:d.occupes??d.homme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"patientsPresents":return{...y,value:u.patientsPresents.toLocaleString("fr-FR"),backgroundColor:d.patientsPresents??d.femme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"occupationRate":{const M=u.ouvertsRaw>0?parseFloat((u.occupesRaw/u.ouvertsRaw*100).toFixed(2)):u.occupationRate;return{...y,value:`${M.toLocaleString("fr-FR")}%`,backgroundColor:d.occupationRate??d.indifferencie??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"}}case"outToday":return{...y,value:u.sorties.toLocaleString("fr-FR"),backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",titleColor:s,valueColor:s}}};return l&&l.length>0?o.jsx("div",{className:Rj.container,children:l.map((g,m)=>o.jsx(xt,{a11yConfig:e[m],titleKey:t[m],label:n[m],iconName:r[m],...f(g,m)},g))}):o.jsxs("div",{className:Rj.container,children:[o.jsx(xt,{a11yConfig:e[0],titleKey:t[0],label:n[0],value:u.disponibles.toLocaleString("fr-FR"),iconName:r[0],backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"white",valueColor:"white",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[1],titleKey:t[1],label:n[1],value:u.homme.toLocaleString("fr-FR"),iconName:r[1],backgroundColor:d.homme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[2],titleKey:t[2],label:n[2],value:u.femme.toLocaleString("fr-FR"),iconName:r[2],backgroundColor:d.femme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[3],titleKey:t[3],label:n[3],value:u.indifferencie.toLocaleString("fr-FR"),iconName:r[3],backgroundColor:d.indifferencie??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[4],titleKey:t[4],label:n[4],value:u.sorties.toLocaleString("fr-FR"),iconName:r[4],backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:s,valueColor:s,titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}})]})},txe="_container_1pt6c_1",axe="_chartContainer_1pt6c_14",nxe="_legend_1pt6c_22",oxe="_legendItem_1pt6c_29",cxe="_leftSection_1pt6c_41",ixe="_colorIndicator_1pt6c_47",rxe="_label_1pt6c_54",sxe="_rightSection_1pt6c_60",dxe="_ratio_1pt6c_66",lxe="_value1_1pt6c_73",hxe="_separator_1pt6c_78",uxe="_value2_1pt6c_82",pxe="_statusIndicator_1pt6c_87",yxe="_inactive_1pt6c_102",Oe={container:txe,chartContainer:axe,legend:nxe,legendItem:oxe,leftSection:cxe,colorIndicator:ixe,label:rxe,rightSection:sxe,ratio:dxe,value1:lxe,separator:hxe,value2:uxe,statusIndicator:pxe,inactive:yxe},Fj=Math.PI/180,kxe=({data:e,height:t=400,bg:n,backgroundColor:c,color:i,fontSize:r,fontWeight:s,padding:d,margin:l,borderRadius:h,className:u="",style:p={},labelColor:y,ratioColor:f,separatorColor:g,borderColor:m,hideDonut:x=!0,hideColorIndicator:M=!1})=>{const[v,L]=k.useState(new Set(e.map(N=>N.nom))),b=N=>{const w=new Set(v);w.has(N)?w.size>1&&w.delete(N):w.add(N),L(w)},C={...p,"--bg-color":n||c||"transparent","--text-color":i||"inherit","--font-size":r||"14px","--font-weight":s||"400","--padding":d||"0","--margin":l||"0","--border-radius":h||"0","--label-color":y||"inherit","--ratio-color":f||"inherit","--separator-color":g||"#03a9f4","--border-color":m||"#e0e0e0"},S=k.useMemo(()=>e.map(N=>({...N,displayValue:v.has(N.nom)?N.value:0})),[e,v]),_=k.useMemo(()=>e.every(N=>N.value===0),[e]),I=k.useMemo(()=>_?1:S.reduce((N,w)=>N+w.displayValue,0)||1,[_,S]),j=k.useCallback(({cx:N,cy:w,midAngle:$,innerRadius:V,outerRadius:T,value:z})=>{if(z===0||_)return null;const A=V+(T-V)*.5,q=N+A*Math.cos(-$*Fj),B=w+A*Math.sin(-$*Fj),F=Math.round(z/I*100);return o.jsx(a.Text,{x:q,y:B,fill:"white",textAnchor:"middle",dominantBaseline:"central",fontSize:12,fontWeight:"bold",children:`${F}%`})},[I,_]);return o.jsxs("div",{className:`${Oe.container} ${u}`,style:C,children:[!x&&o.jsx("div",{className:Oe.chartContainer,style:{height:t/2+100},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:"100%",children:o.jsx(a.PieChart,{children:o.jsx(a.Pie,{data:_?[{displayValue:1,color:"#A3C2CB"}]:S,cx:"50%",cy:"50%",innerRadius:45,outerRadius:75,paddingAngle:0,dataKey:"displayValue",stroke:"white",strokeWidth:_?0:2,startAngle:90,endAngle:450,labelLine:!1,label:j,isAnimationActive:!1,children:_?o.jsx(a.Cell,{fill:"#A3C2CB"}):S.map((N,w)=>o.jsx(a.Cell,{fill:N.color},`cell-${w}`))})})})}),o.jsx("div",{className:Oe.legend,children:e.map((N,w)=>{const $=v.has(N.nom);return o.jsxs("div",{className:`${Oe.legendItem} ${!x&&!$?Oe.inactive:""}`,onClick:()=>b(N.nom),style:{cursor:"pointer",transition:"opacity 0.2s"},children:[o.jsxs("div",{className:Oe.leftSection,children:[!M&&o.jsx("div",{className:Oe.colorIndicator,style:{backgroundColor:N.color,opacity:x||$?1:.3}}),o.jsx("span",{className:Oe.label,style:{opacity:x||$?1:.5},children:N.nom})]}),o.jsxs("div",{className:Oe.rightSection,style:{opacity:x||$?1:.5},children:[o.jsxs("div",{className:Oe.ratio,children:[o.jsx("span",{className:Oe.value1,children:N.value1}),o.jsx("span",{className:Oe.separator,children:"/"}),o.jsx("span",{className:Oe.value2,children:N.value2})]}),N.statusColor&&o.jsx("div",{className:Oe.statusIndicator,style:{backgroundColor:N.statusColor}})]})]},`legend-${w}`)})})]})},mxe="_container_1pc4v_1",fxe="_leftGroup_1pc4v_10",gxe="_iconBtn_1pc4v_16",ui={container:mxe,leftGroup:fxe,iconBtn:gxe},vxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M3 12h18M3 6h18M3 18h18"})),xxe=k.memo(vxe),Mxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8m-4-6-4-4-4 4m4-4v13"})),HA=k.memo(Mxe),_xe=({menuIcon:e,logoProps:t,actionIcon:n,style:c,className:i,bgColor:r="var(--header-bg)",color:s="var(--color-text)",borderBottomColor:d="var(--color-border)",borderBottomWidth:l=1,height:h="8vh",onMenuClick:u,onActionClick:p})=>{const y={backgroundColor:r,color:s,borderBottom:`${l}px solid ${d}`,height:h,...c};return o.jsxs("header",{className:[ui.container,i].filter(Boolean).join(" "),style:y,children:[o.jsxs("div",{className:ui.leftGroup,children:[o.jsx("button",{className:ui.iconBtn,onClick:u,"aria-label":"Menu",style:{color:"inherit"},children:e??o.jsx(xxe,{width:22,height:22})}),o.jsx(bL,{...t,size:"medium"})]}),o.jsx("button",{className:ui.iconBtn,onClick:p,"aria-label":"Action",style:{color:"inherit"},children:n??o.jsx(HA,{width:22,height:22})})]})},Lxe="_container_24g3e_1",Ixe="_iconBtn_24g3e_10",bxe="_title_24g3e_22",pi={container:Lxe,iconBtn:Ixe,title:bxe},wxe=({title:e="Menu",closeIcon:t,actionIcon:n,style:c,className:i,titleStyle:r,bgColor:s="var(--header-bg)",color:d="var(--color-text)",borderBottomColor:l="transparent",borderBottomWidth:h=0,height:u="8vh",onClose:p,onAction:y})=>{const f={backgroundColor:s,color:d,borderBottom:`${h}px solid ${l}`,height:u,...c};return o.jsxs("div",{className:[pi.container,i].filter(Boolean).join(" "),style:f,children:[o.jsx("button",{className:pi.iconBtn,onClick:p,"aria-label":"Fermer",style:{color:"inherit"},children:t??o.jsx(TA,{width:22,height:22})}),o.jsx("span",{className:pi.title,style:{fontWeight:"var(--font-weight-h)",fontSize:"var(--h5)",...r},children:e.toUpperCase()}),o.jsx("button",{className:pi.iconBtn,onClick:y,"aria-label":"Partager",style:{color:"inherit"},children:n??o.jsx(HA,{width:22,height:22})})]})};function DA(e){return e.state?e.state:e.active?"active":"available"}const Cxe=({title:e,countLabel:t="UF",actionIcon:n=o.jsx(yt,{size:16}),onAction:c,items:i=[],onItemClick:r,activeColor:s="#0083bb",id:d,children:l})=>{const h=k.useMemo(()=>i.filter(u=>DA(u)==="active").length,[i]);return o.jsxs(Nxe,{id:d,children:[o.jsxs(Sxe,{children:[o.jsxs(jxe,{children:[o.jsx($xe,{children:e}),o.jsxs(qxe,{children:["(",h," ",t,")"]})]}),c&&o.jsx(Axe,{onClick:c,title:"Action",children:n})]}),o.jsx(zxe,{children:o.jsx(Pxe,{children:i.map(u=>o.jsx(Txe,{item:u,activeColor:s,onItemClick:r},u.id))})}),l&&o.jsx(Hxe,{children:l})]})},Nxe=R.div`
8347
+ `,style:{...oe,backgroundColor:t===Le.value?j||"#F0F4F6":"transparent"},onMouseEnter:wt=>{I&&(wt.currentTarget.style.backgroundColor=I)},onMouseLeave:wt=>{I&&(wt.currentTarget.style.backgroundColor=t===Le.value?j||"#F0F4F6":"transparent")},role:"option","aria-selected":t===Le.value,children:o.jsxs("div",{className:Ne.itemContent,style:be,children:[Le.icon&&o.jsx("span",{className:Ne.itemIcon,style:ge,children:Le.icon}),o.jsx("span",{className:Ne.itemLabel,children:Le.label})]})},Le.value))})})]})},$7e="_filterBar_1hlqe_3",q7e="_label_1hlqe_11",Dj={filterBar:$7e,label:q7e},A7e=({label:e="Filtres",startDate:t,endDate:n,granularity:c,onStartDateChange:i,onEndDateChange:r,onGranularityChange:s,granularityItems:d,startDatePlaceholder:l="Date début",endDatePlaceholder:h="Date fin",granularityPlaceholder:u="Sélectionner...",className:p="",disabled:y=!1,gap:f="0.75rem",labelFontSize:g="0.875rem",labelFontWeight:m="400",labelColor:x="#212529",labelMarginRight:M="1rem",startDateWidth:v,endDateWidth:L,selectWidth:b,datePickerProps:C={},selectProps:S={},rightContent:_,extraContent:I})=>{const j={fontSize:g,fontWeight:m,color:x,marginRight:M},N={gap:f};return o.jsxs("div",{className:`${Dj.filterBar} ${p}`,style:N,children:[e&&o.jsx("span",{className:Dj.label,style:j,children:e}),o.jsx(_w,{value:t,onChange:i,placeholder:l,fullWidth:!1,disabled:y,label:void 0,width:v,...C}),o.jsx(_w,{value:n,onChange:r,placeholder:h,fullWidth:!1,disabled:y,label:void 0,width:L,...C}),o.jsx(VA,{items:d,value:c,onChange:s,placeholder:u,fullWidth:!1,disabled:y,label:void 0,width:b,...S}),I,_&&o.jsx("div",{style:{marginLeft:"auto"},children:_})]})},z7e="_container_1x6mq_16",P7e="_disabled_1x6mq_26",V7e="_predStyle_1x6mq_32",T7e="_realStyle_1x6mq_36",H7e="_predGap_1x6mq_40",D7e="_realGap_1x6mq_44",B7e="_big_1x6mq_49",R7e="_medium_1x6mq_53",F7e="_iconWrapper_1x6mq_58",E7e="_predRelative_1x6mq_68",O7e="_realRelative_1x6mq_72",U7e="_iconImg_1x6mq_76",W7e="_content_1x6mq_84",G7e="_header_1x6mq_93",K7e="_predJustify_1x6mq_99",Z7e="_realJustify_1x6mq_103",X7e="_predHeaderLineHeight_1x6mq_116",Y7e="_realHeaderLineHeight_1x6mq_120",J7e="_title_1x6mq_129",Q7e="_titleBlack_1x6mq_144",eve="_titleWhite_1x6mq_148",tve="_subtitle_1x6mq_153",ave="_valueRowHorizontal_1x6mq_163",nve="_valueRowVertical_1x6mq_171",ove="_singleValue_1x6mq_180",cve="_primaryRow_1x6mq_184",ive="_maxBadge_1x6mq_191",rve="_valuePrimary_1x6mq_203",sve="_valuePrimaryBlack_1x6mq_210",dve="_valuePrimaryWhite_1x6mq_214",lve="_valueSlash_1x6mq_219",hve="_valueSecondary_1x6mq_226",uve="_valueSecondaryBlue_1x6mq_232",pve="_valueSecondaryWhite_1x6mq_236",yve="_valueSecondaryBlack_1x6mq_240",kve="_valueStacked_1x6mq_245",mve="_stackedTop_1x6mq_254",fve="_stackedBottom_1x6mq_255",ye={container:z7e,disabled:P7e,predStyle:V7e,realStyle:T7e,predGap:H7e,realGap:D7e,big:B7e,medium:R7e,iconWrapper:F7e,predRelative:E7e,realRelative:O7e,iconImg:U7e,content:W7e,header:G7e,predJustify:K7e,realJustify:Z7e,predHeaderLineHeight:X7e,realHeaderLineHeight:Y7e,title:J7e,titleBlack:Q7e,titleWhite:eve,subtitle:tve,valueRowHorizontal:ave,valueRowVertical:nve,singleValue:ove,primaryRow:cve,maxBadge:ive,valuePrimary:rve,valuePrimaryBlack:sve,valuePrimaryWhite:dve,valueSlash:lve,valueSecondary:hve,valueSecondaryBlue:uve,valueSecondaryWhite:pve,valueSecondaryBlack:yve,valueStacked:kve,stackedTop:mve,stackedBottom:fve},gve=({a11yConfig:e,iconName:t,title:n,subtitle:c,showSubtitle:i,realised:r="-",prediction:s="-",size:d="big",titleColor:l="black",valueColor:h="blue",realValueColor:u,predictionValueColor:p,className:y="",style:f="",variant:g="horizontal",showMax:m=!1,titleFontSize:x,titleFontWeight:M,subtitleFontSize:v,subtitleFontWeight:L,primaryFontSize:b,primaryFontWeight:C,secondaryFontSize:S,secondaryFontWeight:_,backgroundColor:I="#f2f9fc",gap:j="",disabled:N=!1,positionRelative:w="",justifyContent:$="",headerLineHeight:V="",headerMinHeight:T="",contentSpace:z="",titleKey:A,subtitleKey:q,subtitleA11yKey:B,maxBadgeKey:F,maxBadgeA11yKey:P,predictionKey:O,predictionA11yKey:J,realisedKey:E,realisedA11yKey:K})=>{const ue=i!==void 0?i:!!c,ce=`${ye.container} ${ye[d]} ${ye[f]} ${N?ye.disabled:""}`,xe=h==="white"?ye.valuePrimaryWhite:ye.valuePrimaryBlack,ie=h==="blue"?ye.valueSecondaryBlue:h==="white"?ye.valueSecondaryWhite:ye.valueSecondaryBlack,ae=U=>U===void 0?void 0:typeof U=="number"?`${U}px`:U,ne=U=>U===void 0?void 0:U,de=g==="vertical",pe=s!=null&&s!==""&&s!=="-"&&s!=="—",me=de?ye.valueRowVertical:ye.valueRowHorizontal;return o.jsxs("div",{className:`${ce} ${y}`,style:{backgroundColor:I},children:[t&&o.jsx("div",{className:`${ye.iconWrapper} ${ye[w]}`,children:t}),o.jsxs("div",{className:`${ye.content} ${ye[j]} ${pe?"":ye.singleValue} content-indicator-v2`,style:{justifyContent:z},children:[o.jsx("div",{className:`${ye.header} ${ye[$]} ${ye[V]} header-indicator-v2`,style:{minHeight:T},children:o.jsx("h6",{className:`${ye.title}`,style:{fontSize:ae(x),fontWeight:ne(M),color:l},title:Y(e,A),children:n})}),ue&&c?o.jsx("div",{className:"subtitle-container",children:o.jsx("span",{className:ye.subtitle,style:{fontSize:ae(v),fontWeight:ne(L)},title:Y(e,q,B),children:c})}):null,o.jsxs("div",{className:`${me} count-indicator-v2`,children:[o.jsxs("div",{className:ye.primaryRow,children:[m&&o.jsx("span",{className:`${ye.maxBadge} max-badge-indicator-v2`,title:Y(e,F,P),children:"MAX"}),o.jsx("span",{className:`${ye.valuePrimary} ${xe}`,style:{fontSize:ae(b||(!pe&&de?"1.75rem":void 0)),fontWeight:ne(C),color:u||void 0},title:Y(e,E,K),children:r})]}),pe&&o.jsxs(o.Fragment,{children:[!de&&o.jsx("span",{className:ye.valueSlash,style:{fontSize:ae(S),fontWeight:ne(_)},children:"/"}),o.jsx("span",{className:`${ye.valueSecondary} ${ie}`,style:{fontSize:ae(S),fontWeight:ne(_),color:p||void 0},title:Y(e,O,J),children:s})]})]})]})]})},vve="_banner_f10in_2",xve="_iep_f10in_14",Mve="_groupSmall_f10in_24",_ve="_genre_f10in_34",Lve="_gravite_f10in_42",Ive="_orientationContainer_f10in_48",bve="_service_f10in_61",wve="_roomBedContainer_f10in_71",Cve="_room_f10in_71",Nve="_bed_f10in_87",Sve="_bedUf_f10in_92",jve="_statusContainer_f10in_97",$ve="_status_f10in_97",qve="_centeredWarn_f10in_124",Ee={banner:vve,iep:xve,groupSmall:Mve,genre:_ve,gravite:Lve,orientationContainer:Ive,service:bve,roomBedContainer:wve,room:Cve,bed:Nve,bedUf:Sve,statusContainer:jve,status:$ve,centeredWarn:qve},Ave=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},te.createElement("mask",{id:"a",width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse",style:{maskType:"alpha"}},te.createElement("path",{fill:"#D9D9D9",d:"M0 0h16v16H0z"})),te.createElement("g",{mask:"url(#a)"},te.createElement("path",{fill:"#C60000",d:"M.666 14 7.999 1.333 15.333 14zm2.3-1.333h10.067L7.999 4zm5.508-.859a.65.65 0 0 0 .192-.475.65.65 0 0 0-.192-.475.65.65 0 0 0-.475-.191.65.65 0 0 0-.475.191.65.65 0 0 0-.191.475q0 .285.191.475A.65.65 0 0 0 8 12a.65.65 0 0 0 .475-.192M7.333 10h1.333V6.667H7.333z"}))),Bj=k.memo(Ave),zve=({patient:e,genre:t,gravite:n,bed:c,bed_uf:i,room:r,orientation:s,status:d,backgroundColor:l="#ffffff",primaryFontColor:h="#111827",secondaryFontColor:u="#6b7280",statusFontColor:p="#0284c7",statusBackgroundColor:y="#e0f2fe",genreBackgroundColor:f="#9ca3af",genreFontSize:g,style:m,warn:x=!1,warnMessage:M,warnColor:v="#F94134"})=>o.jsxs("div",{className:Ee.banner,style:{backgroundColor:l,...m},children:[o.jsxs("div",{className:Ee.iep,children:[o.jsx("div",{style:{color:u},children:e.iep??"--"}),o.jsxs("div",{style:{color:h},children:[((e.nom||"").trim().split(/\s+/)[0]||"").substring(0,3).toUpperCase(),"."," ",((e.prenom||"").trim().split(/\s+/)[0]||"").substring(0,3).toLowerCase().replace(/^./,L=>L.toUpperCase()),".(",e.age,")"]})]}),o.jsxs("div",{className:Ee.groupSmall,children:[o.jsx("span",{className:`${Ee.genre} genre-info-banner`,style:{color:"#ffffff",background:f,fontSize:g},children:t??"--"}),o.jsx("span",{className:`${Ee.gravite} gravite-info-banner`,children:n??"--"})]}),o.jsx("div",{className:Ee.orientationContainer,children:o.jsx("div",{className:Ee.service,style:{color:h},children:s??"--"})}),o.jsxs("div",{className:Ee.roomBedContainer,children:[i&&o.jsx("span",{className:Ee.bedUf,children:i}),o.jsx("span",{className:Ee.room,children:r??"--"}),o.jsx("span",{className:Ee.bed,children:c??"--"})]}),o.jsxs("div",{className:Ee.statusContainer,children:[d?o.jsx("div",{className:`${Ee.status} status-info-banner`,style:{color:p,backgroundColor:y},children:d}):x&&o.jsxs("div",{className:Ee.centeredWarn,style:{textTransform:"uppercase"},children:[o.jsx(Bj,{color:v,width:20,height:20,style:{marginRight:"6px"}}),o.jsx("span",{style:{color:v,fontSize:"12px",fontWeight:600},children:M})]}),d&&x&&o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",color:v,fontSize:"10px",fontWeight:400,marginTop:"4px",textTransform:"uppercase"},children:[o.jsx(Bj,{color:v,width:12,height:12,style:{marginRight:"4px"}}),o.jsx("span",{children:M})]})]})]}),Pve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M200-200v-240h60v180h180v60zm500-320v-180H520v-60h240v240z"})),Vve=k.memo(Pve),Tve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"m249-207-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231z"})),TA=k.memo(Tve),Hve=e=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},te.createElement("path",{d:"M440-440v240h-60v-180H200v-60zm140-320v180h180v60H520v-240z"})),Dve=k.memo(Hve),Bve="_overlay_1sx2l_1",Rve="_container_1sx2l_11",Fve="_fullscreen_1sx2l_24",Eve="_header_1sx2l_30",Ove="_headerActions_1sx2l_42",Uve="_iconButton_1sx2l_47",Wve="_body_1sx2l_58",Gve="_sidebar_1sx2l_65",Kve="_content_1sx2l_91",Zve="_contentHeader_1sx2l_98",Xve="_childrenWrapper_1sx2l_114",Yve="_footer_1sx2l_138",Jve="_baseButton_1sx2l_147",Qve="_noOverlay_1sx2l_161",e9e="_contained_1sx2l_169",$e={overlay:Bve,container:Rve,fullscreen:Fve,header:Eve,headerActions:Ove,iconButton:Uve,body:Wve,sidebar:Gve,content:Kve,contentHeader:Zve,childrenWrapper:Xve,footer:Yve,baseButton:Jve,noOverlay:Qve,contained:e9e},t9e=({headerText:e,headerTextColor:t="var(--color-text)",backgroundColor:n="var(--color-background)",headerFontSize:c="1rem",headerFontWeight:i="600",isOpen:r,onClose:s,leftButton:d,rightButton:l,children:h,contentTitle:u,contentBackgroundColor:p="var(--color-content-background)",sideContent:y,hideMaximize:f=!1,hideHeader:g=!1,hideSidebar:m=!1,onDelete:x,deleteLabel:M="Supprimer",width:v="75%",maxWidth:L="none",height:b="85%",maxHeight:C="85%",borderRadius:S="0.5rem",childrenPadding:_="1rem",overflow:I="auto",contentHeaderAction:j,contentFooterAction:N,footerOverride:w,hideFooter:$=!1,hideOverlay:V=!1,position:T,a11yConfig:z})=>{const[A,q]=k.useState(!1),B=k.useRef(null);if(k.useEffect(()=>{if(!r||!V)return;const P=O=>{(O.type==="scroll"||O.type==="wheel"||O.type==="touchmove"||B.current&&!B.current.contains(O.target))&&s()};return document.addEventListener("mousedown",P),document.addEventListener("scroll",P,!0),document.addEventListener("wheel",P,{passive:!0,capture:!0}),document.addEventListener("touchmove",P,{passive:!0,capture:!0}),()=>{document.removeEventListener("mousedown",P),document.removeEventListener("scroll",P,!0),document.removeEventListener("wheel",P,!0),document.removeEventListener("touchmove",P,!0)}},[r,V,s]),!r)return null;const F=(P,O=!1)=>o.jsx(pL,{onClick:P.disabled?void 0:P.onClick,className:$e.baseButton,disabled:P.disabled,style:{background:P.backgroundColor??(O?"#008FBB":"#ffffff"),color:P.textColor??(O?"#ffffff":"#374151"),border:P.borderColor?`1px solid ${P.borderColor}`:O?"none":void 0,cursor:P.disabled?P.cursor??"not-allowed":P.cursor??"pointer",filter:P.disabled?P.filter??"grayscale(0.5)":P.filter??"none",opacity:P.disabled?.65:1},title:Y(P.a11yConfig,P.text),children:P.text});return o.jsx("div",{className:V?$e.noOverlay:$e.overlay,onClick:s,children:o.jsxs("div",{ref:B,className:`${$e.container} ${A?$e.fullscreen:""} ${V?$e.contained:""}`,onClick:P=>P.stopPropagation(),style:{width:A?"100%":v,maxWidth:A?"none":L,height:A?"100%":b,maxHeight:A?"100%":C,borderRadius:A?"0":S,overflow:I,...T||{}},children:[!g&&o.jsxs("header",{className:$e.header,style:{backgroundColor:n},children:[o.jsx("h2",{style:{fontSize:c,fontWeight:i,color:t},title:Y(z,e),children:e}),o.jsxs("div",{className:$e.headerActions,children:[!f&&o.jsx("button",{onClick:()=>q(!A),className:$e.iconButton,title:A?"Réduire":"Agrandir",children:A?o.jsx(Dve,{width:22,height:22,fill:t}):o.jsx(Vve,{width:22,height:22,fill:t})}),o.jsx("button",{onClick:s,className:$e.iconButton,title:"Fermer",children:o.jsx(TA,{width:22,height:22,fill:t})})]})]}),o.jsxs("div",{className:$e.body,style:{overflow:I},children:[y&&!m&&o.jsx("aside",{className:$e.sidebar,children:y}),o.jsxs("main",{className:$e.content,style:{backgroundColor:p,overflow:I},children:[u&&o.jsxs("header",{className:$e.contentHeader,style:{backgroundColor:n},children:[o.jsx("span",{style:{color:t},children:u}),j]}),o.jsx("div",{className:$e.childrenWrapper,style:{padding:_,overflow:I},children:h})]})]}),!$&&o.jsx("footer",{className:$e.footer,style:{backgroundColor:n},children:w!==void 0?w:o.jsxs(o.Fragment,{children:[x&&o.jsx(pL,{onClick:x,className:$e.baseButton,style:{background:"#fee2e2",color:"#ef4444",marginRight:"auto",border:"none"},children:M}),N,F(d),F(l,!0)]})})]})})},a9e="_container_1vb1c_1",n9e="_searchWrapper_1vb1c_10",o9e="_navItems_1vb1c_17",Gb={container:a9e,searchWrapper:n9e,navItems:o9e},c9e=({items:e,activeId:t,activeColor:n="#00aec7",backgroundColor:c="#fff",textColor:i="#000",onItemClick:r,searchValue:s="",onSearchChange:d,searchPlaceholder:l="Rechercher",width:h="100%",className:u=""})=>o.jsxs("div",{className:`${Gb.container} ${u}`,style:{width:h,backgroundColor:c,color:i},children:[o.jsx("div",{className:Gb.searchWrapper,children:o.jsx(SA,{value:s,onChange:d,placeholder:l,iconPosition:"right",iconColor:"var(--color-text)"})}),o.jsx("div",{className:Gb.navItems,children:e.map(p=>o.jsx(dC,{id:p.id,label:p.label,icon:p.icon,isActive:t===p.id,onClick:()=>r?.(p.id),activeColor:n,color:i,fontWeight:"600",fontSize:"0.75rem",padding:"0.75rem 1rem",iconGap:"0.5rem"},p.id))})]}),i9e=({modules:e,selectedModuleId:t,onSelectModule:n,onAddModule:c,onItemAdd:i,onEditModule:r,onDeleteModule:s,onReorder:d,title:l="Modules",titleKey:h,addModuleTitle:u="Ajouter un module",addModuleLabel:p="Titre",addModulePlaceholder:y="Nom du module",renameModuleTitle:f="Renommer le module",renameModuleLabel:g="Titre",renameModulePlaceholder:m="Nom du module",confirmText:x="Valider",cancelText:M="Annuler",headerLabel:v,headerLabelKey:L,showAddIcon:b=!0,showCount:C=!0,showToggle:S=!1,showActions:_=!0,onToggle:I,a11yConfig:j})=>{const[N,w]=k.useState(!1),[$,V]=k.useState(null),[T,z]=k.useState(null),[A,q]=k.useState(null),[B,F]=k.useState(null),P=()=>{F(U=>U===null?"asc":U==="asc"?"desc":null),I&&I()},O=k.useMemo(()=>B?[...e].sort((U,X)=>{const re=U.title.toLowerCase(),je=X.title.toLowerCase();return B==="asc"?re.localeCompare(je):je.localeCompare(re)}):e,[e,B]),J=()=>w(!0),E=()=>w(!1),K=U=>{const X=U.title?.trim();X&&c&&c(X),E()},ue=(U,X)=>{U.stopPropagation(),V(X)},ce=()=>V(null),xe=U=>{const X=U.title?.trim();$&&X&&r&&r($,X),ce()},ie=(U,X)=>{U.stopPropagation(),s&&s(X)},ae=(U,X)=>{U.stopPropagation(),i&&i(X)},ne=(U,X)=>{z(X),U.dataTransfer.effectAllowed="move"},de=(U,X)=>{T!==null&&(U.preventDefault(),U.dataTransfer.dropEffect="move",X!==A&&q(X))},pe=(U,X)=>{if(U.preventDefault(),T===null||T===X||!d)return;const re=[...O],[je]=re.splice(T,1);re.splice(X,0,je),F(null),d(re),z(null),q(null)},me=()=>{z(null),q(null)};return o.jsxs("div",{className:"module-sidebar-v2",children:[o.jsx("div",{className:"sidebar-header",children:v?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-label-container",onClick:P,children:[o.jsx("div",{className:"header-label",title:Y(j,L),children:v}),B==="asc"?o.jsx(e1,{size:12,className:"header-toggle-icon",strokeWidth:3}):o.jsx(Qc,{size:12,className:"header-toggle-icon",strokeWidth:3})]}),b&&o.jsx(qc,{size:18,className:"add-view-icon",onClick:J})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"header-title",title:Y(j,h),children:[S&&(B==="asc"?o.jsx(e1,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:P}):o.jsx(Qc,{size:12,className:"header-toggle-icon default-toggle",strokeWidth:3,onClick:P})),l," ",C&&`(${O.length})`]}),b&&o.jsx(qc,{size:18,className:"add-view-icon",onClick:J})]})}),o.jsx("div",{className:"module-list",children:O.map((U,X)=>o.jsxs("div",{className:`module-item ${U.id===t?"selected":""} ${A===X&&T!==X?"drag-over":""} ${T===X?"dragging":""}`,onClick:()=>n&&n(U),draggable:!!d,onDragStart:d?re=>ne(re,X):void 0,onDragOver:d?re=>de(re,X):void 0,onDrop:d?re=>pe(re,X):void 0,onDragEnd:d?me:void 0,children:[U.icon||o.jsx(q1,{size:18,className:"drag-handle"}),o.jsxs("div",{className:"module-content",title:Y(U.a11yConfig,U.titleKey),children:[o.jsx("div",{className:"module-title",children:U.title}),U.subtitle&&o.jsx("div",{className:"module-subtitle",children:U.subtitle})]}),typeof U.count<"u"&&o.jsx("span",{className:"module-count",children:U.count}),_&&o.jsxs("div",{className:"module-actions",children:[i&&o.jsx(Ac,{size:14,className:"action-icon add",onClick:re=>ae(re,U)}),r&&o.jsx(vt,{size:12,className:"action-icon edit",onClick:re=>ue(re,U)}),s&&o.jsx(yt,{size:12,className:"action-icon delete",onClick:re=>ie(re,U)})]})]},U.id))}),o.jsx(Hc,{isOpen:N,onClose:E,onSave:K,title:u,fields:[{name:"title",label:p,placeholder:y}],confirmText:x,cancelText:M}),$&&o.jsx(Hc,{isOpen:!!$,onClose:ce,onSave:xe,title:f,initialValues:{title:$.title},fields:[{name:"title",label:g,placeholder:m}],confirmText:x,cancelText:M})]})},r9e=({mod:e,index:t,total:n,isSelected:c,onSelectModule:i})=>o.jsxs("div",{className:`module-item${c?" selected":""}`,onClick:()=>i?.(e),"aria-posinset":t+1,"aria-setsize":n,role:"listitem",children:[e.icon,o.jsxs("div",{className:"module-content",title:Y(e.a11yConfig,e.titleKey),children:[o.jsx("div",{className:"module-title",children:e.title}),e.subtitle&&o.jsx("div",{className:"module-subtitle",children:e.subtitle})]})]}),s9e=({modules:e,selectedModuleId:t,onSelectModule:n,title:c="Modules",titleKey:i,showCount:r=!0,showSearch:s=!0,searchValue:d,searchPlaceholder:l,onSearchTyping:h,onSearchSubmit:u,searchDebounceMs:p=300,isLoading:y=!1,loadingComponent:f,emptyComponent:g,a11yConfig:m,borderColor:x,hoverBackgroundColor:M,selectedBackgroundColor:v})=>{const[L,b]=k.useState(d??""),C=k.useRef(null);k.useEffect(()=>{d!==void 0&&b(d)},[d]),k.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const S=j=>{const N=j.target.value;b(N),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{h?.(N)},p)},_=j=>{j.key==="Enter"&&u?.(L)},I={"--smsb-border-color":x??"var(--color-border, #efefef)","--smsb-hover-background":M??"var(--color-content-background, #f8fafc)","--smsb-selected-background":v??"var(--color-neutral, #f4f4f4)"};return o.jsxs("div",{className:"searchable-module-sidebar",style:I,children:[o.jsx("div",{className:"sidebar-header",children:o.jsxs("div",{className:"header-title",title:Y(m,i),children:[c," ",r&&`(${e.length})`]})}),s&&o.jsx("div",{className:"sidebar-search",children:o.jsx("input",{type:"text",className:"search-input",value:L,placeholder:l,onChange:S,onKeyDown:_})}),o.jsx("div",{className:"module-list",children:y?f:e.length===0?g:e.map((j,N)=>o.jsx(r9e,{mod:j,index:N,total:e.length,isSelected:j.id===t,onSelectModule:n},j.id))})]})},d9e=({keyName:e,translations:t,availableLanguages:n,onChange:c,onRename:i,onDelete:r,a11yConfig:s})=>{const[d,l]=k.useState(!1),[h,u]=k.useState(e),[p,y]=k.useState(null),[f,g]=k.useState(""),[m,x]=k.useState(!1),[M,v]=k.useState(""),[L,b]=k.useState(""),C=k.useMemo(()=>{const A={};return Array.isArray(t)&&t.forEach(q=>{q&&q.language&&(A[q.language.toUpperCase()]=q.value)}),A},[t]),S=k.useMemo(()=>n,[n]),_=()=>{l(!1),h!==e&&h.trim()!==""?i&&i(h.trim()):u(e)},I=A=>{A.key==="Enter"?_():A.key==="Escape"&&(u(e),l(!1))},j=A=>{const q=A.toUpperCase();y(q),g(C[q]||"")},N=()=>{p&&(c(p,f),y(null),g(""))},w=A=>{A.key==="Enter"?N():A.key==="Escape"&&(y(null),g(""))},$=()=>{x(!0),S.length>0&&v(S[0].toUpperCase()),b("")},V=()=>{M&&L.trim()&&(c(M,L.trim()),x(!1),v(""),b(""))},T=()=>{x(!1),v(""),b("")},z=A=>{A.key==="Enter"?V():A.key==="Escape"&&T()};return o.jsxs("div",{className:"translation-key-v2",children:[o.jsxs("div",{className:"header",children:[d?o.jsx("input",{className:"key-name-input",value:h,onChange:A=>u(A.target.value),onBlur:_,onKeyDown:I,autoFocus:!0}):o.jsx("h3",{className:"header-title",title:Y(s,e),children:e}),o.jsxs("div",{className:"header-actions",children:[o.jsx(vt,{size:16,className:"action-icon edit",onClick:()=>l(!0)}),o.jsx(yt,{size:16,className:"action-icon delete",onClick:r})]})]}),o.jsxs("div",{className:"translations-list",children:[n.map(A=>{const q=A.toUpperCase(),B=C[q]||"",F=p===q;return o.jsxs("div",{className:"lang-row",children:[o.jsx("div",{className:"lang-label",children:q}),F?o.jsx("input",{className:"translation-input editing",value:f,onChange:P=>g(P.target.value),onBlur:N,onKeyDown:w,placeholder:"Entrez la traduction...",autoFocus:!0}):o.jsx("div",{className:`translation-value ${B?"":"empty"}`,onClick:()=>j(A),title:"Cliquer pour éditer",children:B||"Cliquer pour ajouter..."})]},A)}),m?o.jsxs("div",{className:"lang-row add-row",children:[o.jsx("select",{className:"lang-select",value:M,onChange:A=>v(A.target.value),children:S.map(A=>o.jsx("option",{value:A.toUpperCase(),children:A.toUpperCase()},A))}),o.jsx("input",{className:"translation-input editing",value:L,onChange:A=>b(A.target.value),onKeyDown:z,placeholder:"Mot",autoFocus:!0}),o.jsxs("div",{className:"add-actions",children:[o.jsx(C1,{size:18,className:"action-icon confirm",onClick:V}),o.jsx(tt,{size:18,className:"action-icon cancel",onClick:T})]})]}):S.length>0&&o.jsxs("button",{className:"add-translation-btn",onClick:$,children:[o.jsx(Ac,{size:16}),o.jsx("span",{children:"Ajouter"})]})]})]})},l9e="_overlay_afn8e_1",h9e="_modal_afn8e_15",u9e="_body_afn8e_28",p9e="_footer_afn8e_48",y9e="_confirmButton_afn8e_57",k9e="_danger_afn8e_74",m9e="_cancelButton_afn8e_78",St={overlay:l9e,modal:h9e,body:u9e,footer:p9e,confirmButton:y9e,danger:k9e,cancelButton:m9e},f9e=({isOpen:e,message:t,children:n,onConfirm:c,onCancel:i,confirmText:r="Confirmer",cancelText:s="Annuler",isDanger:d=!1,hideFooter:l=!1,secondaryConfirmText:h,onSecondaryConfirm:u,modalStyle:p,bodyStyle:y,footerStyle:f,cancelButtonStyle:g,confirmButtonStyle:m,overlayStyle:x,modalClassName:M,bodyClassName:v,footerClassName:L,overlayClassName:b})=>{if(!e)return null;const C=n??t;return o.jsx("div",{className:`${St.overlay} ${b||""}`.trim(),onClick:i,style:x,children:o.jsxs("div",{className:`${St.modal} ${M||""}`.trim(),onClick:S=>S.stopPropagation(),style:p,children:[o.jsx("div",{className:`${St.body} ${v||""}`.trim(),style:y,children:typeof C=="string"?o.jsx("p",{children:C}):C}),!l&&o.jsxs("div",{className:`${St.footer} ${L||""}`.trim(),style:f,children:[s&&o.jsx("button",{className:St.cancelButton,onClick:i,style:g,children:s}),h&&u&&o.jsx("button",{className:St.confirmButton,onClick:u,children:h}),r&&o.jsx("button",{className:`${St.confirmButton} ${d?St.danger:""}`,onClick:c,style:m,children:r})]})]})})},g9e="_card_1ildr_1",v9e="_topIcon_1ildr_17",x9e="_title_1ildr_24",M9e="_text_1ildr_31",_9e="_bottomIcon_1ildr_37",v1={card:g9e,topIcon:v9e,title:x9e,text:M9e,bottomIcon:_9e},L9e=({topIcon:e,title:t,text:n,bottomIcon:c,onClick:i,className:r="",headerTextColor:s="#000",textColor:d="#4b5563",backgroundColor:l="#fff",a11yConfig:h})=>o.jsxs("div",{className:`${v1.card} ${r}`,onClick:i,role:i?"button":void 0,tabIndex:i?0:void 0,style:{backgroundColor:l},title:Y(h,t),children:[e&&o.jsx("div",{className:v1.topIcon,children:e}),o.jsx("h3",{className:v1.title,style:{color:s},children:t}),o.jsx("p",{className:v1.text,style:{color:d},children:n}),c&&o.jsx("div",{className:v1.bottomIcon,children:c})]}),I9e="_container_1bmmf_1",b9e="_disabled_1bmmf_9",w9e="_selectBox_1bmmf_14",C9e="_selectBoxOpen_1bmmf_36",N9e="_tagsContainer_1bmmf_41",S9e="_tagsContainerWrap_1bmmf_51",j9e="_tag_1bmmf_41",$9e="_tagLabel_1bmmf_72",q9e="_removeBtnContainer_1bmmf_78",A9e="_removeBtn_1bmmf_78",z9e="_searchInput_1bmmf_103",P9e="_placeholder_1bmmf_123",V9e="_actions_1bmmf_130",T9e="_clearBtn_1bmmf_137",H9e="_chevron_1bmmf_159",D9e="_chevronOpen_1bmmf_165",B9e="_dropdown_1bmmf_169",R9e="_option_1bmmf_183",F9e="_optionHeader_1bmmf_196",E9e="_noOptions_1bmmf_212",O9e="_overflowBlock_1bmmf_219",U9e="_overflowEllipsis_1bmmf_226",W9e="_overflowBadge_1bmmf_233",G9e="_overflowBadgeWrap_1bmmf_256",K9e="_overflowDropdown_1bmmf_262",Z9e="_overflowDropdownItem_1bmmf_278",X9e="_overflowDropdownItemLabel_1bmmf_289",Y9e="_overflowDropdownItemRemove_1bmmf_296",se={container:I9e,disabled:b9e,selectBox:w9e,selectBoxOpen:C9e,tagsContainer:N9e,tagsContainerWrap:S9e,tag:j9e,tagLabel:$9e,removeBtnContainer:q9e,removeBtn:A9e,searchInput:z9e,placeholder:P9e,actions:V9e,clearBtn:T9e,chevron:H9e,chevronOpen:D9e,dropdown:B9e,option:R9e,optionHeader:F9e,noOptions:E9e,overflowBlock:O9e,overflowEllipsis:U9e,overflowBadge:W9e,overflowBadgeWrap:G9e,overflowDropdown:K9e,overflowDropdownItem:Z9e,overflowDropdownItemLabel:X9e,overflowDropdownItemRemove:Y9e},J9e=({options:e,noOptionsMessage:t="",value:n,onChange:c,placeholder:i="Sélectionner...",isSearchable:r=!0,className:s="",disabled:d=!1,allowWrap:l=!1})=>{const[h,u]=k.useState(!1),[p,y]=k.useState(""),f=k.useRef(null),g=k.useRef(null),m=k.useRef(null),x=k.useRef(null),[M,v]=k.useState(null),[L,b]=k.useState(!1),C=k.useRef([]),S=k.useRef(null),_=k.useMemo(()=>{const q=new Map(e.map(B=>[B.value,B]));return n.map(B=>q.get(B)).filter(B=>B!==void 0)},[e,n]),I=k.useMemo(()=>e.filter(q=>!n.includes(q.value)),[e,n]),j=k.useMemo(()=>{let q=I;return p&&(q=q.filter(B=>B.label.toLowerCase().includes(p.toLowerCase()))),q.filter((B,F)=>{if(!B.isHeader)return!0;for(let P=F+1;P<q.length&&!q[P].isHeader;P++)return!0;return!1})},[I,p]);k.useEffect(()=>{const q=B=>{const F=B.target;f.current&&!f.current.contains(F)&&(u(!1),y(""),v(null),b(!1))};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]),k.useEffect(()=>{if(l)return;if(_.length===0){v(null),C.current=[];return}_.length>C.current.length&&v(null);const q=()=>{const O=m.current,J=x.current;if(!O||!J)return;const E=J.getBoundingClientRect().width,K=J.querySelector(`.${se.actions}`),ue=K?K.getBoundingClientRect().width:80,ce=56,xe=r?80:0,ie=16,ae=Array.from(O.querySelectorAll(`.${se.tag}`));ae.length===_.length&&(C.current=ae.map(ge=>{const Se=ge.getBoundingClientRect(),Dc=ge.scrollWidth;return Math.max(Se.width,Dc,ge.offsetWidth||0)}));const ne=C.current,de=ne.length>0?ne.reduce((ge,Se)=>ge+Se,0)/ne.length:120,pe=_.length<=ne.length?ne.slice(0,_.length):[...ne,...Array(_.length-ne.length).fill(de)],me=4,U=Math.max(0,E-ue-xe-ie);let X=0,re=0;for(let ge=0;ge<_.length;ge++){const Se=pe[ge]??120;if(X+Se+me>U)break;X+=Se+me,re++}if(re>=_.length){v(null);return}const je=Math.max(0,E-ce-ue-xe-ie);X=0;let Be=0;for(let ge=0;ge<_.length;ge++){const Se=pe[ge]??120;if(X+Se+me>je)break;X+=Se+me,Be++}Be<_.length&&Be>0?v(Be):v(null)},B=requestAnimationFrame(()=>{q()}),F=setTimeout(q,100),P=new ResizeObserver(()=>{q()});return x.current&&P.observe(x.current),()=>{cancelAnimationFrame(B),clearTimeout(F),P.disconnect()}},[_,r,h,l]);const N=()=>{if(d)return;const q=!h;q&&b(!1),u(q),q&&r&&setTimeout(()=>g.current?.focus(),0)},w=q=>{if(n.includes(q.value))return;b(!1);const B=[..._,q];c(B),y(""),v(null),u(!1)},$=q=>{q.preventDefault(),q.stopPropagation(),b(B=>!B)},V=M!=null&&M<_.length?_.slice(M):[],T=(q,B)=>{B.stopPropagation();const F=_.filter(P=>P.value!==q);c(F)},z=q=>{q.stopPropagation(),c([])},A=q=>{q.stopPropagation(),h||u(!0)};return o.jsxs("div",{className:`${se.container} ${s} ${d?se.disabled:""}`,ref:f,children:[o.jsxs("div",{ref:x,className:`${se.selectBox} ${h?se.selectBoxOpen:""}`,onClick:N,role:"combobox","aria-expanded":h,"aria-haspopup":"listbox",children:[o.jsxs("div",{className:`${se.tagsContainer} ${l?se.tagsContainerWrap:""}`,ref:m,children:[M!==null&&M>0?_.slice(0,M).map((q,B)=>o.jsxs("div",{className:se.tag,children:[o.jsx("div",{className:se.tagLabel,children:o.jsx("span",{children:q.label})}),o.jsx("div",{className:se.removeBtnContainer,children:o.jsx("button",{type:"button",className:se.removeBtn,onClick:F=>T(q.value,F),"aria-label":`Supprimer ${q.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${q.value}-${B}`)):_.map((q,B)=>o.jsxs("div",{className:se.tag,children:[o.jsx("div",{className:se.tagLabel,children:o.jsx("span",{children:q.label})}),o.jsx("div",{className:se.removeBtnContainer,children:o.jsx("button",{type:"button",className:se.removeBtn,onClick:F=>T(q.value,F),"aria-label":`Supprimer ${q.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})})]},`tag-${q.value}-${B}`)),r?o.jsx("input",{ref:g,type:"text",className:se.searchInput,placeholder:_.length===0?i:"",value:p,onChange:q=>{y(q.target.value),h||u(!0)},onClick:A,disabled:d}):_.length===0&&o.jsx("span",{className:se.placeholder,children:i})]}),!l&&M!==null&&M<_.length&&o.jsxs("div",{className:se.overflowBlock,children:[o.jsx("span",{className:se.overflowEllipsis,children:"..."}),o.jsxs("div",{className:se.overflowBadgeWrap,children:[o.jsx("button",{ref:S,type:"button",className:se.overflowBadge,onClick:$,"aria-label":`Afficher ${V.length} éléments cachés`,children:V.length}),L&&V.length>0&&o.jsx("div",{className:se.overflowDropdown,role:"list","aria-label":"Éléments cachés",children:V.map((q,B)=>o.jsxs("div",{className:se.overflowDropdownItem,children:[o.jsx("span",{className:se.overflowDropdownItemLabel,children:q.label}),o.jsx("button",{type:"button",className:se.overflowDropdownItemRemove,onClick:F=>{F.stopPropagation(),T(q.value,F)},"aria-label":`Supprimer ${q.label}`,children:o.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",children:o.jsx("path",{d:"M8.5 1.5L1.5 8.5M1.5 1.5L8.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]},`hidden-${q.value}-${B}`))})]})]}),o.jsxs("div",{className:se.actions,children:[_.length>0&&o.jsx("button",{type:"button",className:se.clearBtn,onClick:z,"aria-label":"Effacer tout",children:o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:o.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),o.jsx("svg",{className:`${se.chevron} ${h?se.chevronOpen:""}`,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M6 9l6 6 6-6"})})]})]}),h&&!d&&o.jsx("div",{className:se.dropdown,role:"listbox",children:j.length>0?j.map((q,B)=>o.jsx("div",{className:`${se.option} ${q.isHeader?se.optionHeader:""}`,onClick:()=>!q.isHeader&&w(q),role:"option","aria-selected":!1,children:q.label},`opt-${q.value}-${B}`)):o.jsx("div",{className:se.noOptions,children:t})})]})},Q9e="_container_h7jek_1",Rj={container:Q9e},exe=({a11yConfigs:e=[],titleKeys:t=[],labels:n=[],data:c=[],selectedUfs:i=[],icons:r=[],lastCardTextColor:s="black",boardColors:d={},order:l})=>{const h=k.useMemo(()=>{const g=i.length===0?c:c.filter(x=>x&&i.includes(String(x.uf).replace(/^0+/,""))),m=new Set;return g.filter(x=>{if(!x||!x.uf)return!1;const M=String(x.uf).replace(/^0+/,"");return m.has(M)?!1:(m.add(M),!0)})},[c,i]),u=k.useMemo(()=>h.reduce((g,m)=>({disponibles:g.disponibles+(m.totalAvailable??m.disponibles??0),homme:g.homme+(m.availableMen??m.disponibleHomme??0),femme:g.femme+(m.availableWomen??m.disponibleFemme??0),indifferencie:g.indifferencie+(m.availableIndifferentSex??m.indifferences??0),sorties:g.sorties+(m.outToday??m.sortie24??0),occupiedBed:g.occupiedBed+(m.occupiedBed??0),patientsPresents:g.patientsPresents+(m.patientsPresents??0),occupationRate:g.occupationRate+(m.occupationRate??0),occupesRaw:g.occupesRaw+(m.occupesRaw??0),ouvertsRaw:g.ouvertsRaw+(m.ouvertsRaw??0)}),{disponibles:0,homme:0,femme:0,indifferencie:0,sorties:0,occupiedBed:0,patientsPresents:0,occupationRate:0,occupesRaw:0,ouvertsRaw:0}),[h]),p=g=>d.disponibles?d.disponibles:g>3?"#35994E":g>=1?"#EF6C00":"#C62828",y={bars:"none",justifyContent:"flexStart",alignItems:"center",valueFontWeight:"400",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}},f=(g,m)=>{const x=l!==void 0&&m===l.length-1;switch(g){case"disponibles":return{...y,value:u.disponibles.toLocaleString("fr-FR"),backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",titleColor:"white",valueColor:"white"};case"occupiedBed":return{...y,value:u.occupiedBed.toLocaleString("fr-FR"),backgroundColor:d.occupes??d.homme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"patientsPresents":return{...y,value:u.patientsPresents.toLocaleString("fr-FR"),backgroundColor:d.patientsPresents??d.femme??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"};case"occupationRate":{const M=u.ouvertsRaw>0?parseFloat((u.occupesRaw/u.ouvertsRaw*100).toFixed(2)):u.occupationRate;return{...y,value:`${M.toLocaleString("fr-FR")}%`,backgroundColor:d.occupationRate??d.indifferencie??"#7DD493",valueFontSize:x?"3rem":"2.375rem",titleColor:"black",valueColor:"black"}}case"outToday":return{...y,value:u.sorties.toLocaleString("fr-FR"),backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",titleColor:s,valueColor:s}}};return l&&l.length>0?o.jsx("div",{className:Rj.container,children:l.map((g,m)=>o.jsx(xt,{a11yConfig:e[m],titleKey:t[m],label:n[m],iconName:r[m],...f(g,m)},g))}):o.jsxs("div",{className:Rj.container,children:[o.jsx(xt,{a11yConfig:e[0],titleKey:t[0],label:n[0],value:u.disponibles.toLocaleString("fr-FR"),iconName:r[0],backgroundColor:p(u.disponibles),valueFontSize:"2.5rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"white",valueColor:"white",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[1],titleKey:t[1],label:n[1],value:u.homme.toLocaleString("fr-FR"),iconName:r[1],backgroundColor:d.homme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[2],titleKey:t[2],label:n[2],value:u.femme.toLocaleString("fr-FR"),iconName:r[2],backgroundColor:d.femme??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[3],titleKey:t[3],label:n[3],value:u.indifferencie.toLocaleString("fr-FR"),iconName:r[3],backgroundColor:d.indifferencie??"#7DD493",valueFontSize:"2.375rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:"black",valueColor:"black",titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}}),o.jsx(xt,{a11yConfig:e[4],titleKey:t[4],label:n[4],value:u.sorties.toLocaleString("fr-FR"),iconName:r[4],backgroundColor:d.sorties??"#F2F9FC",valueFontSize:"3rem",valueFontWeight:"400",bars:"none",justifyContent:"flexStart",alignItems:"center",titleColor:s,valueColor:s,titleFontSize:"0.625rem",titleFontWeight:"600",cardGap:"2rem",style:{padding:"0.5rem"}})]})},txe="_container_1pt6c_1",axe="_chartContainer_1pt6c_14",nxe="_legend_1pt6c_22",oxe="_legendItem_1pt6c_29",cxe="_leftSection_1pt6c_41",ixe="_colorIndicator_1pt6c_47",rxe="_label_1pt6c_54",sxe="_rightSection_1pt6c_60",dxe="_ratio_1pt6c_66",lxe="_value1_1pt6c_73",hxe="_separator_1pt6c_78",uxe="_value2_1pt6c_82",pxe="_statusIndicator_1pt6c_87",yxe="_inactive_1pt6c_102",Oe={container:txe,chartContainer:axe,legend:nxe,legendItem:oxe,leftSection:cxe,colorIndicator:ixe,label:rxe,rightSection:sxe,ratio:dxe,value1:lxe,separator:hxe,value2:uxe,statusIndicator:pxe,inactive:yxe},Fj=Math.PI/180,kxe=({data:e,height:t=400,bg:n,backgroundColor:c,color:i,fontSize:r,fontWeight:s,padding:d,margin:l,borderRadius:h,className:u="",style:p={},labelColor:y,ratioColor:f,separatorColor:g,borderColor:m,hideDonut:x=!0,hideColorIndicator:M=!1})=>{const[v,L]=k.useState(new Set(e.map(N=>N.nom))),b=N=>{const w=new Set(v);w.has(N)?w.size>1&&w.delete(N):w.add(N),L(w)},C={...p,"--bg-color":n||c||"transparent","--text-color":i||"inherit","--font-size":r||"14px","--font-weight":s||"400","--padding":d||"0","--margin":l||"0","--border-radius":h||"0","--label-color":y||"inherit","--ratio-color":f||"inherit","--separator-color":g||"#03a9f4","--border-color":m||"#e0e0e0"},S=k.useMemo(()=>e.map(N=>({...N,displayValue:v.has(N.nom)?N.value:0})),[e,v]),_=k.useMemo(()=>e.every(N=>N.value===0),[e]),I=k.useMemo(()=>_?1:S.reduce((N,w)=>N+w.displayValue,0)||1,[_,S]),j=k.useCallback(({cx:N,cy:w,midAngle:$,innerRadius:V,outerRadius:T,value:z})=>{if(z===0||_)return null;const A=V+(T-V)*.5,q=N+A*Math.cos(-$*Fj),B=w+A*Math.sin(-$*Fj),F=Math.round(z/I*100);return o.jsx(a.Text,{x:q,y:B,fill:"white",textAnchor:"middle",dominantBaseline:"central",fontSize:12,fontWeight:"bold",children:`${F}%`})},[I,_]);return o.jsxs("div",{className:`${Oe.container} ${u}`,style:C,children:[!x&&o.jsx("div",{className:Oe.chartContainer,style:{height:t/2+100},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:"100%",children:o.jsx(a.PieChart,{children:o.jsx(a.Pie,{data:_?[{displayValue:1,color:"#A3C2CB"}]:S,cx:"50%",cy:"50%",innerRadius:45,outerRadius:75,paddingAngle:0,dataKey:"displayValue",stroke:"white",strokeWidth:_?0:2,startAngle:90,endAngle:450,labelLine:!1,label:j,isAnimationActive:!1,children:_?o.jsx(a.Cell,{fill:"#A3C2CB"}):S.map((N,w)=>o.jsx(a.Cell,{fill:N.color},`cell-${w}`))})})})}),o.jsx("div",{className:Oe.legend,children:e.map((N,w)=>{const $=v.has(N.nom);return o.jsxs("div",{className:`${Oe.legendItem} ${!x&&!$?Oe.inactive:""}`,onClick:()=>b(N.nom),style:{cursor:"pointer",transition:"opacity 0.2s"},children:[o.jsxs("div",{className:Oe.leftSection,children:[!M&&o.jsx("div",{className:Oe.colorIndicator,style:{backgroundColor:N.color,opacity:x||$?1:.3}}),o.jsx("span",{className:Oe.label,style:{opacity:x||$?1:.5},children:N.nom})]}),o.jsxs("div",{className:Oe.rightSection,style:{opacity:x||$?1:.5},children:[o.jsxs("div",{className:Oe.ratio,children:[o.jsx("span",{className:Oe.value1,children:N.value1}),o.jsx("span",{className:Oe.separator,children:"/"}),o.jsx("span",{className:Oe.value2,children:N.value2})]}),N.statusColor&&o.jsx("div",{className:Oe.statusIndicator,style:{backgroundColor:N.statusColor}})]})]},`legend-${w}`)})})]})},mxe="_container_1pc4v_1",fxe="_leftGroup_1pc4v_10",gxe="_iconBtn_1pc4v_16",ui={container:mxe,leftGroup:fxe,iconBtn:gxe},vxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M3 12h18M3 6h18M3 18h18"})),xxe=k.memo(vxe),Mxe=e=>te.createElement("svg",{width:"1em",height:"1em",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",...e},te.createElement("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8m-4-6-4-4-4 4m4-4v13"})),HA=k.memo(Mxe),_xe=({menuIcon:e,logoProps:t,actionIcon:n,style:c,className:i,bgColor:r="var(--header-bg)",color:s="var(--color-text)",borderBottomColor:d="var(--color-border)",borderBottomWidth:l=1,height:h="8vh",onMenuClick:u,onActionClick:p})=>{const y={backgroundColor:r,color:s,borderBottom:`${l}px solid ${d}`,height:h,...c};return o.jsxs("header",{className:[ui.container,i].filter(Boolean).join(" "),style:y,children:[o.jsxs("div",{className:ui.leftGroup,children:[o.jsx("button",{className:ui.iconBtn,onClick:u,"aria-label":"Menu",style:{color:"inherit"},children:e??o.jsx(xxe,{width:22,height:22})}),o.jsx(bL,{...t,size:"medium"})]}),o.jsx("button",{className:ui.iconBtn,onClick:p,"aria-label":"Action",style:{color:"inherit"},children:n??o.jsx(HA,{width:22,height:22})})]})},Lxe="_container_24g3e_1",Ixe="_iconBtn_24g3e_10",bxe="_title_24g3e_22",pi={container:Lxe,iconBtn:Ixe,title:bxe},wxe=({title:e="Menu",closeIcon:t,actionIcon:n,style:c,className:i,titleStyle:r,bgColor:s="var(--header-bg)",color:d="var(--color-text)",borderBottomColor:l="transparent",borderBottomWidth:h=0,height:u="8vh",onClose:p,onAction:y})=>{const f={backgroundColor:s,color:d,borderBottom:`${h}px solid ${l}`,height:u,...c};return o.jsxs("div",{className:[pi.container,i].filter(Boolean).join(" "),style:f,children:[o.jsx("button",{className:pi.iconBtn,onClick:p,"aria-label":"Fermer",style:{color:"inherit"},children:t??o.jsx(TA,{width:22,height:22})}),o.jsx("span",{className:pi.title,style:{fontWeight:"var(--font-weight-h)",fontSize:"var(--h5)",...r},children:e.toUpperCase()}),o.jsx("button",{className:pi.iconBtn,onClick:y,"aria-label":"Partager",style:{color:"inherit"},children:n??o.jsx(HA,{width:22,height:22})})]})};function DA(e){return e.state?e.state:e.active?"active":"available"}const Cxe=({title:e,countLabel:t="UF",actionIcon:n=o.jsx(yt,{size:16}),onAction:c,items:i=[],onItemClick:r,activeColor:s="#0083bb",id:d,children:l})=>{const h=k.useMemo(()=>i.filter(u=>DA(u)==="active").length,[i]);return o.jsxs(Nxe,{id:d,children:[o.jsxs(Sxe,{children:[o.jsxs(jxe,{children:[o.jsx($xe,{children:e}),o.jsxs(qxe,{children:["(",h," ",t,")"]})]}),c&&o.jsx(Axe,{onClick:c,title:"Action",children:n})]}),o.jsx(zxe,{children:o.jsx(Pxe,{children:i.map(u=>o.jsx(Txe,{item:u,activeColor:s,onItemClick:r},u.id))})}),l&&o.jsx(Hxe,{children:l})]})},Nxe=R.div`
8348
8348
  background: white;
8349
8349
  border: 1px solid #ddd;
8350
8350
  border-radius: 4px;