@tsiky/components-r19 7.0.4 → 7.0.6

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
@@ -8331,7 +8331,7 @@
8331
8331
  &:hover:not(:disabled) {
8332
8332
  background-color: ${e=>e.$active?"var(--color-primary)":"var(--color-background, #f3f4f6)"};
8333
8333
  }
8334
- `,Eke="_mpRoot_31595_1",Oke="_mpHeader_31595_22",Uke="_mpTitle_31595_31",Wke="_mpList_31595_35",Gke="_mpVertical_31595_41",Kke="_mpHorizontal_31595_46",Zke="_mpItem_31595_55",Xke="_mpClickable_31595_95",Yke="_mpLeft_31595_117",Jke="_mpIcon_31595_125",Qke="_mpMeta_31595_140",e3e="_mpLabel_31595_145",t3e="_mpDate_31595_154",a3e="_mpRight_31595_160",n3e="_mpValue_31595_168",o3e="_mpHint_31595_176",c3e="_mpBadge_31595_180",i3e="_mpBadgeTop_31595_199",r3e="_mpBadgeSub_31595_206",s3e="_mpBadgeSmall_31595_213",d3e="_mpPill_31595_229",l3e="_mpRounded_31595_232",h3e="_mpCompact_31595_236",u3e="_compactItemWrapper_31595_252",p3e="_mpSummaryRoot_31595_265",y3e="_mpSummaryInner_31595_269",k3e="_mpSummaryFlex_31595_284",m3e="_mpSummaryCardWrapperHorizontal_31595_292",f3e="_mpSummaryCardWrapper_31595_292",g3e="_mpSummaryCardHorizontal_31595_303",v3e="_mpSummaryCard_31595_292",x3e="_mpSummaryValue_31595_321",M3e="_mpSummaryLabel_31595_327",_3e="_mpSummaryBadge_31595_338",L3e="_mpSummaryBadgeSub_31595_357",I3e="_mpEmpty_31595_365",b3e="_mpSummaryVertical_31595_372",w3e="_mpIconSquare_31595_380",J={mpRoot:Eke,mpHeader:Oke,mpTitle:Uke,mpList:Wke,mpVertical:Gke,mpHorizontal:Kke,mpItem:Zke,mpClickable:Xke,mpLeft:Yke,mpIcon:Jke,mpMeta:Qke,mpLabel:e3e,mpDate:t3e,mpRight:a3e,mpValue:n3e,mpHint:o3e,mpBadge:c3e,mpBadgeTop:i3e,mpBadgeSub:r3e,mpBadgeSmall:s3e,mpPill:d3e,mpRounded:l3e,mpCompact:h3e,compactItemWrapper:u3e,mpSummaryRoot:p3e,mpSummaryInner:y3e,mpSummaryFlex:k3e,mpSummaryCardWrapperHorizontal:m3e,mpSummaryCardWrapper:f3e,mpSummaryCardHorizontal:g3e,mpSummaryCard:v3e,mpSummaryValue:x3e,mpSummaryLabel:M3e,mpSummaryBadge:_3e,mpSummaryBadgeSub:L3e,mpEmpty:I3e,mpSummaryVertical:b3e,mpIconSquare:w3e},Tt=(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})`},C3e=({item:e,shape:t,onItemClick:n,color:c,renderItem:i})=>{const r=m.useCallback(()=>{n?.(e)},[n,e]),s=[J.mpItem,t==="pill"?J.mpPill:J.mpRounded,n?J.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:J.mpLeft,children:[h?o.jsx("div",{className:J.mpIconSquare,style:{background:u??Tt(p??c??"#7c3aed",1),border:`1px solid ${Tt(p??c??"#7c3aed",.18)}`,color:p??"#ffffff"},children:m.createElement(h,{size:20,color:p??"#fff",strokeWidth:1.8})}):e.icon?o.jsx("div",{className:J.mpIcon,children:e.icon}):null,o.jsxs("div",{className:J.mpMeta,children:[o.jsx("div",{className:J.mpLabel,children:e.label}),e.subLabel&&o.jsx("div",{className:J.mpDate,children:e.subLabel}),e.date&&o.jsx("div",{className:J.mpDate,children:e.date})]})]}),o.jsxs("div",{className:J.mpRight,children:[o.jsx("div",{className:J.mpValue,style:{color:e.valueColor??c??void 0},children:e.value}),e.badge?o.jsxs("div",{className:[J.mpBadge,e.badge.small?J.mpBadgeSmall:""].join(" "),style:{backgroundColor:e.badge.bg??Tt(e.badge.color||c||"#7c3aed",.12),borderColor:e.badge.bg?"transparent":Tt(e.badge.color||c||"#7c3aed",.18),color:e.badge.color??e.badge.textColor??"#0f172a",fontWeight:600},children:[o.jsx("div",{className:J.mpBadgeTop,children:e.badge.text}),e.badge.subText&&o.jsx("div",{className:J.mpBadgeSub,children:e.badge.subText})]}):e.hint?o.jsx("div",{className:J.mpHint,children:e.hint}):null]})]})},N3e=m.memo(C3e),LS=({title:e,right:t})=>!e&&!t?null:o.jsxs("div",{className:J.mpHeader,children:[o.jsx("div",{className:J.mpTitle,children:e}),o.jsx("div",{children:t})]}),IS=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},j3e=({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??IS("#7c3aed",.12),border:`1px solid ${IS(e.iconColor??"#7c3aed",.12)}`,boxShadow:"none"},children:e.iconComponent?m.createElement(e.iconComponent,{size:18,color:e.iconColor??"#7c3aed",strokeWidth:1.6}):null})]}),S3e=({item:e,bg:t,onClick:n,width:c,height:i,extraStyle:r})=>o.jsxs("div",{className:J.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:J.mpSummaryLabel,children:e.label}),o.jsx("div",{className:J.mpSummaryValue,style:{color:e.valueColor??"#2a24deff"},children:e.value}),e.badge&&o.jsxs("div",{className:J.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:J.mpSummaryBadgeSub,children:e.badge.subText})]})]}),bS=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},wS=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:bS("#7c3aed",.08),border:`1px solid ${e.badge.bg?e.badge.bg:bS("#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]})]}),CS=(e,t)=>{try{if(typeof e=="function"){const n=e(t);if(n!==void 0)return n}}catch{}try{return m.createElement(e,{item:t})}catch(n){return console.warn("chooseDefaultRender: impossible de rendre CompactRenderer",n),null}},$3e=e=>{switch(e){case"image":return t=>m.createElement(j3e,{item:t});case"pertinence":return t=>m.createElement(S3e,{item:t});case"alternateHorizontal":return t=>CS(wS,t);case"compact":return t=>CS(wS,t);case"summary":return;case"default":default:return}},yA=({item:e,orientation:t,bg:n,border:c,valueColor:i,onClick:r,width:s,height:d,extraStyle:l})=>{const u=t==="horizontal"?J.mpSummaryCardHorizontal:J.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:J.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:J.mpSummaryBadgeSub,children:e.badge.subText})]}),o.jsx("div",{className:J.mpSummaryValue,style:{color:i},children:e.value}),o.jsx("div",{className:J.mpSummaryLabel,children:e.label})]})},q3e=["transparent","transparent","transparent","transparent"],A3e=["transparent","transparent","transparent","transparent"],z3e=["#059669","#2563eb","#b45309","#7c3aed"],V3e=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},kA=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=q3e,summaryBorderColors:k=A3e,summaryValueColors:x=z3e,preset:M,background:v}=e,{itemsContainerStyle:I,itemsContainerClassName:b,summaryGridColumns:C,compactItemWidth:w,compactItemHeight:_,compactItemStyle:L,summaryCardWidth:S,summaryCardHeight:N,summaryCardStyle:j}=e,A=n==="vertical",B={"--mp-accent":r,"--mp-accent-soft":V3e(r,.08),"--mp-bg-primary":v},D=[J.mpRoot,A?J.mpVertical:J.mpHorizontal,s?J.mpCompact:"",f?J.mpSummaryRoot:"",c!=="auto"?c==="vertical"?J.mpOrientationVertical:J.mpOrientationHorizontal:"",h].filter(Boolean).join(" "),V=m.useMemo(()=>y||($3e(M)??void 0),[y,M]);if(f){const q=c==="horizontal"?J.mpSummaryFlex:J.mpSummaryVertical,H={...(C?{display:"grid",gridTemplateColumns:`repeat(${C}, 1fr)`,gap:18,alignItems:"stretch",width:"100%"}:void 0)??{},...I??{}};return o.jsxs("div",{className:D,style:B,"aria-busy":u,children:[d&&o.jsx(LS,{title:d}),o.jsx("div",{className:J.mpSummaryInner,children:o.jsx("div",{className:`${q} ${b??""}`,style:H,children:t.length===0?o.jsx("div",{className:J.mpEmpty,children:p}):t.map((R,z)=>{const U=R.bgColor??g[z%g.length],X=R.borderColor??k[z%k.length],ie=R.valueColor??x[z%x.length];return V?o.jsx("div",{className:c==="horizontal"?J.mpSummaryCardWrapperHorizontal:J.mpSummaryCardWrapper,style:{width:S??void 0,height:N??void 0,...j??{}},children:V(R,z)},R.id):o.jsx(yA,{item:R,orientation:c==="horizontal"?"horizontal":"vertical",bg:U,border:X,valueColor:ie,onClick:l,width:S??void 0,height:N??void 0,extraStyle:j},R.id)})})})]})}return o.jsxs("div",{className:D,style:B,"aria-busy":u,children:[d&&o.jsx(LS,{title:d}),o.jsx("div",{className:J.mpList,style:I,children:u?o.jsx("div",{className:J.mpEmpty,children:"Chargement…"}):t.length===0?o.jsx("div",{className:J.mpEmpty,children:p}):t.map(q=>{const $=s?{width:w??void 0,height:_??void 0,boxSizing:"border-box",...L??{}}:void 0;return o.jsx("div",{className:s?J.compactItemWrapper:void 0,style:$,children:o.jsx(N3e,{item:q,shape:i,onItemClick:l,color:r,renderItem:V?H=>V(H,t.indexOf(H)):void 0})},q.id)})})]})};m.memo(kA);const P3e=({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,k=n?typeof n=="number"?`${n}px`:n:void 0,x=r&&typeof r=="object"&&!m.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?xt[M.icon]:void 0,I=28,b=M?.iconSize??I,C=["chart-container",`variant-${u}`,p?"with-border":"",d].filter(Boolean).join(" "),w=c.contentBackground??void 0,_=typeof h=="number"?`${h}px`:h;return o.jsxs("div",{className:C,style:{width:g,height:k,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:Z(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:w},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)||I})}),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}))})]})},tC=({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:k,titleKey:x})=>{const M=c||y?.icon,v=typeof M=="string",I=v?xt[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:Z(k,x),children:[I&&o.jsx(I,{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:"✕"})]})},mA=m.createContext(null),T3e=(e="alert")=>`${e}_${Math.random().toString(36).slice(2,9)}`,H3e=({children:e,defaultDuration:t=4e3,maxAlerts:n,containerClassName:c,containerStyle:i})=>{const[r,s]=m.useState([]),d=m.useRef(new Map),l=m.useRef(null),h=m.useRef(null),u=m.useRef(n);m.useEffect(()=>()=>{d.current.forEach(_=>window.clearTimeout(_)),d.current.clear()},[]);const p=(_,L)=>{const S=L===void 0||L===0?t:L;if(S===-1)return;const N=window.setTimeout(()=>{g(_)},S);d.current.set(_,N)},y=_=>{const L=d.current.get(_);L&&(window.clearTimeout(L),d.current.delete(_))},f=_=>{const L=T3e(),S={..._,id:L,createdAt:Date.now()};return s(N=>{const j=[S,...N],A=u.current;return typeof A=="number"&&A>=0&&j.length>A?(j.slice(A).forEach(D=>y(D.id)),j.slice(0,A)):j}),p(L,_.duration),L},g=_=>{y(_),s(L=>L.filter(S=>S.id!==_))},k=(_,L)=>{s(S=>S.map(N=>N.id===_?{...N,...L}:N))},x=()=>{d.current.forEach(_=>window.clearTimeout(_)),d.current.clear(),s([])},M=_=>{h.current=_},v=()=>r.slice(),I=m.useMemo(()=>({showAlert:f,dismissAlert:g,updateAlert:k,clearAlerts:x,setContainerRef:M,getAlertsSnapshot:v}),[r]),b=h.current,C=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"},children:o.jsx(mle,{mode:"popLayout",children:r.map(_=>o.jsx(Xw.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:"100%",pointerEvents:"auto",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.12)",borderRadius:"8px",marginBottom:"6px",backgroundColor:_.background||_.model?.background||"var(--color-background, #fff)",border:"1px solid rgba(0, 0, 0, 0.08)",overflow:"hidden"},children:o.jsx(tC,{id:_.id,text:_.text,subtext:_.subtext,icon:_.icon,background:"transparent",colorTextPrimary:_.colorTextPrimary,colorTextSub:_.colorTextSub,model:_.model,onClose:()=>g(_.id),size:"100%",style:{boxShadow:"none"}})},_.id))})}),w=o.jsx("div",{ref:_=>{h.current||(l.current=_)},className:c,style:{width:"100%",position:"relative",...i},"aria-live":"polite",children:C});return o.jsxs(mA.Provider,{value:I,children:[b?mw.createPortal(C,b):w,e]})},D3e=()=>{const e=m.useContext(mA);if(!e)throw new Error("useAlerts must be used inside an AlertsProvider");return e},B3e={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"}},R3e="_container_18zbo_1",F3e="_icon_18zbo_9",E3e="_selectWrapper_18zbo_23",Hb={container:R3e,icon:F3e,selectWrapper:E3e},O3e=({options:e,defaultValue:t,onChange:n,label:c})=>{const[i,r]=m.useState(t||e[0]?.value||""),s=d=>{r(d),n?.(d)};return o.jsxs("div",{className:Hb.container,children:[o.jsxs("div",{className:Hb.icon,children:[o.jsx(w1,{size:18}),o.jsx("p",{children:c})]}),o.jsx("div",{className:Hb.selectWrapper,children:o.jsx(Yw,{field:{name:"periode",label:"",options:e},value:i,onChange:s,onBlur:()=>{}})})]})},U3e=250,W3e=m.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]=m.useState(!1),[k,x]=m.useState(!1),M=m.useRef(null),v=m.useRef(null),I=m.useRef(null),b=m.useRef(null);m.useEffect(()=>{const _=M.current;if(!_)return;const L=_.parentElement;return L?(window.getComputedStyle(L).position==="static"&&(L.setAttribute("data-scp-prev-position",L.style.position??""),L.style.position="relative",L.setAttribute("data-scp-position-changed","true")),()=>{if(L.getAttribute("data-scp-position-changed")==="true"){const N=L.getAttribute("data-scp-prev-position")??"";L.style.position=N,L.removeAttribute("data-scp-position-changed"),L.removeAttribute("data-scp-prev-position")}}):void 0},[]),m.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]),m.useEffect(()=>{const _=v.current;b.current&&(window.clearTimeout(b.current),b.current=null);const L=S=>{if(S.target===_&&!(S.propertyName!=="transform"&&S.propertyName!=="opacity"))if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}};return _&&(_.addEventListener("transitionend",L),b.current=window.setTimeout(()=>{if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}},U3e+60)),f&&(I.current=document.activeElement),()=>{_&&_.removeEventListener("transitionend",L),b.current&&(window.clearTimeout(b.current),b.current=null)}},[f,i,s]),m.useEffect(()=>{const _=L=>{L.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))},w=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"} ${k?"interactive":""} ${l}`,style:{width:w,...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(Qe,{size:18})})]}),o.jsx("div",{className:"scp-body",children:h})]})]})});function G3e(e){const t=m.useRef("");m.useEffect(()=>{if(e){t.current=document.body.style.overflow,document.body.style.overflow="hidden";return}document.body.style.overflow=t.current||""},[e])}const K3e="_container_1pfsp_1",Z3e="_title_1pfsp_8",NS={container:K3e,title:Z3e},X3e=({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:`${NS.container} ${c}`,style:r,children:o.jsx("h2",{className:NS.title,children:e})})},Y3e="_modalOverlay_1878x_1",J3e="_modalContainer_1878x_16",Q3e="_modalTitle_1878x_29",eme="_modalInput_1878x_38",tme="_modalTextarea_1878x_39",ame="_modalActions_1878x_70",nme="_cancelBtn_1878x_77",ome="_saveBtn_1878x_99",cme="_inputError_1878x_141",ime="_inlineAlert_1878x_146",at={modalOverlay:Y3e,modalContainer:J3e,modalTitle:Q3e,modalInput:eme,modalTextarea:tme,modalActions:ame,cancelBtn:nme,saveBtn:ome,inputError:cme,inlineAlert:ime},Bc=({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]=m.useState({}),f=m.useRef(null),[g,k]=m.useState(!1),[x,M]=m.useState(!1),v=m.useRef(null);if(m.useEffect(()=>{if(!e)return;const _={};for(const L of i)_[L.name]=Object.prototype.hasOwnProperty.call(r,L.name)?r[L.name]:"";return y(_),requestAnimationFrame(()=>{f.current?.focus();const L=f.current;if(L&&typeof L.selectionStart=="number"){const S=String(L.value??"").length;L.setSelectionRange(S,S)}}),()=>{v.current&&(window.clearTimeout(v.current),v.current=null)}},[e]),m.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 I=(_,L)=>{y(S=>({...S,[_]:L})),l&&l(_,L)},b=async()=>{if(!Object.values(p).some(_=>_===""||_===void 0))try{k(!0);const _=await n(p);if(typeof _=="string"&&_==="duplicate-same"){k(!1);return}y({}),k(!1),t()}catch(_){console.error("AddItemModal onSave error:",_),k(!1),t()}},C=_=>{_.target===_.currentTarget&&t()},w=_=>_.stopPropagation();return o.jsx("div",{className:at.modalOverlay,onMouseDown:C,role:"dialog","aria-modal":"true",children:o.jsxs("div",{className:at.modalContainer,onMouseDown:w,onClick:w,children:[o.jsx("h2",{className:at.modalTitle,children:c}),i.map((_,L)=>{const S=p[_.name]??"",N=L===0&&!!s,j={name:_.name,placeholder:_.placeholder||_.label,value:String(S),onChange:A=>I(_.name,A.target.value),className:_.type==="textarea"?`${at.modalTextarea} ${N?at.inputError:""}`:`${at.modalInput} ${N?at.inputError:""}`,tabIndex:0,disabled:g};return L===0&&(j.ref=A=>{f.current=A}),o.jsxs("div",{style:{marginBottom:8},children:[_.type==="textarea"?o.jsx("textarea",{rows:_.rows||4,...j}):o.jsx("input",{type:_.type||"text",...j}),L===0&&x&&s&&o.jsx("div",{style:{marginTop:8},children:o.jsx(tC,{text:s,background:"#fff5f5",colorTextPrimary:"#ef4444",onClose:()=>M(!1),className:at.inlineAlert})})]},_.name)}),o.jsxs("div",{className:at.modalActions,children:[o.jsx("button",{className:at.cancelBtn,onClick:t,type:"button",disabled:g,children:u}),o.jsx("button",{className:at.saveBtn,onClick:b,type:"button",disabled:g||!!d,children:g?"En cours...":h})]})]})})},rme=({title:e,keyCount:t,onAddKey:n,a11yConfig:c})=>{const[i,r]=m.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:Z(c,e),children:e}),o.jsxs("p",{children:[t," clés"]})]}),o.jsxs("button",{onClick:()=>r(!0),className:"add-key-button",children:[o.jsx(Vc,{className:"add-key-icon"}),"Clé"]}),o.jsx(Bc,{isOpen:i,title:"Ajouter une clé",onClose:()=>r(!1),onSave:s,fields:[{name:"key",label:"Nouvelle clé",placeholder:"Entrer une nouvelle clé"}]})]})},sme=({modules:e,onEdit:t,onDelete:n,onAddModule:c,onSelectModule:i,addModalFields:r,addModalTitle:s})=>{const[d,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(null),[f,g]=m.useState(!1),k=()=>l(!0),x=()=>l(!1),M=_=>{if(c){const L=_.code?.trim()||_.id?.trim(),S=_.title?.trim(),N=L||S||String(Date.now()),j=S||L||`Module ${N}`;c({id:N,title:j,subtitle:"",translations:{}})}x()},v=(_,L)=>{_.stopPropagation(),u(L)},I=()=>u(null),b=_=>{if(!h){I();return}const L={...h,title:_.title||h.title,subtitle:""};t&&t(L),I()},C=(_,L)=>{_.stopPropagation(),n&&n(L)},w=_=>{y(_.id),i&&i(_)};return f?o.jsx("div",{className:"module-sidebar collapsed",children:o.jsx(n1,{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(zc,{size:18,className:"header-folder",onClick:k}),o.jsx(n1,{size:18,className:"header-menu",onClick:()=>g(!0)})]})]}),o.jsx("hr",{className:"divider"}),o.jsx("div",{className:"module-list",children:e.map(_=>{const L=Object.keys(_.translations||{}).length,S=L>0||_.id===p;return o.jsxs("div",{className:`module-item ${_.id===p?"selected":""}`,onClick:()=>w(_),role:"button",tabIndex:0,onKeyDown:N=>{N.key==="Enter"&&w(_)},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,S&&o.jsxs("span",{className:"count",children:[" ",L," "]})]}),_.subtitle?o.jsx("div",{className:"module-subtitle",children:_.subtitle}):null]})]}),o.jsxs("div",{className:"module-actions",children:[t&&o.jsx(o1,{onClick:N=>v(N,_),color:"#777",size:16}),n&&o.jsx(ut,{onClick:N=>C(N,_.id),color:"#777",size:16})]})]},_.id)})}),o.jsx(Bc,{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(Bc,{isOpen:!!h,onClose:I,onSave:b,title:"Éditer le module",initialValues:{title:h.title},fields:[{name:"title",label:"Titre",placeholder:"Titre du module"}]})]})},fA=({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:Z(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}`})]}),dme=({keyName:e,translations:t,availableLanguages:n,onDeleteKey:c,onEditKey:i,onEditTranslation:r,onDeleteTranslation:s,onAddTranslation:d,draggable:l=!1,checkDuplicateLocal:h})=>{const[u,p]=m.useState(!1),[y,f]=m.useState(""),[g,k]=m.useState(null),[x,M]=m.useState(""),[v,I]=m.useState(""),[b,C]=m.useState(!1),[w,_]=m.useState(!1),[L,S]=m.useState(null),[N,j]=m.useState(!1),A=t.map(z=>z.language),B=n.filter(z=>!A.includes(z.code)),D=()=>{y&&v.trim()&&(d?.(e,y,v.trim()),f(""),I(""),p(!1))},V=(z,U)=>{k(z),M(U)},q=z=>{r?.(e,z,x),k(null),M("")},$=()=>{k(null),M("")},H=async z=>{const U=z.name?.trim();if(U){if(S(null),j(!1),U===e||!i)return C(!1),"ok";try{const X=await i(e,U);if(typeof X=="string"&&X==="ok")C(!1),S(null);else{if(typeof X=="string"&&X==="duplicate-same")return S("Une clé existe déjà dans ce module."),j(!0),"duplicate-same";if(typeof X=="string"&&X==="duplicate-other")return C(!1),S(null),"duplicate-other";C(!1)}}catch(X){console.error("Erreur handleRenameSave:",X),S("Erreur lors du renommage.")}}},R=(z,U)=>{if(z!=="name")return;const X=U.trim();S(null),j(!1),X&&typeof h=="function"&&(h(X,e)?(S("Une clé existe déjà dans ce module."),j(!0)):(S(null),j(!1)))};return o.jsxs("div",{className:`translation-key ${w?"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:()=>_(!w),title:w?"Déplier":"Replier",children:w?o.jsx(N1,{className:"collapse-icon"}):o.jsx(Ht,{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:z=>{z.stopPropagation(),C(!0)},title:"Renommer la clé",children:o.jsx(ft,{className:"action-icon"})}),o.jsx("button",{onClick:z=>{z.stopPropagation(),c?.(e)},className:"action-button delete",title:"Supprimer la clé",children:o.jsx(ut,{className:"action-icon"})})]})]}),o.jsx("div",{className:`translations-container ${w?"":"expanded"}`,children:!l&&o.jsxs(o.Fragment,{children:[t.map(z=>o.jsxs("div",{className:"translation-row",children:[o.jsx("div",{className:"language-code",children:z.language}),o.jsx("div",{className:"translation-content",children:g===z.language?o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"text",value:x,onChange:U=>M(U.target.value),className:"edit-input",autoFocus:!0,onKeyDown:U=>{U.key==="Enter"&&q(z.language),U.key==="Escape"&&$()}}),o.jsx("button",{onClick:()=>q(z.language),className:"save-button",disabled:!x.trim(),children:"Enregistrer"}),o.jsx("button",{onClick:$,className:"cancel-button",children:o.jsx(Qe,{className:"action-icon"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"translation-text",title:z.value,children:z.value}),o.jsx("button",{onClick:()=>V(z.language,z.value),className:"edit-button",title:"Éditer la traduction",children:o.jsx(ft,{className:"action-icon"})}),o.jsx("button",{onClick:()=>s?.(e,z.language),className:"delete-translation-button",title:"Supprimer la traduction",children:o.jsx(Qe,{className:"action-icon"})})]})})]},z.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:z=>f(z.target.value),className:"language-select",children:[o.jsx("option",{value:"",children:"Sélectionnez la langue"}),B.map(z=>o.jsxs("option",{value:z.code,children:[z.name," (",z.code,")"]},z.code))]})}),y&&o.jsx("input",{type:"text",value:v,onChange:z=>I(z.target.value),placeholder:"Entrez la traduction...",className:"translation-input",onKeyDown:z=>{z.key==="Enter"&&D(),z.key==="Escape"&&(p(!1),f(""),I(""))}}),o.jsx("button",{onClick:D,disabled:!y||!v.trim(),className:"save-button",children:"Ajouter"}),o.jsx("button",{onClick:()=>{p(!1),f(""),I("")},className:"cancel-button",children:o.jsx(Qe,{className:"action-icon"})})]})]}):o.jsxs("button",{onClick:()=>p(!0),className:"show-add-button",disabled:B.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(Bc,{isOpen:b,onClose:()=>{C(!1),S(null),j(!1)},onSave:H,onFieldChange:R,title:"Renommer la clé",initialValues:{name:e},fields:[{name:"name",label:"Nom de la clé",placeholder:"Nom de la clé"}],errorMessage:L||"",disableSave:N})]})},lme="_wrapper_1wvht_1",hme="_leftGroup_1wvht_12",ume="_filterButton_1wvht_21",pme="_open_1wvht_42",yme="_filterIcon_1wvht_42",kme="_infoText_1wvht_58",mme="_pickerContainer_1wvht_66",fme="_srOnly_1wvht_79",gme="_pickerLabel_1wvht_91",vme="_datetime_1wvht_98",xme="_rightGroup_1wvht_107",Mme="_searchInputWrap_1wvht_116",_me="_searchInput_1wvht_116",Lme="_searchIcon_1wvht_152",De={wrapper:lme,leftGroup:hme,filterButton:ume,open:pme,filterIcon:yme,infoText:kme,pickerContainer:mme,srOnly:fme,pickerLabel:gme,datetime:vme,rightGroup:xme,searchInputWrap:Mme,searchInput:_me,searchIcon:Lme};function Ime({onDateChange:e,onSearch:t,initialDate:n}){const[c,i]=m.useState(!1),[r,s]=m.useState(n??""),d=m.useRef(null);m.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)},[]),m.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:De.wrapper,ref:d,children:[o.jsxs("div",{className:De.leftGroup,children:[o.jsxs("button",{type:"button",className:`${De.filterButton} ${c?De.open:""}`,onClick:l,"aria-expanded":c,"aria-haspopup":"dialog","aria-controls":"entry-datetime",children:[o.jsx("span",{children:"Entry time"}),o.jsx("svg",{className:De.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:De.infoText,children:"Confidence interval: step ± 15' / exit ± 30'"}),c&&o.jsxs("div",{className:De.pickerContainer,role:"dialog","aria-label":"Choisir la date et l’heure",children:[o.jsx("label",{className:De.pickerLabel,htmlFor:"entry-datetime",children:o.jsx("span",{className:De.srOnly,children:"Choisir la date et l’heure"})}),o.jsx("input",{id:"entry-datetime",className:De.datetime,type:"datetime-local",value:r,onChange:h,"aria-label":"Date et heure d’entrée"})]})]}),o.jsx("div",{className:De.rightGroup,children:o.jsxs("div",{className:De.searchInputWrap,children:[o.jsx("input",{className:De.searchInput,placeholder:"Search...",onChange:u,"aria-label":"Search"}),o.jsx("svg",{className:De.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 bme=({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:[],k=g.length===0,x=g.every(b=>typeof b=="string"),M=g.some(b=>Array.isArray(b)),v=(b,C,w)=>d?d(b,C,w):o.jsx("span",{className:"slb-cell-text",children:b}),I=f?{"--col-gap":f}:void 0;return k?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:I,children:g.map((b,C)=>{const w=s[C]||"";if(Array.isArray(b)){const[_,L]=b;return o.jsxs("div",{className:`slb-row ${w}`,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(L,C,1)})]},C)}return o.jsxs("div",{className:`slb-row ${w}`,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)})})]})},wme=({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,k)=>{const x=u[k]||"";if(Array.isArray(g)){const[M,v]=g,I=s[k]||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:I,padding:d,width:l,minWidth:l},children:M})}),o.jsx("div",{className:"clb-text",children:v})]},k)}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})]},k):o.jsx("div",{className:`clb-fullrow ${x}`,style:{background:h??void 0},children:o.jsx("span",{children:g})},k)})})]})},Cme=({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)})})]})},Nme=({className:e="",style:t={},children:n,gap:c="1rem"})=>o.jsx("div",{className:`frc-root ${e}`,style:{...t,"--frc-gap":c},children:m.Children.map(n,i=>o.jsx("div",{className:"frc-item",children:i}))}),jme=({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:m.Children.map(n,r=>o.jsx("div",{className:"lcc-cell",children:r}))}),Sme="_overlay_3x4or_2",$me="_fadeIn_3x4or_1",qme="_popup_3x4or_17",Ame="_slideUp_3x4or_1",zme="_header_3x4or_28",Vme="_body_3x4or_40",Pme="_footer_3x4or_51",Tme="_cancelButton_3x4or_59",Hme="_confirmButton_3x4or_77",Dme="_warning_3x4or_97",Bme="_danger_3x4or_106",Rme="_info_3x4or_115",jt={overlay:Sme,fadeIn:$me,popup:qme,slideUp:Ame,header:zme,body:Vme,footer:Pme,cancelButton:Tme,confirmButton:Hme,warning:Dme,danger:Bme,info:Rme},Fme=({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:jt.overlay,onClick:l,onKeyDown:h,role:"dialog","aria-labelledby":"confirmation-title","aria-describedby":"confirmation-message",children:o.jsxs("div",{className:`${jt.popup} ${jt[d]}`,children:[o.jsx("div",{className:jt.header,children:o.jsx("h3",{id:"confirmation-title",children:t})}),o.jsx("div",{className:jt.body,children:o.jsx("p",{id:"confirmation-message",children:n})}),o.jsxs("div",{className:jt.footer,children:[o.jsx("button",{className:jt.cancelButton,onClick:i,type:"button",children:s}),o.jsx("button",{className:jt.confirmButton,onClick:c,type:"button",autoFocus:!0,children:r})]})]})})},Eme=()=>{const[e,t]=m.useState({isOpen:!1,title:"",message:"",onConfirm:null}),n=m.useCallback((r,s,d)=>{t({isOpen:!0,title:r,message:s,onConfirm:d})},[]),c=m.useCallback(()=>{t(r=>({...r,isOpen:!1,onConfirm:null}))},[]),i=m.useCallback(()=>{e.onConfirm?.(),c()},[e.onConfirm,c]);return{isOpen:e.isOpen,title:e.title,message:e.message,showConfirmation:n,hideConfirmation:c,handleConfirm:i}},Ome="_container_1l44m_1",Ume="_selectButton_1l44m_7",Wme="_disabled_1l44m_22",Gme="_error_1l44m_39",Kme="_outline_1l44m_52",Zme="_filled_1l44m_58",Xme="_sm_1l44m_67",Yme="_md_1l44m_73",Jme="_lg_1l44m_79",Qme="_buttonContent_1l44m_85",e6e="_label_1l44m_93",t6e="_placeholder_1l44m_103",a6e="_iconsContainer_1l44m_108",n6e="_loadingSpinner_1l44m_115",o6e="_spin_1l44m_1",c6e="_arrowIcon_1l44m_133",i6e="_arrowIconOpen_1l44m_141",r6e="_dropdown_1l44m_146",s6e="_dropdownIn_1l44m_1",d6e="_searchContainer_1l44m_171",l6e="_searchInputWrapper_1l44m_177",h6e="_searchIcon_1l44m_183",u6e="_searchInput_1l44m_177",p6e="_optionsList_1l44m_208",y6e="_noResults_1l44m_231",k6e="_option_1l44m_208",m6e="_optionHighlighted_1l44m_261",f6e="_optionSelected_1l44m_266",g6e="_optionDisabled_1l44m_277",v6e="_optionLabel_1l44m_283",x6e="_checkIcon_1l44m_291",M6e="_widthFull_1l44m_299",_6e="_width64_1l44m_302",L6e="_width80_1l44m_305",I6e="_width96_1l44m_308",se={container:Ome,selectButton:Ume,disabled:Wme,error:Gme,default:"_default_1l44m_48",outline:Kme,filled:Zme,sm:Xme,md:Yme,lg:Jme,buttonContent:Qme,label:e6e,placeholder:t6e,iconsContainer:a6e,loadingSpinner:n6e,spin:o6e,arrowIcon:c6e,arrowIconOpen:i6e,dropdown:r6e,dropdownIn:s6e,searchContainer:d6e,searchInputWrapper:l6e,searchIcon:h6e,searchInput:u6e,optionsList:p6e,noResults:y6e,option:k6e,optionHighlighted:m6e,optionSelected:f6e,optionDisabled:g6e,optionLabel:v6e,checkIcon:x6e,widthFull:M6e,width64:_6e,width80:L6e,width96:I6e},b6e=({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"})=>{const[p,y]=m.useState(!1),[f,g]=m.useState(""),[k,x]=m.useState(0),[M,v]=m.useState({top:0,left:0,width:0}),I=m.useRef(null),b=m.useRef(null),C=m.useRef(null),w=m.useMemo(()=>f?e.filter(q=>q.label.toLowerCase().includes(f.toLowerCase())):e,[e,f]),_=e.find(q=>q.value===t),L=m.useCallback(()=>{if(I.current){const q=I.current.getBoundingClientRect();v({top:q.top,left:q.left,width:q.width})}},[]);m.useEffect(()=>(p&&(L(),window.addEventListener("scroll",L,!0),window.addEventListener("resize",L)),()=>{window.removeEventListener("scroll",L,!0),window.removeEventListener("resize",L)}),[p,L]),m.useEffect(()=>{const q=$=>{I.current&&!I.current.contains($.target)&&b.current&&!b.current.contains($.target)&&(y(!1),g(""))};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]),m.useEffect(()=>{x(0)},[w]);const S=q=>{q.disabled||(n?.(q.value,q),y(!1),g(""))},N=q=>{g(q.target.value),p||y(!0)},j=q=>{if(!p){(q.key==="ArrowDown"||q.key==="Enter")&&y(!0);return}switch(q.key){case"ArrowDown":q.preventDefault(),x($=>$<w.length-1?$+1:$);break;case"ArrowUp":q.preventDefault(),x($=>$>0?$-1:$);break;case"Enter":q.preventDefault(),w[k]&&S(w[k]);break;case"Escape":y(!1),g("");break}},A=()=>[se.selectButton,se[l],se[h],i?se.disabled:"",s?se.error:"",d].filter(Boolean).join(" "),B=()=>{switch(u){case"w-64":return se.width64;case"w-80":return se.width80;case"w-96":return se.width96;default:return se.widthFull}},D=(q,$)=>[se.option,$===k?se.optionHighlighted:"",q.value===t?se.optionSelected:"",q.disabled?se.optionDisabled:""].filter(Boolean).join(" "),V={position:"fixed",top:M.top+(I.current?.offsetHeight||0)+4,left:M.left,width:M.width,zIndex:9999};return o.jsxs("div",{className:`${se.container} ${B()}`,children:[o.jsx("button",{ref:I,className:A(),onClick:()=>!i&&y(!p),onKeyDown:j,tabIndex:i?-1:0,type:"button","aria-haspopup":"listbox","aria-expanded":p,disabled:i,children:o.jsxs("div",{className:se.buttonContent,children:[o.jsx("span",{className:`${se.label} ${_?"":se.placeholder}`,children:_?_.label:c}),o.jsxs("div",{className:se.iconsContainer,children:[r&&o.jsx("div",{className:se.loadingSpinner}),o.jsx("svg",{className:`${se.arrowIcon} ${p?se.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"})})]})]})}),p&&mw.createPortal(o.jsxs("div",{className:`${se.dropdown} ${B()}`,style:V,ref:b,children:[o.jsx("div",{className:se.searchContainer,children:o.jsxs("div",{className:se.searchInputWrapper,children:[o.jsx("svg",{className:se.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:C,type:"text",value:f,onChange:N,placeholder:"Rechercher...",className:se.searchInput,autoFocus:!0})]})}),o.jsx("div",{className:se.optionsList,children:w.length===0?o.jsx("div",{className:se.noResults,children:"Aucun résultat trouvé"}):o.jsx("ul",{role:"listbox",children:w.map((q,$)=>o.jsx("li",{className:D(q,$),onClick:()=>S(q),onMouseEnter:()=>x($),role:"option","aria-selected":q.value===t,"aria-disabled":q.disabled,children:o.jsxs("div",{className:se.buttonContent,children:[o.jsx("span",{className:se.optionLabel,title:q.label,children:q.label}),q.value===t&&o.jsx("svg",{className:se.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"})})]})},q.value))})})]}),document.body)]})},w6e="_container_uq7pt_1",C6e="_item_uq7pt_7",N6e="_mainValue_uq7pt_13",j6e="_label_uq7pt_17",S6e="_subValue_uq7pt_22",$6e="_subValueWrapper_uq7pt_27",q6e="_subSeparator_uq7pt_32",Ze={container:w6e,item:C6e,mainValue:N6e,label:j6e,subValue:S6e,subValueWrapper:$6e,subSeparator:q6e},A6e=({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,k]=p.split("/").map(x=>x.trim());return o.jsxs("span",{className:Ze.subValueWrapper,children:[o.jsx("span",{className:Ze.subLeft,style:{color:y},children:g}),o.jsx("span",{className:Ze.subSeparator,children:" / "}),o.jsx("span",{className:Ze.subRight,style:{color:f},children:k})]})};return o.jsxs("div",{className:Ze.container,style:{backgroundColor:d},children:[e&&o.jsxs("div",{className:Ze.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ze.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:e}),o.jsx("div",{className:Ze.label,style:{color:l},children:"DMS"})]}),t.map((p,y)=>o.jsxs("div",{className:Ze.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ze.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:p.value}),o.jsx("div",{className:Ze.label,style:{color:l},children:p.label}),o.jsx("div",{className:Ze.subValue,style:{fontSize:r,fontWeight:s},children:p.subValue&&u(p.subValue,p.subLeftColor,p.subRightColor)})]},y))]})},z6e="_encours_16ist_1",V6e="_header_16ist_19",P6e="_iconWrap_16ist_27",T6e="_title_16ist_36",H6e="_items_16ist_47",D6e="_spaceEvenly_16ist_56",B6e="_item_16ist_47",R6e="_valueContainer_16ist_86",F6e="_value_16ist_86",E6e="_label_16ist_108",rt={encours:z6e,header:V6e,iconWrap:P6e,title:T6e,items:H6e,spaceEvenly:D6e,item:B6e,valueContainer:R6e,value:F6e,label:E6e},qc=e=>typeof e=="number"?`${e}px`:typeof e=="string"?e:void 0;function O6e(e,t){const n={},c={};return e.valueColor&&(n.color=e.valueColor),e.valueFontSize!==void 0?n.fontSize=qc(e.valueFontSize):t.defaultValueFontSize!==void 0&&(n.fontSize=qc(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=qc(e.labelFontSize):t.defaultLabelFontSize!==void 0&&(c.fontSize=qc(t.defaultLabelFontSize)),e.labelFontWeight!==void 0?c.fontWeight=e.labelFontWeight:t.defaultLabelFontWeight!==void 0&&(c.fontWeight=t.defaultLabelFontWeight),{valueStyle:n,labelStyle:c}}function U6e(){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 W6e(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:k,gap:x,className:M,ariaLabel:v}=e,I=r?xt[r]:void 0,b={background:g,width:qc(k),...f},C={};n&&(C.color=n),c!==void 0&&(C.fontSize=qc(c)),i!==void 0&&(C.fontWeight=i);const w={};return d&&(w.color=d),o.jsxs("section",{className:`${rt.encours} ${M??""}`,style:b,"aria-label":v??t,children:[o.jsxs("div",{className:rt.header,children:[o.jsx("div",{className:rt.iconWrap,"aria-hidden":!0,style:w,children:I?o.jsx(I,{size:typeof s=="number"?s:void 0}):o.jsx(U6e,{})}),o.jsx("div",{className:rt.title,style:C,children:t})]}),o.jsx("div",{className:`${rt.items} ${x===void 0?rt.spaceEvenly:""}`,role:"list",style:x!==void 0?{gap:`${x}px`}:{},children:y.map((_,L)=>{const{valueStyle:S,labelStyle:N}=O6e(_,{defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p});return o.jsx("div",{className:rt.item,role:"listitem",style:{..._.background?{background:_.background}:{},..._.width?{width:qc(_.width)}:{}},children:o.jsxs("div",{className:rt.valueContainer,children:[o.jsx("div",{className:rt.value,style:S,children:_.value}),_.label&&o.jsx("div",{className:rt.label,style:N,children:_.label})]})},`${String(_.label??_.value)}-${L}`)})})]})}const G6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M480-360 280-559h400z"})),K6e=m.memo(G6e),Z6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"m280-400 200-201 200 201z"})),X6e=m.memo(Z6e),Y6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},Q.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"})),J6e=m.memo(Y6e),Q6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},Q.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"})),efe=m.memo(Q6e),tfe=({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]=m.useState(!1),[f,g]=m.useState(e),[k,x]=m.useState(!1);if(m.useEffect(()=>{x(!0)},[]),m.useEffect(()=>{g(e)},[e]),!k)return null;const M=(b,C)=>{C<4||g(w=>w.map(_=>_.component_key===b?{..._,visible:!_.visible}:_))},v=()=>{t(f),y(!1)},I=Z(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:I,children:[o.jsx(JS,{width:d,height:d,fill:l?.icon||"currentColor",style:{transition:"color 0.2s"}}),p?o.jsx(X6e,{width:d,height:d,fill:l?.icon||"currentColor"}):o.jsx(K6e,{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(m.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:w=>{C>=4&&(w.currentTarget.style.background="#F9FAFB")},onMouseLeave:w=>{C>=4&&(w.currentTarget.style.background="transparent")},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:8,flexShrink:0},children:b.visible?o.jsx(J6e,{width:20,height:20,fill:l?.activeBg||"var(--color-primary, #008FBB)"}):o.jsx(efe,{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})})]})]})},afe="_container_zhny9_1",nfe="_card_zhny9_15",ofe="_footer_zhny9_33",cfe="_noPaddingMobile_zhny9_51",ri={container:afe,card:nfe,footer:ofe,noPaddingMobile:cfe},ife="_board_95t8m_1",rfe="_clickable_95t8m_21",sfe="_sideBar_95t8m_26",dfe="_boardContent_95t8m_32",lfe="_orange_95t8m_40",hfe="_red_95t8m_44",ufe="_green_95t8m_48",pfe="_grey_95t8m_52",yfe="_lightGrey_95t8m_56",kfe="_big_95t8m_61",mfe="_medium_95t8m_66",ffe="_headerRow_95t8m_70",gfe="_iconWrapper_95t8m_75",vfe="_headerTitle_95t8m_80",xfe="_valueArea_95t8m_89",Mfe="_titleWhite_95t8m_99",_fe="_titleBlack_95t8m_103",Lfe="_valueWhite_95t8m_108",Ife="_valueBlack_95t8m_112",bfe="_valueBlue_95t8m_116",wfe="_bars_95t8m_121",Cfe="_bar_95t8m_121",Nfe="_barDark_95t8m_135",jfe="_barDim_95t8m_139",Sfe="_predictionSection_95t8m_143",$fe="_predictionHeader_95t8m_155",qfe="_predictionBody_95t8m_162",Afe="_hasPrediction_95t8m_170",ze={board:ife,clickable:rfe,sideBar:sfe,boardContent:dfe,orange:lfe,red:hfe,green:ufe,grey:pfe,lightGrey:yfe,big:kfe,medium:mfe,headerRow:ffe,iconWrapper:gfe,headerTitle:vfe,valueArea:xfe,titleWhite:Mfe,titleBlack:_fe,valueWhite:Lfe,valueBlack:Ife,valueBlue:bfe,bars:wfe,bar:Cfe,barDark:Nfe,barDim:jfe,predictionSection:Sfe,predictionHeader:$fe,predictionBody:qfe,hasPrediction:Afe},zfe=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${ze.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${ze.bar} ${r<c?"":e?ze.barDark:ze.barDim}`},r))})},vt=({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:k,titleFontWeight:x,valueFontSize:M,valueFontWeight:v,barColor:I,justifyContent:b="space-between",alignItems:C="flex-start",cardGap:w="",onClick:_,iconColor:L,titleKey:S,predictionValue:N,predictionLabel:j})=>{const A=r!=="none",B=r==="endingDark",{padding:D,...V}=y||{},q=h===void 0&&u===void 0&&i===void 0&&Object.keys(V).length===0?void 0:{...h!==void 0?{width:h}:{},...u!==void 0?{height:u}:{},...i!==void 0?{backgroundColor:i}:{},...V},$=`${ze.board} ${ze[d]} ${N!==void 0?ze.hasPrediction:""} ${p}`;return o.jsxs("div",{className:$,onClick:_,style:l!==void 0?{...q,"--ds-value-scale":l}:q,children:[I&&o.jsx("div",{className:ze.sideBar,style:{backgroundColor:I}}),o.jsxs("div",{className:ze.boardContent,style:{padding:D,gap:w},children:[o.jsxs("div",{className:ze.headerRow,style:{justifyContent:b,alignItems:C},children:[t&&o.jsx("div",{className:ze.iconWrapper,style:{color:L},children:t}),o.jsx("div",{className:`${ze.headerTitle} header-title-data-board`,children:o.jsx("span",{title:Z(e,S),"aria-label":e?.description,style:{color:f,...k?{fontSize:k}:{},...x?{fontWeight:x}:{}},children:n})}),A?o.jsx(zfe,{endingDark:B,lightCount:s}):null]}),o.jsx("div",{className:ze.valueArea,style:{color:g,...M?{fontSize:M}:{},...v?{fontWeight:v}:{}},children:c})]}),N!==void 0&&o.jsxs("div",{className:ze.predictionSection,children:[o.jsx("div",{className:ze.predictionHeader,children:j??"PRED."}),o.jsx("div",{className:ze.predictionBody,children:N})]})]})},Vfe="_wrapper_1ydle_10",Pfe="_hosp_1ydle_19",Tfe="_headerRow_1ydle_54",Hfe="_iconWrapper_1ydle_61",Dfe="_headerTitle_1ydle_67",Bfe="_hospValue_1ydle_76",Rfe="_side_1ydle_88",Ffe="_mini_1ydle_100",Efe="_miniLabel_1ydle_131",Ofe="_miniValue_1ydle_140",Ufe="_miniBars_1ydle_150",Wfe="_bars_1ydle_155",Gfe="_bar_1ydle_155",Kfe="_barDark_1ydle_169",Zfe="_barDim_1ydle_173",Pe={wrapper:Vfe,hosp:Pfe,headerRow:Tfe,iconWrapper:Hfe,headerTitle:Dfe,hospValue:Bfe,side:Rfe,mini:Ffe,miniLabel:Efe,miniValue:Ofe,miniBars:Ufe,bars:Wfe,bar:Gfe,barDark:Kfe,barDim:Zfe},Xfe=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${Pe.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${Pe.bar} ${r<c?"":e?Pe.barDark:Pe.barDim}`},r))})},gA=({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:`${Pe.wrapper} ${n} data-four-boards`,style:l,children:[o.jsxs("div",{className:`${Pe.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:Z(e.a11yConfig,e.titleKey),children:[o.jsxs("div",{className:Pe.headerRow,children:[o.jsxs("div",{className:`${Pe.iconWrapper} icon-wrapper-data-four-boards`,children:[e.iconName&&o.jsx("span",{style:{color:e.iconColor},children:e.iconName}),o.jsx("span",{className:Pe.headerTitle,style:{color:e.titleColor||"white",...e.titleFontSize?{fontSize:e.titleFontSize}:{},...e.titleFontWeight?{fontWeight:e.titleFontWeight}:{}},title:Z(e.a11yConfig,e.titleKey),children:e.label})]}),s?o.jsx(Xfe,{endingDark:d,lightCount:e.lightBars??5}):null]}),o.jsx("div",{className:Pe.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:Pe.side,children:t.map((h,u)=>o.jsxs("div",{className:`${Pe.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:Z(h.a11yConfig,h.titleKey),children:[o.jsxs("span",{className:Pe.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:Z(h.a11yConfig,h.titleKey),children:[h.iconName&&o.jsx("span",{style:{color:h.iconColor},children:h.iconName}),h.label]}),o.jsx("span",{className:`${Pe.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:Pe.miniBars})]},h.id??`${h.label}-${u}`))})]})},Yfe=({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},k=e[0],x=e[1],M=e.slice(2,5);return o.jsxs("div",{style:g,className:`${ri.container} ${y?ri.noPaddingMobile:""} ${s}`,children:[o.jsxs("div",{className:ri.card,children:[k?o.jsx(vt,{a11yConfig:k.a11yConfig,label:k.label,value:k.value,backgroundColor:k.backgroundColor,bars:k.bars,lightBars:k.lightBars,size:k.size??"big",valueScale:k.valueScale,width:k.width,height:k.height,titleColor:"white",valueColor:"white",titleFontSize:k.titleFontSize??l,titleFontWeight:k.titleFontWeight??h,valueFontSize:k.valueFontSize??u,valueFontWeight:k.valueFontWeight??p,titleKey:k.titleKey,onClick:v=>f?.(0,v)}):null,x&&M.length>0?o.jsx(gA,{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,I)=>({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+I,b)}))}):x&&M.length===0?o.jsx(vt,{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:ri.footer,children:t})]})},Jfe=({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})})})}),Qfe=({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:k="percentage"})=>{const x=(y.top??20)+(y.bottom??40)+e.length*(s+20),M=Math.max(x,t),v=m.useMemo(()=>{if(!e||e.length===0)return d;const _=(parseFloat(l)||12)*.7,S=Math.max(...e.map(N=>(N.label||"").length))*_+16;return Math.min(Math.max(S,40),d)},[e,l,d]),I=w=>g?g(w):w?.toString()||"",b=w=>f&&k==="value"?f(w):w==null||w===""?"":k==="percentage"?`${w}%`:w.toString(),C=(w,_,L)=>{if(typeof w!="number")return w;const S=f?f(w):w.toString(),N=L?.payload?.percentage;return typeof N=="number"&&Number.isFinite(N)&&k==="percentage"?`${S} (${N.toFixed(1)}%)`:S};return o.jsx("div",{style:{backgroundColor:i,width:"100%"},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:M,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:I,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:v,interval:0,fontSize:l,fontWeight:h,tick:o.jsx(Jfe,{fontSize:l,fontWeight:h,stroke:r})}),c&&o.jsx(a.Tooltip,{formatter:C,labelStyle:{color:"var(--color-text)"}}),o.jsx(a.Bar,{dataKey:"value",fill:n,radius:0,barSize:s,children:o.jsx(a.LabelList,{dataKey:k,position:"right",offset:10,formatter:b,fill:r,fontSize:l,fontWeight:h})})]})})})},e8e="_menu_10i6j_1",t8e="_menuRow_10i6j_18",a8e="_separator_10i6j_33",n8e="_rowLabel_10i6j_39",o8e="_rowLeadingIcon_10i6j_47",c8e="_rowIcon_10i6j_54",Gc={menu:e8e,menuRow:t8e,separator:a8e,rowLabel:n8e,rowLeadingIcon:o8e,rowIcon:c8e},i8e=m.forwardRef(function({isVisible:t,onClose:n,items:c,style:i,position:r,bg:s},d){const l=m.useRef(null),h=d||l;if(m.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:Gc.menu,style:p,children:c.map(y=>{if(y.type==="separator")return o.jsx("hr",{className:Gc.separator},y.id);const f=y,g=f.color?{color:f.color}:{},k=f.closeOnClick!==!1;return o.jsxs("button",{role:"menuitem",className:Gc.menuRow,style:g,onClick:()=>{f.onClick?.(),k&&n?.()},children:[o.jsxs("span",{className:Gc.rowLabel,children:[f.leadingIcon&&o.jsx("span",{className:Gc.rowLeadingIcon,children:f.leadingIcon}),o.jsx("span",{children:f.label})]}),f.icon&&o.jsx("span",{className:Gc.rowIcon,children:f.icon})]},f.id)})})}),vA=({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:k,avatarColor:x="#5b8fb9",backgroundColorAvatar:M="#f1f4f5",dropdownMenuItems:v,dropdownMenuStyle:I,dropdownMenuOffset:b,statusDotColor:C,a11yConfig:w,style:_,className:L=""})=>{const{user:S}=yt(),N=e||S,{currentTheme:j,switchTheme:A}=ML(),B=m.useRef(null),D=m.useRef(null),[V,q]=m.useState(!1),[$,H]=m.useState({}),R=m.useMemo(()=>{const ee=[],te=({variant:he})=>he==="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&&(ee.push({id:"profile",type:"action",label:"Mon profil",onClick:()=>{typeof window>"u"||(r==="_blank"?window.open(i,"_blank","noopener,noreferrer"):window.location.assign(i))}}),ee.push({id:"sep-profile",type:"separator"}));const re=j==="dark";return ee.push({id:"theme",type:"action",label:re?"Mode clair":"Mode sombre",icon:o.jsx(te,{variant:re?"sun":"moon"}),onClick:()=>{A(re?"light":"dark")}}),(t||c)&&(ee.push({id:"sep-theme",type:"separator"}),ee.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?.()}})),ee},[j,t,n,c,i,r,A]),z=v??R,U=()=>{if(!B.current){q(ee=>!ee);return}if(!V){const ee=B.current.getBoundingClientRect(),te=window.innerWidth,re=window.innerHeight,he=200,pe=200,O=4,K=b?.x??0,ne=b?.y??0,qe=te-ee.right>=he+O;H(qe?{top:ee.bottom-pe+ne,left:ee.right+O+K}:{bottom:re-ee.top+ne,left:ee.left+K})}q(ee=>!ee)};if(m.useEffect(()=>{if(!V||!B.current)return;const ee=()=>{const te=B.current.getBoundingClientRect(),re=window.innerWidth,he=window.innerHeight,pe=200,O=200,K=4,ne=b?.x??0,Ne=b?.y??0,ve=re-te.right>=pe+K;H(ve?{top:te.bottom-O+Ne,left:te.right+K+ne}:{bottom:he-te.top+Ne,left:te.left+ne})};return window.addEventListener("resize",ee),window.addEventListener("orientationchange",ee),()=>{window.removeEventListener("resize",ee),window.removeEventListener("orientationchange",ee)}},[V,b]),m.useEffect(()=>{if(!V||!B.current||!D.current)return;const ee=()=>{const re=B.current.getBoundingClientRect(),he=D.current.getBoundingClientRect(),pe=b?.x??0,O=b?.y??0;H(K=>K.left!==void 0&&K.top!==void 0&&K.left>=re.right-1?{top:re.bottom-he.height+O,left:K.left+pe}:K)},te=requestAnimationFrame(()=>{setTimeout(ee,0)});return()=>cancelAnimationFrame(te)},[V,b]),!N)return null;const X=N,ie=parseInt(h,10)||40,ae=`${ie*.375}px`,fe=`${ie*1.375}px`,de=`${ie*.2}px`,be=`${ie*.6}px`,oe=()=>{const ee=parseInt(h,10)||40,te=Math.max(8,ee*.34375),re=Math.max(2,ee*.05);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{position:"relative",flexShrink:0,userSelect:"none"},children:[X.image?o.jsx("img",{src:X.image,alt:`${X.prenom} ${X.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:ae,height:ae,borderRadius:"50%",backgroundColor:x,position:"absolute",top:de,left:"50%",transform:"translateX(-50%)",zIndex:2,userSelect:"none"}}),o.jsx("div",{style:{width:fe,height:fe,borderRadius:"50%",backgroundColor:x,position:"absolute",top:be,left:"50%",transform:"translateX(-50%)",zIndex:1,userSelect:"none"}})]}),C&&o.jsx("div",{style:{position:"absolute",bottom:re,right:re,width:`${te}px`,height:`${te}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:X.email,children:X.email}),o.jsx("span",{style:{color:l,fontSize:g,fontWeight:k,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:X.role,children:X.role})]})]})};return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:B,className:`user-info ${L}`,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:U,title:Z(w,X.role),role:"button",tabIndex:0,children:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:p,flex:1,minWidth:0},children:o.jsx(oe,{})})}),o.jsx(i8e,{ref:D,isVisible:V,onClose:()=>q(!1),items:z,style:I,position:$})]})},r8e="_navItem_16uqf_1",s8e="_label_16uqf_14",d8e="_icon_16uqf_26",m1={navItem:r8e,label:s8e,icon:d8e},aC=({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:k="10px 16px",borderWidth:x="4px",iconGap:M="12px",disabled:v=!1,disabledColor:I,a11yConfig:b})=>{const C=()=>{v||n?.()},w=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 S=N=>{const j=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return j?{r:parseInt(j[1],16),g:parseInt(j[2],16),b:parseInt(j[3],16)}:null};if(l.startsWith("#")){const N=S(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},L={onClick:C,className:`${m1.navItem} ${i?m1.active:""} ${d} ${v?m1.disabled:""}`,style:{padding:k,color:i?u:v?I||"#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,...L,title:Z(b,t),children:w}):o.jsx("div",{...L,role:n?"button":void 0,tabIndex:n&&!v?0:void 0,title:Z(b,t),children:w})},l8e="_navbar_y5tex_1",h8e="_topSection_y5tex_9",u8e="_logoContainer_y5tex_14",p8e="_collapseToggle_y5tex_20",y8e="_collapsedRail_y5tex_37",k8e="_collapsedToggle_y5tex_44",m8e="_sectionsContainer_y5tex_67",f8e="_sectionTitle_y5tex_73",g8e="_sectionItems_y5tex_78",v8e="_bottomSection_y5tex_83",x8e="_versionContainer_y5tex_102",Xe={navbar:l8e,topSection:h8e,logoContainer:u8e,collapseToggle:p8e,collapsedRail:y8e,collapsedToggle:k8e,sectionsContainer:m8e,sectionTitle:f8e,sectionItems:g8e,bottomSection:v8e,versionContainer:x8e},M8e=({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:k="15px",navItemFontWeight:x="500",navItemColor:M,sectionTitlePadding:v="16px",sectionTitleFontSize:I="11px",sectionTitleColor:b="#999",sectionTitleWeight:C="500",versionFontSize:w="12px",versionFontWeight:_="400",versionColor:L="#999",userInfoProps:S,style:N,className:j="",width:A="280px",showLogo:B=!0,versionA11yConfig:D,displayNone:V=!1,showCollapseToggle:q=!1,collapsed:$=!1,onCollapseToggle:H,collapseToggleLabel:R="Toggle sidebar",collapseToggleIconPath:z="/icon/dock_to_left.svg"})=>{const U=yt(),X=U.activeNav,ie=U.setActiveNav,ae=U.user,fe=S.user||ae;return q&&$?o.jsx("div",{className:`${Xe.collapsedRail} ${j}`,style:{display:V?"none":"flex"},children:o.jsx("button",{type:"button",className:Xe.collapsedToggle,onClick:H,"aria-label":R,children:o.jsx(pw,{path:z,width:18,height:18})})}):o.jsxs("div",{className:`${Xe.navbar} ${j}`,style:{width:A,backgroundColor:s,padding:c,display:V?"none":"flex",...N},children:[o.jsxs("div",{className:Xe.topSection,style:{gap:t},children:[B&&o.jsxs("div",{className:Xe.logoContainer,children:[o.jsx(xL,{...e}),q&&o.jsx("button",{type:"button",className:Xe.collapseToggle,onClick:H,"aria-label":R,children:o.jsx(pw,{path:z,width:20,height:20})})]}),o.jsx("div",{className:Xe.sectionsContainer,style:{gap:i},children:n.map((de,be)=>o.jsxs("div",{className:Xe.section,children:[de.title&&o.jsx("div",{className:Xe.sectionTitle,title:Z(de.a11yConfig,de.titleKey),style:{fontSize:I,color:b,padding:v,fontWeight:C,border:"4px solid transparent",...u},children:de.title}),o.jsx("div",{className:Xe.sectionItems,style:{gap:r},children:de.items.map(oe=>o.jsx(aC,{...oe,isActive:oe.isActive===null?oe.isActive:X===oe.id,onClick:()=>{oe.onClick&&oe.onClick(),oe.isActive==null&&ie(oe.id)},highlightColor:d,activeColor:d,highlightBackgroundColor:l,padding:y,borderWidth:f,iconGap:g,fontSize:k,fontWeight:x,color:M,style:p},oe.id))})]},be))})]}),o.jsxs("div",{className:Xe.bottomSection,style:{gap:t},children:[o.jsx(vA,{...S,user:fe}),h&&o.jsx("div",{className:Xe.versionContainer,title:Z(D,h),style:{fontSize:w,fontWeight:_,color:L},children:h})]})]})},_8e="_container_4qege_1",L8e="_titleContainer_4qege_10",I8e="_title_4qege_10",b8e="_inlineToggleContainer_4qege_24",w8e="_rightContentContainer_4qege_30",f1={container:_8e,titleContainer:L8e,title:I8e,inlineToggleContainer:b8e,rightContentContainer:w8e},C8e=({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:k,inlineToggle:x})=>{const{activeNav:M}=yt(),v=y.find(b=>b.id===M)||f?.find(b=>b.id===M),I=v?g(v.label):M||"";return I?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:I}),x&&o.jsx("div",{className:f1.inlineToggleContainer,children:x})]}),k&&o.jsx("div",{className:f1.rightContentContainer,children:k})]}):null},N8e="_navItem_1hg26_1",j8e="_navItemIcon_1hg26_21",S8e="_navItemLabel_1hg26_29",$8e="_navItemCount_1hg26_36",q8e="_navItemIndicator_1hg26_49",g1={navItem:N8e,navItemIcon:j8e,navItemLabel:S8e,navItemCount:$8e,navItemIndicator:q8e},xA=({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:k="12px",countFontWeight:x="500",indicatorColor:M="#00aec7",indicatorHeight:v="3px",padding:I="8px 4px",fontSize:b="14px",fontWeight:C="500",gap:w="8px",style:_,className:L="",disabled:S=!1,onNavigate:N})=>{const j=()=>{S||(c?.(),i&&(N?N(i):window.location.href=i))};return o.jsxs("div",{className:`${g1.navItem} ${L}`,onClick:j,title:Z(e,r),style:{gap:w,padding:I,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:k,fontWeight:x},children:d}),n&&!S&&o.jsx("div",{className:g1.navItemIndicator,style:{height:v,backgroundColor:M}})]})},A8e="_container_13hsa_1",z8e="_groupHeader_13hsa_8",V8e="_groupHeaderLeft_13hsa_18",P8e="_groupIcon_13hsa_23",T8e="_dropdown_13hsa_29",H8e="_item_13hsa_42",D8e="_itemIcon_13hsa_65",B8e="_chevron_13hsa_72",R8e="_chevronOpen_13hsa_79",mt={container:A8e,groupHeader:z8e,groupHeaderLeft:V8e,groupIcon:P8e,dropdown:T8e,item:H8e,itemIcon:D8e,chevron:B8e,chevronOpen:R8e},F8e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M480-344 240-584l43-43 197 197 197-197 43 43z"})),R1=m.memo(F8e),MA=({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:k="var(--color-primary)",itemDividerColor:x="var(--color-border)",iconColor:M="#555555",activeIconColor:v="var(--color-primary)",headerIconColor:I="var(--color-text)",chevronColor:b="var(--color-text)",iconSize:C=22,headerPadding:w="14px 20px",itemPadding:_="14px 20px",iconGap:L=14,borderRadius:S=0})=>{const[N,j]=m.useState(""),A=m.useRef(null);m.useEffect(()=>{const D=V=>{A.current&&!A.current.contains(V.target)&&j("")};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const B={backgroundColor:r,color:s,borderRadius:S,...c};return o.jsx("nav",{ref:A,className:[mt.container,i].filter(Boolean).join(" "),style:B,children:e.map(D=>{const V=N===D.id,q={backgroundColor:d,color:l,padding:w,borderBottom:`1px solid ${h}`,gap:L},$={backgroundColor:u};return o.jsxs("div",{children:[o.jsxs("div",{className:mt.groupHeader,style:q,onClick:()=>j(V?"":D.id),role:"button","aria-expanded":V,children:[o.jsxs("div",{className:mt.groupHeaderLeft,style:{gap:L},children:[D.icon&&o.jsx("span",{className:mt.groupIcon,style:{color:I,width:C,height:C},children:D.icon}),o.jsx("span",{children:D.label})]}),o.jsx("span",{className:[mt.chevron,V?mt.chevronOpen:""].join(" "),style:{color:b},children:o.jsx(R1,{width:18,height:18})})]}),V&&o.jsx("div",{className:mt.dropdown,style:$,children:D.items.map(H=>{const R=H.id===t,z={padding:_,gap:L,color:R?g:f,backgroundColor:p,"--item-border-width":R?"4px":"1px","--item-border-color":R?k:x};return o.jsxs("div",{className:mt.item,style:z,onClick:()=>{n?.(D.id,H.id),j("")},role:"menuitem",onMouseEnter:U=>{R||(U.currentTarget.style.backgroundColor=y)},children:[H.icon&&o.jsx("span",{className:mt.itemIcon,style:{color:R?v:M,width:C,height:C},children:H.icon}),o.jsx("span",{children:H.label})]},H.id)})})]},D.id)})})},E8e="_subheaderContent_1glo8_1",O8e="_navContainer_1glo8_11",U8e="_rightContent_1glo8_45",Db={subheaderContent:E8e,navContainer:O8e,rightContent:U8e},W8e=({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:k="3px",showDraggable:x=!1,showLegend:M=!1,showData:v=!1,className:I="",style:b,countBackgroundColor:C,countColor:w,countBorderRadius:_,countPadding:L,countFontSize:S,countFontWeight:N,navContainerClassName:j,navContainerStyle:A,rightContentClassName:B,rightContentStyle:D,rightActions:V,activeSwitcherColor:q,inactiveSwitcherColor:$,isMobile:H=!1,onNavigate:R})=>{const{activeSubNav:z,setActiveSubNav:U,navCounts:X,activeNav:ie}=yt();if(H){const ae=e.find(de=>de.id===z)||e[0],fe=[{id:"current-group",label:ae?.label||ie?.toUpperCase()||"MENU",icon:ae?.icon,items:e.map(de=>({id:de.id,label:de.label,icon:de.icon}))}];return o.jsx("div",{className:I,style:b,children:o.jsx(MA,{groups:fe,activeItemId:z,onItemClick:(de,be)=>{const oe=e.find(ee=>ee.id===be);oe&&(oe.onClick&&oe.onClick(),oe.href&&(R?R(oe.href):oe.onNavigate?oe.onNavigate(oe.href):window.location.href=oe.href),U(be))},headerBgColor:t})})}return o.jsxs("div",{className:`${Db.subheaderContent} ${I}`,style:{backgroundColor:t,padding:n,margin:c,width:i,height:r,border:s,borderBottom:d,...b},children:[o.jsx("div",{className:`${Db.navContainer} ${j||""}`,style:{gap:l,...A},children:e.map(ae=>{const fe=ae.count!==void 0?ae.count:X[ae.id],de=z===ae.id||ae.isActive;return o.jsx(xA,{...ae,onNavigate:R||ae.onNavigate,count:fe,isActive:de,onClick:()=>{ae.onClick&&ae.onClick(),U(ae.id)},activeColor:f,inactiveColor:g,countBackgroundColor:C,countColor:w,countBorderRadius:_,countPadding:L,countFontSize:S,countFontWeight:N,indicatorColor:f,indicatorHeight:k,padding:u,fontSize:p,fontWeight:y,gap:"8px",style:ae.style},ae.id)})}),o.jsxs("div",{className:`${Db.rightContent} ${B||""}`,style:{gap:h,...D},children:[x&&o.jsx(dL,{size:20,colors:{bg:q,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),M&&o.jsx(lL,{size:20,colors:{bg:q,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),v&&o.jsx(hL,{size:20,colors:{bg:q,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),V]})]})},G8e=({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]=m.useState(!1),{currentTheme:p,switchTheme:y}=ML(),f=p!="dark",g=()=>{y(f?"dark":"light"),e?.()};return m.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"})]})})},K8e=({initialSortBy:e=null,initialSortOrder:t="asc",onSortChange:n})=>{const[c,i]=m.useState({sortBy:e,sortOrder:t,filters:{}}),r=m.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}},Z8e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M440-800v487L216-537l-56 57 320 320 320-320-56-57-224 224v-487z"})),X8e=m.memo(Z8e),Y8e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M440-160v-487L216-423l-56-57 320-320 320 320-56 57-224-224v487z"})),J8e=m.memo(Y8e),Q8e=({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:Z(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(J8e,{width:16,height:16,style:{fill:"currentColor",transition:"all 0.2s ease"}}):o.jsx(X8e,{width:16,height:16,style:{fill:"currentColor",opacity:d?1:.5,transition:"all 0.2s ease"}})})]})},String(r.key)||s)})})}),ege=({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,k)=>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)}-${k}`))},y)})}),tge=({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,k=Math.min(f*p,u),x=b=>{t({page:b})},M=m.useMemo(()=>{if(y<=6)return Array.from({length:y},(A,B)=>B+1);const w=Math.max(f-1,1),_=Math.min(f+1,y),L=w>2,S=_<y-2,N=1,j=y;if(!L&&S)return[...Array.from({length:5},(D,V)=>V+1),"...",y];if(L&&!S){const B=Array.from({length:5},(D,V)=>y-5+V+1);return[N,"...",...B]}if(L&&S){const A=Array.from({length:_-w+1},(B,D)=>w+D);return[N,"...",...A,"...",j]}return[]},[f,y]),v=!!(d&&d.length>0),I=!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,k,u):o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[g,"–",k]})," ",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:I}),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"}),I]}),!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"})})]})},_A=({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:k,className:x,style:M,rowStyle:v,onRowClick:I,rowClassName:b,titleKey:C,removeLabelSpan:w=!1,a11yConfig:_,renderSeparator:L,pageSizeOptions:S})=>{const N=m.useMemo(()=>({...p}),[p]),j=m.useRef(null);m.useEffect(()=>{if(!f||!y||!g||n)return;const $=new IntersectionObserver(H=>{H[0].isIntersecting&&y()},{threshold:.1});return j.current&&$.observe(j.current),()=>$.disconnect()},[f,y,g,n]);const{tableState:A,handleSort:B}=K8e({initialSortBy:null,onSortChange:r}),D=(k?.sortBy!==void 0?k.sortBy:A.sortBy)??void 0,V=k?.sortOrder!==void 0?k.sortOrder:A.sortOrder,q=$=>{const H=D,R=V;let z="asc";H===$&&(z=R==="asc"?"desc":"asc"),k?.sortBy!==void 0?r($,z):B($)};return o.jsxs("div",{className:`table-container ${x||""}`,style:M,title:Z(_,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(Q8e,{columns:t,sortBy:D,sortOrder:V,onSort:q,removeLabelSpan:w}),o.jsx(ege,{data:e,columns:t.map($=>({...$,render:$.render?H=>$.render(H,{}):void 0})),rowKey:s,onRowClick:I,isLoading:n,text:N,rowStyle:typeof v=="function"?v:v?()=>v:void 0,rowClassName:b,renderSeparator:L})]}),f&&o.jsx("div",{ref:j,style:{height:20,margin:10}})]})]}),o.jsx(tge,{state:c,onPaginationChange:i,text:N,onLoadMore:y,infiniteScroll:f,hasMore:g,isLoading:n,pageSizeOptions:S})]})},age="_datePickerContainer_1gx2l_3",nge="_label_1gx2l_16",oge="_displayNode_1gx2l_23",cge="_datePickerButton_1gx2l_30",ige="_datePickerButtonDisabled_1gx2l_50",rge="_datePickerButtonOpen_1gx2l_59",sge="_datePickerLabel_1gx2l_68",dge="_placeholder_1gx2l_79",lge="_trailingIcons_1gx2l_83",hge="_chevron_1gx2l_89",uge="_clearButton_1gx2l_97",pge="_errorMessage_1gx2l_114",yge="_dropdown_1gx2l_119",kge="_calendarHeader_1gx2l_143",mge="_navButton_1gx2l_152",fge="_headerSelectors_1gx2l_171",gge="_monthSelector_1gx2l_179",vge="_yearSelector_1gx2l_180",xge="_selectorButton_1gx2l_184",Mge="_selectorChevron_1gx2l_201",_ge="_selectorChevronOpen_1gx2l_206",Lge="_monthDropdown_1gx2l_210",Ige="_yearDropdown_1gx2l_211",bge="_monthItem_1gx2l_231",wge="_yearItem_1gx2l_232",Cge="_monthItemSelected_1gx2l_254",Nge="_yearItemSelected_1gx2l_255",jge="_weekdays_1gx2l_259",Sge="_weekday_1gx2l_259",$ge="_calendarGrid_1gx2l_275",qge="_dateCell_1gx2l_284",Age="_dateCellSelected_1gx2l_307",zge="_dateCellOtherMonth_1gx2l_311",Vge="_dateCellOtherMonthSelected_1gx2l_315",Pge="_calendarFooter_1gx2l_319",Tge="_cancelButton_1gx2l_327",Hge="_applyButton_1gx2l_328",Dge="_timePickerContainer_1gx2l_372",Bge="_timeGroup_1gx2l_381",Rge="_timeLabel_1gx2l_388",Fge="_timeInputWrapper_1gx2l_394",Ege="_timeInput_1gx2l_394",Oge="_timeSeparator_1gx2l_422",W={datePickerContainer:age,label:nge,displayNode:oge,datePickerButton:cge,datePickerButtonDisabled:ige,datePickerButtonOpen:rge,datePickerLabel:sge,placeholder:dge,trailingIcons:lge,chevron:hge,clearButton:uge,errorMessage:pge,dropdown:yge,calendarHeader:kge,navButton:mge,headerSelectors:fge,monthSelector:gge,yearSelector:vge,selectorButton:xge,selectorChevron:Mge,selectorChevronOpen:_ge,monthDropdown:Lge,yearDropdown:Ige,monthItem:bge,yearItem:wge,monthItemSelected:Cge,yearItemSelected:Nge,weekdays:jge,weekday:Sge,calendarGrid:$ge,dateCell:qge,dateCellSelected:Age,dateCellOtherMonth:zge,dateCellOtherMonthSelected:Vge,calendarFooter:Pge,cancelButton:Tge,applyButton:Hge,timePickerContainer:Dge,timeGroup:Bge,timeLabel:Rge,timeInputWrapper:Fge,timeInput:Ege,timeSeparator:Oge},Uge=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.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"})),Wge=m.memo(Uge),jS=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],Gge=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],kw=({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:k="0.25rem",itemPadding:x="0.5rem 0.75rem",fontWeight:M="400",buttonBgColor:v,buttonBorderColor:I,buttonTextColor:b,dropdownBgColor:C="#ffffff",itemHoverColor:w,selectedItemBgColor:_,iconColor:L,errorColor:S,labelColor:N,placeholderColor:j,borderRadius:A="var(--radius-content)",borderWidth:B="0.0625rem",boxShadow:D="0 0.25rem 0.75rem rgba(0, 0, 0, 0.1)",transitionDuration:V="0.2s",transitionTiming:q="ease",dateCellSize:$="2.5rem",headerTextColor:H="#6c757d",weekdayTextColor:R="#6c757d",currentMonthDateColor:z="#212529",otherMonthDateColor:U="#adb5bd",selectedDateBgColor:X="#00A6D9",selectedDateTextColor:ie="#ffffff",cancelButtonBgColor:ae="#e9ecef",cancelButtonTextColor:fe="#212529",applyButtonBgColor:de="#00A6D9",applyButtonTextColor:be="#ffffff",width:oe,displayNode:ee=void 0,displayMode:te="auto",displayNodeAriaLabel:re,dropdownPosition:he="auto",dropdownAlignment:pe="right",dropdownWidth:O,withBorder:K=!1,icon:ne,precision:Ne="day",horizontalTimePicker:qe=!1,hoursLabel:ve="Heures",minutesLabel:Ve="Minutes",lowerLimit:kt=null,upperLimit:bt=null,outOfLimitsMessage:le="La date/heure choisie est hors des limites autorisées",months:wt,weekdays:zL,cancelText:_e="Annuler",applyText:Ft="Appliquer",prevMonthAriaLabel:wA="Mois précédent",nextMonthAriaLabel:CA="Mois suivant",calendarAriaLabel:NA="Sélecteur de date",openedAriaLabel:jA="Ouvrir le sélecteur de date",selectedDateAriaLabel:SA="Date sélectionnée: ",rotateIcon:$A=!0,clearable:qA=!1,clearAriaLabel:AA="Effacer la date"})=>{const Ct=T=>{if(T instanceof Date)return isNaN(T.getTime())?null:T;if(typeof T=="string"&&T){const G=new Date(T);return isNaN(G.getTime())?null:G}return null},[Oe,Et]=m.useState(!1),[u1,zA]=m.useState({top:0,left:0,width:0}),[nC,VA]=m.useState("bottom"),[oC,PA]=m.useState(null),[ue,p1]=m.useState(Ct(e)||new Date),[y1,VL]=m.useState(Ct(e)),[Q1,PL]=m.useState(Ct(e)?.getHours()??0),[ei,TL]=m.useState(Ct(e)?.getMinutes()??0),[HL,Rc]=m.useState(!1),[DL,Fc]=m.useState(!1),BL=m.useRef(null),Ec=m.useRef(null),cC=m.useRef(null),RL=m.useRef(null),FL=m.useRef(null),iC=m.useRef(Ct(e)?.getTime());m.useEffect(()=>{const T=Ct(e),G=T?.getTime();G!==iC.current&&(iC.current=G,VL(T),T&&(p1(T),PL(T.getHours()),TL(T.getMinutes())))},[e]);const rC=m.useCallback(()=>{if(Ec.current){const T=Ec.current.getBoundingClientRect();zA({top:T.top,left:T.left,width:T.width})}},[]),sC=8,ti=m.useCallback(()=>{if(!Ec.current)return;const T=Ec.current.getBoundingClientRect(),G=(parseFloat(k.replace("rem",""))||0)*16,xe=T.top-G-sC,Nt=window.innerHeight-T.bottom-G-sC;let Ue;if(he!=="auto")Ue=he;else{const He=cC.current?.scrollHeight??0;Ue=He<=Nt?"bottom":He<=xe||xe>Nt?"top":"bottom"}VA(He=>He===Ue?He:Ue),PA(Math.max(Ue==="bottom"?Nt:xe,0))},[he,k]),Oc=m.useCallback(()=>{rC(),ti()},[rC,ti]);m.useEffect(()=>(Oe&&(Oc(),window.addEventListener("scroll",Oc,!0),window.addEventListener("resize",Oc)),()=>{window.removeEventListener("scroll",Oc,!0),window.removeEventListener("resize",Oc)}),[Oe,Oc]),m.useLayoutEffect(()=>{Oe&&ti()},[Oe,ti]),m.useEffect(()=>{const T=G=>{if(BL.current&&!BL.current.contains(G.target)){const xe=document.getElementById("datepicker-dropdown");if(xe&&xe.contains(G.target))return;Et(!1),Rc(!1),Fc(!1)}RL.current&&!RL.current.contains(G.target)&&Rc(!1),FL.current&&!FL.current.contains(G.target)&&Fc(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const dC=T=>new Date(T.getFullYear(),T.getMonth()+1,0).getDate(),TA=T=>{const G=new Date(T.getFullYear(),T.getMonth(),1).getDay();return G===0?6:G-1},HA=()=>{const T=[],G=TA(ue),xe=dC(ue),Nt=new Date(ue.getFullYear(),ue.getMonth()-1,1),Ue=dC(Nt);for(let we=G-1;we>=0;we--)T.push(new Date(ue.getFullYear(),ue.getMonth()-1,Ue-we));for(let we=1;we<=xe;we++)T.push(new Date(ue.getFullYear(),ue.getMonth(),we));const He=42-T.length;for(let we=1;we<=He;we++)T.push(new Date(ue.getFullYear(),ue.getMonth()+1,we));return T},DA=(T,G)=>!T||!G?!1:T.getDate()===G.getDate()&&T.getMonth()===G.getMonth()&&T.getFullYear()===G.getFullYear(),BA=T=>T.getMonth()===ue.getMonth()&&T.getFullYear()===ue.getFullYear(),lC=T=>!(kt&&T<kt||bt&&T>bt),hC=y1?(()=>{const T=new Date(y1);return T.setHours(Q1),T.setMinutes(ei),T})():null,Uc=hC?!lC(hC):!1,RA=()=>{p1(new Date(ue.getFullYear(),ue.getMonth()-1,1))},FA=()=>{p1(new Date(ue.getFullYear(),ue.getMonth()+1,1))},EA=T=>{if(!s){const G=new Date(T);G.setHours(Q1),G.setMinutes(ei),VL(G)}},OA=()=>{if(!s){if(y1){const T=new Date(y1);if(T.setHours(Q1),T.setMinutes(ei),!lC(T))return;t(T)}else t(null);Et(!1)}},UA=()=>{const T=Ct(e);VL(T),T&&(PL(T.getHours()),TL(T.getMinutes())),Et(!1)},WA=T=>{p1(new Date(ue.getFullYear(),T,1)),Rc(!1)},GA=T=>{p1(new Date(T,ue.getMonth(),1)),Fc(!1)},KA=()=>{const T=ue.getFullYear(),G=[];for(let xe=T-10;xe<=T+10;xe++)G.push(xe);return G},ZA=T=>{if(!s)switch(T.key){case"Enter":case" ":T.preventDefault(),Et(!Oe);break;case"Escape":Et(!1),Rc(!1),Fc(!1);break;case"Tab":Oe&&(Et(!1),Rc(!1),Fc(!1));break}},XA={width:oe||(r?"100%":"auto"),fontSize:p,fontWeight:M},YA={height:l,padding:h,backgroundColor:v||"#ffffff",border:K?void 0:"none",borderColor:d?S||"#dc3545":I||"#dee2e6",color:b||"#212529",borderRadius:A,borderWidth:B,fontWeight:M,transition:`all ${V} ${q}`},JA=qe?{flexDirection:"column",borderTop:"none",borderLeft:"1px solid #eee"}:{},QA=qe?{flex:1,minWidth:0}:void 0,ez=qe?{display:"flex",flexDirection:"row",alignItems:"stretch"}:void 0,tz={backgroundColor:C||"#ffffff",maxHeight:u==="auto"?oC!=null?`${oC}px`:void 0:u,overflowY:"auto",borderRadius:A,borderWidth:B,boxShadow:D,transition:`opacity ${V} ${q}, transform ${V} ${q}`,position:"fixed",top:nC==="bottom"?u1.top+(Ec.current?.offsetHeight||0)+parseFloat(k.replace("rem",""))*16:"auto",bottom:nC==="top"?window.innerHeight-u1.top+parseFloat(k.replace("rem",""))*16:"auto",left:pe==="left"?u1.left:"auto",right:pe==="right"?window.innerWidth-(u1.left+u1.width):"auto",width:O||"30vw",minWidth:O?void 0:0,zIndex:10001},uC={width:y,height:y,color:L||"#6c757d","--icon-rotation":$A&&Oe?"rotate(180deg)":"rotate(0deg)"},az={color:N||"#212529",marginBottom:f,fontWeight:M},nz={color:j||"#6c757d"},oz={color:S||"#dc3545",marginTop:g},cz=HA(),tt=Ct(e),pC=T=>`${T.getDate().toString().padStart(2,"0")}/${(T.getMonth()+1).toString().padStart(2,"0")}/${T.getFullYear()}`,yC=tt?Ne==="minutes"?`${pC(tt)} ${tt.getHours().toString().padStart(2,"0")}:${tt.getMinutes().toString().padStart(2,"0")}`:pC(tt):"",kC=!!ee&&(te==="icon"||te==="auto"&&!tt),iz=qA&&!kC&&!!tt&&!s,rz={width:"0.875rem",height:"0.875rem",color:L||"#6c757d"},sz=re||(tt?`${SA}${yC}`:jA);return o.jsxs("div",{className:`${W.datePickerContainer} ${i}`,ref:BL,style:XA,"data-fullwidth":r,"data-disabled":s,"data-error":!!d,children:[n&&o.jsx("label",{className:W.label,style:az,children:n}),o.jsxs("button",{ref:Ec,type:"button",onClick:()=>!s&&Et(!Oe),onKeyDown:ZA,className:`
8334
+ `,Eke="_mpRoot_31595_1",Oke="_mpHeader_31595_22",Uke="_mpTitle_31595_31",Wke="_mpList_31595_35",Gke="_mpVertical_31595_41",Kke="_mpHorizontal_31595_46",Zke="_mpItem_31595_55",Xke="_mpClickable_31595_95",Yke="_mpLeft_31595_117",Jke="_mpIcon_31595_125",Qke="_mpMeta_31595_140",e3e="_mpLabel_31595_145",t3e="_mpDate_31595_154",a3e="_mpRight_31595_160",n3e="_mpValue_31595_168",o3e="_mpHint_31595_176",c3e="_mpBadge_31595_180",i3e="_mpBadgeTop_31595_199",r3e="_mpBadgeSub_31595_206",s3e="_mpBadgeSmall_31595_213",d3e="_mpPill_31595_229",l3e="_mpRounded_31595_232",h3e="_mpCompact_31595_236",u3e="_compactItemWrapper_31595_252",p3e="_mpSummaryRoot_31595_265",y3e="_mpSummaryInner_31595_269",k3e="_mpSummaryFlex_31595_284",m3e="_mpSummaryCardWrapperHorizontal_31595_292",f3e="_mpSummaryCardWrapper_31595_292",g3e="_mpSummaryCardHorizontal_31595_303",v3e="_mpSummaryCard_31595_292",x3e="_mpSummaryValue_31595_321",M3e="_mpSummaryLabel_31595_327",_3e="_mpSummaryBadge_31595_338",L3e="_mpSummaryBadgeSub_31595_357",I3e="_mpEmpty_31595_365",b3e="_mpSummaryVertical_31595_372",w3e="_mpIconSquare_31595_380",J={mpRoot:Eke,mpHeader:Oke,mpTitle:Uke,mpList:Wke,mpVertical:Gke,mpHorizontal:Kke,mpItem:Zke,mpClickable:Xke,mpLeft:Yke,mpIcon:Jke,mpMeta:Qke,mpLabel:e3e,mpDate:t3e,mpRight:a3e,mpValue:n3e,mpHint:o3e,mpBadge:c3e,mpBadgeTop:i3e,mpBadgeSub:r3e,mpBadgeSmall:s3e,mpPill:d3e,mpRounded:l3e,mpCompact:h3e,compactItemWrapper:u3e,mpSummaryRoot:p3e,mpSummaryInner:y3e,mpSummaryFlex:k3e,mpSummaryCardWrapperHorizontal:m3e,mpSummaryCardWrapper:f3e,mpSummaryCardHorizontal:g3e,mpSummaryCard:v3e,mpSummaryValue:x3e,mpSummaryLabel:M3e,mpSummaryBadge:_3e,mpSummaryBadgeSub:L3e,mpEmpty:I3e,mpSummaryVertical:b3e,mpIconSquare:w3e},Tt=(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})`},C3e=({item:e,shape:t,onItemClick:n,color:c,renderItem:i})=>{const r=m.useCallback(()=>{n?.(e)},[n,e]),s=[J.mpItem,t==="pill"?J.mpPill:J.mpRounded,n?J.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:J.mpLeft,children:[h?o.jsx("div",{className:J.mpIconSquare,style:{background:u??Tt(p??c??"#7c3aed",1),border:`1px solid ${Tt(p??c??"#7c3aed",.18)}`,color:p??"#ffffff"},children:m.createElement(h,{size:20,color:p??"#fff",strokeWidth:1.8})}):e.icon?o.jsx("div",{className:J.mpIcon,children:e.icon}):null,o.jsxs("div",{className:J.mpMeta,children:[o.jsx("div",{className:J.mpLabel,children:e.label}),e.subLabel&&o.jsx("div",{className:J.mpDate,children:e.subLabel}),e.date&&o.jsx("div",{className:J.mpDate,children:e.date})]})]}),o.jsxs("div",{className:J.mpRight,children:[o.jsx("div",{className:J.mpValue,style:{color:e.valueColor??c??void 0},children:e.value}),e.badge?o.jsxs("div",{className:[J.mpBadge,e.badge.small?J.mpBadgeSmall:""].join(" "),style:{backgroundColor:e.badge.bg??Tt(e.badge.color||c||"#7c3aed",.12),borderColor:e.badge.bg?"transparent":Tt(e.badge.color||c||"#7c3aed",.18),color:e.badge.color??e.badge.textColor??"#0f172a",fontWeight:600},children:[o.jsx("div",{className:J.mpBadgeTop,children:e.badge.text}),e.badge.subText&&o.jsx("div",{className:J.mpBadgeSub,children:e.badge.subText})]}):e.hint?o.jsx("div",{className:J.mpHint,children:e.hint}):null]})]})},N3e=m.memo(C3e),LS=({title:e,right:t})=>!e&&!t?null:o.jsxs("div",{className:J.mpHeader,children:[o.jsx("div",{className:J.mpTitle,children:e}),o.jsx("div",{children:t})]}),IS=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},j3e=({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??IS("#7c3aed",.12),border:`1px solid ${IS(e.iconColor??"#7c3aed",.12)}`,boxShadow:"none"},children:e.iconComponent?m.createElement(e.iconComponent,{size:18,color:e.iconColor??"#7c3aed",strokeWidth:1.6}):null})]}),S3e=({item:e,bg:t,onClick:n,width:c,height:i,extraStyle:r})=>o.jsxs("div",{className:J.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:J.mpSummaryLabel,children:e.label}),o.jsx("div",{className:J.mpSummaryValue,style:{color:e.valueColor??"#2a24deff"},children:e.value}),e.badge&&o.jsxs("div",{className:J.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:J.mpSummaryBadgeSub,children:e.badge.subText})]})]}),bS=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},wS=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:bS("#7c3aed",.08),border:`1px solid ${e.badge.bg?e.badge.bg:bS("#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]})]}),CS=(e,t)=>{try{if(typeof e=="function"){const n=e(t);if(n!==void 0)return n}}catch{}try{return m.createElement(e,{item:t})}catch(n){return console.warn("chooseDefaultRender: impossible de rendre CompactRenderer",n),null}},$3e=e=>{switch(e){case"image":return t=>m.createElement(j3e,{item:t});case"pertinence":return t=>m.createElement(S3e,{item:t});case"alternateHorizontal":return t=>CS(wS,t);case"compact":return t=>CS(wS,t);case"summary":return;case"default":default:return}},yA=({item:e,orientation:t,bg:n,border:c,valueColor:i,onClick:r,width:s,height:d,extraStyle:l})=>{const u=t==="horizontal"?J.mpSummaryCardHorizontal:J.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:J.mpSummaryBadge,children:[e.badge.text,e.badge.subText&&o.jsx("div",{className:J.mpSummaryBadgeSub,children:e.badge.subText})]}),o.jsx("div",{className:J.mpSummaryValue,style:{color:i},children:e.value}),o.jsx("div",{className:J.mpSummaryLabel,children:e.label})]})},q3e=["transparent","transparent","transparent","transparent"],A3e=["transparent","transparent","transparent","transparent"],z3e=["#059669","#2563eb","#b45309","#7c3aed"],V3e=(e,t=1)=>{try{return Tt(e,t)}catch{return`rgba(124, 58, 237, ${t})`}},kA=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=q3e,summaryBorderColors:k=A3e,summaryValueColors:x=z3e,preset:M,background:v}=e,{itemsContainerStyle:I,itemsContainerClassName:b,summaryGridColumns:C,compactItemWidth:w,compactItemHeight:_,compactItemStyle:L,summaryCardWidth:S,summaryCardHeight:N,summaryCardStyle:j}=e,A=n==="vertical",B={"--mp-accent":r,"--mp-accent-soft":V3e(r,.08),"--mp-bg-primary":v},D=[J.mpRoot,A?J.mpVertical:J.mpHorizontal,s?J.mpCompact:"",f?J.mpSummaryRoot:"",c!=="auto"?c==="vertical"?J.mpOrientationVertical:J.mpOrientationHorizontal:"",h].filter(Boolean).join(" "),V=m.useMemo(()=>y||($3e(M)??void 0),[y,M]);if(f){const q=c==="horizontal"?J.mpSummaryFlex:J.mpSummaryVertical,H={...(C?{display:"grid",gridTemplateColumns:`repeat(${C}, 1fr)`,gap:18,alignItems:"stretch",width:"100%"}:void 0)??{},...I??{}};return o.jsxs("div",{className:D,style:B,"aria-busy":u,children:[d&&o.jsx(LS,{title:d}),o.jsx("div",{className:J.mpSummaryInner,children:o.jsx("div",{className:`${q} ${b??""}`,style:H,children:t.length===0?o.jsx("div",{className:J.mpEmpty,children:p}):t.map((R,z)=>{const U=R.bgColor??g[z%g.length],X=R.borderColor??k[z%k.length],ie=R.valueColor??x[z%x.length];return V?o.jsx("div",{className:c==="horizontal"?J.mpSummaryCardWrapperHorizontal:J.mpSummaryCardWrapper,style:{width:S??void 0,height:N??void 0,...j??{}},children:V(R,z)},R.id):o.jsx(yA,{item:R,orientation:c==="horizontal"?"horizontal":"vertical",bg:U,border:X,valueColor:ie,onClick:l,width:S??void 0,height:N??void 0,extraStyle:j},R.id)})})})]})}return o.jsxs("div",{className:D,style:B,"aria-busy":u,children:[d&&o.jsx(LS,{title:d}),o.jsx("div",{className:J.mpList,style:I,children:u?o.jsx("div",{className:J.mpEmpty,children:"Chargement…"}):t.length===0?o.jsx("div",{className:J.mpEmpty,children:p}):t.map(q=>{const $=s?{width:w??void 0,height:_??void 0,boxSizing:"border-box",...L??{}}:void 0;return o.jsx("div",{className:s?J.compactItemWrapper:void 0,style:$,children:o.jsx(N3e,{item:q,shape:i,onItemClick:l,color:r,renderItem:V?H=>V(H,t.indexOf(H)):void 0})},q.id)})})]})};m.memo(kA);const P3e=({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,k=n?typeof n=="number"?`${n}px`:n:void 0,x=r&&typeof r=="object"&&!m.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?xt[M.icon]:void 0,I=28,b=M?.iconSize??I,C=["chart-container",`variant-${u}`,p?"with-border":"",d].filter(Boolean).join(" "),w=c.contentBackground??void 0,_=typeof h=="number"?`${h}px`:h;return o.jsxs("div",{className:C,style:{width:g,height:k,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:Z(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:w},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)||I})}),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}))})]})},tC=({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:k,titleKey:x})=>{const M=c||y?.icon,v=typeof M=="string",I=v?xt[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:Z(k,x),children:[I&&o.jsx(I,{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:"✕"})]})},mA=m.createContext(null),T3e=(e="alert")=>`${e}_${Math.random().toString(36).slice(2,9)}`,H3e=({children:e,defaultDuration:t=4e3,maxAlerts:n,containerClassName:c,containerStyle:i})=>{const[r,s]=m.useState([]),d=m.useRef(new Map),l=m.useRef(null),h=m.useRef(null),u=m.useRef(n);m.useEffect(()=>()=>{d.current.forEach(_=>window.clearTimeout(_)),d.current.clear()},[]);const p=(_,L)=>{const S=L===void 0||L===0?t:L;if(S===-1)return;const N=window.setTimeout(()=>{g(_)},S);d.current.set(_,N)},y=_=>{const L=d.current.get(_);L&&(window.clearTimeout(L),d.current.delete(_))},f=_=>{const L=T3e(),S={..._,id:L,createdAt:Date.now()};return s(N=>{const j=[S,...N],A=u.current;return typeof A=="number"&&A>=0&&j.length>A?(j.slice(A).forEach(D=>y(D.id)),j.slice(0,A)):j}),p(L,_.duration),L},g=_=>{y(_),s(L=>L.filter(S=>S.id!==_))},k=(_,L)=>{s(S=>S.map(N=>N.id===_?{...N,...L}:N))},x=()=>{d.current.forEach(_=>window.clearTimeout(_)),d.current.clear(),s([])},M=_=>{h.current=_},v=()=>r.slice(),I=m.useMemo(()=>({showAlert:f,dismissAlert:g,updateAlert:k,clearAlerts:x,setContainerRef:M,getAlertsSnapshot:v}),[r]),b=h.current,C=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"},children:o.jsx(mle,{mode:"popLayout",children:r.map(_=>o.jsx(Xw.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:"100%",pointerEvents:"auto",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.12)",borderRadius:"8px",marginBottom:"6px",backgroundColor:_.background||_.model?.background||"var(--color-background, #fff)",border:"1px solid rgba(0, 0, 0, 0.08)",overflow:"hidden"},children:o.jsx(tC,{id:_.id,text:_.text,subtext:_.subtext,icon:_.icon,background:"transparent",colorTextPrimary:_.colorTextPrimary,colorTextSub:_.colorTextSub,model:_.model,onClose:()=>g(_.id),size:"100%",style:{boxShadow:"none"}})},_.id))})}),w=o.jsx("div",{ref:_=>{h.current||(l.current=_)},className:c,style:{width:"100%",position:"relative",...i},"aria-live":"polite",children:C});return o.jsxs(mA.Provider,{value:I,children:[b?mw.createPortal(C,b):w,e]})},D3e=()=>{const e=m.useContext(mA);if(!e)throw new Error("useAlerts must be used inside an AlertsProvider");return e},B3e={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"}},R3e="_container_18zbo_1",F3e="_icon_18zbo_9",E3e="_selectWrapper_18zbo_23",Hb={container:R3e,icon:F3e,selectWrapper:E3e},O3e=({options:e,defaultValue:t,onChange:n,label:c})=>{const[i,r]=m.useState(t||e[0]?.value||""),s=d=>{r(d),n?.(d)};return o.jsxs("div",{className:Hb.container,children:[o.jsxs("div",{className:Hb.icon,children:[o.jsx(w1,{size:18}),o.jsx("p",{children:c})]}),o.jsx("div",{className:Hb.selectWrapper,children:o.jsx(Yw,{field:{name:"periode",label:"",options:e},value:i,onChange:s,onBlur:()=>{}})})]})},U3e=250,W3e=m.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]=m.useState(!1),[k,x]=m.useState(!1),M=m.useRef(null),v=m.useRef(null),I=m.useRef(null),b=m.useRef(null);m.useEffect(()=>{const _=M.current;if(!_)return;const L=_.parentElement;return L?(window.getComputedStyle(L).position==="static"&&(L.setAttribute("data-scp-prev-position",L.style.position??""),L.style.position="relative",L.setAttribute("data-scp-position-changed","true")),()=>{if(L.getAttribute("data-scp-position-changed")==="true"){const N=L.getAttribute("data-scp-prev-position")??"";L.style.position=N,L.removeAttribute("data-scp-position-changed"),L.removeAttribute("data-scp-prev-position")}}):void 0},[]),m.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]),m.useEffect(()=>{const _=v.current;b.current&&(window.clearTimeout(b.current),b.current=null);const L=S=>{if(S.target===_&&!(S.propertyName!=="transform"&&S.propertyName!=="opacity"))if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}};return _&&(_.addEventListener("transitionend",L),b.current=window.setTimeout(()=>{if(f){x(!0),i?.();try{_?.focus()}catch{}}else{s?.();try{I.current?.focus()}catch{}}},U3e+60)),f&&(I.current=document.activeElement),()=>{_&&_.removeEventListener("transitionend",L),b.current&&(window.clearTimeout(b.current),b.current=null)}},[f,i,s]),m.useEffect(()=>{const _=L=>{L.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))},w=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"} ${k?"interactive":""} ${l}`,style:{width:w,...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(Qe,{size:18})})]}),o.jsx("div",{className:"scp-body",children:h})]})]})});function G3e(e){const t=m.useRef("");m.useEffect(()=>{if(e){t.current=document.body.style.overflow,document.body.style.overflow="hidden";return}document.body.style.overflow=t.current||""},[e])}const K3e="_container_1pfsp_1",Z3e="_title_1pfsp_8",NS={container:K3e,title:Z3e},X3e=({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:`${NS.container} ${c}`,style:r,children:o.jsx("h2",{className:NS.title,children:e})})},Y3e="_modalOverlay_1878x_1",J3e="_modalContainer_1878x_16",Q3e="_modalTitle_1878x_29",eme="_modalInput_1878x_38",tme="_modalTextarea_1878x_39",ame="_modalActions_1878x_70",nme="_cancelBtn_1878x_77",ome="_saveBtn_1878x_99",cme="_inputError_1878x_141",ime="_inlineAlert_1878x_146",at={modalOverlay:Y3e,modalContainer:J3e,modalTitle:Q3e,modalInput:eme,modalTextarea:tme,modalActions:ame,cancelBtn:nme,saveBtn:ome,inputError:cme,inlineAlert:ime},Bc=({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]=m.useState({}),f=m.useRef(null),[g,k]=m.useState(!1),[x,M]=m.useState(!1),v=m.useRef(null);if(m.useEffect(()=>{if(!e)return;const _={};for(const L of i)_[L.name]=Object.prototype.hasOwnProperty.call(r,L.name)?r[L.name]:"";return y(_),requestAnimationFrame(()=>{f.current?.focus();const L=f.current;if(L&&typeof L.selectionStart=="number"){const S=String(L.value??"").length;L.setSelectionRange(S,S)}}),()=>{v.current&&(window.clearTimeout(v.current),v.current=null)}},[e]),m.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 I=(_,L)=>{y(S=>({...S,[_]:L})),l&&l(_,L)},b=async()=>{if(!Object.values(p).some(_=>_===""||_===void 0))try{k(!0);const _=await n(p);if(typeof _=="string"&&_==="duplicate-same"){k(!1);return}y({}),k(!1),t()}catch(_){console.error("AddItemModal onSave error:",_),k(!1),t()}},C=_=>{_.target===_.currentTarget&&t()},w=_=>_.stopPropagation();return o.jsx("div",{className:at.modalOverlay,onMouseDown:C,role:"dialog","aria-modal":"true",children:o.jsxs("div",{className:at.modalContainer,onMouseDown:w,onClick:w,children:[o.jsx("h2",{className:at.modalTitle,children:c}),i.map((_,L)=>{const S=p[_.name]??"",N=L===0&&!!s,j={name:_.name,placeholder:_.placeholder||_.label,value:String(S),onChange:A=>I(_.name,A.target.value),className:_.type==="textarea"?`${at.modalTextarea} ${N?at.inputError:""}`:`${at.modalInput} ${N?at.inputError:""}`,tabIndex:0,disabled:g};return L===0&&(j.ref=A=>{f.current=A}),o.jsxs("div",{style:{marginBottom:8},children:[_.type==="textarea"?o.jsx("textarea",{rows:_.rows||4,...j}):o.jsx("input",{type:_.type||"text",...j}),L===0&&x&&s&&o.jsx("div",{style:{marginTop:8},children:o.jsx(tC,{text:s,background:"#fff5f5",colorTextPrimary:"#ef4444",onClose:()=>M(!1),className:at.inlineAlert})})]},_.name)}),o.jsxs("div",{className:at.modalActions,children:[o.jsx("button",{className:at.cancelBtn,onClick:t,type:"button",disabled:g,children:u}),o.jsx("button",{className:at.saveBtn,onClick:b,type:"button",disabled:g||!!d,children:g?"En cours...":h})]})]})})},rme=({title:e,keyCount:t,onAddKey:n,a11yConfig:c})=>{const[i,r]=m.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:Z(c,e),children:e}),o.jsxs("p",{children:[t," clés"]})]}),o.jsxs("button",{onClick:()=>r(!0),className:"add-key-button",children:[o.jsx(Vc,{className:"add-key-icon"}),"Clé"]}),o.jsx(Bc,{isOpen:i,title:"Ajouter une clé",onClose:()=>r(!1),onSave:s,fields:[{name:"key",label:"Nouvelle clé",placeholder:"Entrer une nouvelle clé"}]})]})},sme=({modules:e,onEdit:t,onDelete:n,onAddModule:c,onSelectModule:i,addModalFields:r,addModalTitle:s})=>{const[d,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(null),[f,g]=m.useState(!1),k=()=>l(!0),x=()=>l(!1),M=_=>{if(c){const L=_.code?.trim()||_.id?.trim(),S=_.title?.trim(),N=L||S||String(Date.now()),j=S||L||`Module ${N}`;c({id:N,title:j,subtitle:"",translations:{}})}x()},v=(_,L)=>{_.stopPropagation(),u(L)},I=()=>u(null),b=_=>{if(!h){I();return}const L={...h,title:_.title||h.title,subtitle:""};t&&t(L),I()},C=(_,L)=>{_.stopPropagation(),n&&n(L)},w=_=>{y(_.id),i&&i(_)};return f?o.jsx("div",{className:"module-sidebar collapsed",children:o.jsx(n1,{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(zc,{size:18,className:"header-folder",onClick:k}),o.jsx(n1,{size:18,className:"header-menu",onClick:()=>g(!0)})]})]}),o.jsx("hr",{className:"divider"}),o.jsx("div",{className:"module-list",children:e.map(_=>{const L=Object.keys(_.translations||{}).length,S=L>0||_.id===p;return o.jsxs("div",{className:`module-item ${_.id===p?"selected":""}`,onClick:()=>w(_),role:"button",tabIndex:0,onKeyDown:N=>{N.key==="Enter"&&w(_)},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,S&&o.jsxs("span",{className:"count",children:[" ",L," "]})]}),_.subtitle?o.jsx("div",{className:"module-subtitle",children:_.subtitle}):null]})]}),o.jsxs("div",{className:"module-actions",children:[t&&o.jsx(o1,{onClick:N=>v(N,_),color:"#777",size:16}),n&&o.jsx(ut,{onClick:N=>C(N,_.id),color:"#777",size:16})]})]},_.id)})}),o.jsx(Bc,{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(Bc,{isOpen:!!h,onClose:I,onSave:b,title:"Éditer le module",initialValues:{title:h.title},fields:[{name:"title",label:"Titre",placeholder:"Titre du module"}]})]})},fA=({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:Z(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}`})]}),dme=({keyName:e,translations:t,availableLanguages:n,onDeleteKey:c,onEditKey:i,onEditTranslation:r,onDeleteTranslation:s,onAddTranslation:d,draggable:l=!1,checkDuplicateLocal:h})=>{const[u,p]=m.useState(!1),[y,f]=m.useState(""),[g,k]=m.useState(null),[x,M]=m.useState(""),[v,I]=m.useState(""),[b,C]=m.useState(!1),[w,_]=m.useState(!1),[L,S]=m.useState(null),[N,j]=m.useState(!1),A=t.map(z=>z.language),B=n.filter(z=>!A.includes(z.code)),D=()=>{y&&v.trim()&&(d?.(e,y,v.trim()),f(""),I(""),p(!1))},V=(z,U)=>{k(z),M(U)},q=z=>{r?.(e,z,x),k(null),M("")},$=()=>{k(null),M("")},H=async z=>{const U=z.name?.trim();if(U){if(S(null),j(!1),U===e||!i)return C(!1),"ok";try{const X=await i(e,U);if(typeof X=="string"&&X==="ok")C(!1),S(null);else{if(typeof X=="string"&&X==="duplicate-same")return S("Une clé existe déjà dans ce module."),j(!0),"duplicate-same";if(typeof X=="string"&&X==="duplicate-other")return C(!1),S(null),"duplicate-other";C(!1)}}catch(X){console.error("Erreur handleRenameSave:",X),S("Erreur lors du renommage.")}}},R=(z,U)=>{if(z!=="name")return;const X=U.trim();S(null),j(!1),X&&typeof h=="function"&&(h(X,e)?(S("Une clé existe déjà dans ce module."),j(!0)):(S(null),j(!1)))};return o.jsxs("div",{className:`translation-key ${w?"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:()=>_(!w),title:w?"Déplier":"Replier",children:w?o.jsx(N1,{className:"collapse-icon"}):o.jsx(Ht,{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:z=>{z.stopPropagation(),C(!0)},title:"Renommer la clé",children:o.jsx(ft,{className:"action-icon"})}),o.jsx("button",{onClick:z=>{z.stopPropagation(),c?.(e)},className:"action-button delete",title:"Supprimer la clé",children:o.jsx(ut,{className:"action-icon"})})]})]}),o.jsx("div",{className:`translations-container ${w?"":"expanded"}`,children:!l&&o.jsxs(o.Fragment,{children:[t.map(z=>o.jsxs("div",{className:"translation-row",children:[o.jsx("div",{className:"language-code",children:z.language}),o.jsx("div",{className:"translation-content",children:g===z.language?o.jsxs(o.Fragment,{children:[o.jsx("input",{type:"text",value:x,onChange:U=>M(U.target.value),className:"edit-input",autoFocus:!0,onKeyDown:U=>{U.key==="Enter"&&q(z.language),U.key==="Escape"&&$()}}),o.jsx("button",{onClick:()=>q(z.language),className:"save-button",disabled:!x.trim(),children:"Enregistrer"}),o.jsx("button",{onClick:$,className:"cancel-button",children:o.jsx(Qe,{className:"action-icon"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"translation-text",title:z.value,children:z.value}),o.jsx("button",{onClick:()=>V(z.language,z.value),className:"edit-button",title:"Éditer la traduction",children:o.jsx(ft,{className:"action-icon"})}),o.jsx("button",{onClick:()=>s?.(e,z.language),className:"delete-translation-button",title:"Supprimer la traduction",children:o.jsx(Qe,{className:"action-icon"})})]})})]},z.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:z=>f(z.target.value),className:"language-select",children:[o.jsx("option",{value:"",children:"Sélectionnez la langue"}),B.map(z=>o.jsxs("option",{value:z.code,children:[z.name," (",z.code,")"]},z.code))]})}),y&&o.jsx("input",{type:"text",value:v,onChange:z=>I(z.target.value),placeholder:"Entrez la traduction...",className:"translation-input",onKeyDown:z=>{z.key==="Enter"&&D(),z.key==="Escape"&&(p(!1),f(""),I(""))}}),o.jsx("button",{onClick:D,disabled:!y||!v.trim(),className:"save-button",children:"Ajouter"}),o.jsx("button",{onClick:()=>{p(!1),f(""),I("")},className:"cancel-button",children:o.jsx(Qe,{className:"action-icon"})})]})]}):o.jsxs("button",{onClick:()=>p(!0),className:"show-add-button",disabled:B.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(Bc,{isOpen:b,onClose:()=>{C(!1),S(null),j(!1)},onSave:H,onFieldChange:R,title:"Renommer la clé",initialValues:{name:e},fields:[{name:"name",label:"Nom de la clé",placeholder:"Nom de la clé"}],errorMessage:L||"",disableSave:N})]})},lme="_wrapper_1wvht_1",hme="_leftGroup_1wvht_12",ume="_filterButton_1wvht_21",pme="_open_1wvht_42",yme="_filterIcon_1wvht_42",kme="_infoText_1wvht_58",mme="_pickerContainer_1wvht_66",fme="_srOnly_1wvht_79",gme="_pickerLabel_1wvht_91",vme="_datetime_1wvht_98",xme="_rightGroup_1wvht_107",Mme="_searchInputWrap_1wvht_116",_me="_searchInput_1wvht_116",Lme="_searchIcon_1wvht_152",De={wrapper:lme,leftGroup:hme,filterButton:ume,open:pme,filterIcon:yme,infoText:kme,pickerContainer:mme,srOnly:fme,pickerLabel:gme,datetime:vme,rightGroup:xme,searchInputWrap:Mme,searchInput:_me,searchIcon:Lme};function Ime({onDateChange:e,onSearch:t,initialDate:n}){const[c,i]=m.useState(!1),[r,s]=m.useState(n??""),d=m.useRef(null);m.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)},[]),m.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:De.wrapper,ref:d,children:[o.jsxs("div",{className:De.leftGroup,children:[o.jsxs("button",{type:"button",className:`${De.filterButton} ${c?De.open:""}`,onClick:l,"aria-expanded":c,"aria-haspopup":"dialog","aria-controls":"entry-datetime",children:[o.jsx("span",{children:"Entry time"}),o.jsx("svg",{className:De.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:De.infoText,children:"Confidence interval: step ± 15' / exit ± 30'"}),c&&o.jsxs("div",{className:De.pickerContainer,role:"dialog","aria-label":"Choisir la date et l’heure",children:[o.jsx("label",{className:De.pickerLabel,htmlFor:"entry-datetime",children:o.jsx("span",{className:De.srOnly,children:"Choisir la date et l’heure"})}),o.jsx("input",{id:"entry-datetime",className:De.datetime,type:"datetime-local",value:r,onChange:h,"aria-label":"Date et heure d’entrée"})]})]}),o.jsx("div",{className:De.rightGroup,children:o.jsxs("div",{className:De.searchInputWrap,children:[o.jsx("input",{className:De.searchInput,placeholder:"Search...",onChange:u,"aria-label":"Search"}),o.jsx("svg",{className:De.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 bme=({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:[],k=g.length===0,x=g.every(b=>typeof b=="string"),M=g.some(b=>Array.isArray(b)),v=(b,C,w)=>d?d(b,C,w):o.jsx("span",{className:"slb-cell-text",children:b}),I=f?{"--col-gap":f}:void 0;return k?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:I,children:g.map((b,C)=>{const w=s[C]||"";if(Array.isArray(b)){const[_,L]=b;return o.jsxs("div",{className:`slb-row ${w}`,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(L,C,1)})]},C)}return o.jsxs("div",{className:`slb-row ${w}`,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)})})]})},wme=({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,k)=>{const x=u[k]||"";if(Array.isArray(g)){const[M,v]=g,I=s[k]||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:I,padding:d,width:l,minWidth:l},children:M})}),o.jsx("div",{className:"clb-text",children:v})]},k)}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})]},k):o.jsx("div",{className:`clb-fullrow ${x}`,style:{background:h??void 0},children:o.jsx("span",{children:g})},k)})})]})},Cme=({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)})})]})},Nme=({className:e="",style:t={},children:n,gap:c="1rem"})=>o.jsx("div",{className:`frc-root ${e}`,style:{...t,"--frc-gap":c},children:m.Children.map(n,i=>o.jsx("div",{className:"frc-item",children:i}))}),jme=({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:m.Children.map(n,r=>o.jsx("div",{className:"lcc-cell",children:r}))}),Sme="_overlay_3x4or_2",$me="_fadeIn_3x4or_1",qme="_popup_3x4or_17",Ame="_slideUp_3x4or_1",zme="_header_3x4or_28",Vme="_body_3x4or_40",Pme="_footer_3x4or_51",Tme="_cancelButton_3x4or_59",Hme="_confirmButton_3x4or_77",Dme="_warning_3x4or_97",Bme="_danger_3x4or_106",Rme="_info_3x4or_115",jt={overlay:Sme,fadeIn:$me,popup:qme,slideUp:Ame,header:zme,body:Vme,footer:Pme,cancelButton:Tme,confirmButton:Hme,warning:Dme,danger:Bme,info:Rme},Fme=({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:jt.overlay,onClick:l,onKeyDown:h,role:"dialog","aria-labelledby":"confirmation-title","aria-describedby":"confirmation-message",children:o.jsxs("div",{className:`${jt.popup} ${jt[d]}`,children:[o.jsx("div",{className:jt.header,children:o.jsx("h3",{id:"confirmation-title",children:t})}),o.jsx("div",{className:jt.body,children:o.jsx("p",{id:"confirmation-message",children:n})}),o.jsxs("div",{className:jt.footer,children:[o.jsx("button",{className:jt.cancelButton,onClick:i,type:"button",children:s}),o.jsx("button",{className:jt.confirmButton,onClick:c,type:"button",autoFocus:!0,children:r})]})]})})},Eme=()=>{const[e,t]=m.useState({isOpen:!1,title:"",message:"",onConfirm:null}),n=m.useCallback((r,s,d)=>{t({isOpen:!0,title:r,message:s,onConfirm:d})},[]),c=m.useCallback(()=>{t(r=>({...r,isOpen:!1,onConfirm:null}))},[]),i=m.useCallback(()=>{e.onConfirm?.(),c()},[e.onConfirm,c]);return{isOpen:e.isOpen,title:e.title,message:e.message,showConfirmation:n,hideConfirmation:c,handleConfirm:i}},Ome="_container_ilmn1_1",Ume="_selectButton_ilmn1_7",Wme="_disabled_ilmn1_22",Gme="_error_ilmn1_39",Kme="_outline_ilmn1_52",Zme="_filled_ilmn1_58",Xme="_sm_ilmn1_67",Yme="_md_ilmn1_73",Jme="_lg_ilmn1_79",Qme="_buttonContent_ilmn1_85",e6e="_label_ilmn1_93",t6e="_placeholder_ilmn1_103",a6e="_iconsContainer_ilmn1_108",n6e="_loadingSpinner_ilmn1_115",o6e="_spin_ilmn1_1",c6e="_arrowIcon_ilmn1_133",i6e="_arrowIconOpen_ilmn1_141",r6e="_dropdown_ilmn1_146",s6e="_dropdownIn_ilmn1_1",d6e="_searchContainer_ilmn1_171",l6e="_searchInputWrapper_ilmn1_177",h6e="_searchIcon_ilmn1_183",u6e="_searchInput_ilmn1_177",p6e="_optionsList_ilmn1_208",y6e="_noResults_ilmn1_231",k6e="_option_ilmn1_208",m6e="_optionHighlighted_ilmn1_261",f6e="_optionSelected_ilmn1_266",g6e="_optionDisabled_ilmn1_277",v6e="_optionLabel_ilmn1_283",x6e="_checkIcon_ilmn1_291",M6e="_widthFull_ilmn1_299",_6e="_width64_ilmn1_302",L6e="_width80_ilmn1_305",I6e="_width96_ilmn1_308",se={container:Ome,selectButton:Ume,disabled:Wme,error:Gme,default:"_default_ilmn1_48",outline:Kme,filled:Zme,sm:Xme,md:Yme,lg:Jme,buttonContent:Qme,label:e6e,placeholder:t6e,iconsContainer:a6e,loadingSpinner:n6e,spin:o6e,arrowIcon:c6e,arrowIconOpen:i6e,dropdown:r6e,dropdownIn:s6e,searchContainer:d6e,searchInputWrapper:l6e,searchIcon:h6e,searchInput:u6e,optionsList:p6e,noResults:y6e,option:k6e,optionHighlighted:m6e,optionSelected:f6e,optionDisabled:g6e,optionLabel:v6e,checkIcon:x6e,widthFull:M6e,width64:_6e,width80:L6e,width96:I6e},b6e=({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"})=>{const[p,y]=m.useState(!1),[f,g]=m.useState(""),[k,x]=m.useState(0),[M,v]=m.useState({top:0,left:0,width:0}),I=m.useRef(null),b=m.useRef(null),C=m.useRef(null),w=m.useMemo(()=>f?e.filter(q=>q.label.toLowerCase().includes(f.toLowerCase())):e,[e,f]),_=e.find(q=>q.value===t),L=m.useCallback(()=>{if(I.current){const q=I.current.getBoundingClientRect();v({top:q.top,left:q.left,width:q.width})}},[]);m.useEffect(()=>(p&&(L(),window.addEventListener("scroll",L,!0),window.addEventListener("resize",L)),()=>{window.removeEventListener("scroll",L,!0),window.removeEventListener("resize",L)}),[p,L]),m.useEffect(()=>{const q=$=>{I.current&&!I.current.contains($.target)&&b.current&&!b.current.contains($.target)&&(y(!1),g(""))};return document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[]),m.useEffect(()=>{x(0)},[w]);const S=q=>{q.disabled||(n?.(q.value,q),y(!1),g(""))},N=q=>{g(q.target.value),p||y(!0)},j=q=>{if(!p){(q.key==="ArrowDown"||q.key==="Enter")&&y(!0);return}switch(q.key){case"ArrowDown":q.preventDefault(),x($=>$<w.length-1?$+1:$);break;case"ArrowUp":q.preventDefault(),x($=>$>0?$-1:$);break;case"Enter":q.preventDefault(),w[k]&&S(w[k]);break;case"Escape":y(!1),g("");break}},A=()=>[se.selectButton,se[l],se[h],i?se.disabled:"",s?se.error:"",d].filter(Boolean).join(" "),B=()=>{switch(u){case"w-64":return se.width64;case"w-80":return se.width80;case"w-96":return se.width96;default:return se.widthFull}},D=(q,$)=>[se.option,$===k?se.optionHighlighted:"",q.value===t?se.optionSelected:"",q.disabled?se.optionDisabled:""].filter(Boolean).join(" "),V={position:"fixed",top:M.top+(I.current?.offsetHeight||0)+4,left:M.left,width:M.width,zIndex:9999};return o.jsxs("div",{className:`${se.container} ${B()}`,children:[o.jsx("button",{ref:I,className:A(),onClick:()=>!i&&y(!p),onKeyDown:j,tabIndex:i?-1:0,type:"button","aria-haspopup":"listbox","aria-expanded":p,disabled:i,children:o.jsxs("div",{className:se.buttonContent,children:[o.jsx("span",{className:`${se.label} ${_?"":se.placeholder}`,children:_?_.label:c}),o.jsxs("div",{className:se.iconsContainer,children:[r&&o.jsx("div",{className:se.loadingSpinner}),o.jsx("svg",{className:`${se.arrowIcon} ${p?se.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"})})]})]})}),p&&mw.createPortal(o.jsxs("div",{className:`${se.dropdown} ${B()}`,style:V,ref:b,children:[o.jsx("div",{className:se.searchContainer,children:o.jsxs("div",{className:se.searchInputWrapper,children:[o.jsx("svg",{className:se.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:C,type:"text",value:f,onChange:N,placeholder:"Rechercher...",className:se.searchInput,autoFocus:!0})]})}),o.jsx("div",{className:se.optionsList,children:w.length===0?o.jsx("div",{className:se.noResults,children:"Aucun résultat trouvé"}):o.jsx("ul",{role:"listbox",children:w.map((q,$)=>o.jsx("li",{className:D(q,$),onClick:()=>S(q),onMouseEnter:()=>x($),role:"option","aria-selected":q.value===t,"aria-disabled":q.disabled,children:o.jsxs("div",{className:se.buttonContent,children:[o.jsx("span",{className:se.optionLabel,title:q.label,children:q.label}),q.value===t&&o.jsx("svg",{className:se.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"})})]})},q.value))})})]}),document.body)]})},w6e="_container_uq7pt_1",C6e="_item_uq7pt_7",N6e="_mainValue_uq7pt_13",j6e="_label_uq7pt_17",S6e="_subValue_uq7pt_22",$6e="_subValueWrapper_uq7pt_27",q6e="_subSeparator_uq7pt_32",Ze={container:w6e,item:C6e,mainValue:N6e,label:j6e,subValue:S6e,subValueWrapper:$6e,subSeparator:q6e},A6e=({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,k]=p.split("/").map(x=>x.trim());return o.jsxs("span",{className:Ze.subValueWrapper,children:[o.jsx("span",{className:Ze.subLeft,style:{color:y},children:g}),o.jsx("span",{className:Ze.subSeparator,children:" / "}),o.jsx("span",{className:Ze.subRight,style:{color:f},children:k})]})};return o.jsxs("div",{className:Ze.container,style:{backgroundColor:d},children:[e&&o.jsxs("div",{className:Ze.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ze.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:e}),o.jsx("div",{className:Ze.label,style:{color:l},children:"DMS"})]}),t.map((p,y)=>o.jsxs("div",{className:Ze.item,style:{flex:`1 1 ${n}`},children:[o.jsx("div",{className:Ze.mainValue,style:{fontSize:c,fontWeight:i,color:h},children:p.value}),o.jsx("div",{className:Ze.label,style:{color:l},children:p.label}),o.jsx("div",{className:Ze.subValue,style:{fontSize:r,fontWeight:s},children:p.subValue&&u(p.subValue,p.subLeftColor,p.subRightColor)})]},y))]})},z6e="_encours_16ist_1",V6e="_header_16ist_19",P6e="_iconWrap_16ist_27",T6e="_title_16ist_36",H6e="_items_16ist_47",D6e="_spaceEvenly_16ist_56",B6e="_item_16ist_47",R6e="_valueContainer_16ist_86",F6e="_value_16ist_86",E6e="_label_16ist_108",rt={encours:z6e,header:V6e,iconWrap:P6e,title:T6e,items:H6e,spaceEvenly:D6e,item:B6e,valueContainer:R6e,value:F6e,label:E6e},qc=e=>typeof e=="number"?`${e}px`:typeof e=="string"?e:void 0;function O6e(e,t){const n={},c={};return e.valueColor&&(n.color=e.valueColor),e.valueFontSize!==void 0?n.fontSize=qc(e.valueFontSize):t.defaultValueFontSize!==void 0&&(n.fontSize=qc(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=qc(e.labelFontSize):t.defaultLabelFontSize!==void 0&&(c.fontSize=qc(t.defaultLabelFontSize)),e.labelFontWeight!==void 0?c.fontWeight=e.labelFontWeight:t.defaultLabelFontWeight!==void 0&&(c.fontWeight=t.defaultLabelFontWeight),{valueStyle:n,labelStyle:c}}function U6e(){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 W6e(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:k,gap:x,className:M,ariaLabel:v}=e,I=r?xt[r]:void 0,b={background:g,width:qc(k),...f},C={};n&&(C.color=n),c!==void 0&&(C.fontSize=qc(c)),i!==void 0&&(C.fontWeight=i);const w={};return d&&(w.color=d),o.jsxs("section",{className:`${rt.encours} ${M??""}`,style:b,"aria-label":v??t,children:[o.jsxs("div",{className:rt.header,children:[o.jsx("div",{className:rt.iconWrap,"aria-hidden":!0,style:w,children:I?o.jsx(I,{size:typeof s=="number"?s:void 0}):o.jsx(U6e,{})}),o.jsx("div",{className:rt.title,style:C,children:t})]}),o.jsx("div",{className:`${rt.items} ${x===void 0?rt.spaceEvenly:""}`,role:"list",style:x!==void 0?{gap:`${x}px`}:{},children:y.map((_,L)=>{const{valueStyle:S,labelStyle:N}=O6e(_,{defaultValueFontSize:l,defaultValueFontWeight:h,defaultLabelFontSize:u,defaultLabelFontWeight:p});return o.jsx("div",{className:rt.item,role:"listitem",style:{..._.background?{background:_.background}:{},..._.width?{width:qc(_.width)}:{}},children:o.jsxs("div",{className:rt.valueContainer,children:[o.jsx("div",{className:rt.value,style:S,children:_.value}),_.label&&o.jsx("div",{className:rt.label,style:N,children:_.label})]})},`${String(_.label??_.value)}-${L}`)})})]})}const G6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M480-360 280-559h400z"})),K6e=m.memo(G6e),Z6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"m280-400 200-201 200 201z"})),X6e=m.memo(Z6e),Y6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},Q.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"})),J6e=m.memo(Y6e),Q6e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e},Q.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"})),efe=m.memo(Q6e),tfe=({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]=m.useState(!1),[f,g]=m.useState(e),[k,x]=m.useState(!1);if(m.useEffect(()=>{x(!0)},[]),m.useEffect(()=>{g(e)},[e]),!k)return null;const M=(b,C)=>{C<4||g(w=>w.map(_=>_.component_key===b?{..._,visible:!_.visible}:_))},v=()=>{t(f),y(!1)},I=Z(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:I,children:[o.jsx(JS,{width:d,height:d,fill:l?.icon||"currentColor",style:{transition:"color 0.2s"}}),p?o.jsx(X6e,{width:d,height:d,fill:l?.icon||"currentColor"}):o.jsx(K6e,{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(m.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:w=>{C>=4&&(w.currentTarget.style.background="#F9FAFB")},onMouseLeave:w=>{C>=4&&(w.currentTarget.style.background="transparent")},children:[o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:8,flexShrink:0},children:b.visible?o.jsx(J6e,{width:20,height:20,fill:l?.activeBg||"var(--color-primary, #008FBB)"}):o.jsx(efe,{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})})]})]})},afe="_container_zhny9_1",nfe="_card_zhny9_15",ofe="_footer_zhny9_33",cfe="_noPaddingMobile_zhny9_51",ri={container:afe,card:nfe,footer:ofe,noPaddingMobile:cfe},ife="_board_95t8m_1",rfe="_clickable_95t8m_21",sfe="_sideBar_95t8m_26",dfe="_boardContent_95t8m_32",lfe="_orange_95t8m_40",hfe="_red_95t8m_44",ufe="_green_95t8m_48",pfe="_grey_95t8m_52",yfe="_lightGrey_95t8m_56",kfe="_big_95t8m_61",mfe="_medium_95t8m_66",ffe="_headerRow_95t8m_70",gfe="_iconWrapper_95t8m_75",vfe="_headerTitle_95t8m_80",xfe="_valueArea_95t8m_89",Mfe="_titleWhite_95t8m_99",_fe="_titleBlack_95t8m_103",Lfe="_valueWhite_95t8m_108",Ife="_valueBlack_95t8m_112",bfe="_valueBlue_95t8m_116",wfe="_bars_95t8m_121",Cfe="_bar_95t8m_121",Nfe="_barDark_95t8m_135",jfe="_barDim_95t8m_139",Sfe="_predictionSection_95t8m_143",$fe="_predictionHeader_95t8m_155",qfe="_predictionBody_95t8m_162",Afe="_hasPrediction_95t8m_170",ze={board:ife,clickable:rfe,sideBar:sfe,boardContent:dfe,orange:lfe,red:hfe,green:ufe,grey:pfe,lightGrey:yfe,big:kfe,medium:mfe,headerRow:ffe,iconWrapper:gfe,headerTitle:vfe,valueArea:xfe,titleWhite:Mfe,titleBlack:_fe,valueWhite:Lfe,valueBlack:Ife,valueBlue:bfe,bars:wfe,bar:Cfe,barDark:Nfe,barDim:jfe,predictionSection:Sfe,predictionHeader:$fe,predictionBody:qfe,hasPrediction:Afe},zfe=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${ze.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${ze.bar} ${r<c?"":e?ze.barDark:ze.barDim}`},r))})},vt=({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:k,titleFontWeight:x,valueFontSize:M,valueFontWeight:v,barColor:I,justifyContent:b="space-between",alignItems:C="flex-start",cardGap:w="",onClick:_,iconColor:L,titleKey:S,predictionValue:N,predictionLabel:j})=>{const A=r!=="none",B=r==="endingDark",{padding:D,...V}=y||{},q=h===void 0&&u===void 0&&i===void 0&&Object.keys(V).length===0?void 0:{...h!==void 0?{width:h}:{},...u!==void 0?{height:u}:{},...i!==void 0?{backgroundColor:i}:{},...V},$=`${ze.board} ${ze[d]} ${N!==void 0?ze.hasPrediction:""} ${p}`;return o.jsxs("div",{className:$,onClick:_,style:l!==void 0?{...q,"--ds-value-scale":l}:q,children:[I&&o.jsx("div",{className:ze.sideBar,style:{backgroundColor:I}}),o.jsxs("div",{className:ze.boardContent,style:{padding:D,gap:w},children:[o.jsxs("div",{className:ze.headerRow,style:{justifyContent:b,alignItems:C},children:[t&&o.jsx("div",{className:ze.iconWrapper,style:{color:L},children:t}),o.jsx("div",{className:`${ze.headerTitle} header-title-data-board`,children:o.jsx("span",{title:Z(e,S),"aria-label":e?.description,style:{color:f,...k?{fontSize:k}:{},...x?{fontWeight:x}:{}},children:n})}),A?o.jsx(zfe,{endingDark:B,lightCount:s}):null]}),o.jsx("div",{className:ze.valueArea,style:{color:g,...M?{fontSize:M}:{},...v?{fontWeight:v}:{}},children:c})]}),N!==void 0&&o.jsxs("div",{className:ze.predictionSection,children:[o.jsx("div",{className:ze.predictionHeader,children:j??"PRED."}),o.jsx("div",{className:ze.predictionBody,children:N})]})]})},Vfe="_wrapper_1ydle_10",Pfe="_hosp_1ydle_19",Tfe="_headerRow_1ydle_54",Hfe="_iconWrapper_1ydle_61",Dfe="_headerTitle_1ydle_67",Bfe="_hospValue_1ydle_76",Rfe="_side_1ydle_88",Ffe="_mini_1ydle_100",Efe="_miniLabel_1ydle_131",Ofe="_miniValue_1ydle_140",Ufe="_miniBars_1ydle_150",Wfe="_bars_1ydle_155",Gfe="_bar_1ydle_155",Kfe="_barDark_1ydle_169",Zfe="_barDim_1ydle_173",Pe={wrapper:Vfe,hosp:Pfe,headerRow:Tfe,iconWrapper:Hfe,headerTitle:Dfe,hospValue:Bfe,side:Rfe,mini:Ffe,miniLabel:Efe,miniValue:Ofe,miniBars:Ufe,bars:Wfe,bar:Gfe,barDark:Kfe,barDim:Zfe},Xfe=({endingDark:e=!1,lightCount:t=5,className:n=""})=>{const c=Math.max(0,Math.min(5,Math.floor(t)));return o.jsx("div",{className:`${Pe.bars} ${n} bars-data-board`,children:Array.from({length:5}).map((i,r)=>o.jsx("span",{className:`${Pe.bar} ${r<c?"":e?Pe.barDark:Pe.barDim}`},r))})},gA=({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:`${Pe.wrapper} ${n} data-four-boards`,style:l,children:[o.jsxs("div",{className:`${Pe.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:Z(e.a11yConfig,e.titleKey),children:[o.jsxs("div",{className:Pe.headerRow,children:[o.jsxs("div",{className:`${Pe.iconWrapper} icon-wrapper-data-four-boards`,children:[e.iconName&&o.jsx("span",{style:{color:e.iconColor},children:e.iconName}),o.jsx("span",{className:Pe.headerTitle,style:{color:e.titleColor||"white",...e.titleFontSize?{fontSize:e.titleFontSize}:{},...e.titleFontWeight?{fontWeight:e.titleFontWeight}:{}},title:Z(e.a11yConfig,e.titleKey),children:e.label})]}),s?o.jsx(Xfe,{endingDark:d,lightCount:e.lightBars??5}):null]}),o.jsx("div",{className:Pe.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:Pe.side,children:t.map((h,u)=>o.jsxs("div",{className:`${Pe.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:Z(h.a11yConfig,h.titleKey),children:[o.jsxs("span",{className:Pe.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:Z(h.a11yConfig,h.titleKey),children:[h.iconName&&o.jsx("span",{style:{color:h.iconColor},children:h.iconName}),h.label]}),o.jsx("span",{className:`${Pe.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:Pe.miniBars})]},h.id??`${h.label}-${u}`))})]})},Yfe=({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},k=e[0],x=e[1],M=e.slice(2,5);return o.jsxs("div",{style:g,className:`${ri.container} ${y?ri.noPaddingMobile:""} ${s}`,children:[o.jsxs("div",{className:ri.card,children:[k?o.jsx(vt,{a11yConfig:k.a11yConfig,label:k.label,value:k.value,backgroundColor:k.backgroundColor,bars:k.bars,lightBars:k.lightBars,size:k.size??"big",valueScale:k.valueScale,width:k.width,height:k.height,titleColor:"white",valueColor:"white",titleFontSize:k.titleFontSize??l,titleFontWeight:k.titleFontWeight??h,valueFontSize:k.valueFontSize??u,valueFontWeight:k.valueFontWeight??p,titleKey:k.titleKey,onClick:v=>f?.(0,v)}):null,x&&M.length>0?o.jsx(gA,{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,I)=>({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+I,b)}))}):x&&M.length===0?o.jsx(vt,{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:ri.footer,children:t})]})},Jfe=({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})})})}),Qfe=({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:k="percentage"})=>{const x=(y.top??20)+(y.bottom??40)+e.length*(s+20),M=Math.max(x,t),v=m.useMemo(()=>{if(!e||e.length===0)return d;const _=(parseFloat(l)||12)*.7,S=Math.max(...e.map(N=>(N.label||"").length))*_+16;return Math.min(Math.max(S,40),d)},[e,l,d]),I=w=>g?g(w):w?.toString()||"",b=w=>f&&k==="value"?f(w):w==null||w===""?"":k==="percentage"?`${w}%`:w.toString(),C=(w,_,L)=>{if(typeof w!="number")return w;const S=f?f(w):w.toString(),N=L?.payload?.percentage;return typeof N=="number"&&Number.isFinite(N)&&k==="percentage"?`${S} (${N.toFixed(1)}%)`:S};return o.jsx("div",{style:{backgroundColor:i,width:"100%"},children:o.jsx(a.ResponsiveContainer,{width:"100%",height:M,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:I,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:v,interval:0,fontSize:l,fontWeight:h,tick:o.jsx(Jfe,{fontSize:l,fontWeight:h,stroke:r})}),c&&o.jsx(a.Tooltip,{formatter:C,labelStyle:{color:"var(--color-text)"}}),o.jsx(a.Bar,{dataKey:"value",fill:n,radius:0,barSize:s,children:o.jsx(a.LabelList,{dataKey:k,position:"right",offset:10,formatter:b,fill:r,fontSize:l,fontWeight:h})})]})})})},e8e="_menu_10i6j_1",t8e="_menuRow_10i6j_18",a8e="_separator_10i6j_33",n8e="_rowLabel_10i6j_39",o8e="_rowLeadingIcon_10i6j_47",c8e="_rowIcon_10i6j_54",Gc={menu:e8e,menuRow:t8e,separator:a8e,rowLabel:n8e,rowLeadingIcon:o8e,rowIcon:c8e},i8e=m.forwardRef(function({isVisible:t,onClose:n,items:c,style:i,position:r,bg:s},d){const l=m.useRef(null),h=d||l;if(m.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:Gc.menu,style:p,children:c.map(y=>{if(y.type==="separator")return o.jsx("hr",{className:Gc.separator},y.id);const f=y,g=f.color?{color:f.color}:{},k=f.closeOnClick!==!1;return o.jsxs("button",{role:"menuitem",className:Gc.menuRow,style:g,onClick:()=>{f.onClick?.(),k&&n?.()},children:[o.jsxs("span",{className:Gc.rowLabel,children:[f.leadingIcon&&o.jsx("span",{className:Gc.rowLeadingIcon,children:f.leadingIcon}),o.jsx("span",{children:f.label})]}),f.icon&&o.jsx("span",{className:Gc.rowIcon,children:f.icon})]},f.id)})})}),vA=({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:k,avatarColor:x="#5b8fb9",backgroundColorAvatar:M="#f1f4f5",dropdownMenuItems:v,dropdownMenuStyle:I,dropdownMenuOffset:b,statusDotColor:C,a11yConfig:w,style:_,className:L=""})=>{const{user:S}=yt(),N=e||S,{currentTheme:j,switchTheme:A}=ML(),B=m.useRef(null),D=m.useRef(null),[V,q]=m.useState(!1),[$,H]=m.useState({}),R=m.useMemo(()=>{const ee=[],te=({variant:he})=>he==="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&&(ee.push({id:"profile",type:"action",label:"Mon profil",onClick:()=>{typeof window>"u"||(r==="_blank"?window.open(i,"_blank","noopener,noreferrer"):window.location.assign(i))}}),ee.push({id:"sep-profile",type:"separator"}));const re=j==="dark";return ee.push({id:"theme",type:"action",label:re?"Mode clair":"Mode sombre",icon:o.jsx(te,{variant:re?"sun":"moon"}),onClick:()=>{A(re?"light":"dark")}}),(t||c)&&(ee.push({id:"sep-theme",type:"separator"}),ee.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?.()}})),ee},[j,t,n,c,i,r,A]),z=v??R,U=()=>{if(!B.current){q(ee=>!ee);return}if(!V){const ee=B.current.getBoundingClientRect(),te=window.innerWidth,re=window.innerHeight,he=200,pe=200,O=4,K=b?.x??0,ne=b?.y??0,qe=te-ee.right>=he+O;H(qe?{top:ee.bottom-pe+ne,left:ee.right+O+K}:{bottom:re-ee.top+ne,left:ee.left+K})}q(ee=>!ee)};if(m.useEffect(()=>{if(!V||!B.current)return;const ee=()=>{const te=B.current.getBoundingClientRect(),re=window.innerWidth,he=window.innerHeight,pe=200,O=200,K=4,ne=b?.x??0,Ne=b?.y??0,ve=re-te.right>=pe+K;H(ve?{top:te.bottom-O+Ne,left:te.right+K+ne}:{bottom:he-te.top+Ne,left:te.left+ne})};return window.addEventListener("resize",ee),window.addEventListener("orientationchange",ee),()=>{window.removeEventListener("resize",ee),window.removeEventListener("orientationchange",ee)}},[V,b]),m.useEffect(()=>{if(!V||!B.current||!D.current)return;const ee=()=>{const re=B.current.getBoundingClientRect(),he=D.current.getBoundingClientRect(),pe=b?.x??0,O=b?.y??0;H(K=>K.left!==void 0&&K.top!==void 0&&K.left>=re.right-1?{top:re.bottom-he.height+O,left:K.left+pe}:K)},te=requestAnimationFrame(()=>{setTimeout(ee,0)});return()=>cancelAnimationFrame(te)},[V,b]),!N)return null;const X=N,ie=parseInt(h,10)||40,ae=`${ie*.375}px`,fe=`${ie*1.375}px`,de=`${ie*.2}px`,be=`${ie*.6}px`,oe=()=>{const ee=parseInt(h,10)||40,te=Math.max(8,ee*.34375),re=Math.max(2,ee*.05);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{style:{position:"relative",flexShrink:0,userSelect:"none"},children:[X.image?o.jsx("img",{src:X.image,alt:`${X.prenom} ${X.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:ae,height:ae,borderRadius:"50%",backgroundColor:x,position:"absolute",top:de,left:"50%",transform:"translateX(-50%)",zIndex:2,userSelect:"none"}}),o.jsx("div",{style:{width:fe,height:fe,borderRadius:"50%",backgroundColor:x,position:"absolute",top:be,left:"50%",transform:"translateX(-50%)",zIndex:1,userSelect:"none"}})]}),C&&o.jsx("div",{style:{position:"absolute",bottom:re,right:re,width:`${te}px`,height:`${te}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:X.email,children:X.email}),o.jsx("span",{style:{color:l,fontSize:g,fontWeight:k,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:X.role,children:X.role})]})]})};return o.jsxs(o.Fragment,{children:[o.jsx("div",{ref:B,className:`user-info ${L}`,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:U,title:Z(w,X.role),role:"button",tabIndex:0,children:o.jsx("div",{style:{display:"flex",alignItems:"center",gap:p,flex:1,minWidth:0},children:o.jsx(oe,{})})}),o.jsx(i8e,{ref:D,isVisible:V,onClose:()=>q(!1),items:z,style:I,position:$})]})},r8e="_navItem_16uqf_1",s8e="_label_16uqf_14",d8e="_icon_16uqf_26",m1={navItem:r8e,label:s8e,icon:d8e},aC=({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:k="10px 16px",borderWidth:x="4px",iconGap:M="12px",disabled:v=!1,disabledColor:I,a11yConfig:b})=>{const C=()=>{v||n?.()},w=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 S=N=>{const j=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(N);return j?{r:parseInt(j[1],16),g:parseInt(j[2],16),b:parseInt(j[3],16)}:null};if(l.startsWith("#")){const N=S(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},L={onClick:C,className:`${m1.navItem} ${i?m1.active:""} ${d} ${v?m1.disabled:""}`,style:{padding:k,color:i?u:v?I||"#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,...L,title:Z(b,t),children:w}):o.jsx("div",{...L,role:n?"button":void 0,tabIndex:n&&!v?0:void 0,title:Z(b,t),children:w})},l8e="_navbar_y5tex_1",h8e="_topSection_y5tex_9",u8e="_logoContainer_y5tex_14",p8e="_collapseToggle_y5tex_20",y8e="_collapsedRail_y5tex_37",k8e="_collapsedToggle_y5tex_44",m8e="_sectionsContainer_y5tex_67",f8e="_sectionTitle_y5tex_73",g8e="_sectionItems_y5tex_78",v8e="_bottomSection_y5tex_83",x8e="_versionContainer_y5tex_102",Xe={navbar:l8e,topSection:h8e,logoContainer:u8e,collapseToggle:p8e,collapsedRail:y8e,collapsedToggle:k8e,sectionsContainer:m8e,sectionTitle:f8e,sectionItems:g8e,bottomSection:v8e,versionContainer:x8e},M8e=({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:k="15px",navItemFontWeight:x="500",navItemColor:M,sectionTitlePadding:v="16px",sectionTitleFontSize:I="11px",sectionTitleColor:b="#999",sectionTitleWeight:C="500",versionFontSize:w="12px",versionFontWeight:_="400",versionColor:L="#999",userInfoProps:S,style:N,className:j="",width:A="280px",showLogo:B=!0,versionA11yConfig:D,displayNone:V=!1,showCollapseToggle:q=!1,collapsed:$=!1,onCollapseToggle:H,collapseToggleLabel:R="Toggle sidebar",collapseToggleIconPath:z="/icon/dock_to_left.svg"})=>{const U=yt(),X=U.activeNav,ie=U.setActiveNav,ae=U.user,fe=S.user||ae;return q&&$?o.jsx("div",{className:`${Xe.collapsedRail} ${j}`,style:{display:V?"none":"flex"},children:o.jsx("button",{type:"button",className:Xe.collapsedToggle,onClick:H,"aria-label":R,children:o.jsx(pw,{path:z,width:18,height:18})})}):o.jsxs("div",{className:`${Xe.navbar} ${j}`,style:{width:A,backgroundColor:s,padding:c,display:V?"none":"flex",...N},children:[o.jsxs("div",{className:Xe.topSection,style:{gap:t},children:[B&&o.jsxs("div",{className:Xe.logoContainer,children:[o.jsx(xL,{...e}),q&&o.jsx("button",{type:"button",className:Xe.collapseToggle,onClick:H,"aria-label":R,children:o.jsx(pw,{path:z,width:20,height:20})})]}),o.jsx("div",{className:Xe.sectionsContainer,style:{gap:i},children:n.map((de,be)=>o.jsxs("div",{className:Xe.section,children:[de.title&&o.jsx("div",{className:Xe.sectionTitle,title:Z(de.a11yConfig,de.titleKey),style:{fontSize:I,color:b,padding:v,fontWeight:C,border:"4px solid transparent",...u},children:de.title}),o.jsx("div",{className:Xe.sectionItems,style:{gap:r},children:de.items.map(oe=>o.jsx(aC,{...oe,isActive:oe.isActive===null?oe.isActive:X===oe.id,onClick:()=>{oe.onClick&&oe.onClick(),oe.isActive==null&&ie(oe.id)},highlightColor:d,activeColor:d,highlightBackgroundColor:l,padding:y,borderWidth:f,iconGap:g,fontSize:k,fontWeight:x,color:M,style:p},oe.id))})]},be))})]}),o.jsxs("div",{className:Xe.bottomSection,style:{gap:t},children:[o.jsx(vA,{...S,user:fe}),h&&o.jsx("div",{className:Xe.versionContainer,title:Z(D,h),style:{fontSize:w,fontWeight:_,color:L},children:h})]})]})},_8e="_container_4qege_1",L8e="_titleContainer_4qege_10",I8e="_title_4qege_10",b8e="_inlineToggleContainer_4qege_24",w8e="_rightContentContainer_4qege_30",f1={container:_8e,titleContainer:L8e,title:I8e,inlineToggleContainer:b8e,rightContentContainer:w8e},C8e=({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:k,inlineToggle:x})=>{const{activeNav:M}=yt(),v=y.find(b=>b.id===M)||f?.find(b=>b.id===M),I=v?g(v.label):M||"";return I?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:I}),x&&o.jsx("div",{className:f1.inlineToggleContainer,children:x})]}),k&&o.jsx("div",{className:f1.rightContentContainer,children:k})]}):null},N8e="_navItem_1hg26_1",j8e="_navItemIcon_1hg26_21",S8e="_navItemLabel_1hg26_29",$8e="_navItemCount_1hg26_36",q8e="_navItemIndicator_1hg26_49",g1={navItem:N8e,navItemIcon:j8e,navItemLabel:S8e,navItemCount:$8e,navItemIndicator:q8e},xA=({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:k="12px",countFontWeight:x="500",indicatorColor:M="#00aec7",indicatorHeight:v="3px",padding:I="8px 4px",fontSize:b="14px",fontWeight:C="500",gap:w="8px",style:_,className:L="",disabled:S=!1,onNavigate:N})=>{const j=()=>{S||(c?.(),i&&(N?N(i):window.location.href=i))};return o.jsxs("div",{className:`${g1.navItem} ${L}`,onClick:j,title:Z(e,r),style:{gap:w,padding:I,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:k,fontWeight:x},children:d}),n&&!S&&o.jsx("div",{className:g1.navItemIndicator,style:{height:v,backgroundColor:M}})]})},A8e="_container_13hsa_1",z8e="_groupHeader_13hsa_8",V8e="_groupHeaderLeft_13hsa_18",P8e="_groupIcon_13hsa_23",T8e="_dropdown_13hsa_29",H8e="_item_13hsa_42",D8e="_itemIcon_13hsa_65",B8e="_chevron_13hsa_72",R8e="_chevronOpen_13hsa_79",mt={container:A8e,groupHeader:z8e,groupHeaderLeft:V8e,groupIcon:P8e,dropdown:T8e,item:H8e,itemIcon:D8e,chevron:B8e,chevronOpen:R8e},F8e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M480-344 240-584l43-43 197 197 197-197 43 43z"})),R1=m.memo(F8e),MA=({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:k="var(--color-primary)",itemDividerColor:x="var(--color-border)",iconColor:M="#555555",activeIconColor:v="var(--color-primary)",headerIconColor:I="var(--color-text)",chevronColor:b="var(--color-text)",iconSize:C=22,headerPadding:w="14px 20px",itemPadding:_="14px 20px",iconGap:L=14,borderRadius:S=0})=>{const[N,j]=m.useState(""),A=m.useRef(null);m.useEffect(()=>{const D=V=>{A.current&&!A.current.contains(V.target)&&j("")};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const B={backgroundColor:r,color:s,borderRadius:S,...c};return o.jsx("nav",{ref:A,className:[mt.container,i].filter(Boolean).join(" "),style:B,children:e.map(D=>{const V=N===D.id,q={backgroundColor:d,color:l,padding:w,borderBottom:`1px solid ${h}`,gap:L},$={backgroundColor:u};return o.jsxs("div",{children:[o.jsxs("div",{className:mt.groupHeader,style:q,onClick:()=>j(V?"":D.id),role:"button","aria-expanded":V,children:[o.jsxs("div",{className:mt.groupHeaderLeft,style:{gap:L},children:[D.icon&&o.jsx("span",{className:mt.groupIcon,style:{color:I,width:C,height:C},children:D.icon}),o.jsx("span",{children:D.label})]}),o.jsx("span",{className:[mt.chevron,V?mt.chevronOpen:""].join(" "),style:{color:b},children:o.jsx(R1,{width:18,height:18})})]}),V&&o.jsx("div",{className:mt.dropdown,style:$,children:D.items.map(H=>{const R=H.id===t,z={padding:_,gap:L,color:R?g:f,backgroundColor:p,"--item-border-width":R?"4px":"1px","--item-border-color":R?k:x};return o.jsxs("div",{className:mt.item,style:z,onClick:()=>{n?.(D.id,H.id),j("")},role:"menuitem",onMouseEnter:U=>{R||(U.currentTarget.style.backgroundColor=y)},children:[H.icon&&o.jsx("span",{className:mt.itemIcon,style:{color:R?v:M,width:C,height:C},children:H.icon}),o.jsx("span",{children:H.label})]},H.id)})})]},D.id)})})},E8e="_subheaderContent_1glo8_1",O8e="_navContainer_1glo8_11",U8e="_rightContent_1glo8_45",Db={subheaderContent:E8e,navContainer:O8e,rightContent:U8e},W8e=({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:k="3px",showDraggable:x=!1,showLegend:M=!1,showData:v=!1,className:I="",style:b,countBackgroundColor:C,countColor:w,countBorderRadius:_,countPadding:L,countFontSize:S,countFontWeight:N,navContainerClassName:j,navContainerStyle:A,rightContentClassName:B,rightContentStyle:D,rightActions:V,activeSwitcherColor:q,inactiveSwitcherColor:$,isMobile:H=!1,onNavigate:R})=>{const{activeSubNav:z,setActiveSubNav:U,navCounts:X,activeNav:ie}=yt();if(H){const ae=e.find(de=>de.id===z)||e[0],fe=[{id:"current-group",label:ae?.label||ie?.toUpperCase()||"MENU",icon:ae?.icon,items:e.map(de=>({id:de.id,label:de.label,icon:de.icon}))}];return o.jsx("div",{className:I,style:b,children:o.jsx(MA,{groups:fe,activeItemId:z,onItemClick:(de,be)=>{const oe=e.find(ee=>ee.id===be);oe&&(oe.onClick&&oe.onClick(),oe.href&&(R?R(oe.href):oe.onNavigate?oe.onNavigate(oe.href):window.location.href=oe.href),U(be))},headerBgColor:t})})}return o.jsxs("div",{className:`${Db.subheaderContent} ${I}`,style:{backgroundColor:t,padding:n,margin:c,width:i,height:r,border:s,borderBottom:d,...b},children:[o.jsx("div",{className:`${Db.navContainer} ${j||""}`,style:{gap:l,...A},children:e.map(ae=>{const fe=ae.count!==void 0?ae.count:X[ae.id],de=z===ae.id||ae.isActive;return o.jsx(xA,{...ae,onNavigate:R||ae.onNavigate,count:fe,isActive:de,onClick:()=>{ae.onClick&&ae.onClick(),U(ae.id)},activeColor:f,inactiveColor:g,countBackgroundColor:C,countColor:w,countBorderRadius:_,countPadding:L,countFontSize:S,countFontWeight:N,indicatorColor:f,indicatorHeight:k,padding:u,fontSize:p,fontWeight:y,gap:"8px",style:ae.style},ae.id)})}),o.jsxs("div",{className:`${Db.rightContent} ${B||""}`,style:{gap:h,...D},children:[x&&o.jsx(dL,{size:20,colors:{bg:q,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),M&&o.jsx(lL,{size:20,colors:{bg:q,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),v&&o.jsx(hL,{size:20,colors:{bg:q,activeBg:$,icon:"#1C1B1F",icon2:"#FFFFFF"}}),V]})]})},G8e=({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]=m.useState(!1),{currentTheme:p,switchTheme:y}=ML(),f=p!="dark",g=()=>{y(f?"dark":"light"),e?.()};return m.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"})]})})},K8e=({initialSortBy:e=null,initialSortOrder:t="asc",onSortChange:n})=>{const[c,i]=m.useState({sortBy:e,sortOrder:t,filters:{}}),r=m.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}},Z8e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M440-800v487L216-537l-56 57 320 320 320-320-56-57-224 224v-487z"})),X8e=m.memo(Z8e),Y8e=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#FFF",viewBox:"0 -960 960 960",...e},Q.createElement("path",{d:"M440-160v-487L216-423l-56-57 320-320 320 320-56 57-224-224v487z"})),J8e=m.memo(Y8e),Q8e=({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:Z(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(J8e,{width:16,height:16,style:{fill:"currentColor",transition:"all 0.2s ease"}}):o.jsx(X8e,{width:16,height:16,style:{fill:"currentColor",opacity:d?1:.5,transition:"all 0.2s ease"}})})]})},String(r.key)||s)})})}),ege=({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,k)=>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)}-${k}`))},y)})}),tge=({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,k=Math.min(f*p,u),x=b=>{t({page:b})},M=m.useMemo(()=>{if(y<=6)return Array.from({length:y},(A,B)=>B+1);const w=Math.max(f-1,1),_=Math.min(f+1,y),L=w>2,S=_<y-2,N=1,j=y;if(!L&&S)return[...Array.from({length:5},(D,V)=>V+1),"...",y];if(L&&!S){const B=Array.from({length:5},(D,V)=>y-5+V+1);return[N,"...",...B]}if(L&&S){const A=Array.from({length:_-w+1},(B,D)=>w+D);return[N,"...",...A,"...",j]}return[]},[f,y]),v=!!(d&&d.length>0),I=!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,k,u):o.jsxs(o.Fragment,{children:[o.jsxs("b",{children:[g,"–",k]})," ",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:I}),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"}),I]}),!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"})})]})},_A=({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:k,className:x,style:M,rowStyle:v,onRowClick:I,rowClassName:b,titleKey:C,removeLabelSpan:w=!1,a11yConfig:_,renderSeparator:L,pageSizeOptions:S})=>{const N=m.useMemo(()=>({...p}),[p]),j=m.useRef(null);m.useEffect(()=>{if(!f||!y||!g||n)return;const $=new IntersectionObserver(H=>{H[0].isIntersecting&&y()},{threshold:.1});return j.current&&$.observe(j.current),()=>$.disconnect()},[f,y,g,n]);const{tableState:A,handleSort:B}=K8e({initialSortBy:null,onSortChange:r}),D=(k?.sortBy!==void 0?k.sortBy:A.sortBy)??void 0,V=k?.sortOrder!==void 0?k.sortOrder:A.sortOrder,q=$=>{const H=D,R=V;let z="asc";H===$&&(z=R==="asc"?"desc":"asc"),k?.sortBy!==void 0?r($,z):B($)};return o.jsxs("div",{className:`table-container ${x||""}`,style:M,title:Z(_,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(Q8e,{columns:t,sortBy:D,sortOrder:V,onSort:q,removeLabelSpan:w}),o.jsx(ege,{data:e,columns:t.map($=>({...$,render:$.render?H=>$.render(H,{}):void 0})),rowKey:s,onRowClick:I,isLoading:n,text:N,rowStyle:typeof v=="function"?v:v?()=>v:void 0,rowClassName:b,renderSeparator:L})]}),f&&o.jsx("div",{ref:j,style:{height:20,margin:10}})]})]}),o.jsx(tge,{state:c,onPaginationChange:i,text:N,onLoadMore:y,infiniteScroll:f,hasMore:g,isLoading:n,pageSizeOptions:S})]})},age="_datePickerContainer_1gx2l_3",nge="_label_1gx2l_16",oge="_displayNode_1gx2l_23",cge="_datePickerButton_1gx2l_30",ige="_datePickerButtonDisabled_1gx2l_50",rge="_datePickerButtonOpen_1gx2l_59",sge="_datePickerLabel_1gx2l_68",dge="_placeholder_1gx2l_79",lge="_trailingIcons_1gx2l_83",hge="_chevron_1gx2l_89",uge="_clearButton_1gx2l_97",pge="_errorMessage_1gx2l_114",yge="_dropdown_1gx2l_119",kge="_calendarHeader_1gx2l_143",mge="_navButton_1gx2l_152",fge="_headerSelectors_1gx2l_171",gge="_monthSelector_1gx2l_179",vge="_yearSelector_1gx2l_180",xge="_selectorButton_1gx2l_184",Mge="_selectorChevron_1gx2l_201",_ge="_selectorChevronOpen_1gx2l_206",Lge="_monthDropdown_1gx2l_210",Ige="_yearDropdown_1gx2l_211",bge="_monthItem_1gx2l_231",wge="_yearItem_1gx2l_232",Cge="_monthItemSelected_1gx2l_254",Nge="_yearItemSelected_1gx2l_255",jge="_weekdays_1gx2l_259",Sge="_weekday_1gx2l_259",$ge="_calendarGrid_1gx2l_275",qge="_dateCell_1gx2l_284",Age="_dateCellSelected_1gx2l_307",zge="_dateCellOtherMonth_1gx2l_311",Vge="_dateCellOtherMonthSelected_1gx2l_315",Pge="_calendarFooter_1gx2l_319",Tge="_cancelButton_1gx2l_327",Hge="_applyButton_1gx2l_328",Dge="_timePickerContainer_1gx2l_372",Bge="_timeGroup_1gx2l_381",Rge="_timeLabel_1gx2l_388",Fge="_timeInputWrapper_1gx2l_394",Ege="_timeInput_1gx2l_394",Oge="_timeSeparator_1gx2l_422",W={datePickerContainer:age,label:nge,displayNode:oge,datePickerButton:cge,datePickerButtonDisabled:ige,datePickerButtonOpen:rge,datePickerLabel:sge,placeholder:dge,trailingIcons:lge,chevron:hge,clearButton:uge,errorMessage:pge,dropdown:yge,calendarHeader:kge,navButton:mge,headerSelectors:fge,monthSelector:gge,yearSelector:vge,selectorButton:xge,selectorChevron:Mge,selectorChevronOpen:_ge,monthDropdown:Lge,yearDropdown:Ige,monthItem:bge,yearItem:wge,monthItemSelected:Cge,yearItemSelected:Nge,weekdays:jge,weekday:Sge,calendarGrid:$ge,dateCell:qge,dateCellSelected:Age,dateCellOtherMonth:zge,dateCellOtherMonthSelected:Vge,calendarFooter:Pge,cancelButton:Tge,applyButton:Hge,timePickerContainer:Dge,timeGroup:Bge,timeLabel:Rge,timeInputWrapper:Fge,timeInput:Ege,timeSeparator:Oge},Uge=e=>Q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 -960 960 960",...e},Q.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"})),Wge=m.memo(Uge),jS=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],Gge=["Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],kw=({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:k="0.25rem",itemPadding:x="0.5rem 0.75rem",fontWeight:M="400",buttonBgColor:v,buttonBorderColor:I,buttonTextColor:b,dropdownBgColor:C="#ffffff",itemHoverColor:w,selectedItemBgColor:_,iconColor:L,errorColor:S,labelColor:N,placeholderColor:j,borderRadius:A="var(--radius-content)",borderWidth:B="0.0625rem",boxShadow:D="0 0.25rem 0.75rem rgba(0, 0, 0, 0.1)",transitionDuration:V="0.2s",transitionTiming:q="ease",dateCellSize:$="2.5rem",headerTextColor:H="#6c757d",weekdayTextColor:R="#6c757d",currentMonthDateColor:z="#212529",otherMonthDateColor:U="#adb5bd",selectedDateBgColor:X="#00A6D9",selectedDateTextColor:ie="#ffffff",cancelButtonBgColor:ae="#e9ecef",cancelButtonTextColor:fe="#212529",applyButtonBgColor:de="#00A6D9",applyButtonTextColor:be="#ffffff",width:oe,displayNode:ee=void 0,displayMode:te="auto",displayNodeAriaLabel:re,dropdownPosition:he="auto",dropdownAlignment:pe="right",dropdownWidth:O,withBorder:K=!1,icon:ne,precision:Ne="day",horizontalTimePicker:qe=!1,hoursLabel:ve="Heures",minutesLabel:Ve="Minutes",lowerLimit:kt=null,upperLimit:bt=null,outOfLimitsMessage:le="La date/heure choisie est hors des limites autorisées",months:wt,weekdays:zL,cancelText:_e="Annuler",applyText:Ft="Appliquer",prevMonthAriaLabel:wA="Mois précédent",nextMonthAriaLabel:CA="Mois suivant",calendarAriaLabel:NA="Sélecteur de date",openedAriaLabel:jA="Ouvrir le sélecteur de date",selectedDateAriaLabel:SA="Date sélectionnée: ",rotateIcon:$A=!0,clearable:qA=!1,clearAriaLabel:AA="Effacer la date"})=>{const Ct=T=>{if(T instanceof Date)return isNaN(T.getTime())?null:T;if(typeof T=="string"&&T){const G=new Date(T);return isNaN(G.getTime())?null:G}return null},[Oe,Et]=m.useState(!1),[u1,zA]=m.useState({top:0,left:0,width:0}),[nC,VA]=m.useState("bottom"),[oC,PA]=m.useState(null),[ue,p1]=m.useState(Ct(e)||new Date),[y1,VL]=m.useState(Ct(e)),[Q1,PL]=m.useState(Ct(e)?.getHours()??0),[ei,TL]=m.useState(Ct(e)?.getMinutes()??0),[HL,Rc]=m.useState(!1),[DL,Fc]=m.useState(!1),BL=m.useRef(null),Ec=m.useRef(null),cC=m.useRef(null),RL=m.useRef(null),FL=m.useRef(null),iC=m.useRef(Ct(e)?.getTime());m.useEffect(()=>{const T=Ct(e),G=T?.getTime();G!==iC.current&&(iC.current=G,VL(T),T&&(p1(T),PL(T.getHours()),TL(T.getMinutes())))},[e]);const rC=m.useCallback(()=>{if(Ec.current){const T=Ec.current.getBoundingClientRect();zA({top:T.top,left:T.left,width:T.width})}},[]),sC=8,ti=m.useCallback(()=>{if(!Ec.current)return;const T=Ec.current.getBoundingClientRect(),G=(parseFloat(k.replace("rem",""))||0)*16,xe=T.top-G-sC,Nt=window.innerHeight-T.bottom-G-sC;let Ue;if(he!=="auto")Ue=he;else{const He=cC.current?.scrollHeight??0;Ue=He<=Nt?"bottom":He<=xe||xe>Nt?"top":"bottom"}VA(He=>He===Ue?He:Ue),PA(Math.max(Ue==="bottom"?Nt:xe,0))},[he,k]),Oc=m.useCallback(()=>{rC(),ti()},[rC,ti]);m.useEffect(()=>(Oe&&(Oc(),window.addEventListener("scroll",Oc,!0),window.addEventListener("resize",Oc)),()=>{window.removeEventListener("scroll",Oc,!0),window.removeEventListener("resize",Oc)}),[Oe,Oc]),m.useLayoutEffect(()=>{Oe&&ti()},[Oe,ti]),m.useEffect(()=>{const T=G=>{if(BL.current&&!BL.current.contains(G.target)){const xe=document.getElementById("datepicker-dropdown");if(xe&&xe.contains(G.target))return;Et(!1),Rc(!1),Fc(!1)}RL.current&&!RL.current.contains(G.target)&&Rc(!1),FL.current&&!FL.current.contains(G.target)&&Fc(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const dC=T=>new Date(T.getFullYear(),T.getMonth()+1,0).getDate(),TA=T=>{const G=new Date(T.getFullYear(),T.getMonth(),1).getDay();return G===0?6:G-1},HA=()=>{const T=[],G=TA(ue),xe=dC(ue),Nt=new Date(ue.getFullYear(),ue.getMonth()-1,1),Ue=dC(Nt);for(let we=G-1;we>=0;we--)T.push(new Date(ue.getFullYear(),ue.getMonth()-1,Ue-we));for(let we=1;we<=xe;we++)T.push(new Date(ue.getFullYear(),ue.getMonth(),we));const He=42-T.length;for(let we=1;we<=He;we++)T.push(new Date(ue.getFullYear(),ue.getMonth()+1,we));return T},DA=(T,G)=>!T||!G?!1:T.getDate()===G.getDate()&&T.getMonth()===G.getMonth()&&T.getFullYear()===G.getFullYear(),BA=T=>T.getMonth()===ue.getMonth()&&T.getFullYear()===ue.getFullYear(),lC=T=>!(kt&&T<kt||bt&&T>bt),hC=y1?(()=>{const T=new Date(y1);return T.setHours(Q1),T.setMinutes(ei),T})():null,Uc=hC?!lC(hC):!1,RA=()=>{p1(new Date(ue.getFullYear(),ue.getMonth()-1,1))},FA=()=>{p1(new Date(ue.getFullYear(),ue.getMonth()+1,1))},EA=T=>{if(!s){const G=new Date(T);G.setHours(Q1),G.setMinutes(ei),VL(G)}},OA=()=>{if(!s){if(y1){const T=new Date(y1);if(T.setHours(Q1),T.setMinutes(ei),!lC(T))return;t(T)}else t(null);Et(!1)}},UA=()=>{const T=Ct(e);VL(T),T&&(PL(T.getHours()),TL(T.getMinutes())),Et(!1)},WA=T=>{p1(new Date(ue.getFullYear(),T,1)),Rc(!1)},GA=T=>{p1(new Date(T,ue.getMonth(),1)),Fc(!1)},KA=()=>{const T=ue.getFullYear(),G=[];for(let xe=T-10;xe<=T+10;xe++)G.push(xe);return G},ZA=T=>{if(!s)switch(T.key){case"Enter":case" ":T.preventDefault(),Et(!Oe);break;case"Escape":Et(!1),Rc(!1),Fc(!1);break;case"Tab":Oe&&(Et(!1),Rc(!1),Fc(!1));break}},XA={width:oe||(r?"100%":"auto"),fontSize:p,fontWeight:M},YA={height:l,padding:h,backgroundColor:v||"#ffffff",border:K?void 0:"none",borderColor:d?S||"#dc3545":I||"#dee2e6",color:b||"#212529",borderRadius:A,borderWidth:B,fontWeight:M,transition:`all ${V} ${q}`},JA=qe?{flexDirection:"column",borderTop:"none",borderLeft:"1px solid #eee"}:{},QA=qe?{flex:1,minWidth:0}:void 0,ez=qe?{display:"flex",flexDirection:"row",alignItems:"stretch"}:void 0,tz={backgroundColor:C||"#ffffff",maxHeight:u==="auto"?oC!=null?`${oC}px`:void 0:u,overflowY:"auto",borderRadius:A,borderWidth:B,boxShadow:D,transition:`opacity ${V} ${q}, transform ${V} ${q}`,position:"fixed",top:nC==="bottom"?u1.top+(Ec.current?.offsetHeight||0)+parseFloat(k.replace("rem",""))*16:"auto",bottom:nC==="top"?window.innerHeight-u1.top+parseFloat(k.replace("rem",""))*16:"auto",left:pe==="left"?u1.left:"auto",right:pe==="right"?window.innerWidth-(u1.left+u1.width):"auto",width:O||"30vw",minWidth:O?void 0:0,zIndex:10001},uC={width:y,height:y,color:L||"#6c757d","--icon-rotation":$A&&Oe?"rotate(180deg)":"rotate(0deg)"},az={color:N||"#212529",marginBottom:f,fontWeight:M},nz={color:j||"#6c757d"},oz={color:S||"#dc3545",marginTop:g},cz=HA(),tt=Ct(e),pC=T=>`${T.getDate().toString().padStart(2,"0")}/${(T.getMonth()+1).toString().padStart(2,"0")}/${T.getFullYear()}`,yC=tt?Ne==="minutes"?`${pC(tt)} ${tt.getHours().toString().padStart(2,"0")}:${tt.getMinutes().toString().padStart(2,"0")}`:pC(tt):"",kC=!!ee&&(te==="icon"||te==="auto"&&!tt),iz=qA&&!kC&&!!tt&&!s,rz={width:"0.875rem",height:"0.875rem",color:L||"#6c757d"},sz=re||(tt?`${SA}${yC}`:jA);return o.jsxs("div",{className:`${W.datePickerContainer} ${i}`,ref:BL,style:XA,"data-fullwidth":r,"data-disabled":s,"data-error":!!d,children:[n&&o.jsx("label",{className:W.label,style:az,children:n}),o.jsxs("button",{ref:Ec,type:"button",onClick:()=>!s&&Et(!Oe),onKeyDown:ZA,className:`
8335
8335
  ${W.datePickerButton}
8336
8336
  ${Oe?W.datePickerButtonOpen:""}
8337
8337
  ${s?W.datePickerButtonDisabled:""}
@@ -8784,4 +8784,17 @@
8784
8784
  ${z?E.small:""}
8785
8785
  ${$?E.notAllowedCursor:""}
8786
8786
  ${t}
8787
- `.trim();return o.jsx("div",{className:U,style:n,children:o.jsxs("div",{className:E.innerPadding,children:[o.jsxs("div",{className:`${E.topArea} ${_?"":E.noFooterMargin}`,style:c,children:[o.jsx("div",{className:E.header,children:H?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:E.headerLeft,children:o.jsxs("div",{className:E.uf,children:[i,r&&` - ${r}`]})}),o.jsx("div",{className:E.headerRight,children:o.jsx("div",{className:E.rmBadge,children:H})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:E.headerLeft,children:i&&o.jsx("div",{className:E.uf,children:i})}),o.jsx("div",{className:E.headerRight,children:r&&o.jsx("span",{className:E.roomBed,children:r})})]})}),o.jsxs("div",{className:E.content,children:[o.jsxs("div",{className:E.body,children:[N==="default"&&o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{className:`${E.centerLabelHuge} ${V?E.labelYellow:""}`,children:s}),o.jsxs("div",{className:E.upperBodyContent,children:[o.jsxs("div",{className:E.patientInfo,children:[d&&o.jsx("div",{className:E.iep,children:d}),l&&o.jsx("div",{className:E.name,children:l}),h&&o.jsxs("div",{className:E.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:E.firstNames,children:p}),y&&o.jsx("div",{className:E.dobAge,children:y})]}),f&&o.jsx("div",{className:E.duration,children:f}),g&&o.jsx("div",{className:E.comment,children:g})]}),k&&o.jsxs("div",{className:E.expectedBottom,children:[x&&o.jsx("div",{className:E.expectedPrefix,children:x}),o.jsx("div",{className:E.expectedDate,children:k})]})]}),N==="notes"&&o.jsxs("div",{className:E.notesView,children:[o.jsxs("div",{className:E.notesHeader,children:[A,o.jsx("span",{className:E.notesTitle,children:j})]}),o.jsx("div",{className:E.notesList,children:B.map((X,ie)=>o.jsx("div",{className:E.noteItem,children:X},ie))})]}),N==="reservation"&&o.jsxs("div",{className:E.reservationView,children:[s&&o.jsx("div",{className:`${E.centerLabelHuge} ${V?E.labelYellow:""}`,children:s}),o.jsx("div",{className:E.upperBodyContent,children:o.jsxs("div",{className:E.patientInfo,children:[d&&o.jsx("div",{className:E.iep,children:d}),l&&o.jsx("div",{className:E.name,children:l}),h&&o.jsxs("div",{className:E.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:E.firstNames,children:p}),y&&o.jsx("div",{className:E.dobAge,children:y})]})}),D&&o.jsx("div",{className:E.reservationNote,children:D})]})]}),(q||M||v)&&o.jsxs("div",{className:E.bottomArea,children:[q&&o.jsx("div",{className:E.bottomLeftSymbol,children:q}),v&&o.jsxs("div",{className:`${E.destination} ${R?E.todayReservation:""}`,children:[o.jsx("span",{className:E.arrow,children:"→"}),v.prefix&&o.jsx("span",{children:v.prefix}),o.jsx("strong",{children:v.name}),v.suffix&&o.jsx("span",{children:v.suffix})]}),M&&o.jsx("div",{className:E.timeline,children:b&&b!=="transparent"&&o.jsxs("div",{className:E.progressBar,style:{backgroundColor:b},children:[o.jsx("div",{className:E.progressFill,style:{width:`${I}%`,backgroundColor:C}}),w&&o.jsx("span",{className:E.progressDate,children:w})]})})]})]})]}),_&&o.jsxs("div",{className:E.footer,children:[o.jsx("div",{className:E.actionsLeft,children:L.map((X,ie)=>o.jsx("div",{className:E.iconWrap,children:X},`left-${ie}`))}),o.jsx("div",{className:E.actionsRight,children:S.map((X,ie)=>o.jsx("div",{className:E.iconWrap,children:X},`right-${ie}`))})]})]})})},EMe=({title:e,titleBold:t,titleKey:n,items:c,className:i="",width:r,style:s,labelStyle:d,valueStyle:l,headerStyle:h,a11yConfig:u,onItemClick:p,onDeleteItem:y})=>{const f={width:r||"100%",...s};return o.jsxs("div",{className:`data-list-v2-container ${i}`,style:f,children:[(e||t)&&o.jsx("div",{className:"data-list-v2-header",style:h,children:o.jsxs("h2",{className:"header-title",title:Z(u,n),children:[e&&o.jsx("span",{className:"title-regular",children:e}),t&&o.jsx("span",{className:"title-bold",children:t})]})}),o.jsx("div",{className:"data-list-v2-content",children:c.map(g=>o.jsxs("div",{className:`data-list-v2-item ${p?"interactive":""} ${g.showValueLine?"with-value-line":""}`,onClick:()=>p?.(g),children:[o.jsx("div",{className:"item-label-col",style:d,children:o.jsx("div",{className:"item-label",title:Z(g.a11yConfig,g.labelKey),children:g.label})}),o.jsxs("div",{className:"item-value-col",style:l,children:[o.jsx("div",{className:"item-value",title:Z(g.a11yConfig,g.valueKey),children:g.value}),y&&o.jsx("div",{className:"item-delete-action",onClick:k=>{k.stopPropagation(),y(g)},children:o.jsx(ut,{size:16})})]})]},g.id))})]})},OMe=({id:e,data:t,children:n,className:c,onDragStart:i,onDragEnd:r})=>{const s=l=>{l.dataTransfer.setData("text/plain",e),t&&l.dataTransfer.setData("application/json",JSON.stringify(t)),l.dataTransfer.effectAllowed="move",i&&i(l,t)},d=l=>{r&&r(l)};return o.jsx("div",{draggable:!0,onDragStart:s,onDragEnd:d,style:{cursor:"grab"},className:c,children:n})},UMe=({id:e,onDrop:t,children:n,className:c="",activeClassName:i="is-drag-over"})=>{const[r,s]=m.useState(!1),d=m.useRef(0),l=f=>{f.preventDefault(),d.current+=1,d.current>0&&s(!0)},h=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},u=f=>{f.preventDefault(),d.current-=1,d.current===0&&s(!1)},p=f=>{f.preventDefault(),s(!1),d.current=0;const g=f.dataTransfer.getData("text/plain");let k;try{const x=f.dataTransfer.getData("application/json");x&&(k=JSON.parse(x))}catch(x){console.error("Failed to parse drag data",x)}g&&t(g,k)},y=`${c} ${r?i:""}`.trim();return o.jsx("div",{onDragEnter:l,onDragOver:h,onDragLeave:u,onDrop:p,className:y,"data-droppable-id":e,children:n})};exports.LineChart=a.LineChart;exports.PeriodRange=a.PeriodRange;exports.SimpleBarChart=a.SimpleBarChart;exports.ActionCard=a9e;exports.AddItemModal=Bc;exports.Alert=tC;exports.AlertsProvider=H3e;exports.BadgeList=DS;exports.BadgeRenderer=sA;exports.Button=sL;exports.ChartContainer=P3e;exports.CheckboxInput=Bq;exports.CircularProgress=Rb;exports.ColorInput=Uq;exports.ComponentVisibilityManager=Ob;exports.ComponentVisibilityToggle=tfe;exports.ConfirmationModal=Xve;exports.ConfirmationPopup=Fme;exports.CounterListBox=wme;exports.CurrencyRenderer=hA;exports.DashboardSummary=A6e;exports.DataBoard=vt;exports.DataFourBoards=gA;exports.DataListV2=EMe;exports.DateInput=Eq;exports.DatePicker=kw;exports.DateRenderer=dA;exports.DayStatCard=D2e;exports.DayStatCardV2=Yfe;exports.DonutChartRatio=K9e;exports.Draggable=OMe;exports.DraggableProvider=E2e;exports.DraggableSwitcherButton=dL;exports.Droppable=UMe;exports.DynamicForm=Z4e;exports.DynamicIcon=pw;exports.DynamicInput=Wq;exports.EmailRenderer=iA;exports.Encours=W6e;exports.EntryControl=Ime;exports.FileInput=Fq;exports.FilterBar=y7e;exports.FiltreEtiquette=$9e;exports.FlexRowContainer=Nme;exports.Grid=FS;exports.Header=Z2e;exports.HorizontalBarChart=Qfe;exports.IconText=QS;exports.ImageRenderer=uA;exports.IndicatorItemV2=Q7e;exports.InfoBanner=kve;exports.InputWrapper=CL;exports.LegendFilterProvider=U2e;exports.LegendFilterSwitcherButton=lL;exports.LinkRenderer=rA;exports.ListContentContainer=jme;exports.Logo=xL;exports.MetricsPanel=kA;exports.MobileMenuHeader=cxe;exports.MobileNavMenu=MA;exports.MobileTopBar=txe;exports.ModuleHeader=rme;exports.ModuleSideBar=sme;exports.ModuleSideBarV2=Rve;exports.MovementCard=X2e;exports.NavBar=ES;exports.NavBarV2=M8e;exports.NavItem=Fb;exports.NavItemV2=aC;exports.NavProvider=B2e;exports.NumberRenderer=lA;exports.PaginationBar=Tke;exports.PatientCard=FMe;exports.PatientDetailsPanel=Vxe;exports.PatientInfoCard=Txe;exports.PeriodSelect=O3e;exports.PopUp=Pve;exports.RadioInput=Rq;exports.RangeInput=Oq;exports.ScrollableHorizontale=e$;exports.SearchBar=fA;exports.Select=LA;exports.SelectFilter=b6e;exports.SelectInput=Yw;exports.SettingNavBar=Bve;exports.ShowDataProvider=W2e;exports.ShowDataSwitcherButton=hL;exports.SideComponent=W3e;exports.SimpleListBox=bme;exports.Slider=gxe;exports.StatusTile=ide;exports.SubHeaderContent=W8e;exports.SubHeaderNavItem=xA;exports.SubHeaderTitle=C8e;exports.SubNavBar=ude;exports.SummaryAvailable=A9e;exports.SummaryCard=yA;exports.Switcher=K1;exports.TableLayout=_A;exports.TableauDynamique=pA;exports.TableauDynamiqueSafePagination=Pke;exports.TableauxComponent=_A;exports.TextInput=Hq;exports.TextRenderer=cA;exports.TextareaInput=Dq;exports.ThemeProvider=R2e;exports.ThemeSwitcher=G8e;exports.ThemeSwitcherButton=Eb;exports.TimePicker=Ixe;exports.Title=X3e;exports.TranslationKey=dme;exports.TranslationKeyV2=Fve;exports.TrendItem=t$;exports.TrendList=rpe;exports.TrendListBox=Cme;exports.UnitGrid=ixe;exports.UserInfo=vA;exports.alertModels=B3e;exports.getA11yTooltip=Z;exports.getFormSchema=X4e;exports.hexToRgba=Tt;exports.registerRenderer=wke;exports.tableConfig=yw;exports.useAlerts=D3e;exports.useBodyScrollLock=G3e;exports.useConfirmationPopup=Eme;exports.useDraggableSwitcher=GS;exports.useFilters=nA;exports.useLegendFilterSwitcher=ZS;exports.useNavigation=yt;exports.useShowDataSwitcher=YS;exports.useTableData=oA;exports.useThemeContext=US;exports.useThemeSwitcher=ML;exports.validateField=vL;exports.validateForm=Tq;
8787
+ `.trim();return o.jsx("div",{className:U,style:n,children:o.jsxs("div",{className:E.innerPadding,children:[o.jsxs("div",{className:`${E.topArea} ${_?"":E.noFooterMargin}`,style:c,children:[o.jsx("div",{className:E.header,children:H?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:E.headerLeft,children:o.jsxs("div",{className:E.uf,children:[i,r&&` - ${r}`]})}),o.jsx("div",{className:E.headerRight,children:o.jsx("div",{className:E.rmBadge,children:H})})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:E.headerLeft,children:i&&o.jsx("div",{className:E.uf,children:i})}),o.jsx("div",{className:E.headerRight,children:r&&o.jsx("span",{className:E.roomBed,children:r})})]})}),o.jsxs("div",{className:E.content,children:[o.jsxs("div",{className:E.body,children:[N==="default"&&o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{className:`${E.centerLabelHuge} ${V?E.labelYellow:""}`,children:s}),o.jsxs("div",{className:E.upperBodyContent,children:[o.jsxs("div",{className:E.patientInfo,children:[d&&o.jsx("div",{className:E.iep,children:d}),l&&o.jsx("div",{className:E.name,children:l}),h&&o.jsxs("div",{className:E.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:E.firstNames,children:p}),y&&o.jsx("div",{className:E.dobAge,children:y})]}),f&&o.jsx("div",{className:E.duration,children:f}),g&&o.jsx("div",{className:E.comment,children:g})]}),k&&o.jsxs("div",{className:E.expectedBottom,children:[x&&o.jsx("div",{className:E.expectedPrefix,children:x}),o.jsx("div",{className:E.expectedDate,children:k})]})]}),N==="notes"&&o.jsxs("div",{className:E.notesView,children:[o.jsxs("div",{className:E.notesHeader,children:[A,o.jsx("span",{className:E.notesTitle,children:j})]}),o.jsx("div",{className:E.notesList,children:B.map((X,ie)=>o.jsx("div",{className:E.noteItem,children:X},ie))})]}),N==="reservation"&&o.jsxs("div",{className:E.reservationView,children:[s&&o.jsx("div",{className:`${E.centerLabelHuge} ${V?E.labelYellow:""}`,children:s}),o.jsx("div",{className:E.upperBodyContent,children:o.jsxs("div",{className:E.patientInfo,children:[d&&o.jsx("div",{className:E.iep,children:d}),l&&o.jsx("div",{className:E.name,children:l}),h&&o.jsxs("div",{className:E.birthName,children:["(",u?`${u} ${h}`:h,")"]}),p&&o.jsx("div",{className:E.firstNames,children:p}),y&&o.jsx("div",{className:E.dobAge,children:y})]})}),D&&o.jsx("div",{className:E.reservationNote,children:D})]})]}),(q||M||v)&&o.jsxs("div",{className:E.bottomArea,children:[q&&o.jsx("div",{className:E.bottomLeftSymbol,children:q}),v&&o.jsxs("div",{className:`${E.destination} ${R?E.todayReservation:""}`,children:[o.jsx("span",{className:E.arrow,children:"→"}),v.prefix&&o.jsx("span",{children:v.prefix}),o.jsx("strong",{children:v.name}),v.suffix&&o.jsx("span",{children:v.suffix})]}),M&&o.jsx("div",{className:E.timeline,children:b&&b!=="transparent"&&o.jsxs("div",{className:E.progressBar,style:{backgroundColor:b},children:[o.jsx("div",{className:E.progressFill,style:{width:`${I}%`,backgroundColor:C}}),w&&o.jsx("span",{className:E.progressDate,children:w})]})})]})]})]}),_&&o.jsxs("div",{className:E.footer,children:[o.jsx("div",{className:E.actionsLeft,children:L.map((X,ie)=>o.jsx("div",{className:E.iconWrap,children:X},`left-${ie}`))}),o.jsx("div",{className:E.actionsRight,children:S.map((X,ie)=>o.jsx("div",{className:E.iconWrap,children:X},`right-${ie}`))})]})]})})},EMe=({title:e,titleBold:t,titleKey:n,items:c,className:i="",width:r,style:s,labelStyle:d,valueStyle:l,headerStyle:h,a11yConfig:u,onItemClick:p,onDeleteItem:y})=>{const f={width:r||"100%",...s};return o.jsxs("div",{className:`data-list-v2-container ${i}`,style:f,children:[(e||t)&&o.jsx("div",{className:"data-list-v2-header",style:h,children:o.jsxs("h2",{className:"header-title",title:Z(u,n),children:[e&&o.jsx("span",{className:"title-regular",children:e}),t&&o.jsx("span",{className:"title-bold",children:t})]})}),o.jsx("div",{className:"data-list-v2-content",children:c.map(g=>o.jsxs("div",{className:`data-list-v2-item ${p?"interactive":""} ${g.showValueLine?"with-value-line":""}`,onClick:()=>p?.(g),children:[o.jsx("div",{className:"item-label-col",style:d,children:o.jsx("div",{className:"item-label",title:Z(g.a11yConfig,g.labelKey),children:g.label})}),o.jsxs("div",{className:"item-value-col",style:l,children:[o.jsx("div",{className:"item-value",title:Z(g.a11yConfig,g.valueKey),children:g.value}),y&&o.jsx("div",{className:"item-delete-action",onClick:k=>{k.stopPropagation(),y(g)},children:o.jsx(ut,{size:16})})]})]},g.id))})]})},OMe=({id:e,data:t,children:n,className:c,onDragStart:i,onDragEnd:r})=>{const s=l=>{l.dataTransfer.setData("text/plain",e),t&&l.dataTransfer.setData("application/json",JSON.stringify(t)),l.dataTransfer.effectAllowed="move",i&&i(l,t)},d=l=>{r&&r(l)};return o.jsx("div",{draggable:!0,onDragStart:s,onDragEnd:d,style:{cursor:"grab"},className:c,children:n})},UMe=({id:e,onDrop:t,children:n,className:c="",activeClassName:i="is-drag-over"})=>{const[r,s]=m.useState(!1),d=m.useRef(0),l=f=>{f.preventDefault(),d.current+=1,d.current>0&&s(!0)},h=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},u=f=>{f.preventDefault(),d.current-=1,d.current===0&&s(!1)},p=f=>{f.preventDefault(),s(!1),d.current=0;const g=f.dataTransfer.getData("text/plain");let k;try{const x=f.dataTransfer.getData("application/json");x&&(k=JSON.parse(x))}catch(x){console.error("Failed to parse drag data",x)}g&&t(g,k)},y=`${c} ${r?i:""}`.trim();return o.jsx("div",{onDragEnter:l,onDragOver:h,onDragLeave:u,onDrop:p,className:y,"data-droppable-id":e,children:n})},WMe=e=>o.jsx(GMe,{...e}),GMe=F.textarea`
8788
+ padding: 0.5rem 0.875rem;
8789
+ border: 0.0625rem solid var(--color-border, #dee2e6);
8790
+ border-radius: var(--radius-content, 0.5rem);
8791
+ font-size: 0.8125rem;
8792
+ color: var(--color-text);
8793
+ background: var(--color-card-background);
8794
+ resize: vertical;
8795
+
8796
+ &:disabled {
8797
+ opacity: 0.65;
8798
+ cursor: not-allowed;
8799
+ }
8800
+ `;exports.LineChart=a.LineChart;exports.PeriodRange=a.PeriodRange;exports.SimpleBarChart=a.SimpleBarChart;exports.ActionCard=a9e;exports.AddItemModal=Bc;exports.Alert=tC;exports.AlertsProvider=H3e;exports.BadgeList=DS;exports.BadgeRenderer=sA;exports.Button=sL;exports.ChartContainer=P3e;exports.CheckboxInput=Bq;exports.CircularProgress=Rb;exports.ColorInput=Uq;exports.ComponentVisibilityManager=Ob;exports.ComponentVisibilityToggle=tfe;exports.ConfirmationModal=Xve;exports.ConfirmationPopup=Fme;exports.CounterListBox=wme;exports.CurrencyRenderer=hA;exports.DashboardSummary=A6e;exports.DataBoard=vt;exports.DataFourBoards=gA;exports.DataListV2=EMe;exports.DateInput=Eq;exports.DatePicker=kw;exports.DateRenderer=dA;exports.DayStatCard=D2e;exports.DayStatCardV2=Yfe;exports.DonutChartRatio=K9e;exports.Draggable=OMe;exports.DraggableProvider=E2e;exports.DraggableSwitcherButton=dL;exports.Droppable=UMe;exports.DynamicForm=Z4e;exports.DynamicIcon=pw;exports.DynamicInput=Wq;exports.EmailRenderer=iA;exports.Encours=W6e;exports.EntryControl=Ime;exports.FileInput=Fq;exports.FilterBar=y7e;exports.FiltreEtiquette=$9e;exports.FlexRowContainer=Nme;exports.Grid=FS;exports.Header=Z2e;exports.HorizontalBarChart=Qfe;exports.IconText=QS;exports.ImageRenderer=uA;exports.IndicatorItemV2=Q7e;exports.InfoBanner=kve;exports.InputWrapper=CL;exports.LegendFilterProvider=U2e;exports.LegendFilterSwitcherButton=lL;exports.LinkRenderer=rA;exports.ListContentContainer=jme;exports.Logo=xL;exports.MetricsPanel=kA;exports.MobileMenuHeader=cxe;exports.MobileNavMenu=MA;exports.MobileTopBar=txe;exports.ModuleHeader=rme;exports.ModuleSideBar=sme;exports.ModuleSideBarV2=Rve;exports.MovementCard=X2e;exports.NavBar=ES;exports.NavBarV2=M8e;exports.NavItem=Fb;exports.NavItemV2=aC;exports.NavProvider=B2e;exports.NumberRenderer=lA;exports.PaginationBar=Tke;exports.PatientCard=FMe;exports.PatientDetailsPanel=Vxe;exports.PatientInfoCard=Txe;exports.PeriodSelect=O3e;exports.PopUp=Pve;exports.RadioInput=Rq;exports.RangeInput=Oq;exports.ScrollableHorizontale=e$;exports.SearchBar=fA;exports.Select=LA;exports.SelectFilter=b6e;exports.SelectInput=Yw;exports.SettingNavBar=Bve;exports.ShowDataProvider=W2e;exports.ShowDataSwitcherButton=hL;exports.SideComponent=W3e;exports.SimpleListBox=bme;exports.Slider=gxe;exports.StatusTile=ide;exports.SubHeaderContent=W8e;exports.SubHeaderNavItem=xA;exports.SubHeaderTitle=C8e;exports.SubNavBar=ude;exports.SummaryAvailable=A9e;exports.SummaryCard=yA;exports.Switcher=K1;exports.TableLayout=_A;exports.TableauDynamique=pA;exports.TableauDynamiqueSafePagination=Pke;exports.TableauxComponent=_A;exports.TextInput=Hq;exports.TextRenderer=cA;exports.Textarea=WMe;exports.TextareaInput=Dq;exports.ThemeProvider=R2e;exports.ThemeSwitcher=G8e;exports.ThemeSwitcherButton=Eb;exports.TimePicker=Ixe;exports.Title=X3e;exports.TranslationKey=dme;exports.TranslationKeyV2=Fve;exports.TrendItem=t$;exports.TrendList=rpe;exports.TrendListBox=Cme;exports.UnitGrid=ixe;exports.UserInfo=vA;exports.alertModels=B3e;exports.getA11yTooltip=Z;exports.getFormSchema=X4e;exports.hexToRgba=Tt;exports.registerRenderer=wke;exports.tableConfig=yw;exports.useAlerts=D3e;exports.useBodyScrollLock=G3e;exports.useConfirmationPopup=Eme;exports.useDraggableSwitcher=GS;exports.useFilters=nA;exports.useLegendFilterSwitcher=ZS;exports.useNavigation=yt;exports.useShowDataSwitcher=YS;exports.useTableData=oA;exports.useThemeContext=US;exports.useThemeSwitcher=ML;exports.validateField=vL;exports.validateForm=Tq;