PageSourceSearch

https://parcdelaluge.re/_next/static/chunks/pages/tibolide/reservation-d8a19eb7096527e2.js

js parcdelaluge.re collected 2026-09-25 09:43:01 UTC 31,916 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[706],{9609:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tibolide/reservation",function(){return i(7471)}])},6330:function(e,t,i){"use strict";var s=i(5893);let n={tibolide_moteur:"Quad & moto",tibolide_draisienne:"Draisienne"},r=e=>"".concat((Number(e||0)/100).toFixed(2).replace(".",",")," €");t.Z=e=>{var t;let{quote:i}=e;return i&&((null===(t=i.sessions)||void 0===t?void 0:t.length)||i.trott)?(0,s.jsxs)("div",{className:"text-left text-sm",children:[(0,s.jsxs)("ul",{className:"space-y-1",children:[(i.sessions||[]).map((e,t)=>(0,s.jsxs)("li",{className:"flex justify-between gap-2",children:[(0,s.jsxs)("span",{children:["Session ",t+1," — ",n[e.sessionType]||e.sessionType," (",e.riders," enfant",e.riders>1?"s":"",")"]}),(0,s.jsxs)("span",{className:"whitespace-nowrap font-semibold",children:[e.riders," \xd7 ",r(e.unitCents)," = ",r(e.totalCents)]})]},t)),i.trott?(0,s.jsxs)("li",{className:"flex justify-between gap-2",children:[(0,s.jsxs)("span",{children:["Trottinettes (",i.trott.riders,")"]}),(0,s.jsxs)("span",{className:"whitespace-nowrap font-semibold",children:[i.trott.riders," \xd7 ",r(i.trott.unitCents)," ="," ",r(i.trott.totalCents)]})]}):null]}),(0,s.jsxs)("p",{className:"mt-1 flex justify-between border-t border-current/20 pt-1 font-bold",children:[(0,s.jsx)("span",{children:"Total"}),(0,s.jsx)("span",{children:r(i.totalCents)})]})]}):null}},6574:function(e,t,i){"use strict";i.d(t,{j:function(){return s}});let s=async(e,t)=>{if((e.headers.get("content-type")||"").includes("application/json")){let t=await e.json().catch(()=>null);if(t&&"string"==typeof t.error&&t.error.trim().length>0)return t.error}return await e.text().catch(()=>"")||t}},9712:function(e,t,i){"use strict";i.d(t,{HY:function(){return s},Ir:function(){return n},_L:function(){return r},d1:function(){return l},f3:function(){return a}});let s={tibolide:"Ti'Bolide",trott:"Trott"},n={tibolide_moteur:"Ti'Bolide \xb7 Quad & moto",tibolide_draisienne:"Ti'Bolide \xb7 Draisienne",tibolide_quad:"Ti'Bolide \xb7 Quad",tibolide_moto:"Ti'Bolide \xb7 Moto",trott:"Trott"},r={pending_payment:"\xc0 r\xe9gler \xe0 l’accueil",queued:"En file",called:"C'est \xe0 vous ! Pr\xe9sentez-vous \xe0 l'accueil",running:"Session en cours",done:"Session pass\xe9e",no_show:"Non pr\xe9sent\xe9"},a="2026-07-02.1",l="Je confirme avoir pris connaissance et j'accepte : les consignes de s\xe9curit\xe9 et d'utilisation affich\xe9es \xe0 l'accueil, ainsi que la grille de retenues en cas de casse (caution) affich\xe9e \xe0 l'accueil. Je m'engage \xe0 respecter les consignes qui me seront donn\xe9es par l'op\xe9rateur avant la session et \xe0 adapter ma conduite \xe0 mes capacit\xe9s. Je pratique l'activit\xe9 \xe0 mes risques et p\xe9rils et suis responsable des dommages que je pourrais causer. Pour un mineur : j'accepte en tant que parent ou adulte responsable."},8832:function(e,t,i){"use strict";i.d(t,{Yp:function(){return u},l6:function(){return d},o$:function(){return c},q9:function(){return o},rB:function(){return r},ti:function(){return a},w6:function(){return l}});var s=i(6574);let n=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Une erreur est survenue.",n=await fetch(e,{method:t.method||"GET",headers:{"Content-Type":"application/json"},body:t.body?JSON.stringify(t.body):void 0});if(!n.ok)throw Object.assign(Error(await (0,s.j)(n,i)),{status:n.status});return n.json()},r=e=>n("/api/tibolide/verify",{method:"POST",body:e},"Impossible de v\xe9rifier cette commande."),a=()=>n("/api/tibolide/queue/config",{},"Impossible de charger la configuration."),l=e=>n("/api/tibolide/queue/join",{method:"POST",body:e},"Impossible de rejoindre la file."),o=e=>n("/api/tibolide/queue/status",{method:"POST",body:e},"Impossible de charger la file."),c=()=>n("/api/tibolide/queue/board",{},"Impossible de charger l'\xe9tat de la file."),d=e=>n("/api/tibolide/queue/walkin",{method:"POST",body:e},"Impossible de cr\xe9er la r\xe9servation."),u=e=>n("/api/tibolide/queue/cancel",{method:"POST",body:e},"Impossible d'annuler ce groupe.")},1084:function(e,t,i){"use strict";i.d(t,{Os:function(){return r},Rc:function(){return a}});let s="Indian/Reunion";new Intl.DateTimeFormat("fr-CA",{timeZone:s,year:"numeric",month:"2-digit",day:"2-digit"});let n=new Intl.DateTimeFormat("fr-FR",{timeZone:s,hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),r=e=>"string"==typeof e?e.slice(0,5):"",a=e=>Number.isFinite(e)?n.format(new Date(e)).replace(/ /g,"").replace(/h/g,":").slice(0,5).replace(":","h"):""},7471:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return L}});var s=i(5893),n=i(9008),r=i.n(n),a=i(1163),l=i(1664),o=i.n(l),c=e=>{let{children:t}=e;return(0,s.jsxs)("div",{className:"flex min-h-screen flex-col bg-gray-50",children:[(0,s.jsx)("header",{className:"border-b border-gray-200 bg-white",children:(0,s.jsxs)("div",{className:"mx-auto flex max-w-xl items-center justify-between px-4 py-3",children:[(0,s.jsxs)("p",{className:"text-base font-bold text-gray-900",children:["Parc de la Luge ",(0,s.jsx)("span",{className:"text-indigo-600",children:"\xb7 Ti'Bolide"})]}),(0,s.jsx)(o(),{href:"/",className:"rounded-lg px-2 py-1 text-sm font-semibold text-indigo-600 transition hover:text-indigo-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:"Site du parc"})]})}),(0,s.jsx)("main",{className:"mx-auto w-full max-w-xl flex-1 px-4 py-6",children:t}),(0,s.jsx)("footer",{className:"border-t border-gray-200 bg-white",children:(0,s.jsxs)("p",{className:"mx-auto max-w-xl px-4 py-4 text-xs text-gray-500",children:["Un souci avec ta r\xe9servation ? Contacte-nous via la page"," ",(0,s.jsx)(o(),{href:"/#contact",className:"font-semibold text-indigo-600 underline",children:"contact du parc"}),"."]})})]})},d=i(7294);let u=function(e){let{heightCm:t,weightKg:i,ageYears:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[[e.height_min_cm,t,(e,t)=>t>=e],[e.height_max_cm,t,(e,t)=>t<=e],[e.weight_min_kg,i,(e,t)=>t>=e],[e.weight_max_kg,i,(e,t)=>t<=e],[e.age_min_years,s,(e,t)=>t>=e],[e.age_max_years,s,(e,t)=>t<=e]].every(e=>{let[t,i,s]=e;return null==t||Number.isFinite(i)&&i>0&&s(t,i)})},m=(e,t)=>
1(e||[]).filter(e=>u(e,t)).map(e=>e.code),g=e=>({height:(e||[]).some(e=>null!==e.height_min_cm||null!==e.height_max_cm),weight:(e||[]).some(e=>null!==e.weight_min_kg||null!==e.weight_max_kg),age:(e||[]).some(e=>{var t,i;return(null!==(t=e.age_min_years)&&void 0!==t?t:null)!==null||(null!==(i=e.age_max_years)&&void 0!==i?i:null)!==null})}),p=e=>{let t=[],i=null==e?void 0:e.height_min_cm,s=null==e?void 0:e.height_max_cm,n=null==e?void 0:e.weight_max_kg,r=null==e?void 0:e.age_min_years,a=null==e?void 0:e.age_max_years;return null!=i&&null!=s?t.push("".concat(i,"-").concat(s," cm")):null!=i?t.push("d\xe8s ".concat(i," cm")):null!=s&&t.push("".concat(s," cm max")),null!=n&&t.push("".concat(n," kg max")),null!=r&&null!=a?t.push("".concat(r,"-").concat(a," ans")):null!=r?t.push("d\xe8s ".concat(r," ans")):null!=a&&t.push("jusqu'\xe0 ".concat(a," ans")),t.join(" \xb7 ")},x=[["ageYears","\xc2ge (ans)",1,99,"age"],["heightCm","Taille (cm)",50,220,"height"],["weightKg","Poids (kg)",5,150,"weight"]];var h=e=>{let{index:t,participant:i,vehicleTypes:n,onChange:r,onRemove:a}=e,l=n.filter(e=>e.activity===i.activity),o=g(l),c=x.filter(e=>{let[,,,,t]=e;return o[t]}),d=m(l,Object.fromEntries(x.map(e=>{let[t]=e;return[t,""===i[t]?void 0:Number(i[t])]}))),u=c.every(e=>{let[t]=e;return""!==i[t]});return(0,s.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("p",{className:"text-sm font-semibold text-gray-900",children:["Participant ",t+1]}),(0,s.jsx)("button",{type:"button",onClick:a,className:"rounded px-2 py-1 text-xs font-semibold text-red-600 underline focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400",children:"Retirer"})]}),(0,s.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2 sm:grid-cols-4",children:[c.map(e=>{let[n,a,l,o]=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"".concat(n,"-").concat(t),className:"block text-xs font-medium text-gray-600",children:a}),(0,s.jsx)("input",{id:"".concat(n,"-").concat(t),type:"number",inputMode:"numeric",min:l,max:o,value:i[n],onChange:e=>r({[n]:e.target.value,vehicleCode:""}),className:"mt-1 w-full rounded-lg border border-gray-300 px-3 py-2 text-base focus:outline-none focus:ring-2 focus:ring-indigo-500"})]},n)}),(0,s.jsxs)("div",{className:0===c.length?"col-span-2 sm:col-span-4":"",children:[(0,s.jsx)("label",{htmlFor:"vehicle-".concat(t),className:"block text-xs font-medium text-gray-600",children:"Engin"}),(0,s.jsxs)("select",{id:"vehicle-".concat(t),value:i.vehicleCode,onChange:e=>r({vehicleCode:e.target.value}),className:"mt-1 w-full rounded-lg border border-gray-300 bg-white px-3 py-2 text-base focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[(0,s.jsx)("option",{value:"",children:"— Choisir —"}),l.map(e=>(0,s.jsxs)("option",{value:e.code,disabled:!d.includes(e.code),children:[e.label,p(e)?" — ".concat(p(e)):"",d.includes(e.code)?"":" (non accessible)"]},e.code))]})]})]}),c.length>0&&u&&0===d.length?(0,s.jsx)("p",{className:"mt-2 text-xs text-red-600",children:"Aucun engin accessible avec ces informations. V\xe9rifie l'\xe2ge, la taille et le poids saisis."}):null]})},b=i(6330),f=i(9712);let y={tibolideTiers:[{minRiders:4,unitCents:500},{minRiders:2,unitCents:600},{minRiders:1,unitCents:700}],trottUnitCents:1500},v=e=>Object.values(e||{}).reduce((e,t)=>e+Number(t||0),0),j=(e,t)=>(t.find(t=>e>=t.minRiders)||t[t.length-1]).unitCents,N=(e,t,i)=>{let s={...e},n=[];for(;v(s)>0;){let e=i,r=0;Object.keys(s).forEach(i=>{let n=Math.min(Number(s[i]||0),Math.max(Number(null==t?void 0:t[i])||0,0),e);s[i]-=n,r+=n,e-=n}),0===r&&(r=v(s),Object.keys(s).forEach(e=>{s[e]=0})),n.push(r)}return n},w=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y,s=[],n=null;(e||[]).forEach(e=>{if("trott"===e.activity){let t=v(e.vehicle_counts),s=(null==n?void 0:n.riders)||0;n={riders:s+t,unitCents:i.trottUnitCents,totalCents:(s+t)*i.trottUnitCents};return}N(e.vehicle_counts||{},t.capacity,t.maxRiders).forEach(t=>{let n=j(t,i.tibolideTiers);s.push({sessionType:e.session_type,riders:t,unitCents:n,totalCents:t*n})})});let r=s.reduce((e,t)=>
1e+t.totalCents,0)+((null==n?void 0:n.totalCents)||0);return{sessions:s,trott:n,totalCents:r}};var C=e=>{let{quotas:t,vehicleTypes:i,onJoin:n,isJoining:r,errorMessage:a,hideQuota:l=!1,pricing:c=null}=e,[u,m]=(0,d.useState)([]),[g,p]=(0,d.useState)(!1),[x,y]=(0,d.useState)(!1),v=e=>u.filter(t=>t.activity===e).length,j=Object.entries(t||{}).filter(e=>{let[,t]=e;return t.total>0}),N=new Set(u.map(e=>e.activity)),C=u.length>0&&u.every(e=>e.vehicleCode)&&x,_=new Map((i||[]).map(e=>[e.code,e])),k=(()=>{let e=new Map;return u.forEach(t=>{let i=_.get(t.vehicleCode);if(!i)return;let s=e.get(i.session_type)||{session_type:i.session_type,activity:i.activity,vehicle_counts:{}};s.vehicle_counts[i.code]=(s.vehicle_counts[i.code]||0)+1,e.set(i.session_type,s)}),Array.from(e.values())})(),S=c&&k.length>0?w(k,c):null,T=k.some(e=>"tibolide_draisienne"===e.session_type)&&k.some(e=>"tibolide"===e.activity&&"tibolide_draisienne"!==e.session_type),q=e=>m(t=>[...t,{activity:e,vehicleCode:"",heightCm:"",weightKg:"",ageYears:""}]),E=(e,t)=>m(i=>
1[...i,{activity:t,vehicleCode:"",heightCm:e.heightCm,weightKg:e.weightKg,ageYears:e.ageYears}]),O=async e=>{e.preventDefault(),C&&!r&&await n({participants:u.map(e=>({vehicleCode:e.vehicleCode,heightCm:""===e.heightCm?void 0:Number(e.heightCm),weightKg:""===e.weightKg?void 0:Number(e.weightKg),ageYears:""===e.ageYears?void 0:Number(e.ageYears)})),passTogether:N.size>1&&g,briefAccepted:x,briefVersion:f.f3})};return(0,s.jsxs)("form",{onSubmit:O,className:"rounded-xl border border-gray-200 bg-white p-4 shadow-md",children:[(0,s.jsx)("h2",{className:"text-base font-bold text-gray-900",children:"Qui participe aujourd'hui ?"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-600",children:"Pour les engins enfants, indique l'\xe2ge, la taille et le poids de ton enfant."}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-gray-500",children:["Ces informations servent uniquement \xe0 v\xe9rifier que chaque participant peut utiliser l'engin choisi. Elles sont supprim\xe9es automatiquement sous 7 jours —"," ",(0,s.jsx)(o(),{href:"/politique-de-confidentialite",className:"underline hover:text-indigo-600",children:"politique de confidentialit\xe9"}),"."]}),j.map(e=>{var n,r;let[a,o]=e,c=j.map(e=>{let[t]=e;return t}).find(e=>e!==a),d=c&&v(c)<(null!==(r=null==t?void 0:null===(n=t[c])||void 0===n?void 0:n.remaining)&&void 0!==r?r:0);return(0,s.jsxs)("section",{className:"mt-4","aria-label":f.HY[a],children:[(0,s.jsxs)("h3",{className:"text-sm font-semibold text-gray-900",children:[f.HY[a],l?null:(0,s.jsxs)("span",{className:"font-normal text-gray-500",children:[" ","(",o.remaining-v(a)," place",o.remaining-v(a)>1?"s":""," restante",o.remaining-v(a)>1?"s":"",")"]})]}),(0,s.jsx)("ul",{className:"mt-2 space-y-2",children:u.map((e,t)=>e.activity===a?(0,s.jsxs)("li",{children:[(0,s.jsx)(h,{index:t,participant:e,vehicleTypes:i,onChange:e=>m(i=>i.map((i,s)=>s===t?{...i,...e}:i)),onRemove:()=>m(e=>e.filter((e,i)=>i!==t))}),e.vehicleCode&&d?(0,s.jsxs)("button",{type:"button",onClick:()=>E(e,c),className:"mt-1 w-full rounded-lg border border-dashed border-gray-300 px-3 py-2 text-xs font-semibold text-gray-600 transition hover:border-indigo-400 hover:text-indigo-600",children:["↩ Faire aussi ",f.HY[c]," (m\xeames mesures)"]}):null]},t):null)}),(0,s.jsxs)("button",{type:"button",onClick:()=>q(a),disabled:v(a)>=o.remaining,className:"mt-2 w-full rounded-lg border border-indigo-600 px-3 py-2 text-sm font-semibold text-indigo-600 transition hover:bg-indigo-50 disabled:cursor-not-allowed disabled:opacity-50",children:["+ Ajouter un participant ",f.HY[a]]})]},a)}),N.size>1?(0,s.jsxs)("fieldset",{className:"mt-4 rounded-lg border border-gray-200 bg-gray-50 p-3",children:[(0,s.jsx)("legend",{className:"px-1 text-sm font-semibold text-gray-900",children:"Vos deux activit\xe9s : comment souhaitez-vous passer ?"}),(0,s.jsxs)("label",{className:"flex items-start gap-2 text-sm text-gray-700",children:[(0,s.jsx)("input",{type:"radio",name:"pass-preference",checked:!g,onChange:()=>p(!1),className:"mt-1 h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,s.jsxs)("span",{children:["⏭ ",(0,s.jsx)("strong",{children:"L'un apr\xe8s l'autre"})," — ex. les parents surveillent le Ti'Bolide des enfants, puis font leur trott"]})]}),(0,s.jsxs)("label",{className:"mt-2 flex items-start gap-2 text-sm text-gray-700",children:[(0,s.jsx)("input",{type:"radio",name:"pass-preference",checked:g,onChange:()=>p(!0),className:"mt-1 h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,s.jsxs)("span",{children:["\uD83D\uDD17 ",(0,s.jsx)("strong",{children:"En m\xeame temps"})," — ex. un adulte reste spectateur (l'attente peut \xeatre un peu plus longue)"]})]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-gray-500",children:"L'op\xe9rateur organise les passages selon votre choix."})]}):null,S?(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-indigo-200 bg-indigo-50 p-3 text-indigo-900",children:[(0,s.jsx)("p",{className:"text-xs font-bold uppercase tracking-wide",children:"\xc0 r\xe9gler \xe0 l'accueil"}),(0,s.jsx)("div",{className:"mt-1",children:(0,s.jsx)(b.Z,{quote:S})}),T?(0,s.jsx)("p",{className:"mt-2 rounded-lg bg-white/70 px-2 py-1.5 text-xs",children:"ℹ️ La draisie
1nne roule dans sa propre session (jamais m\xe9lang\xe9e aux quads et motos) : vos passages seront s\xe9par\xe9s — le tarif ci-dessus en tient compte."}):null,(0,s.jsx)("p",{className:"mt-1 text-[11px] text-indigo-700",children:"Prix d\xe9finitif confirm\xe9 \xe0 la validation. Qui roule avec qui se r\xe8gle avec l'op\xe9rateur \xe0 l'accueil — sans changer le prix."})]}):null,(0,s.jsxs)("label",{className:"mt-4 flex items-start gap-2 rounded-lg border border-gray-200 bg-gray-50 p-3 text-xs text-gray-700",children:[(0,s.jsx)("input",{type:"checkbox",checked:x,onChange:e=>y(e.target.checked),className:"mt-0.5 h-4 w-4 shrink-0 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"}),(0,s.jsx)("span",{children:f.d1})]}),a?(0,s.jsx)("p",{role:"alert",className:"mt-3 rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:a}):null,(0,s.jsx)("button",{type:"submit",disabled:!C||r,className:"mt-4 w-full rounded-lg bg-indigo-600 px-4 py-3 text-base font-bold text-white shadow transition hover:bg-indigo-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 disabled:cursor-not-allowed disabled:opacity-60",children:r?"Entr\xe9e dans la file…":"Rejoindre la file"})]})},_=i(1084);let k=e=>"".concat((Number(e||0)/100).toFixed(2).replace(".",",")," €");var S=e=>{let{status:t,onCancelGroup:i,cancellingGroupId:n,onAddParticipants:r}=e;return(0,s.jsxs)("section",{className:"rounded-xl border border-gray-200 bg-white p-5 shadow-md",children:[(t.parties||[]).map(e=>(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"R\xe9f\xe9rence \xe0 donner \xe0 l'accueil :"}),(0,s.jsx)("p",{className:"mt-1 text-3xl font-extrabold tracking-widest text-indigo-600",children:e.partyRef}),(e.groups||[]).some(e=>"pending_payment"===e.status)?(0,s.jsxs)("div",{className:"mt-3 rounded-xl border border-amber-300 bg-amber-50 px-4 py-3 text-amber-900",children:[(0,s.jsx)("p",{className:"text-sm font-bold",children:"Pr\xe9sente-toi \xe0 l'accueil pour r\xe9gler"}),Number.isFinite(Number(e.quoteTotalCents))?(0,s.jsx)("p",{className:"text-2xl font-black",children:k(e.quoteTotalCents)}):null,e.quoteDetail?(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(b.Z,{quote:e.quoteDetail})}):null,(0,s.jsx)("p",{className:"mt-1 text-xs",children:"Carte, esp\xe8ces, pass loisirs ou ch\xe8ques vacances. \xc0 r\xe9gler sous 30 minutes — pass\xe9 ce d\xe9lai, pr\xe9sente-toi quand m\xeame : l'accueil peut r\xe9activer ta r\xe9servation. Apr\xe8s r\xe8glement, tu entres dans la file."})]}):null,(0,s.jsx)("ul",{className:"mt-4 space-y-2 text-left","aria-label":"Vos passages",children:(e.groups||[]).map(e=>{let t="queued"===e.status||"pending_payment"===e.status,r="called"===e.status;return(0,s.jsxs)("li",{className:"rounded-lg border px-3 py-3 ".concat(r?"border-emerald-300 bg-emerald-50":"border-gray-200 bg-gray-50"),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsxs)("p",{className:"text-sm font-semibold text-gray-900",children:[f.HY[e.activity]||e.activity," \xb7"," ",e.participantCount," pers."]}),t?(0,s.jsx)("button",{type:"button",onClick:()=>void i(e.id),disabled:!!n,className:"rounded-lg border border-red-200 px-3 py-1.5 text-xs font-semibold text-red-600 transition hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-60",children:n===e.id?"Annulation…":"Annuler"}):null]}),(0,s.jsxs)("p",{className:"mt-1 text-sm ".concat(r?"font-bold text-emerald-700":"text-gray-700"),"aria-live":"polite",children:[f._L[e.status]||e.status,t&&e.position?" \xb7 ".concat(e.position,"ᵉ dans la file"):""]}),t&&Number.isFinite(e.etaStartMs)?(0,s.jsxs)("p",{className:"text-sm text-gray-700",children:["Passage estim\xe9 ",(0,s.jsxs)("strong",{children:["~",(0,_.Rc)(e.etaStartMs)]}),Number.isFinite(e.etaCalledMs)?" (appel ~".concat((0,_.Rc)(e.etaCalledMs),")"):""]}):null]},e.id)})})]},e.id)),(0,s.jsxs)("div",{className:"mt-4 rounded-lg bg-gray-50 p-3 text-left text-xs text-gray-600",children:[(0,s.jsx)("p",{children:"\uD83D\uDCF1 Fais une capture d'\xe9cran de ta r\xe9f\xe9rence (r\xe9seau parfois faible au Ma\xefdo)."}),(0,s.jsx)("p",{className:"mt-1",children:"Les heures sont des estimations qui s'actualisent automatiquement : reste \xe0 proximit\xe9 de l'accueil quand ton passage approche."})]}),r?(0,s.jsx)("button",{type:"button",onClick:r,className:"mt-4 w-full rounded-lg border border-indigo-600 px-4 py-3 text-base font-bold text-indigo-600 transition hover:bg-indigo-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:"Ajouter des participants"}):null]})},T=()=>(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-gray-200 bg-gray-50 p-4 text-sm text-gray-700",children:[(0,s.jsx)("p",{className:"font-semibold text-gray-900",children:"O\xf9 trouver le num\xe9ro de r\xe9servation ?"}),(0,s.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5",children:[(0,s.jsx)("li",{children:"Dans l'email Billetweb re\xe7u apr\xe8s l'achat (objet \xab\xa0Billetterie du Parc de la Luge\xa0\xbb), \xe0 la ligne \xab\xa0Votre r\xe9servation\xa0\xbb."}),(0,s.jsx)("li",{children:"C'est aussi le nom du billet PDF en pi\xe8ce jointe."})]}),(0,s.jsxs)("figure",{className:"mt-3 rounded-lg border border-gray-300 bg-white p-3","aria-label":"Exemple d'email de confirmation Billetweb",children:[(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"De\xa0: Billetweb — Billetterie du Parc de la Luge"}),(0,s.jsx)("p",{className:"mt-2 text-center text-sm font-semibold text-gray-900",children:"✓ R\xe9servation confirm\xe9e"}),(0,s.jsxs)("p",{className:"mt-2 text-sm text-gray-700",children:["Votre r\xe9servation"," ",(0,s.jsx)("mark",{className:"rounded bg-yellow-200 px-1 font-bold text-gray-900",children:"C942-8929-E1350897"})," ",(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"G\xe9rer ma commande"})]}),(0,s.jsx)("figcaption",{className:"mt-2 text-xs text-gray-500",children:"C'est ce num\xe9ro qu'il faut saisir — avec ou sans les tirets, peu importe."})]}),(0,s.jsx)("p",{className:"mt-3",children:"Une seule saisie suffit pour toute la r\xe9servation\xa0: 
1si tu as achet\xe9 4 billets, tu pourras r\xe9server jusqu'\xe0 4 places."})]}),q=e=>{let{onVerify:t,isVerifying:i,errorMessage:n}=e,[r,a]=(0,d.useState)(""),[l,o]=(0,d.useState)(""),[c,u]=(0,d.useState)(!1),m=async e=>{e.preventDefault(),i||await t({email:r.trim(),orderReference:l.trim()})};return(0,s.jsxs)("section",{className:"rounded-xl border border-gray-200 bg-white p-5 shadow-md",children:[(0,s.jsx)("h1",{className:"text-xl font-bold text-gray-900",children:"R\xe9serve ton cr\xe9neau Ti'Bolide"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-600",children:"Munis-toi de ton billet\xa0: la r\xe9servation est r\xe9serv\xe9e aux d\xe9tenteurs d'un billet Ti'Bolide achet\xe9 en ligne."}),(0,s.jsxs)("form",{onSubmit:m,className:"mt-5 space-y-4",noValidate:!0,children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"tibolide-email",className:"block text-sm font-medium text-gray-700",children:"Email utilis\xe9 pour l'achat"}),(0,s.jsx)("input",{id:"tibolide-email",type:"email",name:"email",autoComplete:"email",inputMode:"email",required:!0,value:r,onChange:e=>a(e.target.value),className:"mt-1 w-full rounded-lg border border-gray-300 px-3 py-3 text-base text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500",placeholder:"[email protected]"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"tibolide-order",className:"block text-sm font-medium text-gray-700",children:"Num\xe9ro de r\xe9servation Billetweb"}),(0,s.jsx)("input",{id:"tibolide-order",type:"text",name:"orderReference",autoComplete:"off",autoCapitalize:"characters",required:!0,value:l,onChange:e=>o(e.target.value),className:"mt-1 w-full rounded-lg border border-gray-300 px-3 py-3 text-base text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500",placeholder:"Ex : C942-8929-E1350897","aria-describedby":"tibolide-order-help-toggle"}),(0,s.jsx)("button",{id:"tibolide-order-help-toggle",type:"button",onClick:()=>u(e=>!e),"aria-expanded":c,className:"mt-2 text-sm font-semibold text-indigo-600 underline focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:"O\xf9 trouver ce num\xe9ro\xa0?"}),c?(0,s.jsx)(T,{}):null]}),n?(0,s.jsx)("p",{role:"alert",className:"rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:n}):null,(0,s.jsx)("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-indigo-600 px-4 py-3 text-base font-bold text-white shadow transition hover:bg-indigo-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 disabled:cursor-not-allowed disabled:opacity-60",children:i?"V\xe9rification en cours…":"V\xe9rifier ma commande"})]})]})},E=i(8832);let O="tibolide_queue_token_v1",P=e=>{if(e)try{window.localStorage.setItem(O,JSON.stringify({token:e,savedAt:Date.now()}))}catch(e){}},R=()=>{try{let e=window.localStorage.getItem(O);if(!e)return"";let t=JSON.parse(e);if(!("string"==typeof(null==t?void 0:t.token)&&""!==t.token&&Date.now()-Number(t.savedAt||0)<=432e5))return window.localStorage.removeItem(O),"";return t.token}catch(e){return I(),""}},I=()=>{try{window.localStorage.removeItem(O)}catch(e){}},F={VERIFY:"verify",COMPOSE:"compose",WALKIN_COMPOSE:"walkin_compose",STATUS:"status"},M={tibolide:{total:8,used:0,remaining:8},trott:{total:8,used:0,remaining:8}},A=[401,403,404],B=e=>Promise.race([e,new Promise((e,t)=>{setTimeout(()=>t(Error("Reprise du suivi trop lente.")),8e3)})]),D=e=>{var t;return!!(null==e?void 0:null===(t=e.parties)||void 0===t?void 0:t.some(e=>(e.groups||[]).length>0))};var Y=()=>{let[e,t]=(0,d.useState)(F.VERIFY),[i,s]=(0,d.useState)(""),[n,r]=(0,d.useState)(null),[a,l]=(0,d.useState)(null),[o,c]=(0,d.useState)(null),[u,m]=(0,d.useState)(""),[g,p]=(0,d.useState)(!1),[x,h]=(0,d.useState)(!1),[b,f]=(0,d.useState)(""),[y,v]=(0,d.useState)(!1),j=(0,d.useRef)(""),N=(0,d.useCallback)(async()=>{if(j.current)try{c(await (0,E.q9)({token:j.current}))}catch(e){m(e instanceof Error?e.message:"Actualisation impossible.")}},[]);(0,d.useEffect)(()=>{let e=R();if(!e)return;let i=!1;return(async()=>{v(!0);try{let n=await B((0,E.q9)({token:e}));if(i)return;if(!D(n)){I();return}j.current=e,s(e),c(n),t(F.STATUS);try{let e=await (0,E.ti)();i||l(e)}catch(e){}}catch(e){!i&&A.includes(null==e?void 0:e.status)&&I()}finally{i||v(!1)}})(),()=>{i=!0}},[]),(0,d.useEffect)(()=>
1{if(e!==F.STATUS)return;let t=setInterval(()=>void N(),45e3);return()=>clearInterval(t)},[e,N]);let w=(0,d.useCallback)(async e=>{let{email:i,orderReference:n}=e;p(!0),m("");try{let e=await (0,E.rB)({email:i,orderReference:n});j.current=e.token,s(e.token),r(e.order||null);let[a,o]=await Promise.all([(0,E.ti)(),(0,E.q9)({token:e.token})]);return l(a),c(o),t(D(o)?F.STATUS:F.COMPOSE),!0}catch(e){return m(e instanceof Error?e.message:"V\xe9rification impossible."),!1}finally{p(!1)}},[]),C=(0,d.useCallback)(async()=>{m("");try{a||l(await (0,E.ti)()),t(F.WALKIN_COMPOSE)}catch(e){m(e instanceof Error?e.message:"Chargement impossible.")}},[a]),_=(0,d.useCallback)(async e=>{let{participants:i,passTogether:n,briefAccepted:r,briefVersion:a,testCode:l}=e;h(!0),m("");try{let e=await (0,E.l6)({participants:i,passTogether:n,briefAccepted:r,briefVersion:a,testCode:l});return j.current=e.token,s(e.token),P(e.token),c(e.status),t(F.STATUS),!0}catch(e){return m(e instanceof Error?e.message:"Impossible de cr\xe9er la r\xe9servation."),!1}finally{h(!1)}},[]),k=(0,d.useCallback)(async e=>{let{participants:s,passTogether:n,briefAccepted:r,briefVersion:a,testCode:l}=e;h(!0),m("");try{return c(await (0,E.w6)({token:i,participants:s,passTogether:n,briefAccepted:r,briefVersion:a,testCode:l})),t(F.STATUS),!0}catch(e){return m(e instanceof Error?e.message:"Impossible de rejoindre la file."),!1}finally{h(!1)}},[i]);return{step:e,order:n,queueConfig:a,status:o,errorMessage:u,isVerifying:g,isJoining:x,isRestoring:y,cancellingGroupId:b,verify:w,join:k,joinWalkin:_,cancelGroup:(0,d.useCallback)(async e=>{f(e),m("");try{return c(await (0,E.Yp)({token:i,groupId:e})),!0}catch(e){return m(e instanceof Error?e.message:"Annulation impossible."),!1}finally{f("")}},[i]),goToCompose:(0,d.useCallback)(()=>{m(""),t(F.COMPOSE)},[]),goToVerify:(0,d.useCallback)(()=>{m(""),t(F.VERIFY)},[]),goToWalkin:C,refreshStatus:N}},V=()=>{var e,t;let i=(0,a.useRouter)(),n="string"==typeof(null==i?void 0:null===(e=i.query)||void 0===e?void 0:e.test)?i.query.test:"",{step:r,order:l,queueConfig:o,status:d,errorMessage:u,isVerifying:m,isJoining:g,isRestoring:p,cancellingGroupId:x,verify:h,join:b,joinWalkin:f,cancelGroup:y,goToCompose:v,goToVerify:j,goToWalkin:N}=Y(),w=Object.values((null==d?void 0:d.quotas)||{}).some(e=>e.remaining>0),_=o?{capacity:Object.fromEntries((o.vehicleTypes||[]).filter(e=>"tibolide"===e.activity).map(e=>{var t;return[e.code,null!==(t=e.default_count)&&void 0!==t?t:0]})),maxRiders:null!==(t=o.pisteCapacity)&&void 0!==t?t:4}:null,k=!n&&(o&&!o.isBookingOpen||d&&!1===d.isBookingOpen);return(0,s.jsxs)(c,{children:[p?(0,s.jsx)("p",{role:"status",className:"rounded-xl border border-indigo-100 bg-white px-4 py-6 text-center text-sm text-gray-600",children:"R\xe9cup\xe9ration de ta r\xe9servation…"}):null,r!==F.VERIFY||p?null:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(q,{onVerify:h,isVerifying:m,errorMessage:u}),(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-dashed border-indigo-300 bg-white p-4 text-center",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"Je n'ai pas encore de billet"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-600",children:"Compose ta r\xe9servation ici, puis r\xe8gle-la \xe0 l'accueil (carte, esp\xe8ces, pass loisirs, ch\xe8ques vacances)."}),(0,s.jsx)("button",{type:"button",onClick:()=>void N(),className:"mt-3 w-full rounded-lg border border-indigo-600 px-4 py-3 text-base font-bold text-indigo-600 transition hover:bg-indigo-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:"Composer ma r\xe9servation"})]})]}),r!==F.WALKIN_COMPOSE||k?null:(0,s.jsx)(C,{quotas:M,vehicleTypes:(null==o?void 0:o.vehicleTypes)||[],onJoin:e=>f({...e,testCode:n}),isJoining:g,errorMessage:u,hideQuota:!0,pricing:_}),r!==F.VERIFY&&l?(0,s.jsxs)("p",{className:"mb-3 text-xs text-gray-500",children:["Commande v\xe9rifi\xe9e",l.holderName?" \xb7 ".concat(l.holderName):""," (",l.maskedEmail,")"]}):null,r!==F.VERIFY&&k?(0,s.jsx)("p",{className:"rounded-xl border border-amber-200 bg-amber-50 px-4 py-4 text-sm text-amber-800",children:(null==o?void 0:o.closedMessage)||"Les r\xe9servations en ligne sont ferm\xe9es pour le moment. Pr\xe9sente-toi \xe0 l’accueil du parc."}):null,r===F.COMPOSE&&!k&&d?(0,s.jsx)(C,{quotas:d.quotas||{},vehicleTypes:(null==o?void 0:o.vehicleTypes)||[],onJoin:e=>b({...e,testCode:n}),isJoining:g,errorMessage:u}):null,r===F.STATUS&&d?(0,s.jsxs)("div",{className:"space-y-3",children:[u?(0,s.jsx)("p",{role:"alert",className:"rounded-lg bg-red-50 px-3 py-2 text-sm text-red-700",children:u}):null,(0,s.jsx)(S,{status:d,onCancelGroup:y,cancellingGroupId:x,onAddParticipants:w&&!k?v:null}),(0,s.jsx)("button",{type:"button",onClick:j,className:"w-full text-center text-sm font-semibold text-indigo-600 underline underline-offset-2 transition hover:text-indigo-800 focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500",children:"Suivre ou composer une autre r\xe9servation"})]}):null]})},L=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r(),{children:[(0,s.jsx)("title",{children:"R\xe9server mon cr\xe9neau Ti'Bolide - Parc de la Luge du Ma\xefdo"}),(0,s.jsx)("meta",{name:"description",content:"R\xe9servez votre cr\xe9neau de passage Ti'Bolide avec votre billet achet\xe9 en ligne."}),(0,s.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),(0,s.jsx)("link",{rel:"canonical",href:"https://www.parcdelaluge.re/tibolide/reservation"})]}),(0,s.jsx)(V,{})]})}},function(e){e.O(0,[888,774,179],function(){return e(e.s=9609)}
1),_N_E=e.O()}]);

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.