"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5505],{75505:function(e,t,r){r.d(t,{UT:function(){return me},tw:function(){return ze},St:function(){return we},P0:function(){return Ge},WA:function(){return l},QV:function(){return z},xb:function(){return J},GV:function(){return te},Sf:function(){return _e}});var n=r(2784),i=r(7307),s=r(47608);const o=(0,i.default)(s.He).withConfig({componentId:"sc-1lwtses-0"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[40]}));var a=r(52322);var l=function(e){let{children:t}=e;return(0,a.jsx)(o,{children:t})},c=r(31347),d=r(51855),p=r(12192),u=r(70510),h=r(32899),m=r(14684),g=r(79185),f=r(97224),x=r(64897),j=r(54076),y=r(25544),w=r(84011);const b=i.default.span.withConfig({componentId:"sc-aicnew-0"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),v=i.default.span.withConfig({componentId:"sc-aicnew-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),I=(0,i.default)(s.He).attrs({as:"section"}).withConfig({componentId:"sc-aicnew-2"})(["display:flex;align-items:center;position:relative;"]),C=i.default.div.withConfig({componentId:"sc-aicnew-3"})(["display:flex;flex-direction:column;","{flex:0 0 ",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.pxToRem(300)})),k=i.default.div.withConfig({componentId:"sc-aicnew-4"})(["width:100%;"]),O=i.default.div.withConfig({componentId:"sc-aicnew-5"})(["display:flex;flex:1 1 auto;flex-direction:column;padding:"," 0;","{flex-direction:row;align-items:center;padding:"," 0;}"],(e=>{let{theme:t}=e;return t.spacing[24]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[24]})),N=i.default.div.withConfig({componentId:"sc-aicnew-6"})(["&::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;}"]),P=i.default.div.withConfig({componentId:"sc-aicnew-7"})(["color:",";flex-shrink:0;"],(e=>{let{theme:t}=e;return t.color.primary})),T=(0,i.default)(j.H).attrs({large:!0,variant:"h2"}).withConfig({componentId:"sc-aicnew-8"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),$=(0,i.default)(y.T).attrs({variant:"body"}).withConfig({componentId:"sc-aicnew-9"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),S=(0,i.default)(w.P).attrs((e=>({regPrice:e.regPrice}))).withConfig({componentId:"sc-aicnew-10"})(["font-size:16px;"]);var z=e=>{let{purchase:t}=e;const r=(0,h.i1)(),{text:n}=r,i=(0,x.Z)(),s=new Date(t.date).toLocaleString(i.locale,{month:"long",day:"2-digit",year:"numeric"}),o=(0,g.T4)(t.amount,t.currency,r);let l=(0,a.jsx)(c.d_,{status:t.status}),j=(0,a.jsxs)($,{children:[n("Ship to:")," ",t.shipping?.firstName," ",t.shipping?.lastName]});return"digital"===t.type&&(l=null,j=(0,a.jsx)($,{children:n(t.platform||"")})),(0,a.jsxs)(I,{children:[(0,a.jsxs)(O,{children:[(0,a.jsxs)(C,{children:[(0,a.jsx)(T,{children:s}),(0,a.jsx)(S,{regPrice:`${o}`}),(0,a.jsxs)($,{children:[n("Purchase type:")," ",n((0,m.zf)(t.type))]}),j,n("Order Number:")," ",t.id]}),(0,a.jsxs)(k,{children:[l,(0,a.jsx)(J,{purchase:t})]})]}),(0,a.jsxs)(P,{children:[(0,a.jsxs)(b,{children:[(0,a.jsx)(f.Z,{href:`/orders/${t.id}`,children:(0,a.jsx)(N,{})}),(0,a.jsx)(d.Z,{})]}),(0,a.jsx)(v,{children:(0,a.jsx)(p.D,{href:`/orders/${t.id}`,icon:u.Z,locale:i.locale,children:n("View details")})})]})]})},A=r(95235);const q=i.default.div.withConfig({componentId:"sc-2cetgr-0"})(["display:flex;gap:",";align-items:center;margin-top:",";flex:1 0 auto;"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]})),Z=i.default.span.withConfig({componentId:"sc-2cetgr-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),H=i.default.span.withConfig({componentId:"sc-2cetgr-2"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),L=(0,i.default)(q).withConfig({componentId:"sc-2cetgr-3"})(["align-items:flex-start;"]),Q=i.default.div.withConfig({componentId:"sc-2cetgr-4"})(["display:none;","{display:flex;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),D=i.default.div.withConfig({componentId:"sc-2cetgr-5"})(["font-weight:bold;display:block;"]),E=i.default.div.withConfig({componentId:"sc-2cetgr-6"})(["overflow:hidden;flex-shrink:0;"]),R=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-2cetgr-7"})(["margin-top:0;text-overflow:ellipsis;overflow:hidden;"]),B=i.default.div.withConfig({componentId:"sc-2cetgr-8"})(["font-size:",";&:first-of-type{margin-top:4px;}"],(e=>{let{theme:t}=e;return t.font.size.legalDesktop}));var M=r(87136);function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t{const{amount:t}=e;return(0,a.jsx)(Z,{children:(0,a.jsxs)(D,{children:["+",t]})})},W=e=>{const{amount:t}=e;return(0,a.jsx)(H,{children:(0,a.jsxs)(D,{children:["+",t]})})},Y=3,K=2,V=e=>{const{items:t}=e,r=t.slice(0,K),[i]=t.slice(K,K+1);return(0,a.jsxs)(q,{children:[r.map((e=>(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(c.qN,{alt:e.name,publicId:e.image||M.BY}),1===t.length&&(0,a.jsxs)("div",{children:[(0,a.jsx)(R,{children:e.name}),!!e.bundleOptions?.length&&(0,a.jsx)("div",{children:e.bundleOptions.map((e=>(0,a.jsx)(B,{children:e.values?.[0]?.product?.name},e.id)))})]})]},`item-${e.sku}`))),t.length>Y?(0,a.jsx)(Q,{children:(0,a.jsx)(c.qN,{alt:i.name,publicId:i.image||M.BY})}):null,t.length>Y?(0,a.jsx)(F,{amount:t.length-Y}):null,t.length>K?(0,a.jsx)(W,{amount:t.length-K}):null]})},U=e=>{let{image:t,name:r}=e;return(0,a.jsxs)(L,{children:[(0,a.jsx)(E,{children:(0,a.jsx)(c.qN,{alt:"Product art",publicId:t||M.BY})}),(0,a.jsx)(R,{children:r})]})};var J=e=>{let{purchase:t}=e;return"physical"===t.type?(0,a.jsx)(V,_({},t)):(0,a.jsx)(U,_({},t))},X=r(84433);const ee=(0,i.default)(X.S).withConfig({componentId:"sc-19mpt7o-0"})(["> div{height:175px;margin-bottom:50px;}"]);var te=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h8,{}),(0,a.jsxs)(s.$0,{constrained:!0,children:[(0,a.jsx)(ee,{}),(0,a.jsx)(ee,{}),(0,a.jsx)(ee,{})]})]}),re=r(67512),ne=r(62989),ie=r(1505);i.default.div.withConfig({componentId:"sc-1wh0o51-0"})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1wh0o51-1"})(["display:flex;flex-direction:column;margin-top:",";","{display:block;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));const se=i.default.div.withConfig({componentId:"sc-1wh0o51-2"})(["margin-top:",";display:flex;justify-content:center;"],(e=>{let{theme:t}=e;return t.spacing[24]})),oe=(0,i.default)(ne.B).withConfig({componentId:"sc-1wh0o51-3"})(["min-width:150px;"]),ae=(0,i.default)(s.He).withConfig({componentId:"sc-1wh0o51-4"})(["display:flex;flex-direction:column;","{align-items:flex-end;flex-direction:row;justify-content:space-between;gap:",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>e.theme.spacing[20])),le=(i.default.div.withConfig({componentId:"sc-1wh0o51-5"})(["","{width:100%;max-width:",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.pxToRem(260)})),i.default.div.withConfig({componentId:"sc-1wh0o51-6"})(["display:flex;flex-direction:row;gap:",";align-items:center;"],(e=>{let{theme:t}=e;return t.spacing[16]}))),ce=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1wh0o51-7"})(["margin-right:",";margin-bottom:",";","{display:flex;align-items:center;margin-bottom:0;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),de=i.default.div.withConfig({componentId:"sc-1wh0o51-8"})(["margin-bottom:",";","{display:flex;align-items:center;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),pe=i.default.span.withConfig({componentId:"sc-1wh0o51-9"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var ue=r(92167);function he(e){if(!e)return[];return e.map((e=>(0,ue.ZP)(e)))}var me=e=>{let{fetchMore:t,refetch:r,purchases:i,loading:o,totals:c}=e;const{text:d}=(0,h.i1)(),p=(0,x.Z)(),{0:u,1:m}=(0,n.useState)(he(i)),{0:g,1:j}=(0,n.useState)(!1),{0:y,1:w}=(0,n.useState)(2),{0:b,1:v}=(0,n.useState)(null),{0:I,1:C}=(0,n.useState)(0),k=(0,n.useCallback)((e=>{v(e),j(!0);r({page:1,where:{type:{eq:e}}}).then((e=>{const t=he(e.data?.customer?.orderHistory?.orders);m(t),w(2),j(!1)}))}),[r]);return(0,n.useEffect)((()=>{null===b?C(c.digital+c.physical):"DIGITAL"===b?C(c.digital):"PHYSICAL"===b&&C(c.physical)}),[c.digital,c.physical,b]),o?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h5,{title:"Purchase history",children:(0,a.jsxs)(re.B,{currentPage:p.pathname,children:[(0,a.jsx)(f.Z,{href:"/",children:(0,a.jsx)("a",{children:d("Home")})}),(0,a.jsx)(f.Z,{href:"/orders",children:(0,a.jsx)("a",{children:d("Purchase history")})})]})}),u.length||null!==b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ae,{children:(0,a.jsxs)(de,{children:[(0,a.jsx)(ce,{children:d("Category:")}),(0,a.jsxs)(le,{children:[(0,a.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:null===b,onClick:()=>k(null),children:[d("Show all")," ",(0,a.jsxs)(pe,{children:["(",c.digital+c.physical,")"]})]}),(0,a.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"DIGITAL"===b,disabled:0===c.digital,onClick:()=>k("DIGITAL"),children:[d("Digital")," ",(0,a.jsxs)(pe,{children:["(",c.digital,")"]})]}),(0,a.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"PHYSICAL"===b,disabled:0===c.physical,onClick:()=>k("PHYSICAL"),children:[d("Physical")," ",(0,a.jsxs)(pe,{children:["(",c.physical,")"]})]})]})]})}),(0,a.jsx)(s.He,{children:u.map((e=>(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(s.Hr,{}),(0,a.jsx)(z,{purchase:e})]},`purchase-${e.id}`)))}),(0,a.jsxs)(l,{children:[(0,a.jsx)(s.Hr,{}),u.length(j(!0),void t({variables:{page:y}}).then((e=>{const t=he(e.data?.customer?.orderHistory?.orders);m([...u,...t]),w(y+1),j(!1)}))),children:d("Load more")})}):null]})]}):(0,a.jsx)(we,{})]})},ge=r(96447),fe=r(92951);const xe=i.default.div.withConfig({componentId:"sc-1bq8esa-0"})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),je=(0,i.default)(fe.Z).withConfig({componentId:"sc-1bq8esa-1"})(["height:",";width:auto;"],(e=>{let{theme:t}=e;return t.spacing[48]})),ye=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1bq8esa-2"})(["display:flex;flex-direction:column;margin-top:",";","{display:block;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var we=function(){const{text:e}=(0,h.i1)(),t=(0,x.Z)();return(0,a.jsx)(s.$0,{constrained:!0,children:(0,a.jsxs)(xe,{children:[(0,a.jsx)(je,{}),(0,a.jsxs)(ye,{children:[(0,a.jsx)("span",{children:e("No purchase history to show.")})," ",(0,a.jsxs)("span",{children:[e("Why not add")," ",(0,a.jsx)(ge.L,{href:"/store",locale:t.locale,children:e("something fun")}),"?"]})]})]})})},be=r(53371),ve=r(80437),Ie=r(15820);const Ce=i.default.div.withConfig({componentId:"sc-au0dvl-0"})(["display:flex;flex-direction:column;margin-bottom:",";","{flex-direction:row;justify-content:space-between;align-items:center;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),ke=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-au0dvl-1"})(["margin-top:0;"]),Oe=(0,i.default)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-au0dvl-2"})(["margin:0;font-weight:bold;"]),Ne=i.default.div.withConfig({componentId:"sc-au0dvl-3"})(["display:grid;grid-template-columns:1fr;column-gap:",";margin-bottom:",";max-width:",";width:100%;","{grid-template-columns:1fr 1fr;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.pxToRem(800)}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Pe=i.default.div.withConfig({componentId:"sc-au0dvl-4"})(["","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Te=i.default.div.withConfig({componentId:"sc-au0dvl-5"})(["margin-bottom:",";","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.spacing[48]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),$e=(0,i.default)(s.$0).attrs({constrained:!0}).withConfig({componentId:"sc-au0dvl-6"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),Se=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-au0dvl-7"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[16]}));var ze=()=>{const{text:e}=(0,h.i1)(),t=(0,h.xe)(),r=(0,x.Z)(),[n,{loading:i,error:o,data:l}]=(0,Ie.td)(Ie.o$.LN);if(l?.guestOrder&&!o){const e=(0,ue.ZP)(l.guestOrder,r.locale);return(0,a.jsx)(Ge,{order:e})}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.h5,{title:"Track order status",children:(0,a.jsxs)(re.B,{currentPage:r.pathname,children:[(0,a.jsx)(f.Z,{href:"/",children:(0,a.jsx)("a",{children:e("Home")})}),(0,a.jsx)(f.Z,{href:"/orders",children:(0,a.jsx)("a",{children:e("Track order status")})})]})}),(0,a.jsx)(s.$0,{constrained:!0,children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=e.currentTarget.elements.number,i=e.currentTarget.elements.postcode,s=e.currentTarget.elements.lastname;n({orderNumber:t.value,postcode:i.value,lastname:s.value,locale:r.locale})},children:[(0,a.jsxs)(Ne,{children:[(o||null===l?.guestOrder)&&(0,a.jsx)(Te,{children:(0,a.jsx)(be.N,{type:"error",children:e("Sorry, but we could not find that order. Please check your entry and try again.")})}),(0,a.jsx)(Pe,{children:(0,a.jsxs)(Ce,{children:[(0,a.jsx)(ke,{children:e("Order information")}),(0,a.jsx)(Oe,{children:e("* Required fields")})]})}),(0,a.jsx)(ve.I,{placeholder:e("Order number"),label:e("Order number"),name:"number",required:!0}),(0,a.jsx)(ve.I,{placeholder:e("Billing Zip/postal code"),label:e("Billing Zip/postal code"),name:"postcode",required:!0}),(0,a.jsx)(Pe,{children:(0,a.jsx)(ve.I,{placeholder:e("Billing last name"),label:e("Billing last name"),name:"lastname",required:!0})}),l?.guestOrder&&!o&&(0,a.jsx)(Te,{children:(0,a.jsx)(be.N,{type:"success",children:e("Order found!")})})]}),(0,a.jsx)(ne.B,{isLoading:i,children:e("Continue")})]})}),(0,a.jsxs)($e,{children:[(0,a.jsx)(Se,{children:e("Can't find your order number? Log in to access your order history.")}),(0,a.jsx)(ne.B,{variant:"secondary",onClick:()=>t.promptLogin(),children:e("Log in")})]})]})},Ae=r(20669),qe=r(43499);const Ze=i.default.div.withConfig({componentId:"sc-l9j285-0"})(["border-radius:",";"],(e=>{let{theme:t}=e;return t.borderRadius})),He=(0,i.default)(s.h5).withConfig({componentId:"sc-l9j285-1"})(["margin-bottom:",";","{margin-bottom:",";}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[24]})),Le=i.default.div.withConfig({componentId:"sc-l9j285-2"})(["display:flex;flex-direction:column;margin:0 0 ",";gap:",";"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[8]})),Qe=i.default.div.withConfig({componentId:"sc-l9j285-3"})(["display:flex;gap:",";flex-direction:column;","{gap:",";align-items:flex-end;flex-direction:row;}"],(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[32]})),De=((0,i.default)(Ze).withConfig({componentId:"sc-l9j285-4"})(["display:flex;flex-direction:column;margin-bottom:",";"," & > *{flex:1;padding:",";&:not(:last-child){border-bottom:solid 1px ",";}}","{flex-direction:row;& > *{&:not(:last-child){border-bottom:0;border-right:solid 1px ",";}}}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return(0,i.css)(["border:solid 1px ",";"],t.color.lightGray2)}),(e=>{let{theme:t}=e;return t.spacing[24]}),(e=>{let{theme:t}=e;return t.color.lightGray2}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.color.lightGray2})),i.default.div.withConfig({componentId:"sc-l9j285-5"})(["display:flex;margin-bottom:",";font-weight:bold;svg{margin-right:",";}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[8]}))),Ee=(0,i.default)(Ze).withConfig({componentId:"sc-l9j285-6"})(["margin-bottom:",";& > *{&:first-child{border-bottom:solid 1px ",";padding-bottom:",";}}","{"," & > *{padding:",";&:first-child{padding:",";margin:0;border-bottom:solid 1px ",";}}}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.color.lightGray2}),(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return(0,i.css)(["border:solid 1px ",";margin-bottom:",";"],t.color.lightGray2,t.spacing[32])}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.color.lightGray2})),Re=i.default.div.withConfig({componentId:"sc-l9j285-7"})(["display:flex;justify-content:space-between;flex-direction:column;","{flex-direction:row;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),Be=(0,i.default)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-l9j285-8"})(["display:flex;align-items:center;margin-top:",";","{margin-top:0;}"],(e=>{let{theme:t}=e;return t.spacing[4]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),Me=(i.default.div.withConfig({componentId:"sc-l9j285-9"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[16]})),i.default.span.withConfig({componentId:"sc-l9j285-10"})(["font-weight:bold;"]));var Ge=e=>{let{order:t,customer:r}=e;const n=(0,h.i1)(),{text:i}=n,o=(0,x.Z)(),d=(0,h.xe)(),u=new Date(t.date).toLocaleString(o.locale,{month:"2-digit",day:"2-digit",year:"numeric"}),{currency:m,totals:j,type:y}=t,w=(0,g.T4)(j.grand,m,n);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(He,{title:"Order details",children:(0,a.jsxs)(re.B,{currentPage:o.asPath,children:[(0,a.jsx)(f.Z,{href:"/",children:(0,a.jsx)("a",{children:i("Home")})}),(0,a.jsx)(f.Z,{href:"/orders",children:(0,a.jsx)("a",{children:i("Purchase history")})}),(0,a.jsx)(f.Z,{href:`/orders/${t.id}/`,children:(0,a.jsx)("a",{children:`${i("Order #")} ${t.id}`})})]})}),(0,a.jsxs)(s.He,{children:["physical"===y?(0,a.jsx)(Le,{children:(0,a.jsxs)(Qe,{children:[(0,a.jsx)("div",{children:(0,a.jsx)(c.d_,{status:t.status})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(Me,{children:i("Transaction date:")})," ",u]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(Me,{children:i("Order total:")})," ",w]})]})}):(0,a.jsxs)(Le,{children:[(0,a.jsxs)(Qe,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(Me,{children:i("Transaction date:")})," ",u]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(Me,{children:i("Order total:")})," ",w]})]}),(0,a.jsxs)(Qe,{children:[t.platform&&(0,a.jsxs)("div",{children:[(0,a.jsx)(Me,{children:i("Device type:")})," ",t.platform]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(Me,{children:i("Associated Nintendo Account:")})," ",r?.email]})]})]}),"physical"===y?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.qR,{billingAddress:t.billing,shippingAddress:t.shipping,paymentMethod:t.payment,shippingMethod:t.shipping.method,shipments:t.shipments}),(0,a.jsx)(Ae.S,{size:32})]}):null,(0,a.jsxs)(De,{children:[i("Need a hand?"),(0,a.jsx)(Ae.S,{size:4,axis:"horizontal"}),(0,a.jsx)(ge.L,{href:"https://en-americas-support.nintendo.com/app/contact",target:"_blank",children:i("Contact Customer Support")})]}),t.shipments.map(((e,r)=>{const{items:n}=e,[s]=e.tracking;return(0,a.jsxs)(Ee,{children:[(0,a.jsxs)(Re,{children:[(0,a.jsx)(_e,{tracking:s,variant:"title"}),(0,a.jsxs)(Be,{children:[i("{0} of {1}",{args:[r+1,t.shipments.length]})," ","(",n.length,")"]})]}),(0,a.jsx)("div",{children:n.map((e=>{const r=e.bundleName||e.name,n=e.bundleName?e.name:null;return(0,a.jsx)(c.Dd,{locale:o.locale,finalprice:e.finalPricePerItem,quantity:e.quantity,name:r,subtitle:n,publicId:e.image,currency:t.currency,type:y,title:e.name||e.product?.name,urlKey:e.urlKey||e.product?.urlKey,hidePrice:!0},`order-${e.sku}`)}))})]},e.number)})),(0,a.jsx)(c.a3,{couponCode:t.couponCode,currency:t.currency,shippingMethod:t.shipping.method,totals:j,type:y}),(0,a.jsx)(c.iQ,{items:t.items,currency:m,locale:o.locale,type:y}),(0,a.jsx)(Ae.S,{size:32})]}),(0,a.jsx)(l,{children:d.isLoggedIn?(0,a.jsx)(p.D,{href:"/orders",icon:qe.Z,locale:o.locale,children:i("Back to purchase history")}):(0,a.jsx)(p.D,{onClick:()=>o.reload(window.location.pathname),icon:qe.Z,locale:o.locale,children:i("Look up another order")})})]})};var _e=e=>{let{tracking:t,variant:r}=e;const{text:n}=(0,h.i1)();return(0,a.jsxs)(y.T,{variant:r,children:[n("{0} tracking",{args:[t?.carrier?.toUpperCase()]})," ",(0,a.jsx)(ge.L,{href:t.url,target:"_blank",children:t.number})]})}},92167:function(e,t,r){r.d(t,{ZP:function(){return c}});var n=r(95235),i=r(14684);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t({sku:e.product?.sku,bundleOptions:e.bundleOptions,name:e.product?.name,image:e.product?.productImage?.publicId,isDiscounted:e.product?.prices?.minimum?.discounted,finalPricePerItem:e.productSalePrice,regularPricePerItem:e.product?.prices?.minimum?.regularPrice,platform:e.product?.platform?.label,quantity:e.quantityOrdered,amount:e.productSalePrice,platinumPoints:e.product?.platinumPoints,urlKey:e.product?.urlKey}),l=e=>(e.items||[]).reduce(((t,r)=>{let{orderItem:n,parentSku:i}=r;if(n.productSku.split("-").length>2)return t;const s=e.items.find((e=>{let{orderItem:t}=e;return t.productSku===i}));return[...t,o(o({},a(o(o({},n),{},{productSalePrice:s?.orderItem?.product?.prices?.minimum?.regularPrice||n?.product?.prices?.minimum?.regularPrice}))),{},{image:s?s.orderItem?.product?.productImage?.publicId:n?.product?.productImage?.publicId,quantity:n.quantityShipped,parentSku:i,bundleName:s?.orderItem?.product?.name})]}),[]);function c(e,t){const r=e.items.map(a),n=e.shipments?.map((e=>((e,t)=>{const r=(0,i.$w)(t);return{number:e.number,items:l(e),tracking:e.tracking.map((e=>((e,t)=>{const r={en:{fedex:`https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=${e.number}`,ups:`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,"ups mi":`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,usps:`https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=${e.number}`,puro:`https://www.purolator.com/${t}/shipping/tracker?pin=${e.number}`,"canada post":`https://www.canadapost-postescanada.ca/track-reperage/${t}#/search?searchFor=${e.number}`},fr:{fedex:`https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=${e.number}`,ups:`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,"ups mi":`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,usps:`https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=${e.number}`,puro:`https://www.purolator.com/${t}/expedition/faire-le-suivi-dun-envoi?pin=${e.number}`,"canada post":`https://www.canadapost-postescanada.ca/track-reperage/${t}#/search?searchFor=${e.number}`}};return{title:e.title,number:e.number,carrier:e.carrier,url:r[t][e.carrier]||"#"}})(e,r)))}})(e,t)));return{id:e.id||e.number,couponCode:e.couponCode,name:r[0].name||e.contentName,type:"StoreOrder"==e.__typename||"GuestOrder"==e.__typename?"physical":"digital",date:e.orderDate,amount:e.total.grandTotal,platform:r[0].platform,image:r[0].image,status:e.status||null,billing:{firstName:e.billingAddress?.firstName,lastName:e.billingAddress?.lastName,street:e.billingAddress?.street,city:e.billingAddress?.city,postcode:e.billingAddress?.postcode,region:e.billingAddress?.region?.name,country:e.billingAddress?.country?.fillNameEnglish,telephone:e.billingAddress?.telephone},shipping:{firstName:e.shippingAddress?.firstName,lastName:e.shippingAddress?.lastName,street:e.shippingAddress?.street,city:e.shippingAddress?.city,postcode:e.shippingAddress?.postcode,region:e.shippingAddress?.region?.name,country:e.shippingAddress?.country?.fillNameEnglish,telephone:e.shippingAddress?.telephone,method:e.shippingMethod,carrier:e.shipments?.tracking?.carrier,number:e.shipments?.tracking?.number,title:e.shipments?.tracking?.title},payment:{method:e.paymentMethod?.method,type:e.paymentMethod?.type,last4:e.paymentMethod?.last4},totals:{discounts:e.total.discounts,grand:e.total.grandTotal,sub:e.total.subtotal,tax:e.total.totalTax,taxes:e.total.taxes,shipping:e.total.totalShipping},shipments:n||[],items:r}}},67512:function(e,t,r){r.d(t,{B:function(){return g}});var n=r(2784),i=r(13980),s=r.n(i),o=r(7307),a=r(51855),l=r(52322);const c=o.default.nav.withConfig({componentId:"sc-sjz6t7-0"})(["font-size:",";font-weight:",";"],(({theme:e})=>e.font.size.legalDesktop),(({theme:e})=>e.font.weight.bold)),d=o.default.ol.withConfig({componentId:"sc-sjz6t7-1"})(["align-items:center;display:flex;flex-direction:row;list-style:none;margin:0;padding:0;font-size:inherit;font-weight:inherit;flex-wrap:nowrap;"]),p=o.default.li.withConfig({componentId:"sc-sjz6t7-2"})(["align-items:center;display:inline-flex;margin-right:",";color:",";white-space:nowrap;",""],(({theme:e})=>e.spacing[8]),(({theme:e,$isActive:t})=>t?e.color.darkGray2:e.color.darkGray3),(({$cutOff:e})=>e&&(0,o.css)(["overflow:hidden;& > *{","}"],(({$cutOff:e})=>e&&(0,o.css)(["overflow:hidden;text-overflow:ellipsis;"]))))),u=(0,o.default)(a.Z).attrs((({theme:e})=>({size:10,color:e.color.lightGray2}))).withConfig({componentId:"sc-sjz6t7-3"})(["margin-left:",";"],(({theme:e})=>e.spacing[8])),h=({currentPage:e,children:t})=>{const r=(0,n.useMemo)((()=>n.Children.count(t)-1),[t]),i=(0,n.useMemo)((()=>n.Children.map(t,((t,n)=>{const i=n===r,s=e&&e===t.props.href,o="a"===t.type?t.props.children:"a"===t.props.children.type?t.props.children.props.children:null;return(0,l.jsxs)(p,{$isActive:s,$cutOff:i,children:[s&&o?(0,l.jsx)("span",{"aria-current":"page",children:o}):t,i?null:(0,l.jsx)(u,{})]},t.props.href||n)}))),[e,t,r]);return(0,l.jsx)(c,{"aria-label":"Breadcrumb",children:(0,l.jsx)(d,{children:i})})},m=s().shape({props:s().shape({href:s().string.isRequired,children:s().node})});h.propTypes={children:s().oneOfType([s().arrayOf(m),m]).isRequired,currentPage:s().string};var g=h},28108:function(e,t,r){r.d(t,{Z:function(){return o}});r(2784);var n=r(13980),i=r.n(n),s=r(52322);const o=e=>(0,s.jsxs)("svg",{"data-name":"Layer 2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"CheckmarkCircleIcon",...e,children:[(0,s.jsx)("polygon",{points:"22.918 8.348 13.35 18.909 10.825 16.648 10.827 16.646 8.618 14.668 6.618 17.109 13.595 23.563 15.298 21.683 15.299 21.684 25.382 10.552 22.918 8.348",fill:e.color}),(0,s.jsx)("path",{d:"M15.95555,2A13.95555,13.95555,0,1,1,2,15.95555,13.97134,13.97134,0,0,1,15.95555,2m0-2A15.95555,15.95555,0,1,0,31.91109,15.95555,15.95556,15.95556,0,0,0,15.95555,0Z",fill:e.color})]});o.propTypes={className:i().string,color:i().string,size:i().oneOfType([i().number,i().string])},o.defaultProps={color:"currentColor",size:24}},80437:function(e,t,r){r.d(t,{I:function(){return m},a:function(){return d}});var n=r(2784),i=r(13980),s=r.n(i),o=r(7307),a=r(88582),l=r(52322);const c=o.default.div.withConfig({componentId:"sc-1jq32sv-0"})(["width:100%;position:relative;z-index:0;",";"],a.e),d=o.default.input.withConfig({componentId:"sc-1jq32sv-1"})(["width:100%;background-color:",";border:1px solid ",";border-radius:",";padding-left:",";",";",";",";&[disabled]{","}&::placeholder{",";}&.left{border-top-left-radius:0;border-bottom-left-radius:0;}&.right{border-top-right-radius:0;border-bottom-right-radius:0;}&:focus[data-focus-visible-added],&:focus-visible{","}"],(({theme:e})=>e.color.white),(({theme:e})=>e.color.darkGray4),(({theme:e})=>e.borderRadius),(({theme:e})=>e.spacing[24]),a.i,a.a,(({$hasError:e})=>e&&a.b),a.d,a.p,a.f),p=o.default.label.withConfig({componentId:"sc-1jq32sv-2"})(["display:block;white-space:nowrap;"," margin-bottom:",";"," ",""],a.l,(({$isHidden:e})=>e?"0":a.c),(({$isHidden:e})=>!!e&&"\n display: none;\n\n & + input {\n margin-top: 0;\n }\n "),(({required:e})=>e&&(0,o.css)(["&::after{content:' *';}"]))),u=o.default.div.withConfig({componentId:"sc-1jq32sv-3"})(["display:flex;"]),h=n.forwardRef((function(e,t){const{actionElement:r,errorMessage:n,flat:i,hasError:s,label:o,labelHidden:h,onChange:m,placeholder:g,required:f,value:x,className:j,...y}=e,w=`${g}-${o}`;return(0,l.jsxs)(c,{$hasError:s,className:j,children:[(0,l.jsx)(p,{required:f,$isHidden:h,htmlFor:w,"aria-label":o,children:o}),(0,l.jsxs)(u,{children:[(0,l.jsx)(d,{ref:t,name:o,$hasError:s,"aria-invalid":s,id:w,className:i,placeholder:g,onChange:m,$isLabelHidden:h,value:x,required:f,...y}),r]}),(0,l.jsx)(a.S,{children:(0,l.jsx)(a.g,{role:"alert",children:n})})]})}));h.defaultProps={placeholder:"placeholder",label:"input label",labelHidden:!1},h.propTypes={className:s().string,actionElement:s().element,errorMessage:s().string,flat:s().oneOf(["left","right"]),hasError:s().bool,label:s().string.isRequired,labelHidden:s().bool,onChange:s().func,placeholder:s().string.isRequired,required:s().bool,value:s().string};var m=h},11059:function(e,t,r){r.d(t,{Z:function(){return o}});r(2784);var n=r(13980),i=r.n(n),s=r(52322);const o=e=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",xmlSpace:"preserve",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"MegaphoneIcon",...e,children:(0,s.jsx)("path",{fill:e.color,d:"M31.6 13.8h-3.4c-.2 0-.4.2-.4.4s.2.4.4.4h3.4c.2 0 .4-.2.4-.4s-.2-.4-.4-.4zm-8.6-3h-.2V4.9c0-.7-.6-1.4-1.4-1.4L13.8 9H2.5C1.1 9 0 10.2 0 11.7v5.4c0 1.5 1.1 2.7 2.5 2.7h2l.8 6.3c0 1.3 1.1 2.3 2.4 2.3h1.2c1.3 0 2.4-1 2.4-2.3l-.8-6.3h3.3l7.7 5.4c.8 0 1.4-.6 1.4-1.4v-5.9h.1c1.9 0 3.5-1.6 3.5-3.6v-.1c.1-1.8-1.5-3.4-3.5-3.4zM8.9 26.7H7.7c-.4 0-.7-.3-.7-.5V26l-.8-6h2.5l.8 6.3c0 .1-.3.4-.6.4zm5.4-8.5c-.1 0-.2-.1-.4-.1H2.5c-.4 0-.7-.4-.7-.9v-5.4c0-.5.3-.9.7-.9h11.4c.1 0 .2 0 .4-.1v7.4zm6.8 4.7l-6-4.2v-8.5l6-4.2v16.9zm3.7-8.4c0 1-.8 1.8-1.8 1.8h-.2v-3.7h.2c1 0 1.8.8 1.8 1.8v.1zm3.3 4.2c-.2-.2-.4-.2-.6 0-.2.2-.2.4 0 .6l3 3.4c.1.1.2.1.3.1.1 0 .2 0 .3-.1.2-.2.2-.4 0-.6l-3-3.4zm-.4-8.8c.1 0 .2 0 .3-.1l3-3.4c.2-.2.1-.5 0-.6-.2-.2-.5-.2-.6 0l-3 3.4c-.2.2-.1.5 0 .6.1 0 .2.1.3.1z"})});o.propTypes={className:i().string,color:i().string,size:i().oneOfType([i().number,i().string])},o.defaultProps={color:"currentColor",size:24}},53371:function(e,t,r){r.d(t,{N:function(){return j}});var n=r(2784),i=r(13980),s=r.n(i),o=r(7307),a=r(52322),l=r(11059),c=r(28108),d=r(96051);const p={error:"#fde6e7",info:"#dfe3fb",success:"#d4f2c4",warning:"#fffbb1",maintenance:"#efefef"},u={error:"#e60012",info:"#3946a0",success:"#2d8513",warning:"#f26c13",maintenance:"#484848"},h=o.default.div.withConfig({componentId:"sc-oo0sbi-0"})(["display:flex;align-items:center;width:100%;min-height:",";"," "," ",""],(({theme:e})=>e.spacing[48]),(({theme:e})=>(0,o.css)(["padding:"," ",";font-size:",";border-radius:",";"],e.spacing[12],e.spacing[14],e.font.size.p,e.borderRadius)),(({$type:e,theme:t})=>(0,o.css)(["color:",";background-color:",";svg{color:",";}"],t.color.darkGray2,p[e],u[e])),(({theme:e})=>(0,o.css)(["","{padding:"," ",";}"],e.mediaQuery.tabletSmall,e.spacing[12],e.spacing[16]))),m=o.default.div.withConfig({componentId:"sc-oo0sbi-1"})(["margin-right:",";height:1.5rem;width:1.5rem;svg{height:auto;width:auto;}","{margin-right:",";}"],(({theme:e})=>e.spacing[12]),(({theme:e})=>e.mediaQuery.tabletSmall),(({theme:e})=>e.spacing[16])),g={ERROR:"error",INFO:"info",SUCCESS:"success",WARNING:"warning",MAINTENANCE:"maintenance"},f={[g.ERROR]:null,[g.INFO]:l.Z,[g.SUCCESS]:c.Z,[g.WARNING]:null,[g.MAINTENANCE]:d.Z},x=n.forwardRef((function(e,t){const{children:r,className:n,role:i,type:s}=e,o=e.Icon??f[s];return(0,a.jsxs)(h,{ref:t,$type:s,role:i,className:n,children:[o?(0,a.jsx)(m,{children:(0,a.jsx)(o,{})}):"",(0,a.jsx)("div",{children:r})]})}));x.propTypes={className:s().string,children:s().node,role:s().oneOf(["alert"]),type:s().oneOf(Object.values(g)).isRequired,Icon:s().oneOfType([s().element,s().elementType])};var j=x},92951:function(e,t,r){r.d(t,{Z:function(){return o}});r(2784);var n=r(13980),i=r.n(n),s=r(52322);const o=e=>(0,s.jsxs)("svg",{"data-name":"Layer 3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"ShoppingCartOutlineIcon",...e,children:[(0,s.jsx)("path",{d:"M25.315 20.556a1.1 1.1 0 0 0 1-.64l5.444-11.829a1.1 1.1 0 0 0-1-1.56H7.772L7.25 3.411a1.1 1.1 0 0 0-1.085-.918H1.168a1.1 1.1 0 1 0 0 2.2h4.065L7.72 19.53l-.983 4.87a1.1 1.1 0 0 0 1.078 1.318h18.673a1.1 1.1 0 0 0 0-2.2H9.16l.599-2.963zm3.728-11.828l-4.433 9.628H9.754L8.14 8.728z",fill:e.color}),(0,s.jsx)("circle",{cx:9.55,cy:27.917,r:2.271,fill:e.color}),(0,s.jsx)("circle",{cx:24.805,cy:27.917,r:2.271,fill:e.color})]});o.propTypes={className:i().string,color:i().string,size:i().oneOfType([i().number,i().string])},o.defaultProps={color:"currentColor",size:24}}}]);