1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9162],{5254:(e,t,a)=>{"use strict";a.d(t,{Z7:()=>c,kW:()=>_,mj:()=>d});var s=a(37876);a(14232);var r=a(57082),i=a.n(r),l=a(26303),o=a(69241),n=a(93233);let d=l.bL,_=({className:e,...t})=>(0,s.jsx)(l.l9,{className:(0,o.A)(i().FlyoutTrigger,e),...t});_.displayName=l.l9.displayName,l.hJ.displayName;let c=({className:e,children:t,title:a,...r})=>(0,s.jsxs)(l.ZL,{children:[(0,s.jsx)(l.hJ,{className:i().FlyoutOverlay}),(0,s.jsx)(l.UC,{"data-flyout-content":!0,className:(0,o.A)(i().FlyoutContent,e),...r,children:(0,s.jsxs)("div",{"data-flyout-wrapper":!0,className:i()["FlyoutContent-wrapper"],children:[(0,s.jsxs)("div",{"data-flyout-header":!0,className:(0,o.A)(i().FlyoutHeader,a?i()["FlyoutHeader--withTitle"]:""),children:[(0,s.jsxs)(l.hE,{"data-flyout-title":!0,className:i().FlyoutTitle,children:[a," "]}),(0,s.jsxs)(l.bm,{"data-flyout-close":!0,className:(0,o.A)(i().FlyoutClose,a?i()["FlyoutClose--withTitle"]:""),children:[(0,s.jsx)(n.A,{name:"close"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]}),t]})})]});c.displayName=l.UC.displayName},11364:e=>{e.exports={restoreSavedCartDialog:"RestoreSavedCartDialog_restoreSavedCartDialog__Klwva",restoreSavedCartDialog__title:"RestoreSavedCartDialog_restoreSavedCartDialog__title____Y8I",restoreSavedCartDialog__copy:"RestoreSavedCartDialog_restoreSavedCartDialog__copy__iJszV",restoreSavedCartDialog__information:"RestoreSavedCartDialog_restoreSavedCartDialog__information__8bpE_",restoreSavedCartDialog__information__column:"RestoreSavedCartDialog_restoreSavedCartDialog__information__column__q5var",restoreSavedCartDialog__actions:"RestoreSavedCartDialog_restoreSavedCartDialog__actions__s5k0o","restoreSavedCartDialog__actions--secondary":"RestoreSavedCartDialog_restoreSavedCartDialog__actions--secondary__e5jsm",restoreSavedCartDialog__notifications:"RestoreSavedCartDialog_restoreSavedCartDialog__notifications__d_qEL",information__label:"RestoreSavedCartDialog_information__label__ZUtfH"}},17377:e=>{e.exports={SavedCartsHistoryFilters__inputsWrapper:"SavedCartsHistoryFilters_SavedCartsHistoryFilters__inputsWrapper__I7o_f",SavedCartsHistoryFilters__inputSearchWrapper:"SavedCartsHistoryFilters_SavedCartsHistoryFilters__inputSearchWrapper__hHziR","input-icon-search":"SavedCartsHistoryFilters_input-icon-search__kUEMT",error:"SavedCartsHistoryFilters_error__82HuL","input-icon-close":"SavedCartsHistoryFilters_input-icon-close__1fJTL",SavedCartsHistoryFilters__sortBy:"SavedCartsHistoryFilters_SavedCartsHistoryFilters__sortBy__JcUvE","sort-by-popover":"SavedCartsHistoryFilters_sort-by-popover__CYHgt","sort-by-wrapper":"SavedCartsHistoryFilters_sort-by-wrapper__dCI9o","SavedCartsHistoryFilters__error-message":"SavedCartsHistoryFilters_SavedCartsHistoryFilters__error-message__dvm2h",SavedCartsHistoryFilters__info:"SavedCartsHistoryFilters_SavedCartsHistoryFilters__info__H1RpE",SavedCartsHistoryFilters__info__clearCTA:"SavedCartsHistoryFilters_SavedCartsHistoryFilters__info__clearCTA__oRJ2r","SavedCartsHistoryFilters__info__clearCTA--noBackground":"SavedCartsHistoryFilters_SavedCartsHistoryFilters__info__clearCTA--noBackground__g5xSM"}},21174:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});class s{listPriceFromProductSellingInfo(e){return{...e,prices:void 0}}listPriceFromMultiProductSellingInfo(e){return{results:e.results.map(e=>this.listPriceFromProductSellingInfo(e))}}}let r=s},21834:e=>{e.exports={"history-carts-entry--with-container-border":"HistorySavedCartsEntry_history-carts-entry--with-container-border__AUayb"}},27702:e=>{e.exports={"history-carts-line-item":"HistoryCartsLineItem_history-carts-line-item__rZFAf",gridCell:"HistoryCartsLineItem_gridCell__i1Ky4",item_position:"HistoryCartsLineItem_item_position__H7rlp",product_info:"HistoryCartsLineItem_product_info__ERzG8",comment:"HistoryCartsLineItem_comment__8ALVN",quantity:"HistoryCartsLineItem_quantity__CkDFD",gridCell__label:"HistoryCartsLineItem_gridCell__label__WOFjS",gridCell__content:"HistoryCartsLineItem_gridCell__content__Pf86z",item_position__image:"HistoryCartsLineItem_item_position__image__paILk","product_info-product_name":"HistoryCartsLineItem_product_info-product_name__0v2DL",additional_info:"HistoryCartsLineItem_additional_info__J4Hco"}},42688:e=>{e.exports={deleteSavedCartDialog:"DeleteSavedCartDialog_deleteSavedCartDialog__f
1Sx4o",deleteSavedCartDialog__title:"DeleteSavedCartDialog_deleteSavedCartDialog__title__fK_dT",deleteSavedCartDialog__copy:"DeleteSavedCartDialog_deleteSavedCartDialog__copy__oi3sb",deleteSavedCartDialog__information:"DeleteSavedCartDialog_deleteSavedCartDialog__information__7T_HN",deleteSavedCartDialog__information__column:"DeleteSavedCartDialog_deleteSavedCartDialog__information__column__BcngD",deleteSavedCartDialog__actions:"DeleteSavedCartDialog_deleteSavedCartDialog__actions__2cvpo","deleteSavedCartDialog__actions--secondary":"DeleteSavedCartDialog_deleteSavedCartDialog__actions--secondary__RTqyt",deleteSavedCartDialog__notifications:"DeleteSavedCartDialog_deleteSavedCartDialog__notifications__hnhVe",information__label:"DeleteSavedCartDialog_information__label__Pf5Ub"}},51964:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-account/saved-carts",function(){return a(89762)}])},54820:(e,t,a)=>{"use strict";a.d(t,{Nr:()=>h,Uk:()=>C,d6:()=>g});var s=a(2491),r=a(37149),i=a(93587),l=a(46568),o=a(95829),n=a(73457),d=a(21174),_=a(51354),c=a(76241);let u=new n.A,m=new d.A,g=({baseProductSku:e,sku:t,isQueryEnabled:a=!0,keepPreviousData:n=!1},d)=>{let{data:g,isApproved:h,isShopUser:C,hasPermissionFor:y}=(0,i.A)(),{language:p,country:v,isLoading:S}=(0,l.A)(),x=!!g&&!!g.accessToken&&h&&C&&!S&&""!==e&&a,j={seeListPricePermission:y(c.t.SEE_LIST_PRICES)};return(0,s.I)({queryKey:[_.t.PRODUCT_SELLING_INFO,{baseProductSku:e,sku:t,country:v,language:p,permissions:j}],select:d,enabled:x,...n?{keepPreviousData:r.rX}:{},queryFn:async()=>{if(!g?.accessToken)throw Error("Missing necessary values");let a=await u.getProductSellingInformation(v,p,{baseProductSku:e,sku:t},g?.accessToken);return j.seeListPricePermission?a:m.listPriceFromProductSellingInfo(a)},...o.j})},h=e=>g(e,e=>({selection:e.selection,configuration:e.configuration})),C=e=>((e,t)=>{let{data:a,isApproved:r,isShopUser:n}=(0,i.A)(),{country:d,language:_,isLoading:c}=(0,l.A)(),m=!!a&&!!a.accessToken&&r&&n&&!c&&e?.isEnabled,{configurationCode:g}=e??{};return(0,s.I)({...o.j,queryKey:["configuration",{code:e?.configurationCode,country:d,language:_}],select:t,enabled:m,queryFn:async()=>{if(!g)throw Error("missing config code");return await u.getProductConfigurationByConfigurationCode(d,_,g,a?.accessToken)}})})(e,e=>e.properties)},57082:e=>{e.exports={FlyoutOverlay:"Flyout_FlyoutOverlay___sg5_",overlayShow:"Flyout_overlayShow__95WWO",overlayHide:"Flyout_overlayHide__DsW0o",FlyoutTrigger:"Flyout_FlyoutTrigger__oWc8e",FlyoutContent:"Flyout_FlyoutContent__Qdac1","FlyoutContent-wrapper":"Flyout_FlyoutContent-wrapper___gCsI",contentShowMobile:"Flyout_contentShowMobile__kQAn_",contentHideMobile:"Flyout_contentHideMobile__ci4c1",contentShowDesktop:"Flyout_contentShowDesktop__8uTVh",contentHideDesktop:"Flyout_contentHideDesktop__ZLFvz",FlyoutClose:"Flyout_FlyoutClose__OBGP1",FlyoutHeader:"Flyout_FlyoutHeader__B_8TP","FlyoutHeader--withTitle":"Flyout_FlyoutHeader--withTitle____r5L",FlyoutTitle:"Flyout_FlyoutTitle__aqIP3",FlyoutDescription:"Flyout_FlyoutDescription__GJaSv"}},61578:e=>{e.exports={ShareNote:"ShareNote_ShareNote__25CW8"}},64858:e=>{e.exports={"history-carts-summary-content__info":"HistoryCartsSummaryContent_history-carts-summary-content__info__PT1ix",description:"HistoryCartsSummaryContent_description__qSo7e",description__label:"HistoryCartsSummaryContent_description__label__c0Whf",description__content:"HistoryCartsSummaryContent_description__content__Vl8Hn","history-carts-summary-content":"HistoryCartsSummaryContent_history-carts-summary-content__fipRJ",productList:"HistoryCartsSummaryContent_productList__V9qgR",productsTrigger:"HistoryCartsSummaryContent_productsTrigger__XR_f4",productsTrigger__heading:"HistoryCartsSummaryContent_productsTrigger__heading__YbNv_",productsTrigger__text:"HistoryCartsSummaryContent_productsTrigger__text__1Vtk_",shareHistoryWrapper:"HistoryCartsSummaryContent_shareHistoryWrapper__0QkD_",ShareNoteCard:"HistoryCartsSummaryContent_ShareNoteCard__Upq3z",ShareNoteCard__date:"HistoryCartsSummaryContent_ShareNoteCard__date__522hp",ShareNoteCard__sharedWith:"HistoryCartsSummaryContent_ShareNoteCard__sharedWith___KOxb",ShareNoteCard__message__label:"HistoryCartsSummaryContent_ShareNoteCard__message__label__e9nNa"}},66461:e=>{e.exports={sortBy__icon:"SavedCartsHistorySortBy_sortBy__icon__Hn47M",sortBy__trigger:"SavedCartsHistorySortBy_sortBy__trigger__ORS91",sortBy__content:"SavedCartsHistorySortBy_sortBy__content__0EEsE",sortBy__item:"SavedCartsHistorySortBy_sortBy__item__upFGV"}},69992:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(14232),r=a(81921),i=a(20503);let l=({initialState:e,callback:t})=>{let a=new Date;new Date(a).setFullYear(a.getFullYear()-1);
1let[l,o]=(0,s.useState)(e),n=(0,r.A)(l);return(0,s.useEffect)(()=>{n&&!(0,i.A)(n,l)&&t?.()},[l,n,t]),[l,o]}},73457:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var s=a(87243);function r(e){return null!=e}class i extends s.A{async getProduct({country:e,language:t,opts:a}){let s=this.createEndpoint("/product",{languageCode:t,supplierIdName:this.supplierIdName,...a}),r={headers:this.initHeaders()};return await this.doRequest(e,s,r)}async getMultiProducts({country:e,language:t,skus:a}){let s=a.map(e=>e.baseProductSku).filter(r),i=a.map(e=>e.urlSaveBaseProductSku).filter(r),l=this.createEndpoint("/products",{languageCode:t,supplierIdName:this.supplierIdName,baseProductSku:s,urlSaveBaseProductSku:i}),o={headers:this.initHeaders()};return await this.doRequest(e,l,o)}async hasProduct({country:e,language:t,opts:a}){let s=this.createEndpoint("/product",{languageCode:t,supplierIdName:this.supplierIdName,...a}),r={method:"HEAD",headers:this.initHeaders()};return await this.doRequest(e,s,r)}async getProductSellingInformation(e,t,{baseProductSku:a,sku:s},r){let i=this.createEndpoint("/products/sellinginfo",{languageCode:t,baseProductSku:a,supplierIdName:this.supplierIdName,...s&&{sku:s}}),l={headers:{...this.getDefaultHeaders(),Authorization:`Bearer ${r}`}};return await this.doRequest(e,i,l)}async getMultiProductSellingInformation(e,t,{baseProductSkus:a},s){let r=this.createEndpoint("/products/sellinginfos",{languageCode:t,supplierIdName:this.supplierIdName,baseProductSku:a}),i={headers:{...this.getDefaultHeaders(),Authorization:`Bearer ${s}`}};return await this.doRequest(e,r,i)}async getProductConfigurationByConfigurationCode(e,t,a,s){if(!a)return{properties:[]};let r=this.createEndpoint(`/products/configuration/${a}`,{languageCode:t}),i={headers:{...this.getDefaultHeaders(),Authorization:`Bearer ${s}`}};return await this.doRequest(e,r,i)}constructor(...e){super(...e),this.supplierIdName="OTTOBOCK",this.getProductAvailability=async({country:e,items:t,token:a})=>{let s=this.createEndpoint("/products/availability",{}),r={method:"POST",headers:{...this.getDefaultHeaders(),Authorization:`Bearer ${a}`},body:JSON.stringify({items:t})};return await this.doRequest(e,s,r)}}}let l=i},83971:e=>{e.exports={actionMenu__trigger:"ActionMenu_actionMenu__trigger__SL4ue",actionMenu__content:"ActionMenu_actionMenu__content___cKJV",actionMenu__item:"ActionMenu_actionMenu__item__riwAk"}},86852:e=>{e.exports={"history-carts-summary":"HistoryCartsSummary_history-carts-summary__Eva5t",cartInfo:"HistoryCartsSummary_cartInfo__Azm7G",dateSaved:"HistoryCartsSummary_dateSaved__AxcG0",creator:"HistoryCartsSummary_creator__D2bxw",actions:"HistoryCartsSummary_actions__8lxF_",trigger:"HistoryCartsSummary_trigger__l5mX5",gridCell:"HistoryCartsSummary_gridCell__1S4f2",gridCell__label:"HistoryCartsSummary_gridCell__label__wWfJl","cart-icon":"HistoryCartsSummary_cart-icon__opEHk","cart-name-id":"HistoryCartsSummary_cart-name-id__qXAG8","cart-name":"HistoryCartsSummary_cart-name__EI8pI",gridCell__content:"HistoryCartsSummary_gridCell__content__emiLd"}},89762:(e,t,a)=>{"use strict";a.r(t),a.d(t,{PAGE_TYPE_ID:()=>eZ,__N_SSP:()=>eK,default:()=>eQ,useSavedCartsHistoryContext:()=>eY});var s=a(37876),r=a(69241),i=a(89368),l=a(77328),o=a.n(l),n=a(89099),d=a(14232),_=a(59025),c=a(38653),u=a(94875),m=a(2678),g=a(73470),h=a(32881),C=a(86852),y=a.n(C),p=a(46568),v=a(1026),S=a(52658),x=a(74587),j=a(96692);let f=e=>(0,s.jsx)(j.A,{...e}),N=({title:e,id:t,date:a,creator:l,children:o})=>{let n=(0,i.useTranslations)(),{locale:d}=(0,p.A)(),_=`${l.firstName} ${l.lastName}`,c=new Date(a).toLocaleDateString(d,{hour:"2-digit",minute:"2-digit"});return(0,s.jsxs)("div",{"data-testid":"history-carts-summary",className:y()["history-carts-summary"],children:[(0,s.jsxs)("div",{"data-testid":"history-order-summary-cart-info",className:(0,r.A)(y().gridCell,y().cartInfo),children:[(0,s.jsx)("div",{className:y()["cart-icon"],children:(0,s.jsx)(f,{})}),(0,s.jsxs)("div",{className:y()["cart-name-id"],children:[(0,s.jsx)("div",{className:y()["cart-name"],children:e?(0,s.jsx)(v.A,{value:e,children:e}):null}),(0,s.jsxs)("div",{className:y().id,children:[`${n("Saved_Carts_History.id_label")} `," ",t?(0,s.jsx)(v.A,{value:t.toString(),children:t}):null]})]})]}),(0,s.jsxs)("div",{className:(0,r.A)(y().gridCell,y().dateSaved),children:[(0,s.jsx)("div",{className:(0,r.A)(y().gridCell__label,y().dateSaved__label),children:n("Saved_Carts_History.date_last_saved")}),(0,s.jsx)("div",{className:(0,r.A)(y().gridCell__content,y().dateSaved__content),children:c})]}),(0,s.jsxs)("div",{className:(0,r.A)(y().gridCell,y().creator),children:[(0,s.jsx)("div",{className:(0,r.A)(y().gridCell__label,y().creator__label),children:n("Saved_Carts_History.shared_by")}),(0,s.jsx)("div",{className:(0,r.A)(y().gridCell__content,y().creator__content),children:_})]}),(0,s.jsxs)("div",{className:(0,r.A)(y().gridCell,y().actions),children:[(0,s.jsx)("div",{className:(0,r.A)(y().gridCell__label,y().actions__label),children:n("Saved_Carts_History.actions")}),(0,s.jsx)("div",{className:(0,r.A)(y().gridCell__content,y().actions__content),children:o})]}),(0,s.jsx)("div",{className:(0,r.A)(y().gridCell,y().trigger),children:(0,s.jsx)(S.A,{variant:"tonal",size:"small",className:"IconButtonPressedStateColor",children:(0,s.jsx)(x.zp,{})})})]})};var D=a(64858),H=a.n(D),b=a(36636),A=a(27702),F=a.n(A),k=a(3536),T=a(4333),I=a(54820),w=a(46260),P=a(14526);let E=({lineItem:e,configurationComponentsSlot:t,savedCartId:a})=>{let l=(0,i.useTranslations)(),{data:o,isLoading:n,isError:d}=(0,I.Uk)({configurationCode:e.configurationCode});return(0,s.jsxs)("div",{className:F()["history-carts-line-item"],children:[(0,s.jsxs)("div",{className:(0,r.A)(F().gridCell,F().item_position),children:[(0,s.jsx)("div",{className:F().gridCell__label,children:l("Saved_Carts_History.position_label")}),(0,s.jsxs)("div",{className:F().gridCell__content,children:[(0,s.jsx)("div",{className:F().item_position__image,children:(0,s.jsx)(b.A,{ImageComponent:T.A,as
1pectRatio:"1by1",src:(0,k.p)(e.images.thumbnail?.url),unoptimized:!0,alt:e.images.thumbnail?.altText,fallback:"/src/assets/images/fallback-1-1.png"})}),(0,s.jsxs)("p",{children:[l("Saved_Carts_History.pos_label")," ",(0,s.jsx)("span",{children:e.position})]})]})]}),(0,s.jsxs)("div",{className:(0,r.A)(F().gridCell,F().product_info),children:[(0,s.jsx)("div",{className:F().gridCell__label,children:l("Saved_Carts_History.product_information_label")}),(0,s.jsxs)("div",{className:F().gridCell__content,children:[(0,s.jsx)("div",{children:e.supplierSku}),(0,s.jsx)("div",{"data-testid":"product_info-product_name",className:F()["product_info-product_name"],children:e.shortDescription})]})]}),(0,s.jsxs)("div",{className:(0,r.A)(F().gridCell,F().comment),children:[(0,s.jsx)("div",{className:F().gridCell__label,children:l("Saved_Carts_History.comment_label")}),(0,s.jsx)("div",{className:F().gridCell__content,children:(0,s.jsx)("div",{className:F().comment,children:e.notes})})]}),(0,s.jsxs)("div",{className:(0,r.A)(F().gridCell,F().quantity),children:[(0,s.jsx)("div",{className:F().gridCell__label,children:l("Saved_Carts_History.quantity_label")}),(0,s.jsx)("div",{className:F().gridCell__content,children:`${e.quantity} ${void 0!==e.sellingUOM?e.sellingUOM:""}`})]}),t||t?(0,s.jsxs)("div",{className:(0,r.A)(F().gridCell,F().additional_info),children:[(0,s.jsx)(c.A,{isLoading:n,isError:d,useSkeleton:!0,skeletonProps:{height:"17px",width:"170px",className:F()["configurationItemsSlot-skeleton"]},children:(0,s.jsx)(w.A,{modalId:`${a}-${e.position}-modal`,sku:e.supplierSku,imageSlot:(0,s.jsx)(b.A,{ImageComponent:T.A,aspectRatio:"1by1",alt:e.images?.thumbnail?.url?e.images?.thumbnail?.altText??e.shortDescription:e.shortDescription,src:(0,k.p)(e.images?.thumbnail?.url),unoptimized:!0,fallback:"/src/assets/images/fallback-1-1.png"}),variantName:e.shortDescription,i18n:{modalTrigger:l("CartPage.modalTrigger"),configurationDetailsHeading:l("CartPage.configurationDetailsHeading")},children:o?.map(t=>(0,s.jsx)(P.A,{name:t.name,value:t.value},e.position+t.name))},`${a}-${e.position}-modal`)}),t||null]}):null]},e.supplierSku)};var L=a(74005),B=a(25966),R=a(61578),O=a.n(R);let q=({children:e})=>(0,s.jsx)("div",{className:O().ShareNote,children:e});var M=a(37216);let $=({...e})=>{let t=(0,i.useTranslations)(),{locale:a}=(0,p.A)(),r=new Date(e.shareTime).toLocaleDateString(a,{});return(0,s.jsx)(q,{children:(0,s.jsxs)("div",{className:H().ShareNoteCard,children:[(0,s.jsxs)("p",{className:H().ShareNoteCard__date,children:[(0,s.jsxs)("strong",{children:[t("Saved_Carts_History.this_cart_was_shared_with_you")," "]}),`${t("general.by")} ${e.firstName} ${e.lastName} `,t("Saved_Carts_History.shareDate_with_you",{shareDate:r})+"."]}),e.comment?(0,s.jsxs)("div",{className:H().ShareNoteCard__message,children:[(0,s.jsx)("p",{className:H().ShareNoteCard__message__label,children:t("general.message")}),(0,s.jsx)("p",{children:e.comment})]}):null]})})},z=({entry:e})=>{let t=(0,i.useTranslations)(),{locale:a}=(0,p.A)();return e?.shareHistory?.length||e.sharedByUser?(0,s.jsx)("div",{className:H().shareHistoryWrapper,"data-testid":"otb-history-entry-share-history-collapsible-group",children:(0,s.jsxs)(u.tz,{light:!0,trigger:(0,s.jsx)("div",{children:t("Saved_Carts_History.share_history_label")}),children:[e.shareHistory?.map(e=>{let r=new Date(e.shareTime).toLocaleDateString(a,{});return(0,s.jsx)(q,{children:(0,s.jsxs)("div",{className:H().ShareNoteCard,children:[(0,s.jsxs)("p",{className:H().ShareNoteCard__date,children:[(0,s.jsxs)("strong",{children:[t("Saved_Carts_History.you_shared_this_cart")," "]}),t("Saved_Carts_History.shareDate",{shareDate:r})]}),(0,s.jsx)("ul",{className:H().ShareNoteCard__sharedWith,children:e.users?.map((e,t,a)=>{let r=t===a.length-1;return(0,s.jsx)("li",{children:`${(0,M.M)({...e,userId:e.userId})}${r?"":", "} `},e.userId)})}),e.comment?(0,s.jsxs)("div",{className:H().ShareNoteCard__message,children:[(0,s.jsx)("p",{className:H().ShareNoteCard__message__label,children:t("general.message")}),(0,s.jsx)("p",{children:e.comment})]}):null]})},e.shareTime)}),e.sharedByUser?(0,s.jsx)($,{...e.sharedByUser}):null]})}):null},U=({children:e,productsOverall:t})=>(0,s.jsx)("div",{className:H().productList,"data-testid":"otb-history-entry-collapsible-group",children:(0,s.jsx)(u.tz,{defaultValue:["item-1"],trigger:W(t),children:e})}),W=e=>{let t=(0,i.useTranslations)();return(0,s.jsxs)("div",{className:H().productsTrigger,children:[(0,s.jsx)("p",{className:H().productsTrigger__heading,children:`${t("Saved_Carts_History.products_in_this_saved_cart")} (${e})`}),(0,s.jsx)("p",{className:H().productsTrigger__text,children:t("Saved_Carts_History.products_in_this_saved_cart_description_text")})]})},V=({entry:e})=>{let t=(0,i.useTranslations)(),{locale:a}=(0,p.A)(),r=e.totalItemCount;return(0,s.jsxs)("div",{className:H()["history-carts-summary-content"],"data-testid":"history-carts-summary-content",children:[e.description?(0,s.jsx)("div",{className:H()["history-carts-summary-content__info"],children:(0,s.jsxs)("div",{className:H().description,children:[(0,s.jsx)("div",{className:H().description__label,children:t("Saved_Carts_History.description_label")}),(0,s.jsx)("div",{className:H().description__content,children:e.description})]})}):null,(0,s.jsx)(z,{entry:e}),(0,s.jsx)(U,{productsOverall:r,children:e.lineItems.map(r=>(0,s.jsx)(E,{savedCartId:e.id,lineItem:r,configurationComponentsSlot:r.configurationComponents&&r.configurationComponents.length>0?(0,s.jsx)(L.A,{i18n:{open_button_label:t("Orders.OrderHistoryPage.lineItem.all_included_components_label")+` (${r.configurationComponents.length})`},children:r.configurationComponents?.map(e=>(0,s.jsx)(B.A,{locale:a,configurationData:e,i18n:{estimatedShipping:t("Orders.OrderHistoryPage.lineItem.estimatedShipping_label"),quantity_label:t("Orders.OrderHistoryPage.lineItem.quantity_label")}},e.sku+e.quantity))}):null},r.supplierSku+r.createdAt))})]})};var J=a(19400),G=a(42688),K=a.n(G),Z=a(71669),X=a(80048),Y=a(86686),Q=a(53900);let ee=({open:e,onOpenChange:t,description:a,id:r,title:l,lineItemCount:o,onCancel:n,onConfirm:_})=>{let c=(0,i.useTranslations)("Saved_Carts_History"),u=(0,i.useTranslations)("translations"),g=(0,Y.P5)(),{addNotification:h}=eY(),{mutate:C,isSuccess:y,isError:p,error:v,reset:S}=(0,Z.qi)(),[x,j]=(0,d.useState)();return(0,d.useEffect)(()=>{p&&(j({variant:"error",headline:c("DeleteDialog.error_headline"),message:c.rich("Dialog.error_message",{support:e=>(0,s.jsx)(X.default,{href:g?.b2bCustomerSupportPageLink?.url??"/",target:"_blank",children:e?.toString()})})}),S())},[p,v,S,c,g?.b2bCustomerSupportPageLink]),(0,d.useEffect)(()=>{y&&(h({variant:"success",headline:c("DeleteDialog.success_message"),message:void 0}),t(!1),S())},[h,y,t,S,c]),(0,s.jsx)(J.Oo,{open:e,onOpenChange:t,children:(0,s.jsxs)(J.bl,{className:K().deleteSavedCartDialog,onClick:e=>e.stopPropagation(),onInteractOutside:e=>e.preventDefault(),children:[(0,s.jsx)("div",{className:K().deleteSavedCartDialog__title,children:c("DeleteDialog.headline")}),(0,s.jsx)("div",{className:K().deleteSavedCartDialog__copy,children:c("DeleteDialog.subline")}),(0,s.jsxs)("div",{className:K().deleteSavedCartDialog__information,"data-testid":"data",children:[(0,s.jsxs)("div",{className:K().deleteSavedCartDialog__information__column,children:[(0,s.jsxs)("p",{className:K().information__label,children:[" ",c("Dialog.cart_label")]}),(0,s.jsx)("strong",{children:l}),(0,s.jsxs)("p",{children:[c("id_label")," ",r]})]}),(0,s.jsxs)("div",{className:K().deleteSavedCartDialog__information__column,children:[(0,s.jsx)("p",{className:K().information__label,children:c("Dialog.count_label")}),(0,s.jsx)("strong",{children:o})]})]}),(0,s.jsxs)("div",{className:K().deleteSavedCartDialog__description,children:[(0,s.jsx)("p",{className:K().information__label,children:c("DeleteDialog.description_label")}),(0,s.jsx)("p",{children:a})]}),(0,s.jsx)("div",{className:K().deleteSavedCartDialog__notifications,children:x?(0,s.jsx)(m.A,{...x,message:x.message,showIcon:!0,hideItAfterDelay:!1,closeLabel:u("general.close"),onCloseCallback:()=>j(void 0)}):null}),(0,s.jsxs)("div",{className:K().deleteSavedCartDialog__actions,"data-testid":"delete-saved-cart-actions",children:[(0,s.jsx)(Q.A,{className:K()["deleteSavedCartDialog__actions--secondary"],size:"small",variant:"text",onClick:()=>{n?.()},children:c("DeleteDialog.cancel")}),(0,s.jsx)(Q.A,{size:"small",onClick:()=>{C(r.toString()),_?.()},children:c("DeleteDialog.confirm")})]})]})})};var et=a(14470),ea=a(82107),es=a(42833),er=a(83971),ei=a.n(er),el=a(2116);let eo=e=>(0,s.jsx)(es._2,{...e,className:(0,r.A)(ei().actionMenu__item,e.className),onClick:t=>{t.stopPropagation(),e.onClick?.(t)}}),en=({children:e})=>{let t=(0,i.useTranslations)();return(0,s.jsxs)(es.rI,{modal:!1,children:[(0,s.jsx)(es.ty,{asChild:!0,onClick:e=>e.stopPropagation(),children:(0,s.jsx)(S.A,{variant:"outline",size:"small",className:ei()["iconButton--greyOnlyDefault"],"aria-label":t("Action_Menu.open"),children:(0,s.jsx)(el.i,{})})}),(0,s.jsx)(es.dc,{children:(0,s.jsx)(es.SQ,{align:"end",className:ei().actionMenu__content,children:e})})]})};var ed=a(11364),e_=a.n(ed),ec=a(9280),eu=a(21156),em=a(2387),eg=a(92436),eh=a(20805),eC=a(68781);let ey=new eu.m,ep=({id:e,title:t,lineItemCount:a,onConfirm:r,onCancel:l})=>{let o=(0,i.useTranslations)("Saved_Carts_History"),_=(0,i.useTranslations)("translations"),c=(0,n.useRouter)(),{locale:u}=(0,p.A)(),g=(0,Y.P5)(),{isOpen:h,closeOverlay:C,openOverlay:y}=(0,et.A)(),[v,S]=(0,d.useState)(!1),[x,j]=(0,d.useState)(!1),{mutate:f,isSuccess:N,isError:D,reset:H,isPending:b,data:A}=(0,ec.Vr)(),{addNotification:F}=(0,em.M)(),k=ey.getCart({locale:u});(0,eg.GT)(()=>S(!0)),(0,d.useEffect)(()=>
1{if(N){let{type:s,key:r,values:i}=(({error:e,lineItemCount:t,title:a})=>e?{type:"PARTIAL",key:"RestoreDialog.partial_success_message",values:{cartName:a}}:{key:"RestoreDialog.success_message",type:"FULL",values:{count:t,cartName:a}})({error:A?.errors?.length>0,lineItemCount:a,title:t}),l=o(r,{...i});F({context:["cart"],id:`${eC.H}-${e}`,variant:"FULL"===s?"success":"warning",headline:l}),H(),c.push(k)}},[N,H,c,k,F,o,a,t,e,A?.errors?.length]);let[T,I]=(0,d.useState)();return(0,d.useEffect)(()=>{D&&(I({variant:"error",headline:o("RestoreDialog.error_headline"),message:o.rich("Dialog.error_message",{support:e=>(0,s.jsx)(X.default,{href:g?.b2bCustomerSupportPageLink?.url??"/",target:"_blank",children:e?.toString()})})}),H())},[D,H,g?.b2bCustomerSupportPageLink,o]),(0,s.jsxs)(J.Oo,{open:h,onOpenChange:e=>{e?y():C()},children:[(0,s.jsx)(J.sX,{asChild:!0,onClick:e=>{e.stopPropagation(),y()},children:(0,s.jsx)(Q.A,{size:"small",children:o("RestoreDialog.trigger_cta")})}),(0,s.jsxs)(J.bl,{className:e_().restoreSavedCartDialog,onClick:e=>e.stopPropagation(),onInteractOutside:e=>{e.stopPropagation(),e.preventDefault()},children:[(0,s.jsx)("div",{className:e_().restoreSavedCartDialog__title,children:o("RestoreDialog.headline")}),(0,s.jsx)("div",{className:e_().restoreSavedCartDialog__copy,children:o("RestoreDialog.subline")}),(0,s.jsxs)("div",{className:e_().restoreSavedCartDialog__information,"data-testid":"data",children:[(0,s.jsxs)("div",{className:e_().restoreSavedCartDialog__information__column,children:[(0,s.jsxs)("p",{className:e_().information__label,children:[" ",o("Dialog.cart_label")]}),(0,s.jsx)("strong",{children:t}),(0,s.jsxs)("p",{children:[o("id_label")," ",e]})]}),(0,s.jsxs)("div",{className:e_().restoreSavedCartDialog__information__column,children:[(0,s.jsx)("p",{className:e_().information__label,children:o("Dialog.count_label")}),(0,s.jsx)("strong",{children:a})]})]}),(0,s.jsx)("div",{className:e_().restoreSavedCartDialog__checkbox,children:(0,s.jsx)(eh.A,{checked:x,onChange:()=>j(e=>!e),children:o("RestoreDialog.delete_after_restore")})}),(0,s.jsx)("div",{className:e_().restoreSavedCartDialog__notifications,children:T?(0,s.jsx)(m.A,{...T,message:T.message,showIcon:!0,hideItAfterDelay:!1,closeLabel:_("general.close"),onCloseCallback:()=>I(void 0)}):null}),(0,s.jsxs)("div",{className:e_().restoreSavedCartDialog__actions,"data-testid":"delete-saved-cart-actions",children:[(0,s.jsx)(Q.A,{size:"small",variant:"text",className:e_()["restoreSavedCartDialog__actions--secondary"],onClick:()=>{C(),l?.()},children:o("RestoreDialog.cancel")}),(0,s.jsx)(Q.A,{size:"small",disabled:b||v,onClick:()=>{f({savedCartId:e,removeSavedCart:x}),r?.()},children:o("RestoreDialog.confirm")})]})]})]})};var ev=a(68143),eS=a(21834),ex=a.n(eS);let ej=({entry:e})=>{let t=(0,ea.useTranslations)("Saved_Carts_History"),a=(0,Y.P5)(),r=!!a?.toggles?.["cep-spa-ecom-saved-carts-header-new-design"],[i,l]=(0,d.useState)("EDIT"),o=(0,d.useCallback)(()=>e.sharedByUser?{firstName:e.sharedByUser.firstName,lastName:e.sharedByUser.lastName}:{firstName:e.owner.firstName,lastName:e.owner.lastName},[e]),{isOpen:n,openOverlay:_,closeOverlay:c}=(0,et.A)(),{isOpen:m,openOverlay:g,closeOverlay:h}=(0,et.A)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.UV,{value:e.id.toString(),className:r?ex()["history-carts-entry--with-container-border"]:void 0,trigger:(0,s.jsx)(N,{title:e.title,id:e.id,date:e.lastModifiedAt,creator:o(),children:(0,s.jsxs)("div",{style:{display:"flex",columnGap:"8px"},children:[(0,s.jsx)(ep,{id:e.id,title:e.title,lineItemCount:e.totalItemCount}),(0,s.jsxs)(en,{children:[(0,s.jsx)(eo,{onClick:()=>{l("EDIT"),g()},children:t("Actions.Edit")}),(0,s.jsx)(eo,{onClick:()=>{l("SHARE"),g()},children:t("Actions.Share")}),(0,s.jsx)(eo,{onClick:e=>{e.stopPropagation(),_()},children:t("Actions.Delete")})]})]})}),children:(0,s.jsx)(V,{entry:e})},e.id),(0,s.jsx)(ee,{id:e.id,title:e.title,description:e.description,lineItemCount:e.totalItemCount,open:n,onOpenChange:e=>{e?_():c()},onCancel:()=>{c()}}),(0,s.jsx)(ev.A,{open:m,id:String(e.id),hideTrigger:!0,initialView:i,onOpenChange:e=>{e||h()}})]})};var ef=a(17377),eN=a.n(ef),eD=a(93725),eH=a(93233),eb=a(37740),eA=a(66461),eF=a.n(eA);let ek=["ASC","DESC"],eT=({value:e,onValueChange:t})=>{let a=(0,i.useTranslations)(),r={ASC:{label:a("general.sortBy.lastModifiedAt_asc"),value:"ASC"},DESC:{label:a("general.sortBy.lastModifiedAt_desc"),value:"DESC"}};return(0,s.jsxs)(eb.bL,{value:r[e].value,onValueChange:e=>{t(e)},children:[(0,s.jsxs)(eb.l9,{className:eF().sortBy__trigger,"aria-label":"SortOrder",children:[(0,s.jsx)(eb.WT,{placeholder:r[e].label,children:r[e].label}),(0,s.jsx)(eb.In,{className:eF().sortBy__icon,children:(0,s.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M18.4247 9.42429C18.5963 9.25269 18.6476 8.99462 18.5547 8.77042C18.4619 8.54621 18.2431 8.40002 18.0004 8.40002L6.00041 8.40002C5.75773 8.40002 5.53895 8.54621 5.44608 8.77041C5.35321 8.99462 5.40455 9.25269 5.57614 9.42429L11.5761 15.4243C11.6887 15.5368
111.8413 15.6 12.0004 15.6C12.1595 15.6 12.3122 15.5368 12.4247 15.4243L18.4247 9.42429Z",fill:"#292F32"})})})]}),(0,s.jsx)(eb.ZL,{children:(0,s.jsx)(eb.UC,{position:"popper",className:eF().sortBy__content,children:ek.map(e=>(0,s.jsx)(eb.q7,{className:eF().sortBy__item,value:e,children:r[e].label},e))})})]})};var eI=a(72934),ew=a(33939),eP=a(30518),eE=a(38069);let eL=({searchValue:e,numberOfSavedCarts:t,onInputChange:a,sortDirection:r,onSortDirectionChange:l,onReset:o})=>{let n=(0,i.useTranslations)(),{locale:_}=(0,p.A)(),c=(0,Y.P5)(),u=!!c?.toggles?.["cep-spa-ecom-saved-carts-header-new-design"],{TODAY_FORMATTED:m,ONE_YEAR_AGO_FORMATTED:g}=(0,d.useMemo)(()=>(0,eI.ZK)(_),[_]),[h,C]=(0,d.useState)(""),[y,v]=(0,d.useState)(!1);(0,d.useEffect)(()=>{C(e)},[e]),(0,ew.d)(()=>{h!==e&&a(h)},550,[h,a]);let S=e=>{y!==e&&v(e)};return(0,s.jsxs)(eP.A,{isNewDesignEnabled:u,className:eN().SavedCartsHistoryFilters,infoArea:(0,s.jsxs)("div",{className:eN().SavedCartsHistoryFilters__info,children:[(0,s.jsx)("div",{className:eN().SavedCartsHistoryFilters__info__Amount,children:(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:n.rich("Saved_Carts_History.filter.carts_count_from_to",{count:t,DATE_FROM:g,DATE_TO:m,strong:e=>`<strong>${e}</strong>`})}})}),(0,s.jsx)("div",{className:eN()["SavedCartsHistoryFilters__info__clearCTA--noBackground"],children:(0,s.jsx)(Q.A,{variant:"text",size:"small",onClick:()=>{o()},children:n("Saved_Carts_History.info_reset_filters_label")})})]}),children:[(0,s.jsxs)("div",{className:eN().SavedCartsHistoryFilters__inputsWrapper,children:[u?(0,s.jsx)(eE.A,{searchValue:h,isNewDesignEnabled:u,placeholder:n("Saved_Carts_History.filter.search_input_placeholder"),onInputChange:e=>{h!==e&&C(e),(0,eI.Bu)(e,()=>S(!1),()=>S(!0))},onEnter:()=>{y||a(h)}}):(0,s.jsxs)("div",{className:eN().SavedCartsHistoryFilters__inputSearchWrapper,children:[(0,s.jsx)("div",{className:eN()["input-icon-search"],children:(0,s.jsx)(eD.WI,{})}),(0,s.jsx)("input",{className:y?eN().error:"",value:h,type:"text",placeholder:n("Saved_Carts_History.filter.search_input_placeholder"),"data-testid":"savedCartsHistoryFilters__input",onChange:e=>{let t=e.target.value;h!==t&&C(t),(0,eI.Bu)(t,()=>S(!1),()=>S(!0))}}),h.length>0?(0,s.jsx)("div",{className:eN()["input-icon-close"],children:(0,s.jsx)("button",{type:"button",onClick:()=>{C(""),v(!1)},children:(0,s.jsx)(eH.A,{name:"close"})})}):null]}),(0,s.jsx)(eT,{value:"DESC"==r?"DESC":"ASC",onValueChange:e=>{l(e)}})]}),y?(0,s.jsx)("div",{className:eN()["SavedCartsHistoryFilters__error-message"],children:(0,s.jsx)("p",{children:n("Saved_Carts_History.input_error_message")})}):null]})};var eB=a(82820),eR=a(97628),eO=a(69992),eq=a(2491),eM=a(93587),e$=a(76241),ez=a(51354),eU=a(95829);let eW=new(a(18999)).A,eV=(e,t)=>{let{data:a,isApproved:s,isShopUser:r,hasPermissionFor:i}=(0,eM.A)(),{country:l,language:o,isLoading:n}=(0,p.A)(),d=!!a&&!!a.accessToken&&s&&r&&!n,_=i(e$.t.SEE_CART);return(0,eq.I)({...eU.j,queryKey:[ez.t.SAVED_CART_SEARCH,{accountNumber:a?.user.customer?.accountNumber,id:a?.user.id,country:l,filter:e}],select:t,enabled:d,staleTime:0,gcTime:0,queryFn:async()=>{if(!a?.accessToken)throw Error("Missing necessary values");if(!_)throw Error("Insufficient permission");return await eW.getSavedCartsSearch({country:l,language:o,token:a.accessToken,filter:e})}})};var eJ=a(51758),eG=a.n(eJ),eK=!0;let eZ="SavedCartsHistoryPage",[eX,eY]=(0,eB.q)("SavedCartsHistory"),eQ=({id:e,query:t})=>{let{locale:a}=(0,p.A)(),l=(0,n.useRouter)(),C=(0,i.useTranslations)(),[y,v]=(0,eO.A)({initialState:t?{query:t}:{}}),[S,x]=(0,d.useState)((e||t)??""),{notifications:j,addNotification:f,getLastNotification:N,removeNotification:D}=(()=>{let[e,t]=(0,d.useState)([]),a=(0,d.useCallback)(a=>{e.find(e=>e.id===a.id)||t(e=>[...e,{...a,id:a.id??Date.now().toString()+Math.random().toString()}])},[e]),s=(0,d.useCallback)(e=>{t(t=>t.filter(t=>t.id!==e))},[]),r=(0,d.useCallback)(()=>e[e.length-1],[e]);return{notifications:e,removeNotification:s,addNotification:a,getLastNotification:r,clearNotification:(0,d.useCallback)(()=>{t([])},[])}})();
1(0,eR.A)({name:`Saved Carts for ${a}`,pageType:"Saved Carts History"});let{data:H,isError:b,isLoading:A,isSuccess:F}=eV(y),{data:k,isError:T,isSuccess:I,isLoading:w}=eV(y,e=>({page:e.pageNumber,totalPages:Math.ceil(e.total/e.pageSize)})),P=(0,d.useCallback)(async()=>{let{id:e,query:t,...a}=l.query;await l.replace({pathname:`${window.location.pathname}`,query:{...a}},void 0)},[l]);(0,d.useEffect)(()=>{e&&e!==S&&P(),t&&t!==S&&P()},[e,t,P,S]),(0,d.useEffect)(()=>{let e=""===S,t=!("query"in y),a=S!==y?.query;!(e&&t)&&a&&v(e=>({...e,query:S}))},[y,S,v]);let E=(0,d.useMemo)(()=>H?.results.length===1,[H?.results.length]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o(),{children:(0,s.jsx)("title",{children:C("Saved_Carts_History.title")})}),(0,s.jsx)(_.default,{children:(0,s.jsxs)("main",{"data-testid":"my-account-page-wrapper-saved-carts-history",className:eG()["my-account-page"],children:[(0,s.jsx)("div",{className:eG()["my-account-page__side"],children:(0,s.jsx)(g.A,{})}),(0,s.jsxs)("div",{className:eG()["my-account-page__main"],children:[(0,s.jsxs)("div",{className:(0,r.A)(eG()["history-page-heading-and-filters"],eG()["history-page-heading-and-filters--saved-carts"]),children:[(0,s.jsx)("h1",{style:{marginBottom:"24px"},className:eG()["history-page-heading"],children:C("Saved_Carts_History.title")}),(0,s.jsx)(eL,{searchValue:S,numberOfSavedCarts:H?.total??0,sortDirection:H?.sortDirection,onInputChange:e=>{S!==e&&x(e)},onSortDirectionChange:e=>{v(t=>({...t,sortDirection:e}))},onReset:()=>{v({}),x("")}})]}),(0,s.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0},children:(0,s.jsxs)(eX,{notification:j,addNotification:f,children:[N()&&(0,s.jsx)("div",{style:{marginBlockEnd:"16px"},children:(0,s.jsx)(m.A,{headline:N().headline,message:N().message??"",variant:N().variant,showIcon:!0,hideItAfterDelay:!1,closeLabel:C("translations.general.close"),onCloseCallback:()=>D(N().id)})}),(0,s.jsx)(c.A,{isError:b,isLoading:A,skeletonProps:{count:5,height:"100px",style:{marginBottom:"5px"}},useSkeleton:!0,children:F?(0,s.jsx)(u.Ow,{type:"multiple",...E?{defaultValue:[H.results[0].id.toString()]}:{},children:H.results.map(e=>(0,s.jsx)(ej,{entry:e},e.id))}):null})]})}),(0,s.jsx)("div",{style:{marginTop:"40px",display:"flex",justifyContent:"center"},children:(0,s.jsx)(c.A,{isError:T,isLoading:w,children:I&&k.totalPages>1?(0,s.jsx)(h.A,{activePage:k.page,totalNumberOfPages:k.totalPages,onPageChange:e=>{v(t=>({...t,page:e})),scrollTo({top:0,behavior:"smooth"})}}):null})})]})]})})]})}}},e=>{e.O(0,[429,8212,4013,5269,8460,2833,3295,3180,4335,1984,5351,636,6593,8792],()=>e(e.s=51964)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.