PageSourceSearch

https://ecole.fidesassurances.fr/assets/index-Chtp3ooj.js

js fidesassurances.fr collected 2026-10-05 10:30:42 UTC 377,848 bytes, 283 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AIChatWidget-CxAkJ6iV.js","assets/recharts-D7Th9nWn.js","assets/index-BdQq_4o_.js","assets/supabase-CZSOkAWR.js","assets/Auth-D7KlNk4D.js","assets/card-bDSgrk93.js","assets/ResetPasswordRequest-7AhIrqdX.js","assets/ResetPasswordConfirm-Bj2SGXmw.js","assets/password-policy-CbYnSzUR.js","assets/Dashboard-BuQVlTPm.js","assets/useGestionnaireEcoles-BmBgIR1V.js","assets/DashboardActions-BfaU32Ia.js","assets/chunked-in-k4LFsKaW.js","assets/select-all-rows-DWm-6GE4.js","assets/navigation-return-DeleM84Q.js","assets/IconDeclarerSinistre-Cd-6aqYA.js","assets/message-circle-BBKQJYTR.js","assets/refresh-cw-Bmcg3a5p.js","assets/circle-check-iP5pZaIc.js","assets/sinistre-statuts-CuJrYnJb.js","assets/type-guards-yZbAtGhy.js","assets/circle-help-cGAgXmR_.js","assets/clock-DCYRP59m.js","assets/eye-DIMPaDU7.js","assets/ExternalDashboard-BVscvCaN.js","assets/IconVoyage-DgUhYPUx.js","assets/IconBesoinAttestation-D7AdqPb8.js","assets/bandeau-accueil-C2A18JEd.js","assets/info-C3Fn8ceB.js","assets/arrow-right-DY8iMXNB.js","assets/EcolesList-Ds787HdW.js","assets/EntitiesListView-D30zIlCD.js","assets/table-DCjrOkSu.js","assets/alert-dialog-EdfvuLWV.js","assets/index-B4vr_g_g.js","assets/useEntitiesList-Dxcez1Cp.js","assets/entity-deletion-DVZbiLIB.js","assets/query-keys-Ba8F0Vxf.js","assets/useMutation-DnzphB8b.js","assets/TableFilters-DuPWAO7a.js","assets/select-CaYex8Mn.js","assets/index-OGt32nKC.js","assets/popover-DqxCoxNV.js","assets/fr-DxArNyby.js","assets/SortableHeader-CtlXTeQX.js","assets/TablePagination-D0mpvJWb.js","assets/ExportCsvButton-CQcszm9l.js","assets/to-csv-BAKv5uVh.js","assets/error-messages-DP287TAm.js","assets/download-CZSBrMD2.js","assets/ContratsCell-Ce1IeU5O.js","assets/trash-2-CL06mDqd.js","assets/ExpandableItemGrid-DsZ7hAtw.js","assets/plus-eTaQm2o3.js","assets/pencil-DEHwcNcU.js","assets/EcoleForm-CnBZD7lF.js","assets/EntityForm-CuJSGI3h.js","assets/BackNavButton-CrP43Kkm.js","assets/arrow-left-CoUhInmm.js","assets/entity-name-format-Dppukqwz.js","assets/tenant-resolution-CLJ8QntN.js","assets/resolve-tenant-by-code-B9gG7dmW.js","assets/entity-form-config-WAlTmx7C.js","assets/entity-contract-helpers-CCvWpqGI.js","assets/entity-form-load.api-DCo0E-wu.js","assets/entity-form-mutations.api-FpQXNXDA.js","assets/address-autocomplete-nIVgVVHU.js","assets/checkbox-5NZOrwa3.js","assets/label-jiPIBGgE.js","assets/DatePicker-DxXQtCdO.js","assets/contract-type-labels-DFm-fFe7.js","assets/user-check-Bdzax4lN.js","assets/save-DmnVuV0A.js","assets/EcoleDetail-R3hz9TRr.js","assets/EntityRattacheesBlock-C_tiPT9d.js","assets/badge-Dj0MCDZp.js","assets/constants-4SY1-vjF.js","assets/EntityCreatedFooter-BTs6z-4i.js","assets/entity-members.api-DuhCIhAs.js","assets/ContratAutresDocumentsBlock-IPqzk_sj.js","assets/dialog-CQPQhbZ7.js","assets/upload-BgPPOQRi.js","assets/contrat-documents.api-CPHJ1LFH.js","assets/textarea-Cw8mTCEZ.js","assets/IconAnnulerVoyage-BkjwZ7Sa.js","assets/useBlockPermissions-DFudPx3O.js","assets/site-adresse-Dt6PGIyW.js","assets/SyntheseTab-CgjnGzEn.js","assets/IconAnnulerParticipant-IlztRRdL.js","assets/command-GXXrVFWu.js","assets/SinistresFilterTable-UM_07FeN.js","assets/contract-icons-BDCOig3E.js","assets/format-date-only-C5r8T-J4.js","assets/voyage-sinistre-types-B5q7SvMC.js","assets/VoyagesTable-BYV7qmUL.js","assets/voyage-editability-BoVxouU4.js","assets/AnnulerParticipantDialog-LrRRLhbB.js","assets/voyage-pdf-requests-g5mKfhLE.js","assets/post-pdf-template-CgL1PjU5.js","assets/pdf-template-blob-DALgBCm4.js","assets/pdf-template-builder-utils-B9J6XPc_.js","assets/plane-ZJa9yk5A.js","assets/FacturesVoyageTable-ChyUI5Mb.js","assets/pdfjs-DWm44NTd.js","assets/download-pdf-blob-BcwOZ8cR.js","assets/sinistres.common-DVP3Xu9z.js","assets/useVisibleClaimModules-PsMK-bBG.js","assets/tabs-DBa0vy2R.js","assets/EntitySitesBlock-CSEvE1ep.js","assets/ContratDocumentsList-CcuJaYpi.js","assets/car-DI540awq.js","assets/SyndicList-D8C7ENPw.js","assets/SyndicForm-CDhmgCI1.js","assets/chevrons-up-down-DthEDhHl.js","assets/SyndicDetail-BzAoMpQt.js","assets/SyntheseTab-DiQJ0SmN.js","assets/ImmeublesList-BuADRnvz.js","assets/ImmeubleForm-KReU4Kpz.js","assets/ImmeubleContratDialog--Rxhlb7V.js","assets/ImmeubleCreateForm-_S-2ppzT.js","assets/ImmeubleDetail-D1KZ9Jg6.js","assets/AssociationsList-DDPnh0Q9.js","assets/AssociationForm-DILWgwAF.js","assets/AssociationDetail-B3HTf-Jf.js","assets/EntreprisesList-Cmi5JnXI.js","assets/EntrepriseForm-D131nLCH.js","assets/EntrepriseDetail-J6h-Ocxv.js","assets/UtilisateursList-JtJV4wgP.js","assets/fonctions-D3GNEYeE.js","assets/archive-h-gpT7W-.js","assets/UtilisateurForm-BU6D8W40.js","assets/ChangePasswordDialog-BcJ-ohkr.js","assets/field-validation-eISALeJB.js","assets/SinistresList-C5DSSAvH.js","assets/useSinistresPage-CGCeYAPD.js","assets/ExternalModulePage-j3whR3KD.js","assets/AnnulerVoyageDialog-KnaiBOD6.js","assets/immeubles-contract-filter-aOWtqtfy.js","assets/SinistreForm-isIRgd8p.js","assets/TiersFormDialog-b9FDbU3d.js","assets/insurer-routing-LUeQPzry.js","assets/SinistreDetail-Cu0OQmFE.js","assets/send-DwqNsCbj.js","assets/download-storage-file-BRs7ol3O.js","assets/DocumentDropZone-CqTXUnAC.js","assets/circle-x-CL-V1CiJ.js","assets/SinistreDetail-D4YGUJcq.css","assets/AccidentsList-CDOwpbv3.js","assets/AnnulationVoyagesList-DvnjNdWn.js","assets/DeclarerVoyageForm-JlX3yn5
1d.js","assets/FacturationVoyagePage-uQOBZlQJ.js","assets/EcolesBulkDocumentsPage-CEi8fchl.js","assets/BulkDocumentUploadForm-DLQt7-Qh.js","assets/AssociationsBulkDocumentsPage-1ERkpi99.js","assets/DocumentsList-Df5pEN0U.js","assets/AnalyticsDashboard-BzHnyjVh.js","assets/PermissionsMatrix-DAraX5Kd.js","assets/AbsencesCalendar-hCYc62Fs.js","assets/DataMigration-DKlvEfq3.js","assets/circle-alert-DGOXiWoB.js","assets/SignaturePage-Dg1Rbk5k.js","assets/ModuleEspaceConfig-B7TJ1WUB.js","assets/DecisionTreeAdmin-S7fYQNH0.js","assets/switch-DDo32XKo.js","assets/decision-tree-parser-BQ2ZXa6J.js","assets/FormBuilderAdmin-FqW-wsTU.js","assets/EmailTemplatesAdmin-DSbHesO8.js","assets/BandeauAccueilAdmin-BNFLHOK2.js","assets/DeclarationGuidee-5VcWGJRl.js","assets/MonCompte-DeZpitrN.js","assets/ContactsUtiles-DDs4fMVd.js","assets/AttestationScolaire-CUF-GR9K.js","assets/build-school-insurance-certificate-generali-request-BCYrxHqZ.js","assets/pdf-template-request-builders-DBjEeNaO.js","assets/AttestationHub-D36aLiF0.js","assets/AttestationRC-g0867_Sb.js","assets/resolve-attestation-contract-dates-BzfmjEY8.js","assets/AttestationMultirisques-SOkrvNSE.js","assets/MesSouscriptions-1bmiJNvM.js","assets/MesSinistres-Fuq8rm_K.js","assets/ApiDocs-CrfjJtt0.js","assets/EspaceParentsLogin-BeSi9Fol.js","assets/espace-parents.common-B_9q0iKZ.js","assets/EspaceParentsAttestation-DdEr8K5e.js","assets/MaFondation-B0QSumzf.js","assets/DocusignOAuthConsent-CtAuHGTr.js","assets/DocusignPrivacy-BQo3B5TI.js","assets/DocusignTerms-CPEF1GGE.js","assets/Cgu-D_PvLq1r.js","assets/LegalPageLayout-C1ZNvkVB.js","assets/PolitiqueConfidentialite-D4W_ftlp.js","assets/MentionsLegales-D87L8I3c.js","assets/CguConsentGate-ijPk21tK.js","assets/EntitySelectionGate-Bz14FxFl.js"])))=>i.map(i=>d[i]);
2var ci=e=>{throw TypeError(e)};var so=(e,t,n)=>t.has(e)||ci("Cannot "+n);var C=(e,t,n)=>(so(e,t,"read from private field"),n?n.call(e):t.get(e)),$=(e,t,n)=>t.has(e)?ci("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),D=(e,t,n,r)=>(so(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),J=(e,t,n)=>(so(e,t,"access private method"),n);var Yr=(e,t,n,r)=>({set _(s){D(e,t,s,n)},get _(){return C(e,t,r)}});import{r as l,a as Rs,R as N,b as hs,c as Ps,d as Zc}from"./recharts-D7Th9nWn.js";import{c as lh,_ as It,a as Xc,b as uh}from"./supabase-CZSOkAWR.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var Jc={exports:{}},Ts={};/**
3 * @license React
4 * react-jsx-runtime.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var dh=l,fh=Symbol.for("react.element"),hh=Symbol.for("react.fragment"),mh=Object.prototype.hasOwnProperty,ph=dh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gh={key:!0,ref:!0,__self:!0,__source:!0};function el(e,t,n){var r,s={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)mh.call(t,r)&&!gh.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:fh,type:e,key:o,ref:a,props:s,_owner:ph.current}}Ts.Fragment=hh;Ts.jsx=el;Ts.jsxs=el;Jc.exports=Ts;var c=Jc.exports,tl,li=Rs;tl=li.createRoot,li.hydrateRoot;const vh=1,yh=1e6;let oo=0;function bh(){return oo=(oo+1)%Number.MAX_SAFE_INTEGER,oo.toString()}const ao=new Map,ui=e=>{if(ao.has(e))return;const t=setTimeout(()=>{ao.delete(e),vr({type:"REMOVE_TOAST",toastId:e})},yh);ao.set(e,t)},xh=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,vh)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;
10return n?ui(n):e.toasts.forEach(r=>{ui(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},as=[];let is={toasts:[]};function vr(e){is=xh(is,e),as.forEach(t=>{t(is)})}function nl({...e}){const t=bh(),n=s=>vr({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>vr({type:"DISMISS_TOAST",toastId:t});return vr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function rl(){const[e,t]=l.useState(is);return l.useEffect(()=>(as.push(t),()=>{const n=as.indexOf(t);n>-1&&as.splice(n,1)}),[e]),{...e,toast:nl,dismiss:n=>vr({type:"DISMISS_TOAST",toastId:n})}}function B(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function di(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vn(...e){return t=>{let n=!1;const r=e.map(s=>{const o=di(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():di(e[s],null)}}}}function Ee(...e){return l.useCallback(vn(...e),e)}function GC(e,t){const n=l.createContext(t),r=o=>{const{children:a,...i}=o,u=l.useMemo(()=>i,Object.values(i));return c.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function s(o){const a=l.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function yn(e,t=[]){let n=[];function r(o,a){const i=l.createContext(a),u=n.length;n=[...n,a];const d=h=>{var w;const{scope:v,children:m,...y}=h,p=((w=v==null?void 0:v[e])==null?void 0:w[u])||i,g=l.useMemo(()=>y,Object.values(y));return c.jsx(p.Provider,{value:g,children:m})};d.displayName=o+"Provider";function f(h,v){var p;const m=((p=v==null?void 0:v[e])==null?void 0:p[u])||i,y=l.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[d,f]}const s=()=>{const o=n.map(a=>l.createContext(a));return function(i){const u=(i==null?void 0:i[e])||o;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return s.scopeName=e,[r,wh(s,...t)]}function wh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const a=r.reduce((i,{useScope:u,scopeName:d})=>{const h=u(o)[`__scope${d}`];return{...i,...h}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function fi(e){const t=Eh(e),n=l.forwardRef((r,s)=>{const{children:o,...a}=r,i=l.Children.toArray(o),u=i.find(Sh);if(u){const d=u.props.children,f=i.map(h=>h===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:h);return c.jsx(t,{...a,ref:s,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return c.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function Eh(e){const t=l.forwardRef((n,r)=>{const{children:s,...o}=n;if(l.isValidElement(s)){const a=Rh(s),i=_h(o,s.props);return s.type!==l.Fragment&&(i.ref=r?vn(r,a):a),l.cloneElement(s,i)}return l.Children.count(s)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ch=Symbol("radix.slottable");function Sh(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ch}function _h(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...i)=>{const u=o(...i);return s(...i),u}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function Rh(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xa(e){const t=e+"CollectionProvider",[n,r]=yn(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:g,children:w}=p,x=N.useRef(null),b=N.useRef(new Map).current;return c.jsx(s,{scope:g,itemMap:b,collectionRef:x,children:w})};a.displayName=t;const i=e+"CollectionSlot",u=fi(i),d=N.forwardRef((p,g)=>{const{scope:w,children:x}=p,b=o(i,w),E=Ee(g,b.collectionRef);return c.jsx(u,{ref:E,children:x})});d.displayName=i;const f=e+"CollectionItemSlot",h="data-radix-collection-item",v=fi(f),m=N.forwardRef((p,g)=>{const{scope:w,children:x,...b}=p,E=N.useRef(null),_=Ee(g,E),S=o(f,w);return N.useEffect(()=>(S.itemMap.set(E,{ref:E,...b}),()=>void S.itemMap.delete(E))),c.jsx(v,{[h]:"",ref:_,children:x})});m.displayName=f;function y(p){const g=o(e+"CollectionConsumer",p);return N.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${h}]`));return Array.from(g.itemMap.values()).sort((S,R)=>b.indexOf(S.ref.current)-b.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:d,ItemSlot:m},y,r]}function Ph(e){const t=Th(e),n=l.forwardRef((r,s)=>{const{children:o,...a}=r,i=l.Children.toArray(o),u=i.find(Mh);if(u){const d=u.props.children,f=i.map(h=>h===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:h);return c.jsx(t,{...a,ref:s,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return c.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function Th(e){const t=l.forwardRef((n,r)=>{const{children:s,...o}=n;if(l.isValidElement(s)){const a=Oh(s),i=jh(o,s.props);return s.type!==l.Fragment&&(i.ref=r?vn(r,a):a),l.cloneElement(s,i)}return l.Children.count(s)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ah=Symbol("radix.slottable");function Mh(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ah}function jh(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...i)=>{const u=o(...i);return s(...i),u}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}
vendor: 9,126 bytes, line 10
10:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function Oh(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],me=Nh.reduce((e,t)=>{const n=Ph(`Primitive.${t}`),r=l.forwardRef((s,o)=>{const{asChild:a,...i}=s,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...i,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function wa(e,t){e&&Rs.flushSync(()=>e.dispatchEvent(t))}function Ue(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ih(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e);l.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Dh="DismissableLayer",Oo="dismissableLayer.update",kh="dismissableLayer.pointerDownOutside",Lh="dismissableLayer.focusOutside",hi,sl=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),As=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:i,...u}=e,d=l.useContext(sl),[f,h]=l.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=l.useState({}),y=Ee(t,R=>h(R)),p=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),w=p.indexOf(g),x=f?p.indexOf(f):-1,b=d.layersWithOutsidePointerEventsDisabled.size>0,E=x>=w,_=$h(R=>{const A=R.target,O=[...d.branches].some(P=>P.contains(A));!E||O||(s==null||s(R),a==null||a(R),R.defaultPrevented||i==null||i())},v),S=Vh(R=>{const A=R.target;[...d.branches].some(P=>P.contains(A))||(o==null||o(R),a==null||a(R),R.defaultPrevented||i==null||i())},v);return Ih(R=>{x===d.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&i&&(R.preventDefault(),i()))},v),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(hi=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),mi(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=hi)}},[f,v,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),mi())},[f,d]),l.useEffect(()=>{const R=()=>m({});return document.addEventListener(Oo,R),()=>document.removeEventListener(Oo,R)},[]),c.jsx(me.div,{...u,ref:y,style:{pointerEvents:b?E?"auto":"none":void 0,...e.style},onFocusCapture:B(e.onFocusCapture,S.onFocusCapture),onBlurCapture:B(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:B(e.onPointerDownCapture,_.onPointerDownCapture)})});As.displayName=Dh;var Fh="DismissableLayerBranch",ol=l.forwardRef((e,t)=>{const n=l.useContext(sl),r=l.useRef(null),s=Ee(t,r);return l.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),c.jsx(me.div,{...e,ref:s})});ol.displayName=Fh;function $h(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=l.useRef(!1),s=l.useRef(()=>{});return l.useEffect(()=>{const o=i=>{if(i.target&&!r.current){let u=function(){al(kh,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=u,t.addEventListener("click",s.current,{once:!0})):u()}else t.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Vh(e,t=globalThis==null?void 0:globalThis.document){const n=Ue(e),r=l.useRef(!1);return l.useEffect(()=>{const s=o=>{o.target&&!r.current&&al(Lh,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function mi(){const e=new CustomEvent(Oo);document.dispatchEvent(e)}function al(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?wa(s,o):s.dispatchEvent(o)}var Uh=As,Bh=ol,yt=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Wh="Portal",Ea=l.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[s,o]=l.useState(!1);yt(()=>o(!0),[]);const a=n||s&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return a?hs.createPortal(c.jsx(me.div,{...r,ref:t}),a):null});Ea.displayName=Wh;function zh(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var bn=e=>{const{present:t,children:n}=e,r=qh(t),s=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),o=Ee(r.ref,Hh(s));return typeof n=="function"||r.isPresent?l.cloneElement(s,{ref:o}):null};bn.displayName="Presence";function qh(e){const[t,n]=l.useState(),r=l.useRef(null),s=l.useRef(e),o=l.useRef("none"),a=e?"mounted":"unmounted",[i,u]=zh(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=Gr(r.current);o.current=i==="mounted"?d:"none"},[i]),yt(()=>{const d=r.current,f=s.current;if(f!==e){const v=o.current,m=Gr(d);e?u("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,u]),yt(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=m=>{const p=Gr(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&p&&(u("ANIMATION_END"),!s.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},v=m=>{m.target===t&&(o.current=Gr(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Gr(e){return(e==null?void 0:e.animationName)||"none"}function Hh(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yh=Ps[" useInsertionEffect ".trim().toString()]||yt;function Ms({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,a]=Gh({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:s;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const h=f.current;h!==i&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const d=l.useCallback(f=>{var h;if(i){const v=Kh(f)?f(e):f;v!==e&&((h=a.current)==null||h.call(a,v))}else o(f)},[i,e,o,a]);return[u,d]}function Gh({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),s=l.useRef(n),o=l.useRef(t);return Yh(()=>{o.current=t},[t]),l.useEffect(()=>{var a;s.current!==n&&((a=o.current)==null||a.call(o,n),s.current=n)},[n,s]),[n,r,o]}function Kh(e){return typeof e=="function"}var Qh=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zh="VisuallyHidden",js=l.forwardRef((e,t)=>c.jsx(me.span,{...e,ref:t,style:{...Qh,...e.style}}));js.displayName=Zh;var Xh=js,Ca="ToastProvider",[Sa,Jh,em]=xa("Toast"),[il]=yn("Toast",[em]),[tm,Os]=il(Ca),cl=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:a}=e,[i,u]=l.useState(null),[d,f]=l.useState(0),h=l.useRef(!1),v=l.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Ca}\`. Expected non-empty \`string\`.`),c.jsx(Sa.Provider,{scope:t,children:c.jsx(tm,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:o,toastCount:d,viewport:i,onViewportChange:u,onToastAdd:l.useCallback(()=>f(m=>m+1),[]),onToastRemove:l.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:v,children:a})})};cl.displayName=Ca;var ll="ToastViewport",nm=["F8"],No="toast.viewportPause",Io="toast.viewportResume",ul=l.forwardRef((e,t)=>
10{const{__scopeToast:n,hotkey:r=nm,label:s="Notifications ({hotkey})",...o}=e,a=Os(ll,n),i=Jh(n),u=l.useRef(null),d=l.useRef(null),f=l.useRef(null),h=l.useRef(null),v=Ee(t,h,a.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=a.toastCount>0;l.useEffect(()=>{const g=w=>{var b;r.length!==0&&r.every(E=>w[E]||w.code===E)&&((b=h.current)==null||b.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),l.useEffect(()=>{const g=u.current,w=h.current;if(y&&g&&w){const x=()=>{if(!a.isClosePausedRef.current){const S=new CustomEvent(No);w.dispatchEvent(S),a.isClosePausedRef.current=!0}},b=()=>{if(a.isClosePausedRef.current){const S=new CustomEvent(Io);w.dispatchEvent(S),a.isClosePausedRef.current=!1}},E=S=>{!g.contains(S.relatedTarget)&&b()},_=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",x),g.addEventListener("focusout",E),g.addEventListener("pointermove",x),g.addEventListener("pointerleave",_),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",x),g.removeEventListener("focusout",E),g.removeEventListener("pointermove",x),g.removeEventListener("pointerleave",_),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[y,a.isClosePausedRef]);const p=l.useCallback(({tabbingDirection:g})=>{const x=i().map(b=>{const E=b.ref.current,_=[E,...pm(E)];return g==="forwards"?_:_.reverse()});return(g==="forwards"?x.reverse():x).flat()},[i]);return l.useEffect(()=>{const g=h.current;if(g){const w=x=>{var _,S,R;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const A=document.activeElement,O=x.shiftKey;if(x.target===g&&O){(_=d.current)==null||_.focus();return}const M=p({tabbingDirection:O?"backwards":"forwards"}),V=M.findIndex(j=>j===A);io(M.slice(V+1))?x.preventDefault():O?(S=d.current)==null||S.focus():(R=f.current)==null||R.focus()}};return g.addEventListener("keydown",w),()=>g.removeEventListener("keydown",w)}},[i,p]),c.jsxs(Bh,{ref:u,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&c.jsx(Do,{ref:d,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"forwards"});io(g)}}),c.jsx(Sa.Slot,{scope:n,children:c.jsx(me.ol,{tabIndex:-1,...o,ref:v})}),y&&c.jsx(Do,{ref:f,onFocusFromOutsideViewport:()=>{const g=p({tabbingDirection:"backwards"});io(g)}})]})});ul.displayName=ll;var dl="ToastFocusProxy",Do=l.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,o=Os(dl,n);return c.jsx(js,{tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:a=>{var d;const i=a.relatedTarget;!((d=o.viewport)!=null&&d.contains(i))&&r()}})});Do.displayName=dl;var Ir="Toast",rm="toast.swipeStart",sm="toast.swipeMove",om="toast.swipeCancel",am="toast.swipeEnd",fl=l.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:o,...a}=e,[i,u]=Ms({prop:r,defaultProp:s??!0,onChange:o,caller:Ir});return c.jsx(bn,{present:n||i,children:c.jsx(lm,{open:i,...a,ref:t,onClose:()=>u(!1),onPause:Ue(e.onPause),onResume:Ue(e.onResume),onSwipeStart:B(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:B(e.onSwipeMove,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:B(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:B(e.onSwipeEnd,d=>{const{x:f,y:h}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),u(!1)})})})});fl.displayName=Ir;var[im,cm]=il(Ir,{onClose(){}}),lm=l.forwardRef((e,t)=>
10{const{__scopeToast:n,type:r="foreground",duration:s,open:o,onClose:a,onEscapeKeyDown:i,onPause:u,onResume:d,onSwipeStart:f,onSwipeMove:h,onSwipeCancel:v,onSwipeEnd:m,...y}=e,p=Os(Ir,n),[g,w]=l.useState(null),x=Ee(t,j=>w(j)),b=l.useRef(null),E=l.useRef(null),_=s||p.duration,S=l.useRef(0),R=l.useRef(_),A=l.useRef(0),{onToastAdd:O,onToastRemove:P}=p,I=Ue(()=>{var U;(g==null?void 0:g.contains(document.activeElement))&&((U=p.viewport)==null||U.focus()),a()}),M=l.useCallback(j=>{!j||j===1/0||(window.clearTimeout(A.current),S.current=new Date().getTime(),A.current=window.setTimeout(I,j))},[I]);l.useEffect(()=>{const j=p.viewport;if(j){const U=()=>{M(R.current),d==null||d()},F=()=>{const q=new Date().getTime()-S.current;R.current=R.current-q,window.clearTimeout(A.current),u==null||u()};return j.addEventListener(No,F),j.addEventListener(Io,U),()=>{j.removeEventListener(No,F),j.removeEventListener(Io,U)}}},[p.viewport,_,u,d,M]),l.useEffect(()=>{o&&!p.isClosePausedRef.current&&M(_)},[o,_,p.isClosePausedRef,M]),l.useEffect(()=>(O(),()=>P()),[O,P]);const V=l.useMemo(()=>g?bl(g):null,[g]);return p.viewport?c.jsxs(c.Fragment,{children:[V&&c.jsx(um,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:V}),c.jsx(im,{scope:n,onClose:I,children:Rs.createPortal(c.jsx(Sa.ItemSlot,{scope:n,children:c.jsx(Uh,{asChild:!0,onEscapeKeyDown:B(i,()=>{p.isFocusedToastEscapeKeyDownRef.current||I(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(me.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":p.swipeDirection,...y,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:B(e.onKeyDown,j=>{j.key==="Escape"&&(i==null||i(j.nativeEvent),j.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,I()))}),onPointerDown:B(e.onPointerDown,j=>{j.button===0&&(b.current={x:j.clientX,y:j.clientY})}),onPointerMove:B(e.onPointerMove,j=>{if(!b.current)return;const U=j.clientX-b.current.x,F=j.clientY-b.current.y,q=!!E.current,L=["left","right"].includes(p.swipeDirection),T=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,W=L?T(0,U):0,re=L?0:T(0,F),z=j.pointerType==="touch"?10:2,G={x:W,y:re},ee={originalEvent:j,delta:G};q?(E.current=G,Kr(sm,h,ee,{discrete:!1})):pi(G,p.swipeDirection,z)?(E.current=G,Kr(rm,f,ee,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(U)>z||Math.abs(F)>z)&&(b.current=null)}),onPointerUp:B(e.onPointerUp,j=>{const U=E.current,F=j.target;if(F.hasPointerCapture(j.pointerId)&&F.releasePointerCapture(j.pointerId),E.current=null,b.current=null,U){const q=j.currentTarget,L={originalEvent:j,delta:U};pi(U,p.swipeDirection,p.swipeThreshold)?Kr(am,m,L,{discrete:!0}):Kr(om,v,L,{discrete:!0}),q.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),um=e=>{const{__scopeToast:t,children:n,...r}=e,s=Os(Ir,t),[o,a]=l.useState(!1),[i,u]=l.useState(!1);return hm(()=>a(!0)),l.useEffect(()=>{const d=window.setTimeout(()=>u(!0),1e3);return()=>window.clearTimeout(d)},[]),i?null:c.jsx(Ea,{asChild:!0,children:c.jsx(js,{...r,children:o&&c.jsxs(c.Fragment,{children:[s.label," ",n]})})})},dm="ToastTitle",hl=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(me.div,{...r,ref:t})});hl.displayName=dm;var fm="ToastDescription",ml=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(me.div,{...r,ref:t})});ml.displayName=fm;var pl="ToastAction",gl=l.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx(yl,{altText:n,asChild:!0,children:c.jsx(_a,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${pl}\`. Expected non-empty \`string\`.`),null)});gl.displayName=pl;var vl="ToastClose",_a=l.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=cm(vl,n);return c.jsx(yl,{asChild:!0,children:c.jsx(me.button,{type:"button",...r,ref:t,onClick:B(e.onClick,s.onClose)})})});_a.displayName=vl;var yl=l.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return c.jsx(me.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function bl(e){const t=[];
10return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),mm(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...bl(r))}}),t}function Kr(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?wa(s,o):s.dispatchEvent(o)}var pi=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),o=r>s;return t==="left"||t==="right"?o&&r>n:!o&&s>n};function hm(e=()=>{}){const t=Ue(e);yt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function mm(e){return e.nodeType===e.ELEMENT_NODE}function pm(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function io(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var gm=cl,xl=ul,wl=fl,El=hl,Cl=ml,Sl=gl,_l=_a;const gi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vi=Zc,Rl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return vi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(d=>{const f=n==null?void 0:n[d],h=o==null?void 0:o[d];if(f===null)return null;const v=gi(f)||gi(h);return s[d][v]}),i=n&&Object.entries(n).reduce((d,f)=>{let[h,v]=f;return v===void 0||(d[h]=v),d},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:h,className:v,...m}=f;return Object.entries(m).every(y=>{let[p,g]=y;return Array.isArray(g)?g.includes({...o,...i}[p]):{...o,...i}[p]===g})?[...d,h,v]:d},[]);return vi(e,a,u,n==null?void 0:n.class,n==null?void 0:n.className)};/**
11 * @license lucide-react v0.462.0 - ISC
12 *
13 * This source code is licensed under the ISC license.
14 * See the LICENSE file in the root directory of this source tree.
15 */const vm=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
16 * @license lucide-react v0.462.0 - ISC
17 *
18 * This source code is licensed under the ISC license.
19 * See the LICENSE file in the root directory of this source tree.
20 */var ym={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
21 * @license lucide-react v0.462.0 - ISC
22 *
23 * This source code is licensed under the ISC license.
24 * See the LICENSE file in the root directory of this source tree.
25 */const bm=l.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:a,...i},u)=>l.createElement("svg",{ref:u,...ym,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Pl("lucide",s),...i},[...a.map(([d,f])=>l.createElement(d,f)),...Array.isArray(o)?o:[o]]));/**
26 * @license lucide-react v0.462.0 - ISC
27 *
28 * This source code is licensed under the ISC license.
29 * See the LICENSE file in the root directory of this source tree.
30 */const X=(e,t)=>{const n=l.forwardRef(({className:r,...s},o)=>l.createElement(bm,{ref:o,iconNode:t,className:Pl(`lucide-${vm(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
31 * @license lucide-react v0.462.0 - ISC
32 *
33 * This source code is licensed under the ISC license.
34 * See the LICENSE file in the root directory of this source tree.
35 */const Tl=X("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
36 * @license lucide-react v0.462.0 - ISC
37 *
38 * This source code is licensed under the ISC license.
39 * See the LICENSE file in the root directory of this source tree.
40 */const Yt=X("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
40],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const xm=X("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */const wm=X("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const Al=X("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Ml=X("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const Em=X("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const jl=X("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const Cm=X("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const Sm=X("DatabaseZap",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 15 21.84",key:"14ibmq"}],["path",{d:"M21 5V8",key:"1marbg"}],["path",{d:"M21 12L18 17H22L19 22",key:"zafso"}],["path",{d:"M3 12A9 3 0 0 0 14.59 14.87",key:"1y4wr8"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const _m=X("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const Rm=X("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const Pm=X("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const Tm=X("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const Am=X("HardHat",[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const Mm=X("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const jm=X("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const Ol=X("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const Om=X("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const Nm=X("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const Im=X("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const Dm=X("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const km=X("PenTool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const Lm=X("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const Ns=X("School",[["path",{d:"M14 22v-4a2 2 0 1 0-4 0v4",key:"hhkicm"}],["path",{d:"m18 10 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-7.382a1 1 0 0 1 .553-.894L6 10",key:"1xqip1"}],["path",{d:"M18 5v17",key:"1sw6gf"}],["path",{d:"m4 6 7.106-3.553a2 2 0 0 1 1.788 0L20 6",key:"9d2ml
155k"}],["path",{d:"M6 5v17",key:"1xfsm0"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const Fm=X("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const $m=X("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Vm=X("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const Um=X("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const Bm=X("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const Wm=X("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const Ra=X("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const zm=X("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const Nl=X("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const Il=X("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const Dl=X("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const kl=X("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 9,096 bytes, line 215
215],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Pa="-",qm=e=>{const t=Ym(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Pa);return i[0]===""&&i.length!==1&&i.shift(),Ll(i,t)||Hm(a)},getConflictingClassGroupIds:(a,i)=>{const u=n[a]||[];return i&&r[a]?[...u,...r[a]]:u}}},Ll=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Ll(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Pa);return(a=t.validators.find(({validator:i})=>i(o)))==null?void 0:a.classGroupId},yi=/^\[(.+)\]$/,Hm=e=>{if(yi.test(e)){const t=yi.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Ym=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Km(Object.entries(e.classGroups),n).forEach(([o,a])=>{ko(a,r,o,t)}),r},ko=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:bi(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(Gm(s)){ko(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,a])=>{ko(a,bi(t,o),n,r)})})},bi=(e,t)=>{let n=e;return t.split(Pa).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Gm=e=>e.isThemeGetter,Km=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,i])=>[t+a,i])):o);return[n,s]}):e,Qm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return s(o,a),a},set(o,a){n.has(o)?n.set(o,a):s(o,a)}}},Fl="!",Zm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,a=i=>{const u=[];let d=0,f=0,h;for(let g=0;g<i.length;g++){let w=i[g];if(d===0){if(w===s&&(r||i.slice(g,g+o)===t)){u.push(i.slice(f,g)),f=g+o;continue}if(w==="/"){h=g;continue}}w==="["?d++:w==="]"&&d--}const v=u.length===0?i:i.substring(f),m=v.startsWith(Fl),y=m?v.substring(1):v,p=h&&h>f?h-f:void 0;return{modifiers:u,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:p}};return n?i=>n({className:i,parseClassName:a}):a},Xm=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Jm=e=>({cache:Qm(e.cacheSize),parseClassName:Zm(e),...qm(e)}),ep=/\s+/,tp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],a=e.trim().split(ep);let i="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{modifiers:f,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}=n(d);let y=!!m,p=r(y?v.substring(0,m):v);if(!p){if(!y){i=d+(i.length>0?" "+i:i);continue}if(p=r(v),!p){i=d+(i.length>0?" "+i:i);continue}y=!1}const g=Xm(f).join(":"),w=h?g+Fl:g,x=w+p;if(o.includes(x))continue;o.push(x);const b=s(p,y);for(let E=0;E<b.length;++E){const _=b[E];o.push(w+_)}i=d+(i.length>0?" "+i:i)}return i};function np(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=$l(t))&&(r&&(r+=" "),r+=n);return r}const $l=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=$l(e[r]))&&(n&&(n+=" "),n+=t);return n};function rp(e,...t){let n,r,s,o=a;function a(u){const d=t.reduce((f,h)=>h(f),e());return n=Jm(d),r=n.cache.get,s=n.cache.set,o=i,i(u)}function i(u){const d=r(u);if(d)return d;const f=tp(u,n);return s(u,f),f}return function(){return o(np.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vl=/^\[(?:([a-z-]+):)?(.+)\]$/i,sp=/^\d+\/\d+$/,op=new Set(["px","full","screen"]),ap=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ip=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,up=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=e=>In(e)||op.has(e)||sp.test(e),Tt=e=>er(e,"length",yp),In=e=>!!e&&!Number.isNaN(Number(e)),co=e=>er(e,"number",In),cr=e=>!!e&&Number.isInteger(Number(e)),dp=e=>e.endsWith("%")&&In(e.slice(0,-1)),Y=e=>Vl.test(e),At=e=>ap.test(e),fp=new Set(["length","size","percentage"]),hp=e=>er(e,fp,Ul),mp=e=>er(e,"position",Ul),pp=new Set(["image","url"]),gp=e=>er(e,pp,xp),vp=e=>er(e,"",bp),lr=()=>!0,er=(e,t,n)=>{const r=Vl.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},yp=e=>ip.test(e)&&!cp.test(e),Ul=()=>!1,bp=e=>lp.test(e),xp=e=>up.test(e),wp=()=>{const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),s=de("borderColor"),o=de("borderRadius"),a=de("borderSpacing"),i=de("borderWidth"),u=de("contrast"),d=de("grayscale"),f=de("hueRotate"),h=de("invert"),v=de("gap"),m=de("gradientColorStops"),y=de("gradientColorStopPositions"),p=de("inset"),g=de("margin"),w=de("opacity"),x=de("padding"),b=de("saturate"),E=de("scale"),_=de("sepia"),S=de("skew"),R=de("space"),A=de("translate"),O=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Y,t],M=()=>[Y,t],V=()=>["",ht,Tt],j=()=>["auto",In,Y],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",Y],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[In,Y];return{cacheSize:500,separator:":",theme:{colors:[lr],spacing:[ht,Tt],blur:["none","",At,Y],brightness:re(),borderColor:[e],borderRadius:["none","","full",At,Y],borderSpacing:M(),borderWidth:V(),contrast:re(),grayscale:T(),hueRotate:re(),invert:T(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[dp,Tt],inset:I(),margin:I(),opacity:re(),padding:M(),saturate:re(),scale:re(),sepia:T(),skew:re(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[At]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Y]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",cr,Y]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",cr,Y]}],"grid-cols":[{"grid-cols":[lr]}],"col-start-end":[{col:["auto",{span:["full",cr,Y]},Y]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[lr]}],"row-start-end":[{row:["auto",{span:[cr,Y]},Y]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}
vendor: 8,319 bytes, line 215
215],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[At]},At]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",At,Tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",co]}],"font-family":[{font:[lr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",In,co]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ht,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ht,Tt]}],"underline-offset":[{"underline-offset":["auto",ht,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),mp]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hp]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gp]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:F()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[ht,Y]}],"outline-w":[{outline:[ht,Tt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ht,Tt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",At,vp]}],"shadow-color":[{shadow:[lr]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",At,Y]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[h]}],saturate:[{saturate:[b]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[cr,Y]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
215],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ht,Tt,co]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Ep=rp(wp);function oe(...e){return Ep(Zc(e))}function KC(e){if(!e)return"";const t=e.replace(/\D/g,"");return t.length===0?e:t.replace(/(\d{2})(?=\d)/g,"$1 ").trim()}function QC(e){return e?e.trim().toLocaleLowerCase("fr-FR").normalize("NFD").replace(/[̀-ͯ]/g,""):""}const Cp=gm,Bl=l.forwardRef(({className:e,...t},n)=>c.jsx(xl,{ref:n,className:oe("fixed top-0 right-0 z-[100] flex max-h-screen w-full flex-col p-4 md:max-w-[420px]",e),...t}));Bl.displayName=xl.displayName;const Sp=Rl("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Wl=l.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(wl,{ref:r,className:oe(Sp({variant:t}),e),...n}));Wl.displayName=wl.displayName;const _p=l.forwardRef(({className:e,...t},n)=>c.jsx(Sl,{ref:n,className:oe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));_p.displayName=Sl.displayName;const zl=l.forwardRef(({className:e,...t},n)=>c.jsx(_l,{ref:n,className:oe("absolute right-2 top-2 rounded-md p-1 text-foreground
215/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:c.jsx(kl,{className:"h-4 w-4"})}));zl.displayName=_l.displayName;const ql=l.forwardRef(({className:e,...t},n)=>c.jsx(El,{ref:n,className:oe("text-sm font-semibold",e),...t}));ql.displayName=El.displayName;const Hl=l.forwardRef(({className:e,...t},n)=>c.jsx(Cl,{ref:n,className:oe("text-sm opacity-90",e),...t}));Hl.displayName=Cl.displayName;function Rp(){const{toasts:e}=rl();return c.jsxs(Cp,{children:[e.map(function({id:t,title:n,description:r,action:s,...o}){return c.jsxs(Wl,{...o,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(ql,{children:n}),r&&c.jsx(Hl,{children:r})]}),s,c.jsx(zl,{})]},t)}),c.jsx(Bl,{})]})}var xi=["light","dark"],Pp="(prefers-color-scheme: dark)",Tp=l.createContext(void 0),Ap={setTheme:e=>{},themes:[]},Mp=()=>{var e;return(e=l.useContext(Tp))!=null?e:Ap};l.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:a,attrs:i,nonce:u})=>{let d=o==="system",f=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${i.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?xi.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",v=(y,p=!1,g=!0)=>{let w=a?a[y]:y,x=p?y+"|| ''":`'${w}'`,b="";return s&&g&&!p&&xi.includes(y)&&(b+=`d.style.colorScheme = '${y}';`),n==="class"?p||w?b+=`c.add(${x})`:b+="null":w&&(b+=`d[s](n,${x})`),b},m=e?`!function(){${f}${v(e)}}()`:r?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${Pp}',m=window.matchMedia(t);if(m.media!==t||m.matches){${v("dark")}}else{${v("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${v(a?"x[e]":"e",!0)}}${d?"":"else{"+v(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${v(a?"x[e]":"e",!0)}}else{${v(o,!1,!1)};}${h}}catch(t){}}();`;return l.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:m}})});var jp=e=>{switch(e){case"success":return Ip;case"info":return kp;case"warning":return Dp;case"error":return Lp;default:return null}},Op=Array(12).fill(0),Np=({visible:e,className:t})=>N.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},N.createElement("div",{className:"sonner-spinner"},Op.map((n,r)=>N.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Ip=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Dp=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),kp=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Lp=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},N.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Fp=N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},N.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),N.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),$p=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let n=()=>{t(document.hidden)};
215return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Lo=1,Vp=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Lo++,o=this.toasts.find(i=>i.id===s),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(i=>i.id===s?(this.publish({...i,...e,id:s,title:n}),{...i,...e,id:s,dismissible:a,title:n}):i):this.addToast({title:n,...r,dismissible:a,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
215this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,o,a=r.then(async u=>{if(o=["resolve",u],N.isValidElement(u))s=!1,this.create({id:n,type:"default",message:u});else if(Bp(u)&&!u.ok){s=!1;let d=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:d,description:f})}else if(t.success!==void 0){s=!1;let d=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:d,description:f})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){s=!1;let d=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:d,description:f})}}).finally(()=>{var u;s&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),i=()=>new Promise((u,d)=>a.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Lo++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Te=new Vp,Up=(e,t)=>{let n=(t==null?void 0:t.id)||Lo++;return Te.addToast({title:e,...t,id:n}),n},Bp=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Wp=Up,zp=()=>Te.toasts,qp=()=>Te.getActiveToasts(),Hp=Object.assign(Wp,{success:Te.success,info:Te.info,warning:Te.warning,error:Te.error,custom:Te.custom,message:Te.message,promise:Te.promise,dismiss:Te.dismiss,loading:Te.loading},{getHistory:zp,getToasts:qp});function Yp(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Yp(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
215left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
215:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
215--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
216`);function Qr(e){return e.label!==void 0}var Gp=3,Kp="32px",Qp="16px",wi=4e3,Zp=356,Xp=14,Jp=20,eg=200;function Ze(...e){return e.filter(Boolean).join(" ")}function tg(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var ng=e=>{var t,n,r,s,o,a,i,u,d,f,h;let{invert:v,toast:m,unstyled:y,interacting:p,setHeights:g,visibleToasts:w,heights:x,index:b,toasts:E,expanded:_,removeToast:S,defaultRichColors:R,closeButton:A,style:O,cancelButtonStyle:P,actionButtonStyle:I,className:M="",descriptionClassName:V="",duration:j,position:U,gap:F,loadingIcon:q,expandByDefault:L,classNames:T,icons:W,closeButtonAriaLabel:re="Close toast",pauseWhenPageIsHidden:z}=e,[G,ee]=N.useState(null),[pe,ve]=N.useState(null),[te,Me]=N.useState(!1),[xe,rt]=N.useState(!1),[Ct,Sn]=N.useState(!1),[St,zr]=N.useState(!1),[eo,qr]=N.useState(!1),[to,ar]=N.useState(0),[_n,ni]=N.useState(0),ir=N.useRef(m.duration||j||wi),ri=N.useRef(null),Zt=N.useRef(null),eh=b===0,th=b+1<=w,Be=m.type,Rn=m.dismissible!==!1,nh=m.className||"",rh=m.descriptionClassName||"",Hr=N.useMemo(()=>x.findIndex(H=>H.toastId===m.id)||0,[x,m.id]),sh=N.useMemo(()=>{var H;return(H=m.closeButton)!=null?H:A},[m.closeButton,A]),si=N.useMemo(()=>m.duration||j||wi,[m.duration,j]),no=N.useRef(0),Pn=N.useRef(0),oi=N.useRef(0),Tn=N.useRef(null),[oh,ah]=U.split("-"),ai=N.useMemo(()=>x.reduce((H,ce,fe)=>fe>=Hr?H:H+ce.height,0),[x,Hr]),ii=$p(),ih=m.invert||v,ro=Be==="loading";Pn.current=N.useMemo(()=>Hr*F+ai,[Hr,ai]),N.useEffect(()=>{ir.current=si},[si]),N.useEffect(()=>{Me(!0)},[]),N.useEffect(()=>{let H=Zt.current;if(H){let ce=H.getBoundingClientRect().height;return ni(ce),g(fe=>[{toastId:m.id,height:ce,position:m.position},...fe]),()=>g(fe=>fe.filter(Ge=>Ge.toastId!==m.id))}},[g,m.id]),N.useLayoutEffect(()=>{if(!te)return;let H=Zt.current,ce=H.style.height;H.style.height="auto";let fe=H.getBoundingClientRect().height;H.style.height=ce,ni(fe),g(Ge=>Ge.find(Ke=>Ke.toastId===m.id)?Ge.map(Ke=>Ke.toastId===m.id?{...Ke,height:fe}:Ke):[{toastId:m.id,height:fe,position:m.position},...Ge])},[te,m.title,m.description,g,m.id]);let _t=N.useCallback(()=>{rt(!0),ar(Pn.current),g(H=>H.filter(ce=>ce.toastId!==m.id)),setTimeout(()=>{S(m)},eg)},[m,S,g,Pn]);N.useEffect(()=>{if(m.promise&&Be==="loading"||m.duration===1/0||m.type==="loading")return;let H;return _||p||z&&ii?(()=>{if(oi.current<no.current){let ce=new Date().getTime()-no.current;ir.current=ir.current-ce}
216oi.current=new Date().getTime()})():ir.current!==1/0&&(no.current=new Date().getTime(),H=setTimeout(()=>{var ce;(ce=m.onAutoClose)==null||ce.call(m,m),_t()},ir.current)),()=>clearTimeout(H)},[_,p,m,Be,z,ii,_t]),N.useEffect(()=>{m.delete&&_t()},[_t,m.delete]);function ch(){var H,ce,fe;return W!=null&&W.loading?N.createElement("div",{className:Ze(T==null?void 0:T.loader,(H=m==null?void 0:m.classNames)==null?void 0:H.loader,"sonner-loader"),"data-visible":Be==="loading"},W.loading):q?N.createElement("div",{className:Ze(T==null?void 0:T.loader,(ce=m==null?void 0:m.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":Be==="loading"},q):N.createElement(Np,{className:Ze(T==null?void 0:T.loader,(fe=m==null?void 0:m.classNames)==null?void 0:fe.loader),visible:Be==="loading"})}return N.createElement("li",{tabIndex:0,ref:Zt,className:Ze(M,nh,T==null?void 0:T.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[Be],(n=m==null?void 0:m.classNames)==null?void 0:n[Be]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:R,"data-styled":!(m.jsx||m.unstyled||y),"data-mounted":te,"data-promise":!!m.promise,"data-swiped":eo,"data-removed":xe,"data-visible":th,"data-y-position":oh,"data-x-position":ah,"data-index":b,"data-front":eh,"data-swiping":Ct,"data-dismissible":Rn,"data-type":Be,"data-invert":ih,"data-swipe-out":St,"data-swipe-direction":pe,"data-expanded":!!(_||L&&te),style:{"--index":b,"--toasts-before":b,"--z-index":E.length-b,"--offset":`${xe?to:Pn.current}px`,"--initial-height":L?"auto":`${_n}px`,...O,...m.style},onDragEnd:()=>{Sn(!1),ee(null),Tn.current=null},onPointerDown:H=>{ro||!Rn||(ri.current=new Date,ar(Pn.current),H.target.setPointerCapture(H.pointerId),H.target.tagName!=="BUTTON"&&(Sn(!0),Tn.current={x:H.clientX,y:H.clientY}))},onPointerUp:()=>{var H,ce,fe,Ge;if(St||!Rn)return;Tn.current=null;let Ke=Number(((H=Zt.current)==null?void 0:H.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rt=Number(((ce=Zt.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xt=new Date().getTime()-((fe=ri.current)==null?void 0:fe.getTime()),Qe=G==="x"?Ke:Rt,Pt=Math.abs(Qe)/Xt;if(Math.abs(Qe)>=Jp||Pt>.11){ar(Pn.current),(Ge=m.onDismiss)==null||Ge.call(m,m),ve(G==="x"?Ke>0?"right":"left":Rt>0?"down":"up"),_t(),zr(!0),qr(!1);return}Sn(!1),ee(null)},onPointerMove:H=>{var ce,fe,Ge,Ke;if(!Tn.current||!Rn||((ce=window.getSelection())==null?void 0:ce.toString().length)>0)return;let Rt=H.clientY-Tn.current.y,Xt=H.clientX-Tn.current.x,Qe=(fe=e.swipeDirections)!=null?fe:tg(U);!G&&(Math.abs(Xt)>1||Math.abs(Rt)>1)&&ee(Math.abs(Xt)>Math.abs(Rt)?"x":"y");let Pt={x:0,y:0};G==="y"?(Qe.includes("top")||Qe.includes("bottom"))&&(Qe.includes("top")&&Rt<0||Qe.includes("bottom")&&Rt>0)&&(Pt.y=Rt):G==="x"&&(Qe.includes("left")||Qe.includes("right"))&&(Qe.includes("left")&&Xt<0||Qe.includes("right")&&Xt>0)&&(Pt.x=Xt),(Math.abs(Pt.x)>0||Math.abs(Pt.y)>0)&&qr(!0),(Ge=Zt.current)==null||Ge.style.setProperty("--swipe-amount-x",`${Pt.x}px`),(Ke=Zt.current)==null||Ke.style.setProperty("--swipe-amount-y",`${Pt.y}px`)}},sh&&!m.jsx?N.createElement("button",{"aria-label":re,"data-disabled":ro,"data-close-button":!0,onClick:ro||!Rn?()=>{}:()=>{var H;_t(),(H=m.onDismiss)==null||H.call(m,m)},className:Ze(T==null?void 0:T.closeButton,(s=m==null?void 0:m.classNames)==null?void 0:s.closeButton)},(o=W==null?void 0:W.close)!=null?o:Fp):null,m.jsx||l.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:N.createElement(N.Fragment,null,Be||m.icon||m.promise?N.createElement("div",{"data-icon":"",className:Ze(T==null?void 0:T.icon,(a=m==null?void 0:m.classNames)==null?void 0:a.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ch():null,m.type!=="loading"?m.
216icon||(W==null?void 0:W[Be])||jp(Be):null):null,N.createElement("div",{"data-content":"",className:Ze(T==null?void 0:T.content,(i=m==null?void 0:m.classNames)==null?void 0:i.content)},N.createElement("div",{"data-title":"",className:Ze(T==null?void 0:T.title,(u=m==null?void 0:m.classNames)==null?void 0:u.title)},typeof m.title=="function"?m.title():m.title),m.description?N.createElement("div",{"data-description":"",className:Ze(V,rh,T==null?void 0:T.description,(d=m==null?void 0:m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),l.isValidElement(m.cancel)?m.cancel:m.cancel&&Qr(m.cancel)?N.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:H=>{var ce,fe;Qr(m.cancel)&&Rn&&((fe=(ce=m.cancel).onClick)==null||fe.call(ce,H),_t())},className:Ze(T==null?void 0:T.cancelButton,(f=m==null?void 0:m.classNames)==null?void 0:f.cancelButton)},m.cancel.label):null,l.isValidElement(m.action)?m.action:m.action&&Qr(m.action)?N.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||I,onClick:H=>{var ce,fe;Qr(m.action)&&((fe=(ce=m.action).onClick)==null||fe.call(ce,H),!H.defaultPrevented&&_t())},className:Ze(T==null?void 0:T.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function Ei(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function rg(e,t){let n={};return[e,t].forEach((r,s)=>{let o=s===1,a=o?"--mobile-offset":"--offset",i=o?Qp:Kp;function u(d){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?u(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${a}-${d}`]=i:n[`${a}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):u(i)}),n}function sg(){let[e,t]=N.useState([]);return N.useEffect(()=>Te.subscribe(n=>{if(n.dismiss){setTimeout(()=>{hs.flushSync(()=>{t(r=>r.filter(s=>s.id!==n.id))})});return}setTimeout(()=>{hs.flushSync(()=>{t(r=>{let s=r.findIndex(o=>o.id===n.id);return s!==-1?[...r.slice(0,s),{...r[s],...n},...r.slice(s+1)]:[n,...r]})})})}),[]),{toasts:e}}var Yl=l.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:i,offset:u,mobileOffset:d,theme:f="light",richColors:h,duration:v,style:m,visibleToasts:y=Gp,toastOptions:p,dir:g=Ei(),gap:w=Xp,loadingIcon:x,icons:b,containerAriaLabel:E="Notifications",pauseWhenPageIsHidden:_}=e,[S,R]=N.useState([]),A=N.useMemo(()=>Array.from(new Set([r].concat(S.filter(z=>z.position).map(z=>z.position)))),[S,r]),[O,P]=N.useState([]),[I,M]=N.useState(!1),[V,j]=N.useState(!1),[U,F]=N.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=N.useRef(null),L=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=N.useRef(null),W=N.useRef(!1),re=N.useCallback(z=>{R(G=>{var ee;return(ee=G.find(pe=>pe.id===z.id))!=null&&ee.delete||Te.dismiss(z.id),G.filter(({id:pe})=>pe!==z.id)})},[]);return N.useEffect(()=>Te.subscribe(z=>{if(z.dismiss){R(G=>G.map(ee=>ee.id===z.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{hs.flushSync(()=>{R(G=>{let ee=G.findIndex(pe=>pe.id===z.id);return ee!==-1?[...G.slice(0,ee),{...G[ee],...z},...G.slice(ee+1)]:[z,...G]})})})}),[]),N.useEffect(()=>{if(f!=="system"){F(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:G})=>{F(G?"dark":"light")})}catch{z.addListener(({matches:ee})=>{try{F(ee?"dark":"light")}catch(pe){console.error(pe)}})}},[f]),N.useEffect(()=>{S.length<=1&&M(!1)},[S]),N.useEffect(()=>{let z=G=>{var ee,pe;s.every(ve=>G[ve]||G.code===ve)&&(M(!0),(ee=q.current)==null||ee.focus()),G.code==="Escape"&&(document.activeElement===q.current||(pe=q.current)!=null&&pe.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[s]),N.useEffect(()=>{if(q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,W.current=!1)}},[q.current]),N.createElement("section",{ref:t,"aria-label":`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((z,G)=>{var ee;let[pe,ve]=z.split("-");return S.length?N.createElement("ol",{key:z,dir:g==="auto"?Ei():g,tabIndex:-1,ref:q,className:i,"data-sonner-toaster":!0,"data-theme":U,"data-y-position":pe,"data-lifted":I&&S.length>1&&!o,"data-x-position":ve,style:{"--front-toast-height":`${((ee=O[0])==null?void 0:ee.height)||0}px`,"--width":`${Zp}px`,"--gap":`${w}px`,...m,...rg(u,d)},onBlur:te=>{W.current&&!te.currentTarget.contains(te.relatedTarget)&&(W.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||W.current||(W.current=!0,T.current=te.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{V||M(!1)},onDragEnd:()=>M(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||j(!0)},onPointerUp:()=>j(!1)},S.filter(te=>!te.position&&G===0||te.position===z).map((te,Me)=>{var xe,rt;return N.createElement(ng,{key:te.id,icons:b,index:Me,toast:te,defaultRichColors:h,duration:(xe=p==null?void 0:p.duration)!=null?xe:v,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:y,closeButton:(rt=p==null?void 0:p.closeButton)!=null?rt:a,interacting:V,position:z,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:re,toasts:S.filter(Ct=>Ct.position==te.position),heights:O.filter(Ct=>Ct.position==te.position),setHeights:P,expandByDefault:o,gap:w,loadingIcon:x,expanded:I,pauseWhenPageIsHidden:_,swipeDirections:e.swipeDirections})})):null}))});const ZC=Object.freeze(Object.defineProperty({__proto__:null,Toaster:Yl,toast:Hp,useSonner:sg},Symbol.toStringTag,{value:"Module"})),og=({...e})=>{const{theme:t="system"}=Mp();return c.jsx(Yl,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var ag=Ps[" useId ".trim().toString()]||(()=>{}),ig=0;function ms(e){const[t,n]=l.useState(ag());return yt(()=>{n(r=>r??String(ig++))},[e]),t?`radix-${t}`:""}const cg=["top","right","bottom","left"],Gt=Math.min,$e=Math.max,ps=Math.round,Zr=Math.floor,lt=e=>({x:e,y:e}
vendor: 11,847 bytes, line 216
216),lg={left:"right",right:"left",bottom:"top",top:"bottom"};function Fo(e,t,n){return $e(e,Gt(t,n))}function bt(e,t){return typeof e=="function"?e(t):e}function xt(e){return e.split("-")[0]}function tr(e){return e.split("-")[1]}function Ta(e){return e==="x"?"y":"x"}function Aa(e){return e==="y"?"height":"width"}function ct(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ma(e){return Ta(ct(e))}function ug(e,t,n){n===void 0&&(n=!1);const r=tr(e),s=Ma(e),o=Aa(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=gs(a)),[a,gs(a)]}function dg(e){const t=gs(e);return[$o(e),t,$o(t)]}function $o(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ci=["left","right"],Si=["right","left"],fg=["top","bottom"],hg=["bottom","top"];function mg(e,t,n){switch(e){case"top":case"bottom":return n?t?Si:Ci:t?Ci:Si;case"left":case"right":return t?fg:hg;default:return[]}}function pg(e,t,n,r){const s=tr(e);let o=mg(xt(e),n==="start",r);return s&&(o=o.map(a=>a+"-"+s),t&&(o=o.concat(o.map($o)))),o}function gs(e){const t=xt(e);return lg[t]+e.slice(t.length)}function gg(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gl(e){return typeof e!="number"?gg(e):{top:e,right:e,bottom:e,left:e}}function vs(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function _i(e,t,n){let{reference:r,floating:s}=e;const o=ct(t),a=Ma(t),i=Aa(a),u=xt(t),d=o==="y",f=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,v=r[i]/2-s[i]/2;let m;switch(u){case"top":m={x:f,y:r.y-s.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-s.width,y:h};break;default:m={x:r.x,y:r.y}}switch(tr(t)){case"start":m[a]-=v*(n&&d?-1:1);break;case"end":m[a]+=v*(n&&d?-1:1);break}return m}async function vg(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:a,elements:i,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:v=!1,padding:m=0}=bt(t,e),y=Gl(m),g=i[v?h==="floating"?"reference":"floating":h],w=vs(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:d,rootBoundary:f,strategy:u})),x=h==="floating"?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),E=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},_=vs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:b,strategy:u}):x);return{top:(w.top-_.top+y.top)/E.y,bottom:(_.bottom-w.bottom+y.bottom)/E.y,left:(w.left-_.left+y.left)/E.x,right:(_.right-w.right+y.right)/E.x}}const yg=50,bg=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:a}=n,i=a.detectOverflow?a:{...a,detectOverflow:vg},u=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:f,y:h}=_i(d,r,u),v=r,m=0;const y={};for(let p=0;p<o.length;p++){const g=o[p];if(!g)continue;const{name:w,fn:x}=g,{x:b,y:E,data:_,reset:S}=await x({x:f,y:h,initialPlacement:r,placement:v,strategy:s,middlewareData:y,rects:d,platform:i,elements:{reference:e,floating:t}});f=b??f,h=E??h,y[w]={...y[w],..._},S&&m<yg&&(m++,typeof S=="object"&&(S.placement&&(v=S.placement),S.rects&&(d=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:f,y:h}=_i(d,v,u)),p=-1)}return{x:f,y:h,placement:v,strategy:s,middlewareData:y}},xg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:a,elements:i,middlewareData:u}=t,{element:d,padding:f=0}=bt(e,t)||{};if(d==null)return{};const h=Gl(f),v={x:n,y:r},m=Ma(s),y=Aa(m),p=await a.getDimensions(d),g=m==="y",w=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",E=o.reference[y]+o.reference[m]-v[m]-o.floating[y],_=v[m]-o.reference[m],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let R=S?S[b]:0;(!R||!await(a.isElement==null?void 0:a.isElement(S)))&&(R=i.floating[b]||o.floating[y]);const A=E/2-_/2,O=R/2-p[y]/2-1,P=Gt(h[w],O),I=Gt(h[x],O),M=P,V=R-p[y]-I,j=R/2-p[y]/2+A,U=Fo(M,j,V),F=!u.arrow&&tr(s)!=null&&j!==U&&o.reference[y]/2-(j<M?P:I)-p[y]/2<0,q=F?j<M?j-M:j-V:0;return{[m]:v[m]+q,data:{[m]:U,centerOffset:j-U-q,...F&&{alignmentOffset:q}},reset:F}}}),wg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:a,initialPlacement:i,platform:u,elements:d}=t,{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:p=!0,...g}=bt(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=xt(s),x=ct(i),b=xt(i)===i,E=await(u.isRTL==null?void 0:u.isRTL(d.floating)),_=v||(b||!p?[gs(i)]:dg(i)),S=y!=="none";!v&&S&&_.push(...pg(i,p,y,E));const R=[i,..._],A=await u.detectOverflow(t,g),O=[];let P=((r=o.flip)==null?void 0:r.overflows)||[];if(f&&O.push(A[w]),h){const j=ug(s,a,E);O.push(A[j[0]],A[j[1]])}if(P=[...P,{placement:s,overflows:O}],!O.every(j=>j<=0)){var I,M;const j=(((I=o.flip)==null?void 0:I.index)||0)+1,U=R[j];if(U&&(!(h==="alignment"?x!==ct(U):!1)||P.every(L=>ct(L.placement)===x?L.overflows[0]>0:!0)))return{data:{index:j,overflows:P},reset:{placement:U}};let F=(M=P.filter(q=>q.overflows[0]<=0).sort((q,L)=>q.overflows[1]-L.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(m){case"bestFit":{var V;const q=(V=P.filter(L=>{if(S){const T=ct(L.placement);return T===x||T==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(T=>T>0).reduce((T,W)=>T+W,0)]).sort((L,T)=>L[1]-T[1])[0])==null?void 0:V[0];q&&(F=q);break}case"initialPlacement":F=i;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function Ri(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pi(e){return cg.some(t=>e[t]>=0)}const Eg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...o}=bt(e,t);switch(s){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),i=Ri(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Pi(i)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),i=Ri(a,n.floating);return{data:{escapedOffsets:i,escaped:Pi(i)}}}default:return{}}}}},Kl=new Set(["left","top"]);async function Cg(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=xt(n),i=tr(n),u=ct(n)==="y",d=Kl.has(a)?-1:1,f=o&&u?-1:1,h=bt(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return i&&typeof y=="number"&&(m=i==="end"?y*-1:y),u?{x:m*f,y:v*d}:{x:v*d,y:m*f}}const Sg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:a,middlewareData:i}=t,u=await Cg(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:s+u.x,y:o+u.y,data:{...u,placement:a}}}}},_g=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:u={fn:w=>{let{x,y:b}=w;return{x,y:b}}},...d}=bt(e,t),f={x:n,y:r},h=await o.detectOverflow(t,d),v=ct(xt(s)),m=Ta(v);let y=f[m],p=f[v];if(a){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",b=y+h[w],E=y-h[x];y=Fo(b,y,E)}if(i){const w=v==="y"?"top":"left",x=v==="y"?"bottom":"right",b=p+h[w],E=p-h[x];p=Fo(b,p,E)}const g=u.fn({...t,[m]:y,[v]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:a,[v]:i}}}}}},Rg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:d=!0}=bt(e,t),f={x:n,y:r},h=ct(s),v=Ta(h);let m=f[v],y=f[h];const p=bt(i,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(u){const b=v==="y"?"height":"width",E=o.reference[v]-o.floating[b]+g.mainAxis,_=o.reference[v]+o.reference[b]-g.mainAxis;m<E?m=E:m>_&&(m=_)}if(d){var w,x;const b=v==="y"?"width":"height",E=Kl.has(xt(s)),_=o.reference[h]-o.floating[b]+(E&&((w=a.offset)==null?void 0:w[h])||0)+(E?0:g.crossAxis),S=o.reference[h]+o.reference[b]+(E?0:((x=a.offset)==null?void 0:x[h])||0)-(E?g.crossAxis:0);y<_?y=_:y>S&&(y=S)}return{[v]:m,[h]:y}}}},Pg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:a,elements:i}=t,{apply:u=()=>{},...d}=bt(e,t),f=await a.detectOverflow(t,d),h=xt(s),v=tr(s),m=ct(s)==="y",{width:y,height:p}=o.floating;let g,w;h==="top"||h==="bottom"?(g=h,w=v===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(w=h,g=v==="end"?"top":"bottom");const x=p-f.top-f.bottom,b=y-f.left-f.right,E=Gt(p-f[g],x),_=Gt(y-f[w],b),S=!t.middlewareData.shift;let R=E,A=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=x),S&&!v){const P=$e(f.left,0),I=$e(f.right,0),M=$e(f.top,0),V=$e(f.bottom,0);m?A=y-2*(P!==0||I!==0?P+I:$e(f.left,f.right)):R=p-2*(M!==0||V!==0?M+V:$e(f.top,f.bottom))}await u({...t,availableWidth:A,availableHeight:R});const O=await a.getDimensions(i.floating);return y!==O.width||p!==O.height?{reset:{rects:!0}}:{}}}};function Is(){return typeof window<"u"}function nr(e){return Ql(e)?(e.nodeName||"").toLowerCase():"#document"}function Ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ut(e){var t;return(t=(Ql(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ql(e){return Is()?e instanceof Node||e instanceof Ve(e).Node:!1}function et(e){return Is()?e instanceof Element||e instanceof Ve(e).Element:!1}function wt(e){return Is()?e instanceof HTMLElement||e instanceof Ve(e).HTMLElement:!1}function Ti(e){return!Is()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ve(e).ShadowRoot}function Dr(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=tt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Tg(e){return/^(table|td|th)$/.test(nr(e))}function Ds(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ag=/transform|translate|scale|rotate|perspective|filter/,Mg=/paint|layout|strict|content/,Jt=e=>!!e&&e!=="none";let lo;function ja(e){const t=et(e)?tt(e):e;return Jt(t.transform)||Jt(t.translate)||Jt(t.scale)||Jt(t.rotate)||Jt(t.perspective)||!Oa()&&(Jt(t.backdropFilter)||Jt(t.filter))||Ag.test(t.willChange||"")||Mg.test(t.contain||"")}function jg(e){let t=Kt(e);for(;wt(t)&&!Qn(t);){if(ja(t))return t;if(Ds(t))return null;t=Kt(t)}return null}function Oa(){return lo==null&&(lo=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),lo}function Qn(e){return/^(html|body|#document)$/.test(nr(e))}function tt(e){return Ve(e).getComputedStyle(e)}function ks(e){return et(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kt(e){if(nr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ti(e)&&e.host||ut(e);return Ti(t)?t.host:t}function Zl(e){const t=Kt(e);return Qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&Dr(t)?t:Zl(t)}function br(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Zl(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),a=Ve(s);if(o){const i=Vo(a);
vendor: 7,324 bytes, line 216
216return t.concat(a,a.visualViewport||[],Dr(s)?s:[],i&&n?br(i):[])}else return t.concat(s,br(s,[],n))}function Vo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xl(e){const t=tt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=wt(e),o=s?e.offsetWidth:n,a=s?e.offsetHeight:r,i=ps(n)!==o||ps(r)!==a;return i&&(n=o,r=a),{width:n,height:r,$:i}}function Na(e){return et(e)?e:e.contextElement}function Dn(e){const t=Na(e);if(!wt(t))return lt(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=Xl(t);let a=(o?ps(n.width):n.width)/r,i=(o?ps(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Og=lt(0);function Jl(e){const t=Ve(e);return!Oa()||!t.visualViewport?Og:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ng(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ve(e)?!1:t}function mn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Na(e);let a=lt(1);t&&(r?et(r)&&(a=Dn(r)):a=Dn(e));const i=Ng(o,n,r)?Jl(o):lt(0);let u=(s.left+i.x)/a.x,d=(s.top+i.y)/a.y,f=s.width/a.x,h=s.height/a.y;if(o){const v=Ve(o),m=r&&et(r)?Ve(r):r;let y=v,p=Vo(y);for(;p&&r&&m!==y;){const g=Dn(p),w=p.getBoundingClientRect(),x=tt(p),b=w.left+(p.clientLeft+parseFloat(x.paddingLeft))*g.x,E=w.top+(p.clientTop+parseFloat(x.paddingTop))*g.y;u*=g.x,d*=g.y,f*=g.x,h*=g.y,u+=b,d+=E,y=Ve(p),p=Vo(y)}}return vs({width:f,height:h,x:u,y:d})}function Ls(e,t){const n=ks(e).scrollLeft;return t?t.left+n:mn(ut(e)).left+n}function eu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ls(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function Ig(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",a=ut(r),i=t?Ds(t.floating):!1;if(r===a||i&&o)return n;let u={scrollLeft:0,scrollTop:0},d=lt(1);const f=lt(0),h=wt(r);if((h||!h&&!o)&&((nr(r)!=="body"||Dr(a))&&(u=ks(r)),h)){const m=mn(r);d=Dn(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const v=a&&!h&&!o?eu(a,u):lt(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+f.x+v.x,y:n.y*d.y-u.scrollTop*d.y+f.y+v.y}}function Dg(e){return Array.from(e.getClientRects())}function kg(e){const t=ut(e),n=ks(e),r=e.ownerDocument.body,s=$e(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=$e(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ls(e);const i=-n.scrollTop;return tt(r).direction==="rtl"&&(a+=$e(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:a,y:i}}const Ai=25;function Lg(e,t){const n=Ve(e),r=ut(e),s=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,i=0,u=0;if(s){o=s.width,a=s.height;const f=Oa();(!f||f&&t==="fixed")&&(i=s.offsetLeft,u=s.offsetTop)}const d=Ls(r);if(d<=0){const f=r.ownerDocument,h=f.body,v=getComputedStyle(h),m=f.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,y=Math.abs(r.clientWidth-h.clientWidth-m);y<=Ai&&(o-=y)}else d<=Ai&&(o+=d);return{width:o,height:a,x:i,y:u}}function Fg(e,t){const n=mn(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=wt(e)?Dn(e):lt(1),a=e.clientWidth*o.x,i=e.clientHeight*o.y,u=s*o.x,d=r*o.y;return{width:a,height:i,x:u,y:d}}function Mi(e,t,n){let r;if(t==="viewport")r=Lg(e,n);else if(t==="document")r=kg(ut(e));else if(et(t))r=Fg(t,n);else{const s=Jl(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return vs(r)}function tu(e,t){const n=Kt(e);return n===t||!et(n)||Qn(n)?!1:tt(n).position==="fixed"||tu(n,t)}function $g(e,t){const n=t.get(e);if(n)return n;let r=br(e,[],!1).filter(i=>et(i)&&nr(i)!=="body"),s=null;const o=tt(e).position==="fixed";let a=o?Kt(e):e;for(;et(a)&&!Qn(a);){const i=tt(a),u=ja(a);!u&&i.position==="fixed"&&(s=null),(o?!u&&!s:!u&&i.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Dr(a)&&!u&&tu(e,a))?r=r.filter(f=>f!==a):s=i,a=Kt(a)}return t.set(e,r),r}function Vg(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const a=[...n==="clippingAncestors"?Ds(t)?[]:$g(t,this._c):[].concat(n),r],i=Mi(t,a[0],s);let u=i.top,d=i.right,f=i.bottom,h=i.left;for(let v=1;v<a.length;v++){const m=Mi(t,a[v],s);u=$e(m.top,u),d=Gt(m.right,d),f=Gt(m.bottom,f),h=$e(m.left,h)}return{width:d-h,height:f-u,x:h,y:u}}function Ug(e){const{width:t,height:n}=Xl(e);return{width:t,height:n}}function Bg(e,t,n){const r=wt(t),s=ut(t),o=n==="fixed",a=mn(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const u=lt(0);function d(){u.x=Ls(s)}if(r||!r&&!o)if((nr(t)!=="body"||Dr(s))&&(i=ks(t)),r){const m=mn(t,!0,o,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else s&&d();o&&!r&&s&&d();const f=s&&!r&&!o?eu(s,i):lt(0),h=a.left+i.scrollLeft-u.x-f.x,v=a.top+i.scrollTop-u.y-f.y;return{x:h,y:v,width:a.width,height:a.height}}function uo(e){return tt(e).position==="static"}function ji(e,t){if(!wt(e)||tt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ut(e)===n&&(n=n.ownerDocument.body),n}function nu(e,t){const n=Ve(e);if(Ds(e))return n;if(!wt(e)){let s=Kt(e);for(;s&&!Qn(s);){if(et(s)&&!uo(s))return s;s=Kt(s)}return n}let r=ji(e,t);for(;r&&Tg(r)&&uo(r);)r=ji(r,t);return r&&Qn(r)&&uo(r)&&!ja(r)?n:r||jg(e)||n}const Wg=async function(e){const t=this.getOffsetParent||nu,n=this.getDimensions,r=await n(e.floating);return{reference:Bg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zg(e){return tt(e).direction==="rtl"}const qg={convertOffsetParentRelativeRectToViewportRelativeRect:Ig,getDocumentElement:ut,getClippingRect:Vg,getOffsetParent:nu,getElementRects:Wg,getClientRects:Dg,getDimensions:Ug,getScale:Dn,isElement:et,isRTL:zg};function ru(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hg(e,t){let n=null,r;const s=ut(e);function o(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),o();const d=e.getBoundingClientRect(),{left:f,top:h,width:v,height:m}=d;if(i||t(),!v||!m)return;const y=Zr(h),p=Zr(s.clientWidth-(f+v)),g=Zr(s.clientHeight-(h+m)),w=Zr(f),b={rootMargin:-y+"px "+-p+"px "+-g+"px "+-w+"px",threshold:$e(0,Gt(1,u))||1};let E=!0;function _(S){const R=S[0].intersectionRatio;if(R!==u){if(!E)return a();R?a(!1,R):r=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!ru(d,e.getBoundingClientRect())&&a(),E=!1}try{n=new IntersectionObserver(_,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,b)}n.observe(e)}return a(!0),o}function Yg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=Na(e),f=s||o?[...d?br(d):[],...t?br(t):[]]:[];f.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const h=d&&i?Hg(d,n):null;let v=-1,m=null;a&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),d&&!u&&m.observe(d),t&&m.observe(t));let y,p=u?mn(e):null;u&&g();function g(){const w=mn(e);p&&!ru(p,w)&&n(),p=w,y=requestAnimationFrame(g)}return n(),()=>{var w;f.forEach(x=>{s&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,u&&cancelAnimationFrame(y)}}
vendor: 4,250 bytes, line 216
216const Gg=Sg,Kg=_g,Qg=wg,Zg=Pg,Xg=Eg,Oi=xg,Jg=Rg,ev=(e,t,n)=>{const r=new Map,s={platform:qg,...n},o={...s.platform,_c:r};return bg(e,t,{...s,platform:o})};var tv=typeof document<"u",nv=function(){},cs=tv?l.useLayoutEffect:nv;function ys(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ys(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!ys(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function su(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ni(e,t){const n=su(e);return Math.round(t*n)/n}function fo(e){const t=l.useRef(e);return cs(()=>{t.current=e}),t}function rv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:a}={},transform:i=!0,whileElementsMounted:u,open:d}=e,[f,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=l.useState(r);ys(v,r)||m(r);const[y,p]=l.useState(null),[g,w]=l.useState(null),x=l.useCallback(L=>{L!==S.current&&(S.current=L,p(L))},[]),b=l.useCallback(L=>{L!==R.current&&(R.current=L,w(L))},[]),E=o||y,_=a||g,S=l.useRef(null),R=l.useRef(null),A=l.useRef(f),O=u!=null,P=fo(u),I=fo(s),M=fo(d),V=l.useCallback(()=>{if(!S.current||!R.current)return;const L={placement:t,strategy:n,middleware:v};I.current&&(L.platform=I.current),ev(S.current,R.current,L).then(T=>{const W={...T,isPositioned:M.current!==!1};j.current&&!ys(A.current,W)&&(A.current=W,Rs.flushSync(()=>{h(W)}))})},[v,t,n,I,M]);cs(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,h(L=>({...L,isPositioned:!1})))},[d]);const j=l.useRef(!1);cs(()=>(j.current=!0,()=>{j.current=!1}),[]),cs(()=>{if(E&&(S.current=E),_&&(R.current=_),E&&_){if(P.current)return P.current(E,_,V);V()}},[E,_,V,P,O]);const U=l.useMemo(()=>({reference:S,floating:R,setReference:x,setFloating:b}),[x,b]),F=l.useMemo(()=>({reference:E,floating:_}),[E,_]),q=l.useMemo(()=>{const L={position:n,left:0,top:0};if(!F.floating)return L;const T=Ni(F.floating,f.x),W=Ni(F.floating,f.y);return i?{...L,transform:"translate("+T+"px, "+W+"px)",...su(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:W}},[n,i,F.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:V,refs:U,elements:F,floatingStyles:q}),[f,V,U,F,q])}const sv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Oi({element:r.current,padding:s}).fn(n):{}:r?Oi({element:r,padding:s}).fn(n):{}}}},ov=(e,t)=>{const n=Gg(e);return{name:n.name,fn:n.fn,options:[e,t]}},av=(e,t)=>{const n=Kg(e);return{name:n.name,fn:n.fn,options:[e,t]}},iv=(e,t)=>({fn:Jg(e).fn,options:[e,t]}),cv=(e,t)=>{const n=Qg(e);return{name:n.name,fn:n.fn,options:[e,t]}},lv=(e,t)=>{const n=Zg(e);return{name:n.name,fn:n.fn,options:[e,t]}},uv=(e,t)=>{const n=Xg(e);return{name:n.name,fn:n.fn,options:[e,t]}},dv=(e,t)=>{const n=sv(e);return{name:n.name,fn:n.fn,options:[e,t]}};var fv="Arrow",ou=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return c.jsx(me.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});ou.displayName=fv;var hv=ou;function mv(e){const[t,n]=l.useState(void 0);return yt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let a,i;if("borderBoxSize"in o){const u=o.borderBoxSize,d=Array.isArray(u)?u[0]:u;a=d.inlineSize,i=d.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ia="Popper",[au,Fs]=yn(Ia),[pv,iu]=au(Ia),cu=e=>{const{__scopePopper:t,children:n}=e,[r,s]=l.useState(null);return c.jsx(pv,{scope:t,anchor:r,onAnchorChange:s,children:n})};
216cu.displayName=Ia;var lu="PopperAnchor",uu=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=iu(lu,n),a=l.useRef(null),i=Ee(t,a),u=l.useRef(null);return l.useEffect(()=>{const d=u.current;u.current=(r==null?void 0:r.current)||a.current,d!==u.current&&o.onAnchorChange(u.current)}),r?null:c.jsx(me.div,{...s,ref:i})});uu.displayName=lu;var Da="PopperContent",[gv,vv]=au(Da),du=l.forwardRef((e,t)=>{var te,Me,xe,rt,Ct,Sn;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:y,...p}=e,g=iu(Da,n),[w,x]=l.useState(null),b=Ee(t,St=>x(St)),[E,_]=l.useState(null),S=mv(E),R=(S==null?void 0:S.width)??0,A=(S==null?void 0:S.height)??0,O=r+(o!=="center"?"-"+o:""),P=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(d)?d:[d],M=I.length>0,V={padding:P,boundary:I.filter(bv),altBoundary:M},{refs:j,floatingStyles:U,placement:F,isPositioned:q,middlewareData:L}=rv({strategy:"fixed",placement:O,whileElementsMounted:(...St)=>Yg(...St,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[ov({mainAxis:s+A,alignmentAxis:a}),u&&av({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?iv():void 0,...V}),u&&cv({...V}),lv({...V,apply:({elements:St,rects:zr,availableWidth:eo,availableHeight:qr})=>{const{width:to,height:ar}=zr.reference,_n=St.floating.style;_n.setProperty("--radix-popper-available-width",`${eo}px`),_n.setProperty("--radix-popper-available-height",`${qr}px`),_n.setProperty("--radix-popper-anchor-width",`${to}px`),_n.setProperty("--radix-popper-anchor-height",`${ar}px`)}}),E&&dv({element:E,padding:i}),xv({arrowWidth:R,arrowHeight:A}),v&&uv({strategy:"referenceHidden",...V})]}),[T,W]=mu(F),re=Ue(y);yt(()=>{q&&(re==null||re())},[q,re]);const z=(te=L.arrow)==null?void 0:te.x,G=(Me=L.arrow)==null?void 0:Me.y,ee=((xe=L.arrow)==null?void 0:xe.centerOffset)!==0,[pe,ve]=l.useState();return yt(()=>{w&&ve(window.getComputedStyle(w).zIndex)},[w]),c.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:q?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(rt=L.transformOrigin)==null?void 0:rt.x,(Ct=L.transformOrigin)==null?void 0:Ct.y].join(" "),...((Sn=L.hide)==null?void 0:Sn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(gv,{scope:n,placedSide:T,onArrowChange:_,arrowX:z,arrowY:G,shouldHideArrow:ee,children:c.jsx(me.div,{"data-side":T,"data-align":W,...p,ref:b,style:{...p.style,animation:q?void 0:"none"}})})})});du.displayName=Da;var fu="PopperArrow",yv={top:"bottom",right:"left",bottom:"top",left:"right"},hu=l.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=vv(fu,r),a=yv[o.placedSide];return c.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:c.jsx(hv,{...s,ref:n,style:{...s.style,display:"block"}})})});hu.displayName=fu;function bv(e){return e!==null}var xv=e=>({name:"transformOrigin",options:e,fn(t){var g,w,x;const{placement:n,rects:r,middlewareData:s}=t,a=((g=s.arrow)==null?void 0:g.centerOffset)!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[d,f]=mu(n),h={start:"0%",center:"50%",end:"100%"}[f],v=(((w=s.arrow)==null?void 0:w.x)??0)+i/2,m=(((x=s.arrow)==null?void 0:x.y)??0)+u/2;let y="",p="";return d==="bottom"?(y=a?h:`${v}px`,p=`${-u}px`):d==="top"?(y=a?h:`${v}px`,p=`${r.floating.height+u}px`):d==="right"?(y=`${-u}px`,p=a?h:`${m}px`):d==="left"&&(y=`${r.floating.width+u}px`,p=a?h:`${m}px`),{data:{x:y,y:p}}}});function mu(e){const[t,n="center"]=e.split("-");return[t,n]}var pu=cu,gu=uu,vu=du,yu=hu,wv=Symbol("radix.slottable");function Ev(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=wv,t}var[$s]=yn("Tooltip",[Fs]),Vs=Fs(),bu="TooltipProvider",Cv=700,Uo="tooltip.open",[Sv,ka]=$s(bu),xu=e=>{const{__scopeTooltip:t,delayDuration:n=Cv,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,a=l.useRef(!0),i=l.useRef(!1),u=l.useRef(0);return l.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(Sv,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(u.current),a.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:l.useCallback(d=>{i.current=d},[]),disableHoverableContent:s,children:o})};xu.displayName=bu;var xr="Tooltip",[_v,Us]=$s(xr),wu=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:o,disableHoverableContent:a,delayDuration:i}=e,u=ka(xr,e.__scopeTooltip),d=Vs(t),[f,h]=l.useState(null),v=ms(),m=l.useRef(0),y=a??u.disableHoverableContent,p=i??u.delayDuration,g=l.useRef(!1),[w,x]=Ms({prop:r,defaultProp:s??!1,onChange:R=>{R?(u.onOpen(),document.dispatchEvent(new CustomEvent(Uo))):u.onClose(),o==null||o(R)},caller:xr}),b=l.useMemo(()=>w?g.current?"delayed-open":"instant-open":"closed",[w]),E=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,x(!0)},[x]),_=l.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),S=l.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,x(!0),m.current=0},p)},[p,x]);return l.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),c.jsx(pu,{...d,children:c.jsx(_v,{scope:t,contentId:v,open:w,stateAttribute:b,trigger:f,onTriggerChange:h,onTriggerEnter:l.useCallback(()=>{u.isOpenDelayedRef.current?S():E()},[u.isOpenDelayedRef,S,E]),onTriggerLeave:l.useCallback(()=>{y?_():(window.clearTimeout(m.current),m.current=0)},[_,y]),onOpen:E,onClose:_,disableHoverableContent:y,children:n})})};wu.displayName=xr;var Bo="TooltipTrigger",Eu=l.forwardRef((e,t)=>
vendor: 5,244 bytes, line 216
216{const{__scopeTooltip:n,...r}=e,s=Us(Bo,n),o=ka(Bo,n),a=Vs(n),i=l.useRef(null),u=Ee(t,i,s.onTriggerChange),d=l.useRef(!1),f=l.useRef(!1),h=l.useCallback(()=>d.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(gu,{asChild:!0,...a,children:c.jsx(me.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:u,onPointerMove:B(e.onPointerMove,v=>{v.pointerType!=="touch"&&!f.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:B(e.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:B(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:B(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:B(e.onBlur,s.onClose),onClick:B(e.onClick,s.onClose)})})});Eu.displayName=Bo;var Rv="TooltipPortal",[XC,Pv]=$s(Rv,{forceMount:void 0}),Zn="TooltipContent",Cu=l.forwardRef((e,t)=>{const n=Pv(Zn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,a=Us(Zn,e.__scopeTooltip);return c.jsx(bn,{present:r||a.open,children:a.disableHoverableContent?c.jsx(Su,{side:s,...o,ref:t}):c.jsx(Tv,{side:s,...o,ref:t})})}),Tv=l.forwardRef((e,t)=>{const n=Us(Zn,e.__scopeTooltip),r=ka(Zn,e.__scopeTooltip),s=l.useRef(null),o=Ee(t,s),[a,i]=l.useState(null),{trigger:u,onClose:d}=n,f=s.current,{onPointerInTransitChange:h}=r,v=l.useCallback(()=>{i(null),h(!1)},[h]),m=l.useCallback((y,p)=>{const g=y.currentTarget,w={x:y.clientX,y:y.clientY},x=Nv(w,g.getBoundingClientRect()),b=Iv(w,x),E=Dv(p.getBoundingClientRect()),_=Lv([...b,...E]);i(_),h(!0)},[h]);return l.useEffect(()=>()=>v(),[v]),l.useEffect(()=>{if(u&&f){const y=g=>m(g,f),p=g=>m(g,u);return u.addEventListener("pointerleave",y),f.addEventListener("pointerleave",p),()=>{u.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",p)}}},[u,f,m,v]),l.useEffect(()=>{if(a){const y=p=>{const g=p.target,w={x:p.clientX,y:p.clientY},x=(u==null?void 0:u.contains(g))||(f==null?void 0:f.contains(g)),b=!kv(w,a);x?v():b&&(v(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[u,f,a,d,v]),c.jsx(Su,{...e,ref:o})}),[Av,Mv]=$s(xr,{isInside:!1}),jv=Ev("TooltipContent"),Su=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...i}=e,u=Us(Zn,n),d=Vs(n),{onClose:f}=u;return l.useEffect(()=>(document.addEventListener(Uo,f),()=>document.removeEventListener(Uo,f)),[f]),l.useEffect(()=>{if(u.trigger){const h=v=>{const m=v.target;m!=null&&m.contains(u.trigger)&&f()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,f]),c.jsx(As,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:f,children:c.jsxs(vu,{"data-state":u.stateAttribute,...d,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(jv,{children:r}),c.jsx(Av,{scope:n,isInside:!0,children:c.jsx(Xh,{id:u.contentId,role:"tooltip",children:s||r})})]})})});Cu.displayName=Zn;var _u="TooltipArrow",Ov=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Vs(n);return Mv(_u,n).isInside?null:c.jsx(yu,{...s,...r,ref:t})});Ov.displayName=_u;function Nv(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Iv(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Dv(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function kv(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const i=t[o],u=t[a],d=i.x,f=i.y,h=u.x,v=u.y;f>r!=v>r&&n<(h-d)*(r-f)/(v-f)+d&&(s=!s)}return s}function Lv(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Fv(t)}function Fv(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(s.y-a.y)>=(o.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var $v=xu,Vv=wu,Uv=Eu,Ru=Cu;const Pu=$v,Ii=Vv,Di=Uv,Wo=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>
216c.jsx(Ru,{ref:r,sideOffset:t,className:oe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Wo.displayName=Ru.displayName;var kr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sn,Dt,Fn,Uc,Bv=(Uc=class extends kr{constructor(){super();$(this,sn);$(this,Dt);$(this,Fn);D(this,Fn,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Dt)||this.setEventListener(C(this,Fn))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Dt))==null||t.call(this),D(this,Dt,void 0))}setEventListener(t){var n;D(this,Fn,t),(n=C(this,Dt))==null||n.call(this),D(this,Dt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,sn)!==t&&(D(this,sn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,sn)=="boolean"?C(this,sn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},sn=new WeakMap,Dt=new WeakMap,Fn=new WeakMap,Uc),La=new Bv,Wv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},kt,ba,Bc,zv=(Bc=class{constructor(){$(this,kt,Wv);$(this,ba,!1)}setTimeoutProvider(e){D(this,kt,e)}setTimeout(e,t){return C(this,kt).setTimeout(e,t)}clearTimeout(e){C(this,kt).clearTimeout(e)}setInterval(e,t){return C(this,kt).setInterval(e,t)}clearInterval(e){C(this,kt).clearInterval(e)}},kt=new WeakMap,ba=new WeakMap,Bc),nn=new zv;function qv(e){setTimeout(e,0)}var Hv=typeof window>"u"||"Deno"in globalThis;function Ne(){}function Yv(e,t){return typeof e=="function"?e(t):e}function zo(e){return typeof e=="number"&&e>=0&&e!==1/0}function Tu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zt(e,t){return typeof e=="function"?e(t):e}function qe(e,t){return typeof e=="function"?e(t):e}function ki(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Fa(a,t.options))return!1}else if(!Er(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||s&&s!==t.state.fetchStatus||o&&!o(t))}function Li(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(wr(t.options.mutationKey)!==wr(o))return!1}else if(!Er(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Fa(e,t){return((t==null?void 0:t.queryKeyHashFn)||wr)(e)}function wr(e){return JSON.stringify(e,(t,n)=>Ho(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Er(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Er(e[n],t[n])):!1}var Gv=Object.prototype.hasOwnProperty;function Au(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Fi(e)&&Fi(t);if(!r&&!(Ho(e)&&Ho(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),i=a.length,u=r?new Array(i):{};let d=0;for(let f=0;f<i;f++){const h=r?f:a[f],v=e[h],m=t[h];if(v===m){u[h]=v,(r?f<o:Gv.call(e,h))&&d++;continue}if(v===null||m===null||typeof v!="object"||typeof m!="object"){u[h]=m;continue}const y=Au(v,m,n+1);u[h]=y,y===v&&d++}return o===i&&d===o?e:u}function qo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Fi(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ho(e){if(!$i(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!$i(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $i(e){return Object.prototype.toString.call(e)==="[object Object]"}function Kv(e){return new Promise(t=>{nn.setTimeout(t,e)})}function Yo(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Au(e,t):t}function JC(e){return e}function Qv(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Zv(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var $a=Symbol();function Mu(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===$a?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ju(e,t){return typeof e=="function"?e(...t):!!e}function Xv(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Cr=(()=>{let e=()=>Hv;return{isServer(){return e()},setIsServer(t){e=t}}})();function Go(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var Jv=qv;function ey(){let e=[],t=0,n=i=>{i()},r=i=>{i()},s=Jv;const o=i=>{t?e.push(i):s(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&s(()=>{r(()=>
216{i.forEach(u=>{n(u)})})})};return{batch:i=>{let u;t++;try{u=i()}finally{t--,t||a()}return u},batchCalls:i=>(...u)=>{o(()=>{i(...u)})},schedule:o,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{s=i}}}var Ce=ey(),$n,Lt,Vn,Wc,ty=(Wc=class extends kr{constructor(){super();$(this,$n,!0);$(this,Lt);$(this,Vn);D(this,Vn,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Lt)||this.setEventListener(C(this,Vn))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Lt))==null||t.call(this),D(this,Lt,void 0))}setEventListener(t){var n;D(this,Vn,t),(n=C(this,Lt))==null||n.call(this),D(this,Lt,t(this.setOnline.bind(this)))}setOnline(t){C(this,$n)!==t&&(D(this,$n,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,$n)}},$n=new WeakMap,Lt=new WeakMap,Vn=new WeakMap,Wc),bs=new ty;function ny(e){return Math.min(1e3*2**e,3e4)}function Ou(e){return(e??"online")==="online"?bs.isOnline():!0}var Ko=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Nu(e){let t=!1,n=0,r;const s=Go(),o=()=>s.status!=="pending",a=p=>{var g;if(!o()){const w=new Ko(p);v(w),(g=e.onCancel)==null||g.call(e,w)}},i=()=>{t=!0},u=()=>{t=!1},d=()=>La.isFocused()&&(e.networkMode==="always"||bs.isOnline())&&e.canRun(),f=()=>Ou(e.networkMode)&&e.canRun(),h=p=>{o()||(r==null||r(),s.resolve(p))},v=p=>{o()||(r==null||r(),s.reject(p))},m=()=>new Promise(p=>{var g;r=w=>{(o()||d())&&p(w)},(g=e.onPause)==null||g.call(e)}).then(()=>{var p;r=void 0,o()||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(o())return;let p;const g=n===0?e.initialPromise:void 0;try{p=g??e.fn()}catch(w){p=Promise.reject(w)}Promise.resolve(p).then(h).catch(w=>{var S;if(o())return;const x=e.retry??(Cr.isServer()?0:3),b=e.retryDelay??ny,E=typeof b=="function"?b(n,w):b,_=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,w);if(t||!_){v(w);return}n++,(S=e.onFail)==null||S.call(e,n,w),Kv(E).then(()=>d()?void 0:m()).then(()=>{t?v(w):y()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r==null||r(),s),cancelRetry:i,continueRetry:u,canStart:f,start:()=>(f()?y():m().then(y),s)}}var on,zc,Iu=(zc=class{constructor(){$(this,on)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zo(this.gcTime)&&D(this,on,nn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cr.isServer()?1/0:5*60*1e3))}clearGcTimeout(){C(this,on)!==void 0&&(nn.clearTimeout(C(this,on)),D(this,on,void 0))}},on=new WeakMap,zc),an,Un,ze,cn,we,Ar,ln,Fe,Du,pt,qc,ry=(qc=class extends Iu{constructor(t){super();$(this,Fe);$(this,an);$(this,Un);$(this,ze);$(this,cn);$(this,we);$(this,Ar);$(this,ln);D(this,ln,!1),D(this,Ar,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,cn,t.client),D(this,ze,C(this,cn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,an,Ui(this.options)),this.state=t.state??C(this,an),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,we))==null?void 0:t.promise}setOptions(t){if(this.options={...C(this,Ar),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ui(this.options);n.data!==void 0&&(this.setState(Vi(n.data,n.dataUpdatedAt)),D(this,an,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,ze).remove(this)}setData(t,n){const r=Yo(this.state.data,t,this.options);return J(this,Fe,pt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){J(this,Fe,pt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=C(this,we))==null?void 0:r.promise;return(s=C(this,we))==null||s.cancel(t),n?n.then(Ne).catch(Ne):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return C(this,an)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>qe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$a||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
216Count>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Tu(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,we))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,we))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,ze).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,we)&&(C(this,ln)||J(this,Fe,Du).call(this)?C(this,we).cancel({revert:!0}):C(this,we).cancelRetry()),this.scheduleGc()),C(this,ze).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||J(this,Fe,pt).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,f,h,v,m,y,p,g,w,x,b;if(this.state.fetchStatus!=="idle"&&((u=C(this,we))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,we))return C(this,we).continueRetry(),C(this,we).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(_=>_.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,s=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(D(this,ln,!0),r.signal)})},o=()=>{const E=Mu(this.options,n),S=(()=>{const R={client:C(this,cn),queryKey:this.queryKey,meta:this.meta};return s(R),R})();return D(this,ln,!1),this.options.persister?this.options.persister(E,S,this):E(S)},i=(()=>{const E={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,cn),state:this.state,fetchFn:o};return s(E),E})();(d=this.options.behavior)==null||d.onFetch(i,this),D(this,Un,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=i.fetchOptions)==null?void 0:f.meta))&&J(this,Fe,pt).call(this,{type:"fetch",meta:(h=i.fetchOptions)==null?void 0:h.meta}),D(this,we,Nu({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,onCancel:E=>{E instanceof Ko&&E.revert&&this.setState({...C(this,Un),fetchStatus:"idle"}),r.abort()},onFail:(E,_)=>{J(this,Fe,pt).call(this,{type:"failed",failureCount:E,error:_})},onPause:()=>{J(this,Fe,pt).call(this,{type:"pause"})},onContinue:()=>{J(this,Fe,pt).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}));try{const E=await C(this,we).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(m=(v=C(this,ze).config).onSuccess)==null||m.call(v,E,this),(p=(y=C(this,ze).config).onSettled)==null||p.call(y,E,this.state.error,this),E}catch(E){if(E instanceof Ko){if(E.silent)return C(this,we).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw J(this,Fe,pt).call(this,{type:"error",error:E}),(w=(g=C(this,ze).config).onError)==null||w.call(g,E,this),(b=(x=C(this,ze).config).onSettled)==null||b.call(x,this.state.data,E,this),E}finally{this.scheduleGc()}}},an=new WeakMap,Un=new WeakMap,ze=new WeakMap,cn=new WeakMap,we=new WeakMap,Ar=new WeakMap,ln=new WeakMap,Fe=new WeakSet,Du=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},pt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ku(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Vi(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return D(this,Un,t.manual?s:void 0),s;case"error":const o=t.error;
216return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ce.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,ze).notify({query:this,type:"updated",action:t})})},qc);function ku(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ou(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vi(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ui(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Oe,ne,Mr,Pe,un,Bn,gt,Ft,jr,Wn,zn,dn,fn,$t,qn,ae,mr,Qo,Zo,Xo,Jo,ea,ta,na,Lu,Hc,sy=(Hc=class extends kr{constructor(t,n){super();$(this,ae);$(this,Oe);$(this,ne);$(this,Mr);$(this,Pe);$(this,un);$(this,Bn);$(this,gt);$(this,Ft);$(this,jr);$(this,Wn);$(this,zn);$(this,dn);$(this,fn);$(this,$t);$(this,qn,new Set);this.options=n,D(this,Oe,t),D(this,Ft,null),D(this,gt,Go()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,ne).addObserver(this),Bi(C(this,ne),this.options)?J(this,ae,mr).call(this):this.updateResult(),J(this,ae,Jo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ra(C(this,ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ra(C(this,ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,J(this,ae,ea).call(this),J(this,ae,ta).call(this),C(this,ne).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,ne);if(this.options=C(this,Oe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qe(this.options.enabled,C(this,ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");J(this,ae,na).call(this),C(this,ne).setOptions(this.options),n._defaulted&&!qo(this.options,n)&&C(this,Oe).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,ne),observer:this});const s=this.hasListeners();s&&Wi(C(this,ne),r,this.options,n)&&J(this,ae,mr).call(this),this.updateResult(),s&&(C(this,ne)!==r||qe(this.options.enabled,C(this,ne))!==qe(n.enabled,C(this,ne))||zt(this.options.staleTime,C(this,ne))!==zt(n.staleTime,C(this,ne)))&&J(this,ae,Qo).call(this);const o=J(this,ae,Zo).call(this);s&&(C(this,ne)!==r||qe(this.options.enabled,C(this,ne))!==qe(n.enabled,C(this,ne))||o!==C(this,$t))&&J(this,ae,Xo).call(this,o)}getOptimisticResult(t){const n=C(this,Oe).getQueryCache().build(C(this,Oe),t),r=this.createResult(n,t);return ay(this,r)&&(D(this,Pe,r),D(this,Bn,this.options),D(this,un,C(this,ne).state)),r}getCurrentResult(){return C(this,Pe)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,gt).status==="pending"&&C(this,gt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){C(this,qn).add(t)}getCurrentQuery(){return C(this,ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,Oe).defaultQueryOptions(t),r=C(this,Oe).getQueryCache().build(C(this,Oe),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return J(this,ae,mr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Pe)))}createResult(t,n){var O;const r=C(this,ne),s=this.options,o=C(this,Pe),a=C(this,un),i=C(this,Bn),d=t!==r?t.state:C(this,Mr),{state:f}=t;let h={...f},v=!1,m;if(n._optimisticResults){const P=this.hasListeners(),I=!P&&Bi(t,n),M=P&&Wi(t,r,n,s);(I||M)&&(h={...h,...ku(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:g}=h;m=h.data;let w=!1;if(n.placeholderData!==void 0&&m===void 0&&g==="pending"){let P;o!=null&&o.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData)?(P=o.data,w=!0):P=typeof n.placeholderData=="function"?n.placeholderData((O=C(this,zn))==null?void 0:O.state.data,C(this,zn)):n.placeholderData,P!==void 0&&(g="success",m=Yo(o==null?void 0:o.data,P,n),v=!0)}if(n.select&&m!==void 0&&!w)if(o&&m===(a==null?void 0:a.data)&&n.select===C(this,jr))m=C(this,Wn);else try{D(this,jr,n.select),m=n.select(m),m=Yo(o==null?void 0:o.data,m,n),D(this,Wn,m),D(this,Ft,null)}catch(P){D(this,Ft,P)}C(this,Ft)&&(y=C(this,Ft),m=C(this,Wn),p=Date.now(),g="error");const x=h.fetchStatus==="fetching",b=g==="pending",E=g==="error",_=b&&x,S=m!==void 0,A={status:g,fetchStatus:h.fetchStatus,isPending:b,isSuccess:g==="success",isError:E,isInitialLoading:_,isLoading:_,data:m,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdate
216Count:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!b,isLoadingError:E&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:E&&S,isStale:Va(t,n),refetch:this.refetch,promise:C(this,gt),isEnabled:qe(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=A.data!==void 0,I=A.status==="error"&&!P,M=U=>{I?U.reject(A.error):P&&U.resolve(A.data)},V=()=>{const U=D(this,gt,A.promise=Go());M(U)},j=C(this,gt);switch(j.status){case"pending":t.queryHash===r.queryHash&&M(j);break;case"fulfilled":(I||A.data!==j.value)&&V();break;case"rejected":(!I||A.error!==j.reason)&&V();break}}return A}updateResult(){const t=C(this,Pe),n=this.createResult(C(this,ne),this.options);if(D(this,un,C(this,ne).state),D(this,Bn,this.options),C(this,un).data!==void 0&&D(this,zn,C(this,ne)),qo(n,t))return;D(this,Pe,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!C(this,qn).size)return!0;const a=new Set(o??C(this,qn));return this.options.throwOnError&&a.add("error"),Object.keys(C(this,Pe)).some(i=>{const u=i;return C(this,Pe)[u]!==t[u]&&a.has(u)})};J(this,ae,Lu).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&J(this,ae,Jo).call(this)}},Oe=new WeakMap,ne=new WeakMap,Mr=new WeakMap,Pe=new WeakMap,un=new WeakMap,Bn=new WeakMap,gt=new WeakMap,Ft=new WeakMap,jr=new WeakMap,Wn=new WeakMap,zn=new WeakMap,dn=new WeakMap,fn=new WeakMap,$t=new WeakMap,qn=new WeakMap,ae=new WeakSet,mr=function(t){J(this,ae,na).call(this);let n=C(this,ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ne)),n},Qo=function(){J(this,ae,ea).call(this);const t=zt(this.options.staleTime,C(this,ne));if(Cr.isServer()||C(this,Pe).isStale||!zo(t))return;const r=Tu(C(this,Pe).dataUpdatedAt,t)+1;D(this,dn,nn.setTimeout(()=>{C(this,Pe).isStale||this.updateResult()},r))},Zo=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,ne)):this.options.refetchInterval)??!1},Xo=function(t){J(this,ae,ta).call(this),D(this,$t,t),!(Cr.isServer()||qe(this.options.enabled,C(this,ne))===!1||!zo(C(this,$t))||C(this,$t)===0)&&D(this,fn,nn.setInterval(()=>{(this.options.refetchIntervalInBackground||La.isFocused())&&J(this,ae,mr).call(this)},C(this,$t)))},Jo=function(){J(this,ae,Qo).call(this),J(this,ae,Xo).call(this,J(this,ae,Zo).call(this))},ea=function(){C(this,dn)!==void 0&&(nn.clearTimeout(C(this,dn)),D(this,dn,void 0))},ta=function(){C(this,fn)!==void 0&&(nn.clearInterval(C(this,fn)),D(this,fn,void 0))},na=function(){const t=C(this,Oe).getQueryCache().build(C(this,Oe),this.options);if(t===C(this,ne))return;const n=C(this,ne);D(this,ne,t),D(this,Mr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Lu=function(t){Ce.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Pe))}),C(this,Oe).getQueryCache().notify({query:C(this,ne),type:"observerResultsUpdated"})})},Hc);function oy(e,t){return qe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bi(e,t){return oy(e,t)||e.state.data!==void 0&&ra(e,t,t.refetchOnMount)}function ra(e,t,n){if(qe(t.enabled,e)!==!1&&zt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Va(e,t)}return!1}function Wi(e,t,n,r){return(e!==t||qe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Va(e,n)}function Va(e,t){return qe(t.enabled,e)!==!1&&e.isStaleByTime(zt(t.staleTime,e))}function ay(e,t){return!qo(e.getCurrentResult(),t)}function zi(e){return{onFetch:(t,n)=>{var f,h,v,m,y;const r=t.options,s=(v=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:v.direction,o=((m=t.state.data)==null?void 0:m.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},u=0;const d=async()=>{let p=!1;const g=b=>{Xv(b,()=>t.signal,()=>p=!0)},w=Mu(t.options,t.fetchOptions),x=async(b,E,_)=>{if(p)return Promise.reject();if(E==null&&b.pages.length)return Promise.resolve(b);const R=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:E,direction:_?"backward":"forward",meta:t.options.meta};return g(I),I})(),A=await w(R),{maxPages:O}=t.options,P=_?Zv:Qv;return{pages:P(b.pages,A,O),pageParams:P(b.pageParams,E,O)}};if(s&&o.length){const b=s==="backward",E=b?iy:qi,_={pages:o,pageParams:a},S=E(r,_);i=await x(_,S,b)}else{const b=e??o.length;do{const E=u===0?a[0]??r.initialPageParam:qi(r,i);if(u>0&&E==null)break;
216i=await x(i,E),u++}while(u<b)}return i};t.options.persister?t.fetchFn=()=>{var p,g;return(g=(p=t.options).persister)==null?void 0:g.call(p,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function qi(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function iy(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Or,st,_e,hn,ot,jt,Yc,cy=(Yc=class extends Iu{constructor(t){super();$(this,ot);$(this,Or);$(this,st);$(this,_e);$(this,hn);D(this,Or,t.client),this.mutationId=t.mutationId,D(this,_e,t.mutationCache),D(this,st,[]),this.state=t.state||ly(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,st).includes(t)||(C(this,st).push(t),this.clearGcTimeout(),C(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,st,C(this,st).filter(n=>n!==t)),this.scheduleGc(),C(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,st).length||(this.state.status==="pending"?this.scheduleGc():C(this,_e).remove(this))}continue(){var t;return((t=C(this,hn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,i,u,d,f,h,v,m,y,p,g,w,x,b,E,_,S,R;const n=()=>{J(this,ot,jt).call(this,{type:"continue"})},r={client:C(this,Or),meta:this.options.meta,mutationKey:this.options.mutationKey};D(this,hn,Nu({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{J(this,ot,jt).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{J(this,ot,jt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,_e).canRun(this)}));const s=this.state.status==="pending",o=!C(this,hn).canStart();try{if(s)n();else{J(this,ot,jt).call(this,{type:"pending",variables:t,isPaused:o}),C(this,_e).config.onMutate&&await C(this,_e).config.onMutate(t,this,r);const O=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t,r));O!==this.state.context&&J(this,ot,jt).call(this,{type:"pending",context:O,variables:t,isPaused:o})}const A=await C(this,hn).start();return await((d=(u=C(this,_e).config).onSuccess)==null?void 0:d.call(u,A,t,this.state.context,this,r)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,A,t,this.state.context,r)),await((m=(v=C(this,_e).config).onSettled)==null?void 0:m.call(v,A,null,this.state.variables,this.state.context,this,r)),await((p=(y=this.options).onSettled)==null?void 0:p.call(y,A,null,t,this.state.context,r)),J(this,ot,jt).call(this,{type:"success",data:A}),A}catch(A){try{await((w=(g=C(this,_e).config).onError)==null?void 0:w.call(g,A,t,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((b=(x=this.options).onError)==null?void 0:b.call(x,A,t,this.state.context,r))}catch(O){Promise.reject(O)}try{await((_=(E=C(this,_e).config).onSettled)==null?void 0:_.call(E,void 0,A,this.state.variables,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((R=(S=this.options).onSettled)==null?void 0:R.call(S,void 0,A,t,this.state.context,r))}catch(O){Promise.reject(O)}throw J(this,ot,jt).call(this,{type:"error",error:A}),A}finally{C(this,_e).runNext(this)}}},Or=new WeakMap,st=new WeakMap,_e=new WeakMap,hn=new WeakMap,ot=new WeakSet,jt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPau
216sed:!1,status:"error"}}};this.state=n(this.state),Ce.batch(()=>{C(this,st).forEach(r=>{r.onMutationUpdate(t)}),C(this,_e).notify({mutation:this,type:"updated",action:t})})},Yc);function ly(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vt,Xe,Nr,Gc,uy=(Gc=class extends kr{constructor(t={}){super();$(this,vt);$(this,Xe);$(this,Nr);this.config=t,D(this,vt,new Set),D(this,Xe,new Map),D(this,Nr,0)}build(t,n,r){const s=new cy({client:t,mutationCache:this,mutationId:++Yr(this,Nr)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){C(this,vt).add(t);const n=Xr(t);if(typeof n=="string"){const r=C(this,Xe).get(n);r?r.push(t):C(this,Xe).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,vt).delete(t)){const n=Xr(t);if(typeof n=="string"){const r=C(this,Xe).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&C(this,Xe).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Xr(t);if(typeof n=="string"){const r=C(this,Xe).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Xr(t);if(typeof n=="string"){const s=(r=C(this,Xe).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ce.batch(()=>{C(this,vt).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,vt).clear(),C(this,Xe).clear()})}getAll(){return Array.from(C(this,vt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Li(n,r))}findAll(t={}){return this.getAll().filter(n=>Li(t,n))}notify(t){Ce.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ce.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ne))))}},vt=new WeakMap,Xe=new WeakMap,Nr=new WeakMap,Gc);function Xr(e){var t;return(t=e.options.scope)==null?void 0:t.id}var at,Kc,dy=(Kc=class extends kr{constructor(t={}){super();$(this,at);this.config=t,D(this,at,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Fa(s,n);let a=this.get(o);return a||(a=new ry({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){C(this,at).has(t.queryHash)||(C(this,at).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,at).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,at).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ce.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,at).get(t)}getAll(){return[...C(this,at).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ki(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ki(t,r)):n}notify(t){Ce.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ce.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},at=new WeakMap,Kc),ge,Vt,Ut,Hn,Yn,Bt,Gn,Kn,Qc,fy=(Qc=class{constructor(e={}){$(this,ge);$(this,Vt);$(this,Ut);$(this,Hn);$(this,Yn);$(this,Bt);$(this,Gn);$(this,Kn);D(this,ge,e.queryCache||new dy),D(this,Vt,e.mutationCache||new uy),D(this,Ut,e.defaultOptions||{}),D(this,Hn,new Map),D(this,Yn,new Map),D(this,Bt,0)}mount(){Yr(this,Bt)._++,C(this,Bt)===1&&(D(this,Gn,La.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ge).onFocus())})),D(this,Kn,bs.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,ge).onOnline())})))}unmount(){var e,t;Yr(this,Bt)._--,C(this,Bt)===0&&((e=C(this,Gn))==null||e.call(this),D(this,Gn,void 0),(t=C(this,Kn))==null||t.call(this),D(this,Kn,void 0))}isFetching(e){return C(this,ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Vt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,ge).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,ge).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(zt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,ge).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=C(this,ge).get(r.queryHash),o=s==null?void 0:s.state.data,a=Yv(t,o);if(a!==void 0)return C(this,ge).build(this,r).setData(a,{...n,manual:!0})}
216setQueriesData(e,t,n){return Ce.batch(()=>C(this,ge).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,ge);Ce.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,ge);return Ce.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ce.batch(()=>C(this,ge).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Ne).catch(Ne)}invalidateQueries(e,t={}){return Ce.batch(()=>(C(this,ge).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ce.batch(()=>C(this,ge).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ne)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ne)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,ge).build(this,t);return n.isStaleByTime(zt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ne).catch(Ne)}fetchInfiniteQuery(e){return e.behavior=zi(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ne).catch(Ne)}ensureInfiniteQueryData(e){return e.behavior=zi(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bs.isOnline()?C(this,Vt).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,ge)}getMutationCache(){return C(this,Vt)}getDefaultOptions(){return C(this,Ut)}setDefaultOptions(e){D(this,Ut,e)}setQueryDefaults(e,t){C(this,Hn).set(wr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,Hn).values()],n={};return t.forEach(r=>{Er(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,Yn).set(wr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,Yn).values()],n={};return t.forEach(r=>{Er(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Ut).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Fa(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===$a&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Ut).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,ge).clear(),C(this,Vt).clear()}},ge=new WeakMap,Vt=new WeakMap,Ut=new WeakMap,Hn=new WeakMap,Yn=new WeakMap,Bt=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,Qc),Fu=l.createContext(void 0),hy=e=>{const t=l.useContext(Fu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},my=({client:e,children:t})=>(l.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(Fu.Provider,{value:e,children:t})),$u=l.createContext(!1),py=()=>l.useContext($u);$u.Provider;function gy(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var vy=l.createContext(gy()),yy=()=>l.useContext(vy),by=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?ju(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},xy=e=>{l.useEffect(()=>{e.clearReset()},[e])},wy=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||ju(n,[e.error,r])),Ey=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Cy=(e,t)=>e.isLoading&&e.isFetching&&!t,Sy=(e,t)=>
216(e==null?void 0:e.suspense)&&t.isPending,Hi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _y(e,t,n){var v,m,y,p;const r=py(),s=yy(),o=hy(),a=o.defaultQueryOptions(e);(m=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||m.call(v,a);const i=o.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",Ey(a),by(a,s,i),xy(s);const u=!o.getQueryCache().get(a.queryHash),[d]=l.useState(()=>new t(o,a)),f=d.getOptimisticResult(a),h=!r&&e.subscribed!==!1;if(l.useSyncExternalStore(l.useCallback(g=>{const w=h?d.subscribe(Ce.batchCalls(g)):Ne;return d.updateResult(),w},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),l.useEffect(()=>{d.setOptions(a)},[a,d]),Sy(a,f))throw Hi(a,d,s);if(wy({result:f,errorResetBoundary:s,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw f.error;if((p=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_afterQuery)==null||p.call(y,a,f),a.experimental_prefetchInRender&&!Cr.isServer()&&Cy(f,r)){const g=u?Hi(a,d,s):i==null?void 0:i.promise;g==null||g.catch(Ne).finally(()=>{d.updateResult()})}return a.notifyOnChangeProps?f:d.trackResult(f)}function pn(e,t){return _y(e,sy)}/**
217 * @remix-run/router v1.23.2
218 *
219 * Copyright (c) Remix Software Inc.
220 *
221 * This source code is licensed under the MIT license found in the
222 * LICENSE.md file in the root directory of this source tree.
223 *
224 * @license MIT
225 */function Sr(){return Sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sr.apply(this,arguments)}var Wt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Wt||(Wt={}));const Yi="popstate";function Ry(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:a,hash:i}=r.location;return sa("",{pathname:o,search:a,hash:i},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:xs(s)}return Ty(t,n,null,e)}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ua(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Py(){return Math.random().toString(36).substr(2,8)}function Gi(e,t){return{usr:e.state,key:e.key,idx:t}}function sa(e,t,n,r){return n===void 0&&(n=null),Sr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rr(t):t,{state:n,key:t&&t.key||r||Py()})}function xs(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function rr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ty(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,a=s.history,i=Wt.Pop,u=null,d=f();d==null&&(d=0,a.replaceState(Sr({},a.state,{idx:d}),""));function f(){return(a.state||{idx:null}).idx}function h(){i=Wt.Pop;let g=f(),w=g==null?null:g-d;d=g,u&&u({action:i,location:p.location,delta:w})}function v(g,w){i=Wt.Push;let x=sa(p.location,g,w);d=f()+1;let b=Gi(x,d),E=p.createHref(x);try{a.pushState(b,"",E)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(E)}o&&u&&u({action:i,location:p.location,delta:1})}function m(g,w){i=Wt.Replace;let x=sa(p.location,g,w);d=f();let b=Gi(x,d),E=p.createHref(x);a.replaceState(b,"",E),o&&u&&u({action:i,location:p.location,delta:0})}function y(g){let w=s.location.origin!=="null"?s.location.origin:s.location.href,x=typeof g=="string"?g:xs(g);return x=x.replace(/ $/,"%20"),he(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let p={get action(){return i},get location(){return e(s,a)},listen(g){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(Yi,h),u=g,()=>{s.removeEventListener(Yi,h),u=null}},createHref(g){return t(s,g)},createURL:y,encodeLocation(g){let w=y(g);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:v,replace:m,go(g){return a.go(g)}};return p}var Ki;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ki||(Ki={}));
vendor: 2,175 bytes, line 225
225function Ay(e,t,n){return n===void 0&&(n="/"),My(e,t,n)}function My(e,t,n,r){let s=typeof t=="string"?rr(t):t,o=Xn(s.pathname||"/",n);if(o==null)return null;let a=Vu(e);jy(a);let i=null;for(let u=0;i==null&&u<a.length;++u){let d=By(o);i=Vy(a[u],d)}return i}function Vu(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,a,i)=>{let u={relativePath:i===void 0?o.path||"":i,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(he(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=qt([r,u.relativePath]),f=n.concat(u);o.children&&o.children.length>0&&(he(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Vu(o.children,t,f,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:Fy(d,o.index),routesMeta:f})};return e.forEach((o,a)=>{var i;if(o.path===""||!((i=o.path)!=null&&i.includes("?")))s(o,a);else for(let u of Uu(o.path))s(o,a,u)}),t}function Uu(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let a=Uu(r.join("/")),i=[];return i.push(...a.map(u=>u===""?o:[o,u].join("/"))),s&&i.push(...a),i.map(u=>e.startsWith("/")&&u===""?"/":u)}function jy(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:$y(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Oy=/^:[\w-]+$/,Ny=3,Iy=2,Dy=1,ky=10,Ly=-2,Qi=e=>e==="*";function Fy(e,t){let n=e.split("/"),r=n.length;return n.some(Qi)&&(r+=Ly),t&&(r+=Iy),n.filter(s=>!Qi(s)).reduce((s,o)=>s+(Oy.test(o)?Ny:o===""?Dy:ky),r)}function $y(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Vy(e,t,n){let{routesMeta:r}=e,s={},o="/",a=[];for(let i=0;i<r.length;++i){let u=r[i],d=i===r.length-1,f=o==="/"?t:t.slice(o.length)||"/",h=oa({path:u.relativePath,caseSensitive:u.caseSensitive,end:d},f),v=u.route;if(!h)return null;
vendor: 7,297 bytes, lines 225-234
225Object.assign(s,h.params),a.push({params:s,pathname:qt([o,h.pathname]),pathnameBase:Yy(qt([o,h.pathnameBase])),route:v}),h.pathnameBase!=="/"&&(o=qt([o,h.pathnameBase]))}return a}function oa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Uy(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],a=o.replace(/(.)\/+$/,"$1"),i=s.slice(1);return{params:r.reduce((d,f,h)=>{let{paramName:v,isOptional:m}=f;if(v==="*"){let p=i[h]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const y=i[h];return m&&!y?d[v]=void 0:d[v]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:a,pattern:e}}function Uy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ua(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,i,u)=>(r.push({paramName:i,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function By(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ua(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Xn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Wy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zy=e=>Wy.test(e);function qy(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?rr(e):e,o;if(n)if(zy(n))o=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),Ua(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?o=Zi(n.substring(1),"/"):o=Zi(n,t)}else o=t;return{pathname:o,search:Gy(r),hash:Ky(s)}}function Zi(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function ho(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Hy(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ba(e,t){let n=Hy(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Wa(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=rr(e):(s=Sr({},e),he(!s.pathname||!s.pathname.includes("?"),ho("?","pathname","search",s)),he(!s.pathname||!s.pathname.includes("#"),ho("#","pathname","hash",s)),he(!s.search||!s.search.includes("#"),ho("#","search","hash",s)));let o=e===""||s.pathname==="",a=o?"/":s.pathname,i;if(a==null)i=n;else{let h=t.length-1;if(!r&&a.startsWith("..")){let v=a.split("/");for(;v[0]==="..";)v.shift(),h-=1;s.pathname=v.join("/")}i=h>=0?t[h]:"/"}let u=qy(s,i),d=a&&a!=="/"&&a.endsWith("/"),f=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||f)&&(u.pathname+="/"),u}const qt=e=>e.join("/").replace(/\/\/+/g,"/"),Yy=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Gy=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ky=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Qy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Bu=["post","put","patch","delete"];new Set(Bu);const Zy=["get",...Bu];new Set(Zy);/**
226 * React Router v6.30.3
227 *
228 * Copyright (c) Remix Software Inc.
229 *
230 * This source code is licensed under the MIT license found in the
231 * LICENSE.md file in the root directory of this source tree.
232 *
233 * @license MIT
234 */function _r(){return _r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_r.apply(this,arguments)}const Bs=l.createContext(null),Wu=l.createContext(null),Et=l.createContext(null),Ws=l.createContext(null),dt=l.createContext({outlet:null,matches:[],isDataRoute:!1}),zu=l.createContext(null);function Xy(e,t){let{relative:n}=t===void 0?{}:t;sr()||he(!1);let{basename:r,navigator:s}=l.useContext(Et),{hash:o,pathname:a,search:i}=qs(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:qt([r,a])),s.createHref({pathname:u,search:i,hash:o})}function sr(){return l.useContext(Ws)!=null}function Ie(){return sr()||he(!1),l.useContext(Ws).location}function qu(e){l.useContext(Et).static||l.useLayoutEffect(e)}function ft(){let{isDataRoute:e}=l.useContext(dt);return e?h0():Jy()}function Jy(){sr()||he(!1);let e=l.useContext(Bs),{basename:t,future:n,navigator:r}=l.useContext(Et),{matches:s}=l.useContext(dt),{pathname:o}=Ie(),a=JSON.stringify(Ba(s,n.v7_relativeSplatPath)),i=l.useRef(!1);return qu(()=>{i.current=!0}),l.useCallback(function(d,f){if(f===void 0&&(f={}),!i.current)return;if(typeof d=="number"){r.go(d);return}let h=Wa(d,JSON.parse(a),o,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:qt([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,a,o,e])}const e0=l.createContext(null);function t0(e){let t=l.useContext(dt).outlet;return t&&l.createElement(e0.Provider,{value:e},t)}function zs(){let{matches:e}=l.useContext(dt),t=e[e.length-1];return t?t.params:{}}function qs(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=l.useContext(Et),{matches:s}=l.useContext(dt),{pathname:o}=Ie(),a=JSON.stringify(Ba(s,r.v7_relativeSplatPath));return l.useMemo(()=>Wa(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function n0(e,t){return r0(e,t)}function r0(e,t,n,r){sr()||he(!1);let{navigator:s}=l.useContext(Et),{matches:o}=l.useContext(dt),a=o[o.length-1],i=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let d=Ie(),f;if(t){var h;let g=typeof t=="string"?rr(t):t;u==="/"||(h=g.pathname)!=null&&h.startsWith(u)||he(!1),f=g}else f=d;let v=f.pathname||"/",m=v;if(u!=="/"){let g=u.replace(/^\//,"").split("/");m="/"+v.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=Ay(e,{pathname:m}),p=c0(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},i,g.params),pathname:qt([u,s.encodeLocation?s.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:qt([u,s.encodeLocation?s.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r);return t&&p?l.createElement(Ws.Provider,{value:{location:_r({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Wt.Pop}},p):p}function s0(){let e=f0(),t=Qy(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application 
234Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),n?l.createElement("pre",{style:s},n):null,null)}const o0=l.createElement(s0,null);class a0 extends l.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?l.createElement(dt.Provider,{value:this.props.routeContext},l.createElement(zu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function i0(e){let{routeContext:t,match:n,children:r}=e,s=l.useContext(Bs);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),l.createElement(dt.Provider,{value:t},r)}function c0(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,i=(s=n)==null?void 0:s.errors;if(i!=null){let f=a.findIndex(h=>h.route.id&&(i==null?void 0:i[h.route.id])!==void 0);f>=0||he(!1),a=a.slice(0,Math.min(a.length,f+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<a.length;f++){let h=a[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(d=f),h.route.id){let{loaderData:v,errors:m}=n,y=h.route.loader&&v[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||y){u=!0,d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((f,h,v)=>{let m,y=!1,p=null,g=null;n&&(m=i&&h.route.id?i[h.route.id]:void 0,p=h.route.errorElement||o0,u&&(d<0&&v===0?(m0("route-fallback"),y=!0,g=null):d===v&&(y=!0,g=h.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,v+1)),x=()=>{let b;return m?b=p:y?b=g:h.route.Component?b=l.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=f,l.createElement(i0,{match:h,routeContext:{outlet:f,matches:w,isDataRoute:n!=null},children:b})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?l.createElement(a0,{location:n.location,revalidation:n.revalidation,component:p,error:m,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var Hu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Hu||{}),Yu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Yu||{});function l0(e){let t=l.useContext(Bs);return t||he(!1),t}function u0(e){let t=l.useContext(Wu);return t||he(!1),t}function d0(e){let t=l.useContext(dt);return t||he(!1),t}function Gu(e){let t=d0(),n=t.matches[t.matches.length-1];return n.route.id||he(!1),n.route.id}function f0(){var e;let t=l.useContext(zu),n=u0(),r=Gu();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function h0(){let{router:e}=l0(Hu.UseNavigateStable),t=Gu(Yu.UseNavigateStable),n=l.useRef(!1);return qu(()=>{n.current=!0}),l.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,_r({fromRouteId:t},o)))},[e,t])}const Xi={};function m0(e,t,n){Xi[e]||(Xi[e]=!0)}function p0(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ht(e){let{to:t,replace:n,state:r,relative:s}=e;sr()||he(!1);let{future:o,static:a}=l.useContext(Et),{matches:i}=l.useContext(dt),{pathname:u}
234=Ie(),d=ft(),f=Wa(t,Ba(i,o.v7_relativeSplatPath),u,s==="path"),h=JSON.stringify(f);return l.useEffect(()=>d(JSON.parse(h),{replace:n,state:r,relative:s}),[d,h,s,n,r]),null}function Ku(e){return t0(e.context)}function ye(e){he(!1)}function g0(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Wt.Pop,navigator:o,static:a=!1,future:i}=e;sr()&&he(!1);let u=t.replace(/^\/*/,"/"),d=l.useMemo(()=>({basename:u,navigator:o,static:a,future:_r({v7_relativeSplatPath:!1},i)}),[u,i,o,a]);typeof r=="string"&&(r=rr(r));let{pathname:f="/",search:h="",hash:v="",state:m=null,key:y="default"}=r,p=l.useMemo(()=>{let g=Xn(f,u);return g==null?null:{location:{pathname:g,search:h,hash:v,state:m,key:y},navigationType:s}},[u,f,h,v,m,y,s]);return p==null?null:l.createElement(Et.Provider,{value:d},l.createElement(Ws.Provider,{children:n,value:p}))}function v0(e){let{children:t,location:n}=e;return n0(aa(t),n)}new Promise(()=>{});function aa(e,t){t===void 0&&(t=[]);let n=[];return l.Children.forEach(e,(r,s)=>{if(!l.isValidElement(r))return;let o=[...t,s];if(r.type===l.Fragment){n.push.apply(n,aa(r.props.children,o));return}r.type!==ye&&he(!1),!r.props.index||!r.props.children||he(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=aa(r.props.children,o)),n.push(a)}),n}/**
235 * React Router DOM v6.30.3
236 *
237 * Copyright (c) Remix Software Inc.
238 *
239 * This source code is licensed under the MIT license found in the
240 * LICENSE.md file in the root directory of this source tree.
241 *
242 * @license MIT
243 */function ws(){return ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ws.apply(this,arguments)}function Qu(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,o;for(o=0;o<r.length;o++)s=r[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function y0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function b0(e,t){return e.button===0&&(!t||t==="_self")&&!y0(e)}function ia(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function x0(e,t){let n=ia(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}const w0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],E0=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],C0="6";try{window.__reactRouterVersion=C0}catch{}const S0=l.createContext({isTransitioning:!1}),_0="startTransition",Ji=Ps[_0];function R0(e){let{basename:t,children:n,future:r,window:s}=e,o=l.useRef();o.current==null&&(o.current=Ry({window:s,v5Compat:!0}));let a=o.current,[i,u]=l.useState({action:a.action,location:a.location}),{v7_startTransition:d}=r||{},f=l.useCallback(h=>{d&&Ji?Ji(()=>u(h)):u(h)},[u,d]);return l.useLayoutEffect(()=>a.listen(f),[a,f]),l.useEffect(()=>p0(r),[r]),l.createElement(g0,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:a,future:r})}const P0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",T0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zu=l.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:o,replace:a,state:i,target:u,to:d,preventScrollReset:f,viewTransition:h}=t,v=Qu(t,w0),{basename:m}=l.useContext(Et),y,p=!1;if(typeof d=="string"&&T0.test(d)&&(y=d,P0))try{let b=new URL(window.location.href),E=d.startsWith("//")?new URL(b.protocol+d):new URL(d),_=Xn(E.pathname,m);E.origin===b.origin&&_!=null?d=_+E.search+E.hash:p=!0}catch{}let g=Xy(d,{relative:s}),w=M0(d,{replace:a,state:i,target:u,preventScrollReset:f,relative:s,viewTransition:h});function x(b){r&&r(b),b.defaultPrevented||w(b)}return l.createElement("a",ws({},v,{href:y||g,onClick:p||o?r:x,ref:n,target:u}))}),He=l.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:o="",end:a=!1,style:i,to:u,viewTransition:d,children:f}=t,h=Qu(t,E0),v=qs(u,{relative:h.relative}),m=Ie(),y=l.useContext(Wu),{navigator:p,basename:g}=l.useContext(Et),w=y!=null&&j0(v)&&d===!0,x=p.encodeLocation?p.encodeLocation(v).pathname:v.pathname,b=m.pathname,E=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;s||(b=b.toLowerCase(),E=E?E.toLowerCase():null,x=x.toLowerCase()),E&&g&&(E=Xn(E,g)||E);const _=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let S=b===x||!a&&b.startsWith(x)&&b.charAt(_)==="/",R=E!=null&&(E===x||!a&&E.startsWith(x)&&E.charAt(x.length)==="/"),A={isActive:S,isPending:R,isTransitioning:w},O=S?r:void 0,P;typeof o=="function"?P=o(A):P=[o,S?"active":null,R?"pending":null,w?"transitioning":null].filter(
243Boolean).join(" ");let I=typeof i=="function"?i(A):i;return l.createElement(Zu,ws({},h,{"aria-current":O,className:P,ref:n,style:I,to:u,viewTransition:d}),typeof f=="function"?f(A):f)});var ca;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ca||(ca={}));var ec;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ec||(ec={}));function A0(e){let t=l.useContext(Bs);return t||he(!1),t}function M0(e,t){let{target:n,replace:r,state:s,preventScrollReset:o,relative:a,viewTransition:i}=t===void 0?{}:t,u=ft(),d=Ie(),f=qs(e,{relative:a});return l.useCallback(h=>{if(b0(h,n)){h.preventDefault();let v=r!==void 0?r:xs(d)===xs(f);u(e,{replace:v,state:s,preventScrollReset:o,relative:a,viewTransition:i})}},[d,u,f,r,s,n,e,o,a,i])}function Xu(e){let t=l.useRef(ia(e)),n=l.useRef(!1),r=Ie(),s=l.useMemo(()=>x0(r.search,n.current?null:t.current),[r.search]),o=ft(),a=l.useCallback((i,u)=>{const d=ia(typeof i=="function"?i(s):i);n.current=!0,o("?"+d,u)},[o,s]);return[s,a]}function j0(e,t){t===void 0&&(t={});let n=l.useContext(S0);n==null&&he(!1);let{basename:r}=A0(ca.useViewTransitionState),s=qs(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Xn(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Xn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return oa(s.pathname,a)!=null||oa(s.pathname,o)!=null}function O0(){var g,w;if(typeof window>"u")return;const e=location.hostname,n=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(x=>e===x||e.endsWith("."+x)),r="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=n?((g=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+r+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:g[1])??((w=e.match(new RegExp("^("+r+")(?=[.-])","i")))==null?void 0:w[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const a=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),i=a?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,u=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),d=u&&i.test(u)?[u]:a?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],f="lovable-preview-auth:result",h=2e3,v=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),m=(x,b,E)=>new Promise(_=>{const S=v();let R=!1,A;const O=M=>{R||(R=!0,clearTimeout(A),window.removeEventListener("message",P),_(M))},P=M=>{if(d.indexOf(M.origin)<0)return;const V=M.data;V&&V.type===f&&V.requestId===S&&O(V)};window.addEventListener("message",P);const I={type:x,requestId:S,projectId:s,key:b};E!==void 0&&(I.value=E);for(const M of d)window.parent.postMessage(I,M);A=setTimeout(()=>O(null),h)});let y=!0;const p=250;return{getItem:async x=>{let b=await m("lovable-preview-auth:get",x);return!b&&y&&(await new Promise(E=>setTimeout(E,p)),b=await m("lovable-preview-auth:get",x)),y=!1,b&&b.ok&&typeof b.value=="string"?b.value===""?(localStorage.removeItem(x),null):b.value:localStorage.getItem(x)},setItem:(x,b)=>(localStorage.setItem(x,b),m("lovable-preview-auth:set",x,b).then(E=>{E&&E.ok&&typeof E.value=="string"&&localStorage.getItem(x)===b&&(E.value===""?localStorage.removeItem(x):localStorage.setItem(x,E.value))})),removeItem:x=>(localStorage.removeItem(x),m("lovable-preview-auth:remove",x).then(()=>{}))}}const N0="https://hnljkmxyjjzgrcuompzj.supabase.co",I0="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImhubGprbXh5amp6Z3JjdW9tcHpqIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzc5OTQwNTcsImV4cCI6MjA5MzU3MDA1N30.R1j4zqOIRqWHFO7TPSs9MosHgM53_sbRmSVAVbmTSoE",le=lh(N0,I0,{auth:{storage:O0(),persistSession:!0,autoRefreshToken:!0}}),za={super_admin:{role:"super_admin",family:"fides",label:"Super Admin FIDES",shortLabel:"Super Admin",className:"bg-destructive text-destructive-foreground"},admin_technique:{role:"admin_technique",family:"fides",label:"Admin Technique FIDES",shortLabel:"Admin Technique",className:"bg-destructive text-destructive-foreground"},superviseur:{role:"superviseur",family:"fides",label:"Superviseur FIDES",shortLabel:"Superviseur",className:"bg-accent text-accent-foreground"},gestionnaire:{role:"gestionnaire",family:"fides",label:"Gestionnaire FIDES",shortLabel:"Gestionnaire",className:"bg-primary text-primary-foreground"},manager:{role:"manager",family:"client",label:"Manager",shortLabel:"Manager",className:"bg-info text-white"},utilisateur:{role:"utilisateur",family:"client",label:"Utilisateur",shortLabel:"Utilisateur",className:"bg-muted text-muted-foreground"},utilisateur_fondation:{role:"utilisateur_fondation",family:"client",label:"Utilisateur Fondation",shortLabel:"Fondation",className:"bg-muted text-muted-foreground"}},eS=["super_admin","admin_technique","superviseur","gestionnaire"],tS=["manager","utilisateur","utilisateur_fondation"],qa=e=>Object.prototype.hasOwnProperty.call(za,e),Ha=e=>za[e].family==="fides",nS=e=>e.some(t=>qa(t)&&Ha(t)),D0={super_admin:3,admin_technique:3,superviseur:2,gestionnaire:1,manager:0,utilisateur:0,utilisateur_fondation:0},tc=e=>e.reduce((t,n)=>qa(n)?Math.max(t,D0[n]):t,0),k0=["manager","utilisateur_fondation","utilisateur"],rS=e=>{const t=k0.find(n=>e.includes(n));return t||(e.find(n=>qa(n))??null)},L0=(e,t)=>e===3?!0:e===2?t<=2:e===1?t===0:!1,sS=(e,t)=>L0(tc(e),tc(t)),F0=["super_admin","superviseur"],oS=e=>e.some(t=>F0.includes(t)),Ju=e=>e.includes("utilisateur_fondation")?["utilisateur","utilisateur_fondation"]:["utilisateur"],aS=e=>[...Ju(e),...e.includes("manager")?["manager"]:[]],iS=(e,t)=>{const n=Ju(e);return t.length>0&&t.every(r=>n.includes(r))},$0=(e,t="shortLabel")=>za[e][t],V0=(e,t="label")=>{const n=e[0];return n?$0(n,t):""},ed=l.createContext({user:null,session:null,profile:null,roles:[],loading:!0,isFides:!1,signOut:async()=>{},acceptTerms:async()=>{}}),nc="prenom, nom, fonction, email, telephone, preferences_notifications, cgu_accepted_at",U0=({children:e})=>{const[t,n]=l.useState(null),[r,s]=l.useState(null),[o,a]=l.useState(null),[i,u]=l.useState([]),[d,f]=l.useState(!0),h=l.useRef(null);l.useEffect(()=>{const{data:{subscription:g}}=le.auth.onAuthStateChange((w,x)=>{var E;s(x),n(_=>{const S=(x==null?void 0:x.user)??null;return(_==null?void 0:_.id)===((S==null?void 0:S.id)??null)?_:S});const b=((E=x==null?void 0:x.user)==null?void 0:E.id)??null;if(!b){h.current=null,a(null),u([]),f(!1);return}h.current!==b&&(h.current=b,f(!0),setTimeout(async()=>{try{const[_,S]=await Promise.all([le.from("profiles").select(nc).eq("user_id",b).single(),le.from("user_roles").select("role").eq("user_id",b)]);_.data&&a(_.data),S.data&&u(S.data.map(R=>R.role))}catch(_){console.error("Erreur de chargement du profil et des rôles:",_)}finally{f(!1)}},0))});return le.auth.getSession().then(({data:{session:w}})=>{w||f(!1)}).catch(w=>{console.error("Erreur de récupération de la session:",w),f(!1)}),()=>g.unsubscribe()},[]);const v=i.some(Ha),m=l.useCallback(async()=>{h.current=null,n(null),s(null),a(null),u([]),le.auth.signOut().catch(()=>{})},[]),y=l.useCallback(async()=>{const g=t==null?void 0:t.id;if(!g)throw new Error("Session expirée. Veuillez vous reconnecter.");const{error:w}=await le.from("profiles").update({cgu_accepted_at:new Date().toISOString()}).eq("user_id",g);if(w)throw w;const{data:x}=await le.from("profiles").select(nc).eq("user_id",g).single();if(!x)throw new Error("Profil introuvable. Veuillez contacter le support.");a(x)},[t==null?void 0:t.id]),p=l.useMemo(()=>({user:t,session:r,profile:o,roles:i,loading:d,isFides:v,signOut:m,acceptTerms:y}),[t,r,o,i,d,v,m,y]);return c.jsx(ed.Provider,{value:p,children:e})},td=e=>["user-context",e??null];
243async function nd(){const{data:e}=await le.rpc("get_user_context");return e??null}const De=()=>l.useContext(ed),kn="ecole",la="fides.current-espace",B0=["ecole","syndic","association","entreprise"],rd=l.createContext({currentEspace:kn,setCurrentEspace:()=>{},currentTenantId:null,espaceLoading:!1,isEntityEspacePending:!1,setEntityEspacePending:()=>{},isViewingFondation:!1,setViewingFondation:()=>{}});function W0(){if(typeof window>"u")return kn;const e=window.sessionStorage.getItem(la);return e&&B0.includes(e)?e:kn}const z0=({children:e})=>{const{user:t,isFides:n,loading:r}=De(),[s,o]=l.useState(W0),[a,i]=l.useState(!1),[u,d]=l.useState(!1),f=(t==null?void 0:t.id)??null,h=l.useCallback(_=>{o(_),typeof window<"u"&&window.sessionStorage.setItem(la,_)},[]),v=l.useRef(null);l.useEffect(()=>{f&&(v.current!==null&&v.current!==f&&(typeof window<"u"&&window.sessionStorage.removeItem(la),o(kn)),v.current=f)},[f]);const m=!r&&!!t&&!n,{data:y,isLoading:p}=pn({queryKey:td(f),queryFn:nd,enabled:m,staleTime:5*60*1e3}),g=!r&&!n?(y==null?void 0:y.espace)??kn:s,w=r||m&&p,{data:x}=pn({queryKey:["tenants","by-code",g],queryFn:async()=>{const{data:_,error:S}=await le.from("tenants").select("id").eq("code",g).maybeSingle();return S?null:(_==null?void 0:_.id)??null},enabled:!w&&!m,staleTime:1/0,gcTime:1/0}),b=m?(y==null?void 0:y.tenant_id)??null:x??null,E=l.useMemo(()=>({currentEspace:g,setCurrentEspace:h,currentTenantId:b,espaceLoading:w,isEntityEspacePending:a,setEntityEspacePending:i,isViewingFondation:u,setViewingFondation:d}),[g,h,b,w,a,u]);return c.jsx(rd.Provider,{value:E,children:e})},Hs=()=>l.useContext(rd);async function q0(e){const{data:t}=await le.from("ecole_utilisateurs").select("entity_id").eq("user_id",e);return(t??[]).map(n=>n.entity_id).filter(Boolean)}async function H0(e){const t=await q0(e);if(t.length===0)return[];const{data:n}=await le.from("ecoles").select("id, nom, code_postal, ville, is_fondation, espace").in("id",t);return(n??[]).map(r=>({id:r.id,nom:r.nom,code_postal:r.code_postal??null,ville:r.ville??null,is_fondation:!!r.is_fondation,espace:r.espace??null})).sort((r,s)=>r.nom.localeCompare(s.nom,"fr"))}const Y0=e=>["user-entities",e??null];function G0(e){return pn({queryKey:Y0(e),queryFn:()=>H0(e),enabled:!!e,staleTime:5*60*1e3})}const K0=["syndic","association","entreprise","ecole"],mo={voyages:e=>/voyage/i.test(e)},ls="fides.selected-entity-id",sd=l.createContext({entities:[],selectedEntity:null,selectedEntityId:null,isSelectionActive:!1,needsSelection:!1,loading:!1,entitiesReadError:!1,selectEntity:()=>{}});function Q0(){return typeof window>"u"?null:window.sessionStorage.getItem(ls)}const Z0=({children:e})=>{const{user:t,isFides:n,loading:r}=De(),{currentEspace:s,espaceLoading:o}=Hs(),a=(t==null?void 0:t.id)??null,i=!r&&!!t&&!n,[u,d]=l.useState(Q0),{data:f,isPending:h,isError:v}=G0(i?a??void 0:void 0),m=l.useMemo(()=>f??[],[f]);l.useEffect(()=>{r||a||(typeof window<"u"&&window.sessionStorage.removeItem(ls),d(null))},[r,a]);const y=l.useRef(null);l.useEffect(()=>{a&&(y.current!==null&&y.current!==a&&(typeof window<"u"&&window.sessionStorage.removeItem(ls),d(null)),y.current=a)},[a]);const p=l.useCallback(S=>{typeof window<"u"&&window.sessionStorage.setItem(ls,S),d(S)},[]),g=r||o||i&&h,w=i&&s==="ecole"&&m.length>=2,x=u?m.find(S=>S.id===u)??null:null,b=l.useMemo(()=>K0.map(R=>m.find(A=>A.espace===R)).find(Boolean)??m[0]??null,[m]),E=w?x:b,_=l.useMemo(()=>({entities:m,selectedEntity:E,selectedEntityId:(E==null?void 0:E.id)??null,isSelectionActive:w,needsSelection:!g&&w&&!E,loading:g,entitiesReadError:v,selectEntity:p}),[m,E,w,g,v,p]);return c.jsx(sd.Provider,{value:_,children:e})},X0="modulepreload",J0=function(e){return"/"+e},rc={},k=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),i=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=Promise.allSettled(n.map(u=>{if(u=J0(u),u in rc)return;rc[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const h=document.createElement("link");
243if(h.rel=d?"stylesheet":X0,d||(h.as="script"),h.crossOrigin="",h.href=u,i&&h.setAttribute("nonce",i),document.head.appendChild(h),d)return new Promise((v,m)=>{h.addEventListener("load",v),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a}return s.then(a=>{for(const i of a||[])i.status==="rejected"&&o(i.reason);return t().catch(o)})};var eb=Symbol.for("react.lazy"),Es=Ps[" use ".trim().toString()];function tb(e){return typeof e=="object"&&e!==null&&"then"in e}function od(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===eb&&"_payload"in e&&tb(e._payload)}function nb(e){const t=sb(e),n=l.forwardRef((r,s)=>{let{children:o,...a}=r;od(o)&&typeof Es=="function"&&(o=Es(o._payload));const i=l.Children.toArray(o),u=i.find(ab);if(u){const d=u.props.children,f=i.map(h=>h===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:h);return c.jsx(t,{...a,ref:s,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return c.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var rb=nb("Slot");function sb(e){const t=l.forwardRef((n,r)=>{let{children:s,...o}=n;if(od(s)&&typeof Es=="function"&&(s=Es(s._payload)),l.isValidElement(s)){const a=cb(s),i=ib(o,s.props);return s.type!==l.Fragment&&(i.ref=r?vn(r,a):a),l.cloneElement(s,i)}return l.Children.count(s)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ob=Symbol("radix.slottable");function ab(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ob}function ib(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...i)=>{const u=o(...i);return s(...i),u}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function cb(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const lb=Rl("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",modulePrimary:"bg-primary text-primary-foreground hover:bg-primary/90"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ad=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const a=r?rb:"button";return c.jsx(a,{className:oe(lb({variant:t,size:n,className:e})),ref:o,...s})});ad.displayName="Button";const Ya=({message:e,returnPath:t})=>{const n=ft();return c.jsxs("div",{className:"flex min-h-[60vh] flex-col items-center justify-center gap-4 p-8 text-center",children:[c.jsx(Um,{className:"h-12 w-12 text-destructive"}),c.jsx("h2",{className:"text-xl font-bold text-foreground",children:"Accès refusé"}),c.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:e??"Vous n'avez pas les droits nécessaires pour accéder à cette ressource."}),c.jsx("p",{className:"text-xs text-muted-foreground",children:"HTTP 403 — Forbidden"}),c.jsx(ad,{variant:"outline",onClick:()=>n(t??-1),children:"Retour"})]})},Jr=e=>e==="Voyage - Annulation"||e==="Voyage - Assistance"?"Voyage":e;function sc(e,t,n=[]){if(!t||t.length===0)return e;const r=new Set(t.filter(a=>a.is_active).map(a=>Jr(a.type_contrat))),s=new Set(t.filter(a=>!a.is_active).map(a=>Jr(a.type_contrat))),o=new Set(n.map(Jr));return e.filter(a=>{const i=Jr(a);return r.has(i)||o.has(i)&&!s.has(i)})}function nt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function gn(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const id=6048e5,ub=864e5,cd=6e4,ld=36e5;let db={};function Ys(){return db}function Rr(e,t){var i,u,d,f;
vendor: 4,294 bytes, line 243
243const n=Ys(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,s=nt(e),o=s.getDay(),a=(o<r?7:0)+o-r;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function Cs(e){return Rr(e,{weekStartsOn:1})}function ud(e){const t=nt(e),n=t.getFullYear(),r=gn(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=Cs(r),o=gn(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const a=Cs(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function oc(e){const t=nt(e);return t.setHours(0,0,0,0),t}function ac(e){const t=nt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fb(e,t){const n=oc(e),r=oc(t),s=+n-ac(n),o=+r-ac(r);return Math.round((s-o)/ub)}function hb(e){const t=ud(e),n=gn(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Cs(n)}function mb(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pb(e){if(!mb(e)&&typeof e!="number")return!1;const t=nt(e);return!isNaN(Number(t))}function gb(e){const t=nt(e),n=gn(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const vb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yb=(e,t,n)=>{let r;const s=vb[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function po(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const bb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},wb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Eb={date:po({formats:bb,defaultWidth:"full"}),time:po({formats:xb,defaultWidth:"full"}),dateTime:po({formats:wb,defaultWidth:"full"})},Cb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Sb=(e,t,n,r)=>Cb[e];function ur(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):a;s=e.formattingValues[i]||e.formattingValues[a]}else{const a=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[i]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const _b={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Rb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Pb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Tb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
243ay","Saturday"]},Ab={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Mb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jb=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Ob={ordinalNumber:jb,era:ur({values:_b,defaultWidth:"wide"}),quarter:ur({values:Rb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ur({values:Pb,defaultWidth:"wide"}),day:ur({values:Tb,defaultWidth:"wide"}),dayPeriod:ur({values:Ab,defaultWidth:"wide",formattingValues:Mb,defaultFormattingWidth:"wide"})};function dr(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const a=o[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?Ib(i,h=>h.test(a)):Nb(i,h=>h.test(a));let d;d=e.valueCallback?e.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=t.slice(a.length);return{value:d,rest:f}}}function Nb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ib(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Db(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const i=t.slice(s.length);return{value:a,rest:i}}}const kb=/^(\d+)(th|st|nd|rd)?/i,Lb=/\d+/i,Fb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},$b={any:[/^b/i,/^(a|c)/i]},Vb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ub={any:[/1/i,/2/i,/3/i,/4/i]},Bb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Wb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},zb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},qb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Hb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Yb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Gb={ordinalNumber:Db({matchPattern:kb,parsePattern:Lb,valueCallback:e=>parseInt(e,10)}),era:dr({matchPatterns:Fb,defaultMatchWidth:"wide",parsePatterns:$b,defaultParseWidth:"any"}),quarter:dr({matchPatterns:Vb,defaultMatchWidth:"wide",parsePatterns:Ub,defaultParseWidth:"any",valueCallback:e=>e+1}),month:dr({matchPatterns:Bb,defaultMatchWidth:"wide",parsePatterns:Wb,defaultParseWidth:"any"}),day:dr({matchPatterns:zb,defaultMatchWidth:"wide",parsePatterns:qb,defaultParseWidth:"any"}),dayPeriod:dr({matchPatterns:Hb,defaultMatchWidth:"any",parsePatterns:Yb,defaultParseWidth:"any"})},Kb={code:"en-US",formatDistance:yb,formatLong:Eb,formatRelative:Sb,localize:Ob,match:Gb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Qb(e){const t=nt(e);return fb(t,gb(t))+1}function Zb(e){const t=nt(e),n=+Cs(t)-+hb(t);return Math.round(n/id)+1}function dd(e,t){var f,h,v,m;const n=nt(e),r=n.getFullYear(),s=Ys(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(v=s.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,a=gn(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const i=Rr(a,t),u=gn(e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const d=Rr(u,t);return n.getTime()>=i.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Xb(e,t){var i,u,d,f;
vendor: 5,932 bytes, line 243
243const n=Ys(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,s=dd(e,t),o=gn(e,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),Rr(o,t)}function Jb(e,t){const n=nt(e),r=+Rr(n,t)-+Xb(n,t);return Math.round(r/id)+1}function ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Mt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ie(n+1,2)},d(e,t){return ie(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ie(e.getHours()%12||12,t.length)},H(e,t){return ie(e.getHours(),t.length)},m(e,t){return ie(e.getMinutes(),t.length)},s(e,t){return ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return ie(s,t.length)}},An={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ic={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Mt.y(e,t)},Y:function(e,t,n,r){const s=dd(e,r),o=s>0?s:1-s;if(t==="YY"){const a=o%100;return ie(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):ie(o,t.length)},R:function(e,t){const n=ud(e);return ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return ie(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ie(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ie(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Mt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ie(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=Jb(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):ie(s,t.length)},I:function(e,t,n){const r=Zb(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Mt.d(e,t)},D:function(e,t,n){const r=Qb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ie(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ie(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ie(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return ie(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=An.noon:r===0?s=An.midnight:s=r/12>
vendor: 4,560 bytes, line 243
243=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=An.evening:r>=12?s=An.afternoon:r>=4?s=An.morning:s=An.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Mt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Mt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Mt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Mt.s(e,t)},S:function(e,t){return Mt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return lc(r);case"XXXX":case"XX":return tn(r);case"XXXXX":case"XXX":default:return tn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return lc(r);case"xxxx":case"xx":return tn(r);case"xxxxx":case"xxx":default:return tn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+cc(r,":");case"OOOO":default:return"GMT"+tn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+cc(r,":");case"zzzz":default:return"GMT"+tn(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return ie(r,t.length)},T:function(e,t,n){const r=e.getTime();return ie(r,t.length)}};function cc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+t+ie(o,2)}function lc(e,t){return e%60===0?(e>0?"-":"+")+ie(Math.abs(e)/60,2):tn(e,t)}function tn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=ie(Math.trunc(r/60),2),o=ie(r%60,2);return n+s+t+o}const uc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},fd=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ex=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return uc(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",uc(r,t)).replace("{{time}}",fd(s,t))},tx={p:fd,P:ex},nx=/^D+$/,rx=/^Y+$/,sx=["D","DD","YY","YYYY"];function ox(e){return nx.test(e)}function ax(e){return rx.test(e)}function ix(e,t,n){const r=cx(e,t,n);if(console.warn(r),sx.includes(e))throw new RangeError(r)}function cx(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const lx=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ux=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dx=/^'([^]*?)'?$/,fx=/''/g,hx=/[a-zA-Z]/;function Ga(e,t,n){var f,h,v,m,y,p,g,w;const r=Ys(),s=(n==null?void 0:n.locale)??r.locale??Kb,o=(n==null?void 0:n.firstWeekContainsDate)??((h=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(v=r.locale)==null?void 0:v.options)==null?void 0:m.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((p=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:p.weekStartsOn)??r.weekStartsOn??((w=(g=r.locale)==null?void 0:g.options)==null?void 0:w.weekStartsOn)??0,i=nt(e);if(!pb(i))throw new RangeError("Invalid time value");let u=t.match(ux).map(x=>{const b=x[0];if(b==="p"||b==="P"){const E=tx[b];return E(x,s.formatLong)}return x}).join("").match(lx).map(x=>
243{if(x==="''")return{isToken:!1,value:"'"};const b=x[0];if(b==="'")return{isToken:!1,value:mx(x)};if(ic[b])return{isToken:!0,value:x};if(b.match(hx))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:x}});s.localize.preprocessor&&(u=s.localize.preprocessor(i,u));const d={firstWeekContainsDate:o,weekStartsOn:a,locale:s};return u.map(x=>{if(!x.isToken)return x.value;const b=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&ax(b)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&ox(b))&&ix(b,t,String(e));const E=ic[b[0]];return E(i,b,s.localize,d)}).join("")}function mx(e){const t=e.match(dx);return t?t[1].replace(fx,"'"):e}function px(e,t){const r=bx(e);let s;if(r.date){const u=xx(r.date,2);s=wx(u.restDateString,u.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let a=0,i;if(r.time&&(a=Ex(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(i=Cx(r.timezone),isNaN(i))return new Date(NaN)}else{const u=new Date(o+a),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(o+a+i)}const es={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},gx=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,vx=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yx=/^([+-])(\d{2})(?::?(\d{2}))?$/;function bx(e){const t={},n=e.split(es.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],es.timeZoneDelimiter.test(t.date)&&(t.date=e.split(es.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const s=es.timezone.exec(r);s?(t.time=r.replace(s[1],""),t.timezone=s[1]):t.time=r}return t}function xx(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const s=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function wx(e,t){if(t===null)return new Date(NaN);const n=e.match(gx);if(!n)return new Date(NaN);const r=!!n[4],s=fr(n[1]),o=fr(n[2])-1,a=fr(n[3]),i=fr(n[4]),u=fr(n[5])-1;if(r)return Tx(t,i,u)?Sx(t,i,u):new Date(NaN);{const d=new Date(0);return!Rx(t,o,a)||!Px(t,s)?new Date(NaN):(d.setUTCFullYear(t,o,Math.max(s,a)),d)}}function fr(e){return e?parseInt(e):1}function Ex(e){const t=e.match(vx);if(!t)return NaN;const n=go(t[1]),r=go(t[2]),s=go(t[3]);return Ax(n,r,s)?n*ld+r*cd+s*1e3:NaN}function go(e){return e&&parseFloat(e.replace(",","."))||0}function Cx(e){if(e==="Z")return 0;const t=e.match(yx);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return Mx(r,s)?n*(r*ld+s*cd):NaN}function Sx(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const s=r.getUTCDay()||7,o=(t-1)*7+n+1-s;return r.setUTCDate(r.getUTCDate()+o),r}const _x=[31,null,31,30,31,30,31,31,30,31,30,31];function hd(e){return e%400===0||e%4===0&&e%100!==0}function Rx(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(_x[t]||(hd(e)?29:28))}function Px(e,t){return t>=1&&t<=(hd(e)?366:365)}function Tx(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Ax(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Mx(e,t){return t>=0&&t<=59}function cS(e){return Ga(e,"yyyy-MM-dd")}function lS(){return Ga(new Date,"yyyy-MM-dd")}function jx(e){const t=typeof e=="string"?px(e):e;return Ga(t,"dd/MM/yyyy")}function uS(e){const t=/^(\d{2})\/(\d{2})\/(\d{4})$/.exec(e.trim());if(!t)return null;const[,n,r,s]=t,o=Number(n),a=Number(r),i=Number(s),u=new Date(i,a-1,o);return u.getFullYear()===i&&u.getMonth()===a-1&&u.getDate()===o?u:null}function Qt(e=new Date){const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${n}-${r}`}function Lr(e,t=Qt()){return e.date_fin==null||e.date_fin===""?!1:e.date_fin.slice(0,10)<t}function Gs(e,t=Qt()){return e.date_effet==null||e.date_effet===""?!1:e.date_effet.slice(0,10)>t}function Ox(e,t,n=Qt()){return Lr(e,n)?!1:t.isFides||!Gs(e,n)}function md(e){return e.length===0?null:e.reduce((t,n)=>{const r=(t.date_effet??"").slice(0,10);return(n.date_effet??"").slice(0,10)>r?n:t})}
243function dS(e,t=Qt()){return md(e.filter(n=>!Lr(n,t)&&!Gs(n,t)))}function fS(e,t){const n=Qt(),r=[],s=[],o=[];for(const a of e){if(Gs(a,n)){t.isFides&&s.push(a);continue}Lr(a,n)?o.push(a):r.push(a)}return{actifs:r,aVenir:s,archives:o}}function Nx(e,t){const n=t.slice(0,10);return!(e.date_effet&&n<e.date_effet.slice(0,10)||e.date_fin&&n>e.date_fin.slice(0,10))}function Ix(e,{typeContrat:t,dateSurvenance:n,contratSelectionneId:r},s=Qt()){if(!n)return{statut:"aucun"};const o=e.filter(i=>i.type_contrat===t&&Nx(i,n)),a=o.find(i=>i.id===r);if(a)return{statut:"unique",contrat:a};if(o.length===0)return{statut:"aucun"};if(o.length===1)return{statut:"unique",contrat:o[0]};if(o.some(i=>Lr(i,s))){const i=md(o);if(i)return{statut:"unique",contrat:i}}return{statut:"choix"}}function hS(e,t,n){if(e.statut==="unique")return e.contrat.id;if(e.statut==="choix")return"";const r=t.filter(s=>s.type_contrat===n);return r.length===1?r[0].id:""}function mS(e,t,n){if(e.statut!=="aucun"||!n)return null;const r=`Aucun contrat enregistré ne couvre la date de survenance du ${jx(n.slice(0,10))}`;return t==="contrat_actif"?`${r} : le contrat actuel a été retenu.`:t==="aucun_contrat"?`${r}. Sélectionnez le contrat à rattacher à cette déclaration.`:`${r}. Vérifiez le contrat sélectionné.`}function Dx(e,t,n=Qt()){const r=e.filter(s=>s.type_contrat===t&&Lr(s,n));return r.length===0?null:r.reduce((s,o)=>(o.date_fin??"").slice(0,10)>(s.date_fin??"").slice(0,10)?o:s)}function dc(e,t){return!t||e.some(n=>n.id===t.id)?[...e]:[...e,t]}function pS(e,t,n,r=Qt()){const s=n.typeContrat?Ix(e,n,r):{statut:"aucun"},o=s.statut==="unique"?s.contrat:null,a=dc(t,o),i=n.typeContrat?Dx(e,n.typeContrat,r):null,u=dc(a,i);return{resolution:s,datedContrat:o,selectableContrats:a,fidesContratOptions:u}}const je=["ecole","syndic","association","entreprise"],kx={sinistre:"sinistres",accident:"accidents",voyage:"voyages"},Le={auth:"/auth",forgotPassword:"/mot-de-passe-oublie",resetPassword:"/reinitialiser-mot-de-passe",apiDocs:"/api-docs",cgu:"/cgu",politiqueConfidentialite:"/politique-confidentialite",mentionsLegales:"/mentions-legales",notFound:"*"},Se={dashboard:"/",documents:"/documents",account:"/mon-compte",foundation:"/ma-fondation",guidedDeclaration:"/declaration-guidee"},ue={analytics:"/analytique",absences:"/absences",facturationVoyages:"/facturation-voyages",bulkDocumentsEcoles:"/ecoles-documents-groupes",bulkDocumentsAssociations:"/associations-documents-groupes",permissions:"/permissions",modulesConfig:"/modules-config",decisionTree:"/pas-a-pas",formBuilder:"/formulaires",emailTemplates:"/mails-automatises",migration:"/migration",signature:"/signature",bandeauAccueil:"/bandeau-accueil"},Je={contacts:"/contacts",schoolCertificate:"/attestation-scolaire",certificateHub:"/attestation",multiRiskCertificate:"/attestation-multirisques",liabilityCertificate:"/attestation-rc",subscriptions:"/souscriptions",mesSinistres:"/mes-sinistres"},K={school:{list:"/ecoles",create:"/ecoles/nouveau",read:"/ecoles/:id",edit:"/ecoles/:id/modifier"},syndic:{list:"/syndic",create:"/syndic/nouveau",read:"/syndic/:id",edit:"/syndic/:id/modifier"},association:{list:"/associations",create:"/associations/nouveau",read:"/associations/:id",edit:"/associations/:id/modifier"},company:{list:"/entreprises",create:"/entreprises/nouveau",read:"/entreprises/:id",edit:"/entreprises/:id/modifier"},immeuble:{list:"/immeubles",create:"/immeubles/nouveau",read:"/immeubles/:id",edit:"/immeubles/:id/modifier"},user:{list:"/utilisateurs",create:"/utilisateurs/nouveau",read:"/utilisateurs/:id"}},be={sinistre:{list:"/admin/dossiers/sinistres",create:"/admin/dossiers/sinistres/ajout",claimCreate:"/admin/dossiers/sinistres/dossiers/ajout",read:"/admin/dossiers/sinistres/lire/:id",edit:"/admin/dossiers/sinistres/editer/:id"},accident:{list:"/admin/dossiers/accidents",create:"/admin/dossiers/accidents/ajout",claimCreate:"/admin/dossiers/accidents/dossiers/ajout",read:"/admin/dossiers/accidents/lire/:id",edit:"/admin/dossiers/accidents/editer/:id"},voyage:{list:"/admin/dossiers/voyages",create:"/admin/dossiers/voyages/ajout",claimCreate:"/admin/dossiers/voyages/dossiers/ajout",read:"/admin/dossiers/voyages/lire/:id",edit:"/admin/dossiers/voyages/editer/:id"}},Re={list:"/sinistres/:contractSlug",create:"/sinistres/:contractSlug/ajout",claimCreate:"/sinistres/:contractSlug/dossiers/ajout",read:"/sinistres/:contractSlug/lire/:id",edit:"/sinistres/:contractSlug/editer/:id"},pd=[{slug:"multirisques",contractTypes:["Multirisques"],module:"sinistre",allowedTenants:je},{slug:"individuelle-accident",contractTypes:["Individuelle Accident","Scolaire"],module:"accident",allowedTenants:je},{slug:"responsabilite-civile",contractTypes:["Responsabilité Civile"],module:"sinistre",allowedTenants:je},{slug:"protection-juridique",contractTypes:["Protection Juridique"],module:"sinistre",allowedTenants:je},{slug:"responsabilite-des-dirigeants",contractTypes:["Responsabilité des Dirigeants"],module:"sinistre",allowedTenants:je},{slug:"voyage",contractTypes:["Voyage","Voyage - Annulation"],module:"voyage",allowedTenants:je},{slug:"voyage-assistance",contractTypes:["Voyage - Assistance"],module:"voyage",allowedTenants:je},{slug:"pc-tablettes",contractTypes:["PC / Tablettes"],module:"sinistre",allowedTenants:je},{slug:"auto",contractTypes:["Auto"],module:"sinistre",allowedTenants:je},{slug:"flotte-auto",contractTypes:["Flotte Auto"],module:"sinistre",allowedTenants:je},{slug:"auto-mission",contractTypes:["Auto-mission"],module:"sinistre",allowedTenants:je},{slug:"protection-numerique-cyber",contractTypes:["Protection Numérique & Cyber"],module:"sinistre",allowedTenants:je},{slug:"dommages-ouvrages",contractTypes:["Dommages Ouvrages"],module:"sinistre",allowedTenants:je},{slug:"frais-de-scolarite",contractTypes:["Frais de Scolarité"],module:"sinistre",allowedTenants:je}],Ks=new Map(pd.map(e=>[e.slug,e])),gd=new Map;for(const e of pd)for(const t of e.contractTypes)gd.set(t,e);const fc=[{name:"public.auth",path:Le.auth,surface:"public",requiresAuthentication:!1},{name:"public.forgotPassword",path:Le.forgotPassword,surface:"public",requiresAuthentication:!1},{name:"public.resetPassword",path:Le.resetPassword,surface:"public",requiresAuthentication:!1},{name:"public.apiDocs",path:Le.apiDocs,surface:"public",requiresAuthentication:!1},{name:"shared.dashboard",path:Se.dashboard,surface:"shared",requiresAuthentication:!0,tenantBinding:"current-espace"},...Object.entries(K).flatMap(([e,t])=>[{name:`entity.${e}.list`,path:t.list,surface:"shared",requiresAuthentication:!0,tenantBinding:"current-espace"},{name:`entity.${e}.create`,path:t.create,surface:"shared",requiresAuthentication:!0,tenantBinding:"current-espace"},{name:`entity.${e}.read`,path:t.read,surface:"shared",requiresAuthentication:!0,tenantBinding:"current-espace"},...t.edit?[{name:`entity.${e}.edit`,path:t.edit,surface:"shared",requiresAuthentication:!0,tenantBinding:"current-espace"}]:[]]),{name:"shared.documents",path:Se.documents,surface:"shared",requiresAuthentication:!0}
243,{name:"shared.account",path:Se.account,surface:"shared",requiresAuthentication:!0},{name:"shared.foundation",path:Se.foundation,surface:"shared",requiresAuthentication:!0},{name:"shared.guidedDeclaration",path:Se.guidedDeclaration,surface:"shared",requiresAuthentication:!0,tenantBinding:"current-espace"},...Object.entries(be).flatMap(([e,t])=>[{name:`admin.claims.${e}.list`,path:t.list,surface:"admin",requiresAuthentication:!0,tenantBinding:"current-espace"},{name:`admin.claims.${e}.create`,path:t.create,surface:"admin",requiresAuthentication:!0,tenantBinding:"current-espace"},{name:`admin.claims.${e}.claimCreate`,path:t.claimCreate,surface:"admin",requiresAuthentication:!0,tenantBinding:"current-espace"},{name:`admin.claims.${e}.read`,path:t.read,surface:"admin",requiresAuthentication:!0,tenantBinding:"current-espace"},{name:`admin.claims.${e}.edit`,path:t.edit,surface:"admin",requiresAuthentication:!0,tenantBinding:"current-espace"}]),...Object.entries(ue).map(([e,t])=>({name:`admin.${e}`,path:t,surface:"admin",requiresAuthentication:!0})),{name:"client.contract.list",path:Re.list,surface:"client",requiresAuthentication:!0,tenantBinding:"contract-allowlist"},{name:"client.contract.create",path:Re.create,surface:"client",requiresAuthentication:!0,tenantBinding:"contract-allowlist"},{name:"client.contract.claimCreate",path:Re.claimCreate,surface:"client",requiresAuthentication:!0,tenantBinding:"contract-allowlist"},{name:"client.contract.read",path:Re.read,surface:"client",requiresAuthentication:!0,tenantBinding:"contract-allowlist"},{name:"client.contract.edit",path:Re.edit,surface:"client",requiresAuthentication:!0,tenantBinding:"contract-allowlist"},...Object.entries(Je).map(([e,t])=>({name:`client.${e}`,path:t,surface:"client",requiresAuthentication:!0}))];function xn(e,t){return Object.entries(t).reduce((n,[r,s])=>n.replace(`:${r}`,encodeURIComponent(s)),e)}function pr(e,t){const n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${n.replace(/:[^/]+/g,"[^/]+")}$`).test(t)}function Lx(e){return fc.find(t=>t.path===e)??fc.find(t=>t.path.includes(":")&&pr(t.path,e))??null}function Fr(e){return e&&Ks.has(e)?e:null}function vd(e){var t;return((t=gd.get(e))==null?void 0:t.slug)??null}function ua(e){var t;return((t=Ks.get(e))==null?void 0:t.contractTypes)??[]}function yd(e){var t;return((t=Ks.get(e))==null?void 0:t.module)??null}function Fx(e,t){var r;const n=(r=Ks.get(e))==null?void 0:r.allowedTenants;return(n==null?void 0:n.includes(t))??!1}function it(e){return be[e].list}function vo(e){return be[e].create}function gS(e){return be[e].claimCreate}function bd(e,t){return xn(be[e].read,{id:t})}function $r(e){return Se[e]}function hc(e){return Je[e]}function $x(e){return K[e].list}function vS(e){return K[e].create}function xd(e){return xn(Re.list,{contractSlug:e})}function wd(e){return xn(Re.create,{contractSlug:e})}function Vx(e){return xn(Re.claimCreate,{contractSlug:e})}function Ux(e,t){return xn(Re.read,{contractSlug:e,id:t})}function wn(e,t){return xn(K[e].read,{id:t})}function yS(e,t){const n=K[e].edit;if(!n)throw new Error(`No edit route for entity ${e}`);return xn(n,{id:t})}function Bx(){return Ed(K.school.list,{fondation:!0})}function Wx(e,t){const n=vd(e);return n?Ux(n,t):null}function bS(e,t,n,r){return Wx(e,t)}function Ed(e,t){const n=new URLSearchParams;for(const[s,o]of Object.entries(t))o!=null&&n.set(s,String(o));const r=n.toString();return r?`${e}?${r}`:e}function xS(e,t,n){return Ed(e,{[t]:n})}function wS(e){var t;return((t=Lx(e))==null?void 0:t.surface)??null}function ES(e,t="ecole"){for(const o of Object.keys(kx)){const a=be[o];if(e===a.list)return{surface:"admin",module:o,action:"list"};if(e===a.create)return{surface:"admin",module:o,action:"create"};if(e===a.claimCreate)return{surface:"admin",module:o,action:"claimCreate"};if(pr(a.read,e))return{surface:"admin",module:o,action:"read"};if(pr(a.edit,e))return{surface:"admin",module:o,action:"edit"}}const n=e.match(/^\/sinistres\/([^/]+)/),r=Fr(n==null?void 0:n[1]);if(!r)return null;const s=yd(r);return s?e===xd(r)?{surface:"client",slug:r,module:s,action:"list",tenant:t}:e===wd(r)?{surface:"client",slug:r,module:s,action:"create",tenant:t}:e===Vx(r)?{surface:"client",slug:r,module:s,action:"claimCreate",tenant:t}:pr(Re.read,e)?{surface:"client",slug:r,module:s,action:"read",tenant:t}:pr(Re.edit,e)?{surface:"client",slug:r,module:s,action:"edit",tenant:t}:null:null}
243const mc=["Multirisques","Individuelle Accident","Responsabilité Civile","Protection Juridique","Responsabilité des Dirigeants","Voyage - Annulation","Voyage - Assistance","PC / Tablettes","Auto","Flotte Auto","Auto-mission","Protection Numérique & Cyber","Dommages Ouvrages","Frais de Scolarité"],pc=e=>[...e].sort((t,n)=>{const r=mc.indexOf(t),s=mc.indexOf(n);return(r===-1?999:r)-(s===-1?999:s)}),CS={sinistre:{key:"sinistre",label:"Sinistre",labelPlural:"Sinistres",declareLabel:"Déclarer un sinistre",listPath:it("sinistre"),declarePath:vo("sinistre"),detailPath:it("sinistre"),permissionModule:"sinistres",typesContrat:["Auto","Flotte Auto","Auto-mission","Dommages Ouvrages","Frais de Scolarité","Multirisques","PC / Tablettes","Protection Juridique","Protection Numérique & Cyber","Responsabilité Civile","Responsabilité des Dirigeants"]},accident:{key:"accident",label:"Accident",labelPlural:"Accidents",declareLabel:"Déclarer un accident",listPath:it("accident"),declarePath:vo("accident"),detailPath:it("accident"),permissionModule:"accidents",typesContrat:["Individuelle Accident"]},voyage:{key:"voyage",label:"Voyage - Annulation",labelPlural:"Annulations Voyages",declareLabel:"Déclarer une annulation",listPath:it("voyage"),declarePath:vo("voyage"),detailPath:it("voyage"),permissionModule:"voyages",typesContrat:["Voyage - Annulation","Voyage - Assistance"]}},SS={Multirisques:["Bris de glace","Bris de machine","Catastrophe naturelle","Choc de Véhicule","Défense Recours","Dégâts des eaux","Événement climatique","Incendie","Responsabilité civile","Perte de produits en matériel frigorifique","Vol & Vandalisme","Autre"],"Responsabilité Civile":["Portée par l'assureur du tiers lésé","Portée par le tiers lésé"],Auto:["Accident","Vol","Bris de glace","Incendie","Catastrophe naturelle","Autre"],"Flotte Auto":["Accident","Vol","Bris de glace","Incendie","Catastrophe naturelle","Autre"],"Auto-mission":["Accident","Vol","Bris de glace","Incendie","Autre"],"Bris de machine":["Bris de machine","Panne électrique","Autre"],"Informatique / Multimédia":["Vol","Casse","Dégâts des eaux","Autre"],"PC / Tablettes":["Bris de machine","Vol - Perte"],"Protection Numérique & Cyber":["Cyberattaque","Perte de données","Fraude en ligne","Autre"],"Dommages Ouvrages":["Malfaçon","Fissures","Infiltrations","Effondrement","Autre"],"Frais de Scolarité":["Maladie","Accident","Autre"],"Individuelle Accident":["Accident corporel","Accident scolaire","Accident sportif","Autre"],Scolaire:["Accident scolaire","Accident sportif","Autre"],"Voyage - Annulation":["Annulation","Interruption","Autre"],"Voyage - Assistance":["Déclaration","Autre"],Accident:["Accident corporel","Accident matériel","Autre"],"Dommages aux biens":["Dégâts des eaux","Incendie","Vol","Bris de glace","Autre"],"Protection Juridique":["Litige contractuel","Litige employeur","Autre"],"Responsabilité des Dirigeants":["Mise en cause personnelle","Faute de gestion","Autre"]},or=()=>l.useContext(sd),zx=()=>{const{entities:e,selectedEntityId:t,isSelectionActive:n,loading:r}=or();return{entityIds:l.useMemo(()=>n?t?[t]:[]:e.map(o=>o.id),[e,t,n]),loading:r}};function Cd(e){const{entityIds:t,loading:n}=zx();return pn({queryKey:["client-contract-types",e,t],queryFn:async()=>{const r={types:[],everHeldTypes:[],hasAnyContract:!1},s=t;if(s.length===0)return r;const{data:o,error:a}=await le.from("fondation_ecoles").select("parent_entity_id").in("child_entity_id",s);if(a)throw a;const i=[...new Set((o??[]).map(S=>S.parent_entity_id).filter(S=>typeof S=="string"))],[u,d,f]=await Promise.all([le.from("contrats").select("type_contrat, date_effet, date_fin").in("entity_id",s),i.length>0?le.from("contrats").select("type_contrat, date_effet, date_fin").eq("is_shared",!0).in("entity_id",i):Promise.resolve({data:[],error:null}),le.from("user_module_access").select("type_contrat, is_active").eq("user_id",e)]);if(u.error)throw u.error;if(d.error)throw d.error;if(f.error)throw f.error;const h=u.data??[],v=d.data??[],m=h.length>0||v.length>0,y=S=>Ox(S,{isFides:!1}),p=v.filter(y).map(S=>S.type_contrat).filter(S=>!!S),g=h.filter(y).map(S=>S.type_contrat).filter(S=>!!S),w=pc([...new Set([...g,...p])]),x=S=>!Gs(S),b=v.filter(x).map(S=>S.type_contrat).filter(S=>!!S),E=h.filter(x).map(S=>S.type_contrat).filter(S=>!!S),_=pc([...new Set([...E,...b])]);return{types:sc(w,f.data,p),everHeldTypes:sc(_,f.data,b),hasAnyContract:m}},enabled:!!e&&!n})}const Vr=()=>c.jsx("div",{role:"status","aria-label":"Chargement",className:"flex h-full min-h-[40vh] items-center justify-center",children:c.jsx(jm,{className:"h-6 w-6 animate-spin text-muted-foreground","aria-hidden":!0})}
243),qx={can_read:!1,can_create:!1,can_update:!1,can_delete:!1},Sd=()=>{const{roles:e,loading:t}=De(),n=l.useMemo(()=>[...e].sort(),[e]),{data:r={},isLoading:s}=pn({queryKey:["role_permissions",n],enabled:!t&&e.length>0,queryFn:async()=>{const{data:u}=await le.from("role_permissions").select("role, module, can_read, can_create, can_update, can_delete").in("role",e),d={};for(const f of u??[]){const h=d[f.module]||{...qx};h.can_read=h.can_read||f.can_read,h.can_create=h.can_create||f.can_create,h.can_update=h.can_update||f.can_update,h.can_delete=h.can_delete||f.can_delete,d[f.module]=h}return d}}),o=t?!0:e.length===0?!1:s,a=l.useCallback((u,d="can_read")=>{var f;return((f=r[u])==null?void 0:f[d])??!1},[r]),i=l.useCallback(u=>{var d;return((d=r[u])==null?void 0:d.can_read)??!1},[r]);return{permissions:r,can:a,canAccessModule:i,loading:o}},_d="/assets/logo-fides-BMERu8p5.png",rn={ecole:{key:"ecole",label:"École",labelPlural:"Écoles",icon:Ns,basePath:"/ecoles",entityLabel:"école",entityLabelPlural:"école(s)",newLabel:"Nouvelle école",editLabel:"Modifier l'école",searchPlaceholder:"Rechercher par nom, ville, CP…",emptyLabel:"Aucune école trouvée",hiddenModules:[],myEntitiesLabel:"Mes écoles",clientCanExportCsv:!0,showContractDocumentOnModuleCard:!1,userTypeKey:"ecole",gestionGroupKey:"ecoles"},syndic:{key:"syndic",label:"Syndic",labelPlural:"Syndics",icon:Yt,basePath:"/syndic",entityLabel:"syndic",entityLabelPlural:"syndic(s)",newLabel:"Nouveau syndic",editLabel:"Modifier le syndic",searchPlaceholder:"Rechercher par nom, ville, CP…",emptyLabel:"Aucun syndic trouvé",hiddenModules:["voyages"],myEntitiesLabel:"Mes immeubles",clientCanExportCsv:!1,showContractDocumentOnModuleCard:!1,userTypeKey:"syndics",gestionGroupKey:"syndics"},association:{key:"association",label:"Association",labelPlural:"Associations",icon:Il,basePath:"/associations",entityLabel:"association",entityLabelPlural:"association(s)",newLabel:"Nouvelle association",editLabel:"Modifier l'association",searchPlaceholder:"Rechercher par nom, ville, CP…",emptyLabel:"Aucune association trouvée",hiddenModules:[],myEntitiesLabel:"Mes associations",clientCanExportCsv:!0,showContractDocumentOnModuleCard:!0,userTypeKey:"scouts",gestionGroupKey:"scouts"},entreprise:{key:"entreprise",label:"Entreprise",labelPlural:"Entreprises",icon:Yt,basePath:"/entreprises",entityLabel:"entreprise",entityLabelPlural:"entreprise(s)",newLabel:"Nouvelle entreprise",editLabel:"Modifier l'entreprise",searchPlaceholder:"Rechercher par nom, ville, CP…",emptyLabel:"Aucune entreprise trouvée",hiddenModules:["voyages","accidents"],myEntitiesLabel:"Mes entreprises",clientCanExportCsv:!0,showContractDocumentOnModuleCard:!1,userTypeKey:"entreprise",gestionGroupKey:"entreprises"}},Hx={ecole:"school",syndic:"syndic",association:"association",entreprise:"company"},_S=Object.values(rn),RS={ecole:["ecole"],syndic:["syndic","immeuble"],association:["association"],entreprise:["entreprise"]},PS=e=>e==="syndic"||e==="immeuble",Rd=e=>e==="immeuble"?"syndic":e??"";function Pd(e){if(e==="immeuble")return"immeuble";const t=Rd(e);return Hx[t]??"school"}const Yx=["Multirisques","Protection Juridique","Auto","Dommages Ouvrages"],Gx=["Auto","Dommages Ouvrages"];function TS(e){const t=new Set(e);return Yx.filter(n=>!t.has(n)||Gx.includes(n))}function AS(e){switch(Rd(e)){case"syndic":return"Immeuble";case"entreprise":return"Entreprise";case"association":return"Association";default:return"Ecole / Fondation"}}const ts={ecole:"ÉCOLES",entreprise:"ENTREPRISES",syndic:"SYNDICS",association:"SCOUTS"},gc=[{key:"ecole",label:ts.ecole,icon:Ns,basePath:K.school.list,module:"ecoles",subItems:[{label:"Fondation",path:Bx()},{label:rn.ecole.labelPlural,path:K.school.list},{label:"Dossiers",path:it("sinistre")},{label:"Documents groupés",path:ue.bulkDocumentsEcoles},{label:"Facturation",path:ue.facturationVoyages,visibleForRoles:["super_admin"]}]},{key:"entreprise",label:ts.entreprise,icon:Tl,basePath:K.company.list,module:"entreprises",subItems:[{label:rn.entreprise.labelPlural,path:K.company.list},{label:"Dossiers",path:it("sinistre")}]},{key:"syndic",label:ts.syndic,icon:Yt,basePath:K.syndic.list,module:"syndic",subItems:[{label:rn.syndic.labelPlural,path:K.syndic.list},{label:"Immeubles",path:K.immeuble.list},{label:"Dossiers",path:it("sinistre")}]},{key:"association",label:ts.association,icon:Il,basePath:K.association.list,module:"associations",subItems:[{label:rn.association.labelPlural,path:K.association.list},{label:"Dossiers",path:it("sinistre")},{label:"Documents groupés",path:ue.bulkDocumentsAssociations}]}],Kx=[{to:K.user.list,icon:Dl,label:"Utilisateurs",module:"utilisateurs",fidesOnly:!0},{to:ue.analytics,icon:wm,label:"Analytique",visibleForRoles:["super_admin","superviseur"]}
243,{to:ue.absences,icon:xm,label:"Absences",visibleForRoles:["super_admin","superviseur","gestionnaire"]},{to:ue.bandeauAccueil,icon:Nm,label:"Bandeau d'accueil",visibleForRoles:["super_admin"]}],Qx=[{to:ue.modulesConfig,icon:Vm,label:"Modules",visibleForRoles:["super_admin","admin_technique"]},{to:ue.emailTemplates,icon:Om,label:"Mails automatisés",visibleForRoles:["super_admin","admin_technique"]},{to:ue.permissions,icon:Bm,label:"Permissions",visibleForRoles:["admin_technique"]},{to:ue.decisionTree,icon:Pm,label:"Pas-à-pas",visibleForRoles:["admin_technique"]},{to:ue.formBuilder,icon:Wm,label:"Formulaires",visibleForRoles:["admin_technique"]},{to:ue.migration,icon:Sm,label:"Migration",visibleForRoles:["admin_technique"]},{to:ue.signature,icon:km,label:"Signature",visibleForRoles:["admin_technique"]}];function yo(e,t,n,r=!1){const[s,o=""]=n.split("?");if(!(e===s||e.startsWith(`${s}/`)))return!1;const i=new URLSearchParams(o).get("fondation")==="true",u=new URLSearchParams(t).get("fondation")==="true"||r;return i===u}function Zx(e,t,n){return e.length===0||e.length>1&&n?null:e.includes(t)?t:e[0]}function Xx(e,t,n){return e.length>0&&t!==n}const Jx=()=>{const[e,t]=l.useState(!1),{roles:n,signOut:r}=De(),{currentEspace:s,setCurrentEspace:o,isEntityEspacePending:a,isViewingFondation:i}=Hs(),{canAccessModule:u}=Sd(),d=Ie(),f=ft(),h=n.includes("super_admin")||n.includes("admin_technique"),v=n.includes("superviseur"),m=n.some(Ha),y=n.includes("gestionnaire")&&!h&&!v,p=l.useCallback(P=>P.filter(I=>I.visibleForRoles?I.visibleForRoles.some(M=>n.includes(M)):I.adminOnly?h:I.fidesOnly?m:I.module?u(I.module):!0),[n,h,m,u]),g=l.useMemo(()=>p(Kx),[p]),w=l.useMemo(()=>p(Qx),[p]),x=l.useMemo(()=>gc.filter(P=>P.subItems.some(I=>yo(d.pathname,d.search,I.path,i))||yo(d.pathname,d.search,P.basePath,i)).map(P=>P.key),[d.pathname,d.search,i]),b=Zx(x,s,a),[E,_]=l.useState(b),[S,R]=l.useState(b);Xx(x,S,b)&&(R(b),_(b));const A=P=>{if(E===P.key){_(null);return}_(P.key),o(P.key),f(P.basePath)},O=P=>{const I=d.pathname.startsWith(P.to),M=c.jsxs(He,{to:P.to,className:oe("flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors",I?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),children:[c.jsx(P.icon,{className:"h-4.5 w-4.5 shrink-0"}),!e&&c.jsx("span",{children:P.label})]},P.to);return e?c.jsxs(Ii,{children:[c.jsx(Di,{asChild:!0,children:M}),c.jsx(Wo,{side:"right",sideOffset:8,children:P.label})]},P.to):M};return c.jsx(Pu,{delayDuration:200,children:c.jsxs("aside",{className:oe("flex h-screen flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-all duration-300",e?"w-16":"w-60"),children:[c.jsxs(He,{to:Se.dashboard,className:"flex items-center gap-3 border-b border-primary px-4 py-4",children:[c.jsx("img",{src:_d,alt:"Fides",className:"h-8 shrink-0 object-contain brightness-0 invert"}),!e&&c.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-sidebar-foreground/70",children:"Extranet"})]}),c.jsxs("nav",{className:"sidebar-scrollbar flex-1 overflow-y-auto border-none px-2 py-4",children:[gc.map(P=>{if(!u(P.module))return null;const I=E===P.key,M=b===P.key,V=P.icon;return e?c.jsxs(Ii,{children:[c.jsx(Di,{asChild:!0,children:c.jsx("button",{onClick:()=>A(P),className:oe("flex w-full items-center justify-center rounded-md px-3 py-2.5 transition-colors",M?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),children:c.jsx(V,{className:"h-4.5 w-4.5 shrink-0"})})}),c.jsx(Wo,{side:"right",sideOffset:8,children:P.label})]},P.key):c.jsxs("div",{className:"mb-1",children:[c.jsxs("button",{onClick:()=>A(P),className:oe("flex w-full items-center justify-between rounded-md border-0 px-3 py-2.5 text-sm font-bold uppercase tracking-wide transition-colors",M?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground"),children:[c.jsx("span",{children:P.label}),c.jsx(Ml,{className:oe("h-3.5 w-3.5 transition-transform",I?"rotate-0":"-rotate-90")})]}),I&&c.jsx("div",{className:"ml-3 mt-1 space-y-0.5 border-l border-0 border-primary-foreground pl-3",children:P.subItems.filter(j=>!j.visibleForRoles||j.visibleForRoles.some(U=>n.includes(U))).map(j=>{const U=yo(d.pathname,d.search,j.path,i);return c.jsx(He,{to:j.path,className:oe("block rounded-md px-2 py-1.5 text-sm transition-colors",U?"font-medium text-sidebar-accent-foreground":"text-sidebar-foreground
243/60 hover:text-sidebar-foreground"),children:j.label},j.label)})})]},P.key)}),g.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mx-2 my-3 border-t border-primary bg-primary-foreground"}),!e&&c.jsx("span",{className:"mb-1 block px-3 py-[12px] text-sm font-semibold uppercase tracking-wider text-sidebar-foreground/40",children:"Administration"}),c.jsx("div",{className:"space-y-1",children:g.map(O)})]}),!y&&w.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"mx-2 my-3 border-t border-primary bg-primary-foreground"}),!e&&c.jsx("span",{className:"mb-1 block px-3 py-[12px] text-sm font-semibold uppercase tracking-wider text-sidebar-foreground/40",children:"Configuration"}),c.jsx("div",{className:"space-y-1",children:w.map(O)})]})]}),c.jsx("div",{className:"border-t border-0 border-[var(--color-sidebar-navy)] px-3 py-3",children:c.jsxs("button",{onClick:r,className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-xs text-sidebar-foreground/60 transition-colors hover:text-sidebar-foreground",children:[c.jsx(Ol,{className:"h-4 w-4"}),!e&&"Déconnexion"]})}),c.jsx("button",{onClick:()=>t(!e),className:"flex items-center justify-center border-0 border-none border-sidebar-border py-2 text-sidebar-foreground/50 transition-colors hover:text-sidebar-foreground",children:e?c.jsx(jl,{className:"h-4 w-4"}):c.jsx(Em,{className:"h-4 w-4"})})]})})},Td=l.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:oe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Td.displayName="Input";function vc(e){return e.replace(/\s+/g," ").trim()}const ew="￿";function tw(e){const t=e.toUpperCase(),n=`${t}${ew}`;return[`and(reference.gte.${t},reference.lt.${n})`,`and(reference_assureur.gte.${t},reference_assureur.lt.${n})`].join(",")}function nw({isDebouncePending:e,isFetching:t,isError:n,hasResults:r}){return r?"results":e?"pending":t?"loading":n?"error":"empty"}function rw(e,t){return!e||e.normalized!==t?[]:e.results}const sw=/\/storage\/v1\/object\/(?:public|sign|authenticated)\/documents\/(.+)$/;function ow(e){const t=e==null?void 0:e.trim();if(!t)return null;if(!/^https?:\/\//i.test(t))return t;const n=sw.exec(t.split("?")[0]);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}const MS={contrat:{label:"Contrat",color:"bg-primary/10 text-primary"},attestation:{label:"Attestation",color:"bg-green-100 text-green-700"},facture:{label:"Facture",color:"bg-amber-100 text-amber-700"},courrier:{label:"Courrier",color:"bg-blue-100 text-blue-700"},autre:{label:"Autre",color:"bg-muted text-muted-foreground"}},jS="autre",aw=10*1024*1024,iw="10 Mo",OS={mimes:["application/pdf"],extensions:/\.pdf$/i,formatsLabel:"PDF uniquement"},NS={mimes:["application/pdf","image/jpeg","message/rfc822"],extensions:/\.(pdf|jpg|jpeg|eml)$/i,formatsLabel:"JPG, PDF ou Email (.eml) uniquement"},IS={mimes:["application/pdf"],extensions:/\.(pdf|xlsx?|csv)$/i,formatsLabel:"PDF ou Excel uniquement"};function DS(e,t){return t.mimes.includes(e.type)||t.extensions.test(e.name)?e.size>aw?{title:"Fichier trop volumineux",description:`Max ${iw}`}:null:{title:"Format non supporté",description:t.formatsLabel}}const cw=e=>`${(e==null?void 0:e.prenom)||""} ${(e==null?void 0:e.nom)||""}`.trim(),yc=60;function lw(e,t){const n=t.toLowerCase(),r=[e.reference,e.reference_assureur].filter(s=>typeof s=="string"&&s.length>0).map(s=>s.toLowerCase());return r.some(s=>s===n)?0:r.some(s=>s.startsWith(n))?1:2}function uw(e){return e.module==="accident"?"accident":e.module==="voyage"?"voyage":"sinistre"}function bc(e){return e.module==="accident"?"Accident":e.module==="voyage"?"Annulation voyage":"Sinistre"}function dw(e,t){const n=new Set,r=[];for(const s of e.flat())n.has(s.id)||(n.add(s.id),r.push({id:s.id,label:s.reference||s.reference_assureur||s.type_sinistre||"Sans référence",sublabel:s.reference_assureur?`${bc(s)} — réf. assureur ${s.reference_assureur}`:bc(s),category:"dossier",path:bd(uw(s),s.id),rank:lw(s,t)}));return r.sort((s,o)=>(s.rank??2)-(o.rank??2))}function fw(e){return e.map(t=>{var n;return{id:t.id,label:t.nom,sublabel:`${((n=rn[t.espace])==null?void 0:n.label)??t.espace} — ${t.ville??"—"}`,category:"entite",path:wn(Pd(t.espace),t.id)}})}function hw(e){return e.map(t=>({id:t.id,label:t.nom,sublabel:t.categorie??void 0,category:"document",path:$r("documents"),storagePath:ow(t.file_url)??void 0}))}function mw(e){return e.map(t=>({id:t.id,label:t.content.length>yc?`${t.content.slice(0,yc)}…`:t.content,sublabel:"Message",category:"discussion",path:bd("sinistre",t.sinistre_id)}))}function pw(e){var n;const t=[];for(const r of e){if(!r.entity_id)continue;const s=r.ecoles,o=Array.isArray(s)?(n=s[0])==null?void 0:n.espace:s==null?void 0:s.espace;
243t.push({id:r.id,label:r.numero||"Sans numéro",sublabel:r.type_contrat??void 0,category:"contrat",path:wn(Pd(o),r.entity_id)})}return t}function gw(e,t){return e.map(n=>({id:n.id,label:cw(n)||"Sans nom",sublabel:`${t[n.user_id]||"—"} — ${n.telephone||"—"}`,category:"contact",path:wn("user",n.user_id)}))}const vw=/^[a-z][a-z0-9_.]{2,80}$/;function yw(e){if(!e)return;const t={};for(const[n,r]of Object.entries(e))/^[a-z][a-z0-9_]{0,40}$/i.test(n)&&(typeof r=="number"&&Number.isFinite(r)?t[n]=r:typeof r=="string"?t[n]=r.length>240?`${r.slice(0,237)}...`:r:typeof r=="boolean"&&(t[n]=r?"true":"false"));return Object.keys(t).length?t:void 0}async function Ad(e,t,n){var r;if(vw.test(t))try{const{data:s}=await le.auth.getSession();if(!((r=s.session)!=null&&r.access_token))return;const{error:o}=await le.functions.invoke("app-log-ingest",{body:{level:e,event:t,fields:yw(n)},headers:{Authorization:`Bearer ${s.session.access_token}`}});if(o)return}catch{}}function bw(e,t){Ad("error",e,t)}const xw=1500,da=800;function fa(e,t,n,r=xw){!Number.isFinite(t)||t<r||Ad("warn",e,{...n,duration_ms:Math.round(t)})}function ww(){try{return window.self!==window.top}catch{return!0}}function Ew(){ww()&&nl({title:"Téléchargement lancé",description:"Vous utilisez l'application dans un aperçu intégré : le navigateur peut bloquer le téléchargement. Si rien ne se passe, ouvrez l'application dans un onglet dédié et réessayez."})}const xc="application/octet-stream";function wc(e,t){Ew();const n=e.type===xc?e:new Blob([e],{type:xc}),r=URL.createObjectURL(n),s=document.createElement("a");s.href=r,s.download=t,s.rel="noopener",s.style.display="none";try{document.body.appendChild(s),s.click()}finally{s.remove(),window.setTimeout(()=>URL.revokeObjectURL(r),6e4)}}const Cw=new Set(["pdf","jpg","jpeg","png","gif","tif","tiff","bmp","webp","heic","heif","doc","docx","xls","xlsx","ppt","pptx","csv","txt","eml","msg","zip","rtf","odt"]);function en(e,t,n){for(let r=0;r<n.length;r+=1)if(e[t+r]!==n.charCodeAt(r))return!1;return!0}const Sw=new Set(["heic","heix","hevc","heim","heis","mif1","heif"]),_w=[{ext:"pdf",mime:"application/pdf",matches:e=>en(e,0,"%PDF")},{ext:"jpg",mime:"image/jpeg",matches:e=>e[0]===255&&e[1]===216&&e[2]===255},{ext:"png",mime:"image/png",matches:e=>e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71},{ext:"gif",mime:"image/gif",matches:e=>en(e,0,"GIF87a")||en(e,0,"GIF89a")},{ext:"bmp",mime:"image/bmp",matches:e=>en(e,0,"BM")},{ext:"tif",mime:"image/tiff",matches:e=>e[0]===73&&e[1]===73&&e[2]===42&&e[3]===0||e[0]===77&&e[1]===77&&e[2]===0&&e[3]===42},{ext:"webp",mime:"image/webp",matches:e=>en(e,0,"RIFF")&&en(e,8,"WEBP")},{ext:"heic",mime:"image/heic",matches:e=>en(e,4,"ftyp")&&Sw.has(String.fromCharCode(e[8],e[9],e[10],e[11]))}];function Rw(e){const t=e.split(".").pop();return!t||t===e?!1:Cw.has(t.toLowerCase())}async function Pw(e){const t=new Uint8Array(await e.slice(0,16).arrayBuffer());return _w.find(n=>n.matches(t))??null}async function Tw(e,t){const n=(t??"").trim()||"document";if(Rw(n))return{blob:e,fileName:n};const r=await Pw(e);return r?{blob:e.type===r.mime?e:new Blob([e],{type:r.mime}),fileName:`${n}.${r.ext}`}:{blob:e,fileName:n}}function bo(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Aw(e,t,n,r){const s=bo(r),o=bo(t),a=bo(n);e.document.open(),e.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8"><title>${s}</title></head><body style="margin:0;background:#525659"><embed src="${o}" type="${a}" style="border:0;width:100vw;height:100vh"/></body></html>`),e.document.close()}function Mw(e){const n=(e.split("/").pop()??"").replace(/^\d+_/,"");try{return decodeURIComponent(n)||"document"}catch{return n||"document"}}function jw(e,t){var r;if(t&&t!=="application/octet-stream")return t;switch((r=e.split(".").pop())==null?void 0:r.toLowerCase()){case"pdf":return"application/pdf";case"png":return"image/png";case"jpg":case"jpeg":return"image/jpeg";case"gif":return"image/gif";case"webp":return"image/webp";case"svg":return"image/svg+xml";default:return t||"application/octet-stream"}}async function Ow(e,t){const{bucket:n="documents"}=t??{},r=window.open("about:blank","_blank"),{data:s,error:o}=await le.storage.from(n).download(e);if(o||!s)return r&&r.close(),!1;const{blob:a,fileName:i}=await Tw(s,Mw(e)),u=jw(i,a.type),d=a.type===u?a:new Blob([a],{type:u});if(!r)return wc(d,i),!0;const f=URL.createObjectURL(d);try{Aw(r,f,u,i)}catch{return r.close(),wc(d,i),!0}return window.setTimeout(()=>URL.revokeObjectURL(f),6e4),!0}function Nw(){const{toast:e}=rl();return l.useCallback(async(t,n)=>{const r=await Ow(t,n);return r||e({title:"Erreur",description:"Impossible d'ouvrir le fichier",variant:"destructive"}),r},[e])}const Iw=250,xo=2,Dw=10,Mn=5,kw={dossier:{label:"Dossiers",icon:Rm},entite:{label:"Entités",icon:Yt},contact:{label:"Contacts",icon:zm},contrat:{label:"Contrats",icon:Fm},document:{label:"Documents",icon:_m},discussion:{label:"Discussions",icon:Im}};async function mt(e,t){const n=performance.now(),r=await t();return fa("search.query.slow",performance.now()-n,{source:e},da),r}function wo(e){let t=0;for(const n of e)n.error&&(t+=1,bw("search.query_failed",{source:n.source,code:n.error.code??"",message:n.error.message}));return t}function Lw(){var _,S;const[e,t]=l.useState(""),[n,r]=l.useState(""),[s,o]=l.useState(!1),a=l.useRef(null),i=ft(),u=Nw();l.useEffect(()=>{const R=A=>{a.current&&!a.current.contains(A.target)&&o(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[]),l.useEffect(()=>{const R=setTimeout(()=>r(e),Iw);return()=>clearTimeout(R)},[e]);const d=vc(n),f=d.length>=xo,h=pn({queryKey:["global-search",d],enabled:f,queryFn:async({signal:R})=>{const A=performance.now(),O=`%${d}
243%`,[P,I,M,V,j,U,F]=await Promise.all([mt("sinistres_reference",()=>le.from("sinistres").select("id, reference, reference_assureur, type_sinistre, module").or(tw(d)).order("reference",{ascending:!0}).limit(Dw).abortSignal(R)),mt("sinistres_texte",()=>le.from("sinistres").select("id, reference, reference_assureur, type_sinistre, module").or(`type_sinistre.ilike.${O},description_degats.ilike.${O}`).limit(Mn).abortSignal(R)),mt("ecoles",()=>le.from("ecoles").select("id, nom, espace, ville").or(`nom.ilike.${O},ville.ilike.${O}`).limit(Mn).abortSignal(R)),mt("documents",()=>le.from("documents").select("id, nom, categorie, file_url").or(`nom.ilike.${O},categorie.ilike.${O}`).limit(Mn).abortSignal(R)),mt("messages",()=>le.from("sinistre_messages").select("id, content, sinistre_id").ilike("content",O).eq("is_internal",!1).limit(Mn).abortSignal(R)),mt("profiles",()=>le.from("profiles").select("id, user_id, prenom, nom, telephone").or(`nom.ilike.${O},prenom.ilike.${O}`).limit(Mn).abortSignal(R)),mt("contrats",()=>le.from("contrats").select("id, numero, type_contrat, entity_id, ecoles!contrats_entity_id_fkey(espace)").or(`numero.ilike.${O},type_contrat.ilike.${O}`).limit(Mn).abortSignal(R))]),q=[{source:"sinistres_reference",error:P.error},{source:"sinistres_texte",error:I.error},{source:"ecoles",error:M.error},{source:"documents",error:V.error},{source:"messages",error:j.error},{source:"profiles",error:U.error},{source:"contrats",error:F.error}];let L=wo(q);const T=[...dw([P.data??[],I.data??[]],d),...fw(M.data??[]),...hw(V.data??[]),...mw(j.data??[]),...pw(F.data??[])],W=U.data??[];if(W.length>0){const re=performance.now(),z=await mt("contacts_links",()=>le.from("ecole_utilisateurs").select("user_id, entity_id").in("user_id",W.map(ve=>ve.user_id)).abortSignal(R));L+=wo([{source:"contacts_links",error:z.error}]);const G=z.data??[];let ee={};if(G.length>0){const ve=[...new Set(G.map(Me=>Me.entity_id))],te=await mt("contacts_entites",()=>le.from("ecoles").select("id, nom").in("id",ve).abortSignal(R));L+=wo([{source:"contacts_entites",error:te.error}]),ee=Object.fromEntries((te.data??[]).map(Me=>[Me.id,Me.nom]))}const pe={};for(const ve of G)pe[ve.user_id]=ee[ve.entity_id]||"";T.push(...gw(W,pe)),fa("search.contacts.slow",performance.now()-re,{contact_count:W.length},da)}return fa("search.slow",performance.now()-A,{result_count:T.length},da),{normalized:d,results:T,failedSources:L,total:q.length}}}),v=l.useMemo(()=>rw(h.data,d),[h.data,d]),m=v.reduce((R,A)=>{var O;return(R[O=A.category]??(R[O]=[])).push(A),R},{}),y=vc(e),p=s&&y.length>=xo,g=((_=h.data)==null?void 0:_.normalized)===d?h.data:void 0,w=g?g.failedSources>=g.total:!1,x=g?g.failedSources>0&&!w:!1,b=nw({isDebouncePending:y!==d,isFetching:f&&!h.isError&&((S=h.data)==null?void 0:S.normalized)!==d,isError:h.isError||w,hasResults:v.length>0}),E=()=>{t(""),r(""),o(!1)};return c.jsxs("div",{ref:a,className:"relative w-full max-w-md",children:[c.jsxs("div",{className:"relative",children:[c.jsx($m,{className:"absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(Td,{value:e,onChange:R=>{t(R.target.value),o(!0)},onFocus:()=>e.length>=xo&&o(!0),placeholder:"Rechercher un dossier, une entité, un document…",className:"h-9 pl-9 pr-8 text-sm"}),e&&c.jsx("button",{onClick:E,className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:c.jsx(kl,{className:"h-3.5 w-3.5"})})]}),p&&c.jsxs("div",{className:"absolute top-full left-0 z-50 mt-1 w-full rounded-md border bg-popover shadow-lg",children:[(b==="pending"||b==="loading")&&c.jsx("p",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"Recherche…"}),b==="error"&&c.jsx("p",{className:"px-3 py-4 text-center text-sm text-destructive",children:"La recherche est momentanément indisponible. Réessayez dans quelques instants."}),b==="empty"&&c.jsx("p",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"Aucun résultat"}),b==="results"&&c.jsx("div",{className:"max-h-80 overflow-y-auto py-1",children:["dossier","entite","contact","contrat","document","discussion"].map(R=>{const A=m[R];if(!(A!=null&&A.length))return null;const O=kw[R];return c.jsxs("div",{children:[c.jsxs("p",{className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:[c.jsx(O.icon,{className:"h-3.5 w-3.5"}),O.label]}),A.map(P=>c.jsx("button",{onClick:()=>{P.storagePath?u(P.storagePath,{bucket:"documents"}).then(I=>{I||i(P.path)}):i(P.path),E()},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-sm hover:bg-accent transition-colors",children:c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"truncate font-medium text-foreground",children:P.label}),P.sublabel&&c.jsx("p",{className:"truncate text-xs text-muted-foreground",children:P.sublabel})]})},P.id))]},R)})}),x&&b!=="pending"&&b!=="loading"&&c.jsx("p",{className:"border-t px-3 py-2 text-center text-xs text-muted-foreground",children:"Une partie des résultats n'a pas pu être affichée."})]})]})}const Fw=l.lazy(()=>k(()=>import("./AIChatWidget-CxAkJ6iV.js"),__vite__mapDeps([0,1,2,3]))),$w=()=>{const{profile:e,roles:t}=De(),n=ft(),r=V0(t);return c.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[c.jsx(Jx,{}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsxs("header",{className:"flex items-center justify-between gap-4 border-b border-border bg-card px-4 py-2",children:[c.jsx(Lw,{}),c.jsx("div",{className:"flex items-center gap-4",children:c.jsxs("div",{className:"flex items-center gap-2.5 cursor-pointer",onClick:()=>n($r("account")),children:[c.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-full bg-accent text-accent-foreground",children:c.jsx(Nl,{className:"h-4.5 w-4.5"})}),e&&c.jsxs("div",{className:"text-right leading-tight",children:[c.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[e.prenom," ",e.nom]}),c.jsx("p",{className:"text-[11px] text-muted-foreground",children:r})]})]})})]}),c.jsx("main",{className:"flex-1 overflow-y-auto",children:c.jsx(l.Suspense,{fallback:c.jsx(Vr,{}),children:c.jsx(Ku,{})})})]}),c.jsx(l.Suspense,{fallback:null,children:c.jsx(Fw,{})})]})},Md=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"m24,7.616h0l-3.826,2.335,1.438,4.245h0s0,0,0,0l-5.612-1.969v-6.228h-5.047l-1.204-3.557h0,0s3.836,1.392,3.836,1.392l1.392-3.836,2.335,3.826,4.245-1.438h0s0,0,0,0l-1.392,3.836,3.836,1.392h0Zm-15.727,3.646c.974-.979.969-2.562-.01-3.536s-2.562-.969-3.536.01c-.974.979-.969,2.562.01,3.536.979.974,2.562.969,3.536-.01Zm7.81,9.068l5.599,1.618-.556,1.922-5.054-1.462-5.373,1.492c-.237.054-.475.08-.707.08-1.205,0-2.295-.702-2.77-1.828l-3.056-7.153H0v-6h2v4h3.434l6.566-.875v-4.125h2v5.876l-3.762.501,2.102,5.08,3.335-3.457h5.325v2h-4.475l-2.91,3.017,2.469-.686Z"})}));Md.displayName="IconIndividuelleAccident";const jd=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"m19,0C20.381,0,21.5,1.119,21.5,2.5s-1.119,2.5-2.5,2.5-2.5-1.119-2.5-2.5S17.619,0,19,0ZM2.5,2.5c0,1.381,1.119,2.5,2.5,2.5s2.5-1.119,2.5-2.5S6.381,0,5,0s-2.5,1.119-2.5,2.5Zm7.521,10.941c.256,0,.512-.098.707-.293.391-.391.391-1.024,0-1.414l-.696-.734h3.968c.553,0,1-.448,1-1s-.447-1-1-1h-4.006l.734-.734c.391-.39.391-1.023,0-1.414s-1.023-.391-1.414,0l-1.688,1.688c-.805.805-.805,2.115,0,2.92l1.688,1.688c.195.195.451.293.707.293Zm6.353,1.099l-1.688-1.688c-.391-.391-1.023-.391-1.414,0s-.391,1.024,0,1.414l.696.734h-3.968c-.553,0-1,.448-1,1s.447,1,1,1h4.006l-.734.734c-.391.39-.391,1.023,0,1.414.195.195.451.293.707.293s.512-.098.707-.293l1.688-1.688c.805-.805.805-2.115,0-2.92Zm-9.374,1.46c0-.658.219-1.263.58-1.758l-1.368-1.368c-1.584-1.585-1.584-4.164,0-5.748l.938-.938c-.366-.111-.747-.188-1.149-.188h-2C1.794,6,0,7.794,0,10v3c0,1.474.81,2.75,2,3.444v6.556c0,.552.447,
2431,1,1s1-.448,1-1v-6h2v6c0,.552.447,1,1,1s1-.448,1-1v-4.78c-.609-.549-1-1.337-1-2.22Zm9,4.644v2.356c0,.552.447,1,1,1s1-.448,1-1v-4.385c-.072.085-1.968,2-2,2.029Zm4-14.644h-2c-1.127,0-2.142.472-2.87,1.225,1.095.447,1.87,1.521,1.87,2.775,0,.658-.219,1.263-.58,1.758l1.369,1.369c1.048,1.049,1.387,2.53,1.047,3.874h1.164v6c0,.552.447,1,1,1s1-.448,1-1v-6.556c1.19-.694,2-1.97,2-3.444v-3c0-2.206-1.794-4-4-4Z"})}));jd.displayName="IconResponsabiliteCivile";const Od=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"M23.944,12.669l-3.031-8.66c-.42-1.202-1.559-2.01-2.832-2.01h-5.081V1c-.006-1.308-1.995-1.307-2,0v1H5.919c-1.273,0-2.412,.808-2.832,2.009L.056,12.669c-.037,.106-.056,.632-.056,.632,0,2.506,1.871,4.567,4.26,4.692,1.241,.069,2.434-.371,3.338-1.229,.892-.846,1.402-2.036,1.402-3.264,0,0-.021-.732-.061-.842L5.794,4.008c.041-.005,.083-.008,.125-.008h5.081V22H5c-1.308,.006-1.307,1.995,0,2h14c1.308-.006,1.307-1.995,0-2h-6V4h5.081c.042,0,.084,.002,.125,.008l-3.146,8.65c-.04,.109-.061,.842-.061,.842,0,1.229,.511,2.418,1.402,3.264,2.809,2.701,7.648,.752,7.598-3.462,0,0-.019-.526-.056-.632Zm-17.372-.669H2.409l2.042-5.833,2.121,5.833Zm12.977-5.833l2.042,5.833h-4.163l2.121-5.833Z"})}));Od.displayName="IconProtectionJuridique";const ha=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"m4.5,14h-2v-1.5c0-1.379,1.122-2.5,2.5-2.5h14c1.378,0,2.5,1.121,2.5,2.5v1.5h-2v-1.5c0-.275-.224-.5-.5-.5h-6v2h-2v-2h-6c-.276,0-.5.225-.5.5v1.5Zm11-7c0-1.103-.897-2-2-2h-3c-1.103,0-2,.897-2,2v1h7v-1Zm-3.5-3c1.105,0,2-.895,2-2s-.895-2-2-2-2,.895-2,2,.895,2,2,2Zm6.5,14c0,1.105.895,2,2,2s2-.895,2-2-.895-2-2-2-2,.895-2,2Zm3.5,3h-3c-1.103,0-2,.897-2,2v1h7v-1c0-1.103-.897-2-2-2Zm-17,0h-3c-1.103,0-2,.897-2,2v1h7v-1c0-1.103-.897-2-2-2Zm5-3c0,1.105.895,2,2,2s2-.895,2-2-.895-2-2-2-2,.895-2,2Zm3.5,3h-3c-1.103,0-2,.897-2,2v1h7v-1c0-1.103-.897-2-2-2Zm-10-1c1.105,0,2-.895,2-2s-.895-2-2-2-2,.895-2,2,.895,2,2,2Z"})}));ha.displayName="IconResponsabiliteDirigeants";const us=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"M1.5,16.5c0-1.379,1.121-2.5,2.5-2.5s2.5,1.121,2.5,2.5-1.121,2.5-2.5,2.5-2.5-1.121-2.5-2.5Zm8,0c0,1.381,1.119,2.5,2.5,2.5s2.5-1.119,2.5-2.5-1.119-2.5-2.5-2.5-2.5,1.119-2.5,2.5Zm8,0c0,1.381,1.119,2.5,2.5,2.5s2.5-1.119,2.5-2.5-1.119-2.5-2.5-2.5-2.5,1.119-2.5,2.5Zm-2.242-12.033c.285,.338,.705,.533,1.147,.533h2.262l-.879,2.26c-.138,.356,.124,.74,.506,.74h.32c.407,0,.781-.222,.975-.579l1.911-2.421h1.5c.552,0,1-.448,1-1s-.448-1-1-1h-1.5l-1.929-2.421c-.195-.357-.569-.579-.975-.579h-.298c-.383,0-.646,.386-.505,.742l.891,2.258h-2.184l-1.11-.772c-.146-.146-.345-.228-.551-.228-.599,0-.974,.647-.677,1.167l1.096,1.3ZM4,12c.552,0,1-.448,1-1v-1.154c0-.552-.448-1-1-1s-1,.448-1,1v1.154c0,.552,.448,1,1,1Zm1.125-4.5c.311,0,.617-.144,.812-.416,.318-.442,.705-.829,1.147-1.147,.448-.323,.55-.948,.227-1.396-.322-.448-.948-.551-1.396-.227-.618,.445-1.156,.983-1.601,1.601-.323,.448-.221,1.073,.227,1.396,.177,.127,.381,.188,.583,.188Zm4.644-2.5h1.231c.552,0,1-.448,1-1s-.448-1-1-1h-1.231c-.552,0-1,.448-1,1s.448,1,1,1Zm10.231,15c-1.754,0-3.335,1.063-3.935,2.646-.259,.627,.257,1.374,.935,1.354h6c.678,.019,1.194-.727,.935-1.354-.6-1.582-2.181-2.646-3.935-2.646Zm-8,0c-1.754,0-3.335,1.063-3.935,2.646-.259,.627,.257,1.374,.935,1.354h6c.678,.019,1.194-.727,.935-1.354-.6-1.582-2.181-2.646-3.935-2.646Zm-8,0c-1.754,0-3.335,1.063-3.935,2.646-.259,.627,.257,1.374,.935,1.354H7c.678,.019,1.194-.727,.935-1.354-.6-1.582-2.181-2.646-3.935-2.646Z"})}));us.displayName="IconVoyageNew";const Nd=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"M21,7c.55,0,1-.45,1-1,0-2.76-2.24-5-5-5H5C2.24,1,0,3.24,0,6v7c0,2.76,2.24,5,5,5h5v2h-3c-.55,0-1,.45-1,1s.45,1,1,1h4c.55,0,1-.45,1-1V13c0-3.31,2.69-6,6-6h3Zm-1,2h-2c-2.21,0-4,1.79-4,4v7c0,2.21,1.79,4,4,4h2c2.21,0,4-1.79,4-4v-7c0-2.21-1.79-4-4-4Z"})}));Nd.displayName="IconPCTablettes";const Id=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"M20.389,3.3A3.512,3.512,0,0,0,17.1,1H6.9A3.493,3.493,0,0,0,3.628,3.263L1.469,8.7A24.288,24.288,0,0,0,0,17.032V20H3v3H7V20H17v3h4V20h3V17.032a24.349,24.349,0,0,0-1.484-8.375ZM17,15.5h0A1.5,1.5,0,0,1,18.5,14h0A1.5,1.5,0,0,1,20,15.5h0A1.5,1.5,0,0,1,18.5,17h0A1.5,1.5,0,0,1,17,15.5ZM4.271,9.765,6.432,4.329A.5.5,0,0,1,6.9,4H17.1a.52.52,0,0,1,.485.37l2.128,5.354c.153.421.285.847.406,1.276H3.878C4,10.584,4.124,10.
243171,4.271,9.765ZM5.5,17h0A1.5,1.5,0,0,1,4,15.5H4A1.5,1.5,0,0,1,5.5,14h0A1.5,1.5,0,0,1,7,15.5H7A1.5,1.5,0,0,1,5.5,17Z"})}));Id.displayName="IconAuto";const Dd=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"M24,17.732a10.965,10.965,0,0,0-.641-3.7L21.916,9.991A3.006,3.006,0,0,0,19.09,8H11.91A3.006,3.006,0,0,0,9.084,9.991L7.641,14.033A10.955,10.955,0,0,0,7,17.732V22H9v2h4V22h5v2h4V22h2ZM11.91,10h7.18a1,1,0,0,1,.942.664L21.224,14H9.776l1.192-3.336A1,1,0,0,1,11.91,10ZM22,20H9V17.732A8.959,8.959,0,0,1,9.168,16H11v1a1,1,0,0,0,2,0V16h5v1a1,1,0,0,0,2,0V16h1.832A8.959,8.959,0,0,1,22,17.732ZM4,9V8H2.174A9.044,9.044,0,0,0,2,9.732V12H6v4H2V14H0c.06-2.3-.269-5.811.641-7.967L2.084,1.991A3,3,0,0,1,4.909,0h7.182a3,3,0,0,1,2.825,1.991L16.348,6H14.224L13.032,2.664A1,1,0,0,0,12.091,2H4.91a1,1,0,0,0-.942.664L2.776,6H11.91A5.008,5.008,0,0,0,7.915,8H6V9A1,1,0,0,1,4,9Z"})}));Dd.displayName="IconFlotteAuto";const kd=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"M23.348,14H7.652L9.084,9.991A3.006,3.006,0,0,1,11.91,8h7.18a3.006,3.006,0,0,1,2.826,1.991ZM24,22H22v2H18V22H13v2H9V22H7V17.732A11,11,0,0,1,7.142,16H23.858A11,11,0,0,1,24,17.732ZM11,18a1,1,0,0,0,0,2A1,1,0,0,0,11,18Zm9,2a1,1,0,0,0,0-2A1,1,0,0,0,20,20ZM2,16V14H0V9.732A11,11,0,0,1,.142,8H7.915A4.964,4.964,0,0,0,7.2,9.318l-1.432,4.01a24.2,24.2,0,0,0-.6,2.357c-.017.1-.024.21-.038.315Zm2-4a1,1,0,0,0,0-2A1,1,0,0,0,4,12ZM16.348,6,14.916,1.991A3.006,3.006,0,0,0,12.09,0H4.91A3.006,3.006,0,0,0,2.084,1.991L.652,6Z"})}));kd.displayName="IconAutoMission";const Ld=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"m22 14.2c-.791.531-1.517.883-2 1.086v2.714h-4.914l-1 1h-4.172l-1-1h-4.914v-10h7.049c-.031-.266-.049-.539-.049-.819v-1.181h-9v12h-2v3c0 1.654 1.346 3 3 3h18c1.654 0 3-1.346 3-3v-3h-2zm0 6.8c0 .551-.448 1-1 1h-18c-.552 0-1-.449-1-1v-1h6.086l1 1h5.828l1-1h6.086zm.63-19.626-4.13-1.374-4.13 1.374c-.819.272-1.37 1.034-1.37 1.896v3.912c0 3.57 3.715 5.704 4.851 6.271l.605.304.627-.253c1.153-.464 4.917-2.29 4.917-6.322v-3.912c0-.862-.551-1.
243624-1.37-1.896zm-.63 5.807c0 2.582-2.422 3.924-3.455 4.378-.915-.49-3.545-2.097-3.545-4.378v-3.909s3.5-1.161 3.5-1.161l3.5 1.158z"})}));Ld.displayName="IconProtectionNumerique";const ma=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"m10,24H0v-3c0-2.761,2.239-5,5-5h8v3h-3v5Zm14-3h-5v3h5v-3Zm0-10h-5v3h5v-3Zm-7,10h-5v3h5v-3Zm3-5h-5v3h5v-3Zm4,0h-2v3h2v-3ZM14.977,4.977c-.239-2.635-2.343-4.739-4.977-4.977v3.977h-2V0C5.366.239,3.262,2.343,3.023,4.977h-1.023v2h14v-2h-1.023ZM3,8.977h12l-.002.146c-.078,3.241-2.738,5.854-5.998,5.854s-5.92-2.613-5.998-5.854l-.002-.146Z"})}));ma.displayName="IconDommagesOuvrages";const pa=l.forwardRef(({size:e=24,color:t="currentColor",strokeWidth:n,absoluteStrokeWidth:r,...s},o)=>c.jsx("svg",{ref:o,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:e,height:e,fill:t,...s,children:c.jsx("path",{d:"m22.004,4.498c.001-.865-.525-1.61-1.34-1.898L14.199.319c-1.388-.491-2.916-.492-4.303-.006L3.353,2.603c-.818.286-1.346,1.03-1.346,1.896,0,.867.529,1.611,1.347,1.896l6.507,2.27c.689.24,1.414.361,2.138.361s1.448-.121,2.137-.361l5.864-2.045v4.379c0,.552.448,1,1,1s1-.448,1-1c0,0,.004-6.493.004-6.502Zm-7.209,6.056l3.205-1.118v.564c0,3.309-2.691,6-6,6s-6-2.691-6-6v-.563l3.203,1.118c1.799.627,3.794.627,5.592,0Zm4.205,13.446H5c-.318,0-.617-.151-.805-.407s-.244-.586-.15-.89c1.044-3.358,4.315-5.703,7.955-5.703s6.911,2.345,7.955,5.703c.094.303.039.634-.15.89s-.487.407-.805.407Z"})}));pa.displayName="IconFraisScolarite";const Eo=e=>oe("flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors mb-2",e?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent/50 text-white"),Vw=({ecoleId:e})=>{const t=Ie();if(!e)return null;const n=wn("syndic",e),r=$x("immeuble");return c.jsxs(c.Fragment,{children:[c.jsxs(He,{to:n,className:Eo(t.pathname===n),children:[c.jsx(Ns,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{className:"text-xs bg-inherit text-white font-medium",children:"Mes informations"})]}),c.jsxs(He,{to:r,className:Eo(t.pathname===r||t.pathname.startsWith(`${r}/`)),children:[c.jsx(Yt,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{className:"text-xs bg-inherit text-white font-medium",children:"Mes immeubles"})]}),c.jsxs(He,{to:Je.mesSinistres,className:Eo(t.pathname===Je.mesSinistres),children:[c.jsx(Ra,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{className:"text-xs bg-inherit text-white font-medium",children:"Mes sinistres"})]})]})},Ec=e=>oe("flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors mb-2",e?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent/50 text-white"),Uw=({ecoleId:e,isFondation:t})=>{const n=Ie(),r=e?wn("school",e):null,s=$r("foundation");return c.jsxs(c.Fragment,{children:[r&&!t&&c.jsxs(He,{to:r,className:Ec(n.pathname===r),children:[c.jsx(Ns,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{className:"text-xs bg-inherit text-white font-medium",children:"Mon école"})]}),t&&c.jsxs(He,{to:s,className:Ec(n.pathname===s),children:[c.jsx(Yt,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{className:"text-xs bg-inherit text-white font-medium",children:"Ma Fondation"})]})]})},Bw=e=>oe("flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors mb-2",e?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent/50 text-white"),Ww=({ecoleId:e})=>{const t=Ie();if(!e)return null;const n=wn("company",e);return c.jsxs(He,{to:n,className:Bw(t.pathname===n),children:[c.jsx(Tl,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{className:"text-xs bg-inherit text-white font-medium",children:"Mon entreprise"})]})},zw=e=>oe("flex items-center gap-3 rounded-md px-3 py-2.5 text-sm font-medium transition-colors mb-2",e?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent/50 text-white"),qw=({ecoleId:e})=>{const t=Ie();if(!e)return null;const n=wn("association",e);return c.jsxs(He,{to:n,className:zw(t.pathname===n),children:[c.jsx(Dl,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{className:"text-xs bg-inherit text-white font-medium",children:"Mon scout"})]})},Co={Multirisques:Mm,"Responsabilité Civile":jd,"Responsabilité dirigeants":ha,"Responsabilité des Dirigeants":ha,Auto:Id,"Flotte Auto":Dd,"Auto-mission":kd,"Bris de machine":Am,"Informatique / Multimédia":Dm,"PC / Tablettes":Nd,"Protection Numérique & Cyber":Ld,"Protection Juridique":Od,"Dommages Ouvrages":ma,"Frais de Scolarité":pa,"Frais 
243scolaire":pa,"Individuelle Accident":Md,Accident:Ra,Scolaire:Tm,"Voyage - Annulation":us,"Voyage - Assistance":us,Voyage:us,"Dommages aux biens":Yt,"Dommages ouvrages":ma},Cc={Voyage:"Voyage - Annulation"};function Hw(e){if(Co[e])return Co[e];const t=e.toLowerCase();for(const[n,r]of Object.entries(Co))if(t.includes(n.toLowerCase())||n.toLowerCase().includes(t))return r;return Ra}const Yw=({espaceLabel:e="ECOLE",entityEspace:t="ecole"})=>{var h;const{user:n,signOut:r}=De(),s=Ie(),o=ft(),{selectedEntity:a}=or(),i=(a==null?void 0:a.id)??"",u=(a==null?void 0:a.is_fondation)??!1,d=((h=Cd(n==null?void 0:n.id).data)==null?void 0:h.everHeldTypes)??[],f=l.useMemo(()=>{const v=rn[t];return!v||v.hiddenModules.length===0?d:d.filter(m=>!v.hiddenModules.some(y=>{var p;return(p=mo[y])==null?void 0:p.call(mo,m)}))},[d,t]);return c.jsxs("aside",{className:"flex h-screen w-56 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground",children:[c.jsxs(He,{to:Se.dashboard,className:"flex flex-col items-center gap-2 border-b px-4 py-5 border-[var(--color-sidebar-navy)]",children:[c.jsx("img",{src:_d,alt:"Fides",className:"h-14 shrink-0 object-contain brightness-0 invert"}),c.jsxs("span",{className:"text-[11px] font-bold uppercase tracking-widest text-white",children:["Extranet ",e]})]}),c.jsxs("nav",{className:"sidebar-scrollbar flex-1 overflow-y-auto px-2 py-4 space-y-1 border-0 border-none border-[var(--color-sidebar-navy)] mt-[30px] my-[25px]",children:[t==="syndic"&&c.jsx(Vw,{ecoleId:i}),t==="ecole"&&c.jsx(Uw,{ecoleId:i,isFondation:u}),t==="entreprise"&&c.jsx(Ww,{ecoleId:i}),t==="association"&&c.jsx(qw,{ecoleId:i}),f.length>0&&c.jsx("div",{className:"-mt-1 mb-2 ml-4 border-l border-white/20 pl-2 space-y-0.5",children:(()=>{const v=new Set;return f.filter(m=>{const y=Cc[m]||m;return v.has(y)?!1:(v.add(y),!0)}).map(m=>{const y=vd(m);if(!y)return null;const p=Cc[m]||m,g=Hw(m),w=xd(y),x=s.pathname===w||s.pathname.startsWith(`${w}/`);return c.jsxs("button",{onClick:()=>{o(w)},className:oe("flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-sm transition-colors text-left",x?"bg-sidebar-accent text-sidebar-accent-foreground":"text-white hover:bg-sidebar-accent/50"),children:[c.jsx(g,{className:"h-4 w-4 shrink-0"}),c.jsx("span",{className:"truncate font-normal text-xs",children:p})]},m)})})()}),c.jsx("div",{className:"mt-60 mb-2 mx-2 border-t border-[var(--color-sidebar-navy)]"}),c.jsxs(He,{to:hc("contacts"),className:oe("flex items-center gap-3 rounded-md px-3 py-2.5 text-xs font-medium transition-colors",s.pathname.startsWith(hc("contacts"))?"bg-sidebar-accent text-sidebar-accent-foreground":"hover:bg-sidebar-accent/50 text-white"),children:[c.jsx(Lm,{className:"h-4.5 w-4.5 shrink-0"}),c.jsx("span",{children:"Contacts utiles"})]})]}),c.jsx("div",{className:"border-t px-3 py-3 border-[var(--color-sidebar-navy)]",children:c.jsxs("button",{onClick:r,className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-xs transition-colors text-white",children:[c.jsx(Ol,{className:"h-4 w-4"}),"Déconnexion"]})})]})};var Gw=l.createContext(void 0);function Fd(e){const t=l.useContext(Gw);return e||t||"ltr"}var So=0;function Kw(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Sc()),document.body.insertAdjacentElement("beforeend",e[1]??Sc()),So++,()=>{So===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),So--}},[])}function Sc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var _o="focusScope.autoFocusOnMount",Ro="focusScope.autoFocusOnUnmount",_c={bubbles:!1,cancelable:!0},Qw="FocusScope",$d=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...a}=e,[i,u]=l.useState(null),d=Ue(s),f=Ue(o),h=l.useRef(null),v=Ee(t,p=>u(p)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let p=function(b){if(m.paused||!i)return;const E=b.target;i.contains(E)?h.current=E:Ot(h.current,{select:!0})},g=function(b){if(m.paused||!i)return;const E=b.relatedTarget;E!==null&&(i.contains(E)||Ot(h.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const _ of b)_.removedNodes.length>0&&Ot(i)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const x=new MutationObserver(w);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),x.disconnect()}}},[r,i,m.paused]),l.useEffect(()=>{if(i){Pc.add(m);const p=document.activeElement;if(!i.contains(p)){const w=new CustomEvent(_o,_c);i.addEventListener(_o,d),i.dispatchEvent(w),w.defaultPrevented||(Zw(n1(Vd(i)),{select:!0}),document.activeElement===p&&Ot(i))}return()=>{i.removeEventListener(_o,d),setTimeout(()=>{const w=new CustomEvent(Ro,_c);i.addEventListener(Ro,f),i.dispatchEvent(w),w.defaultPrevented||Ot(p??document.body,{select:!0}),i.removeEventListener(Ro,f),Pc.remove(m)},0)}}},[i,d,f,m]);const y=l.useCallback(p=>{if(!n&&!r||m.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,w=document.activeElement;if(g&&w){const x=p.currentTarget,[b,E]=Xw(x);b&&E?!p.shiftKey&&w===E?(p.preventDefault(),n&&Ot(b,{select:!0}
vendor: 10,303 bytes, line 243
243)):p.shiftKey&&w===b&&(p.preventDefault(),n&&Ot(E,{select:!0})):w===x&&p.preventDefault()}},[n,r,m.paused]);return c.jsx(me.div,{tabIndex:-1,...a,ref:v,onKeyDown:y})});$d.displayName=Qw;function Zw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ot(r,{select:t}),document.activeElement!==n)return}function Xw(e){const t=Vd(e),n=Rc(t,e),r=Rc(t.reverse(),e);return[n,r]}function Vd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rc(e,t){for(const n of e)if(!Jw(n,{upTo:t}))return n}function Jw(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function e1(e){return e instanceof HTMLInputElement&&"select"in e}function Ot(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&e1(e)&&t&&e.select()}}var Pc=t1();function t1(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Tc(e,t),e.unshift(t)},remove(t){var n;e=Tc(e,t),(n=e[0])==null||n.resume()}}}function Tc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function n1(e){return e.filter(t=>t.tagName!=="A")}var Po="rovingFocusGroup.onEntryFocus",r1={bubbles:!1,cancelable:!0},Ur="RovingFocusGroup",[ga,Ud,s1]=xa(Ur),[o1,Bd]=yn(Ur,[s1]),[a1,i1]=o1(Ur),Wd=l.forwardRef((e,t)=>c.jsx(ga.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(ga.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(c1,{...e,ref:t})})}));Wd.displayName=Ur;var c1=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:f=!1,...h}=e,v=l.useRef(null),m=Ee(t,v),y=Fd(o),[p,g]=Ms({prop:a,defaultProp:i??null,onChange:u,caller:Ur}),[w,x]=l.useState(!1),b=Ue(d),E=Ud(n),_=l.useRef(!1),[S,R]=l.useState(0);return l.useEffect(()=>{const A=v.current;if(A)return A.addEventListener(Po,b),()=>A.removeEventListener(Po,b)},[b]),c.jsx(a1,{scope:n,orientation:r,dir:y,loop:s,currentTabStopId:p,onItemFocus:l.useCallback(A=>g(A),[g]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>R(A=>A+1),[]),onFocusableItemRemove:l.useCallback(()=>R(A=>A-1),[]),children:c.jsx(me.div,{tabIndex:w||S===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:B(e.onMouseDown,()=>{_.current=!0}),onFocus:B(e.onFocus,A=>{const O=!_.current;if(A.target===A.currentTarget&&O&&!w){const P=new CustomEvent(Po,r1);if(A.currentTarget.dispatchEvent(P),!P.defaultPrevented){const I=E().filter(F=>F.focusable),M=I.find(F=>F.active),V=I.find(F=>F.id===p),U=[M,V,...I].filter(Boolean).map(F=>F.ref.current);Hd(U,f)}}_.current=!1}),onBlur:B(e.onBlur,()=>x(!1))})})}),zd="RovingFocusGroupItem",qd=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:a,...i}=e,u=ms(),d=o||u,f=i1(zd,n),h=f.currentTabStopId===d,v=Ud(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:p}=f;return l.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),c.jsx(ga.ItemSlot,{scope:n,id:d,focusable:r,active:s,children:c.jsx(me.span,{tabIndex:h?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:B(e.onMouseDown,g=>{r?f.onItemFocus(d):g.preventDefault()}),onFocus:B(e.onFocus,()=>f.onItemFocus(d)),onKeyDown:B(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const w=d1(g,f.orientation,f.dir);if(w!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=v().filter(E=>E.focusable).map(E=>E.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const E=b.indexOf(g.currentTarget);b=f.loop?f1(b,E+1):b.slice(E+1)}setTimeout(()=>Hd(b))}}),children:typeof a=="function"?a({isCurrentTabStop:h,hasTabStop:p!=null}):a})})});qd.displayName=zd;var l1={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function u1(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function d1(e,t,n){const r=u1(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return l1[r]}function Hd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function f1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var h1=Wd,m1=qd;function p1(e){const t=g1(e),n=l.forwardRef((r,s)=>{const{children:o,...a}=r,i=l.Children.toArray(o),u=i.find(y1);if(u){const d=u.props.children,f=i.map(h=>h===u?l.Children.count(d)>1?l.Children.only(null):l.isValidElement(d)?d.props.children:null:h);return c.jsx(t,{...a,ref:s,children:l.isValidElement(d)?l.cloneElement(d,void 0,f):null})}return c.jsx(t,{...a,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function g1(e){const t=l.forwardRef((n,r)=>{const{children:s,...o}=n;if(l.isValidElement(s)){const a=x1(s),i=b1(o,s.props);return s.type!==l.Fragment&&(i.ref=r?vn(r,a):a),l.cloneElement(s,i)}return l.Children.count(s)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var v1=Symbol("radix.slottable");function y1(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===v1}function b1(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...i)=>{const u=o(...i);return s(...i),u}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function x1(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var w1=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jn=new WeakMap,ns=new WeakMap,rs={},To=0,Yd=function(e){return e&&(e.host||Yd(e.parentNode))},E1=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Yd(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},C1=function(e,t,n,r){var s=E1(t,Array.isArray(e)?e:[e]);rs[n]||(rs[n]=new WeakMap);var o=rs[n],a=[],i=new Set,u=new Set(s),d=function(h){!h||i.has(h)||(i.add(h),d(h.parentNode))};s.forEach(d);var f=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(v){if(i.has(v))f(v);else try{var m=v.getAttribute(r),y=m!==null&&m!=="false",p=(jn.get(v)||0)+1,g=(o.get(v)||0)+1;jn.set(v,p),o.set(v,g),a.push(v),p===1&&y&&ns.set(v,!0),g===1&&v.setAttribute(n,"true"),y||v.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",v,w)}})};return f(t),i.clear(),To++,function(){a.forEach(function(h){var v=jn.get(h)-1,m=o.get(h)-1;jn.set(h,v),o.set(h,m),v||(ns.has(h)||h.removeAttribute(r),ns.delete(h)),m||h.removeAttribute(n)}),To--,To||(jn=new WeakMap,jn=new WeakMap,ns=new WeakMap,rs={})}},S1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=w1(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),C1(r,s,n,"aria-hidden")):function(){return null}},ds="right-scroll-bar-position",fs="width-before-scroll-bar",_1="with-scroll-bars-hidden",R1="--removed-body-scroll-bar-size";function Ao(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function P1(e,t){var n=l.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var T1=typeof window<"u"?l.useLayoutEffect:l.useEffect,Ac=new WeakMap;function A1(e,t){var n=P1(null,function(r){return e.forEach(function(s){return Ao(s,r)})});return T1(function(){var r=Ac.get(n);if(r){var s=new Set(r),o=new Set(e),a=n.current;s.forEach(function(i){o.has(i)||Ao(i,null)}),o.forEach(function(i){s.has(i)||Ao(i,a)})}Ac.set(n,e)},[e]),n}function M1(e){return e}function j1(e,t){t===void 0&&(t=M1);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(o),a=n}var u=function(){var f=a;a=[],f.forEach(o)},d=function(){return Promise.resolve().then(u)};d(),n={push:function(f){a.push(f),d()},filter:function(f){return a=a.filter(f),n}}}};return s}function O1(e){e===void 0&&(e={});var t=j1(null);return t.options=It({async:!0,ssr:!1},e),t}var Gd=function(e){var t=e.sideCar,n=Xc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,It({},n))};Gd.isSideCarExport=!0;function N1(e,t){return e.useMedium(t),Gd}var Kd=O1(),Mo=function(){},Qs=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Mo,onWheelCapture:Mo,onTouchMoveCapture:Mo}),s=r[0],o=r[1],a=e.forwardProps,i=e.children,u=e.className,d=e.removeScrollBar,f=e.enabled,h=e.shards,v=e.sideCar,m=e.noRelative,y=e.noIsolation,p=e.inert,g=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,b=e.gapMode,E=Xc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=v,S=A1([n,t]),R=It(It({},E),s);return l.createElement(l.Fragment,null,f&&l.createElement(_,{sideCar:Kd,removeScrollBar:d,shards:h,noRelative:m,n
vendor: 9,179 bytes, lines 243-283
243oIsolation:y,inert:p,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?l.cloneElement(l.Children.only(i),It(It({},R),{ref:S})):l.createElement(x,It({},R,{className:u,ref:S}),i))});Qs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qs.classNames={fullWidth:fs,zeroRight:ds};var I1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function D1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=I1();return t&&e.setAttribute("nonce",t),e}function k1(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function L1(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var F1=function(){var e=0,t=null;return{add:function(n){e==0&&(t=D1())&&(k1(t,n),L1(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},$1=function(){var e=F1();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Qd=function(){var e=$1(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},V1={left:0,top:0,right:0,gap:0},jo=function(e){return parseInt(e||"",10)||0},U1=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[jo(n),jo(r),jo(s)]},B1=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return V1;var t=U1(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},W1=Qd(),Ln="data-scroll-locked",z1=function(e,t,n,r){var s=e.left,o=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
244  .`.concat(_1,` {
245   overflow: hidden `).concat(r,`;
246   padding-right: `).concat(i,"px ").concat(r,`;
247  }
248  body[`).concat(Ln,`] {
249    overflow: hidden `).concat(r,`;
250    overscroll-behavior: contain;
251    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
252    padding-left: `.concat(s,`px;
253    padding-top: `).concat(o,`px;
254    padding-right: `).concat(a,`px;
255    margin-left:0;
256    margin-top:0;
257    margin-right: `).concat(i,"px ").concat(r,`;
258    `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
259  }
260  
261  .`).concat(ds,` {
262    right: `).concat(i,"px ").concat(r,`;
263  }
264  
265  .`).concat(fs,` {
266    margin-right: `).concat(i,"px ").concat(r,`;
267  }
268  
269  .`).concat(ds," .").concat(ds,` {
270    right: 0 `).concat(r,`;
271  }
272  
273  .`).concat(fs," .").concat(fs,` {
274    margin-right: 0 `).concat(r,`;
275  }
276  
277  body[`).concat(Ln,`] {
278    `).concat(R1,": ").concat(i,`px;
279  }
280`)},Mc=function(){var e=parseInt(document.body.getAttribute(Ln)||"0",10);return isFinite(e)?e:0},q1=function(){l.useEffect(function(){return document.body.setAttribute(Ln,(Mc()+1).toString()),function(){var e=Mc()-1;e<=0?document.body.removeAttribute(Ln):document.body.setAttribute(Ln,e.toString())}},[])},H1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;q1();var o=l.useMemo(function(){return B1(s)},[s]);return l.createElement(W1,{styles:z1(o,!t,s,n?"":"!important")})},va=!1;if(typeof window<"u")try{var ss=Object.defineProperty({},"passive",{get:function(){return va=!0,!0}});window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{va=!1}var On=va?{passive:!1}:!1,Y1=function(e){return e.tagName==="TEXTAREA"},Zd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Y1(e)&&n[t]==="visible")},G1=function(e){return Zd(e,"overflowY")},K1=function(e){return Zd(e,"overflowX")},jc=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Xd(e,r);if(s){var o=Jd(e,r),a=o[1],i=o[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Q1=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Z1=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Xd=function(e,t){return e==="v"?G1(t):K1(t)},Jd=function(e,t){return e==="v"?Q1(t):Z1(t)},X1=function(e,t){return e==="h"&&t==="rtl"?-1:1},J1=function(e,t,n,r,s){var o=X1(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,u=t.contains(i),d=!1,f=a>0,h=0,v=0;do{if(!i)break;var m=Jd(e,i),y=m[0],p=m[1],g=m[2],w=p-g-o*y;(y||w)&&Xd(e,i)&&(h+=w,v+=y);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&Math.abs(h)<1||!f&&Math.abs(v)<1)&&(d=!0),d},os=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Oc=function(e){return[e.deltaX,e.deltaY]},Nc=function(e){return e&&"current"in e?e.current:e},e2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},t2=function(e){return`
281  .block-interactivity-`.concat(e,` {pointer-events: none;}
282  .allow-interactivity-`).concat(e,` {pointer-events: all;}
283`)},n2=0,Nn=[];function r2(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),s=l.useState(n2++)[0],o=l.useState(Qd)[0],a=l.useRef(e);l.useEffect(function(){a.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=uh([e.lockRef.current],(e.shards||[]).map(Nc),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var i=l.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!a.current.allowPinchZoom;var w=os(p),x=n.current,b="deltaX"in p?p.deltaX:x[0]-w[0],E="deltaY"in p?p.deltaY:x[1]-w[1],_,S=p.target,R=Math.abs(b)>Math.abs(E)?"h":"v";if("touches"in p&&R==="h"&&S.type==="range")return!1;var A=window.getSelection(),O=A&&A.anchorNode,P=O?O===S||O.contains(S):!1;if(P)return!1;var I=jc(R,S);if(!I)return!0;if(I?_=R:(_=R==="v"?"h":"v",I=jc(R,S)),!I)return!1;if(!r.current&&"changedTouches"in p&&(b||E)&&(r.current=_),!_)return!0;var M=r.current||_;return J1(M,g,p,M==="h"?b:E)},[]),u=l.useCallback(function(p){var g=p;if(!(!Nn.length||Nn[Nn.length-1]!==o)){var w="deltaY"in g?Oc(g):os(g),x=t.current.filter(function(_){return _.name===g.type&&(_.target===g.target||g.target===_.shadowParent)&&e2(_.delta,w)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(a.current.shards||[]).map(Nc).filter(Boolean).filter(function(_){return _.contains(g.target)}),E=b.length>0?i(g,b[0]):!a.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),d=l.useCallback(function(p,g,w,x){var b={name:p,delta:g,target:w,should:x,shadowParent:s2(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(E){return E!==b})},1)},[]),f=l.useCallback(function(p){n.current=os(p),r.current=void 0},[]),h=l.useCallback(function(p){d(p.type,Oc(p),p.target,i(p,e.lockRef.current))},[]),v=l.useCallback(function(p){d(p.type,os(p),p.target,i(p,e.lockRef.current))},[]);l.useEffect(function(){return Nn.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:v}),document.addEventListener("wheel",u,On),document.addEventListener("touchmove",u,On),document.addEventListener("touchstart",f,On),function(){Nn=Nn.filter(function(p){return p!==o}),document.removeEventListener("wheel",u,On),document.removeEventListener("touchmove",u,On),document.removeEventListener("touchstart",f,On)}},[]);var m=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(o,{styles:t2(s)}):null,m?l.createElement(H1,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function s2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const o2=N1(Kd,r2);var ef=l.forwardRef(function(e,t){return l.createElement(Qs,It({},e,{ref:t,sideCar:o2}))});ef.classNames=Qs.classNames;var ya=["Enter"," "],a2=["ArrowDown","PageUp","Home"],tf=["ArrowUp","PageDown","End"],i2=[...a2,...tf],c2={ltr:[...ya,"ArrowRight"],rtl:[...ya,"ArrowLeft"]},l2={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Br="Menu",[Pr,u2,d2]=xa(Br),[En,nf]=yn(Br,[d2,Fs,Bd]),Zs=Fs(),rf=Bd(),[f2,Cn]=En(Br),[h2,Wr]=En(Br),sf=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:a=!0}=e,i=Zs(t),[u,d]=l.useState(null),f=l.useRef(!1),h=Ue(o),v=Fd(s);return l.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),c.jsx(pu,{...i,children:c.jsx(f2,{scope:t,open:n,onOpenChange:h,content:u,onContentChange:d,children:c.jsx(h2,{scope:t,onClose:l.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:f,dir:v,modal:a,children:r})})})};sf.displayName=Br;var m2="MenuAnchor",Ka=l.forwardRef((e,t)=>
vendor: 12,888 bytes, line 283
283{const{__scopeMenu:n,...r}=e,s=Zs(n);return c.jsx(gu,{...s,...r,ref:t})});Ka.displayName=m2;var Qa="MenuPortal",[p2,of]=En(Qa,{forceMount:void 0}),af=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Cn(Qa,t);return c.jsx(p2,{scope:t,forceMount:n,children:c.jsx(bn,{present:n||o.open,children:c.jsx(Ea,{asChild:!0,container:s,children:r})})})};af.displayName=Qa;var Ye="MenuContent",[g2,Za]=En(Ye),cf=l.forwardRef((e,t)=>{const n=of(Ye,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Cn(Ye,e.__scopeMenu),a=Wr(Ye,e.__scopeMenu);return c.jsx(Pr.Provider,{scope:e.__scopeMenu,children:c.jsx(bn,{present:r||o.open,children:c.jsx(Pr.Slot,{scope:e.__scopeMenu,children:a.modal?c.jsx(v2,{...s,ref:t}):c.jsx(y2,{...s,ref:t})})})})}),v2=l.forwardRef((e,t)=>{const n=Cn(Ye,e.__scopeMenu),r=l.useRef(null),s=Ee(t,r);return l.useEffect(()=>{const o=r.current;if(o)return S1(o)},[]),c.jsx(Xa,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:B(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),y2=l.forwardRef((e,t)=>{const n=Cn(Ye,e.__scopeMenu);return c.jsx(Xa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),b2=p1("MenuContent.ScrollLock"),Xa=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:v,onDismiss:m,disableOutsideScroll:y,...p}=e,g=Cn(Ye,n),w=Wr(Ye,n),x=Zs(n),b=rf(n),E=u2(n),[_,S]=l.useState(null),R=l.useRef(null),A=Ee(t,R,g.onContentChange),O=l.useRef(0),P=l.useRef(""),I=l.useRef(0),M=l.useRef(null),V=l.useRef("right"),j=l.useRef(0),U=y?ef:l.Fragment,F=y?{as:b2,allowPinchZoom:!0}:void 0,q=T=>{var te,Me;const W=P.current+T,re=E().filter(xe=>!xe.disabled),z=document.activeElement,G=(te=re.find(xe=>xe.ref.current===z))==null?void 0:te.textValue,ee=re.map(xe=>xe.textValue),pe=j2(ee,W,G),ve=(Me=re.find(xe=>xe.textValue===pe))==null?void 0:Me.ref.current;(function xe(rt){P.current=rt,window.clearTimeout(O.current),rt!==""&&(O.current=window.setTimeout(()=>xe(""),1e3))})(W),ve&&setTimeout(()=>ve.focus())};l.useEffect(()=>()=>window.clearTimeout(O.current),[]),Kw();const L=l.useCallback(T=>{var re,z;return V.current===((re=M.current)==null?void 0:re.side)&&N2(T,(z=M.current)==null?void 0:z.area)},[]);return c.jsx(g2,{scope:n,searchRef:P,onItemEnter:l.useCallback(T=>{L(T)&&T.preventDefault()},[L]),onItemLeave:l.useCallback(T=>{var W;L(T)||((W=R.current)==null||W.focus(),S(null))},[L]),onTriggerLeave:l.useCallback(T=>{L(T)&&T.preventDefault()},[L]),pointerGraceTimerRef:I,onPointerGraceIntentChange:l.useCallback(T=>{M.current=T},[]),children:c.jsx(U,{...F,children:c.jsx($d,{asChild:!0,trapped:s,onMountAutoFocus:B(o,T=>{var W;T.preventDefault(),(W=R.current)==null||W.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:c.jsx(As,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:v,onDismiss:m,children:c.jsx(h1,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:S,onEntryFocus:B(u,T=>{w.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(vu,{role:"menu","aria-orientation":"vertical","data-state":Sf(g.open),"data-radix-menu-content":"",dir:w.dir,...x,...p,ref:A,style:{outline:"none",...p.style},onKeyDown:B(p.onKeyDown,T=>{const re=T.target.closest("[data-radix-menu-content]")===T.currentTarget,z=T.ctrlKey||T.altKey||T.metaKey,G=T.key.length===1;re&&(T.key==="Tab"&&T.preventDefault(),!z&&G&&q(T.key));const ee=R.current;if(T.target!==ee||!i2.includes(T.key))return;T.preventDefault();const ve=E().filter(te=>!te.disabled).map(te=>te.ref.current);tf.includes(T.key)&&ve.reverse(),A2(ve)}),onBlur:B(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(O.current),P.current="")}),onPointerMove:B(e.onPointerMove,Tr(T=>{const W=T.target,re=j.current!==T.clientX;if(T.currentTarget.contains(W)&&re){const z=T.clientX>j.current?"right":"left";V.current=z,j.current=T.clientX}}))})})})})})})});cf.displayName=Ye;var x2="MenuGroup",Ja=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(me.div,{role:"group",...r,ref:t})});Ja.displayName=x2;var w2="MenuLabel",lf=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(me.div,{...r,ref:t})});lf.displayName=w2;var Ss="MenuItem",Ic="menu.itemSelect",Xs=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=l.useRef(null),a=Wr(Ss,e.__scopeMenu),i=Za(Ss,e.__scopeMenu),u=Ee(t,o),d=l.useRef(!1),f=()=>{const h=o.current;if(!n&&h){const v=new CustomEvent(Ic,{bubbles:!0,cancelable:!0});h.addEventListener(Ic,m=>r==null?void 0:r(m),{once:!0}),wa(h,v),v.defaultPrevented?d.current=!1:a.onClose()}};return c.jsx(uf,{...s,ref:u,disabled:n,onClick:B(e.onClick,f),onPointerDown:h=>{var v;(v=e.onPointerDown)==null||v.call(e,h),d.current=!0},onPointerUp:B(e.onPointerUp,h=>{var v;d.current||(v=h.currentTarget)==null||v.click()}),onKeyDown:B(e.onKeyDown,h=>{const v=i.searchRef.current!=="";n||v&&h.key===" "||ya.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Xs.displayName=Ss;var uf=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,a=Za(Ss,n),i=rf(n),u=l.useRef(null),d=Ee(t,u),[f,h]=l.useState(!1),[v,m]=l.useState("");return l.useEffect(()=>{const y=u.current;y&&m((y.textContent??"").trim())},[o.children]),c.jsx(Pr.ItemSlot,{scope:n,disabled:r,textValue:s??v,children:c.jsx(m1,{asChild:!0,...i,focusable:!r,children:c.jsx(me.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:d,onPointerMove:B(e.onPointerMove,Tr(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:B(e.onPointerLeave,Tr(y=>a.onItemLeave(y))),onFocus:B(e.onFocus,()=>h(!0)),onBlur:B(e.onBlur,()=>h(!1))})})})}),E2="MenuCheckboxItem",df=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return c.jsx(gf,{scope:e.__scopeMenu,checked:n,children:c.jsx(Xs,{role:"menuitemcheckbox","aria-checked":_s(n)?"mixed":n,...s,ref:t,"data-state":ti(n),onSelect:B(s.onSelect,()=>r==null?void 0:r(_s(n)?!0:!n),{checkForDefaultPrevented:!1})})})});df.displayName=E2;var ff="MenuRadioGroup",[C2,S2]=En(ff,{value:void 0,onValueChange:()=>{}}),hf=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Ue(r);return c.jsx(C2,{scope:e.__scopeMenu,value:n,onValueChange:o,children:c.jsx(Ja,{...s,ref:t})})});hf.displayName=ff;var mf="MenuRadioItem",pf=l.forwardRef((e,t)=>{const{value:n,...r}=e,s=S2(mf,e.__scopeMenu),o=n===s.value;return c.jsx(gf,{scope:e.__scopeMenu,checked:o,children:c.jsx(Xs,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":ti(o),onSelect:B(r.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,n)},{checkForDefaultPrevented:!1})})})});pf.displayName=mf;var ei="MenuItemIndicator",[gf,_2]=En(ei,{checked:!1}),vf=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=_2(ei,n);return c.jsx(bn,{present:r||_s(o.checked)||o.checked===!0,children:c.jsx(me.span,{...s,ref:t,"data-state":ti(o.checked)})})});vf.displayName=ei;var R2="MenuSeparator",yf=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(me.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});yf.displayName=R2;var P2="MenuArrow",bf=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Zs(n);return c.jsx(yu,{...s,...r,ref:t})});bf.displayName=P2;var T2="MenuSub",[kS,xf]=En(T2),gr="MenuSubTrigger",wf=l.forwardRef((e,t)=>{const n=Cn(gr,e.__scopeMenu),r=Wr(gr,e.__scopeMenu),s=xf(gr,e.__scopeMenu),o=Za(gr,e.__scopeMenu),a=l.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:u}=o,d={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const h=i.current;return()=>{window.clearTimeout(h),u(null)}},[i,u]),c.jsx(Ka,{asChild:!0,...d,children:c.jsx(uf,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":Sf(n.open),...e,ref:vn(t,s.onTriggerChange),onClick:h=>{var v;(v=e.onClick)==null||v.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:B(e.onPointerMove,Tr(h=>{o.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:B(e.onPointerLeave,Tr(h=>{var m,y;f();const v=(m=n.content)==null?void 0:m.getBoundingClientRect();if(v){const p=(y=n.content)==null?void 0:y.dataset.side,g=p==="right",w=g?-5:5,x=v[g?"left":"right"],b=v[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:h.clientX+w,y:h.clientY},{x,y:v.top},{x:b,y:v.top},{x:b,y:v.bottom},{x,y:v.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(h),h.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:B(e.onKeyDown,h=>{var m;const v=o.searchRef.current!=="";e.disabled||v&&h.key===" "||c2[r.dir].includes(h.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),h.preventDefault())})})})});wf.displayName=gr;var Ef="MenuSubContent",Cf=l.forwardRef((e,t)=>{const n=of(Ye,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Cn(Ye,e.__scopeMenu),a=Wr(Ye,e.__scopeMenu),i=xf(Ef,e.__scopeMenu),u=l.useRef(null),d=Ee(t,u);return c.jsx(Pr.Provider,{scope:e.__scopeMenu,children:c.jsx(bn,{present:r||o.open,children:c.jsx(Pr.Slot,{scope:e.__scopeMenu,children:c.jsx(Xa,{id:i.contentId,"aria-labelledby":i.triggerId,...s,ref:d,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var h;a.isUsingKeyboardRef.current&&((h=u.current)==null||h.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:B(e.onFocusOutside,f=>{f.target!==i.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:B(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:B(e.onKeyDown,f=>{var m;const h=f.currentTarget.contains(f.target),v=l2[a.dir].includes(f.key);h&&v&&(o.onOpenChange(!1),(m=i.trigger)==null||m.focus(),f.preventDefault())})})})})})});Cf.displayName=Ef;function Sf(e){return e?"open":"closed"}function _s(e){return e==="indeterminate"}function ti(e){return _s(e)?"indeterminate":e?"checked":"unchecked"}function A2(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function M2(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function j2(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=M2(e,Math.max(o,0));s.length===1&&(a=a.filter(d=>d!==n));const u=a.find(d=>d.toLowerCase().startsWith(s.toLowerCase()));return u!==n?u:void 0}function O2(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const i=t[o],u=t[a],d=i.x,f=i.y,h=u.x,v=u.y;f>r!=v>r&&n<(h-d)*(r-f)/(v-f)+d&&(s=!s)}return s}function N2(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return O2(n,t)}function Tr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var I2=sf,D2=Ka,k2=af,L2=cf,F2=Ja,$2=lf,V2=Xs,U2=df,B2=hf,W2=pf,z2=vf,q2=yf,H2=bf,Y2=wf,G2=Cf,Js="DropdownMenu",[K2]=yn(Js,[nf]),Ae=nf(),[Q2,_f]=K2(Js),Rf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,u=Ae(t),d=l.useRef(null),[f,h]=Ms({prop:s,defaultProp:o??!1,onChange:a,caller:Js});return c.jsx(Q2,{scope:t,triggerId:ms(),triggerRef:d,contentId:ms(),open:f,onOpenChange:h,onOpenToggle:l.useCallback(()=>h(v=>!v),[h]),modal:i,children:c.jsx(I2,{...u,open:f,onOpenChange:h,dir:r,modal:i,children:n})})};Rf.displayName=Js;var Pf="DropdownMenuTrigger",Tf=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=_f(Pf,n),a=Ae(n);return c.jsx(D2,{asChild:!0,...a,children:c.jsx(me.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:vn(t,o.triggerRef),onPointerDown:B(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(o.onOpenToggle(),o.open||i.preventDefault())}),onKeyDown:B(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&o.onOpenToggle(),i.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Tf.displayName=Pf;var Z2="DropdownMenuPortal",Af=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ae(t);return c.jsx(k2,{...r,...n})};Af.displayName=Z2;var Mf="DropdownMenuContent",jf=l.forwardRef((e,t)=>
283{const{__scopeDropdownMenu:n,...r}=e,s=_f(Mf,n),o=Ae(n),a=l.useRef(!1);return c.jsx(L2,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:B(e.onCloseAutoFocus,i=>{var u;a.current||(u=s.triggerRef.current)==null||u.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:B(e.onInteractOutside,i=>{const u=i.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,f=u.button===2||d;(!s.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jf.displayName=Mf;var X2="DropdownMenuGroup",J2=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(F2,{...s,...r,ref:t})});J2.displayName=X2;var eE="DropdownMenuLabel",Of=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx($2,{...s,...r,ref:t})});Of.displayName=eE;var tE="DropdownMenuItem",Nf=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(V2,{...s,...r,ref:t})});Nf.displayName=tE;var nE="DropdownMenuCheckboxItem",If=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(U2,{...s,...r,ref:t})});If.displayName=nE;var rE="DropdownMenuRadioGroup",sE=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(B2,{...s,...r,ref:t})});sE.displayName=rE;var oE="DropdownMenuRadioItem",Df=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(W2,{...s,...r,ref:t})});Df.displayName=oE;var aE="DropdownMenuItemIndicator",kf=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(z2,{...s,...r,ref:t})});kf.displayName=aE;var iE="DropdownMenuSeparator",Lf=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(q2,{...s,...r,ref:t})});Lf.displayName=iE;var cE="DropdownMenuArrow",lE=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(H2,{...s,...r,ref:t})});lE.displayName=cE;var uE="DropdownMenuSubTrigger",Ff=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(Y2,{...s,...r,ref:t})});Ff.displayName=uE;var dE="DropdownMenuSubContent",$f=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ae(n);return c.jsx(G2,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$f.displayName=dE;var fE=Rf,hE=Tf,mE=Af,Vf=jf,Uf=Of,Bf=Nf,Wf=If,zf=Df,qf=kf,Hf=Lf,Yf=Ff,Gf=$f;const pE=fE,gE=hE,vE=l.forwardRef(({className:e,inset:t,children:n,...r},s)=>c.jsxs(Yf,{ref:s,className:oe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,c.jsx(jl,{className:"ml-auto h-4 w-4"})]}));vE.displayName=Yf.displayName;const yE=l.forwardRef(({className:e,...t},n)=>c.jsx(Gf,{ref:n,className:oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));yE.displayName=Gf.displayName;const Kf=l.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(mE,{children:c.jsx(Vf,{ref:r,sideOffset:t,className:oe("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
283de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Kf.displayName=Vf.displayName;const Qf=l.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(Bf,{ref:r,className:oe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));Qf.displayName=Bf.displayName;const bE=l.forwardRef(({className:e,children:t,checked:n,...r},s)=>c.jsxs(Wf,{ref:s,className:oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(qf,{children:c.jsx(Al,{className:"h-4 w-4"})})}),t]}));bE.displayName=Wf.displayName;const xE=l.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(zf,{ref:r,className:oe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(qf,{children:c.jsx(Cm,{className:"h-2 w-2 fill-current"})})}),t]}));xE.displayName=zf.displayName;const wE=l.forwardRef(({className:e,inset:t,...n},r)=>c.jsx(Uf,{ref:r,className:oe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));wE.displayName=Uf.displayName;const EE=l.forwardRef(({className:e,...t},n)=>c.jsx(Hf,{ref:n,className:oe("-mx-1 my-1 h-px bg-muted",e),...t}));EE.displayName=Hf.displayName;const CE=()=>{const{entities:e,selectedEntity:t,selectedEntityId:n,isSelectionActive:r,selectEntity:s}=or(),o=ft();if(!r)return null;const a=i=>{i!==n&&(s(i),o($r("dashboard")))};return c.jsxs(pE,{children:[c.jsxs(gE,{className:"flex max-w-[16rem] items-center gap-2 rounded-md border border-border px-3 py-2 text-sm transition-colors hover:bg-muted",children:[c.jsx(Yt,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),c.jsx("span",{className:"truncate font-medium text-foreground",children:(t==null?void 0:t.nom)??"Choisir un établissement"}),c.jsx(Ml,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]}),c.jsx(Kf,{align:"end",className:"w-72 bg-popover",children:e.map(i=>c.jsxs(Qf,{onSelect:()=>a(i.id),className:"flex items-start gap-2",children:[c.jsx(Al,{className:oe("mt-0.5 h-4 w-4 shrink-0",i.id===n?"opacity-100":"opacity-0")}),c.jsxs("span",{className:"min-w-0",children:[c.jsx("span",{className:"block truncate text-sm",children:i.nom}),c.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:[i.code_postal,i.ville].filter(Boolean).join(" ")||"—"})]})]},i.id))})]})},SE=()=>{const[e]=Xu(),{currentEspace:t}=Hs(),{entities:n,isSelectionActive:r,entitiesReadError:s}=or();return e.get("diag")!=="entites"?null:c.jsxs("aside",{"aria-label":"Diagnostic de sélection des établissements",className:"border-b border-border bg-muted px-6 py-3 text-sm text-foreground",children:[c.jsx("p",{className:"font-semibold",children:"Diagnostic établissements"}),c.jsxs("dl",{className:"mt-2 grid gap-x-6 gap-y-1 sm:grid-cols-2 lg:grid-cols-4",children:[c.jsxs("div",{children:[c.jsx("dt",{className:"text-muted-foreground",children:"Établissements vus"}),c.jsx("dd",{children:n.length})]}),c.jsxs("div",{children:[c.jsx("dt",{className:"text-muted-foreground",children:"Espace actif"}),c.jsx("dd",{children:t})]}),c.jsxs("div",{children:[c.jsx("dt",{className:"text-muted-foreground",children:"Sélection active"}),c.jsx("dd",{children:r?"oui":"non"})]}),c.jsxs("div",{children:[c.jsx("dt",{className:"text-muted-foreground",children:"Erreur de lecture"}),c.jsx("dd",{children:s?"oui":"non"})]})]})]})},_E=()=>{const{user:e}=De(),{data:t,isPending:n}=pn({queryKey:td((e==null?void 0:e.id)??null),queryFn:nd,enabled:!!e,staleTime:5*60*1e3});return{espace:(t==null?void 0:t.espace)??"ecole",entityName:(t==null?void 0:t.entity_name)??"",loading:!!e&&n}},RE=l.lazy(()=>k(()=>import("./AIChatWidget-CxAkJ6iV.js"),__vite__mapDeps([0,1,2,3]))),PE=()=>{const{profile:e}=De(),t=ft(),{espace:n,entityName:r}=_E(),{selectedEntity:s}=or(),o=n==="syndic"?"SYNDIC":n==="association"?"SCOUTS":n==="entreprise"?"ENTREPRISE":"ECOLE";return c.jsxs("div",{className:"flex h-screen bg-background external-portal",children:[c.jsx(Yw,{espaceLabel:o,entityEspace:n}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsx(SE,{}),c.jsxs("header",{className:"flex items-center justify-end gap-4 border-b border-white bg-card px-6 py-3",children:[c.jsx(CE,{}),e&&c.jsxs("button",{onClick:()=>t($r("account")),className:"flex items-center gap-3 transition-opacity hover:opacity-80",children:[c.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full",style:{backgroundColor:"var(--color-external-blue)"},children:c.jsx(Nl,{className:"h-6 w-6 text-white"})}),c.jsxs("div",{className:"text-right",children:[c.jsxs("p",{className:"text-sm font-semibold text-foreground",children:[e.prenom," ",e.nom]}),c.jsx("p",{className:"text-xs text-muted-foreground",children:(s==null?void 0:s.nom)||r||"—"})]})]})]}),c.jsx("main",{className:"flex-1 overflow-y-auto border-0 border-none border-white bg-white px-6 py-6",style:{backgroundColor:"var(--color-soft-ivory)"},children:c.jsx("div",{className:"mx-auto max-w-6xl",children:c.jsx(l.Suspense,{fallback:c.jsx(Vr,{}),children:c.jsx(Ku,{})})})})]}),c.jsx(l.Suspense,{fallback:null,children:c.jsx(RE,{})})]})},Jn=()=>{const e=Ie();return l.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),c.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),c.jsx(Zu,{to:Se.dashboard,className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})};var Q=(e=>(e.EcolesRead="ecoles.read",e.EcolesCreate="ecoles.create",e.EcolesUpdate="ecoles.update",e.SyndicRead="syndic.read",e.SyndicCreate="syndic.create",e.SyndicUpdate="syndic.update",e.AssociationsRead="associations.read",e.AssociationsCreate="associations.create",e.AssociationsUpdate="associations.update",e.EntreprisesRead="entreprises.read",e.EntreprisesCreate="entreprises.create",e.EntreprisesUpdate="entreprises.update",e.UtilisateursRead="utilisateurs.read",e.UtilisateursCreate="utilisateurs.create",e.UtilisateursUpdate="utilisateurs.update",e.SinistresRead="sinistres.read",e.SinistresCreate="sinistres.create",e.SinistresUpdate="sinistres.update",e.AccidentsRead="accidents.read",e.AccidentsCreate="accidents.create",e.AccidentsUpdate="accidents.update",e.VoyagesRead="voyages.read",e.VoyagesCreate="voyages.create",e.VoyagesUpdate="voyages.update",e.DocumentsRead="documents.read",e.AnalytiqueRead="analytique.read",e))(Q||{});const TE={"ecoles.read":{module:"ecoles",action:"can_read"},"ecoles.create":{module:"ecoles",action:"can_create"},"ecoles.update":{module:"ecoles",action:"can_update"},"syndic.read":{module:"syndic",action:"can_read"},"syndic.create":{module:"syndic",action:"can_create"},"syndic.update":{module:"syndic",action:"can_update"},"associations.read":{module:"associations",action:"can_read"},"associations.create":{module:"associations",action:"can_create"},"associations.update":{module:"associations",action:"can_update"},"entreprises.read":{module:"entreprises",action:"can_read"},"entreprises.create":{module:"entreprises",action:"can_create"},"entreprises.update":{module:"entreprises",action:"can_update"},"utilisateurs.read":{module:"utilisateurs",action:"can_read"},"utilisateurs.create":{module:"utilisateurs",action:"can_create"},"utilisateurs.update":{module:"utilisateurs",action:"can_update"},"sinistres.read":{module:"sinistres",action:"can_read"},"sinistres.create":{module:"sinistres",action:"can_create"},"sinistres.update":{module:"sinistres",action:"can_update"},"accidents.read":{module:"accidents",action:"can_read"},"accidents.create":{module:"accidents",action:"can_create"},"accidents.update":{module:"accidents",action:"can_update"},"voyages.read":{module:"voyages",action:"can_read"},"voyages.create":{module:"voyages",action:"can_create"},"voyages.update":{module:"voyages",action:"can_update"},"documents.read":{module:"documents",action:"can_read"},"analytique.read":{module:"analytique",action:"can_read"}};function AE(e){return TE[e]}const Z=({permission:e,children:t})=>{const{can:n,loading:r}=Sd(),s=AE(e);return r?c.jsx(Vr,{}):n(s.module,s.action)?c.jsx(c.Fragment,{children:t}):c.jsx(Ya,{message:"Vous n'êtes pas autorisé à accéder à cette ressource."})},ME=l.lazy(()=>k(()=>import("./Auth-D7KlNk4D.js"),__vite__mapDeps([4,1,5,3]))),jE=l.lazy(()=>k(()=>import("./ResetPasswordRequest-7AhIrqdX.js"),__vite__mapDeps([6,1,5,3]))),OE=l.lazy(()=>k(()=>import("./ResetPasswordConfirm-Bj2SGXmw.js"),__vite__mapDeps([7,1,5,8,3]))
283),NE=l.lazy(()=>k(()=>import("./Dashboard-BuQVlTPm.js"),__vite__mapDeps([9,1,5,10,11,12,13,14,15,16,17,18,19,20,21,22,23,3]))),IE=l.lazy(()=>k(()=>import("./ExternalDashboard-BVscvCaN.js"),__vite__mapDeps([24,1,14,15,25,26,11,12,13,16,17,18,5,19,20,21,27,28,29,3]))),DE=l.lazy(()=>k(()=>import("./EcolesList-Ds787HdW.js"),__vite__mapDeps([30,31,1,5,32,33,34,14,35,36,37,38,39,40,2,41,42,43,44,45,46,47,48,49,50,51,52,53,23,54,3]))),Dc=l.lazy(()=>k(()=>import("./EcoleForm-CnBZD7lF.js"),__vite__mapDeps([55,56,1,57,14,58,59,60,61,62,63,20,64,65,37,66,5,67,41,68,69,42,43,40,2,70,53,51,71,72,3]))),kE=l.lazy(()=>k(()=>import("./EcoleDetail-R3hz9TRr.js"),__vite__mapDeps([73,1,74,37,5,75,32,39,40,2,41,42,43,33,34,14,45,52,53,23,54,51,76,19,77,78,13,79,68,67,80,81,82,12,63,20,69,83,70,15,25,84,85,86,87,88,89,90,91,92,48,93,46,47,49,21,16,94,95,96,97,98,99,60,100,101,102,103,104,105,106,107,57,58,72,108,109,110,66,65,64,71,3]))),LE=l.lazy(()=>k(()=>import("./SyndicList-D8C7ENPw.js"),__vite__mapDeps([111,31,1,5,32,33,34,14,35,36,37,38,39,40,2,41,42,43,44,45,46,47,48,49,50,51,52,53,23,54,3]))),kc=l.lazy(()=>k(()=>import("./SyndicForm-CDhmgCI1.js"),__vite__mapDeps([112,1,66,57,14,58,5,67,41,68,69,42,43,40,2,89,34,80,13,60,61,70,62,63,20,64,65,37,78,59,71,72,53,51,113,3]))),FE=l.lazy(()=>k(()=>import("./SyndicDetail-BzAoMpQt.js"),__vite__mapDeps([114,1,74,37,5,75,32,39,40,2,41,42,43,33,34,14,45,52,53,23,54,51,76,19,77,78,13,79,68,67,80,81,82,12,63,20,69,83,70,15,25,84,85,86,105,106,115,88,90,91,92,48,93,46,47,49,21,16,94,95,96,97,98,99,60,100,101,107,57,58,71,3]))),$E=l.lazy(()=>k(()=>import("./ImmeublesList-BuADRnvz.js"),__vite__mapDeps([116,1,38,39,5,32,40,2,41,42,43,45,44,50,51,52,33,34,36,47,53,23,54,49,3]))),VE=l.lazy(()=>k(()=>import("./ImmeubleForm-KReU4Kpz.js"),__vite__mapDeps([117,1,14,5,67,41,68,40,2,42,43,89,34,80,66,57,58,61,70,64,79,75,53,51,23,81,118,83,69,59,113,71,72,3]))),UE=l.lazy(()=>k(()=>import("./ImmeubleCreateForm-_S-2ppzT.js"),__vite__mapDeps([119,1,5,67,41,68,40,2,42,43,89,34,80,66,57,14,58,61,70,64,79,75,53,51,23,81,118,83,69,113,71,72,3]))),BE=l.lazy(()=>k(()=>import("./ImmeubleDetail-D1KZ9Jg6.js"),__vite__mapDeps([120,15,5,1,107,57,14,58,76,19,115,84,88,40,2,41,79,68,67,75,80,34,53,51,23,81,82,12,91,63,20,109,71,33,90,39,32,42,43,92,48,93,46,47,49,45,54,21,16,105,118,83,69,70,3]))),WE=l.lazy(()=>k(()=>import("./AssociationsList-DDPnh0Q9.js"),__vite__mapDeps([121,31,1,5,32,33,34,14,35,36,37,38,39,40,2,41,42,43,44,45,46,47,48,49,50,51,52,53,23,54,3]))),Lc=l.lazy(()=>k(()=>import("./AssociationForm-DILWgwAF.js"),__vite__mapDeps([122,56,1,57,14,58,59,60,61,62,63,20,64,65,37,66,5,67,41,68,69,42,43,40,2,70,53,51,71,72,3]))),zE=l.lazy(()=>k(()=>import("./AssociationDetail-B3HTf-Jf.js"),__vite__mapDeps([123,1,74,37,5,75,32,39,40,2,41,42,43,33,34,14,45,52,53,23,54,51,76,19,77,78,13,79,68,67,80,81,82,12,63,20,69,83,70,15,25,84,85,86,105,106,88,90,91,92,48,93,46,47,49,21,16,94,95,96,97,98,99,60,100,101,107,57,58,108,109,110,66,65,64,71,3]))),qE=l.lazy(()=>k(()=>import("./EntreprisesList-Cmi5JnXI.js"),__vite__mapDeps([124,31,1,5,32,33,34,14,35,36,37,38,39,40,2,41,42,43,44,45,46,47,48,49,50,51,52,53,23,54,3]))),Fc=l.lazy(()=>k(()=>import("./EntrepriseForm-D131nLCH.js"),__vite__mapDeps([125,56,1,57,14,58,59,60,61,62,63,20,64,65,37,66,5,67,41,68,69,42,43,40,2,70,53,51,71,72,3]))),HE=l.lazy(()=>k(()=>import("./EntrepriseDetail-J6h-Ocxv.js"),__vite__mapDeps([126,1,74,37,5,75,32,39,40,2,41,42,43,33,34,14,45,52,53,23,54,51,76,19,77,78,13,79,68,67,80,81,82,12,63,20,69,83,70,15,25,84,85,86,105,90,91,92,48,93,46,47,49,21,16,107,57,58,108,109,110,66,65,64,71,3]))),YE=l.lazy(()=>k(()=>import("./UtilisateursList-JtJV4wgP.js"),__vite__mapDeps([127,1,128,3,48,37,14,5,75,32,39,40,2,41,42,43,44,45,46,47,49,53,23,54,129,51]))),$c=l.lazy(()=>k(()=>import("./UtilisateurForm-BU6D8W40.js"),__vite__mapDeps([130,1,5,68,67,41,75,40,2,13,85,131,80,34,8,57,14,58,132,128,3,48,37,60,12,72]))),GE=l.lazy(()=>k(()=>import("./SinistresList-C5DSSAvH.js"),__vite__mapDeps([133,1,15,10,90,91,33,34,5,75,19,39,32,40,2,41,42,43,92,14,48,93,46,47,49,45,23,54,21,16,51,134,86,3]))),KE=l.lazy(()=>k(()=>import("./ExternalModulePage-j3whR3KD.js"),__vite__mapDeps([135,1,14,68,5,40,2,41,91,110,23,80,34,33,83,69,42,43,18,90,75,19,39,32,92,48,93,46,47,49,45,54,21,16,51,66,81,94,95,96,97,98,99,60,100,88,101,102,103,104,136,86,105,137,12,15,26,84,25,28,3]))),yr=l.lazy(()=>k(()=>import("./SinistreForm-isIRgd8p.js"),__vite__mapDeps([138,1,139,97,98,104,140,105,68,83,80,34,40,2,41,66,132,14,13,137,12,63,20,60,100,99,5,67,81,53,129,28,69,42,43,51,58,72,3]))
283),Nt=l.lazy(()=>k(()=>import("./SinistreDetail-Cu0OQmFE.js"),__vite__mapDeps([141,1,5,107,14,93,96,80,34,68,69,42,43,40,2,41,95,97,98,99,60,100,136,139,104,140,105,83,66,132,63,20,92,16,142,54,51,53,33,143,144,81,49,22,32,75,23,45,70,17,145,18,67,21,19,58,3,146]))),QE=l.lazy(()=>k(()=>import("./AccidentsList-CDOwpbv3.js"),__vite__mapDeps([147,1,15,5,39,32,40,2,41,42,43,90,91,33,34,75,19,92,14,48,93,46,47,49,45,23,54,21,16,51,134,86,3]))),ZE=l.lazy(()=>k(()=>import("./AnnulationVoyagesList-DvnjNdWn.js"),__vite__mapDeps([148,1,5,75,32,40,2,41,14,19,102,92,103,80,34,69,42,43,39,45,97,98,104,46,47,48,49,23,53,101,3]))),Zf=l.lazy(()=>k(()=>import("./DeclarerVoyageForm-JlX3yn5d.js"),__vite__mapDeps([149,1,5,68,67,41,42,43,89,34,80,60,14,95,97,98,99,58,101,81,3]))),XE=l.lazy(()=>k(()=>import("./FacturationVoyagePage-uQOBZlQJ.js"),__vite__mapDeps([150,102,1,92,103,75,5,80,34,69,42,43,40,2,41,32,39,45,97,98,104,46,47,48,49,23,3]))),JE=l.lazy(()=>k(()=>import("./EcolesBulkDocumentsPage-CEi8fchl.js"),__vite__mapDeps([151,152,1,68,40,2,41,144,81,35,36,37,82,12,67,18,145,3]))),eC=l.lazy(()=>k(()=>import("./AssociationsBulkDocumentsPage-1ERkpi99.js"),__vite__mapDeps([153,152,1,68,40,2,41,144,81,35,36,37,82,12,67,18,145,3]))),tC=l.lazy(()=>k(()=>import("./DocumentsList-Df5pEN0U.js"),__vite__mapDeps([154,1,13,5,75,40,2,41,143,68,83,80,34,60,53,49,51,3]))),nC=l.lazy(()=>k(()=>import("./AnalyticsDashboard-BzHnyjVh.js"),__vite__mapDeps([155,1,5,40,2,41,19,22,3]))),rC=l.lazy(()=>k(()=>import("./PermissionsMatrix-DAraX5Kd.js"),__vite__mapDeps([156,1,5,67,41,75,107,40,2,72,3]))),sC=l.lazy(()=>k(()=>import("./AbsencesCalendar-hCYc62Fs.js"),__vite__mapDeps([157,1,5,75,68,40,2,41,80,34,69,42,43,53,71,54,51,3]))),oC=l.lazy(()=>k(()=>import("./DataMigration-DKlvEfq3.js"),__vite__mapDeps([158,1,5,107,32,75,20,49,17,81,29,18,159,3]))),aC=l.lazy(()=>k(()=>import("./SignaturePage-Dg1Rbk5k.js"),__vite__mapDeps([160,1,68,5,83,107,81,40,2,41,53,51,75,32,143,46,47,48,49,45,145,22,142,17,43,3]))),iC=l.lazy(()=>k(()=>import("./ModuleEspaceConfig-B7TJ1WUB.js"),__vite__mapDeps([161,1,5,67,41,3]))),cC=l.lazy(()=>k(()=>import("./DecisionTreeAdmin-S7fYQNH0.js"),__vite__mapDeps([162,1,68,5,40,2,41,163,83,164,72,53,51,29,3]))),lC=l.lazy(()=>k(()=>import("./FormBuilderAdmin-FqW-wsTU.js"),__vite__mapDeps([165,1,68,40,2,41,163,5,107,75,80,34,83,20,53,51,54,72,3]))),uC=l.lazy(()=>k(()=>import("./EmailTemplatesAdmin-DSbHesO8.js"),__vite__mapDeps([166,1,38,5,83,68,80,34,3]))),dC=l.lazy(()=>k(()=>import("./BandeauAccueilAdmin-BNFLHOK2.js"),__vite__mapDeps([167,1,5,83,27,3]))),fC=l.lazy(()=>k(()=>import("./DeclarationGuidee-5VcWGJRl.js"),__vite__mapDeps([168,1,5,110,101,164,58,28,18,21,3]))),hC=l.lazy(()=>k(()=>import("./MonCompte-DeZpitrN.js"),__vite__mapDeps([169,1,5,68,67,41,40,2,131,80,34,8,72,43,3]))),mC=l.lazy(()=>k(()=>import("./ContactsUtiles-DDs4fMVd.js"),__vite__mapDeps([170,1,5,101,110,3]))),pC=l.lazy(()=>k(()=>import("./AttestationScolaire-CUF-GR9K.js"),__vite__mapDeps([171,1,172,173,98,100,68,67,41,5,69,42,43,104,18,49,3]))),gC=l.lazy(()=>k(()=>import("./AttestationHub-D36aLiF0.js"),__vite__mapDeps([174,1,5,68,40,2,41,171,172,173,98,100,67,69,42,43,104,18,49,3,175,176,66,140,177,63,20,137,12,58]))),vC=l.lazy(()=>k(()=>import("./AttestationMultirisques-SOkrvNSE.js"),__vite__mapDeps([177,1,63,20,176,173,98,68,5,67,41,104,100,18,49,3]))),yC=l.lazy(()=>k(()=>import("./AttestationRC-g0867_Sb.js"),__vite__mapDeps([175,1,176,173,98,68,5,69,42,43,67,41,40,2,66,104,140,100,18,49,3]))),bC=l.lazy(()=>k(()=>import("./MesSouscriptions-1bmiJNvM.js"),__vite__mapDeps([178,1,5,75,40,2,41,68,91,57,14,58,28,3]))),xC=l.lazy(()=>k(()=>import("./MesSinistres-Fuq8rm_K.js"),__vite__mapDeps([179,1,90,91,33,34,5,75,19,39,32,40,2,41,42,43,92,14,48,93,46,47,49,45,23,54,21,16,51,105,3]))),wC=l.lazy(()=>k(()=>import("./ApiDocs-CrfjJtt0.js"),__vite__mapDeps([180,1,3]))),EC=l.lazy(()=>k(()=>import("./EspaceParentsLogin-BeSi9Fol.js"),__vite__mapDeps([181,1,5,182,3]))),CC=l.lazy(()=>k(()=>import("./EspaceParentsAttestation-DdEr8K5e.js"),__vite__mapDeps([183,1,68,67,41,5,69,42,43,132,172,173,98,100,104,182,18,49,3]))
283),SC=l.lazy(()=>k(()=>import("./MaFondation-B0QSumzf.js"),__vite__mapDeps([184,1,107,15,25,74,37,5,75,32,39,40,2,41,42,43,33,34,14,45,52,53,23,54,51,76,19,108,91,63,20,109,110,80,68,66,65,64,105,87,84,88,90,92,48,93,46,47,49,21,16,94,95,96,69,97,98,99,60,100,101,86,3]))),_C=l.lazy(()=>k(()=>import("./DocusignOAuthConsent-CtAuHGTr.js"),__vite__mapDeps([185,5,1,18,159,28,3]))),RC=l.lazy(()=>k(()=>import("./DocusignPrivacy-BQo3B5TI.js"),__vite__mapDeps([186,5,1,3]))),PC=l.lazy(()=>k(()=>import("./DocusignTerms-CPEF1GGE.js"),__vite__mapDeps([187,5,1,3]))),TC=l.lazy(()=>k(()=>import("./Cgu-D_PvLq1r.js"),__vite__mapDeps([188,189,5,1,3]))),AC=l.lazy(()=>k(()=>import("./PolitiqueConfidentialite-D4W_ftlp.js"),__vite__mapDeps([190,189,5,1,3]))),MC=l.lazy(()=>k(()=>import("./MentionsLegales-D87L8I3c.js"),__vite__mapDeps([191,189,5,1,3]))),jC=l.lazy(()=>k(()=>import("./CguConsentGate-ijPk21tK.js"),__vite__mapDeps([192,1,5,67,41,68,3]))),OC=l.lazy(()=>k(()=>import("./EntitySelectionGate-Bz14FxFl.js"),__vite__mapDeps([193,5,1,3]))),NC=()=>{const{user:e,profile:t,loading:n,isFides:r}=De(),{needsSelection:s,loading:o}=or();return n?c.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Chargement"})}):e?t!=null&&t.cgu_accepted_at?!r&&o?c.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Chargement"})}):s?c.jsx(OC,{}):r?c.jsx($w,{}):c.jsx(PE,{}):c.jsx(jC,{}):c.jsx(Ht,{to:Le.auth,replace:!0})},se=({children:e})=>{const{isFides:t}=De();return t?e:c.jsx(Ht,{to:Se.dashboard,replace:!0})},ke=({allow:e,children:t})=>{const{roles:n}=De();return n.some(r=>e.includes(r))?t:c.jsx(Ht,{to:Se.dashboard,replace:!0})},We=({children:e})=>{const{isFides:t}=De();return t?c.jsx(Ht,{to:Se.dashboard,replace:!0}):e},hr=({children:e})=>{const{contractSlug:t}=zs(),{currentEspace:n,espaceLoading:r}=Hs(),s=Fr(t);return s?r?c.jsx(Vr,{}):Fx(s,n)?e:c.jsx(Ya,{message:"Ce module n'est pas accessible depuis votre espace client."}):c.jsx(Jn,{})},IC=()=>{const{isFides:e}=De();return e?c.jsx(NE,{}):c.jsx(IE,{})},DC=()=>{const{contractSlug:e}=zs();return Fr(e)?c.jsx(KE,{}):c.jsx(Jn,{})},kC=()=>{const{contractSlug:e}=zs(),[t]=Xu(),{user:n,isFides:r}=De(),{data:s,isPending:o}=Cd(n==null?void 0:n.id),a=Fr(e);if(!a)return c.jsx(Jn,{});if(a==="voyage"){const u=t.has("edit");if(!r&&!u){if(o)return c.jsx(Vr,{});const d=ua("voyage");if(!((s==null?void 0:s.types)??[]).some(h=>d.includes(h)))return c.jsx(Ya,{message:"Vous n'avez aucun contrat Voyage - Annulation actif."})}return c.jsx(Zf,{})}const i=yd(a);return i?c.jsx(yr,{module:i,allowedContratTypes:i==="voyage"?[...ua(a)]:void 0}):c.jsx(Jn,{})},LC=()=>{const{contractSlug:e}=zs(),t=Fr(e);return t?t!=="voyage"?c.jsx(Ht,{to:wd(t),replace:!0}):c.jsx(yr,{module:"voyage",allowedContratTypes:[...ua("voyage")]}):c.jsx(Jn,{})},FC=[{path:Se.dashboard,element:c.jsx(IC,{})},{path:K.school.list,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.EcolesRead,children:c.jsx(DE,{})})})},{path:K.school.create,element:c.jsx(Z,{permission:Q.EcolesCreate,children:c.jsx(Dc,{})})},{path:K.school.read,element:c.jsx(Z,{permission:Q.EcolesRead,children:c.jsx(kE,{})})},{path:K.school.edit,element:c.jsx(Z,{permission:Q.EcolesUpdate,children:c.jsx(Dc,{})})},{path:K.syndic.list,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.SyndicRead,children:c.jsx(LE,{})})})},{path:K.syndic.create,element:c.jsx(Z,{permission:Q.SyndicCreate,children:c.jsx(kc,{})})},{path:K.syndic.read,element:c.jsx(Z,{permission:Q.SyndicRead,children:c.jsx(FE,{})})},{path:K.syndic.edit,element:c.jsx(Z,{permission:Q.SyndicUpdate,children:c.jsx(kc,{})})},{path:K.immeuble.list,element:c.jsx(Z,{permission:Q.SyndicRead,children:c.jsx($E,{})})},{path:K.immeuble.create,element:c.jsx(Z,{permission:Q.SyndicCreate,children:c.jsx(UE,{})})},{path:K.immeuble.read,element:c.jsx(Z,{permission:Q.SyndicRead,children:c.jsx(BE,{})})},{path:K.immeuble.edit,element:c.jsx(Z,{permission:Q.SyndicUpdate,children:c.jsx(VE,{})})},{path:K.association.list,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.AssociationsRead,children:c.jsx(WE,{})})})},{path:K.association.create,element:c.jsx(Z,{permission:Q.AssociationsCreate,children:c.jsx(Lc,{})})},{path:K.association.read,element:c.jsx(Z,{permission:Q.AssociationsRead,children:c.jsx(zE,{})})},{path:K.association.edit,element:c.jsx(Z,{permission:Q.AssociationsUpdate,children:c.jsx(Lc,{})})},{path:K.company.list,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.EntreprisesRead,children:c.jsx(qE,{})})})},{path:K.company.create,element:c.jsx(Z,{permission:Q.EntreprisesCreate,children:c.jsx(Fc,{})})},{path:K.company.read,element:c.jsx(Z,{permission:Q.EntreprisesRead,children:c.jsx(HE,{})})},{path:K.company.edit,element:c.jsx(Z,{permission:Q.EntreprisesUpdate,children:c.jsx(Fc,{})})},{path:K.user.list,element:c.jsx(ke,{allow:["super_admin","superviseur","gestionnaire"],children:c.jsx(YE,{})})},{path:K.user.create,element:c.jsx(ke,{allow:["super_admin","superviseur","gestionnaire","manager","utilisateur_fondation"],children:c.jsx($c,{})})},{path:K.user.read,element:c.jsx(ke,{allow:["super_admin","superviseur","gestionnaire","manager","utilisateur","utilisateur_fondation"],children:c.jsx($c,{})})},{path:Se.guidedDeclaration,element:c.jsx(fC,{})},{path:Se.documents,element:c.jsx(Z,{permission:Q.DocumentsRead,children:c.jsx(tC,{})})},{path:Se.account,element:c.jsx(hC,{})},{path:Se.foundation,element:c.jsx(SC,{})}],$C=[{path:be.sinistre.list,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.SinistresRead,children:c.jsx(GE,{})})})},{path:be.sinistre.create,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.SinistresCreate,children:c.jsx(yr,{})})})},{path:be.sinistre.read,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.SinistresRead,children:c.jsx(Nt,{})})})},{path:be.sinistre.edit,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.SinistresUpdate,children:c.jsx(Nt,{})})})},{path:be.accident.list,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.AccidentsRead,children:c.jsx(QE,{})})})},{path:be.accident.create,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.AccidentsCreate,children:c.jsx(yr,{module:"accident"})})})},{path:be.accident.read,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.AccidentsRead,children:c.jsx(Nt,{})})})},{path:be.accident.edit,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.AccidentsUpdate,children:c.jsx(Nt,{})})})},{path:be.voyage.list,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.VoyagesRead,children:c.jsx(ZE,{})})})},{path:be.voyage.create,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.VoyagesCreate,children:c.jsx(Zf,{})})})},{path:be.voyage.claimCreate,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.VoyagesCreate,children:c.jsx(yr,{module:"voyage"})})})},{path:be.voyage.read,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.VoyagesRead,children:c.jsx(Nt,{})})})},{path:be.voyage.edit,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.VoyagesUpdate,children:c.jsx(Nt,{})})})},{path:ue.analytics,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.AnalytiqueRead,children:c.jsx(nC,{})})})},{path:ue.absences,element:c.jsx(se,{children:c.jsx(ke,{allow:["super_admin","superviseur","gestionnaire"],children:c.jsx(sC,{})})})},{path:ue.facturationVoyages,element:c.jsx(se,{children:c.jsx(ke,{allow:["super_admin"],children:c.jsx(XE,{})})})},{path:ue.bulkDocumentsEcoles,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.EcolesUpdate,children:c.jsx(JE,{})})})},{path:ue.bulkDocumentsAssociations,element:c.jsx(se,{children:c.jsx(Z,{permission:Q.AssociationsUpdate,children:c.jsx(eC,{})})})},{path:ue.permissions,element:c.jsx(se,{children:c.jsx(ke,{allow:["admin_technique"],children:c.jsx(rC,{})})})},{path:ue.modulesConfig,element:c.jsx(se,{children:c.jsx(ke,{allow:["super_admin","admin_technique"],children:c.jsx(iC,{})})})},{path:ue.decisionTree,element:c.jsx(se,{children:c.jsx(ke,{allow:["admin_technique"],children:c.jsx(cC,{})})})},{path:ue.formBuilder,element:c.jsx(se,{children:c.jsx(ke,{allow:["admin_technique"],children:c.jsx(lC,{})})})},{path:ue.emailTemplates,element:c.jsx(se,{children:c.jsx(ke,{allow:["super_admin","admin_technique"],children:c.jsx(uC,{})})})},{path:ue.migration,element:c.jsx(se,{children:c.jsx(ke,{allow:["admin_technique"],children:c.jsx(oC,{})})})},{path:ue.signature,element:c.jsx(se,{children:c.jsx(ke,{allow:["admin_technique"],children:c.jsx(aC,{})})})},{path:ue.bandeauAccueil,element:c.jsx(se,{children:c.jsx(ke,{allow:["super_admin"],children:c.jsx(dC,{})})})}],VC=[{path:Re.list,element:c.jsx(We,{children:c.jsx(hr,{children:c.jsx(DC,{})})})},{path:Re.create,element:c.jsx(We,{children:c.jsx(hr,{children:c.jsx(kC,{})})})},{path:Re.claimCreate,element:c.jsx(We,{children:c.jsx(hr,{children:c.jsx(LC,{})})})},{path:Re.read,element:c.jsx(We,{children:c.jsx(hr,{children:c.jsx(Nt,{})})})},{path:Re.edit,element:c.jsx(We,{children:c.jsx(hr,{children:c.jsx(Nt,{})})})},{path:Je.contacts,element:c.jsx(We,{children:c.jsx(mC,{})})},{path:Je.schoolCertificate,element:c.jsx(We,{children:c.jsx(pC,{})})},{path:Je.certificateHub,element:c.jsx(We,{children:c.jsx(gC,{})})},{path:Je.multiRiskCertificate,element:c.jsx(We,{children:c.jsx(vC,{})})},{path:Je.liabilityCertificate,element:c.jsx(We,{children:c.jsx(yC,{})})},{path:Je.subscriptions,element:c.jsx(We,{children:c.jsx(bC,{})})},{path:Je.mesSinistres,element:c.jsx(We,{children:c.jsx(xC,{})})}],UC=()=>c.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:"Chargement"})}),BC=()=>c.jsx(l.Suspense,{fallback:c.jsx(UC,{}),children:c.jsxs(v0,{children:[c.jsx(ye,{path:Le.auth,element:c.jsx(ME,{})}),c.jsx(ye,{path:Le.forgotPassword,element:c.jsx(jE,{})}),c.jsx(ye,{path:Le.resetPassword,element:c.jsx(OE,{})}),c.jsx(ye,{path:Le.apiDocs,element:c.jsx(wC,{})}),c.jsx(ye,{path:Le.cgu,element:c.jsx(TC,{})}),c.jsx(ye,{path:Le.politiqueConfidentialite,element:c.jsx(AC,{})}),c.jsx(ye,{path:Le.mentionsLegales,element:c.jsx(MC,{})}),c.jsx(ye,{path:"/espaceparents",element:c.jsx(EC,{})}),c.jsx(ye,{path:"/espaceparents/attestation",element:c.jsx(CC,{})}),c.jsx(ye,{path:"/Docusign/oauth-consent",element:c.jsx(_C,{})}),c.jsx(ye,{path:"/docusign/oauth-consent",element:c.jsx(Ht,{to:`/Docusign/oauth-consent${window.location.search}`,replace:!0})}),c.jsx(ye,{path:"/Docusign/privacy",element:c.jsx(RC,{})}),c.jsx(ye,{path:"/docusign/privacy",element:c.jsx(Ht,{to:`/Docusign/privacy${window.location.search}`,replace:!0})}),c.jsx(ye,{path:"/Docusign/terms",element:c.jsx(PC,{})}),c.jsx(ye,{path:"/docusign/terms",element:c.jsx(Ht,{to:`/Docusign/terms${window.location.search}`,replace:!0})}),c.jsxs(ye,{element:c.jsx(NC,{}),children:[FC.map(e=>c.jsx(ye,{path:e.path,element:e.element},e.path)),$C.map(e=>c.jsx(ye,{path:e.path,element:e.element},e.path)),VC.map(e=>c.jsx(ye,{path:e.path,element:e.element},e.path))]}),c.jsx(ye,{path:Le.notFound,element:c.jsx(Jn,{})})]})}),WC=new fy({defaultOptions:{queries:{staleTime:5*60*1e3,gcTime:30*60*1e3,refetchOnWindowFocus:!1,retry:1}}}),zC=()=>
283c.jsx(my,{client:WC,children:c.jsxs(Pu,{children:[c.jsx(Rp,{}),c.jsx(og,{}),c.jsx(R0,{children:c.jsx(U0,{children:c.jsx(z0,{children:c.jsx(Z0,{children:c.jsx(BC,{})})})})})]})}),Vc="__stale_chunk_reloaded_at",Xf=e=>!!e&&(e.includes("Failed to fetch dynamically imported module")||e.includes("Importing a module script failed")||e.includes("error loading dynamically imported module")),Jf=()=>{try{const e=Number(sessionStorage.getItem(Vc)||"0");if(Date.now()-e<1e4)return;sessionStorage.setItem(Vc,String(Date.now())),window.location.reload()}catch{window.location.reload()}};window.addEventListener("error",e=>{Xf(e.message)&&Jf()});window.addEventListener("unhandledrejection",e=>{const t=e.reason,n=typeof t=="string"?t:t==null?void 0:t.message;Xf(n)&&Jf()});tl(document.getElementById("root")).render(c.jsx(zC,{}));export{KC as $,Hs as A,ad as B,Ml as C,Ga as D,rn as E,Rm as F,zs as G,Vr as H,Td as I,Bx as J,gS as K,Zu as L,vo as M,nS as N,Md as O,Le as P,Tl as Q,Xu as R,da as S,Ra as T,cS as U,Yt as V,Al as W,kl as X,oe as Y,Dl as Z,Hx as _,ft as a,SS as a$,vS as a0,yS as a1,wc as a2,$x as a3,Yx as a4,TS as a5,Nw as a6,fS as a7,pE as a8,gE as a9,m1 as aA,B as aB,Bd as aC,bn as aD,yn as aE,mv as aF,Cm as aG,PS as aH,tc as aI,iS as aJ,oS as aK,K0 as aL,Ya as aM,Ns as aN,Il as aO,pc as aP,_S as aQ,rS as aR,Ju as aS,aS as aT,RS as aU,Tm as aV,Lm as aW,Om as aX,Hp as aY,nl as aZ,Ox as a_,Kf as aa,Qf as ab,jl as ac,wm as ad,iw as ae,DS as af,OS as ag,cw as ah,Ii as ai,Di as aj,Wo as ak,k as al,IS as am,Jr as an,sc as ao,NS as ap,Rd as aq,tS as ar,eS as as,za as at,sS as au,Fd as av,Ms as aw,h1 as ax,me as ay,Ee as az,$r as b,Zb as b$,Je as b0,Fr as b1,AS as b2,lS as b3,jx as b4,vd as b5,xd as b6,Wx as b7,or as b8,pS as b9,ju as bA,yt as bB,pu as bC,gu as bD,Ea as bE,Fs as bF,xa as bG,Qh as bH,Ue as bI,S1 as bJ,Kw as bK,ef as bL,$d as bM,As as bN,vu as bO,yu as bP,GC as bQ,nt as bR,gn as bS,Rr as bT,ac as bU,id as bV,Ys as bW,fb as bX,Kb as bY,gb as bZ,Cs as b_,Lr as ba,mS as bb,Ix as bc,hS as bd,CS as be,B0 as bf,it as bg,QC as bh,Aw as bi,xS as bj,$m as bk,dS as bl,ES as bm,oc as bn,Ux as bo,ms as bp,vn as bq,wS as br,lb as bs,Em as bt,kr as bu,qo as bv,wr as bw,ly as bx,Ce as by,Ne as bz,pn as c,Jb as c0,mb as c1,po as c2,ur as c3,dr as c4,Db as c5,nb as c6,Rl as c7,uS as c8,yd as c9,Vx as cA,Vm as cB,Nl as cC,Se as cD,Qt as cE,q0 as cF,Ht as cG,ZC as cH,us as ca,pa as cb,ma as cc,Od as cd,Ld as ce,Nd as cf,Dm as cg,Am as ch,kd as ci,Dd as cj,Id as ck,ha as cl,jd as cm,Mm as cn,Gs as co,Tw as cp,mc as cq,jS as cr,MS as cs,ow as ct,Bm as cu,px as cv,xm as cw,jm as cx,km as cy,Im as cz,De as d,bw as e,_m as f,hy as g,_E as h,wd as i,c as j,Sd as k,_d as l,Cd as m,zx as n,Ie as o,ua as p,hc as q,fa as r,le as s,JC as t,rl as u,wn as v,bd as w,bS as x,Ed as y,X as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.