1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[194],{4648:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/orders/details",function(){return t(4639)}])},2563:function(e,r,t){"use strict";t.d(r,{Z:function(){return O}});var a=t(7568),i=t(92),n=t(5893),s=t(7294),d=t(1010),o=t(1163),l=t(2159),c=t(7904);var u=function(){var e=(0,o.useRouter)(),r=(0,s.useContext)(l.Z),t=r.user,a=r.setShouldShowAuthDropdown,i=(0,s.useState)(!1),n=i[0],d=i[1];return(0,s.useEffect)((function(){var r=c.Z.get(c.m.USER_DATA);t||r?d(!0):(d(!1),a(!0),e.replace("/"))}),[t]),n},p=t(1664),_=t.n(p),m=t(3127),h=t.n(m),v=t(6026),f=t(8103),x="Make someone feel special today!",j="Start Here",b="/product-category/flowers-for-love-birthday-anniversary-etc",g=function(e){var r=e.onLogout,t=(0,o.useRouter)(),a=(0,s.useContext)(l.Z).showSiteWideAlert;return(0,n.jsxs)("aside",{className:[h().sidebar,a&&h()["with-site-wide-alert"]].join(" "),children:[(0,n.jsxs)("nav",{className:h().nav,children:[v.NL.map((function(e){var r=e.label,a=e.href,i=e.icon,s=t.pathname===a;return(0,n.jsx)(_(),{href:a,children:(0,n.jsxs)("a",{className:[h()["nav-item"],s&&h().active].filter(Boolean).join(" "),children:[(0,n.jsx)(i,{}),(0,n.jsx)("span",{children:r})]})},a)})),(0,n.jsxs)("button",{className:[h()["nav-item"],h().logout].join(" "),onClick:r,children:[(0,n.jsx)(f.R0,{}),(0,n.jsx)("span",{children:"Logout"})]})]}),(0,n.jsxs)("div",{className:h()["promo-card"],children:[(0,n.jsx)("img",{src:"/images/dashboard/promo-bg.png",alt:"",className:h()["promo-bg"]}),(0,n.jsx)("img",{src:"/images/dashboard/promo-product.png",alt:"",className:h()["promo-image"]}),(0,n.jsx)("p",{className:h()["promo-heading"],children:x}),j&&b&&(0,n.jsx)(_(),{href:b,children:(0,n.jsx)("a",{className:h()["promo-cta"],children:j})})]})]})},y=t(2281),N=t.n(y),D=function(e){var r=e.onLogout,t=(0,o.useRouter)();return(0,n.jsxs)("nav",{className:N()["tab-bar"],children:[v.NL.map((function(e){var r=e.label,a=e.href,i=e.icon,s=t.pathname===a;return(0,n.jsx)(_(),{href:a,children:(0,n.jsxs)("a",{className:[N()["tab-item"],s&&N().active].filter(Boolean).join(" "),children:[(0,n.jsx)(i,{}),(0,n.jsx)("span",{children:r})]})},a)})),(0,n.jsxs)("button",{className:[N()["tab-item"]].join(" "),onClick:r,children:[(0,n.jsx)(f.R0,{}),(0,n.jsx)("span",{children:"Logout"})]})]})},S=t(6574),w=t.n(S),k=t(387),I=t(3269),Z=function(e){var r=e.sections,t=(0,d.Z)();return r.length?(0,n.jsx)("div",{className:w()["dashboard-page-sections"],children:r.map((function(e){return(0,n.jsx)(I.Z,{section:e,deviceType:t},e.id)}))}):null},O=function(e){var r=e.children,t=e.pageSections,o=void 0===t?[]:t,p=(0,d.Z)(),_=u(),m=(0,k.useRouter)(),h=(0,s.useContext)(l.Z),v=h.showSiteWideAlert,f=h.setUser,x=h.setCartItems,j=function(){var e=(0,a.Z)((function(){return(0,i.__generator)(this,(function(e){return c.Z.remove("userData"),x([]),f(null),m.push("/"),[2]}))}));return function(){return e.apply(this,arguments)}}();return _?(0,n.jsxs)("div",{className:[w().dashboard,v&&w()["with-site-wide-alert"]].join(" "),children:["desktop"===p&&(0,n.jsx)(g,{onLogout:j}),(0,n.jsxs)("section",{className:w().content,children:[r,(0,n.jsx)(Z,{sections:o})]}),"mobile"===p&&(0,n.jsx)(D,{onLogout:j})]}):null}},9268:function(e,r,t){"use strict";var a=t(5893),i=t(5982),n=t.n(i);r.Z=function(e){var r=e.text,t=void 0===r?"Loading...":r;return(0,a.jsxs)("div",{className:n().loader,children:[(0,a.jsx)("img",{src:"/images/spinner.svg",alt:"loader",className:n().icon}),t&&(0,a.jsx)("span",{className:n().text,children:t})]})}},4639:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSG:function(){return I},default:function(){return Z}});var a=t(7568),i=t(92),n=t(5893),s=t(7294),d=t(9008),o=t.n(d),l=t(1163),c=t(2563),u=t(9268),p=t(2120),_=t.n(p),m=[{key:"receiver",label:"Receiver's Information"},{key:"optional",label:"Optional Messages"},{key:"sender",label:"Sender's Information"}],h=function(e){var r=e.label,t=e.children;return(0,n.jsxs)("div",{className:_().field,children:[(0,n.jsx)("span",{className:_().label,children:r}),(0,n.jsx)("div",{className:_().value,children:t})]})},v=function(e){var r,t,a,i,d,o,l,c,u,p=e.order,v="Pickup"===(null===(r=p.recipient)||void 0===r?void 0:r.firstname),f=(0,s.use
1State)(v?"optional":"receiver"),x=f[0],j=f[1];return(0,n.jsxs)("div",{className:_().card,children:[(0,n.jsx)("div",{className:_().tabs,children:m.filter((function(e){return"receiver"!==e.key||!v})).map((function(e){return(0,n.jsx)("button",{className:[_().tab,x===e.key&&_().active].filter(Boolean).join(" "),onClick:function(){return j(e.key)},children:e.label},e.key)}))}),"receiver"===x&&(v?(0,n.jsx)("p",{className:_()["pickup-notice"],children:"Pick Up Order"}):(0,n.jsxs)("div",{className:_().fields,children:[(0,n.jsx)(h,{label:"Full Name",children:null===(t=p.deliveryDetails)||void 0===t?void 0:t.recipientName}),(0,n.jsx)(h,{label:"Phone Number",children:null===(a=p.deliveryDetails)||void 0===a?void 0:a.recipientPhone}),(0,n.jsx)(h,{label:"Residence Type",children:null===(i=p.deliveryDetails)||void 0===i?void 0:i.recidenceType}),(0,n.jsx)(h,{label:"State",children:null===(d=p.deliveryDetails)||void 0===d?void 0:d.state}),(0,n.jsx)(h,{label:"Detailed Home Address",children:null===(o=p.deliveryDetails)||void 0===o?void 0:o.recipientAddress})]})),"optional"===x&&(0,n.jsxs)("div",{className:_().fields,children:[p.deliveryMessage&&(0,n.jsx)(h,{label:"Message",children:(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:p.deliveryMessage}})}),p.adminNotes&&(0,n.jsx)(h,{label:"Additional Info",children:p.adminNotes}),p.purpose&&(0,n.jsx)(h,{label:"Purpose",children:p.purpose}),!p.deliveryMessage&&!p.adminNotes&&!p.purpose&&(0,n.jsx)("p",{className:_().empty,children:"No optional information provided."})]}),"sender"===x&&(0,n.jsxs)("div",{className:_().fields,children:[(0,n.jsx)(h,{label:"Name",children:null===(l=p.client)||void 0===l?void 0:l.name}),(0,n.jsx)(h,{label:"Phone Number",children:null===(c=p.client)||void 0===c?void 0:c.phone}),(0,n.jsx)(h,{label:"Email",children:null===(u=p.client)||void 0===u?void 0:u.email})]})]})},f=t(9525),x=t(3395),j=t(2159),b=t(3660),g=t(7664),y=t(3419),N=t(6030),D=t(6547),S=t.n(D),w=t(1010),k=t(866),I=!0,Z=function(e){var r=e.pageSections,t=(0,l.useRouter)(),d=t.query.orderId,p=(0,s.useContext)(j.Z).notify,_=(0,x.Z)(),m=(0,w.Z)(),h=(0,s.useState)(!0),D=h[
10],I=h[1],Z=(0,s.useState)(null),O=Z[0],A=Z[1],C=(0,s.useState)([]),L=C[0],P=C[1],z=(0,s.useState)(!1),R=z[0],B=z[1];(0,s.useEffect)((function(){if(d&&"string"===typeof d){var e=function(){var e=(0,a.Z)((function(){var e;return(0,i.__generator)(this,(function(r){switch(r.label){case 0:return I(!0),[4,(0,b.co)(d)];case 1:return(e=r.sent()).error?p("error",e.message||"Failed to load order"):A(e.data),I(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();e()}}),[d]),(0,s.useEffect)((function(){if((null===O||void 0===O?void 0:O.orderProducts.length)&&"mobile"!==m){B(!0);var e=function(){var e=(0,a.Z)((function(){var e,r,t,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,(0,g.aN)([O.orderProducts[0].id],!0,4)];case 1:return t=i.sent(),a=(null===(e=t.data)||void 0===e||null===(r=e[0])||void 0===r?void 0:r.relatedProducts)||[],P((0,k.pI)(a,4)),B(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}();e()}}),[O]);var E=function(){var e=(0,a.Z)((function(e){var r,t,a,n,s;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return t=e.size?"?size=".concat(encodeURIComponent(e.size)):"",a=window.open("","_blank"),[4,(0,g.aN)([e.id])];case 1:return n=i.sent(),s=null===(r=n.data)||void 0===r?void 0:r[0],a?s?(a.location.href="/product/".concat(s.slug).concat(t),[2]):(a.close(),[2]):[2]}}))}));return function(r){return e.apply(this,arguments)}}(),M=(null===O||void 0===O?void 0:O.deliveryDate)?new Date(O.deliveryDate).toLocaleDateString("en-GB"):"",T=O?(0,f.iN)(O.deliveryStatus):null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{children:(0,n.jsx)("title",{children:"Order Details | Regal Flowers"})}),(0,n.jsx)(c.Z,{pageSections:r,children:D?(0,n.jsx)(u.Z,{}):O?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:S().header,children:[(0,n.jsxs)("button",{className:S().back,onClick:function(){return t.back()},children:[(0,n.jsx)("img",{src:"/icons/chevron-left.svg",alt:""}),(0,n.jsx)("span",{children:"Order Details"})]}),(0,n.jsxs)("div",{className:S()["header-actions"],children:["desktop"===m?(0,n.jsx)(y.Z,{type:"primary",onClick:function(){return _(O)},minWidth:!0,children:"Buy Again"}):(0,n.jsxs)("span",{className:S()["delivery-date"],children:[(0,n.jsx)("strong",{children:"Order ID:"})," ",O.fullOrderId]}),(0,n.jsxs)("span",{className:S()["delivery-date"],children:[(0,n.jsx)("strong",{children:"Delivery Date:"})," ",M]}),T&&(0,n.jsx)("span",{className:"tag ".concat(f.Pn[T]),children:T})]})]}),(0,n.jsxs)("div",{className:S().content,children:[(0,n.jsxs)("div",{className:S()["main-panel"],children:[(0,n.jsxs)("div",{className:S().cart,children:[(0,n.jsxs)("div",{className:S()["cart-header"],children:[(0,n.jsx)("span",{className:S()["cart-title"],children:"Cart Summary"}),"desktop"===m?(0,n.jsxs)("span",{className:S()["delivery-date"],children:[(0,n.jsx)("strong",{children:"Order ID:"})," ",O.fullOrderId]}):(0,n.jsx)(y.Z,{type:"primary",onClick:function(){return _(O)},minWidth:!0,size:"small",children:"Buy Again"})]}),O.orderProducts.map((function(e){var r,t;return(0,n.jsxs)("div",{className:S().product,children:[(0,n.jsx)("img",{src:null===(r=e.image)||void 0===r?void 0:r.src,alt:(null===(t=e.image)||void 0===t?void 0:t.alt)||"",className:S()["product-image"]}),(0,n.jsxs)("div",{className:S()["product-details"],children:[(0,n.jsx)("span",{className:S()["product-name"],children:e.nameClient||e.name}),(0,n.jsxs)("span",{className:S()["product-qty"],children:[(0,n.jsx)("strong",{children:"Qty:"})," ",e.quantity]}),e.size&&(0,n.jsxs)("span",{className:S()["product-size"],children:[(0,n.jsx)("strong",{children:"Size:"})," ",e.size]})]}),O.orderProducts.length>1&&(0,n.jsx)(y.Z,{type:"primary",size:"small",onClick:function(){return E(e)},minWidth:!0,children:"Buy This"})]},e.id)}))]}),(0,n.jsx)(v,{order:O})]}),(L.length>0||R)&&(0,n.jsxs)("div",{className:S()["side-panel"],children:[(0,n.jsx)("span",{className:S()["cart-title"],children:"Related Products"}),(0,n.jsx)("div",{className:S()["related-products"],children:L.map((function(e){var r;return(0,n.jsx)(N.Z,{name:e.name.split("\u2013")[0],image:null===(r=e.images[0])||void 0===r?void 0:r.src,price:e.price,subTitle:e.subtitle||e.name.split("\u2013")[1],url:"/product/".concat(e.slug),product:e,buttonText:"variable"===e.type?"Select Size":"Add to Cart",mode:"two-x-grid",inlinePriceLabel:!0},e.id)}))})]})]})]}):(0,n.jsxs)("p",{className:S()["not-found"],children:["Order not found."," ",(0,n.jsx)("button",{className:"red",onClick:function(){return t.back()},children:"Back to Orders"})]})})]})}},3395:function(e,r,t){"use strict";var a=t(6042),i=t(9396),n=t(9815),s=t(7294),d=t(2159);r.Z=function(){var e=(0,s.useContext)(d.Z),r=e.cartItems,t=e.setCartItems,o=e.setShouldShowCart,l=e.notify;return function(e){var s=(0,n.Z)(r);
1e.orderProducts.forEach((function(e){if(s.find((function(r){return r.productId===e.id})))s=s.map((function(r){return r.productId===e.id?(0,i.Z)((0,a.Z)({},r),{quantity:r.quantity+e.quantity}):r}));else{var r={productId:e.id,name:e.nameClient||e.name,price:e.price,description:e.description,quantity:e.quantity,image:e.image,size:e.size,design:null,SKU:e.SKU||""};s=(0,n.Z)(s).concat([r])}})),t(s),o(!0),l("success","Added to cart")}}},9525:function(e,r,t){"use strict";t.d(r,{Pn:function(){return n},Z_:function(){return i},iN:function(){return s}});var a={"Not Arranged":"Order Received",Arranged:"Order Arranged","Arranged and Sorted":"Order Arranged","Arranged and Inspected":"Order Arranged","Despatched (given to driver/trip not started)":"Despatched",Despatched:"Despatched","Despatched and Client Notified":"Despatched","Despatched (drivers update)":"Despatched","Delivered (drivers update)":"Delivered",Delivered:"Delivered","Delivered and Client Notified":"Delivered","Delivery Failed/Issues with Delivery":"Delivery Failed"},i=["Order Received","Order Arranged","Despatched","Delivered","Delivery Failed"],n={"Order Received":"yellow","Order Arranged":"grey",Despatched:"blue",Delivered:"success","Delivery Failed":"failure"},s=function(e){return a[e||"Not Arranged"]}},6574:function(e){e.exports={dashboard:"DashboardLayout_dashboard__4cLwy","with-site-wide-alert":"DashboardLayout_with-site-wide-alert__c7eUZ",content:"DashboardLayout_content__i40SB","dashboard-page-sections":"DashboardLayout_dashboard-page-sections__TbVM3"}},5982:function(e){e.exports={icon:"Loader_icon__cy9jX",loader:"Loader_loader__lrrEW",text:"Loader_text__AYFku"}},2281:function(e){e.exports={"tab-bar":"MobileTabBar_tab-bar__V5Lmy","tab-item":"MobileTabBar_tab-item__Gr_OI",active:"MobileTabBar_active__YDuuQ"}},2120:function(e){e.exports={card:"OrderInformation_card__7bR1B",tabs:"OrderInformation_tabs__Qjwti",tab:"OrderInformation_tab__dnyef",active:"OrderInformation_active__Dj1Up",fields:"OrderInformation_fields__yAioo",field:"OrderInformation_field__pU_fs",label:"OrderInformation_label__zvXta",value:"OrderInformation_value__fJwhg","pickup-notice":"OrderInformation_pickup-notice__36i5I",empty:"OrderInformation_empty__dQ5LY"}},3127:function(e){e.exports={sidebar:"Sidebar_sidebar__yvqjp","with-site-wide-alert":"Sidebar_with-site-wide-alert__JDaVt",nav:"Sidebar_nav__43MeB","nav-item":"Sidebar_nav-item__XfJm3",active:"Sidebar_active__vsiVJ","promo-card":"Sidebar_promo-card__k2hKf","promo-bg":"Sidebar_promo-bg__XfCKd","promo-image":"Sidebar_promo-image__AUDfR","promo-heading":"Sidebar_promo-heading__tUH27","promo-cta":"Sidebar_promo-cta__IQmA4"}},6547:function(e){e.exports={"not-found":"details_not-found__ExWAy",header:"details_header__S4Qfw",back:"details_back__HWH0g","header-actions":"details_header-actions__eJeQZ",content:"details_content__3uM38","main-panel":"details_main-panel__McmlL",cart:"details_cart__Eixrw","cart-header":"details_cart-header__38iCx","cart-title":"details_cart-title__loFAv",product:"details_product__os_hP","product-image":"details_product-image__X1ntb","product-details":"details_product-details__Fcz__","product-name":"details_product-name__5_Vbf","product-qty":"details_product-qty__zK38P","product-size":"details_product-size__vUUGC","delivery-date":"details_delivery-date__z0LlJ","side-panel":"details_side-panel__4h_2k","related-products":"details_related-products__VQU6J"}}},function(e){e.O(0,[774,888,179],(function(){return r=4648,e(e.s=r);var r}));var r=e.O();_N_E=r}]);
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.