1var Tr=t=>{throw TypeError(t)};var Dn=(t,n,o)=>n.has(t)||Tr("Cannot "+o);var Dt=(t,n,o)=>(Dn(t,n,"read from private field"),o?o.call(t):n.get(t)),Is=(t,n,o)=>n.has(t)?Tr("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,o),is=(t,n,o,a)=>(Dn(t,n,"write to private field"),a?a.call(t,o):n.set(t,o),o),$s=(t,n,o)=>(Dn(t,n,"access private method"),o);import{Q as pi,b as co,c as mo,e as po,d as xo,g as uo,s as Pr,h as Dr,w as ho,i as go,f as xi,u as Fs,q as Nn,a as bs,m as pn}from"./format-CB1aVYTa.js";import{p as ca}from"./packages-Ceub4w_u.js";import{c as ui,l as cr,r as jn,D as fo,F as Lr,s as Er,a as vo,p as qn,u as kn,t as qs,d as Bt,b as at,e as xn,g as wn,h as Ua,i as hi,T as Ts,j as bo,k as yo,n as gi,Z as Ln,o as Gn,q as No,v as Rs,w as Xs,m as se,x as fi,y as vi,P as Kt,z as Gs,A as jo,B as ko,C as bi,E as Bs,G as yi,H as Ni,R as ia,I as ji,J as dr,K as Os,L as wo,M as Da,N as So,O as ki,Q as Ra,S as Ar,U as Mo,V as Co,W as Io,X as un,Y as oa,_ as ua,$ as ya,a0 as Rt,a1 as $o,a2 as Oo,a3 as To,a4 as Po,a5 as Do,a6 as Lo,a7 as Eo,a8 as Na,a9 as Ao,aa as Ro,ab as Bo,ac as Fo,ad as _o,ae as Ho,af as zo,ag as Uo,ah as Vo,ai as Rr,aj as qo,ak as Go,al as Br,am as Ko,an as ja,ao as Fr,ap as Yo,aq as Qo}from"./reservation-api-EKawUo4u.js";import{S as Wo,y as Kn,z as Jo,A as Zo,l as Xo,r as b,B as el,u as it,g as ka,j as e,a as Va,d as tl,R as us,C as sl,M as al,D as nl,E as rl,i as il,x as Yn}from"./index-c-vW2Iaa.js";import{u as wi,b as ol,a as Si,f as ll,d as Sn,e as cl,i as Mn,s as dl}from"./voyages-api-BiEJYu-8.js";import{u as Mi,a as qa,I as h,C as ml,b as ls,c as pl,L as Cn,E as Ci,H as In,B as ts,f as Ii}from"./ui-BDpBPGiH.js";import{r as $i}from"./index-CZpSoRKu.js";import{c as Oi,L as $t,r as xl}from"./quote-legal-BOnOm2VO.js";import{P as Ti}from"./PriceComparisonTable-C6hHs1IM.js";
1import{c as ul,r as Aa,i as hl,h as gl,w as La}from"./home-api-DsvTVh1E.js";import{g as mr,u as fl}from"./site-api-QRiNZzOy.js";import{S as vl}from"./star-rnwOsfHw.js";import{S as bl,B as yl}from"./shield-check-MbsLnhdT.js";import{c as hs}from"./createLucideIcon-Dl_lvxww.js";import{M as Nl}from"./map-pin-DocJ2Lpx.js";import{P as jl}from"./plane-DFVBP49R.js";import{C as pr,T as Pi}from"./tram-front-BfnQ2nIM.js";import{M as kl,L as _r,U as wl,F as Sl}from"./utensils-DlqdIoYd.js";import{B as xr}from"./bus-DKkC4M6H.js";import{B as Ml}from"./baby-CTF3uPez.js";import{U as Cl}from"./users-CbDTr9eH.js";import{W as Il}from"./wifi-ClCUcNUj.js";import{S as Di}from"./Seo-mIoe9d14.js";import{P as $l}from"./PaymentModal-BKDPD-Ix.js";import{S as Li}from"./SiteHeader-D4o-sUwG.js";import{S as Ei}from"./SiteFooter-DE1397hk.js";function Hr(t,n){const o=new Set(n);return t.filter(a=>!o.has(a))}function Ol(t,n,o){const a=t.slice(0);return a[n]=o,a}var fa,xs,va,ba,ys,Js,_a,Ha,za,ss,Qn,Wn,Jn,Zn,Xn,mi,Tl=(mi=class extends Wo{constructor(n,o,a){super();Is(this,ss);Is(this,fa);Is(this,xs);Is(this,va);Is(this,ba);Is(this,ys);Is(this,Js);Is(this,_a);Is(this,Ha);Is(this,za,[]);is(this,fa,n),is(this,ba,a),is(this,va,[]),is(this,ys,[]),is(this,xs,[]),this.setQueries(o)}onSubscribe(){this.listeners.size===1&&Dt(this,ys).forEach(n=>{n.subscribe(o=>{$s(this,ss,Zn).call(this,n,o)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,Dt(this,ys).forEach(n=>{n.destroy()})}setQueries(n,o){is(this,va,n),is(this,ba,o),Kn.batch(()=>{const a=Dt(this,ys),s=$s(this,ss,Jn).call(this,Dt(this,va));is(this,za,s),s.forEach(N=>N.observer.setOptions(N.defaultedQueryOptions));const i=s.map(N=>N.observer),l=i.map(N=>N.getCurrentResult()),d=a.length!==i.length,c=i.some((N,u)=>N!==a[u]),m=d||c,g=m?!0:l.some((N,u)=>{const p=Dt(this,xs)[u];return!p||!Jo(N,p)});!m&&!g||(m&&is(this,ys,i),is(this,xs,l),this.hasListeners()&&(m&&(Hr(a,i).forEach(N=>{N.destroy()}),Hr(i,a).forEach(N=>{N.subscribe(u=>{$s(this,ss,Zn).call(this,N,u)})})),$s(this,ss,Xn).call(this)))})}getCurrentResult(){return Dt(this,xs)}getQueries(){return Dt(this,ys).map(n=>n.getCurrentQuery())}getObservers(){return Dt(this,ys)}getOptimisticResult(n,o){const a=$s(this,ss,Jn).call(this,n),s=a.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[s,i=>$s(this,ss,Wn).call(this,i??s,o),()=>$s(this,ss,Qn).call(this,s,a)]}},fa=new WeakMap,xs=new WeakMap,va=new WeakMap,ba=new WeakMap,ys=new WeakMap,Js=new WeakMap,_a=new WeakMap,Ha=new WeakMap,za=new WeakMap,ss=new WeakSet,Qn=function(n,o){return o.map((a,s)=>{const i=n[s];return a.defaultedQueryOptions.notifyOnChangeProps?i:a.observer.trackResult(i,l=>{o.forEach(d=>{d.observer.trackProp(l)})})})},Wn=function(n,o){return o?((!Dt(this,Js)||Dt(this,xs)!==Dt(this,Ha)||o!==Dt(this,_a))&&(is(this,_a,o),is(this,Ha,Dt(this,xs)),is(this,Js,Zo(Dt(this,Js),o(n)))),Dt(this,Js)):n},Jn=function(n){const o=new Map(Dt(this,ys).map(s=>[s.options.queryHash,s])),a=[];return n.forEach(s=>{const i=Dt(this,fa).defaultQueryOptions(s),l=o.get(i.queryHash);l?a.push({defaultedQueryOptions:i,observer:l}):a.push({defaultedQueryOptions:i,observer:new pi(Dt(this,fa),i)})}),a},Zn=function(n,o){const a=Dt(this,ys).indexOf(n);a!==-1&&(is(this,xs,Ol(Dt(this,xs),a,o)),$s(this,ss,Xn).call(this))},Xn=function(){var n;if(this.hasListeners()){const o=Dt(this,Js),a=$s(this,ss,Qn).call(this,Dt(this,xs),Dt(this,za)),s=$s(this,ss,Wn).call(this,a,(n=Dt(this,ba))==null?void 0:n.combine);o!==s&&Kn.batch(()=>{this.listeners.forEach(i=>{i(Dt(this,xs))})})}},mi);function Pl({queries:t,...n},o){const a=Xo(),s=co(),i=mo(),l=b.useMemo(()=>t.map(j=>{const C=a.defaultQueryOptions(j);return C._optimisticResults=s?"isRestoring":"optimistic",C}),[t,a,s]);l.forEach(j=>{po(j),xo(j,i)}),uo(i);const[d]=b.useState(()=>new Tl(a,l,n)),[c,m,g]=d.getOptimisticResult(l,n.combine),N=!s&&n.subscribed!==!1;b.useSyncExternalStore(b.useCallback(j=>N?d.subscribe(Kn.batchCalls(j)):el,[d,N]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),b.useEffect(()=>{d.setQueries(l,n)},[l,n,d]);const p=c.some((j,C)=>Pr(l[C],j))?c.flatMap((j,C)=>{const U=l[C];if(U){const I=new pi(a,U);if(Pr(U,j))return Dr(U,I,i);ho(j,s)&&Dr(U,I,i)}return[]}):[];if(p.length>0)throw Promise.all(p);const x=c.find((j,C)=>{const U=l[C];return U&&go({result:j,errorResetBoundary:i,throwOnError:U.throwOnError,query:a.getQueryCache().get(U.queryHash),suspense:U.suspense})});if(x!=null&&x.error)throw x.error;return m(g())}/** 2 * @license lucide-react v0.453.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const Dl=hs("Accessibility",[["circle",{cx:"16",cy:"4",r:"1",key:"1grugj"}],["path",{d:"m18 19 1-7-6 1",key:"r0i19z"}],["path",{d:"m5 8 3-3 5.5 3-2.36 3.5",key:"9ptxx2"}],["path",{d:"M4.24 14.5a5 5 0 0 0 6.88 6",key:"10kmtu"}],["path",{d:"M13.76 17.5a5 5 0 0 0-6.88-6",key:"2qq6rc"}]]);/** 7 * @license lucide-react v0.453.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const Ll=hs("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 12 * @license lucide-react v0.453.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */const El=hs("CigaretteOff",[["path",{d:"M12 12H3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h13",key:"1gdiyg"}],["path",{d:"M18 8c0-2.5-2-2.5-2-5",key:"1il607"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M21 12a1 1 0 0 1 1 1v2a1 1 0 0 1-.5.866",key:"166zjj"}],["path",{d:"M22 8c0-2.5-2-2.5-2-5",key:"1gah44"}],["path",{d:"M7 12v4",key:"jqww69"}]]);/** 17 * @license lucide-react v0.453.0 - ISC 18 * 19 * This source code is licensed under the ISC license. 20 * See the LICENSE file in the root directory of this source tree. 21 */const Al=hs("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",ke
21y:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 22 * @license lucide-react v0.453.0 - ISC 23 * 24 * This source code is licensed under the ISC license. 25 * See the LICENSE file in the root directory of this source tree. 26 */const Rl=hs("ConciergeBell",[["path",{d:"M3 20a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1Z",key:"1pvr1r"}],["path",{d:"M20 16a8 8 0 1 0-16 0",key:"1pa543"}],["path",{d:"M12 4v4",key:"1bq03y"}],["path",{d:"M10 4h4",key:"1xpv9s"}]]);/** 27 * @license lucide-react v0.453.0 - ISC 28 * 29 * This source code is licensed under the ISC license. 30 * See the LICENSE file in the root directory of this source tree. 31 */const Bl=hs("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/** 32 * @license lucide-react v0.453.0 - ISC 33 * 34 * This source code is licensed under the ISC license. 35 * See the LICENSE file in the root directory of this source tree. 36 */const Fl=hs("Flower2",[["path",{d:"M12 5a3 3 0 1 1 3 3m-3-3a3 3 0 1 0-3 3m3-3v1M9 8a3 3 0 1 0 3 3M9 8h1m5 0a3 3 0 1 1-3 3m3-3h-1m-2 3v-1",key:"3pnvol"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M12 10v12",key:"6ubwww"}],["path",{d:"M12 22c4.2 0 7-1.667 7-5-4.2 0-7 1.667-7 5Z",key:"9hd38g"}],["path",{d:"M12 22c-4.2 0-7-1.667-7-5 4.2 0 7 1.667 7 5Z",key:"ufn41s"}]]);/** 37 * @license lucide-react v0.453.0 - ISC 38 * 39 * This source code is licensed under the ISC license. 40 * See the LICENSE file in the root directory of this source tree. 41 */const _l=hs("MoveVertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m8 18 4 4 4-4",key:"bh5tu3"}],["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}]]);/** 42 * @license lucide-react v0.453.0 - ISC 43 * 44 * This source code is licensed under the ISC license. 45 * See the LICENSE file in the root directory of this source tree. 46 */const Hl=hs("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/** 47 * @license lucide-react v0.453.0 - ISC 48 * 49 * This source code is licensed under the ISC license. 50 * See the LICENSE file in the root directory of this source tree. 51 */const zl=hs("Snowflake",[["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"m20 16-4-4 4-4",key:"rquw4f"}],["path",{d:"m4 8 4 4-4 4",key:"12s3z9"}],["path",{d:"m16 4-4 4-4-4",key:"1tumq1"}],["path",{d:"m8 20 4-4 4 4",key:"9p200w"}]]);/** 52 * @license lucide-react v0.453.0 - ISC 53 * 54 * This source code is licensed under the ISC license. 55 * See the LICENSE file in the root directory of this source tree. 56 */const Ul=hs("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 57 * @license lucide-react v0.453.0 - ISC 58 * 59 * This source code is licensed under the ISC license. 60 * See the LICENSE file in the root directory of this source tree. 61 */const Vl=hs("SquareParking",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 17V7h4a3 3 0 0 1 0 6H9",key:"1dfk2c"}]]);/** 62 * @license lucide-react v0.453.0 - ISC 63 * 64 * This source code is licensed under the ISC license. 65 * See the LICENSE file in the root directory of this source tree. 66 */const ql=hs("TrainFront",[["path",{d:"M8 3.1V7a4 4 0 0 0 8 0V3.1",key:"1v71zp"}],["path",{d:"m9 15-1-1",key:"1yrq24"}],["path",{d:"m15 15 1-1",key:"1t0d6s"}
66],["path",{d:"M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z",key:"1p0hjs"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m16 19 2 3",key:"xo31yx"}]]),zr=5,Ur=100;function Ai(t,n=zr,o=Ur){const a=Number(n)||zr,s=Number(t)||0,i=Math.ceil(a/100*s/10)*10;return Math.max(i,Number(o)||Ur)}function Wt(t,n){return`${xi(t)} ${ui(n)}`}const Ri=t=>t&&t>0?"â ".repeat(Math.min(5,t)):"";function Vr(t,n,o,a){if(!a||!a.hotel)return"";const s=[a.room,a.pension].filter(Boolean).join(", "),i=a.checkIn&&a.checkOut?`Du ${a.checkIn} au ${a.checkOut}${a.nights?` (${a.nights} nuit${a.nights>1?"s":""})`:""}`:"";return` 67 <div style="border:1px solid #e6e0d5;border-radius:12px;overflow:hidden;margin-bottom:12px;"> 68 ${a.image?`<img src="${a.image}" alt="${a.hotel}" width="100%" style="display:block;width:100%;height:180px;object-fit:cover;" />`:""} 69 <div style="background:${n};padding:9px 14px;"> 70 <span style="display:inline-block;width:8px;height:8px;border-radius:50%;background:${o};margin-right:7px;"></span> 71 <span style="font-weight:700;color:#0f2a4a;font-size:13px;">à ${t}</span> 72 </div> 73 <div style="padding:13px 15px;"> 74 <p style="margin:0 0 3px 0;font-weight:700;color:#1f2937;font-size:15px;">${a.hotel} <span style="color:#e9b949;font-size:13px;letter-spacing:1px;">${Ri(a.stars)}</span></p> 75 ${s?`<p style="margin:0 0 4px 0;font-size:13px;color:#374151;">${s}</p>`:""} 76 ${a.view?`<p style="margin:0 0 4px 0;font-size:12.5px;color:#0f2a4a;font-weight:600;">Vue : ${a.view}</p>`:""} 77 ${a.distance?`<p style="margin:0 0 4px 0;font-size:12.5px;color:#6b7280;"><span style="color:#8a1c1c;">●</span> ${a.distance}</p>`:""} 78 ${i?`<p style="margin:6px 0 0 0;font-size:12.5px;color:#6b7280;">ð ${i}</p>`:""} 79 </div> 80 </div>`}function Gl(t){if(!t||t<=0)return"";const n=Math.floor(t/60),o=t%60;return`${n}h${o?String(o).padStart(2,"0"):""}`}function Kl(t){const n=Gl(t.durationMin);return` 81 <div style="border-bottom:1px solid #f0ece2;padding:14px 16px;"> 82 <table role="presentation" width="100%"><tr> 83 <td style="vertical-align:middle;"><span style="color:#0f2a4a;font-weight:800;font-size:13px;">â ${t.flightNo||t.airline||""}</span></td> 84 ${n?`<td style="text-align:right;vertical-align:middle;"><span style="color:#9ca3af;font-size:11.5px;">Durée ${n}</span></td>`:"<td></td>"} 85 </tr></table> 86 <table role="presentation" width="100%" style="margin-top:8px;"><tr> 87 <td style="width:40%;vertical-align:top;"> 88 <p style="margin:0;font-size:10.5px;color:#9ca3af;">décolle</p> 89 <p style="margin:2px 0;font-size:24px;font-weight:800;color:#8a1c1c;letter-spacing:.5px;">${t.fromCode||t.fromCity||"â"}</p> 90 ${t.depDate?`<p style="margin:0;font-size:11px;color:#6b7280;">${t.depDate}</p>`:""} 91 <p style="margin:2px 0 0 0;font-size:18px;font-weight:700;color:#0f2a4a;">${t.dep||""}</p> 92 <p style="margin:2px 0 0 0;font-size:11.5px;color:#9ca3af;">${t.fromCity||""}</p> 93 </td> 94 <td style="width:20%;text-align:center;vertical-align:middle;color:#c7bfb0;font-size:13px;">â â â â â</td> 95 <td style="width:40%;text-align:right;vertical-align:top;"> 96 <p style="margin:0;font-size:10.5px;color:#9ca3af;">arrive</p> 97 <p style="margin:2px 0;font-size:24px;font-weight:800;color:#8a1c1c;letter-spacing:.5px;">${t.toCode||t.toCity||"â"}</p> 98 ${t.arrDate?`<p style="margin:0;font-size:11px;color:#6b7280;">${t.arrDate}</p>`:""} 99 <p style="margin:2px 0 0 0;font-size:18px;font-weight:700;color:#0f2a4a;">${t.arr||""}${t.arr&&t.sameDay===!1?' <span style="font-size:10px;color:#c79a3a;">(+1)</span>':""}</p> 100 <p style="margin:2px 0 0 0;font-size:11.5px;color:#9ca3af;">${t.toCity||""}</p> 101 </td> 102 </tr></table> 103 </div>`}function qr(t,n){return!n||!n.length?"":` 104 <div style="border:1px solid #e6e0d5;border-radius:12px;overflow:hidden;margin-bottom:12px;"> 105 <div style="background:#faf5f5;padding:9px 16px;border-bottom:1px solid #f0ece2;"><span style="font-weight:700;color:#4b5563;font-size:12.5px;font-style:italic;">${n.length>1?`${t} (${n.length} segments)`:t}</span></div> 106 ${n.map(Kl).join("")} 107 </div>`}function Yl(t){if(!t||(!t.outbound||!t.outbound.length)&&(!t.inbound||!t.inbou
107nd.length))return"";const n=[t.airline,t.travelClass].filter(Boolean).join(" · ");return` 108 <tr><td style="padding:8px 30px;"> 109 <p style="margin:0 0 10px 0;font-size:15px;font-weight:700;color:#0f2a4a;">âï¸ Votre vol${n?` <span style="font-size:12px;font-weight:500;color:#9ca3af;">â ${n}</span>`:""}</p> 110 ${qr("Détails de votre vol aller",t.outbound)} 111 ${qr("Détails de votre vol retour",t.inbound)} 112 </td></tr>`}function xa(t,n){return` 113 <tr><td style="padding:8px 30px;"> 114 <div style="border:1px solid #e6e0d5;border-radius:12px;overflow:hidden;"> 115 <div style="background:#f8f5ee;padding:9px 15px;border-bottom:1px solid #f0ece2;"><span style="font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#8a6d1f;">${t}</span></div> 116 <div style="padding:12px 15px;">${n}</div> 117 </div> 118 </td></tr>`}function Ql(t,n){var d,c,m,g,N,u,p,x;if(!((d=t.medine)!=null&&d.hotel)&&!((c=t.makkah)!=null&&c.hotel))return"";const o=(j,C)=>C&&C.hotel?` 119 <tr> 120 <td style="padding:4px 0;font-size:13px;color:#374151;"><strong style="color:#0f2a4a;">${j}</strong> · ${C.hotel}${C.stars?` <span style="color:#e9b949;">${Ri(C.stars)}</span>`:""}${C.distance?` · <span style="color:#6b7280;">${C.distance}</span>`:""}</td> 121 <td style="padding:4px 0;text-align:right;white-space:nowrap;font-size:12px;color:#9ca3af;">${C.nights?`${C.nights} nuit${C.nights>1?"s":""}`:""}</td> 122 </tr>`:"",a=j=>`<span style="display:inline-block;background:#f3efe6;color:#0f2a4a;font-size:11px;font-weight:600;padding:3px 10px;border-radius:12px;margin:0 6px 4px 0;">${j} · <span style="color:#256a2e;">inclus</span></span>`,s=((m=t.makkah)==null?void 0:m.pension)||((g=t.medine)==null?void 0:g.pension),i=[s?a(s):"",(N=t.makkah)!=null&&N.view?a(`Mecque : ${t.makkah.view}`):"",(u=t.medine)!=null&&u.view?a(`Médine : ${t.medine.view}`):""].filter(Boolean).join(""),l=(x=(p=t.recap)==null?void 0:p.price)==null?void 0:x.sejourPerPerson;return xa(`â Votre chambre${t.roomType?` â ${t.roomType}`:""}`,` 123 <table role="presentation" width="100%">${o("Médine",t.medine)}${o("La Mecque",t.makkah)}</table> 124 ${i?`<div style="margin-top:8px;">${i}</div>`:""} 125 ${l?`<p style="margin:8px 0 0 0;text-align:right;"><span style="font-size:20px;font-weight:800;color:#0f2a4a;">${Wt(l,n)}</span> <span style="font-size:11px;color:#9ca3af;">/pers · séjour</span></p>`:""}`)}function Wl(t,n){var l,d;if(!t)return"";const o=[];if(t.visa&&(t.visa.total||t.visa.label)&&o.push(xa("ð Votre visa",` 126 <table role="presentation" width="100%"><tr> 127 <td style="font-size:13.5px;font-weight:600;color:#1f2937;">${t.visa.label||"Visa"}</td> 128 <td style="text-align:right;font-size:13.5px;font-weight:700;color:#0f2a4a;">${(t.visa.total||0)>0?`+ ${Wt(t.visa.total,n)}`:"Inclus"}</td> 129 </tr></table> 130 ${(t.visa.perPerson||0)>0?`<p style="margin:4px 0 0 0;font-size:12px;color:#9ca3af;">${Wt(t.visa.perPerson,n)} /pers. à ${t.visa.count||1}</p>`:""}`)),t.transferLegs&&t.transferLegs.length){const c=t.transferLegs.map(m=>` 131 <tr> 132 <td style="padding:4px 0;font-size:12.5px;color:#374151;">ð ${m.route||""}</td> 133 <td style="padding:4px 0;text-align:right;white-space:nowrap;"> 134 <span style="background:#f3efe6;color:#0f2a4a;font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:10px;">${m.mode||""}</span> 135 <span style="font-size:12.5px;font-weight:600;color:#256a2e;margin-left:6px;">${(m.price||0)>0?Wt(m.price,n):"Inclus"}</span> 136 </td> 137 </tr>`).join("");o.push(xa(t.transferLabel||"Transferts",` 138 <table role="presentation" width="100%">${c}</table> 139 <table role="presentation" width="100%" style="border-top:1px solid #f0ece2;margin-top:6px;"><tr> 140 <td style="padding-top:7px;font-size:13px;font-weight:700;color:#1f2937;">Total transferts</td> 141 <td style="padding-top:7px;text-align:right;font-size:13px;font-weight:700;color:#0f2a4a;">${(t.transfersTotal||0)>0?Wt(t.transfersTotal,n):"Inclus"}</td> 142 </tr></table>`))}if(t.options&&t.options.length){const c=t.options.map(m=>` 143 <tr> 144 <td style="padding:3px 0;font-size:13px;color:#374151;">${m.label||""}</td> 145 <td style="padding:3px 0;text-align:right;font-size:13px;font-weight:600;color:#1f2937;">${Wt(m.amount||0,n)}</td> 146 </tr>`).join("");o.push(xa("⨠Vos options",` 147 <table role="presentation" width="100%">${c}</table> 148 <table role="presentation" width="100%" style="border-top:1px solid #f0ece2;margin-top:6px;"><tr> 149 <td style="padding-top:7px;font-size:13px;font-weight:700;color:#1f2937;">Total options</td> 150 <td style="padding-top:7px;text-align:right;font-size:13px;font-weight:700;color:#0f2a4a;">${(t.optionsTotal||0)>0?Wt(t.optionsTotal,n):"Inclus"}</td> 151 </tr></table>`))}const a=Number(((l=t.payment)==null?void 0:l.total)??((d=t.price)==null?void 0:d.grandTotal)??0)||0,s=String(n).toUpperCase()==="EUR"?Oi(a):0,i=a+s;if(t.price){const c=t.price,m=(x,j)=>` 152 <tr> 153 <td style="padding:5px 0;font-size:13.5px;color:#374151;">${x}</td> 154 <td style="padding:5px 0;text-align:right;font-size:13.5px;font-weight:700;color:#1f2937;">${Wt(j,n)}</td> 155 </tr>`,g=(x,j)=>` 156 <tr> 157 <td style="padding:5px 0;font-size:13px;color:#6b7280;">${x}</td> 158 <td style="padding:5px 0;text-align:right;font-size:12.5px;color:#9ca3af;">${j} · <span style="color:#256a2e;">inclus</span></td> 159 </tr>`,N=[m(`Hôtels + Vol${c.sejourLabel?` · ${c.sejourLabel}`:""}`,c.sejour||0),(c.pensionPerPers||0)>0?g(`Pension${c.pensionLabel?` · ${c.pensionLabel}`:""}`,`${Wt(c.pensionPerPers,n)} /pers.`):"",(c.viewSupp||0)>0?g(`Vue${c.viewLabel?` · ${c.viewLabel}`:""}`,`${Wt(c.viewSupp,n)} /chambre`):"",(c.optTotal||0)>0?m(`Options${c.optHasTransfers?" (dont transferts)":""}`,c.optTotal):"",(c.visaTotal||0)>0?m(c.visaLabel||"Visa",c.visaTotal):"",(c.babyTotal||0)>0?m(`Bébé${(c.babies||0)>1?"s":""} (vol)`,c.babyTotal):"",s>
1590?m("Frais de dossier",s):""].filter(Boolean).join(""),u=s>0?` 160 <tr> 161 <td style="padding:8px 0 0 0;font-size:13px;font-weight:800;color:#0f2a4a;border-top:2px solid #e6e0d5;">Prix de référence</td> 162 <td style="padding:8px 0 0 0;text-align:right;font-size:15px;font-weight:800;color:#0f2a4a;border-top:2px solid #e6e0d5;">${Wt(i,n)}</td> 163 </tr>`:"",p=s>0?`<p style="margin:8px 0 0 0;font-size:11.5px;line-height:1.55;color:#6b7280;">${$t.grandNote(Wt(s,n),Wt(a,n))}</p>`:"";o.push(xa("ð° Détail du prix",`<table role="presentation" width="100%">${N}${u}</table>${p}`))}if(t.payment&&t.payment.installments&&t.payment.installments.length){const c=t.payment.installments.some(p=>p.date),m=`<tr> 164 <td style="padding:0 0 6px 0;font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:#9ca3af;font-weight:700;">Action</td> 165 ${c?'<td style="padding:0 0 6px 0;text-align:center;font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:#9ca3af;font-weight:700;">Date</td>':""} 166 <td style="padding:0 0 6px 0;text-align:right;font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:#9ca3af;font-weight:700;">Montant</td> 167 </tr>`,g=t.payment.installments.map(p=>`<tr> 168 <td style="padding:5px 0;font-size:13px;color:#374151;border-top:1px solid #f0ece2;">${p.label||""}</td> 169 ${c?`<td style="padding:5px 0;text-align:center;font-size:12.5px;color:#6b7280;border-top:1px solid #f0ece2;">${p.date||"â"}</td>`:""} 170 <td style="padding:5px 0;text-align:right;font-size:13px;font-weight:700;color:#1f2937;border-top:1px solid #f0ece2;">${Wt(p.amount||0,n)}</td> 171 </tr>`).join(""),N=`<tr> 172 <td style="padding:7px 0 0 0;font-size:13px;font-weight:700;color:#1f2937;border-top:2px solid #e6e0d5;">Total TTC</td> 173 ${c?'<td style="border-top:2px solid #e6e0d5;"></td>':""} 174 <td style="padding:7px 0 0 0;text-align:right;font-size:14px;font-weight:800;color:#8a1c1c;border-top:2px solid #e6e0d5;">${Wt(t.payment.total||0,n)}</td> 175 </tr>`,u=s>0?` 176 <p style="margin:14px 0 4px 0;font-size:10.5px;text-transform:uppercase;letter-spacing:.5px;color:#9ca3af;font-weight:700;">Moyens de paiement acceptés</p> 177 <table role="presentation" width="100%">${$t.methods.map(p=>` 178 <tr> 179 <td style="padding:5px 0;font-size:12.5px;color:#374151;border-top:1px solid #f0ece2;"> 180 ${p.name}<br><span style="font-size:11px;color:#9ca3af;">${p.note}</span> 181 </td> 182 <td style="padding:5px 0;text-align:right;font-size:12px;font-weight:700;white-space:nowrap;border-top:1px solid #f0ece2;color:${p.discount?"#256a2e":"#6b7280"};"> 183 ${p.discount?`Remise ${Wt(s,n)}`:"Tarif standard"} 184 </td> 185 </tr>`).join("")}</table> 186 <p style="margin:10px 0 0 0;font-size:11px;line-height:1.55;color:#9ca3af;">${$t.discountDisclosure(Wt(i,n),Wt(s,n),new Date().toLocaleDateString("fr-FR"))}</p>`:"";o.push(xa("ð³ Modalités de paiement",` 187 <table role="presentation" width="100%">${m}${g}${N}</table> 188 <p style="margin:8px 0 0 0;font-size:11px;color:#9ca3af;">Ãchéancier indicatif â dates définitives confirmées par votre conseiller.</p> 189 ${u}`))}return o.join("")}const En="https://static.go-makkah.com/devis";function Jl(t,n,o){const a=[];let s=1;a.push({day:s,title:"Départ pour l'Arabie Saoudite",description:`Vol vers l'Arabie Saoudite. 190à l'arrivée à Jeddah, départ pour Médine, accueil à votre hôtel à Médine. 191Le reste de la nuit à Médine.`,city:"medine"}),s++;const i=n-1;if(i>0){a.push({day:s,title:"Séjour à Médine",description:`Séjour encadré par le guide. 192Une demi-journée des ziyarats (visite des lieux saints). 193Temps libre pour les prières à la Mosquée du Prophète ï·º. 194Nuit à Médine.`,city:"medine"}),s++;for(let d=1;d<i;d++)d===i-1?a.push({day:s,title:"Médine - Préparation",description:`Après le petit déjeuner, préparation pour la Omra. 195Temps libre pour les prières et les invocations. 196Nuit à Médine.`,city:"medine"}):a.push({day:s,title:"Séjour à Médine",description:`Journée libre à Médine. 197Profitez de votre séjour pour multiplier les prières à la Mosquée du Prophète ï·º. 198Nuit à Médine.`,city:"medine"}),s++}a.push({day:s,title:"Transfert à la Mecque",description:`Départ vers la Mecque (430km). Au Miqat, faites votre niyya et récitez la Talbiya. 199Installation à l'hôtel à la Mecque. 200Après un peu de repos, partez au Haram faire la Omra. 201Accomplissement de la Omra : Tawaf, la prière derrière le Maqam et le Saay entre Safaa et Marwah. 202Retour à l'hôtel. 203Nuit à Makkah.`,city:"makkah"}),s++;const l=o-1;return l>0&&(l===1?(a.push({day:s,title:"Séjour à Makkah",description:`Séjour à la Mecque. Profitez de votre temps pour faire des prières au Haram. 204Vous pouvez également faire la Omra pour vos proches. 205Nuit à Makkah.`,city:"makkah"}),s++):l===2?(a.push({day:s,title:`Jours ${s}-${s+1} : Séjour à Makkah`,description:`Séjour à la Mecque. Profitez de votre séjour pour faire la Omra pour vos proches. 206Multipliez les prières et les invocations au Haram. 207Nuits à Makkah.`,city:"makkah"}),s+=2):(a.push({day:s,title:`Jours ${s}-${s+l-1} : Séjour à Makkah`,description:`Séjour à la Mecque. Profitez de votre séjour pour faire la Omra pour vos proches. 208Multipliez les prières, les invocations et la lecture du Coran au Haram. 209Nuits à Makkah.`,city:"makkah"}),s+=l)),a.push({day:s,title:"Makkah - Jeddah",description:`Temps libre pour vos dernières prières au Haram. 210Dans la nuit, transfert à Jeddah pour le vol retour.`,city:"makkah"}),s++,a.push({day:s,title:"Vol retour",description:`Vol retour vers votre pays.
211Fin de votre voyage spirituel. Que Allah accepte votre Omra.`,city:"retour"}),a}function wa(t,n){return`<p style="margin:0 0 3px 0;font-size:11px;font-weight:700;letter-spacing:1px;color:#8a6d1f;text-transform:uppercase;">${t}</p> 212 <p style="margin:0 0 12px 0;font-size:19px;font-weight:800;color:#0f2a4a;">${n}</p>`}function Zl(){return`<tr><td style="padding:14px 30px 8px 30px;"> 213 ${wa("Inclus","Formation aux rites")} 214 <p style="margin:-6px 0 12px 0;font-size:13px;color:#6b7280;">Avant votre départ, bénéficiez d'une formation complète sur les rites de la Omra.</p> 215 <table role="presentation" width="100%"><tr> 216 <td style="width:33.33%;padding-right:5px;"><img src="${En}/formation1.png" alt="Formation aux rites" width="100%" style="width:100%;height:120px;object-fit:cover;border-radius:8px;display:block;" /></td> 217 <td style="width:33.33%;padding:0 3px;"><img src="${En}/formation2.png" alt="Formation aux rites" width="100%" style="width:100%;height:120px;object-fit:cover;border-radius:8px;display:block;" /></td> 218 <td style="width:33.33%;padding-left:5px;"><img src="${En}/formation3.png" alt="Formation aux rites" width="100%" style="width:100%;height:120px;object-fit:cover;border-radius:8px;display:block;" /></td> 219 </tr></table> 220 </td></tr>`}function Xl(t){var l,d;const n=((l=t.medine)==null?void 0:l.nights)||0,o=((d=t.makkah)==null?void 0:d.nights)||0;if(!n&&!o)return"";const a=t.totalNights||n+o,s=c=>c==="makkah"?"#c79a3a":c==="retour"?"#8a1c1c":"#10b981",i=Jl(a,n,o).map(c=>` 221 <div style="border-left:3px solid ${s(c.city)};padding:0 0 16px 14px;"> 222 <p style="margin:0 0 2px 0;font-size:10.5px;font-weight:700;letter-spacing:.5px;color:#c79a3a;text-transform:uppercase;">Jour ${c.day}</p> 223 <p style="margin:0 0 4px 0;font-size:14px;font-weight:700;color:#0f2a4a;">${c.title}</p> 224 <p style="margin:0;font-size:12.5px;color:#6b7280;line-height:1.55;">${c.description.replace(/\n/g,"<br>")}</p> 225 </div>`).join("");return`<tr><td style="padding:14px 30px 8px 30px;"> 226 ${wa("Jour par jour","Programme du séjour")} 227 <p style="margin:-6px 0 14px 0;font-size:11.5px;color:#9ca3af;font-style:italic;">* Ce programme est donné à titre indicatif</p> 228 ${i} 229 </td></tr>`}function ec(){const t=["Transferts internes en <strong>bus VIP</strong> ou <strong>voiture privée</strong>","<strong>Accompagnement pendant les rites</strong> de votre Omra","<strong>Ziyarats</strong> à Médine et la Mecque","<strong>Règlement en 3 fois</strong>, solde 1 mois avant le départ","<strong>Réductions</strong> enfant et bébé","<strong>Hôtel en face de Haram</strong> à la Mecque"];return`<tr><td style="padding:14px 30px 8px 30px;"> 230 ${wa("Détails","Services")} 231 <div style="background:#f8f5ee;border:1px solid #e6e0d5;border-radius:12px;padding:16px 18px;"> 232 <p style="margin:0 0 8px 0;font-size:11px;font-weight:700;letter-spacing:1px;color:#8a6d1f;text-transform:uppercase;">Points forts</p> 233 <table role="presentation" width="100%">${t.map(n=>`<tr><td style="padding:5px 0;font-size:13.5px;color:#374151;">⦠${n}</td></tr>`).join("")}</table> 234 </div> 235 </td></tr>`}function tc(){const t=["Vols","Hôtels","Transferts Aéroports / Hôtels","Transfert Aéroport Médine - Hôtel à Médine","Transferts Makkah / Médine","Guide Francophone","Assistance religieuse","Démarches obtention VISA OMRA"],n=["Toute nouvelle taxe non connue à ce jour sur la Omra ou le Hajj en Royaume d'Arabie Saoudite","L'excès de bagages","Les dépenses personnelles","Assurance Annulation","Assurance Assistance Rapatriement"],o=(a,s)=>`<li style="margin-bottom:5px;font-size:12.5px;color:${s};line-height:1.4;">${a}</li>`;return`<tr><td style="padding:8px 30px;"> 236 <table role="presentation" width="100%"><tr> 237 <td style="width:50%;vertical-align:top;padding-right:6px;"> 238 <div style="background:#f0fdf4;border:1px solid #86efac;border-radius:12px;padding:14px;"> 239 <p style="margin:0 0 8px 0;font-size:13px;font-weight:700;color:#166534;">Le forfait comprend</p> 240 <ul style="margin:0;padding-left:18px;">${t.map(a=>o(a,"#15803d")).join("")}</ul> 241 </div> 242 </td> 243 <td style="width:50%;vertical-align:top;padding-left:6px;"> 244 <div style="background:#fef2f2;border:1px solid #fecaca;border-radius:12px;padding:14px;"> 245 <p style="margin:0 0 8px 0;font-size:13px;font-weight:700;color:#991b1b;">Ne comprend pas</p> 246 <ul style="margin:0;padding-left:18px;">${n.map(a=>o(a,"#b91c1c")).join("")}</ul> 247 </div> 248 </td> 249 </tr></table> 250 </td></tr>`}function sc(t,n){var g,N,u,p;const o=((N=(g=t.recap)==null?void 0:g.payment)==null?void 0:N.installments)||[],a=((u=o[0])==null?void 0:u.amount)||t.grandTotal||0,s=o.length>1,i=Wt(a,n),l=t.bank||{},d=l.beneficiaire||((p=t.agency)==null?void 0:p.name)||"GOâMakkah",c='<span style="color:#9ca3af;font-style:italic;">communiqué par votre conseiller</span>',m=(x,j)=>`<tr><td style="padding:4px 0;font-size:12.5px;color:#374151;"><strong style="color:#0f2a4a;">${x}</strong> : ${j||c}</td></tr>`;return`<tr><td style="padding:14px 30px 8px 30px;"> 251 ${wa("Inscription","Modalités d'inscription")} 252 <div style="border:1px solid #e6e0d5;border-radius:12px;padding:14px 16px;font-size:13px;color:#4b5563;line-height:1.6;"> 253 <p style="margin:0 0 12px 0;">Pour garantir votre offre tarifaire, merci de faire le nécessaire <strong>sous 24h</strong>. Vous pouvez effectuer votre paiement directement sur votre <strong>espace client</strong> par carte bancaire, ou :</p> 254 <div style="background:#f8f5ee;border-radius:8px;padding:12px 14px;"> 255 <p style="margin:0 0 6px 0;font-size:12.5px;color:#374151;">⦠Envoyer un <strong>chèque</strong> de <strong>${i}</strong>${s?" (1ère échéance)":""} à l'ordre de <strong>${d}</strong></p> 256 <p style="margin:0 0 6px 0;font-size:12px;font-weight:700;color:#8a6d1f;text-align:center;">OU BIEN</p> 257 <p style="margin:0 0 8px 0;font-size:12.5px;color:#374151;">⦠Faire un <strong>virement</strong> de <strong>${i}</strong> au RIB suivant :</p> 258 <table role="presentation" width="100%" style="border-top:1px solid #eee4d0;padding-top:6px;"> 259 ${m("Bénéficiaire",l.beneficiaire)} 260 ${m("Banque",l.banque)} 261 ${m("IBAN",l.iban)} 262 ${m("BIC / SWIFT",l.bic)} 263 </table> 264 </div> 265 <p style="margin:10px 0 0 0;font-size:11.5px;color:#9ca3af;">à réception du règlement, vos documents d'inscription vous sont envoyés.</p> 266 </div> 267 </td></tr>`}function ac(t){const n=(o,a)=>a?`<tr><td style="padding:4px 0;font-size:13px;color:#374151;"><strong style="color:#0f2a4a;">${o}</strong> : ${a}</td></tr>`:"";return`<tr><td style="padding:14px 30px 8px 30px;"> 268 ${wa("Votre dossier","Contact principal")} 269 <div style="border:1px solid #e6e0d5;border-radius:12px;padding:14px 16px;"> 270 <table role="presentation" width="100%"> 271 ${n("Nom & prénom",t.clientName)} 272 ${n("Email",t.email)}
273 ${n("Téléphone",t.phone)} 274 ${n("Nombre total des voyageurs",String(t.travelers))} 275 </table> 276 </div> 277 </td></tr>`}function nc(t){const n=(t||"").toLowerCase();return/lyon/.test(n)?{name:"GOâMAKKAH Lyon",legal:"Agence de voyages immatriculée au registre des opérateurs de voyages et de séjours (Atout France), titulaire d'une garantie financière et d'une assurance RC professionnelle.",address:"211 rue de Créqui, 69003 Lyon, France",phone:"04 78 82 72 96",email:"[email protected]"}:/casa|casablanca|maroc/.test(n)?{name:"GOâMAKKAH Casa",legal:"Agence de voyages agréée au Maroc.",address:"communiquée par votre conseiller",phone:"communiqué par votre conseiller",email:"[email protected]"}:{name:"GOâMAKKAH IvryâsurâSeine",legal:"Agence de voyages immatriculée au registre des opérateurs de voyages et de séjours (Atout France), titulaire d'une garantie financière et d'une assurance RC professionnelle.",address:"32 avenue Pierre Semard, 94200 IvryâsurâSeine, France",phone:"01 49 87 70 21",email:"[email protected]"}}function rc(t){return`<tr><td style="padding:14px 30px 8px 30px;"> 278 ${wa("Information légale",`Votre agence â ${t.name}`)} 279 <div style="border:1px solid #e6e0d5;border-radius:12px;padding:14px 16px;font-size:12.5px;color:#4b5563;line-height:1.6;"> 280 <p style="margin:0 0 8px 0;">${t.legal}</p> 281 <p style="margin:0;">${t.address} · Tél. ${t.phone}<br>${t.email} · go-makkah.com</p> 282 </div> 283 </td></tr>`}function er(t,n=!1){const a=String(t||"").split("â"),s=(a.length>1?a[a.length-1]:"").replace(/formule/i,"").trim();return n?`Votre projet d'Omra${s?` ${s}`:""} a bien été enregistré`:`Votre pré-réservation Omra${s?` ${s}`:""} est confirmée â vos places sont bloquées pendant 24 h`}function ic(t){var i,l,d,c,m,g;const n=t.currency||"EUR",o=nc(t.departureCity),a={name:((i=t.agency)==null?void 0:i.name)||o.name,legal:o.legal,address:((l=t.agency)==null?void 0:l.address)||o.address,phone:((d=t.agency)==null?void 0:d.phone)||o.phone,email:((c=t.agency)==null?void 0:c.email)||o.email},s=[`${t.adults} adulte${t.adults>1?"s":""}`,t.children>0?`${t.children} enfant${t.children>1?"s":""}`:"",t.babies>0?`${t.babies} bébé${t.babies>1?"s":""}`:""].filter(Boolean).join(" · ");return` 284<!DOCTYPE html> 285<html lang="fr"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${er(t.packageName,t.v2)}</title></head> 286<body style="margin:0;padding:0;background:#f3efe6;font-family:Arial,Helvetica,sans-serif;color:#1f2937;"> 287 <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#f3efe6;"> 288 <tr><td align="center" style="padding:24px 12px;"> 289 <table role="presentation" width="600" cellpadding="0" cellspacing="0" style="background:#ffffff;border-radius:16px;overflow:hidden;box-shadow:0 4px 20px rgba(15,42,74,.08);"> 290 291 <!-- Header --> 292 <tr><td style="background:#0f2a4a;padding:28px 30px;text-align:center;"> 293 <p style="margin:0;font-size:24px;font-weight:800;letter-spacing:.5px;color:#ffffff;">GO<span style="color:#c79a3a;">â</span>MAKKAH</p> 294 <p style="margin:6px 0 0 0;font-size:13px;color:#c9d6e6;">Votre voyage spirituel, sur mesure</p> 295 </td></tr> 296 297 <!-- Bannière --> 298 <tr><td style="padding:22px 30px 6px 30px;"> 299 <p style="margin:0;font-size:19px;font-weight:800;color:#0f2a4a;">${t.v2?"":"Félicitations ! "}${er(t.packageName,t.v2)}</p> 300 ${t.devisRef?`<p style="margin:4px 0 0 0;font-size:12.5px;font-weight:600;color:#8a6d1f;">Référence ${t.devisRef}</p>`:""} 301 </td></tr> 302 303 <!-- Greeting (texte) + Contact (téléphone) â 2 colonnes --> 304 <tr><td style="padding:14px 30px;"> 305 <table role="presentation" width="100%"><tr> 306 <td style="width:62%;vertical-align:middle;padding-right:10px;"> 307 <div style="background:#f8f5ee;border-radius:12px;padding:16px 18px;"> 308 <p style="margin:0 0 8px 0;font-size:15px;color:#374151;">Salam Alaikom <strong>${t.clientName||""}</strong>,</p> 309 ${t.v2?`<p style="margin:0 0 6px 0;font-size:13.5px;color:#4b5563;line-height:1.6;">Nous avons bien enregistré votre projet${t.packageName?` <strong>${t.packageName}</strong>`:""}. Cette démarche est <strong>gratuite et sans engagement</strong> : elle ne bloque ni les places ni le tarif.</p> 310 <p style="margin:0;font-size:13px;color:#4b5563;line-height:1.6;">Un conseiller GOâMakkah vous accompagne pour finaliser votre projet quand vous le souhaitez.</p>`:`<p style="margin:0 0 6px 0;font-size:13.5px;color:#4b5563;line-height:1.6;">Nous vous confirmons votre préâréservation${t.packageName?` de l'offre <strong>${t.packageName}</strong>`:""}.${t.devisRef?` Votre référence de réservation est la : <strong>${t.devisRef}</strong>.`:""}</p> 311 <p style="margin:0;font-size:13px;color:#4b5563;line-height:1.6;">Un conseiller GOâMakkah vous rappelle sous 24h pour finaliser votre projet.</p>`} 312 </div> 313 </td> 314 <td style="width:38%;vertical-align:middle;"> 315 <div style="background:#f0f7fb;border:1px solid #cfe2ee;border-radius:12px;padding:16px 12px;text-align:center;">
316 <span style="display:inline-block;width:46px;height:46px;border-radius:50%;background:#1f9d55;text-align:center;line-height:46px;font-size:22px;color:#ffffff;">☎</span> 317 <p style="margin:8px 0 2px 0;font-size:11.5px;font-weight:700;color:#0f2a4a;">Pour plus d'informations,<br>contactez le :</p> 318 <p style="margin:0;font-size:18px;font-weight:800;color:#c0392b;">${a.phone}</p> 319 </div> 320 </td> 321 </tr></table> 322 </td></tr> 323 324 <!-- Voyage --> 325 <tr><td style="padding:6px 30px 8px 30px;"> 326 <div style="background:#0f2a4a;border-radius:12px 12px 0 0;padding:16px 18px;"> 327 <p style="margin:0;font-size:16px;font-weight:700;color:#ffffff;">Votre voyage Omra</p> 328 ${t.dateLabel?`<p style="margin:4px 0 0 0;font-size:12.5px;color:#c9d6e6;">Départ ${t.departureCity?`de ${t.departureCity} `:""}le ${t.dateLabel}</p>`:""} 329 </div> 330 <div style="border:1px solid #e6e0d5;border-top:none;border-radius:0 0 12px 12px;padding:16px 18px;"> 331 <table role="presentation" width="100%"><tr> 332 <td style="text-align:center;width:40%;"> 333 <p style="margin:0;font-weight:700;color:#1f2937;font-size:14px;">Médine</p> 334 <p style="margin:2px 0 0 0;font-size:12px;color:#10b981;font-weight:600;">${((m=t.medine)==null?void 0:m.nights)||0} nuits</p> 335 </td> 336 <td style="text-align:center;width:20%;color:#9ca3af;font-size:18px;">â</td> 337 <td style="text-align:center;width:40%;"> 338 <p style="margin:0;font-weight:700;color:#1f2937;font-size:14px;">La Mecque</p> 339 <p style="margin:2px 0 0 0;font-size:12px;color:#c79a3a;font-weight:600;">${((g=t.makkah)==null?void 0:g.nights)||0} nuits</p> 340 </td> 341 </tr></table> 342 ${t.totalNights?`<p style="margin:12px 0 0 0;text-align:center;"><span style="background:#f3efe6;color:#374151;padding:5px 14px;border-radius:20px;font-size:12px;font-weight:600;">${t.totalNights} nuits au total</span></p>`:""} 343 </div> 344 </td></tr> 345 346 <!-- Vol --> 347 ${Yl(t.flight)} 348 349 <!-- Hôtels --> 350 <tr><td style="padding:8px 30px;"> 351 <p style="margin:0 0 10px 0;font-size:15px;font-weight:700;color:#0f2a4a;">ð¨ Vos hôtels</p> 352 ${Vr("Médine","#d1fae5","#10b981",t.medine)} 353 ${Vr("La Mecque","#fdf3d8","#c79a3a",t.makkah)} 354 </td></tr> 355 356 <!-- Voyageurs --> 357 <tr><td style="padding:8px 30px;"> 358 <div style="border:1px solid #e6e0d5;border-radius:12px;padding:12px 14px;"> 359 <p style="margin:0 0 3px 0;font-size:11px;text-transform:uppercase;color:#9ca3af;font-weight:700;">Voyageurs</p> 360 <p style="margin:0;font-size:14px;font-weight:700;color:#1f2937;">${t.travelers} pers. <span style="font-size:12px;font-weight:400;color:#9ca3af;">â ${s}</span></p> 361 </div> 362 </td></tr> 363 364 <!-- Récap : chambre · visa · transferts · options · détail du prix · modalités de paiement --> 365 ${Ql(t,n)} 366 ${Wl(t.recap,n)} 367 368 <!-- Formation · Programme · Points forts · Inclus/Non inclus --> 369 ${Zl()} 370 ${Xl(t)} 371 ${ec()} 372 ${tc()} 373 374 <!-- Modalités d'inscription (paiement + coordonnées bancaires) --> 375 ${sc(t,n)} 376 377 <!-- Contact principal · Information légale --> 378 ${ac(t)} 379 ${rc(a)} 380 381 <!-- Footer --> 382 <tr><td style="background:#0f2a4a;padding:20px 30px;text-align:center;"> 383 <p style="margin:0;font-size:11.5px;color:#c9d6e6;">GOâMAKKAH â Agence de voyages (Atout France)<br>© ${new Date().getFullYear()} GOâMakkah · go-makkah.com</p> 384 </td></tr> 385 386 </table> 387 </td></tr> 388 </table> 389</body></html>`.trim()}const oc=ka(),Gr=1450,An=t=>t.toISOString().split("T")[0];function lc(){const[t]=b.useState(()=>{const n=new Date,o=`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,"0")}`,a=s=>typeof s=="string"&&/^\d{4}-\d{2}$/.test(s)&&s>=o;try{const s=new URLSearchParams(window.location.search),i=s.get("month")||s.get("departureMonth");if(a(i))return i;const l=JSON.parse(localStorage.getItem("searchFormData")||"null");if(l&&a(l.departureMonth))return l.departureMonth}catch{}return null});return t}function Rm(t){b.useEffect(()=>{if(t)try{let n=null;try{n=JSON.parse(localStorage.getItem("searchFormData")||"null")}catch{}if((!n||typeof n!="object")&&(n={}),n.departureMonth===t)return;localStorage.setItem("searchFormData",JSON.stringify({...n,departureMonth:t}))}catch{}},[t])}const cc={FR:"Paris",BE:"Bruxelles",CH:"Genève",MA:"Casablanca",TN:"Tunis",DZ:"Alger"};function Kr(){try{const n=JSON.parse(localStorage.getItem("searchFormData")||"null"),o=((n==null?void 0:n.departureCityLabel)||(n==null?void 0:n.departureCity)||"").toString().trim();if(o&&!/^[A-Z]{3}$/.test(o))return o}catch{}const t=mr();return t&&cc[t]||null}const dc={casablanca:"MAD",alger:"DZD"};function Bi(t){const n=(t||"").normalize("NFD").replace(/[Ì-ͯ]/g,"").toLowerCase().trim();return dc[n]||"EUR"}function Fi(){const[t,n]=b.useState(Kr);return b.useEffect(()=>{const o=()=>n(Kr());return window.addEventListener("gm:country-changed",o),()=>window.removeEventListener("gm:country-changed",o)},[]),t}async function $n(t){const n=new Date,o=new Date(n.getFullYear(),n.getMonth(),1),a=new Date(n);a.setFullYear(a.getFullYear()+2);const[s]=await Promise.all([ca.getCalendarPricing({startDate:An(o),endDate:An(a),family:"pelerinage",...t?{originCity:t}:{}}),cr()]),i=An(n),l=[],d=new Set;if(s&&typeof s=="object")for(const[x,j]of Object.entries(s)){if(x<i)continue;const C=x.slice(0,7);(Array.isArray(j==null?void 0:j.packages)?j.packages.length:0)>0&&d.add(x);const U=(L,me,Z)=>{let V=Number(L);if(!Number.isFinite(V)||V<=0)return;let k=`${me||"EUR"}`.toUpperCase();const R=`${Z||k}`.toUpperCase();k==="EUR"&&R!=="EUR"&&(V=V*jn(R),k=R),l.push({price:V,currency:k,month:C})},I=Array.isArray(j==null?void 0:j.packages)?j.packages:[];if(I.length>0)for(const L of I)U(L==null?void 0:L.cheapestPrice,L==null?void 0:L.currency,L==null?void 0:L.flightCurrency);else U(j==null?void 0:j.cheapestPrice,"EUR")}if(l.length===0&&t)return{...await $n(null),fallbackAllCities:!0};const c=new Map;for(const x of l)c.set(x.currency,(c.get(x.currency)||0)+1);let m="EUR",g=-1;for(const[x,j]of c)j>g&&(g=j,m=x);let N=1/0;const u={};for(const x of l)x.currency===m&&(x.price<N&&(N=x.price),(!(x.month in u)||x.price<u[x.month])&&(u[x.month]=x.price));for(const x of Object.keys(u))u[x]=Math.floor(u[x]);const p={};for(const x of d){const j=x.slice(0,7);p[j]=(p[j]||0)+1}return{globalMin:Number.isFinite(N)?Math.floor(N):null,currency:m,byMonth:u,countByMonth:p,countTotal:d.size,fallbackAllCities:!1}}function mc(t,n){const{data:o,isError:a}=Fs({queryKey:[...Nn.design2026.offer.minPrice(),n??"all"],queryFn:()=>$n(n),staleTime:3e5});return o?t&&o.byMonth[t]?{price:o.byMonth[t],currency:o.currency}:o.globalMin!=null?{price:o.globalMin,currency:o.currency}:{price:Gr,currency:"EUR"}:!a&&Bi(n??null)!=="EUR"?null:{price:Gr,currency:"EUR"}}function Bm(t,n){const{data:o}=Fs({queryKey:[...Nn.design2026.offer.minPrice(),n??"all"],queryFn:()=>$n(n),staleTime:3e5});return o?{count:t?o.countByMonth[t]||0:o.countTotal,fallbackAllCities:o.fallbackAllCities}:null}function Fm(t,n){const{data:o}=Fs({queryKey:[...Nn.design2026.offer.minPrice(),n??"all"],queryFn:()=>$n(n),staleTime:3e5});return o?t&&o.byMonth[t]?{price:o.byMonth[t],currency:o.currency}:o.globalMin!=null?{price:o.globalMin,currency:o.currency}:null:null}function pc(){const t=ul();return b.useMemo(()=>
389{if(!t)return[];const n=[],o=new Set,a=(s,i)=>{s&&!o.has(s)&&(o.add(s),n.push([s,i]))};return t.feature&&t.feature.images.forEach((s,i)=>a(s,i===0?t.feature.name:`${t.feature.name} · ${i+1}`)),t.cards.forEach(s=>a(s.src,s.name)),n},[t])}function _m(){const t=pc();return b.useMemo(()=>{if(t.length<2)return null;const n=t.map(([a])=>a),o=Math.ceil(n.length/2);return{hotels:n.slice(0,o),rooms:n.slice(o)}},[t])}const Rn=[["offer:faq.g1_title",/p[ée]riode|\bdates?\b|\bjours?\b|dur[ée]e?\b|ramadan|rituel|d[ée]roul|programme|d[ée]part/i],["offer:faq.g2_title",/h[oô]tel|chambre|transfert|transport|\bvols?\b|escale|distance|pension|repas/i],["offer:faq.g3_title",/visa|document|passeport|vaccin|mahram|femme|sant[ée]/i],["offer:faq.g4_title",/prix|paiement|payer|tarif|r[ée]serv|annul|modifi|assurance|facilit/i]];async function xc(t){const n=t&&t!=="fr"?`?lang=${t}`:"",o=await fetch(`${oc}/api/faq/public${n}`);if(!o.ok)throw new Error(`HTTP ${o.status}`);const a=await o.json();if(!Array.isArray(a))return null;const s=a.find(d=>(d==null?void 0:d.isActive)!==!1&&/omra|umrah/i.test(`${(d==null?void 0:d.name)||""}`))||a.find(d=>(d==null?void 0:d.isActive)!==!1),i=(Array.isArray(s==null?void 0:s.questions)?s.questions:[]).filter(d=>(d==null?void 0:d.isActive)!==!1&&(d==null?void 0:d.question)&&(d==null?void 0:d.answer)).sort((d,c)=>((d==null?void 0:d.displayOrder)??0)-((c==null?void 0:c.displayOrder)??0)),l=Rn.map(()=>[]);for(const d of i){const c=`${d.question}`,m=Rn.findIndex(([,g])=>g.test(c));m!==-1&&l[m].length<3&&l[m].push([`${d.question}`,`${d.answer}`])}return l.some(d=>d.length<2)?null:Rn.map(([d],c)=>[d,l[c]])}function Hm(){const{i18n:t}=it(),n=t.language,{data:o}=Fs({queryKey:[...Nn.design2026.offer.faq(),n],queryFn:()=>xc(n),staleTime:1800*1e3});return o??null}const uc=["selectedItinerary","selectedFlightId","selectedPackageId","selectedCategoryId","selectedDate","departureDate","returnDate","originCity","nightsInMecca","nightsInMedina","totalNights","basePrice","selectedHotelCategory","selectedMakkahHotel","selectedMedineHotel","selectedMakkahPension","selectedMedinePension","selectedRooms","selectedOptions","omra_step","omra_booking","combine_step","combine_booking","combine_base_by_pax"];function ha(){uc.forEach(t=>{try{localStorage.removeItem(t)}catch{}}),window.dispatchEvent(new Event("itinerarySelectionChanged")),window.dispatchEvent(new Event("roomsSelectionChanged")),window.dispatchEvent(new Event("visaSelectionChanged")),window.dispatchEvent(new Event("optionsSelectionChanged"))}function zm(){b.useEffect(()=>{ha()},[])}const Yr=2;function hc(t="omra"){const n=`${t}_booking`,o=`${t}_pax`,[a,s]=b.useState(()=>{let l=null;try{l=JSON.parse(localStorage.getItem(n)||"null"),l&&l._v!==Yr&&(l=null)}catch{}const d={...fo,...l||{},_v:Yr};try{const c=JSON.parse(localStorage.getItem(o)||"null");if(c){const m=(c.adults||0)+(c.children||[]).length+(c.babies||0);m>0&&(d.travelers=m)}}catch{}return d});return b.useEffect(()=>{localStorage.setItem(n,JSON.stringify(a))},[a,n]),[a,l=>s(d=>({...d,...l}))]}const gc={wifi:Il,restaurant:wl,parking:Vl,pmr:Dl,famille:Cl,garderie:Ml,non_fumeur:El,gym:Bl,spa:Fl,ciseaux:Hl,ascenseur:_l,navette:xr,reception:Rl,etage:Ul,bagagerie:Ll,qibla:Al,haram:_r,mosquee:_r,iftar:kl,transfert:pr,avion:jl,pin:Nl,train:ql,change:yl,climatisation:zl,securite:bl,etoile:vl};function Qr({icon:t,className:n="h-4 w-4"}){if(!t)return null;const o=gc[t];return o?e.jsx(o,{className:n}):e.jsx("span",{className:"leading-none",children:t})}const ma=t=>{if(!t)return"";const n=new Date(t).getTime();return isNaN(n)?String(t).split("T")[0]:new Date(Math.round(n/864e5)*864e5).toISOString().split("T")[0]},ra=t=>(t||"").toLowerCase().trim(),hn=t=>(t||"").replace(/sites?\s*religieux/ig,"Ziyarat"),Vs=t=>/a[ée]roport|airport|djeddah|jeddah|\bjed\b/i.test(t||""),gn=t=>/sites?\s*religieux|ziyara/i.test(t||""),Zt=t=>{const n=ra(t);return/makk|mecqu|mecc/.test(n)?"makkah":/madin|médin|medin/.test(n)?"medine":/djeddah|jeddah|jed/.test(n)?"djeddah":n},fc=t=>/gare/i.test(t||""),fn=t=>Vs(t)?`air-${Zt(t)}`:gn(t)?`ziy-${Zt(t)}`:fc(t)?`gare-${Zt(t)}`:`hotel-${Zt(t)}`,pa=(t,n)=>`${fn(t)}>${fn(n)}`,vc=t=>t==="gmc"?"GMC":t==="voiture"?"Voiture":t==="h1"?"H1":t==="train"?"Train":t==="bus"?"Bus":"",Wr=(t,n)=>[Zt(t),Zt(n)].sort().join("-"),on=(t,n)=>{const o=t.startDate?String(t.startDate).slice(0,10):"",a=t.endDate?String(t.endDate).slice(0,10):"";return!o&&!a||!n?!0:(!o||n>=o)&&(!a||n<=a)},_i=(t,n)=>{if(gn(t)||gn(n))return!1;const o=Zt(t),a=Zt(n);if(o===a)return!1;const s=[o,a].sort().join("-");return s==="djeddah-medine"||s==="makkah-medine"},Hi=t=>t==="train"?"Train":t==="gmc"?"GMC / Privé":t==="voiture"?"Voiture / Privé":t==="h1"?"H1 / Privé":"Bus";function Bn(t,n){const{trajetPrices:o,paxCount:a}=t,s=Number(t.sharedPaxCount)>0?Number(t.sharedPaxCount):a,i=n.option,l=n.modeEdits,d=n.dateEdits,c=n.timeEdits,m=n.sharedEdits,g=n.totalOverride,N=[],u=(O,pe)=>{const Ue=ra(O),H=ra(pe),Ae=N.find(De=>{const J=ra(De.transportName||`${De.pickupLocation} â ${De.dropoffLocation}`);
389return J.includes(Ue)&&J.includes(H)||ra(De.pickupLocation||"").includes(Ue)&&ra(De.dropoffLocation||"").includes(H)});if(Ae){const De=ra(Ae.vehicleType||Ae.transportName||""),J=De.includes("train")||De.includes("tgv"),ie=Ae.totalPrice?`${Ae.totalPrice} ${Ae.currency||"EUR"}`:"";return J?{mode:"train",label:"Train",price:ie}:{mode:"gmc",label:"GMC / Privé",price:ie}}return{mode:"bus",label:"Bus",price:"Inclus"}},p=(O,pe,Ue,H)=>{const Ae=vc(Ue);if(!Ae||Ae==="Bus")return null;if(Ae==="Train"){const Me=Wr(O,pe),ct=(o||[]).filter(Ke=>!Ke.tourType&&!Ke.shared&&Ke.traject&&(Ke.vehicleType||"")==="Train"&&on(Ke,H)&&Number(Ke.sellPrice)>0&&Wr(Ke.traject.departure,Ke.traject.arrival)===Me);return ct.length?Math.min(...ct.map(Ke=>Number(Ke.sellPrice))):null}const De=pa(O,pe),J=pa(pe,O),ie=(o||[]).filter(Me=>!Me.tourType&&!Me.shared&&Me.traject&&(Me.vehicleType||"")===Ae&&on(Me,H)&&Number(Me.sellPrice)>0&&[pa(Me.traject.departure,Me.traject.arrival)].some(ct=>ct===De||ct===J));if(!ie.length)return null;const Ee=ie.reduce((Me,ct)=>Number(ct.sellPrice)<Number(Me.sellPrice)?ct:Me),Re=Number(Ee.capacity)>0?Number(Ee.capacity):0,Je=Re>0?Math.max(1,Math.ceil(a/Re)):1;return Number(Ee.sellPrice)*Je},x=(O,pe,Ue)=>{const H=pa(O,pe),Ae=pa(pe,O),De=(o||[]).filter(J=>!J.tourType&&J.shared&&J.traject&&(J.vehicleType||"")==="GMC"&&on(J,Ue)&&Number(J.sellPrice)>0&&[pa(J.traject.departure,J.traject.arrival)].some(ie=>ie===H||ie===Ae));return De.length?Math.min(...De.map(J=>Number(J.sellPrice))):null},j=O=>ue(O)==="gmc"&&!!m[O.id]&&!I,C=(O,pe)=>{if(I)return null;if(j(O)){const Ue=x(O.dep,O.arr,pe);return Ue!=null?Ue*s:null}return p(O.dep,O.arr,ue(O),pe)},U=(O,pe)=>{const Ue=O==="gmc"?"gmc":O==="bus"?"bus":O==="train"?"train":"";if(!Ue)return null;let H=(o||[]).filter(De=>De.tourType&&String(De.tourType).toLowerCase()===Ue&&!De.supplierId&&on(De,pe)&&Number(De.sellPrice)>0);const Ae=H.filter(De=>(De.arrival||"")===ye);return Ae.length&&(H=Ae),H.length?H.reduce((De,J)=>Number(J.sellPrice)<Number(De.sellPrice)?J:De):null},I=i==="bus"||i==="gmc"||i==="train",L=(t.trajects||[]).map((O,pe)=>({id:`leg-${pe}`,dep:O.departure||"",arr:O.arrival||""})),me=L.find(O=>Vs(O.dep)&&!Vs(O.arr)),Z=me?Zt(me.arr):"",V=(O,pe)=>Vs(O)&&!Vs(pe)?1:Vs(pe)&&!Vs(O)?5:gn(pe)?Zt(O)===Z?2:4:3,k=ma(t.flight.arrISO),R=t.flight.arrTime?String(t.flight.arrTime).substring(0,5):"",_=ma(t.flight.retISO),be=t.flight.retTime?String(t.flight.retTime).substring(0,5):"",Y=t.hotels||[],Q=O=>Y.find(pe=>Zt(pe.location)===O),z=Q(Z),fe=[...new Set(Y.map(O=>Zt(O.location)).filter(O=>O&&O!==Z&&O!=="djeddah"))][0]||"",K=Q(fe),E=O=>`${O.getFullYear()}-${String(O.getMonth()+1).padStart(2,"0")}-${String(O.getDate()).padStart(2,"0")}`,B=O=>{if(!O)return"";const pe=new Date(O+"T12:00:00");return pe.setDate(pe.getDate()+2),pe.getDay()===5&&pe.setDate(pe.getDate()+1),E(pe)},M=z!=null&&z.checkinDate?ma(z.checkinDate):"",q=z!=null&&z.checkoutDate?ma(z.checkoutDate):"",ce=K!=null&&K.checkinDate?ma(K.checkinDate):"",te=K!=null&&K.checkoutDate?ma(K.checkoutDate):"",$=O=>O===1?k||M:O===2?B(M):O===3?q:O===4?B(ce):_||te,W=O=>O===1?R:O===2||O===3||O===4?"14:00":O===5?be:"",ye=t.flight.arrCity?Zt(t.flight.arrCity):"",de=t.flight.retCity?Zt(t.flight.retCity):"",ot=O=>{for(const pe of L){if(Vs(pe.dep)&&Zt(pe.dep)===O)return pe.dep;if(Vs(pe.arr)&&Zt(pe.arr)===O)return pe.arr}return""},Ge=L.map(O=>{const pe=V(O.dep,O.arr);let Ue=O.dep,H=O.arr;return pe===1&&ye&&ye!==Zt(O.dep)&&(Ue=ot(ye)||(t.flight.arrCity?`Aéroport ${t.flight.arrCity}`:O.dep)),pe===5&&de&&de!==Zt(O.arr)&&(H=ot(de)||(t.flight.retCity?`Aéroport ${t.flight.retCity}`:O.arr)),{...O,dep:Ue,arr:H,...u(O.dep,O.arr),_phase:pe,_date:$(pe),_time:W(pe)}}).sort((O,pe)=>O._phase-pe._phase),Be=i==="train",ve=O=>{const pe=String(O||"").trim();if(/^gare/i.test(pe))return pe;const Ue=pe.replace(/^h[oô]tel\s+/i,"").trim();return Ue?`Gare ${Ue}`:"Gare de train"},le=i==="gmc"?"gmc":i==="bus"?"bus":null,Te=Be?Ge.flatMap(O=>{if(O._phase===2||O._phase===4)return[{...O,mode:"bus",price:"Inclus",_locked:!0}];if(O._phase===3){const pe=ve(O.dep),Ue=ve(O.arr);return[{...O,id:`${O.id}__a`,arr:pe,mode:"gmc",price:"Inclus",_locked:!0},{...O,id:`${O.id}__t`,dep:pe,arr:Ue,mode:"train",price:"Sur devis",_locked:!0,_time:"",_trainQuote:!0},{...O,id:`${O.id}__b`,dep:Ue,mode:"gmc",price:"Inclus",_locked:!0,_time:""}]}return[{...O,mode:"gmc",price:"Inclus",_locked:!0}]}):le?Ge.map(O=>O._phase===2||O._phase===4?{...O,mode:"bus",price:"Inclus",_locked:!0}:{...O,mode:le,price:"Inclus",_locked:!0}):Ge.map(O=>O._phase===2||O._phase===4?{...O,mode:"bus",price:"Inclus",_locked:!0}:O);function ue(O){return Be||O._locked?O.mode:l[O.id]||(i==="custom"?"bus":O.mode)}const $e=I?U(i,$(1)):null,oe=$e?Number($e.sellPrice):null,Ve=$e&&Number($e.capacity)>0?Number($e.capacity):0,y=Ve>0?Math.max(1,Math.ceil(a/Ve)):1,A=oe!=null?oe*y:null,je=I?A||0:Te.reduce((O,pe)=>{const Ue=C(pe,d[pe.id]||pe._date);return O+(Ue||0)},0);Te.forEach(O=>{const pe=d[O.id]||O._date;O._resolvedMode=ue(O),O._shared=j(O),O._price=I?null:C(O,pe),O._priceByMode={gmc:p(O.dep,O.arr,"gmc",pe),gmcShared:x(O.dep,O.arr,pe),voiture:p(O.dep,O.arr,"voiture",pe),h1:p(O.dep,O.arr,"h1",pe),train:_i(O.dep,O.arr)?p(O.dep,O.arr,"train",pe):null}});const Se=Te.map(O=>{const pe=d[O.id]||O._date;return{phase:O._phase,route:`${hn(O.dep)} â ${hn(O.arr)}`,mode:ue(O),date:pe||"",time:c[O.id]??O._time??"",shared:j(O),price:I?null:C(O,pe)}}),We=g!==""?Number(g)||0:je;return{displayRows:Te,rows:Ge,transfersTotal:je,forfaitInfo:{forfaitUnit:oe,forfaitCap:Ve,forfaitCars:y,forfaitTotal:A},isTourComplet:I,config:{option:i,modeEdits:l,dateEdits:d,timeEdits:c,sharedEdits:m,totalOverride:g,total:We,legs:Se}}}const vn=[{garantie:"Annulation",plafond:"12 000 â¬/pers · 75 000 â¬/évén.",franchise:"0 à 30 ⬠selon motif"},{garantie:"Interruption de voyage",plafond:"12 000 â¬/pers · 50 000 â¬/évén.",franchise:"30 â¬/assuré"},{garantie:"Bagages",plafond:"3 050 â¬/pers · 7 630 â¬/évén.",franchise:"75 â¬/dossier"}
389,{garantie:"Retard livraison bagages",plafond:"jusqu'à 770 â¬",franchise:"aucune"},{garantie:"Responsabilité civile vie privée",plafond:"4 500 000 â¬",franchise:"150 â¬/assuré"},{garantie:"Frais médicaux à l'étranger",plafond:"150 000 â¬/pers/voyage",franchise:"30 â¬/dossier"},{garantie:"Rapatriement / transport sanitaire",plafond:"frais réels",franchise:"â"},{garantie:"Frais de recherche et secours",plafond:"10 000 â¬/pers",franchise:"150 â¬/assuré"},{garantie:"Assistance décès (transport corps)",plafond:"frais réels + cercueil 2 300 â¬",franchise:"â"}],bc=["Annulation (maladie, accident, décès proche)","Annulation épidémie / pandémie","Annulation grève / attentat / catastrophe naturelle","Interruption de séjour (prorata)","Vol, perte, destruction de bagages","Retard de livraison de bagages (>24h)","Responsabilité civile vie privée","Frais médicaux + hospitalisation à l'étranger","Rapatriement sanitaire","Assistance médicale 24/7 (médecin, médicaments)","Frais de recherche et secours","Assistance juridique à l'étranger (caution, avocat)","Assistance décès (transport corps, cercueil 2 300 â¬)","Assistance domicile après rapatriement (aide-ménagère)"],yc=["Prime d'assurance","Frais de dossier","Frais de visa","Taxes d'aéroport","Billetterie de transport (interruption)","Objets de valeur hors coffre/non portés","Maladie préexistante non consolidée","Frais médicaux dans le pays de domicile","Sports dangereux / compétitions","Actes intentionnels, alcool, stupéfiants","Voyages : Afghanistan, Libéria, Soudan","Prestations non organisées par l'assisteur","Ãpidémies/pandémies en assistance (sauf stipulation)","Frais de douane sur médicaments"],Ws=t=>Object.fromEntries(Object.entries(t||{}).map(([n,o])=>[ki[n]||n,o]));function tr(t,n){n({tier:t.id,tierLabel:t.label,tierIcon:t.icon,hotelMkName:t.mk.name,hotelMdName:t.md.name,starsMk:t.mk.stars,starsMd:t.md.stars,tierMinPrice:t.minPrice,distMk:t.mk.dist,distMd:t.md.dist,checkInMk:t.mk.check_in,checkOutMk:t.mk.check_out,checkInMd:t.md.check_in,checkOutMd:t.md.check_out,room:null,combo:null,comboLabel:null,comboTotal:null,pension:"BB",mdPensionDisplay:t.md.meal||null,mkPensionDisplay:t.mk.meal||null,kaaba:/kaaba/i.test((t.mk.views||[]).join()),nabawi:/nabawi/i.test((t.md.views||[]).join())}),ko(t)}const bn=(t,n,o,a)=>{if(!t||!n||!o||!a)return 0;const s=new Date(`${t}T${ja(n)}:00`).getTime(),i=new Date(`${o}T${ja(a)}:00`).getTime(),l=Math.round((i-s)/6e4);return l>0?l:0};function Ys(t){return b.useMemo(()=>{let n={adults:t.travelers||2,children:0,babies:0};try{const a=JSON.parse(localStorage.getItem(vi())||"null");a&&(n={adults:a.adults||0,children:(a.children||[]).length,babies:a.babies||0})}catch{}const o=n.adults+n.children||t.travelers||1;return{...n,n:Math.max(1,o),display:Math.max(1,n.adults+n.children+n.babies)}},[t.travelers])}function Ga(t,n,o,a=0){let s=t.comboTotal?t.comboTotal:(t.tierMinPrice||t.flightBase||0)*n;return o("visa")&&(s+=(t.visaPerPerson||0)*n),o("options")&&(s+=t.optionsTotal||0),o("vols")&&(s+=(a||0)*(Number(t.infantPrice)||0)),Math.round(s)}const On=()=>!0;function zi(){var t,n,o,a;try{const s=new URLSearchParams(window.location.search).get("recapV2");(s==="1"||s==="0")&&localStorage.setItem("RECAP_CHECKOUT_V2",s);const i=localStorage.getItem("RECAP_CHECKOUT_V2");if(i==="1")return!0;if(i==="0")return!1}catch{}try{if(((n=(t=import.meta)==null?void 0:t.env)==null?void 0:n.VITE_RECAP_CHECKOUT_V2)==="1")return!0}catch{}try{if(((a=(o=import.meta)==null?void 0:o.env)==null?void 0:a.DEV)===!0)return!0}catch{}return!1}function js({label:t}){const{t:n}=it();return e.jsx("div",{className:"flex min-h-[320px] flex-col items-center justify-center rounded-3xl border border-ink/8 bg-white py-16 shadow-soft",children:e.jsx(al,{inline:!0,label:t||n("reservation:common.loading")})})}function Ns({message:t,onRetry:n,actionLabel:o,onAction:a}){const{t:s}
389=it();return e.jsxs("div",{className:"flex min-h-[320px] flex-col items-center justify-center gap-4 rounded-3xl border border-ink/8 bg-white py-16 text-center shadow-soft",children:[e.jsx("span",{className:"grid h-12 w-12 place-items-center rounded-full bg-cream-200 text-navy",children:e.jsx(h,{name:"shield",className:"h-6 w-6"})}),e.jsx("p",{className:"max-w-md px-6 text-[14.5px] leading-relaxed text-ink-soft",children:t}),e.jsxs("div",{className:"flex items-center gap-2",children:[n&&e.jsx(ts,{variant:"outline",onClick:()=>n(),className:"px-5 py-2.5 text-[13.5px]",children:s("reservation:common.retry")}),a&&e.jsx(ts,{variant:"solid",onClick:a,className:"px-5 py-2.5 text-[13.5px]",children:o})]})]})}function ur({current:t,go:n,showVisa:o=!0,firstLabel:a,firstHref:s,showPayment:i=!1,bare:l=!1,blocked:d}){const c=Va(),m=qa(),{t:g}=it(),N=a||"Votre Omra",p=[["users",N,s||"/omra/votre-omra"],["plane","Vols",null],["kaaba","Hôtels",null],["star","Chambres",null],["shield","Visa",null],["sparkle","Options",null],["check","Récapitulatif",null],...i?[["card","Paiement",null]]:[]].filter(I=>o||I[1]!=="Visa"),x={[N]:"votre_omra",Vols:"vols",Hôtels:"hotels",Chambres:"rooms",Visa:"visa",Options:"options",Récapitulatif:"recap",Paiement:"payment"},j=b.useRef(null);b.useEffect(()=>{const I=j.current;if(!I)return;const L=I.querySelector('[data-active="1"]');L&&I.scrollTo({left:L.offsetLeft-(I.clientWidth-L.offsetWidth)/2,behavior:"smooth"})},[t]);const C=I=>{var L;
389return(L=j.current)==null?void 0:L.scrollBy({left:I*170,behavior:"smooth"})},U=e.jsxs("div",{className:"relative",children:[e.jsx("button",{type:"button","aria-label":g("reservation:stepper.prev"),onClick:()=>C(-1),className:"absolute left-0 top-1/2 z-10 grid h-9 w-6 -translate-y-1/2 place-items-center rounded-r-full bg-red-brand text-white shadow-md sm:hidden",children:e.jsx(h,{name:"arrow",className:"h-4 w-4 rotate-180"})}),e.jsx("div",{ref:j,className:"no-sb flex items-center gap-2 overflow-x-auto px-7 sm:gap-0 sm:px-0",children:p.map(([I,L,me],Z,V)=>{const k=x[L],R=k===t,_=(!R&&typeof d=="function"?d(k):null)||null,be=()=>{_||(me?c(m(me)):n(k))};return e.jsxs(us.Fragment,{children:[e.jsxs("button",{onClick:be,"data-active":R?"1":"0",disabled:!!_,title:_||void 0,className:`inline-flex shrink-0 items-center gap-2 rounded-full px-4 py-2.5 text-[13.5px] font-semibold transition-colors ${R?"bg-red-brand text-white shadow-soft":_?"cursor-not-allowed border border-ink/10 bg-cream-100 text-ink-mute/70":"border border-ink/10 bg-white text-ink-soft hover:text-ink"}`,children:[e.jsx("span",{className:`grid h-6 w-6 place-items-center rounded-full text-[11px] font-bold ${R?"bg-white text-red-brand":_?"bg-ink/25 text-white":"bg-[#C12000] text-white"}`,children:Z+1}),e.jsx(h,{name:I,className:`h-4 w-4 ${R?"text-white":"text-gold-deep"}`})," ",Z===0&&a?a:g("reservation:stepper."+k)]}),Z<V.length-1&&e.jsx("span",{className:"hidden h-px flex-1 bg-ink/15 sm:block"})]},L)})}),e.jsx("button",{type:"button","aria-label":g("reservation:stepper.next"),onClick:()=>C(1),className:"absolute right-0 top-1/2 z-10 grid h-9 w-6 -translate-y-1/2 place-items-center rounded-l-full bg-red-brand text-white shadow-md sm:hidden",children:e.jsx(h,{name:"arrow",className:"h-4 w-4"})})]});return l?e.jsx("div",{className:"px-4 py-4 sm:px-7",children:U}):e.jsx("div",{className:"border-b border-ink/8 bg-white",children:e.jsx(ml,{className:"py-4",children:U})})}function Ba({nextName:t,explain:n,intro:o,onNext:a,onBack:s,disabled:i=!1,disabledHint:l,flat:d=!1,className:c="",extra:m=null}){const{t:g}=it(),N=!t||!a,u=o||n,p=d?"":"rounded-2xl border border-ink/12 bg-white shadow-soft";return e.jsxs("div",{className:`relative flex flex-wrap items-center justify-center gap-x-7 gap-y-3 px-6 py-4 sm:px-9 sm:py-5 ${p} ${c}`,children:[s&&e.jsxs("button",{type:"button",onClick:s,className:"order-first flex w-full items-center justify-start gap-1 whitespace-nowrap text-[13px] font-semibold text-ink-mute underline decoration-ink/25 underline-offset-4 transition-colors hover:text-navy focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy sm:absolute sm:left-6 sm:top-4 sm:z-10 sm:w-auto",children:[e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 rotate-180"}),g("reservation:banner.back")]}),e.jsxs("div",{className:"flex max-w-2xl items-center gap-3",children:[e.jsx("span",{className:"grid h-11 w-11 shrink-0 place-items-center rounded-full bg-navy text-white ring-1 ring-inset ring-white/10",children:u?e.jsx(h,{name:"compass",className:"h-6 w-6"}):e.jsxs("span",{className:"relative grid h-full w-full place-items-center",children:[e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",className:"h-6 w-6","aria-hidden":"true",children:[e.jsx("path",{d:"M4 12a8 8 0 0 1 16 0"}),e.jsx("rect",{x:"2.6",y:"12",width:"2.8",height:"4.4",rx:"1.2"}),e.jsx("rect",{x:"18.6",y:"12",width:"2.8",height:"4.4",rx:"1.2"}),e.jsx("circle",{cx:"12",cy:"9",r:"2.7"}),e.jsx("path",{d:"M6.5 19.5c.6-2.5 2.9-4 5.5-4s4.9 1.5 5.5 4"})]}),e.jsx("span",{className:"absolute -bottom-0.5 -right-0.5 h-3 w-3 rounded-full bg-emerald-500 ring-2 ring-white","aria-hidden":"true"})]})}),u?e.jsx("span",{className:"whitespace-pre-line text-left text-[clamp(0.98rem,1.5vw,1.15rem)] font-medium leading-snug text-ink-soft",children:u}):e.jsxs("span",{className:"text-left leading-tight",children:[e.jsx("span",{className:"block text-[10.5px] font-bold uppercase tracking-[0.14em] text-red-brand",children:g("reservation:banner.advisor")}),e.jsx("span",{className:"block text-[12.5px] text-ink-mute",children:g("reservation:banner.advisorSub")})]})]}),m,e.jsx("span",{className:"hidden h-9 w-px shrink-0 bg-ink/12 sm:block","aria-hidden":"true"}),e.jsx("p",{className:"text-center text-[clamp(1.05rem,1.9vw,1.3rem)] font-semibold text-ink",children:N?e.jsx("span",{className:"font-display font-bold text-navy",children:g("reservation:banner.lastStep")}):i?e.jsxs("span",{className:"inline-flex flex-col items-center gap-0.5",children:[e.jsxs("span",{"aria-disabled":"true",className:"cursor-not-allowed whitespace-nowrap font-display font-bold text-ink-mute/60 underline decoration-ink/20 decoration-2 underline-offset-[6px]",children:[g("reservation:banner.continueTo",{step:t})," ",e.jsx(h,{name:"arrow",className:"inline h-4 w-4"})]}),l&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-[11.5px] font-semibold normal-case text-red-brand",children:[e.jsx(h,{name:"arrow",className:"h-3 w-3 rotate-90"})," ",l]})]}):e.jsxs("button",{type:"button",onClick:a,className:"whitespace-nowrap font-display font-bold text-navy underline decoration-red-brand decoration-2 underline-offset-[6px] transition-colors hover:text-red-brand focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[o?g("reservation:banner.continueDates"):g("reservation:banner.continueTo",{step:t})," ",e.jsx(h,{name:"arrow",className:"inline h-4 w-4"})]})})]})}const Ea=t=>String(t||"").replace(/^vues*/i,""),Fn=t=>{const n=String(t||"");return n&&n.charAt(0).toLowerCase()+n.slice(1)},Ks=t=>t.length>4?t.charAt(0)+t.slice(1).toLowerCase():t;function Ui({tiers:t,currentId:n,onPick:o,soldOutIds:a,availabilityPending:s}){const{t:i}
389=it(),l=t.filter(m=>m.id!==n),d=m=>(a||[]).includes(m),c=m=>d(m)||!!s;return l.length?e.jsxs("span",{className:"flex flex-wrap items-center justify-center gap-x-2.5 gap-y-1.5 text-[clamp(0.98rem,1.5vw,1.15rem)] font-medium leading-snug text-ink-soft",children:[e.jsx("span",{className:"hidden h-6 w-px shrink-0 bg-ink/20 sm:block","aria-hidden":!0}),e.jsx("span",{className:"text-ink-mute",children:i("reservation:hotels.switchTo2")}),l.map((m,g)=>e.jsxs(us.Fragment,{children:[g>0&&e.jsx("span",{className:"text-ink/25","aria-hidden":!0,children:"|"}),e.jsxs("button",{type:"button",onClick:()=>{c(m.id)||o(m)},disabled:c(m.id),className:d(m.id)?"cursor-not-allowed text-ink-mute/70 line-through decoration-ink/30":"underline decoration-ink/25 underline-offset-4 transition-colors hover:text-navy hover:decoration-[var(--accent)]",children:[Ks(m.label),d(m.id)?" "+i("common:priceTable.soldOut").toLowerCase():""]})]},m.id))]}):null}function yn({children:t,banner:n,footer:o=null,className:a=""}){return e.jsxs("div",{className:`overflow-hidden rounded-2xl border border-red-brand/30 bg-white shadow-[0_16px_38px_-16px_rgba(192,57,43,0.38)] ring-1 ring-red-brand/5 ${a}`,children:[e.jsx("span",{"aria-hidden":"true",className:"block h-1.5 w-full bg-gradient-to-r from-red-brand via-[#e35c4d] to-red-brand"}),t,n&&e.jsx("div",{className:"border-t border-red-brand/12",children:n}),o&&e.jsx("div",{className:"border-t border-red-brand/12 bg-cream-100/50",children:o})]})}function Jr({n:t,cur:n,className:o="",symClassName:a=""}){const{amount:s,symbol:i}=Po(t,n),l=i==="â¬";return e.jsxs("span",{className:`font-display text-navy ${o}`,children:[s,l?" â¬":e.jsx("span",{className:`ml-1 align-baseline text-[0.5em] font-bold ${a}`,children:i})]})}const sr=(t,n)=>{const o=new Date((t==null?void 0:t.arriveISO)||(t==null?void 0:t.departISO)||"").getTime(),a=new Date((n==null?void 0:n.departISO)||"").getTime();return!isNaN(o)&&!isNaN(a)&&a-o>24*36e5},Nc=(t,n)=>Math.round((new Date((n==null?void 0:n.departISO)||"").getTime()-new Date((t==null?void 0:t.arriveISO)||(t==null?void 0:t.departISO)||"").getTime())/864e5);function jc(t){const n=[];return(t||[]).forEach((o,a)=>{a===0||sr(t[a-1],o)?n.push([o]):n[n.length-1].push(o)}),n}function Ka(t){const n=t==null?void 0:t.hotelChoiceDisplay;if(!n||typeof n!="object")return t;const o={...t},a=s=>{const i=n[s];if(!i)return;const l=s==="md"?"Md":"Mk";i.name&&(o[`hotel${l}Name`]=i.name,i.stars&&(o[`stars${l}`]=i.stars),o[`dist${l}`]=i.dist||""),i.pension&&(o[`${s}PensionDisplay`]=i.pension,o[`pension${l}Label`]=Kt[i.pension]||i.pension),i.view&&(o[`view${l}`]=i.view)};return a("md"),a("mk"),o}function hr({b:t,go:n,step:o,tripLabel:a,heroImg:s,hideVisa:i,combine:l,firstHref:d,combineFrom:c,stepIndex:m,stepTotal:g,className:N=""}){var ie,Ee,Re,Je,Me,ct,Ke,st,gt;const u=["vols","hotels","rooms","visa"].includes(o)?t:Ka(t),{t:p}=it(),[x,j]=b.useState(o!=="vols");b.useEffect(()=>{j(o!=="vols")},[o]);const[C,U]=b.useState(!1),[I,L]=b.useState(!1),me=Ts[u.tripType]||Ts.omra,Z=u.flightNature==="pnr_groupe"?p("reservation:summary.inGroup",{label:me.label}):me.label,V={vols:2,hotels:3,rooms:4,visa:5},k=m&&g?p("reservation:summary.stepNof",{n:m,total:g}):V[o]?p("reservation:summary.stepNof",{n:V[o],total:7}):p("reservation:summary.lastStep"),R=["vols","hotels","rooms","visa","options"],_=R.indexOf(o),be=he=>R.indexOf(he)<=_;let Y={adults:u.travelers||2,children:0,babies:0};try{const he=JSON.parse(localStorage.getItem(vi())||"null");he&&(Y={adults:he.adults||0,children:(he.children||[]).length,babies:he.babies||0})}catch{}const Q=Math.max(1,Y.adults+Y.children||u.travelers||1),z=Math.max(1,Y.adults+Y.children+Y.babies),fe=Ga(u,Q,be,Y.babies),K=mc(lc(),Fi()),E=!u.flightId&&u.previewBase!=null,B=E?Number(u.previewBase):l?Number(c==null?void 0:c.price)||0:(K==null?void 0:K.price)??0,M=E?u.previewCur||null:l?(c==null?void 0:c.currency)||null:(K==null?void 0:K.currency)??null,q=kn(!l);let ce=null;const te=u.city&&u.city!=="Toutes les villes"?u.city:null;for(const he of Object.values(((ie=q.data)==null?void 0:ie.byDate)||{}))for(const Xe of he)Xe.price!=null&&(te&&Xe.originCity!==te||!ce&&Xe.currency&&(ce=Xe.currency));const $=u.flightId?u.currency||ce||"EUR":M||ce||u.currency||"EUR",W=fe>0?Math.round(fe/Q):B,ye=fe>0?fe:B*Q,de=W,ot=u.pension?Kt[u.pension]||u.pension:null,Ge=he=>{const Xe=u[`pension${he}Label`];if(Xe)return Xe;const F=u[`${he.toLowerCase()}PensionDisplay`];return F?Kt[F]||F:ot};let Be=null;try{Be=JSON.parse(localStorage.getItem("selectedItinerary")||"null")}catch{}const ve=(Be==null?void 0:Be.flightDetails)||{},le=(((Ee=Be==null?void 0:Be.flight)==null?void 0:Ee.segments)||[]).filter(he=>he.dir==="in"),Te=he=>he&&he.length>=16?he.slice(11,16):"",ue=he=>{const F=`min-w-0 truncate font-display font-extrabold leading-none text-navy ${(he.from||"").trim().length<=4&&(he.to||"").trim().length<=4?"text-[1.2rem]":"text-[0.95rem]"}`,ke=he.time&&he.time!=="00:00"?he.time:"",dt=he.fromSub&&he.fromSub!==he.from||he.toSub&&he.toSub!==he.to;return e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsxs("span",{className:"flex shrink-0 flex-col items-start gap-1 border-r border-ink/10 pr-2.5",children:[e.jsx(ea,{name:u.airline||"Vol",code:u.airlineCode,logo:u.airlineLogo,className:"h-6 w-8 rounded text-[9px]"}),he.flightNo&&e.jsx("span",{className:"block text-[10.5px] font-extrabold leading-none text-navy",children:he.flightNo}),e.jsxs("span",{className:"block leading-tight",children:[e.jsx("span",{className:"block text-[8px] font-bold uppercase tracking-wider text-ink-mute",children:p("reservation:summary.departure")}),e.jsx("span",{className:"block whitespace-nowrap text-[10.5px] font-extrabold text-navy",children:ke?`${ke} · ${he.dateStr||""}`:he.dateStr||"â"})]})]}),e.jsxs("span",{className:"min-w-0 flex-1",children:[dt&&e.jsxs("span",{className:"flex items-center justify-between text-[9px] font-semibold text-ink-mute",children:[e.jsx("span",{className:"truncate",children:he.fromSub}),e.jsx("span",{className:"truncate text-right",children:he.toSub})]}),e.jsxs("span",{className:"flex items-center justify-between gap-1",children:[e.jsx("span",{className:F,children:he.from||"â"}),e.jsx(h,{name:"plane",className:"h-3.5 w-3.5 shrink-0 text-gold-deep"}),e.jsx("span",{className:`${F} text-right`,children:he.to||"â"})]}),e.jsx("span",{className:"mt-1 block truncate text-[9px] text-ink-mute",children:p("reservation:summary.operatedBy",{airline:u.airline||p("reservation:common.flight")})})]})]})},$e=(((Re=Be==null?void 0:Be.flight)==null?void 0:Re.segments)||[]).filter(he=>he.dir==="out"),oe=he=>he&&he.length>=10?`${he.slice(8,10)}/${he.slice(5,7)}`:"",Ve=he=>{const Xe=l?jc(he):[];return Xe.length<2?null:e.jsx("span",{className:"flex flex-col gap-3",children:Xe.map((F,ke)=>e.jsx(us.Fragment,{children:ue({from:F[0].fromCity,to:F[F.length-1].toCity,fromSub:F[0].fromCode||void 0,toSub:F[F.length-1].toCode||void 0,time:Te(F[0].departISO),dateStr:oe(F[0].departISO),flightNo:F[0].flightNo})},ke))})};let y=null,A=null,je=null,Se=null;if(u.dateISO){const he=(dt,D)=>{const Ne=new Date(dt);return Ne.setDate(Ne.getDate()+(D||0)),Ne},Xe=at(u.dateISO),F=he(Xe,u.nightsMedina||0),ke=he(F,u.nightsMakkah||0);
389je=Bt(Xe),Se=Bt(F),y=Bt(F),A=Bt(ke)}const We=u.stay?Math.max(0,u.stay-1):null,Ze=u.dateISO?at(u.dateISO):null,O=u.returnISO?at(u.returnISO):null,pe=!!(Ze&&O&&Ze.getFullYear()!==O.getFullYear()),Ue=!!(u.flightId&&Ze&&O),H=l&&Array.isArray(u.combineStays)&&u.combineStays.length?u.combineStays:null,Ae=he=>he&&String(he).length>=10?`${String(he).slice(8,10)}/${String(he).slice(5,7)}`:null,De=H?H.map(he=>{const Xe=he.key==="mk",F=he.key==="md",ke=Xe?p("reservation:summary.rowHotelMakkah"):F?p("reservation:summary.rowHotelMedina"):`${p("reservation:rooms.hotel")} · ${he.city}`,dt=Xe?u.hotelMkName||he.hotel:F&&u.hotelMdName||he.hotel,D=Xe?u.starsMk:F?u.starsMd:null,Ne=Xe?u.distMk:F?u.distMd:null,qe=Number(he.nights)||(Xe?u.nightsMakkah:F?u.nightsMedina:0)||0,Pe=Ae(he.checkIn),et=Ae(he.checkOut),Ye=Xe||F?ot:he.pension?Kt[he.pension]||he.pension:null,lt=Xe?u.viewMk||null:F&&u.viewMd||null,He=be("hotels")&&dt?`${dt}${D?` · ${D}â `:""}${Ne?" · "+Ne:""} 390${p("reservation:common.nights6",{count:qe})}${Pe&&et?` · ${Pe} â ${et}`:""}${Ye?` 391${p("reservation:summary.pensionLabel",{v:Ye})}`:""}${lt&&be("rooms")?` 392${p("reservation:summary.viewLabel",{v:lt})}`:""}${be("rooms")&&u.comboLabel?` 393${p("reservation:summary.roomLabel",{v:u.comboLabel})}`:""}`:null;return[ke,He,"hotels"]}):[[p("reservation:summary.rowHotelMedina"),be("hotels")&&u.hotelMdName?`${u.hotelMdName} · ${u.starsMd}â ${u.distMd?" · "+u.distMd:""} 394${p("reservation:common.nights6",{count:u.nightsMedina})}${je?` · ${je} â ${Se}`:""}${Ge("Md")?` 395${p("reservation:summary.pensionLabel",{v:Ge("Md")})}`:""}${be("rooms")&&u.viewMd?` 396${p("reservation:summary.viewLabel",{v:u.viewMd})}`:""}${be("rooms")&&u.comboLabel?` 397${p("reservation:summary.roomLabel",{v:u.comboLabel})}`:""}`:null,"hotels"],[p("reservation:summary.rowHotelMakkah"),be("hotels")&&u.hotelMkName?`${u.hotelMkName} · ${u.starsMk}â ${u.distMk?" · "+u.distMk:""} 398${p("reservation:common.nights6",{count:u.nightsMakkah})}${y?` · ${y} â ${A}`:""}${Ge("Mk")?` 399${p("reservation:summary.pensionLabel",{v:Ge("Mk")})}`:""}${be("rooms")&&u.viewMk?` 400${p("reservation:summary.viewLabel",{v:u.viewMk})}`:""}${be("rooms")&&u.comboLabel?` 401${p("reservation:summary.roomLabel",{v:u.comboLabel})}`:""}`:null,"hotels"]],J=[[p("reservation:summary.rowFlightOut"),be("vols")&&u.date?Ve($e)||ue({from:ve.fromCity||u.city,to:ve.toCity||u.flightDest,fromSub:ve.fromCode||void 0,toSub:ve.toCode||void 0,time:ve.departureTime,dateStr:u.date,flightNo:ve.flightNo}):null,"vols"],[p("reservation:summary.rowFlightReturn"),be("vols")&&u.returnDate?Ve(le)||ue({from:((Je=le[0])==null?void 0:Je.fromCity)||u.flightRetFrom,to:((Me=le[le.length-1])==null?void 0:Me.toCity)||u.flightRetTo,fromSub:((ct=le[0])==null?void 0:ct.fromCode)||void 0,toSub:((Ke=le[le.length-1])==null?void 0:Ke.toCode)||void 0,time:ve.retDepartureTime||Te((st=le[0])==null?void 0:st.departISO),dateStr:u.returnDate,flightNo:ve.retFlightNo||((gt=le[0])==null?void 0:gt.flightNo)}):null,"vols"],...De,[p("reservation:summary.rowRoom"),be("rooms")&&u.comboLabel?`${u.comboLabel}${u.viewMk&&u.viewMk!=="Vue ville"?" · "+u.viewMk:""}${u.viewMd&&u.viewMd!=="Vue ville"?" · "+u.viewMd:""}${u.comboShared?" â "+p("reservation:rooms.sharedReserveShort5"):""}`:null,"rooms"],[p("reservation:summary.rowVisa"),be("visa")&&u.visaLabel?u.visaLabel:null,"visa"],[p("reservation:summary.rowOptions"),be("options")?(u.optionLabels||[]).length?u.optionLabels.map(he=>`⢠${he}`).join(` 402`):p("reservation:summary.none"):null,"options"]];return e.jsxs("aside",{className:`flex flex-col gap-3 lg:self-start ${N}`,children:[e.jsxs("button",{onClick:()=>U(!C),className:"flex w-full items-center justify-between gap-3 rounded-2xl border-2 border-red-brand/45 bg-white px-4 py-3 text-left shadow-soft lg:hidden",children:[e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block text-[10.5px] font-bold uppercase tracking-[0.16em] text-red-brand",children:p("reservation:summary.almostFinal")}),e.jsxs("span",{className:"mt-0.5 flex items-baseline gap-1.5",children:[e.jsx("span",{className:"font-display text-[1.5rem] leading-none text-navy",children:de>0?se(de,$):"â"}),e.jsx("span",{className:"text-[12px] text-ink-mute",children:p("reservation:summary.perPerson")})]})]}),e.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 rounded-full bg-red-brand px-3 py-1.5 text-[11.5px] font-bold text-white",children:[p(C?"reservation:summary.close":"reservation:summary.showRecap")," ",e.jsx(h,{name:"arrow",className:`h-3.5 w-3.5 transition-transform ${C?"-rotate-90":"rotate-90"}`})]})]}),e.jsxs("div",{className:`${C?"":"hidden"} overflow-hidden rounded-2xl border-2 border-red-brand/45 bg-white shadow-lift lg:block`,children:[e.jsx("div",{className:"p-2.5",children:e.jsx("div",{className:"relative h-36 overflow-hidden rounded-xl sm:h-40",children:e.jsx("img",{src:s||"/signature/sig-06.jpeg",alt:"La Kaaba illuminée au cÅur de la Grande Mosquée de La Mecque",loading:"lazy",className:"absolute inset-0 h-full w-full object-cover object-center"})})}),e.jsx("div",{className:"bg-red-brand px-4 py-1.5 text-center text-[10.5px] font-bold uppercase tracking-[0.16em] text-white",children:p("reservation:summary.almostFinal")}),e.jsxs("div",{className:"px-4 py-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[(()=>{const he=l?"combine":a?"world":"omra";return e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[11px] font-bold uppercase tracking-wider text-white",style:{backgroundColor:ga(he)},children:[e.jsx("span",{className:"h-2 w-2 rounded-full bg-white/90"})," ",a||Z]})})(),e.jsx("span",{className:"inline-flex items-center rounded-full bg-red-brand px-2.5 py-1 text-[11px] font-bold uppercase tracking-wider text-white",children:k})]}),e.jsxs("div",{className:"mt-2.5 flex items-end gap-2",children:[e.jsx("span",{className:"font-display text-[12px] font-bold uppercase tracking-[0.16em] text-gold-deep",children:p("reservation:summary.from")}),de>0?e.jsx(Jr,{n:de,cur:$,className:"text-[2.6rem] leading-[0.85]"}):e.jsx("span",{className:"font-display text-[2.6rem] leading-[0.85] text-navy",children:"â"}),e.jsx("span",{className:"mb-1 text-[13px] font-medium text-ink-mute",children:p("reservation:summary.perPerson")})]}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-x-3 gap-y-1.5 text-[12.5px] font-semibold text-ink-soft",children:["reservation:summary.featVisa","reservation:summary.featVols","reservation:summary.featTransfers","reservation:summary.featHotels","reservation:summary.featVisits","reservation:summary.featGuide"].filter(he=>!(i&&he==="reservation:summary.featVisa")).map(he=>e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",p(he)]},he))}),e.jsxs("p",{className:"mt-3 text-[12px] text-ink-mute",children:[p("reservation:summary.estimation",{count:z}),Y.babies>0?p("reservation:summary.ofWhichBabies",{count:Y.babies}):""," · ",ye>0?e.jsx(Jr,{n:ye,cur:$,className:"text-[1.05rem] font-bold"}):e.jsx("strong",{className:"font-display text-[1.05rem] text-navy",children:"â"})]})]}),e.jsxs("button",{type:"button",onClick:()=>j(he=>!he),className:`flex w-full items-center justify-between gap-2 border-y-2 border-ink/10 px-4 py-3 text-[11.5px] font-bold uppercase tracking-wider text-navy transition-colors ${x?"bg-cream-100 hover:bg-cream-200":"bg-[var(--accent)]/15 hover:bg-[var(--accent)]/25"}`,children:[e.jsxs("span",{children:[p("reservation:summary.yourChoices"),x?p("reservation:summary.clickToEdit"):""]}),x?e.jsxs("span",{className:"flex items-center gap-1 text-[10px] normal-case text-ink-mute",children:[p("reservation:summary.hide")," ",e.jsx(h,{name:"chevron",className:"h-3.5 w-3.5"})]}):e.jsxs("span",{className:"flex items-center gap-1.5 rounded-full bg-[var(--accent)] px-2.5 py-1 text-[11px] font-bold normal-case text-ink shadow-soft",children:[p("reservation:summary.showDetail")," ",e.jsx(h,{name:"chevron",className:"h-3.5 w-3.5 -rotate-90"})]})]}),x&&Ue&&e.jsx("div",{className:"border-b border-ink/8 bg-cream-100/70 px-4 py-3",children:e.jsxs("p",{className:"flex gap-1.5 text-[12.5px] leading-relaxed text-ink",children:[e.jsx(h,{name:"sparkle",className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-gold-deep"}),e.jsxs("span",{children:[e.jsxs("strong",{className:"font-bold text-navy",children:[a||Z," ",p("reservation:summary.daysNights",{days:u.stay,nights:We})]}),p("reservation:summary.fromDate"),e.jsx("span",{className:"capitalize",children:Gs(Ze,pe)}),p("reservation:summary.toDate"),e.jsx("span",{className:"capitalize",children:Gs(O,pe)}),u.tierLabel?e.jsxs(e.Fragment,{children:[p("reservation:summary.inCategory"),e.jsx("strong",{className:"font-bold text-navy",children:u.tierLabel})]}):null,u.airline?e.jsxs(e.Fragment,{children:[p("reservation:summary.flightWith"),e.jsx("strong",{className:"font-bold text-navy",children:u.airline})]}):null]})]})}
402),x&&e.jsx("div",{className:"divide-y-[3px] divide-ink/15",children:J.map(([he,Xe,F])=>{const ke=F===R[_+1];return e.jsxs("button",{onClick:()=>n(F),className:`block w-full px-4 py-4 text-left transition-colors ${ke?"bg-[var(--accent)]/12 hover:bg-[var(--accent)]/20":"hover:bg-cream-100"}`,children:[e.jsxs("span",{className:"mb-2 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[14px] font-extrabold uppercase tracking-wide text-navy",children:he}),ke?e.jsxs("span",{className:"flex shrink-0 items-center gap-1 rounded-full bg-[var(--accent)] px-2.5 py-1 text-[10.5px] font-bold text-ink",children:[p("reservation:summary.choose")," ",e.jsx(h,{name:"arrow",className:"h-3 w-3"})]}):e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 shrink-0 text-ink-mute"})]}),Xe?typeof Xe=="string"?e.jsx("span",{className:"block whitespace-pre-line text-[13px] font-medium leading-relaxed text-ink",children:Xe}):e.jsx("span",{className:"block text-[13px] font-medium leading-relaxed text-ink",children:Xe}):e.jsx("span",{className:`block text-[12.5px] leading-snug ${ke?"font-bold text-navy":"italic text-ink-mute"}`,children:p(ke?"reservation:summary.chooseNow":"reservation:summary.toChoose")})]},he)})})]}),R[_+1]&&!(o==="vols"&&!u.flightId)&&e.jsxs("div",{className:"rounded-2xl border-2 border-red-brand/45 bg-white p-3 shadow-soft",children:[e.jsxs("button",{onClick:()=>n(R[_+1]),className:"flex w-full items-center justify-center gap-2 rounded-full bg-red-brand px-5 py-3.5 text-center text-[15px] font-bold leading-snug text-white transition-colors hover:bg-red-deep",children:[e.jsxs("span",{children:[p("reservation:summary.continue")," · ",{hotels:p("reservation:stepper.hotels"),rooms:p("reservation:stepper.rooms"),visa:p("reservation:stepper.visa"),options:p("reservation:stepper.options"),recap:p("reservation:summary.recap")}[R[_+1]],R[_+1]==="rooms"&&u.tierLabel?" "+Ks(String(u.tierLabel)):""]})," ",e.jsx(h,{name:"arrow",className:"h-4 w-4 shrink-0"})]}),e.jsxs("p",{className:"mt-2 flex items-center justify-center gap-2 text-center text-[11.5px] text-ink-mute",children:[e.jsx(h,{name:"shield",className:"h-3.5 w-3.5 text-navy"})," ",p("reservation:summary.flexiblePayment")]})]}),e.jsxs("div",{className:"overflow-hidden rounded-2xl border border-ink/8 bg-white shadow-soft",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 bg-cream-100 px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{name:"users",className:"h-4 w-4 text-navy"}),e.jsx("h3",{className:"font-display text-[1.1rem] text-ink",children:p("reservation:summary.yourTravelers")})]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"rounded-full bg-navy px-2.5 py-1 text-[11px] font-bold text-cream-100",children:p("reservation:summary.persons",{n:z})}),e.jsxs("button",{type:"button",onClick:()=>L(he=>!he),"aria-expanded":I,className:"flex items-center gap-1 text-[12.5px] font-semibold text-navy hover:underline",children:[p(I?"reservation:summary.hide":"reservation:summary.see")," ",e.jsx(h,{name:"chevron",className:`h-3.5 w-3.5 transition-transform ${I?"-rotate-180":""}`})]})]})]}),I&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-3 divide-x divide-ink/8 border-t border-ink/8",children:[[p("reservation:summary.adults"),Y.adults,p("reservation:summary.adultsAge")],[p("reservation:summary.children"),Y.children,p("reservation:summary.childrenAge")],[p("reservation:summary.babies"),Y.babies,p("reservation:summary.babiesAge")]].map(([he,Xe,F])=>e.jsxs("div",{className:"px-2 py-3.5 text-center",children:[e.jsx("span",{className:"block font-display text-[1.7rem] leading-none text-navy",children:Xe}),e.jsx("span",{className:"mt-1 block text-[12px] font-semibold text-ink",children:he}),e.jsx("span",{className:"block text-[10px] text-ink-mute",children:F})]},he))}),e.jsxs("div",{className:"flex items-center justify-between gap-2 px-4 py-2.5",children:[e.jsx("p",{className:"text-[12px] text-ink-mute",children:p("reservation:summary.fromYourSearch")}),e.jsxs(Cn,{to:`${d||"/omra/votre-omra"}#top`,className:"flex items-center gap-1 text-[12.5px] font-semibold text-navy hover:underline",children:[p("reservation:summary.edit")," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5"})]})]})]})]})]})}function kc({eyebrow:t,title:n,sub:o,formule:a}){return e.jsxs("div",{className:"mb-7",children:[e.jsx(Ci,{children:t}),e.jsxs("h1",{className:"mt-3 flex flex-wrap items-baseline gap-x-3 gap-y-2",children:[e.jsx(In,{as:"span",className:"text-[clamp(1.7rem,3.6vw,2.6rem)] leading-[1.05]",children:n}),a&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 self-center rounded-full border border-[var(--accent)]/45 bg-[var(--accent)]/10 px-3 py-1 text-[12.5px] font-bold uppercase tracking-[0.1em] text-gold-deep",children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5"})," ",a]})]}),o&&e.jsx("p",{className:"mt-3 max-w-xl text-[15.5px] leading-relaxed text-ink-soft",children:o})]})}function la({className:t="h-5 w-5"}
402){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,"aria-hidden":"true",children:e.jsx("path",{d:"M17.5 14.4c-.3-.2-1.7-.8-2-.9-.3-.1-.5-.2-.7.2-.2.3-.7.9-.9 1.1-.2.2-.3.2-.6.1-.3-.2-1.2-.5-2.3-1.4-.9-.8-1.4-1.7-1.6-2-.2-.3 0-.5.1-.6.1-.1.3-.3.4-.5.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5-.1-.2-.7-1.6-.9-2.2-.2-.6-.5-.5-.7-.5h-.6c-.2 0-.5.1-.8.4-.3.3-1 1-1 2.5s1.1 2.9 1.2 3.1c.2.2 2.1 3.3 5.2 4.6.7.3 1.3.5 1.7.6.7.2 1.4.2 1.9.1.6-.1 1.7-.7 2-1.4.2-.7.2-1.2.2-1.4-.1-.1-.3-.2-.6-.4zM12 2C6.5 2 2 6.5 2 12c0 1.8.5 3.5 1.3 4.9L2 22l5.3-1.4c1.4.8 3 1.2 4.7 1.2 5.5 0 10-4.5 10-10S17.5 2 12 2zm0 18c-1.5 0-3-.4-4.2-1.2l-.3-.2-3.1.8.8-3-.2-.3C4.4 15 4 13.5 4 12c0-4.4 3.6-8 8-8s8 3.6 8 8-3.6 8-8 8z"})})}function Vi({onBack:t,onNext:n,nextLabel:o,disabled:a=!1,disabledHint:s}){const{t:i}=it();return e.jsxs("div",{className:"mt-9 flex items-center justify-between gap-3",children:[t?e.jsxs(ts,{variant:"ghost",onClick:t,className:"px-3 py-2.5",children:[e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})," ",i("reservation:common.back")]}):e.jsx("span",{}),e.jsxs("span",{className:"flex min-w-0 flex-wrap items-center justify-end gap-x-3 gap-y-1",children:[a&&s&&e.jsx("span",{className:"text-[12.5px] font-semibold text-ink-mute",children:s}),e.jsxs(ts,{variant:"red",onClick:a?void 0:n,disabled:a,"aria-disabled":a||void 0,className:`px-7 py-3.5 text-[15px] ${a?"cursor-not-allowed opacity-45":""}`,children:[o??i("reservation:common.continue")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]})]})}const wc={packageId:null,flightId:null,dateISO:null,returnISO:null,date:null,returnDate:null,stay:null,nightsMakkah:null,nightsMedina:null,flightBase:null,airline:null,airlineCode:null,airlineLogo:null,flightType:null,flightDest:null,flightRetFrom:null,flightRetTo:null,flightBaggage:null,flightClass:null,flightNature:null,tier:null,tierLabel:null,tierMinPrice:null,hotelMkName:null,hotelMdName:null,starsMk:5,starsMd:5,room:null,combo:null,comboLabel:null,comboTotal:null,pension:null,kaaba:!1,visa:null,visaPerPerson:0,visaLabel:null,options:[],optionsTotal:0,optionLabels:[],handicapCount:0,currency:"EUR",infantPrice:0};function os(t){return(t==null?void 0:t._fam)==="combine"?"combine":(t==null?void 0:t._fam)==="world"||t!=null&&t.offerId?"world":"omra"}function ga(t){return t==="combine"?"#B0740F":t==="world"?"#2B5FA8":"#1B7A4C"}function Sc(t,n="Omra"){const o=os(t),a=String((t==null?void 0:t.destLabel)||"").trim();return o==="combine"?a?`Omra combiné ${a}`:"Omra combiné":o==="world"?a||(t==null?void 0:t.offerName)||n:"Omra"}function qi(t){const n=new Date;return n.setHours(0,0,0,0),at(t)>=n}function Gi(t,n){const o=(t[n]||[]).filter(a=>a.availableSeats!=null);return!o.length||Math.max(...o.map(a=>a.availableSeats))>0}function ln(t,n){const o=n.filter(qi);return o.find(a=>Gi(t,a))||o[0]||n[0]||null}function Mc({dayLabel:t,isSel:n,slides:o,coup:a,ev:s,avail:i,mode:l,onClick:d}){const{t:c}=it(),[m,g]=b.useState(0);b.useEffect(()=>{if(o.length<2)return;const x=setInterval(()=>g(j=>(j+1)%o.length),2800);return()=>clearInterval(x)},[o.length]);const N=o[Math.min(m,o.length-1)]||o[0],u=N.fam==="omra",p=String(N.cur||"").toUpperCase()==="MAD";return e.jsxs("button",{onClick:d,className:`group absolute inset-0 flex flex-col justify-end overflow-hidden text-left transition-all duration-200 ${n?"z-10 ring-2 ring-inset ring-[var(--accent)]":"hover:z-10 hover:ring-2 hover:ring-inset hover:ring-[var(--accent)]/80"}`,children:[e.jsx("img",{src:N.img,alt:`Départ ${N.title}`,loading:"lazy",className:"absolute inset-0 h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.06]"}),e.jsx("span",{className:"absolute inset-0 bg-ink/30"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-t from-ink/92 via-ink/45 to-transparent"}),u&&e.jsx("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{boxShadow:`inset 0 0 0 4px ${N.famColor}`}}),e.jsxs("span",{className:"absolute inset-x-2 top-2 z-[1] flex items-start justify-between gap-2",children:[e.jsx("span",{className:`shrink-0 rounded-full px-2 py-0.5 font-display text-[12px] font-bold shadow-md ${n?"bg-[var(--accent)] text-ink ring-2 ring-white/70":"bg-white/95 text-navy"}`,children:t}),e.jsx("span",{className:`min-w-0 rounded-full px-2.5 py-1 text-right font-bold leading-tight text-white shadow-sm ring-1 ring-white/30 transition-colors ${u?"text-[14px] font-extrabold":"text-[11px]"}`,style:{backgroundColor:N.famColor},children:N.title})]}),e.jsxs("span",{className:"relative z-10 space-y-1 bg-gradient-to-t from-ink/80 via-ink/40 to-transparent p-2 pt-6 text-white",children:[(a||s||i||l)&&e.jsxs("span",{className:"flex flex-wrap items-center gap-1",children:[a&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-rose-500 px-1.5 py-0.5 text-[8.5px] font-bold uppercase leading-none tracking-wide text-white shadow-sm",children:[e.jsx(h,{name:"heart",className:"h-2.5 w-2.5 fill-current"})," ",c("reservation:vols.favorite")]}),s&&e.jsxs("span",{className:`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[8.5px] font-bold leading-none shadow-sm ${s.cls}`,children:[e.jsx(h,{name:"star",className:"h-2.5 w-2.5 fill-current"})," ",s.label]}),i&&e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[8.5px] font-bold uppercase leading-none tracking-wide shadow-sm ${i.cls}`,children:[e.jsx(h,{name:i.id==="complet"?"shield":"clock",className:"h-2.5 w-2.5"})," ",i.label]}),l&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-white/90 px-1.5 py-0.5 text-[8.5px] font-bold leading-none text-navy shadow-sm",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${l.dot}`})," ",l.label]})]}),e.jsxs("span",{className:p?"block":"flex items-end justify-between gap-1.5",children:[e.jsx("span",{className:"block whitespace-nowrap text-[13px] font-bold text-white drop-shadow",children:c("reservation:common.days",{n:N.days})}),e.jsxs("span",{className:p?"mt-0.5 flex items-baseline gap-1 whitespace-nowrap leading-none":"shrink-0 text-right leading-none",children:[e.jsx("span",{className:"block text-[7.5px] font-bold uppercase tracking-wider text-white/65",children:c("reservation:summary.from")}),e.jsx("span",{className:`font-display font-bold drop-shadow-md ${u&&!p?"text-[1.4rem]":"text-[1.05rem]"}`,children:N.price!=null?se(N.price,N.cur):"â"})]})]}),o.length>1&&e.jsx("span",{className:"flex items-center gap-1",children:o.map((x,j)=>e.jsx("span",{className:`h-1 rounded-full transition-all ${j===m?"w-3 bg-white":"w-1.5 bg-white/50"}`},j))})]})]})}function Cc({active:t,dirty:n=!1,className:o=""}){const{t:a}=it(),s=Va(),i=qa(),l=[{key:"omra",label:a("reservation:family.omra"),to:"/omra/reservation?step=vols"},{key:"combine",label:a("reservation:family.combine"),to:"/omra-combinee"},{key:"world",label:a("reservation:family.world"),to:"/voyages-monde"}],d=c=>{n&&!window.confirm(a("reservation:family.leaveWarn"))||s(i(c))};return e.jsx("div",{role:"group","aria-label":a("reservation:family.aria"),className:`inline-flex flex-wrap items-center gap-1 rounded-full border border-ink/10 bg-cream-100 p-1 ${o}`,children:l.map(c=>{const m=c.key===t;return e.jsx("button",{type:"button","aria-pressed":m,onClick:()=>{m||d(c.to)},className:`rounded-full px-3.5 py-1.5 text-[13px] font-semibold transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-navy ${m?"bg-navy text-white shadow-soft":"text-ink-soft hover:text-navy"}`,children:c.label},c.key)})})}const Ic=[[/antalya|fethiye|istanbul|bodrum|izmir|cappadoce|turquie|turkey/i,"Turquie"],[/[ée]gypte|caire|cairo|charm|sharm|hurghada|louxor|luxor|assouan|aswan|\bnil\b/i,"Ãgypte"],[/zanzibar|tanzani/i,"Tanzanie"],[/tashkent|samarcande|samarkand|boukhara|bukhara|khiva|ouzb[ée]k/i,"Ouzbékistan"],[/mai\s*chau|hano[iï]|vietnam|hoi\s*an|ho\s*chi\s*minh|saigon|ha\s*long|halong/i,"Vietnam"],[/bali|jakarta|indon[ée]si|lombok|ubud/i,"Indonésie"],[/maldiv|no
402onu|atoll/i,"Maldives"],[/maurice|mauritius/i,"Ãle Maurice"],[/dubai|dubaï|[ée]mirat|abu\s*dhabi/i,"Ãmirats arabes unis"],[/oman|mascate|muscat/i,"Oman"],[/malais|kuala\s*lumpur|langkawi/i,"Malaisie"],[/tha[iï]land|phuket|bangkok|krabi/i,"Thaïlande"],[/maroc|marrakech|agadir|casablanca|f[eè]s\b|rabat/i,"Maroc"],[/jordan|petra|amman|jerash|palestin|quds|qods/i,"Jordanie"],[/kenya|nairobi|safari|masa[iï]|mombasa/i,"Kenya"],[/sri\s*lanka|colombo/i,"Sri Lanka"]],$c=t=>{const n=`${t.label} ${t.slug}`;for(const[o,a]of Ic)if(o.test(n))return a;return t.label};function ar({items:t,sel:n,onToggle:o,onToggleAll:a,placeholder:s,allLabel:i,color:l="#2B5FA8"}){const{t:d}=it(),[c,m]=b.useState(!1),g=b.useRef(null);b.useEffect(()=>{const p=x=>{g.current&&!g.current.contains(x.target)&&m(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const N=t.length>0&&t.every(p=>n.has(p.value)),u=N?i:n.size?d("reservation:family.selectedCount",{count:n.size}):s;return e.jsxs("span",{ref:g,className:"relative inline-flex",children:[e.jsxs("button",{type:"button",onClick:()=>m(p=>!p),"aria-expanded":c,className:"inline-flex items-center gap-1.5 rounded-md border-2 bg-white py-1 pl-3 pr-2 text-[14px] font-bold outline-none transition-colors",style:{borderColor:`${l}73`,color:l},children:[u,e.jsx(h,{name:"chevron",className:`h-4 w-4 transition-transform ${c?"-rotate-180":""}`})]}),c&&e.jsxs("div",{className:"absolute left-0 top-full z-30 mt-1 w-60 rounded-lg border-2 border-navy/15 bg-white p-1.5 text-left shadow-lift",children:[e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded-md border-b border-ink/8 px-2 py-2 text-[13.5px] font-bold hover:bg-ink/5",style:{color:l},children:[e.jsx("input",{type:"checkbox",checked:N,onChange:p=>a(p.target.checked),className:"h-4 w-4",style:{accentColor:l}})," ",i]}),e.jsxs("div",{className:"mt-1 max-h-64 overflow-y-auto pr-0.5 [scrollbar-width:thin] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-ink/20 [&::-webkit-scrollbar-track]:bg-transparent",children:[t.length===0&&e.jsx("p",{className:"px-2 py-2 text-[13px] text-ink-mute",children:"â"}),t.map(p=>e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-[13.5px] font-semibold text-ink-soft hover:bg-cream-100",children:[e.jsx("input",{type:"checkbox",checked:n.has(p.value),onChange:()=>o(p.value),className:"h-4 w-4",style:{accentColor:l}})," ",p.label]},p.value))]})]})]})}function gr({b:t,update:n,go:o,calData:a,depImg:s,tripLabel:i,combine:l}){var pt,Tt;const{t:d}=it(),c=a??(l==null?void 0:l.calData),m=i??(l==null?void 0:l.tripLabel),g=s??(l==null?void 0:l.depImg),N=m||Ts.omra.label,u=kn(!c&&!l),p=c??(l?null:u.data),x=c?!1:l?!l.calError:u.isLoading,j=c?!1:l?!!l.calError:u.isError,C=u.refetch,U=g||Ki,I=Ys(t),L=(p==null?void 0:p.months)||[],me=Va(),Z=qa(),V=!l&&!m,k=!l&&!!m,[R,_]=b.useState(!0),[be,Y]=b.useState(!1),[Q,z]=b.useState(new Set),[fe,K]=b.useState(!1),E=lr("combine",V),B=b.useMemo(()=>{if(!V||!E.data)return{};const v=E.data.offers||[],T=ir(v,d("reservation:family.combine")).byDate,G=new Map;for(const xe of v)G.set(`${xe.packageId}|${xe.flightId}|${xe.dateISO}`,xe);for(const xe of Object.keys(T))for(const ae of T[xe]){ae._fam="combine";const _e=G.get(`${ae.packageId}|${ae.flightId}|${ae.dateISO}`);_e&&(ae.groupId=_e.groupId,ae.destinationSlug=_e.destinationSlug)}return T},[V,E.data]),M=V&&fe,q=!V||R,ce=lr("tourisme",V||k||!!l),te=wi(V||k||!!l),$=b.useMemo(()=>{const v=new Map;for(const T of te.data||[])(T==null?void 0:T.id)!=null&&(T!=null&&T.name)&&v.set(T.id,T.name);return v},[te.data]),W=(()=>{var T;const v=new Set;return(((T=ce.data)==null?void 0:T.destinations)||[]).filter(G=>G.slug&&!v.has(G.slug)?(v.add(G.slug),!0):!1)})(),ye=(()=>{const v=new Map;for(const T of W){const G=$c(T);(v.get(G)||v.set(G,[]).get(G)).push(T.slug)}return Array.from(v.entries()).map(([T,G])=>({country:T,slugs:G})).sort((T,G)=>T.country.localeCompare(G.country,"fr"))})(),de=b.useMemo(()=>{if(!V&&!l||!Q.size||!ce.data)return{};const v=(ce.data.offers||[]).filter(xe=>(xe==null?void 0:xe.dateISO)&&Q.has(xe.destinationSlug)),T=ir(v,d("reservation:family.world")).byDate,G=new Map;for(const xe of v)G.set(`${xe.packageId}|${xe.flightId}|${xe.dateISO}`,xe);for(const xe of Object.keys(T))for(const ae of T[xe]){ae._fam="world";const _e=G.get(`${ae.packageId}|${ae.flightId}|${ae.dateISO}`);_e&&(ae.groupId=_e.groupId,ae.destinationSlug=_e.destinationSlug)}return T},[V,Q,ce.data]),ot=b.useMemo(()=>{const v=new Set,T=G=>{for(const xe of Object.values(G||{}))for(const ae of xe){const _e=ae==null?void 0:ae._fam;ae!=null&&ae.groupId&&(_e==="combine"||_e==="world")&&v.add(ae.groupId)}};return T(p==null?void 0:p.byDate),T(B),T(de),Array.from(v).sort((G,xe)=>G-xe)},[p,B,de]),Ge=Pl({queries:ot.map(v=>({queryKey:["voyage-group-itin",v],queryFn:()=>fetch(`${ka()}/api/booking-groups/public-voyages/${v}`).then(T=>T.ok?T.json():null),staleTime:300*1e3,enabled:!!v}))}),Be=b.useMemo(()=>{const v=new Map;return Ge.forEach((T,G)=>{const xe=ot[G],ae=T.data;if(xe&&ae){const _e=(ae.tripCities||[]).map(Qe=>({cityName:String(Qe.cityName||"").trim(),nights:Number(Qe.nights)||0})).filter(Qe=>Qe.cityName);v.set(xe,{name:ae.name||void 0,cities:_e})}}),v},[ot,Ge.map(v=>v.dataUpdatedAt).join(",")]),ve=(V||!!l)&&Q.size>0,[le,Te]=b.useState(0),[ue,$e]=b.useState(null),[oe,Ve]=b.useState(null),[y,A]=b.useState(null),[je,
402Se]=b.useState("omra"),[We,Ze]=b.useState(!1),[O,pe]=b.useState({}),Ue=b.useRef(null),H=b.useRef(null),Ae=b.useRef(!1),De=b.useRef(!1),J=b.useRef(!1);b.useEffect(()=>{if(!p||!L.length||Ae.current)return;Ae.current=!0;const v=bo();let T=null;try{T=localStorage.getItem("omra_search_stamp")}catch{}const G=!!T&&T!==t.searchStamp,xe=yo(p.cities,v.city),ae=Object.keys(p.byDate).filter(mt=>(p.byDate[mt]||[]).length>0).sort(),_e=mt=>!mt||mt==="Toutes les villes"||ae.some(Pt=>(p.byDate[Pt]||[]).some(At=>At.originCity===mt));let Qe=G?xe||"Toutes les villes":xe&&(!t.city||t.city==="Toutes les villes")?xe:t.city||"Toutes les villes";_e(Qe)||(Qe="Toutes les villes"),G?n({...wc,city:Qe,searchStamp:T}):Qe&&Qe!=="Toutes les villes"&&(!t.city||t.city==="Toutes les villes")&&n({city:Qe});const kt=ae.filter(mt=>Qe==="Toutes les villes"||(p.byDate[mt]||[]).some(Pt=>Pt.originCity===Qe)),es=mt=>{if(mt<0||mt>=L.length)return!1;const{y:Pt,m:At}=L[mt];return kt.some(Ut=>{const Vt=at(Ut);return Vt.getFullYear()===Pt&&Vt.getMonth()===At})},Nt=mt=>{if(mt<0||mt>=L.length)return!1;const{y:Pt,m:At}=L[mt];return kt.some(Ut=>{const Vt=at(Ut);return Vt.getFullYear()===Pt&&Vt.getMonth()===At&&qi(Ut)&&Gi(p.byDate,Ut)})},ft=(()=>{try{return new URLSearchParams(window.location.search).get("date")}catch{return null}})(),qt=!!ft&&(p.byDate[ft]||[]).length>0;let Ft=-1;if(qt){const mt=at(ft);Ft=L.findIndex(Pt=>Pt.y===mt.getFullYear()&&Pt.m===mt.getMonth())}if(Ft<0&&!G&&t.dateISO){const mt=at(t.dateISO);Ft=L.findIndex(Pt=>Pt.y===mt.getFullYear()&&Pt.m===mt.getMonth())}if(Ft<0&&v.monthISO){const[mt,Pt]=v.monthISO.split("-").map(Number);Ft=L.findIndex(At=>At.y===mt&&At.m===Pt-1)}if(Ft<0&&!G&&typeof t.monthIdx=="number"&&(Ft=Math.min(t.monthIdx,L.length-1)),!qt&&(!es(Ft)||!t.dateISO&&!Nt(Ft))){const mt=ln(p.byDate,kt);if(mt){const Pt=at(mt),At=L.findIndex(Ut=>Ut.y===Pt.getFullYear()&&Ut.m===Pt.getMonth());At>=0&&(Ft=At)}}const wt=Math.max(0,Ft);Te(wt);const Yt=L[wt],Qt=Yt?kt.filter(mt=>{const Pt=at(mt);return Pt.getFullYear()===Yt.y&&Pt.getMonth()===Yt.m}).sort():[],cs=qt?ft:t.dateISO&&Qt.includes(t.dateISO)?t.dateISO:ln(p.byDate,Qt);cs&&(De.current=!0,Ve(cs),Se(os((p.byDate[cs]||[])[0])))},[p]);const ie=()=>{let v=0;const T=()=>{if(H.current){H.current.scrollIntoView({behavior:"smooth",block:"start"});return}v++<8&&requestAnimationFrame(T)};requestAnimationFrame(T)};b.useEffect(()=>{if(oe){if(!J.current){J.current=!0,De.current=!1;return}De.current||ie(),De.current=!1}},[oe]),b.useEffect(()=>{if(!p)return;let v=null,T=null;if(oe){const G=_e=>!t.city||t.city==="Toutes les villes"||_e.originCity===t.city,ae=(p.byDate[oe]||[]).filter(_e=>G(_e)&&(y==null||_e.totalNights===y)).reduce((_e,Qe)=>((_e==null?void 0:_e.price)??1/0)<=(Qe.price??1/0)?_e:Qe,null);v=(ae==null?void 0:ae.price)??null,T=(ae==null?void 0:ae.currency)??null}(t.previewBase!==v||t.previewCur!==T)&&n({previewBase:v,previewCur:T})},[oe,y,p,t.city]);const Ee=()=>{Ue.current&&window.scrollTo({top:Ue.current.getBoundingClientRect().top+window.scrollY-80,behavior:"smooth"})},Re=b.useRef(()=>{}),Je=`${R}|${fe}|${Array.from(Q).sort().join(",")}|${le}`,Me=b.useRef(Je);if(b.useEffect(()=>{Me.current!==Je&&(Me.current=Je,Re.current())},[Je]),x)return e.jsx(js,{label:d("reservation:vols.loading")});if(j||!p)return e.jsx(Ns,{message:d("reservation:vols.loadError"),onRetry:C});if(!L.length)return e.jsx(Ns,{message:d("reservation:vols.noDepartures"),onRetry:C});const ct=d(l?"reservation:vols.calIntro.combine":i?"reservation:vols.calIntro.world":M||ve?"reservation:vols.calIntro.mixed":"reservation:vols.calIntro.omra"),Ke=l?"combine":i?"world":"omra",st=v=>me(Z(v)),gt=[{key:"omra",label:d("reservation:family.omra"),color:"#1B7A4C",to:"/omra/reservation?step=vols"},{key:"combine",label:d("reservation:family.combine"),color:"#B0740F",to:"/omra-combinee"},{key:"world",label:d("reservation:family.world"),color:"#2B5FA8",to:"/voyages-monde"}],he=k?((pt=W.find(v=>v.label===m))==null?void 0:pt.slug)??"":"",Xe=v=>e.jsxs("label",{onClick:T=>{T.preventDefault(),st(v.to)},className:"inline-flex cursor-pointer items-center gap-2 text-[15px] font-bold text-ink-soft transition-colors hover:text-navy",children:[e.jsx("input",{type:"checkbox",checked:!1,readOnly:!0,className:"pointer-events-none h-5 w-5",style:{accentColor:v.color}})," ",v.label]},v.key),F=e.jsxs("span",{className:"relative inline-flex items-center",children:[e.jsxs("select",{value:he,"aria-label":d("reservation:family.worldPick"),onChange:v=>{const T=v.target.value;T==="__all__"?st("/voyages-monde"):T&&T!==he&&st(`/voyages/${T}`)},className:"cursor-pointer appearance-none rounded-md border-2 bg-white py-1 pl-3 pr-7 text-[14px] font-bold text-[#2B5FA8] outline-none transition-colors hover:bg-[#2B5FA8]/5",style:{borderColor:"rgba(43,95,168,0.45)"},children:[e.jsx("option",{value:"",children:d("reservation:family.worldPick")}),W.map(v=>e.jsx("option",{value:v.slug,children:v.label},v.slug)),e.jsx("option",{value:"__all__",children:d("reservation:family.worldAll")})]}),e.jsx(h,{name:"chevron",className:"pointer-events-none absolute right-2 h-4 w-4 text-[#2B5FA8]"})]}),ke=k||!m?null:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"hidden h-6
402w-px shrink-0 bg-ink/15 sm:block","aria-hidden":"true"}),e.jsxs("button",{type:"button",onClick:()=>st("/omra-combinee"),className:"inline-flex shrink-0 items-center gap-1.5 rounded-full border-2 border-[#B0740F]/40 bg-[#B0740F]/[0.06] px-3 py-1 text-[13px] font-bold text-[#B0740F] transition-colors hover:border-[#B0740F] hover:bg-[#B0740F]/10",children:[e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 rotate-180"})," ",d("reservation:family.showAll")]})]}),dt=v=>!t.city||t.city==="Toutes les villes"||v.originCity===t.city,D=L[Math.min(le,Math.max(0,L.length-1))],Ne=v=>{if(!D)return!0;const T=at(v);return T.getFullYear()===D.y&&T.getMonth()===D.m},qe=v=>Object.entries(v).filter(([T])=>Ne(T)).flatMap(([,T])=>T),Pe=Array.from(new Set([...q?qe(p.byDate):[],...M?qe(B):[],...ve?qe(de):[]].filter(dt).map(v=>v.days))).sort((v,T)=>v-T),et=e.jsxs("div",{role:"group","aria-label":d("reservation:family.aria"),className:"flex max-w-full flex-wrap items-center justify-center gap-x-4 gap-y-2 whitespace-nowrap rounded-2xl border-2 border-navy/25 bg-cream-100/70 px-6 py-4 shadow-soft ring-1 ring-navy/5 lg:flex-nowrap",children:[e.jsx("span",{className:"shrink-0 text-[14px] font-extrabold uppercase tracking-[0.16em] text-navy",children:d("reservation:family.show")}),gt.map(v=>v.key==="world"?k?e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-2",children:[e.jsxs("label",{className:"inline-flex items-center gap-2 text-[15px] font-bold text-navy",children:[e.jsx("input",{type:"checkbox",checked:!0,readOnly:!0,className:"h-5 w-5",style:{accentColor:v.color}})," ",v.label]}),F]},v.key):e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-2",children:[e.jsxs("label",{className:"inline-flex cursor-pointer items-center gap-2 text-[15px] font-bold text-ink-soft transition-colors hover:text-navy",children:[e.jsx("input",{type:"checkbox",checked:be,onChange:T=>{Y(T.target.checked),T.target.checked||z(new Set)},className:"h-5 w-5",style:{accentColor:v.color}})," ",v.label]}),be&&e.jsx(ar,{items:ye.map(T=>({value:T.country,label:T.country})),sel:new Set(ye.filter(T=>T.slugs.every(G=>Q.has(G))).map(T=>T.country)),onToggle:T=>{const G=ye.find(ae=>ae.country===T);if(!G)return;const xe=G.slugs.every(ae=>Q.has(ae));z(ae=>{const _e=new Set(ae);return G.slugs.forEach(Qe=>xe?_e.delete(Qe):_e.add(Qe)),_e})},onToggleAll:T=>z(T?new Set(W.map(G=>G.slug)):new Set),placeholder:d("reservation:family.worldPick"),allLabel:d("reservation:family.worldSelectAll"),color:"#2B5FA8"})]},v.key):v.key==="omra"?V?e.jsxs("label",{className:"inline-flex shrink-0 cursor-pointer items-center gap-2 text-[15px] font-bold text-navy transition-colors",children:[e.jsx("input",{type:"checkbox",checked:R,onChange:T=>_(T.target.checked),className:"h-5 w-5",style:{accentColor:v.color}})," ",v.label]},v.key):Xe(v):v.key==="combine"?V?e.jsxs("label",{className:"inline-flex shrink-0 cursor-pointer items-center gap-2 text-[15px] font-bold text-ink-soft transition-colors hover:text-navy",children:[e.jsx("input",{type:"checkbox",checked:fe,onChange:T=>K(T.target.checked),className:"h-5 w-5",style:{accentColor:v.color}})," ",v.label]},v.key):v.key===Ke?e.jsxs("label",{className:"inline-flex shrink-0 items-center gap-2 text-[15px] font-bold text-navy",children:[e.jsx("input",{type:"checkbox",checked:!0,readOnly:!0,className:"h-5 w-5",style:{accentColor:v.color}})," ",v.label]},v.key):Xe(v):null),e.jsxs("span",{className:"hidden shrink-0 text-[12px] italic text-ink-mute lg:inline",children:["â ",d("reservation:family.hint")]}),ke,V&&Pe.length>1&&e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-2",children:[e.jsx("span",{className:"hidden h-6 w-px shrink-0 bg-ink/15 sm:block","aria-hidden":"true"}),e.jsx("span",{className:"text-[14px] font-extrabold uppercase tracking-[0.16em] text-navy",children:d("reservation:vols.durations")}),e.jsx(ar,{items:Pe.map(v=>({value:String(v),label:d("reservation:vols.daysShort",{days:v})})),sel:ue===null?new Set(Pe.map(v=>String(v))):new Set(Pe.filter(v=>ue.includes(v)).map(v=>String(v))),onToggle:v=>{S(Number(v)),Ve(null)},onToggleAll:v=>{$e(v?null:[]),Ve(null)},placeholder:d("reservation:vols.durations"),allLabel:d("reservation:vols.allDurations"),color:"#12345B"})]})]}),Ye=!V&&m?e.jsxs("p",{className:"max-w-full truncate text-[14px] font-bold text-navy",children:[e.jsx("span",{className:"mr-1.5 inline-block h-2 w-2 rounded-full align-middle",style:{backgroundColor:ga(l?"combine":"world")}}),m]}):null,lt=v=>!t.city||t.city==="Toutes les villes"||v.originCity===t.city,He=v=>!ue||ue.includes(v.days),Fe=v=>[...q?p.byDate[v]||[]:[],...M?B[v]||[]:[],...ve?de[v]||[]:[]],xt=v=>Fe(v).filter(T=>lt(T)&&He(T)),Mt=v=>(p.byDate[v]||[]).filter(T=>lt(T)&&He(T)),ks=(v,T)=>{const G=[...p.byDate[v]||[],...B[v]||[],...de[v]||[]],xe=G.filter(ae=>os(ae)===T&<(ae)&&He(ae));return xe.length||V?xe:G.filter(ae=>lt(ae)&&He(ae))},Lt=v=>{const T=xt(v);return T.length?T[0]:null},ms=(v,T=null)=>{const xe=xt(v).filter(ae=>T==null||ae.totalNights===T)[0];re(v,T,xe?os(xe):"omra")},as=(v,T)=>os(v)==="omra"?`Omra ${T.getDate()} ${pn(T.getMonth()+1,"short")}`:Sc(v,N),ps=v=>{const T=Math.max(0,Math.min(L.length-1,v));Te(T);const G=L[T],xe=G?Object.keys(p.byDate).filter(_e=>{const Qe=at(_e);return Qe.getFullYear()===G.y&&Qe.getMonth()===G.m&&Mt(_e).length>0}).sort():[],ae=ln(p.byDate,xe);De.current=!0,Ve(ae||null),Se(os((p.byDate[ae||""]||[])[0])),A(null)},Ps=()=>Array.from(new Set([...Object.keys(p.byDate),...M?Object.keys(B):[]])).filter(v=>xt(v).length>0).sort();Re.current=()=>{const v=oe?xt(oe):[];if(v.length>0){(je==="omra"&&!q||je==="combine"&&!M)&&Se(os(v[0]));return}const T=L[le],G=T?Ps().filter(ae=>{const _e=at(ae);return _e.getFullYear()===T.y&&_e.getMonth()===T.m}):Ps(),xe=ln(p.byDate,G)||G[0]||null;De.current=!0,Ve(xe),xe&&Se(os(xt(xe)[0]))};const rs=L[Math.min(le,L.length-1)],Qs=(new Date(rs.y,rs.m,1).getDay()+6)%7,zt=new Date(rs.y,rs.m+1,0).getDate(),ns=[];for(let v=0;v<Qs;v++)ns.push(null);for(let v=1;v<=zt;v++)ns.push(new Date(rs.y,rs.m,v));const Xt=ns.filter(v=>v&&xt(qs(v)).length>0),ws=Xt.reduce((v,T)=>{var xe;const G=((xe=Lt(qs(T)))==null?void 0:xe.price)??null;return G!=null&&(v==null||G<v)?G:v},null),gs=v=>{const T=Lt(qs(v));return T&&ws!=null&&T.price===ws?To[0]:null},Ds=v=>{const T=xt(qs(v)).filter(xe=>xe.availableSeats!=null);if(!T.length)return null;const G=Math.max(...T.map(xe=>xe.availableSeats));return G<=0?{id:"complet",label:d("reservation:flightCard.soldOut"),cls:"bg-rose-600 text-white",dot:"bg-white"}:G<=5?{id:"last",label:d("reservation:flightCard.lastSeats"),cls:"bg-rose-100 text-rose-700",dot:"bg-rose-500"}:G<=20?{id:"soon",label:d("reservation:flightCard.almostFull"),cls:"bg-amber-100 text-amber-700",dot:"bg-
402amber-500"}:null},S=v=>$e(T=>{const G=T??p.durations.slice();return G.includes(v)?G.filter(xe=>xe!==v):[...G,v]}),P=2,ne=(v,T="omra")=>{const G=ks(v,T)[0]||Lt(v);if(!G)return[];const xe=at(v),ae=new Date;ae.setHours(0,0,0,0),ae.setDate(ae.getDate()+P);const _e=L[Math.min(le,Math.max(0,L.length-1))],Qe=Nt=>!_e||Nt.getFullYear()===_e.y&&Nt.getMonth()===_e.m,kt=Array.from(new Set([...Object.keys(p.byDate),...M?Object.keys(B):[],...ve?Object.keys(de):[]])).sort(),es=[];for(const Nt of kt){if(Nt===v)continue;const ft=at(Nt);if(ft<ae||!Qe(ft))continue;const qt=xt(Nt).filter(wt=>wt.originCity===G.originCity)[0];if(!qt)continue;const Ft=Math.round((ft.getTime()-xe.getTime())/864e5);es.push({offer:qt,dir:Ft<0?-1:1,gapDays:Ft})}return es},re=(v,T=null,G="omra")=>{if(J.current=!0,De.current=!1,Ve(v),A(T),Se(G),ie(),G==="omra"){const xe=[...Mt(v),...ne(v,"omra").map(ae=>ae.offer)].map(ae=>ae.flightId).filter(Boolean);xe.length&&Go(xe).then(ae=>pe(_e=>({..._e,...ae}))).catch(()=>{})}},we=v=>{const T=G=>(G||[]).map(xe=>`${(xe.fromCode||xe.fromCity||"").toUpperCase()}-${(xe.toCode||xe.toCity||"").toUpperCase()}`).join(">");return[v.originCity,v.dateISO,v.returnISO,v.airlineName,T(v.outbound),T(v.inbound)].join("§")},Ce=v=>{const T=new Map,G=[];for(const xe of v){const ae=xe.outbound&&xe.outbound.length?we(xe):`__nodetails__${G.length}`;T.has(ae)||(T.set(ae,[]),G.push(ae)),T.get(ae).push(xe)}return G.map(xe=>{const ae=T.get(xe);if(ae.length===1)return ae[0];const _e=ae.reduce((Nt,ft)=>(ft.price??1/0)<(Nt.price??1/0)?ft:Nt,ae[0]),Qe=ae.some(Nt=>Nt.availableSeats!=null),kt=ae.reduce((Nt,ft)=>Nt+(ft.availableSeats??0),0),es=ae.reduce((Nt,ft)=>Nt+(ft.totalSeats??0),0);return{..._e,availableSeats:Qe?kt:null,totalSeats:es||_e.totalSeats,_seatsAdded:!0}})},tt=()=>{if(!oe)return[];const v=ks(oe,je);return Ce(y==null?v:v.filter(T=>T.totalNights===y))},yt=v=>{const T=v==null?void 0:v.groupId,G=Be.get(T),xe=(G==null?void 0:G.name)||$.get(T),ae=G==null?void 0:G.cities;return!xe&&!(ae&&ae.length)?v:{...v,...xe?{offerName:xe}:{},...ae&&ae.length?{_cityNights:ae}:{}}},Ct=v=>{const T=v.destinationSlug,G=v.groupId;if(os(v)==="combine"){me(Z(T?`/omra-combinee/${T}#programme`:"/omra-combinee"));return}const ae=v.offerId;me(Z(T?`/voyages/${T}#programme`:ae?`/voyages?offer=${ae}#programme`:G?`/voyages/reserver?offer=${G}`:"/voyages-monde"))},Et=v=>{const T=os(v),G=l?"combine":k?"world":"omra";if(T==="combine"&&G!=="combine"){me(Z(`/omra-combinee/reserver?pkg=${v.packageId}&flight=${v.flightId}&date=${v.dateISO}&step=hotels`));return}if(T==="world"&&G!=="world"){const ae=v.groupId;me(Z(ae?`/voyages/reserver?offer=${ae}&flight=${v.flightId}&date=${v.dateISO}&step=hotels`:`/voyages/${v.destinationSlug}`));return}if(t.flightId&&t.flightId!==v.flightId&&(t.tier||t.room||t.comboTotal||t.pension)&&!window.confirm(d("reservation:vols.changeFlightConfirm")))return;const xe=v.inbound[v.inbound.length-1];n({packageId:v.packageId,flightId:v.flightId,offerId:v.offerId??void 0,city:v.originCity,dateISO:v.dateISO,returnISO:v.returnISO,date:Bt(at(v.dateISO)),returnDate:Bt(at(v.returnISO)),stay:v.days,nightsMakkah:v.nightsInMecca,nightsMedina:v.nightsInMedina,flightBase:v.price,currency:v.currency||"EUR",infantPrice:v.infantPrice||0,airline:v.airlineName,airlineCode:v.airlineCode,airlineLogo:v.airlineLogo||null,flightType:v.outbound.length>1?`${d("reservation:flightCard.stops",{count:v.outbound.length-1})}${v.outbound[0].toCity||v.outbound[0].toCode?" · "+(v.outbound[0].toCity||v.outbound[0].toCode):""}`:d("reservation:flightCard.direct"),flightDest:v.outbound.length&&v.outbound[v.outbound.length-1].toCity||v.destinationCity,flightRetFrom:v.inbound.length&&(v.inbound[0].fromCity||v.inbound[0].fromCode)||null,flightRetTo:xe?xe.toCity||xe.toCode||v.originCity:null,flightBaggage:v.baggage,flightClass:v.travelClass,flightNature:v.nature,monthIdx:(()=>{const ae=at(v.dateISO),_e=L.findIndex(Qe=>Qe.y===ae.getFullYear()&&Qe.m===ae.getMonth());return _e>=0?_e:le})(),tripType:"omra",tier:null,tierLabel:null,tierMinPrice:null,hotelMkName:null,hotelMdName:null,room:null,combo:null,comboLabel:null,comboTotal:null,pension:null,kaaba:!1}),xn(v),Ve(null),o("hotels")},vt=e.jsxs("div",{className:"flex items-center justify-between gap-2 border-b-2 border-[var(--accent)]/45 bg-cream-100 px-4 py-3 sm:gap-3",children:[e.jsxs("button",{onClick:()=>ps(le-1),disabled:le===0,"aria-label":d("reservation:vols.prevMonth"),className:"flex shrink-0 items-center gap-1 rounded-full bg-[#B0740F] px-2.5 py-2 text-[12.5px] sm:px-3.5 font-semibold text-white shadow-soft transition-colors hover:bg-[#946010] disabled:opacity-30 disabled:hover:bg-[#B0740F]",children:[e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})," ",e.jsx("span",{className:"hidden sm:inline",children:le>0?String(L[le-1].label).split(" ")[0]:d("reservation:common.previous")})]}),e.jsx("div",{className:"flex flex-1 flex-wrap items-center justify-center gap-x-3 gap-y-1",children:e.jsxs("span",{className:"flex flex-wrap items-center justify-center gap-x-1.5 gap-y-0.5 text-center",children:[e.jsxs("span",{className:"flex items-center gap-x-1.5 text-[13px] font-medium text-ink-soft",children:[d("reservation:vols.departureFrom"),e.jsxs("span",{className:"relative inline-flex items-center",children:[e.jsxs("select",{value:t.city||"Toutes les villes",onChange:v=>{n({city:v.target.value}),Ve(null)},className:"cursor-pointer appearance-none rounded-md border-2 border-navy bg-white py-1 pl-3 pr-9 text-[13.5px] font-bold text-navy shadow-sm outline-none transition-colors hover:bg-cream-50 focus:border-navy",children:[e.jsx("option",{value:"Toutes les villes",children:d("reservation:vols.allCities")}),p.cities.map(v=>e.jsx("option",{children:v},v))]}),e.jsx("span",{className:"pointer-events-none absolute right-1.5 grid h-5 w-5 place-items-center",children:e.jsx(h,{name:"chevron",className:"h-3.5 w-3.5 text-navy"})})]}),d("reservation:vols.inMonth")]}),e.jsx("span",{className:"font-display text-[1.45rem] font-bold leading-none text-navy sm:text-[1.7rem]",children:rs.label})]})}),e.jsxs("button",{onClick:()=>ps(le+1),disabled:le===L.length-1,"aria-label":d("reservation:vols.nextMonth"),className:"flex shrink-0 items-center gap-1 rounded-full bg-[#B0740F] px-2.5 py-2 text-[12.5px] sm:px-3.5 font-semibold text-white shadow-soft transition-colors hover:bg-[#946010] disabled:opacity-30 disabled:hover:bg-[#B0740F]",children:[e.jsx("span",{className:"hidden sm:inline",children:le<L.length-1?String(L[le+1].label).split(" ")[0]:d("reservation:common.next")})," ",e.jsx(h,{name:"chevron",className:"h-4 w-4 -rotate-90"})]})]}),jt=e.jsxs("div",{className:"mt-4 hidden gap-3 rounded-2xl border border-ink/8 bg-white p-4 text-[12px] shadow-soft sm:grid-cols-2 lg:grid lg:grid-cols-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 font-bold uppercase tracking-wider text-gold-deep",children:d("reservation:vols.tripTypes")}),e.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1.5",children:gi.map(v=>e.jsxs("span",{className:"flex items-center gap-1.5 text-ink-soft",children:[e.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${v.dot}`})," ",v.label]},v.id))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 font-bold uppercase tracking-wider text-gold-deep",children:d("reservation:vols.schoolHolidays")}),e.jsx("div",{className:"flex flex-wrap gap-x-3 gap-y-1.5",children:Object.entries(Ln).map(([v,T])=>e.jsxs("span",{className:"flex items-center gap-1.5 text-ink-soft",children:[e.jsx("span",{className:`h-2.5 w-2.5 rounded-sm ${T.dot}`})," ",T.label]},v))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 font-bold uppercase tracking-wider text-gold-deep",children:d("reservation:vols.markers")}),e.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1.5 text-ink-soft",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5 fill-amber-400 text-amber-400"})," ",d("reservation:vols.islamicEvent")]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-[var(--accent)]"})," ",d("reservation:vols.availableDeparture")]})]})]})]});return e.jsxs("div",{children:[e.jsx("div",{ref:Ue}),e.jsxs("div",{className:"hidden overflow-hidden rounded-3xl border border-ink/8 bg-white shadow-soft lg:block",children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 border-b border-ink/8 px-5 pb-4 pt-4 text-center",children:[e.jsx("p",{className:"max-w-2xl text-[13px] leading-snug text-ink-soft",children:ct}),et,Ye]}),vt,e.jsx("div",{className:"grid grid-cols-7 border-b border-ink/10 bg-white text-center text-[12px] font-bold text-ink",children:["reservation:vols.mon","reservation:vols.tue","reservation:vols.wed","reservation:vols.thu","reservation:vols.fri","reservation:vols.sat","reservation:vols.sun"].map((v,T)=>e.jsx("div",{className:"py-2.5",children:d(v)},T))}),e.jsx("div",{className:"grid grid-cols-7 gap-1 bg-ink/10",children:ns.map((v,T)=>{if(!v)return e.jsx("div",{className:"min-h-[132px] bg-white"},T);const G=qs(v),xe=Gn(v),ae=No(v),_e=oe===G,Qe=Lt(G),kt=!!Qe,es=kt?gs(v):null,Nt=kt?Ds(v):null;return e.jsx("div",{className:`relative flex min-h-[132px] flex-col ${kt?"":"p-1.5"} ${ae&&!kt?"bg-amber-50/60":kt?"bg-cream-100":"bg-cream-100/40"}`,children:kt&&Qe?(()=>
402{const ft=new Set,qt=xt(G).filter(wt=>{const Yt=`${os(wt)}|${wt.destLabel||""}|${wt.totalNights}`;return ft.has(Yt)?!1:(ft.add(Yt),!0)}).sort((wt,Yt)=>(wt.price??1/0)-(Yt.price??1/0)).map(wt=>{const Yt=wt.days??wt.totalNights+1;return{title:`${as(wt,v)}${/ramadan/i.test(Rs(v)||"")?" · Ramadan":""}`,fam:os(wt),famColor:ga(os(wt)),price:wt.price??Qe.price,cur:wt.currency??Qe.currency,nights:Math.max(0,Yt-1),days:Yt,img:Yi(wt)||U(v)}}),Ft=/palestine/i.test(xt(G).map(wt=>`${wt.destLabel||""} ${as(wt,v)}`).join(" "));return e.jsx(Mc,{dayLabel:Bt(v),isSel:_e,slides:qt,coup:Ft,ev:xe,avail:Nt,mode:es,onClick:()=>ms(G)})})():e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"flex items-start justify-between",children:[e.jsx("span",{className:`grid h-6 w-6 place-items-center rounded-full text-[12px] font-bold ${xe?"bg-amber-400 text-white ring-2 ring-amber-200":"text-ink-mute"}`,children:v.getDate()}),Rs(v)&&e.jsx("span",{className:"text-right text-[8.5px] leading-tight text-ink-mute",children:Rs(v)})]}),ae&&e.jsx("span",{className:"mt-1 flex gap-0.5",children:ae.map(ft=>e.jsx("span",{className:`h-1 flex-1 rounded-full ${Ln[ft].dot}`,title:Ln[ft].label},ft))}),xe&&e.jsxs("span",{className:`mt-1 inline-flex items-center gap-0.5 self-start rounded-full px-1.5 py-0.5 text-[8.5px] font-bold leading-tight ${xe.cls}`,children:[e.jsx(h,{name:"star",className:"h-2.5 w-2.5 fill-current"})," ",xe.label]})]})},T)})})]}),e.jsxs("div",{className:"mb-4 rounded-2xl border-2 border-[var(--accent)] bg-white px-4 py-4 lg:hidden",children:[e.jsxs("p",{className:"flex items-center gap-2 text-[14px] font-bold text-ink",children:[e.jsx(h,{name:"cal",className:"h-5 w-5 shrink-0 text-[var(--accent)]"})," ",d("reservation:vols.chooseDates")]}),e.jsxs("p",{className:"mt-2 text-[13px] leading-relaxed text-ink-soft",children:[d("reservation:vols.mobileHelp1a"),e.jsx("b",{className:"text-ink",children:d("reservation:vols.mobileHelp1b")}),d("reservation:vols.mobileHelp1c"),e.jsx("b",{className:"text-ink",children:d("reservation:vols.mobileHelp1d")}),d("reservation:vols.mobileHelp1e")]}),e.jsxs("p",{className:"mt-1.5 text-[13px] leading-relaxed text-ink-soft",children:[d("reservation:vols.mobileHelp2a"),e.jsx("b",{className:"text-ink",children:d("reservation:vols.mobileHelp2b")}),d("reservation:vols.mobileHelp2c"),e.jsx("b",{className:"text-ink",children:d("reservation:vols.mobileHelp2d")}),d("reservation:vols.mobileHelp2e"),e.jsx("b",{className:"text-ink",children:d("reservation:vols.mobileHelp2f")}),d("reservation:vols.mobileHelp2g")]})]}),e.jsxs("div",{className:"overflow-hidden rounded-3xl border border-ink/8 bg-white shadow-soft lg:hidden",children:[e.jsxs("div",{className:"flex flex-col items-center gap-2.5 border-b border-ink/8 px-4 pb-3 pt-3.5 text-center",children:[e.jsx("p",{className:"text-[12.5px] leading-snug text-ink-soft",children:ct}),et,Ye]}),vt,e.jsxs("div",{className:"divide-y divide-ink/8",children:[Xt.length===0&&e.jsx("p",{className:"p-6 text-center text-[14px] text-ink-mute",children:d("reservation:vols.noDepartureFilters")}),Xt.flatMap(v=>{const T=qs(v),G=Array.from(new Set(xt(T).map(xe=>xe.totalNights))).sort((xe,ae)=>xe-ae);return(G.length?G:[null]).map(xe=>({date:v,iso:T,dur:xe}))}).map(({date:v,iso:T,dur:G})=>{const xe=Ts.omra,ae=xt(T),_e=G==null?ae:ae.filter(Qt=>Qt.totalNights===G);if(!_e.length)return null;const Qe=_e.reduce((Qt,cs)=>(Qt.price??1/0)<=(cs.price??1/0)?Qt:cs),kt=Gn(v),es=gs(v),Nt=Ds(v),ft=Array.from(new Map(_e.map(Qt=>[Qt.airlineName,Qt.airlineCode])).entries()).slice(0,4),qt=Qe.days??(G!=null?G+1:0),Ft=Math.max(0,qt-1),wt=at(Qe.returnISO),Yt=U(v);return e.jsxs("button",{onClick:()=>ms(T,G),className:"block w-full text-left transition-colors hover:bg-cream-100",children:[e.jsxs("span",{className:"relative block h-36 w-full overflow-hidden",children:[e.jsx("img",{src:Yt,alt:xe.label,loading:"lazy",className:"h-full w-full object-cover"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-t from-ink/90 via-ink/45 to-ink/10"}),e.jsxs("span",{className:"absolute left-3 top-3 inline-flex max-w-[92%] items-center gap-1.5 rounded-full px-3 py-1 text-[12.5px] font-bold leading-tight text-white shadow ring-1 ring-white/30 backdrop-blur-sm",style:{backgroundColor:ga(os(Qe))},children:[as(Qe,v),/ramadan/i.test(Rs(v)||"")?" · Ramadan":""," · ",Qe.originCity]}),kt&&e.jsx("span",{className:`absolute right-3 top-3 rounded-full px-2 py-0.5 text-[10px] font-bold ${kt.cls}`,children:kt.label}),e.jsxs("span",{className:"absolute bottom-2.5 left-3 right-3 flex items-end justify-between gap-2 text-white",children:[e.jsxs("span",{className:"min-w-0",children:[e.jsxs("span",{className:"flex items-center gap-1.5 font-display text-[1.05rem] leading-tight drop-shadow",children:[Xs(v)," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 text-gold-light"})," ",Xs(wt)]}),Rs(v)&&e.jsx("span",{className:"block text-[11px] text-white/80",children:Rs(v)}),G!=null&&e.jsx("span",{className:"mt-1 inline-flex items-center rounded-full bg-white/20 px-2 py-0.5 text-[10px] font-bold text-white backdrop-blur-sm",children:d("reservation:vols.nightsDotDays",{nights:Ft,days:qt})})]}),e.jsxs("span",{className:"shrink-0 text-right",children:[e.jsx("span",{className:"block text-[9px] font-bold uppercase tracking-wider text-gold-light",children:d("reservation:vols.startingFrom")}),e.jsx("span",{className:`block font-display leading-none drop-shadow ${Qe!=null&&Qe.destLabel?"text-[1.2rem]":"text-[1.5rem]"}`,children:Qe.price!=null?se(Qe.price,Qe.currency):"â"})]})]})]}),e.jsxs("span",{className:"flex items-center justify-between gap-2 px-3.5 py-2.5",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-1.5",children:[Nt&&e.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide ${Nt.cls}
402`,children:[e.jsx(h,{name:Nt.id==="complet"?"shield":"clock",className:"h-2.5 w-2.5"})," ",Nt.label]}),es&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10.5px] font-bold",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${es.dot}`}),e.jsx("span",{className:es.cls,children:es.label})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cream-100 px-2 py-0.5 text-[10px] font-bold text-navy",children:[e.jsx(h,{name:"plane",className:"h-3 w-3 text-gold-deep"}),d("reservation:vols.flightCount",{count:_e.length})]}),ft.map(([Qt,cs])=>e.jsx(ea,{name:Qt,code:cs,className:"h-5 w-6 rounded text-[8px]"},String(Qt)))]}),e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-0.5 rounded-full bg-[#C12000] px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide text-white",children:[d("reservation:vols.seeFlights")," ",e.jsx(h,{name:"arrow",className:"h-2.5 w-2.5"})]})]})]},`${T}-${G??"all"}`)})]})]}),jt,oe&&(je!=="omra"||q)&&e.jsx("div",{ref:H,className:"mt-4 overflow-hidden rounded-2xl border-2 border-[var(--accent)]/40 scroll-mt-24",children:e.jsx(Ec,{offers:tt().map(v=>yt(!v._seatsAdded&&O[v.flightId]!=null?{...v,availableSeats:O[v.flightId]}:v)),nearby:ne(oe,je).map(v=>{const T=yt(O[v.offer.flightId]!=null?{...v.offer,availableSeats:O[v.offer.flightId]}:v.offer);return T===v.offer?v:{...v,offer:T}}),dateISO:oe,type:m?{...Ts.omra,label:N}:Ts.omra,city:t.city,seatsNeeded:I.n,depImg:g,onSelect:v=>Et(v),onProgram:v=>Ct(v),onBackToTop:Ee,onClose:()=>Ve(null),onPrev:()=>ps(le-1),onNext:()=>ps(le+1),prevDisabled:le<=0,nextDisabled:le>=L.length-1,prevMonth:le>0?String(L[le-1].label).split(" ")[0]:null,nextMonth:le<L.length-1?String(L[le+1].label).split(" ")[0]:null,curMonth:(Tt=L[Math.min(le,L.length-1)])==null?void 0:Tt.label})}),We&&e.jsx(Oc,{data:p,city:t.city||"Toutes les villes",stays:ue,onClose:()=>Ze(!1),onPick:v=>{Ze(!1);const T=at(v),G=L.findIndex(xe=>xe.m===T.getMonth()&&xe.y===T.getFullYear());G>=0&&Te(G),ms(v)}})]})}function Oc({data:t,city:n,stays:o,onClose:a,onPick:s}){const{t:i}=it(),[l,d]=b.useState(!1),c=u=>!n||n==="Toutes les villes"||u.originCity===n,m=u=>!o||o.includes(u.days),g=t.months.map(u=>{let p=[];for(const[x,j]of Object.entries(t.byDate)){const C=at(x);if(C.getMonth()!==u.m||C.getFullYear()!==u.y)continue;const U=j.filter(I=>c(I)&&m(I));U.length&&p.push({iso:x,offer:U[0]})}return p=p.sort((x,j)=>l?(x.offer.price??1/0)-(j.offer.price??1/0):x.iso.localeCompare(j.iso)),{label:u.label,list:p}}).filter(u=>u.list.length),N=g.reduce((u,p)=>u+p.list.length,0);return e.jsxs("div",{className:"fixed inset-0 z-[60] flex items-end justify-center sm:items-center sm:p-5",children:[e.jsx("div",{className:"absolute inset-0 bg-ink/70 backdrop-blur-sm",onClick:a}),e.jsxs("div",{className:"relative flex max-h-[92vh] w-full max-w-[720px] flex-col overflow-hidden rounded-t-[28px] bg-cream-100 shadow-lift sm:rounded-[28px]",children:[e.jsxs("div",{className:"flex items-center justify-between bg-navy-deep px-6 py-4 text-cream-100",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"flex items-center gap-2 font-display text-[1.4rem]",children:[e.jsx(h,{name:"globe",className:"h-5 w-5 text-gold-light"})," ",i("reservation:vols.globalView")]}),e.jsx("p",{className:"text-[12.5px] text-cream-100/75",children:i("reservation:vols.departuresFromCity",{n:N,city:n})})]}),e.jsx("button",{onClick:a,"aria-label":i("reservation:common.close"),className:"grid h-8 w-8 place-items-center rounded-full text-cream-100/80 hover:bg-white/10",children:e.jsx(h,{name:"plus",className:"h-5 w-5 rotate-45"})})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-ink/8 bg-white px-5 py-3",children:[e.jsx("div",{className:"flex flex-wrap gap-1.5",children:gi.map(u=>e.jsxs("span",{className:`flex items-center gap-1.5 rounded-full border border-transparent px-2.5 py-1 text-[12px] font-semibold ${u.badge}`,children:[e.jsx("span",{className:`h-2 w-2 rounded-full ${u.dot}`})," ",u.label]},u.id))}),e.jsxs("button",{onClick:()=>d(u=>!u),className:`flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12.5px] font-bold transition-colors ${l?"bg-[var(--accent)] text-ink":"bg-cream-200 text-navy"}`,children:[e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 rotate-90"})," ",i(l?"reservation:vols.sortedCheapest":"reservation:vols.sortByPrice")]})]}),e.jsxs("div",{className:"no-sb overflow-auto p-4",children:[g.length===0&&e.jsx("p",{className:"py-10 text-center text-[14px] text-ink-mute",children:i("reservation:vols.noDepartureFiltersShort")}),g.map(u=>e.jsxs("div",{className:"mb-5",children:[e.jsxs("div",{className:"sticky top-0 z-[1] -mx-4 mb-2.5 flex items-center gap-2 bg-cream-100/95 px-4 py-1.5 backdrop-blur",children:[e.jsxs("span",{className:"flex items-center gap-2 rounded-full bg-navy px-3 py-1 text-cream-100 shadow-soft",children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 text-gold-light"}),e.jsx("h4",{className:"font-display text-[1rem] uppercase tracking-wide",children:u.label}),e.jsx("span",{className:"rounded-full bg-gold-light px-1.5 py-0.5 text-[11px] font-bold text-navy",children:u.list.length})]}),e.jsx("span",{className:"h-px flex-1 bg-ink/10"})]}),e.jsx("div",{className:"grid gap-2.5 sm:grid-cols-2",children:u.list.map(({iso:p,offer:x},j)=>{const C=at(p),U=Ts.omra,I=Gn(C);return e.jsxs("button",{onClick:()=>s(p),className:"flex items-center gap-3 rounded-2xl border border-ink/10 bg-white p-3 text-left transition-all hover:border-navy hover:shadow-soft",children:[e.jsx("span",{className:`grid h-11 w-11 shrink-0 place-items-center rounded-xl ${U.badge}`,children:e.jsx(h,{name:U.icon,className:"h-5 w-5"})}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`h-2 w-2 rounded-full ${U.dot}`}),e.jsxs("span",{className:"text-[10.5px] font-bold uppercase tracking-wider text-ink-soft",children:[U.label," · ",x.originCity]})]}),e.jsxs("span",{className:"block truncate text-[13.5px] font-bold text-ink",children:[Xs(C)," â ",Xs(at(x.returnISO))]}),e.jsxs("span",{className:"mt-1 flex flex-wrap items-center gap-1.5",children:[e.jsx("span",{className:"rounded-full border border-[var(--accent)] bg-[var(--accent)]/15 px-2 py-0.5 text-[11px] font-bold text-navy",children:i("reservation:vols.nightsSlashDays",{nights:Math.max(0,x.days-1),days:x.days})}),e.jsxs("span",{className:"text-[10.5px] text-ink-mute",children:[Rs(C),Rs(C)&&I?" · ":"",I&&e.jsx("span",{className:"font-semibold text-amber-700",children:I.label})]})]})]}),e.jsxs("span",{className:"shrink-0 text-right",children:[e.jsx("span",{className:"block text-[9.5px] font-semibold uppercase tracking-wide text-ink-mute",children:i("reservation:vols.startingFrom")}),e.jsx("span",{className:"block font-display text-[1.25rem] leading-none text-navy",children:x.price!=null?se(x.price,x.currency):"â"}),e.jsx("span",{className:"text-[10px] font-bold text-gold-deep",children:i("reservation:summary.choose")})]})]},j)})})]},u.label))]})]})]})}function ea({name:t,code:n,logo:o,className:a="h-8 w-8 text-[11px]"}){const s=fi(t,n),[i,l]=b.useState(!0),d=String(s.code||"").trim().toUpperCase(),c=o||(/^[A-Z0-9]{2,3}$/.test(d)?`https://images.kiwi.com/airlines/64/${d}.png`:null);return c&&i?e.jsx("span",{className:`grid shrink-0 place-items-center overflow-hidden rounded-lg bg-white ring-1 ring-ink/10 ${a}`,children:e.jsx("img",{src:c,alt:t||"",loading:"lazy",className:"h-full w-full object-contain p-0.5",onError:()=>l(!1)})}):e.jsx("span",{className:`grid shrink-0 place-items-center rounded-lg font-display font-bold text-white ${a}`,style:{background:s.bg},children:s.code})}function Tc({name:t,code:n,baggage:o,travelClass:a,onClose:s}){const{t:i}
402=it(),l=fi(t,n);return e.jsxs("div",{className:"fixed inset-0 z-[70] flex items-center justify-center p-5",onClick:s,children:[e.jsx("div",{className:"absolute inset-0 bg-ink/70 backdrop-blur-sm"}),e.jsxs("div",{className:"relative w-full max-w-[400px] overflow-hidden rounded-[24px] bg-cream-100 shadow-lift",onClick:d=>d.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 px-6 py-5 text-white",style:{background:l.bg},children:[e.jsx("span",{className:"grid h-12 w-12 place-items-center rounded-xl bg-white/15 font-display text-[1.1rem] font-bold",children:l.code}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-display text-[1.4rem] leading-tight",children:t}),e.jsx("p",{className:"text-[12px] text-white/80",children:i("reservation:flightCard.alliance",{alliance:l.alliance})})]}),e.jsx("button",{onClick:s,"aria-label":i("reservation:common.close"),className:"ml-auto grid h-8 w-8 place-items-center rounded-full text-white/80 hover:bg-white/15",children:e.jsx(h,{name:"plus",className:"h-5 w-5 rotate-45"})})]}),e.jsxs("div",{className:"p-6",children:[e.jsx("p",{className:"text-[14px] leading-relaxed text-ink-soft",children:l.about}),e.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-2 text-center",children:[a&&e.jsxs("div",{className:"rounded-xl bg-white p-3 shadow-soft",children:[e.jsx(h,{name:"star",className:"mx-auto h-4 w-4 fill-[var(--accent)] text-[var(--accent)]"}),e.jsx("p",{className:"mt-1 font-display text-[1.1rem] text-navy",children:a}),e.jsx("p",{className:"text-[10.5px] text-ink-mute",children:i("reservation:flightCard.travelClass")})]}),e.jsxs("div",{className:"rounded-xl bg-white p-3 shadow-soft",children:[e.jsx(h,{name:"check",className:"mx-auto h-4 w-4 text-navy"}),e.jsx("p",{className:"mt-1 font-display text-[1.1rem] text-navy",children:"Halal"}),e.jsx("p",{className:"text-[10.5px] text-ink-mute",children:i("reservation:flightCard.mealOnboard")})]}),e.jsxs("div",{className:`rounded-xl bg-white p-3 shadow-soft ${a?"":"col-span-2"}`,children:[e.jsx(h,{name:"shield",className:"mx-auto h-4 w-4 text-navy"}),e.jsx("p",{className:"mt-1 font-display text-[1.1rem] text-navy",children:i("reservation:flightCard.hold")}),e.jsx("p",{className:"text-[10.5px] text-ink-mute",children:o||i("reservation:flightCard.baggageIncluded")})]})]})]})]})]})}const Zr=["/signature/sig-07.jpeg","/signature/sig-08.jpeg","/signature/sig-09.jpeg","/signature/sig-10.jpeg","/signature/sig-11.jpeg","/signature/sig-12.jpeg","/signature/sig-13.jpeg","/signature/sig-14.jpeg","/signature/sig-15.jpeg","/signature/sig-16.jpeg","/signature/sig-17.jpeg","/signature/sig-18.jpeg","/signature/sig-46.jpeg","/signature/sig-48.jpeg","/signature/grand/grand-01.jpeg","/signature/grand/grand-03.jpeg","/signature/grand/grand-04.jpeg","/signature/grand/grand-05.jpeg","/signature/grand/grand-07.jpeg"],Ki=t=>Zr[(t.getDate()*7+t.getMonth()*3)%Zr.length],Pc=[[/égypt|egypt|caire|nil/i,"/images/dest-egypte.webp"],[/istanbul|turquie|antalya|fethiye/i,"/images/dest-istanbul.webp"],[/maldives/i,"/images/dest-maldives.webp"],[/zanzibar/i,"/images/dest-zanzibar.webp"],[/bali|indoné|mai\s*chau|tha[iï]land/i,"/images/dest-bali.webp"],[/quds|palestine|j[eé]rusalem|jordan/i,"/images/dest-quds.webp"]],Yi=t=>{if(!t||t._fam!=="combine"&&t._fam!=="world"&&!t.offerId)return null;const n=`${t.destinationSlug||""} ${t.destLabel||""} ${t.offerName||""}`;for(const[o,a]of Pc)if(o.test(n))return a;return null},Xr=({time:t,code:n,sub:o})=>e.jsxs("div",{className:"shrink-0 text-center",children:[e.jsx("p",{className:"font-sans text-[16px] font-bold leading-none text-ink",children:t||"â"}),e.jsx("p",{className:"text-[12px] font-bold text-ink",children:n}),o&&e.jsx("p",{className:"text-[10px] text-ink-mute",children:o})]}),Dc=({dur:t})=>e.jsxs("div",{className:"flex min-w-[18px] flex-1 flex-col items-center px-0.5 text-ink-mute",children:[e.jsx(h,{name:"plane",className:"h-3.5 w-3.5 text-navy"}),e.jsx("span",{className:"text-[10.5px] font-medium",children:t||""})]}),Lc=({mins:t})=>{const{t:n}=it();return e.jsx("span",{className:"shrink-0 rounded-full bg-amber-100 px-1.5 py-0.5 text-[10px] font-bold text-amber-700",children:t?Na(t):n("reservation:flightCard.layover")})},ei=({label:t,segs:n,firstSub:o})=>{const{t:a}=it();return e.jsxs("div",{className:`no-sb flex items-center gap-1.5 overflow-x-auto ${t===a("reservation:flightCard.legReturn")?"border-t border-ink/10 pt-2":""}`,children:[e.jsx("span",{className:"w-[52px] shrink-0 pr-1.5 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:t}),n.map((s,i)=>e.jsxs(us.Fragment,{children:[i>0&&e.jsx(Lc,{mins:bn(n[i-1].arrDate,n[i-1].arrTime,s.depDate,s.depTime)}),e.jsx(Xr,{time:ja(s.depTime),code:s.fromCode||s.fromCity,sub:i===0?o:void 0}),e.jsx(Dc,{dur:Na(bn(s.depDate,s.depTime,s.arrDate,s.arrTime))}
402),e.jsx(Xr,{time:ja(s.arrTime),code:s.toCode||s.toCity,sub:i===n.length-1?a("reservation:flightCard.arrival"):void 0})]},i))]})},ti=({label:t,segs:n,dateStr:o})=>{const{t:a}=it();return e.jsxs("div",{className:"rounded-xl border border-ink/8 bg-cream-100 p-3",children:[e.jsxs("p",{className:"mb-1.5 text-[10px] font-bold uppercase tracking-wider text-gold-deep",children:[t," · ",o]}),e.jsx("div",{className:"grid gap-2",children:n.map((s,i)=>e.jsxs(us.Fragment,{children:[i>0&&e.jsx("div",{className:"flex items-center justify-center",children:e.jsxs("span",{className:"rounded-full bg-amber-100 px-2 py-0.5 text-[9.5px] font-bold text-amber-700",children:[a("reservation:flightCard.layoverAt",{city:n[i-1].toCity||n[i-1].toCode}),(()=>{const l=bn(n[i-1].arrDate,n[i-1].arrTime,s.depDate,s.depTime);return l?` · ${Na(l)}`:""})()]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ea,{name:s.airlineName,className:"h-7 w-7 text-[10px]"}),e.jsxs("span",{className:"text-center",children:[e.jsx("span",{className:"block font-sans text-[1.05rem] font-semibold leading-none text-ink",children:ja(s.depTime)||"â"}),e.jsx("span",{className:"text-[10px] font-bold text-ink",children:s.fromCity||s.fromCode})]}),e.jsxs("span",{className:"flex flex-1 flex-col items-center text-[9px] text-ink-mute",children:[e.jsx(h,{name:"plane",className:"h-3 w-3 text-navy"})," ",Na(bn(s.depDate,s.depTime,s.arrDate,s.arrTime))]}),e.jsxs("span",{className:"text-center",children:[e.jsx("span",{className:"block font-sans text-[1.05rem] font-semibold leading-none text-ink",children:ja(s.arrTime)||"â"}),e.jsx("span",{className:"text-[10px] font-bold text-ink",children:s.toCity||s.toCode})]}),e.jsxs("span",{className:"ml-1 text-[10px] text-ink-mute",children:[s.airlineName,s.flightNumber?` · ${s.flightNumber}`:""]})]})]},i))})]})};function si({f:t,recommended:n,promo:o,badge:a,priceDelta:s,isOpen:i,onToggle:l,onSelect:d,onProgram:c,onAirline:m,seatsNeeded:g,depImg:N}){var Be;const{t:u}=it(),p=N||Ki,x=!(t.outbound&&t.outbound.length),j=at(t.dateISO),C=at(t.returnISO),U=((Be=t.outbound[t.outbound.length-1])==null?void 0:Be.toCity)||t.destinationCity||"Lieux Saints",I=t.outbound.length>1?t.outbound[0].toCity||t.outbound[0].toCode:null,L=I&&I!==U?I:null,me=Math.max(0,t.days-1),Z=j.getFullYear()!==C.getFullYear(),V=t.availableSeats!=null&&t.availableSeats<Math.max(1,g||1),k=t.availableSeats!=null&&t.availableSeats<=0,R=V&&!k,_=!V&&t.availableSeats!=null&&t.availableSeats>0&&(t.availableSeats<=20||t.totalSeats&&t.availableSeats/t.totalSeats<=.3),be=_&&t.availableSeats<=5,Y=u(be?"reservation:flightCard.lastSeats":"reservation:flightCard.almostFull"),Q=be?"bg-amber-50 text-amber-800 ring-1 ring-amber-500/40":"bg-amber-50 text-amber-700 ring-1 ring-amber-500/25",z="inline-flex items-center gap-1 rounded-[5px] bg-ink/[0.04] px-1.5 py-0.5 text-[10px] font-semibold text-ink-soft ring-1 ring-ink/10",fe="inline-flex items-center gap-1.5 rounded-[6px] bg-gold-light/20 px-2.5 py-1 text-[12.5px] font-bold text-navy ring-1 ring-gold-deep/35",K=!!t._seatsAdded,E=os(t),B=E==="world"||E==="combine",M=(()=>{const ve=Bs(t.originCity),le=new Set,Te=[];for(const ue of[...t.outbound||[],...t.inbound||[]]){const $e=Bs(ue.toCity||ue.toCode);$e&&$e!==ve&&!le.has($e)&&(le.add($e),Te.push({city:$e,date:ue.arrDate||null}))}return Te})(),q=M.map(ve=>ve.city),ce=(()=>{const ve=Array.isArray(t._cityNights)?t._cityNights:[];if(!ve.length)return[];const le=ue=>/m[eè]cque|makkah|mecca/i.test(ue)?0:/m[ée]dine|madin/i.test(ue)?1:2,Te=ue=>/^nile$/i.test(ue)?"Nil":Bs(ue);return[...ve].filter(ue=>ue.nights>0).sort((ue,$e)=>le(ue.cityName)-le($e.cityName)).map(ue=>({cityName:Te(ue.cityName),nights:ue.nights}))})(),te=(()=>{if(E!=="omra")return[];const ve={cityName:"La Mecque",nights:Number(t.nightsInMecca)||0},le={cityName:"Médine",nights:Number(t.nightsInMedina)||0};return(/m[ée]din/i.test(String(t.destinationCity||""))?[le,ve]:[ve,le]).filter(ue=>ue.nights>0)})(),$=ve=>e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-bold text-navy",children:[u("reservation:flightCard.tripStops")," "]}),ve.map((le,Te)=>e.jsxs(us.Fragment,{children:[Te>0?" · ":"",e.jsx("span",{className:"font-semibold text-navy",children:le.cityName})," ",u("reservation:flightCard.nightsInCity",{count:le.nights,days:le.nights+1})]},Te)),"."]}),W=`${t.packageName||""} ${t.offerName||""} ${t.destLabel||""}`.toLowerCase(),ye=/crois|cruise|\bnil\b|\bnile\b/.test(W)?u("reservation:flightCard.tripCruise"):q.length>=2?u("reservation:flightCard.tripCircuit"):u("reservation:flightCard.tripStay"),de=E==="combine"?u("reservation:flightCard.typeCombine",{dest:String(t.de
402stLabel||"").trim()||t.offerName||""}):E==="world"?u("reservation:flightCard.typeWorld",{dest:String(t.destLabel||"").trim()||t.offerName||""}):u("reservation:flightCard.typeOmra"),ot=(()=>{const ve=String(t.offerName||t.packageName||"").split("â")[0].trim();return!ve||/^autre\s+\d+\s+jours?/i.test(ve)||/combin[ée]+e?\s+\d+\s+jours?/i.test(ve)?de:ve})(),Ge=ve=>`${ve.getDate()} ${pn(ve.getMonth()+1,"short").replace(".","")}`;return e.jsxs("div",{className:`overflow-hidden rounded-2xl border-2 transition-all ${n?"border-[var(--accent)]/60":a?"border-navy/25":"border-ink/10"}`,children:[n&&e.jsxs("div",{className:"flex items-center gap-1.5 border-b border-[var(--accent)]/20 bg-[var(--accent)]/[0.07] px-3 py-1.5 text-[10.5px] font-bold uppercase tracking-[0.14em] text-gold-deep",children:[e.jsx(h,{name:"star",className:"h-3 w-3"})," ",u("reservation:flightCard.recommended")]}),K&&e.jsxs("div",{className:"flex items-center gap-2.5 border-b border-navy/15 bg-navy/[0.06] px-3.5 py-2.5 text-[14px] font-bold text-navy",children:[e.jsx("span",{className:"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-navy/15 text-navy",children:e.jsx(h,{name:"plus",className:"h-3.5 w-3.5"})}),u("reservation:flightCard.seatsAdded")]}),a&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-ink/10 bg-white px-3 py-2 text-[10.5px] font-bold uppercase tracking-wider text-navy",children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 text-gold-deep"})," ",a,s!=null&&s!==0&&e.jsxs("span",{className:`font-bold ${s<0?"text-emerald-600":"text-ink-mute"}`,children:[s<0?"â":"+",se(Math.abs(s),t.currency)]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row",children:[e.jsx("div",{className:"hidden w-[200px] shrink-0 p-3 lg:block",children:e.jsxs("div",{className:"sticky top-3 aspect-[3/4] w-full overflow-hidden rounded-2xl shadow-soft ring-1 ring-ink/10",children:[e.jsx("img",{src:Yi(t)||p(j),alt:t.destLabel?`Voyage ${t.destLabel}`:"Départ en Omra â vue de La Mecque",loading:"lazy",decoding:"async",className:"absolute inset-0 h-full w-full object-cover object-center"}),e.jsx("span",{className:"absolute inset-x-0 bottom-0 h-2/5 bg-gradient-to-t from-ink/85 to-transparent"}),e.jsxs("span",{className:"absolute bottom-3 left-3 right-3 text-white",children:[e.jsx("span",{className:"block font-display text-[2.1rem] leading-none drop-shadow-lg",children:j.getDate()}),e.jsxs("span",{className:"block text-[11px] font-bold uppercase tracking-[0.14em] text-white/90",children:[pn(j.getMonth()+1,"short").replace(".","")," ",j.getFullYear()]})]})]})}),e.jsxs("div",{className:"min-w-0 flex-1 p-3.5",children:[e.jsxs("div",{className:"mb-2.5 flex flex-wrap items-center gap-x-3 gap-y-1 border-b border-ink/8 pb-2.5",children:[e.jsx("button",{type:"button",onClick:()=>d(t),title:u("reservation:summary.choose"),className:"flex items-center gap-1.5 text-left font-display text-[1.2rem] font-bold leading-tight text-ink underline decoration-transparent underline-offset-4 transition-colors hover:decoration-red-brand focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:B?e.jsx("span",{style:{color:ga(E)},children:ot}):e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{color:ga(E)},children:de})," ",u("reservation:flightCard.dateFromLower")," ",e.jsx("span",{className:"capitalize",children:Gs(j,Z)})," ",u("reservation:flightCard.dateTo")," ",e.jsx("span",{className:"capitalize",children:Gs(C,Z)})]})}),!B&&e.jsx("span",{className:"font-display text-[1.2rem] font-bold leading-tight text-ink",children:u("reservation:vols.nightsSlashDays",{nights:me,days:t.days})}),!x&&e.jsx("span",{className:"flex flex-none items-center gap-x-3 whitespace-nowrap",children:e.jsx("button",{onClick:l,className:"text-[12px] font-semibold text-navy underline",children:u(i?"reservation:flightCard.hideDetail":"reservation:flightCard.detailOutReturn")})})]}),!B&&te.length>0&&e.jsx("div",{className:"mb-2.5 flex flex-wrap items-center gap-2",children:te.map(ve=>e.jsxs("span",{className:fe,children:[e.jsx(h,{name:/mecque|makkah/i.test(ve.cityName)?"kaaba":"mosque",className:"h-3.5 w-3.5 shrink-0 text-gold-deep"}),u("reservation:flightCard.stopChip",{city:ve.cityName,count:ve.nights})]},ve.cityName))}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[E==="combine"&&e.jsxs("span",{className:"inline-flex items-center gap-1.5",title:u("reservation:flightCard.omraOnSaudia"),children:[e.jsx(ea,{name:"Saudia",code:"SV"}),e.jsx("span",{className:"text-[14px] font-bold text-ink-mute",children:"+"})]}),t.airlineName?e.jsxs("button",{onClick:()=>m({name:t.airlineName,code:t.airlineCode,baggage:t.baggage,travelClass:t.travelClass}),className:"flex items-center gap-2 rounded-lg p-0.5 transition-colors hover:bg-cream-100",title:u("reservation:flightCard.airlineInfo"),children:[e.jsx(ea,{name:t.airlineName,code:t.airlineCode,logo:t.airlineLogo}),e.jsxs("span",{className:"text-left",children:[e.jsx("span",{className:"block text-[13px] font-bold leading-tight text-ink",children:t.airlineName}),e.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] text-navy underline",children:[u("reservation:flightCard.info")," ",e.jsx(h,{name:"globe",className:"h-2.5 w-2.5"})]})]})]}):e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-[5px] bg-ink/[0.04] px-2 py-1 text-[10.5px] font-semibold text-navy ring-1 ring-ink/10",children:[e.jsx(h,{name:"plane",className:"h-3 w-3 text-gold-deep"})," ",u("reservation:flightCard.regularAirline")]}),!B&&!x&&e.jsxs("span",{className:z,children:[Bs(t.originCity)," â ",U]}),!B&&!x&&L&&e.jsxs("span",{className:z,children:[e.jsx(h,{name:"compass",className:"h-2.5 w-2.5 text-navy/60"})," ",u("reservation:flightCard.via",{city:L}
402)]}),!B&&o&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-[5px] bg-emerald-50 px-1.5 py-0.5 text-[10px] font-semibold text-emerald-700 ring-1 ring-emerald-600/25",children:[e.jsx(h,{name:o.icon,className:"h-2.5 w-2.5"})," ",o.label]}),!B&&t.travelClass&&e.jsxs("span",{className:z,children:[e.jsx(h,{name:"star",className:"h-2.5 w-2.5 text-gold-deep/70"})," ",t.travelClass]}),!B&&t.baggage&&e.jsxs("span",{className:z,children:[e.jsx(h,{name:"shield",className:"h-2.5 w-2.5 text-navy/60"})," ",t.baggage]})]}),B?e.jsxs("div",{className:"mt-3 space-y-2.5 border-t border-ink/8 pt-3",children:[e.jsx("p",{className:"text-[15px] leading-relaxed text-ink-soft",children:(()=>{const ve=String(t.destLabel||"").trim(),le=ye.toLowerCase(),Te=ve?ve.toLowerCase().startsWith(le)?` ${ve.slice(le.length).trim()}`:u("reservation:flightCard.tripLeadIn",{dest:ve}):"";return u("reservation:flightCard.tripLead",{type:ye,nights:me,days:t.days,dest:Te,from:Gs(j,Z),to:Gs(C,Z)})})()}),e.jsx("p",{className:"text-[15px] leading-relaxed text-ink-soft",children:ce.length>0?$(ce):M.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-bold text-navy",children:[u("reservation:flightCard.tripStops")," "]}),M.map((ve,le)=>e.jsxs(us.Fragment,{children:[le>0?", ":"",e.jsx("span",{className:"font-semibold text-navy",children:ve.city}),ve.date?` (${u("reservation:flightCard.tripSince",{date:Ge(at(ve.date))})})`:""]},le)),"."]}):u("reservation:flightCard.tripCitiesTbc")}),e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-1 pt-0.5",children:[e.jsx("button",{type:"button",onClick:()=>c&&c(t),className:"text-[14px] font-bold text-navy underline decoration-2 decoration-[var(--accent)]/50 underline-offset-4 transition-colors hover:decoration-red-brand",children:u("reservation:flightCard.viewProgram")}),x&&e.jsx("span",{className:"text-[12.5px] italic text-ink-mute",children:u("reservation:flightCard.regularAirlineShort")})]})]}):x?e.jsxs("div",{className:"mt-3 flex max-w-xl items-start gap-3 rounded-xl border border-[var(--accent)]/25 bg-cream-100 px-3.5 py-3",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-full bg-[var(--accent)]/15 text-gold-deep",children:e.jsx(h,{name:"plane",className:"h-5 w-5"})}),e.jsxs("p",{className:"text-[12.5px] leading-relaxed text-ink-soft",children:[e.jsx("strong",{className:"text-navy",children:u("reservation:flightCard.regularAirlineStrong")})," ",u("reservation:flightCard.regularAirlineBody")]})]}):e.jsxs("div",{className:"mt-3 max-w-md space-y-2 overflow-hidden rounded-xl bg-cream-100 px-3 py-2.5",children:[e.jsx(ei,{label:u("reservation:flightCard.legOut"),segs:t.outbound,firstSub:Bt(j)}),t.inbound.length>0&&e.jsx(ei,{label:u("reservation:flightCard.legReturn"),segs:t.inbound,firstSub:Bt(C)})]}),i&&e.jsxs("div",{className:"mt-3 grid gap-2.5 border-t border-ink/8 pt-3",children:[e.jsx(ti,{label:u("reservation:flightCard.legOut"),segs:t.outbound,dateStr:Xs(j)}),t.inbound.length>0&&e.jsx(ti,{label:u("reservation:flightCard.legReturn"),segs:t.inbound,dateStr:Xs(C)})]})]}),e.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-t-2 border-dashed border-ink/10 bg-cream-100/50 p-3.5 sm:w-[200px] sm:flex-col sm:items-stretch sm:justify-center sm:border-l-2 sm:border-t-0 sm:text-center",children:[e.jsxs("div",{className:"sm:text-center",children:[_&&e.jsxs("span",{className:`mb-1.5 inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-[11px] font-bold uppercase tracking-wide ${Q} sm:mb-2`,children:[e.jsx(h,{name:"clock",className:"h-3.5 w-3.5"})," ",Y]}),e.jsx("span",{className:"block text-[9.5px] font-bold uppercase tracking-wider text-gold-deep",children:u("reservation:vols.startingFrom")}),e.jsx("span",{className:"font-display text-[2rem] leading-none text-navy",children:t.price!=null?se(t.price,t.currency):"â"}),e.jsx("span",{className:"block text-[10px] text-ink-mute",children:u("reservation:summary.perPerson")})]}),V?e.jsx("button",{disabled:!0,title:R?u("reservation:flightCard.notEnoughSeatsTitle",{seats:t.availableSeats,pax:Math.max(1,g||1)}):u("reservation:flightCard.soldOutTitle",{seats:t.availableSeats,pax:Math.max(1,g||1)}),className:"flex cursor-not-allowed items-center justify-center gap-1.5 rounded-full bg-rose-100 px-4 py-2.5 text-[13px] font-bold text-rose-600 sm:w-full",children:R?u("reservation:flightCard.notEnoughSeats",{count:t.availableSeats}):u("reservation:flightCard.soldOut")}):e.jsxs("button",{onClick:()=>d(t),className:"flex items-center justify-center gap-1.5 rounded-full bg-red-brand px-4 py-2.5 text-[13px] font-bold text-white transition-all hover:brightness-95 sm:w-full",children:[u("reservation:summary.choose")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]}),!V&&e.jsxs("p",{className:"mt-2 text-[10.5px] leading-snug text-ink-mute sm:max-w-[190px] sm:text-center",children:[e.jsx(h,{name:"kaaba",className:"mr-0.5 inline h-3 w-3 align-[-1px] text-gold-deep"})," ",u("reservation:flightCard.nextStepPrefix"),e.jsx("strong",{className:"font-semibold text-ink-soft",children:u("reservation:flightCard.nextStepBold")}),u("reservation:flightCard.nextStepSuffix")]})]})]})]})}function Ec({offers:t,nearby:n,dateISO:o,type:a,city:s,seatsNeeded:i,onSelect:l,onProgram:d,onBackToTop:c,onClose:m,onPrev:g,onNext:N,prevDisabled:u,nextDisabled:p,prevMonth:x,nextMonth:j,curMonth:C,depImg:U}){const{t:I}=it(),[L,me]=b.useState(null),[Z,V]=b.useState(null),k=at(o),[R,_]=b.useState(null),be=Array.from(new Set([...t,...(n||[]).map(E=>E.offer)].map(E=>
402E.airlineName).filter(Boolean))).sort(),Y=E=>!R||R.has(E.airlineName),Q=t.filter(Y),z=(n||[]).filter(E=>Y(E.offer)),fe=Q.map(E=>E.price).filter(E=>E!=null),K=fe.length?Math.min(...fe):null;return e.jsxs("div",{className:"border-t-2 border-[var(--accent)]/40 bg-white",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-ink/10 bg-white px-5 py-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"flex items-center gap-2 font-display text-[1.5rem] font-bold text-navy sm:text-[1.7rem]",children:[e.jsx(h,{name:"plane",className:"h-6 w-6 text-gold-deep"})," ",I("reservation:vols.yourAvailableFlights")]}),(()=>{const E=Array.from(new Set(t.map(M=>M.destLabel).filter(Boolean))),B=E.length?E.join(" · "):a&&a.label;return e.jsxs("p",{className:"mt-0.5 text-[12.5px] font-semibold text-ink-soft",children:[B," · ",s||I("reservation:vols.yourCity")]})})()]}),e.jsxs("div",{className:"flex items-center gap-2",children:[be.length>1&&e.jsx(ar,{items:be.map(E=>({value:E,label:E})),sel:R===null?new Set(be):R,onToggle:E=>_(B=>{const M=new Set(B??be);return M.has(E)?M.delete(E):M.add(E),M}),onToggleAll:E=>_(E?null:new Set),placeholder:I("reservation:family.airline"),allLabel:I("reservation:family.airlineAll"),color:"#12345B"}),e.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 rounded-full border border-ink/15 px-3 py-1.5 text-[12px] font-semibold text-navy transition-colors hover:bg-cream-100",children:[e.jsx(h,{name:"chevron",className:"h-3.5 w-3.5 rotate-180"})," ",I("reservation:vols.calendar")]}),e.jsx("button",{onClick:m,"aria-label":I("reservation:common.close"),className:"grid h-8 w-8 place-items-center rounded-full text-ink-mute hover:bg-cream-100",children:e.jsx(h,{name:"plus",className:"h-5 w-5 rotate-45"})})]})]}),Q.length>0&&e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-2 border-b border-ink/10 bg-white px-4 py-2.5 text-center lg:hidden",children:[e.jsx("span",{className:"font-display text-[1.05rem] capitalize text-navy",children:Gs(k)}),e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 text-gold-deep"}),e.jsx("span",{className:"font-display text-[1.05rem] capitalize text-navy",children:Gs(at(Q[0].returnISO))}),e.jsx("span",{className:"ml-1 text-[11px] font-bold text-gold-deep",children:I("reservation:vols.nightsSlashDays",{nights:Math.max(0,Q[0].days-1),days:Q[0].days})})]}),e.jsxs("div",{className:"space-y-3 p-3.5",children:[Q.length===0&&e.jsx("p",{className:"py-8 text-center text-[14px] text-ink-mute",children:I("reservation:vols.noFlightForDate")}),Q.map((E,B)=>{const M=Q.findIndex(ce=>ce.price!=null&&ce.price===K),q=B===M&&Q.length>1?{label:I("reservation:vols.bestPrice"),cls:"bg-emerald-100 text-emerald-700",icon:"check"}:null;return e.jsx(si,{f:E,recommended:B===0,promo:q,isOpen:L===B,onToggle:()=>me(L===B?null:B),onSelect:l,onProgram:d,onAirline:V,seatsNeeded:i,depImg:U},`${E.flightId}-${B}`)})]}),z.length>0&&e.jsxs("div",{className:"border-t border-ink/10 bg-cream-100/50 px-3.5 py-4",children:[e.jsxs("h4",{className:"flex items-center gap-2.5 font-display text-[1.5rem] font-bold text-navy sm:text-[1.75rem]",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-full bg-[var(--accent)]/20 text-gold-deep",children:e.jsx(h,{name:"sparkle",className:"h-5 w-5"})})," ",I("reservation:vols.moreOptions")]}),e.jsxs("p",{className:"mt-0.5 text-[12.5px] text-ink-soft",children:[z.length>1?I("reservation:vols.otherNDepartures",{n:z.length}):I("reservation:vols.otherDeparture")," ",I("reservation:vols.nearbyTailMonth",{city:Bs(z[0].offer.originCity)})]}),e.jsx("div",{className:"mt-3 space-y-3",children:z.map((E,B)=>{var M;return e.jsx(si,{f:E.offer,badge:E.gapDays>=1?I("reservation:vols.plusDays",{count:E.gapDays}):E.gapDays<=-1?I("reservation:vols.minusDays",{count:Math.abs(E.gapDays)}):I("reservation:vols.nextDepartureBadge"),priceDelta:K!=null&&E.offer.price!=null&&E.offer.currency===((M=Q[0])==null?void 0:M.currency)?E.offer.price-K:null,isOpen:L===`nb${B}`,onToggle:()=>me(L===`nb${B}`?null:`nb${B}`),onSelect:l,onProgram:d,onAirline:V,seatsNeeded:i,depImg:U},`nb-${E.offer.flightId}-${B}`)})})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-ink/8 bg-cream-100 px-4 py-3",children:[e.jsxs("button",{onClick:g,disabled:u,className:"flex items-center gap-1.5 rounded-full border border-ink/15 bg-white px-4 py-2 text-[12.5px] font-semibold text-navy transition-colors hover:border-navy disabled:opacity-30",children:[e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})," ",x?e.jsx("span",{className:"capitalize",children:String(x).toLowerCase()}):I("reservation:vols.prevMonth")]}),e.jsxs("span",{className:"text-center text-[12px] font-semibold text-ink-soft",children:[e.jsx(h,{name:"cal",className:"mr-1 inline h-3.5 w-3.5 text-gold-deep"}),C||Xs(k)]}),e.jsxs("button",{onClick:N,disabled:p,className:"flex items-center gap-1.5 rounded-full border border-ink/15 bg-white px-4 py-2 text-[12.5px] font-semibold text-navy transition-colors hover:border-navy disabled:opacity-30",children:[j?e.jsx("span",{className:"capitalize",children:String(j).toLowerCase()}):I("reservation:vols.nextMonth")," ",e.jsx(h,{name:"chevron",className:"h-4 w-4 -rotate-90"})]})]}
402),Z&&e.jsx(Tc,{name:Z.name,code:Z.code,baggage:Z.baggage,travelClass:Z.travelClass,onClose:()=>V(null)})]})}function fr({hotel:t,fallbackImg:n,nights:o,dateRange:a}){const{t:s}=it(),[i,l]=b.useState(0),[d,c]=b.useState(!1);b.useEffect(()=>{l(0),c(!1)},[t]);const m=b.useMemo(()=>(t.imgs&&t.imgs.length?t.imgs:[n||null]).filter((C,U,I)=>C&&I.indexOf(C)===U),[t,n]),g=j=>{l(j),c(!0)},N=()=>l(j=>(j-1+m.length)%m.length),u=()=>l(j=>(j+1)%m.length),p=/kaaba/i.test(t.views.join())?s("reservation:hotelGallery.viewKaaba"):/nabawi/i.test(t.views.join())?s("reservation:hotelGallery.viewNabawi"):(t.views||[]).find(j=>!!j)||null;b.useEffect(()=>{if(!d)return;const j=U=>{U.key==="Escape"?c(!1):U.key==="ArrowLeft"?N():U.key==="ArrowRight"&&u()};document.addEventListener("keydown",j);const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",j),document.body.style.overflow=C}},[d,m.length]);const x=m.length>=5;return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2.5 flex flex-wrap items-center gap-x-3 gap-y-1.5",children:[e.jsx("h3",{className:"font-display text-[clamp(1.3rem,2.6vw,1.8rem)] font-bold leading-tight text-ink",children:t.name}),e.jsx(pl,{n:t.stars,className:"[&_svg]:h-4 [&_svg]:w-4 [&_svg]:fill-[var(--accent)] [&_svg]:text-[var(--accent)]"}),p&&e.jsx("span",{className:"rounded-full bg-[var(--accent)]/20 px-2.5 py-0.5 text-[11px] font-bold text-gold-deep",children:p}),e.jsxs("span",{className:"flex items-center gap-1 text-[13px] font-semibold text-ink-soft",children:[e.jsx(h,{name:"pin",className:"h-4 w-4 text-[var(--accent)]"})," ",t.dist]}),a&&e.jsxs("span",{className:"flex items-center gap-1 text-[13px] font-semibold text-navy",children:[e.jsx(h,{name:"cal",className:"h-4 w-4 text-[var(--accent)]"})," ",a]}),o>0&&e.jsx("span",{className:"rounded-full bg-cream-200 px-2.5 py-0.5 text-[12px] font-bold text-navy",children:s("reservation:common.nights6",{count:o})})]}),x?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>g(0),className:"relative block h-[300px] w-full overflow-hidden rounded-2xl bg-ink sm:hidden",children:[e.jsx("img",{src:m[0],alt:t.name,className:"absolute inset-0 h-full w-full object-cover"}),e.jsx("span",{className:"absolute bottom-3 right-3 rounded-full bg-ink/60 px-2.5 py-1 text-[11.5px] font-bold text-white backdrop-blur",children:s("reservation:hotelGallery.photos",{n:m.length})})]}),e.jsx("div",{className:"hidden gap-2 sm:grid sm:h-[460px] sm:grid-cols-4 sm:grid-rows-2",children:m.slice(0,5).map((j,C)=>{const U=C===4;return e.jsxs("button",{onClick:()=>g(C),className:`group relative overflow-hidden bg-ink transition-[filter] hover:brightness-95 ${C===0?"col-span-2 row-span-2 rounded-l-2xl":""} ${C===2?"rounded-tr-2xl":""} ${C===4?"rounded-br-2xl":""}`,children:[e.jsx("img",{src:j,alt:t.name,className:"absolute inset-0 h-full w-full object-cover"}),C===0&&e.jsx("span",{className:"absolute bottom-3 left-3 rounded-full bg-ink/60 px-2.5 py-1 text-[11.5px] font-bold text-white backdrop-blur",children:s("reservation:hotelGallery.photos",{n:m.length})}),U&&m.length>5&&e.jsx("span",{className:"absolute inset-0 grid place-items-center bg-ink/55 text-[15px] font-bold text-white backdrop-blur-[2px] transition-colors group-hover:bg-ink/65",children:s("reservation:hotelGallery.seeMore",{n:m.length-5})})]},C)})})]}):e.jsx("button",{onClick:()=>m[0]&&g(0),className:"relative block h-[300px] w-full overflow-hidden rounded-2xl bg-ink sm:h-[460px]",children:m[0]?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:m[0],alt:"","aria-hidden":!0,className:"absolute inset-0 h-full w-full scale-110 object-cover blur-2xl brightness-[0.55]"}),e.jsx("img",{src:m[0],alt:t.name,className:"absolute inset-0 h-full w-full object-contain"}),m.length>1&&e.jsx("span",{className:"absolute bottom-3 right-3 rounded-full bg-ink/60 px-2.5 py-1 text-[11.5px] font-bold text-white backdrop-blur",children:s("reservation:hotelGallery.photos",{n:m.length})})]}):e.jsx(ls,{dark:!0,label:t.name,src:null,className:"absolute inset-0"})}),d&&m[i]&&e.jsxs("div",{className:"fixed inset-0 z-[80] flex flex-col bg-ink/95 backdrop-blur",onClick:()=>c(!1),children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 text-white sm:px-6",children:[e.jsx("span",{className:"text-[13px] font-bold",children:t.name}),e.jsxs("span",{className:"flex items-center gap-4",children:[e.jsxs("span",{className:"rounded-full bg-white/12 px-2.5 py-0.5 text-[12px] font-bold",children:[i+1,"/",m.length]}),e.jsx("button",{onClick:j=>{j.stopPropagation(),c(!1)},"aria-label":s("reservation:common.close"),className:"grid h-9 w-9 place-items-center rounded-full bg-white/12 transition-colors hover:bg-white/25",children:e.jsx(h,{name:"close",className:"h-5 w-5"})})]})]}),e.jsxs("div",{className:"relative flex-1",onClick:j=>j.stopPropagation(),children:[e.jsx("img",{src:m[i],alt:t.name,className:"absolute inset-0 h-full w-full object-contain p-2 sm:p-4"}),m.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:N,"aria-label":s("reservation:hotelGallery.prevPhoto"),className:"absolute left-3 top-1/2 grid h-11 w-11 -translate-y-1/2 place-items-center rounded-full bg-white/12 text-white backdrop-blur transition-colors hover:bg-white/25 sm:left-6",children:e.jsx(h,{name:"chevron",className:"h-5 w-5 rotate-90"})}),e.jsx("button",{onClick:u,"aria-label":s("reservation:hotelGallery.nextPhoto"),className:"absolute right-3 top-1/2 grid h-11 w-11 -translate-y-1/2 place-items-center rounded-full bg-white/12 text-white backdrop-blur transition-colors hover:bg-white/25 sm:right-6",children:e.jsx(h,{name:"chevron",className:"h-5 w-5 -rotate-90"})})]})]}),m.length>1&&e.jsx("div",{className:"no-sb flex gap-2 overflow-x-auto px-4 py-3 sm:px-6",onClick:j=>j.stopPropagation(),children:m.map((j,C)=>e.jsx("button",{onClick:()=>l(C),className:`relative h-14 w-20 shrink-0 overflow-hidden rounded-lg transition-all ${C===i?"ring-2 ring-[var(--accent)]":"opacity-50 hover:opacity-100"}`,children:e.jsx("img",{src:j,alt:t.name,className:"absolute inset-0 h-full w-full object-cover"})},C))})]})]})}const ai={proximite:"reservation:hotels.nearbyProximite",restaurants:"reservation:hotels.nearbyRestaurants",transports:"reservation:hotels.nearbyTransports",mosquees:"reservation:hotels.nearbyMosquees",sites_historiques:"reservation:hotels.nearbySitesHistoriques",aeroports:"reservation:hotels.nearbyAeroports",hopitaux:"reservation:hotels.nearbyHopitaux"};function Ac({places:t,hideHeader:n=!1}){const{t:o}=it();if(!(t!=null&&t.length))return null;const a=[],s=new Set;
402Object.keys(ai).forEach(l=>{a.push(l),s.add(l)}),t.forEach(l=>{l!=null&&l.category&&!s.has(l.category)&&(a.push(l.category),s.add(l.category))});const i=a.map(l=>({key:l,label:ai[l]||l,items:t.filter(d=>d.category===l&&(d.name||d.distance))})).filter(l=>l.items.length);return i.length?e.jsxs("div",{className:"mt-3 rounded-2xl border border-ink/8 bg-white p-4",children:[!n&&e.jsxs("p",{className:"mb-4 flex items-center gap-2 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:[e.jsx(h,{name:"pin",className:"h-4 w-4 text-[var(--accent)]"})," ",o("reservation:hotels.hotelLocation")]}),e.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2 lg:grid-cols-3",children:i.map(l=>e.jsxs("div",{children:[e.jsx("h4",{className:"mb-2.5 text-[13px] font-bold text-ink",children:o(l.label)}),e.jsx("ul",{className:"space-y-1.5",children:l.items.map((d,c)=>e.jsxs("li",{className:"flex items-baseline justify-between gap-3 text-[12.5px]",children:[e.jsxs("span",{className:"flex items-baseline gap-1.5 text-ink-soft",children:[e.jsx("span",{className:"text-[var(--accent)]",children:"â¢"})," ",d.name]}),e.jsx("span",{className:"shrink-0 tabular-nums text-ink-mute",children:d.distance})]},c))})]},l.key))})]}):null}function Rc({sections:t,hideHeader:n=!1}){const o=(t||[]).filter(a=>((a==null?void 0:a.items)||[]).some(s=>s.question||s.answer));return o.length?e.jsx(e.Fragment,{children:o.map((a,s)=>e.jsxs("div",{className:"mt-3 rounded-2xl border border-ink/8 bg-white p-4",children:[!n&&e.jsxs("p",{className:"mb-3 flex items-center gap-2 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:[e.jsx(h,{name:"kaaba",className:"h-4 w-4 text-[var(--accent)]"})," ",a.title]}),e.jsx("div",{className:"divide-y divide-ink/8",children:(a.items||[]).filter(i=>i.question||i.answer).map((i,l)=>e.jsxs("div",{className:"py-3 first:pt-0 last:pb-0",children:[e.jsx("h4",{className:"mb-1 text-[13px] font-bold text-ink",children:i.question}),e.jsxs("p",{className:"flex items-start gap-2 text-[12.5px] leading-relaxed text-ink-soft",children:[e.jsx(h,{name:i.positive?"check":"plus",className:`mt-0.5 h-4 w-4 shrink-0 ${i.positive?"text-emerald-600":"rotate-45 text-rose-500"}`}),e.jsx("span",{children:i.answer})]})]},l))})]},s))}):null}function Bc({groups:t}){return t!=null&&t.length?e.jsx("div",{className:"mt-3 gap-x-10 [column-fill:balance] columns-1 sm:columns-2 lg:columns-3",children:t.map((n,o)=>e.jsxs("div",{className:"mb-5 break-inside-avoid",children:[e.jsx("h4",{className:"mb-2 text-[13px] font-bold text-ink",children:n.category}),e.jsx("ul",{className:"space-y-0",children:(n.items||[]).map((a,s)=>e.jsxs("li",{className:"flex items-baseline gap-1.5 text-[12.5px] text-ink-soft",children:[e.jsx("span",{className:"text-[var(--accent)]",children:"â¢"}),e.jsxs("span",{children:[a.name,a.value?e.jsxs("span",{className:"text-ink-mute",children:[" ",a.value]}):null]})]},s))})]},o))}):null}const Fc={last:"bg-red-brand text-white",soon:"bg-amber-100 text-amber-800 ring-1 ring-amber-300",ramadan:"bg-indigo-50 text-indigo-700 ring-1 ring-indigo-200"},_c={last:"ð¥",soon:"â³",ramadan:"â¾"};function Hc({value:t,options:n,onChange:o,placeholder:a}){const{t:s}
402=it(),[i,l]=b.useState(!1),d=b.useRef(null);b.useEffect(()=>{if(!i)return;const m=N=>{d.current&&!d.current.contains(N.target)&&l(!1)},g=N=>{N.key==="Escape"&&l(!1)};return document.addEventListener("mousedown",m),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",g)}},[i]);const c=n.find(m=>m.key===t)||null;return e.jsxs("div",{ref:d,className:"relative inline-block text-left align-middle",children:[e.jsxs("button",{type:"button",onClick:()=>l(m=>!m),"aria-haspopup":"listbox","aria-expanded":i,className:"flex min-w-[230px] cursor-pointer items-center gap-2 rounded-xl border-2 border-[var(--accent)]/50 bg-cream-50 py-2.5 pl-4 pr-3 font-display text-[1.1rem] font-bold capitalize text-navy shadow-soft transition-colors hover:border-[var(--accent)] hover:bg-white",children:[e.jsx("span",{className:"flex-1 whitespace-nowrap text-left",children:c?`${c.dateFull}${c.days!=null?` · ${s("reservation:common.days",{n:c.days})}`:""}`:a}),e.jsx(h,{name:"chevron",className:`h-4 w-4 shrink-0 text-gold-deep transition-transform ${i?"rotate-180":""}`})]}),i&&e.jsx("div",{role:"listbox",className:"absolute left-0 top-[calc(100%+6px)] z-50 max-h-[340px] w-max min-w-full overflow-y-auto overflow-x-hidden rounded-2xl border border-ink/10 bg-white p-1.5 shadow-2xl ring-1 ring-black/5 [scrollbar-width:thin] [scrollbar-color:var(--accent)_transparent] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:my-2 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[var(--accent)]/50 hover:[&::-webkit-scrollbar-thumb]:bg-[var(--accent)]/70",children:n.map(m=>{const g=m.key===t;return e.jsxs("button",{type:"button",role:"option","aria-selected":g,onClick:()=>{o(m),l(!1)},className:`flex w-full items-center gap-1.5 whitespace-nowrap rounded-xl px-3 py-2.5 text-left transition-colors ${g?"bg-navy":"hover:bg-cream-100"}`,children:[e.jsx("span",{className:`font-display text-[14.5px] font-bold capitalize ${g?"text-white":"text-navy"}`,children:g?m.dateFull:m.dateShort}),m.days!=null&&e.jsxs("span",{className:`text-[12.5px] ${g?"text-cream-100/75":"text-ink-mute"}`,children:["· ",s("reservation:common.days",{n:m.days})]}),!g&&m.price&&e.jsxs("span",{className:"text-[12.5px] font-semibold text-ink-soft",children:["â ",s("reservation:summary.from")," ",m.price]}),m.tag&&e.jsxs("span",{className:`ml-2 inline-flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-bold ${Fc[m.tag.kind]}`,children:[_c[m.tag.kind]," ",m.tag.text]})]},m.key)})})]})}function cn({onClick:t,className:n=""}){const{t:o}=it();return e.jsx("div",{className:`flex justify-center ${n}`,children:e.jsxs("button",{type:"button",onClick:t,className:"inline-flex items-center gap-2 rounded-full bg-[var(--accent)] px-5 py-2.5 text-[13.5px] font-bold text-navy shadow-soft transition-colors hover:bg-gold-deep hover:text-white",children:[e.jsx(h,{name:"arrow",className:"h-4 w-4 -rotate-90"})," ",o("reservation:hotels.changeCategory")]})})}const zc=[{test:/nozol/i,stars:4},{test:/maden/i,stars:5},{test:/raffles/i,stars:5,lvlKey:"reservation:hotels.gmStandingPalace"},{test:/taqwa|takwa/i,stars:5,lvlKey:"reservation:hotels.gmStandingLuxe"}],vr=t=>zc.find(n=>n.test.test(String((t==null?void 0:t.name)||""))),Uc=t=>{const n=vr(t);return n?n.stars:Number(t==null?void 0:t.stars)||0},Vc=t=>{const n=String(t||"").match(/(\d[\d\s]*)\s*m\b/i);return n?Number(n[1].replace(/\s/g,"")):null},qc=t=>/en face|face a|face à |plain-pied|acc[eè]s direct/i.test(String(t||"")),Gc=t=>{if(qc(t))return 5;const n=Vc(t);return n==null?3:n<=200?5:n<=300?4:n<=500?3:2},Kc=t=>/taqwa|takwa/i.test(String(t||""))?1:3,Yc=[/anjum/i],Qc=t=>Yc.some(n=>n.test(String(t||""))),Wc=t=>/swiss[oô]tel|fairmont|clock\s*royal|raffles|abraj|al\s*bait/i.test(String(t||""));function Jc({n:t}){return e.jsx("span",{className:"inline-flex shrink-0 items-center gap-0.5","aria-label":`${t}/5`,children:[1,2,3,4,5].map(n=>e.jsx(h,{name:"star",className:`h-[15px] w-[15px] ${n<=t?"fill-amber-400 text-amber-400":"fill-ink/10 text-ink/20"}`},n))})}function Zc({rows:t}){return e.jsx("ul",{className:"mt-3 space-y-3",children:t.map(n=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[e.jsxs("span",{className:"min-w-0 text-[14px] leading-snug text-ink-soft",children:[n.label," ",e.jsxs("span",{className:"font-semibold text-navy",children:["· ",n.detail]})]}),e.jsx(Jc,{n:n.score})]},n.label))})}function Xc({b:t,update:n,go:o,combine:a,hydrating:s}){var oe,Ve;const{t:i}
402=it(),{data:l,isLoading:d,isError:c,refetch:m}=wn(t.packageId||void 0,t.flightId||void 0),g=b.useMemo(()=>{if(!a)return l;const y=a.tiers||[];return y.length?y.map(A=>{const je=(l||[]).find(Se=>Se.id===A.id);return je?{...je,hotelByCity:{...A.hotelByCity||{},mk:je.mk,md:je.md}}:A}):l},[a,l]),N=y=>{var A;return a?((A=a.staysByCat)==null?void 0:A[y])||[]:[]},{data:u,isLoading:p}=Ua(t.packageId||void 0,t.flightId||void 0),{data:x,isLoading:j,refetch:C}=$o(t.packageId||void 0,t.flightId||void 0),{data:U}=kn(!a),I=a?a.calData:U,L=Ys(t),me=(l||[]).find(y=>y.id===t.tier)||(l||[])[0];b.useEffect(()=>{if(!me)return;const y={};me.nightsMk>0&&me.nightsMk!==t.nightsMakkah&&(y.nightsMakkah=me.nightsMk),me.nightsMd>0&&me.nightsMd!==t.nightsMedina&&(y.nightsMedina=me.nightsMd),Object.keys(y).length&&n(y)},[me,t.nightsMakkah,t.nightsMedina]);const Z=b.useRef(null),[V,k]=b.useState(!1),R=b.useRef(null),_=b.useRef(null),be=b.useRef(null),Y=b.useRef(null),Q=()=>{var y;return(y=Y.current)==null?void 0:y.scrollIntoView({behavior:"smooth",block:"start"})};b.useEffect(()=>{const y=R.current;if(!y)return;const A=y.querySelector('[data-cat-active="1"]');A&&y.scrollTo({left:A.offsetLeft-(y.clientWidth-A.offsetWidth)/2,behavior:"smooth"})},[t.tier,g]);const z=y=>hi(u,y),fe=y=>tr(y,n),K=y=>{y.id!==t.tier&&fe(y),o("rooms")},E=y=>{fe(y),requestAnimationFrame(()=>{var A;return(A=_.current)==null?void 0:A.scrollIntoView({behavior:"smooth",block:"start"})})},B=()=>{var y;(y=be.current||_.current)==null||y.scrollIntoView({behavior:"smooth",block:"start"})};if(b.useEffect(()=>{if(!(g!=null&&g.length))return;const y=g.find(je=>je.id===t.tier);if(!y){const je=Aa(new URLSearchParams(window.location.search),"cat"),Se=je!=null?g.find(O=>O.id===je):void 0,Ze=(Se&&!z(Se.id)?Se:void 0)||g.find(O=>/confort/i.test(O.label)&&!z(O.id))||g.find(O=>!z(O.id))||g[0];fe(Ze);return}if(!t.combo&&z(y.id)){const je=g.find(Se=>Se.id!==y.id&&/confort/i.test(Se.label)&&!z(Se.id))||g.find(Se=>Se.id!==y.id&&!z(Se.id));if(je){fe(je);return}}const A={};t.distMk==null&&(A.distMk=y.mk.dist,A.distMd=y.md.dist),t.checkInMk==null&&(A.checkInMk=y.mk.check_in,A.checkOutMk=y.mk.check_out,A.checkInMd=y.md.check_in,A.checkOutMd=y.md.check_out),t.combo||((!t.pension||!Kt[t.pension])&&(A.pension="BB"),t.kaaba!==!0&&(A.kaaba=/kaaba/i.test((y.mk.views||[]).join())),t.nabawi!==!0&&(A.nabawi=/nabawi/i.test((y.md.views||[]).join()))),Object.keys(A).length&&n(A)},[g,u]),!t.packageId)return s?e.jsx(js,{label:i("reservation:common.restoringLink")}):e.jsx(Ns,{message:i("reservation:hotels.needFlight"),actionLabel:i("reservation:hotels.chooseDates"),onAction:()=>o("vols")});if(d||a!=null&&a.isLoading&&!((a==null?void 0:a.tiers)||[]).length)return e.jsx(js,{label:i("reservation:hotels.loading")});if(c&&!(a&&(a.tiers||[]).length))return e.jsx(Ns,{message:i("reservation:hotels.loadError"),onRetry:m});if(!g||!g.length)return e.jsx(Ns,{message:i("reservation:hotels.noCategory"),onRetry:m,actionLabel:i("reservation:hotels.changeDate"),onAction:()=>o("vols")});const M=g.find(y=>y.id===t.tier)||g[0],q=N(M.id),ce=y=>q.find(A=>(ta(A.city)||_s(A.city))===y)||null,te=y=>y&&y.length>=10?`${y.slice(8,10)}/${y.slice(5,7)}`:"",$=a&&((oe=a.cities)!=null&&oe.length)?a.cities.map(y=>{var A;return{id:y.key,label:y.key==="mk"?i("reservation:hotels.inMakkah"):y.key==="md"?i("reservation:hotels.inMedina"):y.label,icon:y.key==="mk"?"kaaba":y.key==="md"?"compass":"pin",hotel:y.key==="mk"?M.mk:y.key==="md"?M.md:((A=M.hotelByCity)==null?void 0:A[y.key])||null,stop:y,holy:y.isHoly}}).filter(y=>y.hotel&&String(y.hotel.name||"").trim()).sort((y,A)=>(y.id==="mk"?0:y.id==="md"?1:2)-(A.id==="mk"?0:A.id==="md"?1:2)):[{id:"mk",label:i("reservation:hotels.inMakkah"),icon:"kaaba",hotel:M.mk,stop:null,holy:!0},{id:"md",label:i("reservation:hotels.inMedina"),icon:"compass",hotel:M.md,stop:null,holy:!0}],W=(()=>{const y="https://static.go-makkah.com/videos",A=String(M.label||"").toLowerCase().trim();return A==="confort"?`${y}/confort.mp4`:A==="prestige"?`${y}/prestige.mp4`:A==="vip"?`${y}/vip.mp4`:null})(),ye=(I==null?void 0:I.cities)||[],de=I?Object.keys(I.byDate).filter(y=>(I.byDate[y]||[]).some(A=>!t.city||t.city==="Toutes les villes"||A.originCity===t.city)).sort():[],ot=t.dateISO&&!a?(()=>{const y=at(t.dateISO),A=je=>{const Se=new Date(y.getFullYear(),y.getMonth()+je,1);return`${Se.getFullYear()}
402-${String(Se.getMonth()+1).padStart(2,"0")}`};return new Set([A(-1),A(0),A(1)])})():null,Ge=ot?de.filter(y=>ot.has(y.slice(0,7))):de,Be=(()=>{const y=(g||[]).map(A=>A.minPrice).filter(A=>typeof A=="number");return y.length?Math.min(...y):null})(),ve=y=>{var A;return(((A=I==null?void 0:I.byDate)==null?void 0:A[y])||[]).filter(je=>!t.city||t.city==="Toutes les villes"||je.originCity===t.city)},le=(y,A)=>{const je=A.filter(Se=>typeof Se.availableSeats=="number"&&Se.availableSeats>0);if(je.length){const Se=Math.min(...je.map(Ze=>Ze.availableSeats)),We=je.some(Ze=>Ze.totalSeats&&Ze.availableSeats/Ze.totalSeats<=.3);if(Se<=5)return{text:i("reservation:flightCard.lastSeats"),kind:"last"};if(Se<=20||We)return{text:i("reservation:flightCard.almostFull"),kind:"soon"}}return/ramadan/i.test(Rs(at(y))||"")?{text:i("reservation:hotels.ramadanDeparture"),kind:"ramadan"}:null},Te=y=>{if(!y)return;if(y.flightId===t.flightId&&y.packageId===t.packageId){xn(y),n({});return}if((t.room||t.comboTotal||t.pension)&&!window.confirm(i("reservation:vols.changeFlightConfirm")))return;const A=y.inbound[y.inbound.length-1];n({packageId:y.packageId,flightId:y.flightId,offerId:y.offerId??void 0,city:y.originCity,dateISO:y.dateISO,returnISO:y.returnISO,date:Bt(at(y.dateISO)),returnDate:Bt(at(y.returnISO)),stay:y.days,nightsMakkah:y.nightsInMecca,nightsMedina:y.nightsInMedina,flightBase:y.price,currency:y.currency||"EUR",infantPrice:y.infantPrice||0,airline:y.airlineName,airlineCode:y.airlineCode,airlineLogo:y.airlineLogo||null,flightType:y.outbound.length>1?`${i("reservation:flightCard.stops",{count:y.outbound.length-1})}${y.outbound[0].toCity||y.outbound[0].toCode?" · "+(y.outbound[0].toCity||y.outbound[0].toCode):""}`:i("reservation:flightCard.direct"),flightDest:y.outbound.length&&y.outbound[y.outbound.length-1].toCity||y.destinationCity,flightRetFrom:y.inbound.length&&(y.inbound[0].fromCity||y.inbound[0].fromCode)||null,flightRetTo:A?A.toCity||A.toCode||y.originCity:null,flightBaggage:y.baggage,flightClass:y.travelClass,flightNature:y.nature,tripType:"omra",tier:null,tierLabel:null,tierMinPrice:null,hotelMkName:null,hotelMdName:null,room:null,combo:null,comboLabel:null,comboTotal:null,pension:null,kaaba:!1}),xn(y)},ue=Ge.flatMap(y=>{const A=new Map;for(const je of ve(y)){const Se=Number(je.days)||0;if(!Se)continue;const We=A.get(Se);We?We.push(je):A.set(Se,[je])}return Array.from(A.entries()).sort((je,Se)=>je[0]-Se[0]).map(([je,Se])=>{const We=Se.reduce((Ze,O)=>((Ze==null?void 0:Ze.price)??1/0)<=((O==null?void 0:O.price)??1/0)?Ze:O);return{key:`${y}|${je}`,iso:y,offer:We,flightIds:Se.map(Ze=>Ze.flightId).filter(Boolean),dateShort:Xs(at(y)),dateFull:Gs(at(y),!0),days:je,price:typeof(We==null?void 0:We.price)=="number"?se(We.price,t.currency||"EUR"):null,tag:le(y,Se)}})}),$e=(()=>{const y=ue.filter(Se=>Se.iso===t.dateISO);if(!y.length)return"";const A=t.flightId?y.find(Se=>Se.flightIds.includes(t.flightId)):null;if(A)return A.key;const je=Number(t.stay)||(Number(t.nightsMakkah)||0)+(Number(t.nightsMedina)||0)+1;return(y.find(Se=>Se.days===je)||y[0]).key})();return e.jsx("div",{children:e.jsxs("div",{ref:Y,className:"scroll-mt-4 space-y-4",children:[e.jsxs("h3",{className:"flex flex-wrap items-center gap-x-2.5 gap-y-1 font-display text-[1.6rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:"kaaba",className:"h-6 w-6 shrink-0 text-gold-deep"}),i("reservation:hotels.clickCategoryHint")]}),e.jsxs("h3",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 font-display text-[1.35rem] leading-tight text-ink lg:hidden",children:[e.jsx("span",{className:"text-navy",children:a?a.tripLabel:"Omra"}),e.jsx("span",{className:"text-ink-mute",children:"·"}),e.jsx("span",{className:"text-navy",children:i("reservation:common.days",{n:a&&Number(t.stay)||(t.nightsMakkah||0)+(t.nightsMedina||0)+1})}),e.jsx("span",{className:"text-ink-mute",children:i("reservation:vols.inMonth")}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-[1rem] font-bold text-white shadow-soft",style:{background:Oo(M.label)},children:[e.jsx(h,{name:M.icon,className:"h-4 w-4"})," ",M.label]})]}),e.jsxs("div",{className:"rounded-2xl border-2 border-red-brand bg-white p-4 lg:hidden",children:[e.jsx("p",{className:"font-display text-[1.15rem] text-navy",children:i("reservation:hotels.chooseCategory")}),e.jsxs("p",{className:"mt-1.5 text-[13px] leading-relaxed text-ink",children:[i("reservation:hotels.instr1a"),e.jsx("b",{children:i("reservation:hotels.instr1b")}),i("reservation:hotels.instr1c")]}),e.jsxs("p",{className:"mt-1.5 text-[13px] leading-relaxed text-ink",children:[i("reservation:hotels.instr2a"),e.jsx("b",{children:i("reservation:hotels.instr2b")}),i("reservation:hotels.instr2c"),e.jsx("b",{children:i("reservation:hotels.instr2d")}),i("reservation:hotels.instr2e")]})]}),e.jsx(Ti,{tiers:g,matrix:x,selectedId:t.tier,soldOutIds:g.filter(y=>z(y.id)).map(y=>y.id),availabilityPending:p,cities:a&&((Ve=a.cities)!=null&&Ve.length)?[...a.cities].sort((y,A)=>{const je=Se=>Se==="mk"?0:Se==="md"?1:2;return je(y.key)-je(A.key)}).map(y=>({key:y.key,label:y.label,icon:y.icon})):void 0,onSelect:E,showHotels:!0,header:e.jsx("div",{className:"mb-4 text-center",children:e.jsxs("h3",{className:"flex flex-wrap items-center justify-center gap-x-2.5 gap-y-2.5 text-[15px] font-medium leading-tight text-ink-soft sm:text-[16
402px]",children:[i("reservation:hotels.departureFrom"),e.jsxs("span",{className:"relative inline-flex items-center",children:[e.jsxs("select",{value:t.city&&t.city!=="Toutes les villes"?t.city:"",onChange:y=>{y.target.value&&(n({city:y.target.value}),o("vols"))},className:"min-w-[160px] cursor-pointer appearance-none rounded-xl border-2 border-[var(--accent)]/60 bg-cream-50 py-2.5 pl-4 pr-11 font-display text-[1.4rem] font-extrabold text-navy shadow-soft outline-none transition-colors hover:border-[var(--accent)] hover:bg-white focus:border-[var(--accent)]",children:[(!t.city||t.city==="Toutes les villes")&&e.jsx("option",{value:"",children:i("reservation:hotels.yourCity")}),ye.map(y=>e.jsx("option",{value:y,children:Bs(y)},y))]}),e.jsx(h,{name:"chevron",className:"pointer-events-none absolute right-3.5 h-4 w-4 text-gold-deep"})]}),i("reservation:hotels.theDate"),e.jsx(Hc,{value:$e,options:ue,placeholder:t.date||i("reservation:hotels.yourDate"),onChange:y=>Te(y.offer)}),Be!=null&&e.jsxs("span",{className:"inline-flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-[12.5px] font-semibold uppercase tracking-wide text-gold-deep",children:i("reservation:vols.startingFrom")}),e.jsx("span",{className:"font-display text-[1.5rem] font-bold leading-none text-navy",children:se(Be,t.currency||"EUR")}),e.jsx("span",{className:"text-[12px] font-medium text-ink-mute",children:i("reservation:summary.perPerson")})]}),e.jsxs("button",{type:"button",onClick:B,className:"inline-flex items-center gap-1 text-[13px] font-semibold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep",children:[e.jsx(h,{name:"pin",className:"h-3.5 w-3.5 shrink-0 text-gold-deep"})," ",i("reservation:hotels.seeMakkahMap")]})]})}),estimatePax:L.n,estimateBabies:L.babies,emptyFallback:j?e.jsxs("div",{className:"animate-pulse space-y-3 py-2","aria-busy":"true","aria-live":"polite",children:[e.jsx("p",{className:"text-center text-[14px] font-semibold text-ink-soft",children:i("reservation:hotels.loading")}),e.jsx("div",{className:"grid gap-3 sm:grid-cols-3 lg:grid-cols-6",children:Array.from({length:6}).map((y,A)=>e.jsx("div",{className:"h-40 rounded-2xl bg-cream-200/70"},A))})]}):e.jsxs("div",{className:"py-6 text-center",children:[e.jsx("p",{className:"text-[14.5px] font-semibold text-navy",children:i("reservation:hotels.pricesUnavailable")}),e.jsx("button",{type:"button",onClick:()=>C(),className:"mt-3 inline-flex items-center gap-2 rounded-full bg-[var(--accent)] px-5 py-2.5 text-[13.5px] font-bold text-navy shadow-soft transition-colors hover:bg-gold-deep hover:text-white",children:i("reservation:common.retry")})]})}),e.jsx(cn,{onClick:Q}),e.jsxs("div",{ref:_,className:"scroll-mt-4 grid gap-5 lg:grid-cols-[300px_minmax(0,1fr)] lg:items-start",children:[e.jsxs("div",{className:"overflow-hidden rounded-3xl border border-ink/8 bg-white p-3 sm:p-4",children:[e.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-x-2 gap-y-1 font-display text-[1.6rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:M.icon,className:"h-6 w-6 shrink-0 text-gold-deep"}),i("reservation:hotels.inCategoryPrefix"),e.jsx("span",{className:"text-gold-deep",children:Ks(String(M.label))}),i("reservation:hotels.inCategorySuffix")]}),e.jsxs("div",{className:"mb-5 rounded-2xl border border-gold-deep/25 bg-gold-light/[0.07] p-5 sm:p-6",children:[e.jsxs("p",{className:"flex items-center gap-2 font-display text-[1.15rem] font-extrabold text-navy",children:[e.jsx(h,{name:"shield",className:"h-5 w-5 text-gold-deep"})," ",i("reservation:hotels.gmEvalTitle")]}),e.jsx("p",{className:"mt-1 border-b border-gold-deep/30 pb-3 text-[13.5px] text-ink-soft",children:i("reservation:hotels.gmEvalIntro")}),e.jsx("div",{className:"mt-5 grid gap-5 lg:grid-cols-2",children:$.map(y=>{var Ue;const A=y.hotel,je=y.id==="mk",Se=y.id==="md",We=Uc(A),Ze=je&&Wc(A==null?void 0:A.name),O=((A==null?void 0:A.views)||[]).find(H=>/kaaba/i.test(H)),pe=[];if(je)pe.push({label:i("reservation:hotels.gmCritHaram"),score:Gc((A==null?void 0:A.dist)||""),detail:(A==null?void 0:A.dist)||"â"}),Ze&&pe.push({label:i("reservation:hotels.gmCritCovered"),score:5,detail:i("reservation:hotels.gmCoveredYes")}),O&&pe.push({label:i("reservation:hotels.gmCritKaabaView"),score:5,detail:i("reservation:hotels.gmKaabaAvailable")});else if(Se){const H=Kc(A==null?void 0:A.name);pe.push({label:i("reservation:hotels.gmCritGate"),score:H<=1?5:4,detail
402:i("reservation:hotels.gmGateMin",{min:H})}),pe.push({label:i("reservation:hotels.gmCritNorth"),score:5,detail:i("reservation:hotels.gmNorthQibla")})}else A!=null&&A.dist&&pe.push({label:i("reservation:hotels.gmCritLocation6"),score:4,detail:A.dist});if(Qc(A==null?void 0:A.name)&&pe.push({label:i("reservation:hotels.gmCritMusalla"),score:5,detail:i("reservation:hotels.gmMusallaIn")}),We>0){const H=(Ue=vr(A))==null?void 0:Ue.lvlKey,Ae=H?i(H):We>=5?i("reservation:hotels.gmStandingLvl5"):We===4?i("reservation:hotels.gmStandingLvl4"):We===3?i("reservation:hotels.gmStandingLvl3"):"";pe.push({label:i("reservation:hotels.gmCritStanding"),score:We,detail:Ae?`${We}â
· ${Ae}`:`${We}â
`})}return Ze?pe.push({label:i("reservation:hotels.gmCritShops"),score:5,detail:i("reservation:hotels.gmShopsAbraj")}):Se&&pe.push({label:i("reservation:hotels.gmCritShops"),score:5,detail:i("reservation:hotels.gmShopsMedina")}),e.jsxs("div",{className:"rounded-xl bg-white/80 p-4 ring-1 ring-ink/8 sm:p-5",children:[e.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 font-display text-[1.05rem] font-bold text-navy",children:[e.jsx(h,{name:y.icon,className:"h-5 w-5 shrink-0 text-gold-deep"})," ",y.label,e.jsxs("span",{className:"text-[14px] font-semibold text-ink-soft",children:["· ",A==null?void 0:A.name]})]}),e.jsx("span",{className:"mt-2 block border-b border-ink/12","aria-hidden":!0}),e.jsx(Zc,{rows:pe})]},y.id)})})]}),e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3 overflow-hidden rounded-2xl bg-cream-100 px-4 py-2.5",children:[e.jsxs("p",{className:"flex min-w-0 items-center gap-2 text-[13px] font-semibold text-ink-soft",children:[e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-[var(--accent)]/20 px-2.5 py-1 text-[11px] font-bold text-gold-deep",children:[e.jsx(h,{name:M.icon,className:"h-3.5 w-3.5"})," ",i("reservation:hotels.categoryLabel",{label:M.label})]}),e.jsx("span",{className:"hidden whitespace-nowrap xl:inline",children:$.length===2?i("reservation:hotels.twoHotels"):i("reservation:hotels.nHotels6",{n:$.length})})]}),e.jsxs("p",{className:"flex min-w-0 items-center gap-x-2.5 text-[12.5px] font-semibold",children:[$.map((y,A)=>{var je;return e.jsxs(us.Fragment,{children:[A>0&&e.jsx(h,{name:"arrow",className:"hidden h-3.5 w-3.5 shrink-0 text-ink-mute sm:block"}),e.jsxs("span",{className:"hidden min-w-0 items-center gap-1.5 text-navy sm:inline-flex",children:[e.jsx(h,{name:y.icon,className:`h-4 w-4 shrink-0 ${y.icon==="compass"?"text-emerald-600":y.icon==="kaaba"?"text-[var(--accent)]":"text-gold-deep"}`})," ",e.jsx("span",{className:"truncate",children:String(((je=y.hotel)==null?void 0:je.name)||"").split("â")[0].trim()})]})]},y.id)}),e.jsxs("button",{type:"button",onClick:()=>K(M),className:"inline-flex shrink-0 items-center gap-2 whitespace-nowrap rounded-full bg-red-brand px-6 py-3 text-[15px] font-bold text-white shadow-soft transition-colors hover:bg-red-deep",children:[M.id===t.tier?i("reservation:hotels.continueRoomsCat",{label:Ks(M.label)}):i("reservation:hotels.chooseTierRooms2",{label:Ks(M.label)})," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]})]}),e.jsx("div",{className:"space-y-6",children:$.map((y,A)=>e.jsxs("div",{ref:y.id==="mk"?be:void 0,className:"scroll-mt-4",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2 border-b-2 border-[var(--accent)] pb-2",children:[e.jsx(h,{name:y.icon,className:"h-5 w-5 text-[var(--accent)]"}),e.jsx("span",{className:"font-display text-[1.15rem] text-navy",children:y.label}),e.jsxs("span",{className:"rounded-full bg-cream-200 px-1.5 py-0.5 text-[10px] font-bold text-gold-deep",children:[y.hotel.stars,"â
"]})]}),e.jsx(ed,{tier:M,city:y.id,b:t,selectTier:fe,go:o,goRoomsWith:K,...a&&y.stop?(()=>{const je=ce(y.id),Se=(je==null?void 0:je.checkIn)||y.stop.checkIn,We=(je==null?void 0:je.checkOut)||y.stop.checkOut;return{hotel:y.hotel,cityLabel:y.stop.label,nights:Number((je==null?void 0:je.nights)??y.stop.nights)||0,dateRange:Se&&We?`${te(Se)} â ${te(We)}`:null,holy:y.holy}})():{}}),A===0&&$.length>1&&e.jsx(cn,{onClick:Q,className:"mt-4"})]},y.id))}),e.jsx(cn,{onClick:Q,className:"mt-5"}),W&&e.jsxs("div",{className:"mt-7",children:[e.jsxs("h4",{className:"mb-3 flex items-center gap-2 font-display text-[1.35rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:M.icon,className:"h-5 w-5 shrink-0 text-gold-deep"}),i("reservation:hotels.categoryVideoPrefix"),e.jsx("span",{className:"text-gold-deep",children:String(M.label).toLowerCase()}),i("reservation:hotels.categoryVideoSuffix")]}),e.jsxs("div",{className:"relative overflow-hidden rounded-2xl border border-ink/8 shadow-soft",children:[e.jsx("video",{ref:Z,src:W,autoPlay:!0,muted:!0,loop:!0,playsInl
402ine:!0,preload:"metadata",onLoadStart:()=>k(!1),className:"aspect-video w-full object-cover"},W),e.jsxs("span",{className:"absolute left-3 top-3 inline-flex items-center gap-1.5 rounded-full bg-navy/85 px-3 py-1 text-[11px] font-bold uppercase tracking-wide text-cream-100 backdrop-blur",children:[e.jsx(h,{name:M.icon,className:"h-3.5 w-3.5 text-gold-light"})," ",M.label]}),e.jsx("button",{type:"button",onClick:()=>{const y=Z.current,A=!V;y&&(y.muted=!A,A&&y.play().catch(()=>{})),k(A)},"aria-label":i(V?"reservation:hotels.muteSound":"reservation:hotels.enableSound"),className:"absolute bottom-3 right-3 inline-flex items-center gap-1.5 rounded-full bg-navy/85 px-3 py-1.5 text-[11px] font-bold text-cream-100 backdrop-blur transition hover:bg-navy",children:i(V?"reservation:hotels.soundOn":"reservation:hotels.soundOff")})]})]})]}),e.jsx(hr,{className:"lg:order-first",b:t,go:o,step:"hotels",combine:!!a,tripLabel:a?a.tripLabel:void 0,heroImg:a?a.heroImg:void 0,firstHref:a?"/omra-combinee":void 0})]}),e.jsx(cn,{onClick:Q,className:"mt-2"})]})})}function ed({tier:t,city:n,b:o,selectTier:a,go:s,goRoomsWith:i,hotel:l,cityLabel:d,nights:c,dateRange:m,holy:g=!0}){const{t:N}=it(),[u,p]=b.useState("nearby"),x=l||(n==="mk"?t.mk:t.md),j=d||N(n==="mk"?"reservation:common.makkah":"reservation:common.medina"),C=c??(n==="mk"?o.nightsMakkah||0:o.nightsMedina||0),U=m!==void 0?m:(()=>{let I=null;try{I=localStorage.getItem("departureDate")}catch{}if(!I)return null;const L=(R,_)=>{const be=new Date(R);return be.setDate(be.getDate()+_),be},me=at(I),Z=L(me,o.nightsMedina||0),V=n==="md"?me:Z,k=n==="md"?Z:L(Z,o.nightsMakkah||0);return`${Bt(V)} â ${Bt(k)}`})();return e.jsxs(e.Fragment,{children:[x.chain_logo&&e.jsx("div",{className:"mb-3 flex justify-end",children:e.jsx("div",{className:"rounded-xl border border-ink/10 bg-white px-3 py-2 shadow-soft",children:e.jsx("img",{src:x.chain_logo,alt:N("reservation:hotels.chain"),className:"h-9 object-contain",onError:I=>{I.target.style.display="none"}})})}),e.jsx(fr,{hotel:x,cityLabel:j,fallbackImg:t.catImg,nights:C,dateRange:U}),g&&e.jsxs("div",{className:"mt-3 rounded-xl bg-cream-100 px-3.5 py-2.5",children:[e.jsx("p",{className:"mb-1.5 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:N("reservation:hotels.prayerSpirituality")}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 text-[12.5px] font-medium text-ink-soft",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"kaaba",className:"h-4 w-4 text-[var(--accent)]"})," ",N(n==="md"?"reservation:hotels.prophetMosqueNearby":"reservation:hotels.directHaramAccess")]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"check",className:"h-4 w-4 text-[var(--accent)]"})," ",N("reservation:hotels.adhan")]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"compass",className:"h-4 w-4 text-[var(--accent)]"})," ",N("reservation:hotels.musalla")]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"sparkle",className:"h-4 w-4 text-[var(--accent)]"})," ",N("reservation:hotels.qibla")]}),x.stars>=5&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"users",className:"h-4 w-4 text-[var(--accent)]"})," ",N("reservation:hotels.imam")]})]})]}),e.jsx("div",{className:"mt-4 flex justify-end",children:e.jsxs("button",{type:"button",onClick:()=>i?i(t):(a(t),s("rooms")),className:"inline-flex items-center gap-2 rounded-full bg-red-brand px-6 py-3 text-[15px] font-bold text-white shadow-soft transition-colors hover:bg-red-deep",children:[e.jsx(h,{name:"check",className:"h-4 w-4"})," ",N("reservation:hotels.selectTheseHotels2",{label:Ks(t.label)})]})}),(()=>{const I=(x.faq_sections||[]).filter(k=>(k.items||[]).some(R=>R.question||R.answer)),L=(x.nearby_places||[]).length>0||!!x.image_localisation,me=(x.equipments||[]).length>0,Z=[{key:"overview",label:N("reservation:hotels.tabOverview"),icon:"globe"},...L?[{key:"nearby",label:N("reservation:hotels.hotelLocation"),icon:"pin"}]:[],...I.map((k,R)=>({key:`faq-${R}`,label:k.title,icon:"kaaba"})),...me?[{key:"equipments",label:N("reservation:hotels.tabEquipments"),icon:"shield"}]:[]],V=Z.some(k=>k.key===u)?u:"overview";return e.jsxs("div",{className:"mt-6",children:[e.jsx("div",{className:"no-sb flex items-center gap-1 overflow-x-auto border-b border-ink/8",children:Z.map(k=>e.jsxs("button",{onClick:()=>p(k.key),className:`flex shrink-0 items-center gap-1.5 border-b-2 px-3.5 py-2.5 text-[13px] font-semibold transition-colors ${V===k.key?"border-[var(--accent)] text-navy":"border-transparent text-ink-mute hover:text-ink"}`,children:[e.jsx(h,{name:k.icon,className:`h-4 w-4 ${V===k.key?"text-gold-deep":""}`})," ",k.label]},k.key))}),e.jsxs("div",{className:"mt-4",children:[V==="overview"&&e.jsxs(e.Fragment,{children:[(x.quick_facts||[]).length>0&&e.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:x.quick_facts.filter(k=>k.label).map((k,R)=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-xl border border-ink/10 bg-white px-3 py-2 text-[12.5px] font-medium text-ink-soft shadow-soft",children:[e.jsx(Qr,{icon:k.icon,className:"h-4 w-4 shrink-0 text-gold-deep"}),k.label]},R))}),x.description&&e.jsx("p",{className:"mt-4 text-[13.5px] leading-relaxed text-ink-soft",children:x.description}),(x.highlights||[]).length>0&&e.jsxs("div",{className:"mt-4",children:[e.jsx("p",{className:"mb-2.5 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:N("reservation:hotels.strongPoints")}),e.jsx("div",{className:"flex flex-wrap gap-x-6 gap-y-2",children:x.highlights.filter(k=>k.label).map((k,R)=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[13px] font-medium text-ink-soft",children:[e.jsx(Qr,{icon:k.icon||"etoile",className:"h-4 w-4 shrink-0 text-gold-deep"})," ",k.label]},R))})]}),e.jsxs("p",{className:"mt-4 flex items-center gap-2 rounded-xl border border-ink/8 px-3.5 py-2.5 text-[12.5px] text-ink-soft",children:[e.jsx(h,{name:"star",className:"h-4 w-4 shrink-0 text-navy"})," ",N("reservation:hotels.mealRoomNotePrefix"),e.jsx("strong",{className:"text-ink",children:N("reservation:hotels.mealRoomNoteBold")}),N("reservation:hotels.mealRoomNoteSuffix")]})]}),V==="nearby"&&e.jsxs(e.Fragment,{children:[x.image_localisation&&e.jsx("div",{className:"mb-4 overflow-hidden rounded-2xl border border-ink/8 shadow-soft",children:e.jsx("img",{src:x.image_localisation,alt:N("reservation:hotels.hotelLocationAlt",{name:x.name}),loading:"lazy",className:"w-full object-cover",onError:k=>{k.target.closest("div").style.display="none"}})}),e.jsx(Ac,{places:x.nearby_places,hideHeader:!0})]}),V.startsWith("faq-")&&e.jsx(Rc,{sections:[I[Number(V.slice(4))]],hideHeader:!0}),V==="equipments"&&e.jsx(Bc,{groups:x.equipments})]})]})})()]})}function td({scope:t=""}){const{t:n}
402=it(),o=[["pin","reservation:hotelEditorial.crit1Title","reservation:hotelEditorial.crit1Desc"],["compass","reservation:hotelEditorial.crit2Title","reservation:hotelEditorial.crit2Desc"],["star","reservation:hotelEditorial.crit3Title","reservation:hotelEditorial.crit3Desc"],["sparkle","reservation:hotelEditorial.crit4Title","reservation:hotelEditorial.crit4Desc"],["check","reservation:hotelEditorial.crit5Title","reservation:hotelEditorial.crit5Desc"]];return e.jsxs("section",{className:"mt-10 overflow-hidden rounded-3xl border border-ink/8 bg-white shadow-soft",children:[e.jsxs("div",{className:"border-b border-ink/8 bg-cream-100 px-6 py-7 sm:px-9",children:[e.jsxs("p",{className:"flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.18em] text-gold-deep",children:[e.jsx("span",{className:"h-px w-7 bg-[var(--accent)]"})," ",n("reservation:hotelEditorial.eyebrow")]}),e.jsx("h2",{className:"mt-3 font-display text-[clamp(1.5rem,3vw,2.2rem)] leading-tight text-ink",children:n("reservation:hotelEditorial.h2")}),t&&e.jsx("p",{className:"mt-2 inline-flex items-center gap-1.5 rounded-full border border-gold-deep/30 bg-gold-light/15 px-3 py-1 text-[12.5px] font-semibold text-gold-deep",children:t}),e.jsx("p",{className:"mt-3 max-w-3xl text-[14.5px] leading-relaxed text-ink-soft",children:n("reservation:hotelEditorial.intro")})]}),e.jsxs("div",{className:"px-6 py-7 sm:px-9",children:[e.jsx("h3",{className:"font-display text-[1.4rem] text-ink",children:n("reservation:hotelEditorial.criteriaTitle")}),e.jsx("p",{className:"mt-2 max-w-3xl text-[14px] leading-relaxed text-ink-soft",children:n("reservation:hotelEditorial.criteriaIntro")}),e.jsx("div",{className:"mt-5 grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:o.map(([a,s,i])=>e.jsxs("div",{className:"flex gap-3 rounded-2xl border border-ink/8 bg-cream-100 p-4",children:[e.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-xl bg-white text-navy",children:e.jsx(h,{name:a,className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-display text-[1.05rem] leading-tight text-ink",children:n(s)}),e.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-ink-mute",children:n(i)})]})]},s))}),e.jsx("p",{className:"mt-4 max-w-3xl text-[13.5px] leading-relaxed text-ink-soft",children:n("reservation:hotelEditorial.criteriaClosing")}),e.jsxs("div",{className:"mt-7 grid gap-6 lg:grid-cols-2",children:[e.jsxs("article",{className:"rounded-2xl border border-ink/8 p-5",children:[e.jsxs("h4",{className:"flex items-center gap-2 font-display text-[1.25rem] text-navy",children:[e.jsx(h,{name:"kaaba",className:"h-5 w-5 text-[var(--accent)]"})," ",n("reservation:hotelEditorial.makkahH4")]}),e.jsxs("p",{className:"mt-2 text-[13.5px] leading-relaxed text-ink-soft",children:[n("reservation:hotelEditorial.makkahP1"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.makkahStrong1")}),n("reservation:hotelEditorial.makkahP2"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.makkahStrong2")}),n("reservation:hotelEditorial.makkahP3"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.makkahStrong3")}),n("reservation:hotelEditorial.makkahP4")]})]}),e.jsxs("article",{className:"rounded-2xl border border-ink/8 p-5",children:[e.jsxs("h4",{className:"flex items-center gap-2 font-display text-[1.25rem] text-navy",children:[e.jsx(h,{name:"compass",className:"h-5 w-5 text-emerald-600"})," ",n("reservation:hotelEditorial.medinaH4")]}),e.jsxs("p",{className:"mt-2 text-[13.5px] leading-relaxed text-ink-soft",children:[n("reservation:hotelEditorial.medinaP1"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.medinaStrong1")}),n("reservation:hotelEditorial.medinaP2"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.medinaStrong2")}),n("reservation:hotelEditorial.medinaP3"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.medinaStrong3")}),n("reservation:hotelEditorial.medinaP4")]})]})]}),e.jsxs("div",{className:"mt-8",children:[e.jsx("h3",{className:"font-display text-[1.4rem] text-ink",children:n("reservation:hotelEditorial.locationsTitle")}),e.jsx("p",{className:"mt-1 text-[13.5px] text-ink-soft",children:n("reservation:hotelEditorial.locationsIntro")}),e.jsxs("div",{className:"mt-4 grid gap-6 sm:grid-cols-2",children:[e.jsxs("article",{className:"overflow-hidden rounded-2xl border border-ink/8 bg-white",children:[e.jsxs("div",{className:"relative aspect-video w-full overflow-hidden bg-cream-100",children:[e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 text-ink-mute",children:[e.jsx(h,{name:"kaaba",className:"h-8 w-8 text-[var(--accent)]/40"}),e.jsx("span",{className:"text-[12px]",children:n("reservation:hotelEditorial.imageToAdd")}
402)]}),e.jsx("img",{src:"/hotels/mek.jpeg",alt:n("reservation:hotelEditorial.makkahMapAlt"),width:1600,height:900,loading:"lazy",className:"relative h-full w-full object-cover",onError:a=>{a.target.style.display="none"}})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("h4",{className:"flex items-center gap-2 font-display text-[1.2rem] text-navy",children:[e.jsx(h,{name:"kaaba",className:"h-5 w-5 text-[var(--accent)]"})," ",n("reservation:hotelEditorial.makkahCardH4")]}),e.jsxs("p",{className:"mt-2 text-[13.5px] leading-relaxed text-ink-soft",children:[n("reservation:hotelEditorial.makkahCardP1"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.makkahCardStrong1")}),n("reservation:hotelEditorial.makkahCardP2"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.makkahCardStrong2")}),n("reservation:hotelEditorial.makkahCardP3")]})]})]}),e.jsxs("article",{className:"overflow-hidden rounded-2xl border border-ink/8 bg-white",children:[e.jsxs("div",{className:"relative aspect-video w-full overflow-hidden bg-cream-100",children:[e.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 text-ink-mute",children:[e.jsx(h,{name:"compass",className:"h-8 w-8 text-emerald-600/40"}),e.jsx("span",{className:"text-[12px]",children:n("reservation:hotelEditorial.imageToAdd")})]}),e.jsx("img",{src:"/hotels/med.jpeg",alt:n("reservation:hotelEditorial.medinaMapAlt"),width:1600,height:900,loading:"lazy",className:"relative h-full w-full object-cover",onError:a=>{a.target.style.display="none"}})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("h4",{className:"flex items-center gap-2 font-display text-[1.2rem] text-navy",children:[e.jsx(h,{name:"compass",className:"h-5 w-5 text-emerald-600"})," ",n("reservation:hotelEditorial.medinaCardH4")]}),e.jsxs("p",{className:"mt-2 text-[13.5px] leading-relaxed text-ink-soft",children:[n("reservation:hotelEditorial.medinaCardP1"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.medinaCardStrong1")}),n("reservation:hotelEditorial.medinaCardP2"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.medinaCardStrong2")}),n("reservation:hotelEditorial.medinaCardP3"),e.jsx("strong",{className:"text-ink",children:n("reservation:hotelEditorial.medinaCardStrong3")}),n("reservation:hotelEditorial.medinaCardP4")]})]})]})]})]}),e.jsxs("div",{className:"mt-6 rounded-2xl bg-cream-100 p-5",children:[e.jsx("h4",{className:"font-display text-[1.25rem] text-ink",children:n("reservation:hotelEditorial.premiumH4")}),e.jsx("p",{className:"mt-2 max-w-3xl text-[13.5px] leading-relaxed text-ink-soft",children:n("reservation:hotelEditorial.premiumP")})]})]})]})}function Qi(t){const n=b.useRef(t);n.current=t,b.useEffect(()=>{const o=a=>{var s;a.key==="Escape"&&((s=n.current)==null||s.call(n))};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[])}function sd({combo:t,initialCity:n,initialTab:o,vueMk:a,vueMd:s,pension:i,hotelMk:l,hotelMd:d,starsMk:c,starsMd:m,ppFor:g,n:N,grandTotal:u,cur:p,trip:x,roomImages:j,roomImagesMd:C,roomMeta:U,roomImagesByView:I,roomMetaByView:L,onClose:me,onPrev:Z,onNext:V}){var A,je,Se,We,Ze,O,pe,Ue;const{t:k}=it();Qi(me);const R=ya(t).map(H=>[H.ty,H.count,H.shared,H.persons]),[_,be]=b.useState(n==="md"?"md":"mk"),[Y,Q]=b.useState(Number(o)>0?Number(o):0),[z,fe]=b.useState(!1),[K,E]=b.useState(0),[B,M]=b.useState(!1);b.useEffect(()=>{E(0),M(!1)},[Y,_,t]);const q=_==="mk"?l:d,ce=_==="mk"?a:s,te=Math.max(0,Math.min(Y,R.length-1)),$=((A=R[te])==null?void 0:A[0])||"double",W=((je=R[te])==null?void 0:je[1])||1,ye=!!((Se=R[te])!=null&&Se[2]),de=_==="mk"?j:C&&Object.keys(C).length?C:j,ot=_==="mk"?I==null?void 0:I.mk:I==null?void 0:I.md,Ge=(We=ot==null?void 0:ot[$])==null?void 0:We[ce],Be=Ge&&Ge.length?Ge:de&&de[$],ve=(Be&&Be.length?Be:ia[$]||[ua[$]]).filter((H,Ae,De)=>De.indexOf(H)===Ae),le=(q||"").split("â")[0].trim(),Te=_==="mk"?c:m,ue=_==="mk"?L==null?void 0:L.mk:L==null?void 0:L.md,$e=((Ze=ue==null?void 0:ue[$])==null?void 0:Ze[ce])||((O=_==="mk"?U==null?void 0:U.mk:U==null?void 0:U.md)==null?void 0:O[$]),oe=(Ue=(pe=$e==null?void 0:$e.amen)==null?void 0:pe.salat)!=null&&Ue.length?$e.amen.salat:null,Ve=$e!=null&&$e.amen?[[k("reservation:roomModal.roomEquipments"),$e.amen.confort],[k("reservation:roomModal.bathroom"),$e.amen.bain],[k("reservation:roomModal.misc"),$e.amen.divers]].filter(([,H])=>H.length):[],y=({title:H,items:Ae})=>e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 font-display text-[1.05rem] text-ink",children:H}),e.jsx("ul",{className:"space-y-1",children:Ae.map(De=>e.jsxs("li",{className:"flex items-start gap-1.5 text-[12.5px] text-ink-soft",children:[e.jsx("span",{className:"mt-1.5 h-1 w-1 shrink-0 rounded-full bg-[var(--accent)]"})," ",De]},De))})]});return e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":k("reservation:rooms.details"),className:"fixed inset-0 z-[70] flex items-stretch justify-center p-1.5 sm:items-center sm:p-4",onClick:me,children:[e.jsx("div",{className:"absolute inset-0 bg-ink/75 backdrop-blur-sm"}),e.jsxs("div",{className:"relative flex h-full max-h-[98vh] w-full max-w-[1280px] flex-col overflow-hidden rounded-[22px] bg-cream-100 shadow-lift sm:h-auto",onClick:H=>H.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center gap-3 border-b border-ink/8 bg-white px-4 py-3",children:[Z&&e.jsx("button",{onClick:Z,className:"grid h-9 w-9 shrink-0 place-items-center rounded-full border border-ink/15 text-navy hover:border-navy hover:bg-cream-100",children:e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})}),e.jsx("div",{className:"hidden items-center gap-1 rounded-full bg-cream-200 p-1 sm:flex",children:[["mk",k("reservation:common.makkah"),"kaaba"],["md",k("reservation:common.medina"),"compass"]].map(([H,Ae,De])=>e.jsxs("button",{onClick:()=>be(H),className:`flex items-center gap-1.5 rounded-full px-3 py-1.5 text-[12.5px] font-bold transition-colors ${_===H?"bg-navy text-cream-100 shadow-soft":"text-ink-soft hover:text-navy"}`,children:[e.jsx(h,{name:De,className:`h-3.5 w-3.5 ${_===H?"text-gold-light":"text-[var(--accent)]"}`})," ",Ae]},H))}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsxs("h3",{className:"truncate font-display text-[1.2rem] text-navy",children:[le," ",e.jsxs("span",{className:"text-[var(--accent)]",children:[Te,"â
"]}
402)]})}),V&&e.jsxs("button",{onClick:V,title:k("reservation:roomModal.discoverOthers"),className:"flex shrink-0 items-center gap-2 rounded-full border border-ink/15 px-3 py-2 text-navy transition-colors hover:border-navy hover:bg-cream-100",children:[e.jsx("span",{className:"hidden text-[12.5px] font-semibold lg:inline",children:k("reservation:roomModal.discoverOthers")}),e.jsx(h,{name:"chevron",className:"h-4 w-4 -rotate-90"})]})]}),e.jsx("div",{className:"flex items-center gap-1 border-b border-ink/8 bg-cream-100 px-4 py-2 sm:hidden",children:[["mk",k("reservation:common.makkah"),"kaaba"],["md",k("reservation:common.medina"),"compass"]].map(([H,Ae,De])=>e.jsxs("button",{onClick:()=>be(H),className:`flex flex-1 items-center justify-center gap-1.5 rounded-full px-3 py-1.5 text-[12.5px] font-bold transition-colors ${_===H?"bg-navy text-cream-100":"bg-white text-ink-soft"}`,children:[e.jsx(h,{name:De,className:`h-3.5 w-3.5 ${_===H?"text-gold-light":"text-[var(--accent)]"}`})," ",Ae]},H))}),e.jsxs("div",{className:"no-sb flex items-center justify-between gap-2 border-b border-ink/8 bg-white px-4",children:[e.jsx("div",{className:"flex items-center gap-1",children:R.map(([H,Ae,De],J)=>e.jsxs("button",{onClick:()=>{Q(J),fe(!1)},className:`flex shrink-0 items-center gap-1.5 border-b-2 px-3.5 py-2.5 text-[13px] font-semibold transition-colors ${J===te&&!z?"border-[var(--accent)] text-navy":"border-transparent text-ink-mute hover:text-ink"}`,children:[e.jsx(h,{name:"kaaba",className:`h-3.5 w-3.5 ${J===te&&!z?"text-[var(--accent)]":"text-ink-mute"}`})," ",De?k("reservation:roomModal.sharedBed",{c:Ae,type:Rt[H][0]}):k("reservation:roomModal.roomType",{c:Ae,type:Rt[H][0]})," ",e.jsxs("span",{className:"font-normal text-ink-mute",children:["(",le,")"]})]},`${H}-${De?"sh":"fl"}`))}),e.jsxs("span",{className:"hidden shrink-0 items-center gap-1.5 text-[12px] font-semibold text-ink-soft sm:flex",children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 text-[var(--accent)]"}),k("reservation:roomModal.stayFrom")," ",e.jsx("strong",{className:"text-ink",children:_==="mk"?x==null?void 0:x.mkIn:x==null?void 0:x.mdIn})," ",k("reservation:roomModal.stayTo")," ",e.jsx("strong",{className:"text-ink",children:_==="mk"?x==null?void 0:x.mkOut:x==null?void 0:x.mdOut})," ",k("reservation:roomModal.stayIn")," ",e.jsx("strong",{className:"text-ink",children:String(i||"").toLowerCase()})]})]}),z?e.jsx("div",{className:"no-sb min-h-0 flex-1 overflow-y-auto p-5 sm:p-7",children:e.jsxs("div",{className:"mx-auto max-w-[640px]",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(h,{name:"sparkle",className:"h-5 w-5 text-red-brand"}),e.jsx("h4",{className:"font-display text-[1.5rem] text-navy",children:k("reservation:roomModal.offerDetail")})]}),e.jsxs("p",{className:"mt-1 text-[13.5px] text-ink-soft",children:[k("reservation:roomModal.ppNotePrefix"),e.jsx("strong",{className:"text-ink",children:k("reservation:roomModal.ppTravelers",{count:N})}),k("reservation:roomModal.ppNoteMid"),e.jsx("strong",{className:"text-ink",children:k("reservation:roomModal.twoHolyCities")}),k("reservation:roomModal.ppNoteSuffix")]}),e.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:[["plane",k("reservation:summary.featVols")],["shield",k("reservation:summary.featVisa")],["car",k("reservation:summary.featTransfers")],["kaaba",k("reservation:roomModal.hotels2cities")],["compass",k("reservation:summary.featVisits")],["star",i]].map(([H,Ae])=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-cream-200 px-3 py-1.5 text-[12px] font-semibold text-navy",children:[e.jsx(h,{name:H,className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",Ae]},Ae))}),x&&e.jsxs("div",{className:"mt-5 grid gap-2.5 sm:grid-cols-3",children:[e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:[e.jsx(h,{name:"plane",className:"h-3.5 w-3.5"})," ",k("reservation:common.flight")]}),e.jsx("p",{className:"mt-1 text-[13px] font-bold text-navy",children:x.airline}),e.jsxs("p",{className:"text-[12px] text-ink-soft",children:[x.city," · ",k("reservation:roomModal.departLabel")," ",x.date]}),e.jsxs("p",{className:"text-[12px] text-ink-soft",children:[k("reservation:roomModal.returnLabel")," ",x.returnDate]})]}),e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:[e.jsx(h,{name:"kaaba",className:"h-3.5 w-3.5"})," ",k("reservation:common.makkah")]}),e.jsx("p",{className:"mt-1 text-[13px] font-bold text-navy",children:(l||"").split("â")[0].trim()}),e.jsx("p",{className:"text-[12px] text-ink-soft",children:k("reservation:common.nights6",{count:x.nightsMakkah})}),e.jsx("p",{className:"text-[12px] text-ink-soft",children:i})]}),e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-3.5",children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:[e.jsx(h,{name:"compass",className:"h-3.5 w-3.5"})," ",k("reservation:common.medina")]}),e.jsx("p",{className:"mt-1 text-[13px] font-bold text-navy",children:(d||"").split("â")[0].trim()}),e.jsx("p",{className:"text-[12px] text-ink-soft",children:k("reservation:common.nights6",{count:x.nightsMedina})}),e.jsx("p",{className:"text-[12px] text-ink-soft",children:i})]})]}),e.jsxs("div",{className:"mt-5 overflow-hidden rounded-2xl border-2 border-red-brand/35",children:[e.jsx("p",{className:"bg-red-brand/[0.06] px-4 py-2.5 text-[11px] font-bold uppercase tracking-wider text-red-brand",children:k("reservation:roomModal.detailByRoomType")}),e.jsx("div",{className:"divide-y divide-ink/8 px-4",children:R.map(([H,Ae,De,J])=>{const ie=De?J:Ae*Rt[H][1],Ee=g?g(H):0;return e.jsxs("div",{className:"flex items-center justify-between gap-3 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[13.5px] font-semibold text-ink",children:De?k("reservation:roomModal.sharedLine",{persons:ie,s:ie>1?"s":"",c:Ae,s2:Ae>1?"s":"",type:Rt[H][0].toLowerCase()}):k("reservation:roomModal.fullLine",{persons:ie,s:ie>1?"s":"",type:Rt[H][0].toLowerCase(),extra:Ae>1?k("reservation:roomModal.roomCountSuffix",{c:Ae}):""})}),e.jsxs("p",{className:"text-[12px] text-ink-mute",children:[se(Ee,p)," ",k("reservation:roomModal.perPax")," à ",ie]})]}),e.jsx("span",{className:"font-display text-[1.2rem] text-navy",children:se(Ee*ie,p)})]},`${H}-${De?"sh":"fl"}`)})}),e.jsxs("div",{className:"bg-navy-deep px-4 py-3.5 text-cream-100",children:[e.jsxs("div",{className:"flex items-end justify-between gap-3",children:[e.jsxs("span",{className:"text-[13px] font-bold",children:[k("reservation:roomModal.totalTravelers",{n:N,s:N>1?"s":""})," ",e.jsx("span",{className:"font-normal text-cream-100/70",children:k("reservation:roomModal.times2cities")})]}),e.jsx("span",{className:"font-display text-[1.9rem] leading-none text-white",children:se(u,p)})]}),e.jsxs("p",{className:"mt-1.5 flex items-center gap-1.5 text-[11px] font-medium text-cream-100/75",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5 shrink-0 text-gold-light"})," ",k("reservation:roomModal.included"),String(p).toUpperCase()!=="EUR"?k("reservation:roomModal.plusVisa"):"","."]})]})]}),e.jsxs("p",{className:"mt-2 flex items-center justify-between text-[12.5px] text-ink-mute",children:[e.jsx("span",{children:k("reservation:roomModal.avgPerPax",{price:se(Math.round(u/N),p)})}),e.jsx("span",{className:"font-semibold text-navy",children:k("reservation:roomModal.payOneThird")})]})]})}):e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsxs("div",{className:"grid gap-0 lg:grid-cols-[minmax(0,1.25fr)_minmax(0,1fr)] lg:items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-col bg-ink/[0.03] p-3 lg:sticky lg:top-0",children:[e.jsxs("div",{className:"relative h-[240px] overflow-hidden rounded-2xl sm:h-[300px] lg:h-[330px]",children:[e.jsx(ls,{dark:!0,label:k("reservation:roomModal.roomLabel",{type:Rt[$][0]}),src:ve[K],className:"absolute inset-0"}),e.jsxs("span",{className:"absolute left-3 top-3 flex items-center gap-1.5 rounded-full bg-ink/65 px-3 py-1.5 text-[12px] font-semibold text-white backdrop-blur",children:[e.jsx(h,{name:"users",className:"h-3.5 w-3.5"})," ",k("reservation:roomModal.persons",{count:Rt[$][1]})]}),ve.length>1&&e.jsxs(us.Fragment,{children:[e.jsx("button",{onClick:()=>E(H=>(H-1+ve.length)%ve.length),className:"absolute left-3 top-1/2 grid h-10 w-10 -translate-y-1/2 place-items-center rounded-full bg-white/90 text-navy shadow-lift hover:bg-white",children:e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})}),e.jsx("button",{onClick:()=>E(H=>(H+1)%ve.length),className:"absolute right-3 top-1/2 grid h-10 w-10 -translate-y-1/2 place-items-center rounded-full bg-white/90 text-navy shadow-lift hover:bg-white",children:e.jsx(h,{name:"chevron",className:"h-4 w-4 -rotate-90"})}),e.jsxs("span",{className:"absolute bottom-3 right-3 rounded-full bg-ink/60 px-2.5 py-1 text-[11px] font-bold text-white",children:[K+1,"/",ve.length]})]})]}),ve.length>1&&e.jsx("div",{className:"no-sb mt-2 flex shrink-0 gap-2 overflow-x-auto",children:ve.map((H,Ae)=>e.jsx("button",{onClick:()=>E(Ae),className:`relative h-14 w-20 shrink-0 overflow-hidden rounded-lg transition-all ${Ae===K?"ring-2 ring-[var(--accent)] ring-offset-1":"opacity-65 hover:opacity-100"}`,children:e.jsx(ls,{dark:!0,label:k("reservation:roomModal.roomLabel",{type:Rt[$][0]}),src:H,className:"absolute inset-0"})},Ae))})]}),e.jsxs("div",{className:"min-w-0 p-4 lg:p-5",children:[e.jsxs("h4",{className:"font-display text-[1.5rem] leading-none text-navy",children:[le," ",e.jsxs("span",{className:"text-[1.1rem] text-[var(--accent)]",children:[Te,"â
"]}
402)]}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1",children:[e.jsx("p",{className:"font-display text-[1.25rem] text-navy/85",children:ye?k("reservation:roomModal.sharedBedLine",{c:W,type:Rt[$][0]}):k("reservation:roomModal.roomType",{c:W,type:Rt[$][0]})}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-cream-200 px-2.5 py-1 text-[12px] font-semibold text-navy",children:[e.jsx(h,{name:"kaaba",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",k("reservation:roomModal.viewPrefix")," ",String(ce||k("reservation:roomModal.standard")).replace(/^Vue\s*/i,"").toLowerCase()||k("reservation:roomModal.standard")]}),($e==null?void 0:$e.surface)!=null&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-cream-200 px-2.5 py-1 text-[12px] font-semibold text-navy",children:[e.jsx(h,{name:"compass",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",$e.surface," m²"]}),($e==null?void 0:$e.bedComposition)&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-cream-200 px-2.5 py-1 text-[12px] font-semibold text-navy",children:[e.jsx(h,{name:"users",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",$e.bedComposition]})]}),e.jsxs("div",{className:"mt-2 grid gap-1 rounded-xl border border-ink/10 bg-cream-100/60 p-2.5 sm:grid-cols-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-[12.5px] text-ink-soft",children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",k("reservation:roomModal.checkIn")," ",e.jsx("strong",{className:"text-ink",children:_==="mk"?x==null?void 0:x.mkIn:x==null?void 0:x.mdIn})]}),e.jsxs("p",{className:"flex items-center gap-1.5 text-[12.5px] text-ink-soft",children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",k("reservation:roomModal.checkOut")," ",e.jsx("strong",{className:"text-ink",children:_==="mk"?x==null?void 0:x.mkOut:x==null?void 0:x.mdOut})]}),e.jsxs("p",{className:"flex items-center gap-1.5 text-[12.5px] text-ink-soft",children:[e.jsx(h,{name:"clock",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",e.jsx("strong",{className:"text-ink",children:k("reservation:common.nights6",{count:_==="mk"?x==null?void 0:x.nightsMakkah:x==null?void 0:x.nightsMedina})})]}),e.jsxs("p",{className:"flex items-center gap-1.5 text-[12.5px] text-ink-soft",children:[e.jsx(h,{name:"kaaba",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",k("reservation:roomModal.viewLabel")," ",e.jsx("strong",{className:"text-ink",children:String(ce||k("reservation:roomModal.cityView"))})]}),e.jsxs("p",{className:"flex items-center gap-1.5 text-[12.5px] text-ink-soft sm:col-span-2",children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",k("reservation:roomModal.pensionLabel")," ",e.jsx("strong",{className:"text-ink",children:i})]})]}),$e!=null&&$e.description?e.jsxs("p",{className:"mt-2 text-[13px] leading-relaxed text-ink-soft",children:[B||$e.description.length<=180?$e.description:$e.description.slice(0,180)+"â¦",$e.description.length>180&&e.jsx("button",{onClick:()=>M(H=>!H),className:"ml-1 font-bold text-navy",children:k(B?"reservation:roomModal.reduce":"reservation:roomModal.readMore")})]}):e.jsxs("p",{className:"mt-2 text-[13px] leading-relaxed text-ink-soft",children:[k("reservation:roomModal.genDescPrefix",{type:Rt[$][0],hotel:le,count:Rt[$][1],s:Rt[$][1]>1?"s":""}),B?k("reservation:roomModal.genDescMore"):"â¦",e.jsx("button",{onClick:()=>M(H=>!H),className:"ml-1 font-bold text-navy",children:k(B?"reservation:roomModal.reduce":"reservation:roomModal.readMore")})]}),e.jsxs("div",{className:"mt-3 rounded-xl border border-[var(--accent)]/35 bg-[var(--accent)]/[0.07] p-3",children:[e.jsxs("p",{className:"mb-1.5 flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:[e.jsx(h,{name:"kaaba",className:"h-4 w-4 text-[var(--accent)]"})," ",k("reservation:roomModal.salatStrong")]}),e.jsx("div",{className:"grid gap-x-6 gap-y-1 sm:grid-cols-2",children:(oe||[k("reservation:roomModal.salat1"),k("reservation:roomModal.salat2"),k("reservation:roomModal.salat3"),k("reservation:roomModal.salat4"),k("reservation:roomModal.salat5"),k("reservation:roomModal.salat6")]).map(H=>e.jsxs("span",{className:"flex items-center gap-2 text-[12.5px] font-medium text-ink",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",H]},H))})]}),e.jsx("div",{className:"mt-3 grid gap-x-6 gap-y-2.5 sm:grid-cols-2 lg:grid-cols-3",children:Ve.length?Ve.map(([H,Ae])=>e.jsx(y,{title:H,items:Ae},H)):Object.entries(qo).map(([H,Ae])=>e.jsx(y,{title:H,items:Ae},H))})]})]})}),e.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-ink/8 bg-white px-4 py-3",children:[e.jsxs("p",{className:"truncate text-[12.5px] text-ink-mute",children:[le," · ",R.map(([H,Ae])=>`${Ae}à ${Rt[H][0]}`).join(" + ")]}),e.jsx("button",{onClick:me,className:"rounded-full border-2 border-navy px-6 py-2 text-[13.5px] font-bold text-navy transition-colors hover:bg-navy hover:text-cream-100",children:k("reservation:common.close")})]})]})]})}function mn({img:t,eyebrow:n,titre:o,texte:a,prix:s,onClick:i,aria:l}){return e.jsxs("button",{type:"button",onClick:i,"aria-label":l,className:"group/t flex w-full flex-col overflow-hidden rounded-2xl border border-ink/10 bg-white text-left shadow-lift transition-transform duration-300 hover:-translate-y-0.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[e.jsx("span",{className:"relative block aspect-[16/10] w-full overflow-hidden bg-ink/10",children:e.jsx(ls,{dark:!0,sizes:"(max-width: 640px) 92vw, (max-width: 1280px) 46vw, 380px",label:"",src:t,className:"absolute inset-0 transition-transform duration-[600ms] group-hover/t:scale-[1.05]"})}),e.jsxs("span",{className:"flex flex-1 flex-col items-start gap-0.5 p-3.5 sm:p-4",children:[n&&e.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.14em] text-gold-deep",children:n}),e.jsx("span",{className:"font-display text-[1.2rem] font-bold leading-tight text-navy sm:text-[1.35rem]",children:o}),a&&e.jsx("span",{className:"text-[13px] leading-snug text-ink-soft",children:a}),s&&e.jsx("span",{className:"mt-1.5 rounded-full bg-navy px-3 py-1 text-[13px] font-bold text-cream-100",children:s})]})]})}function Wi({photos:t,onRoom:n,onHotel:o,hotel:a}){const{t:s}
402=it(),[i,l]=b.useState(0),d=b.useRef(null);if(!t.length)return null;const c=t.length,m=Math.min(i,c-1),g=t[m],N=x=>s(x==="room"?"reservation:rooms.room":"reservation:rooms.hotel"),u=()=>{var j;(j=(g.kind==="room"?n:o)||n||o)==null||j()},p=x=>{var U;const j=(x+c)%c;l(j);const C=(U=d.current)==null?void 0:U.children[j];C==null||C.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})};return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("div",{className:"group/m relative aspect-[4/3] w-full overflow-hidden rounded-xl bg-ink/5",children:[e.jsxs("button",{type:"button",onClick:u,"aria-label":s("reservation:rooms.mosaicOpenAria4",{kind:N(g.kind).toLowerCase(),hotel:a}),className:"absolute inset-0 text-left focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-3px] focus-visible:outline-navy",children:[e.jsx(ls,{dark:!0,sizes:"(max-width: 640px) 92vw, (max-width: 1280px) 42vw, 420px",label:N(g.kind),src:g.src,className:"absolute inset-0 transition-transform duration-[600ms] group-hover/m:scale-[1.04]"}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-ink/35 via-trans
402parent to-transparent"}),e.jsxs("span",{className:"pointer-events-none absolute bottom-2 left-2 rounded-full bg-ink/70 px-2.5 py-1 text-[11.5px] font-bold text-white backdrop-blur",children:[N(g.kind)," · ",m+1,"/",c]})]}),c>1&&[["prev",-1],["next",1]].map(([x,j])=>e.jsx("button",{type:"button",onClick:()=>p(m+j),"aria-label":s(j<0?"reservation:rooms.mosaicPrev4":"reservation:rooms.mosaicNext4"),className:`absolute top-1/2 grid h-8 w-8 -translate-y-1/2 place-items-center rounded-full bg-white/90 text-navy shadow-lift transition-opacity hover:bg-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy ${j<0?"left-2":"right-2"}`,children:e.jsx(h,{name:"arrow",className:`h-4 w-4 ${j<0?"rotate-180":""}`})},x))]}),c>1&&e.jsx("div",{ref:d,className:"flex gap-1.5 overflow-x-auto pb-0.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:t.map((x,j)=>e.jsx("button",{type:"button",onClick:()=>p(j),"aria-label":s("reservation:rooms.mosaicThumbAria4",{n:j+1,total:c,kind:N(x.kind).toLowerCase()}),"aria-current":j===m?"true":void 0,className:`relative h-14 w-[74px] shrink-0 overflow-hidden rounded-lg bg-ink/5 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy ${j===m?"ring-2 ring-navy":"opacity-70 hover:opacity-100"}`,children:e.jsx(ls,{dark:!0,sizes:"80px",label:N(x.kind),src:x.src,className:"absolute inset-0"})},x.src+j))})]})}function br({icon:t,title:n,stars:o,roomSrc:a,hotelSrc:s,planSrc:i,onRoom:l,onHotel:d,onPlan:c,showHeader:m=!0,compact:g=!1,roomAria:N}){const{t:u}=it(),p=({onClick:x,group:j,cls:C,children:U,ariaLabel:I})=>x?e.jsx("button",{type:"button",onClick:x,"aria-label":I,className:`${j} relative overflow-hidden rounded-xl bg-ink/5 text-left ${C}`,children:U}):e.jsx("div",{className:`${j} relative overflow-hidden rounded-xl bg-ink/5 ${C}`,children:U});return g?e.jsxs(p,{onClick:l,group:"group/r",cls:"aspect-[4/3] w-full",ariaLabel:N||u("reservation:rooms.seeRooms"),children:[e.jsx(ls,{dark:!0,sizes:"(max-width: 640px) 92vw, (max-width: 1280px) 42vw, 420px",label:u("reservation:rooms.room"),src:a,className:"absolute inset-0 transition-transform duration-[600ms] group-hover/r:scale-[1.04]"}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-ink/35 via-trans
402parent to-transparent transition-opacity group-hover/r:opacity-75"})]}):e.jsxs("div",{className:"flex flex-1 flex-col",children:[m&&e.jsxs("p",{className:"mb-2 flex items-center gap-2 text-[16px] font-bold leading-tight text-navy",children:[e.jsx(h,{name:t,className:"h-[18px] w-[18px] shrink-0 text-[var(--accent)]"})," ",n," ",e.jsxs("span",{className:"text-[var(--accent)]",children:[o,"â
"]})]}),e.jsxs("div",{className:"flex flex-1 gap-2",children:[e.jsxs(p,{onClick:l,group:"group/r",cls:"min-h-[160px] flex-[1.7]",children:[e.jsx(ls,{dark:!0,sizes:"(max-width: 640px) 92vw, 260px",label:u("reservation:rooms.room"),src:a,className:"absolute inset-0 transition-transform duration-500 group-hover/r:scale-105"}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-ink/0 transition-colors group-hover/r:bg-ink/25"}),e.jsx("span",{className:"absolute bottom-1.5 left-1.5 rounded bg-ink/70 px-2.5 py-1 text-[11.5px] font-bold uppercase tracking-wide text-white backdrop-blur",children:u("reservation:rooms.photosBadge")}),l&&e.jsxs("span",{className:"pointer-events-none absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center gap-1 rounded-full bg-white/95 px-2.5 py-1.5 text-[10.5px] font-bold text-navy opacity-0 shadow-lift transition-opacity group-hover/r:opacity-100",children:[e.jsx(h,{name:"sparkle",className:"h-3 w-3 text-[var(--accent)]"})," ",u("reservation:rooms.seeRooms")]})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-2",children:[e.jsxs(p,{onClick:d,group:"group/h",cls:"min-h-[76px] flex-1",children:[e.jsx(ls,{dark:!0,sizes:"(max-width: 640px) 92vw, 260px",label:u("reservation:rooms.hotel"),src:s,className:"absolute inset-0 transition-transform duration-500 group-hover/h:scale-105"}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-ink/0 transition-colors group-hover/h:bg-ink/25"}),e.jsx("span",{className:"absolute bottom-1 left-1 rounded bg-ink/70 px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wide text-white backdrop-blur",children:u("reservation:rooms.hotel")})]}),e.jsxs(p,{onClick:c,group:"group/m",cls:"min-h-[76px] flex-1",children:[e.jsx(ls,{dark:!0,sizes:"(max-width: 640px) 92vw, 260px",label:u("reservation:rooms.plan"),src:i,className:"absolute inset-0 transition-transform duration-500 group-hover/m:scale-105"}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-ink/0 transition-colors group-hover/m:bg-ink/25"}),e.jsx("span",{className:"absolute bottom-1 left-1 rounded bg-ink/70 px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wide text-white backdrop-blur",children:u("reservation:rooms.plan")})]})]})]})]})}function ad({b:t,update:n,go:o,combine:a,hydrating:s}){var $a,Oa;const{t:i}=it(),l=t.currency||"EUR",d=a?(($a=a.staysByCat)==null?void 0:$a[t.tier])||[]:[],c=a&&(a.tiers||[]).find(r=>r.id===t.tier)||null,{data:m,isLoading:g,isError:N,refetch:u}=yi(t.packageId||void 0,t.tier||void 0,t.flightId||void 0),{data:p}=Ua(t.packageId||void 0,t.flightId||void 0),{data:x}=dr(),{data:j}=wn(t.packageId||void 0,t.flightId||void 0),C=(x==null?void 0:x.hotelMealSalePrices)||{},U=(r,f,w)=>Uo(Vo(r,f,w,C),l),I=Ys(t),L=I.n,[me,Z]=b.useState(null),[V,k]=b.useState(null),[R,_]=b.useState(!1),[be,Y]=b.useState(null);b.useEffect(()=>{Y(document.getElementById("gm-outils-chambres"))},[]);const[Q,z]=b.useState(null),[fe,K]=b.useState(!0),[E,B]=b.useState(0),[M,q]=b.useState(!1),[ce,te]=b.useState("all"),[$,W]=b.useState([]),[ye,de]=b.useState([]),ot=r=>{var f,w,X;return`${(f=r==null?void 0:r.combo)==null?void 0:f.name}__${(w=r==null?void 0:r.vc)==null?void 0:w.viewMk}__${(X=r==null?void 0:r.vc)==null?void 0:X.viewMd}`},[Ge,Be]=b.useState(!1),[ve]=b.useState({}),[le,Te]=b.useState(null),[ue,$e]=b.useState(null),[oe,Ve]=b.useState(null),[y,A]=b.useState(null),[je,Se]=b.useState(null);Qi(()=>{if(y!==null){A(null);return}if(je){Se(null);return}if(oe){Ve(null);return}Q&&z(null)});const We=r=>{A(null),Ve(r)},Ze=b.useRef(!1),O=b.useRef(()=>{});if(b.useEffect(()=>{O.current()},[le,ue,ve]),b.useEffect(()=>{m&&(Te(r=>r&&m.pensionsByCity.makkah.includes(r)?r:m.pensionsByCity.makkah.includes(m.basePension)?m.basePension:m.pensionsByCity.makkah[0]||m.basePension),$e(r=>r&&m.pensionsByCity.medina.includes(r)?r:m.pensionsByCity.medina.includes(m.basePension)?m.basePension:m.pensionsByCity.medina[0]||m.basePension))},[m]),b.useEffect(()=>{if(!m)return;const r={};m.nightsMk>
4020&&m.nightsMk!==t.nightsMakkah&&(r.nightsMakkah=m.nightsMk),m.nightsMd>0&&m.nightsMd!==t.nightsMedina&&(r.nightsMedina=m.nightsMd),Object.keys(r).length&&n(r)},[m,t.nightsMakkah,t.nightsMedina]),b.useEffect(()=>{var ge;if(Ze.current||!m||!m.rows.length||t.combo||L!==1)return;const r=Oe=>Oe.includes(m.basePension)?m.basePension:Oe[0]||m.basePension,f=le||r(m.pensionsByCity.makkah),w=ue||r(m.pensionsByCity.medina),X=Oe=>m.rows.filter(It=>It.type===Oe&&!/kaaba|haram/i.test(It.mkView)).sort((It,ut)=>It.perPerson-ut.perPerson)[0]||m.std[Oe];let ee=null,Le;if(m.std.SGL)ee={rooms:["single"],name:"single"},Le=X("SGL");else{const Oe=["DBL","TPL","QDR"].filter(rt=>!!m.std[rt]).map(rt=>({c:rt,row:X(rt)})).filter(rt=>!!rt.row).sort((rt,It)=>rt.row.perPerson-It.row.perPerson);if(Oe[0]){const rt=ki[Oe[0].c];ee={rooms:[rt],name:rt},Le=Oe[0].row}}if(!ee||!Le)return;Ze.current=!0;const ze=Math.round(Le.perPerson+U(Le,f,w));n({room:ee.rooms[0]||((ge=ee.shared)==null?void 0:ge.type)||null,combo:ee.name,comboLabel:Ra(ee),comboShared:!!ee.shared,comboTotal:ze,pension:f,mkPension:f,mdPension:w,kaaba:!1,baseByPax:[{label:i("reservation:rooms.traveler1"),sub:i("reservation:rooms.adult"),pp:Math.round(ze)}]}),Ar({combo:ee,mkPension:f,mdPension:w,kaaba:!1,total:ze,data:m,tier:{mkName:t.hotelMkName,mdName:t.hotelMdName,mkImg:(()=>{try{return localStorage.getItem("selectedMakkahHotelImage")}catch{return null}})(),mdImg:(()=>{try{return localStorage.getItem("selectedMedineHotelImage")}catch{return null}})()},departureISO:t.dateISO})},[m,L,t.combo]),!t.packageId)return s?e.jsx(js,{label:i("reservation:common.restoringLink")}):e.jsx(Ns,{message:i("reservation:hotels.needFlight"),actionLabel:i("reservation:hotels.chooseDates"),onAction:()=>o("vols")});if(!t.tier)return s?e.jsx(js,{label:i("reservation:common.restoringLink")}):e.jsx(Ns,{message:i("reservation:rooms.needTier"),actionLabel:i("reservation:rooms.chooseHotels"),onAction:()=>o("hotels")});if(g)return e.jsx(js,{label:i("reservation:rooms.loading")});if(N)return e.jsx(Ns,{message:i("reservation:rooms.loadError"),onRetry:u});if(!m||!m.rows.length)return e.jsx(Ns,{message:i("reservation:rooms.noAvailability"),actionLabel:i("reservation:rooms.changeCategory"),onAction:()=>o("hotels")});const pe=le||m.basePension,Ue=ue||m.basePension,H="Vue ville",Ae=(x==null?void 0:x.hotelSalePrices)||{},De=r=>{var w;const f=(((w=m.rows[0])==null?void 0:w.cityHotels)||[]).find(X=>(X.cityName||"").toLowerCase()===r);return String((f==null?void 0:f.hotelId)||"")},J=(r,f)=>{const w=at(r);return w.setDate(w.getDate()+f),qs(w)},ie=t.dateISO||"",Ee=t.dateISO?J(t.dateISO,m.nightsMd):"",Re=Ee,Je=Re?J(Re,m.nightsMk):"",Me=r=>r&&r.length>=10?`${r.slice(8,10)}/${r.slice(5,7)}`:"â",ct=(r,f,w)=>{var It,ut,Gt;const X=Ae[r]||{},ee=[];for(const nt of Object.keys(X)){const[bt,Ot]=nt.split("_");if(!bt||!Ot||Ot<=bt||f&&w&&(Ot<=f||bt>=w))continue;const Ls=f&&w?bt<=f&&Ot>=w:!0,Es=new Date(Ot).getTime()-new Date(bt).getTime(),As=bt>f?bt:f,Ss=Ot<w?Ot:w,Hs=f&&w&&As<=Ss?new Date(Ss).getTime()-new Date(As).getTime():0;ee.push({map:X[nt],coversStay:Ls,span:Es,overlap:Hs})}ee.sort((nt,bt)=>nt.coversStay!==bt.coversStay?nt.coversStay?-1:1:nt.coversStay&&bt.coversStay?nt.span-bt.span:bt.overlap-nt.overlap);const Le=((It=ee[0])==null?void 0:It.map)||null,ze={[H]:0},ge=nt=>/^(vue\s*)?(sur\s*)?(ville|city|standard|std)$/i.test(String(nt).trim());if(Le)for(const[nt,bt]of Object.entries(Le))Number(bt)>0&&!ge(nt)&&(ze[nt]=Number(bt));const Oe=nt=>String(nt||"").normalize("NFD").replace(/[Ì-ͯ]/g,"").toLowerCase().replace(/\s+/g," ").trim(),rt=new Set;for(const nt of["makkah","medine"])for(const bt of((ut=p==null?void 0:p.roomAvailability)==null?void 0:ut[nt])||[]){if(String(bt.hotelId)!==String(r))continue;const Ot=Oe((Gt=bt==null?void 0:bt.view)==null?void 0:Gt.name);Ot&&rt.add(Ot)}if(rt.size)for(const nt of Object.keys(ze))nt!==H&&(rt.has(Oe(nt))||delete ze[nt]);return ze},Ke=r=>{const f=jn(l);return f===1?r:Object.fromEntries(Object.entries(r).map(([w,X])=>[w,Math.round((Number(X)||0)*f)]))},st=Ke(ct(De("makkah"),Re,Je)),gt=Ke(ct(De("medina"),ie,Ee)),he=r=>{const f=(r||"").toLowerCase();return/sur ville|city|standard? ville/.test(f)?0:/partiel/.test(f)?1:/standard/.test(f)?2:/premier|premium/.test(f)?3:/pano/.test(f)?4:5},Xe=r=>Object.keys(r).sort((f,w)=>he(f)-he(w)||f.localeCompare(w)),F=Xe(st),ke=Xe(gt),dt=me&&me.length?me:null,D=V&&V.length?V:null,Ne=F.filter(r=>!dt||dt.includes(r)).flatMap(r=>ke.filter(f=>!D||D.includes(f)).map(f=>({viewMk:r,viewMd:f}))),qe=r=>ve[r]||{viewMk:H,viewMd:H},Pe=r=>{var f;return(((f=r.rooms)==null?void 0:f.length)||0)+(r.shared?1:0)},et=(r,f)=>{const w=st[(f==null?void 0:f.viewMk)||H]||0,X=gt[(f==null?void 0:f.viewMd)||H]||0;return Pe(r)*(w+X)},Ye=/kaaba|haram/i,lt=(r,f)=>{const w=oa[r];return f&&m.kaaba[w]?m.kaaba[w]:m.rows.filter(ee=>ee.type===w&&!Ye.test(ee.mkView)).sort((ee,Le)=>ee.perPerson-Le.perPerson)[0]||m.std[w]},He=(r,f=!1)=>{const w=lt(r,f);return w?w.perPerson+U(w,pe,Ue):0},Fe=Mo(x==null?void 0:x.childNoBedPrices,ie||Re||"",l,{cityName:t.city&&t.city!=="Toutes les villes"?t.city:null})??0,xt=Co(x==null?void 0:x.childBedDiscounts,l),Mt=r=>Math.max(0,Math.min(2,Number(r==null?void 0:r.childNoBedCount)||(r!=null&&r.childNoBed?1:0))),ks=r=>r>0?i("reservation:rooms.noBedLabel",{k:r,s:r>1?"s":""}):"",Lt=(r,f=!1)=>{const w=Mt(r),X=Rr(r.rooms).reduce((ze,[ge,Oe])=>ze+Oe*Rt[ge][1]*He(ge,f),0)+(r.shared?r.shared.beds*He(r.shared.type,f):0)+Fe*w,ee=Math.max(0,(I.children||0)-w),Le=xt>0?xt*Math.min(ee,Pe(r)):0;return Math.max(0,X-Le)},ms=Object.keys(m.std),as=p?Io(p,m):null,ps=x==null?void 0:x.openRoomRules,Ps=r=>{var X;const f=Number(De(r==="makkah"?"makkah":"medina"))||0,w=new Set;for(const ee of((X=p==null?void 0:p.roomAvailability)==null?void 0:X[r])||[])Number(ee.hotelId)===f&&Number(ee.contractId)>0&&w.add(Number(ee.contractId));return Array.from(w)},rs=(r,f,w,X,ee)=>{var ze,ge,Oe,rt,It,ut,Gt,nt;if(!ps)return null;for(const bt of w){const Ot=(ze=ps.byContract)==null?void 0:ze[String(bt)];if(Ot!=null&&Ot.byPeriod&&X&&ee){const Es=String(X).slice(0,10),As=String(ee).slice(0,10);let Ss=!1;for(const[Hs,zs]of Object.entries(Ot.byPeriod)){const[_t,fs]=Hs.split("_");if(!(_t<As&&fs>Es))continue;const Ms=(Oe=(ge=zs==null?void 0:zs.sharedBedRules)==null?void 0:ge[r])==null?void 0:Oe[f];if(Ms===!1)return"admin";Ms===!0&&(Ss=!0)}if(Ss)return null}const Ls=(It=(rt=Ot==null?void 0:Ot.sharedBedRules)==null?void 0:rt[r])==null?void 0:It[f];if(Ls!==void 0)return Ls===!1?"admin":null}const Le=(nt=(Gt=(ut=ps.global)==null?void 0:ut.sharedBedRules)==null?void 0:Gt[r])==null?void 0:nt[f];if(Le!==void 0)return Le===!1?"admin":null;if(X){const bt=new Date;return bt.setMonth(bt.getMonth()+3),bt.setHours(0,0,0,0),new Date(String(X).slice(0,10)+"T00:00:00")>=bt?null:"auto"}return null},Qs=r=>{if(!(r!=null&&r.shared))return!0;const f=String(r.shared.type||"").toUpperCase(),w=String(r.shared.beds||0),X=rs(f,w,Ps("makkah"),Re,Je),ee=rs(f,w,Ps("medine"),ie,Ee);return X===null&&ee===null},zt=(()=>{const f=[...un(L,ms,{withShared:!0,capRooms:as,maxShared:I.adults}).filter(Qs)];if(Fe>
4020){const ge=Math.min(2,I.children||0);for(let Oe=1;Oe<=ge&&!(L-Oe<1);Oe++){const rt=new Set(f.map(It=>It.name));un(L-Oe,ms,{withShared:!1,capRooms:as}).forEach(It=>{const ut=`${It.name}+enf${Oe}`;rt.has(ut)||(rt.add(ut),f.push({...It,name:ut,childNoBed:!0,childNoBedCount:Oe}))})}}let w=f.map(ge=>({...ge,total:Lt(ge),doubles:ge.rooms.filter(Oe=>Oe==="double").length}));const X=w.filter(ge=>Number(I.children||0)-Mt(ge)<=2);if(X.length&&(w=X),!w.length)return w;const ee=w.reduce((ge,Oe)=>Oe.total<ge.total?Oe:ge,w[0]),Le=w.reduce((ge,Oe)=>Oe.doubles>ge.doubles?Oe:ge,w[0]),ze=[{...ee,badge:"cheap"}];return Le!==ee&&ze.push({...Le,badge:"reco"}),w.forEach(ge=>{ge!==ee&&ge!==Le&&ze.push(ge)}),ze})(),ns=(()=>{const r=zt.flatMap(ge=>Ne.map(Oe=>({combo:ge,vc:Oe}))).map(ge=>({...ge,_t:Lt(ge.combo,!1)+((st[ge.vc.viewMk]||0)+(gt[ge.vc.viewMd]||0))*Pe(ge.combo)})).sort((ge,Oe)=>fe?ge._t-Oe._t:Oe._t-ge._t);let f=r.filter(ge=>!ge.combo.shared),w=r.filter(ge=>ge.combo.shared);if(!Ge){const ge=It=>!(It.combo.rooms||[]).includes("single"),Oe=f.filter(ge),rt=w.filter(ge);(Oe.length||rt.length)&&(f=Oe,w=rt)}const X=ge=>(ge.combo.rooms||[]).includes("single"),ee=f.filter(ge=>!X(ge)),Le=f.filter(X),ze=[];return ce!=="shared"&&ze.push(...ee),ce!=="private"&&w.length&&(ze.push({__sep:!0,kind:"shared"}),ze.push(...w)),ce!=="shared"&&Le.length&&(ze.push({__sep:!0,kind:"single"}),ze.push(...Le)),ze})(),Xt=r=>((r==null?void 0:r.rooms)||[]).reduce((f,w)=>{var X;return f+(((X=Rt[w])==null?void 0:X[1])||0)},0),ws=r=>!!r&&!r.shared&&!r.childNoBed&&!(r.rooms||[]).includes("single")&&Xt(r)===L,gs=r=>{var f,w;return!(r!=null&&r.__sep)&&((f=r==null?void 0:r.vc)==null?void 0:f.viewMk)===H&&((w=r==null?void 0:r.vc)==null?void 0:w.viewMd)===H},Ds=r=>!(r!=null&&r.__sep)&&!gs(r),S=!!dt||!!D,P=new Set;if(!S)for(const r of[!1,!0]){const f=ns.find(w=>{var X;return Ds(w)&&!!((X=w==null?void 0:w.combo)!=null&&X.shared)===r});f&&P.add(f)}const ne=[];for(const r of $){const f=r.indexOf(":"),w=r.slice(0,f),X=r.slice(f+1),ee=ns.find(Le=>{var ze,ge,Oe;return!Le.__sep&&!((ze=Le==null?void 0:Le.combo)!=null&&ze.shared)&&(w==="mk"?((ge=Le==null?void 0:Le.vc)==null?void 0:ge.viewMk)===X:((Oe=Le==null?void 0:Le.vc)==null?void 0:Oe.viewMd)===X)});ee&&!ne.includes(ee)&&ne.push(ee)}const re=S?ns:ns.filter(r=>!Ds(r)||P.has(r)||ne.includes(r)),we=re.filter(r=>gs(r)&&ws(r.combo)),Ce=re.filter(r=>!(gs(r)&&ws(r.combo))),yt=Math.max(0,5-we.length);let Ct=0;if(yt>0){let r=0;for(const f of Ce)if(Ct++,!f.__sep&&!((Oa=f==null?void 0:f.combo)!=null&&Oa.shared)&&(r++,r>=yt))break}const Et=Math.max(E,Ct),vt=r=>((r==null?void 0:r.rooms)||[]).includes("single"),jt=new Set([...we,...Ce.slice(0,Et)]),pt=Ge?Ce.filter(r=>{var f;return!jt.has(r)&&gs(r)&&!((f=r==null?void 0:r.combo)!=null&&f.shared)&&vt(r.combo)}):[],Tt=ns.find(r=>r.__sep&&r.kind==="single"),v=pt.length&&Tt&&!jt.has(Tt)?[Tt,...pt]:pt,T=ne.filter(r=>!jt.has(r)&&!pt.includes(r)),G=we.length?[...we,...Ce.slice(0,Et),...v,...T]:re,xe=!G.some(r=>{var f;return!r.__sep&&!((f=r==null?void 0:r.combo)!=null&&f.shared)}),ae=M||xe,_e=ae?G:G.filter(r=>{var f;return!(r.__sep&&r.kind==="shared")&&!((f=r==null?void 0:r.combo)!=null&&f.shared)}),Qe=_e.filter(r=>r.__sep||!ye.includes(ot(r))),kt=_e.length-Qe.length,es=Ce.slice(Et).filter(r=>{var f;return!r.__sep&&(ae||!((f=r==null?void 0:r.combo)!=null&&f.shared))&&!pt.includes(r)&&!T.includes(r)}),Nt=we.length?es.length:0,ft=new Set(re.filter(r=>{var f;return!r.__sep&&((f=r==null?void 0:r.combo)==null?void 0:f.shared)}).map(r=>r.combo.name)).size,qt=(()=>{if(Ge)return 0;const r=zt.filter(vt);return!r.length||!zt.some(f=>!vt(f))?0:new Set(r.map(f=>f.name)).size})(),Ft=(r,f)=>{var X;const w=r==="mk"?m.roomImagesByView.makkah:m.roomImagesByView.medina;for(const ee of Object.keys(w||{})){const Le=(X=w[ee])==null?void 0:X[f];if(Le&&Le.length)return Le[0]}},wt=r=>(m.roomImages[oa[r]]||[])[0]||(ia[r]||[])[0]||ua[r],Yt=qt>0,Qt=!ae&&ft>0,cs=(()=>{var Le,ze;if(S)return[];const r=[...P][0],f=((Le=r==null?void 0:r.vc)==null?void 0:Le.viewMk)||H,w=((ze=r==null?void 0:r.vc)==null?void 0:ze.viewMd)||H,X=[],ee=(ge,Oe)=>$.includes(`${ge}:${Oe}`);return F.forEach(ge=>{const Oe=st[ge]||0;Oe>0&&ge!==f&&!ee("mk",ge)&&X.push({city:"mk",name:ge,supp:Oe})}),ke.forEach(ge=>{const Oe=gt[ge]||0;Oe>0&&ge!==w&&!ee("md",ge)&&X.push({city:"md",name:ge,supp:Oe})}),X.sort((ge,Oe)=>ge.supp-Oe.supp)})(),mt=lt("double",!1)||lt("quad",!1)||lt("triple",!1)||lt("single",!1),Pt=(r,f,w,X)=>{const ee=r??X.slice();f(ee.includes(w)?ee.filter(Le=>Le!==w):[...ee,w])},At=m.hotelMkName||t.hotelMkName||i("reservation:rooms.hotelMakkah"),Ut=m.hotelMdName||t.hotelMdName||i("reservation:rooms.hotelMedina"),Vt=j==null?void 0:j.find(r=>r.id===t.tier),Ya=me&&me[0]||m.views.makkah[0]||"Standard",Qa=V&&V[0]||m.views.medina[0]||"Standard",Sa=a&&Number(t.stay)||(t.nightsMakkah||m.nightsMk)+(t.nightsMedina||m.nightsMd)+1,Wa=Math.max(0,Sa-1),Ja=a?a.tripLabel:(Ts[t.tripType]||Ts.omra).label,Ma=a&&d.length?d.map(r=>{var ee;const f=ta(r.city),w=f||_s(r.city);if(f==="md")return{key:"md",holy:!0,header:i("reservation:hotels.inMedina"),hotelLabel:Ut.split("â")[0].trim(),stars:t.starsMd||5,nights:Number(r.nights)||m.nightsMd,ci:r.checkIn?Me(String(r.checkIn)):Me(ie),co:r.checkOut?Me(String(r.checkOut)):Me(Ee)};if(f==="mk")return{key:"mk",holy:!0,header:i("reservation:hotels.inMakkah"),hotelLabel:At.split("â")[0].trim(),stars:t.starsMk||5,nights:Number(r.nights)||m.nightsMk,ci:r.checkIn?Me(String(r.checkIn)):Me(Re),co:r.checkOut?Me(String(r.checkOut)):Me(Je)};const X=(ee=c==null?void 0:c.hotelByCity)==null?void 0:ee[w];return{key:w,holy:!1,header:r.city,hotelLabel:String((X==null?void 0:X.name)||r.hotel||"").split("â")[0].trim(),stars:Number(X==null?void 0:X.stars)||0,nights:Number(r.nights)||0,ci:r.checkIn?Me(String(r.checkIn)):"â",co:r.checkOut?Me(String(r.checkOut)):"â",pensionLabel:r.baseMealPlan?Kt[r.baseMealPlan]||r.baseMealPlan:null}}):[{key:"md",holy:!0,header:i("reservation:hotels.inMedina"),hotelLabel:Ut.split("â")[0].trim(),stars:t.starsMd||5,nights:m.nights
402Md,ci:Me(ie),co:Me(Ee)},{key:"mk",holy:!0,header:i("reservation:hotels.inMakkah"),hotelLabel:At.split("â")[0].trim(),stars:t.starsMk||5,nights:m.nightsMk,ci:Me(Re),co:Me(Je)}],sa=r=>Ra(r)+ks(Mt(r)),Ca=(r,f,w)=>{var Es,As,Ss,Hs,zs;const X=r.rooms[0]||((Es=r.shared)==null?void 0:Es.type),ee=f.viewMk||H,Le=f.viewMd||H,ze=Pe(r),ge=(st[ee]||0)*ze,Oe=(gt[Le]||0)*ze,rt=mt?U(mt,m.basePension,m.basePension):0,It=mt?Math.max(0,Math.round(U(mt,pe,Ue)-rt)):0,ut=mt?Math.max(0,Math.round(U(mt,pe,m.basePension)-rt)):0,Gt=mt?Math.max(0,Math.round(U(mt,m.basePension,Ue)-rt)):0,nt=[];if(Rr(r.rooms).forEach(([_t,fs])=>{const Ms=Rt[_t][1];for(let aa=0;aa<fs*Ms;aa++)nt.push(_t)}),r.shared)for(let _t=0;_t<r.shared.beds;_t++)nt.push(r.shared.type);const bt=Mt(r),Ot=[];let Ls=0;for(let _t=0;_t<(I.adults||0);_t++){const fs=nt[Ls++]||((As=r.rooms)==null?void 0:As[0])||X;Ot.push({label:i("reservation:rooms.travelerN",{n:_t+1}),sub:i("reservation:rooms.adult"),pp:Math.round(He(fs,!1)),room:((Ss=Rt[fs])==null?void 0:Ss[0])||""})}for(let _t=0;_t<(I.children||0);_t++){const fs=nt[Ls++]||((Hs=r.rooms)==null?void 0:Hs[0])||X,Ms=_t<bt,aa=Ms?Fe:Math.max(0,He(fs,!1)-(xt||0));Ot.push({label:i("reservation:rooms.childN",{n:_t+1}),sub:i(Ms?"reservation:rooms.childNoBed":"reservation:rooms.childWithBed"),pp:Math.round(aa),room:Ms?"":((zs=Rt[fs])==null?void 0:zs[0])||""})}try{localStorage.setItem(Ni(),JSON.stringify({v:2,n:Ot.length,comboTotal:Math.round(w),rows:Ot}))}catch{}n({room:X,combo:r.name,comboLabel:sa(r),comboShared:!!r.shared,comboTotal:Math.round(w),pension:pe,mkPension:pe,mdPension:Ue,kaaba:Ye.test(ee),viewMk:ee,viewMd:Le,childNoBed:!!r.childNoBed,childNoBedCount:Mt(r),pensionSupp:It,pensionSuppMk:ut,pensionSuppMd:Gt,viewMkAmount:ge,viewMdAmount:Oe,baseByPax:Ot}),Ar({combo:r,mkPension:pe,mdPension:Ue,kaaba:!1,viewMk:ee,viewMd:Le,viewMkAmount:ge,viewMdAmount:Oe,total:w,data:m,tier:{mkName:t.hotelMkName,mdName:t.hotelMdName,mkImg:(()=>{try{return localStorage.getItem("selectedMakkahHotelImage")}catch{return null}})(),mdImg:(()=>{try{return localStorage.getItem("selectedMedineHotelImage")}catch{return null}})()},departureISO:t.dateISO})};O.current=()=>{if(!t.combo)return;const r=zt.find(w=>w.name===t.combo);if(!r)return;const f=qe(r.name);Ca(r,f,Lt(r)+et(r,f))};const Ia=e.jsxs("div",{className:be?"px-6 py-3.5 sm:px-9":"mb-6 rounded-2xl border-2 border-navy/15 bg-white p-4 shadow-soft sm:p-5",children:[e.jsxs("div",{className:`flex flex-wrap items-center justify-center gap-x-7 gap-y-2.5 text-[15px] ${R?"mb-3":""}`,children:[e.jsxs("button",{type:"button",onClick:()=>_(r=>!r),className:"flex items-center gap-2 font-bold text-navy transition-colors hover:text-navy-deep",children:[e.jsx(Sl,{className:"h-[18px] w-[18px] text-[var(--accent)]"})," ",i("reservation:rooms.filterOptions")," ",e.jsx("span",{className:"hidden font-normal text-ink-mute sm:inline",children:i("reservation:rooms.viewAndPension")}),e.jsx(h,{name:"chevron",className:`h-[18px] w-[18px] transition-transform ${R?"":"-rotate-90"}`})]}),e.jsxs("button",{onClick:()=>o("hotels"),className:"flex items-center gap-2 font-bold text-navy transition-colors hover:text-navy-deep",children:[e.jsx(h,{name:t.tierIcon||"kaaba",className:"h-[18px] w-[18px] text-[var(--accent)]"})," ",i("reservation:rooms.category")," ",t.tierLabel||"â"," ",e.jsx("span",{className:"font-normal text-ink-mute",children:i("reservation:rooms.changeSep")})]}),e.jsxs("button",{onClick:()=>K(!fe),className:"flex items-center gap-2 font-bold text-navy transition-colors hover:text-navy-deep",children:[e.jsx(h,{name:"arrow",className:"h-[18px] w-[18px] rotate-90 text-[var(--accent)]"})," ",i("reservation:rooms.sortLabel")," ",i(fe?"reservation:rooms.sortCheapFirst":"reservation:rooms.sortExpFirst")]}),R&&e.jsxs("button",{onClick:()=>{Z(null),k(null),Te(m.basePension),$e(m.basePension),te("all"),Be(!1)},className:"flex items-center gap-2 font-bold text-ink-soft transition-colors hover:text-navy",children:[e.jsx(h,{name:"plus",className:"h-[18px] w-[18px] rotate-45"})," ",i("reservation:rooms.reset")]})]}),R&&e.jsx("div",{className:"grid gap-5 sm:grid-cols-2",children:[[i("reservation:common.makkah"),"kaaba",At,F,me,Z,m.pensionsByCity.makkah,pe,Te],[i("reservation:common.medina"),"compass",Ut,ke,V,k,m.pensionsByCity.medina,Ue,$e]].map(([r,f,w,X,ee,Le,ze,ge,Oe])=>e.jsxs("div",{className:"rounded-xl bg-cream-100 p-4",children:[e.jsxs("p",{className:"mb-3 flex items-center gap-1.5 text-[13px] font-bold text-navy",children:[e.jsx(h,{name:f,className:"h-4 w-4 text-[var(--accent)]"})," ",r," â ",String(w).split("â")[0].trim()]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:i("reservation:rooms.view")}),X.map(rt=>e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 py-0.5 text-[12.5px] text-ink-soft",children:[e.jsx("input",{type:"checkbox",checked:!ee||ee.includes(rt),onChange:()=>Pt(ee,Le,rt,X),className:"h-3.5 w-3.5 accent-navy"})," ",rt]},rt))]}),e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:i("reservation:rooms.pension")}),ze.map(rt=>e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 py-0.5 text-[12.5px] text-ink-soft",children:[e.jsx("input",{type:"radio",name:`pension-${r}
402`,checked:ge===rt,onChange:()=>Oe(rt),className:"h-3.5 w-3.5 accent-navy"})," ",Kt[rt]||rt]},rt))]})]})]},r))}),R&&e.jsxs("div",{className:"mt-4 rounded-xl bg-cream-100 p-4",children:[e.jsxs("p",{className:"mb-2 flex items-center gap-1.5 text-[13px] font-bold text-navy",children:[e.jsx(h,{name:"compass",className:"h-4 w-4 text-[var(--accent)]"})," ",i("reservation:rooms.shareQuestion")]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:[["all",i("reservation:rooms.shareAny")],["private",i("reservation:rooms.sharePrivate")],["shared",i("reservation:rooms.shareShared")]].map(([r,f])=>e.jsx("button",{type:"button",onClick:()=>te(r),className:`rounded-full px-3.5 py-2 text-[12.5px] font-bold transition-colors ${ce===r?"bg-navy text-cream-100":"border border-ink/15 bg-white text-ink-soft hover:border-navy hover:text-navy"}`,children:f},r))})]}),R&&e.jsx("div",{className:"mt-4 rounded-xl bg-cream-100 p-4",children:e.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5 text-[13px] font-bold text-navy",children:[e.jsx("input",{type:"checkbox",checked:Ge,onChange:()=>Be(r=>!r),className:"h-4 w-4 shrink-0 accent-navy"}),e.jsx(h,{name:"users",className:"h-4 w-4 shrink-0 text-[var(--accent)]"})," ",i("reservation:rooms.singleRoom"),e.jsx("span",{className:"font-normal text-ink-mute",children:i("reservation:rooms.singleRoomHint")})]})})]}),Za=be?$i.createPortal(Ia,be):Ia;return e.jsxs("div",{children:[Za,zt.length===0&&(!!as&&(typeof as.POOL=="number"&&as.POOL<=0||["SGL","DBL","TPL","QDR"].every(f=>as[f]!==void 0&&as[f]<=0))?e.jsxs("div",{className:"rounded-2xl border-2 border-rose-200 bg-rose-50/60 px-5 py-8 text-center shadow-soft",children:[e.jsx("p",{className:"text-[15px] font-bold text-rose-700",children:i("reservation:rooms.formulaFull")}),e.jsx("p",{className:"mt-1 text-[13px] text-ink-soft",children:i("reservation:rooms.formulaFullSub")}),e.jsx("button",{onClick:()=>o("hotels"),className:"mt-4 rounded-full bg-navy px-5 py-2.5 text-[13px] font-bold text-cream-100 transition-colors hover:bg-navy-deep",children:i("reservation:rooms.changeFormula")})]}):e.jsx("p",{className:"rounded-2xl border border-ink/8 bg-white px-5 py-8 text-center text-[14px] text-ink-mute shadow-soft",children:i("reservation:rooms.noComboForPax",{n:L,s:L>1?"s":""})})),e.jsx("div",{className:"grid gap-5",children:Qe.map((r,f)=>{var Mr;if(r.__sep){const Ie=r.kind==="single",ht=Ie?Ge:ae;return e.jsxs("div",{id:Ie?"gm-chambres-individuelles":"gm-chambres-partagees",className:"mt-2 overflow-hidden rounded-2xl border-2 border-dashed border-[var(--accent)]/50 bg-[var(--accent)]/[0.06]",children:[e.jsxs("button",{type:"button",onClick:()=>Ie?Be(St=>!St):q(St=>!St),"aria-expanded":ht,disabled:!Ie&&xe,className:"flex w-full items-center justify-between gap-3 px-5 py-4 text-left transition-colors hover:bg-[var(--accent)]/10 sm:px-6",children:[e.jsxs("span",{className:"flex items-center gap-2 font-display text-[1.35rem] leading-tight text-navy sm:text-[1.6rem]",children:[e.jsx(h,{name:Ie?"shield":"compass",className:"h-6 w-6 shrink-0 text-[var(--accent)]"})," ",i(Ie?"reservation:rooms.singleSepTitle5":"reservation:rooms.sharedSepTitle")]}),(Ie||!xe)&&e.jsx(h,{name:"chevron",className:`h-5 w-5 shrink-0 text-gold-deep transition-transform ${ht?"-rotate-180":""}`})]}),ht&&e.jsx("p",{className:"px-5 pb-4 sm:px-6 text-[13px] text-ink-soft",children:i(Ie?"reservation:rooms.singleSepSub5":"reservation:rooms.sharedSepSub5")})]},Ie?"__single_sep":"__shared_sep")}const{combo:w,vc:X}=r,ee=X,ze=(ee.viewMk||H)===H&&(ee.viewMd||H)===H?w.badge:void 0,ge=Lt(w,!1),Oe=st[ee.viewMk||H]||0,rt=gt[ee.viewMd||H]||0,It=et(w,ee),ut=ge+It,Gt=Kt[pe]||pe,nt=w.rooms[0]||((Mr=w.shared)==null?void 0:Mr.type),bt=t.room===nt&&t.combo===w.name&&(t.viewMk||H)===(ee.viewMk||H)&&(t.viewMd||H)===(ee.viewMd||H),Ot=(()=>{const Ie=m.roomImages[oa[nt]]||[];return Ie.length?Ie:ia[nt]||[ua[nt]]})(),Ls=Ot[f%Ot.length],Es=(()=>{const Ie=m.roomImagesMd[oa[nt]]||[];return Ie.length?Ie:ia[nt]||[ua[nt]]})(),As=Es[f%Es.length],Ss=(()=>{try{return localStorage.getItem("selectedMakkahHotelImage")||void 0}catch{return}})(),Hs=(()=>{try{return localStorage.getItem("selectedMedineHotelImage")||void 0}catch{return}})(),zs=Ie=>i("reservation:rooms.viewOf",{v:String(Ie||H).replace(/^Vue\s*/i,"").toLowerCase()}),_t=zs(ee.viewMk),fs=zs(ee.viewMd),Ms=Kt[Ue]||Ue,aa=(Ie,ht)=>i("reservation:rooms.perCity5",{mk:Ie,md:ht}),no=[String(Gt)===String(Ms)?Fn(Gt):aa(Fn(Gt),Fn(Ms)),String(_t)===String(fs)?_t:aa(_t,fs)].join(", "),Sr=[ee.viewMk,ee.viewMd].filter(Ie=>Ie&&/kaaba|haram/i.test(Ie)).join(" · "),ro=[ee.viewMk&&ee.viewMk!==H?{v:ee.viewMk,h:At.split("â")[0].trim()}:null,ee.viewMd&&ee.viewMd!==H?{v:ee.viewMd,h:Ut.split("â")[0].trim()}
402:null].filter(Boolean),Pn=`${w.name}__${ee.viewMk}__${ee.viewMd}`;return e.jsxs("article",{className:`relative overflow-hidden rounded-3xl border-2 bg-white transition-all duration-300 hover:-translate-y-0.5 hover:shadow-xl ${bt?"border-navy shadow-xl ring-1 ring-navy/20":ze==="reco"?"border-red-brand/60 shadow-lift":ze==="cheap"?"border-[var(--accent)] shadow-lift":"border-navy/15 shadow-lift"}`,children:[e.jsx("button",{type:"button",onClick:()=>de(Ie=>Ie.includes(Pn)?Ie:[...Ie,Pn]),"aria-label":i("reservation:rooms.hideOfferAria5",{titre:sa(w)}),className:"absolute right-2.5 top-2.5 z-10 grid h-8 w-8 place-items-center rounded-full bg-white/85 text-ink-mute shadow-soft backdrop-blur transition-colors hover:bg-white hover:text-red-brand focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:e.jsx(h,{name:"close",className:"h-4 w-4"})}),e.jsxs("div",{className:"xl:flex xl:items-stretch",children:[e.jsxs("div",{className:"flex w-full min-w-0 flex-col bg-white xl:flex-1",children:[e.jsxs("div",{className:"border-b border-ink/8 bg-gradient-to-br from-cream-100 via-white to-white px-4 py-3.5 sm:px-6 sm:py-4",children:[ze==="cheap"&&e.jsxs("span",{className:"mb-2 inline-flex items-center gap-1.5 rounded-full bg-[var(--accent)] px-3 py-1.5 text-[11.5px] font-bold text-ink shadow-soft",children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5",fill:!0})," ",i("reservation:rooms.cheapest")]}),ze==="reco"&&e.jsxs("span",{className:"mb-2 inline-flex items-center gap-1.5 rounded-full bg-red-brand px-3 py-1.5 text-[11.5px] font-bold text-white shadow-soft",children:[e.jsx(h,{name:"sparkle",className:"h-3.5 w-3.5"})," ",i("reservation:rooms.mostComfortable")]}),e.jsxs("h4",{className:"font-display text-[1.45rem] font-bold leading-[1.9rem] text-navy sm:text-[1.65rem] sm:leading-[2.15rem]",children:[sa(w),ro.map(Ie=>e.jsxs("span",{children:[" · ",i("reservation:rooms.viewAtHotel5",{view:Ea(Ie.v),hotel:Ie.h})]},Ie.v))]}),e.jsxs("p",{className:"mt-1 text-[15px] font-medium leading-[21px] text-ink-soft",children:[Ja," · ",i("reservation:rooms.cardTitleMid2",{days:Sa,nights:Wa,tier:t.tierLabel||"â"})]}),w.shared&&e.jsxs("p",{className:"mt-2 flex items-start gap-1.5 rounded-lg bg-red-brand/8 px-2.5 py-1.5 text-[13.5px] font-semibold leading-snug text-red-brand ring-1 ring-red-brand/25",children:[e.jsx(h,{name:"users",className:"mt-0.5 h-4 w-4 shrink-0"}),i("reservation:rooms.sharedSubjectTo5")]})]}),e.jsx("div",{className:"sm:grid sm:grid-cols-2 sm:divide-x sm:divide-ink/8",children:(a&&d.length?d.map(Ie=>{var na,ds;const ht=ta(Ie.city);if(ht==="md")return{title:`à Médine · ${Ut.split("â")[0].trim()}`,icon:"compass",city:"md",stars:t.starsMd||5,hotel:Hs,room:As,hotelData:Vt==null?void 0:Vt.md,hotelName:Ut.split("â")[0].trim()};if(ht==="mk")return{title:`à La Mecque · ${At.split("â")[0].trim()}`,icon:"kaaba",city:"mk",stars:t.starsMk||5,hotel:Ss,room:Ls,hotelData:Vt==null?void 0:Vt.mk,hotelName:At.split("â")[0].trim()};const St=((na=c==null?void 0:c.hotelByCity)==null?void 0:na[_s(Ie.city)])||null,Us=String((St==null?void 0:St.name)||Ie.hotel||"").split("â")[0].trim(),Jt=(ds=St==null?void 0:St.imgs)==null?void 0:ds[0];return{title:`${Ie.city} · ${Us}`,icon:"pin",city:null,stars:Number(St==null?void 0:St.stars)||0,hotel:Jt,room:Jt,hotelData:St,hotelName:Us}}):[{title:`à La Mecque · ${At.split("â")[0].trim()}`,icon:"kaaba",city:"mk",stars:t.starsMk||5,hotel:Ss,room:Ls,hotelData:Vt==null?void 0:Vt.mk,hotelName:At.split("â")[0].trim()},{title:`à Médine · ${Ut.split("â")[0].trim()}`,icon:"compass",city:"md",stars:t.starsMd||5,hotel:Hs,room:As,hotelData:Vt==null?void 0:Vt.md,hotelName:Ut.split("â")[0].trim()}]).map((Ie,ht)=>{var Xa,en,Ta,Pa;const St=((en=ia[nt])==null?void 0:en[f%(((Xa=ia[nt])==null?void 0:Xa.length)||1)])||ua[nt],Us=((Pa=(Ta=Ie.hotelData)==null?void 0:Ta.imgs)!=null&&Pa.length?Ie.hotelData.imgs:[Ie.hotel]).filter(Boolean),Jt=Ma.find(Cs=>String(Cs.key)===String(Ie.city))||Ma[ht],na=(Jt==null?void 0:Jt.key)==="md"?t.distMd:(Jt==null?void 0:Jt.key)==="mk"?t.distMk:null,ds=(()=>{var Cr,Ir,$r,Or;const Cs=Ie.city==="md"?ee.viewMd||H:ee.viewMk||H,tn=Ie.city==="md"?m.roomImagesByView.medina:m.roomImagesByView.makkah,sn=[];if(Cs!==H&&tn){const vs=oa[nt];for(const rn of((Cr=tn[vs])==null?void 0:Cr[Cs])||[])sn.push(rn);for(const rn of Object.keys(tn))if(rn!==vs)for(const lo of((Ir=tn[rn])==null?void 0:Ir[Cs])||[])sn.push(lo)}const io=(sn.length?sn:Ie.city==="md"?Es:Ot)||[],oo=[Ie.hotel,...(($r=Ie.hotelData)==null?void 0:$r.imgs)||[],(Or=Ie.hotelData)==null?void 0:Or.image_localisation].filter(
402Boolean),an=[],nn=new Set;for(const vs of io)vs&&!nn.has(vs)&&(nn.add(vs),an.push({src:vs,kind:"room"}));for(const vs of oo)vs&&!nn.has(vs)&&(nn.add(vs),an.push({src:vs,kind:"hotel"}));return an.length?an.slice(0,14):[{src:Ie.room||St,kind:"room"}]})();return e.jsxs("div",{className:"border-b border-ink/8 p-3 last:border-b-0 sm:p-4 sm:border-b-0",children:[Jt&&e.jsxs("p",{className:"mb-2.5",children:[e.jsxs("span",{className:"block font-display text-[19px] font-medium leading-[26px] text-navy sm:text-[21px] sm:leading-[29px]",children:[Jt.header," · ",Jt.hotelLabel]}),e.jsx("span",{className:"mt-0.5 flex items-center gap-1.5 text-[15px] leading-[21px] text-ink-soft",children:na?e.jsxs(e.Fragment,{children:[e.jsx(h,{name:"pin",className:"h-4 w-4 shrink-0 text-[var(--accent)]"})," ",na]}):" "})]}),e.jsxs("div",{className:"flex flex-col gap-3 sm:gap-3.5",children:[e.jsx("div",{className:"w-full",children:e.jsx(Wi,{photos:ds,hotel:Ie.hotelName,onRoom:Ie.city?()=>z({...w,viewMk:ee.viewMk||H,viewMd:ee.viewMd||H,initialCity:Ie.city}):void 0,onHotel:()=>{var Cs;return We({...Ie.hotelData||{},name:Ie.hotelName,stars:Ie.stars,imgs:[...Us.length?Us:[St],...(Cs=Ie.hotelData)!=null&&Cs.image_localisation?[Ie.hotelData.image_localisation]:[]]})}})}),Jt&&e.jsxs("div",{className:"min-w-0 flex-1",children:[Mt(w)>0&&e.jsx("p",{className:"mt-1.5 text-[15px] leading-snug text-ink-soft",children:i("reservation:rooms.noBedLine",{k:Mt(w),s:Mt(w)>1?"s":""})}),e.jsxs("p",{className:"mt-2.5 flex flex-wrap items-center gap-x-2 gap-y-1.5",children:[Ie.city&&e.jsxs("button",{type:"button",onClick:()=>z({...w,viewMk:ee.viewMk||H,viewMd:ee.viewMd||H,initialCity:Ie.city}),"aria-label":i("reservation:rooms.seeRoomsAria2",{hotel:Jt.hotelLabel}),className:"inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border border-navy/25 px-3 py-1.5 text-[13.5px] font-bold text-navy transition-colors hover:border-navy hover:bg-navy hover:text-cream-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[e.jsx(h,{name:"sparkle",className:"h-3.5 w-3.5 shrink-0"})," ",i("reservation:rooms.seeRooms")]}),e.jsxs("button",{type:"button",onClick:()=>{var Cs;return We({...Ie.hotelData||{},name:Ie.hotelName,stars:Ie.stars,imgs:[...Us.length?Us:[St],...(Cs=Ie.hotelData)!=null&&Cs.image_localisation?[Ie.hotelData.image_localisation]:[]]})},"aria-label":i("reservation:rooms.hotelSheetAria2",{hotel:Jt.hotelLabel}),className:"inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border border-ink/20 px-3 py-1.5 text-[13.5px] font-bold text-ink-soft transition-colors hover:border-gold-deep hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[e.jsx(h,{name:"kaaba",className:"h-3.5 w-3.5 shrink-0"})," ",i("reservation:rooms.hotelSheet")]})]})]})]})]},ht)})}),e.jsx("div",{"data-gm":"chambres",className:"border-b border-ink/8 px-4 pb-2.5 pt-2 sm:px-5",children:e.jsx("ul",{className:"space-y-1",children:ya(w).map((Ie,ht)=>{var St;return e.jsxs("li",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0 text-[16px] leading-[23px]",children:[e.jsx(h,{name:"users",className:"h-[17px] w-[17px] shrink-0 translate-y-0.5 text-gold-deep"}),e.jsxs("span",{className:"font-semibold text-navy",children:[i("reservation:rooms.roomForPax3",{rooms:Ie.count+" "+(Ie.shared?i("reservation:rooms.bedsInShared",{s:Ie.count>1?"s":"",type:Rt[Ie.ty][0]}):i("reservation:rooms.roomsOfType",{s:Ie.count>1?"s":"",type:Rt[Ie.ty][0]})),p:Ie.persons,s:Ie.persons>1?"s":""}),e.jsxs("span",{className:"font-normal text-ink-soft",children:[", ",no]})]}),e.jsxs("span",{className:"whitespace-nowrap font-bold text-ink",children:["â ",se(Math.round(He(Ie.ty)),l)," ",i("reservation:rooms.perPax2")]}),e.jsx("button",{type:"button",onClick:()=>z({...w,viewMk:ee.viewMk||H,viewMd:ee.viewMd||H,initialCity:"mk",initialTab:ht}),"aria-label":i("reservation:rooms.detailsAria2",{type:((St=Rt[Ie.ty])==null?void 0:St[0])||"",hotel:At.split("â")[0].trim(),option:`${sa(w)}${Sr?" · "+Sr:""}`}),className:"whitespace-nowrap text-[14px] font-semibold text-navy/70 underline decoration-ink/20 underline-offset-4 transition-colors hover:text-gold-deep hover:decoration-[var(--accent)]",children:i("reservation:rooms.detailsShort")})]},ht)})})}),(()=>{const Ie=[{key:"md",label:i("reservation:hotels.inMedina"),pensions:m.pensionsByCity.medina,val:Ue,set:$e,nights:m.nights
402Md,supp:ht=>Math.round(U(mt,m.basePension,ht)-U(mt,m.basePension,m.basePension))},{key:"mk",label:i("reservation:hotels.inMakkah"),pensions:m.pensionsByCity.makkah,val:pe,set:Te,nights:m.nightsMk,supp:ht=>Math.round(U(mt,ht,m.basePension)-U(mt,m.basePension,m.basePension))}].filter(ht=>(ht.pensions||[]).length>0);return!Ie.length||Ie.every(ht=>(ht.pensions||[]).length<2)?null:e.jsxs("div",{"data-gm":"restauration",className:"flex flex-wrap items-baseline gap-x-3 gap-y-0.5 border-t border-ink/10 px-4 py-2 text-[14px] leading-[22px] sm:px-5",children:[e.jsx("span",{className:"text-[12px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:i("reservation:rooms.catering")}),Ie.map(ht=>e.jsxs("span",{className:"inline-flex flex-wrap items-baseline gap-x-1.5",children:[e.jsxs("span",{className:"text-ink-mute",children:[ht.label," :"]}),ht.pensions.map((St,Us)=>{const Jt=ht.val===St,na=ht.pensions.length<2,ds=mt?ht.supp(St):0,Xa=Math.max(1,ht.nights||0),en=Math.round(Math.abs(ds)/Xa),Ta=ds>0?`+ ${se(ds,l)}`:ds<0?`â ${se(Math.abs(ds),l)}`:i("reservation:rooms.included"),Pa=e.jsxs(e.Fragment,{children:[Kt[St]||St,e.jsxs("span",{className:`font-normal ${ds>0?"text-gold-deep":ds<0?"text-emerald-700":"text-ink-mute"}`,children:[" ",Ta]})]});return e.jsxs(us.Fragment,{children:[Us>0&&e.jsx("span",{className:"text-ink-mute","aria-hidden":"true",children:"/"}),na?e.jsx("span",{className:"font-semibold text-ink",children:Pa}):e.jsx("button",{type:"button",onClick:()=>ht.set(St),"aria-pressed":Jt,title:ds!==0?`${ds>0?"+":"â"}${se(en,l)} ${i("reservation:rooms.perPaxPerNight")}`:void 0,"aria-label":i("reservation:rooms.cateringAria3",{pension:Kt[St]||St,city:ht.label,price:Ta}),className:`whitespace-nowrap transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy ${Jt?"font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4":"font-semibold text-ink-soft underline decoration-ink/20 underline-offset-4 hover:text-navy hover:decoration-navy/40"}`,children:Pa})]},St)})]},ht.key)),e.jsx("span",{className:"text-[13px] text-ink-mute",children:i("reservation:rooms.cateringLive5")})]})})()]}),e.jsxs("div",{"data-gm":"prix",className:"flex flex-col justify-start gap-1 border-t border-ink/8 bg-cream-100/40 p-5 sm:p-6 xl:w-[320px] xl:shrink-0 xl:self-start xl:border-l xl:border-t-0",children:[e.jsx("span",{className:"text-[13px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:i("reservation:rooms.totalForPax",{n:L,s:L>1?"s":""})}),e.jsx("span",{className:"font-display text-[2.8rem] font-bold leading-[1.1] text-navy sm:text-[3.4rem]",children:se(ut,l)}),e.jsxs("div",{className:"mt-3 space-y-1.5 border-t border-ink/10 pt-3 text-left text-[15px] leading-[21px]",children:[ya(w).map((Ie,ht)=>e.jsxs("p",{className:"flex items-baseline justify-between gap-2 text-ink-soft",children:[e.jsxs("span",{children:[i("reservation:rooms.paxLine",{p:Ie.persons,s:Ie.persons>1?"s":""})," · ",Ie.shared?i("reservation:rooms.bedIn"):"",Rt[Ie.ty][0].toLowerCase()]}),e.jsxs("strong",{className:"whitespace-nowrap font-bold text-ink",children:[se(Math.round(He(Ie.ty)),l)," ",i("reservation:rooms.perPax2")]})]},ht)),Mt(w)>0&&e.jsxs("p",{className:"text-ink-soft",children:[i("reservation:rooms.childNoBedLine",{k:Mt(w),s:Mt(w)>1?"s":""})," · ",e.jsxs("strong",{className:"font-bold text-ink",children:[se(Math.round(Fe),l)," ",i("reservation:rooms.perPax2")]})]}),(()=>{const Ie=xt>0?xt*Math.min(Math.max(0,(I.children||0)-Mt(w)),Pe(w)):0;return Ie>0?e.jsxs("p",{className:"flex items-center justify-between text-emerald-700",children:[e.jsx("span",{children:i("reservation:rooms.childReduction")}),e.jsxs("span",{className:"font-semibold",children:["â ",se(Math.round(Ie),l)]})]}):null})(),Oe>0&&e.jsx("p",{className:"font-semibold text-gold-deep",children:i("reservation:rooms.viewSuppMk5",{view:Ea(ee.viewMk),amount:se(Oe,l)})}),rt>0&&e.jsx("p",{className:"font-semibold text-gold-deep",children:i("reservation:rooms.viewSuppMd5",{view:Ea(ee.viewMd),amount:se(rt,l)})}),e.jsx("p",{className:"pt-1",children:e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-emerald-50 px-2 py-0.5 text-[10.5px] font-bold text-emerald-700 ring-1 ring-emerald-200",children:[e.jsx(h,{name:"check",className:"h-3 w-3"})," ",i("reservation:rooms.groupRateIncluded")]})})]}),bt?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-3",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-navy px-3 py-1 text-[12px] font-bold text-cream-100",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5"})," ",i("reservation:rooms.selected")]})}),e.jsxs("button",{onClick:()=>o("visa"),className:"mt-2 flex w-full items-center justify-center gap-1.5 whitespace-nowrap rounded-xl bg-red-brand px-4 py-3.5 text-[15px] font-bold text-white shadow-lift transition-all hover:-translate-y-0.5 hover:brightness-105",children:[i("reservation:common.continue")," · ",i("reservation:stepper.visa")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]}):e.jsxs("button",{onClick:()=>{Ca(w,ee,ut),o("visa")},className:"mt-4 flex w-full items-center justify-center gap-2 rounded-xl bg-red-brand px-4 py-3.5 text-[15px] font-bold text-white shadow-lift transition-all hover:-translate-y-0.5 hover:brightness-105",children:[w.shared?i("reservation:rooms.chooseShareGo5"):i("reservation:rooms.chooseLayoutGo5")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]}),e.jsxs("p",{className:"mt-1 flex items-center justify-center gap-1.5 text-center text-[11px] text-ink-mute",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",i("reservation:rooms.allInclusive"),String(l).toUpperCase()!=="EUR"?i("reservation:roomModal.plusVisa"):""," ",i("reservation:rooms.includedWord")]})]})]})]},Pn)})}),_e.some(r=>!r.__sep)&&(cs.length>0||S)&&e.jsxs("section",{className:"mt-9 border-t border-ink/10 pt-6",children:[e.jsx("h3",{className:"font-display text-[1.5rem] font-bold leading-tight text-navy sm:text-[1.8rem]",children:i("reservation:rooms.viewsBoxTitle2")}),S?e.jsx("button",{type:"button",onClick:()=>{Z(null),k(null)},className:"mt-2 text-[14px] font-bold text-navy underline decoration-gold-deep decoration-2 underline-offset-[5px] transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:i("reservation:rooms.viewsBoxReset2")}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-1.5 max-w-3xl text-[14px] leading-snug text-ink-soft",children:i("reservation:rooms.viewsBoxSub5")}),e.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-3",children:cs.map(r=>{const f=r.city==="mk"?i("reservation:common.makkah"):i("reservation:common.medina");return e.jsx(mn,{img:Ft(r.city,r.name),eyebrow:f,titre:i("reservation:rooms.viewTileTitle5",{view:Ea(r.
402name)}),prix:i("reservation:rooms.viewTilePrice5",{amount:se(r.supp,l)}),aria:i("reservation:rooms.viewsBoxChipAria2",{view:Ea(r.name),city:f}),onClick:()=>W(w=>w.includes(`${r.city}:${r.name}`)?w:[...w,`${r.city}:${r.name}`])},`${r.city}-${r.name}`)})})]})]}),kt>0&&e.jsx("p",{className:"mt-5 text-center",children:e.jsx("button",{type:"button",onClick:()=>de([]),className:"text-[14px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-[5px] transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:i("reservation:rooms.hiddenRestore5",{n:kt,s:kt>1?"s":""})})}),Nt>0&&e.jsxs("div",{className:"mt-6 text-center",children:[e.jsxs("button",{type:"button",onClick:()=>B(Et+5),className:"group inline-flex items-center gap-2 font-display text-[1.2rem] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-[6px] transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:[Nt===1?i("reservation:rooms.wantMore1"):i("reservation:rooms.wantMoreN",{n:Nt}),e.jsx(h,{name:"chevron",className:"h-5 w-5 shrink-0 text-gold-deep transition-transform group-hover:translate-y-0.5"})]}),e.jsx("p",{className:"mt-1.5 text-[13px] text-ink-mute",children:i("reservation:rooms.wantMoreHint2")})]}),(Qt||Yt)&&e.jsxs("section",{className:"mt-9 border-t border-ink/10 pt-6",children:[e.jsx("h3",{className:"font-display text-[1.5rem] font-bold leading-tight text-navy sm:text-[1.8rem]",children:i("reservation:rooms.axisTitle2")}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-[14px] leading-snug text-ink-soft",children:i("reservation:rooms.axisIntro2")}),e.jsxs("div",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:[Qt&&e.jsx(mn,{img:wt("triple"),eyebrow:i("reservation:rooms.axisCount5",{n:ft,s:ft>1?"s":""}),titre:i("reservation:rooms.axisSharedTitle5"),texte:i("reservation:rooms.axisSharedHint2")+" "+i("reservation:rooms.sharedSubjectTo5"),aria:ft===1?i("reservation:rooms.axisSharedLink12"):i("reservation:rooms.axisSharedLinkN2",{n:ft}),onClick:()=>{q(!0),requestAnimationFrame(()=>{var r;return(r=document.getElementById("gm-chambres-partagees"))==null?void 0:r.scrollIntoView({behavior:"smooth",block:"center"})})}}),Yt&&e.jsx(mn,{img:wt("single"),eyebrow:i("reservation:rooms.axisCount5",{n:qt,s:qt>1?"s":""}),titre:i("reservation:rooms.axisSingleTitle5"),texte:i("reservation:rooms.axisSingleHint2"),aria:qt===1?i("reservation:rooms.axisSingleLink12"):i("reservation:rooms.axisSingleLinkN2",{n:qt}),onClick:()=>{Be(!0),requestAnimationFrame(()=>{var r;return(r=document.getElementById("gm-chambres-individuelles"))==null?void 0:r.scrollIntoView({behavior:"smooth",block:"center"})})}})]})]}),_e.some(r=>!r.__sep)&&e.jsxs("p",{className:"mt-7 flex items-start justify-center gap-2 border-t border-ink/10 pt-5 text-center text-[13.5px] leading-snug text-ink-mute",children:[e.jsx(h,{name:"kaaba",className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsx("span",{className:"max-w-2xl",children:i("reservation:rooms.viewLaterNote5")})]}),Q&&e.jsx(sd,{combo:Q,cur:l,initialCity:Q.initialCity,initialTab:Q.initialTab,vueMk:Q.viewMk||Ya,vueMd:Q.viewMd||Qa,pension:Kt[pe]||pe,hotelMk:At,hotelMd:Ut,ppFor:r=>Math.round(He(r,!1)),n:L,grandTotal:Math.round(Lt(Q)),starsMk:t.starsMk||5,starsMd:t.starsMd||5,roomImages:Ws(m.roomImages),roomImagesMd:Ws(m.roomImagesMd),roomMeta:{mk:Ws(m.roomMeta.makkah),md:Ws(m.roomMeta.medina)},roomImagesByView:{mk:Ws(m.roomImagesByView.makkah),md:Ws(m.roomImagesByView.medina)},roomMetaByView:{mk:Ws(m.roomMetaByView.makkah),md:Ws(m.roomMetaByView.medina)},trip:{airline:t.airline||i("reservation:rooms.flightIncluded"),city:t.city,date:t.date,returnDate:t.returnDate,nightsMakkah:t.nightsMakkah||m.nightsMk,nightsMedina:t.nightsMedina||m.nightsMd,mkIn:Me(Re),mkOut:Me(Je),mdIn:Me(ie),mdOut:Me(Ee)},onClose:()=>z(null),onPrev:zt.length>1?()=>{const r=zt.findIndex(f=>f.name===Q.name);z(zt[(r-1+zt.length)%zt.length])}:null,onNext:zt.length>1?()=>{const r=zt.findIndex(f=>f.name===Q.name);z(zt[(r+1)%zt.length])}:null}),oe&&e.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-ink/60 p-4 backdrop-blur-sm",onClick:()=>Ve(null),children:e.jsxs("div",{className:"flex max-h-[92vh] w-full max-w-5xl flex-col overflow-hidden rounded-3xl bg-white shadow-2xl",onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-3 border-b border-ink/8 bg-gradient-to-br from-cream-100 via-white to-w
402hite p-5 sm:p-6",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[oe.chain_logo&&e.jsx("img",{src:oe.chain_logo,alt:"",loading:"lazy",className:"h-11 w-11 shrink-0 rounded-xl bg-white object-contain p-0.5 ring-1 ring-ink/10"}),e.jsxs("div",{children:[e.jsxs("h3",{className:"font-display text-[1.5rem] leading-tight text-navy sm:text-[1.85rem]",children:[oe.name," ",e.jsxs("span",{className:"text-[var(--accent)]",children:[oe.stars,"â
"]})]}),oe.dist&&e.jsxs("p",{className:"mt-1 flex items-center gap-1.5 text-[13px] font-semibold text-ink-soft",children:[e.jsx(h,{name:"pin",className:"h-4 w-4 shrink-0 text-[var(--accent)]"})," ",oe.dist]})]})]}),e.jsx("button",{type:"button",onClick:()=>Ve(null),className:"grid h-9 w-9 shrink-0 place-items-center rounded-full bg-white text-ink ring-1 ring-ink/10 transition-colors hover:bg-cream-200","aria-label":i("reservation:common.close"),children:e.jsx(h,{name:"plus",className:"h-5 w-5 rotate-45"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto",children:[e.jsxs("div",{className:"p-5 sm:p-6",children:[e.jsxs("button",{type:"button",onClick:()=>A(0),className:"group/hero relative block aspect-[16/9] w-full overflow-hidden rounded-2xl bg-ink/5 shadow-soft",children:[e.jsx(ls,{dark:!0,label:oe.name,src:(oe.imgs||[])[0],className:"absolute inset-0 transition-transform duration-500 group-hover/hero:scale-105"}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-ink/0 transition-colors group-hover/hero:bg-ink/15"}),e.jsxs("span",{className:"pointer-events-none absolute bottom-3 right-3 inline-flex items-center gap-1.5 rounded-full bg-white/95 px-3 py-1.5 text-[11.5px] font-bold text-navy shadow-lift",children:[e.jsx(h,{name:"sparkle",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",i("reservation:rooms.enlarge")]})]}),(oe.imgs||[]).length>1&&e.jsx("div",{className:"mt-2.5 grid gap-2.5 sm:grid-cols-4",children:(oe.imgs||[]).slice(1).map((r,f)=>e.jsxs("button",{type:"button",onClick:()=>A(f+1),className:"group/th relative block aspect-[4/3] w-full overflow-hidden rounded-xl bg-ink/5",children:[e.jsx(ls,{dark:!0,label:oe.name,src:r,className:"absolute inset-0 transition-transform duration-500 group-hover/th:scale-105"}),e.jsx("span",{className:"pointer-events-none absolute inset-0 bg-ink/0 transition-colors group-hover/th:bg-ink/15"})]},f))})]}),(oe.quick_facts||[]).filter(r=>r==null?void 0:r.label).length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 px-5 sm:px-6",children:(oe.quick_facts||[]).filter(r=>r==null?void 0:r.label).map((r,f)=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-navy/5 px-3 py-1.5 text-[12px] font-semibold text-navy",children:[e.jsx(h,{name:r.icon||"check",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",r.label]},f))}),(oe.highlights||[]).filter(r=>r==null?void 0:r.label).length>0&&e.jsx("div",{className:"mt-3 flex flex-wrap gap-2 px-5 sm:px-6",children:(oe.highlights||[]).filter(r=>r==null?void 0:r.label).map((r,f)=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-cream-100 px-3 py-1.5 text-[12px] font-semibold text-navy",children:[e.jsx(h,{name:r.icon||"check",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",r.label]},f))}),oe.description&&e.jsx("p",{className:"mt-5 border-t border-ink/8 px-5 pt-5 text-[13.5px] leading-relaxed text-ink-soft sm:px-6",children:oe.description}),(oe.equipments||[]).filter(r=>((r==null?void 0:r.items)||[]).some(f=>f==null?void 0:f.name)).length>0&&e.jsxs("div",{className:"mt-5 border-t border-ink/8 px-5 pt-5 sm:px-6",children:[e.jsx("p",{className:"mb-3 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:i("reservation:rooms.equipments")}),e.jsx("div",{className:"grid gap-x-8 gap-y-4 sm:grid-cols-2 lg:grid-cols-3",children:(oe.equipments||[]).filter(r=>((r==null?void 0:r.items)||[]).some(f=>f==null?void 0:f.name)).map((r,f)=>e.jsxs("div",{children:[e.jsx("p",{className:"mb-1.5 text-[12px] font-bold text-navy",children:r.category}),e.jsx("ul",{className:"space-y-1",children:(r.items||[]).filter(w=>w==null?void 0:w.name).map((w,X)=>e.jsxs("li",{className:"flex items-start gap-1.5 text-[12.5px] text-ink-soft",children:[e.jsx(h,{name:"check",className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",w.name,w.value?e.jsxs("span",{className:"text-ink-mute",children:[" · ",w.value]}):null]},X))})]},f))})]}),(oe.nearby_places||[]).filter(r=>(r==null?void 0:r.name)||(r==null?void 0:r.distance)).length>0&&e.jsxs("div",{className:"mt-5 border-t border-ink/8 px-5 pt-5 sm:px-6",children:[e.jsx("p",{className:"mb-3 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:i("reservation:rooms.nearby")}),e.jsx("div",{className:"grid gap-x-8 gap-y-2 sm:grid-cols-2",children:(oe.nearby_places||[]).filter(r=>(r==null?void 0:r.name)||(r==null?void 0:r.distance)).map((r,f)=>e.jsxs("p",{className:"flex items-center justify-between gap-2 border-b border-ink/5 py-1 text-[12.5px] text-ink-soft last:border-b-0",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"pin",className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",r.name]})," ",r.distance&&e.jsx("span",{className:"font-semibold text-ink",children:r.distance})]},f))})]}),oe.image_localisation&&e.jsxs("div",{className:"mt-5 border-t border-ink/8 px-5 pt-5 sm:px-6",children:[e.jsx("p",{className:"mb-3 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:i("reservation:rooms.location")}),e.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded-xl bg-ink/5",children:e.jsx(ls,{dark:!0,label:oe.name,src:oe.image_localisation,className:"absolute inset-0"})})]}),e.jsx("div",{className:"h-6"})]}),e.jsx("div",{className:"flex shrink-0 items-center justify-center border-t border-ink/8 bg-white p-4",children:e.jsxs("button",{type:"button",onClick:()=>Ve(null),className:"inline-flex items-center gap-1.5 rounded-full px-5 py-2 text-[13.5px] font-bold text-navy underline decoration-navy/30 underline-offset-4 transition-colors hover:bg-cream-100 hover:decoration-navy",children:[e.jsx(h,{name:"plus",className:"h-4 w-4 rotate-45"})," ",i("reservation:common.close")]})})]})}),oe&&y!==null&&(()=>{const r=oe.imgs||[];if(!r.length)return null;const f=(y%r.length+r.length)%r.length;return e.jsxs("div",{className:"fixed inset-0 z-[110] flex items-center justify-center bg-ink/95 p-4",onClick:()=>A(null),children:[e.jsx("button",{type:"button",onClick:()=>A(null),className:"absolute right-4 top-4 grid h-10 w-10 place-items-center rounded-full bg-white/10 text-white transition-colors hover:bg-white/20","aria-label":i("reservation:common.close"),children:e.jsx(h,{name:"plus",className:"h-6 w-6 rotate-45"})}),r.length>1&&e.jsx("button",{type:"button",onClick:w=>{w.stopPropagation(),A(f-1)},className:"absolute left-3 top-1/2 grid h-11 w-11 -translate-y-1/2 place-items-center rounded-full bg-white/10 text-white transition-colors hover:bg-white/20","aria-label":i("reservation:common.previous"),children:e.jsx(h,{name:"chevron",className:"h-6 w-6 rotate-90"})}),e.jsxs("div",{className:"relative w-full max-w-5xl",onClick:w=>w.stopPropagation(),children:[e.jsx("div",{className:"relative aspect-[16/10] w-full overflow-hidden rounded-xl bg-ink/40",children:e.jsx(ls,{dark:!0,label:oe.name,src:r[f],className:"absolute inset-0"})}),e.jsxs("p",{className:"mt-3 text-center text-[13px] font-semibold text-white/90",children:[oe.name," · ",f+1," / ",r.length]})]}),r.length>1&&e.jsx("button",{type:"button",onClick:w=>{w.stopPropagation(),A(f+1)},className:"absolute right-3 top-1/2 grid h-11 w-11 -translate-y-1/2 place-items-center rounded-full bg-white/10 text-white transition-colors hover:bg-white/20","aria-label":i("reservation:common.next"),children:e.jsx(h,{name:"chevron",className:"h-6 w-6 -rotate-90"})})]})})(),je&&e.jsxs("div",{className:"fixed inset-0 z-[110] flex items-center justify-center bg-ink/95 p-4",onClick:()=>Se(null),children:[e.jsx("button",{type:"button",onClick:()=>Se(null),className:"absolute right-4 top-4 grid h-10 w-10 place-items-center rounded-full bg-white/10 text-white transition-colors hover:bg-white/20","aria-label":i("reservation:common.close"),children:e.jsx(h,{name:"plus",className:"h-6 w-6 rotate-45"})}),e.jsxs("div",{className:"relative w-full max-w-4xl",onClick:r=>r.stopPropagation(),children:[e.jsx("div",{className:"relative aspect-[16/10] w-full overflow-hidden rounded-xl bg-ink/40",children:e.jsx(ls,{dark:!0,label:je.name,src:je.img,className:"absolute inset-0"})}),e.jsxs("p",{className:"mt-3 flex items-center justify-center gap-1.5 text-center text-[13px] font-semibold text-white/90",children:[e.jsx(h,{name:"pin",className:"h-4 w-4 text-[var(--accent)]"}
402)," ",je.name," · ",i("reservation:rooms.emplacement")]})]})]})]})}const nd=[{l:"reservation:visa.cmpOmra",t:["v","reservation:visa.cmpYes6"],o:["v","reservation:visa.cmpYes6"]},{l:"reservation:visa.cmpVisaType",t:["t","reservation:visa.cmpVisaTypeT"],o:["v","reservation:visa.cmpVisaTypeO"]},{l:"reservation:visa.cmpNightly5",t:null,o:["v","reservation:visa.cmpNightlyO5"]},{l:"reservation:visa.cmpMain",t:["v","reservation:visa.cmpIncluded"],o:["v","reservation:visa.cmpIncluded"]},{l:"reservation:visa.cmpMulti",t:["v","reservation:visa.cmpYes6"],o:["v","reservation:visa.cmpYes6"]},{l:"reservation:visa.cmpIns",t:null,o:["v","reservation:visa.cmpInsO5"],f:!0},{l:"reservation:visa.cmpMed",t:null,o:["v","reservation:visa.cmpMedO"],f:!0},{l:"reservation:visa.cmpHospital5",t:null,o:["v","reservation:visa.cmpHospitalO5"],f:!0},{l:"reservation:visa.cmpDisrupt",t:null,o:["v","reservation:visa.cmpDisruptO"]},{l:"reservation:visa.cmpHotel",t:null,o:["v","reservation:visa.cmpHotelO"]},{l:"reservation:visa.cmpBags",t:null,o:["v","reservation:visa.cmpBagsO"]},{l:"reservation:visa.cmpZamzam",t:null,o:["v","reservation:visa.cmpZamzamO"]}];function rd({b:t,update:n,go:o,combine:a,visaBillable:s}){var V;const{t:i}=it(),{data:l,isLoading:d,isError:c,refetch:m}=So(),g=Ys(t),N=l==null?void 0:l.find(k=>/omra|umrah/i.test(k.name)),u=l==null?void 0:l.find(k=>/touris/i.test(k.name)),p=[];u&&p.push(["tourisme",u]),N&&p.push(["omra",N]);const x=k=>(k==null?void 0:k.available)===!1,j=k=>Number(k==null?void 0:k.price_per_person)||0,C=s!==void 0?!!s:String(t.currency||"EUR").toUpperCase()==="EUR",U=t.currency||"EUR",I=C&&t.visa?j(t.visa==="tourisme"?u:N):0,L=(k,R)=>{x(R)||(n({visa:k,visaPerPerson:C?j(R):0,visaLabel:i(k==="omra"?"reservation:visa.omraName":"reservation:visa.tourName")}),qn(k,C?R:{...R,price_per_person:0},g.n))},me=b.useRef(!1);if(b.useEffect(()=>{me.current||(me.current=!0,t.visa&&!t.visaLabel&&n({visa:null,visaPerPerson:0}))},[]),b.useEffect(()=>{if(!t.visa||!(l!=null&&l.length))return;const k=t.visa==="omra"?N:u;k&&qn(t.visa,C?k:{...k,price_per_person:0},g.n)},[g.n,t.visa,l,C]),d)return e.jsx(js,{label:i("reservation:visa.loading")});if(c)return e.jsx(Ns,{message:i("reservation:visa.loadError"),onRetry:m});if(!p.length)return e.jsx(Ns,{message:i("reservation:visa.noFormula"),actionLabel:i("reservation:visa.continueNoVisa"),onAction:()=>o("options")});const Z=(k,R)=>k?k[0]==="t"?e.jsx("span",{children:i(k[1])}):e.jsxs("span",{className:"inline-flex items-start gap-1.5",children:[e.jsx(h,{name:"check",className:`mt-0.5 h-4 w-4 shrink-0 ${R?"text-emerald-600":"text-ink-soft"}`}),k[1]?e.jsx("span",{children:i(k[1])}):null]}):e.jsx("span",{className:"text-ink-mute/50",children:"â"});return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-5 text-center",children:[e.jsx("h3",{className:"font-display text-[1.9rem] font-bold leading-tight text-navy",children:i("reservation:visa.chooseTitle")}),e.jsx("p",{className:"mx-auto mt-1.5 max-w-2xl text-[14.5px] italic leading-snug text-ink-soft",children:i("reservation:visa.chooseSub")})]}),(V=a==null?void 0:a.group)!=null&&V.visaInfo?e.jsxs("div",{className:"mb-5 flex items-start gap-2.5 rounded-2xl border border-navy/15 bg-cream-100 px-4 py-3.5",children:[e.jsx(h,{name:"shield",className:"mt-0.5 h-5 w-5 shrink-0 text-navy"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[12px] font-bold uppercase tracking-wider text-gold-deep",children:i("voyages:combine.visaEncartTitle")}),e.jsx("p",{className:"mt-1 text-[13.5px] leading-relaxed text-ink-soft",children:a.group.visaInfo})]})]}):null,e.jsxs("div",{className:"mt-7",children:[e.jsx("div",{className:"overflow-x-auto rounded-2xl border border-ink/25",children:e.jsxs("table",{className:"w-full min-w-[620px] border-collapse text-[13px]",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"w-[34%] bg-cream-100 px-3.5 py-3 text-left text-[12px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:i("reservation:visa.compareCol5")}),p.map(([k,R])=>{const _=t.visa===k,be=x(R);return e.jsx("th",{scope:"col",className:`border-t-[3px] px-3.5 py-3 text-left align-top ${k==="omra"?"border-gold-deep bg-gold-light/10":_?"border-transparent bg-navy/[0.06] ring-1 ring-inset ring-navy/30":"border-transparent bg-white"}`,children:e.jsxs("span",{className:"flex flex-col items-start gap-1",children:[e.jsx("span",{className:"flex flex-wrap items-baseline gap-x-2",children:e.jsx("span",{className:"font-display text-[1.3rem] font-bold leading-tight text-navy sm:text-[1.45rem]",children:i(k==="omra"?"reservation:visa.omraName":"reservation:visa.tourName")})}),k==="omra"&&e.jsxs("span",{className:"flex items-center gap-1.5 text-[11.5px] font-bold uppercase tracking-[0.08em] text-gold-deep",children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5 shrink-0"})," ",i("reservation:visa.popularTag5")]}),be&&e.jsx("span",{className:"mt-1 text-[12px] font-semibold text-ink-mute",children:i("reservation:visa.suspended")})]})}
402,k)})]})}),e.jsxs("tbody",{children:[nd.map((k,R)=>e.jsxs("tr",{className:R%2?"bg-cream-100/60":"bg-white",children:[e.jsx("th",{scope:"row",className:`border-t border-ink/20 px-3.5 py-2 text-left font-bold ${k.f?"text-navy":"text-ink-soft"}`,children:i(k.l)}),e.jsx("td",{className:"border-l border-t border-ink/20 px-3.5 py-2 text-center align-middle text-ink-soft",children:Z(k.t,!1)}),e.jsx("td",{className:`border-l border-t border-ink/20 bg-gold-light/10 px-3.5 py-2 align-middle ${k.f?"font-semibold text-ink":"text-ink-soft"}`,children:Z(k.o,!0)})]},k.l)),e.jsxs("tr",{children:[e.jsx("th",{scope:"row",className:"border-t-2 border-ink/30 px-3.5 py-2.5 text-left font-bold text-navy",children:i("reservation:visa.cmpPrice")}),e.jsx("td",{className:"border-l border-t-2 border-ink/30 px-3.5 py-2.5 text-center align-middle font-bold text-navy",children:C&&j(u)>0?e.jsxs(e.Fragment,{children:[se(j(u),U),e.jsxs("span",{className:"block text-[11.5px] font-semibold text-ink-mute",children:[i("reservation:visa.cmpPricePerPax6")," · ",i("reservation:visa.cmpPriceTotal6",{total:se(j(u)*g.n,U),count:g.n})]})]}):e.jsx("span",{className:"text-[13px] font-semibold text-ink-soft",children:i("reservation:visa.cmpPriceIncluded6")})}),e.jsx("td",{className:"border-l border-t-2 border-ink/30 bg-gold-light/10 px-3.5 py-2.5 align-middle font-bold text-navy",children:j(N)>0&&C?e.jsxs(e.Fragment,{children:["+ ",se(j(N),U),e.jsxs("span",{className:"block text-[11.5px] font-semibold text-ink-mute",children:[i("reservation:visa.cmpPricePerPax6")," · ",i("reservation:visa.cmpPriceTotal6",{total:se(j(N)*g.n,U),count:g.n})]})]}):e.jsxs(e.Fragment,{children:[i("reservation:visa.recommendedStar")," ",i("reservation:visa.cmpPriceOmra")]})})]})]})]})}),e.jsxs("ul",{className:"mt-2.5 space-y-1.5 text-[12.5px] leading-snug text-ink-soft",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(h,{name:"shield",className:"mt-0.5 h-4 w-4 shrink-0 text-red-brand"}),e.jsx("span",{className:"font-semibold text-ink",children:i("reservation:visa.noteForeignPassports5")})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(h,{name:"check",className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsx("span",{children:i("reservation:visa.noteDocuments5")})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(h,{name:"quote",className:"mt-0.5 h-4 w-4 shrink-0 text-ink-mute"}),e.jsx("span",{className:"italic text-ink-mute",children:i("reservation:visa.compareNote")})]})]}),e.jsx("div",{className:"mt-4 rounded-2xl border border-ink/15 bg-cream-100 px-4 py-3.5",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-6 gap-y-3",children:[e.jsxs("div",{className:"min-w-0 flex-1 text-right",children:[e.jsx("label",{htmlFor:"gm-visa-formule",className:"mb-1.5 block text-[11px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:i("reservation:visa.yourFormula6")}),e.jsxs("select",{id:"gm-visa-formule",value:t.visa||"",onChange:k=>{const R=k.target.value;if(!R){n({visa:null,visaPerPerson:0,visaLabel:null});return}L(R,R==="omra"?N:u)},className:`ml-auto block max-w-full rounded-xl border bg-white px-3.5 py-2.5 text-[13.5px] outline-none transition-colors focus:border-navy ${t.visa?"border-navy font-bold text-navy":"border-ink/25 font-semibold text-ink"}`,children:[e.jsx("option",{value:"",children:i("reservation:visa.pickPlaceholder6")}),p.map(([k,R])=>{const _=i(k==="omra"?"reservation:visa.omraName":"reservation:visa.tourName"),be=x(R)?` â ${i("reservation:visa.suspended")}`:k==="omra"?` â ${i("reservation:visa.recommendedWord6").toLowerCase()}`:"";return e.jsxs("option",{value:k,disabled:x(R),children:[_,be]},k)})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-2",children:[e.jsxs("div",{className:"min-w-0 text-right",children:[e.jsx("p",{className:"text-[11.5px] font-bold uppercase tracking-wider text-gold-deep",children:i("reservation:visa.totalLabel")}),e.jsxs("p",{className:"mt-0.5 text-[13.5px] font-semibold text-ink",children:[t.visaLabel||i("reservation:summary.toChoose"),e.jsxs("span",{className:"font-medium text-ink-soft",children:[" · ",i("reservation:visa.cmpPriceTimes",{count:g.n})]})]})]}),e.jsx("p",{className:"font-display text-[1.7rem] font-bold leading-none text-navy",children:I>0?`+ ${se(I*g.n,U)}`:se(0,U)})]})]})})]}),e.jsx(Vi,{onBack:()=>o("rooms"),onNext:()=>{t.visa&&o("options")},nextLabel:i("reservation:common.continue"),disabled:!t.visa,disabledHint:i("reservation:visa.pickFirst6")})]})}const id=["reservation:options.insBank1","reservation:options.insBank2","reservation:options.insBank3","reservation:options.insBank4","reservation:options.insBank5"],od=["reservation:options.insWin1","reservation:options.insWin2","reservation:options.insWin3","reservation:options.insWin4","reservation:options.insWin5"],dn=({icon:t,titre:n,sous:o,photo:a,alt:s,pos:i=""})=>e.jsxs("div",{className:"flex items-start gap-4",children:[a&&e.jsx("img",{src:a,alt:s||"",loading:"lazy",className:`h-20 w-28 shrink-0 rounded-xl border border-ink/12 object-cover sm:h-24 sm:w-32 ${i}`}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h4",{className:"flex items-center gap-2 font-display text-[1.4rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:t,className:"h-5 w-5 shrink-0 text-gold-deep"})," ",n]}),o&&e.jsx("p",{className:"mt-1 text-[13.5px] leading-snug text-ink-soft",children:o})]})]}),_n=({titre:t,icone:n="quote",children:o})=>e.jsxs("details",{className:"group overflow-hidden rounded-xl border border-ink/15 bg-white transition-colors open:border-navy/35 hover:border-navy/40",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-3 px-4 py-3 transition-colors hover:bg-cream-100/60 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy [&::-webkit-details-marker]:hidden",children:[e.jsx("span",{className:"grid h-8 w-8 shrink-0 place-items-center rounded-full bg-[var(--accent)]/15 text-gold-deep",children:e.jsx(h,{name:n,className:"h-4 w-4"})}),e.jsx("span",{className:"min-w-0 flex-1 text-[15px] font-bold leading-snug text-navy",children:t}),e.jsx(h,{name:"chevron",className:"h-4 w-4 shrink-0 text-ink-mute transition-transform group-open:rotate-180"})]}),e.jsx("div",{className:"border-t border-ink/10 bg-cream-50/50 px-4 pb-4 pt-3.5",children:o})]});function ld(){const{t}=it(),[n,o]=b.useState(!1);return b.useEffect(()=>{if(!n)return;const a=s=>{s.key==="Escape"&&o(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[n]),e.jsxs("div",{className:"mt-3 space-y-3",children:[e.jsx("h4",{className:"font-display text-[1.35rem] font-bold leading-tight text-navy",children:t("reservation:options.insHookH4")}),e.jsx("ul",{className:"grid gap-2 sm:grid-cols-2",children:["reservation:options.insBullet1","reservation:options.insBullet2","reservation:options.insBullet3","reservation:options.insBullet4","reservation:options.insBullet5"].map((a,s)=>e.jsxs("li",{className:"flex items-start gap-2 rounded-lg bg-cream-100 px-3 py-2 text-[13px] font-medium text-ink",children:[e.jsx(h,{name:"check",className:"mt-0.5 h-4 w-4 shrink-0 text-emerald-600"})," ",t(a)]},s))}),e.jsxs(_n,{icone:"shield",titre:t("reservation:options.insWhyFold6"),children:[e.jsxs("p",{className:"text-[13.5px] leading-relaxed text-ink-soft",children:[t("reservation:options.insProse1a"),e.jsx("strong",{className:"text-navy",children:t("reservation:options.insProse1b")}),t("reservation:options.insProse1c6")]}),e.jsxs("p",{className:"mt-2.5 text-[13.5px] leading-relaxed text-ink-soft",children:[t("reservation:options.insProse2a"),e.jsx("strong",{className:"text-navy",children:t("reservation:options.insProse2b")}),t("reservation:options.insProse2c"),e.jsx("strong",{className:"text-navy",children:t("reservation:options.insProse2d")}),t("reservation:options.insProse2e")]})]}),e.jsxs(_n,{icone:"check",titre:`${t("reservation:options.insGuaranteesTitle")} · ${t("reservation:options.insCount6",{n:vn.length})}`,children:[e.jsx("div",{className:"overflow-x-auto rounded-xl border border-ink/10 bg-white",children:e.jsxs("table",{className:"w-full border-collapse text-[12.5px]",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-navy text-cream-100",children:[e.jsx("th",{scope:"col",className:"px-3 py-2.5 text-left font-bold",children:t("reservation:options.insColGuarantee")}),e.jsx("th",{scope:"col",className:"px-3 py-2.5 text-left font-bold",children:t("reservation:options.insColCeiling")})]})}),e.jsx("tbody",{className:"divide-y divide-ink/8",children:vn.map((a,s)=>{const i=/annulation/i.test(a.garantie);return e.jsxs("tr",{className:`align-top ${i?"bg-emerald-50/60":s%2?"bg-cream-50/50":""}`,children:[e.jsxs("td",{className:"px-3 py-2.5 font-semibold text-ink",children:[a.garantie,i&&e.jsx("span",{className:"ml-1.5 rounded-full bg-emerald-600 px-1.5 py-0.5 text-[8.5px] font-bold uppercase tracking-wide text-white align-middle",children:t("reservation:options.insKeyBadge")})]}),e.jsx("td",{className:"px-3 py-2.5 tabular-nums text-ink-soft",children:a.plafond})]},s)})})]})}),e.jsxs("button",{type:"button",onClick:()=>o(!0),className:"mt-3 inline-flex items-center gap-1.5 text-[13px] font-semibold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep",children:[e.jsx(h,{name:"check",className:"h-4 w-4 text-emerald-600"})," ",t("reservation:options.insSeeDetail")]})]}),e.jsxs(_n,{icone:"quote",titre:t("reservation:options.insObjection"),children:[e.jsxs("p",{className:"text-[13.5px] leading-relaxed text-ink-soft",children:[t("reservation:options.insObjA"),e.jsx("strong",{className:"text-navy",children:t("reservation:options.insObjStrong1")}),t("reservation:options.insObjB"),e.jsx("strong",{className:"text-navy",children:t("reservation:options.insObjStrong2")}),t("reservation:options.insObjC"),e.jsx("strong",{className:"text-navy",children:t("reservation:options.insObjStrong3")}),t("reservation:options.insObjD")]}),e.jsxs("div",{className:"mt-3.5 grid gap-2.5 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-ink/12 bg-white p-3.5",children:[e.jsxs("p",{className:"mb-2 flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wider text-ink-mute",children:[e.jsx(h,{name:"close",className:"h-3.5 w-3.5"})," ",t("reservation:options.insBankCardTitle")]}),e.jsx("ul",{className:"space-y-1.5",children:id.map((a,s)=>e.jsxs("li",{className:"flex items-start gap-1.5 text-[12.5px] leading-snug text-ink-soft",children:[e.jsx("span",{className:"mt-px text-ink-mute",children:"â"}),e.jsx("span",{children:t(a)})]},s))})]}),e.jsxs("div",{className:"rounded-xl border-2 border-emerald-300 bg-emerald-50/70 p-3.5",children:[e.jsxs("p",{className:"mb-2 flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wider text-emerald-700",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5"})," ",t("reservation:options.insSerenitrip")]}),e.jsx("ul",{className:"space-y-1.5",children:od.map((a,s)=>e.jsxs("li",{className:"flex items-start gap-1.5 text-[12.5px] font-medium leading-snug text-ink",children:[e.jsx("span",{className:"mt-px text-emerald-600",children:"â"}),e.jsx("span",{children:t(a)})]},s))})]})]})]}),n&&e.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true",children:[e.jsx("div",{className:"absolute inset-0 bg-ink/70 backdrop-blur-sm",onClick:()=>o(!1)}),e.jsxs("div",{className:"relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-white p-5 shadow-2xl sm:p-6",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[e.jsx("h4",{className:"font-display text-[1.3rem] font-bold text-navy",children:t("reservation:options.insDetailTitle")}),e.jsx("button",{type:"button",onClick:()=>o(!1),"aria-label":t("reservation:common.close"),className:"grid h-9 w-9 shrink-0 place-items-center rounded-full bg-ink/5 transition-colors hover:bg-ink/10",children:e.jsx(h,{name:"close",className:"h-5 w-5 text-ink-soft"})})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-emerald-200 bg-emerald-50 p-4",children:[e.jsxs("p",{className:"mb-2.5 flex items-center gap-1.5 text-[12.5px] font-black uppercase tracking-wide text-emerald-700",children:[e.jsx(h,{name:"check",className:"h-4 w-4"})," ",t("reservation:transfers.included")]}),e.jsx("ul",{className:"space-y-1.5",children:bc.map((a,s)=>e.jsxs("li",{className:"flex items-start gap-1.5 text-[12.5px] leading-snug text-ink-soft",children:[e.jsx("span",{className:"mt-px text-emerald-500",children:"â"}),e.jsx("span",{children:a})]},s))})]}),e.jsxs("div",{className:"rounded-xl border border-ink/15 bg-ink/[0.03] p-4",children:[e.jsxs("p",{className:"mb-2.5 flex items-center gap-1.5 text-[12.5px] font-black uppercase tracking-wide text-ink-soft",children:[e.jsx(h,{name:"close",className:"h-4 w-4"})," ",t("reservation:options.insNotIncluded")]}),e.jsx("ul",{className:"space-y-1.5",children:yc.map((a,s)=>e.jsxs("li",{className:"flex items-start gap-1.5 text-[12.5px] leading-snug text-ink-mute",children:[e.jsx("span",{className:"mt-px",children:"â"}),e.jsx("span",{children:a})]},s))})]})]})]})]})]})}const nr=[{key:"bus",label:"reservation:transfers.tourBus",pitch:"reservation:transfers.tourBusPitch"},{key:"gmc",label:"reservation:transfers.tourGmc",pitch:"reservation:transfers.tourGmcPitch"},{key:"train",label:"reservation:transfers.tourTrain",pitch:"reservation:transfers.tourTrainPitch"},{key:"custom",label:"reservation:transfers.custom",pitch:"reservation:transfers.customPitch"}],cd=t=>{var n;return((n=nr.find(o=>o.key===t))==null?void 0:n.label)||""};function dd({flight:t,hotels:n,paxCount:o,sharedPaxCount:a,cur:s,onChange:i,title:l,sub:d}){var te;const{t:c}=it(),{data:m,isLoading:g}=Ho(),[N,u]=b.useState("bus"),[p,x]=b.useState({}),[j,C]=b.useState({}),U=($,W)=>[fn($),fn(W)].sort().join(">")==="hotel-makkah>hotel-medine",I=(m==null?void 0:m.trajects)||[],L=b.useMemo(()=>{const $=(m==null?void 0:m.trajetPrices)||[],W=jn(s||"EUR");return W!==1?$.map(ye=>({...ye,sellPrice:Math.round((Number(ye.sellPrice)||0)*W),purchasePrice:Math.round((Number(ye.purchasePrice)||0)*W)})):$},[m,s]),me=b.useMemo(()=>I.length?Bn({trajects:I,trajetPrices:L,flight:t,hotels:n,paxCount:o,sharedPaxCount:a},{option:N,modeEdits:p,dateEdits:{},timeEdits:{},sharedEdits:j,totalOverride:""}):null,[I,L,t,n,o,N,p,j]),Z=b.useMemo(()=>{const $={bus:!0,custom:!0,gmc:!0,train:!0};if(!I.length)return $;for(const W of["gmc","train"]){const ye=Bn({trajects:I,trajetPrices:L,flight:t,hotels:n,paxCount:o,sharedPaxCount:a},{option:W,modeEdits:{},dateEdits:{},timeEdits:{},sharedEdits:{},totalOverride:""});$[W]=!(ye.isTourComplet&&ye.forfaitInfo.forfaitUnit==null)}return $},[I,L,t,n,o]),V=b.useMemo(()=>{const $={};if(!I.length)return $;for(const W of["bus","gmc","train","custom"]){const ye=Bn({trajects:I,trajetPrices:L,flight:t,hotels:n,paxCount:o,sharedPaxCount:a},{option:W,modeEdits:W==="custom"?p:{},dateEdits:{},timeEdits:{},sharedEdits:W==="custom"?j:{},totalOverride:""});$[W]=ye.transfersTotal||0}return $},[I,L,t,n,o,p,j]);b.useEffect(()=>{Z[N]||u("bus")},[Z,N]);const k=me?JSON.stringify(me.config):"null";if(b.useEffect(()=>{i(me?me.transfersTotal:0,me?me.config:null,me?cd(me.config.option):"")},[k]),g)return e.jsx("div",{className:"mb-4 rounded-2xl border-2 border-ink/10 bg-white p-6 text-center text-[13px] text-ink-mute shadow-soft",children:c("reservation:transfers.loading")});if(!me)return null;const R=$=>$?bs($,{weekday:"long",day:"2-digit",month:"long"}):"â",_=({m:$,className:W})=>$==="train"?e.jsx(Pi,{className:W}):$==="gmc"||$==="voiture"||$==="h1"?e.jsx(pr,{className:W}):e.jsx(xr,{className:W}),{displayRows:be,transfersTotal:Y,forfaitInfo:Q,isTourComplet:z}
402=me,fe=N==="custom",K=Y>0?se(Y,s):c("reservation:transfers.included"),E=nr,B=[c("reservation:transfers.benefit1"),c("reservation:transfers.benefit2"),c("reservation:transfers.benefit3")],M=($,W)=>{const ye=($||"").toLowerCase(),de=(W||"").toLowerCase();return/a[ée]roport|airport|djeddah|jeddah/.test(de)?c("reservation:transfers.legToAirport"):/a[ée]roport|airport/.test(ye)?c("reservation:transfers.legWelcome"):/ziyara/.test(de)?c("reservation:transfers.legZiyarat"):/mecque|makkah/.test(de)&&/m[ée]dine|madin/.test(ye)||/m[ée]dine|madin/.test(de)&&/mecque|makkah/.test(ye)?c("reservation:transfers.legBetweenCities"):c("reservation:transfers.legPrivate")},q=$=>$==="gmc"||$==="voiture"?"/gallery/gmc.jpg":$==="h1"?"/gallery/h1.png":$==="train"?"/gallery/tgv.jpg":null,ce=e.jsxs(e.Fragment,{children:[e.jsx("ol",{className:"relative ml-1.5 space-y-2 border-l-2 border-[var(--accent)]/25 pl-4",children:be.map($=>{const W=$._resolvedMode,ye=$._priceByMode||{},de=z?null:$._price??null,ot=W==="gmc"||W==="voiture"||W==="h1"||W==="train",Ge=!z&&de==null&&ot,Be=!!$._trainQuote,ve=Be?c("reservation:transfers.onQuote"):!z&&de!=null?`${se(de,s)}${$._shared?c("reservation:transfers.perGroup"):""}`:c(Ge?"reservation:transfers.notPriced":"reservation:transfers.included"),le=hn($.dep),Te=hn($.arr);return e.jsxs("li",{className:"relative",children:[e.jsx("span",{className:"absolute -left-[22px] top-2 grid h-3.5 w-3.5 place-items-center rounded-full bg-white ring-2 ring-[var(--accent)]",children:e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"})}),e.jsxs("div",{className:"rounded-xl border border-ink/8 bg-white px-3 py-2 shadow-soft",children:[e.jsxs("p",{className:"flex items-start gap-2 text-[13.5px] font-semibold leading-snug text-ink",children:[W==="bus"||!q(W)?e.jsx(_,{m:W,className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"}):e.jsx("img",{src:q(W),alt:"",loading:"lazy",className:"mt-0.5 h-6 w-9 shrink-0 rounded-md object-cover"}),e.jsxs("span",{className:"min-w-0",children:[le," ",e.jsx(h,{name:"arrow",className:"inline h-3 w-3 text-ink-mute"})," ",Te,e.jsx("span",{className:`ml-1.5 inline-flex whitespace-nowrap rounded-full px-2 py-0.5 align-middle text-[10.5px] font-bold uppercase tracking-wide ${Be||Ge?"bg-amber-100 text-amber-700":ve===c("reservation:transfers.included")?"bg-emerald-100 text-emerald-700":"bg-navy text-cream-100"}`,children:ve})]})]}),e.jsxs("p",{className:"mt-0.5 pl-[26px] text-[11px] leading-snug text-ink-mute",children:[e.jsxs("span",{className:"font-bold text-gold-deep",children:[R($._date),$._time?` · ${$._time}`:""]})," · ",M(le,Te),Be?c("reservation:transfers.exclTrainTicket"):""]}),fe&&!$._locked&&e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 pl-[22px]",children:[e.jsx("span",{className:"text-[10.5px] font-bold uppercase tracking-wider text-ink-mute",children:c("reservation:transfers.chooseMode")}),e.jsx("div",{className:"inline-flex overflow-hidden rounded-lg border-2 border-navy/20",children:[["bus","Bus",!0,!1],["gmcShared","GMC partagé",U($.dep,$.arr)&&(ye.gmcShared!=null||W==="gmc"&&$._shared),!0],["gmc","GMC privé",ye.gmc!=null||W==="gmc",!1],["h1","H1",ye.h1!=null||W==="h1",!1],["train","Train",(_i($.dep,$.arr)||W==="train")&&(ye.train!=null||W==="train"),!1]].filter(([,,ue])=>ue).map(([ue,$e,,oe])=>{const Ve=ue==="gmcShared"?W==="gmc"&&!!$._shared:W===ue&&!$._shared;return e.jsx("button",{type:"button",onClick:()=>{x(y=>({...y,[$.id]:oe?"gmc":ue})),C(y=>({...y,[$.id]:oe}))},className:`border-l-2 border-navy/20 px-3 py-1.5 text-[12.5px] font-bold transition-colors first:border-l-0 ${Ve?"bg-navy text-cream-100":"bg-white text-navy hover:bg-cream-100"}`,children:$e},ue)})})]}),W==="train"&&e.jsxs("div",{className:"mt-2 flex items-start gap-2 rounded-lg border border-emerald-200 bg-emerald-50 px-3 py-2 text-[12.5px] font-medium leading-snug text-emerald-800",children:[e.jsx(h,{name:"check",className:"mt-0.5 h-4 w-4 shrink-0 text-emerald-600"}),e.jsxs("span",{children:[e.jsx("strong",{className:"font-bold",children:c("reservation:transfers.travelLightTitle")}),c("reservation:transfers.travelLightText")]})]})]})]},$.id)})}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2 rounded-lg bg-cream-100 px-3 py-2",children:[e.jsx("span",{className:"text-[11px] font-bold uppercase tracking-wider text-ink-soft",children:c("reservation:transfers.totalTransfers")}),e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block font-display text-[1.25rem] leading-none text-navy",children:K}),z&&Q.forfaitTotal!=null&&Q.forfaitUnit!=null&&e.jsxs("span",{className:"text-[10px] text-ink-mute",children:[c("reservation:transfers.cars",{n:Q.forfaitCars,s:Q.forfaitCars>1?"s":""})," à ",se(Q.forfaitUnit,s),be.some($=>$._trainQuote)?c("reservation:transfers.exclTrainTicket"):""]})]})]}),e.jsxs("p",{className:"mt-1.5 flex items-start gap-1.5 text-[11px] leading-snug text-ink-mute",children:[e.jsx(h,{name:"clock",className:"mt-0.5 h-3.5 w-3.5 shrink-0"})," ",c("reservation:transfers.scheduleInfo")]}),be.some($=>$._trainQuote)&&e.jsxs("div",{className:"mt-2.5 flex items-start gap-2 rounded-xl border border-amber-200 bg-amber-50 px-3 py-2.5 text-[12.5px] leading-snug text-amber-900",children:[e.jsx(h,{name:"shield",className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600"}),e.jsxs("span",{children:[e.jsx("strong",{className:"font-bold",children:c("reservation:transfers.trainTicketTitle")}),c("reservation:transfers.trainTicketA"),e.jsx("strong",{children:c("reservation:transfers.trainTicketAvail")}),c("reservation:transfers.trainTicketB"),e.jsx("strong",{children:c("reservation:transfers.trainTicketClass")}),c("reservation:transfers.trainTicketC"),e.jsx("strong",{children:c("reservation:transfers.trainTicketSchedule")}),c("reservation:transfers.trainTicketD"),e.jsx("strong",{children:c("reservation:transfers.trainTicketQuote")}),c("reservation:transfers.trainTicketE")]})]})]});return e.jsxs("section",{className:"rounded-2xl border-2 border-ink/20 bg-white p-5 shadow-soft",children:[e.jsxs("h4",{className:"flex items-center gap-2 font-display text-[1.4rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:"car",className:"h-5 w-5 shrink-0 text-gold-deep"})," ",l]}),d&&e.jsx("p",{className:"mt-1 text-[13.5px] leading-snug text-ink-soft",children:d}),e.jsx("div",{className:"mt-4 grid grid-cols-3 gap-3 sm:gap-4",children:[[c("reservation:transfers.vehBus"),"/gallery/bus.jpg",c("reservation:transfers.vehBusDesc"),!1,"object-[50%_45%]"],[c("reservation:transfers.vehGmc"),"/gallery/gmc.jpg",c("reservation:transfers.vehGmcDesc"),!0,"object-[50%_40%]"],[c("reservation:transfers.vehTrain"),"/gallery/tgv.jpg",c("reservation:transfers.vehTrainDesc"),!0,"object-[50%_50%]"]].map(([$,W,ye,de,ot])=>e.jsxs("figure",{className:"overflow-hidden rounded-xl border border-ink/12 bg-cream-50",children:[e.jsxs("div",{className:"relative",children:[e.jsx("img",{src:W,alt:$,loading:"lazy",className:`aspect-square w-full object-cover sm:aspect-[16/10] ${ot}`}),e.jsx("span",{className:`absolute left-2 top-2 rounded-full px-2 py-0.5 text-[9.5px] font-bold uppercase tracking-wide shadow-sm ${de?"bg-navy/85 text-cream-100 backdrop-blur":"bg-emerald-500 text-white"}`,children:c(de?"reservation:transfers.optional":"reservation:transfers.included")})]}),e.jsxs("figcaption",{className:"px-2.5 py-3 sm:px-3",children:[e.jsx("p",{className:"text-[13px] font-bold text-navy",children:$}),e.jsx("p",{className:"mt-1.5 text-[11.5px] leading-relaxed text-ink-mute",children:ye})]})]},$))}),e.jsx("p",{className:"mt-3 text-[13px] leading-snug text-ink-soft",children:B.join(" · ")}),e.jsxs("label",{className:"mt-4 block sm:max-w-md",children:[e.jsx("span",{className:"mb-1 block text-[12px] font-bold uppercase tracking-wider text-ink-mute",children:c("reservation:transfers.formulaLabel6")}),e.jsx("select",{value:N,onChange:$=>u($.target.value),className:"w-full cursor-pointer rounded-xl border-2 border-ink/20 bg-white px-3 py-2.5 text-[14px] font-semibold text-ink transition-colors hover:border-navy/50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:E.map($=>{const W=!Z[$.key],ye=V[$.key]??0,de=W?c("reservation:transfers.dotOnQuote"):ye>0?` · ${se(ye,s)}`:$.key==="custom"?` · ${c("reservation:transfers.alaCarte")}`:` · ${c("reservation:transfers.included")}`;return e.jsxs("option",{value:$.key,disabled:W,children:[c($.label),de]},$.key)})})]}),e.jsx("p",{className:"mt-2 text-[13px] leading-snug text-ink-mute",children:c(((te=nr.find($=>$.key===N))==null?void 0:te.pitch)||"")}),fe?e.jsx("div",{className:"mt-4 border-t border-ink/15 pt-4",children:ce}):e.jsxs(e.Fragment,{children:[e.jsxs("details",{className:"mt-3 border-t border-ink/15 pt-3",children:[e.jsx("summary",{className:"cursor-pointer text-[13.5px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:c("reservation:transfers.seeItinerary6",{n:be.length,s:be.length>
4021?"s":""})}),e.jsx("div",{className:"mt-3",children:ce})]}),e.jsxs("p",{className:"mt-3 flex items-center justify-between gap-3 border-t border-ink/15 pt-3",children:[e.jsx("span",{className:"text-[12px] font-bold uppercase tracking-wider text-ink-soft",children:c("reservation:transfers.totalTransfers")}),e.jsx("span",{className:"font-display text-[1.5rem] leading-none text-navy",children:K})]})]})]})}const md=t=>t==="assurance"?"reservation:options.secAssurance5":t==="transferts"?"reservation:options.secTransferts5":t==="upgrade"?"reservation:options.secUpgrade5":t==="guide"?"reservation:options.secGuide5":"reservation:options.secOptions5";function pd({b:t,update:n,go:o,combine:a,optStep:s=0,onSections:i}){var Qs,zt,ns,Xt,ws,gs,Ds;const{t:l}=it(),{data:d,isLoading:c,isError:m,refetch:g}=ji(),N=dr().data||{insurancePercentage:5,guidePrivePrice:100,guideHandicapPrice:0},u=Ys(t),p=t.currency||"EUR",x=jn(p),j=String(p).toUpperCase()==="EUR",[C,U]=b.useState(()=>new Set(Array.from({length:Math.max(0,Number(t.handicapCount)||0)},(S,P)=>P))),[I,L]=b.useState(()=>new Set(Array.from({length:Math.max(0,Number(t.insuredCount)||0)},(S,P)=>P))),me=b.useRef(Number(t.transferTotal)||0),Z=b.useRef(t.transferLabel||""),[V,k]=b.useState(()=>t.hotelUpgradeByCity&&typeof t.hotelUpgradeByCity=="object"?{...t.hotelUpgradeByCity}:{}),R=b.useRef({}),_=b.useRef(0),[be,Y]=b.useState({}),[Q,z]=b.useState(()=>t.hotelExtrasByCity&&typeof t.hotelExtrasByCity=="object"?{...t.hotelExtrasByCity}:{}),fe=b.useRef({}),K=b.useRef({total:0,lines:[]});b.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[s]);const E=b.useRef([]),[B,M]=b.useState("");b.useEffect(()=>{i==null||i(E.current)},[B]);const ce=(t.comboTotal?Math.round(Number(t.comboTotal)/u.n):Number(t.tierMinPrice)||Number(t.flightBase)||0)+(Number(t.visaPerPerson)||0),te=Ai(ce,Number(N.insurancePercentage)),$=Math.round((Number(N.guideHandicapPrice)||0)*x),W=Math.min(u.n,Math.max(0,Number(t.handicapCount)||0)),ye=S=>{const P=S.category||"";return/assur/i.test(P)&&!Os(S)&&(Number(S.price)||0)>0?{...S,price:te,unit:"person"}:/guide\s*priv/i.test(P)&&!Os(S)&&(Number(S.price)||0)>0?{...S,price:Math.round((Number(N.guidePrivePrice)||0)*x),unit:"package"}:x!==1&&(Number(S.price)||0)>0?{...S,price:Math.round((Number(S.price)||0)*x)}:S},de=b.useMemo(()=>(d||[]).map(S=>({...S,options:S.options.map(ye)})),[d,te,N.guidePrivePrice]),ot=b.useMemo(()=>de.flatMap(S=>S.options),[de]),Ge=/assur/i,Be=/transfert|transport|gmc|tgv|train|bus|navette/i,ve=/guide\s*priv/i,le=((Qs=ot.find(S=>Ge.test(S.category||"")&&!Os(S)))==null?void 0:Qs.name)||l("reservation:options.insuranceName"),Te=(()=>{try{const S=localStorage.getItem("selectedRooms");return S?JSON.parse(S):t.roomsSummary||null}catch{return t.roomsSummary||null}})(),ue={SGL:"single",DBL:"double",TPL:"triple",QDR:"quad"},$e={SGL:1,DBL:2,TPL:3,QDR:4},oe=Math.max(1,(u.adults||0)+Math.max(0,(u.children||0)-(Number(Te==null?void 0:Te.childrenNoBed)||0))),Ve=S=>{const P=[];for(const ne of Array.isArray(S)?S:[]){const re=String((ne==null?void 0:ne.type)||"").toUpperCase(),we=ue[re];if(!we)continue;const Ce=ne!=null&&ne.shared?Math.max(1,Number(ne==null?void 0:ne.bedsOccupied)||1):Math.max(1,Number(ne==null?void 0:ne.count)||1)*($e[re]||1);for(let tt=0;tt<Ce;tt++)P.push(we)}return P.slice(0,oe)},y=(S,P)=>{if(!S)return 0;const ne=re=>Number(re==="quad"?S.quad??S.quadruple:S[re])||0;return P.reduce((re,we)=>re+ne(we),0)},A=(()=>{const S={},P=N.hotelUpgradePairs||{},ne=N.hotelUpgradeNames||{},re=[{city:"Médine",data:Te==null?void 0:Te.medine},{city:"La Mecque",data:Te==null?void 0:Te.makkah}];for(const{city:we,data:Ce}of re){const tt=Number(Ce==null?void 0:Ce.hotelId)||0;if(!tt)continue;const yt=String((Ce==null?void 0:Ce.checkinDate)||"").slice(0,10),Ct=Ve(Ce==null?void 0:Ce.rooms);if(!Ct.length)continue;const Et=[];for(const vt of Object.values(P)){if(!vt||Number(vt.fromHotelId)!==tt||vt.combineOnly&&!a)continue;const jt=String((Ce==null?void 0:Ce.checkoutDate)||"").slice(0,10);let pt,Tt=1/0,v=!1;for(const[G,xe]of Object.entries(vt.periods||{})){const[ae,_e]=String(G).split("_");if(!ae||!_e||yt&&!(ae<=yt&&yt<=_e))continue;const Qe=ae===yt&&(!jt||_e===jt),kt=new Date(_e).getTime()-new Date(ae).getTime();(Qe&&!v||Qe===v&&kt<Tt)&&(pt=xe,Tt=kt,v=Qe)}if(!pt)continue;const T=y(pt,Ct);T>0&&Et.push({toHotelId:Number(vt.toHotelId),toHotelName:ne[Number(vt.toHotelId)]||`Hôtel ${vt.toHotelId}`,supEUR:T})}Et.length&&(S[we]=Et.sort((vt,jt)=>vt.supEUR-jt.supEUR))}return S})();typeof window<"u"&&(window.__UPG={pairs:Object.keys(N.hotelUpgradePairs||{}),names:N.hotelUpgradeNames||{},hasSelectedRooms:!!Te,medId:(zt=Te==null?void 0:Te.medine)==null?void 0:zt.hotelId,makId:(ns=Te==null?void 0:Te.makkah)==null?void 0:ns.hotelId,medRooms:(((Xt=Te==null?void 0:Te.medine)==null?void 0:Xt.rooms)||[]).map(S=>S==null?void 0:S.type),medCheckin:(ws=Te==null?void 0:Te.medine)==null?void 0:ws.checkinDate,bedPax:oe,byCity:Object.keys(A)});const je=Object.entries(A).map(([S,P])=>{const ne=V[S],re=ne?P.find(we=>we.toHotelId===ne):null;return re?{city:S,hotelId:ne,hotelName:re.toHotelName,total:Math.round(re.supEUR*x)}:null}
402).filter(Boolean),Se=je.reduce((S,P)=>S+P.total,0);R.current=V,_.current=Se;const We=["HB"],Ze=["IFTAR_SOHOUR","IFTAR","SOHOUR"],O=(S,P)=>{if(!S||!P)return!1;for(let ne=0;ne<Math.min(P,60);ne++){const re=at(S);if(re.setDate(re.getDate()+ne),/ramadan/i.test(Rs(re)||""))return!0}return!1},pe=S=>l(S==="IFTAR_SOHOUR"?"reservation:options.extraIftarSohour":S==="IFTAR"?"reservation:options.extraIftar":S==="SOHOUR"?"reservation:options.extraSohour":"reservation:options.extraHalfBoard"),Ue=(S,P)=>S&&P?Math.max(0,Math.round((at(P).getTime()-at(S).getTime())/864e5)):0,H=(S,P,ne)=>{const re=(N.hotelSalePrices||{})[String(S)]||{};let we=null,Ce=!1,tt=1/0,yt=-1;for(const vt of Object.keys(re)){const[jt,pt]=vt.split("_");if(!jt||!pt||pt<=jt||P&&ne&&(pt<=P||jt>=ne))continue;const Tt=P&&ne?jt<=P&&pt>=ne:!0,v=new Date(pt).getTime()-new Date(jt).getTime(),T=jt>P?jt:P,G=pt<ne?pt:ne,xe=P&&ne&&T<=G?new Date(G).getTime()-new Date(T).getTime():0;(we==null||Tt&&!Ce||Tt===Ce&&(Tt?v<tt:xe>yt))&&(we=re[vt],Ce=!!Tt,tt=v,yt=xe)}const Ct={},Et=vt=>/^(vues*)?(surs*)?(ville|city|standard|std)$/i.test(String(vt).trim());if(we)for(const[vt,jt]of Object.entries(we))Number(jt)>0&&!Et(vt)&&(Ct[vt]=Number(jt));return Ct},Ae=S=>{const P=(S||"").toLowerCase();return/partiel/.test(P)?1:/standard/.test(P)?2:/premier|premium/.test(P)?3:/pano/.test(P)?4:5},De={};for(const S of Object.keys(A)){const P=S==="La Mecque"?Te==null?void 0:Te.makkah:Te==null?void 0:Te.medine,ne=Number(P==null?void 0:P.hotelId)||0,re=V[S]||0,we=re||ne;if(!we)continue;const Ce=re?(A[S]||[]).find(T=>T.toHotelId===re):null,tt=(Ce==null?void 0:Ce.toHotelName)||String((P==null?void 0:P.hotelName)||""),yt=String((P==null?void 0:P.checkinDate)||"").slice(0,10),Ct=String((P==null?void 0:P.checkoutDate)||"").slice(0,10),Et=Ue(yt,Ct)||Number(P==null?void 0:P.nights)||0,vt=(Array.isArray(P==null?void 0:P.rooms)?P.rooms:[]).reduce((T,G)=>T+(G!=null&&G.shared?1:Math.max(1,Number(G==null?void 0:G.count)||1)),0)||1,jt=/^(HB|FB|AI)/.test(String((P==null?void 0:P.pension)||"").toUpperCase()),pt=(N.hotelMealSalePrices||{})[String(we)]||{},Tt=jt||!Et?[]:(O(yt,Et)?Ze:We).map(T=>({code:T,ppn:Number(pt[T])||0})).filter(T=>T.ppn>0).map(T=>({...T,total:Math.round(T.ppn*Et*u.n*x)})),v=re?Object.entries(H(we,yt,Ct)).map(([T,G])=>({name:T,total:Math.round(G*vt*x)})).sort((T,G)=>Ae(T.name)-Ae(G.name)||T.total-G.total):[];(Tt.length||v.length)&&(De[S]={hotelId:we,hotelName:tt,nights:Et,roomsCount:vt,pensions:Tt,views:v})}const J=[];for(const[S,P]of Object.entries(De)){const ne=Q[S];if(!ne||ne.hotelId!==P.hotelId)continue;const re=ne.pension?P.pensions.find(Ce=>Ce.code===ne.pension):null;re&&J.push({city:S,hotelId:P.hotelId,hotelName:P.hotelName,kind:"pension",code:re.code,label:l("reservation:options.extraLabelMeal",{meal:pe(re.code),hotel:P.hotelName,city:S}),total:re.total});const we=ne.view?P.views.find(Ce=>Ce.name===ne.view):null;we&&J.push({city:S,hotelId:P.hotelId,hotelName:P.hotelName,kind:"view",code:we.name,label:l("reservation:options.extraLabelView",{view:we.name,hotel:P.hotelName,city:S}),total:we.total})}const ie=J.reduce((S,P)=>S+P.total,0);fe.current=Q,K.current={total:ie,lines:J};const Ee=(S,P,ne)=>z(re=>{const we=re[S]&&re[S].hotelId===P?re[S]:{hotelId:P};return{...re,[S]:{...we,...ne}}}),Re={};for(const S of Object.keys(A)){const P=S==="La Mecque"?"mk":"md",ne=V[S]||0,re={};if(ne){const tt=be[ne]||{},yt=(A[S]||[]).find(Ct=>Ct.toHotelId===ne);re.name=tt.name||(yt==null?void 0:yt.toHotelName)||"",tt.stars&&(re.stars=tt.stars),re.dist=tt.distanceText||(P==="mk"?tt.distanceHaram?l("reservation:options.distFromHaram",{d:tt.distanceHaram}):"":tt.distanceNabawi?l("reservation:options.distFromNabawi",{d:tt.distanceNabawi}):"")}const we=De[S],Ce=Q[S];we&&Ce&&Ce.hotelId===we.hotelId&&(Ce.pension&&we.pensions.some(tt=>tt.code===Ce.pension)&&(re.pension=Ce.pension),Ce.view&&we.views.some(tt=>tt.name===Ce.view)&&(re.view=Ce.view)),Object.keys(re).length&&(Re[P]=re)}const Je=JSON.stringify(Re);b.useEffect(()=>{JSON.stringify(t.hotelChoiceDisplay||{})!==Je&&n({hotelChoiceDisplay:JSON.parse(Je)})},[Je]);const Me=Array.from(new Set([Number((gs=Te==null?void 0:Te.medine)==null?void 0:gs.hotelId)||0,Number((Ds=Te==null?void 0:Te.makkah)==null?void 0:Ds.hotelId)||0,...Object.values(A).flat().map(S=>
402S.toHotelId)].filter(Boolean))).sort((S,P)=>S-P).join(",");b.useEffect(()=>{const P=(Me?Me.split(",").map(Number).filter(Boolean):[]).filter(re=>!be[re]);if(!P.length)return;let ne=!0;return Promise.all(P.map(async re=>[re,await wo(re)])).then(re=>{ne&&Y(we=>{const Ce={...we};for(const[tt,yt]of re)Ce[tt]=yt;return Ce})}),()=>{ne=!1}},[Me]);const ct=(S,P,ne)=>{if(!ot.length)return;j||(ne=0);const re=ot.filter(pt=>S.includes(pt.id)&&!Os(pt)&&!Ge.test(pt.category||"")&&!Be.test(pt.category||"")),we=Math.round(re.reduce((pt,Tt)=>pt+Da(Tt,u.n),0)),Ce=Math.round(re.filter(pt=>ve.test(pt.category||"")).reduce((pt,Tt)=>pt+Da(Tt,u.n),0)),tt=Math.max(0,P)*$,yt=Math.max(0,ne)*te,Ct=Math.max(0,Math.round(me.current)),Et=Math.max(0,Math.round(_.current)),vt=Math.max(0,Math.round(K.current.total)),jt=we-Ce;n({options:S,optionLabels:[...re.map(pt=>pt.name),...Z.current?[Z.current+(Ct>0?` (${se(Ct,p)})`:l("reservation:options.includedParen"))]:[],...ne>0?[`${le} Ã${ne}`]:[],...P>0&&$>0?[l("reservation:options.wheelchairLabel",{n:P})]:[],...je.map(pt=>l("reservation:options.upgradeLabel",{hotel:pt.hotelName,city:pt.city})),...K.current.lines.map(pt=>pt.label)],optionsTotal:we+Math.round(tt)+Math.round(yt)+Ct+Et+vt,handicapCount:P,insuredCount:ne,transferTotal:Ct,transferLabel:Z.current,hotelUpgradeTotal:Et,hotelUpgradeByCity:{...R.current},hotelExtrasTotal:vt,hotelExtrasByCity:{...fe.current},assuranceTotal:Math.round(yt),guideTotal:Ce,accompTotal:Math.round(tt),otherOptionsTotal:jt}),Ao(ot,re.map(pt=>pt.id),u.n),Ro(P,$),Bo(ne,te,le),Fo(je,Et),_o(K.current.lines,vt)};b.useEffect(()=>{Object.keys(A).length&&ct(t.options||[],C.size,I.size)},[Se,ie]);const Ke=(S,P,ne)=>{me.current=Number(S)||0;let re=l(ne||"reservation:options.transfersWord");if((P==null?void 0:P.option)==="custom"){const we=P.legs||[];we.length&&we.every(Ce=>(Ce.mode||"bus")==="bus")&&(re=l("reservation:transfers.tourBus"))}Z.current=P?l("reservation:options.transfersColon",{label:re}):"",zo(P,me.current),ct(t.options||[],W,I.size)},st=S=>ct(S,W,I.size),gt=S=>ct(t.options||[],Math.min(u.n,Math.max(0,S)),I.size),he=S=>{const P=Math.max(0,Math.min(Xe.length,S)),ne=new Set(Array.from({length:P},(re,we)=>we));return ct(t.options||[],W,ne.size),ne},Xe=[...Array.from({length:u.adults},(S,P)=>({label:l("reservation:rooms.travelerN",{n:P+1}),type:l("reservation:rooms.adult")})),...Array.from({length:u.children},(S,P)=>({label:l("reservation:rooms.childN",{n:P+1}),type:l("reservation:options.childType")}))];if(b.useEffect(()=>{if(!de.length||!ot.length)return;const S=(t.options||[]).filter(ne=>ot.some(re=>re.id===ne));let P=[...S];for(const ne of de)if(ne.options.filter(re=>re.is_required).forEach(re=>{P.includes(re.id)||P.push(re.id)}),ne.options.length>1){const re=P.filter(we=>ne.options.some(Ce=>Ce.id===we));if(re.length===0){const we=ne.options.find(Os);we&&P.push(we.id)}else if(re.length>1){const we=ne.options.find(Ce=>Ce.is_required&&re.includes(Ce.id))||ne.options.find(Ce=>re.includes(Ce.id));P=P.filter(Ce=>!re.includes(Ce)||Ce===we.id)}}(P.length!==S.length||P.some(ne=>!S.includes(ne))||S.length!==(t.options||[]).length)&&st(P)},[d]),b.useEffect(()=>{const S=t.options||[];!ot.length||!S.length&&W===0&&I.size===0||ct(S,W,I.size)},[te,N.guidePrivePrice,$]),c)return e.jsx(js,{label:l("reservation:options.loading")});if(m)return e.jsx(Ns,{message:l("reservation:options.loadError"),onRetry:g});if(!de.length)return e.jsxs("div",{children:[e.jsx("p",{className:"rounded-2xl border border-ink/8 bg-white px-5 py-8 text-center text-[14px] text-ink-mute shadow-soft",children:l("reservation:options.noOptions")}),e.jsx(Vi,{onBack:()=>o("visa"),onNext:()=>
402o("recap"),nextLabel:l("reservation:summary.recap")})]});const F=t.options||[],ke=(S,P)=>{const ne=S.options.map(we=>we.id),re=S.options.find(we=>we.is_required);re&&re.id!==P.id||st([...F.filter(we=>!ne.includes(we)),P.id])},dt=S=>{S.is_required||st(F.includes(S.id)?F.filter(P=>P!==S.id):[...F,S.id])},D=({o:S})=>{if(Os(S))return null;const P=(S.unit||"").toLowerCase()==="person"||(S.unit||"").toLowerCase()==="personne",ne=Number(S.price)||0;return e.jsx("span",{className:`text-[13px] font-bold ${ne?"text-navy":"text-emerald-600"}`,children:ne?"+ "+se(ne,p)+(P?l("reservation:options.perPaxSuffix"):""):l("reservation:options.free")})},Ne=S=>{const P=(S||"").toLowerCase();return/assur/.test(P)?"shield":/guide/.test(P)?"users":/transfert|transport|bus|navette/.test(P)?"car":"sparkle"},qe=S=>{const P=(S||"").toLowerCase();return/assur/.test(P)?{tagline:l("reservation:options.assurTagline"),bullets:[l("reservation:options.assurB1"),l("reservation:options.assurB2"),l("reservation:options.assurB3"),l("reservation:options.assurB4")]}:/guide/.test(P)?{tagline:l("reservation:options.guideTagline"),bullets:[l("reservation:options.guideB1"),l("reservation:options.guideB2"),l("reservation:options.guideB3"),l("reservation:options.guideB4")]}:/transfert|transport|bus|navette/.test(P)?{tagline:l("reservation:options.transfTagline"),bullets:[l("reservation:options.transfB1"),l("reservation:options.transfB2"),l("reservation:options.transfB3")]}:{tagline:"",bullets:[]}},Pe=S=>Math.round(S.options.filter(P=>F.includes(P.id)&&!Os(P)).reduce((P,ne)=>P+Da(ne,u.n),0)),et=de.find(S=>ve.test(S.category||"")),Ye=et==null?void 0:et.options.find(S=>!Os(S)&&Number(S.price)>0),lt=et==null?void 0:et.options.find(Os),He=!!(Ye&&F.includes(Ye.id)),Fe=He&&Ye?Math.round(Da(Ye,u.n)):0,xt=()=>{if(!et||!Ye)return;const S=F.filter(P=>!et.options.some(ne=>ne.id===P));st(He?[...S,...lt?[lt.id]:[]]:[...S,Ye.id])},Mt=(()=>{let S=null;try{S=JSON.parse(localStorage.getItem("selectedItinerary")||"null")}catch{}const P=(S==null?void 0:S.flightDetails)||{};return{arrCity:P.toCity||t.flightDest||"Médine",arrISO:t.dateISO,arrTime:P.departureTime,retCity:"Djeddah",retISO:t.returnISO||void 0,retTime:""}})(),ks=(()=>{const S=t.dateISO;if(!S)return[];const P=(we,Ce)=>{const tt=at(we);return tt.setDate(tt.getDate()+Ce),qs(tt)},ne=P(S,t.nightsMedina||0),re=P(ne,t.nightsMakkah||0);return[{location:"Médine",checkinDate:S,checkoutDate:ne},{location:"La Mecque",checkinDate:ne,checkoutDate:re}]})(),Lt=de.filter(S=>!Ge.test(S.category||"")&&!Be.test(S.category||"")&&!ve.test(S.category||"")),ms=["tout"];E.current=ms;const as=ms.join("|");as!==B&&M(as);const ps=({icon:S,title:P,sub:ne,bare:re=!1})=>e.jsxs("div",{className:re?"mb-4 mt-9 border-t border-ink/12 pt-6":"mb-5",children:[e.jsxs("h3",{className:"flex items-center gap-2 font-display text-[1.6rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:S,className:"h-6 w-6 shrink-0 text-gold-deep"})," ",P]}),ne&&e.jsx("p",{className:"mt-1 text-[14.5px] text-ink-soft",children:ne})]}),Ps=e.jsxs("div",{className:"order-6 mt-6 flex items-center justify-between gap-3",children:[e.jsxs(ts,{variant:"ghost",onClick:()=>o("visa"),className:"px-4 py-2.5",children:[e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})," ",l("reservation:stepper.visa")]}),e.jsxs(ts,{variant:"red",onClick:()=>o("recap"),className:"px-5 py-2.5",children:[l("reservation:options.goRecap5")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]}),rs=S=>De[S]?(()=>{const P=De[S],ne=Q[S]&&Q[S].hotelId===P.hotelId?Q[S]:null;return e.jsxs("div",{className:"mt-2.5 rounded-2xl border border-[var(--accent)]/40 bg-cream-50 px-4 py-3.5",children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:l("reservation:options.extraTitle",{hotel:P.hotelName})}),P.views.length>0&&e.jsxs("div",{className:P.pensions.length?"mb-3":"",children:[e.jsx("p",{className:"mb-1.5 text-[12.5px] font-bold text-navy",children:l("reservation:options.extraViewTitle")}),e.jsx("div",{className:"space-y-1.5",role:"radiogroup",children:[{name:"",total:0},...P.views].map(re=>{const we=((ne==null?void 0:ne.view)||"")===re.name;return e.jsxs("button",{type:"button",onClick:()=>Ee(S,P.hotelId,{view:re.name||null}),className:`flex w-full items-center justify-between gap-3 rounded-xl border px-3 py-2 text-left transition-all ${we?"border-navy bg-navy/[0.04]":"border-ink/10 bg-white hover:border-navy/30"}`,children:[e.jsxs("span",{className:"flex items-center gap-2.5 text-[13px] text-ink",children:[e.jsx("span",{className:`grid h-4 w-4 shrink-0 place-items-center rounded-full border ${we?"border-navy":"border-ink/30"}`,children:we&&e.jsx("span",{className:"h-2 w-2 rounded-full bg-navy"})}),re.name||l("reservation:options.extraViewBase")]}),e.jsx("span",{className:"shrink-0 text-[13px] font-bold text-navy",children:re.name?`+ ${se(re.total,p)}`:l("reservation:options.extraIncluded")})]},re.name||"base")})}),e.jsx("p",{className:"mt-1 text-[11px] text-ink-mute",children:l("reservation:options.extraViewNote",{rooms:P.roomsCount})})]}),P.pensions.map(re=>{const we=(ne==null?void 0:ne.pension)===re.code;return e.jsxs("button",{type:"button",onClick:()=>Ee(S,P.hotelId,{pension:we?null:re.code}),className:`flex w-full items-center justify-between gap-3 rounded-xl border px-3 py-2 text-left transition-all ${we?"border-navy bg-navy/[0.04]":"border-ink/10 bg-white hover:border-navy/30"}`,children:[e.jsxs("span",{className:"flex items-center gap-2.5 text-[13px] text-ink",children:[e.jsx("span",{className:`grid h-4 w-4 shrink-0 place-items-center rounded border ${we?"border-navy bg-navy text-white":"border-ink/30"}`,children:we&&e.jsx(h,{name:"check",className:"h-3 w-3"})}),e.jsxs("span",{children:[pe(re.code)," ",e.jsxs("span",{className:"text-ink-mute",children:["· ",l("reservation:options.extraHalfBoardDetail",{price:se(Math.round(re.ppn*x),p),pax:u.n,nights:P.nights})]})]})]}),e.jsxs("span",{className:"shrink-0 text-[13px] font-bold text-navy",children:["+ ",se(re.total,p)]})]},re.code)})]})})():null;return e.jsxs("div",{className:"flex flex-col",children:[j&&ot.some(S=>Ge.test(S.category||"")&&!Os(S))&&te>0&&e.jsx("div",{className:"order-3 mt-9 border-t border-ink/12 pt-6",children:e.jsxs("section",{className:"rounded-2xl border-2 border-ink/20 bg-white p-5 shadow-soft",children:[e.jsx(dn,{icon:"shield",titre:le,sous:l("reservation:options.insuranceSub"),photo:"/gallery/assurance.jpg",alt:l("reservation:options.photoInsAlt6")}),e.jsx("div",{className:"mt-4",children:e.jsx(ld,{})}),e.jsxs("p",{className:"mb-2.5 mt-6 flex items-center gap-2.5 text-[15px] font-bold leading-snug text-navy",children:[e.jsx("span",{className:"grid h-8 w-8 shrink-0 place-items-center rounded-full bg-[var(--accent)]/15 text-gold-deep",children:e.jsx(h,{name:"users",className:"h-4 w-4"})}),l("reservation:options.insHowMany5")]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"inline-flex items-center gap-1 rounded-xl border-2 border-ink/20 p-1",children:[e.jsx("button",{type:"button",onClick:()=>
402L(he(Math.max(0,I.size-1))),disabled:I.size<=0,"aria-label":l("reservation:options.insLess5"),className:"grid h-9 w-9 place-items-center rounded-lg text-navy transition-colors hover:bg-navy hover:text-cream-100 disabled:cursor-not-allowed disabled:text-ink-mute/50 disabled:hover:bg-transparent",children:e.jsx(h,{name:"minus",className:"h-4 w-4"})}),e.jsx("span",{"aria-live":"polite",className:"min-w-[2.5rem] text-center font-display text-[1.4rem] font-bold text-navy",children:I.size}),e.jsx("button",{type:"button",onClick:()=>L(he(Math.min(Xe.length,I.size+1))),disabled:I.size>=Xe.length,"aria-label":l("reservation:options.insMore5"),className:"grid h-9 w-9 place-items-center rounded-lg text-navy transition-colors hover:bg-navy hover:text-cream-100 disabled:cursor-not-allowed disabled:text-ink-mute/50 disabled:hover:bg-transparent",children:e.jsx(h,{name:"plus",className:"h-4 w-4"})})]}),e.jsxs("span",{className:"text-[13.5px] text-ink-soft",children:[l("reservation:options.insOfPax5",{n:Xe.length,s:Xe.length>1?"s":""}),e.jsxs("span",{className:"font-semibold text-ink",children:[" · ",se(te,p)," ",l("reservation:options.perPaxShort5")]})]}),I.size<Xe.length&&e.jsx("button",{type:"button",onClick:()=>L(he(Xe.length)),className:"text-[13px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep",children:l("reservation:options.insAll5")})]}),e.jsxs("p",{className:"mt-3 flex items-center justify-between gap-3 border-t border-ink/15 pt-3",children:[e.jsxs("span",{className:"text-[12px] font-bold uppercase tracking-wider text-ink-soft",children:[l("reservation:options.totalInsurance"),e.jsx("span",{className:"mt-0.5 block text-[11px] font-semibold normal-case tracking-normal text-ink-mute",children:l("reservation:options.perInsuredPax",{price:se(te,p)})})]}),e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block font-display text-[1.5rem] leading-none text-navy",children:se(I.size*te,p)}),e.jsx("span",{className:"text-[11.5px] text-ink-mute",children:I.size>0?l("reservation:options.insuredCount",{n:I.size,s:I.size>1?"s":""}):l("reservation:options.noInsured")})]})]}),e.jsxs("p",{className:"mt-3 flex items-start gap-2 rounded-xl bg-amber-50 px-3 py-2.5 text-[12px] leading-snug text-amber-900 ring-1 ring-amber-200",children:[e.jsx(h,{name:"shield",className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600"}),e.jsxs("span",{children:[l("reservation:options.insNoteA"),e.jsx("strong",{children:l("reservation:options.insNoteB")}),l("reservation:options.insNoteC"),e.jsx("strong",{children:l("reservation:options.insNoteD")}),l("reservation:options.insNoteE")]})]})]})}),e.jsx("div",{className:"order-2 mt-9 border-t border-ink/12 pt-6",children:e.jsx(dd,{flight:Mt,hotels:ks,paxCount:u.n,sharedPaxCount:u.display,cur:p,onChange:Ke,title:l("reservation:options.transfersTitle6"),sub:l("reservation:options.transfersSub6")})}),e.jsxs("div",{className:"order-1",children:[e.jsx(ps,{icon:"sparkle",title:l("reservation:options.stayPlusTitle5"),sub:l("reservation:options.stayPlusSub5")}),e.jsxs("div",{className:"mb-4 rounded-2xl border border-ink/20 bg-cream-100 px-4 py-3.5",children:[e.jsx("p",{className:"text-[11.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:l("reservation:options.yourStayRecall5")}),e.jsxs("ul",{className:"mt-2 grid gap-1.5 text-[13.5px] leading-snug text-ink sm:grid-cols-2",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(h,{name:"star",className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsxs("span",{children:[l("reservation:rooms.category")," ",e.jsx("strong",{className:"font-bold text-navy",children:t.tierLabel||"â"})]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(h,{name:"users",className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsx("span",{children:t.comboLabel?e.jsx("strong",{className:"font-bold text-navy",children:t.comboLabel}):e.jsx("span",{className:"text-ink-mute",children:l("reservation:summary.toChoose")})})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(h,{name:"kaaba",className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsxs("span",{children:[l("reservation:summary.rowHotelMakkah")," · ",e.jsx("strong",{className:"font-bold text-navy",children:t.hotelMkName||"â"}),t.starsMk?` ${t.starsMk}â
`:""]})]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(h,{name:"compass",className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsxs("span",{children:[l("reservation:summary.rowHotelMedina")," · ",e.jsx("strong",{className:"font-bold text-navy",children:t.hotelMdName||"â"}),t.starsMd?` ${t.starsMd}â
`:""]})]})]})]}),e.jsx("p",{className:"mb-5 flex justify-center",children:e.jsxs("button",{type:"button",onClick:()=>o("recap"),className:"inline-flex items-center gap-2 rounded-xl border-2 border-ink/25 px-5 py-2.5 text-[14px] font-bold text-ink-soft transition-colors hover:border-navy hover:text-navy focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[l("reservation:options.skipStep5")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})}),e.jsxs("div",{className:"space-y-4",children:[Object.keys(A).length===0&&!t.comboLabel&&e.jsxs("section",{className:"rounded-2xl border-2 border-dashed border-ink/25 bg-cream-100 p-5",children:[e.jsxs("h4",{className:"flex items-center gap-2 font-display text-[1.4rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:"sparkle",className:"h-5 w-5 shrink-0 text-gold-deep"})," ",l("reservation:options.upgradeTitle")]}),e.jsx("p",{className:"mt-1 text-[13.5px] leading-snug text-ink-soft",children:l("reservation:options.upgradeNeedsRoom5")}),e.jsxs("button",{type:"button",onClick:()=>o("rooms"),className:"mt-3 inline-flex items-center gap-2 rounded-xl border-2 border-navy/30 px-4 py-2 text-[13.5px] font-bold text-navy transition-colors hover:border-navy hover:bg-navy hover:text-cream-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[e.jsx(h,{name:"arrow",className:"h-4 w-4 rotate-180"})," ",l("reservation:options.goPickRoom5")]})]}),Object.keys(A).length>0&&e.jsxs("section",{className:"rounded-2xl border-2 border-ink/20 bg-white p-5 shadow-soft",children:[e.jsx(dn,{icon:"sparkle",titre:l("reservation:options.upgradeTitle"),sous:l("reservation:options.upgradeDesc"),photo:"/images/hotel-0m-haram.webp",alt:l("reservation:options.photoUpgAlt6")}),e.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:Object.entries(A).map(([S,P])=>{const re=(S==="La Mecque"?t.hotelMkName:t.hotelMdName)||"",we=V[S]||0;return e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1 block text-[12px] font-bold uppercase tracking-wider text-ink-mute",children:S}),e.jsxs("select",{value:String(we),onChange:Ce=>k(tt=>({...tt,[S]:Number(Ce.target.value)})),className:"w-full cursor-pointer rounded-xl border-2 border-ink/20 bg-white px-3 py-2.5 text-[14px] font-semibold text-ink transition-colors hover:border-navy/50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[e.jsx("option",{value:"0",children:l("reservation:options.keepHotel5",{hotel:re})}),P.map(Ce=>{var tt;return e.jsxs("option",{value:String(Ce.toHotelId),children:[((tt=be[Ce.toHotelId])==null?void 0:tt.name)||Ce.toHotelName," · + ",se(Math.round(Ce.supEUR*x),p)]},Ce.toHotelId)})]})]},S)})}),Object.entries(A).some(([S])=>V[S])&&e.jsx("ul",{className:"mt-3 space-y-1.5",children:Object.entries(A).map(([S,P])=>{const ne=V[S]||0,re=P.find(yt=>yt.toHotelId===ne);if(!re)return null;const Ce=(S==="La Mecque"?t.hotelMkName:t.hotelMdName)||"",tt=be[re.toHotelId]||{};return e.jsxs("li",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 rounded-xl bg-navy/[0.05] px-3.5 py-2.5 text-[13.5px] leading-snug text-ink ring-1 ring-navy/15",children:[e.jsx(h,{name:"check",className:"h-4 w-4 shrink-0 text-navy"}),e.jsxs("span",{children:[S," · ",e.jsx("span",{className:"text-ink-mute line-through",children:Ce})," ",e.jsx(h,{name:"arrow",className:"inline h-3.5 w-3.5 text-navy"})," ",e.jsx("strong",{className:"font-bold text-navy",children:tt.name||re.toHotelName}),tt.stars?` ${tt.stars}â
`:""]}),e.jsxs("span",{className:"font-bold text-navy",children:["+ ",se(Math.round(re.supEUR*x),p)]})]},S)})}),Object.keys(A).map(S=>e.jsx(us.Fragment,{children:V[S]?rs(S):null},S)),Se+ie>0&&e.jsxs("p",{className:"mt-3 flex items-center justify-between gap-3 border-t border-ink/15 pt-3",children:[e.jsx("span",{className:"text-[12px] font-bold uppercase tracking-wider text-ink-soft",children:l(ie>0?"reservation:options.totalUpgradeExtras":"reservation:options.totalUpgrade")}),e.jsx("span",{className:"font-display text-[1.5rem] leading-none text-navy",children:se(Se+ie,p)})]})]}),Ye&&e.jsxs("section",{className:"rounded-2xl border-2 border-ink/20 bg-white p-5 shadow-soft",children:[e.jsx(dn,{icon:"users",t
402itre:l("reservation:options.guideTitle"),sous:l("reservation:options.guideGroupNote5"),photo:"/guides/guide_4.jpg",alt:l("reservation:options.photoGuideAlt6")}),e.jsxs("label",{className:"mt-4 block sm:max-w-md",children:[e.jsx("span",{className:"mb-1 block text-[12px] font-bold uppercase tracking-wider text-ink-mute",children:l("reservation:options.guideSubTitle")}),e.jsxs("select",{value:He?"1":"0",onChange:S=>{S.target.value==="1"!==He&&xt()},className:"w-full cursor-pointer rounded-xl border-2 border-ink/20 bg-white px-3 py-2.5 text-[14px] font-semibold text-ink transition-colors hover:border-navy/50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:[e.jsx("option",{value:"0",children:l("reservation:options.guideNo5")}),e.jsx("option",{value:"1",children:l("reservation:options.guideYes5",{amount:se(Math.round(Da(Ye,u.n)),p)})})]})]}),Fe>0&&e.jsxs("p",{className:"mt-3 flex items-center justify-between gap-3 border-t border-ink/15 pt-3",children:[e.jsx("span",{className:"text-[12px] font-bold uppercase tracking-wider text-ink-soft",children:l("reservation:options.totalGuide")}),e.jsx("span",{className:"font-display text-[1.5rem] leading-none text-navy",children:se(Fe,p)})]})]}),$>0&&e.jsxs("section",{className:"rounded-2xl border-2 border-ink/20 bg-white p-5 shadow-soft",children:[e.jsx(dn,{icon:"shield",titre:l("reservation:options.wheelchairTitle"),sous:l("reservation:options.wheelchairSub"),photo:"/images/guides.webp",pos:"object-[50%_65%]",alt:l("reservation:options.photoWheelAlt6")}),e.jsxs("label",{className:"mt-4 block sm:max-w-md",children:[e.jsx("span",{className:"mb-1 block text-[12px] font-bold uppercase tracking-wider text-ink-mute",children:l("reservation:options.wheelchairHowMany5",{amount:se($,p)})}),e.jsx("select",{value:String(W),onChange:S=>{const P=Number(S.target.value);U(new Set(Array.from({length:P},(ne,re)=>re))),gt(P)},className:"w-full cursor-pointer rounded-xl border-2 border-ink/20 bg-white px-3 py-2.5 text-[14px] font-semibold text-ink transition-colors hover:border-navy/50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-navy",children:Array.from({length:Xe.length+1},(S,P)=>e.jsx("option",{value:String(P),children:P===0?l("reservation:options.wheelchairNone5"):l("reservation:options.wheelchairN5",{n:P,s:P>1?"s":"",amount:se(P*$,p)})},P))})]}),W>0&&e.jsxs("p",{className:"mt-3 flex items-center justify-between gap-3 border-t border-ink/15 pt-3",children:[e.jsx("span",{className:"text-[12px] font-bold uppercase tracking-wider text-ink-soft",children:l("reservation:options.totalWheelchair")}),e.jsx("span",{className:"font-display text-[1.5rem] leading-none text-navy",children:se(W*$,p)})]})]})]})]}),Lt.length>0&&e.jsxs("div",{className:"order-4",children:[e.jsx(ps,{bare:!0,icon:"sparkle",title:l("reservation:options.catalogTitle6"),sub:l("reservation:options.catalogSub6")}),e.jsx("div",{className:"space-y-4",children:Lt.map(S=>{const P=S.options.length>1,ne=qe(S.category),re=Pe(S);return e.jsxs("article",{className:"overflow-hidden rounded-2xl border-2 border-ink/10 bg-white shadow-soft",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-ink/8 bg-cream-100/60 px-5 py-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"grid h-11 w-11 shrink-0 place-items-center rounded-2xl bg-navy text-cream-100",children:e.jsx(h,{name:Ne(S.category),className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-display text-[1.25rem] leading-tight text-ink",children:S.category}),ne.tagline&&e.jsx("p",{className:"text-[12.5px] font-semibold text-gold-deep",children:ne.tagline})]})]}),e.jsx("span",{className:`shrink-0 rounded-full px-3 py-1 text-[13px] font-bold ${re>0?"bg-navy/[0.06] text-navy":"bg-emerald-50 text-emerald-600"}`,children:re>0?se(re,p):l("reservation:options.free")})]}),e.jsxs("div",{className:"px-5 py-4",children:[ne.bullets.length>0&&e.jsx("div",{className:"mb-4 grid gap-x-6 gap-y-1.5 sm:grid-cols-2",children:ne.bullets.map((we,Ce)=>e.jsxs("span",{className:"flex items-start gap-2 text-[12.5px] text-ink",children:[e.jsx(h,{name:"check",className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--accent)]"})," ",we]},Ce))}),e.jsx("p",{className:"mb-2 text-[10.5px] font-bold uppercase tracking-wider text-ink-soft",children:l("reservation:options.yourChoice")}),e.jsx("div",{className:"space-y-1.5",role:P?"radiogroup":void 0,"aria-label":S.category,children:S.options.map(we=>{const Ce=F.includes(we.id);return e.jsxs("button",{onClick:()=>P?ke(S,we):dt(we),className:`flex w-full items-start gap-3 rounded-xl border px-3 py-2.5 text-left transition-all ${Ce?"border-navy bg-navy/[0.04]":"border-ink/10 hover:border-navy/30"}`,children:[P?e.jsx("span",{className:`mt-1 grid h-4 w-4 shrink-0 place-items-center rounded-full border ${Ce?"border-navy":"border-ink/30"}`,children:Ce&&e.jsx("span",{className:"h-2 w-2 rounded-full bg-navy"})}):e.jsx("span",{className:`mt-0.5 grid h-5 w-9 shrink-0 items-center rounded-full px-0.5 transition-colors ${Ce?"bg-navy":"bg-ink/15"}
402`,children:e.jsx("span",{className:`h-4 w-4 rounded-full bg-white shadow transition-transform ${Ce?"translate-x-4":""}`})}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-0.5",children:[e.jsx("span",{className:`text-[14px] leading-tight ${Ce?"font-bold text-ink":"font-semibold text-ink-soft"}`,children:we.name}),e.jsx(D,{o:we})]}),we.information&&e.jsx("span",{className:"mt-0.5 block text-[12px] leading-snug text-ink-mute",children:we.information}),we.is_required&&e.jsx("span",{className:"mt-1 inline-block rounded-full bg-cream-200 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wide text-gold-deep",children:l("reservation:options.includedByDefault")})]})]},we.id)})}),re>0&&e.jsx("p",{className:"mt-3 border-t border-ink/8 pt-2 text-right text-[13px] font-bold text-navy",children:l("reservation:options.totalCat",{cat:S.category.toLowerCase(),price:se(re,p)})})]})]},S.category)})})]}),e.jsx("div",{className:"order-5",children:e.jsx("p",{className:"mt-5 text-center",children:e.jsx("button",{type:"button",onClick:()=>o("recap"),className:"text-[14px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:l("reservation:options.skipStep5")})})}),Ps]})}function xd({b:t,go:n,combine:o}){var ft,qt,Ft,wt,Yt,Qt,cs,mt,Pt,At,Ut,Vt,Ya,Qa,Sa,Wa,Ja,Ma,sa,Ca,Ia,Za,$a,Oa;const a=Ka(t),{t:s}=it(),i=Ys(a),l=a.currency||"EUR",[d,c]=b.useState(null),m=o&&Array.isArray(a.combineStays)&&a.combineStays.length?a.combineStays:[],g=o&&(o.tiers||[]).find(r=>r.id===a.tier)||null,N=(o&&Array.isArray((ft=o.group)==null?void 0:ft.includedItems)?o.group.includedItems:[]).map(r=>String(r||"").trim()).filter(Boolean),u=(o&&Array.isArray((qt=o.group)==null?void 0:qt.programme)?o.group.programme:[]).map(r=>{const f=String((r==null?void 0:r.title)||(r==null?void 0:r.text)||"").trim(),w=f.indexOf(` 403`);return w>0?{titre:f.slice(0,w).trim(),texte:f.slice(w+1).trim()}:{titre:f,texte:String(r!=null&&r.text&&r.text!==r.title?r.text:"").trim()}}).filter(r=>r.titre),p=r=>r&&String(r).length>=10?`${String(r).slice(8,10)}/${String(r).slice(5,7)}`:null,{data:x}=yi(a.packageId||void 0,a.tier||void 0,a.flightId||void 0),{data:j}=wn(a.packageId||void 0,a.flightId||void 0),C=(j||[]).find(r=>r.id===a.tier)||(j||[])[0],U=((Ft=C==null?void 0:C.mk)==null?void 0:Ft.image_localisation)||"",I=((wt=C==null?void 0:C.md)==null?void 0:wt.image_localisation)||"",L=r=>{if(r){for(const f of Object.values(r))if(f&&f[0])return f[0]}},me=L(x==null?void 0:x.roomImages),Z=L(x==null?void 0:x.roomImagesMd),V=[i.adults?s("reservation:recap.adults",{n:i.adults,s:i.adults>1?"s":""}):"",i.children?s("reservation:recap.children",{n:i.children,s:i.children>1?"s":""}):"",i.babies?s("reservation:recap.babies",{n:i.babies,s:i.babies>1?"s":""}):""].filter(Boolean).join(" · "),k=["quintuple","quadruple","triple","double","single"],R=(a.comboLabel?String(a.comboLabel).split("+"):[]).map(r=>r.trim()).filter(Boolean).map(r=>({label:r,type:k.find(f=>r.toLowerCase().includes(f))||""})),_=(r,f)=>{var X;const w=r==="mk"?x==null?void 0:x.roomImages:x==null?void 0:x.roomImagesMd;return f&&((X=w==null?void 0:w[f])==null?void 0:X[0])||(r==="mk"?me:Z)},be={single:s("reservation:recap.roomSingle"),double:s("reservation:recap.roomDouble"),triple:s("reservation:recap.roomTriple"),quadruple:s("reservation:recap.roomQuad"),quintuple:s("reservation:recap.roomQuint")},Y=Ga(a,i.n,On,i.babies);Math.round(Y/i.n);const[Q,z]=b.useState([]),fe=fl();b.useEffect(()=>{const r=ka();fetch(`${r}/api/agences`).then(f=>f.ok?f.json():[]).then(f=>z(Array.isArray(f)?f:(f==null?void 0:f.data)||[])).catch(()=>{})},[]);const K=a.pension?Kt[a.pension]||a.pension:"â";let E=null,B=null,M=null,q=null,ce="",te="",$="",W="";if(a.dateISO){const r=(ut,Gt)=>{const nt=new Date(ut);return nt.setDate(nt.getDate()+(Gt||0)),nt},f=ut=>{try{return bs(ut,{weekday:"long",day:"numeric",month:"long",year:"numeric"})}catch{return Bt(ut)}},w=at(a.dateISO),X=ut=>m.find(Gt=>Gt.key===ut)||null,ee=ut=>ut&&String(ut).length>=10?at(String(ut).slice(0,10)):null,Le=X("md"),ze=X("mk"),ge=m.length&&ee(Le==null?void 0:Le.checkIn)||w,Oe=m.length&&ee(Le==null?void 0:Le.checkOut)||r(w,a.nightsMedina||0),rt=m.length&&ee(ze==null?void 0:ze.checkIn)||Oe,It=m.length&&ee(ze==null?void 0:ze.checkOut)||r(Oe,a.nightsMakkah||0);M=Bt(ge),q=Bt(Oe),E=Bt(rt),B=Bt(It),ce=f(ge),te=f(Oe),$=f(rt),W=f(It)}const ye=a.dateISO?(()=>{try{return bs(at(a.dateISO),{weekday:"long",day:"numeric",month:"long",year:"numeric"})}catch{return""}})():"",de=a.returnISO&&String(a.returnISO).length>=10?(()=>{try{return bs(at(String(a.returnISO).slice(0,10)),{weekday:"long",day:"numeric",month:"long",year:"numeric"})}catch{return""}})():"",ot=r=>{if(!r||String(r).length<10)return"";try{return bs(at(String(r).slice(0,10)),{weekday:"long",day:"numeric",month:"long",year:"numeric"})}catch{return""}},Ge=a.comboLabel?`${a.comboLabel}${a.comboShared?` â ${s("reservation:rooms.sharedReserveShort5")}`:""}`:"â";let Be=null,ve=null,le=null;try{Be=JSON.parse(localStorage.getItem("selectedMakkahHotelData")||"null")}catch{}try{ve=JSON.parse(localStorage.getItem("selectedMedineHotelData")||"null")}catch{}try{le=JSON.parse(localStorage.getItem("selectedRooms")||"null")}catch{}const Te=r=>r?/^https?:\/\//i.test(r)?r:`${window.location.origin}${r.startsWith("/")?"":"/"}${r}`:"";let ue="",$e="";try{ue=Te(localStorage.getItem("selectedMakkahHotelImage"))}catch{}try{$e=Te(localStorage.getItem("selectedMedineHotelImage"))}catch{}let oe=[];try{const r=JSON.parse(localStorage.getItem("selectedOptions")||"null");oe=((Qt=(Yt=r==null?void 0:r.transferPlan)==null?void 0:Yt.config)==null?void 0:Qt.legs)||[]}catch{}let Ve=null;try{Ve=JSON.parse(localStorage.getItem("selectedItinerary")||"null")}catch{}const y=(Ve==null?void 0:Ve.flightDetails)||{},A=(((cs=Ve==null?void 0:Ve.flight)==null?void 0:cs.segments)||[]).filter(r=>r.dir==="in"),je=(((mt=Ve==null?void 0:Ve.flight)==null?void 0:mt.segments)||[]).filter(r=>r.dir==="out"),Se=r=>r&&r.length>=16?r.slice(11,16):"",We=r=>r&&r.length>=10?`${r.slice(8,10)}/${r.slice(5,7)}`:"",Ze=(r,f)=>{const w=new Date(r||"").getTime(),X=new Date(f||"").getTime();return isNaN(w)||isNaN(X)?0:Math.max(0,Math.round((X-w)/6e4))},O=y.fromCity||a.city,pe=y.toCity||a.flightDest,Ue=((Pt=A[0])==null?void 0:Pt.fromCity)||a.flightRetFrom,H=((At=A[A.length-1])==null?void 0:At.toCity)||a.flightRetTo,Ae=r=>{const f=r.length>1?r.slice(0,-1).filter((w,X)=>!(o&&sr(w,r[X+1]))).map(w=>
403w.toCity).filter(Boolean):[];return f.length?s("reservation:recap.stopsList",{n:f.length,s:f.length>1?"s":"",list:f.join(", ")}):s("reservation:recap.direct")},De=je.length?Ae(je):a.flightType||"",J=A.length?Ae(A):"",ie=r=>{if(!r||r.length<10)return"";try{return bs(r,{day:"numeric",month:"long",year:"numeric"})}catch{return We(r)}},Ee=r=>({fromCity:r.fromCity,toCity:r.toCity,fromCode:r.fromCode||"",toCode:r.toCode||"",dep:Se(r.departISO),depDate:ie(r.departISO),arr:Se(r.arriveISO),arrDate:ie(r.arriveISO),sameDay:We(r.departISO)===We(r.arriveISO),durationMin:Ze(r.departISO,r.arriveISO),flightNo:r.flightNo||r.flightNumber,airline:r.airline||r.airlineName}),Re=r=>r?Kt[r]||r:K!=="â"?K:void 0,Je=r=>r&&!/^standard$/i.test(String(r).trim())?r:void 0;Je(a.viewMd||((Ya=(Vt=(Ut=le==null?void 0:le.medine)==null?void 0:Ut.rooms)==null?void 0:Vt[0])==null?void 0:Ya.view)),Je(a.viewMk||((Wa=(Sa=(Qa=le==null?void 0:le.makkah)==null?void 0:Qa.rooms)==null?void 0:Sa[0])==null?void 0:Wa.view));const Me={SGL:"Simple",DBL:"Double",TPL:"Triple",QDR:"Quadruple",QUAD:"Quadruple"},ct=r=>{const f=(r==null?void 0:r.rooms)||[];return f.length?f.map(w=>`${Number(w.count)>1?`${w.count}à `:""}${w.roomName||Me[String(w.type||"").toUpperCase()]||w.type}`).join(", "):Ge!=="â"?Ge:void 0},Ke=(()=>{const r=(a.city||"").toLowerCase();return/lyon/.test(r)?"lyon":/casa|casablanca/.test(r)?"casa":"ivry"})(),st=Q.find(r=>(r.name||"").toLowerCase().includes(Ke))||Q.find(r=>/ivry|paris/.test((r.name||"").toLowerCase())),gt={FR:"FR",MA:"MAR",DZ:"DZA",US:"USA",TN:"TUN"},he=(mr()||(fe==null?void 0:fe.countryCode)||"FR").toUpperCase(),Xe={FR:5,MAR:252,DZA:171,USA:315,TUN:309},F=gt[he]||"FR",ke=Q.filter(r=>{var X,ee;const f=String(((X=r==null?void 0:r.country)==null?void 0:X.code_pays)||((ee=r==null?void 0:r.pays)==null?void 0:ee.code_pays)||"").toUpperCase();return(f?f===F:Number(r==null?void 0:r.id_country)===Xe[F])&&String((r==null?void 0:r.phone)||"").trim()}),dt=ke.length?ke:st!=null&&st.phone?[st]:[];a.dateISO&&(()=>{try{return bs(a.dateISO,{day:"numeric",month:"long",year:"numeric"})}catch{return}})(),a.city,st&&(st.id,st.name,st.adresse,st.phone,st.email),a.tierLabel?o?`${o.tripLabel}${a.tierLabel}`:((a.nightsMedina||0)+(a.nightsMakkah||0)+1,`${a.tierLabel}`):a.packageName,o&&Math.max(0,(Number(a.stay)||0)-1)||(a.nightsMedina||0)+(a.nightsMakkah||0),M&&(ve!=null&&ve.name||((Ja=le==null?void 0:le.medine)==null||Ja.hotelName),ve==null||ve.stars,a.nightsMedina,Re((Ma=le==null?void 0:le.medine)==null?void 0:Ma.pension),ct(le==null?void 0:le.medine),ve==null||ve.distanceDescription),E&&(Be!=null&&Be.name||((sa=le==null?void 0:le.makkah)==null||sa.hotelName),Be==null||Be.stars,a.nightsMakkah,Re((Ca=le==null?void 0:le.makkah)==null?void 0:Ca.pension),ct(le==null?void 0:le.makkah),Be==null||Be.distanceDescription),i.n,i.adults,i.children,i.babies,y.airlineName||(Ia=Ve==null?void 0:Ve.flight)!=null&&Ia.airlineName,y.travelClass||(Za=Ve==null?void 0:Ve.flight)!=null&&Za.travelClass,je.length&&je.map(Ee),A.length&&A.map(Ee);const D=({label:r,segs:f,fallFrom:w,fallTo:X,fallDate:ee,fallTime:Le,fallNo:ze})=>e.jsxs("div",{children:[e.jsxs("p",{className:"text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:[r,ee?e.jsxs("span",{className:"ml-1.5 font-semibold text-ink-mute",children:["· ",ee]}):null]}),f.length?e.jsx("div",{className:"no-sb mt-2.5 flex items-center gap-2 overflow-x-auto pb-1",children:f.map((ge,Oe)=>e.jsxs(us.Fragment,{children:[Oe>0&&(o&&sr(f[Oe-1],ge)?e.jsx("span",{className:"shrink-0 self-center whitespace-nowrap rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-bold text-amber-700",children:s("reservation:recap.stayAt",{city:f[Oe-1].toCity,n:Nc(f[Oe-1],ge)})}):e.jsxs("span",{className:"shrink-0 self-center whitespace-nowrap rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-bold text-amber-700",children:[s("reservation:recap.layoverAt",{city:f[Oe-1].toCity}),Ze(f[Oe-1].arriveISO,ge.departISO)?` · ${Na(Ze(f[Oe-1].arriveISO,ge.departISO))}`:""]})),e.jsxs("div",{className:"flex shrink-0 items-center gap-2.5",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"font-display text-[1.2rem] leading-none text-ink",children:Se(ge.departISO)||"â"}),We(ge.departISO)&&e.jsx("div",{className:"text-[9px] font-medium text-gold-deep",children:We(ge.departISO)}),e.jsx("div",{className:"mt-0.5 text-[11px] font-semibold text-ink-soft",children:ge.fromCity})]}),e.jsxs("div",{className:"flex w-16 shrink-0 flex-col items-center",children:[e.jsx("span",{className:"text-[9px] font-medium text-ink-mute",children:Ze(ge.departISO,ge.arriveISO)?Na(Ze(ge.departISO,ge.arriveISO)):""}),e.jsx("span",{className:"relative mt-1 h-[2px] w-full rounded-full bg-ink/15",children:e.jsx(h,{name:"plane",className:"absolute -top-[7px] left-1/2 h-3.5 w-3.5 -translate-x-1/2 rotate-90 text-navy"})})]}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"font-display text-[1.2rem] leading-none text-ink",children:Se(ge.arriveISO)||"â"}),We(ge.arriveISO)&&e.jsxs("div",{className:"text-[9px] font-medium text-gold-deep",children:[We(ge.arriveISO),We(ge.arriveISO)!==We(ge.departISO)?" (+1)":""]}),e.jsxs("div",{className:"mt-0.5 text-[11px] font-semibold text-ink-soft",children:[ge.toCity,Oe===f.length-1?e.jsxs("span",{className:"text-[var(--accent)]",children:[" · ",s("reservation:flightCard.arrival")]}):""]})]})]})]},Oe))}):e.jsxs("p",{className:"mt-0.5 flex items-center gap-1.5 text-[14px] font-bold text-ink",children:[w," ",e.jsx(h,{name:"plane",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",X," ",e.jsxs("span",{className:"text-[12.5px] font-normal text-ink-soft",children:[Le?` · ${Le}`:"",ze?` · ${s("reservation:recap.flightNo",{no:ze})}`:""]})]})]}),Ne=Number(a.comboTotal)||0,qe=Number(a.optionsTotal)||0,Pe=(Number(a.visaPerPerson)||0)*i.n,et=Number(a.transferTotal)||0,Ye=Math.max(0,qe-et),lt=(Number(a.infantPrice)||0)*(i.babies||0),He=String(l).toUpperCase()==="EUR",Fe=He?Oi(Y):0,xt=He?xl(Y):Y,Mt="inl
403ine-flex items-center gap-1.5 rounded-full bg-cream-200 px-2.5 py-1 text-[12px] font-medium text-navy",ks=r=>e.jsx("button",{type:"button",onClick:f=>{f.preventDefault(),f.stopPropagation(),r()},className:"shrink-0 rounded-full border border-ink/15 px-3 py-1 text-[12px] font-semibold text-ink-soft transition-colors hover:border-navy hover:text-navy",children:s("reservation:summary.edit")}),Lt=({id:r,icon:f,title:w,onEdit:X,repli:ee=!1,resume:Le,ouvert:ze=!1,groupe:ge=!1,children:Oe})=>ee?e.jsxs("details",{id:r,open:ze,className:`group scroll-mt-4 ${ge?"":"overflow-hidden rounded-xl border border-ink/18 bg-white"}`,children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-4 px-5 py-3.5 transition-colors hover:bg-cream-100/60 [&::-webkit-details-marker]:hidden sm:px-6",children:[e.jsx(h,{name:f,className:"h-[18px] w-[18px] shrink-0 text-gold-deep"}),e.jsxs("span",{className:"min-w-0 flex-1 sm:flex sm:items-baseline sm:gap-5",children:[e.jsx("span",{className:"block font-display text-[1.1rem] font-bold leading-snug text-navy sm:w-[16.5rem] sm:shrink-0",children:w}),Le&&e.jsx("span",{className:"mt-0.5 block truncate text-[12.5px] leading-snug text-ink-mute sm:mt-0 sm:min-w-0 sm:flex-1",children:Le})]}),X&&ks(X),e.jsx(h,{name:"chevron",className:"h-4 w-4 shrink-0 text-ink-mute/60 transition-transform group-open:rotate-180"})]}),e.jsx("div",{className:"border-t border-ink/10 bg-cream-50/50 px-5 py-4 sm:px-6",children:Oe})]}):e.jsxs("div",{className:"pt-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsxs("h3",{className:"flex items-center gap-3 font-display text-[1.4rem] font-bold leading-tight text-navy sm:text-[1.65rem]",children:[e.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-2xl bg-gradient-to-br from-[var(--accent)] to-gold-deep text-white shadow-soft",children:e.jsx(h,{name:f,className:"h-[22px] w-[22px]"})}),w]}),X&&ks(X)]}),e.jsx("div",{className:"overflow-hidden rounded-2xl border border-ink/10 bg-white px-5 py-4 shadow-soft",children:Oe})]}),ms=[(a.nightsMedina||0)>0?s("reservation:recap.nightsMedina",{n:a.nightsMedina,s:(a.nightsMedina||0)>1?"s":""}):"",(a.nightsMakkah||0)>0?s("reservation:recap.nightsMakkahResume6",{n:a.nightsMakkah,s:(a.nightsMakkah||0)>1?"s":""}):""].filter(Boolean).join(" · "),as=[a.airline,a.date&&a.returnDate?`${a.date} â ${a.returnDate}`:""].filter(Boolean).join(" · "),ps=[a.hotelMdName?`${a.hotelMdName}${a.starsMd?` ${a.starsMd}â
`:""}`:"",a.hotelMkName?`${a.hotelMkName}${a.starsMk?` ${a.starsMk}â
`:""}`:"",a.comboLabel||""].filter(Boolean).join(" · "),Ps=[...Array.from({length:i.adults},(r,f)=>({label:s("reservation:rooms.travelerN",{n:f+1})})),...Array.from({length:i.children},(r,f)=>({label:s("reservation:rooms.childN",{n:f+1})}))],rs=r=>new Set(Array.from({length:Math.max(0,Math.min(Ps.length,Number(r)||0))},(f,w)=>w)),Qs=rs(a.insuredCount),zt=rs(a.handicapCount),ns=r=>Array.from(r).sort((f,w)=>f-w).map(f=>{var w;return(w=Ps[f])==null?void 0:w.label}).filter(Boolean).join(", "),Xt=[(Number(a.guideTotal)||0)>0&&{label:s("reservation:options.guideTitle"),amount:Number(a.guideTotal)||0},(Number(a.assuranceTotal)||0)>0&&{label:`${s("reservation:recap.optAssurance")} · ${ns(Qs)||s("reservation:recap.insuredShort",{n:a.insuredCount||0,s:(a.insuredCount||0)>1?"s":""})}`,amount:Number(a.assuranceTotal)||0},(Number(a.accompTotal)||0)>0&&{label:`${s("reservation:options.wheelchairTitle")} · ${ns(zt)||`Ã${a.handicapCount||0}`}`,amount:Number(a.accompTotal)||0},(Number(a.otherOptionsTotal)||0)>0&&{label:s("reservation:recap.otherOptions"),amount:Number(a.otherOptionsTotal)||0}].filter(Boolean),ws=Math.max(0,Math.round(Ye-Xt.reduce((r,f)=>r+f.amount,0)));ws>0&&Xt.push({label:s("reservation:recap.optionsGeneric"),amount:ws});const gs=[(a.transferLabel||"").replace(/^Transfertss*:s*/,""),oe.length?s("reservation:recap.legsCount6",{n:oe.length,s:oe.length>1?"s":""}):""].filter(Boolean).join(" · "),Ds=Xt.length?Xt.map(r=>r.label.split(" · ")[0]).join(" · "):s("reservation:recap.noOption");let S=null;try{S=JSON.parse(localStorage.getItem("selectedOptions")||"null")}catch{}const P=[];for(const r of(S==null?void 0:S.selectedServices)||[]){const f=Number(r.totalPrice)||0;f>0&&P.push({label:r.name||s("reservation:recap.optionWord"),amount:f})}S!=null&&S.insurancePax&&Number(S.insurancePax.total)>
4030&&P.push({label:`${S.insurancePax.name||s("reservation:recap.optAssurance")} · ${s("reservation:recap.insuredShort",{n:S.insurancePax.count||0,s:(S.insurancePax.count||0)>1?"s":""})}`,amount:Number(S.insurancePax.total)}),S!=null&&S.guideHandicap&&Number(S.guideHandicap.total)>0&&P.push({label:`${s("reservation:options.wheelchairTitle")} · Ã${S.guideHandicap.count||0}`,amount:Number(S.guideHandicap.total)});const ne=P.length?P:Xt,re=P.length?P.reduce((r,f)=>r+f.amount,0):Ye,we=864e5,Ce=(r,f)=>{const w=Math.round(r/f),X=Array.from({length:f},()=>w);return X[0]=r-w*(f-1),X},tt=Date.now(),yt=a.dateISO?at(a.dateISO).getTime():0,Ct=r=>bs(new Date(r),{day:"2-digit",month:"2-digit",year:"numeric"}),Et=30,jt=(r=>{if(!yt)return Ce(r,3).map((X,ee)=>({label:s("reservation:recap.paymentOrdinal",{n:ee+1,ord:ee===0?"er":"ème"}),amount:X}));const f=yt-Et*we,w=f-tt;if(w>=20*we){const X=Ce(r,3),ee=tt+Math.round(w/2);return[{label:s("reservation:recap.paymentFirstOnBooking"),date:Ct(tt),amount:X[0]},{label:s("reservation:recap.paymentSecond"),date:Ct(ee),amount:X[1]},{label:s("reservation:recap.balanceBeforeDeparture",{days:Et}),date:Ct(f),amount:X[2]}]}if(w>3*we){const X=Ce(r,2);return[{label:s("reservation:recap.paymentFirstOnBooking"),date:Ct(tt),amount:X[0]},{label:s("reservation:recap.balanceBeforeDeparture",{days:Et}),date:Ct(f),amount:X[1]}]}return[{label:s("reservation:recap.fullPaymentBeforeDeparture"),amount:r}]})(Y);(Pe>0||a.visaLabel)&&(a.visaLabel||s("reservation:summary.rowVisa"),Number(a.visaPerPerson),i.n),oe.length&&(a.transferLabel||s("reservation:options.transfersWord")).replace(/^Transferts\s*:\s*/,s("reservation:recap.transferDash")),oe.map(r=>({route:r.route,mode:Hi(r.mode||"bus"),price:Number(r.price)||0})),a.comboLabel,i.n&&Math.round(Ne/i.n),Math.round((Number(a.pensionSupp)||0)*i.n),Math.round(Number(a.pensionSupp)||0),Math.round((Number(a.viewMkAmount)||0)+(Number(a.viewMdAmount)||0)),[(Number(a.viewMkAmount)||0)>0&&a.viewMk?s("reservation:recap.viewMecque",{v:a.viewMk}):"",(Number(a.viewMdAmount)||0)>0&&a.viewMd?s("reservation:recap.viewMedine",{v:a.viewMd}):""].filter(Boolean).join(" · "),et>0,a.visaLabel||s("reservation:summary.rowVisa"),i.babies;const pt=o?o.tripLabel:(Ts[a.tripType]||Ts.omra).label,Tt=o&&Number(a.stay)||(Number(a.nightsMakkah)||0)+(Number(a.nightsMedina)||0)+1,v=Math.max(0,Tt-1),T=r=>{if(!r)return"";try{return bs(r,{weekday:"long",day:"numeric",month:"long"})}catch{return""}},G=r=>(r||"").replace(/\s+\d{4}$/,""),xe=T(a.dateISO),ae=T(a.returnISO)||a.returnDate||"",_e=!d&&!o&&!a.comboLabel;if(b.useEffect(()=>{_e&&n(a.packageId?"rooms":"vols")},[_e]),d)return e.jsx(yr,{r:d});if(_e)return e.jsx(js,{label:s("reservation:common.loading")});const Qe=(()=>{let r=a.baseByPax&&a.baseByPax.length?a.baseByPax:[];if(!r.length)try{const f=JSON.parse(localStorage.getItem(Ni())||"null");Array.isArray(f)?f.length===i.n&&(r=f):f&&Array.isArray(f.rows)&&f.n===i.n&&(!Ne||f.comboTotal===Math.round(Ne))&&(r=f.rows)}catch{r=[]}return r.length||(r=[{label:s("reservation:recap.labelStay"),sub:"",pp:Math.round(Ne/Math.max(1,i.n))}]),r})(),kt=Math.round(xt/3),es=/direct/i.test(String(a.flightType||"")),Nt=a.airline?[es?s("reservation:recap.flightDirect6",{cie:a.airline}):s("reservation:recap.flightStops6",{cie:a.airline,escales:a.flightType||""}),a.flightNature&&a.flightNature!=="pnr_groupe"?s("reservation:recap.flightRegular6"):""].filter(Boolean).join(" · "):"";return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-[var(--accent)]/55 bg-white shadow-soft",children:[e.jsxs("div",{className:"flex items-start gap-3 border-b border-[var(--accent)]/30 bg-[var(--accent)]/[0.08] px-5 py-3 sm:px-6",children:[e.jsx(h,{name:"mail",className:"mt-0.5 h-5 w-5 shrink-0 text-gold-deep"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"font-display text-[1.15rem] font-bold leading-tight text-navy sm:text-[1.3rem]",children:s("reservation:recap.leadTitle6")}),e.jsx("p",{className:"mt-0.5 text-[13px] leading-snug text-ink-soft",children:s("reservation:recap.leadText6")})]})]}),e.jsx("div",{id:"gm-coordonnees",className:"px-5 py-4 sm:px-6"})]}),e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-ink/25 bg-white shadow-soft",children:[e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6 sm:py-5",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.16em] text-gold-deep",children:s("reservation:recap.quoteEyebrow6")}),e.jsxs("h2",{className:"mt-1.5 font-display text-[1.5rem] font-bold leading-tight text-navy sm:text-[1.95rem]",children:[s("reservation:recap.yourWord")," ",pt," ",a.tierLabel||""," â ",s("reservation:vols.nightsSlashDays",{nights:v,days:Tt})]})]}),e.jsxs("dl",{className:"divide-y divide-ink/12 border-b-2 border-ink/20",children:[e.jsxs("div",{className:"px-5 py-3 sm:px-6",children:[e.jsx("dt",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:s("reservation:recap.fieldDeparture6")}),e.jsx("dd",{className:"mt-0.5 text-[15px] font-bold leading-snug text-navy",children:a.city||s("reservation:recap.dash")}),Nt&&e.jsx("p",{className:"mt-1 text-[13.5px] leading-snug text-ink-soft",children:Nt})]}),e.jsxs("div",{className:"px-5 py-3 sm:px-6",children:[e.jsx("dt",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:s("reservation:recap.fieldDates6")}),e.jsxs("dd",{className:"mt-0.5 text-[15px] font-bold leading-snug text-navy",children:[ye&&de?s("reservation:recap.tripDatesLong6",{debut:ye,fin:de}):ce&&W?s("reservation:recap.tripDatesLong6",{debut:ce,fin:W}):s("reservation:recap.dash"),e.jsxs("span",{className:"font-semibold text-ink-soft",children:[" · ",s("reservation:vols.nightsSlashDays",{nights:v,days:Tt})]})]}),(ye||ce)&&e.jsx("ol",{className:"mt-2.5 space-y-1.5 border-l-2 border-[var(--accent)]/40 pl-3.5",children:[...m.length?m.filter(r=>
403r.key!=="mk"&&r.key!=="md"&&Number(r.nights)>0).map(r=>[s("reservation:recap.dayStage6",{ville:r.city}),ot(r.checkIn)]):[],[s("reservation:recap.dayArrival6"),ce],[s("reservation:recap.dayOmra6"),$],[s("reservation:recap.dayReturn6"),de||W]].map(([r,f])=>f?e.jsxs("li",{className:"text-[13.5px] leading-snug text-ink-soft",children:[r," · ",e.jsx("strong",{className:"font-bold text-navy first-letter:uppercase",children:f})]},r):null)})]}),e.jsxs("div",{className:"px-5 py-3 sm:px-6",children:[e.jsx("dt",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:s("reservation:recap.fieldTravelers6")}),e.jsx("dd",{className:"mt-0.5 text-[15px] font-bold leading-snug text-navy",children:s("reservation:recap.paxTravelers",{n:i.n,s:i.n>1?"s":""})})]})]}),e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:s("reservation:recap.sectionStay6")}),e.jsxs("p",{className:"mt-1.5 text-[15px] leading-snug text-ink",children:[e.jsxs("span",{className:"text-ink-soft",children:[s("reservation:recap.fieldRooms6")," · "]}),e.jsx("strong",{className:"font-bold text-navy",children:a.comboLabel||s("reservation:recap.dash")})]}),e.jsx("ul",{className:"mt-3 space-y-3",children:(m.length?m.slice().sort((r,f)=>{const w=X=>X==="mk"?0:X==="md"?1:2;return w(r.key)-w(f.key)}).map(r=>{var w,X;if(r.key==="mk")return[s("reservation:summary.rowHotelMakkah"),a.hotelMkName,a.starsMk,Number(r.nights)||a.nightsMakkah,a.distMk,ue||me];if(r.key==="md")return[s("reservation:summary.rowHotelMedina"),a.hotelMdName,a.starsMd,Number(r.nights)||a.nightsMedina,a.distMd,$e||Z];const f=((w=g==null?void 0:g.hotelByCity)==null?void 0:w[r.key])||null;return[r.city,(f==null?void 0:f.name)||r.hotel,Number(f==null?void 0:f.stars)||0,Number(r.nights)||0,"",((X=f==null?void 0:f.imgs)==null?void 0:X[0])||""]}
403):[[s("reservation:summary.rowHotelMakkah"),a.hotelMkName,a.starsMk,a.nightsMakkah,a.distMk,ue||me],[s("reservation:summary.rowHotelMedina"),a.hotelMdName,a.starsMd,a.nightsMedina,a.distMd,$e||Z]]).map(([r,f,w,X,ee,Le])=>{if(!f)return null;const ze=vr({name:f}),ge=ze&&Number(ze.stars)!==Number(w)?Number(ze.stars):null;return e.jsxs("li",{className:"flex items-start gap-3",children:[Le?e.jsx("img",{src:Le,alt:f,loading:"lazy",className:"h-20 w-28 shrink-0 rounded-xl border border-ink/12 object-cover sm:h-24 sm:w-36"}):null,e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-ink-mute",children:r}),e.jsxs("p",{className:"text-[15px] font-bold leading-snug text-navy",children:[f,w?` ${w}â
`:""]}),ge?e.jsx("p",{className:"text-[12.5px] font-semibold leading-snug text-gold-deep",children:s("reservation:rooms.agencyRating",{n:ge})}):null,e.jsxs("p",{className:"mt-0.5 text-[13px] leading-snug text-ink-soft",children:[X?s("reservation:recap.nightsCount",{n:X,s:X>1?"s":""}):"",ee?e.jsxs(e.Fragment,{children:[X?" · ":"",e.jsx("strong",{className:"font-bold text-ink",children:ee})]}):null]})]})]},r)})}),K&&K!=="â"&&e.jsxs("p",{className:"mt-3 border-t border-ink/12 pt-3 text-[14px] leading-snug text-ink",children:[e.jsxs("span",{className:"text-ink-soft",children:[s("reservation:recap.pensionLabel6")," · "]}),e.jsx("strong",{className:"font-bold text-navy",children:K})]}),e.jsxs("button",{type:"button",onClick:()=>{const r=document.getElementById("rub-hotels");r&&(r.open=!0,r.scrollIntoView({behavior:"smooth",block:"start"}))},className:"mt-3 inline-flex items-center gap-1.5 text-[13px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:[s("reservation:recap.seeHotels6")," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 rotate-90"})]})]}),e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:s("reservation:recap.sectionIncluded6")}),e.jsx("ul",{className:"mt-2.5 space-y-2",children:(N.length?[s("reservation:recap.inclFlights6",{ville:a.city||s("reservation:recap.dash"),cie:a.airline||s("reservation:recap.partnerAirlineFallback")}),...N]:[s("reservation:recap.inclFlights6",{ville:a.city||s("reservation:recap.dash"),cie:a.airline||s("reservation:recap.partnerAirlineFallback")}),s("reservation:recap.inclVisa6",{visa:a.visaLabel||s("reservation:recap.visaOmraFallback")}),s("reservation:recap.inclTransfers6"),s("reservation:recap.inclVisits6"),s("reservation:recap.inclGuide6")]).map(r=>e.jsxs("li",{className:"flex items-start gap-2.5 text-[14px] leading-relaxed text-ink",children:[e.jsx(h,{name:"check",className:"mt-1 h-4 w-4 shrink-0 text-[var(--accent)]"})," ",e.jsx("span",{children:r})]},r))})]}),e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:s("reservation:recap.perPaxLabel6")}),e.jsxs("ul",{className:"mt-2 max-w-xl divide-y divide-ink/10",children:[Qe.map((r,f)=>e.jsxs("li",{className:"flex items-baseline justify-between gap-4 py-2 text-[14px]",children:[e.jsxs("span",{className:"min-w-0 text-ink",children:[e.jsx("strong",{className:"font-semibold text-navy",children:r.label}),r.sub?` (${r.sub})`:"",r.room?e.jsxs("span",{className:"text-ink-mute",children:[s("reservation:recap.lodgedInRoom"),String(r.room).toLowerCase()]}):null]}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:se(r.pp,l)})]},f)),He&&Fe>0&&e.jsxs("li",{className:"flex items-baseline justify-between gap-4 py-2 text-[14px]",children:[e.jsx("span",{className:"min-w-0 text-ink-soft",children:s("reservation:recap.feeLine6")}),e.jsxs("span",{className:"shrink-0 font-bold text-ink",children:["+ ",se(Fe,l)]})]})]}),e.jsxs("p",{className:"mt-3 flex max-w-xl items-end justify-between gap-4 border-t-2 border-ink/20 pt-3",children:[e.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-ink-soft",children:s("reservation:recap.totalPax",{n:i.display})}),e.jsx("span",{className:"font-display text-[2.1rem] leading-none text-navy",children:se(xt,l)})]}),e.jsxs("a",{href:"#detail-prix",className:"mt-2.5 inline-flex items-center gap-1.5 text-[13px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:[s("reservation:recap.seePrice6")," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 rotate-90"})]}),He&&kt>0&&e.jsxs("div",{className:"mt-3 border-t border-ink/15 pt-3",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:s("reservation:recap.depositLabel6")}),e.jsx("p",{className:"mt-1 font-display text-[1.7rem] leading-none text-navy",children:se(kt,l)}),e.jsx("p",{className:"mt-1.5 text-[13px] leading-snug text-ink-soft",children:s("reservation:recap.depositNote6",{solde:se(xt-kt,l)})})]})]}),e.jsxs("div",{className:"px-5 py-4 sm:px-6",children:[e.jsxs("p",{className:"max-w-3xl text-[14px] leading-relaxed text-ink-soft",children:[e.jsx("strong",{className:"text-navy",children:s(o?"reservation:recap.projectFormingCombine6":"reservation:recap.projectFormingOmra6")}),s("reservation:recap.projectFormingRest")]}),e.jsxs("p",{className:"mt-3 flex items-center gap-2 border-t border-ink/12 pt-3 text-[13px] font-semibold text-ink",children:[e.jsx(h,{name:"clock",className:"h-4 w-4 shrink-0 text-red-brand"})," ",s("reservation:recap.lastSeatsBlocked")]})]})]}),e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-ink/20 bg-white shadow-soft [&>
403details+details]:border-t [&>details+details]:border-ink/12 [&>div>details]:border-t [&>div>details]:border-ink/12",children:[!(o&&u.length)&&e.jsx(Lt,{icon:"kaaba",title:`${s("reservation:recap.comesToLife")}${s("reservation:recap.comesToLifeAccent")}`,repli:!0,groupe:!0,resume:s("reservation:recap.resumeStory6"),children:e.jsx("div",{className:"overflow-hidden rounded-2xl border border-ink/10 bg-white",children:e.jsxs("div",{className:"grid sm:grid-cols-[260px_1fr]",children:[e.jsxs("div",{className:"relative h-48 sm:h-auto sm:min-h-[260px]",children:[e.jsx("img",{src:"/images/devis/equipe-go-makkah.webp",alt:s("reservation:recap.teamAlt"),loading:"lazy",className:"absolute inset-0 h-full w-full object-cover object-center"}),e.jsx("span",{className:"absolute inset-0 bg-gradient-to-t from-navy/75 via-transparent to-transparent"}),e.jsxs("span",{className:"absolute bottom-3 left-3 right-3 inline-flex items-center gap-1.5 truncate rounded-full bg-navy/85 px-3 py-1 text-[11px] font-bold text-cream-100 backdrop-blur",children:[e.jsx(h,{name:"users",className:"h-3.5 w-3.5 shrink-0 text-gold-light"})," ",s("reservation:recap.yourTeam")]})]}),e.jsx("div",{className:"p-5",children:e.jsxs("div",{className:"space-y-3 text-[14.5px] leading-relaxed text-ink-soft",children:[e.jsxs("p",{children:[s("reservation:recap.narrDepartPrefix"),e.jsx("strong",{className:"text-navy",children:a.date||s("reservation:recap.dash")}),a.city?e.jsxs(e.Fragment,{children:[s("reservation:recap.narrFromCity"),e.jsx("strong",{className:"text-navy",children:a.city})]}):null,s("reservation:recap.narrOnboard"),e.jsx("strong",{className:"text-navy",children:a.airline||s("reservation:recap.partnerAirlineFallback")}),s("reservation:recap.narrForDuration"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.daysAndNights",{days:Tt,nights:v})}),s("reservation:recap.narrAtHolyCities")]}),e.jsxs("p",{children:[s("reservation:recap.narrStayFirst"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.nightsMedina",{n:a.nightsMedina||0,s:(a.nightsMedina||0)>1?"s":""})}),a.hotelMdName?e.jsxs(e.Fragment,{children:[s("reservation:recap.narrAtHotel"),e.jsxs("strong",{className:"text-navy",children:[a.hotelMdName,a.starsMd?` ${a.starsMd}â
`:""]})]}):null,s("reservation:recap.narrStepsNabawi"),e.jsx("strong",{className:"text-navy",children:s("reservation:common.makkah")}),s("reservation:recap.narrForWord"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.nightsCount",{n:a.nightsMakkah||0,s:(a.nightsMakkah||0)>1?"s":""})}),a.hotelMkName?e.jsxs(e.Fragment,{children:[s("reservation:recap.narrAtThe"),e.jsxs("strong",{className:"text-navy",children:[a.hotelMkName,a.starsMk?` ${a.starsMk}â
`:""]})]}):null,s("reservation:recap.narrNearestHaram"),K!=="â"?e.jsxs(e.Fragment,{children:[s("reservation:recap.narrWith"),e.jsx("strong",{className:"text-navy",children:K.toLowerCase()}),s("reservation:recap.narrIncludedMorning")]}):null,".",a.comboLabel?e.jsxs(e.Fragment,{children:[s("reservation:recap.narrYouStayIn"),e.jsx("strong",{className:"text-navy",children:a.comboLabel}),"."]}):null]}),e.jsxs("p",{children:[s("reservation:recap.narrBeforeDeparture"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.narrOmraFormation")}),s("reservation:recap.narrInPersonPre"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.narrInPerson")}),s("reservation:recap.narrInAgencies"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.narrRemote")}),s("reservation:recap.narrVideoconf")]}),e.jsxs("p",{children:[s("reservation:recap.narrOnSite"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.narrAlwaysAccompanied")}),s("reservation:recap.narrColon"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.narrTwoVisits")}),s("reservation:recap.narrPlannedCities"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.narrOmraAccomplished")}),s("reservation:recap.narrGuidedStep")]}),e.jsxs("p",{children:[s("reservation:recap.narrTransfersOrganized"),a.transferLabel?e.jsxs(e.Fragment,{children:[s("reservation:recap.narrFormulaOpen"),e.jsx("strong",{className:"text-navy",children:(a.transferLabel||"").replace(/^Transferts\s*:\s*/,"")}),")"]}
403):null,s("reservation:recap.narrAndYour"),e.jsx("strong",{className:"text-navy",children:a.visaLabel||s("reservation:recap.visaOmraFallback")}),s("reservation:recap.narrVisaHandled"),e.jsx("strong",{className:"text-navy",children:a.returnDate||s("reservation:recap.dash")}),"."]})]})})]})})}),e.jsxs(Lt,{icon:"compass",title:s("reservation:recap.secProgram"),repli:!0,groupe:!0,resume:ms,children:[e.jsxs("p",{className:"mb-3 text-[13.5px] leading-relaxed text-ink-soft",children:[s("reservation:recap.progIntro1"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.progGuidedIncluded")}),s("reservation:recap.progIntro2")]}),e.jsx("ol",{className:"relative ml-1.5 space-y-3 border-l-2 border-[var(--accent)]/25 pl-4",children:(()=>{if(u.length&&a.dateISO){const f=at(a.dateISO);return u.map((w,X)=>{const ee=new Date(f);ee.setDate(ee.getDate()+X);let Le="";try{Le=bs(ee,{weekday:"long",day:"numeric",month:"long"})}catch{Le=Bt(ee)}return{ic:"compass",date:Le,title:w.titre,desc:w.texte,visits:[]}})}const r=[{ic:"plane",date:xe||a.date||"",title:s("reservation:recap.progArriveMedina"),desc:`${s("reservation:recap.progArriveDesc1")}${a.hotelMdName?s("reservation:recap.progAtHotel",{hotel:`${a.hotelMdName}${a.starsMd?` ${a.starsMd}â
`:""}`}):s("reservation:recap.progAtYourHotel")}${s("reservation:recap.progArriveDesc2")}`,visits:[]},{ic:"compass",date:ce&&te?`${G(ce)} â ${G(te)}`:"",title:s("reservation:recap.progStayMedina",{n:a.nightsMedina||0}),desc:`${s("reservation:recap.progStayMedinaDesc1")}${a.hotelMdName?` ${a.hotelMdName}`:""}${s("reservation:recap.progStayMedinaDesc2")}`,visits:[s("reservation:recap.progVisitMedina1"),s("reservation:recap.progVisitMedina2"),s("reservation:recap.progVisitMedina3")]},{ic:"car",date:G($),title:s("reservation:recap.progRouteMakkah"),desc:`${s("reservation:recap.progRouteDesc1")}${a.hotelMkName?s("reservation:recap.progAtThe",{hotel:`${a.hotelMkName}${a.starsMk?` ${a.starsMk}â
`:""}`}):s("reservation:recap.progAtYourHotel")}${s("reservation:recap.progRouteDesc2")}`,visits:[]},{ic:"kaaba",date:$&&W?`${G($)} â ${G(W)}`:"",title:s("reservation:recap.progStayMakkah",{n:a.nightsMakkah||0}),desc:`${s("reservation:recap.progStayMakkahDesc1")}${a.hotelMkName?s("reservation:recap.progTheHotel",{hotel:a.hotelMkName}):s("reservation:recap.progYourHotelAlt")}${s("reservation:recap.progStayMakkahDesc2")}`,visits:[s("reservation:recap.progVisitMakkah1"),s("reservation:recap.progVisitMakkah2"),s("reservation:recap.progVisitMakkah3")]}];for(const f of m)f.isHoly||r.push({ic:"pin",date:f.checkIn&&f.checkOut?`${G(ie(f.checkIn))} â ${G(ie(f.checkOut))}`:"",title:`${f.city} · ${s("reservation:common.nights6",{count:Number(f.nights)||0})}`,desc:f.hotel||"",visits:[]});return r.push({ic:"plane",date:ae||a.returnDate||"",title:s("reservation:recap.progReturn"),desc:s("reservation:recap.progReturnDesc"),visits:[]}),r})().map((r,f)=>e.jsxs("li",{className:"relative",children:[e.jsx("span",{className:"absolute -left-[22px] top-2 grid h-3.5 w-3.5 place-items-center rounded-full bg-white ring-2 ring-[var(--accent)]",children:e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"})}),e.jsxs("div",{className:"grid gap-1.5 rounded-xl border border-ink/8 bg-white px-3.5 py-3 shadow-soft sm:grid-cols-[165px_1fr] sm:gap-4",children:[r.date&&e.jsx("p",{className:"text-[12.5px] font-bold capitalize leading-snug text-gold-deep sm:border-r sm:border-ink/8 sm:pr-3",children:r.date}),e.jsxs("div",{className:r.date?"min-w-0":"min-w-0 sm:col-span-2",children:[e.jsxs("p",{className:"flex items-center gap-2 font-display text-[1.05rem] font-bold text-navy",children:[e.jsx(h,{name:r.ic,className:"h-4 w-4 shrink-0 text-[var(--accent)]"})," ",r.title]}),e.jsx("p",{className:"mt-1 text-[12.5px] leading-snug text-ink-soft",children:r.desc}),r.visits.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:r.visits.map(w=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-navy/12 bg-cream-100 px-2.5 py-0.5 text-[11.5px] font-semibold text-navy",children:[e.jsx(h,{name:"compass",className:"h-3 w-3 text-[var(--accent)]"})," ",w]},w))})]})]})]},f))}),e.jsx("p",{className:"mt-3 text-[11.5px] leading-snug text-ink-mute",children:s("reservation:recap.programNote")})]}),e.jsx(Lt,{icon:"plane",title:s("reservation:recap.secFlights"),onEdit:()=>n("vols"),repli:!0,groupe:!0,resume:as,children:a.date?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2",children:[e.jsxs("span",{className:"inline-flex items-baseline gap-2",children:[e.jsx("span",{className:"text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:s("reservation:summary.departure")})," ",e.jsx("span",{className:"font-display text-[1.15rem] font-bold capitalize text-navy",children:xe||a.date})]}),e.jsx(h,{name:"arrow",className:"h-4 w-4 text-ink-mute"}),e.jsxs("span",{className:"inline-flex items-baseline gap-2",children:[e.jsx("span",{className:"text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:s("reservation:flightCard.legReturn")})," ",e.jsx("span",{className:"font-display text-[1.15rem] font-bold capitalize text-navy",children:ae||a.returnDate||s("reservation:recap.dash")})]})]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(ea,{name:a.airline||"Vol",code:a.airlineCode,logo:a.airlineLogo,className:"h-8 w-11 rounded border border-ink/10 text-[9px]"}),e.jsx("span",{className:"text-[14.5px] font-bold text-navy",children:a.airline||s("reservation:recap.airlineCompany")})]}),e.jsxs("p",{className:"text-[12.5px] leading-snug text-ink-soft",children:[s("reservation:recap.flightDetail1"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.flightRoundTrip")}),s("reservation:recap.flightDetail2"),e.jsx("strong",{className:"text-navy",children:a.city}),s("reservation:recap.flightDetail3")]}),e.jsx("div",{className:"rounded-xl border border-ink/10 bg-cream-100/50 p-3",children:e.jsx(D,{label:s("reservation:summary.rowFlightOut"),segs:je,fallFrom:O,fallTo:pe,fallDate:a.date,fallTime:y.departureTime,fallNo:y.flightNo})}),e.jsx("div",{className:"rounded-xl border border-ink/10 bg-cream-100/50 p-3",children:e.jsx(D,{label:s("reservation:summary.rowFlightReturn"),segs:A,fallFrom:Ue||s("reservation:recap.dash"),fallTo:H||s("reservation:recap.dash"),fallDate:a.returnDate,fallTime:Se(($a=A[0])==null?void 0:$a.departISO),fallNo:(Oa=A[0])==null?void 0:Oa.flightNo})}),e.jsxs("div",{className:"flex flex-wrap gap-x-2.5 gap-y-1.5",children:[De&&e.jsxs("span",{className:Mt,children:[e.jsx(h,{name:"compass",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",s("reservation:flightCard.legOut")," : ",De]}),J&&e.jsxs("span",{className:Mt,children:[e.jsx(h,{name:"compass",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",s("reservation:flightCard.legReturn")," : ",J]}),e.jsxs("span",{className:Mt,children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",s("reservation:common.nights6",{count:(a.nightsMakkah||0)+(a.nightsMedina||0)})]}),a.flightBaggage&&e.jsxs("span",{className:Mt,children:["ð§³ ",s("reservation:rooms.baggageLabel",{baggage:a.flightBaggage})]})]})]}):e.jsx("p",{className:"text-[14px] text-ink-mute",children:s("reservation:summary.toChoose")})}),e.jsxs(Lt,{id:"rub-hotels",icon:"kaaba",title:s("reservation:recap.secHotels"),onEdit:()=>n("rooms"),repli:!0,groupe:!0,resume:ps,children:[e.jsx("div",{className:"space-y-3",children:(m.length?m.map(r=>{var w,X;if(r.key==="md")return{show:!!a.hotelMdName,cityKey:"md",city:s("reservation:common.medina"),ic:"compass",name:a.hotelMdName,stars:a.starsMd,dist:a.distMd,nights:Number(r.nights)||a.nightsMedina,din:p(r.checkIn)||M,dout:p(r.checkOut)||q,view:a.viewMd,viewAmt:a.viewMdAmount,pension:a.mdPensionDisplay||a.mdPension};if(r.key==="mk")return{show:!!a.hotelMkName,cityKey:"mk",city:s("reservation:common.makkah"),ic:"kaaba",name:a.hotelMkName,stars:a.starsMk,dist:a.distMk,nights:Number(r.nights)||a.nightsMakkah,din:p(r.checkIn)||E,dout:p(r.checkOut)||B,view:a.viewMk,viewAmt:a.viewMkAmount,pension:a.mkPensionDisplay||a.mkPension};
403const f=((w=g==null?void 0:g.hotelByCity)==null?void 0:w[r.key])||null;return{show:!!(r.hotel||f!=null&&f.name),cityKey:r.key,city:r.city,ic:"pin",name:(f==null?void 0:f.name)||r.hotel,stars:Number(f==null?void 0:f.stars)||0,dist:"",nights:Number(r.nights)||0,din:p(r.checkIn),dout:p(r.checkOut),view:null,viewAmt:0,pension:r.pension,img:((X=f==null?void 0:f.imgs)==null?void 0:X[0])||"",loc:(f==null?void 0:f.image_localisation)||""}}):[{show:!!a.hotelMdName,cityKey:"md",city:s("reservation:common.medina"),ic:"compass",name:a.hotelMdName,stars:a.starsMd,dist:a.distMd,nights:a.nightsMedina,din:M,dout:q,view:a.viewMd,viewAmt:a.viewMdAmount,pension:a.mdPensionDisplay||a.mdPension},{show:!!a.hotelMkName,cityKey:"mk",city:s("reservation:common.makkah"),ic:"kaaba",name:a.hotelMkName,stars:a.starsMk,dist:a.distMk,nights:a.nightsMakkah,din:E,dout:B,view:a.viewMk,viewAmt:a.viewMkAmount,pension:a.mkPensionDisplay||a.mkPension}]).filter(r=>r.show).map((r,f)=>e.jsxs("div",{children:[e.jsxs("p",{className:"mb-2 flex items-center gap-2 font-display text-[1.45rem] font-bold leading-tight text-navy sm:text-[1.65rem]",children:[e.jsx(h,{name:r.ic,className:"h-6 w-6 shrink-0 text-[var(--accent)]"})," ",r.city]}),e.jsx("div",{className:"overflow-hidden rounded-2xl border border-ink/10 bg-white shadow-soft",children:(()=>{var rt,It;const w=r.cityKey==="mk"||r.cityKey==="md",X=w?(r.cityKey==="mk"?ue:$e)||_(r.cityKey,"")||"":r.img||"",ee=w?(r.cityKey==="mk"?U:I)||((rt=r.cityKey==="mk"?Be:ve)==null?void 0:rt.image_localisation)||"":r.loc||"",Le=w?(()=>{try{return localStorage.getItem(r.cityKey==="mk"?"selectedMakkahHotelImage":"selectedMedineHotelImage")||void 0}catch{return}})():r.img||void 0,ze=((It=ia.double)==null?void 0:It[0])||ua.double,ge=r.pension?Kt[r.pension]||r.pension:K!=="â"?K:"â",Oe=Number(r.viewAmt)||0;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col gap-5 p-4 sm:p-5 lg:flex-row",children:[e.jsxs("div",{className:"min-w-0 flex-1 lg:flex-[1.4]",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:gap-5",children:[e.jsx("div",{className:"flex w-full shrink-0 sm:w-64 lg:w-[280px] xl:w-[320px]",children:e.jsx(br,{icon:r.ic,title:`à ${r.city} · ${r.name}`,stars:r.stars,showHeader:!1,roomSrc:(w?_(r.cityKey,""):r.img)||Le||X||ze,hotelSrc:Le||X||ze,planSrc:ee||Le||ze})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"inline-flex rounded-full bg-[var(--accent)]/15 px-2.5 py-0.5 text-[11px] font-bold uppercase tracking-wide text-gold-deep",children:s("reservation:hotels.categoryLabel",{label:a.tierLabel||""})}),e.jsxs("p",{className:"mt-1.5 font-display text-[1.5rem] font-bold leading-tight text-navy sm:text-[1.75rem]",children:[r.name," ",e.jsxs("span",{className:"text-[var(--accent)]",children:[r.stars,"â
"]})]}),w&&e.jsx("p",{className:"mt-2 text-[14.5px] leading-relaxed text-ink-soft",children:r.cityKey==="mk"?e.jsxs(e.Fragment,{children:[s("reservation:recap.hotelStayMkPrefix"),e.jsx("strong",{className:"text-navy",children:r.name}),r.dist?e.jsxs(e.Fragment,{children:[s("reservation:recap.hotelDistAt"),e.jsx("strong",{className:"text-navy",children:r.dist})]}):null,s("reservation:recap.hotelStayMkSuffix")]}):e.jsxs(e.Fragment,{children:[s("reservation:recap.hotelStayMdPrefix"),e.jsx("strong",{className:"text-navy",children:r.name}),r.dist?e.jsxs(e.Fragment,{children:[s("reservation:recap.hotelDistAt"),e.jsx("strong",{className:"text-navy",children:r.dist})]}):null,s("reservation:recap.hotelStayMdSuffix")]})}),e.jsx("div",{className:"mt-3.5 grid grid-cols-2 gap-x-5 gap-y-3 sm:grid-cols-4",children:[["cal",s("reservation:recap.labelStay"),s("reservation:recap.nightsCount",{n:r.nights,s:r.nights>1?"s":""})],["cal",s("reservation:recap.labelDates"),`${r.din||s("reservation:recap.dash")} â ${r.dout||s("reservation:recap.dash")}`],["star",s("reservation:rooms.pension"),ge],["compass",s("reservation:rooms.view"),`${r.view||s("reservation:roomModal.cityView")}${Oe>0?` · +${se(Oe,l)}`:""}`]].map(([ut,Gt,nt])=>e.jsxs("div",{children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-[10.5px] font-bold uppercase tracking-wide text-gold-deep",children:[e.jsx(h,{name:ut,className:"h-3.5 w-3.5"})," ",Gt]}),e.jsx("p",{className:"mt-0.5 text-[14px] font-bold leading-snug text-navy",children:nt})]},Gt))})]})]}),w&&e.jsxs("p",{className:"mt-4 flex items-center gap-2 text-[13.5px] leading-snug text-ink-soft",children:[e.jsx(h,{name:r.ic,className:"h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsxs("span",{children:[e.jsx("strong",{className:"text-navy",children:r.dist?/^d/.test(r.dist)?s("reservation:recap.locPrefix")+r.dist:r.dist:s("reservation:recap.locPrefix")+s("reservation:recap.locFewSteps",{place:r.cityKey==="mk"?"Haram":"Masjid AnâNabawi"})}),s("reservation:recap.locSuffix")]})]})]}),R.length>0&&e.jsxs("div",{className:"shrink-0 border-t border-ink/8 pt-4 lg:w-[300px] lg:border-l lg:border-t-0 lg:pl-5 lg:pt-0 xl:w-[340px]",children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:s("reservation:recap.yourRooms")}),e.jsx("div",{className:"grid gap-3",children:R.map((ut,Gt)=>{const nt=w?_(r.cityKey,ut.type):r.img||void 0;return e.jsxs("div",{className:"flex items-center gap-3 rounded-xl bg-white p-2 ring-1 ring-ink/8",children:[e.jsx("div",{className:"h-24 w-1/2 shrink-0 overflow-hidden rounded-lg bg-cream-200",children:nt?e.jsx("img",{src:nt,alt:"",loading:"lazy",className:"h-full w-full object-cover"}):e.jsx("div",{className:"grid h-full place-items-center text-ink-mute",children:e.jsx(h,{name:"star",className:"h-6 w-6"})})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-[15.5px] font-bold capitalize text-navy",children:ut.label}),be[ut.type]&&e.jsx("p",{className:"mt-0.5 text-[13px] leading-snug text-ink-soft",children:be[ut.type]})]})]},Gt)})})]})]})})})()})]},f))}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-3 border-t border-ink/8 pt-3",children:[V?e.jsxs("span",{className:Mt,children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",s("reservation:recap.paxTravelers",{n:i.n,s:i.n>1?"s":""})," ",e.jsxs("span",{className:"text-ink-mute",children:["· ",V]})]}):e.jsx("span",{}),Ne>0&&e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block font-display text-[1.25rem] leading-none text-navy",children:se(Math.round(Ne/i.n),l)}),e.jsx("span",{className:"text-[11px] text-ink-mute",children:s("reservation:recap.perPersonStay")})]})]})]}),e.jsx(Lt,{icon:"star",title:s("reservation:recap.secDifference"),repli:!0,groupe:!0,resume:s("reservation:recap.resumeDifference6"),children:e.jsx("div",{className:"grid gap-x-6 gap-y-3 sm:grid-cols-2",children:[["star",s("reservation:recap.diffTitle1"),s("reservation:recap.diffDesc1")],["users",s("reservation:recap.diffTitle2"),s("reservation:recap.diffDesc2")],["shield",s("reservation:recap.diffTitle3"),s("reservation:recap.diffDesc3")],["compass",s("reservation:recap.diffTitle4"),s("reservation:recap.diffDesc4")],["kaaba",s("reservation:recap.diffTitle5"),s("reservation:recap.diffDesc5")],["check",s("reservation:recap.diffTitle6"),s("reservation:recap.diffDesc6")]].map(([r,f,w])=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-navy text-cream-100",children:e.jsx(h,{name:r,className:"h-5 w-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[13.5px] font-bold text-navy",children:f}),e.jsx("p",{className:"mt-0.5 text-[12px] leading-snug text-ink-soft",children:w})]})]},f))})}),e.jsxs(Lt,{icon:"shield",title:s("reservation:recap.secVisa6"),onEdit:()=>n("visa"),repli:!0,groupe:!0,resume:a.visaLabel||s("reservation:recap.visaOmraFallback"),
403children:[a.visa==="tourisme"?e.jsxs("p",{className:"mb-2.5 text-[12.5px] leading-snug text-ink-soft",children:[s("reservation:recap.visaTourRecap1"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.visaTourRecapKind")}),s("reservation:recap.visaTourRecap2"),s("reservation:recap.visaTourRecap3")]}):e.jsxs("p",{className:"mb-2.5 text-[12.5px] leading-snug text-ink-soft",children:[s("reservation:recap.visaRecap1"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.visaRecapOfficial")}),s("reservation:recap.visaRecap2"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.visaRecapInsurance")}),s("reservation:recap.visaRecap3")]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-[13.5px]",children:[e.jsx("span",{className:"font-semibold text-ink",children:a.visaLabel||s("reservation:summary.toChoose")}),e.jsx("span",{className:"font-bold text-ink",children:Pe>0?`+ ${se(Pe,l)}`:s("reservation:visa.included")})]}),(Number(a.visaPerPerson)||0)>0&&e.jsxs("p",{className:"mt-0.5 text-[12px] text-ink-mute",children:[se(Number(a.visaPerPerson)||0,l)," ",s("reservation:roomModal.perPax")," à ",i.n]})]}),oe.length>0&&e.jsxs(Lt,{icon:"car",title:s("reservation:recap.secTransfers"),onEdit:()=>n("options"),repli:!0,groupe:!0,resume:gs,children:[e.jsx("p",{className:"mb-2 text-[14px] font-bold text-navy",children:(a.transferLabel||s("reservation:options.transfersWord")).replace(/^Transferts\s*:\s*/,"")}),e.jsx("div",{className:"mb-3 flex flex-wrap gap-1.5",children:[s("reservation:transfers.benefit2"),s("reservation:recap.transfChip2"),s("reservation:recap.transfChip3")].map(r=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-navy/12 bg-cream-100 px-2.5 py-0.5 text-[11.5px] font-semibold text-navy",children:[e.jsx(h,{name:"check",className:"h-3 w-3 text-[var(--accent)]"})," ",r]},r))}),e.jsx("div",{className:"divide-y divide-ink/8",children:oe.map((r,f)=>{const w=String(r.mode||"bus").toLowerCase(),X=w==="train"?Pi:w==="gmc"||w==="voiture"||w==="h1"?pr:xr,ee=w==="train",Le=ee?s("reservation:transfers.vehTrain"):w==="gmc"&&r.shared?s("reservation:recap.modeShared"):s(w==="gmc"||w==="voiture"?"reservation:recap.modePrivate":w==="h1"?"reservation:recap.modeVan":"reservation:recap.modeBus"),ze=r.price?se(r.price,l):s(ee?"reservation:transfers.onQuote":"reservation:transfers.included"),ge=r.price?"bg-navy text-cream-100":ee?"bg-amber-100 text-amber-700":"bg-emerald-100 text-emerald-700";return e.jsxs("div",{className:"flex items-center gap-2.5 py-2 text-[12.5px]",children:[e.jsx("span",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-lg bg-cream-100 text-navy",children:e.jsx(X,{className:"h-4 w-4"})}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate font-semibold text-ink",children:r.route}),e.jsx("span",{className:"text-[11px] text-ink-mute",children:Le})]}),e.jsx("span",{className:`shrink-0 rounded-full px-2.5 py-0.5 text-[11px] font-bold uppercase tracking-wide ${ge}`,children:ze})]},f)})}),oe.some(r=>String(r.mode).toLowerCase()==="train")&&e.jsxs("p",{className:"mt-1.5 flex items-start gap-1.5 text-[10.5px] font-medium text-amber-600",children:[e.jsx(h,{name:"shield",className:"mt-0.5 h-3.5 w-3.5 shrink-0"})," ",s("reservation:recap.trainNotIncluded")]}),e.jsxs("div",{className:"mt-2 flex justify-between border-t border-ink/8 pt-2 text-[13.5px] font-bold",children:[e.jsx("span",{className:"text-ink",children:s("reservation:transfers.totalTransfers")}),e.jsx("span",{className:"text-navy",children:et>0?se(et,l):s("reservation:transfers.included")})]})]}),e.jsxs(Lt,{icon:"sparkle",title:s("reservation:recap.secOptions"),onEdit:()=>n("options"),repli:!0,groupe:!0,resume:Ds,children:[Xt.length?Xt.map((r,f)=>{const w=/guide/i.test(r.label)?s("reservation:recap.optHintGuide"):/assurance/i.test(r.label)?s("reservation:recap.optHintInsurance"):/accompagnateur/i.test(r.label)?s("reservation:recap.optHintWheelchair"):"";return e.jsxs("div",{className:"py-1.5",children:[e.jsxs("div",{className:"flex justify-between text-[13.5px]",children:[e.jsx("span",{className:"font-semibold text-ink",children:r.label}),e.jsx("span",{className:"font-semibold text-ink",children:se(r.amount,l)})]}),w&&e.jsx("p",{className:"mt-0.5 text-[11.5px] leading-snug text-ink-mute",children:w})]},f)}):e.jsx("p",{className:"text-[13px] text-ink-mute",children:s("reservation:recap.noOption")}),e.jsxs("div",{className:"mt-2 flex justify-between border-t border-ink/8 pt-2 text-[13.5px] font-bold",children:[e.jsx("span",{className:"text-ink",children:s("reservation:recap.totalOptions")}),e.jsx("span",{className:"text-navy",children:Ye>0?se(Ye,l):Xt.length?s("reservation:visa.included"):s("reservation:recap.totalNone6")})]})]})]}),e.jsxs("div",{id:"detail-prix",className:"scroll-mt-4 overflow-hidden rounded-2xl border-2 border-navy/15 bg-white shadow-soft",children:[e.jsx("p",{className:"border-b border-ink/8 bg-cream-100/60 px-5 py-3 text-[12px] font-bold uppercase tracking-wider text-gold-deep",children:s("reservation:recap.priceDetail")}),e.jsxs("div",{className:"max-w-xl divide-y divide-ink/8 px-5",children:[Qe.map((r,f)=>e.jsxs("div",{className:"flex items-start justify-between gap-3 py-2.5 text-[14px]",children:[e.jsxs("span",{className:"text-ink",children:[s("reservation:recap.basePrice"),e.jsx("strong",{className:"font-semibold text-navy",children:r.label}),r.sub?` (${r.sub})`:"",r.room?e.jsxs("span",{className:"text-ink-mute",children:[s("reservation:recap.lodgedInRoom"),String(r.room).toLowerCase()]}):null]}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:se(r.pp,l)})]},f)),a.mkPension&&e.jsxs("div",{className:"flex justify-between py-2.5 text-[13.5px]",children:[e.jsxs("span",{className:"text-ink-soft",children:[s("reservation:recap.pensionMecque"),Kt[a.mkPension]?` · ${Kt[a.mkPension]}`:""]}),e.jsx("span",{className:"text-ink-mute",children:(Number(a.pensionSuppMk)||0)>0?e.jsxs(e.Fragment,{children:["+",se(Math.round(Number(a.pensionSuppMk)||0),l)," ",s("reservation:roomModal.perPax")," · ",e.jsx("span",{className:"text-emerald-600",children:s("reservation:rooms.included")})]}):e.jsx("span",{className:"text-emerald-600",children:s("reservation:rooms.included")})})]}),a.mdPension&&e.jsxs("div",{className:"flex justify-between py-2.5 text-[13.5px]",children:[e.jsxs("span",{className:"text-ink-soft",children:[s("reservation:recap.pensionMedine"),Kt[a.mdPension]?` · ${Kt[a.mdPension]}`:""]}),e.jsx("span",{className:"text-ink-mute",children:(Number(a.pensionSuppMd)||0)>0?e.jsxs(e.Fragment,{children:["+",se(Math.round(Number(a.pensionSuppMd)||0),l)," ",s("reservation:roomModal.perPax")," · ",e.jsx("span",{className:"text-emerald-600",children:s("reservation:rooms.included")})]}):e.jsx("span",{className:"text-emerald-600",children:s("reservation:rooms.included")})})]}),(Number(a.viewMkAmount)||0)+(Number(a.viewMdAmount)||0)>0&&e.jsxs("div",{className:"flex justify-between py-2.5 text-[13.5px]",children:[e.jsxs("span",{className:"text-ink-soft",children:[s("reservation:rooms.view"),[(Number(a.viewMkAmount)||0)>0&&a.viewMk?s("reservation:recap.viewMecque",{v:a.viewMk}):"",(Number(a.viewMdAmount)||0)>0&&a.viewMd?s("reservation:recap.viewMedine",{v:a.viewMd}
403):""].filter(Boolean).length?` · ${[(Number(a.viewMkAmount)||0)>0&&a.viewMk?s("reservation:recap.viewMecque",{v:a.viewMk}):"",(Number(a.viewMdAmount)||0)>0&&a.viewMd?s("reservation:recap.viewMedine",{v:a.viewMd}):""].filter(Boolean).join(" · ")}`:""]}),e.jsxs("span",{className:"text-ink-mute",children:[se(Math.round((Number(a.viewMkAmount)||0)+(Number(a.viewMdAmount)||0)),l)," ",s("reservation:recap.perRoom")," · ",e.jsx("span",{className:"text-emerald-600",children:s("reservation:rooms.included")})]})]}),qe>0&&e.jsxs("div",{className:"flex justify-between py-2.5 text-[14px]",children:[e.jsxs("span",{className:"text-ink",children:[s("reservation:summary.rowOptions"),et>0?s("reservation:recap.inclTransfers"):""]}),e.jsx("span",{className:"font-bold text-ink",children:se(qe,l)})]}),Pe>0&&e.jsxs("div",{className:"flex justify-between py-2.5 text-[14px]",children:[e.jsxs("span",{className:"text-ink",children:[a.visaLabel||s("reservation:summary.rowVisa"),e.jsxs("span",{className:"text-ink-mute",children:[" â ",se(Number(a.visaPerPerson)||0,l)," ",s("reservation:roomModal.perPax")," à ",i.n]})]}),e.jsx("span",{className:"font-bold text-ink",children:se(Pe,l)})]}),lt>0&&e.jsxs("div",{className:"flex justify-between py-2.5 text-[14px]",children:[e.jsx("span",{className:"text-ink",children:s("reservation:recap.babyFlight",{s:i.babies>1?"s":""})}),e.jsx("span",{className:"font-bold text-ink",children:se(lt,l)})]}),Fe>0&&e.jsxs("div",{className:"py-2.5 text-[14px]",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("span",{className:"text-ink",children:[s("reservation:recap.fileFee"),e.jsx("span",{className:"ml-2 inline-block rounded-full bg-emerald-50 px-2 py-0.5 align-middle text-[10.5px] font-bold uppercase tracking-wide text-emerald-700",children:s("reservation:recap.fileFeeBadge")})]}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:se(Fe,l)})]}),e.jsx("p",{className:"mt-1 text-[12px] leading-snug text-ink-mute",children:$t.feeHint(se(Fe,l))})]})]}),e.jsxs("div",{className:"border-t-2 border-ink/10 bg-navy-deep px-5 py-4 text-cream-100",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 text-[13.5px]",children:[e.jsxs("span",{className:"text-cream-100/80",children:[s("reservation:recap.subtotal")," ",e.jsx("span",{className:"text-cream-100/60",children:s("reservation:recap.exclVisa")})]}),e.jsx("span",{className:"font-display text-[1.25rem] font-bold leading-none text-white",children:se(Y-Pe,l)})]}),Pe>0&&e.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-4 text-[13.5px]",children:[e.jsx("span",{className:"text-cream-100/80",children:a.visaLabel||s("reservation:summary.rowVisa")}),e.jsxs("span",{className:"font-semibold text-cream-100",children:["+ ",se(Pe,l)]})]}),Fe>0&&e.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-4 text-[13.5px]",children:[e.jsx("span",{className:"text-cream-100/80",children:s("reservation:recap.fileFee")}),e.jsxs("span",{className:"font-semibold text-cream-100",children:["+ ",se(Fe,l)]})]}),e.jsxs("div",{className:"mt-2.5 flex items-end justify-between gap-4 border-t border-white/15 pt-2.5",children:[e.jsxs("span",{className:"text-[12.5px] font-semibold uppercase tracking-wide text-cream-100/80",children:[s("reservation:recap.totalPax",{n:i.display}),i.babies>0?s("reservation:summary.ofWhichBabies",{count:i.babies}):""]}),e.jsx("span",{className:"font-display text-[2.1rem] leading-none text-gold-light",children:se(xt,l)})]}),Fe>0&&e.jsx("p",{className:"mt-3 text-[12.5px] leading-relaxed text-cream-100/70",children:$t.grandNote(se(Fe,l),se(Y,l))})]})]}),jt.length>0&&e.jsxs("details",{className:"group mt-6 overflow-hidden rounded-2xl border border-ink/10 bg-white shadow-soft",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-2 border-b border-ink/8 bg-cream-100/60 px-5 py-3 [&::-webkit-details-marker]:hidden",children:[e.jsx(h,{name:"check",className:"h-4 w-4 shrink-0 text-[var(--accent)]"}),e.jsx("p",{className:"min-w-0 flex-1 text-[12px] font-bold uppercase tracking-wider text-gold-deep",children:s("reservation:recap.paymentTerms")}),e.jsx(h,{name:"chevron",className:"h-4 w-4 shrink-0 text-ink-mute transition-transform group-open:rotate-180"})]}),Fe>0&&e.jsxs("div",{className:"m-5 mb-4 flex items-start gap-3 rounded-xl border border-gold-light/50 border-l-[3px] border-l-[var(--accent)] bg-cream-100/70 px-4 py-3.5",children:[e.jsx("span",{className:"shrink-0 rounded-full bg-[var(--accent)] px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide text-white",children:s("reservation:recap.discountTag")}),e.jsx("p",{className:"text-[13.5px] leading-relaxed text-ink",children:$t.offerBanner(se(Fe,l),Ct(tt))})]}),Fe>0&&e.jsxs("div",{className:"border-t border-ink/10 px-5 pt-3",children:[e.jsx("p",{className:"text-[13px] font-bold text-navy",children:s("reservation:recap.planFull6",{date:Ct(tt)})}),e.jsxs("div",{className:"mt-1 max-w-xl divide-y divide-ink/8",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 py-1.5 text-[13.5px]",children:[e.jsx("span",{className:"text-ink",children:s("reservation:recap.planFullRow")}),e.jsx("span",{className:"font-bold text-navy",children:se(xt,l)})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 py-1.5 text-[13.5px]",children:[e.jsxs("span",{className:"text-ink",children:[s("reservation:recap.discountLine"),e.jsxs("span",{className:"text-ink-mute",children:[" · ",s("reservation:recap.discountLineSub")]})]}),e.jsxs("span",{className:"font-bold text-emerald-600",children:["â ",se(Fe,l)]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 py-2 text-[14px]",children:[e.jsx("span",{className:"font-bold text-navy",children:s("reservation:recap.amountDue")}),e.jsx("span",{className:"text-[17px] font-bold text-navy",children:se(Y,l)})]})]})]}),e.jsxs("div",{className:"border-t border-ink/10 px-5 pt-3",children:[Fe>0&&e.jsxs("p",{className:"text-[13px] font-bold text-navy",children:[s("reservation:recap.planTransfer")," ",e.jsxs("span",{className:"font-semibold text-emerald-600",children:["· ",s("reservation:recap.planDiscount",{amount:se(Fe,l)})]})]}),e.jsxs("div",{className:"mt-1 max-w-xl divide-y divide-ink/8",children:[jt.length>1&&jt.map((r,f)=>e.jsxs("div",{className:"flex items-center justify-between gap-3 py-1.5 text-[13.5px]",children:[e.jsxs("span",{className:"text-ink",children:[r.label,r.date?e.jsxs("span",{className:"text-ink-mute",children:[" · ",r.date]}):""]}),e.jsx("span",{className:"font-bold text-navy",children:se(r.amount,l)})]},f)),e.jsxs("div",{className:"flex items-center justify-between gap-3 py-2 text-[14px]",children:[e.jsxs("span",{className:"font-bold text-navy",children:[s("reservation:recap.amountDue"),Fe>0?e.jsxs("span",{className:"font-normal text-ink-mute",children:[" · ",s("reservation:recap.discountApplied",{amount:se(Fe,l)})]}):""]}),e.jsx("span",{className:"text-[17px] font-bold text-navy",children:se(Y,l)})]})]})]}),Fe>0&&e.jsxs("div",{className:"border-t border-ink/8",role:"table","aria-label":s("reservation:recap.methodsTitle"),children:[e.jsxs("div",{className:"flex justify-between gap-4 px-5 pb-2 pt-3.5 text-[11px] font-bold uppercase tracking-wide text-ink-mute",role:"row",children:[e.jsx("span",{role:"columnheader",children:s("reservation:recap.methodsTitle")}),e.jsx("span",{role:"columnheader",children:s("reservation:recap.methodsCol")})]}),$t.methods.map(r=>e.jsxs("div",{className:"flex items-start justify-between gap-4 border-t border-ink/8 px-5 py-2.5 text-[13.5px]",role:"row",children:[e.jsxs("span",{className:"flex-1 font-semibold text-navy",role:"cell",children:[r.name,e.jsx("em",{className:"mt-0.5 block text-[12px] font-normal not-italic leading-snug text-ink-mute",children:r.note})]}),e.jsx("span",{role:"cell",className:`shrink-0 whitespace-nowrap rounded-full px-2.5 py-1 text-[11.5px] font-bold ${r.discount?"bg-emerald-50 text-emerald-700":"border border-ink/12 bg-cream-100 text-ink"}`,children:r.discount?s("reservation:recap.methodDiscount",{amount:se(Fe,l)}):s("reservation:recap.planStandard")})]},r.name))]}),e.jsxs("div",{className:"border-t border-ink/8 px-5 pb-4 pt-3 text-[12px] leading-relaxed text-ink-mute",children:[e.jsx("p",{children:$t.scheduleNote}),Fe>0&&e.jsx("p",{className:"mt-2.5",children:$t.discountDisclosure(se(xt,l),se(Fe,l),Ct(tt))})]})]}),He&&e.jsxs("details",{className:"group mt-6 overflow-hidden rounded-2xl border border-ink/10 bg-white shadow-soft",children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-2 border-b border-ink/8 bg-cream-100/60 px-5 py-3 [&::-webkit-details-marker]:hidden",children:[e.jsx("p",{className:"min-w-0 flex-1 text-[12px] font-bold uppercase tracking-wider text-gold-deep",children:s("reservation:recap.taxTitle")}),e.jsx(h,{name:"chevron",className:"h-4 w-4 shrink-0 text-ink-mute transition-transform group-open:rotate-180"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2",children:[e.jsxs("div",{className:"border-b border-ink/8 px-5 py-3.5 sm:border-r",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-ink-mute",children:s("reservation:recap.taxTotalTtc")}),e.jsx("p",{className:"mt-0.5 text-[17px] font-bold text-navy",children:se(xt,l)})]}),e.jsxs("div",{className:"border-b border-ink/8 px-5 py-3.5",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-ink-mute",children:s("reservation:recap.taxOfWhichVat")}),e.jsx("p",{className:"mt-0.5 text-[17px] font-bold text-emerald-600",children:$t.tax.vatZero})]}),e.jsxs("div",{className:"border-b border-ink/8 px-5 py-3.5 sm:border-r",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-ink-mute",children:s("reservation:recap.taxBase")}),e.jsxs("p",{className:"mt-0.5 text-[17px] font-bold text-navy",children:["0,00 ",ui(l)]})]}),e.jsxs("div",{className:"border-b border-ink/8 px-5 py-3.5",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-ink-mute",children:s("reservation:recap.taxRate")}),e.jsx("p",{className:"mt-0.5 text-[17px] font-bold text-navy",children:$t.tax.vatExempt})]})]}),e.jsxs("div",{className:"space-y-2.5 px-5 py-4 text-[12px] leading-relaxed text-ink-mute",children:[e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.vatRegimeTitle})," ",$t.tax.vatRegime]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.priceTitle})," ",$t.tax.price(i.display,a.comboLabel||"",se(xt,l),se(Y,l))]}),Fe>0&&e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.feeTitle})," ",$t.tax.fee(se(Fe,l),se(xt,l))]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.methodsTitle})," ",$t.tax.methods]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.preContractTitle})," ",$t.tax.preContract]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.withdrawalTitle})," ",$t.tax.withdrawal]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.formalitiesTitle})," ",$t.tax.formalities]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.dataTitle})," ",$t.tax.data]}),e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ink",children:$t.tax.sellerTitle})," ",$t.tax.seller]})]})]}),e.jsxs("div",{className:"mt-8 overflow-hidden rounded-2xl border-2 border-red-brand/35 bg-red-brand/[0.04] p-5",children:[e.jsxs("p",{className:"flex items-center gap-2 font-display text-[1.2rem] font-bold text-red-brand",children:[e.jsx(h,{name:"clock",className:"h-5 w-5"})," ",s("reservation:recap.lastSeatsTitle")]}),e.jsxs("p",{className:"mt-1.5 max-w-3xl text-[14px] leading-relaxed text-ink-soft",children:[s("reservation:recap.urgency1"),e.jsx("strong",{className:"text-navy",children:s("reservation:recap.urgencyBold")}),s("reservation:recap.urgency2")]}),e.jsx("div",{className:"mt-3.5 flex flex-wrap items-center gap-x-4 gap-y-2.5",children:dt.map(r=>e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsxs("a",{href:`tel:${String(r.phone).replace(/[^+\d]/g,"")}`,className:"inline-flex items-center gap-2 rounded-full bg-navy px-5 py-2.5 text-[14.5px] font-bold text-cream-100 transition-colors hover:bg-navy-deep",children:[e.jsx(h,{name:"phone",className:"h-4 w-4"})," ",r.phone]}),r.name&&e.jsx("span",{className:"text-[12.5px] font-semibold text-ink",children:r.name})]},r.id??r.name))}),e.jsx("p",{className:"mt-2.5 text-[12.5px] text-ink-mute",children:s("reservation:recap.hoursLine")})]}),e.jsx("div",{id:"checkout",children:e.jsx(Nr,{b:t,onDone:r=>{c(r);try{window.scrollTo({top:0,behavior:"smooth"})}catch{}}})}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[e.jsxs(ts,{variant:"ghost",onClick:()=>n("options"),className:"px-3 py-2.5",children:[e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})," ",s("reservation:common.back")]}),e.jsxs("button",{onClick:()=>{window.confirm(s("reservation:recap.redoConfirm"))&&(ha(),window.location.assign(o?"/omra-combinee/reserver?step=vols":"/omra/reservation?step=vols"))},className:"inline-flex items-center gap-2 rounded-full border border-navy/20 bg-cream-200 px-5 py-2.5 text-[13.5px] font-bold text-navy transition-colors hover:border-navy hover:bg-cream-300",children:[e.jsx(h,{name:"plus",className:"h-4 w-4 text-[var(--accent)]"})," ",s("reservation:recap.redoQuote")]})]})]})}function ud({items:t}){var s;const{t:n}
403=it(),[o,a]=b.useState(((s=t[0])==null?void 0:s.id)??null);return e.jsx("div",{className:"divide-y divide-ink/8 overflow-hidden rounded-2xl border border-ink/10 bg-white shadow-soft",children:t.map(i=>{const l=o===i.id;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 sm:px-5",children:[e.jsxs("button",{type:"button",onClick:()=>a(l?null:i.id),"aria-expanded":l,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-cream-100",children:e.jsx(h,{name:i.icon,className:"h-5 w-5 text-gold-deep"})}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block font-display text-[1.02rem] font-bold leading-tight text-navy",children:i.title}),i.summary&&e.jsx("span",{className:"block truncate text-[12.5px] text-ink-mute",children:i.summary})]}),e.jsx(h,{name:"chevron",className:`h-4 w-4 shrink-0 text-ink-mute transition-transform ${l?"rotate-90":""}`})]}),i.onEdit&&e.jsx("button",{type:"button",onClick:i.onEdit,className:"shrink-0 rounded-full border border-ink/12 px-3 py-1.5 text-[12px] font-semibold text-navy transition-colors hover:border-navy hover:bg-cream-100",children:n("reservation:summary.edit")})]}),l&&e.jsx("div",{className:"border-t border-ink/8 bg-cream-50/40 px-4 py-4 text-[13.5px] leading-relaxed text-ink-soft sm:px-5",children:i.body})]},i.id)})})}function hd({b:t,go:n,combine:o}){var W,ye,de,ot,Ge,Be,ve,le,Te;const a=Ka(t),{t:s}=it(),i=Ys(a),l=a.currency||"EUR",d=String(l).toUpperCase()==="EUR",[c,m]=b.useState(null),g=b.useRef(null),N=b.useRef(null),u=()=>{var ue;try{(ue=N.current)==null||ue.scrollIntoView({behavior:"smooth",block:"start"})}catch{}},[p,x]=b.useState(!1),j=!c&&!o&&!a.comboLabel;b.useEffect(()=>{j&&n(a.packageId?"rooms":"vols")},[j]);const C=Ga(a,i.n,On,i.babies),[U,I]=b.useState(null);b.useEffect(()=>{if(!d||!(C>0)){I(null);return}let ue=!0;return bi(C,l,a.dateISO||null,a.flightId||null).then($e=>{ue&&I($e)}).catch(()=>{ue&&I(null)}),()=>{ue=!1}},[C,l,a.dateISO,a.flightId,d]);const L=ue=>ue==null?"â":se(Math.round(ue),l),me=((W=U==null?void 0:U.deposit)==null?void 0:W.payableAmount)??null,Z=((ye=U==null?void 0:U.full)==null?void 0:ye.payableAmount)??null,V=a.dateISO?at(a.dateISO):null,k=(Number(a.nightsMedina)||0)+(Number(a.nightsMakkah)||0),R=k+1,_=V?Bt(V):"",be=V?(()=>{const ue=new Date(V);return ue.setDate(ue.getDate()+k),Bt(ue)})():"",Y=()=>{var ue;try{(ue=g.current)==null||ue.scrollIntoView({behavior:"smooth",block:"start"})}catch{}},Q=ue=>{try{const $e=localStorage.getItem(ue);return $e?JSON.parse($e):null}catch{return null}},z=Q("selectedItinerary"),fe=Q("selectedOptions"),K=((ot=(de=fe==null?void 0:fe.transferPlan)==null?void 0:de.config)==null?void 0:ot.legs)||[],E=a.pension?Kt[a.pension]||a.pension:"",B=(Number(a.visaPerPerson)||0)*i.n,M=Number(a.comboTotal)||0,q=Number(a.optionsTotal)||0,ce=(Number(a.infantPrice)||0)*(i.babies||0),te=`${Bs(((Ge=z==null?void 0:z.flightDetails)==null?void 0:Ge.fromCity)||a.city)||"â"} â ${Bs(((Be=z==null?void 0:z.flightDetails)==null?void 0:Be.toCity)||a.flightDest)||"â"} · A/R`,$=[(Number(a.guideTotal)||0)>0&&{label:s("reservation:options.guideTitle"),amount:Number(a.guideTotal)||0},(Number(a.assuranceTotal)||0)>0&&{label:s("reservation:recap.optAssurance"),amount:Number(a.assuranceTotal)||0},(Number(a.accompTotal)||0)>0&&{label:s("reservation:options.wheelchairTitle"),amount:Number(a.accompTotal)||0},(Number(a.otherOptionsTotal)||0)>0&&{label:s("reservation:recap.otherOptions"),amount:Number(a.otherOptionsTotal)||0}].filter(Boolean);return c?e.jsx(yr,{r:c}):j?e.jsx(js,{label:s("reservation:common.loading")}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"overflow-hidden rounded-2xl border border-ink/10 bg-white shadow-soft",children:[e.jsxs("div",{className:"border-b border-ink/8 p-5 sm:p-6",children:[e.jsx("h2",{className:"font-display text-[1.5rem] font-bold leading-tight text-navy sm:text-[1.9rem]",children:"Votre Omra est prête à être confirmée"}),e.jsx("p",{className:"mt-1.5 text-[14px] text-ink-soft",children:"Vérifiez votre voyage, renseignez vos coordonnées et choisissez comment continuer."}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-[13px] font-medium text-ink",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"pin",className:"h-3.5 w-3.5 text-gold-deep"})," ",a.city||"â"]}
403),V&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 text-gold-deep"})," ",_," â ",be]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"clock",className:"h-3.5 w-3.5 text-gold-deep"})," ",s("reservation:vols.nightsSlashDays",{nights:k,days:R})]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"users",className:"h-3.5 w-3.5 text-gold-deep"})," ",s("reservation:recap.paxTravelers",{n:i.n,s:i.n>1?"s":""})]})]}),(a.hotelMkName||a.hotelMdName)&&e.jsxs("p",{className:"mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-[13px] text-ink-soft",children:[a.hotelMkName&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"kaaba",className:"h-3.5 w-3.5 text-gold-deep"})," ",a.hotelMkName]}),a.hotelMdName&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"compass",className:"h-3.5 w-3.5 text-gold-deep"})," ",a.hotelMdName]})]})]}),e.jsxs("div",{className:"grid gap-3 p-5 sm:grid-cols-3 sm:p-6",children:[e.jsxs("div",{className:"rounded-xl border border-ink/10 bg-white p-3.5",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wide text-ink-mute",children:"Total du voyage"}),e.jsx("p",{className:"mt-0.5 font-display text-[1.55rem] font-bold text-navy",children:L(C)}),e.jsxs("p",{className:"text-[11.5px] text-ink-mute",children:[L(i.n?C/i.n:C)," ",s("reservation:summary.perPerson")]})]}),e.jsxs("div",{className:"rounded-xl border-2 border-[var(--accent)]/40 bg-white p-3.5",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wide text-gold-deep",children:"Acompte aujourd'hui"}),e.jsx("p",{className:"mt-0.5 font-display text-[1.55rem] font-bold text-navy",children:d?L(me):"â"}),e.jsx("p",{className:"text-[11.5px] text-ink-mute",children:"Solde ensuite â échéance affichée avant paiement."})]}),e.jsxs("div",{className:"rounded-xl border border-ink/10 bg-white p-3.5",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wide text-gold-deep",children:"Paiement total"}),e.jsx("p",{className:"mt-0.5 font-display text-[1.55rem] font-bold text-navy",children:L(d?Z:C)}),e.jsx("p",{className:"text-[11.5px] font-semibold text-emerald-700",children:d&&Z!=null&&C-Z>0?`Vous économisez ${L(C-Z)} · frais de dossier inclus`:" "})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2 px-5 pb-5 sm:px-6",children:[e.jsxs("button",{type:"button",onClick:Y,className:"flex items-center justify-center gap-2 rounded-full bg-red-brand px-6 py-3 text-[15px] font-bold text-white shadow-soft transition-colors hover:bg-red-deep",children:["Continuer ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]}),e.jsxs("button",{type:"button",onClick:u,className:"inline-flex items-center gap-1.5 text-[13.5px] font-semibold text-navy underline-offset-2 transition-colors hover:text-gold-deep hover:underline",children:["Voir le détail du prix ",e.jsx(h,{name:"chevron",className:"h-4 w-4"})]})]})]}),e.jsx("div",{ref:g,id:"checkout",children:e.jsx(Nr,{b:t,v2:!0,mode:"prereservation",onGoPayment:()=>n("payment"),onDone:ue=>{m(ue);try{window.scrollTo({top:0,behavior:"smooth"})}catch{}}})}),e.jsxs("div",{ref:N,className:"scroll-mt-4 space-y-5",children:[e.jsx(ud,{items:[{id:"vols",icon:"plane",title:"Vos vols",summary:te,onEdit:()=>n("vols"),body:e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-navy",children:"Aller :"})," ",Bs(((ve=z==null?void 0:z.flightDetails)==null?void 0:ve.fromCity)||a.city)," â ",Bs(((le=z==null?void 0:z.flightDetails)==null?void 0:le.toCity)||a.flightDest),(Te=z==null?void 0:z.flightDetails)!=null&&Te.airlineName?` · ${z.flightDetails.airlineName}`:""]}),a.returnISO&&e.jsxs("p",{children:[e.jsx("strong",{className:"text-navy",children:"Retour :"})," ",a.returnDate||Bt(at(a.returnISO))]}),e.jsx("p",{className:"text-[12.5px] text-ink-mute",children:"Détail des horaires et escales confirmé à la réservation."})]})},{id:"hotels",icon:"kaaba",title:"Vos hôtels & chambres",summary:[a.hotelMdName,a.hotelMkName].filter(
403Boolean).join(" · ")||void 0,onEdit:()=>n("hotels"),body:e.jsxs("div",{className:"space-y-2",children:[a.hotelMdName&&e.jsxs("p",{children:[e.jsx(h,{name:"compass",className:"mr-1 inline h-3.5 w-3.5 text-emerald-600"}),e.jsxs("strong",{className:"text-navy",children:[s("reservation:hotels.inMedina")," :"]})," ",a.hotelMdName,a.starsMd?` · ${a.starsMd}â
`:"",a.nightsMedina?` · ${s("reservation:common.nights6",{count:a.nightsMedina})}`:""]}),a.hotelMkName&&e.jsxs("p",{children:[e.jsx(h,{name:"kaaba",className:"mr-1 inline h-3.5 w-3.5 text-[var(--accent)]"}),e.jsxs("strong",{className:"text-navy",children:[s("reservation:hotels.inMakkah")," :"]})," ",a.hotelMkName,a.starsMk?` · ${a.starsMk}â
`:"",a.nightsMakkah?` · ${s("reservation:common.nights6",{count:a.nightsMakkah})}`:""]}),a.comboLabel&&e.jsxs("p",{children:[e.jsx("strong",{className:"text-navy",children:"Chambre :"})," ",a.comboLabel,E?` · ${E}`:"",a.viewMk&&a.viewMk!=="Vue ville"?` · ${a.viewMk}`:"",a.comboShared?` â ${s("reservation:rooms.sharedReserveShort5")}`:""]})]})},{id:"visa",icon:"shield",title:"Pack visa Omra",summary:a.visaLabel||s("reservation:summary.rowVisa"),onEdit:()=>n("visa"),body:e.jsxs("p",{children:[a.visaLabel||s("reservation:summary.rowVisa"),B>0?` â ${se(Number(a.visaPerPerson)||0,l)} à ${i.n} = ${se(B,l)}`:""]})},...K.length?[{id:"transferts",icon:"car",title:"Vos transferts",summary:`${K.length} trajet${K.length>1?"s":""}`,onEdit:()=>n("options"),body:e.jsx("ul",{className:"space-y-1",children:K.map((ue,$e)=>e.jsxs("li",{children:["⢠",ue.route,ue.mode?` · ${Hi(ue.mode)}`:"",Number(ue.price)>0?` · ${se(Number(ue.price),l)}`:""]},$e))})}]:[],{id:"programme",icon:"compass",title:"Votre programme",summary:s("reservation:vols.nightsSlashDays",{nights:k,days:R}),onEdit:void 0,body:e.jsx("ol",{className:"space-y-1.5",children:[a.city?`Vol aller â départ de ${a.city}`:"Vol aller",a.nightsMedina?`Séjour à Médine · ${s("reservation:common.nights6",{count:a.nightsMedina})}${a.hotelMdName?` â ${a.hotelMdName}`:""}`:"","Transfert Médine â La Mecque",a.nightsMakkah?`Séjour à La Mecque · ${s("reservation:common.nights6",{count:a.nightsMakkah})}${a.hotelMkName?` â ${a.hotelMkName}`:""}`:"","Vol retour"].filter(Boolean).map((ue,$e)=>e.jsxs("li",{className:"flex gap-2",children:[e.jsxs("span",{className:"font-bold text-gold-deep",children:[$e+1,"."]})," ",e.jsx("span",{children:ue})]},$e))})},{id:"options",icon:"star",title:"Vos options",summary:$.length?$.map(ue=>ue.label).join(" · "):"Aucune option",onEdit:()=>n("options"),body:$.length?e.jsx("ul",{className:"space-y-1",children:$.map((ue,$e)=>e.jsxs("li",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:ue.label}),e.jsx("span",{className:"font-semibold text-navy",children:se(ue.amount,l)})]},$e))}):e.jsx("p",{children:"Aucune option n'a été souscrite."})},{id:"inclus",icon:"check",title:"Ce qui est inclus",onEdit:void 0,body:e.jsx("ul",{className:"grid gap-1 sm:grid-cols-2",children:[s("reservation:recap.chipFlights"),s("reservation:summary.featHotels"),s("reservation:summary.featTransfers"),s("reservation:summary.featGuide"),s("reservation:recap.chipVisits"),s("reservation:recap.chipVisa")].map(ue=>e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5 shrink-0 text-emerald-600"})," ",ue]},ue))})},{id:"prix",icon:"cal",title:"Détail du prix",summary:se(C,l),onEdit:void 0,body:e.jsxs("ul",{className:"space-y-1.5",children:[M>0&&e.jsxs("li",{className:"flex justify-between gap-4",children:[e.jsxs("span",{children:["Séjour ",a.comboLabel?`(${a.comboLabel})`:""]}),e.jsx("span",{className:"font-semibold text-navy",children:se(M,l)})]}),q>0&&e.jsxs("li",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:"Options & transferts"}),e.jsx("span",{className:"font-semibold text-navy",children:se(q,l)})]}),B>0&&e.jsxs("li",{className:"flex justify-between gap-4",children:[e.jsxs("span",{children:[a.visaLabel||s("reservation:summary.rowVisa")," à ",i.n]}),e.jsx("span",{className:"font-semibold text-navy",children:se(B,l)})]}),ce>0&&e.jsxs("li",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:s("reservation:recap.babies",{n:i.babies,s:i.babies>1?"s":""})}),e.jsx("span",{className:"font-semibold text-navy",children:se(ce,l)})]}),e.jsxs("li",{className:"mt-1 flex justify-between gap-4 border-t border-ink/10 pt-2 text-[15px]",children:[e.jsx("span",{className:"font-bold text-navy",children:"Total du voyage"}),e.jsx("span",{className:"font-display font-bold text-navy",children:se(C,l)})]})]})}]}),e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-5 shadow-soft sm:p-6",children:[e.jsxs("h3",{className:"flex items-center gap-2 font-display text-[1.2rem] font-bold text-navy sm:text-[1.35rem]",children:[e.jsx(h,{name:"kaaba",className:"h-5 w-5 text-gold-deep"})," ",s("reservation:recap.comesToLife"),e.jsx("span",{className:"text-gold-deep",children:s("reservation:recap.comesToLifeAccent")})]}),e.jsxs("div",{className:"mt-3 space-y-3 text-[14px] leading-relaxed text-ink-soft",children:[e.jsxs("p",{children:["Le ",e.jsx("strong",{className:"text-navy",children:a.date||"â"}),a.city?e.jsxs(e.Fragment,{children:[", vous vous envolez depuis ",e.jsx("strong",{className:"text-navy",children:a.city})]}):""," vers les Lieux saints pour ",e.jsx("strong",{className:"text-navy",children:s("reservation:vols.nightsSlashDays",{nights:k,days:R})}
403),". Médine puis La Mecque, des hôtels proches du Haram, et l'équipe GO-Makkah à vos côtés à chaque étape."]}),p&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Avant le départ, une ",e.jsx("strong",{className:"text-navy",children:"formation à l'Omra"})," vous prépare â en agence ou en visioconférence. Sur place, vous êtes ",e.jsx("strong",{className:"text-navy",children:"accompagné"})," : visites guidées de Médine et de La Mecque, transferts organisés et votre Omra accomplie pas à pas."]}),e.jsxs("p",{children:["Votre ",e.jsx("strong",{className:"text-navy",children:"visa"})," et vos ",e.jsx("strong",{className:"text-navy",children:"vols aller-retour"})," sont pris en charge",a.returnDate?e.jsxs(e.Fragment,{children:[", jusqu'au retour le ",e.jsx("strong",{className:"text-navy",children:a.returnDate})]}):"",". Il ne vous reste qu'à vivre pleinement le moment."]})]})]}),e.jsxs("button",{type:"button",onClick:()=>x(ue=>!ue),className:"mt-3 inline-flex items-center gap-1.5 text-[13px] font-semibold text-navy transition-colors hover:text-gold-deep",children:[p?"Voir moins":"Voir plus"," ",e.jsx(h,{name:"chevron",className:`h-4 w-4 transition-transform ${p?"rotate-180":""}`})]})]})]}),e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-4 text-center shadow-soft",children:[e.jsxs("button",{type:"button",onClick:Y,className:"inline-flex items-center gap-2 rounded-full bg-red-brand px-6 py-3 text-[15px] font-bold text-white shadow-soft transition-colors hover:bg-red-deep",children:["Pré-réserver ",e.jsx(h,{name:"arrow",className:"h-4 w-4 -rotate-90"})]}),e.jsx("p",{className:"mt-2 text-[12.5px] text-ink-mute",children:"Sans engagement â ni place ni tarif bloqués. Le paiement reste accessible depuis le bloc ci-dessus."})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[e.jsxs("button",{type:"button",onClick:()=>n("options"),className:"inline-flex items-center gap-2 rounded-full border border-ink/12 bg-white px-4 py-2.5 text-[13.5px] font-semibold text-ink-soft transition-colors hover:border-navy hover:text-navy",children:[e.jsx(h,{name:"chevron",className:"h-4 w-4 rotate-90"})," ",s("reservation:common.back")]}),e.jsx("button",{type:"button",onClick:()=>{window.confirm("Recommencer votre réservation ? Vos choix actuels (vols, hôtels, chambres, options) seront perdus. Vos voyageurs sont conservés.")&&(ha(),window.location.assign(o?"/omra-combinee/reserver?step=vols":"/omra/reservation?step=vols"))},className:"inline-flex items-center gap-2 text-[13px] font-semibold text-ink-mute underline-offset-2 transition-colors hover:text-ink hover:underline",children:"Recommencer"})]})]})}function Hn({id:t,label:n,ph:o,value:a,onChange:s,type:i="text",required:l=!1,largeur:d="",fautif:c=!1}){return e.jsxs("label",{className:`block ${d}`,children:[e.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-ink-soft",children:n}),e.jsx("input",{id:t,placeholder:o,type:i,value:a,required:l,"aria-invalid":c||void 0,onChange:s?m=>s(m.target.value):void 0,className:`w-full rounded-2xl border bg-white px-4 py-3 text-[15px] text-ink outline-none transition-colors placeholder:text-ink-mute/60 ${c?"border-red-brand ring-2 ring-red-brand/25 focus:border-red-brand":"border-ink/12 focus:border-navy"}`})]})}function yr({r:t}){const{t:n}=it(),o=t.kind==="processing",a=t.kind==="paid"||o,s=!a&&t.channel==="whatsapp";return e.jsxs("div",{className:"mx-auto max-w-xl py-10 text-center",children:[e.jsx("span",{className:`mx-auto grid h-20 w-20 place-items-center rounded-full text-cream-100 ${s?"bg-[#25D366]":"bg-navy"}`,children:s?e.jsx(la,{className:"h-10 w-10"}):e.jsx(h,{name:o?"clock":a?"check":"mail",className:"h-10 w-10"})}),e.jsx(In,{as:"h2",className:"mt-6 text-[2rem]",children:o?"Paiement en cours de confirmation":n(a?"reservation:payment.bookingConfirmedTitle":"reservation:payment.quoteSentTitle")}),e.jsx("p",{className:"mt-3 text-[16px] leading-relaxed text-ink-soft",children:o?"Votre paiement a bien été transmis. La confirmation de la banque peut prendre quelques minutes : votre dossier sera confirmé automatiquement et un conseiller GOâMakkah vous contacte sous 24h.":n(a?"reservation:payment.confirmPay":s?"reservation:payment.confirmPreWa":"reservation:payment.confirmPreEmail")}),t.reference&&e.jsx("p",{className:"mt-2 text-[14px] font-semibold text-navy",children:n("reservation:prereservation.reference",{ref:t.reference})}),e.jsx("div",{className:"mt-6 inline-flex flex-col gap-1 rounded-2xl border border-ink/8 bg-white px-8 py-5 shadow-soft",children:a?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[13px] text-ink-mute",children:o?"Montant transmis par carte":"Montant réglé par carte"}),e.jsx("span",{className:"font-display text-[2rem] text-navy",children:se(t.paidAmount??0,t.cur)})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[13px] text-ink-mute",children:n("reservation:payment.estimatedAmount")}),e.jsx("span",{className:"font-display text-[2rem] text-navy",children:se(t.grand,t.cur)}),e.jsx("span",{className:"text-[12px] text-ink-mute",children:n("reservation:payment.finalPriceNote")})]})}),e.jsxs("div",{className:"mt-7 flex flex-wrap items-center justify-center gap-3",children:[t.espaceUrl?e.jsxs(ts,{variant:"solid",onClick:()=>{window.location.href=t.espaceUrl},className:"px-6 py-3.5",children:[n("reservation:payment.accessClientArea")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]}):a?e.jsxs(ts,{variant:"solid",onClick:()=>{window.location.href="/client/login"},className:"px-6 py-3.5",children:[n("reservation:payment.accessClientArea")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]}):null,e.jsx(ts,{variant:"outline",as:Cn,to:"/",className:"px-6 py-3.5",children:n("reservation:prereservation.backHome")})]}),(t.espaceUrl||a)&&e.jsx("p",{className:"mt-3 text-[12.5px] text-ink-mute",children:n("reservation:payment.contractUnlockNote")})]})}function Nr({b:t,onDone:n,v2:o=!1,mode:a="all",onGoPayment:s}){const{t:i}
403=it(),l=Ys(t),[d,c]=b.useState(null),[m,g]=b.useState(!0),[N,u]=b.useState(!0),[p,x]=b.useState(null),j=J=>{const ie=String((J==null?void 0:J.message)||"");return!ie||/failed to fetch|networkerror|load failed/i.test(ie)?i("reservation:payment.errNetwork6"):ie},C=b.useMemo(()=>Do(),[]),[U,I]=b.useState(C?`${C.firstName} ${C.lastName}`.trim():""),[L,me]=b.useState((C==null?void 0:C.email)||""),[Z,V]=b.useState((C==null?void 0:C.phone)||Lo()||""),[k,R]=b.useState(!1),[_,be]=b.useState(!1),[Y,Q]=b.useState(!1),[z,fe]=b.useState(null);b.useEffect(()=>{fe(document.getElementById("gm-coordonnees"))},[]);const K=b.useRef(null),[E,B]=b.useState(0),M=()=>{var J;be(!0),B(ie=>ie+1);try{(J=K.current)==null||J.scrollIntoView({behavior:"smooth",block:"center"})}catch{}},q=t.currency||"EUR",ce=Ga(t,l.n,On,l.babies),te=Math.round(ce/3),[$,W]=b.useState(null),[ye,de]=b.useState("deposit"),[ot,Ge]=b.useState(null),[Be,ve]=b.useState(null),[le,Te]=b.useState(!1),ue=b.useRef(null),$e=b.useRef({}),[oe,Ve]=b.useState(null);b.useEffect(()=>{if(q!=="EUR"||!(ce>0)){Ve(null);return}let J=!0;return bi(ce,q,t.dateISO||null,t.flightId||null).then(ie=>{J&&Ve(ie)}).catch(()=>{J&&Ve(null)}),()=>{J=!1}},[ce,q,t.dateISO,t.flightId]);const[y,A]=b.useState(null),je=J=>{A(J);try{const ie=document.getElementById(`gm-coord-${J}`);if(!ie)return;ie.scrollIntoView({behavior:"smooth",block:"center"}),window.setTimeout(()=>{try{ie.focus({preventScroll:!0})}catch{}},420)}catch{}},Se=J=>{if(!k)return M(),J(i("common:consentRequired")),null;A(null);const ie=U.trim();if(!ie)return je("nom"),J(i("reservation:payment.errName6")),null;if(!L.trim())return je("email"),J(i("reservation:payment.errEmailMissing6")),null;if(!/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(L.trim()))return je("email"),J(i("reservation:payment.errEmailFormat6")),null;if(Z.trim().length<6)return je("tel"),J(i("reservation:payment.errPhonePre")),null;const Ee=ie.split(/\s+/),Re=Ee[0]||"";return{firstName:Re,lastName:Ee.slice(1).join(" ")||Re,email:L.trim(),phone:Z.trim()}},We=async J=>{x(null),Ge(null);const ie=Se(x);if(ie){if(ue.current){const Ee=ue.current;ha(),n({kind:"quote",channel:J,reference:Ee.reference,espaceUrl:Ee.autoLoginUrl,grand:ce,paidAmount:null,cur:q});return}c(J);try{let Ee={};if(o){const Je=(Number(t.nightsMedina)||0)+(Number(t.nightsMakkah)||0),Me=t.tierLabel?`Omra ${Je+1} jours â ${t.tierLabel}`:t.packageName||void 0,ct={clientName:`${ie.firstName} ${ie.lastName}`.trim(),dateLabel:t.dateISO?(()=>{try{return bs(t.dateISO,{day:"numeric",month:"long",year:"numeric"})}catch{return}})():void 0,departureCity:t.city||void 0,packageName:Me,totalNights:Je,medine:t.hotelMdName?{hotel:t.hotelMdName,stars:t.starsMd,nights:t.nightsMedina}:void 0,makkah:t.hotelMkName?{hotel:t.hotelMkName,stars:t.starsMk,nights:t.nightsMakkah}:void 0,roomType:t.comboLabel||void 0,travelers:l.n,adults:l.adults,children:l.children,babies:l.babies,perPerson:l.n?Math.round(ce/l.n):ce,grandTotal:ce,currency:q,phone:ie.phone,email:ie.email,v2:!0};Ee={emailHtml:ic(ct),emailSubject:er(Me,!0)}}const Re=await Br({customer:ie,adults:l.adults,children:l.children,babies:l.babies,grandTotal:ce,deposit:te,payInFull:!1,preReservation:!0,callbackConsent:Y,quoteChannel:J,...Ee});ha(),n({kind:"quote",channel:J,reference:Re.reference,espaceUrl:Re.autoLoginUrl||null,grand:ce,paidAmount:null,cur:q})}catch(Ee){const Re=j(Ee);x(Re),rl.error(i("reservation:payment.bookingFailed",{msg:Re}))}finally{c(null)}}},Ze=async J=>{Ge(null),x(null);const ie=Se(Ge);if(!ie)return;const Ee=$e.current[J];if(Ee){ve(Ee);return}W(J);try{for(let Re=0;;Re++){let Je=ue.current;if(!Je||Je.tokenUsed||!Je.payToken||!Je.bookingId){const Ke=await Br({customer:ie,adults:l.adults,children:l.children,babies:l.babies,grandTotal:ce,deposit:te,payInFull:J==="full",preReservation:!0,callbackConsent:Y});if(!Ke.bookingId||!Ke.payToken)throw console.error("[paiement] devis créé sans identifiant ou sans jeton :",Ke),new Error(i("reservation:payment.errBooking"));Je={bookingId:Ke.bookingId,reference:Ke.reference,autoLoginUrl:Ke.autoLoginUrl||null,payToken:Ke.payToken,tokenUsed:!1},ue.current=Je}let Me;try{Me=await Ko(Je.bookingId,J,Je.payToken),Je.tokenUsed=!0}catch(Ke){if(Je.tokenUsed=!0,Re===0&&/introuvable/i.test(String((Ke==null?void 0:Ke.message)||"")))continue;throw/introuvable/i.test(String((Ke==null?void 0:Ke.message)||""))?new Error("Le paiement en ligne est momentanément indisponible. Recevez votre devis par email ou appelez-nous : un conseiller finalise votre réservation."):Ke}if((Me==null?void 0:Me.provider)==="sharegroop"&&Me.orderId&&Me.publicKey&&Me.widgetUrl){const Ke={orderId:Me.orderId,publicKey:Me.publicKey,scriptUrl:Me.widgetUrl,amount:Number(Me.amount)||0,reference:Je.reference||null,mode:J};$e.current[J]=Ke,ve(Ke),W(null);return}if(!(Me!=null&&Me.formUrl)||!(Me!=null&&Me.formParams))throw new Error("Paiement indisponible");const ct=document.createElement("form");ct.method="POST",ct.action=Me.formUrl,ct.style.display="none",Object.entries(Me.formParams).forEac
403h(([Ke,st])=>{const gt=document.createElement("input");gt.type="hidden",gt.name=Ke,gt.value=st==null?"":String(st),ct.appendChild(gt)}),document.body.appendChild(ct),ct.submit();return}}catch(Re){console.error("[paiement] échec du lancement :",Re),Ge(j(Re)),W(null)}},O={navy:{card:"border-navy/25 bg-navy/[0.04] hover:border-navy",icon:"bg-navy text-white",value:"text-navy",chip:"bg-navy/10 text-navy",cta:"bg-navy text-white"},gold:{card:"border-gold/60 bg-gold/[0.08] hover:border-gold-deep",icon:"bg-gold-deep text-white",value:"text-gold-deep",chip:"bg-gold/20 text-gold-deep",cta:"bg-gold-deep text-white"},red:{card:"border-red-brand/40 bg-red-brand/[0.05] hover:border-red-brand",icon:"bg-red-brand text-white",value:"text-red-brand",chip:"bg-red-brand/10 text-red-brand",cta:"bg-red-brand text-white"}},pe=J=>{const ie=O[J.tone];return e.jsxs("div",{className:`group flex h-full flex-col rounded-2xl border-2 p-4 text-left shadow-soft transition-all hover:-translate-y-0.5 hover:shadow-lift ${ie.card}`,children:[e.jsxs("span",{className:"flex items-center gap-2 text-[12px] font-bold uppercase tracking-wide text-ink",children:[e.jsx("span",{className:`grid h-7 w-7 place-items-center rounded-full ${ie.icon}`,children:e.jsx(h,{name:J.icon,className:"h-4 w-4"})}),J.label]}),e.jsx("span",{className:`mt-3 font-display text-[1.6rem] leading-none ${ie.value}`,children:J.value}),e.jsx("span",{className:"mt-1.5 text-[12px] leading-snug text-ink-soft",children:J.sub}),e.jsx("span",{className:"mb-4 mt-3 flex flex-col items-start gap-1.5",children:J.chips.map(Ee=>/sans engagement|aucun d.bit/i.test(Ee)?e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-emerald-600/45 bg-emerald-50 px-3 py-1 text-[12px] font-bold text-emerald-700",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5 shrink-0"})," ",Ee]},Ee):e.jsx("span",{className:`inline-block rounded-full px-2.5 py-1 text-[11px] font-bold ${ie.chip}`,children:Ee},Ee))}),J.extra,e.jsxs("button",{type:"button",disabled:J.disabled,onClick:J.onClick,className:`mt-auto flex w-full items-center justify-between gap-2 rounded-xl px-3.5 py-2.5 text-left text-[13.5px] font-bold transition hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50 ${ie.cta}`,children:[J.cta," ",e.jsx(h,{name:"arrow",className:"h-4 w-4 shrink-0 transition-transform group-hover:translate-x-0.5"})]})]})},Ue=J=>{const ie=Ka(t),Ee=(Number(ie.nightsMedina)||0)+(Number(ie.nightsMakkah)||0),Re=Number(ie.stay)||Ee+1,Je=gt=>{if(!gt)return"";try{return bs(gt,{day:"2-digit",month:"2-digit",year:"numeric"})}catch{return""}},Me=Je(ie.dateISO),ct=Je(ie.returnISO),Ke=[ie.hotelMdName?`${ie.hotelMdName}${ie.starsMd?` ${ie.starsMd}â
`:""}`:"",ie.hotelMkName?`${ie.hotelMkName}${ie.starsMk?` ${ie.starsMk}â
`:""}`:""].filter(Boolean).join(" · "),st=[{label:"Départ",value:[ie.city,Me&&ct?`${Me} â ${ct}`:Me].filter(Boolean).join(" · ")||"â"},{label:"Voyageurs",value:`${l.n} voyageur${l.n>1?"s":""}${ie.comboLabel?` · ${ie.comboLabel}`:""}`}];return Ke&&st.push({label:"Hôtels",value:Ke}),J.mode==="deposit"?(st.push({label:"Règlement",value:"Acompte â place confirmée immédiatement",strong:!0}),oe&&st.push({label:"Solde restant",value:`${se(oe.deposit.remainingAfterPayment,q)} · à 30 j du départ`})):(st.push({label:"Règlement",value:"Totalité â place confirmée immédiatement",strong:!0}),oe&&oe.full.discountAmount>0&&st.push({label:"Remise commerciale",value:`â${se(oe.full.discountAmount,q)} (au lieu de ${se(oe.full.baseAmount,q)})`})),st.push({label:"Montant débité",value:se(J.amount,q),strong:!0}),{title:`Omra ${ie.tierLabel||""} â ${Ee} nuits / ${Re} jours`.replace(/\s+/g," "),lines:st,footnote:"Votre contrat est établi et vérifié par un conseiller avant signature."}},H=d!==null||$!==null||le;b.useEffect(()=>{if(o)try{const J=JSON.parse(localStorage.getItem("customer_data")||"null")||{},ie=U.trim().split(/\s+/);ie[0]&&(J.firstName=ie[0]),ie.length>1&&(J.lastName=ie.slice(1).join(" ")),L.trim()&&(J.email=L.trim()),Z.trim()&&(J.phone=Z.trim()),localStorage.setItem("customer_data",JSON.stringify(J))}catch{}},[o,U,L,Z]);const Ae=a==="payment"||a==="prereservation"?"":q==="EUR"?"md:grid-cols-2":"",De=e.jsxs(e.Fragment,{children:[!z&&e.jsx("p",{className:"text-[12px] font-bold uppercase tracking-[0.14em] text-gold-deep",children:o?"Vos coordonnées":i("reservation:recap.receiveQuote")}),e.jsxs("div",{className:`rounded-2xl border-2 border-gold-deep/35 bg-cream-100/70 p-4 sm:p-5 ${z?"":"mt-3"}`,children:[e.jsxs("p",{className:"mb-3 flex items-center gap-2 text-[13px] font-bold text-navy",children:[e.jsx(h,{name:"users",className:"h-4 w-4 shrink-0 text-gold-deep"})," ",i("reservation:payment.coordTitle6")]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsx(Hn,{id:"gm-coord-nom",fautif:y==="nom",label:i("reservation:payment.nameLabel"),ph:i("reservation:prereservation.namePh"),value:U,onChange:J=>{I(J),y==="nom"&&A(null)},required:!0,largeur:"max-w-sm"}),e.jsx(Hn,{id:"gm-coord-email",fautif:y==="email",label:i("reservation:payment.emailLabel"),ph:"vou
403[email protected]",type:"email",value:L,onChange:J=>{me(J),y==="email"&&A(null)},required:!0,largeur:"max-w-md"}),e.jsx(Hn,{id:"gm-coord-tel",fautif:y==="tel",label:i("reservation:payment.phoneLabel"),ph:"+33 6 12 34 56 78",type:"tel",value:Z,onChange:J=>{V(J),y==="tel"&&A(null)},required:!0,largeur:"max-w-[15rem]"})]}),y&&p&&e.jsxs("p",{role:"alert",className:"mt-3 flex items-start gap-2 rounded-xl border border-red-brand/40 bg-red-brand/[0.07] px-3.5 py-2.5 text-[13px] font-semibold leading-snug text-red-brand",children:[e.jsx(h,{name:"shield",className:"mt-0.5 h-4 w-4 shrink-0"})," ",e.jsx("span",{children:p})]})]})]});return e.jsxs("div",{className:"mt-8 rounded-[28px] border-2 border-navy/15 bg-white p-6 shadow-soft sm:p-7",children:[z?$i.createPortal(De,z):De,e.jsx("p",{className:"mt-6 text-center text-[12px] font-bold uppercase tracking-[0.14em] text-gold-deep",children:a==="payment"?"Choisissez votre règlement":a==="prereservation"?"Pré-réservez, sans engagement":"Comment souhaitez-vous continuer ?"}),a!=="payment"&&a!=="prereservation"&&e.jsxs("p",{className:"mt-1 text-center text-[13px] text-ink-soft",children:["Trois façons simples, sans pression â ",e.jsx("span",{className:"font-semibold text-navy",children:"réponse rapide, FR & AR, WhatsApp"}),"."]}),o&&a==="payment"?(()=>{const J=[{key:"deposit",label:"Acompte · Recommandé",amount:(oe==null?void 0:oe.deposit.payableAmount)??null,sub:oe?`frais de dossier inclus · solde ${se(oe.deposit.remainingAfterPayment,q)} à 30 j du départ`:"â¦"},{key:"full",label:"Totalité",amount:(oe==null?void 0:oe.full.payableAmount)??null,sub:oe?oe.full.discountAmount>0?`au lieu de ${se(oe.full.baseAmount+oe.full.fileFee,q)} · â${se(oe.full.discountAmount,q)} de remise`:"frais de dossier inclus":"â¦"}],ie=ye==="deposit"?(oe==null?void 0:oe.deposit.payableAmount)??null:(oe==null?void 0:oe.full.payableAmount)??null;return e.jsxs("div",{className:"mt-3 space-y-3",children:[J.map(Ee=>{const Re=ye===Ee.key;return e.jsxs("label",{className:`flex cursor-pointer items-start gap-3 rounded-2xl border-2 p-4 transition-colors ${Re?"border-navy bg-navy/[0.03]":"border-ink/12 bg-white hover:border-navy/40"}`,children:[e.jsx("input",{type:"radio",name:"v2PayChoice",className:"mt-1 accent-navy",checked:Re,disabled:H||!oe,onChange:()=>{de(Ee.key),Ge(null)}}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[e.jsx("span",{className:"text-[15px] font-bold text-navy",children:Ee.label}),e.jsx("span",{className:"font-display text-[1.15rem] font-bold text-navy",children:Ee.amount!=null?se(Ee.amount,q):"â¦"})]}),e.jsx("span",{className:"mt-1 block text-[12.5px] text-ink-soft",children:Ee.sub})]})]},Ee.key)}),e.jsx("button",{type:"button",onClick:()=>Ze(ye==="later"?"deposit":ye),disabled:H||!oe,className:"flex w-full items-center justify-center gap-2 rounded-full bg-navy px-6 py-3.5 text-[15px] font-bold text-cream-100 shadow-soft transition-colors hover:bg-navy-deep disabled:opacity-50",children:$?"Ouverture du paiementâ¦":e.jsxs(e.Fragment,{children:["Payer ",ie!=null?se(ie,q):""," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})})]})})():e.jsx("div",{className:`mt-3 grid gap-3 ${Ae}`,children:(()=>{const J=pe({tone:"navy",icon:"mail",label:o?"Pré-réserver sans paiement":"Préréserver et recevoir mon devis",value:"Gratuit",sub:o?"Un conseiller vous accompagne · sans engagement":"Devis détaillé · un conseiller vous rappelle",chips:o?["Aucun débit · aucun engagement","Places et tarif non bloqués"]:["Sans engagement"],extra:e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{className:"mb-1.5 text-[11.5px] font-semibold text-ink-soft",children:o?"Recevoir mon récapitulatif par :":"Recevoir mon devis par :"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:[["email","Email",m,g],["wa","WhatsApp",N,u]].map(([Re,Je,Me,ct])=>e.jsxs("label",{className:`inline-flex cursor-pointer select-none items-center gap-1.5 rounded-full border px-3 py-1.5 text-[12.5px] font-semibold transition ${Me?Re==="wa"?"border-[#25D366] bg-[#25D366] text-white":"border-navy bg-navy text-white":Re==="wa"?"border-[#25D366]/45 bg-white text-[#128C4A] hover:border-[#25D366]":"border-navy/25 bg-white text-navy hover:border-navy"}`,children:[e.jsx("input",{type:"checkbox",className:"sr-only",checked:Me,onCh
403ange:Ke=>{ct(Ke.target.checked),x(null)}}),Re==="wa"?e.jsx(la,{className:"h-3.5 w-3.5"}):e.jsx(h,{name:"mail",className:"h-3.5 w-3.5"}),Je,Me&&e.jsx(h,{name:"check",className:"h-3.5 w-3.5"})]},Re))})]}),cta:d?i("reservation:prereservation.sending"):o?"Pré-réserver gratuitement":"Préréserver et recevoir mon devis",disabled:H,onClick:()=>{if(!m&&!N){x("Choisissez au moins un canal : Email ou WhatsApp.");return}We(m&&N?"both":N?"whatsapp":"email")}}),ie=q==="EUR"?e.jsxs("div",{className:"flex h-full flex-col rounded-2xl border-2 border-navy/25 bg-white p-4 text-left shadow-soft",children:[e.jsxs("span",{className:"flex items-center gap-2 text-[12px] font-bold uppercase tracking-wide text-ink",children:[e.jsx("span",{className:"grid h-7 w-7 place-items-center rounded-full bg-navy text-white",children:e.jsx(h,{name:"check",className:"h-4 w-4"})}),"Préréserver et confirmer ma place"]}),e.jsx("span",{className:"mt-1.5 text-[12px] leading-snug text-ink-soft",children:i("reservation:payment.confirmSub6")}),e.jsx("div",{className:"mt-3 space-y-2",children:[{key:"deposit",titre:i("reservation:payment.depositNow6"),montant:(oe==null?void 0:oe.deposit.payableAmount)??null,detail:oe?i("reservation:payment.depositNowSub6",{solde:se(oe.deposit.remainingAfterPayment,q)}):"â¦"},{key:"later",titre:i("reservation:payment.depositLater6"),montant:(oe==null?void 0:oe.deposit.payableAmount)??null,detail:i("reservation:payment.depositLaterSub6")}].map(Re=>{const Je=ye===Re.key;return e.jsxs("label",{className:`flex cursor-pointer items-start gap-2.5 rounded-xl border px-3 py-2.5 transition-colors ${Je?"border-navy bg-navy/[0.04]":"border-ink/15 hover:border-navy/40"}`,children:[e.jsx("input",{type:"radio",name:"gmPayChoice",className:"mt-1 shrink-0 accent-navy",checked:Je,disabled:H||!oe,onChange:()=>{de(Re.key),Ge(null)}}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-0.5",children:[e.jsx("span",{className:"text-[13.5px] font-bold text-navy",children:Re.titre}),e.jsx("span",{className:"font-display text-[1.35rem] leading-none text-navy",children:Re.montant!=null?se(Re.montant,q):"â¦"})]}),e.jsx("span",{className:"mt-0.5 block text-[11.5px] leading-snug text-ink-soft",children:Re.detail})]})]},Re.key)})}),e.jsxs("button",{type:"button",disabled:H||!oe,onClick:()=>{if(ye==="later"){We(m&&N?"both":N?"whatsapp":"email");return}Ze(ye)},className:"mt-4 flex w-full items-center justify-between gap-2 rounded-xl bg-navy px-3.5 py-2.5 text-left text-[13.5px] font-bold text-white transition hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",children:[i($?"reservation:payment.openingPayment6":d?"reservation:prereservation.sending":ye==="later"?"reservation:payment.ctaDepositLater6":"reservation:payment.ctaDepositNow6")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4 shrink-0"})]})]}):null;return(a==="prereservation"?[J]:a==="payment"?[ie]:o?[ie,J]:[J,ie]).map((Re,Je)=>Re?e.jsx(us.Fragment,{children:Re},Je):null)})()}),a==="prereservation"&&q==="EUR"&&s&&e.jsxs("button",{type:"button",onClick:s,disabled:H,className:"mt-3 flex w-full items-center justify-center gap-2 rounded-full border-2 border-navy px-6 py-3 text-[14.5px] font-bold text-navy transition-colors hover:bg-navy hover:text-cream-100 disabled:opacity-50",children:["Aller au paiement ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]}),e.jsx("style",{children:"@keyframes gmkConsentBlink{0%,100%{box-shadow:0 0 0 0 rgba(192,57,43,0);background:transparent}25%,75%{box-shadow:0 0 0 3px rgba(192,57,43,.55);background:rgba(192,57,43,.07)}50%{box-shadow:0 0 0 0 rgba(192,57,43,0);background:transparent}}"}),e.jsx("div",{ref:K,className:"mt-5 rounded-xl p-2 -mx-2",style:E?{animation:"gmkConsentBlink .55s ease-in-out 3"}:void 0,children:e.jsx(Ii,{cgv:k,onCgv:J=>{R(J),J&&(be(!1),x(null),Ge(null))},callback:Y,onCallback:Q,cgvError:_,callbackText:o?"Je souhaite être accompagné par un conseiller":void 0})},E),p&&e.jsx("p",{ref:J=>{J&&!y&&J.scrollIntoView({behavior:"smooth",block:"center"})},role:"alert","aria-live":"assertive",className:"mt-3 rounded-xl border-2 border-red-brand/40 bg-red-brand/[0.06] px-4 py-3 text-[13.5px] font-medium leading-snug text-red-brand",children:p}),$&&e.jsx("p",{className:"mt-3 text-center text-[12.5px] font-semibold text-navy",children:"Création de votre dossier puis ouverture du paiement sécuriséâ¦"}),le&&e.jsx("p",{className:"mt-3 text-center text-[12.5px] font-semibold text-navy",children:"Confirmation de votre paiement auprès de la banqueâ¦"}),ot&&e.jsx("p",{ref:J=>{J&&J.scrollIntoView({behavior:"smooth",block:"center"})},role:"alert","aria-live":"assertive",className:"mt-3 rounded-xl border-2 border-red-brand/40 bg-red-brand/[0.06] px-4 py-3 text-[13.5px] font-medium leading-snug text-red-brand",children:ot}),e.jsxs("p",{className:"mt-4 flex flex-wrap items-center justify-center gap-x-2 gap-y-1 text-center text-[12px] text-ink-mute",children:[e.jsx(h,{name:"shield",className:"h-4 w-4 text-navy"})," ",i("reservation:payment.dataEncrypted"),q==="EUR"&&e.jsx("span",{children:"· Paiement sécurisé 3-D Secure â votre contrat est établi et vérifié par un conseiller avant signature."})]}),Be&&e.jsx($l,{captain:Be,summary:Ue(Be),title:"Paiement sécurisé",amount:Be.amount,currency:q,reference:Be.reference,onClose:()=>ve(null),onSuccess:async()=>{var Ee;const J=Be;ve(null),Te(!0);let ie=!1;for(let Re=0;Re<6&&!ie;Re++)Re>0&&await new Promise(Je=>setTimeout(Je,2e3)),ie=!!((Ee=await Eo(J.orderId))!=null&&Ee.settled);Te(!1),ie&&nl({reference:J.reference||void 0,value:Math.round(J.amount)||void 0,currency:q,pax:l.n}),ha(),n({kind:ie?"paid":"processing",channel:"email",reference:J.reference,espaceUrl:null,grand:ce,paidAmount:J.amount,cur:q})}})]})}function gd({go:t}){return b.useEffect(()=>{t("recap")},[]),null}function fd({b:t,go:n,combine:o}){const a=Ka(t),{t:s}
403=it(),i=Ys(a),l=a.currency||"EUR",[d,c]=b.useState(null),m=Ga(a,i.n,On,i.babies),g=!d&&!o&&!a.comboLabel;return b.useEffect(()=>{g&&n(a.packageId?"rooms":"recap")},[g]),d?e.jsx(yr,{r:d}):g?e.jsx(js,{label:s("reservation:common.loading")}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-5 shadow-soft sm:p-6",children:[e.jsxs("button",{type:"button",onClick:()=>n("recap"),className:"mb-3 inline-flex items-center gap-1.5 text-[13px] font-semibold text-navy transition-colors hover:underline",children:[e.jsx(h,{name:"arrow",className:"h-4 w-4 rotate-180"})," Retour au récapitulatif"]}),e.jsx("h2",{className:"font-display text-[1.4rem] font-bold leading-tight text-navy sm:text-[1.7rem]",children:"Paiement"}),e.jsxs("p",{className:"mt-1 text-[13.5px] text-ink-soft",children:[a.city?`${a.city} · `:"",a.tierLabel?`Omra ${a.tierLabel} · `:"",s("reservation:recap.paxTravelers",{n:i.n,s:i.n>1?"s":""})]}),e.jsxs("p",{className:"mt-2 text-[14px] text-ink",children:[e.jsx("span",{className:"font-semibold",children:"Total du voyage :"})," ",e.jsx("span",{className:"font-display font-bold",children:se(m,l)})]})]}),e.jsx(Nr,{b:t,v2:!0,mode:"payment",onDone:N=>{c(N);try{window.scrollTo({top:0,behavior:"smooth"})}catch{}}})]})}function vd(){try{if(localStorage.getItem("combine_pax"))return;const t=om("combine");if(!(t!=null&&t.pax))return;const n=Number(t.pax.children)||0;localStorage.setItem("combine_pax",JSON.stringify({adults:Number(t.pax.adults)||2,children:Array.from({length:n},()=>8),babies:Number(t.pax.babies)||0}))}catch{}}function bd({mode:t="omra"}={}){var st,gt,he,Xe;const n=t==="combine";jo(n?"combine":"omra"),n&&vd();const[o]=b.useState(()=>{try{const F=new URLSearchParams(window.location.search),ke=Aa(F,"flight");return ke?{flight:ke,pkg:Aa(F,"pkg"),cat:Aa(F,"cat"),date:hl(F,"date")}:null}catch{return null}});gl({stamp:!o}),Mi();const{t:a}=it(),s=Va(),i=qa(),d=tl().pathname.replace(/\/+$/,"").endsWith("/print"),[c,m]=hc(n?"combine":"omra");b.useEffect(()=>{cr().catch(()=>{})},[]);const[g,N]=b.useState(()=>{const F=new URLSearchParams(window.location.search).get("step");if(F&&Lr.includes(F))return F;try{const ke=localStorage.getItem(Er());if(ke&&Lr.includes(ke))return ke}catch{}return"vols"});b.useEffect(()=>{const F=vo();F.total!==c.travelers&&m({travelers:F.total})},[]),b.useEffect(()=>{try{window.scrollTo({top:0,behavior:"auto"})}catch{}},[]);const u=Fi(),p=(c.city&&c.city!=="Toutes les villes"?c.city:null)||u,x=c.flightId?String(c.currency||"EUR").toUpperCase():String(Bi(p)).toUpperCase(),j=x==="EUR";b.useEffect(()=>{if(x!=="EUR"&&(Number(c.visaPerPerson)||0)>0){m({visaPerPerson:0});try{qn(c.visa||"omra",void 0,Number(c.travelers)||1)}catch{}}},[x,c.visaPerPerson]);const C=F=>{if(F==="votre_omra"){s(i(n?"/omra-combinee":"/omra/votre-omra"));return}F==="visa"&&!j&&(F=g==="rooms"||g==="hotels"||g==="vols"?"options":"rooms"),N(F);try{localStorage.setItem(Er(),F)}catch{}F!==g&&sl(F,n?"combine":"omra"),window.scrollTo({top:0,behavior:"smooth"})},U=kn(!n),I=lr("combine",n),[L]=b.useState(()=>{try{return Aa(new URLSearchParams(window.location.search),"pkg")}catch{return null}}),me=n&&(L||c.packageId)||void 0,Z=Ud(me),V=Hd(n&&c.packageId||void 0,n&&c.flightId||void 0),k=zd(n&&c.packageId||void 0,n&&c.flightId||void 0),R=((st=Z.data)==null?void 0:st.group)||null,_=b.useMemo(()=>{var qe,Pe,et;if(!n||!I.data)return null;const F=I.data.offers||[];let ke=F;const dt=me;if(dt){const Ye=(Pe=(qe=Z.data)==null?void 0:qe.packageIds)!=null&&Pe.length?new Set(Z.data.packageIds):null;if(Ye)ke=F.filter(lt=>Ye.has(lt.packageId)||lt.packageId===dt);else{const lt=(et=F.find(Fe=>Fe.packageId===dt))==null?void 0:et.packageName,He=lt?F.filter(Fe=>Fe.packageName===lt||Fe.packageId===dt):F.filter(Fe=>Fe.packageId===dt);He.length&&(ke=He)}}const D=ir(ke,a("voyages:reserver.tripKind.combine")),Ne=new Map;for(const Ye of ke)Ne.set(`${Ye.packageId}|${Ye.flightId}|${Ye.dateISO}`,Ye);for(const Ye of Object.keys(D.byDate))for(const lt of D.byDate[Ye]){lt._fam="combine";const He=Ne.get(`${lt.packageId}|${lt.flightId}|${lt.dateISO}`);He&&(lt.groupId=He.groupId,lt.destinationSlug=He.destinationSlug)}return D},[n,I.data,Z.data,me]),be=b.useMemo(()=>Array.from(new Set([...((R==null?void 0:R.categoryPhotos)||[]).map(F=>F==null?void 0:F.photoUrl),...((R==null?void 0:R.programme)||[]).map(F=>F==null?void 0:F.photo),...((R==null?void 0:R.poiItems)||[]).map(F=>
403F==null?void 0:F.photo)].filter(Boolean))),[R]),Y=b.useMemo(()=>{if(be.length)return F=>be[F.getDate()%be.length]},[be]),Q=b.useMemo(()=>me?Object.values((_==null?void 0:_.byDate)||{}).flat():[],[me,_]),z=((gt=Q.find(F=>F.packageId===(c.packageId||me)))==null?void 0:gt.destLabel)||((he=Q[0])==null?void 0:he.destLabel)||"",fe=b.useMemo(()=>{const F=c.city&&c.city!=="Toutes les villes"?c.city:null,ke=qs(new Date),dt=Q.filter(qe=>qe.price!=null&&Number(qe.price)>0&&String(qe.dateISO||"")>=ke&&(!F||qe.originCity===F));if(!dt.length)return null;const D=dt.some(qe=>(qe.currency||"EUR")==="EUR")?"EUR":dt[0].currency||"EUR",Ne=dt.filter(qe=>(qe.currency||"EUR")===D).map(qe=>Number(qe.price));return{price:Math.min(...Ne),currency:D}},[Q,c.city]),K=z?`${a("voyages:list.hero.title.combine")} ${z}`:a("voyages:list.hero.title.combine");b.useEffect(()=>{if(!n||!c.tier)return;const F=k.staysByCat[c.tier];if(!(F!=null&&F.length))return;const ke=F.map(dt=>{const D=ta(dt.city);return{key:D||_s(dt.city),city:dt.city,isHoly:!!D,hotel:dt.hotel,hotelId:dt.hotelId,nights:dt.nights,checkIn:dt.checkIn,checkOut:dt.checkOut,pension:dt.baseMealPlan}});JSON.stringify(ke)!==JSON.stringify(c.combineStays||null)&&m({combineStays:ke})},[n,c.tier,k.staysByCat]);const E=b.useMemo(()=>n?{tripLabel:K,cities:V.cities,tiers:k.tiers,staysByCat:k.staysByCat,isLoading:k.isLoading,group:R,calData:_,calError:I.isError,depImg:Y,heroImg:be[0]||void 0}:null,[n,K,V.cities,k.tiers,k.staysByCat,k.isLoading,R,_,I.isError,Y,be]),B=n?_:U.data,M=b.useRef(!1);b.useEffect(()=>{if(M.current||!o||!B)return;if(c.flightId===o.flight){M.current=!0;return}const ke=(o.date?B.byDate[o.date]||[]:Object.values(B.byDate).flat()).find(D=>D.flightId===o.flight&&(!o.pkg||D.packageId===o.pkg))||Object.values(B.byDate).flat().find(D=>D.flightId===o.flight);if(!ke)return;M.current=!0;const dt=ke.inbound[ke.inbound.length-1];m({packageId:ke.packageId,flightId:ke.flightId,offerId:ke.offerId??void 0,city:ke.originCity,dateISO:ke.dateISO,returnISO:ke.returnISO,date:Bt(at(ke.dateISO)),returnDate:Bt(at(ke.returnISO)),stay:ke.days,nightsMakkah:ke.nightsInMecca,nightsMedina:ke.nightsInMedina,flightBase:ke.price,currency:ke.currency||"EUR",infantPrice:ke.infantPrice||0,airline:ke.airlineName,airlineCode:ke.airlineCode,airlineLogo:ke.airlineLogo||null,flightType:ke.outbound.length>1?`${a("reservation:flightCard.stops",{count:ke.outbound.length-1})}${ke.outbound[0].toCity||ke.outbound[0].toCode?" · "+(ke.outbound[0].toCity||ke.outbound[0].toCode):""}`:a("reservation:flightCard.direct"),flightDest:ke.outbound.length&&ke.outbound[ke.outbound.length-1].toCity||ke.destinationCity,flightRetFrom:ke.inbound.length&&(ke.inbound[0].fromCity||ke.inbound[0].fromCode)||null,flightRetTo:dt?dt.toCity||dt.toCode||ke.originCity:null,flightBaggage:ke.baggage,flightClass:ke.travelClass,flightNature:ke.nature,tripType:"omra",searchStamp:(()=>{try{return localStorage.getItem("omra_search_stamp")}catch{return null}})()}),xn(ke)},[o,B,c.flightId]);const q=wn(c.packageId||void 0,c.flightId||void 0),ce=((Xe=(n?k.tiers||[]:q.data||[]).find(F=>F.id===c.tier))==null?void 0:Xe.label)||c.tierLabel||"",{data:te,isLoading:$}=Ua(c.packageId||void 0,c.flightId||void 0),[W,ye]=b.useState(0),[de,ot]=b.useState([]),Ge=de.length?Math.min(W,de.length-1)>=de.length-1:!0,Be=(q.data||[]).filter(F=>hi(te,F.id)).map(F=>F.id),ve=g==="hotels"&&(q.data||[]).length>0?e.jsx(Ui,{tiers:q.data,currentId:c.tier,soldOutIds:Be,availabilityPending:$,onPick:F=>tr(F,m)}):null,le=b.useRef(!1);b.useEffect(()=>{var ke;if(le.current||!(o!=null&&o.cat))return;const F=(ke=q.data)==null?void 0:ke.find(dt=>dt.id===o.cat);F&&(le.current=!0,c.tier!==F.id&&tr(F,m))},[o,q.data]);const[Te,ue]=b.useState(!1);b.useEffect(()=>{if(!o)return;const F=setTimeout(()=>ue(!0),8e3);return()=>clearTimeout(F)},[o]);const $e=!Te&&!!o&&(c.flightId!==o.flight&&!B||!!o.cat&&c.tier!==o.cat&&!!c.packageId&&q.isLoading),[oe,Ve]=b.useState(!1);b.useEffect(()=>{if(!o)return;const F=setTimeout(()=>Ve(!0),15e3);return()=>clearTimeout(F)},[o]);const y=!!o&&!oe&&(c.flightId!==o.flight||!!o.cat&&c.tier!==o.cat);b.useEffect(()=>{if(o&&!M.current&&c.flightId!==o.flight)return;const F=new URL(window.location.href);F.searchParams.set("step",g),La(F,"pkg",c.packageId||(n?L:null)),La(F,"flight",c.flightId),La(F,"date",c.dateISO),La(F,"cat",c.tier),La(F,"from",c.city&&c.city!=="Toutes les villes"?c.city:null),window.history.replaceState(null,"",F.pathname+F.search+F.hash)},[g,c.packageId,c.flightId,c.dateISO,c.tier,c.city]),b.useEffect(()=>{g==="visa"&&(j||C("options"))},[g,x]);const[A,je]=b.useState(null);b.useEffect(()=>{if(g!=="recap"&&g!=="payment"||y)return;const F=c.flightId?c.tier?c.combo?null:"rooms":"hotels":"vols";F&&(je(g),C(F))},[g,c.flightId,c.tier,c.combo,y]);const Se=b.useRef(null);b.useEffect(()=>{if(!A){Se.current=null;return}if(Se.current===null){Se.current=g;return}Se.current!==g&&je(null)},[g,A]),b.useEffect(()=>{if(!d)return;let F;const ke=setTimeout(()=>{Promise.resolve(document.fonts?document.fonts.ready:null).then(()=>{F=setTimeout(()=>{window.print()},600)})},400);return()=>{clearTimeout(ke),clearTimeout(F)}},[d]);const We=g!=="recap"&&g!=="payment"&&g!=="hotels",Ze=F=>(F==null?void 0:F.key)==="mk"?0:(F==null?void 0:F.key)==="md"?1:2,O=[...(E==null?void 0:E.
403cities)||[]].sort((F,ke)=>Ze(F)-Ze(ke)).map(F=>F==null?void 0:F.label).filter(Boolean),pe=O.length<2?O.join(""):`${O.slice(0,-1).join(", ")} & ${O[O.length-1]}`,H={vols:[a("reservation:heads.volsEyebrow"),a("reservation:heads.volsTitle"),""],hotels:[a("reservation:heads.hotelsEyebrow"),O.length?a("reservation:heads.hotelsTitleCities6",{villes:pe}):a(n?"reservation:heads.hotelsTitleCombine6":"reservation:heads.hotelsTitle"),O.length?a("reservation:heads.hotelsSubCities6"):a(n?"reservation:heads.hotelsSubCities6":"reservation:heads.hotelsSub")],rooms:[a("reservation:heads.roomsEyebrow"),a("reservation:heads.roomsTitle"),""],visa:[a("reservation:heads.visaEyebrow"),a("reservation:heads.visaTitle"),a("reservation:heads.visaSub")],options:[a("reservation:heads.optionsEyebrow6"),a("reservation:heads.optionsTitle6"),a("reservation:heads.optionsSub6")],recap:[a("reservation:heads.recapEyebrow"),a("reservation:heads.recapTitle"),a("reservation:heads.recapSub")],payment:[a("reservation:heads.paymentEyebrow"),a("reservation:heads.paymentTitle"),a("reservation:heads.paymentSub")]}[g],Ae=zi(),De={vols:gr,hotels:Xc,rooms:ad,visa:rd,options:pd,recap:Ae?hd:xd,payment:Ae?fd:gd}[g],ie=["votre_omra","vols","hotels","rooms","visa","options","recap","payment"].filter(F=>(F!=="visa"||j)&&(F!=="payment"||Ae)),Ee=ie.indexOf(g),Re=Ee>=0?ie[Ee+1]:void 0,Je=Ee>0?ie[Ee-1]:void 0,Me=F=>F?a(F==="votre_omra"?n?"reservation:stepper.votre_combine":"reservation:stepper.votre_omra":"reservation:stepper."+F):"",ct=A?e.jsxs("p",{className:"mt-3 flex items-start gap-2 rounded-xl border border-[var(--accent)]/45 bg-[var(--accent)]/[0.07] px-3.5 py-2.5 text-[13px] leading-snug text-ink",children:[e.jsx(h,{name:"shield",className:"mt-0.5 h-4 w-4 shrink-0 text-gold-deep"}),e.jsx("span",{children:a("reservation:banner.resumeNote6",{step:Me(A)})})]}):null,Ke=Ee>=0?{index:Ee+1,total:ie.length,name:g==="vols"?a("reservation:banner.departsTitle"):Me(g),nextName:Re?g==="options"&&!Ge?a(md(de[Math.min(W,de.length-1)+1])):g==="hotels"&&ce?a("reservation:hotels.roomsOfCat",{cat:Ks(ce)}):g==="rooms"&&Re==="visa"?a("reservation:rooms.nextVisaPack5"):Me(Re):null,explain:g==="hotels"?ce?a("reservation:hotels.decideIntroWith2",{cat:Ks(ce)}):a("reservation:hotels.decideIntro2"):g==="rooms"&&!c.comboLabel?a("reservation:rooms.explainPickFirst5"):a(g==="options"?"reservation:banner.explain.options2":g==="visa"?"reservation:banner.explain.visa6":"reservation:banner.explain."+g),onNext:g==="options"&&!Ge?()=>ye(F=>Math.min(de.length-1,F+1)):Re?()=>C(Re):null,onBack:Je?()=>C(Je):null,disabled:g==="vols"&&!c.flightId||g==="rooms"&&!c.comboLabel||g==="visa"&&j&&!c.visa,disabledHint:a(g==="rooms"?"reservation:rooms.pickFirstHint5":g==="visa"?"reservation:visa.pickFirst6":"reservation:banner.continueBlocked")}:null;return e.jsxs("div",{className:"gmk",children:[e.jsx(Di,{title:n?`${(E==null?void 0:E.tripLabel)||a("voyages:combine.seoTitle")}${c.city?a("reservation:seo.titleDepart",{city:c.city}):""}${c.date?` · ${c.date}`:""} | GO-Makkah`:`${(H==null?void 0:H[1])||a("reservation:seo.titleFallback")}${c.city?a("reservation:seo.titleDepart",{city:c.city}):a("reservation:seo.titleNoCity")}${c.date?` · ${c.date}`:""} | GO-Makkah`,description:n?a("voyages:combine.seoDesc"):c.city&&c.date?`${a("reservation:seo.descLead",{city:c.city,date:c.date})}${c.stay?a("reservation:seo.descStay",{stay:c.stay}):""}${c.hotelMkName?` â ${c.hotelMkName}`:""}. ${(H==null?void 0:H[2])||a("reservation:seo.descTail")}`:`${a("reservation:seo.descNoSel")}${c.city?a("reservation:seo.descDepartSuffix",{city:c.city}):""}`,path:n?"/omra-combinee/reserver":"/omra/reservation",robots:"noindex, nofollow"}),e.jsx(Li,{base:"/",solid:!0}),e.jsx("main",{className:"bg-cream-100 pt-[68px]",children:e.jsxs("div",{className:"mx-auto w-full max-w-[1700px] px-5 py-10 sm:px-8 sm:py-14 lg:px-12",children:[H&&e.jsx("div",{className:"mb-6",children:e.jsx(kc,{eyebrow:H[0],title:H[1],sub:H[2],formule:ce?Ks(ce):""})}),e.jsx("div",{className:"mb-6",children:e.jsx(yn,{footer:g==="rooms"?e.jsx("div",{id:"gm-outils-chambres"}):null,banner:Ke&&e.jsx(Ba,{...Ke,flat:!0,extra:e.jsxs(e.Fragment,{children:[ct,ve]})}),children:e.jsx(ur,{current:g,bare:!0,go:C,showVisa:j,showPayment:Ae,firstLabel:n?a("reservation:stepper.votre_combine"):void 0,firstHref:n?"/omra-combinee":void 0})})}),e.jsxs("div",{className:We?"grid items-start gap-6 lg:grid-cols-[300px_minmax(0,1fr)]":"",children:[e.jsx("div",{className:"min-w-0",children:(g==="recap"||g==="payment")&&y?e.jsx(js,{label:a("reservation:common.restoringLink")}):e.jsx(De,{b:c,update:m,go:C,combine:E,visaBillable:j,hydrating:$e,optStep:W,setOptStep:ye,onSections:ot})}),We&&e.jsx(hr,{className:"lg:order-first",b:c,go:C,step:g,combine:!!E,tripLabel:E?E.tripLabel:void 0,heroImg:E?E.heroImg:void 0,firstHref:n?"/omra-combinee":void 0,combineFrom:n?fe:null,stepIndex:Ee>=0?Ee+1:void 0,stepTotal:ie.length})]}),Ke&&Re&&e.jsxs("div",{className:"mt-8",children:[e.jsx(yn,{children:e.jsx(Ba,{...Ke,extra:ve,flat:!0})}),g==="hotels"&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mx-auto mt-4 max-w-4xl text-center text-[14.5px] leading-relaxed text-ink-soft",children:a("reservation:hotels.trustLong")}),e.jsx(td,{scope:O.length>2?a("reservation:hotelEditorial.holyOnly6"):""})]})]}),e.jsx("div",{className:"mt-8 flex justify-center",children:e.jsxs("button",{type:"button",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),className:"inline-flex items-center gap-1.5 rounded-full border border-ink/15 bg-white px-4 py-2 text-[13px] font-semibold text-navy shadow-soft transition-colors hover:border-navy hover:bg-cream-100",children:[e.jsx(h,{name:"arrow",className:"h-4 w-4 -rotate-90"})," ",a("reservation:common.backToTop")]})})]})}),e.jsx(Ei,{})]})}const Um=Object.freeze(Object.defineProperty({__proto__:null,AirlineLogo:ea,CategoryChooser:Ui,FamilyFilter:Cc,HotelBlock:br,HotelGallery:fr,PhotoMosaique:Wi,StepBanner:Ba,StepVols:gr,Steps:ur,StepsFrame:yn,Summary:hr,TuileVisuelle:mn,WhatsappGlyph:la,default:bd,isRecapV2Enabled:zi},Symbol.toStringTag,{value:"Module"})),yd=ka();function Ji(t){return String(t||"").normalize("NFD").replace(/[Ì-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"global"}async function ni(t,n){const o=new URLSearchParams({type:t});n&&o.append("destination",n);const a=await fetch(`${yd}/api/offer-gallery?${o.toString()}`);if(!a.ok)return[];const s=await a.json();return Array.isArray(s)?s.map(i=>
403i==null?void 0:i.url).filter(Boolean):[]}function Nd(t,n){const o=n&&n!=="global"?n:void 0,a=Fs({queryKey:["offer-gallery",t,o||"-"],queryFn:()=>ni(t,o),enabled:!!o,staleTime:5*6e4}),s=Fs({queryKey:["offer-gallery",t,"global"],queryFn:()=>ni(t,"global"),staleTime:5*6e4});return{specific:a.data||[],global:s.data||[]}}function Zi(t,n){const{specific:o,global:a}=Nd(t,n);return o.length?o:a}const Xi=["JANVIER","FÃVRIER","MARS","AVRIL","MAI","JUIN","JUILLET","AOÃT","SEPTEMBRE","OCTOBRE","NOVEMBRE","DÃCEMBRE"],Fa=t=>{const[n,o,a]=String(t).split("-").map(Number);return new Date(n,(o||1)-1,a||1)},jd=(t,n)=>{if(!t||!n)return 0;const o=Math.round((Fa(n).getTime()-Fa(t).getTime())/864e5);return o>0?o:0},kd=t=>t==="sold"?0:t==="low"?3:null;function ri(t){const n={},o=new Set,a=new Set,s=[];for(const{offer:p,destLabel:x}of t){const j=((p==null?void 0:p.flights)||[]).filter(I=>I.departureDate),C=Sn(p),U=((p==null?void 0:p.tripCities)||[]).filter(I=>I.cityName).length>1?Yn.t("voyages:reserver.tripKind.circuit"):Yn.t("voyages:reserver.tripKind.stay");for(const I of j){const L=String(I.departureDate).split("T")[0],me=I.returnDate?String(I.returnDate).split("T")[0]:"",Z=jd(L,me)||C,V=Z+1,k=I.originCity||I.originAirport||"â";o.add(k),a.add(V);const R=Fa(L);s.push(new Date(R.getFullYear(),R.getMonth(),1)),(n[L]=n[L]||[]).push({dateISO:L,returnISO:me,packageId:0,flightId:I.id,offerId:p==null?void 0:p.id,destLabel:x,offerName:(p==null?void 0:p.name)||"",offerKind:U,packageName:(p==null?void 0:p.name)||"",originCity:k,destinationCity:I.destinationCity||I.destinationAirport||"",airlineName:"",airlineCode:null,airlineLogo:null,nightsInMecca:0,nightsInMedina:0,totalNights:Z,days:V,price:typeof I.price=="number"?I.price:null,currency:I.currency||"EUR",infantPrice:0,outbound:[],inbound:[],outboundDuration:0,inboundDuration:0,availableSeats:kd(I.seatsBucket),totalSeats:null,baggage:null,travelClass:null,nature:null})}}const i=new Date,l=new Date(i.getFullYear(),i.getMonth(),1);let d=l,c=new Date(l.getFullYear(),l.getMonth()+12,1);for(const p of s)p<d&&(d=p),p>c&&(c=p);const m=new Date(d.getFullYear(),d.getMonth()+12,1);c<m&&(c=m);const g=[];for(let p=new Date(d);p<=c;p.setMonth(p.getMonth()+1))g.push({y:p.getFullYear(),m:p.getMonth(),label:`${Xi[p.getMonth()]} ${p.getFullYear()}`});const N=Array.from(o).sort((p,x)=>p.localeCompare(x,"fr")),u=Array.from(a).sort((p,x)=>p-x);return{byDate:n,months:g,cities:N,durations:u}}const Ht=(t,n="EUR")=>{if(t==null||!isFinite(t)||t<=0)return"â";try{return t.toLocaleString("fr-FR",{style:"currency",currency:n,maximumFractionDigits:0})}catch{return`${Math.round(t).toLocaleString("fr-FR")} ${n}`}};function Tn(t,n,o){var l;const a=Number(o)||0,s=a?(l=t==null?void 0:t.pricesByFlight)==null?void 0:l[a]:null;if(s&&Object.keys(s).length)return s;const i=String(n||"EUR").toUpperCase();return(t==null?void 0:t.pricesByCurrency)&&t.pricesByCurrency[i]||(t==null?void 0:t.pricesByCategory)||{}}const Zs={id:null,name:"",stars:0,dist:"",views:[],feats:[],imgs:[],nearby_places:[],image_localisation:null,faq_sections:[],equipments:[],description:"",highlights:[],quick_facts:[],chain_logo:"",check_in:"",check_out:""},jr=t=>{const n=(t||"").toLowerCase();return n.includes("vvip")||n.includes("vip+")?"sparkle":n.includes("vip")?"star":n.includes("prestige")?"kaaba":n.includes("confort")||n.includes("comfort")?"shield":"check"},wd=[["SINGLE","SGL"],["DOUBLE","DBL"],["TRIPLE","TPL"],["QUADRUPLE","QDR"]];function Sd({tripLabel:t}){const{t:n}=it(),o=[["pin",n("voyages:reserver.editorial.location.title"),n("voyages:reserver.editorial.location.desc")],["star",n("voyages:reserver.editorial.standing.title"),n("voyages:reserver.editorial.standing.desc")],["sparkle",n("voyages:reserver.editorial.dining.title"),n("voyages:reserver.editorial.dining.desc")],["check",n("voyages:reserver.editorial.cleanliness.title"),n("voyages:reserver.editorial.cleanliness.desc")],["shield",n("voyages:reserver.editorial.security.title"),n("voyages:reserver.editorial.security.desc")]];return e.jsxs("section",{className:"mt-4 overflow-hidden rounded-3xl border border-ink/8 bg-white shadow-soft",children:[e.jsxs("div",{className:"border-b border-ink/8 bg-cream-100 px-6 py-7 sm:px-9",children:[e.jsxs("p",{className:"flex items-center gap-2 text-[11px] font-bold uppercase tracking-[0.18em] text-gold-deep",children:[e.jsx("span",{className:"h-px w-7 bg-[var(--accent)]"})," GO-Makkah"]}),e.jsx("h2",{className:"mt-3 font-display text-[clamp(1.5rem,3vw,2.2rem)] leading-tight text-ink",children:n("voyages:reserver.editorial.heading")}),e.jsx("p",{className:"mt-3 max-w-3xl text-[14.5px] leading-relaxed text-ink-soft",children:n("voyages:reserver.editorial.intro",{trip:t})})]}),e.jsx("div",{className:"px-6 py-7 sm:px-9",children:e.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:o.map(([a,s,i])=>e.jsxs("div",{className:"flex gap-3 rounded-2xl border border-ink/8 bg-cream-100 p-4",children:[e.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-xl bg-white text-navy",children:e.jsx(h,{name:a,className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-display text-[1.05rem] leading-tight text-ink",children:s}),e.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-ink-mute",children:i})]})]},s))})})]})}function Md({offer:t,tripLabel:n,itin:o,pax:a,cur:s,flightId:i,onChoose:l}){const{t:d}=it(),c=Tn(t,s,i),m=b.useRef(null),g=b.useMemo(()=>{const fe=((t==null?void 0:t.tripCities)||[]).slice().sort((E,B)=>(E.order??99)-(B.order??99)).map(E=>({key:E.cityName,label:E.cityName,icon:"pin",nights:Number(E.nights)||0}));return fe.length?fe:Array.from(new Set(((t==null?void 0:t.categoryHotels)||[]).map(E=>
403E.cityName).filter(Boolean))).map(E=>({key:E,label:E,icon:"pin",nights:0}))},[t]),N=b.useMemo(()=>{var z;return(z=t==null?void 0:t.qualityCategories)!=null&&z.length?t.qualityCategories:Array.from(new Set(((t==null?void 0:t.categoryHotels)||[]).map(fe=>fe.category)))},[t]),u=z=>{const fe=((t==null?void 0:t.categoryHotels)||[]).filter(E=>E.category===z&&(E.hotelName||E.hotelId)),K=[];for(const E of fe){if(E.alternativeOf){const B=K[K.length-1];B&&(B.alternatives=B.alternatives||[]).push(E.hotelName||d("voyages:reserver.hotels.equivalentHotel"));continue}K.push({cityName:E.cityName,hotelId:Number(E.hotelId)||null,hotelName:E.hotelName||"",nights:Number(E.nights)||0,alternatives:[]})}return K},p=b.useMemo(()=>{const z={};for(const fe of(t==null?void 0:t.categoryPhotos)||[])fe!=null&&fe.category&&(fe!=null&&fe.photoUrl)&&(z[fe.category]=fe.photoUrl);return z},[t]),x=b.useMemo(()=>Array.from(new Set([...((t==null?void 0:t.categoryPhotos)||[]).map(z=>z==null?void 0:z.photoUrl),...((t==null?void 0:t.programme)||[]).map(z=>z==null?void 0:z.photo),...((t==null?void 0:t.poiItems)||[]).map(z=>z==null?void 0:z.photo)].filter(Boolean))),[t]),j=b.useMemo(()=>Array.from(new Set(((t==null?void 0:t.categoryHotels)||[]).map(z=>Number(z.hotelId)).filter(Boolean))),[t]),{data:C}=Mn(j),{tiers:U,matrix:I}=b.useMemo(()=>{const z={};let fe="EUR";return{tiers:N.map((E,B)=>{const M=B+1,q={},ce={};for(const $ of u(E))(ce[$.cityName]=ce[$.cityName]||[]).push($);for(const[$,W]of Object.entries(ce)){const ye=W.reduce((Be,ve)=>ve.nights>Be.nights?ve:Be,W[0]),de=C==null?void 0:C[ye.hotelId],ot=de!=null&&de.imgs&&de.imgs.length?de.imgs:p[E]?[p[E]]:x.length?[x[B%x.length]]:[],Ge=W.length-1;q[$]={...Zs,id:ye.hotelId||null,name:((de==null?void 0:de.name)||ye.hotelName||"").trim()+(Ge>0?` +${Ge}`:""),stars:(de==null?void 0:de.stars)||0,dist:(de==null?void 0:de.dist)||$||"",feats:(de==null?void 0:de.feats)||[],views:(de==null?void 0:de.views)||[],imgs:ot}}const te=c[E];if(te!=null&&te.currency&&(fe=te.currency),te!=null&&te.rooms){const $={};for(const[W,ye]of wd)te.rooms[W]!=null&&($[ye]=te.rooms[W]);Object.keys($).length&&(z[M]=$)}return{id:M,label:E,icon:jr(E),slogan:"",minPrice:(te==null?void 0:te.min)??null,catImg:p[E]||x[0]||null,mk:Zs,md:Zs,nightsMk:0,nightsMd:0,hotelByCity:q}}),matrix:{currency:fe,cells:z}}},[N,t,C,p,x,s]),L=U.filter(z=>I.cells[z.id]&&Object.keys(I.cells[z.id]).length),[me,Z]=b.useState(null);b.useEffect(()=>{if(!L.length||me!=null&&L.some(fe=>fe.id===me))return;const z=L.find(fe=>/confort/i.test(fe.label))||L[0];Z(z.id)},[L.map(z=>z.id).join(","),me]);const V=U.find(z=>z.id===me)||L[0]||U[0],k=z=>{Z(z.id),requestAnimationFrame(()=>{var fe;return(fe=m.current)==null?void 0:fe.scrollIntoView({behavior:"smooth",block:"start"})})},R=V?u(V.label):[],_=R.length,be=new Set(R.map(z=>String(z.cityName||"").trim()).filter(Boolean)),Y=g.filter(z=>be.has(String(z.label||"").trim())).length,Q=Y>=g.length;return U.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("h3",{className:"flex items-center gap-2 font-display text-[1.6rem] font-bold text-navy",children:[e.jsx(h,{name:"star",className:"h-6 w-6 text-gold-deep"})," ",d("voyages:reserver.hotels.selectedTitle")]}),e.jsx(Ti,{tiers:U,matrix:I,selectedId:me,cities:g.map(({key:z,label:fe,icon:K})=>({key:z,label:fe,icon:K})),onSelect:k,showHotels:!0,estimatePax:a,omra:!1,header:e.jsxs("div",{className:"mb-4 text-center",children:[e.jsxs("h3",{className:"font-display text-[clamp(1.25rem,2.4vw,1.7rem)] font-bold leading-tight text-navy",children:[n,o?e.jsxs("span",{className:"text-ink-soft",children:[" · ",o]}):null]}),e.jsx("p",{className:"mt-2 text-[12.5px] text-ink-soft",children:d("voyages:reserver.hotels.compareSubtitle")})]}),note:e.jsx("p",{className:"mt-3 text-[13.5px] leading-relaxed text-ink-soft",children:d("voyages:reserver.hotels.priceNote")})}),V&&e.jsxs("div",{ref:m,className:"scroll-mt-4 overflow-hidden rounded-3xl border border-ink/8 bg-white p-3 sm:p-4",children:[e.jsxs("h3",{className:"mb-3 flex flex-wrap items-center gap-x-2 gap-y-1 font-display text-[1.6rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:V.icon,className:"h-6 w-6 shrink-0 text-gold-deep"}),d("voyages:reserver.hotels.detailIntroBefore")," ",e.jsx("span",{className:"text-gold-deep",children:String(V.label).toLowerCase()}),d("voyages:reserver.hotels.detailIntroAfter")]}),e.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3 rounded-2xl bg-cream-100 px-4 py-2.5",children:[e.jsxs("p",{className:"flex items-center gap-2 text-[13px] font-semibold text-ink-soft",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-[var(--accent)]/20 px-2.5 py-1 text-[11px] font-bold text-gold-deep",children:[e.jsx(h,{name:V.icon,className:"h-3.5 w-3.5"})," ",d("voyages:reserver.hotels.categoryBadge",{cat:V.label})]}),e.jsxs("span",{className:"whitespace-nowrap",children:[d("voyages:reserver.hotels.hotelsConfirmed",{count:_})," · ",Q?d("voyages:reserver.hotels.stepsCount",{count:g.length}):d("voyages:reserver.hotels.stepsCovered6",{count:Y,total:g.length})]})]}),e.jsxs("button",{type:"button",onClick:()=>l(V.label),className:"inline-flex shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full bg-[#C0392B] px-4 py-2 text-[12.5px] font-bold text-white transition-colors hover:bg-[#a82f22]",children:[d("voyages:reserver.hotels.chooseCategory")," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5"})]})]}),e.jsx("div",{className:"space-y-6",children:g.map((z,fe)=>{const K=R.filter(E=>E.cityName===z.key);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 border-b-2 border-[var(--accent)] pb-2",children:[e.jsx(h,{name:"pin",className:"h-5 w-5 text-[var(--accent)]"}),e.jsxs("span",{className:"font-display text-[1.15rem] text-navy",children:[d("voyages:reserver.hotels.stage",{n:fe+1})," · ",z.label]}),z.nights>0&&e.jsx("span",{className:"rounded-full bg-cream-200 px-2 py-0.5 text-[11px] font-bold text-navy",children:d("voyages:reserver.nightsCount",{count:z.nights})}),K.length===0&&e.jsx("span",{className:"rounded-full bg-[#C0392B] px-2.5 py-1 text-[10.5px] font-bold uppercase tracking-wide text-white shadow-soft",children:d("voyages:reserver.hotels.toConfirm")})]}),K.length===0?e.jsxs("div",{className:"flex items-start gap-3 rounded-2xl border-2 border-dashed border-[#C0392B]/40 bg-[#C0392B]/[0.04] px-4 py-4",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-full bg-[#C0392B]/15 text-[#C0392B]",children:e.jsx(h,{name:"star",className:"h-5 w-5"})}),e.jsxs("p",{className:"text-[13px] leading-relaxed text-ink-soft",children:[e.jsx("strong",{className:"text-navy",children:d("voyages:reserver.hotels.toConfirm")})," ",d("voyages:reserver.hotels.toConfirmDetail",{city:z.label,nights:d("voyages:reserver.nightsCount",{count:z.nights})})]})]}):e.jsx("div",{className:"space-y-5",children:K.map((E,B)=>{var te;const M=C==null?void 0:C[E.hotelId],q=M!=null&&M.imgs&&M.imgs.length?M.imgs:V.catImg?[V.catImg]:[],ce={...Zs,id:E.hotelId||null,name:((M==null?void 0:M.name)||E.hotelName||"").trim(),stars:(M==null?void 0:M.stars)||0,dist:(M==null?void 0:M.dist)||E.cityName||"",feats:(M==null?void 0:M.feats)||[],views:(M==null?void 0:M.views)||[],imgs:q};return ce.name?e.jsxs("div",{children:[K.length>1&&e.jsxs("p",{className:"mb-1.5 flex flex-wrap items-center gap-2 text-[12.5px] font-semibold text-ink-soft",children:[e.jsx("span",{className:"rounded-full bg-cream-200 px-2 py-0.5 text-[10.5px] font-bold text-navy",children:d("voyages:reserver.hotels.hotelIndex",{n:B+1,total:K.length})}),E.nights>0&&e.jsx("span",{children:d("voyages:reserver.nightsCount",{count:E.nights})}),ce.stars?e.jsxs("span",{className:"text-gold-deep",children:[ce.stars,"â
"]}):null]}),e.jsx(fr,{hotel:ce,cityLabel:E.cityName,fallbackImg:V.catImg,nights:E.nights,dateRange:null}),(te=E.alternatives)!=null&&te.length?e.jsxs("p",{className:"mt-2 text-[12.5px] text-ink-soft",children:[d("voyages:reserver.hotels.orEquivalent")," ",e.jsx("span",{className:"font-semibold text-navy",children:E.alternatives.join(", ")})]}):null]},`${E.cityName}-${E.hotelId}-${B}`):null})})]},z.key)})})]}),e.jsx(Sd,{tripLabel:n})]}):e.jsx("p",{className:"rounded-2xl border border-ink/10 bg-white px-4 py-10 text-center text-[15px] text-ink-soft shadow-soft",children:d("voyages:reserver.hotels.onQuote")})}function rr({label:t,sub:n,value:o,min:a,max:s,onChange:i}){const{t:l}=it();return e.jsxs("div",{className:"flex items-center justify-between gap-4 roun
403ded-2xl border border-ink/10 bg-white px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[14px] font-bold text-navy",children:t}),n&&e.jsx("p",{className:"text-[11.5px] text-ink-mute",children:n})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button","aria-label":l("voyages:reserver.pax.decrease"),disabled:o<=a,onClick:()=>i(Math.max(a,o-1)),className:"grid h-9 w-9 place-items-center rounded-full border border-ink/15 text-[1.2rem] font-bold text-navy transition-colors hover:border-[var(--accent)] disabled:opacity-30",children:"â"}),e.jsx("span",{className:"w-7 text-center font-display text-[1.25rem] text-navy",children:o}),e.jsx("button",{type:"button","aria-label":l("voyages:reserver.pax.increase"),disabled:o>=s,onClick:()=>i(Math.min(s,o+1)),className:"grid h-9 w-9 place-items-center rounded-full border border-ink/15 text-[1.2rem] font-bold text-navy transition-colors hover:border-[var(--accent)] disabled:opacity-30",children:"+"})]})]})}const eo={single:"SINGLE",double:"DOUBLE",triple:"TRIPLE",quad:"QUADRUPLE"},Cd="https://images.unsplash.com/photo-1611892440504-42a792e24d32?auto=format&fit=crop&w=800&q=60";function Id({offer:t,tripLabel:n,itin:o,b:a,update:s,go:i,pax:l,onQuote:d}){const{t:c}=it(),m=a==null?void 0:a.tier,g=Tn(t,a==null?void 0:a.currency,a==null?void 0:a.flightId),N=m?g[m]:null,u=(N==null?void 0:N.rooms)||{},p=(N==null?void 0:N.currency)||(a==null?void 0:a.currency)||"EUR",x=M=>{const q=u[eo[M]];return typeof q=="number"?q:null},j=["single","double","triple","quad"].filter(M=>x(M)!=null).map(M=>oa[M]),C=b.useMemo(()=>Array.from(new Set(((t==null?void 0:t.categoryHotels)||[]).filter(M=>M.category===m).map(M=>Number(M.hotelId)).filter(Boolean))),[t,m]),{data:U}=Mn(C),I=b.useMemo(()=>{var ce,te;const M=[];for(const $ of((t==null?void 0:t.categoryHotels)||[]).filter(W=>W.category===m)){const W=U==null?void 0:U[Number($.hotelId)];(ce=W==null?void 0:W.imgs)!=null&&ce.length&&M.push(W.imgs[0])}const q=(te=((t==null?void 0:t.categoryPhotos)||[]).find($=>$.category===m))==null?void 0:te.photoUrl;q&&M.push(q);for(const $ of(t==null?void 0:t.programme)||[])$!=null&&$.photo&&M.push($.photo);for(const $ of(t==null?void 0:t.poiItems)||[])$!=null&&$.photo&&M.push($.photo);return Array.from(new Set(M.filter(Boolean)))},[t,m,U]),L=Si(),me=t!=null&&t.id?`grp-${t.id}`:Ji(((t==null?void 0:t.tripCities)||[]).map(M=>M.countryName||L(M.cityName)).filter(Boolean)[0]),Z=Zi("gallery",me),[V,k]=b.useState(Math.max(1,Number(l)||Number(a==null?void 0:a.adults)||2)),[R,_]=b.useState(Number(a==null?void 0:a.children)||0),[be,Y]=b.useState(!1),[Q,z]=b.useState((a==null?void 0:a.combo)||null),fe=V+R,K=b.useMemo(()=>{if(!j.length||fe<1)return[];const q=un(fe,j,{withShared:!1}).map($=>{const W=ya($).reduce((ye,de)=>ye+de.persons*(x(de.ty)||0),0);return{...$,total:W,doubles:$.rooms.filter(ye=>ye==="double").length}}).filter($=>$.total>0).sort(($,W)=>$.total-W.total);if(!q.length)return[];const ce=q[0].name,te=q.reduce(($,W)=>W.doubles>$.doubles?W:$,q[0]).name;return q.map($=>({...$,badge:$.name===ce?"cheap":$.name===te?"reco":null}))},[fe,m,JSON.stringify(u)]),E=(()=>{if(be)return K;const M=K.filter(q=>!q.rooms.includes("single"));return M.length?M:K})(),B=M=>{z(M.name),s({tier:m,adults:V,children:R,combo:M.name,comboLabel:Ra(M),comboTotal:M.total})};return!m||!N?e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-8 text-center shadow-soft",children:[e.jsx("p",{className:"font-display text-[1.3rem] text-navy",children:c("voyages:reserver.rooms.pickCategoryFirst")}),e.jsx("p",{className:"mx-auto mt-2 max-w-md text-[14.5px] text-ink-soft",children:c("voyages:reserver.rooms.pickCategoryFirstDesc")}),e.jsxs("button",{onClick:()=>i("hotels"),className:"mt-5 inline-flex items-center gap-2 rounded-full bg-[#C0392B] px-7 py-3.5 text-[15.5px] font-bold text-white shadow-lift hover:bg-[#a82f22]",children:[c("voyages:reserver.backToHotels")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]}):e.jsxs("div",{className:"space-y-5",children:[e.jsxs("h3",{className:"flex items-center gap-2 font-display text-[1.6rem] font-bold text-navy",children:[e.jsx(h,{name:"users",className:"h-6 w-6 text-gold-deep"})," ",c("voyages:reserver.rooms.heading")]}),e.jsxs("div",{className:"rounded-3xl border border-ink/8 bg-white p-4 shadow-soft sm:p-5",children:[e.jsxs("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-[var(--accent)]/20 px-3 py-1 text-[12px] font-bold text-gold-deep",children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5"})," ",c("voyages:reserver.hotels.categoryBadge",{cat:m})]}),e.jsxs("span",{className:"text-[13px] text-ink-soft",children:[n,o?` · ${o}`:""]})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(rr,{label:c("voyages:reserver.rooms.adults"),sub:c("voyages:reserver.rooms.adultsAge"),value:V,min:1,max:12,onChange:k}),e.jsx(rr,{label:c("voyages:reserver.rooms.children"),sub:c("voyages:reserver.rooms.childrenAge"),value:R,min:0,max:8,onChange:_})]}),e.jsxs("label",{className:"mt-3 flex cursor-pointer items-center gap-2 text-[13px] font-semibold text-ink-soft",children:[e.jsx("input",{type:"checkbox",checked:be,onChange:M=>Y(M.target.checked),className:"h-4 w-4 accent-[var(--accent)]"}),c("voyages:reserver.rooms.showSingles")]})]}),E.length===0?e.jsx("p",{className:"rounded-2xl border border-ink/10 bg-white px-4 py-10 text-center text-[15px] text-ink-soft shadow-soft",children:c("voyages:reserver.rooms.noSplit")}):e.jsx("div",{className:"space-y-3",children:E.map((M,q)=>{const ce=Q===M.name,te=Math.round(M.total/fe),$=Z.length?Z[q%Z.length]:Cd,W=I.length?I[q%I.length]:$;return e.jsx("div",{className:`overflow-hidden rounded-2xl border-2 bg-white shadow-soft transition-all ${ce?"border-[var(--accent)] ring-1 ring-[var(--accent)]/40":"border-ink/10 hover:border-ink/25"}`,children:e.jsxs("div",{className:"flex flex-col sm:flex-row",children:[e.jsxs("div",{className:"relative h-40 shrink-0 bg-ink sm:h-auto sm:w-56",children:[e.jsx("img",{src:W,alt:n,loading:"lazy",className:"absolute inset-0 h-full w-full object-cover",onError:ye=>{const de=ye.target;de.src!==$&&(de.src=$)}}),M.badge==="cheap"&&e.jsx("span",{className:"absolute left-3 top-3 rounded-full bg-[#C0392B] px-2.5 py-1 text-[10.5px] font-bold uppercase tracking-wide text-white shadow-soft",children:c("voyages:reserver.rooms.cheapest")}
403),M.badge==="reco"&&e.jsxs("span",{className:"absolute left-3 top-3 rounded-full bg-[var(--accent)] px-2.5 py-1 text-[10.5px] font-bold uppercase tracking-wide text-ink shadow-soft",children:["â
",c("voyages:reserver.rooms.recommended")]})]}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col p-5",children:[e.jsx("h4",{className:"font-display text-[1.3rem] leading-tight text-navy",children:Ra(M)}),e.jsx("div",{className:"mt-2.5 flex flex-wrap gap-2",children:ya(M).map((ye,de)=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-xl border border-ink/10 bg-cream-100 px-3 py-1.5 text-[12.5px] font-semibold text-ink-soft",children:[e.jsx(h,{name:"users",className:"h-3.5 w-3.5 text-gold-deep"})," ",c("voyages:reserver.rooms.roomLine",{qty:ye.count,type:Rt[ye.ty][0].toLowerCase(),persons:ye.persons})]},de))}),e.jsxs("div",{className:"mt-auto flex flex-wrap items-end justify-between gap-3 pt-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-[11.5px] font-bold uppercase tracking-wide text-gold-deep",children:c("voyages:reserver.from")}),e.jsx("span",{className:"font-display text-[2rem] leading-none text-navy",children:Ht(te,p)}),e.jsx("span",{className:"text-[12.5px] text-ink-mute",children:c("voyages:reserver.perPers")})]}),e.jsxs("p",{className:"mt-1 text-[12px] text-ink-mute",children:[c("voyages:reserver.rooms.totalTravelers",{count:fe})," ",e.jsx("strong",{className:"text-ink",children:Ht(M.total,p)})]})]}),e.jsxs("button",{onClick:()=>{B(M),d()},className:`inline-flex items-center gap-1.5 rounded-full px-5 py-2.5 text-[13.5px] font-bold transition-colors ${ce?"bg-[var(--accent)] text-ink":"bg-[#C0392B] text-white hover:bg-[#a82f22]"}`,children:[ce&&e.jsx(h,{name:"check",className:"h-4 w-4"}),c("voyages:reserver.rooms.chooseAndGo6")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]})]})]})},M.name)})}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-ink/8 bg-white px-5 py-4 shadow-soft",children:[e.jsx("p",{className:"text-[13px] text-ink-soft",children:Q?e.jsxs(e.Fragment,{children:[c("voyages:reserver.rooms.selectedSplit")," ",e.jsx("strong",{className:"text-navy",children:Ra(E.find(M=>M.name===Q)||{})})]}):c("voyages:reserver.rooms.selectSplitToContinue")}),e.jsxs("button",{type:"button",disabled:!Q,onClick:d,className:"inline-flex items-center gap-2 rounded-full bg-[#C0392B] px-7 py-3.5 text-[15.5px] font-bold text-white shadow-lift transition-colors hover:bg-[#a82f22] disabled:cursor-not-allowed disabled:opacity-40",children:[c("voyages:reserver.rooms.continueToOptions")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]}),e.jsx("p",{className:"text-[12.5px] leading-relaxed text-ink-mute",children:c("voyages:reserver.rooms.footnote")})]})}const $d=/transfer|navette|guide|mecque|m[ée]dine|makkah|mad[iî]na|haram|nabawi|kaaba|pel|omra|hajj/i,Od=/assur|insur/i;function Td({tripLabel:t,itin:n,b:o,update:a,go:s,pax:i,onQuote:l,calData:d,offer:c}){var z,fe;const{t:m}=it(),{data:g,isLoading:N}=ji(),u=dr().data||{insurancePercentage:5},p=(()=>{var E;const K=((E=d==null?void 0:d.byDate)==null?void 0:E[o==null?void 0:o.dateISO])||[];return K.find(B=>B.flightId===(o==null?void 0:o.flightId))||K[0]||null})(),x=(o==null?void 0:o.currency)||"EUR",j=Math.max(1,Number((o==null?void 0:o.adults)||0)+Number((o==null?void 0:o.children)||0)||Number(i)||2),[C,U]=b.useState(()=>o!=null&&o.optionsSel&&typeof o.optionsSel=="object"?{...o.optionsSel}:{}),I=Number(o==null?void 0:o.comboTotal)||0,L=typeof(p==null?void 0:p.price)=="number"?p.price:0,me=(j>0?I/j:0)+L,Z=me>0?Ai(me,Number(u.insurancePercentage)):0,V=K=>Od.test(`${K.code||""} ${K.name||""} ${K.category||""}`),k=K=>V(K)?Z:Math.round(Number(K.price)||0),R=K=>V(K)&&Z<=0,_=b.useMemo(()=>(g||[]).map(K=>({...K,options:(K.options||[]).filter(E=>!Os(E)&&Number(E.price)>0&&!$d.test(`${E.code||""} ${E.name||""} ${E.category||""}`))})).filter(K=>K.options.length),[g]),be=K=>{const E=_.flatMap(M=>M.options).filter(M=>K[M.id]),B=E.reduce((M,q)=>M+k(q)*j,0);U(K),a({optionsSel:K,optionsTotal:B,optionsLabels:E.map(M=>M.name)})},Y=K=>be({...C,[K.id]:!C[K.id]}),Q=_.flatMap(K=>K.options).filter(K=>C[K.id]).reduce((K,E)=>K+k(E)*j,0);return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("h3",{className:"flex items-center gap-2 font-display text-[1.6rem] font-bold text-navy",children:[e.jsx(h,{name:"sparkle",className:"h-6 w-6 text-gold-deep"})," ",m("voyages:reserver.options.heading")]}),e.jsx("div",{className:"rounded-2xl bg-cream-100 px-4 py-2.5",children:e.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-[13px] font-semibold text-ink-soft",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-[var(--accent)]/20 px-2.5 py-1 text-[11px] font-bold text-gold-deep",children:[e.jsx(h,{name:"check",className:"h-3.5 w-3.5"})," ",m("voyages:reserver.options.optional")]}),t,n?` · ${n}`:""]})}),N?e.jsx("div",{className:"grid place-items-center py-14 text-ink-mute",children:e.jsx(h,{name:"compass",className:"h-7 w-7 animate-pulse"})}):_.length===0?e.jsx("p",{className:"rounded-2xl border border-ink/10 bg-white px-4 py-10 text-center text-[15px] text-ink-soft shadow-soft",children:m("voyages:reserver.options.none")}):e.jsx("div",{className:"space-y-5",children:_.map(K=>e.jsxs("div",{children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold uppercase tracking-[0.16em] text-gold-deep",children:K.category}),e.jsx("div",{className:`grid gap-3 ${K.options.length>
4031?"sm:grid-cols-2":""}`,children:K.options.map(E=>{const B=!!C[E.id];return e.jsxs("button",{type:"button",onClick:()=>Y(E),"aria-pressed":B,className:`flex items-start gap-3 rounded-2xl border-2 bg-white p-4 text-left shadow-soft transition-all ${B?"border-[var(--accent)] ring-1 ring-[var(--accent)]/40":"border-ink/10 hover:border-ink/25"}`,children:[e.jsx("span",{className:`mt-0.5 grid h-6 w-6 shrink-0 place-items-center rounded-md border-2 ${B?"border-[var(--accent)] bg-[var(--accent)] text-ink":"border-ink/25 text-transparent"}`,children:e.jsx(h,{name:"check",className:"h-4 w-4"})}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 font-display text-[1.1rem] leading-tight text-navy",children:E.name}),e.jsx("span",{className:"shrink-0 whitespace-nowrap font-display text-[1.05rem] font-bold text-gold-deep",children:R(E)?e.jsx("span",{className:"text-[12.5px] font-semibold",children:m("voyages:reserver.options.insPriceLater6")}):k(E)>0?e.jsxs(e.Fragment,{children:[Ht(k(E),x),e.jsxs("span",{className:"text-[11px] font-medium text-ink-mute",children:[" ",m("voyages:reserver.perPers")]})]}):m("voyages:reserver.options.onQuote")})]}),E.description&&e.jsx("span",{className:"mt-1 block text-[12.5px] leading-snug text-ink-soft",children:E.description}),V(E)&&e.jsxs("span",{className:"mt-2.5 block",children:[e.jsx("span",{className:"block text-[12.5px] leading-snug text-ink-soft",children:m("voyages:reserver.options.insLead6")}),e.jsx("span",{className:"mt-2 grid gap-1 sm:grid-cols-2",children:[m("voyages:reserver.options.insB1_6"),m("voyages:reserver.options.insB2_6"),m("voyages:reserver.options.insB3_6"),m("voyages:reserver.options.insB4_6")].map(M=>e.jsxs("span",{className:"flex items-start gap-1.5 text-[12px] leading-snug text-ink",children:[e.jsx(h,{name:"check",className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-emerald-600"})," ",M]},M))}),e.jsx("span",{onClick:M=>M.stopPropagation(),className:"mt-2.5 block",children:e.jsxs("details",{className:"group rounded-xl border border-ink/12 bg-cream-50/60",children:[e.jsx("summary",{className:"cursor-pointer list-none px-3 py-2 text-[12.5px] font-bold text-navy [&::-webkit-details-marker]:hidden",children:m("voyages:reserver.options.insSeeCover6",{n:vn.length})}),e.jsx("span",{className:"block overflow-x-auto border-t border-ink/10 px-3 py-2.5",children:e.jsx("table",{className:"w-full border-collapse text-[11.5px]",children:e.jsx("tbody",{children:vn.map((M,q)=>e.jsxs("tr",{className:q%2?"bg-white":"",children:[e.jsx("td",{className:"py-1 pr-3 font-semibold text-ink",children:M.garantie}),e.jsx("td",{className:"py-1 text-right tabular-nums text-ink-soft",children:M.plafond})]},q))})})})]})})]})]})]},E.id)})})]},K.category))}),e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white px-5 py-4 shadow-soft",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.16em] text-gold-deep",children:m("voyages:reserver.options.alreadyIn6")}),e.jsx("ul",{className:"mt-2.5 grid gap-1.5 sm:grid-cols-2",children:[["plane",m("voyages:reserver.summary.flights")],["star",m("voyages:reserver.summary.hotels")],...(z=c==null?void 0:c.programme)!=null&&z.length||(fe=c==null?void 0:c.poiItems)!=null&&fe.length?[["compass",m("voyages:reserver.summary.tours")]]:[]].map(([K,E])=>e.jsxs("li",{className:"flex items-start gap-2 text-[13.5px] leading-snug text-ink",children:[e.jsx(h,{name:K,className:"mt-0.5 h-4 w-4 shrink-0 text-[var(--accent)]"})," ",E]},E))}),e.jsx("p",{className:"mt-3 border-t border-ink/10 pt-3 text-[12.5px] leading-snug text-ink-soft",children:m("voyages:reserver.options.alreadyInNote6")})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-2xl border border-ink/8 bg-white px-5 py-4 shadow-soft",children:[e.jsx("p",{className:"text-[13px] text-ink-soft",children:Q>0?e.jsxs(e.Fragment,{children:[m("voyages:reserver.options.selectedPrefix")," ",e.jsx("strong",{className:"text-navy",children:Ht(Q,x)})," ",m("voyages:reserver.options.forTravelers",{count:j})]}):m("voyages:reserver.options.noneSelected")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>s("rooms"),className:"inline-flex items-center gap-1.5 rounded-full border border-ink/15 bg-white px-5 py-3 text-[14px] font-bold text-navy transition-colors hover:border-navy",children:m("voyages:reserver.back")}),e.jsxs("button",{type:"button",onClick:l,className:"inline-flex items-center gap-2 rounded-full bg-[#C0392B] px-7 py-3.5 text-[15.5px] font-bold text-white shadow-lift transition-colors hover:bg-[#a82f22]",children:[m("voyages:reserver.options.continueToRecap")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]})]})]})}const da=t=>{if(!t)return"";const n=Fa(String(t).split("T")[0]);return`${n.getDate()} ${Xi[n.getMonth()].toLowerCase()} ${n.getFullYear()}`},zn=864e5,Un=(t,n)=>{const o=Math.round(t/n),a=Array.from({length:n},()=>o);return a[0]=t-o*(n-1),a};function Pd({offer:t,calData:n,tripLabel:o,itin:a,b:s,go:i,pax:l}){const{t:d}=it(),c=(s==null?void 0:s.currency)||"EUR",m=s==null?void 0:s.tier,g=Math.max(1,Number((s==null?void 0:s.adults)||0)||Number(l)||2),N=Math.max(0,Number((s==null?void 0:s.children)||0)),u=Math.max(1,g+N),p=Sn(t),x=(()=>{var Ne;const D=((Ne=n==null?void 0:n.byDate)==null?void 0:Ne[s==null?void 0:s.dateISO])||[];return D.find(qe=>qe.flightId===(s==null?void 0:s.flightId))||D[0]||null})(),j=((t==null?void 0:t.tripCities)||[]).map(D=>D.cityName),C=((t==null?void 0:t.categoryHotels)||[]).filter(D=>D.category===m&&D.hotelName).sort((D,Ne)=>{const qe=j.indexOf(D.cityName),Pe=j.indexOf(Ne.cityName);return(qe<0?99:qe)-(Pe<0?99:Pe)}),U=(()=>{const Ne=((t==null?void 0:t.tripCities)||[]).slice().sort((Pe,et)=>(Pe.order??99)-(et.order??99)).filter(Pe=>Pe.cityName).map(Pe=>({key:Pe.cityName,label:Pe.cityName,nights:Number(Pe.nights)||0}));return Ne.length?Ne:Array.from(new Set(C.map(Pe=>
403Pe.cityName).filter(Boolean))).map(Pe=>({key:Pe,label:Pe,nights:0}))})(),I=b.useMemo(()=>Array.from(new Set(((t==null?void 0:t.categoryHotels)||[]).filter(D=>D.category===m).map(D=>Number(D.hotelId)).filter(Boolean))),[t,m]),{data:L}=Mn(I),me=b.useMemo(()=>{const D=Object.values(L||{}).flatMap(Ne=>(Ne==null?void 0:Ne.imgs)||[]);return Array.from(new Set([...((t==null?void 0:t.categoryPhotos)||[]).map(Ne=>Ne==null?void 0:Ne.photoUrl),...D,...((t==null?void 0:t.programme)||[]).map(Ne=>Ne==null?void 0:Ne.photo),...((t==null?void 0:t.poiItems)||[]).map(Ne=>Ne==null?void 0:Ne.photo)].filter(Boolean)))},[t,L]),Z="https://images.unsplash.com/photo-1611892440504-42a792e24d32?auto=format&fit=crop&w=800&q=60",V=Number(s==null?void 0:s.comboTotal)||0,k=Number(s==null?void 0:s.optionsTotal)||0,R=Array.isArray(s==null?void 0:s.optionsLabels)?s.optionsLabels:[],_=typeof(x==null?void 0:x.price)=="number"?x.price:null,be=_!=null?_*u:0,Y=V+k+be,Q=u>0?Math.round(Y/u):Y,z=(()=>{var Ye,lt;const D=(m?(Ye=Tn(t,s==null?void 0:s.currency,s==null?void 0:s.flightId)[m])==null?void 0:Ye.rooms:null)||{},Ne=He=>{const Fe=D[eo[He]];return typeof Fe=="number"?Fe:null},qe=["single","double","triple","quad"].filter(He=>Ne(He)!=null).map(He=>oa[He]);if(!qe.length||!(s!=null&&s.combo))return[];const Pe=un(u,qe,{withShared:!1}).find(He=>He.name===s.combo);if(!Pe)return[];const et=[];for(const He of ya(Pe)){const Fe=Math.round((Ne(He.ty)||0)+(_||0));for(let xt=0;xt<He.persons;xt++)et.push({label:d("voyages:reserver.recap.travelerN6",{n:et.length+1}),room:String(((lt=Rt[He.ty])==null?void 0:lt[0])||"").toLowerCase(),pp:Fe})}return et})(),fe=Array.isArray(t==null?void 0:t.programme)?t.programme.filter(D=>(D==null?void 0:D.text)||(D==null?void 0:D.date)):[],K=Array.isArray(t==null?void 0:t.includedItems)?t.includedItems.filter(Boolean):[],E=Array.isArray(t==null?void 0:t.notIncludedItems)?t.notIncludedItems.filter(Boolean):[],B=typeof(t==null?void 0:t.visaInfo)=="string"?t.visaInfo.trim():"",M=da(s==null?void 0:s.dateISO),q=da((s==null?void 0:s.returnISO)||(x==null?void 0:x.returnISO)),[ce,te]=b.useState([]);b.useEffect(()=>{fetch(`${ka()}/api/agences`).then(D=>D.ok?D.json():[]).then(D=>te(Array.isArray(D)?D:(D==null?void 0:D.data)||[])).catch(()=>{})},[]);const $=ce.find(D=>/ivry|paris/.test((D.name||"").toLowerCase()))||ce[0]||null,W={FR:"FR",MA:"MAR",DZ:"DZA",US:"USA",TN:"TUN"},ye={FR:5,MAR:252,DZA:171,USA:315,TUN:309},de=W[(mr()||"FR").toUpperCase()]||"FR",ot=ce.filter(D=>{var Pe,et;const Ne=String(((Pe=D==null?void 0:D.country)==null?void 0:Pe.code_pays)||((et=D==null?void 0:D.pays)==null?void 0:et.code_pays)||"").toUpperCase();return(Ne?Ne===de:Number(D==null?void 0:D.id_country)===ye[de])&&String((D==null?void 0:D.phone)||"").trim()}),Ge=ot.length?ot:$!=null&&$.phone?[$]:[],Be=(()=>{const D=Math.round(Y);if(D<=0)return[];const Ne=Date.now(),qe=s!=null&&s.dateISO?Fa(s.dateISO).getTime():0,Pe=He=>{const Fe=new Date(He);return`${String(Fe.getDate()).padStart(2,"0")}/${String(Fe.getMonth()+1).padStart(2,"0")}/${Fe.getFullYear()}`},et=30;if(!qe)return Un(D,3).map((He,Fe)=>({label:d("voyages:reserver.recap.installmentN",{n:Fe+1}),amount:He}));const Ye=qe-et*zn,lt=Ye-Ne;if(lt>=20*zn){const He=Un(D,3);return[{label:d("voyages:reserver.recap.paymentFirstOnBooking"),date:Pe(Ne),amount:He[0]},{label:d("voyages:reserver.recap.paymentSecond"),date:Pe(Ne+Math.round(lt/2)),amount:He[1]},{label:d("voyages:reserver.recap.balanceBeforeDeparture",{days:et}),date:Pe(Ye),amount:He[2]}]}if(lt>3*zn){const He=Un(D,2);return[{label:d("voyages:reserver.recap.paymentFirstOnBooking"),date:Pe(Ne),amount:He[0]},{label:d("voyages:reserver.recap.balanceBeforeDeparture",{days:et}),date:Pe(Ye),amount:He[1]}]}return[{label:d("voyages:reserver.recap.fullPaymentBeforeDeparture"),amount:D}]})(),[ve,le]=b.useState("recap"),[Te,ue]=b.useState("email"),[$e,oe]=b.useState({name:"",email:"",phone:""}),[Ve,y]=b.useState(!1),[A,je]=b.useState(!1),[Se,We]=b.useState(!1),[Ze,O]=b.useState(!1),[pe,Ue]=b.useState(null),[H,Ae]=b.useState(null),De=Te==="whatsapp",[J,ie]=b.useState(!1);b.useEffect(()=>{if(!Ze){ie(!1);return}const D=window.setTimeout(()=>ie(!0),12e3);return()=>window.clearTimeout(D)},[Ze]);const Ee=D=>{ue(D),Ue(null),le("confirm"),window.scrollTo({top:0,behavior:"smooth"})},Re=async D=>{D.preventDefault(),Ue(null);const Ne=$e.name.trim();if(!Ne||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test($e.email.trim())){Ue(d("voyages:reserver.confirm.error"));return}if(!Ve){je(!0),Ue(d("common:consentRequired"));return}const qe=Ne.split(/\s+/),Pe=qe[0]||Ne,et=qe.slice(1).join(" ")||Pe,Ye=C.map(Fe=>({cityName:String(Fe.cityName||""),hotelId:Number(Fe.hotelId)||null,hotelName:String(Fe.hotelName||""),nights:Number(Fe.nights)||0,mealPlan:String(Fe.pension||"BB")})),lt={code:"DBL",label:(s==null?void 0:s.comboLabel)||o,capacity:u,perPerson:Q,currency:c,priceRowId:0,hotels:Ye},He={packageId:0,flightId:Number(s==null?void 0:s.flightId)||0,packageName:(t==null?void 0:t.name)||o,dateISO:String((s==null?void 0:s.dateISO)||""),returnISO:String((s==null?void 0:s.returnISO)||(x==null?void 0:x.returnISO)||""),originCity:(x==null?void 0:x.originCity)||"",airlineName:(x==null?void 0:x.airlineName)||"",price:null,currency:c,durationNights:p,durationDays:p+1,destinationLabel:o,destinationSlug:dl(o)};O(!0);try{const Fe=await cm({offer:He,pax:{adults:g,children:N,babies:0},category:m?{id:0,name:m}:null,rooms:[{option:lt,count:1}],childPrice:N>0?Q:0,babyPrice:0,total:Math.round(Y),currency:c,customer:{firstName:Pe,lastName:et,email:$e.email.trim(),phone:$e.phone.trim()||void 0},message:[`Canal de devis souhaité : ${De?"WhatsApp":"e-mail"}.`,a?`Itinéraire : ${a}.`:null,R.length?`Options : ${R.join(", ")}
403.`:null].filter(Boolean).join(" "),mode:"tourisme",callbackConsent:Se});Ae({reference:Fe.reference,autoLoginUrl:Fe.autoLoginUrl,grand:Math.round(Y)}),le("success"),window.scrollTo({top:0,behavior:"smooth"})}catch(Fe){const xt=String((Fe==null?void 0:Fe.message)||""),Mt=!xt||/failed to fetch|networkerror|load failed/i.test(xt);Ue(Mt?d("voyages:reserver.confirm.errorNetwork6"):xt)}finally{O(!1)}};if(!m||!(s!=null&&s.combo)){const D=!m;return e.jsxs("div",{className:"rounded-2xl border border-ink/10 bg-white p-8 text-center shadow-soft",children:[e.jsx("p",{className:"font-display text-[1.3rem] text-navy",children:d("voyages:reserver.recap.completeFirst")}),e.jsx("p",{className:"mx-auto mt-2 max-w-lg text-[14.5px] leading-relaxed text-ink-soft",children:D?d("voyages:reserver.recap.missingTierDesc6"):d("voyages:reserver.recap.missingComboDesc6",{cat:m})}),e.jsxs("button",{onClick:()=>i(D?"hotels":"rooms"),className:"mt-5 inline-flex items-center gap-2 rounded-full bg-[#C0392B] px-7 py-3.5 text-[15.5px] font-bold text-white shadow-lift hover:bg-[#a82f22]",children:[d(D?"voyages:reserver.backToHotels":"voyages:reserver.backToRooms6")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]})}if(ve==="success"&&H)return e.jsxs("div",{className:"mx-auto max-w-xl py-10 text-center",children:[e.jsx("span",{className:`mx-auto grid h-20 w-20 place-items-center rounded-full text-cream-100 ${De?"bg-[#25D366]":"bg-navy"}`,children:De?e.jsx(la,{className:"h-10 w-10"}):e.jsx(h,{name:"mail",className:"h-10 w-10"})}),e.jsx(In,{as:"h2",className:"mt-6 text-[2rem]",children:d("voyages:reserver.confirm.quoteSentTitle")}),e.jsx("p",{className:"mt-3 text-[16px] leading-relaxed text-ink-soft",children:d(De?"voyages:reserver.confirm.confirmWhatsapp":"voyages:reserver.confirm.confirmEmail")}),H.reference&&e.jsx("p",{className:"mt-2 text-[14px] font-semibold text-navy",children:d("voyages:reserver.confirm.reference",{ref:H.reference})}),e.jsxs("div",{className:"mt-6 inline-flex flex-col gap-1 rounded-2xl border border-ink/8 bg-white px-8 py-5 shadow-soft",children:[e.jsx("span",{className:"text-[13px] text-ink-mute",children:d("voyages:reserver.confirm.estimatedAmount")}),e.jsx("span",{className:"font-display text-[2rem] text-navy",children:Ht(H.grand,c)}),e.jsx("span",{className:"text-[12px] text-ink-mute",children:d("voyages:reserver.confirm.finalPriceNote")})]}),e.jsxs("div",{className:"mt-7 flex flex-wrap items-center justify-center gap-3",children:[H.autoLoginUrl&&e.jsxs(ts,{variant:"solid",onClick:()=>{window.location.href=H.autoLoginUrl},className:"px-6 py-3.5",children:[d("voyages:reserver.confirm.accessClientArea")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]}),e.jsx(ts,{variant:"outline",as:Cn,to:"/",className:"px-6 py-3.5",children:d("voyages:reserver.confirm.backHome")})]}),H.autoLoginUrl&&e.jsx("p",{className:"mt-3 text-[12.5px] text-ink-mute",children:d("voyages:reserver.confirm.contractUnlockNote")})]});if(ve==="confirm")return e.jsx("div",{children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1.3fr_1fr]",children:[e.jsxs("form",{onSubmit:Re,className:"rounded-[28px] border border-ink/8 bg-white p-6 shadow-soft sm:p-7",children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-ink-soft",children:d("voyages:reserver.confirm.nameLabel")}),e.jsx("input",{value:$e.name,onChange:D=>oe(Ne=>({...Ne,name:D.target.value})),required:!0,placeholder:d("voyages:reserver.confirm.namePh"),className:"w-full rounded-2xl border border-ink/12 bg-white px-4 py-3 text-[15px] text-ink outline-none transition-colors placeholder:text-ink-mute/60 focus:border-navy"})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-ink-soft",children:d("voyages:reserver.confirm.emailLabel")}),e.jsx("input",{value:$e.email,onChange:D=>oe(Ne=>({...Ne,email:D.target.value})),required:!0,type:"email",placeholder:"[email protected]",className:"w-full rounded-2xl border border-ink/12 bg-white px-4 py-3 text-[15px] text-ink outline-none transition-colors placeholder:text-ink-mute/60 focus:border-navy"})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-1.5 block text-[13px] font-semibold text-ink-soft",children:d("voyages:reserver.confirm.phoneLabel")}),e.jsx("input",{value:$e.phone,onChange:D=>oe(Ne=>
403({...Ne,phone:D.target.value})),type:"tel",placeholder:"+33 6 12 34 56 78",className:"w-full rounded-2xl border border-ink/12 bg-white px-4 py-3 text-[15px] text-ink outline-none transition-colors placeholder:text-ink-mute/60 focus:border-navy"})]})]})]}),e.jsx(Ii,{cgv:Ve,onCgv:D=>{y(D),D&&je(!1)},callback:Se,onCallback:We,cgvError:A,className:"mt-4"}),e.jsx("button",{type:"submit",disabled:Ze||!Ve,className:`mt-5 flex w-full items-center justify-center gap-2 rounded-full px-6 py-4 text-[15px] font-bold text-white shadow-soft transition-all hover:brightness-95 ${De?"bg-[#25D366]":"bg-navy"} ${Ze?"opacity-60":""}`,children:Ze?d("voyages:reserver.confirm.sending"):e.jsxs(e.Fragment,{children:[De?e.jsx(la,{className:"h-5 w-5"}):e.jsx(h,{name:"mail",className:"h-5 w-5"})," ",d(De?"voyages:reserver.confirm.byWhatsapp":"voyages:reserver.confirm.byEmail")]})}),pe&&e.jsxs("p",{ref:D=>{D&&D.scrollIntoView({behavior:"smooth",block:"center"})},role:"alert","aria-live":"assertive",className:"mt-4 flex items-start gap-2.5 rounded-xl border-2 border-[#C0392B]/40 bg-[#C0392B]/[0.06] px-4 py-3 text-[13.5px] font-medium leading-snug text-[#C0392B]",children:[e.jsx(h,{name:"clock",className:"mt-0.5 h-4 w-4 shrink-0"})," ",e.jsx("span",{children:pe})]}),Ze&&J&&e.jsxs("p",{role:"status","aria-live":"polite",className:"mt-4 flex items-start gap-2.5 rounded-xl border border-gold-deep/40 bg-gold-light/10 px-4 py-3 text-[13.5px] font-medium leading-snug text-gold-deep",children:[e.jsx(h,{name:"clock",className:"mt-0.5 h-4 w-4 shrink-0"})," ",e.jsx("span",{children:d("voyages:reserver.confirm.slow6")})]}),e.jsxs("p",{className:"mt-3 flex items-center justify-center gap-2 text-[12.5px] text-ink-mute",children:[e.jsx(h,{name:"shield",className:"h-4 w-4 text-navy"})," ",d("voyages:reserver.recap.footnote")]})]}),e.jsxs("div",{className:"lg:sticky lg:top-28 lg:self-start",children:[e.jsxs("div",{className:"rounded-[28px] border border-ink/8 bg-cream-100 p-6",children:[e.jsx("h3",{className:"font-display text-[1.3rem] text-ink",children:d("voyages:reserver.recap.heading")}),e.jsxs("div",{className:"mt-4 space-y-2 text-[14px] text-ink-soft",children:[e.jsxs("p",{className:"flex justify-between gap-3",children:[e.jsx("span",{children:o}),e.jsx("strong",{className:"text-right text-ink",children:m})]}),e.jsxs("p",{className:"flex justify-between gap-3 border-t border-ink/10 pt-2",children:[e.jsx("span",{children:d("voyages:reserver.recap.paxTravelers",{count:u})}),e.jsx("strong",{className:"text-ink",children:(s==null?void 0:s.comboLabel)||"â"})]}),e.jsxs("p",{className:"flex justify-between gap-3 border-t border-ink/10 pt-2",children:[e.jsx("span",{children:d("voyages:reserver.recap.totalEst")}),e.jsx("strong",{className:"text-navy",children:Ht(Y,c)})]})]})]}),e.jsxs("button",{onClick:()=>le("recap"),className:"mt-3 flex w-full items-center justify-center gap-1 text-[13px] font-semibold text-navy hover:underline",children:[e.jsx(h,{name:"arrow",className:"h-4 w-4 rotate-180"})," ",d("voyages:reserver.back")]})]})]})});const Je=D=>e.jsx("button",{type:"button",onClick:Ne=>{Ne.preventDefault(),Ne.stopPropagation(),D()},className:"shrink-0 rounded-full border border-ink/15 px-3 py-1 text-[12px] font-semibold text-ink-soft transition-colors hover:border-navy hover:text-navy",children:d("voyages:reserver.summary.edit")}),Me=({id:D,icon:Ne,title:qe,onEdit:Pe,repli:et=!1,resume:Ye,ouvert:lt=!1,groupe:He=!1,children:Fe})=>et?e.jsxs("details",{id:D,open:lt,className:`group scroll-mt-4 ${He?"":"mt-4 overflow-hidden rounded-2xl border border-ink/12 bg-white shadow-soft"}`,children:[e.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-4 px-5 py-3.5 transition-colors hover:bg-cream-100/60 [&::-webkit-details-marker]:hidden sm:px-6",children:[e.jsx(h,{name:Ne,className:"h-[18px] w-[18px] shrink-0 text-gold-deep"}),e.jsxs("span",{className:"min-w-0 flex-1 sm:flex sm:items-baseline sm:gap-5",children:[e.jsx("span",{className:"block font-display text-[1.1rem] font-bold leading-snug text-navy sm:w-[16.5rem] sm:shrink-0",children:qe}),Ye&&e.jsx("span",{className:"mt-0.5 block truncate text-[12.5px] leading-snug text-ink-mute sm:mt-0 sm:min-w-0 sm:flex-1",children:Ye})]}),Pe&&Je(Pe),e.jsx(h,{name:"chevron",className:"h-4 w-4 shrink-0 text-ink-mute/60 transition-transform group-open:rotate-180"})]}),e.jsx("div",{className:"border-t border-ink/10 bg-cream-50/50 px-5 py-4 sm:px-6",children:Fe})]}):e.jsxs("div",{className:"pt-4",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3",children:[e.jsxs("h3",{className:"flex items-center gap-3 font-display text-[1.4rem] font-bold leading-tight text-navy sm:text-[1.65rem]",children:[e.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-2xl bg-gradient-to-br from-[var(--accent)] to-gold-deep text-white shadow-soft",children:e.jsx(h,{name:Ne,className:"h-[22px] w-[22px]"})}),qe]}),Pe&&e.jsxs("button",{onClick:Pe,className:"flex shrink-0 items-center gap-1 rounded-full border border-ink/12 px-3 py-1.5 text-[12.5px] font-semibold text-navy transition-colors hover:border-navy hover:bg-cream-100",children:[d("voyages:reserver.summary.edit")," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5"})]})]}),e.jsx("div",{className:"overflow-hidden rounded-2xl border border-ink/10 bg-white px-5 py-4 shadow-soft",children:Fe})]}),ct=({label:D,from:Ne,to:qe,date:Pe,time:et})=>e.jsxs("div",{children:[e.jsxs("p",{className:"text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:[D,Pe?e.jsxs("span",{className:"ml-1.5 font-semibold text-ink-mute",children:["· ",Pe]}
403):null]}),e.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-1.5 text-[14px] font-bold text-ink",children:[Ne||"â"," ",e.jsx(h,{name:"plane",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",qe||"â",et?e.jsxs("span",{className:"text-[12.5px] font-normal text-ink-soft",children:[" · ",et]}):null]})]}),Ke="inline-flex items-center gap-1.5 rounded-full bg-cream-200 px-2.5 py-1 text-[12px] font-medium text-navy",st=(x==null?void 0:x.originCity)||(s==null?void 0:s.city)||"",gt=(x==null?void 0:x.airlineName)||(s==null?void 0:s.airline)||"",he=/direct/i.test(String((s==null?void 0:s.flightType)||"")),Xe=gt?he?d("voyages:reserver.recap.flightDirect6",{cie:gt}):d("voyages:reserver.recap.flightWith6",{cie:gt}):he?d("voyages:reserver.recap.flightDirectNoCie6"):"",F=[st,gt,M].filter(Boolean).join(" · ")||d("voyages:reserver.summary.toChoose"),ke=C.length?C.map(D=>D.hotelName).filter(Boolean).slice(0,3).join(" · "):d("voyages:reserver.summary.toChoose"),dt=R.length?R.slice(0,3).join(" · "):d("voyages:reserver.recap.noOption");return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-[var(--accent)]/55 bg-white shadow-soft",children:[e.jsxs("div",{className:"flex items-start gap-3 border-b border-[var(--accent)]/30 bg-[var(--accent)]/[0.08] px-5 py-3 sm:px-6",children:[e.jsx(h,{name:"mail",className:"mt-0.5 h-5 w-5 shrink-0 text-gold-deep"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"font-display text-[1.15rem] font-bold leading-tight text-navy sm:text-[1.3rem]",children:d("voyages:reserver.recap.leadTitle6")}),e.jsx("p",{className:"mt-0.5 text-[13px] leading-snug text-ink-soft",children:d("voyages:reserver.recap.leadText6")})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 px-5 py-4 sm:px-6",children:[e.jsxs(ts,{variant:"solid",onClick:()=>Ee("email"),className:"gap-2.5 px-6 py-3.5 text-[15px]",children:[e.jsx(h,{name:"mail",className:"h-5 w-5"})," ",d("voyages:reserver.confirm.byEmail")]}),e.jsxs(ts,{onClick:()=>Ee("whatsapp"),className:"gap-2.5 !bg-[#25D366] px-6 py-3.5 text-[15px] !text-white hover:brightness-95",children:[e.jsx(la,{className:"h-5 w-5"})," ",d("voyages:reserver.confirm.byWhatsapp")]})]})]}),e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-ink/25 bg-white shadow-soft",children:[e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6 sm:py-5",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.16em] text-gold-deep",children:d("voyages:reserver.recap.quoteEyebrow6")}),e.jsxs("h2",{className:"mt-1.5 font-display text-[1.5rem] font-bold leading-tight text-navy sm:text-[1.95rem]",children:[d("voyages:reserver.recap.yourTripWord")," ",(t==null?void 0:t.name)||o,m?` ${m}`:"",p>0?` â ${d("voyages:reserver.daysNights",{days:p+1,nights:p})}`:""]})]}),e.jsxs("dl",{className:"divide-y divide-ink/12 border-b-2 border-ink/20",children:[e.jsxs("div",{className:"px-5 py-3 sm:px-6",children:[e.jsx("dt",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:d("voyages:reserver.recap.fieldDeparture6")}),e.jsx("dd",{className:"mt-0.5 text-[15px] font-bold leading-snug text-navy",children:st||d("voyages:reserver.recap.dash6")}),Xe&&e.jsx("p",{className:"mt-1 text-[13.5px] leading-snug text-ink-soft",children:Xe})]}),e.jsxs("div",{className:"px-5 py-3 sm:px-6",children:[e.jsx("dt",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:d("voyages:reserver.recap.fieldDates6")}),e.jsxs("dd",{className:"mt-0.5 text-[15px] font-bold leading-snug text-navy",children:[M?q?d("voyages:reserver.recap.tripDatesLong6",{debut:M,fin:q}):M:d("voyages:reserver.recap.dash6"),p>0&&e.jsxs("span",{className:"font-semibold text-ink-soft",children:[" · ",d("voyages:reserver.daysNights",{days:p+1,nights:p})]})]}),U.length>0&&e.jsx("ol",{className:"mt-2.5 space-y-1.5 border-l-2 border-[var(--accent)]/40 pl-3.5",children:U.map((D,Ne)=>e.jsxs("li",{className:"text-[13.5px] leading-snug text-ink-soft",children:[d("voyages:reserver.recap.stageN",{n:Ne+1})," · ",e.jsx("strong",{className:"font-bold text-navy",children:D.label}),D.nights>0?e.jsxs(e.Fragment,{children:[" · ",d("voyages:reserver.nightsCount",{count:D.nights})]}):null]},D.key))})]}),e.jsxs("div",{className:"px-5 py-3 sm:px-6",children:[e.jsx("dt",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-ink-mute",children:d("voyages:reserver.recap.fieldTravelers6")}),e.jsx("dd",{className:"mt-0.5 text-[15px] font-bold leading-snug text-navy",children:d("voyages:reserver.recap.paxTravelers",{count:u})})]})]}),e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:d("voyages:reserver.recap.sectionStay6")}),e.jsxs("p",{className:"mt-1.5 text-[15px] leading-snug text-ink",children:[e.jsxs("span",{className:"text-ink-soft",children:[d("voyages:reserver.recap.fieldRooms6")," · "]}),e.jsx("strong",{className:"font-bold text-navy",children:(s==null?void 0:s.comboLabel)||d("voyages:reserver.recap.dash6")})]}),e.jsx("ul",{className:"mt-3 space-y-3",children:C.map((D,Ne)=>{var Ye;const qe=L==null?void 0:L[Number(D.hotelId)],Pe=((Ye=qe==null?void 0:qe.imgs)==null?void 0:Ye[0])||null,et=Number(D.stars)||Number(qe==null?void 0:qe.stars)||0;return e.jsxs("li",{className:"flex items-start gap-3",children:[Pe?e.jsx("img",{src:Pe,alt:D.hotelName,loading:"lazy",className:"h-20 w-28 shrink-0 rounded-xl border border-ink/12 object-cover sm:h-24 sm:w-36"}):null,e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-ink-mute",children:D.cityName}),e.jsxs("p",{className:"text-[15px] font-bold leading-snug text-navy",children:[D.hotelName,et?` ${et}â
`:""]}),e.jsx("p",{className:"mt-0.5 text-[13px] leading-snug text-ink-soft",children:Number(D.nights)>0?d("voyages:reserver.nightsCount",{count:Number(D.nights)}):""})]})]},`${D.cityName}-${Ne}`)})}),e.jsxs("button",{type:"button",onClick:()=>{const D=document.getElementById("rub-hotels");D&&(D.open=!0,D.scrollIntoView({behavior:"smooth",block:"start"}))},className:"mt-3 inline-flex items-center gap-1.5 text-[13px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:[d("voyages:reserver.recap.seeHotels6")," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 rotate-90"})]})]}),e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:d("voyages:reserver.recap.sectionIncluded6")}),e.jsx("ul",{className:"mt-2.5 space-y-2",children:[st&>?d("voyages:reserver.recap.inclFlights6",{ville:st,cie:gt}):st?d("voyages:reserver.recap.inclFlightsCity6",{ville:st}):d("voyages:reserver.recap.inclFlightsPlain6"),C.length?d("voyages:reserver.recap.inclHotels6",{count:C.length,cat:m||""}):"",fe.length?d("voyages:reserver.recap.inclProgram6",{count:fe.length}):"",B?d("voyages:reserver.recap.inclVisa6"):"",d("voyages:reserver.recap.inclGuide6")].filter(
403Boolean).map(D=>e.jsxs("li",{className:"flex items-start gap-2.5 text-[14px] leading-relaxed text-ink",children:[e.jsx(h,{name:"check",className:"mt-1 h-4 w-4 shrink-0 text-[var(--accent)]"})," ",e.jsx("span",{children:D})]},D))})]}),e.jsxs("div",{className:"border-b-2 border-ink/20 px-5 py-4 sm:px-6",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:d("voyages:reserver.recap.perPaxLabel6")}),z.length>0&&e.jsx("ul",{className:"mt-2 max-w-xl divide-y divide-ink/10",children:z.map((D,Ne)=>e.jsxs("li",{className:"flex items-baseline justify-between gap-4 py-2 text-[14px]",children:[e.jsxs("span",{className:"min-w-0 text-ink",children:[e.jsx("strong",{className:"font-semibold text-navy",children:D.label}),e.jsx("span",{className:"text-ink-mute",children:d("voyages:reserver.recap.lodgedInRoom6",{room:D.room})})]}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:Ht(D.pp,c)})]},Ne))}),k>0&&e.jsxs("p",{className:"mt-2 flex max-w-xl items-baseline justify-between gap-4 text-[14px]",children:[e.jsx("span",{className:"text-ink",children:d("voyages:reserver.recap.options")}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:Ht(k,c)})]}),e.jsxs("p",{className:"mt-3 flex max-w-xl items-end justify-between gap-4 border-t-2 border-ink/20 pt-3",children:[e.jsx("span",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-ink-soft",children:d("voyages:reserver.recap.totalPax6",{count:u})}),e.jsx("span",{className:"font-display text-[2.1rem] leading-none text-navy",children:Ht(Y,c)})]}),e.jsxs("a",{href:"#detail-prix",className:"mt-2.5 inline-flex items-center gap-1.5 text-[13px] font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-navy",children:[d("voyages:reserver.recap.seePrice6")," ",e.jsx(h,{name:"arrow",className:"h-3.5 w-3.5 rotate-90"})]}),Be.length>1&&e.jsxs("div",{className:"mt-3 border-t border-ink/15 pt-3",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.12em] text-gold-deep",children:d("voyages:reserver.recap.firstPaymentLabel6")}),e.jsx("p",{className:"mt-1 font-display text-[1.7rem] leading-none text-navy",children:Ht(Be[0].amount,c)}),e.jsx("p",{className:"mt-1.5 text-[13px] leading-snug text-ink-soft",children:d("voyages:reserver.recap.firstPaymentNote6",{solde:Ht(Math.round(Y)-Be[0].amount,c)})})]})]}),e.jsxs("div",{className:"px-5 py-4 sm:px-6",children:[e.jsxs("p",{className:"max-w-3xl text-[14px] leading-relaxed text-ink-soft",children:[e.jsx("strong",{className:"text-navy",children:d("voyages:reserver.recap.projectFormingStrong")}),d("voyages:reserver.recap.projectFormingRest")]}),e.jsxs("p",{className:"mt-3 flex items-center gap-2 border-t border-ink/12 pt-3 text-[13px] font-semibold text-ink",children:[e.jsx(h,{name:"clock",className:"h-4 w-4 shrink-0 text-red-brand"})," ",d("voyages:reserver.recap.lastSeatsBlocked")]})]})]}),e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-ink/20 bg-white shadow-soft [&>details+details]:border-t [&>details+details]:border-ink/12 [&>div>details]:border-t [&>div>details]:border-ink/12",children:[fe.length>0&&e.jsxs(Me,{icon:"compass",title:d("voyages:reserver.recap.secProgram"),repli:!0,groupe:!0,resume:d("voyages:reserver.recap.programResume6",{n:fe.length}),children:[e.jsx("ol",{className:"relative ml-1.5 space-y-3 border-l-2 border-[var(--accent)]/25 pl-4",children:fe.map((D,Ne)=>e.jsxs("li",{className:"relative",children:[e.jsx("span",{className:"absolute -left-[22px] top-2 grid h-3.5 w-3.5 place-items-center rounded-full bg-white ring-2 ring-[var(--accent)]",children:e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--accent)]"})}),e.jsxs("div",{className:"grid gap-1.5 rounded-xl border border-ink/8 bg-white px-3.5 py-3 shadow-soft sm:grid-cols-[165px_1fr] sm:gap-4",children:[e.jsx("p",{className:"text-[12.5px] font-bold capitalize leading-snug text-gold-deep sm:border-r sm:border-ink/8 sm:pr-3",children:(/^\d{4}-\d{2}-\d{2}/.test(String(D.date||""))?da(D.date):D.date)||d("voyages:reserver.recap.dayN",{n:Ne+1})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"flex items-center gap-2 font-display text-[1.05rem] font-bold text-navy",children:[e.jsx(h,{name:"compass",className:"h-4 w-4 shrink-0 text-[var(--accent)]"})," ",d("voyages:reserver.recap.dayN",{n:Ne+1})]}),D.text&&e.jsx("p",{className:"mt-1 text-[12.5px] leading-snug text-ink-soft",children:D.text})]})]})]},Ne))}),e.jsx("p",{className:"mt-3 text-[11.5px] leading-snug text-ink-mute",children:d("voyages:reserver.recap.programNote")})]}),e.jsx(Me,{icon:"plane",title:d("voyages:reserver.recap.secFlight"),onEdit:()=>i("vols"),repli:!0,groupe:!0,resume:F,children:s!=null&&s.dateISO?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2",children:[e.jsxs("span",{className:"inline-flex items-baseline gap-2",children:[e.jsx("span",{className:"text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:d("voyages:reserver.recap.departLabel")})," ",e.jsx("span",{className:"font-display text-[1.15rem] font-bold capitalize text-navy",children:M||"â"})]}),q&&e.jsxs(e.Fragment,{children:[e.jsx(h,{name:"arrow",className:"h-4 w-4 text-ink-mute"}),e.jsxs("span",{className:"inline-flex items-baseline gap-2",children:[e.jsx("span",{className:"text-[10.5px] font-bold uppercase tracking-wider text-gold-deep",children:d("voyages:reserver.recap.returnLabel")})," ",e.jsx("span",{className:"font-display text-[1.15rem] font-bold capitalize text-navy",children:q})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(ea,{name:(x==null?void 0:x.airlineName)||o,code:x==null?void 0:x.airlineCode,logo:x==null?void 0:x.airlineLogo,className:"h-8 w-11 rounded border border-ink/10 text-[9px]"}),e.jsx("span",{className:"text-[14.5px] font-bold text-navy",children:(x==null?void 0:x.airlineName)||d("voyages:reserver.recap.airlinePartner")})]}),e.jsx("p",{className:"text-[12.5px] leading-snug text-ink-soft",children:d("voyages:reserver.recap.flightRoundTripNote")}),e.jsx("div",{className:"rounded-xl border border-ink/10 bg-cream-100/50 p-3",children:e.jsx(ct,{label:d("voyages:reserver.summary.outboundFlight"),from:x==null?void 0:x.originCity,to:(x==null?void 0:x.destinationCity)||o,date:M})}),q&&e.jsx("div",{className:"rounded-xl border border-ink/10 bg-cream-100/50 p-3",children:e.jsx(ct,{label:d("voyages:reserver.summary.returnFlight"),from:(x==null?void 0:x.destinationCity)||o,to:x==null?void 0:x.originCity,date:q})}),e.jsxs("div",{className:"flex flex-wrap gap-x-2.5 gap-y-1.5",children:[p>0&&e.jsxs("span",{className:Ke,children:[e.jsx(h,{name:"cal",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",d("voyages:reserver.nightsCount",{count:p})]}),a&&e.jsxs("span",{className:Ke,children:[e.jsx(h,{name:"compass",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",a]})]})]}):e.jsx("p",{className:"text-[14px] text-ink-mute",children:d("voyages:reserver.summary.toChoose")})}),e.jsxs(Me,{id:"rub-hotels",icon:"kaaba",title:d("voyages:reserver.recap.secHotels"),onEdit:()=>i("rooms"),repli:!0,groupe:!0,resume:ke,children:[e.jsx("div",{className:"space-y-4",children:U.map((D,Ne)=>{const qe=C.filter(Pe=>Pe.cityName===D.key);return qe.length?qe.map((Pe,et)=>{const Ye=L==null?void 0:L[Number(Pe.hotelId)],lt=Ye!=null&&Ye.imgs&&Ye.imgs.length?Ye.imgs:me,He=lt[0]||Z,Fe=lt[1]||He,xt=lt[2]||Fe,Mt=(Ye==null?void 0:Ye.stars)||0;return e.jsxs("div",{children:[e.jsxs("p",{className:"mb-2 flex items-center gap-2 font-display text-[1.3rem] font-bold leading-tight text-navy sm:text-[1.5rem]",children:[e.jsx(h,{name:"pin",className:"h-5 w-5 shrink-0 text-[var(--accent)]"})," ",d("voyages:reserver.recap.stageN",{n:Ne+1})," · ",D.label]}),e.jsx("div",{className:"overflow-hidden rounded-2xl border border-ink/10 bg-white shadow-soft",children:e.jsxs("div",{className:"flex flex-col gap-5 p-4 sm:p-5 lg:flex-row",children:[e.jsx("div",{className:"flex w-full shrink-0 sm:w-64 lg:w-[300px]",children:e.jsx(br,{icon:"kaaba",title:Pe.hotelName,stars:Mt,showHeader:!1,roomSrc:He,hotelSrc:Fe,planSrc:xt})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"inline-flex rounded-full bg-[var(--accent)]/15 px-2.5 py-0.5 text-[11px] font-bold uppercase tracking-wide text-gold-deep",children:d("voyages:reserver.hotels.categoryBadge",{cat:m})}),e.jsxs("p",{className:"mt-1.5 font-display text-[1.5rem] font-bold leading-tight text-navy sm:text-[1.75rem]",children:[Pe.hotelName," ",Mt?e.jsxs("span",{className:"text-[var(--accent)]",children:[Mt,"â
"]}
403):null]}),e.jsx("div",{className:"mt-3.5 grid grid-cols-2 gap-x-5 gap-y-3 sm:grid-cols-3",children:[["cal",d("voyages:reserver.recap.labelStay"),(Number(Pe.nights)||D.nights)>0?d("voyages:reserver.nightsCount",{count:Number(Pe.nights)||D.nights}):"â"],["pin",d("voyages:reserver.recap.labelCity"),D.label],...Pe.pension?[["star",d("voyages:reserver.rooms.pension"),String(Pe.pension)]]:[]].map(([ks,Lt,ms])=>e.jsxs("div",{children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-[10.5px] font-bold uppercase tracking-wide text-gold-deep",children:[e.jsx(h,{name:ks,className:"h-3.5 w-3.5"})," ",Lt]}),e.jsx("p",{className:"mt-0.5 text-[14px] font-bold leading-snug text-navy",children:ms})]},Lt))}),(s==null?void 0:s.comboLabel)&&e.jsxs("div",{className:"mt-4 border-t border-ink/8 pt-3",children:[e.jsx("p",{className:"mb-1.5 text-[11px] font-bold uppercase tracking-wider text-gold-deep",children:d("voyages:reserver.recap.yourRooms")}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-xl border border-ink/10 bg-cream-100 px-3 py-1.5 text-[13px] font-semibold text-navy",children:[e.jsx(h,{name:"users",className:"h-3.5 w-3.5 text-gold-deep"})," ",s.comboLabel]})]})]})]})})]},`${D.key}-${et}`)}):e.jsxs("div",{children:[e.jsxs("p",{className:"mb-2 flex items-center gap-2 font-display text-[1.3rem] font-bold leading-tight text-navy",children:[e.jsx(h,{name:"pin",className:"h-5 w-5 shrink-0 text-[var(--accent)]"})," ",d("voyages:reserver.recap.stageN",{n:Ne+1})," · ",D.label]}),e.jsxs("div",{className:"flex items-start gap-3 rounded-2xl border-2 border-dashed border-[#C0392B]/40 bg-[#C0392B]/[0.04] px-4 py-4",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-full bg-[#C0392B]/15 text-[#C0392B]",children:e.jsx(h,{name:"star",className:"h-5 w-5"})}),e.jsxs("p",{className:"text-[13px] leading-relaxed text-ink-soft",children:[e.jsx("strong",{className:"text-navy",children:d("voyages:reserver.recap.hotelToConfirm")}),D.nights>0?` · ${d("voyages:reserver.nightsCount",{count:D.nights})}`:""]})]})]},D.key)})}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-3 border-t border-ink/8 pt-3",children:[e.jsxs("span",{className:Ke,children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5 text-[var(--accent)]"})," ",d("voyages:reserver.recap.paxTravelers",{count:u}),s!=null&&s.comboLabel?e.jsxs("span",{className:"text-ink-mute",children:[" · ",s.comboLabel]}):null]}),V>0&&e.jsxs("span",{className:"text-right",children:[e.jsx("span",{className:"block font-display text-[1.25rem] leading-none text-navy",children:Ht(Math.round(V/u),c)}),e.jsx("span",{className:"text-[11px] text-ink-mute",children:d("voyages:reserver.recap.perPersonStay")})]})]})]}),K.length>0&&e.jsxs(Me,{icon:"star",title:d("voyages:reserver.recap.secIncluded"),repli:!0,groupe:!0,resume:d("voyages:reserver.recap.resumeIncluded6",{count:K.length}),children:[e.jsx("div",{className:"grid gap-x-6 gap-y-2.5 sm:grid-cols-2",children:K.map(D=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-navy text-cream-100",children:e.jsx(h,{name:"check",className:"h-5 w-5"})}),e.jsx("p",{className:"min-w-0 text-[13.5px] leading-snug text-ink-soft",children:D})]},D))}),E.length>0&&e.jsxs("div",{className:"mt-4 border-t border-ink/8 pt-3",children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold uppercase tracking-[0.14em] text-ink-mute",children:d("voyages:reserver.recap.secNotIncluded")}),e.jsx("ul",{className:"grid gap-1.5 sm:grid-cols-2",children:E.map(D=>e.jsxs("li",{className:"flex items-start gap-2 text-[12.5px] leading-snug text-ink-soft",children:[e.jsx(h,{name:"plus",className:"mt-0.5 h-3.5 w-3.5 shrink-0 rotate-45 text-ink-mute"})," ",D]},D))})]})]}),B&&e.jsx(Me,{icon:"shield",title:d("voyages:reserver.recap.secVisa"),repli:!0,groupe:!0,resume:d("voyages:reserver.recap.resumeVisa6"),children:e.jsx("p",{className:"text-[13.5px] leading-relaxed text-ink-soft",children:B})}),e.jsx(Me,{icon:"sparkle",title:d("voyages:reserver.recap.secOptions"),onEdit:()=>i("options"),repli:!0,groupe:!0,resume:dt,children:R.length?e.jsxs("div",{className:"divide-y divide-ink/8",children:[R.map((D,Ne)=>e.jsxs("div",{className:"flex items-center gap-2.5 py-2 text-[13.5px]",children:[e.jsx(h,{name:"check",className:"h-4 w-4 shrink-0 text-[var(--accent)]"})," ",e.jsx("span",{className:"font-semibold text-ink",children:D})]},Ne)),e.jsxs("div",{className:"flex justify-between pt-2 text-[13.5px] font-bold",children:[e.jsx("span",{className:"text-ink",children:d("voyages:reserver.recap.totalOptions")}),e.jsx("span",{className:"text-navy",children:k>0?Ht(k,c):"â"})]})]}):e.jsx("p",{className:"text-[13px] text-ink-mute",children:d("voyages:reserver.recap.noOption")})})]}),e.jsxs("div",{id:"detail-prix",className:"scroll-mt-4 overflow-hidden rounded-2xl border-2 border-navy/15 bg-white shadow-soft",children:[e.jsx("p",{className:"border-b border-ink/8 bg-cream-100/60 px-5 py-3 text-[12px] font-bold uppercase tracking-wider text-gold-deep",children:d("voyages:reserver.recap.priceDetail")}),e.jsxs("div",{className:"divide-y divide-ink/8 px-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 py-2.5 text-[14px]",children:[e.jsx("span",{className:"text-ink",children:d("voyages:reserver.recap.stayLine")}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:Ht(V,c)})]}),e.jsxs("div",{className:"flex items-start justify-between gap-3 py-2.5 text-[14px]",children:[e.jsx("span",{className:"text-ink",children:_!=null?d("voyages:reserver.recap.flightLineWithPP",{pp:Ht(_,c),count:u}):d("voyages:reserver.recap.flight")}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:_!=null?Ht(be,c):d("voyages:reserver.recap.flightConfirmed")})]}),k>0&&e.jsxs("div",{className:"flex items-start justify-between gap-3 py-2.5 text-[14px]",children:[e.jsx("span",{className:"text-ink",children:d("voyages:reserver.recap.options")}),e.jsx("span",{className:"shrink-0 font-bold text-ink",children:Ht(k,c)})]})]}),e.jsx("div",{className:"border-t-2 border-ink/10 bg-navy-deep px-5 py-4 text-cream-100",children:e.jsxs("div",{className:"flex items-end justify-between gap-4",children:[e.jsx("span",{className:"text-[12.5px] font-semibold uppercase tracking-wide text-cream-100/80",children:d("voyages:reserver.recap.totalPax6",{count:u})}),e.jsx("span",{className:"font-display text-[2.1rem] leading-none text-gold-light",children:Ht(Y,c)})]})})]}),Be.length>0&&e.jsxs("div",{className:"overflow-hidden rounded-2xl border border-ink/10 bg-white shadow-soft",children:[e.jsxs("div",{className:"flex items-center gap-2 border-b border-ink/8 bg-cream-100/60 px-5 py-3",children:[e.jsx(h,{name:"check",className:"h-4 w-4 text-[var(--accent)]"}),e.jsx("p",{className:"text-[12px] font-bold uppercase tracking-wider text-gold-deep",children:d("voyages:reserver.recap.flexiblePayment")})]}),e.jsx("div",{className:"divide-y divide-ink/8 px-5",children:Be.map((D,Ne)=>e.jsxs("div",{className:"flex items-center justify-between gap-3 py-2.5 text-[13.5px]",children:[e.jsxs("span",{className:"text-ink",children:[D.label,D.date?e.jsxs("span",{className:"text-ink-mute",children:[" · ",D.date]}):""]}),e.jsx("span",{className:"font-bold text-navy",children:Ht(D.amount,c)})]},Ne))}),e.jsx("p",{className:"px-5 pb-3 pt-1 text-[11.5px] leading-snug text-ink-mute",children:d("voyages:reserver.recap.installmentNote")})]}),e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-ink/20 bg-white shadow-soft",children:[e.jsx("p",{className:"border-b border-ink/12 bg-cream-100/60 px-5 py-3 text-[12px] font-bold uppercase tracking-wider text-gold-deep sm:px-6",children:d("voyages:reserver.recap.receiveQuote")}),e.jsxs("div",{className:"px-5 py-4 sm:px-6",children:[e.jsxs("p",{className:"max-w-3xl text-[14px] leading-relaxed text-ink-soft",children:[d("voyages:reserver.recap.urgency1"),e.jsx("strong",{className:"text-navy",children:d("voyages:reserver.recap.urgencyBold")}),d("voyages:reserver.recap.urgency2")]}),e.jsxs("div",{className:"mt-3.5 flex flex-wrap gap-3",children:[e.jsxs(ts,{variant:"solid",onClick:()=>Ee("email"),className:"gap-2.5 px-6 py-3.5 text-[15px]",children:[e.jsx(h,{name:"mail",className:"h-5 w-5"})," ",d("voyages:reserver.confirm.byEmail")]}),e.jsxs(ts,{onClick:()=>Ee("whatsapp"),className:"gap-2.5 !bg-[#25D366] px-6 py-3.5 text-[15px] !text-white hover:brightness-95",children:[e.jsx(la,{className:"h-5 w-5"})," ",d("voyages:reserver.confirm.byWhatsapp")]})]}),Ge.length>0&&e.jsx("ul",{className:"mt-3.5 space-y-1.5 border-t border-ink/12 pt-3.5",children:Ge.map(D=>e.jsxs("li",{className:"flex flex-wrap items-center gap-2 text-[13px] text-ink-soft",children:[e.jsxs("a",{href:`tel:${String(D.phone).replace(/\s+/g,"")}`,className:"inline-flex items-center gap-1.5 font-bold text-navy underline decoration-[var(--accent)] decoration-2 underline-offset-4 transition-colors hover:text-gold-deep",children:[e.jsx(h,{name:"phone",className:"h-4 w-4"})," ",D.phone]}),e.jsxs("span",{className:"text-ink-mute",children:[D.name?`${D.name} · `:"",d("voyages:reserver.recap.hoursLine")]})]},D.id||D.name))})]})]}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3",children:[e.jsxs(ts,{variant:"ghost",onClick:()=>i("options"),className:"px-3 py-2.5",children:[e.jsx(h,{name:"arrow",className:"h-4 w-4 rotate-180"})," ",d("voyages:reserver.back")]}),e.jsxs("button",{onClick:()=>{window.confirm(d("voyages:reserver.recap.redoConfirm"))&&i("vols")},className:"inline-flex items-center gap-2 rounded-full border border-navy/20 bg-cream-200 px-5 py-2.5 text-[13.5px] font-bold text-navy transition-colors hover:border-navy hover:bg-cream-300",children:[e.jsx(h,{name:"plus",className:"h-4 w-4 text-[var(--accent)]"})," ",d("voyages:reserver.recap.redoQuote")]})]}),e.jsx("p",{className:"text-[12.5px] leading-relaxed text-ink-mute",children:d("voyages:reserver.recap.footnote")})]})}function Dd({offer:t,calData:n,tripLabel:o,heroImg:a,b:s,go:i,step:l,pax:d}){var M,q,ce;const{t:c}=it(),[m,g]=b.useState(l!=="vols");b.useEffect(()=>{g(l!=="vols")},[l]);const N=Number(s==null?void 0:s.adults)||Number(d)||2,u=Number(s==null?void 0:s.children)||0,p=Math.max(1,N+u),x=(()=>{var $;const te=(($=n==null?void 0:n.byDate)==null?void 0:$[s==null?void 0:s.dateISO])||[];return te.find(W=>W.flightId===(s==null?void 0:s.flightId))||(s!=null&&s.dateISO?te[0]:null)||null})(),j=(s==null?void 0:s.dateISO)||(x==null?void 0:x.dateISO)||null,C=(s==null?void 0:s.returnISO)||(x==null?void 0:x.returnISO)||null,U=Tn(t,(s==null?void 0:s.currency)||(x==null?void 0:x.currency),(s==null?void 0:s.flightId)||(x==null?void 0:x.id)),I=Object.values(U).map(te=>te==null?void 0:te.min).filter(te=>typeof te=="number"),L=I.length?Math.min(...I):null,me=(s==null?void 0:s.currency)||(x==null?void 0:x.currency)||((M=Object.values(U)[0])==null?void 0:M.currency)||"EUR",Z=typeof(x==null?void 0:x.price)=="number"?x.price:null,V=Number(s==null?void 0:s.comboTotal)||0,k=Number(s==null?void 0:s.optionsTotal)||0,R=Array.isArray(s==null?void 0:s.optionsLabels)?s.optionsLabels:[],_=V>0,be=_?V+(Z!=null?Z*p:0)+k:L!=null?L*p:0,Y=_?Math.round(be/p):L??0,Q=s==null?void 0:s.tier,z=((t==null?void 0:t.tripCities)||[]).map(te=>te.cityName),fe=((t==null?void 0:t.categoryHotels)||[]).filter(te=>te.category===Q&&te.hotelName).sort((te,$)=>{const W=z.indexOf(te.cityName),ye=z.indexOf($.cityName);return(W<0?99:W)-(ye<0?99:ye)}),K=Sn(t),E=[{ic:"plane",label:c("voyages:reserver.summary.flights")},{ic:"star",label:c("voyages:reserver.summary.hotels")},...(q=t==null?void 0:t.programme)!=null&&q.length||(ce=t==null?void 0:t.poiItems)!=null&&ce.length?[{ic:"compass",label:c("voyages:reserver.summary.tours")}]:[],...R.length?[{ic:"sparkle",label:c("voyages:reserver.recap.options")}]:[]],B=e.jsxs("div",{className:"overflow-hidden rounded-2xl border-2 border-[#C0392B]/45 bg-white shadow-lift",children:[a&&e.jsx("div",{className:"p-2.5",children:e.jsxs("div",{className:"relative h-32 overflow-hidden rounded-xl bg-ink",children:[e.jsx("img",{src:a,alt:o,className:"absolute inset-0 h-full w-full object-cover"}),e.jsx("span",{className:"absolute left-2.5 top-2.5 rounded-full bg-white/90 px-2.5 py-1 text-[10.5px] font-bold uppercase tracking-wide text-navy shadow-soft",children:o})]})}),e.jsxs("div",{className:"px-4 pb-2 pt-1",children:[e.jsx("p",{className:"text-[10.5px] font-bold uppercase tracking-[0.16em] text-[#C0392B]",children:c(l==="recap"?"voyages:reserver.summary.finalOffer":"voyages:reserver.summary.almostFinalOffer")}),e.jsxs("div",{className:"mt-1 flex items-baseline gap-1.5",children:[!_&&e.jsx("span",{className:"text-[11.5px] font-bold uppercase tracking-wide text-gold-deep",children:c("voyages:reserver.from")}),e.jsx("span",{className:"font-display text-[2rem] leading-none text-navy",children:Y>0?Ht(Y,me):"â"}),e.jsx("span",{className:"text-[12px] text-ink-mute",children:c("voyages:reserver.perPers")})]}),e.jsx("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:E.map(te=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cream-100 px-2.5 py-1 text-[11px] font-semibold text-ink-soft",children:[e.jsx(h,{name:te.ic,className:"h-3 w-3 text-gold-deep"})," ",te.label]},te.label))}),be>0&&e.jsxs("p",{className:"mt-2.5 rounded-lg bg-cream-100 px-3 py-1.5 text-[12px] font-semibold text-ink-soft",children:[c("voyages:reserver.summary.estimationTravelers",{count:p})," · ",e.jsx("span",{className:"text-navy",children:Ht(be,me)})]})]}),e.jsxs("div",{className:"border-t border-ink/8 px-4 py-3",children:[e.jsxs("button",{onClick:()=>g(!m),className:"flex w-full items-center justify-between text-left",children:[e.jsx("span",{className:"text-[12px] font-bold uppercase tracking-[0.14em] text-gold-deep",children:c("voyages:reserver.summary.yourChoices")}),e.jsxs("span",{className:"flex items-center gap-1 text-[11.5px] font-semibold text-ink-soft",children:[c(m?"voyages:reserver.summary.hide":"voyages:reserver.summary.show")," ",e.jsx(h,{name:"arrow",className:`h-3.5 w-3.5 transition-transform ${m?"-rotate-90":"rotate-90"}`})]})]}),m&&e.jsxs("div",{className:"mt-2.5 space-y-2 text-[12.5px]",children:[e.jsxs("p",{className:"text-ink-soft",children:[e.jsx("span",{className:"font-semibold text-navy",children:o}),K>0?` · ${c("voyages:reserver.summary.daysNightsAbbr",{days:K+1,nights:K})}`:"",j?` · ${c("voyages:reserver.summary.fromDate",{date:da(j)})}`:""]}),e.jsxs("div",{className:"rounded-lg border border-ink/8 px-3 py-2",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-ink-mute",children:c("voyages:reserver.summary.outboundFlight")}),e.jsx("p",{className:"mt-0.5 text-navy",children:x?e.jsxs(e.Fragment,{children:[x.originCity," â ",x.destinationCity||o,j?e.jsxs("span",{className:"text-ink-soft",children:[" · ",da(j)]}):null]}):e.jsx("span",{className:"text-ink-mute",children:c("voyages:reserver.summary.toChoose")})})]}),C&&e.jsxs("div",{className:"rounded-lg border border-ink/8 px-3 py-2",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-ink-mute",children:c("voyages:reserver.summary.returnFlight")}),e.jsxs("p",{className:"mt-0.5 text-navy",children:[(x==null?void 0:x.destinationCity)||o," â ",(x==null?void 0:x.originCity)||"â",e.jsxs("span",{className:"text-ink-soft",children:[" · ",da(C)]})]})]}),e.jsxs("div",{className:"rounded-lg border border-ink/8 px-3 py-2",children:[e.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wider text-ink-mute",children:[c("voyages:reserver.summary.hotels"),Q?` · ${Q}`:""]}),Q&&fe.length?e.jsx("ul",{className:"mt-0.5 space-y-0.5",children:fe.map((te,$)=>e.jsxs("li",{className:"text-navy",children:[e.jsx("span",{className:"font-semibold",children:te.cityName})," ",e.jsxs("span",{className:"text-ink-soft",children:["â ",te.hotelName]})]},$))}):e.jsx("p",{className:"mt-0.5 text-ink-mute",children:c("voyages:reserver.summary.toChoose")})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-ink/8 px-3 py-2",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-ink-mute",children:c("voyages:reserver.summary.room")}),e.jsx("span",{className:"text-navy",children:(s==null?void 0:s.comboLabel)||e.jsx(
403"span",{className:"text-ink-mute",children:c("voyages:reserver.summary.toChoose")})})]}),e.jsxs("div",{className:"rounded-lg border border-ink/8 px-3 py-2",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-ink-mute",children:c("voyages:reserver.recap.options")}),e.jsx("p",{className:"mt-0.5 text-navy",children:R.length?R.join(", "):e.jsx("span",{className:"text-ink-mute",children:c("voyages:reserver.summary.noneOption")})})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-ink/8 bg-cream-100/60 px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wider text-ink-mute",children:c("voyages:reserver.summary.yourTravelers")}),e.jsxs("p",{className:"mt-0.5 text-[13px] font-semibold text-navy",children:[c("voyages:reserver.adultsCount",{count:N}),u>0?` · ${c("voyages:reserver.childrenCount",{count:u})}`:""]})]}),e.jsx("button",{type:"button",onClick:()=>i("rooms"),className:"rounded-full border border-ink/15 bg-white px-3.5 py-1.5 text-[12px] font-bold text-navy transition-colors hover:border-navy",children:c("voyages:reserver.summary.edit")})]})]});return e.jsxs("aside",{className:"space-y-3 lg:self-start",children:[e.jsxs("button",{onClick:()=>g(!m),className:"flex w-full items-center justify-between gap-3 rounded-2xl border-2 border-[#C0392B]/45 bg-white px-4 py-3 text-left shadow-soft lg:hidden",children:[e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block text-[10.5px] font-bold uppercase tracking-[0.16em] text-[#C0392B]",children:c("voyages:reserver.summary.almostFinalOffer")}),e.jsxs("span",{className:"mt-0.5 flex items-baseline gap-1.5",children:[e.jsx("span",{className:"font-display text-[1.5rem] leading-none text-navy",children:Y>0?Ht(Y,me):"â"}),e.jsx("span",{className:"text-[12px] text-ink-mute",children:c("voyages:reserver.perPers")})]})]}),e.jsxs("span",{className:"flex shrink-0 items-center gap-1.5 rounded-full bg-[#C0392B] px-3 py-1.5 text-[11.5px] font-bold text-white",children:[c(m?"voyages:reserver.summary.hide":"voyages:reserver.summary.details")," ",e.jsx(h,{name:"arrow",className:`h-3.5 w-3.5 transition-transform ${m?"-rotate-90":"rotate-90"}`})]})]}),e.jsx("div",{className:`${m?"":"hidden"} lg:block`,children:B})]})}function Ld(){const{t}=it();Mi();const[n]=il(),o=Va(),a=qa(),s=Number(n.get("offer"))||null,i=n.get("step")||"vols",{data:l,isLoading:d}=ol(s),c=Si(),m=B=>{const M=new Map;for(const te of(B==null?void 0:B.tripCities)||[]){const $=te.countryName||c(te.cityName);$&&M.set($,(M.get($)||0)+(Number(te.nights)||0))}let q="",ce=-1;for(const[te,$]of M)$>ce&&(ce=$,q=te);return q||(B==null?void 0:B.name)||t("voyages:reserver.tripFallbackLabel")},g=b.useMemo(()=>m(l),[l,c]),N=wi(),[u,p]=b.useState(s?[s]:[]);b.useEffect(()=>{s&&!u.includes(s)&&p(B=>Array.from(new Set([s,...B])))},[s]);const x=n.get("all")==="1",j=b.useRef(!1);b.useEffect(()=>{var B;x&&!j.current&&((B=N.data)!=null&&B.length)&&(j.current=!0,p(Array.from(new Set([...s?[s]:[],...N.data.map(M=>M.id)]))))},[x,N.data,s]);const C=ll(u),U=b.useMemo(()=>Array.from(new Set([...((l==null?void 0:l.categoryPhotos)||[]).map(B=>B==null?void 0:B.photoUrl),...((l==null?void 0:l.programme)||[]).map(B=>B==null?void 0:B.photo),...((l==null?void 0:l.poiItems)||[]).map(B=>B==null?void 0:B.photo)].filter(Boolean))),[l]),I=s?`grp-${s}`:Ji(((l==null?void 0:l.tripCities)||[]).map(B=>B.countryName||c(B.cityName)).filter(Boolean)[0]),L=Zi("gallery",I),me=U[0]||L[0],Z=b.useMemo(()=>{var M;const B=[];for(const q of u){const ce=((M=C.data)==null?void 0:M[q])||(q===s?l:null);ce&&(ce.flights||[]).length&&B.push({offer:ce,destLabel:m(ce)})}return!B.length&&l&&(l.flights||[]).length&&B.push({offer:l,destLabel:g}),B.length?ri(B):l?ri([]):null},[u,C.data,l,s,g]),V=b.useMemo(()=>{var M;const B={};for(const q of u){const ce=((M=C.data)==null?void 0:M[q])||(q===s?l:null);ce&&(B[q]=Array.from(new Set([...(ce.categoryPhotos||[]).map(te=>te==null?void 0:te.photoUrl),...(ce.programme||[]).map(te=>te==null?void 0:te.photo),...(ce.poiItems||[]).map(te=>
403te==null?void 0:te.photo)].filter(Boolean))))}return B},[u,C.data,l,s]),k=b.useMemo(()=>{const B=U.length?U:L.length?L:["/egypte/egypte-1.jpg"],M=q=>`${q.getFullYear()}-${String(q.getMonth()+1).padStart(2,"0")}-${String(q.getDate()).padStart(2,"0")}`;return q=>{var W,ye,de;const te=(ye=(((W=Z==null?void 0:Z.byDate)==null?void 0:W[M(q)])||[])[0])==null?void 0:ye.offerId,$=te&&((de=V[te])!=null&&de.length)?V[te]:B;return $[q.getDate()%$.length]}},[Z,V,U,L]),R=`gm_voyage_booking_${s||"0"}`,[_,be]=b.useState(()=>{const B={city:Yn.t("voyages:dest.filter.allCities"),tripType:"tourisme",currency:"EUR"};try{const M=localStorage.getItem(R);if(!M)return B;const q=JSON.parse(M);return q&&typeof q=="object"?{...B,...q}:B}catch{return B}}),Y=B=>be(M=>{const q={...M,...B};try{localStorage.setItem(R,JSON.stringify(q))}catch{}return q}),Q=B=>{const M=`offer=${s||""}&step=${B}`;o(a("/voyages/reserver")+`?${M}`),window.scrollTo({top:0,behavior:"smooth"})};b.useEffect(()=>{if(_.offerId&&s&&_.offerId!==s){const B=new URLSearchParams(window.location.search);B.set("offer",String(_.offerId)),o(a("/voyages/reserver")+`?${B.toString()}`,{replace:!0})}},[_.offerId,s,o]);const z=Sn(l),fe=cl(l),K=Number(n.get("adults"))||void 0,E=Z&&Z.byDate&&Object.keys(Z.byDate).length===0;return e.jsxs("div",{className:"gmk",children:[e.jsx(Di,{title:`${(l==null?void 0:l.name)||t("voyages:reserver.tripFallback")}${fe?` · ${fe}`:""} | GO-Makkah`,description:l!=null&&l.name?t("voyages:reserver.seoDesc6",{voyage:l.name,itin:fe||""}):t("voyages:reserver.seoDescFallback6"),path:"/voyages/reserver",robots:"noindex, nofollow"}),e.jsx(Li,{base:"/",solid:!0}),e.jsxs("main",{className:"bg-cream-100 pt-[68px]",children:[e.jsx("div",{className:"mx-auto w-full max-w-[1700px] px-5 pt-8 sm:px-8 sm:pt-12 lg:px-12",children:e.jsxs("div",{className:"reveal",children:[e.jsx(Ci,{children:t(i==="hotels"?"voyages:reserver.eyebrow.hotels":i==="rooms"?"voyages:reserver.eyebrow.rooms":i==="options"?"voyages:reserver.eyebrow.options":i==="recap"?"voyages:reserver.eyebrow.recap":"voyages:reserver.eyebrow.departure")}),e.jsxs("h1",{className:"mt-3 flex max-w-5xl flex-wrap items-baseline gap-x-3 gap-y-2",children:[e.jsx(In,{as:"span",className:"text-[clamp(1.6rem,3.4vw,2.4rem)] leading-tight",children:(l==null?void 0:l.name)||t("voyages:reserver.tripFallback")}),(_==null?void 0:_.tier)&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 self-center rounded-full border border-[var(--accent)]/45 bg-[var(--accent)]/10 px-3 py-1 text-[12.5px] font-bold uppercase tracking-[0.1em] text-gold-deep",children:[e.jsx(h,{name:"star",className:"h-3.5 w-3.5"})," ",_.tier]})]}),(z>0||fe)&&e.jsxs("p",{className:"mt-2 text-[15px] text-ink-soft",children:[z>0&&e.jsx(e.Fragment,{children:t("voyages:reserver.daysNights",{days:z+1,nights:z})}),z>0&&fe?" · ":"",fe]})]})}),e.jsx("div",{className:"mx-auto mt-6 w-full max-w-[1700px] px-5 sm:px-8 lg:px-12",children:(()=>{const B=["votre_omra","vols","hotels","rooms","options","recap"],M=i==="vols"?"vols":i,q=B.indexOf(M),ce=q>=0?B[q+1]:void 0,te=q>0?B[q-1]:void 0,$=de=>t(de==="votre_omra"?"voyages:reserver.tripFallback":"reservation:stepper."+de),W=de=>de==="votre_omra"?o(a(`/voyages${s?`?offer=${s}`:""}`)):Q(de),ye=q>=0?e.jsx(Ba,{index:q+1,total:B.length,name:M==="vols"?t("reservation:banner.departsTitle"):$(M),flat:!0,nextName:ce?$(ce):null,explain:t(M==="hotels"?"voyages:reserver.banner.explainHotels6":M==="options"?"voyages:reserver.banner.explainOptions6":"reservation:banner.explain."+M),onNext:ce?()=>Q(ce):null,onBack:te?()=>W(te):null,disabled:M==="vols"&&!(_!=null&&_.flightId)||M==="hotels"&&!(_!=null&&_.tier)||M==="rooms"&&!(_!=null&&_.combo),disabledHint:M==="vols"?t("reservation:banner.continueBlocked"):M==="hotels"||!(_!=null&&_.tier)?t("voyages:reserver.banner.blockedHotels6"):t("voyages:reserver.banner.blockedRooms6")}):null;return e.jsx(yn,{banner:ye,children:e.jsx(ur,{current:M,bare:!0,go:Q,showVisa:!1,blocked:de=>de==="rooms"&&!(_!=null&&_.tier)||(de==="options"||de==="recap")&&!(_!=null&&_.tier)?t("voyages:reserver.banner.blockedHotels6"):(de==="options"||de==="recap")&&!(_!=null&&_.combo)?t("voyages:reserver.banner.blockedRooms6"):null,firstLabel:t("voyages:reserver.tripFallback"),firstHref:`/voyages${s?`?offer=${s}`:""}`})})})()}),e.jsx("div",{className:"mx-auto w-full max-w-[1700px] px-5 py-8 sm:px-8 sm:py-10 lg:px-12",children:d||!Z?e.jsx("div",{className:"grid place-items-center py-16 text-ink-mute",children:e.jsx(h,{name:"compass",className:"h-8 w-8 animate-pulse"})}):E?e.jsxs("div",{className:"reveal rounded-2xl border border-ink/10 bg-white p-8 text-center shadow-soft",children:[e.jsx("p",{className:"font-display text-[1.3rem] text-navy",children:t("voyages:reserver.noDepartures.title")}),e.jsx("p",{className:"mx-auto mt-2 max-w-md text-[14.5px] text-ink-soft",children:t("voyages:reserver.noDepartures.desc")}),e.jsxs(Cn,{to:"/devis-gratuit",className:"mt-5 inline-flex items-center gap-2 rounded-full bg-[#C0392B] px-7 py-3.5 text-[15.5px] font-bold text-white shadow-lift hover:bg-[#a82f22]",children:[t("voyages:reserver.noDepartures.cta")," ",e.jsx(h,{name:"arrow",className:"h-4 w-4"})]})]}):e.jsxs("div",{className:`grid items-start gap-6 ${i==="recap"?"":"lg:grid-cols-[minmax(0,1fr)_290px]"}`,children:[e.jsx("div",{className:"min-w-0",children:i==="vols"?e.jsx(gr,{b:_,update:Y,go:Q,calData:Z,depImg:k,tripLabel:g}):i==="rooms"?e.jsx(Id,{offer:l,tripLabel:g,itin:fe,b:_,update:Y,go:Q,pax:K,onQuote:()=>Q("options")}):i==="options"?e.jsx(Td,{tripLabel:g,itin:fe,b:_,update:Y,go:Q,pax:K,calData:Z,offer:l,onQuote:()=>Q("recap")}):i==="recap"?e.jsx(Pd,{offer:l,calData:Z,tripLabel:g,itin:fe,b:_,go:Q,pax:K}):e.jsx(Md,{offer:l,tripLabel:g,itin:fe,pax:K,cur:(_==null?void 0:_.currency)||"EUR",flightId:_==null?void 0:_.flightId,onChoose:B=>{Y({tier:B}),Q("rooms")}})}),i!=="recap"&&e.jsx(Dd,{offer:l,calData:Z,b:_,go:Q,step:i==="vols"?"vols":i,tripLabel:g,heroImg:me,pax:K})]})}),(()=>{const B=["votre_omra","vols","hotels","rooms","options","recap"],M=i==="vols"?"vols":i,q=B.indexOf(M),ce=q>=0?B[q+1]:void 0;if(q<0||!ce)return null;const te=q>0?B[q-1]:void 0,$=ye=>t(ye==="votre_omra"?"voyages:reserver.tripFallback":"reservation:stepper."+ye),W=ye=>ye==="votre_omra"?o(a(`/voyages${s?`?offer=${s}`:""}`)):Q(ye);return e.jsx("div",{className:"mx-auto mb-10 w-full max-w-[1700px] px-5 sm:px-8 lg:px-12",children:e.jsx(Ba,{index:q+1,total:B.length,name:M==="vols"?t("reservation:banner.departsTitle"):$(M),nextName:$(ce),explain:t(M==="hotels"?"voyages:reserver.banner.explainHotels6":M==="options"?"voyages:reserver.banner.explainOptions6":"reservation:banner.explain."+M),onNext:()=>Q(ce),onBack:te?()=>W(te):null,disabled:M==="vols"&&!(_!=null&&_.flightId)||M==="hotels"&&!(_!=null&&_.tier)||M==="rooms"&&!(_!=null&&_.combo),disabledHint:t(M==="vols"?"reservation:banner.continueBlocked":M==="hotels"?"voyages:reserver.banner.blockedHotels6":"voyages:reserver.banner.blockedRooms6")})})})()]}),e.jsx(Ei,{})]})}const Vm=Object.freeze(Object.defineProperty({__proto__:null,EMPTY_HOTEL:Zs,PaxStepper:rr,default:Ld,longDateFR:da,tierIconOf:jr},Symbol.toStringTag,{value:"Module"})),ii=ka(),oi=["single","double","triple","quad"],Ed=t=>{const n=(t||"").toLowerCase();return n.startsWith("sin")?"Single":n.startsWith("dou")?"Double":n.startsWith("tri")?"Triple":n.startsWith("qua")?"Quad":t},to=t=>[...new Set(t.map(Ed))].sort((n,o)=>oi.indexOf(n.toLowerCase())-oi.indexOf(o.toLowerCase())),_s=t=>String(t||"").toLowerCase().normalize("NFD").replace(/[Ì-ͯ]/g,"").replace(/\s+/g," ").trim(),ta=t=>{const n=_s(t);return/\b(mak|mec)/.test(n)?"mk":/\b(med|madin)/.test(n)?"md":null},Ad=(t,n)=>{var l,d;const o=(t.prices||[]).filter(c=>Number(c.categoryId)===Number(n)),a=to(o.map(c=>{var m,g;return(typeof c.roomType=="object"?((m=c.roomType)==null?void 0:m.name)||((g=c.roomType)==null?void 0:g.code):c.roomType)||""}
403).filter(Boolean)),s=((l=o.find(c=>Array.isArray(c.cityHotels)&&c.cityHotels.length))==null?void 0:l.cityHotels)||[],i=String(((d=o.find(c=>c.categoryName))==null?void 0:d.categoryName)||"");return{roomTypes:a,cityHotels:s,catName:i}},Rd=(t,n,o)=>{var U;const{roomTypes:a,cityHotels:s,catName:i}=o,l=I=>String(I||"").toLowerCase().trim(),d=_s(n.cityName),c=((U=t.hotels)==null?void 0:U[d])||[],m=s.find(I=>_s(I.cityName)===d)||null,g=c[0]||null,u=[...(Array.isArray(n.hotels)?n.hotels:[]).filter(I=>((I==null?void 0:I.hotelName)||(I==null?void 0:I.hotelId))&&(!I.category||!i||l(I.category)===l(i)))].sort((I,L)=>(Number(I==null?void 0:I.stars)||99)-(Number(L==null?void 0:L.stars)||99)),p=u[0]||null,x=(p==null?void 0:p.hotelName)||(m==null?void 0:m.hotelName)||(g==null?void 0:g.hotelName)||"",j=((p==null?void 0:p.hotelId)??null)||Number(m==null?void 0:m.hotelId)||Number(g==null?void 0:g.hotelId)||null,C=u.slice(1).map(I=>String(I.hotelName||"").trim()).filter(I=>I&&I!==x);return{city:n.cityName,hotel:x,hotelId:j,nights:Number(m==null?void 0:m.nights)||Number(n.nights)||Number(g==null?void 0:g.nights)||null,checkIn:(g==null?void 0:g.checkInDate)||null,checkOut:(g==null?void 0:g.checkOutDate)||null,rooms:a,contractId:null,contractIds:[],baseMealPlan:(m==null?void 0:m.baseMealPlan)||(g==null?void 0:g.baseMealPlan)||null,alternatives:C}},Bd=(t,n,o,a)=>{var L,me,Z,V,k;const s=o==="mk"?n==null?void 0:n.makkah:n==null?void 0:n.medine,i=(o==="mk"?(L=t.roomAvailability)==null?void 0:L.makkah:(me=t.roomAvailability)==null?void 0:me.medine)||[],l=(o==="mk"?(Z=t.hotels)==null?void 0:Z.makkah:(V=t.hotels)==null?void 0:V.medine)||[],d=s==null?void 0:s.hotelId,c=d&&l.find(R=>R.hotelId===d)||l[0]||null,m=d?i.filter(R=>R.hotelId===d):[],g=R=>{var _,be;return typeof R.roomType=="object"?((_=R.roomType)==null?void 0:_.name)||((be=R.roomType)==null?void 0:be.code)||"":String(R.roomType||"")},N=to(m.map(g).filter(Boolean)),u=Number(s==null?void 0:s.contractId)||Number(c==null?void 0:c.contractId)||null,p=[...new Set([...u?[u]:[],...((c==null?void 0:c.contractIds)||[]).map(R=>Number(R)||0),...m.map(R=>Number(R.contractId)||0)])].filter(Boolean),x=c!=null&&c.checkInDate?String(c.checkInDate).slice(0,10):null,j=u?m.filter(R=>Number(R.contractId)===u):m,C=R=>{if(!x)return!0;const _=R.startDate?String(R.startDate).slice(0,10):null,be=R.endDate?String(R.endDate).slice(0,10):null;return!!_&&!!be&&_<=x&&be>=x},I=((k=j.filter(C).sort((R,_)=>String(_.endDate||"").localeCompare(String(R.endDate||"")))[0]||j[0]||m[0])==null?void 0:k.baseMealPlan)||null;return{city:o==="mk"?"Makkah":"Médine",hotel:(s==null?void 0:s.hotelName)||(c==null?void 0:c.hotelName)||"",hotelId:Number(d)||Number(c==null?void 0:c.hotelId)||null,nights:Number(s==null?void 0:s.nights)||Number(c==null?void 0:c.nights)||null,checkIn:(c==null?void 0:c.checkInDate)||null,checkOut:(c==null?void 0:c.checkOutDate)||null,rooms:N.length?N:a,contractId:u||p[0]||null,contractIds:p,baseMealPlan:I,alternatives:[]}},li=(t,n)=>{const o=new Date(String(t).slice(0,10)+"T00:00:00Z");return o.setUTCDate(o.getUTCDate()+n),o.toISOString().slice(0,10)},so=t=>{const n=t.findIndex(s=>s.checkIn);if(n<0)return;const o=t.slice(0,n).reduce((s,i)=>s+(Number(i.nights)||0),0);let a=li(String(t[n].checkIn),-o);for(const s of t){const i=Number(s.nights)||0;s.checkIn=a,s.checkOut=li(a,i),a=s.checkOut}},Fd=(t,n)=>{const o=Ad(t,n),a=(t.prices||[]).find(l=>{var d,c,m,g;return Number(l.categoryId)===Number(n)&&(((d=l.makkah)==null?void 0:d.hotelId)||((c=l.medine)==null?void 0:c.hotelId)||((m=l.makkah)==null?void 0:m.hotelName)||((g=l.medine)==null?void 0:g.hotelName))})||null,i=(t.tripCities||[]).slice().sort((l,d)=>(Number(l.order)||0)-(Number(d.order)||0)).map(l=>{const d=ta(l.cityName),c=d?Bd(t,a,d,o.roomTypes):Rd(t,l,o);return!(Number(c.nights)>0)&&Number(l.nights)>0&&(c.nights=Number(l.nights)),c}).filter(l=>l.hotel||l.rooms.length);return so(i),i};function _d(t){if(!t)return[];const o=(t.tripCities||[]).slice().sort((a,s)=>(Number(a.order)||0)-(Number(s.order)||0)).filter(a=>a==null?void 0:a.cityName).map(a=>{var l,d;const s=ta(a.cityName),i=s?((s==="mk"?(l=t.hotels)==null?void 0:l.makkah:(d=t.hotels)==null?void 0:d.medine)||[])[0]||null:((t.hotels||{})[_s(a.cityName)]||[])[0]||null;return{key:s||_s(a.cityName),label:String(a.cityName),icon:s==="mk"?"kaaba":s==="md"?"mosque":"pin",nights:Number(a.nights)||Number(i==null?void 0:i.nights)||0,checkIn:(i==null?void 0:i.checkInDate)||null,checkOut:(i==null?void 0:i.checkOutDate)||null,isHoly:!!s}});return so(o),o}function Hd(t,n){const o=Ua(t,n);return{cities:b.useMemo(()=>_d(o.data),[o.data]),ra:o.data,isLoading:o.isLoading,isError:o.isError}}function zd(t,n){const o=Ua(t,n),a=b.useMemo(()=>{const c=o.data;if(!c)return[];const m=new Map;for(const g of c.prices||[]){const N=Number(g==null?void 0:g.categoryId)||0;N&&(m.has(N)||m.set(N,String((g==null?void 0:g.categoryName)||"")))}for(const g of c.categories||[]){const N=Number(g==null?void 0:g.id)||0;N&&m.has(N)&&!m.get(N)&&m.set(N,String((g==null?void 0:g.name)||""))}return[...m.entries()].map(([g,N])=>({id:g,name:N||`Catégorie ${g}`}))},[o.data]),s=b.useMemo(()=>{const c={};if(o.data)for(const m of a)c[m.id]=Fd(o.data,m.id);return c},[o.data,a]),i=b.useMemo(()=>Object.values(s).flat().map(c=>
403Number(c.hotelId)).filter(Boolean),[s]),{data:l}=Mn(i);return{tiers:b.useMemo(()=>a.map(c=>{const m=s[c.id]||[],g={};for(const N of m){const u=ta(N.city)||_s(N.city),p=N.hotelId?l==null?void 0:l[N.hotelId]:void 0;g[u]={...Zs,id:N.hotelId,name:((p==null?void 0:p.name)||N.hotel||"").trim(),stars:(p==null?void 0:p.stars)||0,dist:(p==null?void 0:p.dist)||N.city||"",feats:(p==null?void 0:p.feats)||[],views:(p==null?void 0:p.views)||[],imgs:(p==null?void 0:p.imgs)||[]}}return{id:c.id,label:c.name,icon:jr(c.name),slogan:"",minPrice:null,catImg:null,mk:g.mk||Zs,md:g.md||Zs,nightsMk:0,nightsMd:0,hotelByCity:g}}),[a,s,l]),staysByCat:s,isLoading:o.isLoading,isError:o.isError}}async function ci(t){const n=await fetch(t);if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json()}function Ud(t){return Fs({queryKey:["design2026","combine","group",t||0],enabled:!!t,staleTime:300*1e3,retry:1,queryFn:async()=>{const n=await ca.getOne(t).catch(()=>null),o=Number(n==null?void 0:n.groupId)||null;let a=null,s=[];if(o){try{a=await ci(`${ii}/api/booking-groups/public-voyages/${o}`)}catch{a=null}try{const i=await ci(`${ii}/api/packages/by-group/${o}`);s=(Array.isArray(i)?i:[]).map(l=>Number(l==null?void 0:l.id)).filter(Boolean)}catch{s=[]}}return{groupId:o,group:a,packageIds:s}}})}const Vd=["JANVIER","FÃVRIER","MARS","AVRIL","MAI","JUIN","JUILLET","AOÃT","SEPTEMBRE","OCTOBRE","NOVEMBRE","DÃCEMBRE"],qd=t=>{const[n,o,a]=String(t).split("-").map(Number);return new Date(n,(o||1)-1,a||1)};function Gd(t,n){const o=(Array.isArray(t)?t:[]).slice().sort((s,i)=>((s==null?void 0:s.segmentOrder)??0)-((i==null?void 0:i.segmentOrder)??0)),a=s=>/return/i.test(String((s==null?void 0:s.segmentType)||""));return{outbound:o.filter(s=>!a(s)).map(s=>Fr(s,"outbound",n)),inbound:o.filter(a).map(s=>Fr(s,"return",n))}}function ir(t,n){const o={},a=new Set,s=new Set,i=[];for(const x of t){if(!(x!=null&&x.dateISO))continue;a.add(x.originCity||"â"),s.add(x.durationDays);const j=qd(x.dateISO);i.push(new Date(j.getFullYear(),j.getMonth(),1));const C=Gd(x.segments,x.airlineName||"");(o[x.dateISO]=o[x.dateISO]||[]).push({dateISO:x.dateISO,returnISO:x.returnISO,packageId:x.packageId,flightId:x.flightId,packageName:x.packageName,offerName:x.packageName,offerKind:n,destLabel:x.destinationLabel,originCity:x.originCity||"â",destinationCity:"",airlineName:x.airlineName||"",airlineCode:null,airlineLogo:null,nightsInMecca:0,nightsInMedina:0,totalNights:x.durationNights,days:x.durationDays,price:typeof x.price=="number"?x.price:null,currency:x.currency||"EUR",infantPrice:0,outbound:C.outbound,inbound:C.inbound,outboundDuration:0,inboundDuration:0,availableSeats:null,totalSeats:null,baggage:null,travelClass:null,nature:null})}for(const x of Object.values(o))x.sort((j,C)=>(j.price??1/0)-(C.price??1/0));const l=new Date,d=new Date(l.getFullYear(),l.getMonth(),1);let c=d,m=new Date(d.getFullYear(),d.getMonth()+12,1);for(const x of i)x<c&&(c=x),x>m&&(m=x);const g=new Date(c.getFullYear(),c.getMonth()+12,1);m<g&&(m=g);const N=[];for(let x=new Date(c);x<=m;x.setMonth(x.getMonth()+1))N.push({y:x.getFullYear(),m:x.getMonth(),label:`${Vd[x.getMonth()]} ${x.getFullYear()}`});const u=Array.from(a).sort((x,j)=>x.localeCompare(j,"fr")),p=Array.from(s).sort((x,j)=>x-j);return{byDate:o,months:N,cities:u,durations:p}}const Vn="design2026",kr={catalog:()=>[Vn,"voyages","catalog"],categories:(t,n)=>[Vn,"voyages","categories",t||0,n||0],rooms:(t,n,o)=>[Vn,"voyages","rooms",t||0,n||0,o||0]},di=t=>`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`,or=t=>{const n=String(t||"").match(/^(\d{4})-(\d{2})-(\d{2})/);return n?new Date(+n[1],+n[2]-1,+n[3]):new Date(t)},Kd=(t,n)=>Math.max(0,Math.round((or(n).getTime()-or(t).getTime())/864e5)),Yd=["dim.","lun.","mar.","mer.","jeu.","ven.","sam."];function qm(t,n=!0){if(!t)return"";const o=or(t),a=`${o.getDate()} ${pn(o.getMonth()+1)} ${o.getFullYear()}`;return n?`${Yd[o.getDay()]} ${a}`:a}function Gm(t,n="EUR"){if(t==null||!Number.isFinite(Number(t)))return"â";const o=n==="EUR"?"â¬":n==="MAD"?"MAD":n==="SAR"?"SAR":n;return`${xi(t)} ${o}`}const Qd=t=>String(t||"").normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"autre",Wd=[[/quds|qods|j[ée]rusalem|palestin|al[- ]?aqsa|terre des proph|petra|amman/i,"Jordanie"],[/jordan/i,"Jordanie"],[/egypt|égypt|caire|cairo|louxor|luxor|assouan|aswan/i,"Ãgypte"],[/dubai|dubaï|[ée]mirat/i,"Dubaï"],[/oman|muscat|mascate/i,"Oman"],[/maldiv|no
403onu|atoll/i,"Maldives"],[/langkawi|malais|kuala\s*lumpur/i,"Malaisie"],[/phuket|tha[iï]land|bangkok/i,"Thaïlande"],[/maurice|mauritius/i,"Ãle Maurice"],[/bali|indon[ée]si/i,"Bali"],[/safari|kenya|tanzani|nairobi/i,"Safari"],[/istanbul|turquie|turkey|cappadoce/i,"Istanbul"],[/zanzibar/i,"Zanzibar"],[/maroc|marrakech|agadir|casablanca|fès|fes\b/i,"Maroc"],[/randonn|trek|hik/i,"Randonnée"],[/m[ée]dical/i,"Tourisme Médical"]];function ao(t,n){const o=String(t||"").split("â")[0];for(const[i,l]of Wd)if(i.test(o)||i.test(n||""))return l;const a=String(n||"").trim();return a?a.charAt(0).toUpperCase()+a.slice(1).toLowerCase():String(t||"").trim()||"Autre"}function Jd(t,n){const o=`${String(t||"").split("â")[0]} ${n||""}`;return/palestin|jordan|amman|petra|quds|qods|j[ée]rusalem|al[- ]?aqsa/i.test(o)?"Jordanie + Palestine":/\bcaire\b|cairo/i.test(o)?"Le Caire + Croisière sur le Nil":/\bnile\b|\bnil\b/i.test(o)?"Croisière sur le Nil":ao(t,n)}async function Zd(t="tourisme"){const n=new Date,o=new Date(n.getFullYear(),n.getMonth(),1),a=new Date(n.getFullYear()+2,n.getMonth(),1),s=await ca.getCalendarPricing({startDate:di(o),endDate:di(a),...t==="combine"?{travelType:"combine"}:{family:"tourisme"}}),i=[];if(s&&typeof s=="object")for(const[g,N]of Object.entries(s)){const u=(N==null?void 0:N.packages)||[],p=[];for(const j of u){if(!(j!=null&&j.packageId))continue;const C=typeof j.cheapestPrice=="number"?Math.round(j.cheapestPrice):null;if(C==null||C<=0||t==="combine"&&(Number(j.nightsInMecca)||0)+(Number(j.nightsInMedina)||0)<=0)continue;const U=(j.segments||[]).filter(V=>(V==null?void 0:V.segmentType)==="return").sort((V,k)=>((V==null?void 0:V.segmentOrder)??0)-((k==null?void 0:k.segmentOrder)??0)),I=U[U.length-1],L=(I==null?void 0:I.arrivalDate)||j.returnDate||"";if(!L)continue;const me=Kd(g,L);if(me<1||me>45)continue;const Z=t==="combine"?Jd(j.packageName,j.destinationCity):ao(j.packageName,j.destinationCity);p.push({packageId:j.packageId,flightId:j.flightId||0,groupId:Number(j.groupId)||null,packageName:j.packageName||"Voyage",dateISO:g,returnISO:L,originCity:j.originCity||"",airlineName:j.airlineName||"",price:C,currency:j.currency||"EUR",durationNights:me,durationDays:me+1,destinationLabel:Z,destinationSlug:Qd(Z),segments:Array.isArray(j.segments)?j.segments:[]})}const x=new Map;for(const j of p){const C=`${j.originCity}|${j.dateISO}|${j.returnISO}|${j.flightId}|${j.destinationSlug}`,U=x.get(C);(!U||(j.price??1/0)<(U.price??1/0))&&x.set(C,j)}i.push(...x.values())}i.sort((g,N)=>g.dateISO.localeCompare(N.dateISO)||(g.price??1/0)-(N.price??1/0));const l=g=>g.groupId?`g:${g.groupId}`:`s:${g.destinationSlug}`,d=new Map,c=new Map;for(const g of i){const N=l(g);let u=d.get(N);if(u?g.groupId&&g.currency==="EUR"&&c.get(N)!=="EUR"&&(u.label=g.destinationLabel,u.slug=g.destinationSlug,c.set(N,"EUR")):(u={slug:g.destinationSlug,label:g.destinationLabel,groupId:null,offersCount:0,minPrice:null,currency:g.currency,nextDateISO:g.dateISO,cities:[],cityPrices:[],minDays:g.durationDays,maxDays:g.durationDays},d.set(N,u),c.set(N,g.currency)),u.offersCount++,u.groupId==null&&g.groupId&&(u.groupId=g.groupId),g.price!=null&&(u.minPrice==null||g.price<u.minPrice)&&(u.minPrice=g.price,u.currency=g.currency),g.dateISO<u.nextDateISO&&(u.nextDateISO=g.dateISO),g.originCity&&!u.cities.includes(g.originCity)&&u.cities.push(g.originCity),g.durationDays<u.minDays&&(u.minDays=g.durationDays),g.durationDays>u.maxDays&&(u.maxDays=g.durationDays),g.originCity){let p=u.cityPrices.find(x=>x.city===g.originCity);p||(p={city:g.originCity,minPrice:null,currency:g.currency},u.cityPrices.push(p)),g.price!=null&&(p.minPrice==null||g.price<p.minPrice)&&(p.minPrice=g.price,p.currency=g.currency)}}const m=Array.from(d.values()).sort((g,N)=>g.nextDateISO.localeCompare(N.nextDateISO)||g.label.localeCompare(N.label));return{offers:i,destinations:m}}function Km(t){var n,o,a;return t&&(((n=(t.categoryPhotos||[]).find(s=>s==null?void 0:s.photoUrl))==null?void 0:n.photoUrl)||((o=(t.programme||[]).find(s=>s==null?void 0:s.photo))==null?void 0:o.photo)||((a=(t.poiItems||[]).find(s=>s==null?void 0:s.photo))==null?void 0:a.photo))||""}function Ym(t){return((t==null?void 0:t.tripCities)||[]).slice().sort((n,o)=>(Number(n.order)||0)-(Number(o.order)||0)).filter(n=>n==null?void 0:n.cityName).map(n=>{const o=ta(n.cityName);return{label:String(n.cityName),icon:o==="mk"?"kaaba":o==="md"?"mosque":"pin",nights:Number(n.nights)||0,isHoly:!!o}})}function lr(t="tourisme",n=!0){return Fs({queryKey:[...kr.catalog(),t],queryFn:()=>Zd(t),staleTime:300*1e3,enabled:n,retry:3,retryDelay:o=>Math.min(1e3*2**o,15e3),refetchOnWindowFocus:!0,refetchOnReconnect:!0,refetchInterval:o=>{var a;return((a=o==null?void 0:o.state)==null?void 0:a.status)==="error"?2e4:!1}})}async function Xd(t,n,o="EUR"){const a=await ca.getPackageCategories(t,n).catch(()=>[]);if(!a.length)return[];const[s,i]=await Promise.all([ca.getPackageHotelsByCategory(t).cat
403ch(()=>[]),Promise.all(a.map(d=>ca.getMinPrice(t,{categoryId:d.id,...n?{flightId:n}:{}}).catch(()=>null))),cr().catch(()=>{})]),l=`${o||"EUR"}`.toUpperCase();return a.map((d,c)=>{var m,g;return{id:d.id,name:d.name||"Catégorie",minPrice:typeof((m=i[c])==null?void 0:m.minPrice)=="number"?Math.round(Qo(i[c].minPrice,"EUR",l)):null,currency:l,hotels:((g=s.find(N=>N.categoryId===d.id))==null?void 0:g.hotels)||[]}})}function Qm(t,n,o="EUR"){return Fs({queryKey:[...kr.categories(t,n),o],queryFn:()=>Xd(t,n,o),enabled:!!t,staleTime:300*1e3,retry:1})}const em={SGL:1,DBL:2,TPL:3,QDR:4},tm={SGL:"Chambre individuelle",DBL:"Chambre double",TPL:"Chambre triple",QDR:"Chambre quadruple"},sm=["SGL","DBL","TPL","QDR"],am={SGL:"SINGLE",DBL:"DOUBLE",TPL:"TRIPLE",QDR:"QUADRUPLE"},nm=t=>{const n=(t||"").toLowerCase();return n.includes("single")||n==="simple"?"SGL":n.includes("triple")?"TPL":n.includes("quad")?"QDR":"DBL"};async function rm(t,n,o){const a={limit:500};n&&(a.categoryId=n),o&&(a.flightId=o);const s=await ca.getSavedPrices(t,a),i=(s==null?void 0:s.data)||[],l=new Map;let d=null,c=null,m=null;for(const g of i){if((g==null?void 0:g.isAvailable)===!1)continue;const N=Number(g.perPersonPrice)||0;if(N<=0)continue;const u=String(g.roomType||"").trim().toUpperCase();if(u.startsWith("CHILD")||u==="BABY"||u==="INFANT"){const C={perPerson:N,currency:g.currency||"EUR",priceRowId:Number(g.id)||0};u==="BABY"||u==="INFANT"?(!m||N<m.perPerson)&&(m=C):u==="CHILD_NO_BED"?(!c||N<c.perPerson)&&(c=C):(!d||N<d.perPerson)&&(d=C);continue}const p=nm(g.roomType),x=l.get(p);if(x&&x.perPerson<=N)continue;const j=(Array.isArray(g.cityHotels)?g.cityHotels:[]).slice().sort((C,U)=>((C==null?void 0:C.order)??0)-((U==null?void 0:U.order)??0)).map(C=>({cityName:String((C==null?void 0:C.cityName)||""),hotelId:typeof(C==null?void 0:C.hotelId)=="number"?C.hotelId:null,hotelName:String((C==null?void 0:C.hotelName)||""),nights:Number(C==null?void 0:C.nights)||0,mealPlan:String((C==null?void 0:C.baseMealPlan)||"BB")}));l.set(p,{code:p,label:tm[p],capacity:em[p],perPerson:N,currency:g.currency||"EUR",priceRowId:Number(g.id)||0,hotels:j})}return{options:sm.filter(g=>l.has(g)).map(g=>l.get(g)),childPrice:d,childNoBedPrice:c,babyPrice:m}}function Wm(t,n,o){return Fs({queryKey:kr.rooms(t,n,o),queryFn:()=>rm(t,n,o),enabled:!!t,staleTime:120*1e3,retry:1})}const im=t=>({adults:Math.max(1,Number(t==null?void 0:t.adults)||1),children:Math.max(0,Number(t==null?void 0:t.children)||0),babies:Math.max(0,Number(t==null?void 0:t.babies)||0)}),wr=(t="tourisme")=>t==="combine"?"combine_selection":"voyage_selection";function Jm(t,n="tourisme"){try{localStorage.setItem(wr(n),JSON.stringify(t))}catch{}}function om(t="tourisme"){var n,o;try{const a=localStorage.getItem(wr(t));if(!a)return null;const s=JSON.parse(a);if((n=s==null?void 0:s.offer)!=null&&n.packageId&&((o=s==null?void 0:s.offer)!=null&&o.dateISO))return s.pax=im(s.pax),s}catch{}return null}function Zm(t="tourisme"){try{localStorage.removeItem(wr(t))}catch{}}const lm=(t,n)=>{if(n<=0)return[];const o=Math.round(t/n*100)/100,a=new Array(n).fill(o);return a[0]=Math.round((t-o*(n-1))*100)/100,a};async function cm(t){var _,be;const{offer:n,pax:o,category:a,rooms:s,customer:i}=t,l=Math.max(1,o.adults),d=Math.max(0,o.children),c=Math.max(0,o.babies),m=[];let g=0;for(const{option:Y,count:Q}of s)for(let z=0;z<Q;z++)g++,m.push({occ:am[Y.code],cap:Y.capacity,roomNumber:g});const N=[];let u=0,p=0;for(let Y=0;Y<l;Y++){let Q=m[u];Q||(g++,Q={occ:"DOUBLE",cap:2,roomNumber:g},m.push(Q)),N.push({passengerIndex:Y,roomType:Q.occ,roomNumber:Q.roomNumber,roomSharing:Q.cap}),p++,p>=Q.cap&&(u++,p=0)}for(let Y=0;Y<d+c;Y++){const Q=m[m.length?Y%m.length:0]||{occ:"DOUBLE",cap:2,roomNumber:1};N.push({passengerIndex:l+Y,roomType:Q.occ,roomNumber:Q.roomNumber,roomSharing:Q.cap})}const j=(((_=s[0])==null?void 0:_.option.hotels)||[]).filter(Y=>Y.hotelName||Y.hotelId).map(Y=>({location:(Y.cityName||"").toUpperCase()||"SEJOUR",...Y.hotelId?{hotelId:Y.hotelId}:{},hotelName:Y.hotelName,mealPlan:Y.mealPlan||"BB",nights:Y.nights,roomAssignments:N.map(Q=>({passengerIndex:Q.passengerIndex,roomType:Q.roomType,roomNumber:Q.roomNumber,mealPlan:Y.mealPlan||"BB"}))})),C=Math.round(t.total),U=Math.max(0,Math.round(t.childPrice*100)/100),I=Math.max(0,Math.round(t.babyPrice*100)/100),L=C-d*U-c*I,me=[...lm(L,l),...new Array(d).fill(U),...new Array(c).fill(I)],Z=[];
403Z.push({firstName:i.firstName,lastName:i.lastName,passengerType:"adult"});for(let Y=1;Y<l;Y++)Z.push({firstName:`Adulte ${Y+1}`,lastName:"",passengerType:"adult"});for(let Y=0;Y<d;Y++)Z.push({firstName:`Enfant ${Y+1}`,lastName:"",passengerType:"child",withBed:!1});for(let Y=0;Y<c;Y++)Z.push({firstName:`Bébé ${Y+1}`,lastName:"",passengerType:"infant",withBed:!1});for(let Y=0;Y<Z.length;Y++){const Q=me[Y]||0;Object.assign(Z[Y],{roomSharing:((be=N[Y])==null?void 0:be.roomSharing)||2,packagePrice:Q,visaAmount:0,taxKsa:0,insuranceAmount:0,totalPrice:Q})}const V=s.map(({option:Y,count:Q})=>`${Q}à ${Y.label}`).join(", "),k={customerTitle:"M.",customerFirstName:i.firstName,customerLastName:i.lastName,customerEmail:i.email,customerPhone:i.phone||"",adultsCount:l,childrenCount:d,infantsCount:c,bookingType:t.mode==="combine"?"Omra combiné":"tourisme",totalAmount:C,currency:(t.currency||"EUR").toUpperCase(),passengers:Z,hotels:j,packageId:n.packageId,packageName:n.packageName,flightId:n.flightId||void 0,categoryId:(a==null?void 0:a.id)||void 0,departureCity:n.originCity||void 0,departureDate:n.dateISO,returnDate:n.returnISO,source:t.mode==="combine"?"site-2026-combine":"site-2026-voyages",callbackConsent:t.callbackConsent??!1,customerNotes:[`Réservation ${t.mode==="combine"?"Omra Combiné":"voyage tourisme"} en ligne â ${n.destinationLabel} (${n.packageName}).`,a?`Catégorie : ${a.name}.`:null,V?`Chambres : ${V}.`:null,d?`Enfants -12 ans : ${d} à ${U} ${(t.currency||"EUR").toUpperCase()} (partagent la chambre, sans lit).`:null,c?`Bébés -2 ans : ${c} à ${I} ${(t.currency||"EUR").toUpperCase()} (forfait).`:null,t.message?`Message client : ${t.message}`:null].filter(Boolean).join(" ")},R=await Yo.createDirectBooking(k);return{reference:(R==null?void 0:R.bookingReference)||String((R==null?void 0:R.id)||""),autoLoginUrl:R==null?void 0:R.autoLoginUrl}}export{Zm as A,Um as R,yn as S,Vm as V,zm as a,lc as b,Rm as c,Fi as d,mc as e,Fm as f,Bm as g,Nd as h,_m as i,Hm as j,Gm as k,zi as l,ur as m,Ba as n,Km as o,qm as p,om as q,im as r,Ji as s,di as t,lr as u,Ym as v,Jm as w,Qm as x,Wm as y,cm as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.