Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dropins/storefront-order-confirmation

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dropins/storefront-order-confirmation - npm Package Compare versions

Comparing version 0.1.0-alpha12 to 0.1.0-alpha13

421.js

2

containers/OrderConfirmation.js

@@ -1,1 +0,1 @@

import*as r from"@dropins/tools/fetch-graphql.js";import*as e from"@dropins/tools/preact-compat.js";import*as n from"@dropins/tools/preact-hooks.js";import*as o from"@dropins/tools/preact-jsx-runtime.js";import*as t from"@dropins/tools/preact.js";export const id=267;export const ids=[267];export const modules={5663:(r,e,n)=>{n.d(e,{N:()=>Yr,Z:()=>Yr});var o=n(2199),t=n(5587),i=n(1892),a=n.n(i),s=n(5760),l=n.n(s),d=n(8311),c=n.n(d),m=n(8192),u=n.n(m),f=n(8060),p=n.n(f),y=n(4865),v=n.n(y),g=n(4730),b={};b.styleTagTransform=v(),b.setAttributes=u(),b.insert=c().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=p();a()(g.Z,b);g.Z&&g.Z.locals&&g.Z.locals;var h=n(9724),x=n(8228),j=n(3622),_=n(6987),O=n(4284),S=n(7188);function w(r){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},w(r)}var N=["className","errorMessage","contactSupport","routeHome"];function E(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,o)}return n}function P(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){k(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function k(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==w(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===w(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function C(r,e){if(null==r)return{};var n,o,t=function(r,e){if(null==r)return{};var n,o,t={},i=Object.keys(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(t[n]=r[n]);return t}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var D=function(r){var e=r.className,n=r.errorMessage,o=r.contactSupport,i=r.routeHome,a=C(r,N);return(0,S.jsxs)(x.Z,P(P({"aria-invalid":"true","aria-describedby":"order-confirmation-server-error__message","aria-live":"polite",variant:"secondary",className:(0,t.S)(["order-confirmation-server-error",e])},a),{},{children:[(0,S.jsx)(j.J,{className:(0,t.S)(["order-confirmation-server-error__icon"]),size:"80",source:O.Z}),(0,S.jsx)("h2",{className:(0,t.S)(["order-confirmation-server-error__heading"]),children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.ServerError.title"})}),(0,S.jsx)("p",{className:(0,t.S)(["order-confirmation-server-error__message"]),children:n}),(0,S.jsx)("p",{className:(0,t.S)(["order-confirmation-server-error__contact"]),children:o?(0,S.jsx)(h.bp,{id:"",children:o}):(0,S.jsx)(h.bp,{id:"OrderConfirmation.ServerError.contactSupport"})}),(null==i?void 0:i())&&(0,S.jsx)(_.z,{"data-testid":"order-confirmation-server-error__button",className:(0,t.S)(["order-confirmation-server-error__button"]),href:null==i?void 0:i(),children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.ServerError.button"})})]}))},A=n(7691),I={};I.styleTagTransform=v(),I.setAttributes=u(),I.insert=c().bind(null,"head"),I.domAPI=l(),I.insertStyleElement=p();a()(A.Z,I);A.Z&&A.Z.locals&&A.Z.locals;var Z=n(2690),R=n(7481),T={};T.styleTagTransform=v(),T.setAttributes=u(),T.insert=c().bind(null,"head"),T.domAPI=l(),T.insertStyleElement=p();a()(R.Z,T);R.Z&&R.Z.locals&&R.Z.locals;var z=function(r){var e=r.customerName,n=r.orderNumber,o=r.orderStatus;return(0,S.jsxs)("div",{className:"order-confirmation-header order-confirmation__card",children:[(0,S.jsx)(j.J,{source:Z.Z,size:"64",className:"order-confirmation-header__icon"}),(0,S.jsx)("h1",{className:"order-confirmation-header__title",children:e?(0,S.jsx)(h.xv,{id:"OrderConfirmation.Header.title",fields:{name:e}}):(0,S.jsx)(h.xv,{id:"OrderConfirmation.Header.defaultTitle"})}),n&&(0,S.jsxs)("p",{children:[(0,S.jsx)(h.xv,{id:"OrderConfirmation.Header.order",fields:{order:n}}),void 0!==o&&""!==o&&(0,S.jsxs)("span",{className:"order-confirmation-header__status",children:[" ","(",o,")"]})]})]})},L=n(3199),F={};F.styleTagTransform=v(),F.setAttributes=u(),F.insert=c().bind(null,"head"),F.domAPI=l(),F.insertStyleElement=p();a()(L.Z,F);L.Z&&L.Z.locals&&L.Z.locals;var H=n(4426),W=n(8691),M=n(4625),G=n(9760),V={};V.styleTagTransform=v(),V.setAttributes=u(),V.insert=c().bind(null,"head"),V.domAPI=l(),V.insertStyleElement=p();a()(G.Z,V);G.Z&&G.Z.locals&&G.Z.locals;var q=n(2605),K=n(6553),X=n(7498);function J(r){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},J(r)}var U=["className","type","additionalActions","onDismiss","heading","description"];function Q(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,o)}return n}function B(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){$(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function $(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==J(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==J(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===J(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Y(r,e){if(null==r)return{};var n,o,t=function(r,e){if(null==r)return{};var n,o,t={},i=Object.keys(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(t[n]=r[n]);return t}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var rr={error:q.Z,success:K.Z,warning:q.Z},er=function(r){var e,n,o,i=r.className,a=r.type,s=void 0===a?"warning":a,l=r.additionalActions,d=r.onDismiss,c=r.heading,m=r.description,u=Y(r,U),f=rr[s];return(0,S.jsxs)("div",B(B({},u),{},{className:(0,t.S)(["dropin-in-line-alert","dropin-in-line-alert--".concat(s),i]),children:[(0,S.jsxs)("div",{className:"dropin-in-line-alert__heading",children:[(0,S.jsxs)("div",{className:"dropin-in-line-alert__title-container",children:[f&&(0,S.jsx)(j.J,{source:f,className:"dropin-in-line-alert__icon"}),(0,S.jsx)("span",{className:"dropin-in-line-alert__title",children:c})]}),(0,S.jsxs)("div",{className:"dropin-in-line-alert__actions-container",children:[1==(null==l?void 0:l.length)&&(0,S.jsx)(_.z,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:null===(e=l[0])||void 0===e?void 0:e.onClick,"aria-label":null===(n=l[0])||void 0===n?void 0:n.label,children:null===(o=l[0])||void 0===o?void 0:o.label}),d&&(0,S.jsx)(_.z,{icon:(0,S.jsx)(j.J,{source:X.Z,size:"24",stroke:"2"}),className:"dropin-in-line-alert__dismiss-button",variant:"tertiary",onClick:d,"aria-label":"OrderConfirmation.InlineAlert.Dismiss"})]})]}),m&&(0,S.jsx)("p",{className:"dropin-in-line-alert__description",children:m}),l&&(null==l?void 0:l.length)>1&&(0,S.jsx)("div",{className:"dropin-in-line-alert__additional-actions-container",children:l.map((function(r){return(0,S.jsx)(_.z,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:r.onClick,children:r.label},r.label)}))})]}))};function nr(r){return nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},nr(r)}function or(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,o)}return n}function tr(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?or(Object(n),!0).forEach((function(e){ir(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function ir(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==nr(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==nr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===nr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var ar=function(r){var e=r.alert,n=r.onOrderSearch,o=(0,h.XK)({email:"OrderConfirmation.OrderSearchForm.email",postcode:"OrderConfirmation.OrderSearchForm.postcode",number:"OrderConfirmation.OrderSearchForm.orderNumber"});return(0,S.jsxs)(x.Z,{variant:"secondary",className:"order-confirmation-order-search-form order-confirmation__card",children:[(0,S.jsx)("h2",{className:"order-confirmation-order-search-form__title",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSearchForm.title"})}),(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSearchForm.description"})}),e&&(0,S.jsx)(er,tr({className:"order-confirmation-order-search-form__alert"},e)),(0,S.jsxs)("form",{className:"order-confirmation-order-search-form__fields",onSubmit:function(r){r.preventDefault();var e=(0,M.X)(r.target);null==n||n(e)},children:[(0,S.jsxs)("div",{className:"order-confirmation-order-search-form__fields-columns",children:[(0,S.jsx)(H.g,{children:(0,S.jsx)(W.I,{id:"order-email",name:"email",type:"email",autocomplete:"email",placeholder:o.email,floatingLabel:o.email,required:!0,"aria-label":o.email,"aria-required":!0})}),(0,S.jsx)(H.g,{children:(0,S.jsx)(W.I,{id:"postcode",name:"postcode",type:"text",autocomplete:"postal-code",placeholder:o.postcode,floatingLabel:o.postcode,required:!1,"aria-label":o.postcode,"aria-required":!0})})]}),(0,S.jsx)(H.g,{children:(0,S.jsx)(W.I,{id:"order-number",name:"number",type:"text",placeholder:o.number,floatingLabel:o.number,required:!0,"aria-label":o.number,"aria-required":!0})}),(0,S.jsx)(_.z,{className:"order-confirmation-order-search-form__button",size:"medium",variant:"primary",type:"submit",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSearchForm.button"})},"logIn")]})]})},sr=n(2607),lr={};lr.styleTagTransform=v(),lr.setAttributes=u(),lr.insert=c().bind(null,"head"),lr.domAPI=l(),lr.insertStyleElement=p();a()(sr.Z,lr);sr.Z&&sr.Z.locals&&sr.Z.locals;var dr=n(5140),cr=n(7816),mr=n(2040),ur={};ur.styleTagTransform=v(),ur.setAttributes=u(),ur.insert=c().bind(null,"head"),ur.domAPI=l(),ur.insertStyleElement=p();a()(mr.Z,ur);mr.Z&&mr.Z.locals&&mr.Z.locals;function fr(r){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fr(r)}var pr=["rows","size"];function yr(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,o)}return n}function vr(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yr(Object(n),!0).forEach((function(e){gr(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):yr(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function gr(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==fr(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==fr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===fr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function br(r,e){if(null==r)return{};var n,o,t=function(r,e){if(null==r)return{};var n,o,t={},i=Object.keys(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(t[n]=r[n]);return t}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var hr=function(r){var e=r.rows,n=r.size,o=void 0===n?"xsmall":n,t=br(r,pr);return(0,S.jsx)(cr.O,vr(vr({className:"static-skeleton"},t),{},{children:Array.from(Array(e).keys()).map((function(r){return(0,S.jsx)(cr.d,{variant:"heading",size:o,fullWidth:!0},r)}))}))},xr=function(r){var e,n,o,t=r.orderDetails,i=t&&(null==t?void 0:t.number),a=(null==t?void 0:t.email)||"",s=t&&""!==a,l=null==t?void 0:t.shipping_address,d=t&&null!==l,c=null==t?void 0:t.billing_address,m=t&&null!==c,u=null==t?void 0:t.shipping_method,f=null==t||null===(e=t.total)||void 0===e||null===(e=e.total_shipping)||void 0===e?void 0:e.value,p=null==t||null===(n=t.total)||void 0===n||null===(n=n.total_shipping)||void 0===n?void 0:n.currency,y=t&&u&&p&&null!=f,v=null==t?void 0:t.payment_methods,g=v&&v.length>0,b=g?null===(o=v[0])||void 0===o?void 0:o.name:"",j=t&&g&&""!==b;return(0,S.jsxs)(x.Z,{variant:"secondary",className:"order-confirmation-details order-confirmation__card",children:[(0,S.jsx)("div",{className:"order-confirmation-details__header",children:(0,S.jsx)("h2",{className:"order-confirmation-details__title",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.title"})})}),(0,S.jsxs)("div",{className:"order-confirmation-details__contact",children:[(!t||s)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.contact"})}),s&&(0,S.jsx)("p",{children:a}),!i&&(0,S.jsx)(hr,{rows:1,"data-testid":"order-confirmation-details-contact-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__information",children:[(0,S.jsxs)("div",{className:"order-confirmation-details__shipping_address",children:[(!i||d)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.shippingAddress"})}),d&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:[null==l?void 0:l.firstname," ",null==l?void 0:l.lastname]}),null==l?void 0:l.street.map((function(r,e){return(0,S.jsx)("p",{children:r},e)})),(0,S.jsxs)("p",{children:[null==l?void 0:l.city," ",null==l?void 0:l.region," ",null==l?void 0:l.postcode,", ",null==l?void 0:l.country_code]})]}),!i&&(0,S.jsx)(hr,{rows:3,"data-testid":"order-confirmation-shipping-address-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__billing_address",children:[(!i||m)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.billingAddress"})}),m&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:[null==c?void 0:c.firstname," ",null==c?void 0:c.lastname]}),null==c?void 0:c.street.map((function(r,e){return(0,S.jsx)("p",{children:r},e)})),(0,S.jsxs)("p",{children:[null==c?void 0:c.city," ",null==c?void 0:c.region," ",null==c?void 0:c.postcode,", ",null==c?void 0:c.country_code]})]}),!i&&(0,S.jsx)(hr,{rows:3,"data-testid":"order-confirmation-billing-address-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__shipping-method",children:[(!i||y)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.shippingMethod"})}),y&&(0,S.jsx)(S.Fragment,{children:0===f?(0,S.jsx)("p",{className:"order-confirmation-order-summary__price",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.freeShipping"})}):(0,S.jsxs)("p",{children:[(0,S.jsx)(dr.t,{amount:f,currency:p})," ",u]})}),!i&&(0,S.jsx)(hr,{rows:1,"data-testid":"order-confirmation-details-shipping-method-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__payment-method",children:[(!i||j)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.paymentMethod"})}),j&&(0,S.jsx)("p",{children:b}),!i&&(0,S.jsx)(hr,{rows:1,"data-testid":"order-confirmation-details-payment-method-skeleton"})]})]})]})},jr=n(713),_r={};_r.styleTagTransform=v(),_r.setAttributes=u(),_r.insert=c().bind(null,"head"),_r.domAPI=l(),_r.insertStyleElement=p();a()(jr.Z,_r);jr.Z&&jr.Z.locals&&jr.Z.locals;var Or=n(9614),Sr=function(r){var e=r.className,n=r.summary,o=r.variant,i=void 0===o?"secondary":o,a=null!=n?n:{},s=a.total,l=a.subtotal,d=a.shipping,c=a.tax;return(0,S.jsxs)(x.Z,{className:(0,t.S)(["order-confirmation-order-summary",e]),variant:i,children:[(0,S.jsx)("h2",{className:"order-confirmation-order-summary__title",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.title"})}),(0,S.jsx)(Or.i,{variant:"primary"}),null!=l?(0,S.jsxs)("div",{"data-testid":"order-summary-subtotal",className:"order-confirmation-order-summary__row",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.subtotal"})}),(0,S.jsx)(dr.t,{amount:null==l?void 0:l.amount,currency:null==l?void 0:l.currency,className:(0,t.S)(["order-confirmation-order-summary__price",e])})]}):(0,S.jsx)(hr,{rows:1,"data-testid":"order-confirmation-order-summary-subtotal-skeleton"}),(null==l?void 0:l.isTaxIncl)&&(0,S.jsx)("div",{"data-testid":"order-summary-subtotal-incl-tax",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--muted",children:(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.includingTaxes"})})}),null!=d?(0,S.jsxs)("div",{"data-testid":"order-summary-shipping",className:"order-confirmation-order-summary__row",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.shipping"})}),0===d.amount?(0,S.jsx)("p",{className:"order-confirmation-order-summary__price",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.freeShipping"})}):(0,S.jsx)(dr.t,{amount:d.amount,currency:d.currency,className:(0,t.S)(["order-confirmation-order-summary__price",e])})]}):(0,S.jsx)(hr,{rows:1,"data-testid":"order-confirmation-order-summary-shipping-skeleton"}),null!=c&&!c.breakdown&&(0,S.jsxs)("div",{"data-testid":"order-summary-tax",className:"order-confirmation-order-summary__row",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.tax"})}),(0,S.jsx)(dr.t,{amount:c.amount,currency:c.currency,className:(0,t.S)(["order-confirmation-order-summary__price",e])})]}),null!=c&&c.breakdown&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Or.i,{variant:"secondary"}),(0,S.jsx)("div",{className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--margin-bottom",children:(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.taxBreakdown"})})}),c.breakdown.map((function(r){return(0,S.jsxs)("div",{"data-testid":"order-summary-tax-breakdown",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--muted",children:[(0,S.jsx)("p",{children:r.label}),(0,S.jsx)(dr.t,{amount:r.amount.value,currency:r.amount.currency,className:(0,t.S)(["order-confirmation-order-summary__price",e])})]},r.label)})),(0,S.jsxs)("div",{"data-testid":"order-summary-tax-breakdown-total",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--strong order-confirmation-order-summary__row--margin-top",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.taxTotal"})}),(0,S.jsx)(dr.t,{amount:c.amount,currency:c.currency,className:(0,t.S)(["order-confirmation-order-summary__price",e])})]}),(0,S.jsx)(Or.i,{variant:"secondary"})]}),null!=s?(0,S.jsxs)("div",{"data-testid":"order-summary-total-incl-tax",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--emphasized",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.total"})}),(0,S.jsx)(dr.t,{amount:null==s?void 0:s.inclTax.amount,currency:null==s?void 0:s.inclTax.currency,className:(0,t.S)(["order-confirmation-order-summary__price",e])})]}):(0,S.jsx)(hr,{rows:1,"data-testid":"order-confirmation-order-summary-total-skeleton"}),null!=(null==s?void 0:s.exclTax)&&(0,S.jsxs)("div",{"data-testid":"order-summary-total-excl-tax",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--muted",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.totalExclTax"})}),(0,S.jsx)(dr.t,{amount:s.exclTax.amount,currency:s.exclTax.currency,className:(0,t.S)(["order-confirmation-order-summary__price",e])})]})]})},wr=n(6191),Nr={};Nr.styleTagTransform=v(),Nr.setAttributes=u(),Nr.insert=c().bind(null,"head"),Nr.domAPI=l(),Nr.insertStyleElement=p();a()(wr.Z,Nr);wr.Z&&wr.Z.locals&&wr.Z.locals;function Er(r){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Er(r)}var Pr=["className","routeHome","routeSupport"];function kr(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,o)}return n}function Cr(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?kr(Object(n),!0).forEach((function(e){Dr(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function Dr(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==Er(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==Er(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===Er(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ar(r,e){if(null==r)return{};var n,o,t=function(r,e){if(null==r)return{};var n,o,t={},i=Object.keys(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(t[n]=r[n]);return t}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var Ir=function(r){var e=r.className,n=r.routeHome,o=r.routeSupport,i=Ar(r,Pr);return(0,S.jsxs)("div",Cr(Cr({className:(0,t.S)(["order-confirmation-footer",e])},i),{},{children:[(null==n?void 0:n())&&(0,S.jsx)(_.z,{"data-testid":"order-confirmation-footer__continue-button",className:"order-confirmation-footer__continue-button",size:"medium",variant:"primary",type:"submit",href:null==n?void 0:n(),children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Footer.continueShopping"})},"continueShopping"),(0,S.jsxs)("p",{className:"order-confirmation-footer__contact-support",children:[(0,S.jsx)(h.xv,{id:"OrderConfirmation.Footer.help"})," ",(null==o?void 0:o())&&(0,S.jsx)("a",{href:null==o?void 0:o(),rel:"noreferrer",className:"order-confirmation-footer__contact-support-link","data-testid":"order-confirmation-footer__contact-support-link",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Footer.contactSupport"})})]})]}))},Zr=function(){return(0,S.jsxs)(cr.O,{"data-testid":"order-confirmation-header-skeleton",className:"order-confirmation-header",children:[(0,S.jsx)(cr.d,{variant:"empty",size:"xlarge",fullWidth:!0}),(0,S.jsx)(cr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(cr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(cr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(cr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(cr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(cr.d,{size:"small",fullWidth:!0}),(0,S.jsx)(cr.d,{variant:"heading",size:"xsmall",fullWidth:!0})]})},Rr=function(){return(0,S.jsx)(x.Z,{variant:"secondary",className:"order-confirmation-message",children:(0,S.jsxs)(cr.O,{children:[(0,S.jsx)(cr.d,{variant:"heading",size:"medium",fullWidth:!0}),(0,S.jsx)(cr.d,{size:"xlarge",fullWidth:!0})]})})},Tr=function(){return(0,S.jsx)(x.Z,{variant:"secondary",className:"order-confirmation-details",children:(0,S.jsxs)(cr.O,{"data-testid":"order-confirmation-details-skeleton",children:[(0,S.jsx)(cr.d,{variant:"heading",size:"medium",fullWidth:!0}),(0,S.jsx)(cr.d,{size:"medium"}),(0,S.jsx)(cr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(cr.d,{size:"xlarge"}),(0,S.jsx)(cr.d,{size:"xlarge"}),(0,S.jsx)(cr.d,{size:"xlarge"}),(0,S.jsx)(cr.d,{size:"xlarge"})]})})},zr=function(){return(0,S.jsxs)(cr.O,{className:"order-confirmation-footer",children:[(0,S.jsx)(cr.d,{size:"small",fullWidth:!0}),(0,S.jsx)(cr.d,{variant:"heading",size:"xsmall",fullWidth:!0})]})},Lr=function(){return(0,S.jsxs)(cr.O,{"data-testid":"order-confirmation-order-summary-skeleton",className:"order-confirmation-order-summary",children:[(0,S.jsx)(cr.d,{variant:"heading",size:"small"}),(0,S.jsx)(cr.d,{variant:"empty",size:"small"}),(0,S.jsx)(cr.d,{variant:"empty",size:"small"}),(0,S.jsx)(cr.d,{variant:"empty",size:"small"}),(0,S.jsx)(cr.d,{variant:"heading",size:"small",fullWidth:!0,lines:3})]})},Fr=function(){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Zr,{}),(0,S.jsx)(Rr,{}),(0,S.jsx)(Tr,{}),(0,S.jsx)(zr,{}),(0,S.jsx)(Lr,{})]})};function Hr(r){return Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Hr(r)}function Wr(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,o)}return n}function Mr(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wr(Object(n),!0).forEach((function(e){Gr(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Wr(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function Gr(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==Hr(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!==Hr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===Hr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var Vr=function(r){return r.ADD_ORDER_REFERENCE="ADD_ORDER_REFERENCE",r.LOADING="LOADING",r.SET_DETAILS="SET_DETAILS",r.ALERT="ALERT",r.DISMISS_ALERT="DISMISS_ALERT",r}({}),qr=function(r){return r.ERROR="error",r.WARNING="warning",r.SUCCESS="success",r}({}),Kr=function(r){return r.INVALID_ORDER="invalid_order",r.INVALID_SEARCH="invalid_search",r.UNKNOWN="unknown_error",r}({});function Xr(r,e){switch(e.type){case Vr.ADD_ORDER_REFERENCE:return Mr(Mr({},r),{},{orderRef:e.orderRef});case Vr.LOADING:return Mr(Mr({},r),{},{isLoading:!0});case Vr.SET_DETAILS:return Mr(Mr({},r),{},{isLoading:!1,details:e.details,alert:e.alert});case Vr.ALERT:return Mr(Mr({},r),{},{isLoading:!1,alert:e.alert,orderRef:e.alert.code===Kr.INVALID_ORDER?"":r.orderRef});case Vr.DISMISS_ALERT:return Mr(Mr({},r),{},{alert:void 0});default:return r}}var Jr=function(r){var e=r.className,n=r.state,o=r.dismissAlert,i=r.routeHome,a=r.routeSupport,s=r.onOrderSearch,l=n.isLoading,d=n.orderRef,c=n.token,m=n.details,u=n.alert,f=!!c,p=!!d,y=!(null==m||!m.number),v=null==m?void 0:m.billing_address,g=(null==v?void 0:v.firstname)||"",b=(null==m?void 0:m.number)||"",x=(null==m?void 0:m.status)||"",j=u&&u.code===Kr.INVALID_ORDER,_=u&&u.code===Kr.INVALID_SEARCH,O=!!g&&!!b,w=(!p||!f)&&p&&!y||p&&f&&!y,N=function(r){var e=null==r?void 0:r.total;if(e){var n=null==e?void 0:e.grand_total,o=null==e?void 0:e.subtotal,t=null==e?void 0:e.total_shipping,i=null==e?void 0:e.total_tax;return{total:{inclTax:{amount:(null==n?void 0:n.value)||0,currency:(null==n?void 0:n.currency)||""}},subtotal:{amount:(null==o?void 0:o.value)||0,currency:(null==o?void 0:o.currency)||"",isTaxIncl:!1},shipping:{amount:(null==t?void 0:t.value)||0,currency:(null==t?void 0:t.currency)||""},tax:{amount:(null==i?void 0:i.value)||0,currency:(null==i?void 0:i.currency)||""}}}}(m),E=(0,h.XK)({pageNotFound:"OrderConfirmation.ServerError.pageNotFound"});return j?(0,S.jsx)(D,{errorMessage:E.pageNotFound,routeHome:i}):(0,S.jsx)("div",{className:(0,t.S)(["order-confirmation",["order-confirmation-skeleton",l],e]),children:l?(0,S.jsx)(Fr,{}):(0,S.jsxs)(S.Fragment,{children:[O&&(0,S.jsx)(z,{customerName:g,orderNumber:b,orderStatus:x}),w&&(0,S.jsx)(ar,{alert:_?{heading:u.message,description:"",type:u.type,onDismiss:o}:void 0,onOrderSearch:s}),(0,S.jsx)(xr,{orderDetails:m}),(0,S.jsx)(Sr,{summary:N}),(0,S.jsx)(Ir,{routeHome:i,routeSupport:a})]})})},Ur=n(1655),Qr=n(419);function Br(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var o,t,i,a,s=[],l=!0,d=!1;try{if(i=(n=n.call(r)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==e);l=!0);}catch(r){d=!0,t=r}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw t}}return s}}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return $r(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(r);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $r(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $r(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=r[n];return o}var Yr=function(r){var e=r.orderRef,n=r.routeHome,t=r.routeSupport,i=function(r){var e=Br((0,Qr.useReducer)(Xr,{isLoading:!1,orderRef:r,token:Ur.Z.get("guest-view"),details:null}),2),n=e[0],t=e[1],i=(0,h.XK)({invalidOrder:"OrderConfirmation.Errors.invalidOrder",invalidSearch:"OrderConfirmation.Errors.invalidSearch",pageNotFound:"OrderConfirmation.Errors.pageNotFound",unknown:"OrderConfirmation.Errors.unknown"}),a=(0,Qr.useCallback)((function(r){switch(r){case"Invalid order":return{type:qr.WARNING,code:Kr.INVALID_ORDER,message:i.invalidOrder};case"Invalid search":return{type:qr.WARNING,code:Kr.INVALID_SEARCH,message:i.invalidSearch}}}),[i.invalidOrder,i.invalidSearch]),s=(0,Qr.useCallback)((function(r){var e={maskedOrderId:n.orderRef||"",checkoutToken:n.token,orderSearch:r};(0,o.i)(e).then((function(e){var n=null!=e&&e.number||void 0===r?void 0:a("Invalid search");t({type:Vr.SET_DETAILS,details:e,alert:n})})).catch((function(r){var e=a(r.message);e?t({type:Vr.ALERT,alert:e}):console.error(r)}))}),[n.orderRef,n.token,a]);return(0,Qr.useEffect)((function(){n.orderRef&&(t({type:Vr.LOADING}),s())}),[n.orderRef,n.token,s]),{state:n,handleOrderSearch:function(r){s(r)},dismissAlert:function(){t({type:Vr.DISMISS_ALERT})}}}(e),a=i.state,s=i.handleOrderSearch,l=i.dismissAlert,d=(0,h.XK)({pageNotFound:"OrderConfirmation.ServerError.pageNotFound"});return null==e||""===e?(0,S.jsx)(D,{errorMessage:d.pageNotFound,onClick:n}):(0,S.jsx)(Jr,{state:a,dismissAlert:l,onOrderSearch:s,routeHome:n,routeSupport:t})}},2607:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".order-confirmation-details__header{\n display:grid;\n grid-auto-rows:max-content;\n}\n\n.order-confirmation-details__title{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-strong-font);\n letter-spacing:var(--type-headline-2-strong-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-details h3{\n font:var(--type-body-1-strong-font);\n letter-spacing:var(--type-body-1-strong-letter-spacing);\n margin:0 0 var(--spacing-xsmall) 0;\n}\n\n.order-confirmation-details p{\n margin:var(--spacing-xsmall) 0 0 0;\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n}\n\na.order-confirmation__login-link{\n font:var(--type-body-2-strong-font);\n margin-left:var(--spacing-xxsmall);\n}\n\n.order-confirmation-details__shipping-method span{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n}\n\n.order-confirmation-details__information{\n display:grid;\n grid-template-columns:1fr 1fr;\n gap:var(--spacing-medium);\n}\n\n.order-confirmation-details__information>div:empty{\n visibility:hidden;\n display:none;\n}\n\n.order-confirmation-details .static-skeleton{\n gap:var(--spacing-xsmall);\n}\n@media only screen and (min-width:320px) and (max-width: 768px){\n .order-confirmation-details__information{\n grid-template-columns:1fr;\n }\n}\n",""]);const s=a},6191:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".order-confirmation-footer{\n gap:var(--spacing-small);\n text-align:center;\n}\n\n.order-confirmation-footer .order-confirmation-footer__continue-button{\n margin:0 auto;\n text-align:center;\n display:inline-block;\n}\n\n.order-confirmation-footer__contact-support{\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n color:var(--color-neutral-700);\n}\n\n.order-confirmation-footer__contact-support a{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n color:var(--color-brand-500);\n cursor:pointer;\n}\n",""]);const s=a},7481:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".order-confirmation-header{\n text-align:center;\n padding:var(--spacing-xxbig);\n}\n\n.order-confirmation-header__icon{\n margin-bottom:var(--spacing-small);\n}\n\n.order-confirmation-header h1{\n color:var(--color-neutral-800);\n font:var(--type-headline-1-font);\n letter-spacing:var(--type-headline-1-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-header h1:first-letter{\n text-transform:uppercase;\n}\n\n.order-confirmation-header p{\n color:var(--color-neutral-700);\n font:var(--type-details-overline-font);\n letter-spacing:var(--type-details-overline-letter-spacing);\n margin:var(--spacing-xxsmall) 0 0 0;\n}\n\n.order-confirmation-header .OrderSuccess_svg__success-icon{\n color:var(--color-positive-500);\n}\n",""]);const s=a},9760:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".dropin-in-line-alert{\n border-width:var(--shape-border-width-2);\n border-style:solid;\n border-radius:var(--shape-border-radius-1);\n display:grid;\n grid-auto-flow:row;\n gap:var(--spacing-small);\n padding:var(--spacing-small);\n position:relative;\n}\n\n.dropin-in-line-alert__heading{\n display:grid;\n gap:var(--spacing-small);\n grid-template-columns:auto auto;\n align-items:center;\n}\n\n.dropin-in-line-alert__title-container{\n display:flex;\n align-items:center;\n gap:var(--spacing-xsmall);\n}\n\n.dropin-in-line-alert__title{\n color:var(--color-neutral-800);\n font:var(--type-body-2-emphasized-font);\n letter-spacing:var(--type-body-2-emphasized-letter-spacing);\n margin:0;\n}\n\n.dropin-in-line-alert__actions-container{\n display:flex;\n justify-content:end;\n}\n\n.dropin-in-line-alert__additional-action{\n padding:0px!important;\n}\n\n.dropin-in-line-alert__additional-action span{\n font:var(--type-details-caption-1-font);\n letter-spacing:var(--type-details-caption-1-letter-spacing);\n text-decoration:underline;\n color:var(--color-neutral-700);\n}\n\n.dropin-in-line-alert__dismiss-button{\n padding:0;\n}\n\n.dropin-in-line-alert__description{\n color:var(--color-neutral-800);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n margin:0;\n}\n\n.dropin-in-line-alert__additional-actions-container{\n display:flex;\n gap:var(--spacing-small);\n justify-content:flex-end;\n}\n.dropin-in-line-alert--error{\n border-color:var(--color-alert-500);\n}\n.dropin-in-line-alert--warning{\n border-color:var(--color-warning-500);\n}\n.dropin-in-line-alert--success{\n border-color:var(--color-positive-500);\n}\n",""]);const s=a},7691:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".order-confirmation{\n grid-template-columns:repeat(var(--grid-4-columns), 1fr);\n grid-column-gap:var(--grid-4-gutters);\n grid-row-gap:var(--spacing-xxbig);\n margin:0 auto;\n display:grid;\n align-items:start;\n justify-content:center;\n width:100%;\n max-width:1920px;\n}\n\n.order-confirmation a{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n margin-left:var(--spacing-xxsmall);\n}\n.order-confirmation-header,\n.order-confirmation-footer,\n.order-confirmation-message,\n.order-confirmation-order-search-form,\n.order-confirmation-order-form,\n.order-confirmation-status,\n.order-confirmation-details{\n grid-column:1 / span 7;\n}\n\n.order-confirmation-order-summary{\n grid-column:9 / span 4;\n grid-row:1 / 4;\n}\n\n.order-confirmation-details-contact .checkout-skeleton,\n.order-confirmation-details-address .checkout-skeleton,\n.order-confirmation-details-payment .checkout-skeleton{\n gap:var(--spacing-xsmall);\n margin-top:var(--spacing-xsmall);\n}\n\n.order-confirmation-details-contact .checkout-skeleton-row,\n.order-confirmation-details-address .checkout-skeleton-row,\n.order-confirmation-details-payment .checkout-skeleton-row{\n animation:0;\n background:var(--color-neutral-300);\n}\n@media only screen and (min-width: 320px) and (max-width: 768px){\n .order-confirmation{\n grid-template-columns:repeat(var(--grid-1-columns), 1fr);\n grid-column-gap:var(--grid-1-gutters);\n }\n\n .order-confirmation-header,\n .order-confirmation-footer,\n .order-confirmation-message,\n .order-confirmation-order-search-form,\n .order-confirmation-order-form,\n .order-confirmation-details,\n .order-confirmation-order-summary{\n grid-column:1 / span 4;\n }\n\n .order-confirmation-order-summary{\n grid-row:3 / 4;\n }\n}\n",""]);const s=a},3199:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".order-confirmation-order-search-form .dropin-card__content{\n gap:var(--spacing-small);\n}\n.order-confirmation-order-search-form p{\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-order-search-form__title{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-strong-font);\n letter-spacing:var(--type-headline-2-strong-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-order-search-form form{\n display:grid;\n grid-template-rows:1fr;\n}\n\n.order-confirmation-order-search-form__fields-columns{\n display:grid;\n grid-template-columns:1fr 1fr;\n gap:var(--spacing-medium);\n margin-bottom:var(--spacing-medium);\n}\n\n.order-confirmation-order-search-form form button{\n align-self:flex-end;\n justify-self:flex-end;\n margin-top:var(--spacing-small);\n}\n",""]);const s=a},713:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".order-confirmation-order-summary .dropin-card__content{\n gap:var(--spacing-xsmall);\n}\n\n.order-confirmation-order-summary__title{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-default-font);\n letter-spacing:var(--type-headline-2-default-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-order-summary .dropin-divider--primary{\n margin:0 0 var(--spacing-medium) 0 !important;\n}\n\n.order-confirmation-order-summary .dropin-divider--secondary{\n margin:var(--spacing-xsmall) 0 var(--spacing-xsmall) 0 !important;\n}\n\n.order-confirmation-order-summary__breakdown{\n margin:var(--spacing-big) 0 var(--spacing-medium) 0;\n}\n\n.order-confirmation-order-summary__breakdown .dropin-divider:last-child{\n margin-bottom:0;\n}\n\n.order-confirmation-order-summary__row{\n display:flex;\n justify-content:space-between;\n color:var(--color-neutral-800);\n font:var(--type-body-1-default-font);\n letter-spacing:var(--type-body-1-default-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--margin-top{\n margin-top:var(--spacing-xsmall);\n}\n\n.order-confirmation-order-summary__row--margin-bottom{\n margin-bottom:var(--spacing-xsmall);\n}\n\n.order-confirmation-order-summary__row .order-confirmation-order-summary__price{\n color:var(--color-neutral-800);\n font:var(--type-body-1-default-font);\n letter-spacing:var(--type-body-1-default-letter-spacing);\n}\n\n.order-confirmation-order-summary__row p{\n margin:0;\n}\n\n.order-confirmation-order-summary__row--strong{\n font:var(--type-body-1-strong-font);\n letter-spacing:var(--type-body-1-strong-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--strong .order-confirmation-order-summary__price{\n color:var(--color-neutral-800);\n font:var(--type-body-1-strong-font);\n letter-spacing:var(--type-body-1-strong-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--emphasized{\n font:var(--type-body-1-emphasized-font);\n letter-spacing:var(--type-body-1-emphasized-letter-spacing);\n margin-top:var(--spacing-small);\n}\n\n.order-confirmation-order-summary__row--emphasized .order-confirmation-order-summary__price{\n color:var(--color-neutral-800);\n font:var(--type-body-1-emphasized-font);\n letter-spacing:var(--type-body-1-emphasized-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--muted{\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n margin-top:calc(-1 * var(--spacing-xxsmall));\n}\n\n.order-confirmation-order-summary__row--muted .order-confirmation-order-summary__price{\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n}\n\n.order-confirmation-order-summary .dropin-skeleton:last-child{\n margin-top:var(--spacing-big);\n}\n\n@media only screen and (min-width: 320px) and (max-width: 768px){\n .order-confirmation-order-summary{\n border-top:var(--shape-border-width-2) solid var(--color-neutral-400);\n border-bottom:var(--shape-border-width-2) solid var(--color-neutral-400);\n border-radius:0;\n }\n\n .order-confirmation-skeleton .order-confirmation-order-summary{\n border:0 none;\n }\n}\n",""]);const s=a},4730:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".order-confirmation-server-error{\n border:var(--shape-border-width-1) solid var(--color-neutral-400);\n position:relative;\n text-align:center;\n display:grid;\n padding:var(--spacing-medium) var(--spacing-medium) var(--spacing-xxbig) var(--spacing-medium);\n}\n\n.order-confirmation-server-error .dropin-card__content{\n gap:0;\n padding:0;\n}\n\n.order-confirmation-server-error__icon{\n margin:0 auto var(--spacing-medium) auto;\n}\n\n.order-confirmation-server-error__icon .OrderError_svg__error-icon{\n color:var(--color-alert-500);\n}\n\n.order-confirmation-server-error__heading{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-strong-font);\n letter-spacing:var(--type-headline-2-strong-letter-spacing);\n margin:0 0 var(--spacing-small) 0;\n}\n\n.order-confirmation-server-error a{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n}\n\n.order-confirmation-server-error p{\n margin:0 0 var(--spacing-xsmall) 0;\n color:var(--color-neutral-800);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n}\n\n.order-confirmation-server-error p:last-child{\n margin-bottom:0;\n}\n\n.order-confirmation-server-error .order-confirmation-server-error__button{\n margin-top:var(--spacing-small);\n justify-self:center;\n align-self:center;\n}\n",""]);const s=a},2040:(r,e,n)=>{n.d(e,{Z:()=>s});var o=n(4933),t=n.n(o),i=n(3476),a=n.n(i)()(t());a.push([r.id,".static-skeleton .dropin-skeleton--row__content{\n animation:0;\n background:var(--color-neutral-300);\n border-radius:var(--shape-border-radius-1);\n}\n",""]);const s=a},6752:(e,n,o)=>{e.exports=(r=>{var e={};return o.d(e,r),e})({FetchGraphQL:()=>r.FetchGraphQL})},419:(r,n,o)=>{r.exports=(r=>{var e={};return o.d(e,r),e})({createContext:()=>e.createContext,useCallback:()=>e.useCallback,useEffect:()=>e.useEffect,useReducer:()=>e.useReducer})},4454:(r,e,o)=>{r.exports=(r=>{var e={};return o.d(e,r),e})({useCallback:()=>n.useCallback,useContext:()=>n.useContext,useDebugValue:()=>n.useDebugValue,useEffect:()=>n.useEffect,useId:()=>n.useId,useImperativeHandle:()=>n.useImperativeHandle,useLayoutEffect:()=>n.useLayoutEffect,useMemo:()=>n.useMemo,useReducer:()=>n.useReducer,useRef:()=>n.useRef,useState:()=>n.useState})},8174:(r,e,n)=>{r.exports=(r=>{var e={};return n.d(e,r),e})({Fragment:()=>o.Fragment,jsx:()=>o.jsx,jsxs:()=>o.jsxs})},6770:(r,e,n)=>{r.exports=(r=>{var e={};return n.d(e,r),e})({Component:()=>t.Component,Fragment:()=>t.Fragment,cloneElement:()=>t.cloneElement,createContext:()=>t.createContext,createElement:()=>t.createElement,createRef:()=>t.createRef,h:()=>t.h,hydrate:()=>t.hydrate,options:()=>t.options,render:()=>t.render,toChildArray:()=>t.toChildArray})}};import i from"../runtime.js";import*as a from"../914.js";i.C(a);import*as s from"../534.js";i.C(s);import*as l from"../199.js";i.C(l);import*as d from"./OrderConfirmation.js";i.C(d);var c,m=(c=5663,i(i.s=c)),u=m.N,f=m.Z;export{u as OrderConfirmation,f as default};
import*as r from"@dropins/tools/fetch-graphql.js";import*as e from"@dropins/tools/preact-compat.js";import*as n from"@dropins/tools/preact-hooks.js";import*as t from"@dropins/tools/preact-jsx-runtime.js";import*as o from"@dropins/tools/preact.js";export const id=267;export const ids=[267];export const modules={5663:(r,e,n)=>{n.d(e,{N:()=>re,Z:()=>re});var t=n(2199),o=n(5587),i=n(1892),a=n.n(i),s=n(5760),l=n.n(s),d=n(8311),c=n.n(d),m=n(8192),u=n.n(m),f=n(8060),p=n.n(f),y=n(4865),v=n.n(y),g=n(4730),b={};b.styleTagTransform=v(),b.setAttributes=u(),b.insert=c().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=p();a()(g.Z,b);g.Z&&g.Z.locals&&g.Z.locals;var h=n(9724),x=n(2693),j=n(3622),_=n(6987),O=n(4284),S=n(7188);function w(r){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},w(r)}var N=["className","errorMessage","contactSupport","routeHome"];function E(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function P(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){k(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function k(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==w(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var t=n.call(r,e||"default");if("object"!==w(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===w(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function C(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}var D=function(r){var e=r.className,n=r.errorMessage,t=r.contactSupport,i=r.routeHome,a=C(r,N),s=(0,h.XK)({Title:"OrderConfirmation.ServerError.title",ContactSupport:"OrderConfirmation.ServerError.contactSupport",Button:"OrderConfirmation.ServerError.button"});return(0,S.jsx)(x.I,P(P({},a),{},{"aria-invalid":"true","aria-describedby":"order-confirmation-server-error__message","aria-live":"polite",className:(0,o.S)(["order-confirmation-server-error",e]),icon:(0,S.jsx)(j.J,{className:(0,o.S)(["order-confirmation-server-error__icon"]),source:O.Z}),heading:s.Title,message:(0,S.jsxs)("p",{id:(0,o.S)(["order-confirmation-server-error__message"]),children:[n," ",(0,S.jsx)("br",{}),(0,S.jsx)(h.bp,{id:"",children:null!=t?t:s.ContactSupport})]}),action:null!=i&&i()?(0,S.jsx)(_.z,{"data-testid":"order-confirmation-server-error__button",className:(0,o.S)(["order-confirmation-server-error__button"]),href:null==i?void 0:i(),children:s.Button}):void 0}))},A=n(7691),I={};I.styleTagTransform=v(),I.setAttributes=u(),I.insert=c().bind(null,"head"),I.domAPI=l(),I.insertStyleElement=p();a()(A.Z,I);A.Z&&A.Z.locals&&A.Z.locals;var Z=n(2690),R=n(7481),T={};T.styleTagTransform=v(),T.setAttributes=u(),T.insert=c().bind(null,"head"),T.domAPI=l(),T.insertStyleElement=p();a()(R.Z,T);R.Z&&R.Z.locals&&R.Z.locals;var z=function(r){var e=r.customerName,n=r.orderNumber,t=r.orderStatus;return(0,S.jsxs)("div",{className:"order-confirmation-header order-confirmation__card",children:[(0,S.jsx)(j.J,{source:Z.Z,size:"64",className:"order-confirmation-header__icon"}),(0,S.jsx)("h1",{className:"order-confirmation-header__title",children:e?(0,S.jsx)(h.xv,{id:"OrderConfirmation.Header.title",fields:{name:e}}):(0,S.jsx)(h.xv,{id:"OrderConfirmation.Header.defaultTitle"})}),n&&(0,S.jsxs)("p",{children:[(0,S.jsx)(h.xv,{id:"OrderConfirmation.Header.order",fields:{order:n}}),void 0!==t&&""!==t&&(0,S.jsxs)("span",{className:"order-confirmation-header__status",children:[" ","(",t,")"]})]})]})},L=n(3199),F={};F.styleTagTransform=v(),F.setAttributes=u(),F.insert=c().bind(null,"head"),F.domAPI=l(),F.insertStyleElement=p();a()(L.Z,F);L.Z&&L.Z.locals&&L.Z.locals;var H=n(8228),W=n(4426),M=n(8691),G=n(4625),V=n(9760),q={};q.styleTagTransform=v(),q.setAttributes=u(),q.insert=c().bind(null,"head"),q.domAPI=l(),q.insertStyleElement=p();a()(V.Z,q);V.Z&&V.Z.locals&&V.Z.locals;var K=n(2605),X=n(6553),J=n(7498);function B(r){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},B(r)}var U=["className","type","additionalActions","onDismiss","heading","description"];function Q(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function $(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(n),!0).forEach((function(e){Y(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function Y(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==B(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var t=n.call(r,e||"default");if("object"!==B(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===B(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function rr(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}var er={error:K.Z,success:X.Z,warning:K.Z},nr=function(r){var e,n,t,i=r.className,a=r.type,s=void 0===a?"warning":a,l=r.additionalActions,d=r.onDismiss,c=r.heading,m=r.description,u=rr(r,U),f=er[s];return(0,S.jsxs)("div",$($({},u),{},{className:(0,o.S)(["dropin-in-line-alert","dropin-in-line-alert--".concat(s),i]),children:[(0,S.jsxs)("div",{className:"dropin-in-line-alert__heading",children:[(0,S.jsxs)("div",{className:"dropin-in-line-alert__title-container",children:[f&&(0,S.jsx)(j.J,{source:f,className:"dropin-in-line-alert__icon"}),(0,S.jsx)("span",{className:"dropin-in-line-alert__title",children:c})]}),(0,S.jsxs)("div",{className:"dropin-in-line-alert__actions-container",children:[1==(null==l?void 0:l.length)&&(0,S.jsx)(_.z,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:null===(e=l[0])||void 0===e?void 0:e.onClick,"aria-label":null===(n=l[0])||void 0===n?void 0:n.label,children:null===(t=l[0])||void 0===t?void 0:t.label}),d&&(0,S.jsx)(_.z,{icon:(0,S.jsx)(j.J,{source:J.Z,size:"24",stroke:"2"}),className:"dropin-in-line-alert__dismiss-button",variant:"tertiary",onClick:d,"aria-label":"OrderConfirmation.InlineAlert.Dismiss"})]})]}),m&&(0,S.jsx)("p",{className:"dropin-in-line-alert__description",children:m}),l&&(null==l?void 0:l.length)>1&&(0,S.jsx)("div",{className:"dropin-in-line-alert__additional-actions-container",children:l.map((function(r){return(0,S.jsx)(_.z,{variant:"tertiary",className:"dropin-in-line-alert__additional-action",onClick:r.onClick,children:r.label},r.label)}))})]}))};function tr(r){return tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},tr(r)}function or(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function ir(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?or(Object(n),!0).forEach((function(e){ar(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function ar(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==tr(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var t=n.call(r,e||"default");if("object"!==tr(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===tr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var sr=function(r){var e=r.alert,n=r.onOrderSearch,t=(0,h.XK)({email:"OrderConfirmation.OrderSearchForm.email",postcode:"OrderConfirmation.OrderSearchForm.postcode",number:"OrderConfirmation.OrderSearchForm.orderNumber"});return(0,S.jsxs)(H.Z,{variant:"secondary",className:"order-confirmation-order-search-form order-confirmation__card",children:[(0,S.jsx)("h2",{className:"order-confirmation-order-search-form__title",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSearchForm.title"})}),(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSearchForm.description"})}),e&&(0,S.jsx)(nr,ir({className:"order-confirmation-order-search-form__alert"},e)),(0,S.jsxs)("form",{className:"order-confirmation-order-search-form__fields",onSubmit:function(r){r.preventDefault();var e=(0,G.X)(r.target);null==n||n(e)},children:[(0,S.jsxs)("div",{className:"order-confirmation-order-search-form__fields-columns",children:[(0,S.jsx)(W.g,{children:(0,S.jsx)(M.I,{id:"order-email",name:"email",type:"email",autocomplete:"email",placeholder:t.email,floatingLabel:t.email,required:!0,"aria-label":t.email,"aria-required":!0})}),(0,S.jsx)(W.g,{children:(0,S.jsx)(M.I,{id:"postcode",name:"postcode",type:"text",autocomplete:"postal-code",placeholder:t.postcode,floatingLabel:t.postcode,required:!1,"aria-label":t.postcode,"aria-required":!0})})]}),(0,S.jsx)(W.g,{children:(0,S.jsx)(M.I,{id:"order-number",name:"number",type:"text",placeholder:t.number,floatingLabel:t.number,required:!0,"aria-label":t.number,"aria-required":!0})}),(0,S.jsx)(_.z,{className:"order-confirmation-order-search-form__button",size:"medium",variant:"primary",type:"submit",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSearchForm.button"})},"logIn")]})]})},lr=n(2607),dr={};dr.styleTagTransform=v(),dr.setAttributes=u(),dr.insert=c().bind(null,"head"),dr.domAPI=l(),dr.insertStyleElement=p();a()(lr.Z,dr);lr.Z&&lr.Z.locals&&lr.Z.locals;var cr=n(5140),mr=n(7816),ur=n(2040),fr={};fr.styleTagTransform=v(),fr.setAttributes=u(),fr.insert=c().bind(null,"head"),fr.domAPI=l(),fr.insertStyleElement=p();a()(ur.Z,fr);ur.Z&&ur.Z.locals&&ur.Z.locals;function pr(r){return pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pr(r)}var yr=["rows","size"];function vr(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function gr(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vr(Object(n),!0).forEach((function(e){br(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):vr(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function br(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==pr(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var t=n.call(r,e||"default");if("object"!==pr(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===pr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function hr(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}var xr=function(r){var e=r.rows,n=r.size,t=void 0===n?"xsmall":n,o=hr(r,yr);return(0,S.jsx)(mr.O,gr(gr({className:"static-skeleton"},o),{},{children:Array.from(Array(e).keys()).map((function(r){return(0,S.jsx)(mr.d,{variant:"heading",size:t,fullWidth:!0},r)}))}))},jr=function(r){var e,n,t,o=r.orderDetails,i=o&&(null==o?void 0:o.number),a=(null==o?void 0:o.email)||"",s=o&&""!==a,l=null==o?void 0:o.shipping_address,d=o&&null!==l,c=null==o?void 0:o.billing_address,m=o&&null!==c,u=null==o?void 0:o.shipping_method,f=null==o||null===(e=o.total)||void 0===e||null===(e=e.total_shipping)||void 0===e?void 0:e.value,p=null==o||null===(n=o.total)||void 0===n||null===(n=n.total_shipping)||void 0===n?void 0:n.currency,y=o&&u&&p&&null!=f,v=null==o?void 0:o.payment_methods,g=v&&v.length>0,b=g?null===(t=v[0])||void 0===t?void 0:t.name:"",x=o&&g&&""!==b;return(0,S.jsxs)(H.Z,{variant:"secondary",className:"order-confirmation-details order-confirmation__card",children:[(0,S.jsx)("div",{className:"order-confirmation-details__header",children:(0,S.jsx)("h2",{className:"order-confirmation-details__title",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.title"})})}),(0,S.jsxs)("div",{className:"order-confirmation-details__contact",children:[(!o||s)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.contact"})}),s&&(0,S.jsx)("p",{children:a}),!i&&(0,S.jsx)(xr,{rows:1,"data-testid":"order-confirmation-details-contact-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__information",children:[(0,S.jsxs)("div",{className:"order-confirmation-details__shipping_address",children:[(!i||d)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.shippingAddress"})}),d&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:[null==l?void 0:l.firstname," ",null==l?void 0:l.lastname]}),null==l?void 0:l.street.map((function(r,e){return(0,S.jsx)("p",{children:r},e)})),(0,S.jsxs)("p",{children:[null==l?void 0:l.city," ",null==l?void 0:l.region," ",null==l?void 0:l.postcode,", ",null==l?void 0:l.country_code]})]}),!i&&(0,S.jsx)(xr,{rows:3,"data-testid":"order-confirmation-shipping-address-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__billing_address",children:[(!i||m)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.billingAddress"})}),m&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:[null==c?void 0:c.firstname," ",null==c?void 0:c.lastname]}),null==c?void 0:c.street.map((function(r,e){return(0,S.jsx)("p",{children:r},e)})),(0,S.jsxs)("p",{children:[null==c?void 0:c.city," ",null==c?void 0:c.region," ",null==c?void 0:c.postcode,", ",null==c?void 0:c.country_code]})]}),!i&&(0,S.jsx)(xr,{rows:3,"data-testid":"order-confirmation-billing-address-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__shipping-method",children:[(!i||y)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.shippingMethod"})}),y&&(0,S.jsx)(S.Fragment,{children:0===f?(0,S.jsx)("p",{className:"order-confirmation-order-summary__price",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.freeShipping"})}):(0,S.jsxs)("p",{children:[(0,S.jsx)(cr.t,{amount:f,currency:p})," ",u]})}),!i&&(0,S.jsx)(xr,{rows:1,"data-testid":"order-confirmation-details-shipping-method-skeleton"})]}),(0,S.jsxs)("div",{className:"order-confirmation-details__payment-method",children:[(!i||x)&&(0,S.jsx)("h3",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Details.paymentMethod"})}),x&&(0,S.jsx)("p",{children:b}),!i&&(0,S.jsx)(xr,{rows:1,"data-testid":"order-confirmation-details-payment-method-skeleton"})]})]})]})},_r=n(713),Or={};Or.styleTagTransform=v(),Or.setAttributes=u(),Or.insert=c().bind(null,"head"),Or.domAPI=l(),Or.insertStyleElement=p();a()(_r.Z,Or);_r.Z&&_r.Z.locals&&_r.Z.locals;var Sr=n(9614),wr=function(r){var e=r.className,n=r.summary,t=r.variant,i=void 0===t?"secondary":t,a=null!=n?n:{},s=a.total,l=a.subtotal,d=a.shipping,c=a.tax;return(0,S.jsxs)(H.Z,{className:(0,o.S)(["order-confirmation-order-summary",e]),variant:i,children:[(0,S.jsx)("h2",{className:"order-confirmation-order-summary__title",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.title"})}),(0,S.jsx)(Sr.i,{variant:"primary"}),null!=l?(0,S.jsxs)("div",{"data-testid":"order-summary-subtotal",className:"order-confirmation-order-summary__row",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.subtotal"})}),(0,S.jsx)(cr.t,{amount:null==l?void 0:l.amount,currency:null==l?void 0:l.currency,className:(0,o.S)(["order-confirmation-order-summary__price",e])})]}):(0,S.jsx)(xr,{rows:1,"data-testid":"order-confirmation-order-summary-subtotal-skeleton"}),(null==l?void 0:l.isTaxIncl)&&(0,S.jsx)("div",{"data-testid":"order-summary-subtotal-incl-tax",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--muted",children:(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.includingTaxes"})})}),null!=d?(0,S.jsxs)("div",{"data-testid":"order-summary-shipping",className:"order-confirmation-order-summary__row",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.shipping"})}),0===d.amount?(0,S.jsx)("p",{className:"order-confirmation-order-summary__price",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.freeShipping"})}):(0,S.jsx)(cr.t,{amount:d.amount,currency:d.currency,className:(0,o.S)(["order-confirmation-order-summary__price",e])})]}):(0,S.jsx)(xr,{rows:1,"data-testid":"order-confirmation-order-summary-shipping-skeleton"}),null!=c&&!c.breakdown&&(0,S.jsxs)("div",{"data-testid":"order-summary-tax",className:"order-confirmation-order-summary__row",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.tax"})}),(0,S.jsx)(cr.t,{amount:c.amount,currency:c.currency,className:(0,o.S)(["order-confirmation-order-summary__price",e])})]}),null!=c&&c.breakdown&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Sr.i,{variant:"secondary"}),(0,S.jsx)("div",{className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--margin-bottom",children:(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.taxBreakdown"})})}),c.breakdown.map((function(r){return(0,S.jsxs)("div",{"data-testid":"order-summary-tax-breakdown",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--muted",children:[(0,S.jsx)("p",{children:r.label}),(0,S.jsx)(cr.t,{amount:r.amount.value,currency:r.amount.currency,className:(0,o.S)(["order-confirmation-order-summary__price",e])})]},r.label)})),(0,S.jsxs)("div",{"data-testid":"order-summary-tax-breakdown-total",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--strong order-confirmation-order-summary__row--margin-top",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.taxTotal"})}),(0,S.jsx)(cr.t,{amount:c.amount,currency:c.currency,className:(0,o.S)(["order-confirmation-order-summary__price",e])})]}),(0,S.jsx)(Sr.i,{variant:"secondary"})]}),null!=s?(0,S.jsxs)("div",{"data-testid":"order-summary-total-incl-tax",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--emphasized",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.total"})}),(0,S.jsx)(cr.t,{amount:null==s?void 0:s.inclTax.amount,currency:null==s?void 0:s.inclTax.currency,className:(0,o.S)(["order-confirmation-order-summary__price",e])})]}):(0,S.jsx)(xr,{rows:1,"data-testid":"order-confirmation-order-summary-total-skeleton"}),null!=(null==s?void 0:s.exclTax)&&(0,S.jsxs)("div",{"data-testid":"order-summary-total-excl-tax",className:"order-confirmation-order-summary__row order-confirmation-order-summary__row--muted",children:[(0,S.jsx)("p",{children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.OrderSummary.totalExclTax"})}),(0,S.jsx)(cr.t,{amount:s.exclTax.amount,currency:s.exclTax.currency,className:(0,o.S)(["order-confirmation-order-summary__price",e])})]})]})},Nr=n(6191),Er={};Er.styleTagTransform=v(),Er.setAttributes=u(),Er.insert=c().bind(null,"head"),Er.domAPI=l(),Er.insertStyleElement=p();a()(Nr.Z,Er);Nr.Z&&Nr.Z.locals&&Nr.Z.locals;function Pr(r){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pr(r)}var kr=["className","routeHome","routeSupport"];function Cr(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function Dr(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Cr(Object(n),!0).forEach((function(e){Ar(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function Ar(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==Pr(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var t=n.call(r,e||"default");if("object"!==Pr(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===Pr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}function Ir(r,e){if(null==r)return{};var n,t,o=function(r,e){if(null==r)return{};var n,t,o={},i=Object.keys(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||(o[n]=r[n]);return o}(r,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(t=0;t<i.length;t++)n=i[t],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(r,n)&&(o[n]=r[n])}return o}var Zr=function(r){var e=r.className,n=r.routeHome,t=r.routeSupport,i=Ir(r,kr);return(0,S.jsxs)("div",Dr(Dr({className:(0,o.S)(["order-confirmation-footer",e])},i),{},{children:[(null==n?void 0:n())&&(0,S.jsx)(_.z,{"data-testid":"order-confirmation-footer__continue-button",className:"order-confirmation-footer__continue-button",size:"medium",variant:"primary",type:"submit",href:null==n?void 0:n(),children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Footer.continueShopping"})},"continueShopping"),(0,S.jsxs)("p",{className:"order-confirmation-footer__contact-support",children:[(0,S.jsx)(h.xv,{id:"OrderConfirmation.Footer.help"})," ",(null==t?void 0:t())&&(0,S.jsx)("a",{href:null==t?void 0:t(),rel:"noreferrer",className:"order-confirmation-footer__contact-support-link","data-testid":"order-confirmation-footer__contact-support-link",children:(0,S.jsx)(h.xv,{id:"OrderConfirmation.Footer.contactSupport"})})]})]}))},Rr=function(){return(0,S.jsxs)(mr.O,{"data-testid":"order-confirmation-header-skeleton",className:"order-confirmation-header",children:[(0,S.jsx)(mr.d,{variant:"empty",size:"xlarge",fullWidth:!0}),(0,S.jsx)(mr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(mr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(mr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(mr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(mr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(mr.d,{size:"small",fullWidth:!0}),(0,S.jsx)(mr.d,{variant:"heading",size:"xsmall",fullWidth:!0})]})},Tr=function(){return(0,S.jsx)(H.Z,{variant:"secondary",className:"order-confirmation-message",children:(0,S.jsxs)(mr.O,{children:[(0,S.jsx)(mr.d,{variant:"heading",size:"medium",fullWidth:!0}),(0,S.jsx)(mr.d,{size:"xlarge",fullWidth:!0})]})})},zr=function(){return(0,S.jsx)(H.Z,{variant:"secondary",className:"order-confirmation-details",children:(0,S.jsxs)(mr.O,{"data-testid":"order-confirmation-details-skeleton",children:[(0,S.jsx)(mr.d,{variant:"heading",size:"medium",fullWidth:!0}),(0,S.jsx)(mr.d,{size:"medium"}),(0,S.jsx)(mr.d,{variant:"empty",size:"medium"}),(0,S.jsx)(mr.d,{size:"xlarge"}),(0,S.jsx)(mr.d,{size:"xlarge"}),(0,S.jsx)(mr.d,{size:"xlarge"}),(0,S.jsx)(mr.d,{size:"xlarge"})]})})},Lr=function(){return(0,S.jsxs)(mr.O,{className:"order-confirmation-footer",children:[(0,S.jsx)(mr.d,{size:"small",fullWidth:!0}),(0,S.jsx)(mr.d,{variant:"heading",size:"xsmall",fullWidth:!0})]})},Fr=function(){return(0,S.jsxs)(mr.O,{"data-testid":"order-confirmation-order-summary-skeleton",className:"order-confirmation-order-summary",children:[(0,S.jsx)(mr.d,{variant:"heading",size:"small"}),(0,S.jsx)(mr.d,{variant:"empty",size:"small"}),(0,S.jsx)(mr.d,{variant:"empty",size:"small"}),(0,S.jsx)(mr.d,{variant:"empty",size:"small"}),(0,S.jsx)(mr.d,{variant:"heading",size:"small",fullWidth:!0,lines:3})]})},Hr=function(){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(Rr,{}),(0,S.jsx)(Tr,{}),(0,S.jsx)(zr,{}),(0,S.jsx)(Lr,{}),(0,S.jsx)(Fr,{})]})};function Wr(r){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wr(r)}function Mr(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function Gr(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mr(Object(n),!0).forEach((function(e){Vr(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function Vr(r,e,n){return(e=function(r){var e=function(r,e){if("object"!==Wr(r)||null===r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var t=n.call(r,e||"default");if("object"!==Wr(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}(r,"string");return"symbol"===Wr(e)?e:String(e)}(e))in r?Object.defineProperty(r,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):r[e]=n,r}var qr=function(r){return r.ADD_ORDER_REFERENCE="ADD_ORDER_REFERENCE",r.LOADING="LOADING",r.SET_DETAILS="SET_DETAILS",r.ALERT="ALERT",r.DISMISS_ALERT="DISMISS_ALERT",r}({}),Kr=function(r){return r.ERROR="error",r.WARNING="warning",r.SUCCESS="success",r}({}),Xr=function(r){return r.INVALID_ORDER="invalid_order",r.INVALID_SEARCH="invalid_search",r.UNKNOWN="unknown_error",r}({});function Jr(r,e){switch(e.type){case qr.ADD_ORDER_REFERENCE:return Gr(Gr({},r),{},{orderRef:e.orderRef});case qr.LOADING:return Gr(Gr({},r),{},{isLoading:!0});case qr.SET_DETAILS:return Gr(Gr({},r),{},{isLoading:!1,details:e.details,alert:e.alert});case qr.ALERT:return Gr(Gr({},r),{},{isLoading:!1,alert:e.alert,orderRef:e.alert.code===Xr.INVALID_ORDER?"":r.orderRef});case qr.DISMISS_ALERT:return Gr(Gr({},r),{},{alert:void 0});default:return r}}var Br=function(r){var e=r.className,n=r.state,t=r.dismissAlert,i=r.routeHome,a=r.routeSupport,s=r.onOrderSearch,l=n.isLoading,d=n.orderRef,c=n.token,m=n.details,u=n.alert,f=!!c,p=!!d,y=!(null==m||!m.number),v=null==m?void 0:m.billing_address,g=(null==v?void 0:v.firstname)||"",b=(null==m?void 0:m.number)||"",x=(null==m?void 0:m.status)||"",j=u&&u.code===Xr.INVALID_ORDER,_=u&&u.code===Xr.INVALID_SEARCH,O=!!g&&!!b,w=(!p||!f)&&p&&!y||p&&f&&!y,N=function(r){var e=null==r?void 0:r.total;if(e){var n=null==e?void 0:e.grand_total,t=null==e?void 0:e.subtotal,o=null==e?void 0:e.total_shipping,i=null==e?void 0:e.total_tax;return{total:{inclTax:{amount:(null==n?void 0:n.value)||0,currency:(null==n?void 0:n.currency)||""}},subtotal:{amount:(null==t?void 0:t.value)||0,currency:(null==t?void 0:t.currency)||"",isTaxIncl:!1},shipping:{amount:(null==o?void 0:o.value)||0,currency:(null==o?void 0:o.currency)||""},tax:{amount:(null==i?void 0:i.value)||0,currency:(null==i?void 0:i.currency)||""}}}}(m),E=(0,h.XK)({pageNotFound:"OrderConfirmation.ServerError.pageNotFound"});return j?(0,S.jsx)(D,{errorMessage:E.pageNotFound,routeHome:i}):(0,S.jsx)("div",{className:(0,o.S)(["order-confirmation",["order-confirmation-skeleton",l],e]),children:l?(0,S.jsx)(Hr,{}):(0,S.jsxs)(S.Fragment,{children:[O&&(0,S.jsx)(z,{customerName:g,orderNumber:b,orderStatus:x}),w&&(0,S.jsx)(sr,{alert:_?{heading:u.message,description:"",type:u.type,onDismiss:t}:void 0,onOrderSearch:s}),(0,S.jsx)(jr,{orderDetails:m}),(0,S.jsx)(wr,{summary:N}),(0,S.jsx)(Zr,{routeHome:i,routeSupport:a})]})})},Ur=n(1655),Qr=n(419);function $r(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var n=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=n){var t,o,i,a,s=[],l=!0,d=!1;try{if(i=(n=n.call(r)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(t=i.call(n)).done)&&(s.push(t.value),s.length!==e);l=!0);}catch(r){d=!0,o=r}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw o}}return s}}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return Yr(r,e);var n=Object.prototype.toString.call(r).slice(8,-1);"Object"===n&&r.constructor&&(n=r.constructor.name);if("Map"===n||"Set"===n)return Array.from(r);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yr(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yr(r,e){(null==e||e>r.length)&&(e=r.length);for(var n=0,t=new Array(e);n<e;n++)t[n]=r[n];return t}var re=function(r){var e=r.orderRef,n=r.routeHome,o=r.routeSupport,i=function(r){var e=$r((0,Qr.useReducer)(Jr,{isLoading:!1,orderRef:r,token:Ur.Z.get("guest-view"),details:null}),2),n=e[0],o=e[1],i=(0,h.XK)({invalidOrder:"OrderConfirmation.Errors.invalidOrder",invalidSearch:"OrderConfirmation.Errors.invalidSearch",pageNotFound:"OrderConfirmation.Errors.pageNotFound",unknown:"OrderConfirmation.Errors.unknown"}),a=(0,Qr.useCallback)((function(r){switch(r){case"Invalid order":return{type:Kr.WARNING,code:Xr.INVALID_ORDER,message:i.invalidOrder};case"Invalid search":return{type:Kr.WARNING,code:Xr.INVALID_SEARCH,message:i.invalidSearch}}}),[i.invalidOrder,i.invalidSearch]),s=(0,Qr.useCallback)((function(r){var e={maskedOrderId:n.orderRef||"",checkoutToken:n.token,orderSearch:r};(0,t.i)(e).then((function(e){var n=null!=e&&e.number||void 0===r?void 0:a("Invalid search");o({type:qr.SET_DETAILS,details:e,alert:n})})).catch((function(r){var e=a(r.message);e?o({type:qr.ALERT,alert:e}):console.error(r)}))}),[n.orderRef,n.token,a]);return(0,Qr.useEffect)((function(){n.orderRef&&(o({type:qr.LOADING}),s())}),[n.orderRef,n.token,s]),{state:n,handleOrderSearch:function(r){s(r)},dismissAlert:function(){o({type:qr.DISMISS_ALERT})}}}(e),a=i.state,s=i.handleOrderSearch,l=i.dismissAlert,d=(0,h.XK)({pageNotFound:"OrderConfirmation.ServerError.pageNotFound"});return null==e||""===e?(0,S.jsx)(D,{errorMessage:d.pageNotFound,onClick:n}):(0,S.jsx)(Br,{state:a,dismissAlert:l,onOrderSearch:s,routeHome:n,routeSupport:o})}},2607:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".order-confirmation-details__header{\n display:grid;\n grid-auto-rows:max-content;\n}\n\n.order-confirmation-details__title{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-strong-font);\n letter-spacing:var(--type-headline-2-strong-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-details h3{\n font:var(--type-body-1-strong-font);\n letter-spacing:var(--type-body-1-strong-letter-spacing);\n margin:0 0 var(--spacing-xsmall) 0;\n}\n\n.order-confirmation-details p{\n margin:var(--spacing-xsmall) 0 0 0;\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n}\n\na.order-confirmation__login-link{\n font:var(--type-body-2-strong-font);\n margin-left:var(--spacing-xxsmall);\n}\n\n.order-confirmation-details__shipping-method span{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n}\n\n.order-confirmation-details__information{\n display:grid;\n grid-template-columns:1fr 1fr;\n gap:var(--spacing-medium);\n}\n\n.order-confirmation-details__information>div:empty{\n visibility:hidden;\n display:none;\n}\n\n.order-confirmation-details .static-skeleton{\n gap:var(--spacing-xsmall);\n}\n@media only screen and (min-width:320px) and (max-width: 768px){\n .order-confirmation-details__information{\n grid-template-columns:1fr;\n }\n}\n",""]);const s=a},6191:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".order-confirmation-footer{\n gap:var(--spacing-small);\n text-align:center;\n}\n\n.order-confirmation-footer .order-confirmation-footer__continue-button{\n margin:0 auto;\n text-align:center;\n display:inline-block;\n}\n\n.order-confirmation-footer__contact-support{\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n color:var(--color-neutral-700);\n}\n\n.order-confirmation-footer__contact-support a{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n color:var(--color-brand-500);\n cursor:pointer;\n}\n",""]);const s=a},7481:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".order-confirmation-header{\n text-align:center;\n padding:var(--spacing-xxbig);\n}\n\n.order-confirmation-header__icon{\n margin-bottom:var(--spacing-small);\n}\n\n.order-confirmation-header h1{\n color:var(--color-neutral-800);\n font:var(--type-headline-1-font);\n letter-spacing:var(--type-headline-1-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-header h1:first-letter{\n text-transform:uppercase;\n}\n\n.order-confirmation-header p{\n color:var(--color-neutral-700);\n font:var(--type-details-overline-font);\n letter-spacing:var(--type-details-overline-letter-spacing);\n margin:var(--spacing-xxsmall) 0 0 0;\n}\n\n.order-confirmation-header .OrderSuccess_svg__success-icon{\n color:var(--color-positive-500);\n}\n",""]);const s=a},9760:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".dropin-in-line-alert{\n border-width:var(--shape-border-width-2);\n border-style:solid;\n border-radius:var(--shape-border-radius-1);\n display:grid;\n grid-auto-flow:row;\n gap:var(--spacing-small);\n padding:var(--spacing-small);\n position:relative;\n}\n\n.dropin-in-line-alert__heading{\n display:grid;\n gap:var(--spacing-small);\n grid-template-columns:auto auto;\n align-items:center;\n}\n\n.dropin-in-line-alert__title-container{\n display:flex;\n align-items:center;\n gap:var(--spacing-xsmall);\n}\n\n.dropin-in-line-alert__title{\n color:var(--color-neutral-800);\n font:var(--type-body-2-emphasized-font);\n letter-spacing:var(--type-body-2-emphasized-letter-spacing);\n margin:0;\n}\n\n.dropin-in-line-alert__actions-container{\n display:flex;\n justify-content:end;\n}\n\n.dropin-in-line-alert__additional-action{\n padding:0px!important;\n}\n\n.dropin-in-line-alert__additional-action span{\n font:var(--type-details-caption-1-font);\n letter-spacing:var(--type-details-caption-1-letter-spacing);\n text-decoration:underline;\n color:var(--color-neutral-700);\n}\n\n.dropin-in-line-alert__dismiss-button{\n padding:0;\n}\n\n.dropin-in-line-alert__description{\n color:var(--color-neutral-800);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n margin:0;\n}\n\n.dropin-in-line-alert__additional-actions-container{\n display:flex;\n gap:var(--spacing-small);\n justify-content:flex-end;\n}\n.dropin-in-line-alert--error{\n border-color:var(--color-alert-500);\n}\n.dropin-in-line-alert--warning{\n border-color:var(--color-warning-500);\n}\n.dropin-in-line-alert--success{\n border-color:var(--color-positive-500);\n}\n",""]);const s=a},7691:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".order-confirmation{\n grid-template-columns:repeat(var(--grid-4-columns), 1fr);\n grid-column-gap:var(--grid-4-gutters);\n grid-row-gap:var(--spacing-xxbig);\n margin:0 auto;\n display:grid;\n align-items:start;\n justify-content:center;\n width:100%;\n max-width:1920px;\n}\n\n.order-confirmation a{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n margin-left:var(--spacing-xxsmall);\n}\n.order-confirmation-header,\n.order-confirmation-footer,\n.order-confirmation-message,\n.order-confirmation-order-search-form,\n.order-confirmation-order-form,\n.order-confirmation-status,\n.order-confirmation-details{\n grid-column:1 / span 7;\n}\n\n.order-confirmation-order-summary{\n grid-column:9 / span 4;\n grid-row:1 / 4;\n}\n\n.order-confirmation-details-contact .checkout-skeleton,\n.order-confirmation-details-address .checkout-skeleton,\n.order-confirmation-details-payment .checkout-skeleton{\n gap:var(--spacing-xsmall);\n margin-top:var(--spacing-xsmall);\n}\n\n.order-confirmation-details-contact .checkout-skeleton-row,\n.order-confirmation-details-address .checkout-skeleton-row,\n.order-confirmation-details-payment .checkout-skeleton-row{\n animation:0;\n background:var(--color-neutral-300);\n}\n@media only screen and (min-width: 320px) and (max-width: 768px){\n .order-confirmation{\n grid-template-columns:repeat(var(--grid-1-columns), 1fr);\n grid-column-gap:var(--grid-1-gutters);\n }\n\n .order-confirmation-header,\n .order-confirmation-footer,\n .order-confirmation-message,\n .order-confirmation-order-search-form,\n .order-confirmation-order-form,\n .order-confirmation-details,\n .order-confirmation-order-summary{\n grid-column:1 / span 4;\n }\n\n .order-confirmation-order-summary{\n grid-row:3 / 4;\n }\n}\n",""]);const s=a},3199:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".order-confirmation-order-search-form .dropin-card__content{\n gap:var(--spacing-small);\n}\n.order-confirmation-order-search-form p{\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-order-search-form__title{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-strong-font);\n letter-spacing:var(--type-headline-2-strong-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-order-search-form form{\n display:grid;\n grid-template-rows:1fr;\n}\n\n.order-confirmation-order-search-form__fields-columns{\n display:grid;\n grid-template-columns:1fr 1fr;\n gap:var(--spacing-medium);\n margin-bottom:var(--spacing-medium);\n}\n\n.order-confirmation-order-search-form form button{\n align-self:flex-end;\n justify-self:flex-end;\n margin-top:var(--spacing-small);\n}\n",""]);const s=a},713:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".order-confirmation-order-summary .dropin-card__content{\n gap:var(--spacing-xsmall);\n}\n\n.order-confirmation-order-summary__title{\n color:var(--color-neutral-800);\n font:var(--type-headline-2-default-font);\n letter-spacing:var(--type-headline-2-default-letter-spacing);\n margin:0;\n}\n\n.order-confirmation-order-summary .dropin-divider--primary{\n margin:0 0 var(--spacing-medium) 0 !important;\n}\n\n.order-confirmation-order-summary .dropin-divider--secondary{\n margin:var(--spacing-xsmall) 0 var(--spacing-xsmall) 0 !important;\n}\n\n.order-confirmation-order-summary__breakdown{\n margin:var(--spacing-big) 0 var(--spacing-medium) 0;\n}\n\n.order-confirmation-order-summary__breakdown .dropin-divider:last-child{\n margin-bottom:0;\n}\n\n.order-confirmation-order-summary__row{\n display:flex;\n justify-content:space-between;\n color:var(--color-neutral-800);\n font:var(--type-body-1-default-font);\n letter-spacing:var(--type-body-1-default-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--margin-top{\n margin-top:var(--spacing-xsmall);\n}\n\n.order-confirmation-order-summary__row--margin-bottom{\n margin-bottom:var(--spacing-xsmall);\n}\n\n.order-confirmation-order-summary__row .order-confirmation-order-summary__price{\n color:var(--color-neutral-800);\n font:var(--type-body-1-default-font);\n letter-spacing:var(--type-body-1-default-letter-spacing);\n}\n\n.order-confirmation-order-summary__row p{\n margin:0;\n}\n\n.order-confirmation-order-summary__row--strong{\n font:var(--type-body-1-strong-font);\n letter-spacing:var(--type-body-1-strong-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--strong .order-confirmation-order-summary__price{\n color:var(--color-neutral-800);\n font:var(--type-body-1-strong-font);\n letter-spacing:var(--type-body-1-strong-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--emphasized{\n font:var(--type-body-1-emphasized-font);\n letter-spacing:var(--type-body-1-emphasized-letter-spacing);\n margin-top:var(--spacing-small);\n}\n\n.order-confirmation-order-summary__row--emphasized .order-confirmation-order-summary__price{\n color:var(--color-neutral-800);\n font:var(--type-body-1-emphasized-font);\n letter-spacing:var(--type-body-1-emphasized-letter-spacing);\n}\n\n.order-confirmation-order-summary__row--muted{\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n margin-top:calc(-1 * var(--spacing-xxsmall));\n}\n\n.order-confirmation-order-summary__row--muted .order-confirmation-order-summary__price{\n color:var(--color-neutral-700);\n font:var(--type-body-2-default-font);\n letter-spacing:var(--type-body-2-default-letter-spacing);\n}\n\n.order-confirmation-order-summary .dropin-skeleton:last-child{\n margin-top:var(--spacing-big);\n}\n\n@media only screen and (min-width: 320px) and (max-width: 768px){\n .order-confirmation-order-summary{\n border-top:var(--shape-border-width-2) solid var(--color-neutral-400);\n border-bottom:var(--shape-border-width-2) solid var(--color-neutral-400);\n border-radius:0;\n }\n\n .order-confirmation-skeleton .order-confirmation-order-summary{\n border:0 none;\n }\n}\n",""]);const s=a},4730:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".order-confirmation-server-error{\n position:relative;\n display:grid;\n}\n\n.order-confirmation-server-error__icon .OrderError_svg__error-icon{\n color:var(--color-alert-500);\n}\n\n.order-confirmation-server-error a{\n font:var(--type-body-2-strong-font);\n letter-spacing:var(--type-body-2-strong-letter-spacing);\n}\n",""]);const s=a},2040:(r,e,n)=>{n.d(e,{Z:()=>s});var t=n(4933),o=n.n(t),i=n(3476),a=n.n(i)()(o());a.push([r.id,".static-skeleton .dropin-skeleton--row__content{\n animation:0;\n background:var(--color-neutral-300);\n border-radius:var(--shape-border-radius-1);\n}\n",""]);const s=a},6752:(e,n,t)=>{e.exports=(r=>{var e={};return t.d(e,r),e})({FetchGraphQL:()=>r.FetchGraphQL})},419:(r,n,t)=>{r.exports=(r=>{var e={};return t.d(e,r),e})({createContext:()=>e.createContext,useCallback:()=>e.useCallback,useEffect:()=>e.useEffect,useReducer:()=>e.useReducer})},4454:(r,e,t)=>{r.exports=(r=>{var e={};return t.d(e,r),e})({useCallback:()=>n.useCallback,useContext:()=>n.useContext,useDebugValue:()=>n.useDebugValue,useEffect:()=>n.useEffect,useId:()=>n.useId,useImperativeHandle:()=>n.useImperativeHandle,useLayoutEffect:()=>n.useLayoutEffect,useMemo:()=>n.useMemo,useReducer:()=>n.useReducer,useRef:()=>n.useRef,useState:()=>n.useState})},8174:(r,e,n)=>{r.exports=(r=>{var e={};return n.d(e,r),e})({Fragment:()=>t.Fragment,jsx:()=>t.jsx,jsxs:()=>t.jsxs})},6770:(r,e,n)=>{r.exports=(r=>{var e={};return n.d(e,r),e})({Component:()=>o.Component,Fragment:()=>o.Fragment,cloneElement:()=>o.cloneElement,createContext:()=>o.createContext,createElement:()=>o.createElement,createRef:()=>o.createRef,h:()=>o.h,hydrate:()=>o.hydrate,options:()=>o.options,render:()=>o.render,toChildArray:()=>o.toChildArray})}};import i from"../runtime.js";import*as a from"../914.js";i.C(a);import*as s from"../421.js";i.C(s);import*as l from"../199.js";i.C(l);import*as d from"./OrderConfirmation.js";i.C(d);var c,m=(c=5663,i(i.s=c)),u=m.N,f=m.Z;export{u as OrderConfirmation,f as default};

@@ -1,1 +0,1 @@

{"name": "@dropins/storefront-order-confirmation", "version": "0.1.0-alpha12", "dependencies": { "@dropins/elsie": "0.17.0" } }
{"name": "@dropins/storefront-order-confirmation", "version": "0.1.0-alpha13", "dependencies": { "@dropins/elsie": "0.17.0" } }
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc