!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="1897d872-8b6c-4b3b-8645-bc78c62f892b",e._sentryDebugIdIdentifier="sentry-dbid-1897d872-8b6c-4b3b-8645-bc78c62f892b")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9930],{39930:function(e,t,r){r.d(t,{UT:function(){return he},tw:function(){return $e},St:function(){return be},P0:function(){return Me},WA:function(){return l},QV:function(){return N},xb:function(){return J},GV:function(){return te},Sf:function(){return Ye}});var n=r(2784),i=r(82731),s=r(18459);const a=(0,i.default)(s.He).withConfig({componentId:"sc-1lwtses-0"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[40]}));var o=r(52322);var l=function(e){let{children:t}=e;return(0,o.jsx)(a,{children:t})},c=r(28456),d=r(51855),u=r(82233),p=r(70510),m=r(82091),h=r(79149),g=r(65398),f=r(97224),x=r(64897),j=r(56106),y=r(65255),b=r(3228);const w=i.default.span.withConfig({componentId:"sc-aicnew-0"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),I=i.default.span.withConfig({componentId:"sc-aicnew-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),v=(0,i.default)(s.He).attrs({as:"section"}).withConfig({componentId:"sc-aicnew-2"})(["display:flex;align-items:center;position:relative;"]),k=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)})),C=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]})),P=i.default.div.withConfig({componentId:"sc-aicnew-6"})(["&::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;}"]),S=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]})),q=(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]})),A=(0,i.default)(b.P).attrs((e=>({regPrice:e.regPrice}))).withConfig({componentId:"sc-aicnew-10"})(["font-size:16px;"]);var N=e=>{let{purchase:t}=e;const r=(0,m.useLocalizer)(),{text:n}=r,i=(0,x.Z)(),s=new Date(t.date).toLocaleString(i.locale,{month:"long",day:"2-digit",year:"numeric"}),a=(0,g.T4)(t.amount,t.currency,r);let l=(0,o.jsx)(c.d_,{status:t.status}),j=(0,o.jsxs)(q,{children:[n("Ship to:")," ",t.shipping?.firstName," ",t.shipping?.lastName]});return"digital"===t.type&&(l=null,j=(0,o.jsx)(q,{children:n(t.platform||"")})),(0,o.jsxs)(v,{children:[(0,o.jsxs)(O,{children:[(0,o.jsxs)(k,{children:[(0,o.jsx)(T,{children:s}),(0,o.jsx)(A,{regPrice:`${a}`}),(0,o.jsxs)(q,{children:[n("Purchase type:")," ",n((0,h.zf)(t.type))]}),j,n("Order Number:")," ",t.id]}),(0,o.jsxs)(C,{children:[l,(0,o.jsx)(J,{purchase:t})]})]}),(0,o.jsxs)(S,{children:[(0,o.jsxs)(w,{children:[(0,o.jsx)(f.Z,{href:`/orders/${t.id}`,children:(0,o.jsx)(P,{})}),(0,o.jsx)(d.Z,{})]}),(0,o.jsx)(I,{children:(0,o.jsx)(u.I,{href:`/orders/${t.id}`,icon:p.Z,locale:i.locale,children:n("View details")})})]})]})},$=r(95235);const L=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})),Q=i.default.span.withConfig({componentId:"sc-2cetgr-2"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),D=(0,i.default)(L).withConfig({componentId:"sc-2cetgr-3"})(["align-items:flex-start;"]),B=i.default.div.withConfig({componentId:"sc-2cetgr-4"})(["display:none;","{display:flex;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),_=i.default.div.withConfig({componentId:"sc-2cetgr-5"})(["font-weight:bold;display:block;"]),z=i.default.div.withConfig({componentId:"sc-2cetgr-6"})(["overflow:hidden;flex-shrink:0;"]),H=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-2cetgr-7"})(["margin-top:auto;margin-bottom:auto;text-overflow:ellipsis;overflow:hidden;"]),G=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 E=r(36734);function F(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 M(e){for(var t=1;t{const{amount:t}=e;return(0,o.jsx)(Z,{children:(0,o.jsxs)(_,{children:["+",t]})})},R=e=>{const{amount:t}=e;return(0,o.jsx)(Q,{children:(0,o.jsxs)(_,{children:["+",t]})})},W=3,K=2,U=e=>{const{items:t}=e,r=t.slice(0,K),[i]=t.slice(K,K+1);return(0,o.jsxs)(L,{children:[r.map((e=>(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(c.qN,{alt:e.name,publicId:e.image||E.BY,showCap:e.showCap,squareAsset:e.squareImage||e.image||E.BY,padImage:!!e.image,square:!0}),1===t.length&&(0,o.jsxs)("div",{children:[(0,o.jsx)(H,{children:e.name}),!!e.bundleOptions?.length&&(0,o.jsx)("div",{children:e.bundleOptions.map((e=>(0,o.jsx)(G,{children:e.values?.[0]?.product?.name},e.id)))})]})]},`item-${e.sku}`))),t.length>W?(0,o.jsx)(B,{children:(0,o.jsx)(c.qN,{alt:i.name,publicId:i.image||E.BY})}):null,t.length>W?(0,o.jsx)(Y,{amount:t.length-W}):null,t.length>K?(0,o.jsx)(R,{amount:t.length-K}):null]})},V=e=>{let{image:t,name:r,squareImage:n}=e;return(0,o.jsxs)(D,{children:[(0,o.jsx)(z,{children:(0,o.jsx)(c.qN,{alt:"Product art",publicId:t||E.BY,squareAsset:n||E.BY,square:!0,showBackgroundImage:!n})}),(0,o.jsx)(H,{children:r})]})};var J=e=>{let{purchase:t}=e;return"physical"===t.type?(0,o.jsx)(U,M({},t)):(0,o.jsx)(V,M({},t))},X=r(7204);const ee=(0,i.default)(X.S).withConfig({componentId:"sc-19mpt7o-0"})(["> div{height:175px;margin-bottom:50px;}"]);var te=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h8,{}),(0,o.jsxs)(s.$0,{constrained:!0,children:[(0,o.jsx)(ee,{}),(0,o.jsx)(ee,{}),(0,o.jsx)(ee,{})]})]}),re=r(78719),ne=r(42188),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]})),ae=(0,i.default)(ne.B).withConfig({componentId:"sc-1wh0o51-3"})(["min-width:150px;"]),oe=(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})),ue=i.default.span.withConfig({componentId:"sc-1wh0o51-9"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var pe=r(22585);function me(e){if(!e)return[];return e.map((e=>(0,pe.ZP)(e)))}var he=e=>{let{fetchMore:t,refetch:r,purchases:i,loading:a,totals:c}=e;const{text:d}=(0,m.useLocalizer)(),u=(0,x.Z)(),{0:p,1:h}=(0,n.useState)(me(i)),{0:g,1:j}=(0,n.useState)(!1),{0:y,1:b}=(0,n.useState)(2),{0:w,1:I}=(0,n.useState)(null),{0:v,1:k}=(0,n.useState)(0),C=(0,n.useCallback)((e=>{I(e),j(!0);r({page:1,where:{type:{eq:e}}}).then((e=>{const t=me(e.data?.customer?.orderHistory?.orders);h(t),b(2),j(!1)}))}),[r]);return(0,n.useEffect)((()=>{null===w?k(c.digital+c.physical):"DIGITAL"===w?k(c.digital):"PHYSICAL"===w&&k(c.physical)}),[c.digital,c.physical,w]),a?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h5,{title:"Purchase history",children:(0,o.jsxs)(re.B,{currentPage:u.pathname,children:[(0,o.jsx)(f.Z,{href:"/",children:(0,o.jsx)("a",{children:d("Home")})}),(0,o.jsx)(f.Z,{href:"/orders",children:(0,o.jsx)("a",{children:d("Purchase history")})})]})}),p.length||null!==w?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(oe,{children:(0,o.jsxs)(de,{children:[(0,o.jsx)(ce,{children:d("Category:")}),(0,o.jsxs)(le,{children:[(0,o.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:null===w,onClick:()=>C(null),children:[d("Show all")," ",(0,o.jsxs)(ue,{children:["(",c.digital+c.physical,")"]})]}),(0,o.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"DIGITAL"===w,disabled:0===c.digital,onClick:()=>C("DIGITAL"),children:[d("Digital")," ",(0,o.jsxs)(ue,{children:["(",c.digital,")"]})]}),(0,o.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"PHYSICAL"===w,disabled:0===c.physical,onClick:()=>C("PHYSICAL"),children:[d("Physical")," ",(0,o.jsxs)(ue,{children:["(",c.physical,")"]})]})]})]})}),(0,o.jsx)(s.He,{children:p.map((e=>(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(s.Hr,{}),(0,o.jsx)(N,{purchase:e})]},`purchase-${e.id}`)))}),(0,o.jsxs)(l,{children:[(0,o.jsx)(s.Hr,{}),p.length(j(!0),void t({variables:{page:y}}).then((e=>{const t=me(e.data?.customer?.orderHistory?.orders);h([...p,...t]),b(y+1),j(!1)}))),children:d("Load more")})}):null]})]}):(0,o.jsx)(be,{})]})},ge=r(80934),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 be=function(){const{text:e}=(0,m.useLocalizer)(),t=(0,x.Z)();return(0,o.jsx)(s.$0,{constrained:!0,children:(0,o.jsxs)(xe,{children:[(0,o.jsx)(je,{}),(0,o.jsxs)(ye,{children:[(0,o.jsx)("span",{children:e("No purchase history to show.")})," ",(0,o.jsxs)("span",{children:[e("Why not add")," ",(0,o.jsx)(ge.L,{href:"/store",locale:t.locale,children:e("something fun")}),"?"]})]})]})})},we=r(59867),Ie=r(56035),ve=r(98087),ke=r(76454);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})),Oe=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-au0dvl-1"})(["margin-top:0;"]),Pe=(0,i.default)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-au0dvl-2"})(["margin:0;font-weight:bold;"]),Se=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})),Te=i.default.div.withConfig({componentId:"sc-au0dvl-4"})(["","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),qe=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})),Ae=(0,i.default)(s.$0).attrs({constrained:!0}).withConfig({componentId:"sc-au0dvl-6"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),Ne=(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 $e=()=>{const{text:e}=(0,m.useLocalizer)(),t=(0,m.useAccounts)(),r=(0,x.Z)(),[n,{loading:i,error:a,data:l}]=(0,ve.td)(ke.o$.LN);if(l?.guestOrder&&!a){const e=(0,pe.ZP)(l.guestOrder,r.locale);return(0,o.jsx)(Me,{order:e})}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h5,{title:"Track order status",children:(0,o.jsxs)(re.B,{currentPage:r.pathname,children:[(0,o.jsx)(f.Z,{href:"/",children:(0,o.jsx)("a",{children:e("Home")})}),(0,o.jsx)(f.Z,{href:"/orders",children:(0,o.jsx)("a",{children:e("Track order status")})})]})}),(0,o.jsx)(s.$0,{constrained:!0,children:(0,o.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?.toUpperCase(),lastname:s.value,locale:r.locale})},children:[(0,o.jsxs)(Se,{children:[(a||null===l?.guestOrder)&&(0,o.jsx)(qe,{children:(0,o.jsx)(we.N,{type:"error",children:e("Sorry, but we could not find that order. Please check your entry and try again.")})}),(0,o.jsx)(Te,{children:(0,o.jsxs)(Ce,{children:[(0,o.jsx)(Oe,{children:e("Order information")}),(0,o.jsx)(Pe,{children:e("* Required fields")})]})}),(0,o.jsx)(Ie.I,{placeholder:e("Order number"),label:e("Order number"),name:"number",required:!0}),(0,o.jsx)(Ie.I,{placeholder:e("Billing Zip/postal code"),label:e("Billing Zip/postal code"),name:"postcode",required:!0}),(0,o.jsx)(Te,{children:(0,o.jsx)(Ie.I,{placeholder:e("Billing last name"),label:e("Billing last name"),name:"lastname",required:!0})}),l?.guestOrder&&!a&&(0,o.jsx)(qe,{children:(0,o.jsx)(we.N,{type:"success",children:e("Order found!")})})]}),(0,o.jsx)(ne.B,{isLoading:i,children:e("Continue")})]})}),(0,o.jsxs)(Ae,{children:[(0,o.jsx)(Ne,{children:e("Can't find your order number? Log in to access your order history.")}),(0,o.jsx)(ne.B,{variant:"secondary",onClick:()=>t.promptLogin(),children:e("Log in")})]})]})},Le=r(92003),Ze=r(43499);const Qe=i.default.div.withConfig({componentId:"sc-l9j285-0"})(["border-radius:",";"],(e=>{let{theme:t}=e;return t.borderRadius})),De=(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]})),Be=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]})),_e=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]})),ze=((0,i.default)(Qe).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]}))),He=(0,i.default)(Qe).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})),Ge=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})),Ee=(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})),Fe=(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 Me=e=>{let{order:t,customer:r}=e;const n=(0,m.useLocalizer)(),{text:i}=n,a=(0,x.Z)(),d=(0,m.useAccounts)(),p=new Date(t.date).toLocaleString(a.locale,{month:"2-digit",day:"2-digit",year:"numeric"}),{currency:h,totals:j,type:y}=t,b=(0,g.T4)(j.grand,h,n);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(De,{title:"Order details",children:(0,o.jsxs)(re.B,{currentPage:a.asPath,children:[(0,o.jsx)(f.Z,{href:"/",children:(0,o.jsx)("a",{children:i("Home")})}),(0,o.jsx)(f.Z,{href:"/orders",children:(0,o.jsx)("a",{children:i("Purchase history")})}),(0,o.jsx)(f.Z,{href:`/orders/${t.id}/`,children:(0,o.jsx)("a",{children:`${i("Order #")} ${t.id}`})})]})}),(0,o.jsxs)(s.He,{children:["physical"===y?(0,o.jsx)(Be,{children:(0,o.jsxs)(_e,{children:[(0,o.jsx)("div",{children:(0,o.jsx)(c.d_,{status:t.status})}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Transaction date:")})," ",p]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Order total:")})," ",b]})]})}):(0,o.jsxs)(Be,{children:[(0,o.jsxs)(_e,{children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Transaction date:")})," ",p]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Order total:")})," ",b]})]}),(0,o.jsxs)(_e,{children:[t.platform&&(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Device type:")})," ",t.platform]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Associated Nintendo Account:")})," ",r?.email]})]})]}),"physical"===y?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.qR,{billingAddress:t.billing,shippingAddress:t.shipping,paymentMethod:t.payment,shippingMethod:t.shipping.method,shipments:t.shipments}),(0,o.jsx)(Le.S,{size:32})]}):null,(0,o.jsxs)(ze,{children:[i("Need a hand?"),(0,o.jsx)(Le.S,{size:4,axis:"horizontal"}),(0,o.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,o.jsxs)(He,{children:[(0,o.jsxs)(Ge,{children:[(0,o.jsx)(Ye,{tracking:s,variant:"title"}),(0,o.jsxs)(Ee,{children:[i("{0} of {1}",{args:[r+1,t.shipments.length]})," ","(",n.length,")"]})]}),(0,o.jsx)("div",{children:n.map((e=>{const r=e.bundleName||e.name,n=e.bundleName?e.name:null;return(0,o.jsx)(c.Dd,{locale:a.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,o.jsx)(c.a3,{couponCode:t.couponCode,currency:t.currency,shippingMethod:t.shipping.method,totals:j,type:y}),(0,o.jsx)(c.iQ,{items:t.items,currency:h,locale:a.locale,type:y}),(0,o.jsx)(Le.S,{size:32})]}),(0,o.jsx)(l,{children:d.isLoggedIn?(0,o.jsx)(u.I,{href:"/orders",icon:Ze.Z,locale:a.locale,children:i("Back to purchase history")}):(0,o.jsx)(u.I,{onClick:()=>a.reload(window.location.pathname),icon:Ze.Z,locale:a.locale,children:i("Look up another order")})})]})};var Ye=e=>{let{tracking:t,variant:r}=e;const{text:n}=(0,m.useLocalizer)();return(0,o.jsxs)(y.T,{variant:r,children:[n("{0} tracking",{args:[t?.carrier?.toUpperCase()]})," ",(0,o.jsx)(ge.L,{href:t.url,target:"_blank",children:t.number})]})}},22585:function(e,t,r){r.d(t,{ZP:function(){return d}});var n=r(95235),i=r(79149),s=r(65398);function a(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,squareImage:e.product?.productImageSquare?.publicId,isDiscounted:e.product?.prices?.minimum?.discounted,finalPricePerItem:e.productSalePrice,regularPricePerItem:e.product?.prices?.minimum?.regularPrice,platform:e.product?.platform?.label,showCap:(0,s.BZ)(e.product??{}),isUpgrade:e.product?.isUpgrade,quantity:e.quantityOrdered,amount:e.productSalePrice,platinumPoints:e.product?.platinumPoints,urlKey:e.product?.urlKey}),c=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({},l(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 d(e,t){const r=e.items.map(l),n=e.shipments?.map((e=>((e,t)=>{const r=(0,i.$w)(t);return{number:e.number,items:c(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,squareImage:r[0].squareImage,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}}}}]); //# sourceMappingURL=9930-86459e1a10ddf9e8.js.map