PageSourceSearch

https://vpdive.com/_nuxt/B808CsEz.js

js vpdive.com collected 2026-10-01 15:39:41 UTC 49,209 bytes, 1 lines download raw bytes

1import{d as ae,bS as Ee,e as a,c as n,i as h,t as g,g as u,j as o,Q as he,u as Qe,y as Ye,ai as Ie,z as Ze,o as Ae,l as s,h as i,v as xe,F as I,r as J,m as Xe,W as et,_ as Oe,q as b,p as ue,x as Fe,k as y,R as Ge,n as oe,K as tt,f as D,a4 as st,B as A,ac as ot,w as se,C as ce,A as He,aw as Ke,a1 as Je,L as at,a3 as nt,G as We,O as rt,D as lt,J as it,a as je,Y as ut,c8 as ct,af as fe,a2 as De,ab as Ve,bw as dt,c9 as mt,as as Le,Z as gt}from"./CO-mOBGH.js";import{u as pt}from"./Digangeb.js";import{_ as vt,a as ft}from"./DkiJOFqP.js";import{u as ht,a as xt}from"./B2G65arc.js";import{u as Re}from"./BZgCY5IF.js";import{_ as bt}from"./qYSZNZf0.js";import{_ as Me}from"./DTMsOJTh.js";import yt from"./BqKq8M6o.js";import{g as kt,a as _t}from"./bkOMnob5.js";import{u as wt}from"./DSdO2G-L.js";import{u as Ct}from"./VOE__KuV.js";import{u as $t}from"./Bb4xKwA9.js";import{u as St}from"./BSFV989u.js";import{u as Tt}from"./C1crRDqT.js";import"./BMdb7MEJ.js";import"./ClDyRlTh.js";import"./DaxGuycW.js";import"./C2GyzqVZ.js";import"./zUAr3M-k.js";import"./BsJ2bgZX.js";import"./5_SeVuGY.js";import"./CDxoUKFv.js";import"./wneedS0W.js";const Dt=["aria-label"],Et=ae({__name:"CartAmountBadge",props:{mobile:{type:Boolean,default:!1}},setup(N){const C=Ee(),{formatEuro:P}=pt();return(V,k)=>a(C).cartAmount>0?(o(),n("span",{key:0,class:h(["cart-amount-badge bg-red-500",N.mobile?"cart-amount-badge--inline":"cart-amount-badge--floating"]),"aria-label":`${a(P)(a(C).cartAmount)} à payer`},g(a(P)(a(C).cartAmount)),11,Dt)):u("",!0)}}),At=he(Et,[["__scopeId","data-v-8192f197"]]),Nt={class:"flex flex-col h-full relative"},Pt={class:"flex items-center justify-between p-4 bg-[#1b2441]"},jt={class:"flex items-center gap-2"},Lt={class:"md:hidden absolute bottom-6 left-[-75px] text-white"},Ot={key:0,class:"flex-1 overflow-y-auto divide-y"},Rt={key:1,class:"flex-1 flex items-center justify-center text-gray-500"},Vt={key:2,class:"flex-1 overflow-y-auto divide-y"},Mt=["href","onClick"],Bt={class:"flex-1 p-4"},Ut={key:0,class:"flex gap-3"},zt=["src","alt"],It={class:"flex-1"},Ft={class:"flex items-start justify-between"},Gt={class:"font-medium"},Ht={class:"text-sm text-gray-500"},Kt={class:"text-gray-600 text-sm mt-1"},Jt={key:0,class:"inline-block mt-2 px-6 py-1 bg-[#2EC07E] text-white rounded-sm text-sm hover:bg-green-600"},Wt={key:1},qt={class:"flex justify-between items-start"},Qt={class:"text-gray-600"},Yt={class:"text-sm text-gray-500 ml-2"},Zt={class:"p-3 border-t bg-[#1b2441]"},Xt=ae({__name:"NotificationPanel",emits:["close"],setup(N,{emit:C}){const P=Fe(),V=Qe(),{t:k}=Ye(),$=Ee(),j=Ie(),{getNotificationHref:F,resolveNotificationPath:_,isNewTabClick:E}=ht();Ze();const G=C;Ae(async()=>{await $.fetchNotifications()});const S=y(()=>$.notifications),M=y(()=>$.isLoading),W=x=>{if(typeof x.message=="string"&&x.message.includes("<b>")){let p=x.message;return p=p.replace(/<b>(.*?)<\/b>/g,"$1"),p}else if(typeof x.message=="object"&&x.message.message){let p=x.message.message;return x.message.parameters&&Object.entries(x.message.parameters).forEach(([L,O])=>{p=p.replace(L,String(O))}),p}return x.original_message||"Nouvelle notification"},de=async(x,p)=>{const L=E(p);if(L||p?.preventDefault(),$.markAsRead(x.id),x.token)try{await Ge(`/api/notifications/read/${x.token}`,{method:"POST"})}catch(U){console.error("Erreur marquage notification:",U)}if(L)return;const{getProfileModificationUrl:O}=xt(),v=O(x);if(v){G("close"),oe(v);return}if(x.url){const{switchClubFromUrl:U}=tt();if(U(x.url,x.link)){G("close");return}X(x)}},X=x=>{const p=_(x);if(!p)return;const L=p.startsWith("http");x.blank===!0&&!j.isMobile?window.open(p,"_blank"):L?window.location.href=p:V.push(p),G("close")},B=()=>{V.push("/app/notifications/settings")};return(x,p)=>{const L=xe,O=Oe;return o(),n("div",Nt,[s("div",Pt,[p[1]||(p[1]=s("h2",{class:"text-2xl font-semibold text-white"},"Notifications",-1)),s("div",jt,[s("button",{onClick:B,class:"text-white hover:text-gray-500"},[i(L,{name:"heroicons:cog-6-tooth",class:"w-6 h-6"})]),s("button",{onClick:p[0]||(p[0]=v=>x.$emit("close")),class:"text-white hover:text-gray-500"},[i(L,{name:"heroicons:x-mark",class:"w-6 h-6"})])])]),s("div",Lt,[i(L,{name:"material-symbols:arrow-right-alt",class:"w-8 h-8"})]),a(M)?(o(),n("div",Ot,[(o(),n(I,null,J(5,v=>s("div",{key:v,class:"relative flex hover:bg-gray-50 transition-colors"},[...p[2]||(p[2]=[Xe('<div class="w-1.5 bg-[#2EC07E]" data-v-a8449d52></div><div class="flex-1 p-4" data-v-a8449d52><div class="flex gap-3" data-v-a8449d52><div class="w-10 h-10 rounded-full bg-gray-200 animate-pulse" data-v-a8449d52></div><div class="flex-1" data-v-a8449d52><div class="flex items-start justify-between" data-v-a8449d52><div class="h-5 bg-gray-200 rounded w-1/3 animate-pulse" data-v-a8449d52></div><div class="h-4 bg-gray-100 rounded w-16 animate-pulse" data-v-a8449d52></div></div><div class="h-4 bg-gray-100 rounded w-2/3 mt-2 animate-pulse" data-v-a8449d52></div><div class="h-4 bg-gray-100 rounded w-1/2 mt-1 animate-pulse" data-v-a8449d52></div></div></div></div>',2)])])),64))])):a(S).length?(o(),n("div",Vt,[(o(!0),n(I,null,J(a(S),v=>(o(),n("a",{key:v.id,href:a(F)(v),class:"relative flex transition-colors cursor-pointer hover:bg-gray-50",style:et(a($).isRead(v)?{}:{boxShadow:"inset 4px 0 0 0 #2EC07E"}),onClick:U=>de(v,U)},[s("div",Bt,[v.picture?(o(),n("div",Ut,[s("img",{src:a(P).public.vpdivePublic+v.picture,alt:v.picture_alt,class:"w-10 h-10 rounded-full object-cover"},null,8,zt),s("div",It,[s("div",Ft,[s("p",Gt,g(v.from?.[0]||v.picture_alt),1),s("span",Ht,g(v.time),1)]),s("p",Kt,g(a(k)(W(v))),1),v.url?(o(),n("span",Jt," Ouvrir ")):u("",!0)])])):(o(),n("div",Wt,[s("div",qt,[s("p",Qt,g(a(k)(W(v))),1),s("span",Yt,g(v.time),1)])]))])],12,Mt))),128))])):(o(),n("div",Rt," Aucune notification ")),s("div",Zt,[i(O,{to:"/app/notifications",class:"block w-full px-4 py-2 bg-[#1b2441] text-white text-sm text-center rounded-sm hover:bg-[#2a3557] transition-colors"},{default:b(()=>
1[...p[3]||(p[3]=[ue(" Voir toutes les notifications ",-1)])]),_:1})])])}}}),es=he(Xt,[["__scopeId","data-v-a8449d52"]]),ts={key:0,class:"text-xs mt-1"},Be=ae({__name:"NotificationBadge",props:{icon:{type:String,default:"material-symbols:notifications-outline"},label:{type:String,default:"Alertes",required:!1},mobile:{type:Boolean,default:!1}},emits:["click"],setup(N){const C=Ee();return(P,V)=>{const k=xe;return o(),n("button",{onClick:V[0]||(V[0]=$=>P.$emit("click")),class:"relative flex flex-col items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors"},[i(k,{name:N.icon,class:"w-7 h-7 mb-1"},null,8,["name"]),N.label?(o(),n("span",ts,g(N.label),1)):u("",!0),a(C).notificationCount>0?(o(),n("span",{key:1,class:h(["absolute flex items-center justify-center bg-red-500 text-white text-xs rounded-full font-bold text-xs",N.mobile?" top-1 right-1 w-5 h-5 p-3":" top-[-2px] right-1 w-5 h-5 p-3"])},g(a(C).notificationCount>99?"99+":a(C).notificationCount),3)):u("",!0)])}}}),ss=["aria-label"],os=ae({__name:"MessageUnreadBadge",setup(N){const{getNotificationMessageCount:C}=Re(),P=y(()=>C.value);return(V,k)=>P.value>0?(o(),n("span",{key:0,class:"message-unread-badge bg-red-500","aria-label":`${P.value} message(s) non lu(s)`},g(P.value>99?"99+":P.value),9,ss)):u("",!0)}}),Ue=he(os,[["__scopeId","data-v-ec005614"]]),as={key:0,class:"text-xs mt-1"},ns={class:"text-sm text-gray-600"},rs={class:"flex justify-end gap-3"},ze=ae({__name:"VPMembershipCampaignBadge",props:{mobile:{type:Boolean,default:!1}},setup(N){const{getCampaigns:C,fetchHomeInfo:P}=Re(),V=y(()=>C.value.length>0),k=A(!1),$=y(()=>C.value.length>1?"Campagnes d'adhésion disponibles":"Campagne d'adhésion disponible"),j=y(()=>C.value.length>1?"Plusieurs campagnes d'adhésion sont disponibles pour votre profil. Retrouvez-les et complétez-les depuis la page d'accueil.":"Une campagne d'adhésion est disponible pour votre profil. Vous pouvez y accéder et la compléter depuis la page d'accueil."),F=()=>{k.value=!1,oe("/app/dashboard")};return Ae(()=>{P()}),(_,E)=>{const G=xe;return o(),n(I,null,[a(V)?(o(),n("button",{key:0,onClick:E[0]||(E[0]=S=>k.value=!0),title:"Campagne d'adhésion disponible",class:h(["relative flex flex-col items-center text-gray-600 hover:text-primary transition-colors nav-item-mobile nav-entry",N.mobile?"py-2 px-2":"py-2 px-4"])},[s("span",{class:h(["relative inline-flex",{"mb-1":!N.mobile}])},[i(G,{name:"material-symbols:campaign-outline",class:"w-6 h-6"}),E[3]||(E[3]=s("span",{class:"absolute -top-1 -right-1 flex h-2.5 w-2.5"},[s("span",{class:"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"}),s("span",{class:"relative inline-flex rounded-full h-2.5 w-2.5 bg-primary"})],-1))],2),N.mobile?u("",!0):(o(),n("span",as,"Adhésion"))],2)):u("",!0),a(V)?(o(),D(bt,{key:1,modelValue:a(k),"onUpdate:modelValue":E[2]||(E[2]=S=>st(k)?k.value=S:null),title:a($),icon:"material-symbols:campaign-outline",color:"blue",size:"md"},{footer:b(()=>[s("div",rs,[i(Me,{text:"Fermer",color:"secondary",variant:"outlined",size:"sm",onClick:E[1]||(E[1]=S=>k.value=!1)}),i(Me,{text:"Aller à l'accueil",color:"primary",size:"sm",onClick:F})])]),default:b(()=>[s("p",ns,g(a(j)),1)]),_:1},8,["modelValue","title"])):u("",!0)],64)}}}),ls={key:0,class:"permission-debugger-overlay"},is={class:"permission-debugger"},us={class:"header"},cs={class:"flex items-center justify-between p-3 bg-red-600 text-white rounded-t-lg"},ds={class:"flex items-center"},ms={class:"flex items-center space-x-2"},gs={class:"flex bg-red-500"},ps={key:0,class:"p-6 bg-gradient-to-r from-gray-50 to-gray-100 dark:from-gray-800 dark:to-gray-850 border-b border-gray-200 dark:border-gray-700"},vs={class:"relative group"},fs={class:"relative"},hs={key:0,class:"mt-3 flex items-center justify-between text-xs"},xs={class:"flex items-center space-x-2 text-gray-600 dark:text-gray-400"},bs={class:"p-4 bg-white dark:bg-gray-900 overflow-y-auto max-h-[500px]"},ys={key:0},ks={key:0,class:"mb-4"},_s={class:"flex items-center mb-2"},ws={class:"ml-2 px-2 py-0.5 text-xs bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-full"},Cs={class:"bg-white dark:bg-gray-800 rounded-lg p-3 shadow"},$s={key:0,class:"text-gray-500 dark:text-gray-400 text-sm"},Ss={key:1,class:"flex flex-wrap gap-2"},Ts={key:1},Ds={class:"flex items-center mb-2"},Es={class:"ml-2 px-2 py-0.5 text-xs bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 rounded-full"},As={key:0,class:"flex items-center bg-white dark:bg-gray-800 p-2 rounded-lg shadow hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"},Ns=["onClick"],Ps={class:"text-sm dark:text-white flex-grow text-left"},js={key:1,class:"mb-3"},Ls=["onClick"],Os={class:"flex items-center"},Rs={class:"font-medium text-sm dark:text-white"},Vs={class:"px-2 py-0.5 text-xs bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200 rounded-full"},Ms={key:0,class:"bg-white dark:bg-gray-800 p-2 rounded-b-lg shadow border-t border-gray-200 dark:border-gray-700"},Bs=["onClick"],Us={class:"text-sm dark:text-white flex-grow text-left"},zs={key:2,class:"text-center py-8 text-gray-500 dark:text-gray-400"},Is={class:"text-sm"},Fs={key:1,class:"space-y-4"},Gs={class:"bg-white dark:bg-gray-800 rounded-lg p-4 shadow"},Hs={class:"text-md font-semibold dark:text-white mb-3 flex items-center"},Ks={class:"space-y-2 text-sm"},Js={class:"flex justify-between"},Ws={key:0,class:"flex justify-between"},qs={class:"dark:text-white"},Qs={class:"flex justify-between"},Ys={class:"bg-white dark:bg-gray-800 rounded-lg p-4 shadow"},Zs={class:"text-md font-semibold dark:text-white mb-3 flex items-center"},Xs={class:"space-y-2 text-sm"},eo={class:"flex justify-between"},to={class:"flex justify-between"},so={key:0,class:"mt-4 pt-3 border-t border-gray-200 dark:border-gray-600"},oo={class:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-2"},ao={class:"space-y-1"}
1,no={class:"font-mono text-blue-600 dark:text-blue-400"},ro={class:"text-gray-500 dark:text-gray-400"},lo={key:1,class:"mt-4 pt-3 border-t border-gray-200 dark:border-gray-600"},io={key:0,class:"space-y-1"},uo={class:"text-xs text-gray-500 dark:text-gray-400 mb-2"},co={class:"font-mono text-gray-600 dark:text-gray-400"},mo={class:"text-gray-500 dark:text-gray-400"},go={key:1,class:"text-xs text-red-500 dark:text-red-400"},po={class:"bg-white dark:bg-gray-800 rounded-lg p-4 shadow"},vo={class:"text-md font-semibold dark:text-white mb-3 flex items-center"},fo={class:"max-h-32 overflow-y-auto space-y-1 text-xs"},ho={key:0,class:"text-gray-500 dark:text-gray-400"},xo={class:"bg-white dark:bg-gray-800 rounded-lg p-4 shadow"},bo={class:"text-md font-semibold dark:text-white mb-3 flex items-center"},yo={class:"flex flex-wrap gap-2"},ko={class:"p-2 bg-gray-200 dark:bg-gray-800 text-xs text-gray-600 dark:text-gray-400 rounded-b-lg"},_o={class:"flex justify-between items-center"},wo={key:0,class:"text-orange-600 dark:text-orange-400 font-medium"},Co=ae({__name:"PermissionDebugger",props:{showFloatingButton:{type:Boolean,default:!0},startVisible:{type:Boolean,default:!1}},emits:["update:visible"],setup(N,{expose:C,emit:P}){const V=N,k=ot(),$=A(V.startVisible),j=A({}),F=A(!1),_=A(""),E=A(!1),G=A(null),S=A("permissions"),M=A([]),{user:W,isAuthenticated:de}=We(),X=y(()=>de.value?"authenticated":"unauthenticated"),B=y(()=>"Cookie httpOnly (non accessible côté client)"),x=t=>{if(typeof document>"u")return null;try{const r=`; ${document.cookie}`.split(`; ${t}=`);return r.length===2&&r.pop()?.split(";").shift()||null}catch(e){return console.warn(`Erreur lors de la lecture du cookie ${t}:`,e),null}},p=y(()=>{try{if(typeof document<"u"){const t=document.cookie.split(";").map(r=>{const[m,l]=r.trim().split("=");return{name:m||"",value:l?l.length>30?l.substring(0,30)+"...":l:"",fullValue:l||""}}).filter(r=>r.name);let e=null;try{const{getAuthToken:r}=lt();e=r()}catch{e=localStorage.getItem("auth-token")}return e&&t.push({name:"auth-token (cookie/localStorage)",value:e.substring(0,30)+"...",fullValue:e}),console.log("Debug: Tous les cookies détectés:",t.map(r=>r.name)),t}return[]}catch(t){return console.warn("Erreur lors de la lecture des cookies:",t),[]}}),L=y(()=>{try{const t=["user_token","userToken","auth_token","token","authToken"];for(const e of t){const r=x(e);if(r)return console.log(`Debug: Cookie trouvé - ${e}:`,r.substring(0,20)+"..."),console.log("Debug userTokenCookie computed: retourne",r),r}return console.log("Debug: Aucun cookie user_token trouvé dans:",t),console.log("Debug userTokenCookie computed: retourne null"),null}catch(t){return console.warn("Erreur lors de la lecture des cookies user:",t),null}}),O=y(()=>{try{const t=["auth.token","auth.session-token","session","authSession","nuxt-auth.session-token","auth-session","sessionToken","__Secure-authjs.session-token","next-auth.session-token"];for(const e of t){const r=x(e);if(r)return console.log(`Debug: Cookie session trouvé - ${e}:`,r.substring(0,20)+"..."),r}return console.log("Debug: Aucun cookie de session trouvé dans:",t),null}catch(t){return console.warn("Erreur lors de la lecture des cookies session:",t),null}}),v=y(()=>p.value.filter(t=>t.name.toLowerCase().includes("token")||t.name.toLowerCase().includes("auth")||t.name.toLowerCase().includes("session")||t.name.toLowerCase().includes("user")));se(()=>V.startVisible,t=>{$.value=t});const U=P,H=y(()=>k.roles||[]),R=y(()=>k.permissions||{}),ne=y(()=>{let t=0;const e=r=>{for(const m in r)typeof r[m]=="boolean"?t++:typeof r[m]=="object"&&r[m]!==null&&e(r[m])};return e(R.value),t}),Q=y(()=>_.value?H.value.filter(t=>t.toLowerCase().includes(_.value.toLowerCase())):H.value),re=y(()=>{if(!_.value)return R.value;const t=_.value.toLowerCase(),e=m=>m.toLowerCase().includes(t),r=(m,l="")=>{const c={};for(const[K,z]of Object.entries(m)){const te=l?`${l}.${K}`:K;if(typeof z=="boolean")(e(K)||e(te))&&(c[K]=z);else if(typeof z=="object"&&z!==null)if(e(K))c[K]=z;else{const d=r(z,te);Object.keys(d).length>0&&(c[K]=d)}}return c};return r(R.value)}),me=y(()=>{let t=0;const e=r=>{for(const m in r)typeof r[m]=="boolean"?t++:typeof r[m]=="object"&&r[m]!==null&&e(r[m])};return e(re.value),t}),be=t=>{let e=0;for(const r in t)typeof t[r]=="boolean"?e++:typeof t[r]=="object"&&t[r]!==null&&(e+=be(t[r]));return e},ye=t=>t.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),Y=()=>{$.value=!$.value,U("update:visible",$.value)},Ne=()=>{$.value=!0,U("update:visible",!0)},ke=()=>{$.value=!1,U("update:visible",!1)},_e=t=>{j.value[t]=!j.value[t]},we=()=>{try{if(R.value&&typeof R.value=="object")for(const t in R.value)R.value[t]&&typeof R.value[t]=="object"&&(j.value[t]=!0)}catch(t){console.error("Erreur lors de l'expansion des sections:",t)}},q=()=>{for(const t in j.value)j.value[t]=!1},le=()=>{_.value=""},ge=()=>{try{R.value&&typeof R.value=="object"&&Object.keys(R.value).length>0&&(G.value=JSON.parse(JSON.stringify(R.value)),console.log("📁 État initial des permissions sauvegardé"))}catch(t){console.error("❌ Erreur lors de la sauvegarde de l'état initial:",t)}},Ce=()=>{try{if(G.value&&k&&k.permissions){const t=JSON.parse(JSON.stringify(G.value));k.setPermissions(k.roles||[],t),E.value=!1,console.log("🔄 Permissions remises à leur état initial")}else console.warn("⚠️ Aucun état initial des permissions sauvegardé ou store indisponible")}catch(t){console.error("❌ Erreur lors de la remise à zéro des permissions:",t)}},$e=t=>{try{const e=t.split(".");let r=k.permissions;for(let l=0;l<e.length-1;l++){if(!r[e[l]]||typeof r[e[l]]!="object"){console.warn(`Chemin de permission invali
1de: ${t}`);return}r=r[e[l]]}const m=e[e.length-1];typeof r[m]=="boolean"?(r[m]=!r[m],E.value=!0,console.log(`✅ Permission "${t}" basculée à: ${r[m]?"Oui":"Non"}`)):console.warn(`❌ La permission "${t}" n'est pas un booléen:`,typeof r[m])}catch(e){console.error("❌ Erreur lors du basculement de la permission:",e)}},f=(t,e="error")=>{const r=new Date().toLocaleTimeString();M.value.unshift({timestamp:r,message:t,type:e}),M.value.length>10&&(M.value=M.value.slice(0,10))},T=async()=>{try{f("Test auth démarré","info");const t=await Ge("/api/user",{method:"GET"});f("Test auth réussi ✅","info")}catch(t){f(`Test auth échoué: ${t.response?.status||"Erreur réseau"}`,"error")}},Z=async()=>{try{f("🧹 Début du logout complet...","warning");try{f("📤 Tentative de signOut officiel...","info"),await oe("/auth/logout"),f("✅ SignOut officiel réussi","info")}catch(m){f("⚠️ SignOut officiel échoué, nettoyage manuel","warning"),console.warn("Erreur signOut:",m)}f("🍪 Suppression des cookies et localStorage...","info");try{localStorage.removeItem("auth-token"),localStorage.removeItem("user-roles"),localStorage.removeItem("user-permissions"),f("✅ localStorage auth nettoyé","info")}catch{f("⚠️ Erreur nettoyage localStorage","warning")}const t=v.value.map(m=>m.name).filter(m=>!m.startsWith("localStorage:")),e=["user_token","auth.token","auth.session-token","auth.csrf-token","authToken","session","sessionToken","token","nuxt-auth.session-token","__Secure-authjs.session-token"],r=[...new Set([...t,...e])];if(r.forEach(m=>{try{const l=rt(m);l.value=null,typeof document<"u"&&(document.cookie=`${m}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,document.cookie=`${m}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=${window.location.hostname};`,document.cookie=`${m}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.${window.location.hostname};`),console.log(`Debug: Cookie supprimé - ${m}`)}catch(l){console.warn(`Erreur suppression cookie ${m}:`,l)}}),f(`🗑️ ${r.length} cookies supprimés`,"info"),typeof window<"u"){f("💾 Nettoyage localStorage...","info");const l=Object.keys(localStorage).filter(c=>c.toLowerCase().includes("auth")||c.toLowerCase().includes("token")||c.toLowerCase().includes("session")||c.toLowerCase().includes("user")||c.toLowerCase().includes("login"));l.forEach(c=>{localStorage.removeItem(c),console.log(`Debug: LocalStorage supprimé - ${c}`)}),f(`🗑️ ${l.length} éléments localStorage supprimés`,"info")}if(typeof window<"u"&&window.sessionStorage){f("💾 Nettoyage sessionStorage...","info");const l=Object.keys(sessionStorage).filter(c=>c.toLowerCase().includes("auth")||c.toLowerCase().includes("token")||c.toLowerCase().includes("session"));l.forEach(c=>{sessionStorage.removeItem(c),console.log(`Debug: SessionStorage supprimé - ${c}`)}),f(`🗑️ ${l.length} éléments sessionStorage supprimés`,"info")}try{k&&typeof k.setPermissions=="function"?(k.setPermissions([],{}),f("🏪 Store permissions réinitialisé","info")):f("⚠️ Store permissions non disponible","warning")}catch(m){console.warn("Impossible de nettoyer les stores:",m),f("⚠️ Erreur nettoyage stores","warning")}f("✅ Nettoyage terminé ! Redirection...","warning"),console.log("Debug: Nettoyage auth complet terminé"),setTimeout(()=>{f("🔄 Redirection vers login...","info"),console.log("🚨🚨🚨 [PERMISSION DEBUGGER] REDIRECTION FORCÉE VERS LOGIN !"),window.location.replace("/auth/login")},1500)}catch(t){console.error("Erreur lors du nettoyage complet:",t),f("❌ Erreur lors du nettoyage - redirection forcée","error"),setTimeout(()=>{console.log("🚨🚨🚨 [PERMISSION DEBUGGER] REDIRECTION D'URGENCE VERS LOGIN !"),window.location.replace("/auth/login")},2e3)}},pe=()=>{M.value=[]},Pe=()=>{f("Rafraîchissement des cookies...","info"),ce(()=>{console.log("Debug: Rafraîchissement forcé des cookies"),console.log("Debug: document.cookie:",document.cookie),console.log("Debug: userTokenCookie.value:",L.value),
1console.log("Debug: sessionCookie.value:",O.value),console.log("Debug: allCookies.value:",p.value),console.log("Debug: authCookies.value:",v.value),f(`Total cookies: ${p.value.length}, Auth: ${v.value.length}`,"info"),v.value.length>0?f(`Cookies auth trouvés: ${v.value.map(t=>t.name).join(", ")}`,"info"):f("⚠️ Aucun cookie d'auth trouvé","warning")})},ee=t=>{if(console.log("Debug formatToken: token =",t,"type =",typeof t,"length =",t?.length),!t||typeof t!="string"||t.length<1)return console.log("Debug formatToken: retourne ❌"),"❌";const e=`✅ ${t.substring(0,10)}...`;return console.log("Debug formatToken: retourne",e),e},Se=t=>{console.log("Debug getCookieStatus: cookie =",t,"type =",typeof t);const e=t?"✅":"❌";return console.log("Debug getCookieStatus: retourne",e),e};se(()=>R.value,t=>{F.value&&!G.value&&t&&Object.keys(t).length>0&&ge()},{immediate:!1,deep:!0});const ve=t=>t.map(e=>{try{return e===null?"null":e===void 0?"undefined":typeof e=="object"?JSON.stringify(e,null,0):String(e)}catch{return"[Object non-serializable]"}}).join(" "),Te=console.error,ie=console.warn;return Ae(async()=>{F.value=!0,console.error=(...t)=>{const e=ve(t);if(e.includes("Debug")&&e.includes("fast_login")||e.includes("Debug")&&e.includes("profile")){const r=e.replace(/Debug \w+: /,"").substring(0,80);f(r,"error")}Te(...t)},console.warn=(...t)=>{const e=ve(t);if(e.includes("Debug")&&e.includes("fast_login")||e.includes("Debug")&&e.includes("profile")){const r=e.replace(/Debug \w+: /,"").substring(0,80);f(r,"warning")}ie(...t)},await ce(),setTimeout(()=>{ge()},100),ce(()=>{try{we()}catch(t){console.error("Erreur lors de l'expansion des sections:",t)}})}),He(()=>{F.value=!1,console.error=Te,console.warn=ie}),C({show:()=>{$.value=!0,U("update:visible",!0)},hide:()=>{$.value=!1,U("update:visible",!1)},toggle:Y}),(t,e)=>{const r=xe,m=Ke;return o(),D(m,null,{default:b(()=>[$.value||N.showFloatingButton?(o(),D(Je,{key:0,to:"body"},[$.value?(o(),n("div",ls,[s("div",is,[s("div",us,[s("div",cs,[s("div",ds,[i(r,{name:"heroicons:bug-ant",class:"w-5 h-5 mr-2"}),e[7]||(e[7]=s("h2",{class:"text-lg font-semibold"},"Debugger VPDive",-1))]),s("div",ms,[S.value==="permissions"?(o(),n("button",{key:0,onClick:we,class:"px-2 py-1 text-xs bg-red-700 rounded hover:bg-red-800 transition-colors"}," Tout déplier ")):u("",!0),S.value==="permissions"?(o(),n("button",{key:1,onClick:q,class:"px-2 py-1 text-xs bg-red-700 rounded hover:bg-red-800 transition-colors"}," Tout replier ")):u("",!0),S.value==="permissions"?(o(),n("button",{key:2,onClick:Ce,class:"px-2 py-1 text-xs bg-orange-600 rounded hover:bg-orange-700 transition-colors",title:"Remettre les permissions à leur état initial"}," Reset ")):u("",!0),S.value==="auth"?(o(),n("button",{key:3,onClick:pe,class:"px-2 py-1 text-xs bg-orange-600 rounded hover:bg-orange-700 transition-colors"}," Clear Logs ")):u("",!0),s("button",{onClick:ke,class:"p-1 hover:bg-red-700 rounded transition-colors"},[i(r,{name:"heroicons:x-mark",class:"w-5 h-5"})])])]),s("div",gs,[s("button",{onClick:e[0]||(e[0]=l=>S.value="permissions"),class:h(["flex-1 py-2 px-4 text-sm font-medium transition-colors",S.value==="permissions"?"bg-white text-red-600 border-b-2 border-red-600":"text-white hover:bg-red-400"])}," 🔒 Permissions ",2),s("button",{onClick:e[1]||(e[1]=l=>S.value="auth"),class:h(["flex-1 py-2 px-4 text-sm font-medium transition-colors",S.value==="auth"?"bg-white text-red-600 border-b-2 border-red-600":"text-white hover:bg-red-400"])}," 🔑 Authentification ",2)])]),S.value==="permissions"?(o(),n("div",ps,[s("div",vs,[e[9]||(e[9]=s("div",{class:"absolute inset-0 bg-gradient-to-r from-red-500/10 to-orange-500/10 rounded-xl blur-sm opacity-0 group-hover:opacity-100 transition-opacity duration-300"},null,-1)),s("div",fs,[at(s("input",{"onUpdate:modelValue":e[2]||(e[2]=l=>_.value=l),type:"text",placeholder:"🔍 Rechercher un rôle ou une permission...",class:"w-full px-5 py-4 pl-12 pr-12 text-sm border-2 border-gray-200 dark:border-gray-600 rounded-xl bg-white/90 dark:bg-gray-700/90 backdrop-blur-sm text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-4 focus:ring-red-500/20 focus:border-red-500 dark:focus:border-red-400 transition-all duration-300 shadow-lg hover:shadow-xl focus:shadow-2xl"},null,512),[[nt,_.value]]),_.value?(o(),n("button",{key:0,onClick:le,class:"absolute right-4 top-1/2 transform -translate-y-1/2 p-1 rounded-full bg-gray-200 dark:bg-gray-600 text-gray-500 dark:text-gray-400 hover:bg-red-100 dark:hover:bg-red-900/30 hover:text-red-600 dark:hover:text-red-400 transition-all duration-200 shadow-sm",title:"Effacer la recherche"},[i(r,{name:"heroicons:x-mark",class:"w-3 h-3"}
1)])):u("",!0)]),_.value?(o(),n("div",hs,[s("div",xs,[i(r,{name:"heroicons:funnel",class:"w-3 h-3"}),s("span",null,g(Q.value.length)+" rôle"+g(Q.value.length>1?"s":"")+" • "+g(me.value)+" permission"+g(me.value>1?"s":""),1)]),s("button",{onClick:le,class:"flex items-center space-x-1 text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 transition-colors"},[i(r,{name:"heroicons:x-mark",class:"w-3 h-3"}),e[8]||(e[8]=s("span",null,"Effacer",-1))])])):u("",!0)])])):u("",!0),s("div",bs,[S.value==="permissions"?(o(),n("div",ys,[Q.value.length>0||!_.value&&H.value.length>0?(o(),n("div",ks,[s("div",_s,[e[10]||(e[10]=s("h3",{class:"text-md font-semibold dark:text-white"},"Rôles",-1)),s("span",ws,g(_.value?Q.value.length:H.value.length),1)]),s("div",Cs,[(_.value?Q.value:H.value).length===0?(o(),n("div",$s," Aucun rôle trouvé ")):(o(),n("div",Ss,[(o(!0),n(I,null,J(_.value?Q.value:H.value,(l,c)=>(o(),n("span",{key:c,class:"px-2 py-1 text-xs bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded"},g(l),1))),128))]))])])):u("",!0),Object.keys(re.value).length>0||!_.value&&Object.keys(R.value).length>0?(o(),n("div",Ts,[s("div",Ds,[e[11]||(e[11]=s("h3",{class:"text-md font-semibold dark:text-white"},"Permissions",-1)),s("span",Es,g(_.value?me.value:ne.value),1)]),(o(!0),n(I,null,J(_.value?re.value:R.value,(l,c,K)=>(o(),n("div",{key:`perm-${K}`,class:"mb-2"},[typeof l=="boolean"?(o(),n("div",As,[s("button",{onClick:z=>$e(String(c)),class:"flex items-center w-full cursor-pointer"},[s("span",{class:h(["w-3 h-3 rounded-full mr-2 transition-colors",l?"bg-green-500":"bg-red-500"])},null,2),s("span",Ps,g(c),1),s("span",{class:h(["ml-auto text-xs font-medium",l?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},g(l?"Oui":"Non"),3)],8,Ns)])):typeof l=="object"?(o(),n("div",js,[s("div",{onClick:z=>_e(String(c)),class:"flex items-center justify-between bg-gray-200 dark:bg-gray-700 p-2 rounded-t-lg cursor-pointer hover:bg-gray-300 dark:hover:bg-gray-600"},[s("div",Os,[i(r,{name:j.value[c]?"heroicons:chevron-down":"heroicons:chevron-right",class:"w-4 h-4 mr-2 dark:text-white"},null,8,["name"]),s("span",Rs,g(ye(String(c))),1)]),s("span",Vs,g(be(l)),1)],8,Ls),j.value[c]?(o(),n("div",Ms,[(o(!0),n(I,null,J(l,(z,te,d)=>(o(),n("div",{key:`${c}-${d}`,class:"flex items-center py-1 px-2 hover:bg-gray-50 dark:hover:bg-gray-700 rounded transition-colors"},[s("button",{onClick:w=>$e(`${String(c)}.${String(te)}`),class:"flex items-center w-full cursor-pointer"},[s("span",{class:h(["w-3 h-3 rounded-full mr-2 transition-colors",z?"bg-green-500":"bg-red-500"])},null,2),s("span",Us,g(te),1),s("span",{class:h(["ml-auto text-xs font-medium",z?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},g(z?"Oui":"Non"),3)],8,Bs)]))),128))])):u("",!0)])):u("",!0)]))),128))])):u("",!0),_.value&&Q.value.length===0&&Object.keys(re.value).length===0?(o(),n("div",zs,[i(r,{name:"heroicons:magnifying-glass",class:"w-12 h-12 mx-auto mb-2 opacity-50"}),s("p",Is,'Aucun résultat trouvé pour "'+g(_.value)+'"',1)])):u("",!0)])):S.value==="auth"?(o(),n("div",Fs,[s("div",Gs,[s("h3",Hs,[i(r,{name:"heroicons:user-circle",class:"w-5 h-5 mr-2"}),e[12]||(e[12]=ue(" Status Authentification ",-1))]),s("div",Ks,[s("div",Js,[e[13]||(e[13]=s("span",{class:"text-gray-600 dark:text-gray-400"},"Status:",-1)),s("span",{class:h(X.value==="authenticated"?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")},g(X.value==="authenticated"?"✅ Connecté":"❌ Déconnecté"),3)]),a(W)?(o(),n("div",Ws,[e[14]||(e[14]=s("span",{class:"text-gray-600 dark:text-gray-400"},"Utilisateur:",-1)),s("span",qs,g(a(W)?.username||a(W)?.email||"N/A"),1)])):u("",!0),s("div",Qs,[e[15]||(e[15]=s("span",{class:"text-gray-600 dark:text-gray-400"},"Token présent:",-1)),s("span",{class:h(B.value?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")},g(B.value?"✅":"❌"),3)])])]),s("div",Ys,[s("h3",Zs,[i(r,{name:"heroicons:document-text",class:"w-5 h-5 mr-2"}),e[16]||(e[16]=ue(" Cookies Auth ",-1))]),s("div",Xs,[s("div",eo,[e[17]||(e[17]=s("span",{class:"text-gray-600 dark:text-gray-400"},"user_token:",-1)),s("span",{class:h(L.value?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")},g(ee(L.value)),3)]),s("div",to,[e[18]||(e[18]=s("span",{class:"text-gray-600 dark:text-gray-400"},"auth.session:",-1)),s("span",{class:h(O.value?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")},g(Se(O.value)),3)])]),v.value.length>0?(o(),n("div",so,[s("h4",oo,"🔍 Cookies auth détectés ("+g(v.value.length)+"):",1),s("div",ao,[(o(!0),n(I,null,J(v.value,l=>(o(),n("div",{key:l.name,class:"flex justify-between text-xs p-1 bg-gray-50 dark:bg-gray-700 rounded"},[s("span",no,g(l.name),1),s("span",ro,g(l.value),1)]))),128))])])):u("",!0),v.value.length===0?(o(),n("div",lo,[e[19]||(e[19]=s("h4",{class:"text-xs font-medium text-red-500 dark:text-red-400 mb-2"}
1,"⚠️ Aucun cookie d'auth détecté",-1)),p.value.length>0?(o(),n("div",io,[s("p",uo,"🍪 Tous les cookies disponibles ("+g(p.value.length)+"):",1),(o(!0),n(I,null,J(p.value,l=>(o(),n("div",{key:l.name,class:"flex justify-between text-xs p-1 bg-red-50 dark:bg-red-900/20 rounded"},[s("span",co,g(l.name),1),s("span",mo,g(l.value),1)]))),128))])):(o(),n("div",go," ❌ Aucun cookie trouvé du tout ! "))])):u("",!0)]),s("div",po,[s("h3",vo,[i(r,{name:"heroicons:exclamation-triangle",class:"w-5 h-5 mr-2"}),e[20]||(e[20]=ue(" Dernières erreurs ",-1))]),s("div",fo,[M.value.length===0?(o(),n("div",ho," Aucune erreur récente ")):u("",!0),(o(!0),n(I,null,J(M.value,(l,c)=>(o(),n("div",{key:c,class:h([{"text-red-500":l.type==="error","text-yellow-500":l.type==="warning","text-blue-500":l.type==="info"},"p-2 bg-gray-50 dark:bg-gray-700 rounded"])},[s("strong",null,g(l.timestamp)+":",1),ue(" "+g(l.message),1)],2))),128))])]),s("div",xo,[s("h3",bo,[i(r,{name:"heroicons:cog-6-tooth",class:"w-5 h-5 mr-2"}),e[21]||(e[21]=ue(" Actions Debug ",-1))]),s("div",yo,[s("button",{onClick:e[3]||(e[3]=l=>T()),class:"px-3 py-2 bg-blue-500 text-white rounded text-sm hover:bg-blue-600 transition-colors"}," 🧪 Test Auth "),s("button",{onClick:e[4]||(e[4]=l=>Pe()),class:"px-3 py-2 bg-green-500 text-white rounded text-sm hover:bg-green-600 transition-colors"}," 🔄 Refresh Cookies "),s("button",{onClick:e[5]||(e[5]=l=>Z()),class:"px-3 py-2 bg-red-500 text-white rounded text-sm hover:bg-red-600 transition-colors font-medium"}," 🚪 Logout Complet "),s("button",{onClick:e[6]||(e[6]=l=>pe()),class:"px-3 py-2 bg-gray-500 text-white rounded text-sm hover:bg-gray-600 transition-colors"}," 🧹 Clear Logs ")])])])):u("",!0)]),s("div",ko,[s("div",_o,[e[22]||(e[22]=s("span",null,"Utilisez cette interface pour déboguer les permissions.",-1)),E.value?(o(),n("span",wo," Modifications non sauvegardées ")):u("",!0)])])])])):u("",!0),!$.value&&N.showFloatingButton?(o(),n("button",{key:1,onClick:Ne,class:"debugger-fab fixed right-4 z-[9999] p-2 bg-red-600 text-white rounded-full shadow-lg hover:bg-red-700 transition-all"},[i(r,{name:"heroicons:bug-ant",class:"w-6 h-6"})])):u("",!0)])):u("",!0)]),_:1})}}}),$o=he(Co,[["__scopeId","data-v-cdfee43b"]]),So={key:0},To={key:1,class:"app-layout"},Do={class:"relative"},Eo=["src","alt"],Ao=["src"],No={key:0,class:"w-full flex-shrink-0 bg-white relative z-20"},Po={class:"relative inline-flex mb-1"},jo={key:0,class:"relative"},Lo=["onClick"],Oo={key:0,class:"pl-4 mt-2 space-y-2"},Ro={key:0,class:"ml-2 px-2 py-0.5 text-xs bg-green-100 text-green-800 rounded-full"},Vo={key:1,class:"ml-2 px-2 py-0.5 text-xs bg-indigo-100 text-indigo-700 rounded-full"},Mo={key:2,class:"ml-auto inline-flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full"},Bo={key:0,class:"ml-2 px-2 py-0.5 text-xs bg-green-100 text-green-800 rounded-full"},Uo={key:1,class:"ml-2 px-2 py-0.5 text-xs bg-indigo-100 text-indigo-700 rounded-full"},zo={key:2,class:"ml-auto inline-flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full"},Io={key:0,class:"flex flex-col items-center space-y-4"},Fo={class:"relative inline-flex mb-1"},Go=["src","alt"],Ho={class:"md:hidden fixed top-0 left-0 right-0 flex items-center justify-between px-4 py-2 bg-white shadow-sm",style:{"z-index":"100"}},Ko={class:"flex items-center gap-2"},Jo=["src","alt"],Wo=["src"],qo={class:"flex items-center gap-2"},Qo={class:"flex-grow overflow-auto"},Yo={key:0,class:"fixed inset-0 z-50"},Zo={class:"absolute inset-0 md:left-[256px] overflow-y-auto bg-gray-50"},Xo={key:0,class:"md:hidden fixed bottom-0 left-0 right-0 bg-white shadow-t-lg border-t border-gray-200 z-90 nav-bottom-mobile"},ea={class:"flex justify-around items-center"},ta={class:"relative inline-flex"},sa=ae({__name:"app",setup(N){const{isMobile:C,isTapToPayAvailable:P}=$t(),V=Ie(),k=wt(),$=Ct();Le("isMobile",C);const j=Fe(),{user:F,isAuthenticated:_}=We(),E=St(),G=Ee(),S=y(()=>!1),M=A(!1),W=A(!1),de=()=>{S.value&&(M.value=!M.value)},X=t=>{(t.altKey||t.metaKey)&&t.key==="d"&&(t.preventDefault(),de())};se([_,S],([,t])=>{ce(()=>{W.value=t})});const B=A(!1),x=A(null),p=A(null),L=A(!1),O=A(!1);let v=null;const U=()=>O.value?x.value:p.value,H=()=>{const t=U();t&&(L.value=O.value?t.scrollWidth-t.scrollLeft-t.clientWidth>8:t.scrollHeight-t.scrollTop-t.clientHeight>8)},R=()=>{const t=U();t&&(O.value?t.scrollBy({left:Math.round(t.clientWidth*.6),behavior:"smooth"}):t.scrollBy({top:Math.round(t.clientHeight*.6),behavior:"smooth"}))},ne=()=>{O.value=!!v?.matches&&!T.value,ce(H)},Q=it(),re=y(()=>Q.getUserTravel),{isRestricted:me,isUnsubscribed:be}=gt(),ye=y(()=>me()),Y=y(()=>be()),{fetchHomeInfo:Ne}=Re();Ae(async()=>{V.logDeviceInfo(),ce(()=>{W.value=S.value}),window.addEventListener("keydown",X),window.addEventListener("resize",H),v=window.matchMedia("(max-height: 750px) and (min-width: 768px)"),v.addEventListener("change",ne),ne(),_e.value=!0,_.value&&(Ne(),Y.value||G.fetchNotifications(),$.fetchPendingCount()),E.hasPermission("member_edit")&&k.fetchPendingCount(),setTimeout(()=>{ke.value=!1},200)}),He(()=>{window.removeEventListener("keydown",X),window.removeEventListener("resize",H),v?.removeEventListener("change",ne)}
1),se(je(),()=>{B.value=!1});const ke=A(!0),_e=A(!1);Le("permissionsReady",_e);const we=ut(),q=y(()=>we.getActiveClub),le=y(()=>kt()),ge=t=>le.value.some(e=>e.key===t),Ce=y(()=>_t()),$e=y(()=>Ce.value.map(t=>t.items?.length===1?t.items[0]:t)),f=y(()=>Ce.value.length>0),T=A(!1),Z=A([]);se([T,()=>le.value.length,Z],()=>{ne()},{deep:!0});const pe=()=>{T.value=!1},{openAutoLoginTab:Pe,isVpdive4Link:ee}=Tt(),Se=Oe,ve=(t,e)=>{if(T.value=!1,t?.external){e.preventDefault(),window.open(t.to,"_blank","noopener");return}ee(t?.to)&&(e.preventDefault(),Pe(t.to))};Le("closeAdminMode",pe);const Te=t=>{const e=Z.value.indexOf(t);e===-1?Z.value.push(t):Z.value.splice(e,1)},ie=(t,e)=>t.includes("vpdive")?je().query.route===t.split("route=")[1]:t===e;return se(je(),async t=>{if(t.path!=="/app/activities"||!_.value)return;if(!await E.hasPermissionAsync("club_calendar_access"))return oe("/app")}),se(f,t=>{!t&&T.value&&(T.value=!1)}),(t,e)=>{const r=ct,m=Ke,l=Oe,c=xe,K=At,z=mt,te=vt;return a(ke)?(o(),n("div",So,[i(m,null,{default:b(()=>[i(r,{animated:!0})]),_:1})])):(o(),n("div",To,[s("nav",{ref_key:"navbarRef",ref:x,onScroll:H,class:h(["desktop-navbar",[a(T)?"admin-mode":"normal-mode"]])},[s("div",Do,[i(l,{to:"/app",class:"w-12 h-12 block"},{default:b(()=>[a(q)?(o(),n("img",{key:0,src:a(j).public.vpdivePublic+a(q).logo,alt:a(q).name,class:"w-full h-full object-contain"},null,8,Eo)):(o(),n("img",{key:1,src:a(j).public.baseUrl+"logo.png",alt:"VPDive",class:"w-full h-full object-contain"},null,8,Ao)),e[11]||(e[11]=s("span",{class:"sr-only"},"Accueil de l'application",-1))]),_:1}),s("button",{onClick:e[0]||(e[0]=d=>("navigateTo"in t?t.navigateTo:a(oe))("/app/select-club?switch=true")),class:"absolute -bottom-1 -right-1 bg-white rounded-full p-1 h-7 w-6 shadow-md hover:bg-gray-100 transition-colors",title:"Changer de club"},[i(c,{name:"heroicons:arrow-path",class:"w-4 h-4 text-primary rotate-on-hover"})])]),s("div",{class:h(["flex flex-col items-center space-y-6 flex-grow relative overflow-hidden w-full px-1",a(T)?"justify-start":"justify-center"])},[a(T)?(o(),n("div",No,[s("button",{onClick:e[1]||(e[1]=d=>T.value=!1),class:"w-full flex items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors"},[i(c,{name:"material-symbols:arrow-back",class:"w-6 h-6 mr-2"}),e[12]||(e[12]=s("span",null,"Retour",-1))])])):u("",!0),s("div",{ref_key:"navScrollRef",ref:p,onScroll:H,class:"w-full overflow-y-auto scrollbar-hide relative z-0",style:{"max-height":"calc(100vh - 200px)"}},[i(dt,{name:"fade",tag:"div",class:"space-y-6"},{default:b(()=>[a(T)?a(f)?(o(!0),n(I,{key:1},J(a($e),d=>(o(),n("div",{key:d.label,class:"w-full"},[d.items?(o(),n("div",jo,[s("button",{onClick:w=>Te(d.label),class:"w-full flex items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors"},[i(c,{name:d.icon,class:"w-6 h-6 mr-2"},null,8,["name"]),s("span",null,g(d.label),1),i(c,{name:a(Z).includes(d.label)?"material-symbols:expand-less":"material-symbols:expand-more",class:"w-4 h-4 ml-auto"},null,8,["name"])],8,Lo),i(De,{name:"slide"},{default:b(()=>[a(Z).includes(d.label)?(o(),n("div",Oo,[(o(!0),n(I,null,J(d.items,w=>(o(),D(Ve(w.external?"a":a(ee)(w.to)?"div":a(Se)),{key:w.to,to:w.external||a(ee)(w.to)?void 0:w.to||"",href:w.external?w.to:void 0,target:w.external?"_blank":void 0,rel:w.external?"noopener noreferrer":void 0,onClick:qe=>ve(w,qe),class:h(["flex items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors cursor-pointer",{"text-primary":ie(w.to||"",(t._.provides[fe]||t.$route).path)}])},{default:b(()=>[i(c,{name:w.icon,class:h(["w-5 h-5 mr-2",w.iconColor])},null,8,["name","class"]),s("span",{class:h(w.labelColor)},g(w.label),3),w.isPremium?(o(),n("span",Ro," VPDIVE+ ")):u("",!0),w.isNew?(o(),n("span",Vo," Nouveau ")):u("",!0),w.badgeCount&&w.badgeCount>0?(o(),n("span",Mo,g(w.badgeCount),1)):u("",!0)]),_:2},1032,["to","href","target","rel","onClick","class"]))),128))])):u("",!0)]),_:2},1024)])):(o(),D(Ve(d.external?"a":a(ee)(d.to)?"div":a(Se)),{key:1,to:d.external||a(ee)(d.to)?void 0:d.to||"",href:d.external?d.to:void 0,target:d.external?"_blank":void 0,rel:d.external?"noopener noreferrer":void 0,onClick:w=>ve(d,w),class:h(["w-full flex items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors nav-item relative cursor-pointer",{"text-primary nav-item-active":ie(d.to||"",(t._.provides[fe]||t.$route).path)}])},{default:b(()=>[i(c,{name:d.icon,class:h(["w-6 h-6 mr-2",d.iconColor])},null,8,["name","class"]),s("span",{class:h(d.labelColor)},g(d.label),3),d.isPremium?(o(),n("span",Bo," VPDIVE+ ")):u("",!0),d.isNew?(o(),n("span",Uo," Nouveau ")):u("",!0),d.badgeCount&&d.badgeCount>0?(o(),n("span",zo,g(d.badgeCount),1)):u("",!0)]),_:2},1032,["to","href","target","rel","onClick","class"]))]))),128)):u("",!0):(o(),n(I,{key:0},[(o(!0),n(I,null,J(a(le),d=>(o(),D(l,{key:d.to,to:d.to,class:h(["w-full flex flex-col items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors nav-item nav-entry relative",{"text-primary nav-item-active":ie(d.to,(t._.provides[fe]||t.$route).path)}])},{default:b(()=>[s("span",Po,[i(c,{name:d.icon,class:"w-6 h-6"},null,8,["name"]),d.to==="/app/messages"?(o(),D(Ue,{key:0})):u("",!0)]),s("span",null,g(d.label),1)]),_:2},1032,["to","class"]))),128)),a(re)?(o(),n("button",{key:0,onClick:e[2]||(e[2]=d=>("navigateTo"in t?t.navigateTo:a(oe))("/app/travel")),class:h(["w-full flex flex-col items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors nav-item nav-entry relative",{"text-primary nav-item-active":(t._.provides[fe]||t.$route).path==="/app/travel"}])},[i(c,{name:"material-symbols:travel",class:"w-6 h-6 mb-1"}),e[13]||(e[13]=s("span",null,"Voyages",-1))],2)):u("",!0),a(f)?(o(),n("button",{key:1,onClick:e[3]||(e[3]=d=>T.value=!a(T)),class:h(["w-full flex flex-col items-center p-2 text-sm text-gray-600 hover:text-primary transition-colors nav-item nav-entry relative",{hidden:a(T)}])},[i(c,{name:"material-symbols:settings-outline",class:"w-6 h-6 mb-1"}),e[14]||(e[14]=s("span",{class:"text-xs mt-1"},"Admin",-1))],2)):u("",!0)],64))]),_:1})],544),i(De,{name:"fade"},{default:b(()=>[a(L)?(o(),n("div",{key:0,class:h(["nav-scroll-indicator",{"nav-scroll-indicator--horizontal":a(O)}])},[s("button",{onClick:R,title:"Défiler",class:"nav-scroll-arrow"},[i(c,{name:a(O)?"material-symbols:keyboard-arrow-right":"material-symbols:keyboard-arrow-down",class:"w-5 h-5"},null,8,["name"])])],2)):u("",!0)]),_:1})],2),a(T)?u("",!0):(o(),n("div",Io,[a(E).hasPermission("club_has_payment_method")&&a(q)?.d!==1&&!a(ye)?(o(),D(l,{key:0,to:"/app/panier",class:h(["flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile nav-entry",{"text-primary nav-item-active-mobile":(t._.provides[fe]||t.$route).path.includes("/app/admin/vpdive?route=/f/payment/cart/index")}])},{default:b(()=>[s("span",Fo,[i(c,{name:"material-symbols:shopping-cart",class:"w-6 h-6"}),i(K)]),e[15]||(e[15]=s("span",{class:"text-xs mt-1"},"Panier",-1))]),_:1},8,["class"])):u("",!0),a(Y)?u("",!0):(o(),D(ze,{key:1})),a(Y)?u("",!0):(o(),D(Be,{key:2,class:"nav-entry",onClick:e[4]||(e[4]=d=>B.value=!a(B))})),a(Y)?u("",!0):(o(),D(l,{key:3,to:"/app/profile",class:"flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile nav-entry","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[a(F)?.profile_picture?(o(),n("img",{key:0,src:a(j).public.vpdivePublic+a(F).profile_picture,alt:`${a(F)?.first_name} ${a(F)?.last_name}`,class:"w-10 h-10 rounded-full object-cover cursor-pointer"},null,8,Go)):(o(),D(c,{key:1,name:"heroicons:user-circle",class:"w-10 h-10 text-gray-400 cursor-pointer"})),e[16]||(e[16]=s("span",{class:"text-xs mt-1"},"Profil",-1))]),_:1}))]))],34),s("div",{class:h(["main-content",[a(T)?"admin-mode":""]])},[s("header",Ho,[s("div",Ko,[i(l,{to:"/app",class:"flex items-center"},{default:b(()=>[a(q)?(o(),n("img",{key:0,src:a(j).public.vpdivePublic+a(q).logo,alt:a(q).name,class:"w-10 h-10 object-contain"},null,8,Jo)):(o(),n("img",{key:1,src:a(j).public.baseUrl+"logo.png",alt:"
1VPDive",class:"w-10 h-10 object-contain"},null,8,Wo))]),_:1}),a(C)?u("",!0):(o(),n("button",{key:0,onClick:e[5]||(e[5]=d=>("navigateTo"in t?t.navigateTo:a(oe))("/app/select-club")),class:"absolute -bottom-1 left-12 bg-white rounded-full p-1 h-7 w-6 shadow-md hover:bg-gray-100 transition-colors",title:"Changer de club"},[i(c,{name:"heroicons:arrow-path",class:"w-4 h-4 text-primary rotate-on-hover"})]))]),s("div",qo,[a(Y)?u("",!0):(o(),D(ze,{key:0,mobile:!0})),a(P)&&a(E).hasPermission("taptopay_admin")?(o(),D(l,{key:1,to:"/app/admin/TapToPay",class:"flex flex-col items-center py-2 px-2 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile",title:"Tap to Pay"},{default:b(()=>[i(c,{name:"material-symbols:contactless",class:"w-6 h-6"})]),_:1})):u("",!0),a(E).hasPermission("club_has_payment_method")&&a(q)?.d!==1&&!a(ye)?(o(),D(l,{key:2,to:"/app/panier",class:"flex flex-row items-center py-2 px-2 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[i(c,{name:"material-symbols:shopping-cart",class:"w-6 h-6"}),i(K,{mobile:!0})]),_:1})):u("",!0),a(C)&&!a(Y)?(o(),D(Be,{key:3,onClick:e[6]||(e[6]=d=>B.value=!a(B)),icon:"material-symbols:notifications-outline",label:"",mobile:!0})):u("",!0)])]),s("main",Qo,[i(z),i(De,{name:"fade"},{default:b(()=>[a(T)&&a(f)?(o(),n("div",Yo,[s("div",{class:"absolute inset-0 bg-black/30",onClick:e[7]||(e[7]=d=>T.value=!1)}),s("div",Zo,[i(yt,{onClose:pe})])])):u("",!0)]),_:1})]),a(T)?u("",!0):(o(),n("nav",Xo,[s("div",ea,[i(l,{to:"/app/dashboard",class:"flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[i(c,{name:"material-symbols:home",class:"w-6 h-6"}),e[17]||(e[17]=s("span",{class:"text-xs mt-1"},"Accueil",-1))]),_:1}),ge("calendar")?(o(),D(l,{key:0,to:"/app/activities",class:"flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[i(c,{name:"material-symbols:event",class:"w-6 h-6"}),e[18]||(e[18]=s("span",{class:"text-xs mt-1"},"Calendrier",-1))]),_:1})):u("",!0),ge("planning")?(o(),D(l,{key:1,to:"/app/admin/vpdive?route=/f/calendar_slot/index",class:"flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[i(c,{name:"material-symbols:calendar-view-week",class:"w-6 h-6"}),e[19]||(e[19]=s("span",{class:"text-xs mt-1"},"Planning",-1))]),_:1})):u("",!0),i(l,{to:"/app/club",class:"flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[i(c,{name:"material-symbols:pool",class:"w-6 h-6"}),e[20]||(e[20]=s("span",{class:"text-xs mt-1"},"Site Web",-1))]),_:1}),i(l,{to:"/app/messages",class:"flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[s("span",ta,[i(c,{name:"material-symbols:chat-outline",class:"w-6 h-6"}),i(Ue)]),e[21]||(e[21]=s("span",{class:"text-xs mt-1"},"Messages",-1))]),_:1}),a(Y)?u("",!0):(o(),D(l,{key:2,to:"/app/profile",class:"flex flex-col items-center py-2 px-4 text-gray-600 nav-item-mobile","active-class":"text-primary nav-item-active-mobile"},{default:b(()=>[i(c,{name:"heroicons:user",class:"w-6 h-6"}),e[22]||(e[22]=s("span",{class:"text-xs mt-1"},"Profil",-1))]),_:1}))])]))],2),i(te),(o(),D(Je,{to:"body"},[a(B)?(o(),n("div",{key:0,class:"fixed inset-0 bg-black bg-opacity-50",style:{"z-index":"150"},onClick:e[8]||(e[8]=d=>B.value=!1)})):u("",!0),i(De,{"enter-active-class":"transform transition ease-in-out duration-300","enter-from-class":a(C)?"translate-x-full":"-translate-x-full","enter-to-class":"translate-x-0","leave-active-class":"transform transition ease-in-out duration-300","leave-from-class":"translate-x-0","leave-to-class":a(C)?"translate-x-full":"-translate-x-full"},{default:b(()=>[a(B)?(o(),n("div",{key:0,class:h(["app-notification-drawer fixed top-0 h-full w-80 bg-white shadow-xl",a(C)?"right-0":"left-[80px]"]),style:{"z-index":"5000"}},[i(es,{onClose:e[9]||(e[9]=d=>B.value=!1)})],2)):u("",!0)]),_:1},8,["enter-from-class","leave-to-class"])])),i(m,null,{default:b(()=>[a(W)?(o(),D($o,{key:0,"onUpdate:visible":e[10]||(e[10]=d=>M.value=d),showFloatingButton:!a(M),startVisible:a(M)},null,8,["showFloatingButton","startVisible"])):u("",!0)]),_:1}),i(m,null,{default:b(()=>[i(ft)]),_:1})]))}}}),Sa=he(sa,[["__scopeId","data-v-f97ddec2"]]);export{Sa as default};

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