1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,39618,e=>{"use strict";e.i(47167);var t=e.i(43476),r=e.i(71645),a=e.i(22016);let s={fr:["L","M","M","J","V","S","D"],en:["M","T","W","T","F","S","S"]},n={fr:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],en:["January","February","March","April","May","June","July","August","September","October","November","December"]},i=(e,t,r)=>`${e}-${String(t+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`;function l({arrivee:e,depart:a,onChange:l,langue:o,moisAffiches:c=12,className:d=""}){let u=(0,r.useMemo)(()=>{let e=new Date;return i(e.getFullYear(),e.getMonth(),e.getDate())},[]),m=(0,r.useMemo)(()=>{let e=new Date;return Array.from({length:c},(t,r)=>{let a=new Date(e.getFullYear(),e.getMonth()+r,1),s=a.getFullYear(),n=a.getMonth(),i=(new Date(s,n,1).getDay()+6)%7,l=new Date(s,n+1,0).getDate();return{annee:s,indexMois:n,premierJour:i,nbJours:l}})},[c]);return(0,t.jsx)("div",{className:`overflow-y-auto overscroll-contain rounded-xl border border-[#e3e0d9] bg-white p-1 ${d}`,role:"group","aria-label":"fr"===o?"Choisir les dates du séjour":"Choose your dates",children:(0,t.jsx)("div",{className:"grid gap-6 sm:grid-cols-2 sm:gap-x-8 lg:grid-cols-1",children:m.map(({annee:r,indexMois:c,premierJour:d,nbJours:m})=>(0,t.jsxs)("div",{className:"px-2 pb-1",children:[(0,t.jsxs)("p",{className:"sticky top-0 z-10 -mx-2 bg-white px-2 pb-2 pt-3 font-serif text-[17px] capitalize text-navy",children:[n[o][c]," ",r]}),(0,t.jsxs)("div",{className:"grid grid-cols-7 gap-y-1",children:[s[o].map((e,r)=>(0,t.jsx)("span",{className:"pb-1 text-center text-[11px] font-semibold text-[#b0b6ba]",children:e},r)),Array.from({length:d},(e,r)=>(0,t.jsx)("span",{},`v${r}`)),Array.from({length:m},(s,d)=>{let m=i(r,c,d+1),p=m<u,x=m===e,h=m===a,f=!!(e&&a&&m>e&&m<a),g=x||h;return(0,t.jsx)("button",{type:"button",disabled:p,onClick:()=>{!e||a||m<=e?l(m,null):l(e,m)},"aria-pressed":g||f,"aria-label":`${d+1} ${n[o][c]} ${r}`,className:["relative h-11 text-[15px] tabular-nums transition-colors",p?"cursor-not-allowed text-[#d6dade]":"cursor-pointer",g?"z-10 rounded-full bg-navy font-bold text-white":"",f?"bg-gold/20 text-navy":"",!p&&!g&&!f?"rounded-full text-[#3c4a52] hover:bg-[#f0ece4]":"",x&&a?"rounded-r-none":"",h?"rounded-l-none":""].join(" "),children:d+1},m)})]})]},`${r}-${c}`))})})}var o=e.i(57688);let c="c8eb4251-a965-458e-932e-aaa900872f96",d="0a876d46-7b1a-4164-aafa-aaa90086e8bf",u={fr:"fr-FR",en:"en-GB"};function m(e,t){return e?"string"==typeof e?e.trim():(e[u[t]]??e["en-GB"]??e["fr-FR"]??Object.values(e)[0]??"").trim():""}let p=e=>e&&"number"==typeof e.EUR?e.EUR:null;async function x(e,t,r){let a=await fetch(`https://api.mews.com/api/distributor/v1/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({Client:"HTBM Booking Engine 1.0.0",FullAmounts:!1,LanguageCode:u[r],...t})});if(!a.ok){let t=await a.text();throw Error(`Mews ${e} â ${a.status} ${t.slice(0,160)}`)}return a.json()}let h=(e,t,r)=>{let a=t.find(t=>t.Id===e?.RateGroupId);if(!a)return null;let s="ChargeCreditCard"===a.SettlementAction;if(!s&&"CreatePreauthorization"!==a.SettlementAction)return null;let n="number"==typeof a.SettlementFlatValue?a.SettlementFlatValue:null,i="number"==typeof a.SettlementValue?a.SettlementValue:null;return null!==n?{debite:s,montant:n,part:null}:null===i?null:{debite:s,montant:Math.round(r*i*100)/100,part:i}};async function f({arrivee:e,depart:t,adultes:r,langue:a}){let s=await x("hotels/getAvailability",{HotelId:d,ConfigurationId:c,StartUtc:`${e}T00:00:00Z`,EndUtc:`${t}T00:00:00Z`,AdultCount:r},a),n=[];for(let e of s.RoomCategoryAvailabilities??[])for(let t of e.RoomOccupancyAvailabilities??[]){let r=(t.Pricing??[]).map(e=>({tarifId:e.RateId,total:p(e.Price?.Total)??0,parNuit:p(e.Price?.AveragePerNight)??0})).filter(e=>e.total>0);r.length&&n.push({categorieId:e.RoomCategoryId,chambresRestantes:e.AvailableRoomCount,pourPersonnes:t.AdultCount,prix:r})}return{tarifs:s.Rates??[],groupes:s.RateGroups??[],offres:n}}let g=(e,t)=>`https://cdn.mews.com/Media/Image/${e}?w=${t}`;async function b(e){let t=await x("configuration/get",{Ids:[c],PrimaryId:c},e),r=(e,t=0)=>{if(t>4||!e||"object"!=typeof e)return null;for(let[a,s]of Object.entries(e)){if(/categor/i.test(a)&&Array.isArray(s)&&s.length&&"Id"in s[0])return s;let e=r(s,t+1);if(e)return e}return null};return new Map((r(t)??[]).map(t=>[t.Id,{nom:m(t.Names??t.Name,e),nomFr:m(t.Names??t.Name,"fr"),images:t.ImageIds??[],description:m(t.Descriptions??t.Description,e),
1couchages:"number"==typeof t.NormalBedCount?t.NormalBedCount:null,surface:(e=>{let t=e.match(/(\d{1,3})\s*(?:m2|m²)/i);if(!t)return null;let r=Number(t[1]);return r>=5&&r<=200?r:null})(m(t.Descriptions??t.Description,e))}]))}async function v(e){let t=await x("hotels/getPaymentConfiguration",{HotelId:d,ConfigurationId:c},e),r=t.PaymentGateway?.PublicKey?.trim()??"";if(!r)throw Error("Mews getPaymentConfiguration â PublicKey absente");return{publicKey:r,cartes:t.PaymentGateway?.SupportedCreditCardTypes??[],surcharges:t.SurchargeConfiguration?.SurchargeFees??{}}}async function j({carteId:e,navigateur:t,langue:r}){return(await x("paymentCards/authorize",{EnterpriseId:d,PaymentCardId:e,BrowserInfo:t},r)).State??null}let y="voiles.vente3ds";var N=e.i(7471);let w="htbm_mesure_session",k=new Set;function C(e,t){if(k.has(e))return;let r=function(){try{let e=window.sessionStorage.getItem(w);return e||(e=crypto.randomUUID?.()??`${Date.now()}-${Math.random().toString(36).slice(2)}`,window.sessionStorage.setItem(w,e)),e}catch{return null}}();if(r){k.add(e);try{N.supabase.from("moteur_evenements").insert({hotel:"voiles",session:r,etape:e,nuits:t?.nuits??null,montant:t?.montant??null}).then(void 0,()=>{})}catch{}}}function I(e){let t=(e||"").replace(/[\s.\-()/]/g,"");return t?/^\+[1-9]\d{7,14}$/.test(t)?t:/^00[1-9]\d{7,14}$/.test(t)?`+${t.slice(2)}`:/^0\d{9}$/.test(t)?`+33${t.slice(1)}`:null:null}let S={fr:{titre:"Vos coordonnées",sousTitreCarte:"Puis votre carte, pour garantir la chambre.",sousTitrePaiement:"Puis le règlement, chez notre prestataire.",prenom:"Prénom",nom:"Nom",email:"Email",telephone:"Téléphone",telephoneAide:"Pour vous joindre le jour de votre arrivée.",mot:"Un mot pour l'hôtel (facultatif)",motAide:"Heure d'arrivée prévue, occasion particulièreâ¦",continuer:"Continuer vers le paiement",prepare:"On prépare votre réservationâ¦",titrePaiement:"Votre règlement",carte:"Votre carte",porteur:"Nom sur la carte",numero:"Numéro de carte",expiration:"Expiration",crypto:"Cryptogramme",chargement:"On prépare le formulaire sécuriséâ¦",garantir:e=>`R\xe9server â empreinte de ${e}`,envoi:"On enregistre votre réservationâ¦",fermer:"Fermer",retour:"Retour",surCarte:"Votre numéro de carte est saisi dans un cadre sécurisé de notre prestataire bancaire : il ne transite jamais par ce site.",surCheckout:"Le paiement est traité par Mews, notre prestataire : vos données bancaires ne transitent pas par ce site.",retractation:"Conformément à l'article L221-28 du code de la consommation, une réservation d'hébergement à date déterminée ne donne pas de droit de rétractation. Les conditions d'annulation de votre tarif s'appliquent.",champsManquants:"Il manque vos coordonnées : prénom, nom et email.",emailInvalide:"Cette adresse email ne semble pas valide.",expInvalide:"La date d'expiration doit s'écrire MM/AA.",carteRefusee:"Votre carte n'a pas été acceptée. Vérifiez le numéro, la date et le cryptogramme.",plusDispo:"Cette chambre vient d'être prise. Revenez en arrière pour en choisir une autre.",echec:"La réservation n'a pas abouti. Rien n'a été débité â appelez-nous au 04 94 41 36 23 et nous la prenons avec vous.",echecPaiement:"Le paiement n'est pas passé. Vous pouvez réessayer ci-dessus, ou nous appeler au 04 94 41 36 23.",tenue:"Votre chambre est tenue 20 minutes, le temps du règlement.",auth3ds:"On vérifie votre carte auprès de votre banqueâ¦",redirige:"Votre banque demande une confirmation. On vous y emmèneâ¦",refusee3ds:"Votre banque a refusé l'authentification de cette carte. Essayez-en une autre, ou appelez-nous au 04 94 41 36 23."},en:{titre:"Your details",sousTitreCarte:"Then your card, to secure the room.",sousTitrePaiement:"Then payment, with our provider.",prenom:"First name",nom:"Last name",email:"Email",telephone:"Phone",telephoneAide:"So we can reach you on the day you arrive.",mot:"A word for the hotel (optional)",motAide:"Expected arrival time, a special occasionâ¦",continuer:"Continue to payment",prepare:"Preparing your bookingâ¦",titrePaiement:"Your payment",carte:"Your card",porteur:"Name on card",numero:"Card number",expiration:"Expiry",crypto:"Security code",chargement:"Preparing the secure formâ¦",garantir:e=>`Book â ${e} hold`,envoi:"Saving your bookingâ¦",fermer:"Close",retour:"Back",surCarte:"Your card number is typed into a secure frame hosted by our payment provider â it never passes through this site.",surCheckout:"Payment is handled by Mews, our provider â your card details never pass through this site.",retractation:"Under French consumer law (art. L221-28), accommodation booked for a set date carries no right of withdrawal. Your rate's cancellation terms apply.",champsManquants:"Your details are incomplete: first name, last name and email.",emailInvalide:"That email address doesn't look valid.",expInvalide:"The expiry date should read MM/YY.",carteRefusee:"Your card wasn't accepted. Check the number, the expiry date and the security code.",plusDispo:"That room has just been taken. Go back to choose another one.",echec:"The booking didn't go through. Nothing was charged â call us on +33 4 94 41 36 23 and we'll take it with you.",echecPaiement:"The payment didn't go through. You can try again above, or call us on +33 4 94 41 36 23.",tenue:"Your room is held for 20 minutes while you pay.",auth3ds:"Checking your card with your bankâ¦",redirige:"Your bank needs to confirm. Taking you thereâ¦",refusee3ds:"Your bank declined the authentication for this card. Try another one, or call us on +33 4 94 41 36 23."}};function $({sejour:e,langue:a,onFermer:s,onReserve:n}){let i=S[a],[l,o]=(0,r.useState)(""),[c,d]=(0,r.useState)(""),[u,m]=(0,r.useState)(""),[p,x]=(0,r.useState)(""),[h,f]=(0,r.useState)(""),[g,b]=(0,r.useState)(""),[N,w]=(0,r.useState)(""),[k,$]=(0,r.useState)(null),[A,P]=(0,r.useState)(!1),[T,M]=(0,r.useState)(null),[L,D]=(0,r.useState)(!1),[R,F]=(0,r.useState)(null),[E,_]=(0,r.useState)(null),z=(0,r.useRef)(null),V=(0,r.useRef)(null),O=(0,r.useRef)(!1),B=/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(u.trim()),Y=N.match(/^(\d{2})\s*\/?\s*(\d{2})$/),q=!!Y&&Number(Y[1])>
1=1&&12>=Number(Y[1]),U=!!(l.trim()&&c.trim()&&B),W=()=>({prenom:l.trim(),nom:c.trim(),email:u.trim(),telephone:p.trim()}),G=()=>{D(!1),F(null),O.current=!1};(0,r.useEffect)(()=>{if(e.debite)return;let t=!1;return v(a).then(e=>{t||$(e.publicKey)}).catch(()=>{t||_(i.echec)}),()=>{t=!0}},[e.debite,a,i]);let J=(0,r.useCallback)(async t=>{if(!Y)return;let r={lignes:e.lignes,arrivee:e.arrivee,depart:e.depart};try{let e=await fetch("/api/reserver",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({langue:a,client:W(),sejour:{...r,notes:h.trim()||void 0},carte:{jeton:t,expiration:`20${Y[2]}-${Y[1]}`,porteur:g.trim()}})}),l=await e.json().catch(()=>null);if(409===e.status){_(i.plusDispo),G();return}if(!e.ok||!l?.carteId||!l?.reservationIds?.length){_(i.echec),G();return}C("carte"),F(i.auth3ds);let o=null;try{o=await j({carteId:l.carteId,navigateur:{ScreenWidth:window.screen.width,ScreenHeight:window.screen.height,ColorDepth:window.screen.colorDepth,UserAgent:window.navigator.userAgent,Language:window.navigator.language,JavaEnabled:!1,TimeZoneOffset:new Date().getTimezoneOffset()},langue:a})}catch{_(i.echec),G();return}if("Declined"===o){_(i.refusee3ds),G();return}if("Authorized"!==o){F(i.redirige);var s,n={carteId:l.carteId,groupeId:l.groupeId,numeros:l.numeros??[],reservationIds:l.reservationIds,sejour:r,client:W(),langue:a};try{sessionStorage.setItem(y,JSON.stringify({...n,poseeA:Date.now()}))}catch{}C("3ds");let e=`${window.location.origin}${window.location.pathname}?apres3ds=1`;window.location.href=(s=l.carteId,`https://app.mews.com/navigator/card-authorization/detail/${s}?returnUrl=${encodeURIComponent(btoa(e))}`);return}await H({carteId:l.carteId,reservationIds:l.reservationIds,groupeId:l.groupeId,numeros:l.numeros??[],sejour:r})}catch{_(i.echec),G()}},[Y,a,l,c,u,p,h,g,e,n,i]),H=async({carteId:e,reservationIds:t,groupeId:r,numeros:s,sejour:l})=>{if(!(await fetch("/api/reserver/carte",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({langue:a,carteId:e,reservationIds:t,sejour:l})})).ok){_(i.echec),G();return}n({groupeId:r,numeros:s,client:W()})},K=(0,r.useRef)(J);(0,r.useEffect)(()=>{K.current=J},[J]),(0,r.useEffect)(()=>{if(e.debite||!k)return;let t=!1,r=()=>{if(t||!window.SecureFields)return;let e=new window.SecureFields;z.current=e,e.initTokenize(k,{cardNumber:{placeholderElementId:"pciproxy-numero",inputType:"tel",placeholder:"1234 5678 9012 3456"},cvv:{placeholderElementId:"pciproxy-crypto",inputType:"tel",placeholder:"123"}},{styles:{"*":"font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;font-size: 15px; color: #20323d; border: 0; outline: 0;width: 100%; height: 100%; background: transparent;","*::placeholder":"color: #b0b6ba;"}}),e.on("ready",()=>{t||P(!0)}),e.on("success",e=>{let t="string"==typeof e.transactionId?e.transactionId:null;if(!t){_(i.carteRefusee),G();return}K.current(t)}),e.on("error",()=>{t||(_(i.carteRefusee),G())})};if(window.SecureFields)return r(),()=>{t=!0};let a=document.createElement("script");return a.src="https://pay.datatrans.com/upp/payment/js/secure-fields-2.0.0.js",a.async=!0,a.onload=r,a.onerror=()=>{t||_(i.echec)},document.head.appendChild(a),()=>{t=!0;try{z.current?.destroy?.()}catch{}}},[e.debite,k,i]);let Q=async()=>{if(!O.current){if(_(null),!U)return void _(l.trim()&&c.trim()?i.emailInvalide:i.champsManquants);O.current=!0,D(!0);try{let t=await fetch("/api/reserver",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({langue:a,client:W(),sejour:{lignes:e.lignes,arrivee:e.arrivee,depart:e.depart,notes:h.trim()||void 0}})}),r=await t.json().catch(()=>null);if(409===t.status){_(i.plusDispo),G();return}if(!t.ok||!r?.demandeId){_(i.echec),G();return}M(r),G()}catch{_(i.echec),G()}}},Z=(0,r.useCallback)(async()=>{if(T)try{if(!(await fetch("/api/reserver/confirmer",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({langue:a,reservationIds:T.reservationIds,demandeId:T.demandeId,sejour:{lignes:e.lignes,arrivee:e.arrivee,depart:e.depart}})})).ok)return void _(i.echec);n({groupeId:T.groupeId,numeros:T.numeros,client:W()})}catch{_(i.echec)}},[T,a,e,n,l,c,u,p,i]),X=(0,r.useRef)(Z);(0,r.useEffect)(()=>{X.current=Z},[Z]),(0,r.useEffect)(()=>
1{if(!T)return;let e=!1,t=()=>{let t=window.Mews?.PaymentCheckout;!e&&t&&t.load({containerId:"mews-checkout",requestId:T.demandeId,languageCode:"fr"===a?"fr-FR":"en-GB",payer:{details:{firstName:l.trim(),lastName:c.trim(),email:u.trim(),...I(p)?{telephone:I(p)}:{}}},layout:{hidden:{surchargeSummary:!0}},onSuccess:()=>{e||X.current()},onFailure:t=>{console.error("Mews checkout â",t?.type,t?.error),e||_(i.echecPaiement)},styles:{global:{textColorPrimary:"#20323d",textColorSecondary:"#6b7a82",backgroundColor:"#ffffff",borderRadius:12},button:{backgroundColor:"#c6a972",textColor:"#00263a",hover:{backgroundColor:"#d4bb8c"}},input:{borderColor:"#e3e0d9",focus:{borderColor:"#c6a972"}},spinner:{primaryColor:"#004e7c",secondaryColor:"#c6a972",tertiaryColor:"#e3e0d9"}}})};if(window.Mews?.PaymentCheckout)t();else{let r=document.createElement("script");r.src="https://cdn.mews.com/payments/checkout-embed.js",r.async=!0,r.onload=t,r.onerror=()=>{e||_(i.echec)},document.head.appendChild(r)}return()=>{e=!0;try{window.Mews?.PaymentCheckout?.destroy?.()}catch{}}},[T,a,i,l,c,u,p]);let ee=()=>{T&&fetch(`/api/reserver/confirmer?demande=${T.demandeId}`,{method:"DELETE"}).catch(()=>{}),s()};(0,r.useEffect)(()=>{let e=e=>{if("Escape"!==e.key||L||(e.preventDefault(),ee()),"Tab"===e.key&&V.current){let t=V.current.querySelectorAll("button:not([disabled]), input, textarea, a[href]");if(!t.length)return;let r=t[0],a=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),r.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[L,T]);let et="w-full rounded-xl border border-[#e3e0d9] bg-white px-3.5 py-2.5 text-[15px] text-navy outline-none transition-colors placeholder:text-[#b0b6ba] focus:border-gold",er="block text-[12px] font-semibold uppercase tracking-[0.08em] text-[#8a9299]",ea=(0,t.jsxs)("div",{className:"mt-5 grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("label",{className:"grid gap-1.5",children:[(0,t.jsx)("span",{className:er,children:i.prenom}),(0,t.jsx)("input",{className:et,value:l,onChange:e=>o(e.target.value),autoComplete:"given-name"})]}),(0,t.jsxs)("label",{className:"grid gap-1.5",children:[(0,t.jsx)("span",{className:er,children:i.nom}),(0,t.jsx)("input",{className:et,value:c,onChange:e=>d(e.target.value),autoComplete:"family-name"})]}),(0,t.jsxs)("label",{className:"grid gap-1.5 sm:col-span-2",children:[(0,t.jsx)("span",{className:er,children:i.email}),(0,t.jsx)("input",{className:et,type:"email",inputMode:"email",value:u,onChange:e=>m(e.target.value),autoComplete:"email"})]}),(0,t.jsxs)("label",{className:"grid gap-1.5 sm:col-span-2",children:[(0,t.jsx)("span",{className:er,children:i.telephone}),(0,t.jsx)("input",{className:et,type:"tel",inputMode:"tel",value:p,onChange:e=>x(e.target.value),autoComplete:"tel"}),(0,t.jsx)("span",{className:"text-[12px] text-[#8a9299]",children:i.telephoneAide})]}),(0,t.jsxs)("label",{className:"grid gap-1.5 sm:col-span-2",children:[(0,t.jsx)("span",{className:er,children:i.mot}),(0,t.jsx)("textarea",{className:`${et} min-h-[64px] resize-y`,value:h,onChange:e=>f(e.target.value),maxLength:500}),(0,t.jsx)("span",{className:"text-[12px] text-[#8a9299]",children:i.motAide})]})]}),es=e.reglement?(0,t.jsxs)("p",{className:"mt-4 flex items-start gap-2 rounded-xl border border-[#e3e0d9] bg-[#faf7f1] px-3.5 py-3 text-[13px] leading-snug text-[#3c4a52]",children:[(0,t.jsxs)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"mt-0.5 h-4 w-4 shrink-0 text-gold-ink",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"4",y:"10.5",width:"16",height:"10",rx:"2"}),(0,t.jsx)("path",{d:"M8 10.5V7.2a4 4 0 0 1 8 0v3.3"})]}),e.reglement]}):null,en=E?(0,t.jsx)("p",{role:"alert",className:"mt-4 rounded-xl border border-[#e8c7b0] bg-[#fdf6f1] px-4 py-3 text-[13.5px] leading-relaxed text-[#a8571f]",children:E}):null;return(0,t.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":i.titre,className:"fixed inset-0 z-50 overflow-y-auto bg-navy-deep/92 p-3 sm:p-6",onClick:e=>{e.target!==e.currentTarget||L||ee()},children:(0,t.jsxs)("div",{ref:V,className:"mx-auto w-full max-w-[560px] rounded-2xl bg-white p-5 shadow-[0_20px_60px_rgba(0,0,0,0.35)] sm:p-7",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-serif text-2xl leading-tight text-navy",children:T?i.titrePaiement:i.titre}),(0,t.jsx)("p",{className:"mt-1 text-[13.5px] text-[#6b7a82]",children:T?i.tenue:e.debite?i.sousTitrePaiement:i.sousTitreCarte})]}),(0,t.jsx)("button",{type:"button",onClick:ee,disabled:L,"aria-label":i.fermer,className:"shrink-0 rounded-full border border-[#e3e0d9] px-3 py-1.5 text-[13px] font-semibold text-[#6b7a82] transition-colors hover:border-gold disabled:opacity-40",children:i.retour})]}),(0,t.jsxs)("div",{className:"mt-4 flex items-baseline justify-between gap-3 rounded-xl bg-[#faf7f1] px-4 py-3",children:[(0,t.jsx)("span",{className:"text-[13.5px] leading-snug text-[#3c4a52]",children:e.resume}),(0,t.jsx)("span",{className:"shrink-0 text-[20px] font-bold tabular-nums text-navy",children:e.totalFormate})]}),e.debite?T?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{id:"mews-checkout",className:"mt-5 min-h-[560px]"}),en,(0,t.jsx)("p",{className:"mt-4 text-[12px] leading-relaxed text-[#8a9299]",children:i.surCheckout})]}):(0,t.jsxs)(t.Fragment,{children:[ea,es,en,(0,t.jsx)("button",{type:"button",onClick:Q,disabled:!U||L,className:"mt-4 w-full rounded-full bg-gold px-6 py-3.5 text-[16px] font-bold text-navy-deep transition hover:brightness-105 disabled:cursor-not-allowed disabled:bg-[#ddd8ce] disabled:text-[#9a9a95]",children:L?i.prepare:i.continuer}),(0,t.jsx)("p",{className:"mt-4 text-[12px] leading-relaxed text-[#8a9299]",children:i.surCheckout})]}):(0,t.jsxs)(t.Fragment,{children:[ea,(0,t.jsx)("h3",{className:"mt-6 font-serif text-xl text-navy",children:i.carte}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("label",{className:"grid gap-1.5 sm:col-span-2",children:[(0,t.jsx)("span",{className:er,children:i.porteur}),(0,t.jsx)("input",{className:et,value:g,onChange:e=>b(e.target.value),autoComplete:"cc-name"})]}),(0,t.jsxs)("div",{className:"grid gap-1.5 sm:col-span-2",children:[(0,t.jsx)("span",{className:er,children:i.numero}),(0,t.jsx)("div",{id:"pciproxy-numero",className:`${et} h-[44px] py-0`})]}),(0,t.jsxs)("label",{className:"grid gap-1.5",children:[(0,t.jsx)("span",{className:er,children:i.expiration}),(0,t.jsx)("input",{className:et,value:N,placeholder:"MM/AA",inputMode:"numeric",autoComplete:"cc-exp",onChange:e=>{let t=e.target.value.replace(/\D/g,"").slice(0,4);w(t.length>2?`${t.slice(0,2)}/${t.slice(2)}`:t)}})]}),(0,t.jsxs)("div",{className:"grid gap-1.5",children:[(0,t.jsx)("span",{className:er,children:i.crypto}),(0,t.jsx)("div",{id:"pciproxy-crypto",className:`${et} h-[44px] py-0`})]})]}),es,(0,t.jsx)("p",{className:"mt-3 text-[12px] leading-relaxed text-[#6b7a82]",children:i.surCarte}),en,(0,t.jsx)("button",{type:"button",onClick:()=>
1{if(!O.current){if(_(null),!U)return void _(l.trim()&&c.trim()?i.emailInvalide:i.champsManquants);if(!Y)return void _(i.expInvalide);O.current=!0,D(!0),z.current?.submit({expm:Number(Y[1]),expy:Number(Y[2])})}},disabled:!U||!q||!g.trim()||!A||L,className:"mt-5 w-full rounded-full bg-gold px-6 py-3.5 text-[16px] font-bold text-navy-deep transition hover:brightness-105 disabled:cursor-not-allowed disabled:bg-[#ddd8ce] disabled:text-[#9a9a95]",children:L?R??i.envoi:A?i.garantir(e.reglementFormate):i.chargement})]}),(0,t.jsx)("p",{className:"mt-2 text-[11.5px] leading-relaxed text-[#a0a8ad]",children:i.retractation})]})})}let A=e=>!!e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&!Number.isNaN(Date.parse(e)),P=e=>e.toISOString().slice(0,10);function T(e,t){let[r,a,s]=e.split("-").map(Number);return P(new Date(Date.UTC(r,a-1,s+t)))}function M(e,t,r){let a=Number(e),s=Number(t),n=Number(r);if(!Number.isInteger(a)||!Number.isInteger(s)||!Number.isInteger(n)||a<2e3||a>2100||s<1||s>12||n<1||n>31)return null;let i=new Date(Date.UTC(a,s-1,n));return i.getUTCFullYear()!==a||i.getUTCMonth()!==s-1||i.getUTCDate()!==n?null:P(i)}let L="ded6e6fb-ff3c-4fa8-ad07-403ee316be53",D=["19h00","19h30","20h00","20h30","21h00"],R=(e,t)=>{if("fr"===t)return e;let[r,a]=e.split("h"),s=Number(r);return`${s>12?s-12:0===s?12:s}:${a||"00"} ${s>=12?"pm":"am"}`},F=(e,t)=>{let[r,a,s]=e.split("-").map(Number);return new Date(r,a-1,s).toLocaleDateString("fr"===t?"fr-FR":"en-GB",{weekday:"short",day:"numeric"})},E={fr:{ajouter:"Ajouter une table au rooftop",titrePanneau:"Votre table au rooftop",sous:"Le 4ᵠétage, face à la rade, le soir de votre arrivée.",note:"La table est prise en même temps que votre chambre. Sans supplément.",carte:"Voir la carte du rooftop",soir:"Quel soir ?",heure:"Vers quelle heure ?",retirer:"Retirer la table",choisie:e=>`Table r\xe9serv\xe9e \xb7 ${e}`,faitTitre:"Table réservée",fait:"On vous attend au 4áµ.",rate:"La table n'a pas pu être prise â appelez-nous au 04 94 41 36 23, on vous place."},en:{ajouter:"Add a rooftop table",titrePanneau:"Your rooftop table",sous:"The 4th floor facing the bay, on the night you arrive.",note:"The table is booked along with your room. No extra charge.",carte:"See the rooftop menu",soir:"Which evening?",heure:"What time?",retirer:"Remove the table",choisie:e=>`Table booked \xb7 ${e}`,faitTitre:"Table booked",fait:"See you on the 4th floor.",rate:"The table could not be booked â call us on +33 4 94 41 36 23 and we'll seat you."}};async function _({choix:e,pax:t,client:r,langue:a}){let s=`${r.prenom} ${r.nom}`.trim();try{let{data:n,error:i}=await N.supabase.rpc("rooftop_book",{p_hotel:L,p_date:e.date,p_heure:e.heure,p_pax:t,p_nom:s,p_tel:r.telephone,p_email:r.email,p_message:"fr"===a?"Client de l'hôtel â pris avec la chambre":"Hotel guest â booked with the room"});if(i||n?.status!=="ok")return null;let l=n?.table??null,o=n?.id??null;return fetch("/api/rooftop-reservation",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:o,source:"tunnel"})}).catch(()=>{}),{table:l,heure:e.heure,date:e.date}}catch{return null}}function z({soirs:e,choix:a,onChoix:s,onFermer:n,nuits:i,langue:l}){let o=E[l],[c,d]=(0,r.useState)(e[0]??"");(0,r.useEffect)(()=>{e.length&&!e.includes(c)&&d(e[0])},[e,c]);let u=e=>["rounded-full border px-3 py-1.5 text-[13px] font-semibold transition-colors",e?"border-navy bg-navy text-white":"border-[#e3e0d9] bg-white text-[#3c4a52] hover:border-gold"].join(" ");return(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,t.jsxs)("button",{type:"button",onClick:n,className:"mb-3 flex shrink-0 items-center gap-2 self-start text-[13.5px] font-semibold text-navy hover:text-gold-ink",children:[(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-4 w-4 text-gold-ink",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M15 5l-7 7 7 7"})}),"fr"===l?"Retour":"Back"]}),(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col justify-center overflow-y-auto text-center",children:[(0,t.jsxs)("p",{className:"font-serif text-[22px] leading-tight text-navy",children:["ð¸ ",o.titrePanneau]}),(0,t.jsx)("p",{className:"mx-auto mt-1 max-w-[34ch] text-[13.5px] leading-snug text-[#6b7a82]",children:o.sous}),i>1&&e.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mt-4 text-[11px] font-semibold uppercase tracking-[0.12em] text-[#8a9299]",children:o.soir}),(0,t.jsx)("div",{className:"mt-1.5 flex flex-wrap justify-center gap-1.5",children:e.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>d(e),"aria-pressed":c===e,className:`${u(c===e)} capitalize`,children:F(e,l)},e))})]}),(0,t.jsx)("p",{className:"mt-4 text-[11px] font-semibold uppercase tracking-[0.12em] text-[#8a9299]",children:o.heure}),(0,t.jsx)("div",{className:"mt-1.5 flex flex-wrap justify-center gap-1.5",children:D.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":a?.heure===e&&a?.date===c,onClick:()=>{s({date:c,heure:e}),n()},className:u(a?.heure===e&&a?.date===c),children:R(e,l)},e))}),(0,t.jsx)("p",{className:"mx-auto mt-4 max-w-[34ch] text-[12.5px] leading-snug text-[#8a9299]",children:o.note}),(0,t.jsxs)("a",{href:"/rooftop-les-voiles",target:"_blank",rel:"noopener noreferrer",className:"mx-auto mt-3 inline-flex items-center gap-1.5 rounded-full border border-[#e3e0d9] bg-white px-3.5 py-1.5 text-[12.5px] font-semibold text-navy transition-colors hover:border-gold hover:text-gold-ink",children:[o.carte,(0,t.jsxs)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M14 4h6v6"}),(0,t.jsx)("path",{d:"M20 4l-8 8"}),(0,t.jsx)("path",{d:"M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"})]})]})]}),a&&(0,t.jsx)("button",{type:"button",onClick:()=>{s(null),n()},className:"mt-3 shrink-0 text-center text-[12.5px] text-[#8a9299] underline underline-offset-2 hover:text-[#a8571f]",children:o.retirer})]})}function V({prise:e,langue:r}){let a=E[r];return e?(0,t.jsxs)("div",{className:"mt-4 rounded-xl border border-gold/50 bg-[#faf7f1] px-4 py-3 text-left",children:[(0,t.jsxs)("p",{className:"font-serif text-[17px] text-navy",children:["ð¸ ",a.faitTitre," · ",(0,t.jsx)("span",{className:"capitalize",children:F(e.date,r)}
1)," ",R(e.heure,r)]}),(0,t.jsx)("p",{className:"mt-0.5 text-[13.5px] text-[#5b6a72]",children:a.fait})]}):(0,t.jsx)("p",{className:"mt-4 rounded-xl bg-[#fdf6f1] px-4 py-3 text-left text-[13px] leading-snug text-[#8a4b2a]",children:a.rate})}var O=e.i(31338);let B={fr:{titre:"Hôtel-Rooftop Les Voiles",chapo:"Prix tout compris, aucune surprise à l'arrivée.",arrivee:"Arrivée",depart:"Départ",choisirDates:"Choisissez votre arrivée",puisDepart:"· puis votre départ",voyageLabel:"Vous voyagez",seul:"Seul",deux:"à deux",chercher:"Voir les chambres",recherche:"Rechercheâ¦",choisir:"Dites-nous qui voyage",nuits:e=>`${e} nuit${e>1?"s":""}`,pour1:"Pour une personne",aucune:"Aucune chambre disponible sur ces dates.",tropLong:"Séjour trop long pour une réservation en ligne.",tropLongAide:e=>`Il reste de la place sur ces dates, mais pas pour ${e} nuits d'affil\xe9e. Raccourcissez le s\xe9jour, ou appelez-nous au 04\xa094\xa041\xa036\xa023 : au-del\xe0, on s'en occupe \xe0 la main.`,aucuneAide:"Essayez des dates voisines, ou appelez-nous au 04 94 41 36 23 â il reste parfois de la place.",parNuit:"la nuit",seulAussi:"Vous voyagez seul ?",seulAussiAction:"Voir le prix pour une personne",erreur:"La recherche n'a pas abouti.",erreurAide:"Réessayez dans un instant, ou appelez-nous au 04 94 41 36 23.",checkin:"Arrivée autonome à partir de 15 h · départ jusqu'à 12 h en direct",colDates:"Vos dates",colOffres:"Nos chambres",colRecap:"Votre séjour",attenteOffres:"Choisissez vos dates et dites-nous qui voyage : les chambres disponibles s'afficheront ici.",recapVide:"Choisissez une chambre pour voir le total.",tarifFlexible:"Tarif flexible",tarifPrepaye:"Prépayé, non remboursable",totalSejour:"Total du séjour",payer:"Réserver et payer",confirmeTitre:"C'est réservé.",confirmeSous:"Votre séjour est enregistré à l'hôtel.",confirmeNumero:"Votre numéro de confirmation",confirmeNumeroAide:"à citer si vous nous appelez. Notez-le quelque part.",confirmeQuestion:"Une question sur votre séjour ?",confirmeChambre:"Votre chambre",confirmeMail:"Un email de confirmation vient de vous être envoyé par l'hôtel.",agenda:"Ajouter à mon agenda",confirmeRetour:"Revenir à l'accueil",economisez:e=>`\xc9conomisez ${e}`,annulableJusque:(e,t)=>`Annulable sans frais jusqu'au ${e}, ${t} h`,modifier:"Modifier",voirRecap:"Voir le récapitulatif",simplicite:"Volontairement simples : pas de minibar dans les chambres â mais une cuisine en libre-service pour vos repas, et le rooftop au 4ᵠétage, face à la mer, pour l'apéro.",exclusif:"Exclu direct",majPrix:"Mettre à jour les prix",aJour:"Prix à jour",siteOfficiel:"Site officiel",surBooking:["Sur ",", ce séjour est à ","."],rooftopAjouter:"Ajouter une table au rooftop",rooftopChoisie:e=>`Table au rooftop \xb7 ${e}`,rooftopSous:"Un verre face à la mer, le soir venu",rooftopModifier:"Modifier le créneau",gainDirect:e=>`Vous gagnez ${e}`,ecartIci:"Ici",empreinteCourt:e=>`Carte en garantie \xb7 ${e} pr\xe9autoris\xe9s`,debitCourt:e=>`D\xe9bit imm\xe9diat \xb7 ${e}`,empreinteLong:(e,t)=>`Votre carte n'est pas d\xe9bit\xe9e. Une pr\xe9autorisation de ${e} (${t} du s\xe9jour) garantit la chambre ; le s\xe9jour se r\xe8gle \xe0 l'h\xf4tel.`,debitLong:e=>`Votre carte est d\xe9bit\xe9e de ${e} d\xe8s la confirmation, soit la totalit\xe9 du s\xe9jour. Ce tarif n'est pas remboursable.`,debitLongPartiel:(e,t)=>`Votre carte est d\xe9bit\xe9e de ${e} (${t} du s\xe9jour) d\xe8s la confirmation. Le solde se r\xe8gle \xe0 l'h\xf4tel.`,paiementSecurise:"Paiement sécurisé",pasDeMelange:"Une même réservation ne mélange pas les deux tarifs. Retirez vos chambres pour changer.",chambreEnPlus:"Ajouter une chambre identique",ajouterChambre:"Ajouter une autre chambre",ajoutArme:"Choisissez la chambre à ajouter dans la liste",chambreEnMoins:"Retirer une chambre",retirerLigne:"Retirer",plusDeChambres:"Plus de chambre disponible dans cette catégorie",xFois:e=>`\xd7 ${e}`,totalChambres:e=>e>1?`${e} chambres`:"1 chambre",repriseEnCours:"On finalise votre réservationâ¦",repriseEchecTitre:"Un dernier pas nous manque",repriseEchec:"Votre banque a bien confirmé, mais nous n'avons pas pu terminer la réservation ici. Appelez-nous au 04 94 41 36 23 : nous la bouclons en deux minutes, rien n'a été débité.",repriseAuthTitre:"L'authentification n'est pas allée au bout",repriseAuth:"Votre banque n'a pas confirmé l'authentification de votre carte, donc rien n'a été réservé ni débité. Vous pouvez réessayer tout de suite â ou nous appeler au 04 94 41 36 23, on s'en occupe.",repriseAuthRejouer:"Réessayer",repriseFermer
1:"Fermer",paiementSecuriseAide:"Votre carte est saisie chez notre prestataire de paiement : elle ne transite pas par ce site.",couchages:e=>e<=1?"1 personne":`${e} personnes`,surface:e=>`${e} m\xb2`,lit:e=>`lit ${e} cm`,galerieOuvrir:e=>`Voir les ${e} photos`,galerieCompteur:(e,t)=>`Photo ${e} sur ${t}`,galerieFermer:"Fermer",galeriePrec:"Photo précédente",galerieSuiv:"Photo suivante",aideAvant:"Une question avant de réserver ?",dontTaxe:e=>`dont ${e} de taxe de s\xe9jour`,voirDetails:"Détails",retour:"Retour",remiseDirecte:e=>`â${e} % en direct`},en:{titre:"Hôtel-Rooftop Les Voiles",chapo:"All-inclusive prices, no surprises on arrival.",arrivee:"Check-in",depart:"Check-out",choisirDates:"Choose your arrival",puisDepart:"· then your departure",voyageLabel:"You are travelling",seul:"Alone",deux:"As a couple",chercher:"See the rooms",recherche:"Searchingâ¦",choisir:"Tell us who is travelling",nuits:e=>`${e} night${e>1?"s":""}`,pour1:"For one person",aucune:"No rooms available on these dates.",tropLong:"Stay too long to book online.",tropLongAide:e=>`We still have rooms on those dates, but not for ${e} nights in a row. Shorten your stay, or call us on +33\xa04\xa094\xa041\xa036\xa023 â we handle longer stays by hand.`,aucuneAide:"Try nearby dates, or call us on +33 4 94 41 36 23 â we sometimes have space left.",parNuit:"per night",seulAussi:"Travelling alone?",seulAussiAction:"See the price for one person",erreur:"The search did not go through.",erreurAide:"Try again in a moment, or call us on +33 4 94 41 36 23.",checkin:"Self check-in from 3 pm · check-out until noon when booking direct",colDates:"Your dates",colOffres:"Our rooms",colRecap:"Your stay",attenteOffres:"Choose your dates and tell us who is travelling: available rooms will appear here.",recapVide:"Choose a room to see the total.",tarifFlexible:"Flexible rate",tarifPrepaye:"Prepaid, non-refundable",totalSejour:"Stay total",payer:"Book and pay",confirmeTitre:"You're booked.",confirmeSous:"Your stay is registered with the hotel.",confirmeNumero:"Your confirmation number",confirmeNumeroAide:"Quote it if you call us. Write it down somewhere.",confirmeQuestion:"A question about your stay?",confirmeChambre:"Your room",confirmeMail:"A confirmation email has just been sent to you by the hotel.",agenda:"Add to my calendar",confirmeRetour:"Back to the home page",economisez:e=>`Save ${e}`,annulableJusque:(e,t)=>`Free cancellation until ${e}, ${t>12?t-12:0===t?12:t} ${t>=12?"pm":"am"}`,modifier:"Change",voirRecap:"See the summary",simplicite:"Deliberately simple: no minibar in the rooms â but a self-service kitchen for your meals, and the rooftop on the 4th floor, facing the sea, for a drink.",exclusif:"Direct only",majPrix:"Update prices",aJour:"Prices up to date",siteOfficiel:"Official website",surBooking:["On ",", this stay is ","."],ecartIci:"Here",rooftopAjouter:"Add a rooftop table",rooftopChoisie:e=>`Rooftop table \xb7 ${e}`,rooftopSous:"A drink facing the sea, come evening",rooftopModifier:"Change the time",gainDirect:e=>`You win ${e}`,empreinteCourt:e=>`Card as guarantee \xb7 ${e} held`,debitCourt:e=>`Charged now \xb7 ${e}`,empreinteLong:(e,t)=>`Your card is not charged. A ${e} hold (${t} of the stay) secures the room; you settle at the hotel.`,debitLong:e=>`Your card is charged ${e} on confirmation â the full stay. This rate is non-refundable.`,debitLongPartiel:(e,t)=>`Your card is charged ${e} (${t} of the stay) on confirmation. The balance is settled at the hotel.`,paiementSecurise:"Secure payment",pasDeMelange:"A single booking can't mix the two rates. Remove your rooms to switch.",chambreEnPlus:"Add another identical room",ajouterChambre:"Add another room",ajoutArme:"Pick the room to add from the list",chambreEnMoins:"Remove one room",retirerLigne:"Remove",plusDeChambres:"No more rooms available in this category",xFois:e=>`\xd7 ${e}`,totalChambres:e=>e>1?`${e} rooms`:"1 room",repriseEnCours:"Finalising your bookingâ¦",repriseEchecTitre:"One last step is missing",repriseEchec:"Your bank confirmed, but we couldn't complete the booking here. Call us on +33 4 94 41 36 23 and we'll finish it in two minutes â nothing has been charged.",repriseAuthTitre:"The authentication didn't complete",repriseAuth:"Your bank did not confirm your card authentication, so nothing was booked and nothing was charged. You can try again right away â or call us on +33 4 94 41 36 23 and we'll take care of it.",repriseAuthRejouer:"Try again",repriseFermer
1:"Close",paiementSecuriseAide:"Your card is entered directly with our payment provider â it never passes through this site.",couchages:e=>e<=1?"1 guest":`${e} guests`,surface:e=>`${e} m\xb2`,lit:e=>`${e} cm bed`,galerieOuvrir:e=>`See all ${e} photos`,galerieCompteur:(e,t)=>`Photo ${e} of ${t}`,galerieFermer:"Close",galeriePrec:"Previous photo",galerieSuiv:"Next photo",aideAvant:"A question before booking?",dontTaxe:e=>`including ${e} city tax`,voirDetails:"Details",retour:"Back",remiseDirecte:e=>`â${e}% direct`}},Y={fr:"fr-FR",en:"en-GB"},q=(e,t)=>new Intl.NumberFormat(Y[t],{style:"currency",currency:"EUR",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),U=(e,t)=>new Intl.NumberFormat(Y[t],{style:"percent",maximumFractionDigits:0}).format(e),W=(e,t)=>new Intl.NumberFormat(Y[t],{style:"currency",currency:"EUR",minimumFractionDigits:0,maximumFractionDigits:2*!Number.isInteger(e)}).format(e),G=()=>{"undefined"==typeof navigator||"function"!=typeof navigator.vibrate||window.matchMedia("(prefers-reduced-motion: reduce)").matches||navigator.vibrate(10)};function J({valeur:e,langue:a,court:s=!1}){let n=s?W:q,[i,l]=(0,r.useState)(e),o=(0,r.useRef)(e),c=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!Number.isFinite(e))return;let t=o.current,r=e-t;if(0===r)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){o.current=e,l(e);return}let a=performance.now(),s=n=>{let i=Math.min(1,(n-a)/340);l(t+r*(1-Math.pow(1-i,3))),i<1?c.current=requestAnimationFrame(s):o.current=e};return c.current=requestAnimationFrame(s),()=>{c.current&&cancelAnimationFrame(c.current)}},[e]);let d=Number.isFinite(e)?e:i;return(0,t.jsx)("span",{"aria-label":n(d,a),children:(0,t.jsx)("span",{"aria-hidden":!0,children:n(i,a)})})}let H=e=>{let t=new Date;return t.setDate(t.getDate()+e),`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`},K=(e,t)=>{if(!e)return"";let[r,a,s]=e.split("-").map(Number);return Number.isFinite(r)&&Number.isFinite(a)&&Number.isFinite(s)?new Date(r,a-1,s).toLocaleDateString("fr"===t?"fr-FR":"en-GB",{day:"numeric",month:"short"}):""},Q=(e,t)=>{let r=(Date.parse(t)-Date.parse(e))/864e5;return Number.isFinite(r)?Math.max(0,Math.round(r)):0},Z={fr:"04 94 41 36 23",en:"+33 4 94 41 36 23"},X=(e,t,r,a)=>{let s=t.find(t=>t.Id===e?.RateGroupId);if(s?.SettlementAction==="ChargeCreditCard")return a.tarifPrepaye;if(s?.SettlementAction==="CreatePreauthorization")return a.tarifFlexible;let n=`${m(e?.Name,r)} ${m(e?.Description,r)}`.toLowerCase();return/non[\s-]*remboursable|non[\s-]*refundable|prépaiement|prepay/.test(n)?a.tarifPrepaye:a.tarifFlexible},ee=(e,t)=>
1{let r=t.find(t=>t.Id===e?.RateGroupId);return r?.SettlementAction==="ChargeCreditCard"||r?.SettlementAction!=="CreatePreauthorization"&&/non[\s-]*remboursable|non[\s-]*refundable|prépaiement|prepay/.test(`${String(e?.Name??"")} ${String(e?.Description??"")}`.toLowerCase())},et=(e,t)=>{let r=`${m(e?.Description,t)}`.toLowerCase();if(!/jour d'arriv|day of arrival/.test(r))return null;let a=r.match(/(\d{1,2})\s*h/)??r.match(/(\d{1,2})\s*(?:pm|:00)/),s=a?Number(a[1]):NaN;return Number.isInteger(s)&&s>=1&&s<=23?s:null},er={"e34e45e7-8ce1-4b68-8547-aaa9008727ad":"b1361f7c-d12f-41f1-9665-ab2800fa84bd","a1f3a293-0567-49c7-81c6-aaa9008727ad":"a490108f-2cc2-41c6-b499-ab2800f699c0","c60f97a0-8870-4c0e-8d1e-aaa9008727ad":"d30156f7-26bd-4abb-9695-ab2800f88143"},ea={"a1f3a293-0567-49c7-81c6-aaa9008727ad":{fr:"Toutes avec balcon, au niveau de l'ascenseur. Pensée pour une nuit ou deux, seul.",en:"All with a balcony, on the lift landing. Made for a night or two, on your own."},"e34e45e7-8ce1-4b68-8547-aaa9008727ad":{fr:"Côté rue, dans un quartier résidentiel très calme. Une chambre PMR et une avec baignoire, selon disponibilité.",en:"Street side, in a very quiet residential district. One accessible room and one with a bathtub, subject to availability."},"c60f97a0-8870-4c0e-8d1e-aaa9008727ad":{fr:"Vue sur la rade, balcon pour cinq des sept chambres.",en:"Looking out over the bay, with a balcony in five of the seven rooms."}},es={"a1f3a293-0567-49c7-81c6-aaa9008727ad":"Single Room","e34e45e7-8ce1-4b68-8547-aaa9008727ad":"Comfort Room","c60f97a0-8870-4c0e-8d1e-aaa9008727ad":"Superior Room â Sea View"},en=(e,t,r)=>t?"fr"===r||t.nom!==t.nomFr?t.nom:es[e]??t.nom:"â",ei=(e,t,r,a=!1)=>{let s=new Map;for(let a of e){let e=ee(t.find(e=>e.Id===a.tarifId),r);s.set(e,[...s.get(e)??[],a])}let n=[];for(let e of[!1,!0]){if(e&&a)continue;let t=s.get(e);if(!t?.length)continue;let r=[...t].sort((e,t)=>e.total-t.total);n.push({prepaye:e,direct:r[0],public:r.length>1&&r[r.length-1].total>r[0].total?r[r.length-1]:null})}return n},el=e=>null===e?null:e<=1?140:160,eo={"a1f3a293-0567-49c7-81c6-aaa9008727ad":["/images/chambres/single/1.jpg","/images/chambres/single/2.jpg"],"e34e45e7-8ce1-4b68-8547-aaa9008727ad":["/images/chambres/confort/1.jpg","/images/chambres/confort/2.jpg","/images/chambres/confort/3.jpg"],"c60f97a0-8870-4c0e-8d1e-aaa9008727ad":["/images/chambres/superieur/1.jpg","/images/chambres/superieur/2.jpg","/images/chambres/superieur/3.jpg"]};function ec({images:e,titre:a,debut:s,T:n,onFermer:i}){let[l,c]=(0,r.useState)(s),d=(0,r.useRef)(null),u=(0,r.useRef)(null),m=(0,r.useRef)(null),p=(0,r.useCallback)(()=>c(t=>(t+1)%e.length),[e.length]),x=(0,r.useCallback)(()=>c(t=>(t-1+e.length)%e.length),[e.length]);(0,r.useEffect)(()=>{u.current?.focus()},[]),(0,r.useEffect)(()=>{let e=e=>{if("Escape"===e.key){e.preventDefault(),i();return}if("ArrowRight"===e.key&&p(),"ArrowLeft"===e.key&&x(),"Tab"===e.key&&d.current){let t=d.current.querySelectorAll("button");if(!t.length)return;let r=t[0],a=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),r.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i,p,x]);let h=e.length>1;return(0,t.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":a,className:"fixed inset-0 z-50 flex items-center justify-center bg-navy-deep/90 p-4",onClick:e=>{e.target===e.currentTarget&&i()},children:(0,t.jsxs)("div",{ref:d,className:"flex h-full w-full max-w-4xl flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-4 text-cream",children:[(0,t.jsx)("p",{className:"font-serif text-xl",children:a}),(0,t.jsx)("button",{ref:u,type:"button",onClick:i,"aria-label":n.galerieFermer,className:"flex h-10 w-10 items-center justify-center rounded-full bg-cream/15 text-cream backdrop-blur-sm transition hover:bg-cream/30",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-5 w-5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:(0,t.jsx)("path",{d:"M6 6l12 12M18 6L6 18"})})})]}),(0,t.jsxs)("div",{className:"relative min-h-0 w-full flex-1",onTouchStart:e=>{m.current=e.touches[0]?.clientX??null},onTouchEnd:e=>{let t=m.current;if(m.current=null,null===t||!h)return;let r=(e.changedTouches[0]?.clientX??t)-t;r<=-40?p():r>=40&&x()},children:[(0,t.jsx)("button",{type:"button",onClick:h?p:i,"aria-label":h?n.galerieSuiv:n.galerieFermer,className:"absolute inset-0 h-full w-full cursor-pointer",children:(0,t.jsx)(o.default,{src:e[l].src,alt:e[l].alt??`${a} â ${n.galerieCompteur(l+1,e.length)}
1`,fill:!0,sizes:"(max-width: 900px) 100vw, 900px",className:"rounded-2xl object-contain",priority:!0})}),h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button","aria-label":n.galeriePrec,onClick:x,className:"absolute left-3 top-1/2 z-10 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-white/92 text-navy-deep shadow-[0_4px_16px_rgba(0,0,0,0.28)] transition hover:bg-white active:scale-95",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M15 5l-7 7 7 7"})})}),(0,t.jsx)("button",{type:"button","aria-label":n.galerieSuiv,onClick:p,className:"absolute right-3 top-1/2 z-10 flex h-12 w-12 -translate-y-1/2 items-center justify-center rounded-full bg-white/92 text-navy-deep shadow-[0_4px_16px_rgba(0,0,0,0.28)] transition hover:bg-white active:scale-95",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M9 5l7 7-7 7"})})}),(0,t.jsxs)("span",{className:"pointer-events-none absolute bottom-4 left-1/2 z-10 flex -translate-x-1/2 items-center gap-1.5 rounded-full bg-navy-deep/55 px-3 py-2 backdrop-blur-sm",children:[e.map((e,r)=>(0,t.jsx)("span",{className:["block rounded-full transition-all",r===l?"h-2 w-5 bg-cream":"h-2 w-2 bg-cream/50"].join(" ")},e.src)),(0,t.jsx)("span",{className:"sr-only",children:n.galerieCompteur(l+1,e.length)})]})]})]})]})})}function ed({recit:e,T:a,variante:s,onGalerie:n}){let[i,l]=(0,r.useState)(!1);if(!e)return null;let c=r=>(0,t.jsxs)("button",{type:"button",onClick:()=>l(r),"aria-expanded":i,className:"flex w-full shrink-0 items-center justify-between gap-3 rounded-xl border border-[#e3e0d9] px-4 py-3 text-left text-[14px] font-semibold text-navy transition-colors hover:border-gold hover:bg-[#faf7f1]",children:[e.compris.titre,(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:["h-4 w-4 shrink-0 text-gold-ink transition-transform",r?"":"rotate-180"].join(" "),fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M6 9l6 6 6-6"})})]}),d=(0,t.jsxs)("button",{type:"button",onClick:()=>l(!1),className:"flex w-full shrink-0 items-center justify-center gap-2 rounded-xl border border-[#e3e0d9] px-4 py-2.5 text-[14px] font-semibold text-navy transition-colors hover:border-gold hover:bg-[#faf7f1]",children:[(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-4 w-4 text-gold-ink",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M15 5l-7 7 7 7"})}),a.retour]}),u=(0,t.jsxs)("div",{className:"min-h-0 overflow-y-auto",children:[(0,t.jsx)("h2",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299]",children:e.arrivee.titre}),(0,t.jsx)("div",{className:"mt-2 space-y-1.5 text-[13px] leading-relaxed text-[#4a5a63]",children:e.arrivee.lignes.map(e=>(0,t.jsx)("p",{children:e},e))})]}),m=r=>e.communs.length>0&&(0,t.jsxs)("button",{type:"button",onClick:n,"aria-label":a.galerieOuvrir(e.communs.length),className:["group relative mt-4 w-full overflow-hidden rounded-xl bg-[#f0ece4]",r?"min-h-[110px] flex-1":"aspect-[16/9]"].join(" "),children:[(0,t.jsx)(o.default,{src:e.communs[0].src,alt:e.communs[0].alt,fill:!0,sizes:"(min-width: 1024px) 340px, 100vw",className:"object-cover transition-transform duration-500 group-hover:scale-[1.04]"}),(0,t.jsx)("span",{className:"absolute bottom-2 left-2 rounded-full bg-navy-deep/80 px-2.5 py-1 text-[11px] font-semibold text-cream backdrop-blur-sm",children:a.galerieOuvrir(e.communs.length)})]}),p=(0,t.jsx)("div",{className:"shrink-0 space-y-1.5 text-[12.5px] leading-relaxed text-[#4a5a63]",children:e.lignes.map(e=>(0,t.jsx)("p",{children:e},e))}),x=(0,t.jsx)("ul",{className:"grid shrink-0 grid-cols-2 gap-x-3 gap-y-1 text-[12.5px] leading-snug text-[#4a5a63]",children:e.compris.items.map(e=>(0,t.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,t.jsx)("span",{"aria-hidden":!0,
1className:e.absent?"text-[#b0b6ba]":"text-gold-ink",children:e.absent?"â":"â"}),(0,t.jsx)("span",{className:e.absent?"text-[#8a9299]":"",children:e.texte})]},e.texte))}),h=(0,t.jsxs)(t.Fragment,{children:[p,(0,t.jsx)("div",{className:"mt-2.5 border-t border-[#f0ece4] pt-2.5",children:x})]});return"colonne"!==s?(0,t.jsxs)("div",{className:"mt-6 border-t border-[#f0ece4] pt-5 lg:hidden",children:[(0,t.jsx)("h2",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299]",children:e.titre}),m(!1),(0,t.jsx)("div",{className:"mt-3 [perspective:1200px]",children:(0,t.jsxs)("div",{className:["grid transition-transform duration-700 ease-in-out [transform-style:preserve-3d]",i?"[transform:rotateY(180deg)]":""].join(" "),children:[(0,t.jsxs)("div",{inert:i,className:["col-start-1 row-start-1 flex flex-col [backface-visibility:hidden] [-webkit-backface-visibility:hidden] [transition:visibility_0s_linear_350ms]",i?"invisible":""].join(" "),children:[p,(0,t.jsx)("div",{className:"mt-5",children:u})]}),(0,t.jsxs)("div",{inert:!i,className:["col-start-1 row-start-1 flex flex-col [backface-visibility:hidden] [-webkit-backface-visibility:hidden] [transform:rotateY(180deg)] [transition:visibility_0s_linear_350ms]",i?"":"invisible"].join(" "),children:[(0,t.jsx)("h2",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299]",children:e.compris.titre}),(0,t.jsx)("div",{className:"mt-3",children:x})]})]})}),(0,t.jsx)("div",{className:"mt-4",children:i?d:c(!0)})]}):(0,t.jsx)("div",{className:"mt-6 hidden min-h-0 flex-1 flex-col border-t border-[#f0ece4] pt-5 [perspective:1400px] lg:flex",children:(0,t.jsxs)("div",{className:["relative min-h-0 flex-1 transition-transform duration-700 ease-in-out [transform-style:preserve-3d]",i?"[transform:rotateY(180deg)]":""].join(" "),children:[(0,t.jsxs)("div",{inert:i,className:["absolute inset-0 flex flex-col [backface-visibility:hidden] [-webkit-backface-visibility:hidden] [transition:visibility_0s_linear_350ms]",i?"invisible":""].join(" "),children:[u,m(!0),(0,t.jsx)("div",{className:"mt-4",children:c(!0)})]}),(0,t.jsxs)("div",{inert:!i,className:["absolute inset-0 flex flex-col [backface-visibility:hidden] [-webkit-backface-visibility:hidden] [transform:rotateY(180deg)] [transition:visibility_0s_linear_350ms]",i?"":"invisible"].join(" "),children:[(0,t.jsx)("h2",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299]",children:e.compris.titre}),(0,t.jsx)("div",{className:"mt-2 flex min-h-0 flex-1 flex-col overflow-y-auto",children:h}),(0,t.jsx)("div",{className:"mt-3",children:d})]})]})})}let eu=new Set(["9321c61b-003d-4c9c-bef8-ab2800f64697","f849455d-224d-41d8-a7ea-ab2800fa351d","5fac13c7-8365-4f6b-8c4a-ab2800f9bde8"]),em={"a1f3a293-0567-49c7-81c6-aaa9008727ad":"/images/chambres/single/2.jpg","e34e45e7-8ce1-4b68-8547-aaa9008727ad":"/images/chambres/confort/2.jpg","c60f97a0-8870-4c0e-8d1e-aaa9008727ad":"/images/chambres/superieur/3.jpg"},ep=(e,t,r)=>{let a=em[e];if(a)return a;let s=er[e];if(s&&t?.images.includes(s))return g(s,r);let n=t?.images.find(e=>!eu.has(e));return n?g(n,r):null},ex=(e,t,r)=>{let a=ep(e,t,1400),s=[...(t?.images??[]).filter(e=>!eu.has(e)).map(e=>g(e,1400)),...eo[e]??[]];return(a?[a,...s.filter(e=>e!==a)]:s).map(e=>({src:e,alt:r}))};function eh({langue:e}){let s,n,i=B[e],c=O.RECIT.voiles[e],[d,u]=(0,r.useState)(()=>H(0)),[m,p]=(0,r.useState)(()=>H(1)),[x,g]=(0,r.useState)(null),[v,j]=(0,r.useState)(null),[w,k]=(0,r.useState)(new Map),[I,S]=(0,r.useState)(!1),[P,D]=(0,r.useState)(!1),[F,E]=(0,r.useState)(!1),[Y,er]=(0,r.useState)([]),es=(0,r.useRef)(!1),eo=(0,r.useRef)(null),eu=(0,r.useRef)(null),em=(0,r.useRef)(!1),[eh,ef]=(0,r.useState)(!1),[eg,eb]=(0,r.useState)(!1),[ev,ej]=(0,r.useState)(null),[ey,eN]=(0,r.useState)(null),[ew,ek]=(0,r.useState)(null),[eC,eI]=(0,r.useState)(0),[eS,e$]=(0,r.useState)(null),[eA,eP]=(0,r.useState)(null),[eT,eM]=(0,r.useState)(null),[eL,eD]=(0,r.useState)(!1),[eR,eF]=(0,r.useState)(!1);(0,r.useEffect)(()=>{C("ouverture")},[]),(0,r.useEffect)(()=>{eR&&C("paiement")},[eR]);let[eE,e_]=(0,r.useState)(null),[ez,eV]=(0,r.useState)(null),eO=Q(d,m),eB="seul"===x?1:2,eY=Y[0]??null,eq=Y.reduce((e,t)=>
1e+t.total,0),eU=Y.reduce((e,t)=>e+t.pourPersonnes,0),eW=!!ew&&ew.a===d&&ew.d===m&&ew.pax===eB,eG=(0,r.useCallback)(async({arrivee:t,depart:r,adultes:a})=>{S(!0),D(!1),C("recherche");try{let[s,n]=await Promise.all([f({arrivee:t,depart:r,adultes:a,langue:e}),b(e)]);j(s),k(n),s?.offres?.length&&C("offres");let i=!1;if(!s.offres.length&&Q(t,r)>2)try{i=(await f({arrivee:t,depart:new Date(Date.parse(`${t}T12:00:00Z`)+1728e5).toISOString().slice(0,10),adultes:a,langue:e})).offres.length>0}catch{}E(i),er([]),ek({a:t,d:r,pax:a}),eI(e=>e+1);let l=new URL(window.location.href);l.searchParams.set("arrivee",t),l.searchParams.set("depart",r),l.searchParams.set("voyage",1===a?"seul":x??"deux"),window.history.replaceState(null,"",l)}catch{D(!0),j(null),E(!1)}finally{S(!1)}},[e,x]),eJ=(0,r.useCallback)(e=>(em.current=!0,eb(!1),eG({arrivee:d,depart:m,adultes:e})),[eG,d,m]);(0,r.useEffect)(()=>{!em.current||I||(em.current=!1,window.matchMedia("(min-width: 1024px)").matches||eo.current?.scrollIntoView({behavior:"smooth",block:"start"}))},[I,v,P]),(0,r.useEffect)(()=>{let e=eu.current;if(!e)return;let t=new IntersectionObserver(([e])=>ef(e.isIntersecting),{threshold:.1});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{if(es.current)return;es.current=!0;let e=new URLSearchParams(window.location.search);if(e.get("apres3ds")){window.history.replaceState({},"",window.location.pathname);let e=function(){let e=null;try{e=sessionStorage.getItem(y),sessionStorage.removeItem(y)}catch{return null}if(!e)return null;try{let t=JSON.parse(e);if(!t?.carteId||!t?.reservationIds?.length||!t?.sejour?.lignes?.length||!Number.isFinite(t.poseeA)||Date.now()-t.poseeA>18e5)return null;return t}catch{return null}}();e?(eV("en-cours"),fetch("/api/reserver/carte",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({langue:e.langue,carteId:e.carteId,reservationIds:e.reservationIds,sejour:e.sejour})}).then(t=>{if(!t.ok){eV(402===t.status?"auth":"echec"),C("3ds_echec");return}eV(null),e_({groupeId:e.groupeId,numeros:e.numeros,client:e.client}),C("confirmee")}).catch(()=>{eV("echec"),C("3ds_echec")})):(eV("echec"),C("3ds_echec"))}let t=function(e,t){let r=A(e.get("arrivee"))?e.get("arrivee"):null,a=A(e.get("depart"))?e.get("depart"):null;if(r||(r=M(e.get("checkinYear"),e.get("checkinMonth"),e.get("checkinDay"))),a||(a=M(e.get("checkoutYear"),e.get("checkoutMonth"),e.get("checkoutDay"))),!r)return null;if(r<t&&(r=t),!a){let t=Number(e.get("nuits")??e.get("nights")??1);a=T(r,Number.isInteger(t)&&t>=1&&t<=30?t:1)}a<=r&&(a=T(r,1));let s=Number(e.get("adultes")??e.get("adults")??e.get("numAdults")??e.get("guests")??e.get("numGuests")??NaN),n=e.get("voyage"),i="seul"===n?1:"deux"===n?2:Number.isInteger(s)&&s>=1?Math.min(s,2):2;return{arrivee:r,depart:a,adultes:i,voyage:1===i?"seul":"deux"}}(e,H(0));if(t){u(t.arrivee),p(t.depart),g(t.voyage),eG({arrivee:t.arrivee,depart:t.depart,adultes:t.adultes});return}g("deux"),eG({arrivee:d,depart:m,adultes:2})},[]);let{principales:eH,offresAffichees:eK}=(0,r.useMemo)(()=>{let e=(v?.offres??[]).filter(e=>e.pourPersonnes>=eB),t=e=>Math.min(...e.prix.map(e=>e.total)),r=[...e].sort((e,r)=>t(e)-t(r));return{principales:r,offresAffichees:r}},[v,eB]),eQ=(0,r.useMemo)(()=>v?.tarifs??[],[v]),eZ=(0,r.useMemo)(()=>v?.groupes??[],[v]),eX=(0,r.useCallback)(e=>eQ.find(t=>t.Id===e)?.RateGroupId??null,[eQ]),e0=eY?eX(eY.tarifId):null,e1=(e,t)=>e.categorieId===t.categorieId&&e.tarifId===t.tarifId&&e.pourPersonnes===t.pourPersonnes,e2=e=>Y.filter(t=>e1(t,e)).length,[e4,e3]=(0,r.useState)(!1),e5=e4||Y.length>1,e9=e=>{let t=Y.some(t=>e1(t,e));return(t||C("choix"),e5)?t?(er(t=>{let r=t.findIndex(t=>e1(t,e));return t.filter((e,t)=>t!==r)}),!0):(!e0||eX(e.tarifId)===e0)&&(er(t=>[...t,e]),e3(!1),!0):(er(t?[]:[e]),!0)},e8=(0,r.useMemo)(()=>{let e=[];for(let t of Y){let r=e.find(e=>e.c.categorieId===t.categorieId&&e.c.tarifId===t.tarifId&&e.c.pourPersonnes===t.pourPersonnes);r?r.n+=1:e.push({c:t,n:1})}return e},[Y]),e6=e=>{let t=(v?.offres??[]).find(t=>t.categorieId===e.categorieId&&t.pourPersonnes===e.pourPersonnes);return Math.max(0,(t?.chambresRestantes??0)-e2(e))},e7=d===H(0);(0,r.useEffect)(()=>
1{if(Y.length)return;let e=eH[0];if(!e)return;let t=ei(e.prix,eQ,eZ,e7),r=(t.find(e=>!e.prepaye)??t[0])?.direct;r&&er([{categorieId:e.categorieId,tarifId:r.tarifId,total:r.total,parNuit:r.parNuit,pourPersonnes:e.pourPersonnes}])},[Y.length,eH,eQ,eZ,e7]);let te=function(e,t,a){let[s,n]=(0,r.useState)([]);return(0,r.useEffect)(()=>{let r=!1;n([]);let s=new Date(Date.parse(t)-864e5);if(Number.isNaN(s.getTime()))return;let i=s.toISOString().slice(0,10);if(!(i<e))return N.supabase.rpc("rooftop_day_availability",{p_hotel:L,p_pax:a,p_start:e,p_end:i}).then(({data:e,error:t})=>{r||t||n((e||[]).filter(e=>e.available).map(e=>e.day))}),()=>{r=!0}},[e,t,a]),s}(d,m,eU||eB),tt=eY?et(eQ.find(e=>e.Id===eY.tarifId),e):null;(0,r.useEffect)(()=>{},[]),(0,r.useEffect)(()=>{if(!ew)return;let e=!1;e$(null);let t=new URLSearchParams({arrivee:ew.a,depart:ew.d,adultes:String(ew.pax)});return fetch(`/api/tarif-public?${t}`).then(e=>e.ok?e.json():null).then(t=>{!e&&t?.prix&&e$(t.prix)}).catch(()=>{}),()=>{e=!0}},[ew]);let tr=(0,r.useMemo)(()=>{let t;if(!Y.length)return null;let r=1.86*eU*eO,a=eq+r,s=eQ.find(e=>e.Id===Y[0].tarifId),n=e8.map(({c:t,n:r})=>en(t.categorieId,w.get(t.categorieId),e)+(r>1?` ${i.xFois(r)}`:"")).join(" + ");return{lignes:Y.map(e=>({categorieId:e.categorieId,tarifId:e.tarifId,adultes:e.pourPersonnes})),arrivee:d,depart:m,resume:[n,X(s,eZ,e,i),i.nuits(eO),i.dontTaxe(W(r,e))].filter(Boolean).join(" · "),totalFormate:q(a,e),debite:h(s,eZ,a)?.debite??!0,reglementFormate:(t=h(s,eZ,a))?q(t.montant,e):q(a,e),reglement:(()=>{let t=h(s,eZ,a);if(!t)return"";let r=q(t.montant,e);return t.debite?null!==t.part&&t.part<1?i.debitLongPartiel(r,U(t.part,e)):i.debitLong(r):i.empreinteLong(r,null===t.part?"":U(t.part,e))})()}},[Y,e8,eq,eU,w,eQ,eZ,d,m,eO,e,i]),ta=O.PRIVILEGES.voiles[e].length>0?(0,t.jsxs)("div",{className:"bandeau-or mx-auto flex w-fit max-w-full flex-wrap items-center justify-center gap-x-2.5 gap-y-1 rounded-2xl bg-gold px-3 py-1.5 text-[11.5px] font-bold text-navy-deep sm:gap-x-5 sm:rounded-full sm:px-4 sm:py-2 sm:text-[12.5px] lg:px-5 lg:text-[14px]",children:[(0,t.jsx)("span",{"data-arrive":!0,style:{"--i":0},className:"rounded-full bg-navy-deep px-2.5 py-0.5 text-[10.5px] font-bold uppercase tracking-[0.08em] text-gold",children:i.exclusif}),(0,t.jsx)("ul",{className:"contents sm:flex sm:flex-wrap sm:items-center sm:gap-x-5",children:O.PRIVILEGES.voiles[e].filter(e=>e.exclusif).map((e,r)=>(0,t.jsx)("li",{"data-arrive":!0,style:{"--i":r+1},children:e.texte},e.texte))}),O.PRIVILEGES.voiles[e].some(e=>!e.exclusif)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"hidden h-4 w-px bg-navy-deep/30 sm:block"}),(0,t.jsx)("ul",{className:"contents font-semibold text-navy-deep/75 sm:flex sm:flex-wrap sm:items-center sm:gap-x-5",children:O.PRIVILEGES.voiles[e].filter(e=>!e.exclusif).map((e,r)=>(0,t.jsx)("li",{"data-arrive":!0,style:{"--i":r+3},children:e.texte},e.texte))})]})]}):null;return(0,t.jsxs)("main",{className:"bg-cream text-[#222] lg:flex lg:h-screen lg:min-h-[930px] lg:flex-col lg:overflow-hidden",children:[(0,t.jsxs)("header",{className:"mx-auto w-full max-w-[1600px] shrink-0 px-4 pt-5 lg:px-6 lg:pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)(a.default,{href:"/",className:"shrink-0 text-[13px] tracking-wide text-navy hover:underline",children:"â Hôtels Toulon Bord de Mer"}),(0,t.jsx)("div",{className:"hidden min-w-0 lg:block",children:ta}),(0,t.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-navy/[0.07] px-2.5 py-1 text-[11.5px] font-semibold text-navy",children:[(0,t.jsxs)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M12 2.6l7.4 3v5.8c0 4.4-3 8.3-7.4 9.9-4.4-1.6-7.4-5.5-7.4-9.9V5.6z"}),(0,t.jsx)("path",{d:"M9 12l2.1 2.1L15.3 10"})]}),i.siteOfficiel]})]}),(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-baseline gap-x-6 gap-y-1",children:[(0,t.jsx)("h1",{className:"font-serif text-[26px] leading-tight text-navy sm:text-3xl lg:text-[34px]",children:i.titre}),(0,t.jsx)("p",{className:"hidden text-[15px] text-[#4a5a63] sm:block",children:i.chapo})]}),(0,t.jsx)("div",{className:"mt-3 lg:hidden",children:ta})]}),(0,t.jsxs)("div",{className:"mx-auto grid w-full max-w-[1600px] gap-3 px-4 py-3 lg:gap-5 lg:px-6 lg:py-5 lg:min-h-0 lg:flex-1 lg:grid-cols-[340px_minmax(0,1fr)_320px]",children:[(0,t.jsxs)("section",{className:"relative flex min-h-0 flex-col rounded-2xl bg-white p-4 shadow-[0_2px_20px_rgba(0,78,124,0.07)] lg:p-5",children:[(0,t.jsx)("h2",{className:"hidden text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299] lg:block",children:i.colDates}),(0,t.jsxs)("div",{className:"relative lg:mt-3",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>eb(e=>!e),"aria-expanded":eg,className:"flex w-full items-center justify-between gap-3 rounded-xl border border-[#e3e0d9] px-4 py-3.5 text-left transition-colors hover:border-gold",children:[(0,t.jsx)("span",{className:"min-w-0 text-[16px] text-[#3c4a52]",children:d&&m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold text-navy",children:K(d,e)}),(0,t.jsx)("span",{className:"mx-2 text-[#b0b6ba]",children:"â"}),(0,t.jsx)("span",{className:"font-semibold text-navy",children:K(m,e)}),(0,t.jsxs)("span",{className:"ml-2 text-[13px] text-[#8a9299]",children:["· ",i.nuits(eO)]})]}):d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold text-navy",children:K(d,e)}),(0,t.jsx)("span",{className:"ml-2 text-[#8a9299]",children:i.puisDepart})]}):(0,t.jsx)("span",{className:"text-[#8a9299]",children:i.choisirDates})}),(0,t.jsx)("span",{className:"shrink-0 text-[13px] font-semibold text-gold-ink underline underline-offset-4",children:i.modifier})]}),eg&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button","aria-hidden":!0,tabIndex:-1,onClick:()=>eb(!1),className:"fixed inset-0 z-30 cursor-default bg-navy-deep/20"}),(0,t.jsx)("div",{className:"absolute left-0 right-0 top-full z-40 mt-2 rounded-xl shadow-[0_18px_50px_rgba(0,78,124,0.22)]",children:(0,t.jsx)(l,{arrivee:d||null,depart:m||null,langue:e,className:"max-h-[52vh] lg:max-h-[58vh]",onChange:(e,t)=>
1{u(e??""),p(t??""),t&&eb(!1)}})})]})]}),(0,t.jsxs)("fieldset",{className:"mt-3 shrink-0 lg:mt-5",children:[(0,t.jsx)("legend",{className:"mb-2.5 hidden text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299] lg:block",children:i.voyageLabel}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2",children:["seul","deux"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{x!==e&&(G(),g(e),eG({arrivee:d,depart:m,adultes:"seul"===e?1:2}))},"aria-pressed":x===e,className:["rounded-xl border px-2 py-2.5 text-[14px] font-semibold transition-colors lg:py-3",x===e?"border-navy bg-navy text-white":"border-[#e3e0d9] bg-white text-[#3c4a52] hover:border-gold"].join(" "),children:i[e]},e))})]}),(s=!eW&&!I,(0,t.jsx)("button",{type:"button",disabled:!s||!x||eO<1,onClick:()=>eJ(eB),className:["mt-4 w-full shrink-0 rounded-full border px-6 py-3.5 text-[16px] font-bold transition-[background-color,border-color,color] duration-300",s&&x&&eO>=1?"border-gold bg-gold text-navy-deep hover:brightness-105":"cursor-default border-[#e8e4dc] bg-[#f7f4ee] text-[#9aa2a8]"].join(" "),children:(0,t.jsx)("span",{"aria-live":"polite",className:"inline-flex items-center justify-center gap-2",children:I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-4 w-4 animate-spin motion-reduce:animate-none",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",children:(0,t.jsx)("path",{d:"M12 3a9 9 0 0 1 9 9"})}),i.recherche]}):x?eW?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M4 12.5l5 5L20 6.5"})}),i.aJour]}):i.majPrix:i.choisir})})),(0,t.jsx)(ed,{recit:c,T:i,variante:"colonne",onGalerie:()=>ej("hotel")})]}),(0,t.jsxs)("section",{ref:eo,className:"flex min-h-0 scroll-mt-4 flex-col rounded-2xl bg-white p-4 shadow-[0_2px_20px_rgba(0,78,124,0.07)] lg:p-5",children:[(0,t.jsx)("h2",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299]",children:i.colOffres}),(0,t.jsxs)("div",{className:"mt-3 min-h-0 flex-1 lg:overflow-y-auto",children:[P&&(0,t.jsxs)("div",{className:"rounded-xl border border-[#e0cfc0] bg-[#fdfaf7] p-5",children:[(0,t.jsx)("p",{className:"font-semibold text-[#8a4b2a]",children:i.erreur}),(0,t.jsx)("p",{className:"mt-1 text-[15px] text-[#6b7a82]",children:i.erreurAide})]}),!v&&!P&&(0,t.jsx)("p",{className:"max-w-sm text-[15px] leading-relaxed text-[#8a9299]",children:i.attenteOffres}),v&&!P&&!I&&eW&&0===eK.length&&(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-serif text-2xl text-navy",children:F?i.tropLong:i.aucune}),(0,t.jsx)("p",{className:"mt-2 max-w-md text-[15px] leading-relaxed text-[#6b7a82]",children:F?i.tropLongAide(eO):i.aucuneAide})]}),v&&!P&&eK.length>0&&(0,t.jsx)("div",{"aria-busy":I||void 0,className:["relative overflow-hidden transition-opacity duration-200",I?"balayage select-none opacity-40 [&_*]:pointer-events-none":""].join(" "),children:(0,t.jsx)("ul",{className:"grid gap-5",children:eK.map((r,a)=>{let s=w.get(r.categorieId),n=ep(r.categorieId,s,480),l=ex(r.categorieId,s,"").length;return(0,t.jsxs)("li",{"data-arrive":!0,style:{"--i":Math.min(a,6)},className:"flex flex-col gap-3 sm:flex-row sm:gap-4",children:[n&&(0,t.jsx)("div",{className:"h-[150px] w-full shrink-0 [perspective:900px] sm:h-auto sm:min-h-[130px] sm:w-[164px] sm:self-stretch",children:(0,t.jsxs)("div",{className:["grid h-full transition-transform duration-700 ease-in-out [transform-style:preserve-3d]",ey===r.categorieId?"max-sm:[transform:rotateY(180deg)]":""].join(" "),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>ej(r.categorieId),"aria-label":i.galerieOuvrir(l),inert:ey===r.categorieId||void 0,className:["group relative col-start-1 row-start-1 h-full w-full overflow-hidden rounded-xl bg-[#f0ece4] [backface-visibility:hidden] [-webkit-backface-visibility:hidden] max-sm:[transition:visibility_0s_linear_350ms] sm:!visible",ey===r.categorieId?"max-sm:invisible":""].join(" "),children:[(0,t.jsx)(o.default,{src:n,alt:en(r.categorieId,s,e),fill:!0,sizes:"(max-width: 640px) 100v
1w, 164px",className:"object-cover transition-transform duration-500 group-hover:scale-[1.04]"}),l>1&&(0,t.jsx)("span",{className:"absolute bottom-2 left-2 rounded-full bg-navy-deep/80 px-2.5 py-1 text-[11px] font-semibold text-cream backdrop-blur-sm",children:i.galerieOuvrir(l)})]}),(0,t.jsxs)("div",{inert:ey!==r.categorieId||void 0,className:["col-start-1 row-start-1 flex h-full flex-col justify-center gap-1.5 rounded-xl bg-navy px-4 py-3 text-cream sm:hidden [backface-visibility:hidden] [-webkit-backface-visibility:hidden] [transform:rotateY(180deg)] [transition:visibility_0s_linear_350ms]",ey===r.categorieId?"":"invisible"].join(" "),children:[(0,t.jsx)("p",{className:"text-[13px] font-semibold text-gold",children:[s?.couchages?i.couchages(s.couchages):null,el(s?.couchages??null)?i.lit(el(s.couchages)):null,s?.surface?i.surface(s.surface):null].filter(Boolean).join(" · ")}),ea[r.categorieId]&&(0,t.jsx)("p",{className:"text-[13.5px] leading-snug text-cream/85",children:ea[r.categorieId][e]})]})]})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1",children:(0,t.jsx)("h3",{className:"font-serif text-2xl leading-tight text-navy",children:(0,t.jsxs)("button",{type:"button",onClick:()=>{G(),eN(e=>e===r.categorieId?null:r.categorieId)},"aria-expanded":ey===r.categorieId,className:"group inline-flex items-baseline gap-2.5 text-left transition-colors hover:text-gold-ink",children:[en(r.categorieId,s,e),(0,t.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-gold/18 px-2.5 py-1 font-sans text-[11.5px] font-semibold text-gold-ink transition-colors group-hover:bg-gold/30",children:[i.voirDetails,(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:["h-3 w-3 transition-transform",ey===r.categorieId?"rotate-180":""].join(" "),fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M6 9l6 6 6-6"})})]})]})})}),ey===r.categorieId&&(0,t.jsxs)("div",{className:n?"mt-1.5 hidden sm:block":"mt-1.5",children:[(0,t.jsx)("p",{className:"text-[13px] text-[#8a9299]",children:[s?.couchages?i.couchages(s.couchages):null,el(s?.couchages??null)?i.lit(el(s.couchages)):null,s?.surface?i.surface(s.surface):null].filter(Boolean).join(" · ")}),ea[r.categorieId]&&(0,t.jsx)("p",{className:"mt-1 text-[13.5px] leading-snug text-[#5b6a72]",children:ea[r.categorieId][e]})]})]}),(0,t.jsx)("div",{style:{animationDelay:`${45*a}ms`},className:["prix-entre mt-3 grid gap-2",ei(r.prix,eQ,eZ,e7).length>1?"sm:grid-cols-2":""].join(" "),children:ei(r.prix,eQ,eZ,e7).map(a=>{let s=a.direct,n={categorieId:r.categorieId,tarifId:s.tarifId,total:s.total,parNuit:s.parNuit,pourPersonnes:r.pourPersonnes},l=e2(n)>0,o=e5&&!l&&!!e0&&eX(s.tarifId)!==e0,c=eQ.find(e=>e.Id===s.tarifId),u=a.prepaye?Math.max(...ei(r.prix,eQ,eZ,e7).map(e=>e.direct.total))-s.total:0,m=a.prepaye?null:et(c,e),p=a.public?Math.round((1-s.total/a.public.total)*100):0;return(0,t.jsxs)("button",{type:"button","aria-pressed":l,disabled:o,title:o?i.pasDeMelange:void 0,onClick:()=>{G(),e9(n)},className:["flex w-full flex-col gap-1.5 rounded-xl border px-4 py-3.5 text-left transition-colors",l?"border-navy bg-navy text-white":o?"cursor-not-allowed border-[#ece9e2] text-[#b8bec2] opacity-60":"border-[#e3e0d9] text-[#3c4a52] hover:border-gold hover:bg-[#faf7f1]"].join(" "),children:[(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-[15px] font-semibold",children:[X(c,eZ,e,i),u>0&&(0,t.jsx)("span",{className:["rounded-full px-2 py-0.5 text-[12px] font-bold",l?"bg-white/20 text-white":"bg-gold/20 text-gold-ink"].join(" "),children:i.economisez(W(u,e))})]}),null!==m&&(0,t.jsx)("span",{className:["mt-0.5 block text-[12px] leading-snug",l?"text-white/70":"text-[#8a9299]"].join(" "),children:i.annulableJusque(K(d,e),m)})]}),(0,t.jsxs)("span",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[a.public&&p>0&&(0,t.jsx)("span",{className:["text-[14px] tabular-nums line-through",l?"text-white/60":"text-[#a9b1b6]"].join(" "),children:q(a.public.total,e)}),(0,t.jsx)("span",{className:"text-[22px] font-bold tabular-nums",children:q(s.total,e)}),a.public&&p>0&&(0,t.jsx)("span",{className:["rounded-full px-2 py-0.5 text-[12px] font-bold",l?"bg-white/20 text-white":"bg-gold text-navy-deep"].join(" "),children:i.remiseDirecte(p)}),eO>1&&(0,t.jsxs)("span",{className:["text-[12px] tabular-nums",l?"text-white/70":"text-[#8a9299]"].join(" "),children:[q(s.parNuit,e)," ",i.parNuit]})]})]},s.tarifId)})},eC)]})]},`${r.categorieId}-${r.pourPersonnes}`)})},`${d}-${m}`)})]}),(0,t.jsx)(ed,{recit:c,T:i,variante:"suite",onGalerie:()=>ej("hotel")})]}),(0,t.jsx)("aside",{ref:eu,className:"flex min-h-0 scroll-mt-4 flex-col rounded-2xl bg-white p-4 shadow-[0_2px_20px_rgba(0,78,124,0.07)] lg:p-5 lg:max-h-full lg:self-start",children:(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col [perspective:1600px]",children:(0,t.jsxs)("div",{className:["grid min-h-0 flex-1 grid-rows-[minmax(0,1fr)] transition-transform duration-700 ease-in-out [transform-style:preserve-3d]",eL?"[transform:rotateY(180deg)]":""].join(" "),children:[(0,t.jsxs)("div",{inert:!!eL||void 0,className:["col
1-start-1 row-start-1 flex h-full min-h-0 flex-col [backface-visibility:hidden] [-webkit-backface-visibility:hidden] [transition:visibility_0s_linear_350ms]",eL?"invisible":""].join(" "),children:[(0,t.jsx)("h2",{className:"shrink-0 text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299]",children:i.colRecap}),(0,t.jsxs)("div",{className:"mt-3 min-h-0 flex-1 lg:overflow-y-auto",children:[(0,t.jsxs)("dl",{className:"grid gap-1 text-[14px]",children:[(0,t.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-[#8a9299]",children:i.arrivee}),(0,t.jsx)("dd",{className:"font-semibold text-[#3c4a52]",children:K(d,e)||"â"})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-[#8a9299]",children:i.depart}),(0,t.jsx)("dd",{className:"font-semibold text-[#3c4a52]",children:K(m,e)||"â"})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-[#8a9299]",children:i.voyageLabel}),(0,t.jsx)("dd",{className:"font-semibold text-[#3c4a52]",children:x?i[x]:"â"})]})]}),eY?(0,t.jsxs)("div",{className:"mt-4 space-y-3 border-t border-[#f0ece4] pt-4",children:[e8.map(({c:r,n:a})=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"font-serif text-[19px] leading-tight text-navy",children:[en(r.categorieId,w.get(r.categorieId),e),a>1&&(0,t.jsx)("span",{className:"ml-1.5 text-[15px] font-bold text-gold-ink",children:i.xFois(a)})]}),(0,t.jsxs)("p",{className:"mt-0.5 text-[13px] text-[#8a9299]",children:[X(eQ.find(e=>e.Id===r.tarifId),eZ,e,i)," · ",i.nuits(eO)]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)("button",{type:"button","aria-label":i.chambreEnMoins,onClick:()=>{G(),e9(r)},className:"flex h-7 w-7 items-center justify-center rounded-full border border-[#e3e0d9] text-[15px] font-bold text-[#6b7a82] transition-colors hover:border-gold hover:text-navy",children:"â"}),(0,t.jsx)("button",{type:"button","aria-label":i.chambreEnPlus,disabled:1>e6(r),title:1>e6(r)?i.plusDeChambres:void 0,onClick:()=>{G(),er(e=>[...e,r])},className:"flex h-7 w-7 items-center justify-center rounded-full border border-[#e3e0d9] text-[15px] font-bold text-[#6b7a82] transition-colors hover:border-gold hover:text-navy disabled:cursor-not-allowed disabled:opacity-40",children:"+"})]})]},`${r.categorieId}|${r.tarifId}|${r.pourPersonnes}`)),Y.length>1&&(0,t.jsx)("p",{className:"text-[12.5px] font-semibold uppercase tracking-[0.08em] text-[#8a9299]",children:i.totalChambres(Y.length)}),(0,t.jsxs)("button",{type:"button",onClick:()=>{G(),e3(e=>!e)},className:["flex w-full items-center gap-2 py-0.5 text-left text-[13px] font-semibold transition-colors",e4?"text-gold-ink":"text-navy hover:text-gold-ink"].join(" "),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"text-[15px] leading-none",children:e4?"â":"+"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 underline decoration-gold/60 underline-offset-4",children:e4?i.ajoutArme:i.ajouterChambre})]})]}):(0,t.jsx)("p",{className:"mt-4 border-t border-[#f0ece4] pt-4 text-[15px] leading-relaxed text-[#8a9299]",children:i.recapVide})]}),(0,t.jsxs)("div",{className:"mt-3 shrink-0",children:[eY&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3 border-t border-[#f0ece4] pt-4",children:[(0,t.jsx)("span",{className:"text-[15px] font-semibold text-[#3c4a52]",children:i.totalSejour}),(0,t.jsx)("span",{className:"text-[26px] font-bold tabular-nums text-navy",children:(0,t.jsx)(J,{valeur:eq+1.86*eU*eO,langue:e})})]}),(0,t.jsx)("p",{className:"mt-1 text-[13px] text-[#8a9299]",children:i.dontTaxe(W(1.86*eU*eO,e))}),(()=>{if(Y.length>1)return null;let r=eS?.[eY.categorieId];if(!r||!ew||ew.pax!==eY.pourPersonnes)return null;let a=ee(eQ.find(e=>e.Id===eY.tarifId),eZ),s=1.86*eY.pourPersonnes*eO,n=(a?r.prepaye:r.flexible)+s,l=n-(eY.total+s);return l<1?null:(0,t.jsxs)("div",{className:"mt-2.5 border-t border-[#f0ece4] pt-2.5 text-[12px] leading-snug",children:[(0,t.jsxs)("div",{className:"vs-ring flex items-stretch gap-2",children:[(0,t.jsxs)("span",{className:"vs-nous min-w-0 flex-1 rounded-md px-2.5 py-1.5 text-center",children:[(0,t.jsx)("span",{className:"block text-[10px] uppercase tracking-wider opacity-60",children:i.ecartIci}),(0,t.jsx)("span",{className:"block text-[15px] font-bold tabular-nums",children:q(eY.total+s,e)}),(0,t.jsxs)("svg",{className:"vs-podium mx-auto mt-1 block",viewBox:"0 0 72 12",width:"72",he
1ight:"12","aria-hidden":!0,children:[(0,t.jsx)("rect",{x:"4",y:"4",width:"22",height:"8",rx:"1.5",fill:"currentColor",opacity:"0.24"}),(0,t.jsx)("rect",{x:"46",y:"4",width:"22",height:"8",rx:"1.5",fill:"currentColor",opacity:"0.24"}),(0,t.jsx)("rect",{x:"25",y:"0",width:"22",height:"12",rx:"1.5",fill:"currentColor",opacity:"0.5"})]})]}),(0,t.jsxs)("span",{className:"vs-mot self-center","aria-hidden":!0,children:[(0,t.jsx)("span",{className:"vs-v",children:"V"}),(0,t.jsx)("span",{className:"vs-s",children:"S"})]}),(0,t.jsxs)("span",{className:"vs-eux min-w-0 flex-1 rounded-md bg-[#dfe5e8] px-2.5 py-1.5 text-center text-[#6b7a82]",children:[(0,t.jsx)("span",{className:"block text-[10px] uppercase tracking-wider",children:"Booking"}),(0,t.jsx)("span",{className:"block text-[15px] font-bold tabular-nums",children:q(n,e)})]})]}),(0,t.jsx)("p",{className:"vs-gain mt-1.5 text-center text-[13px] font-bold text-[#2d6a4f]",children:i.gainDirect(q(l,e))})]},`${eY.total+s}-${n}`)})(),(0,t.jsx)("div",{className:"mb-3"})]}),(0,t.jsxs)("ul",{className:"mb-2.5 grid gap-1 border-t border-[#f0ece4] pt-2.5 text-[12px] leading-snug text-[#6b7a82]",children:[null!==tt&&(0,t.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"text-gold-ink",children:"â"}),i.annulableJusque(K(d,e),tt)]}),(n=h(eQ.find(e=>e.Id===eY?.tarifId),eZ,eY?eq+1.86*eU*eO:0),eY&&n?(0,t.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"text-gold-ink",children:"â"}),n.debite?i.debitCourt(q(n.montant,e)):i.empreinteCourt(q(n.montant,e))]}):null),(0,t.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"text-gold-ink",children:"â"}),i.checkin]})]}),eY&&te.length>0&&(0,t.jsxs)("button",{type:"button",onClick:()=>{G(),eD(!0)},className:["group mb-3 flex w-full items-center gap-3 border-t border-[#f0ece4] pt-3 text-left transition-transform hover:-translate-y-px",eA?"":"tuile-appel"].join(" "),children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"verre flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-navy text-[19px] leading-none",children:"ð¸"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 text-[15.5px] font-semibold leading-tight text-navy group-hover:text-gold-ink",children:eA?`â ${i.rooftopChoisie(R(eA.heure,e))}`:i.rooftopAjouter}),(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-4 w-4 shrink-0 text-gold-ink transition-transform group-hover:translate-x-0.5",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M9 6l6 6-6 6"})})]}),eY&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:()=>{G(),eF(!0)},className:"w-full rounded-full bg-gold px-6 py-3.5 text-[16px] font-bold text-navy-deep transition hover:brightness-105",children:i.payer}),(0,t.jsxs)("p",{className:"mt-2 flex items-center justify-center gap-1.5 text-[12px] font-semibold text-[#6b7a82]",children:[(0,t.jsxs)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-3.5 w-3.5 shrink-0 text-[#8a9299]",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"4",y:"10.5",width:"16",height:"10",rx:"2"}),(0,t.jsx)("path",{d:"M8 10.5V7.2a4 4 0 0 1 8 0v3.3"})]}),i.paiementSecurise]})]}),(0,t.jsxs)("p",{className:"mt-2.5 border-t border-[#f0ece4] pt-2.5 text-[12.5px] text-[#6b7a82]",children:[i.aideAvant," ",(0,t.jsx)("a",{href:`tel:${Z.en.replace(/\s/g,"")}`,className:"whitespace-nowrap font-semibold text-navy underline underline-offset-4 hover:text-gold-ink",children:Z[e]})]})]})]}),(0,t.jsx)("div",{inert:!eL||void 0,className:["col-start-1 row-start-1 h-full min-h-0 [backface-visibility:hidden] [-webkit-backface-visibility:hidden] [transform:rotateY(180deg)] [transition:visibility_0s_linear_350ms]",eL?"":"invisible"].join(" "),children:(0,t.jsx)(z,{soirs:te,choix:eA,onChoix:eP,onFermer:()=>{G(),eD(!1)},nuits:eO,langue:e})})]})})})]}),"hotel"===ev&&c&&c.communs.length>0&&(0,t.jsx)(ec,{images:c.communs,titre:c.titre,debut:0,T:i,onFermer:()=>ej(null)}),ev&&"hotel"!==ev&&ex(ev,w.get(ev),"").length>
10&&(0,t.jsx)(ec,{images:ex(ev,w.get(ev),en(ev,w.get(ev),e)),titre:en(ev,w.get(ev),e),debut:0,T:i,onFermer:()=>ej(null)}),ez&&(0,t.jsx)("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[60] flex items-center justify-center bg-navy-deep/92 p-4",children:(0,t.jsx)("div",{className:"w-full max-w-[460px] rounded-2xl bg-white p-6 text-center shadow-[0_20px_60px_rgba(0,0,0,0.35)] sm:p-8",children:"en-cours"===ez?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"mx-auto h-8 w-8 animate-spin text-gold-ink",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",children:(0,t.jsx)("path",{d:"M12 3a9 9 0 1 0 9 9"})}),(0,t.jsx)("p",{className:"mt-4 text-[15px] font-semibold text-navy",children:i.repriseEnCours})]}):"auth"===ez?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"font-serif text-2xl text-navy",children:i.repriseAuthTitre}),(0,t.jsx)("p",{className:"mt-3 text-[14.5px] leading-relaxed text-[#5b6a72]",children:i.repriseAuth}),(0,t.jsx)("button",{type:"button",onClick:()=>{eV(null),eF(!0)},className:"mt-5 flex w-full items-center justify-center gap-2 rounded-full bg-gold px-6 py-3.5 text-[17px] font-bold text-navy-deep transition hover:brightness-105",children:i.repriseAuthRejouer}),(0,t.jsx)("a",{href:"tel:+33494413623",className:"mt-3 flex w-full items-center justify-center rounded-full border border-navy/15 px-6 py-3 text-[15px] font-semibold text-navy transition hover:bg-navy/5",children:"04 94 41 36 23"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"font-serif text-2xl text-navy",children:i.repriseEchecTitre}),(0,t.jsx)("p",{className:"mt-3 text-[14.5px] leading-relaxed text-[#5b6a72]",children:i.repriseEchec}),(0,t.jsx)("a",{href:"tel:+33494413623",className:"mt-5 flex w-full items-center justify-center gap-2 rounded-full bg-gold px-6 py-3.5 text-[17px] font-bold text-navy-deep transition hover:brightness-105",children:"04 94 41 36 23"}),(0,t.jsx)("button",{type:"button",onClick:()=>eV(null),className:"mt-3 text-[13px] font-semibold text-[#6b7a82] underline underline-offset-4 hover:text-navy",children:i.repriseFermer})]})})}),eR&&tr&&!eE&&(0,t.jsx)($,{sejour:tr,langue:e,onFermer:()=>eF(!1),onReserve:t=>{eF(!1),e_(t),C("confirmee"),eA&&eY&&_({choix:eA,pax:eU,client:t.client,langue:e}).then(eM)}}),eE&&(0,t.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":i.confirmeTitre,className:"fixed inset-0 z-50 overflow-y-auto bg-navy-deep/92 p-3 sm:p-6",children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[520px] rounded-2xl bg-white p-6 text-center shadow-[0_20px_60px_rgba(0,0,0,0.35)] sm:p-8",children:[(0,t.jsx)("span",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-gold/20",children:(0,t.jsx)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-7 w-7 text-gold-ink",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M4 12.5l5 5L20 6.5"})})}),(0,t.jsx)("h2",{className:"mt-4 font-serif text-3xl leading-tight text-navy",children:i.confirmeTitre}),(0,t.jsx)("p",{className:"mt-1.5 text-[15px] text-[#6b7a82]",children:i.confirmeSous}),eE.numeros.length>0&&(0,t.jsxs)("div",{className:"mt-5 rounded-xl border border-[#e3e0d9] bg-[#faf7f1] px-4 py-4",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[#8a9299]",children:i.confirmeNumero}),(0,t.jsx)("p",{className:"mt-1.5 select-all font-mono text-[22px] font-bold tracking-wide text-navy",children:eE.numeros.join(" · ")}),(0,t.jsx)("p",{className:"mt-1.5 text-[12px] text-[#8a9299]",children:i.confirmeNumeroAide}),(0,t.jsx)("p",{className:"mt-2 border-t border-[#e8e2d6] pt-2 text-[12px] leading-snug text-[#6b7a82]",children:i.confirmeMail})]}),tr&&(0,t.jsxs)("dl",{className:"mt-5 grid gap-2 border-t border-[#f0ece4] pt-4 text-left text-[14px]",children:[(0,t.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-[#8a9299]",children:i.arrivee}),(0,t.jsx)("dd",{className:"font-semibold text-[#3c4a52]",children:K(d,e)})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-[#8a9299]",children:i.depart}),(0,t.jsx)("dd",{className:"font-semibold text-[#3c4a52]",children:K(m,e)})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-[#8a9299]",children:i.confirmeChambre}),(0,t.jsx)("dd",{className:"text-right font-semibold text-[#3c4a52]",children:tr.resume})]}),(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3 border-t border-[#f0ece4] pt-2",children:[(0,t.jsx)("dt",{className:"font-semibold text-[#3c4a52]",children:i.totalSejour}),(0,t.jsx)("dd",{className:"text-[22px] font-bold tabular-nums text-navy",children:tr.totalFormate})]})]}),eA&&(0,t.jsx)(V,{prise:eT,langue:e}),tr&&(0,t.jsxs)("a",{href:(({titre:e,arrivee:t,depart:r,details:a})=>{let s=(e,t)=>`${e.replace(/-/g,"")}T${t}00`,n=new URLSearchParams({action:"TEMPLATE",text:e,dates:`${s(t,"1500")}/${s(r,"1200")}`,details:a,location:"Hôtel-Rooftop Les Voiles, 124 rue Gubler, 83000 Toulon"});return`https://calendar.google.com/calendar/render?${n.toString()}`})({titre:`${i.titre} â ${tr.resume.split(" · ")[0]}`,arrivee:d,depart:m,details:[`${i.confirmeNumero} : ${eE.numeros.join(", ")}`,tr.resume,`${i.totalSejour} : ${tr.totalFormate}`,eT?`ð¸ ${R(eT.heure,e)}
1`:null].filter(Boolean).join("\n")}),target:"_blank",rel:"noopener noreferrer",className:"mt-4 inline-flex items-center gap-2 rounded-full border border-[#e3e0d9] bg-white px-4 py-2 text-[13.5px] font-semibold text-navy transition-colors hover:border-gold hover:text-gold-ink",children:[(0,t.jsxs)("svg",{"aria-hidden":!0,viewBox:"0 0 24 24",className:"h-4 w-4 text-gold-ink",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2"}),(0,t.jsx)("path",{d:"M8 3v4M16 3v4M3 11h18"})]}),i.agenda]}),(0,t.jsxs)("p",{className:"mt-5 border-t border-[#f0ece4] pt-4 text-[13px] text-[#6b7a82]",children:[i.confirmeQuestion," ",(0,t.jsx)("a",{href:`tel:${Z.en.replace(/\s/g,"")}`,className:"whitespace-nowrap font-semibold text-navy underline underline-offset-4 hover:text-gold-ink",children:Z[e]})]}),(0,t.jsx)(a.default,{href:"/",className:"mt-4 inline-block w-full rounded-full bg-navy px-6 py-3 text-[15px] font-bold text-white transition hover:brightness-110",children:i.confirmeRetour})]})}),eY&&!eh&&!eg&&!ev&&!eR&&!eE&&(0,t.jsx)("div",{className:"sticky bottom-0 z-30 border-t border-[#e3e0d9] bg-white/95 px-5 py-3 backdrop-blur lg:hidden",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsxs)("span",{className:"block truncate text-[13px] text-[#8a9299]",children:[Y.length>1?i.totalChambres(Y.length):en(eY.categorieId,w.get(eY.categorieId),e)," · ",i.nuits(eO)]}),(0,t.jsx)("span",{className:"block text-[20px] font-bold tabular-nums text-navy",children:(0,t.jsx)(J,{valeur:eq+1.86*eU*eO,langue:e})})]}),(0,t.jsx)("button",{type:"button",onClick:()=>eu.current?.scrollIntoView({behavior:"smooth",block:"start"}),className:"btn btn-or shrink-0 px-5 py-3 text-[14px]",children:i.voirRecap})]})})]})}e.s(["default",()=>eh],39618)}]);
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.