1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7701],{38313:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var l=r(18153),n=r(63992),a=r(14232),i=r(69241);let d={0:["anim-green","grey","grey","grey"],1:["green","anim-green","grey","grey"],2:["green","green","anim-green","grey"],3:["green","green","green","anim-green"],4:["green","green","green","green"],5:["red","red","red","red"],6:["red","red","red","red"]},o=e=>{switch(e){case"green":case"anim-green":return"#96CB00";case"grey":default:return"#F6F6F6";case"red":return"var(--red-quick)"}},c=function(e){let{order:t,isTitle:r,hideBar:c}=e,s=(0,a.useMemo)(()=>{var e;return null!=(e=d[null==t?void 0:t.status])?e:[]},[null==t?void 0:t.status]);return(0,l.FD)("div",{className:(0,i.A)("flex flex-col items-center gap-2.5",!r&&"xl:items-start"),children:[(0,l.Y)("div",{className:(0,i.A)("font-quick text-black font-semibold",r?"text-2xl italic":"text-sm"),children:null==t?void 0:t.statusText}),!c&&(0,l.Y)("div",{className:"flex flex-row gap-2.5 items-center w-full",children:s.map((e,t)=>(0,l.Y)("div",{style:{backgroundColor:"#F6F6F6",flex:1,height:10,borderRadius:20,overflow:"hidden"},children:"anim-green"===e?(0,l.Y)(n.P.div,{style:{height:10,borderRadius:20,backgroundColor:o(e)},animate:{width:["23%","100%","23%"]},transition:{duration:3.2,times:[0,.833,1],ease:["easeInOut","linear"],repeat:1/0}}):(0,l.Y)("div",{style:{width:"100%",height:10,borderRadius:20,backgroundColor:o(e)}})},"status-".concat(t)))})]})}},75354:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/commandes/[slug]",function(){return r(80287)}])},78921:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var l=r(18153),n=r(14232),a=r(58863),i=r(44228);let d=function(e){let{handleActivateOrder:t,isLoading:r,disabled:d}=e,[o,c]=(0,n.useState)(!1);return(0,l.FD)(l.FK,{children:[(0,l.Y)(a.A,{style:{whiteSpace:"nowrap"},disabled:r||d,onClick:()=>c(!0),children:"Activer ma commande"}),(0,l.Y)(i.A,{onConfirm:()=>{c(!1),t()},onCancel:()=>c(!1),title:"Vous \xeates sur le point de lancer votre commande en pr\xe9paration.",description:"En activant votre commande, cela d\xe9clenche sa pr\xe9paration en restaurant. Nous vous recommandons de le faire lorsque vous \xeates \xe0 proximit\xe9 du restaurant, pour vous garantir la meilleure exp\xe9rience possible.",isOpen:o})]})}},80287:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>V});var l=r(18153),n=r(24249),a=r(1340),i=r(89099),d=r(92578),o=r(85278),c=r(66858),s=r(89222),u=r(71183),m=r(14232),f=r(69241),h=r(19653),p=r(48230),g=r.n(p);let v=function(e){let{order:t}=e,{breakpoints:r}=(0,n.u)();return(0,l.FD)("div",{className:"flex flex-col gap-2.5 p-8 drop-shadow-xl rounded-lg bg-white ",children:[(0,l.Y)("div",{className:"font-quick lg:text-2xl text-lg text-black font-bold italic",children:"Votre fid\xe9lit\xe9 r\xe9compens\xe9e"}),(0,l.FD)("div",{className:"flex flex-row justify-between",children:[(0,l.FD)("div",{className:"font-quick text-black text-md",children:[(null==t?void 0:t.user_id)?"Vous avez cumul\xe9 ":"Vous auriez pu cumuler ",(0,l.FD)("span",{className:"text-quick-red font-bold",children:[10*Math.trunc((null==t?void 0:t.price)||0)," points Qlub"]})]}),(0,l.Y)(g(),{className:"font-quick font-bold text-black underline",href:"/ma-fidelite-recompensee",children:"Voir +"})]})]})};var x=r(20288),b=r(54587),F=r.n(b);r(11714);var k=r(20011),N=r(58863),y=r(24195),D=r.n(y);let w=function(e){var t,r,a;let{order:i}=e,{breakpoints:d}=(0,n.u)(),o=(0,m.useMemo)(()=>x.U.get.status(null==i?void 0:i.restaurant),[null==i?void 0:i.restaurant]);return(0,l.FD)("div",{className:"flex flex-col gap-2.5 p-8 drop-shadow-xl rounded-lg bg-white ",children:[(0,l.Y)("div",{className:"font-quick lg:text-2xl text-lg text-black font-bold italic",children:"Votre restaurant"}),(0,l.FD)("div",{className:"flex flex-row gap-4",children:[(0,l.Y)(F(),{src:D(),alt:"pin",width:30,height:30}),(0,l.FD)("div",{className:"flex flex-col",children:[(0,l.Y)("div",{className:"text-black font-bold text-lg",children:null==i||null==(t=i.restaurant)?void 0:t.name}),(0,l.Y)(k.nW,{isClosed:!x.U.is.open(o),style:{marginTop:0,marginBottom:0,fontSize:14},children:o})]})]}
1),(0,l.Y)("a",{target:"_blank",className:"w-fit mt-4 self-center",href:"https://www.google.com/maps/dir/?api=1&destination=".concat(null==i||null==(r=i.restaurant)?void 0:r.lat,",").concat(null==i||null==(a=i.restaurant)?void 0:a.lng),rel:"noreferrer",children:(0,l.Y)(N.A,{style:{paddingLeft:40,paddingRight:40,paddingTop:10,paddingBottom:10},children:"J'y vais"})})]})};var Y=r(64440),A=r(82434),T=r(44228),_=r(23081);let C=function(e){let{orderId:t}=e,[r,n]=(0,m.useState)(!1),{cancelOrder:a}=(0,d.SC)(),{token:i}=(0,_.A)(),[o,c]=(0,m.useState)(!1),s=async()=>{a(t,i,()=>{c(!1),window.location.reload()},()=>{c(!1)})};return(0,l.FD)(l.FK,{children:[(0,l.Y)("div",{role:"button",tabIndex:0,onKeyDown:e=>"Enter"===e.code&&n(!0),onClick:()=>n(!0),style:{display:"flex",flexDirection:"row",alignItems:"center",alignSelf:"center",gap:4,marginTop:30},children:(0,l.Y)("h2",{style:{fontWeight:700,fontSize:16,textDecorationLine:"underline"},children:"Annuler ma commande"})}),(0,l.Y)(T.A,{isLoading:o,onConfirm:s,onCancel:()=>{n(!1)},title:"\xcates-vous s\xfbr de vouloir annuler votre commande ?",description:"Vous ne serez pas pr\xe9lev\xe9 et votre panier sera supprim\xe9.",isOpen:r})]})};function q(e){var t,r,n;let{content:a}=e;return(0,l.FD)(l.FK,{children:[(0,l.FD)("div",{className:"flex flex-row justify-between",children:[(0,l.FD)("div",{className:"flex flex-col w-full",children:[(0,l.FD)("div",{className:"font-quick text-lg text-black font-semibold",children:[a.quantity?"".concat(a.quantity," "):"",a.name]}),(null==(t=a.details)?void 0:t.length)&&(0,l.Y)("div",{className:"font-quick text-lg text-black mt-1",children:null==(n=a.details)||null==(r=n.map(e=>null==e?void 0:e.name))?void 0:r.join(", ")})]}),(0,l.FD)("div",{className:"font-quick text-lg font-semibold text-black",children:[(a.price*a.quantity).toFixed(2).replace(".",","),"â¬"]})]}),(0,l.Y)("div",{className:"border-b border-solid border-b-1 border-gray-200"})]})}let O=function(e){let{order:t}=e;return t?(0,l.FD)("div",{className:"flex flex-col gap-8",children:[(0,l.FD)("div",{className:"flex flex-col",children:[(0,l.FD)("div",{className:"lg:block hidden font-bold text-lg md:text-2xl text-black",children:["R\xe9capitulatif de votre Commande"," ",(0,l.FD)("span",{className:"text-quick-red uppercase",children:["N\xb0",t.orbNumber]})]}),(0,l.FD)("div",{className:"block lg:hidden font-bold text-2xl text-black",children:["Commande"," ",(0,l.FD)("span",{className:"text-quick-red uppercase",children:["N\xb0",t.orbNumber]})]}),(0,l.FD)("div",{className:"italic text-md",children:["du ",(null==t?void 0:t.date)?(0,Y.A)(new Date(null==t?void 0:t.date),"dd/MM/yyyy"):""]})]}),(0,l.Y)("div",{className:"flex flex-col gap-3",children:t.contents.map((e,r)=>(0,l.Y)(q,{content:e},"".concat(t.order_id,"-").concat(r)))}),(0,l.Y)(A.A,{totalPrice:t.price}),t.status===u.R.ORDER_TO_ACTIVATE&&(0,l.Y)(C,{orderId:t.order_id})]}):null};var R=r(89385),E=r(38313),S=r(78921),I=r(86431);let M={title:"Mon Compte Fid\xe9lit\xe9 - Quick France",description:"Acc\xe9dez \xe0 votre compte fid\xe9lit\xe9 et retrouvez en quelques clic votre historique de commande et enregistrez vos informations personnelles"},V=function(){let{breakpoints:e}=(0,n.u)(),t=(0,i.useRouter)(),{data:r}=(0,d.Mo)(t.query.slug,!!t.query.slug),{...p}=(0,a.x)(),{token:g}=(0,_.A)(),[x]=(0,o.fp)(I.u7),{sendOrderToProd:b}=(0,d.SC)(),[F,k]=(0,m.useState)(!1),N=x.join(","),y=(0,c.A)(),D=e=>{k(!0),b(e.order_id,g,()=>{y.invalidate(s.Z.GetOrder(N)),y.invalidate(s.Z.GetOrderDetails(t.query.slug)),k(!1)},e=>{console.error("Failed to send order to prod:",e),k(!1)})};return(0,l.Y)(h.A,{salmonBg:!0,head:M,children:(0,l.FD)("div",{style:{paddingTop:e.isMobile?100:150},className:"flex flex-col items-center px-4 lg:px-20",children:[(0,l.Y)(R.A,{subSize:35,mainSize:35,sub:"SUIVI DE VOTRE",main:"COMMANDE"}),(null==r?void 0:r.status)===u.R.ORDER_TO_ACTIVATE&&(0,l.FD)(l.FK,{children:[(null==r?void 0:r.status)===u.R.ORDER_TO_ACTIVATE&&(0,l.FD)("div",{className:"md:hidden flex flex-col border border-quick-red rounded-lg p-8 gap-8 my-8 w-full box-border",children:[(0,l.Y)("h4",{className:"text-2xl font-quick text-quick-red font-bold text-center italic",children:"Lancez la pr\xe9paration de votre commande"}),(0,l.Y)(S.A,{handleActivateOrder:()=>D(r),isLoading:F})]}),(0,l.FD)("h3",{className:"font-quick text-sm italic md:text-left text-center",children:["Veuillez lancer la pr\xe9paration de votre commande"," ",(0,l.Y)("strong",{className:"not-italic",children:"environ 5 minutes"})," avant votre arriv\xe9e au restaurant."]})]}),(0,l.FD)("div",{className:"flex lg:hidden flex-col w-full gap-8 mb-20 mt-8",children:[(0,l.Y)("div",{className:"p-8 drop-shadow-xl rounded-lg bg-white",children:(0,l.Y)(E.A,{hideBar:(null==r?void 0:r.status)===u.R.ORDER_TO_ACTIVATE,isTitle:!0,order:r})}),(0,l.Y)(w,{order:r}),(0,l.Y)(v,{order:r}),(0,l.Y)("div",{className:"p-8 drop-shadow-xl rounded-lg bg-white",children:(0,l.Y)(O,{order:r})})]}),(0,l.FD)("div",{className:"hidden lg:grid grid-cols-3 w-full gap-20 mt-8 mb-40",children:[(0,l.FD)("div",{className:"flex flex-col col-span-2 gap-8",children:[(0,l.FD)("div",{className:(0,f.A)("flex flex-col items-center p-8 drop-shadow-xl rounded-lg bg-white",(null==r?void 0:r.status)===u.R.ORDER_TO_ACTIVATE&&"border-quick-red border"),children:[(0,l.Y)("div",{className:"w-full mb-8",children:(0,l.Y)(E.A,{hideBar:(null==r?void 0:r.status)===u.R.ORDER_TO_ACTIVATE,isTitle:!0,order:r})}),(null==r?void 0:r.status)===u.R.ORDER_TO_ACTIVATE&&(0,l.Y)(S.A,{handleActivateOrder:()=>D(r),isLoading:F})]}),(0,l.Y)("div",{className:"p-8 drop-shadow-xl rounded-lg bg-white",children:(0,l.Y)(O,{order:r})})]}),(0,l.FD)("div",{className:"flex flex-col gap-8",children:[(0,l.Y)(w,{order:r}),(0,l.Y)(v,{order:r})]})]})]})})}},89385:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var l=r(18153);let n=function(e){let{sub:t,main:r,color:n,mainSize:a,subSize:i}=e;return(0,l.FD)("div",{style:{flexDirection:"column",alignItems:"center",textAlign:"center",gap:-2,transform:"rotate(-2deg)"},children:[(0,l.Y)("div",{style:{fontSize:i||26,color:n||"#000",fontFamily:"ITCFranklin",fontWeight:900,fontStyle:"italic",whiteSpace:"nowrap"},children:t}),(0,l.Y)("div",{style:{fontSize:a||26,color:n||"var(--red-quick)",fontFamily:"ITCFranklin",fontWeight:900,fontStyle:"italic"},children:r})]})}},92578:(e,t,r)=>{"use strict";r.d(t,{Dz:()=>s,Md:()=>u,Mo:()=>m,SC:()=>f});var l=r(41698),n=r(14232),a=r(67914),i=r(40097),d=r(66858),o=r(42711),c=r(89222);let s=(e,t)=>(0,a.I)({queryKey:c.Z.GetOrders(),queryFn:async()=>(0,l.x6)("".concat(o.tj,"/api/get-all-orders-user-parsed"),(0,l.MT)(e),!0),enabled:t,refetchInterval:1e4}),u=(e,t)=>
1(0,a.I)({queryKey:c.Z.GetOrder(e),queryFn:async()=>(0,l.x6)("".concat(o.tj,"/api/get-order-parsed?order_id=").concat(e),{},!1),enabled:t,refetchInterval:1e4}),m=(e,t)=>(0,a.I)({queryKey:c.Z.GetOrderDetails(e),queryFn:async()=>(0,l.x6)("".concat(o.tj,"/api/get-order-details?order_id=").concat(e),{},!1),enabled:t,refetchInterval:1e4}),f=()=>{let e=(0,d.A)(),{mutate:t}=(0,i.n)({mutationFn:e=>{let{mutationFn:t}=e;return t},onMutate:t=>{let{onMutate:r}=t;return r?r(e):{}},onSettled:(t,r,l,n)=>{let{onComplete:a,onError:i,onSuccess:d}=l,{transaction:o}=n;t&&!r&&d&&d(t,e),r&&i&&i(r),r&&o&&o.rollback(),a&&a(t,r)}}),r=(0,n.useCallback)((e,r,n,a,i)=>{t({mutationFn:(0,l.B2)("".concat(o.tj,"/api/init-order"),{restaurant:e,basket_uuid:r},(0,l.MT)(n)),onSuccess:a,onError:i})},[t]),a=(0,n.useCallback)((e,r,n)=>{t({mutationFn:(0,l.B2)("".concat(o.tj,"/api/get-orders"),{},(0,l.MT)(e)),onSuccess:r,onError:n})},[t]),s=(0,n.useCallback)((r,n,a,i)=>{t({mutationFn:(0,l.B2)("".concat(o.tj,"/api/push-order-prod?order_id=").concat(r),{},(0,l.MT)(n)),onSuccess:t=>
1{a&&a(t),e.invalidate(c.Z.GetOrders()),e.invalidate(c.Z.GetBasket())},onError:i})},[t]),u=(0,n.useCallback)((e,r,n,a,i)=>{t({mutationFn:(0,l.B2)("".concat(o.tj,"/api/push-info-user?order_id=").concat(e),r,(0,l.MT)(n)),onSuccess:e=>{a&&a(e)},onError:i})},[t]),m=(0,n.useCallback)((r,n,a,i)=>{t({mutationFn:(0,l.B2)("".concat(o.tj,"/api/cancel-order?order_id=").concat(r),{},(0,l.MT)(n)),onSuccess:t=>{e.invalidate(c.Z.GetOrders()),e.invalidate(c.Z.GetBasket()),a&&a(t)},onError:i})},[t]);return(0,n.useCallback)((e,r,n,a)=>{t({mutationFn:(0,l.B2)("".concat(o.tj,"/api/get-order-parsed?order_id=").concat(r),(0,l.MT)(e)),onSuccess:n,onError:a})},[t]),(0,n.useMemo)(()=>({createOrder:r,getOrders:a,sendOrderToProd:s,sendGuestForm:u,cancelOrder:m}),[r])}}},e=>{e.O(0,[9653,636,6593,8792],()=>e(e.s=75354)),_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.