!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]="9d088d15-4334-42f7-8253-81aff5eeff09",e._sentryDebugIdIdentifier="sentry-dbid-9d088d15-4334-42f7-8253-81aff5eeff09")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[795],{27150:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReturnOrder"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"orderNumber"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"items"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ReturnRequestItem"}}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"description"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"returnRequest"},name:{kind:"Name",value:"createReturnRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"orderNumber"},value:{kind:"Variable",name:{kind:"Name",value:"orderNumber"}}},{kind:"ObjectField",name:{kind:"Name",value:"items"},value:{kind:"Variable",name:{kind:"Name",value:"items"}}},{kind:"ObjectField",name:{kind:"Name",value:"description"},value:{kind:"Variable",name:{kind:"Name",value:"description"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"returnOrderNumber"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:268}};t.loc.source={body:"mutation ReturnOrder(\n $orderNumber: ID!\n $items: [ReturnRequestItem!]!\n $description: String\n) {\n returnRequest: createReturnRequest(\n input: { orderNumber: $orderNumber, items: $items, description: $description }\n ) {\n success\n returnOrderNumber\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}var n={};function i(e,t){for(var r=0;r0;){var l=o;o=new Set,l.forEach((function(e){a.has(e)||(a.add(e),(n[e]||new Set).forEach((function(e){o.add(e)})))}))}return a.forEach((function(t){var n=i(e,t);n&&r.definitions.push(n)})),r}(t,"ReturnOrder")},20795:function(e,t,r){"use strict";r.d(t,{h8:function(){return he},tw:function(){return Ae},St:function(){return je},MU:function(){return Ut},Fk:function(){return R},P0:function(){return Me},Sv:function(){return Dt},pQ:function(){return Et},OL:function(){return J},gC:function(){return qt},TH:function(){return te},WA:function(){return l},yn:function(){return Nt},t3:function(){return Ve},Sf:function(){return ze},mk:function(){return ot}});var n=r(2784),i=r(82731),s=r(38949);const a=(0,i.ZP)(s.He).withConfig({componentId:"sc-10qg83c-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})},d=r(51855),c=r(81131),u=r(70510),p=r(13610),m=r(79149),h=r(82665),g=r(97224),f=r(64897),x=r(27851),y=r(79351),b=r(82103);const j=i.ZP.span.withConfig({componentId:"sc-1tqkwur-0"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),v=i.ZP.span.withConfig({componentId:"sc-1tqkwur-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),w=(0,i.ZP)(s.He).attrs({as:"section"}).withConfig({componentId:"sc-1tqkwur-2"})(["display:flex;align-items:center;position:relative;"]),k=i.ZP.div.withConfig({componentId:"sc-1tqkwur-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)})),S=i.ZP.div.withConfig({componentId:"sc-1tqkwur-4"})(["width:100%;"]),C=i.ZP.div.withConfig({componentId:"sc-1tqkwur-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.ZP.div.withConfig({componentId:"sc-1tqkwur-6"})(["&::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;}"]),I=i.ZP.div.withConfig({componentId:"sc-1tqkwur-7"})(["color:",";flex-shrink:0;"],(e=>{let{theme:t}=e;return t.color.primary})),_=(0,i.ZP)(x.H).attrs({large:!0,variant:"h2"}).withConfig({componentId:"sc-1tqkwur-8"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),O=(0,i.ZP)(y.T).attrs({variant:"body"}).withConfig({componentId:"sc-1tqkwur-9"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),N=(0,i.ZP)(b.P).attrs((e=>({regPrice:e.regPrice}))).withConfig({componentId:"sc-1tqkwur-10"})(["font-size:16px;"]);var R=e=>{let{purchase:t}=e;const r=(0,p.useLocalizer)(),{text:n}=r,i=(0,f.Z)(),s=new Date(t.date).toLocaleString(i.locale,{month:"long",day:"2-digit",year:"numeric"}),a=(0,h.T4)(t.amount,t.currency,r);let l=(0,o.jsxs)(O,{children:[n("Ship to:")," ",t.shipping?.fullName]});return"digital"===t.type&&(l=(0,o.jsx)(O,{children:n(t.platform||"")})),(0,o.jsxs)(w,{children:[(0,o.jsxs)(C,{children:[(0,o.jsxs)(k,{children:[(0,o.jsx)(_,{children:s}),(0,o.jsx)(N,{regPrice:`${a}`}),(0,o.jsxs)(O,{children:[n("Purchase type:")," ",n((0,m.zf)(t.type))]}),l,n("Order number:")," ",t.id]}),(0,o.jsx)(S,{children:(0,o.jsx)(J,{purchase:t})})]}),(0,o.jsxs)(I,{children:[(0,o.jsxs)(j,{children:[(0,o.jsx)(g.Z,{href:`/orders/${t.id}`,children:(0,o.jsx)(P,{})}),(0,o.jsx)(d.Z,{})]}),(0,o.jsx)(v,{children:(0,o.jsx)(c.I,{href:`/orders/${t.id}`,icon:u.Z,locale:i.locale,children:n("View details")})})]})]})},D=r(95235),A=r(84283);const Z=i.ZP.div.withConfig({componentId:"sc-gwdend-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]})),E=i.ZP.span.withConfig({componentId:"sc-gwdend-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),T=i.ZP.span.withConfig({componentId:"sc-gwdend-2"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),L=(0,i.ZP)(Z).withConfig({componentId:"sc-gwdend-3"})(["align-items:flex-start;"]),U=i.ZP.div.withConfig({componentId:"sc-gwdend-4"})(["display:none;","{display:flex;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),q=i.ZP.div.withConfig({componentId:"sc-gwdend-5"})(["font-weight:",";display:block;"],(e=>{let{theme:t}=e;return t.font.weight.bold})),B=i.ZP.div.withConfig({componentId:"sc-gwdend-6"})(["overflow:hidden;flex-shrink:0;"]),M=(0,i.ZP)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-gwdend-7"})(["margin-top:auto;margin-bottom:auto;text-overflow:ellipsis;overflow:hidden;"]),F=i.ZP.div.withConfig({componentId:"sc-gwdend-8"})(["font-size:",";&:first-of-type{margin-top:4px;}"],(e=>{let{theme:t}=e;return t.font.size.legalDesktop}));var Q=r(36734);function z(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,o.jsx)(E,{children:(0,o.jsxs)(q,{children:["+",t]})})},W=e=>{const{amount:t}=e;return(0,o.jsx)(T,{children:(0,o.jsxs)(q,{children:["+",t]})})},Y=3,G=2,V=e=>{const{items:t}=e,r=t.slice(0,G),[i]=t.slice(G,G+1);return(0,o.jsxs)(Z,{children:[r.map((e=>(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(A.qN,{alt:e.name,publicId:e.image||Q.BY,showCap:e.showCap,squareAsset:e.squareImage||e.image||Q.BY,padImage:!!e.image,square:!0}),1===t.length&&(0,o.jsxs)("div",{children:[(0,o.jsx)(M,{children:e.name}),!!e.bundleOptions?.length&&(0,o.jsx)("div",{children:e.bundleOptions.map((e=>(0,o.jsx)(F,{children:e.values?.[0]?.product?.name},e.id)))})]})]},`item-${e.sku}`))),t.length>Y?(0,o.jsx)(U,{children:(0,o.jsx)(A.qN,{alt:i.name,publicId:i.image||Q.BY})}):null,t.length>Y?(0,o.jsx)(H,{amount:t.length-Y}):null,t.length>G?(0,o.jsx)(W,{amount:t.length-G}):null]})},K=e=>{let{image:t,name:r,squareImage:n,items:i}=e;return(0,o.jsxs)(L,{children:[(0,o.jsx)(B,{children:(0,o.jsx)(A.qN,{alt:"Product art",publicId:t||Q.BY,squareAsset:n||Q.BY,square:!0,showCap:i[0].showCap,showBackgroundImage:!n})}),(0,o.jsx)(M,{children:r})]})};var J=e=>{let{purchase:t}=e;return"physical"===t.type?(0,o.jsx)(V,$({},t)):(0,o.jsx)(K,$({},t))},X=r(27689);const ee=(0,i.ZP)(X.S).withConfig({componentId:"sc-m4l99q-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(98461),ne=r(29278),ie=r(1505);(0,i.ZP)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1dxdxu7-0"})(["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.ZP.div.withConfig({componentId:"sc-1dxdxu7-1"})(["margin-top:",";display:flex;justify-content:center;"],(e=>{let{theme:t}=e;return t.spacing[24]})),ae=(0,i.ZP)(ne.B).withConfig({componentId:"sc-1dxdxu7-2"})(["min-width:150px;"]),oe=(0,i.ZP)(s.He).withConfig({componentId:"sc-1dxdxu7-3"})(["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.ZP.div.withConfig({componentId:"sc-1dxdxu7-4"})(["","{width:100%;max-width:",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.pxToRem(260)})),i.ZP.div.withConfig({componentId:"sc-1dxdxu7-5"})(["display:flex;flex-direction:row;gap:",";align-items:center;"],(e=>{let{theme:t}=e;return t.spacing[16]}))),de=(0,i.ZP)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1dxdxu7-6"})(["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})),ce=i.ZP.div.withConfig({componentId:"sc-1dxdxu7-7"})(["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.ZP.span.withConfig({componentId:"sc-1dxdxu7-8"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var pe=r(88452);function me(e){return e?e.map((e=>(0,pe.ZP)(e))):[]}var he=e=>{let{fetchMore:t,refetch:r,purchases:i,loading:a,totals:d}=e;const{text:c}=(0,p.useLocalizer)(),{pathname:u}=(0,f.Z)(),{0:m,1:h}=(0,n.useState)([]),{0:x,1:y}=(0,n.useState)(!1),{0:b,1:j}=(0,n.useState)(2),{0:v,1:w}=(0,n.useState)(null),{0:k,1:S}=(0,n.useState)(0),C=(0,n.useCallback)((e=>{w(e),y(!0);r({page:1,where:{type:{eq:e}}}).then((e=>{const t=me(e.data?.customer?.orderHistory?.orders);h(t),j(2),y(!1)}))}),[r]);return(0,n.useEffect)((()=>{null===v?S(d.digital+d.physical):"DIGITAL"===v?S(d.digital):"PHYSICAL"===v&&S(d.physical)}),[d.digital,d.physical,v]),(0,n.useEffect)((()=>{h((()=>me(i)))}),[i]),a?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h5,{title:"Order history",children:(0,o.jsxs)(re.B,{currentPage:u,children:[(0,o.jsx)(g.Z,{href:"/",children:(0,o.jsx)("a",{children:c("Home")})}),(0,o.jsx)(g.Z,{href:"/orders",children:(0,o.jsx)("a",{children:c("Order history")})})]})}),m.length||null!==v?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(oe,{children:(0,o.jsxs)(ce,{children:[(0,o.jsx)(de,{children:c("Category:")}),(0,o.jsxs)(le,{children:[(0,o.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:null===v,onClick:()=>C(null),children:[c("Show all")," ",(0,o.jsxs)(ue,{children:["(",d.digital+d.physical,")"]})]}),(0,o.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"DIGITAL"===v,disabled:0===d.digital,onClick:()=>C("DIGITAL"),children:[c("Digital")," ",(0,o.jsxs)(ue,{children:["(",d.digital,")"]})]}),(0,o.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"PHYSICAL"===v,disabled:0===d.physical,onClick:()=>C("PHYSICAL"),children:[c("Physical")," ",(0,o.jsxs)(ue,{children:["(",d.physical,")"]})]})]})]})}),(0,o.jsx)(s.He,{children:m.map((e=>(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(s.Hr,{}),(0,o.jsx)(R,{purchase:e})]},`purchase-${e.id}`)))}),(0,o.jsxs)(l,{children:[(0,o.jsx)(s.Hr,{}),m.length(y(!0),void t({variables:{page:b}}).then((e=>{const t=me(e.data?.customer?.orderHistory?.orders);h([...m,...t]),j(b+1),y(!1)}))),children:c("Load more")})}):null]})]}):(0,o.jsx)(je,{})]})},ge=r(53873),fe=r(92951);const xe=i.ZP.div.withConfig({componentId:"sc-16exn6z-0"})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),ye=(0,i.ZP)(fe.Z).withConfig({componentId:"sc-16exn6z-1"})(["height:",";width:auto;"],(e=>{let{theme:t}=e;return t.spacing[48]})),be=(0,i.ZP)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-16exn6z-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 je=function(){const{text:e}=(0,p.useLocalizer)(),t=(0,f.Z)();return(0,o.jsx)(s.$0,{constrained:!0,children:(0,o.jsxs)(xe,{children:[(0,o.jsx)(ye,{}),(0,o.jsxs)(be,{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")}),"?"]})]})]})})},ve=r(12968),we=r(5819),ke=r(98087),Se=r(76454);const Ce=i.ZP.div.withConfig({componentId:"sc-hmxg12-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})),Pe=(0,i.ZP)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-hmxg12-1"})(["margin-top:0;"]),Ie=(0,i.ZP)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-hmxg12-2"})(["margin:0;font-weight:",";"],(e=>{let{theme:t}=e;return t.font.weight.bold})),_e=i.ZP.div.withConfig({componentId:"sc-hmxg12-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})),Oe=i.ZP.div.withConfig({componentId:"sc-hmxg12-4"})(["","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Ne=i.ZP.div.withConfig({componentId:"sc-hmxg12-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})),Re=(0,i.ZP)(s.$0).attrs({constrained:!0}).withConfig({componentId:"sc-hmxg12-6"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),De=(0,i.ZP)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-hmxg12-7"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[16]}));var Ae=()=>{const{text:e}=(0,p.useLocalizer)(),t=(0,p.useAccounts)(),r=(0,f.Z)(),[n,{loading:i,error:a,data:l}]=(0,ke.td)(Se.o$.LN),d=r.asPath===`/orders/${l?.guestOrder?.number}/`&&l?.guestOrder&&!a;if(d){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)(g.Z,{href:"/",children:(0,o.jsx)("a",{children:e("Home")})}),(0,o.jsx)(g.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:async e=>{e.preventDefault();const t=e.currentTarget.elements.number,i=e.currentTarget.elements.postcode,s=e.currentTarget.elements.lastname,a=await n({orderNumber:t.value,postcode:i.value?.toUpperCase(),lastname:s.value});a?.data?.guestOrder&&!a?.error&&r.push({pathname:`/orders/${a.data.guestOrder.number}`},null,{shallow:!0})},children:[(0,o.jsxs)(_e,{children:[(a||null===l?.guestOrder)&&(0,o.jsx)(Ne,{children:(0,o.jsx)(ve.N,{type:"error",children:e("Sorry, but we could not find that order. Please check your entry and try again.")})}),(0,o.jsx)(Oe,{children:(0,o.jsxs)(Ce,{children:[(0,o.jsx)(Pe,{children:e("Order information")}),(0,o.jsx)(Ie,{children:e("* Required fields")})]})}),(0,o.jsx)(we.I,{placeholder:e("Order number"),label:e("Order number"),name:"number",required:!0}),(0,o.jsx)(we.I,{placeholder:e("Billing Zip/postal code"),label:e("Billing Zip/postal code"),name:"postcode",required:!0}),(0,o.jsx)(Oe,{children:(0,o.jsx)(we.I,{placeholder:e("Billing last name"),label:e("Billing last name"),name:"lastname",required:!0})}),d&&(0,o.jsx)(Ne,{children:(0,o.jsx)(ve.N,{type:"success",children:e("Order found!")})})]}),(0,o.jsx)(ne.B,{isLoading:i,children:e("Continue")})]})}),(0,o.jsxs)(Re,{children:[(0,o.jsx)(De,{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")})]})]})},Ze=r(41630),Ee=r(43499);const Te=i.ZP.div.withConfig({componentId:"sc-gw1tio-0"})(["border-radius:",";"],(e=>{let{theme:t}=e;return t.borderRadius})),Le=(0,i.ZP)(ve.N).withConfig({componentId:"sc-gw1tio-1"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[16]})),Ue=((0,i.ZP)(s.h5).withConfig({componentId:"sc-gw1tio-2"})(["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]})),i.ZP.div.withConfig({componentId:"sc-gw1tio-3"})(["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]})),i.ZP.div.withConfig({componentId:"sc-gw1tio-4"})(["display:flex;gap:",";flex-direction:column;","{gap:",";align-items:center;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]})),(0,i.ZP)(Te).withConfig({componentId:"sc-gw1tio-5"})(["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.iv)(["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.ZP.div.withConfig({componentId:"sc-gw1tio-6"})(["display:flex;margin-bottom:",";font-weight:",";svg{margin-right:",";}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.font.weight.bold}),(e=>{let{theme:t}=e;return t.spacing[8]})),(0,i.ZP)(Te).withConfig({componentId:"sc-gw1tio-7"})(["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.iv)(["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}))),qe=i.ZP.div.withConfig({componentId:"sc-gw1tio-8"})(["display:flex;justify-content:space-between;flex-direction:column;","{flex-direction:row;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),Be=(0,i.ZP)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-gw1tio-9"})(["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}));i.ZP.div.withConfig({componentId:"sc-gw1tio-10"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[16]})),i.ZP.span.withConfig({componentId:"sc-gw1tio-11"})(["font-weight:",";"],(e=>{let{theme:t}=e;return t.font.weight.bold}));var Me=e=>{let{order:t,customer:r,routerStatus:i,featureFlags:a,isOrderConfirmation:d=!1}=e;const u=(0,p.useLocalizer)(),{text:m}=u,h=(0,f.Z)(),g=(0,p.useAccounts)(),{0:y,1:b}=(0,n.useState)(i),{enableReturns:j,enableAddressUpdate:v,enableCancelation:w}=a||{},{currency:k,totals:S,type:C,returnedItems:P,isMissingShippingData:I}=t,_=A.a1[t?.status?.toUpperCase()]===A.Tb.CANCELED,O=(0,n.useMemo)((()=>d||_||C===Q.Km.DIGITAL?t?.items:t?.items?.filter((e=>e?.quantityToShip>0))),[t?.items,d,_,C]),N=(0,n.useMemo)((()=>j&&t?.returnableItems?.length&&g?.isLoggedIn),[j,t?.returnableItems?.length,g?.isLoggedIn]),R=(0,n.useMemo)((()=>w&&t?.isSelfServiceable&&!_&&g?.isLoggedIn),[w,t?.isSelfServiceable,_,g?.isLoggedIn]),D=(0,n.useMemo)((()=>v&&t?.isSelfServiceable&&!_&&g?.isLoggedIn),[v,t?.isSelfServiceable,_,g?.isLoggedIn]);return(0,o.jsxs)(o.Fragment,{children:[y?(0,o.jsx)(s.He,{children:(0,o.jsx)(qt,{status:y,customer:r})}):null,I&&(0,o.jsx)(s.He,{children:(0,o.jsxs)(Le,{type:"info",children:[(0,o.jsx)("strong",{children:m("Attention:")})," ",m("Please review your shipping confirmation email for tracking information for this order.")]})}),(0,o.jsx)(Dt,{title:m("Order details"),currentPagePath:h.asPath,order:t}),(0,o.jsxs)(s.He,{children:[(0,o.jsx)(Et,{customer:r,order:t}),C===Q.Km.PHYSICAL?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A.qR,{billingAddress:t.billing,shippingAddress:t.shipping,shippingMethod:I?m("Please see shipping confirmation email for details."):t.shipping.method,shipments:t.shipments}),(0,o.jsx)(Ze.S,{size:32})]}):null,(0,o.jsx)(Ve,{order:t,hideReturnOrder:!N,hideCancelOrder:!R,hideUpdateAddress:!D,setStatus:b}),(0,o.jsx)(Ze.S,{size:32}),t?.shipments?.map(((e,r)=>{const{items:n}=e,i=e?.tracking?.[0];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.H,{variant:"h2",as:"h2",children:(0,o.jsx)("span",{children:m("Shipped Items")})}),(0,o.jsx)(Ze.S,{size:16}),(0,o.jsxs)(Ue,{children:[(0,o.jsxs)(qe,{children:[!I&&(0,o.jsx)(ze,{tracking:i,variant:"caption"}),(0,o.jsxs)(Be,{children:[m("{0} of {1}",{args:[r+1,t.shipments?.length]})," ","(",n.length,")"]})]}),(0,o.jsx)("div",{children:n.map((e=>{const t=e.bundleName||e.name,r=e.bundleName?e.name:null;return(0,o.jsx)(A.Dd,{locale:h.locale,regularPrice:e.regularPricePerItem,finalPrice:e.finalPricePerItem,quantity:e.quantity,name:t,subtitle:r,publicId:e.image,currency:k,type:C,title:e.name||e.product?.name,urlKey:e.urlKey||e.product?.urlKey,hidePrice:!0},`order-${e.sku}`)}))})]},e.number)]})})),O?.length>0&&(0,o.jsx)(A.iQ,{items:O,customTitle:_?m("Canceled Items"):null,currency:k,locale:h.locale,type:C}),(0,o.jsx)(Ze.S,{size:32}),j&&P?.length>0&&(0,o.jsxs)(o.Fragment,{children:[P.map(((e,t)=>(0,o.jsx)(A.iQ,{items:e.items,customTitle:m("Return items"),customNotif:e.status,currency:k,locale:h.locale,type:C,hideHeader:t>0,isReturnItems:!0},t))),(0,o.jsx)(Ze.S,{size:32})]}),(0,o.jsx)(A.a3,{couponCode:t?.couponCode,paymentMethod:t?.payment,currency:k,shippingMethod:t?.shipping?.method,totals:S,type:C})]}),(0,o.jsx)(l,{children:g?.isLoggedIn?(0,o.jsx)(c.I,{href:"/orders",icon:Ee.Z,locale:h.locale,children:m("Back to purchase history")}):(0,o.jsx)(c.I,{onClick:()=>h.reload(window.location.pathname),icon:Ee.Z,locale:h.locale,children:m("Look up another order")})})]})},Fe=r(94162),Qe=r.n(Fe);var ze=e=>{let{tracking:t,variant:r}=e;const{text:n}=(0,p.useLocalizer)();return(0,o.jsxs)("div",{className:Qe().trackingWrapper,children:[(0,o.jsx)(y.T,{variant:r,children:n("Shipped with {0}:",{args:[t?.carrier?.toUpperCase()]})})," ",(0,o.jsx)(ge.L,{href:t?.url,target:"_blank",children:n("Track package {0}",{args:[t?.number]})},t?.number)]})},$e=r(37474),He=r.n($e),We=r(68374),Ye=r(99140);const Ge=e=>{let{onClick:t,link:r,children:n}=e;return(0,o.jsx)(ge.L,{onClick:t,href:r,className:He().link,children:n})};var Ve=e=>{let{onReturnOrderClick:t,hideUpdateAddress:r,hideContactSupport:i,hideCancelOrder:s,hideReturnOrder:a,order:l,setStatus:d}=e;const{text:c}=(0,p.useLocalizer)(),{0:u,1:m}=(0,n.useState)(!1),h=(0,n.useRef)(),{id:g}=l;return(0,o.jsxs)("div",{children:[!r&&(0,o.jsx)(ot,{visible:u,setStatus:d,onClose:()=>m(!1),order:l,returnFocus:h.current}),(0,o.jsxs)("div",{className:He().container,children:[(0,o.jsxs)("div",{className:He().text,children:[(0,o.jsx)(We.Z,{}),c("Need a hand?")]}),!a&&(0,o.jsx)(Ge,{onClick:t,link:!t&&`/orders/${g}/returns`,children:c("Return order")}),!s&&(0,o.jsx)(Ge,{link:`/orders/${g}/cancel`,children:c("Cancel order")}),!r&&(0,o.jsx)(Ge,{onClick:()=>m(!0),ref:h,children:c("Update address")}),!i&&(0,o.jsx)(Ge,{link:Ye.MV.CONTACT_SUPPORT_URL,children:c("Contact us")})]})]})},Ke=r(40489),Je=r(33379),Xe=r(13580),et=r(30450),tt=r(45110),rt=r.n(tt);function nt(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 it(e){for(var t=1;t{const{visible:t,onClose:r,setStatus:i,order:s,returnFocus:a}=e,{text:l}=(0,p.useLocalizer)(),{locale:d}=(0,f.Z)(),[c]=s.shipping.street,{0:u,1:m}=(0,n.useState)(c),[h,{loading:g}]=(0,Je.D)(Se.P$.Nd,{update:(e,t)=>{let{data:r}=t;const{status:n,success:i}=r.updateOrderAddress;i&&n===st&&e.modify({id:e.identify({number:s.id,__typename:"StoreOrder"}),fields:{shippingAddress:e=>it(it({},e),{},{street:[u]})}})}}),x=(0,n.useCallback)((async e=>{e.preventDefault();const{data:t,error:n}=await h({variables:{input:{orderNumber:s.id,address1:u}}});t?.updateOrderAddress?.success?t?.updateOrderAddress?.status===st?i(Ut.UPDATE_ADDRESS_SUCCESS):t?.updateOrderAddress?.status===at&&i(Ut.UPDATE_ADDRESS_PENDING):t?.updateOrderAddress?.success&&!n||i(Ut.UPDATE_ADDRESS_FAILED),r()}),[h,u,r,i,s]);return(0,n.useEffect)((()=>{t&&m(c)}),[t,c]),(0,o.jsx)(Xe.M,{visible:t,onClose:r,className:rt().modal,returnFocus:a,shouldBindFocus:t,dialogLabel:l("Update your shipping address"),children:(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:rt().redCap,children:l("Update your shipping address")}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Ze.S,{size:16}),(0,o.jsxs)("div",{className:rt().descriptionContainer,children:[(0,o.jsx)(et.Z,{size:"48"}),(0,o.jsx)(Ze.S,{size:16}),(0,o.jsx)("div",{className:rt().descriptionText,children:l("You can update your street address and apartment or suite using this form. If you need more updates, please {0}.",{args:[(0,o.jsx)(ge.L,{className:(0,Ke.Z)(rt().contactUsLink,d===Ye.xJ&&rt().capitalize),href:Ye.MV.CONTACT_SUPPORT_URL,children:l("Contact us")},"contact-us")]})})]}),(0,o.jsxs)("form",{className:rt().fieldsContainer,onSubmit:x,children:[(0,o.jsx)(we.I,{label:l("Street address and apartment or suite"),placeholder:c||"",value:u,onChange:e=>m(e.target.value)}),(0,o.jsxs)("div",{className:rt().buttonsContainer,children:[(0,o.jsx)(ne.B,{variant:"secondary",onClick:r,type:"button",disabled:g,children:l("Cancel")}),(0,o.jsx)(ne.B,{isLoading:g,disabled:0===u?.length||u===c,children:l("Save changes")})]})]})]})]})})},lt=r(82269),dt=r(98606),ct=r(27150),ut=r.n(ct);const pt=(e,t,r)=>{const n=[];for(let i=0;iArray.from(e).reduce(((e,t)=>{let[,r]=t;return e+r.price*(r.selectedQuantity?.value??1)}),0);function ht(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 gt(e){for(var t=1;t{let{type:r,payload:n}=t;if(r===ft){const t=new Map(e.selectedReturnItems),{sku:r,isSelected:i}=n,s=e.returnableItems.find((e=>e.sku===r));return i?t.set(r,{selectedQuantity:1===s.quantity?{value:1,label:1}:null,selectedReason:null,price:s.regularPricePerItem}):t.delete(r),gt(gt({},e),{},{selectedReturnItems:t,estimatedReturn:mt(t)})}if(r===xt){const t=new Map(e.selectedReturnItems),{sku:r,key:i,option:s}=n,a=t.get(r);return a[i]=s,t.set(r,a),gt(gt({},e),{},{selectedReturnItems:t,estimatedReturn:mt(t)})}return r===yt?gt(gt({},e),{},{isSubmittingReturn:!1,currentStep:wt}):r===bt?gt(gt({},e),{},{isSubmittingReturn:!1,currentStep:vt,selectedReturnItems:new Map}):r===jt?gt(gt({},e),{},{isSubmittingReturn:!0}):void 0};var Ct=r(54929),Pt=r.n(Ct);const It=["text"];function _t(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 Ot(e){for(var t=1;t{const{customer:t,order:r}=e,{returnableItems:i=[],currency:a}=r||{},l=(0,p.useLocalizer)(),{text:c}=l,u=(0,lt.Z)(l,It),m=(0,f.Z)(),[b]=(0,Je.D)(ut(),{fetchPolicy:"network-only"}),{0:{isSubmittingReturn:j,currentStep:v,selectedReturnItems:w,estimatedReturn:k},1:S}=(0,n.useReducer)(St,Ot({returnableItems:i},kt)),C=v===vt,P=v===wt,I=(0,n.useMemo)((()=>v===vt?i:i.filter((e=>{let{sku:t}=e;return w.has(t)}))),[w,v,i]),_=(0,n.useMemo)((()=>(r?.returnReasonCodes||[]).map((e=>({key:"selectedReason",label:c(e),value:e})))),[r,c]),O=(0,n.useMemo)((()=>v===vt?w.size>0:v===wt?w.entries().every((e=>{let[,t]=e;return!!t?.selectedQuantity&&!!t?.selectedReason})):void 0),[v,w]),N=(0,n.useCallback)((async()=>{S({type:jt});const e=i.filter((e=>{let{sku:t}=e;return w.has(t)})).map((e=>{let{sku:t,lineNumber:r}=e;return{sku:t,lineNumber:r,quantity:w.get(t).selectedQuantity?.value,reasonCode:w.get(t).selectedReason?.value}})),t={orderNumber:r.id,items:e},{data:n}=await b({variables:t});n?.returnRequest?.success?m.push(`/orders/${r.id}/?status=${Ut.RETURN_SUCCESS}`):m.push(`/orders/${r.id}/?status=${Ut.RETURN_FAILED}`)}),[S,m,b,r,w,i]),R=(0,n.useCallback)((e=>{const t=e.currentTarget,r=t.checked,n=t.value;S({type:ft,payload:{sku:n,isSelected:r}})}),[S]),D=(0,n.useCallback)((e=>{let{sku:t,key:r,label:n,value:i}=e;S({type:xt,payload:{sku:t,key:r,option:{label:n,value:i}}})}),[S]),Z=(0,n.useCallback)((async e=>{e.preventDefault(),v===vt?S({type:yt}):v===wt&&N()}),[v,N]),E=(0,n.useCallback)((()=>{S({type:bt})}),[S]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Dt,{title:c("Start a return"),currentPagePath:m.asPath,order:r}),(0,o.jsxs)(s.He,{children:[(0,o.jsx)(Et,{customer:t,order:r}),(0,o.jsxs)("div",{className:Pt().headingContainer,children:[(0,o.jsx)(x.H,{as:"h2",variant:"h2",children:c("What would you like to return?")}),(0,o.jsx)(y.T,{variant:"body",children:c("We're sorry to hear something didn't work out. Select the item or items you'd like to return.")})]}),(0,o.jsxs)("form",{onSubmit:Z,children:[(0,o.jsx)("div",{className:Pt().orderItemContainer,children:I.map((e=>(0,o.jsxs)("div",{className:(0,Ke.Z)(Pt().returnRow,P&&Pt().hasSelectors),children:[(0,o.jsxs)("label",{className:Pt().returnTile,children:[C&&(0,o.jsx)("input",{type:"checkbox",value:e.sku,onChange:R,checked:w.has(e.sku)}),(0,o.jsx)(A.Dd,{className:Pt().orderItem,locale:m.locale,regularPrice:e.regularPricePerItem,finalprice:e.finalPricePerItem,quantity:e.quantity,displayQuantityUnderTitle:!0,name:e.name,publicId:e.image,currency:r.currency,type:r.type,title:e.name,variant:"secondary"})]}),P&&(0,o.jsxs)("div",{className:Pt().returnDetailsContainer,children:[e.quantity>1&&(0,o.jsx)(dt.S,{name:"quantity",onChange:D,label:`${c("Quantity")}*`,placeholder:`${c("Quantity")}`,options:pt(e.sku,"selectedQuantity",e.quantity),value:w.get(e.sku).selectedQuantity,isDisabled:j,isClearable:!1,isSearchable:!1}),(0,o.jsx)(dt.S,{name:"reasons",onChange:D,label:`${c("Reason for return")}*`,placeholder:`${c("Reason for return")}`,options:_.map((t=>Ot(Ot({},t),{},{sku:e.sku}))),value:w.get(e.sku).selectedReason,isDisabled:j,isClearable:!1})]})]},e.sku)))}),P&&(0,o.jsxs)("div",{className:(0,Ke.Z)(Pt().callout,Pt().estimatedTotal),children:[(0,o.jsx)("span",{children:c("Estimated refund")}),(0,o.jsx)("span",{children:(0,h.T4)(k,a,u)})]}),(0,o.jsxs)("div",{className:Pt().ctaWrapper,children:[(0,o.jsx)(ne.B,{className:Pt().backCta,href:C&&`/orders/${r.id}`,onClick:P&&E,icon:Ee.Z,variant:"secondary",disabled:j,children:c("Back")}),(0,o.jsx)(ne.B,{type:"submit",icon:C&&d.Z,iconPosition:"right",disabled:!O,isLoading:j,children:c(C?"Continue":"Submit return")})]})]}),(0,o.jsxs)("div",{className:(0,Ke.Z)(Pt().callout,Pt().disclaimer),children:[(0,o.jsx)(y.T,{variant:"body",as:"b",children:c("Return information")}),(0,o.jsx)("div",{className:Pt().disclaimerBody,children:(0,o.jsxs)("ul",{children:[(0,o.jsx)("li",{children:(0,o.jsx)(y.T,{variant:"caption",children:c("You have 30 days after delivery of your order to return items.")})}),(0,o.jsx)("li",{children:(0,o.jsx)(y.T,{variant:"caption",children:c("We'll issue a refund to your original payment method within 3-5 business days after we receive your return. ")})}),(0,o.jsx)("li",{children:(0,o.jsx)(y.T,{variant:"caption",children:c("Digital items cannot be returned.")})}),(0,o.jsx)("li",{children:(0,o.jsx)(y.T,{variant:"caption",children:c("Your original shipping cost will not be refunded, unless the item's damaged, defective, or different from what your ordered. The refund will be prorated across the items returned.")})}),(0,o.jsx)("li",{children:(0,o.jsx)(y.T,{variant:"caption",children:c("You'll need to pay the return shipping cost, unless the item's damaged, defective, or different from what your ordered.")})}),(0,o.jsx)("li",{children:(0,o.jsx)(y.T,{variant:"caption",children:c("For more details, see our {0}.",{args:[(0,o.jsx)(g.Z,{href:"/refund-return-policy/my-nintendo-store/",children:(0,o.jsx)(ge.L,{className:Pt().returnPolicyLink,children:c("Return policy")})},"return-policy")]})})})]})})]})]})]})};const Rt=(0,i.ZP)(s.h5).withConfig({componentId:"sc-1i7ynx6-0"})(["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]}));var Dt=e=>{const{title:t,currentPagePath:r,order:n}=e,{text:i}=(0,p.useLocalizer)();return(0,o.jsx)(Rt,{title:t,children:(0,o.jsxs)(re.B,{currentPage:r,children:[(0,o.jsx)(g.Z,{href:"/",children:(0,o.jsx)("a",{children:i("Home")})}),(0,o.jsx)(g.Z,{href:"/orders",children:(0,o.jsx)("a",{children:i("Order history")})}),(0,o.jsx)(g.Z,{href:`/orders/${n.id}/`,children:(0,o.jsx)("a",{children:`${i("Order number")} #${n.id}`})})]})})},At=r(25794),Zt=r.n(At);var Et=e=>{const{customer:t,order:r}=e,n=(0,f.Z)(),i=(0,p.useLocalizer)(),{text:s}=i;return(0,o.jsxs)("div",{className:Zt().orderInfo,children:[r.status&&(0,o.jsx)("div",{className:Zt().row,children:(0,o.jsx)(A.d_,{status:r.status})}),(0,o.jsxs)("div",{className:Zt().row,children:[(0,o.jsx)("span",{className:Zt().key,children:s("Order number:")}),(0,o.jsxs)("span",{className:Zt().value,children:["#",r.id]})]}),(0,o.jsxs)("div",{className:Zt().row,children:[(0,o.jsx)("span",{className:Zt().key,children:s("Order total:")}),(0,o.jsx)("span",{className:Zt().value,children:(0,h.T4)(r.totals.grand,r.currency,i)})]}),(0,o.jsxs)("div",{className:Zt().row,children:[(0,o.jsx)("span",{className:Zt().key,children:s("Placed on:")}),(0,o.jsx)("span",{className:Zt().value,children:new Date(r.date).toLocaleString(n.locale,{month:"2-digit",day:"2-digit",year:"numeric"})})]}),t?.email&&(0,o.jsxs)("div",{className:Zt().row,children:[(0,o.jsx)("span",{className:Zt().key,children:s("Email:")}),(0,o.jsx)("span",{className:Zt().value,children:t?.email})]}),"digital"===r?.type&&r.platform&&(0,o.jsxs)("div",{className:Zt().row,children:[(0,o.jsx)("span",{className:Zt().key,children:s("System:")}),(0,o.jsx)("span",{className:Zt().value,children:r.platform})]})]})},Tt=r(49680),Lt=r.n(Tt);const Ut={CANCEL_SUCCESS:"c_s",CANCEL_PENDING:"c_p",CANCEL_FAILED:"c_f",ORDER_SUCCESS:"success",RETURN_SUCCESS:"r_s",RETURN_PENDING:"r_p",RETURN_FAILED:"r_f",RETURN_UNAVAILABLE:"r_u",UPDATE_ADDRESS_SUCCESS:"u_s",UPDATE_ADDRESS_PENDING:"u_p",UPDATE_ADDRESS_FAILED:"u_f"};var qt=e=>{const{text:t}=(0,p.useLocalizer)(),{customer:r}=e,n={[Ut.CANCEL_SUCCESS]:{type:"success",textBold:"Order canceled:",text:"Your order was successfully canceled. You'll get an email confirmation with details."},[Ut.CANCEL_PENDING]:{type:"info",text:"We're trying to cancel your order. You'll get an email in a few minutes to confirm if your order was canceled.",textBold:"Cancellation requested:"},[Ut.CANCEL_FAILED]:{type:"error",text:"Sorry, it was too late to cancel your order as it's already preparing to ship. {0}",textBold:"Cancellation failed:",args:[(0,o.jsx)(g.Z,{href:"/refund-return-policy/",children:(0,o.jsx)(ge.L,{children:t("See returns info?")})},"return-info")]},[Ut.ORDER_SUCCESS]:{type:"success",text:"Thank you for shopping with us! We've sent an order confirmation to {0}.",textBold:"Order confirmed:",args:[r?.email??t("your email")]},[Ut.RETURN_SUCCESS]:{type:"success",textBold:"Return requested:",text:"Your return request was successful."},[Ut.RETURN_PENDING]:{type:"info",text:"We've emailed you instructions for shipping your return package.",textBold:"Return requested:"},[Ut.RETURN_FAILED]:{type:"error",text:"We were not able to accept your return. Our customer support team has reached out to you.",textBold:"Return rejected:"},[Ut.RETURN_UNAVAILABLE]:{type:"error",text:"This order has no items that can be returned.",textBold:"Returns unavailable:"},[Ut.UPDATE_ADDRESS_SUCCESS]:{type:"success",textBold:"Address updated:",text:"Your shipping address was successfully updated. Refresh this page to see your updated address."},[Ut.UPDATE_ADDRESS_PENDING]:{type:"info",text:" We're trying to update your shipping address. You'll get an email in a few minutes to confirm if your address was updated.",textBold:"Update requested:"},[Ut.UPDATE_ADDRESS_FAILED]:{type:"error",text:"Sorry, it was too late to update your address as your order's preparing to ship. We recommend you contact the shipping company directly.",textBold:"Update failed:"}}[e.status];return(0,o.jsxs)(ve.N,{className:Lt().notification,type:n.type,children:[(0,o.jsx)("strong",{children:t(n.textBold)})," ",t(n.text,{args:n.args})]})}},88452:function(e,t,r){"use strict";r.d(t,{ZP:function(){return u}});var n=r(95235),i=r(82665),s=r(36734);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||t?.contentName,image:e.product?.productImage?.publicId,squareImage:e.product?.productImageSquare?.publicId,isDiscounted:e.product?.prices?.discounted,finalPricePerItem:e.product?.prices?.finalPrice,regularPricePerItem:e.product?.prices?.regularPrice,platform:e.product?.platform?.label,showCap:(0,i.BZ)(e.product??{}),isUpgrade:e.product?.isUpgrade,isPrePurchase:e.product?.prePurchase,releaseDate:e.product?.releaseDate,releaseDateDisplay:e.product?.releaseDateDisplay,quantity:e.quantityOrdered,amount:e.productSalePrice,platinumPoints:e.product?.platinumPoints,urlKey:e.product?.urlKey,lineNumber:e.lineNumber,totalPrice:e.productSalePrice,quantityToShip:e.quantityToShip}),d=e=>(e?.items||[]).reduce(((t,r)=>{let{orderItem:n,parentSku:i,isReturnable:s,quantityShipped:a}=r;if(n.productSku.split("-").length>2)return t;const d=e.items.find((e=>{let{orderItem:t}=e;return t.productSku===i}));return[...t,o(o({},l(o(o({},n),{},{productSalePrice:d?.orderItem?.product?.prices?.regularPrice||n?.product?.prices?.regularPrice}))),{},{image:d?d.orderItem?.product?.productImage?.publicId:n?.product?.productImage?.publicId,quantity:a,isReturnable:!!s,parentSku:i,bundleName:d?.orderItem?.product?.name})]}),[]),c=(e,t)=>{const r=new Set(e?.flatMap((e=>{let{items:t}=e;return t})).map((e=>{let{sku:t,isReturnable:r}=e;return r&&t})).filter(Boolean));return(t||[]).filter((e=>{let{sku:t}=e;return r.has(t)}))};function u(e){const t=e.items.map((t=>l(t,e))),r=e?.itemsEligibleForReturn?.map(l)||[],n=e?.shipments?.filter(Boolean),i=n?.map((e=>(e=>({number:e?.number,items:d(e),tracking:e?.tracking}))(e)));return{id:e.id||e.number,currency:e.currency,name:t[0].name||e.contentName,type:"StoreOrder"==e.__typename||"GuestOrder"==e.__typename?s.Km.PHYSICAL:s.Km.DIGITAL,cancelReasonCodes:e.cancelReasonCodes,date:e.orderDate,amount:e.total.grandTotal,platform:t[0].platform,image:t[0].image,isSelfServiceable:e.isSelfServiceable,squareImage:t[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?.name,telephone:e.billingAddress?.telephone},shipping:{firstName:e.shippingAddress?.firstName,lastName:e.shippingAddress?.lastName,fullName:e.shippingAddress?.fullName,street:e.shippingAddress?.street,city:e.shippingAddress?.city,postcode:e.shippingAddress?.postcode,region:e.shippingAddress?.region?.name,country:e.shippingAddress?.country?.name,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:i||[],items:t,returnableItems:c(i,r),returnedItems:(a=e?.returns||[],a?.map((e=>{let{status:t,items:r=[]}=e;return{status:t||null,items:r.filter((e=>{let{orderItem:t}=e;return Boolean(t)})).map((e=>{let{quantity:t,platinumPoints:r,orderItem:n,total:i}=e;return o(o({},l(n)),{},{quantity:t,platinumPoints:r,totalPrice:i})}))}}))),returnReasonCodes:e?.returnReasonCodes||[],isMissingShippingData:i?.length>0&&!e?.shippingMethod&&!i?.[0]?.tracking?.number};var a}},25794:function(e){e.exports={orderInfo:"OrderInfoBar_orderInfo__IE0VA",key:"OrderInfoBar_key__7pZbk"}},49680:function(e){e.exports={notification:"OrderStatusNotification_notification__5bLRg"}},54929:function(e){e.exports={headingContainer:"ReturnOrder_headingContainer__jleXq",returnRow:"ReturnOrder_returnRow__lSApc",hasSelectors:"ReturnOrder_hasSelectors__xANYn",returnTile:"ReturnOrder_returnTile__DjWJu",orderItemContainer:"ReturnOrder_orderItemContainer__d_TCa",orderItem:"ReturnOrder_orderItem__hF8ym",returnDetailsContainer:"ReturnOrder_returnDetailsContainer__rluUn",ctaWrapper:"ReturnOrder_ctaWrapper__DTJ21",backCta:"ReturnOrder_backCta__AjFYL",callout:"ReturnOrder_callout__7cSmW",estimatedTotal:"ReturnOrder_estimatedTotal__7ZcRF",disclaimer:"ReturnOrder_disclaimer__w4Bt3",disclaimerBody:"ReturnOrder_disclaimerBody__hbEn4",heading:"ReturnOrder_heading__4_Ak_",returnPolicyLink:"ReturnOrder_returnPolicyLink__ZeVjJ"}},37474:function(e){e.exports={container:"SelfService_container__yG763",link:"SelfService_link__OKagb",text:"SelfService_text__yq8B_"}},94162:function(e){e.exports={trackingWrapper:"TrackingLink_trackingWrapper__lPtWN"}},45110:function(e){e.exports={fieldsContainer:"UpdateStreetAddressModal_fieldsContainer__yAXr_",redIcon:"UpdateStreetAddressModal_redIcon__Ce5By",redCap:"UpdateStreetAddressModal_redCap__TLx2V",modal:"UpdateStreetAddressModal_modal__xso3F",buttonsContainer:"UpdateStreetAddressModal_buttonsContainer__CkiKM",descriptionText:"UpdateStreetAddressModal_descriptionText__YZ9jF",descriptionContainer:"UpdateStreetAddressModal_descriptionContainer__4ajIU",columnFieldsContainer:"UpdateStreetAddressModal_columnFieldsContainer__7WaBI",disabledInputContainer:"UpdateStreetAddressModal_disabledInputContainer__IEzOM",lockIcon:"UpdateStreetAddressModal_lockIcon__wW0A0",contactUsLink:"UpdateStreetAddressModal_contactUsLink__RQEns",capitalize:"UpdateStreetAddressModal_capitalize__WiUuW"}}}]); //# sourceMappingURL=795-ac55f873366775ff.js.map