PageSourceSearch

https://www.coffeecircle.com/_next/static/chunks/1of632zhdwd-a.js

js coffeecircle.com collected 2026-09-24 17:50:43 UTC 22,402 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6b516a1e-e690-592e-b8a8-c1a8513c2e01")}catch(e){}}();
3(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,234314,e=>{e.v({bottomRow:"CartLineItemList-module-scss-module__rHNgSq__bottomRow",headline:"CartLineItemList-module-scss-module__rHNgSq__headline",possibleShipmentInfo:"CartLineItemList-module-scss-module__rHNgSq__possibleShipmentInfo",priceHeadline:"CartLineItemList-module-scss-module__rHNgSq__priceHeadline",single:"CartLineItemList-module-scss-module__rHNgSq__single",subtotalInfo:"CartLineItemList-module-scss-module__rHNgSq__subtotalInfo"})},908764,e=>{e.v({cartContainer:"Cart-module-scss-module__JrWayq__cartContainer",cartHeadline:"Cart-module-scss-module__JrWayq__cartHeadline",cartLineItemsWrapper:"Cart-module-scss-module__JrWayq__cartLineItemsWrapper",loadingWrapper:"Cart-module-scss-module__JrWayq__loadingWrapper",secondaryText:"Cart-module-scss-module__JrWayq__secondaryText"})},972710,e=>{e.v({container:"CartRecommendations-module-scss-module__x4BfRG__container",header:"CartRecommendations-module-scss-module__x4BfRG__header",loadingWrapper:"CartRecommendations-module-scss-module__x4BfRG__loadingWrapper"})},111603,e=>{e.v({alwaysVisibleArea:"DiscountBox-module-scss-module__4Hq_ga__alwaysVisibleArea",box:"DiscountBox-module-scss-module__4Hq_ga__box",codePill:"DiscountBox-module-scss-module__4Hq_ga__codePill",codePillIcon:"DiscountBox-module-scss-module__4Hq_ga__codePillIcon",expandableArea:"DiscountBox-module-scss-module__4Hq_ga__expandableArea",expanded:"DiscountBox-module-scss-module__4Hq_ga__expanded",giftCardInfoText:"DiscountBox-module-scss-module__4Hq_ga__giftCardInfoText",headline:"DiscountBox-module-scss-module__4Hq_ga__headline",headlineAndInfoButton:"DiscountBox-module-scss-module__4Hq_ga__headlineAndInfoButton",icons:"DiscountBox-module-scss-module__4Hq_ga__icons",inputArea:"DiscountBox-module-scss-module__4Hq_ga__inputArea",inputField:"DiscountBox-module-scss-module__4Hq_ga__inputField",pillLabel:"DiscountBox-module-scss-module__4Hq_ga__pillLabel",pillRoot:"DiscountBox-module-scss-module__4Hq_ga__pillRoot"})},893210,e=>{e.v({cartAsideContainer:"CartSummaryAndActions-module-scss-module__jwuYhW__cartAsideContainer",content:"CartSummaryAndActions-module-scss-module__jwuYhW__content",discountBoxWrapper:"CartSummaryAndActions-module-scss-module__jwuYhW__discountBoxWrapper",headline:"CartSummaryAndActions-module-scss-module__jwuYhW__headline",perkBarWrapper:"CartSummaryAndActions-module-scss-module__jwuYhW__perkBarWrapper"})},360419,e=>{e.v({wrapper:"MobileDirectCheckoutArea-module-scss-module__xGyrwW__wrapper"})},569064,e=>{e.v({image:"NoCoffeeInCartOverlay-module-scss-module__pUgR8W__image",overlay:"NoCoffeeInCartOverlay-module-scss-module__pUgR8W__overlay"})},503396,e=>{e.v({button:"SocialProjectSelectionCard-module-scss-module__YXALhW__button",content:"SocialProjectSelectionCard-module-scss-module__YXALhW__content",image:"SocialProjectSelectionCard-module-scss-module__YXALhW__image",projectCard:"SocialProjectSelectionCard-module-scss-module__YXALhW__projectCard",projectDescription:"SocialProjectSelectionCard-module-scss-module__YXALhW__projectDescription",selected:"SocialProjectSelectionCard-module-scss-module__YXALhW__selected"})},554339,e=>{e.v({badge:"SocialProjectSelection-module-scss-module__r2y0Za__badge",cards:"SocialProjectSelection-module-scss-module__r2y0Za__cards",container:"SocialProjectSelection-module-scss-module__r2y0Za__container",header:"SocialProjectSelection-module-scss-module__r2y0Za__header",headline:"SocialProjectSelection-module-scss-module__r2y0Za__headline",headlineText:"SocialProjectSelection-module-scss-module__r2y0Za__headlineText",incentiveArrow:"SocialProjectSelection-module-scss-module__r2y0Za__incentiveArrow",space:"SocialProjectSelection-module-scss-module__r2y0Za__space"})},565893,e=>{"use strict";var t,a,s,i=e.i(843476),l=e.i(442948),r=e.i(948148),o=e.i(271645),n=e.i(102305),c=e.i(64575),d=e.i(569546),u=e.i(321349),m=e.i(413148),h=e.i(154881),p=e.i(234314);let x=({items:e,headline:t,subtotal:a,isSubscriptionList:s})=>{let l=(0,r.useTranslations)();return e.length?(0,i.jsxs)("div",{children:[(0,i.jsx)(d.Headline,{variant:"h2",size:"h3",className:p.default.headline,children:t}),(0,i.jsx)("ul",{children:e.map((t,a)=>(0,i.jsx)(c.CartLineItem,{item:t,index:a,totalItems:e.length},`cart-line-${t.id}`))}),(0,i.jsxs)("div",{className:(0,n.clsx)(p.default.bottomRow,!s&&p.default.single),children:[s&&(0,i.jsx)(m.Text,{small:!0,className:p.default.possibleShipmentInfo,suppressHydrationWarning:!0,children:l("pdp.subscription.firstShipment",{date:(0,h.getEarliestShipmentDate)()})}),(0,i.jsxs)("div",{className:p.default.subtotalInfo,children:[(0,i.jsx)(m.Text,{small:!0,children:l("navbar.minicart.subtotalCartAmountLabel")}),(0,i.jsx)(m.Text,{bold:!0,className:p.default.priceHeadline,children:(0,i.jsx)(u.Price,{price:a})})]})]})]}):null};var _=e.i(653458);let f=(e,t)=>e.reduce((e,t)=>
3({amount:e.amount+parseFloat(t.cost.totalAmount.amount),currencyCode:e.currencyCode}),{amount:0,currencyCode:t});var j=e.i(192039),g=e.i(908764);let v=()=>{let e=(0,r.useTranslations)(),{data:t}=(0,j.useCartQuery)();if(!t)return null;let{lines:{nodes:a},cost:{subtotalAmount:s}}=t,l=e=>{let t=e.attributes.find(e=>e.key===_.config.donationAttributeKey)?.value;return t&&/^\d{1,2}W$/.test(t)},o=a.filter(e=>!l(e)&&!e.sellingPlanAllocation),n=o?.filter(e=>e.merchandise.product.id!==_.config.donationProductId),c=f(o,s.currencyCode),d=a.filter(e=>l(e)||e.sellingPlanAllocation),u=d.filter(e=>e.merchandise.product.id!==_.config.donationProductId),m=d.length>0,h=f(d,s.currencyCode),p=e(`cart.${m?"singleCartItemsTitle":"cartItemsTitle"}`);return(0,i.jsxs)("div",{className:g.default.cartLineItemsWrapper,children:[(0,i.jsx)(x,{headline:e("cart.subscriptionCartItemsTitle"),items:u,subtotal:h,isSubscriptionList:!0}),(0,i.jsx)(x,{headline:p,items:n,subtotal:c})]})};var C=e.i(861745),y=e.i(655028),b=e.i(689817),S=e.i(451501),I=e.i(905142),T=e.i(5989),N=e.i(170586),P=e.i(590366),B=e.i(293472),w=e.i(847098),A=e.i(590184),k=e.i(227796),L=e.i(969354),W=e.i(329369),H=e.i(447800),D=e.i(171020),q=e.i(277467),R=e.i(143665),M=e.i(520133),z=e.i(130586);let F=({opened:e,onClose:t,product:a,t:s})=>{let{title:l,variants:{nodes:r},images:{nodes:c},vendor:u,productType:h,handle:p,coffeeTaste:x,coffeeCharacter:_,coffeeRoastLevel:f,coffeeStrengthLevel:j,coffeeAcidityLevel:g,coffeeIntensityLevel:v,coffeeCapsuleStyle:C}=a,[y]=c,[b]=r,[S,I]=(0,o.useState)(b),T=(0,D.getCoffeeNotes)(x,_),N=r.length>1?S.sku:null,P=(0,q.removeBioOrganic)(l),F=T||r.length>1&&b?.title||u||"Coffee Circle",U=(0,R.productPath)(h,p),E=(0,n.clsx)(k.default.linkBase,k.default.noUnderline,k.default.stealth);return(0,i.jsx)(L.Modal,{opened:e,title:s("pdp.similarProducts.modalTitle"),onClose:t,children:(0,i.jsxs)("div",{className:z.default.wrapper,children:[(0,i.jsxs)("div",{className:z.default.productInfoColumn,children:[(0,i.jsx)(M.Link,{href:(0,R.productPath)(h,p,N),children:(0,i.jsx)(W.ProductCardImage,{name:P,image:y})}),(0,i.jsxs)("div",{className:z.default.infoContainer,children:[(0,i.jsx)(M.Link,{href:U,className:E,children:(0,i.jsx)(d.Headline,{variant:"h3",children:P})}),(0,i.jsx)(m.Text,{variant:"p",children:F}),(0,i.jsx)("div",{className:z.default.coffeeDetailsWrapper,children:(0,i.jsx)(A.CoffeePropertiesTable,{roastLevel:f,strengthLevel:j,acidityLevel:g,intensityLevel:v,capsuleStyle:C,t:s})})]})]}),(0,i.jsxs)("div",{className:z.default.column,children:[(0,i.jsx)(w.VariantOptions,{product:a,variant:S,setVariant:I}),(0,i.jsx)(B.BuyBox,{product:a,variant:S,isRenderedWithinModal:!0,purchaseType:H.PurchaseType.OneTime})]})]})})};var U=e.i(535294),E=e.i(126538),Y=e.i(32390);let O=({product:e})=>{let t=(0,r.useTranslations)(),{data:a}=(0,j.useCartQuery)(),[s,{open:l,close:n}]=(0,I.useDisclosure)();(0,o.useEffect)(()=>{n()},[a]);let{title:c,vendor:u,variants:{nodes:h},images:{nodes:p},coffeeTaste:x,coffeeCharacter:_}=e,[f]=p,g=(0,q.removeBioOrganic)(c),v=(0,D.getCoffeeNotes)(x,_),C=h.length>1,y=(0,E.getCheapestVariant)(h);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(S.Card,{className:Y.default.card,onClick:l,children:[(0,i.jsx)(U.ShopifyImage,{image:f,width:90,height:90,alt:"",lazy:!0}),(0,i.jsxs)("div",{className:Y.default.content,children:[(0,i.jsx)(d.Headline,{variant:"h3",size:"h4",className:Y.default.title,children:g}),(0,i.jsx)(m.Text,{variant:"span",small:!0,children:v||u||"Coffee Circle"}),(0,i.jsx)(P.ProductCardPrice,{productVariant:y,isStartingPrice:C}),(0,i.jsx)("div",{children:(0,i.jsx)(N.Button,{onClick:l,variant:"tertiary",startIcon:(0,i.jsx)(T.IconShoppingBag,{}),inline:!0,"data-analytics-id":"add-to-cart-cross-selling",children:t("common.addToCart")})})]})]}),(0,i.jsx)(F,{opened:s,onClose:n,product:e,t:t})]})},G=({products:e})=>(0,i.jsx)(b.Carousel,{variant:"products",slideSize:"auto",emblaOptions:{loop:!0,slidesToScroll:1},slideGap:{base:"sm",md:"xl"},fluid:!0,children:e.map(e=>(0,i.jsx)(O,{product:e},`similar-product-${e.id}`))});var Q=e.i(62064),V=e.i(346670),Z=((t={}).Gear="gear",t.EspressoCoffee="espressoCoffee",t.FilterCoffee="filterCoffee",t.Mixed="mixed",t),$=e.i(972710);let X=({cart:e})=>
3{let t=(0,r.useTranslations)(),a=(0,C.useLocale)().toUpperCase(),[s,n]=(0,o.useState)([]),[c,u]=(0,o.useState)(!1),{lines:{nodes:h}}=e,p=async()=>{let e=h.filter(({merchandise:e})=>"gear"===e.product.productType),t=h.filter(({merchandise:e})=>"donation"===e.product.productType),a=h.filter(({merchandise:e})=>e.product.tags?.includes("filter-coffee")),s=h.filter(({merchandise:e})=>e.product.tags?.includes("espresso")),i=h.length>e.length,l=a.length+t.length<h.length,r=s.length+t.length<h.length;e.length&&!i?(u(!1),x(Z.Gear)):a.length&&!l?(u(!0),x(Z.FilterCoffee)):s.length&&!r?(u(!0),x(Z.EspressoCoffee)):(u(!0),x(Z.Mixed))},x=async e=>{let{cartRecommendationCollections:t}=_.config,s=t[e],{collection:i}=await Q.graphQLClient.request({document:V.CartRecommendedCollectionProductsDocument,variables:{id:s,lang:a}});n(g(j(f(i?.products.nodes??[]))))},f=e=>e.filter(({id:e})=>!h.some(({merchandise:t})=>t.product.id===e)),j=e=>e.filter(e=>e.variants.nodes.some(e=>e.availableForSale)),g=e=>e.slice(0,9);(0,o.useEffect)(()=>{h.length&&p()},[h]);let v=c||h.length>1?t("cart.mixedCartRecommendedProductsTitle"):t("cart.gearOnlyCartRecommendedProductsTitle",{productTitle:h[0].merchandise.product.title});return(0,i.jsxs)("div",{className:$.default.container,children:[(0,i.jsxs)("div",{className:$.default.header,children:[(0,i.jsx)(d.Headline,{variant:"h2",children:v}),!c&&(0,i.jsx)(m.Text,{small:!0,children:t("cart.coffeeIncentiveText")})]}),s.length?(0,i.jsx)(y.Container,{children:(0,i.jsx)(G,{products:s})}):(0,i.jsx)("div",{className:$.default.loadingWrapper,children:(0,i.jsx)(l.Loader,{})})]})};var J=e.i(73404),K=e.i(672204),ee=e.i(25293),et=e.i(802315),ea=e.i(620777),es=e.i(136455),ei=e.i(33550),el=(0,ei.default)("outline","rosette-discount","IconRosetteDiscount",[["path",{d:"M9 15l6 -6",key:"svg-0"}],["circle",{cx:"9.5",cy:"9.5",r:".5",fill:"currentColor",key:"svg-1"}],["circle",{cx:"14.5",cy:"14.5",r:".5",fill:"currentColor",key:"svg-2"}],["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7a2.2 2.2 0 0 0 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1a2.2 2.2 0 0 0 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-3"}]]),er=(0,ei.default)("outline","ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),eo=e.i(287952),en=e.i(327024),ec=e.i(40687),ed=e.i(111603);let eu=()=>{let e=(0,r.useTranslations)(),{data:t}=(0,j.useCartQuery)(),{mutateAsync:a,isPending:s}=(0,ec.useCartDiscountCodesUpdateMutation)(),[l,c]=(0,o.useState)(!1),[u,h]=(0,o.useState)(!1),[p,x]=(0,o.useState)(!1),[_,f]=(0,o.useState)(""),[g,v]=(0,o.useState)(!1);if(!t)return null;let{id:C,discountCodes:y}=t,b=y.filter(({applicable:e})=>e)||[],S=async()=>{if(0===_.length)return;let{cart:e}=await a({cartId:C,discountCodes:[...b.map(({code:e})=>e),_]});e.discountCodes.some(({code:e,applicable:t})=>e===_&&t)?(f(""),T(),v(!1)):v(!0)},I=async e=>{await a({cartId:C,discountCodes:b.map(({code:e})=>e).filter(t=>t!==e)})},T=()=>{h(!0),setTimeout(()=>{h(!1)},3e3)};return(0,i.jsxs)("div",{className:ed.default.box,children:[(0,i.jsx)("div",{className:ed.default.alwaysVisibleArea,onClick:()=>c(!l),onKeyDown:e=>"ArrowDown"===e.key&&c(!l),role:"button",tabIndex:0,children:(0,i.jsxs)("div",{className:ed.default.headlineAndInfoButton,children:[(0,i.jsx)(d.Headline,{variant:"h3",size:"h4","data-testid":"discount-box-title",className:ed.default.headline,children:e("cart.discountBox.title")}),(0,i.jsxs)("div",{className:ed.default.icons,children:[(0,i.jsx)(J.ActionIcon,{variant:"light",color:"grey",size:"lg",onClick:e=>{e.stopPropagation(),x(!0)},"aria-label":"Info",children:(0,i.jsx)(es.IconInfoSmall,{size:40})}),(0,i.jsx)(J.ActionIcon,{variant:"light",color:"grey",size:"lg",onClick:()=>c(!l),"aria-label":e("common.showMore"),children:l?(0,i.jsx)(ea.IconChevronUp,{}):(0,i.jsx)(et.IconChevronDown,{})})]})]})}),(0,i.jsxs)("div",{className:(0,n.clsx)(ed.default.expandableArea,l&&ed.default.expanded),children:[(0,i.jsx)(m.Text,{small:!0,variant:"p",className:ed.default.giftCardInfoText,children:e("cart.discountBox.giftCardInfoText")}),(0,i.jsxs)("div",{className:(0,n.clsx)(ed.default.box,ed.default.inputArea),children:[(0,i.jsx)(ee.TextInput,{className:ed.default.inputField,value:_,required:!0,onChange:e=>{f(e.target.value),v(!1)},onKeyDown:e=>"Enter"===e.key&&S(),placeholder:e("cart.discountBox.inputFieldLabel"),"aria-label":e("cart.discountBox.inputFieldLabel"),leftSection:(0,i.jsx)(er,{}),"data-testid":"discount-code-input",error:g&&e("cart.discountBox.feedbackError")}),(0,i.jsx)(N.Button,{onClick:S,variant:"secondary","data-testid":"apply-discount-button",fullWidthMobile:!0,disabled:s,children:s?(0,i.jsx)(en.IconLoading,{size:16,stroke:1.6}):e("cart.discountBox.buttonText")})]}),b.map(({code:e})=>(0,i.jsxs)(K.Pill,{size:"lg",className:ed.default.codePill,withRemoveButton:!0,onRemove:()=>I(e),"aria-label":"remove discount",classNames:{label:ed.default.pillLabel,root:ed.default.pillRoot},children:[(0,i.jsx)(el,{size:18,className:ed.default.codePillIcon}),e.toUpperCase()," "]},e)),u&&(0,i.jsx)(eo.Alert,{variant:"success",children:e("cart.discountBox.feedbackSuccess")}),(0,i.jsx)(L.Modal,{title:e("cart.discountBox.modalTitle"),opened:p,onClose:()=>x(!1),children:(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:e.raw("cart.discountBox.modalText")},suppressHydrationWarning:!0})})]})]})},em=({buttonText:e})=>{let t=(0,r.useTranslations)(),{data:a}=(0,j.useCartQuery)();return(0,i.jsx)(N.Button,{variant:"primary",href:`${a?.checkoutUrl}&sso=silent`,fullWidth:!0,children:e||t("common.proceedToCheckout")})};var eh=e.i(650443),ep=e.i(672828),ex=e.i(893210);let e_=()=>{let e=(0,r.useTranslations)();return(0,i.jsxs)("aside",{className:ex.default.cartAsideContainer,children:[(0,i.jsx)(d.Headline,{variant:"h2",size:"h3",className:ex.default.headline,children:e("cart.summary")}
3),(0,i.jsxs)("div",{className:ex.default.content,children:[(0,i.jsx)(eh.PriceBox,{showShipping:!0,showDiscounts:!0,showVatInfo:!0}),(0,i.jsx)(em,{}),(0,i.jsx)("div",{className:ex.default.perkBarWrapper,children:(0,i.jsx)(ep.Perks,{})}),(0,i.jsx)("div",{className:ex.default.discountBoxWrapper,children:(0,i.jsx)(eu,{})})]})]})};var ef=e.i(360419);let ej=()=>{let e=(0,r.useTranslations)();return(0,i.jsx)("div",{className:ef.default.wrapper,children:(0,i.jsx)(em,{buttonText:e("cart.mobileDirectCheckoutButtonText")})})};var eg=e.i(569064);let ev=()=>{let e=(0,r.useTranslations)();return(0,i.jsxs)("div",{className:eg.default.overlay,children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{className:eg.default.image,src:"/assets/svg/illustrations/1-euro-donation-with-arrow.svg",alt:"donation tip"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)(d.Headline,{variant:"h3",children:e("cart.socialProjects.overlay.title")}),(0,i.jsx)(m.Text,{variant:"p",children:e("cart.socialProjects.overlay.text")})]})]})};var eC=e.i(626197),ey=e.i(395359),eb=e.i(503396);let eS=({projectType:e,onClickFunction:t,currentSelection:a,imageIdentifier:s})=>{let l=(0,r.useTranslations)(),o=a===e;return(0,i.jsxs)("div",{className:(0,n.clsx)(eb.default.projectCard,o&&eb.default.selected),onClick:()=>t(e),children:[(0,i.jsx)("div",{className:eb.default.image,children:(0,i.jsx)(ey.Image,{className:(0,n.clsx)(o&&eb.default.selected),identifier:s,srcSet:[320,640],height:"130",width:"320",alt:"Project Type Image",lazy:!0,cover:!0})}),(0,i.jsxs)("div",{className:eb.default.content,children:[(0,i.jsx)(d.Headline,{variant:"h3",children:l(`cart.socialProjects.${e}.title`)}),(0,i.jsx)(m.Text,{variant:"p",small:!0,className:eb.default.projectDescription,children:l(`cart.socialProjects.${e}.description`)})]}),(0,i.jsx)(N.Button,{variant:o?"primary":"secondary",startIcon:o?(0,i.jsx)(eC.IconCheck,{stroke:1.6}):void 0,onClick:()=>t(e),className:eb.default.button,children:l(o?"cart.socialProjects.chosenProject":"cart.socialProjects.chooseProject")})]})};var eI=((a={}).Farming="farming",a.Education="education",a.Water="water",a);(s={}).SP022="SP022",s.SP023="SP023",s.SP024="SP024";var eT=e.i(954616),eN=e.i(912598),eP=e.i(537691),eB=e.i(554339);let ew=[{type:eI.Farming,imageIdentifier:"11ffe4cf-98e2-46d7-b2ca-1a71b3a1e12b"},{type:eI.Education,imageIdentifier:"d0fc29ae-8ba3-40d6-87b1-047683aeacff"},{type:eI.Water,imageIdentifier:"f2618d73-2521-447c-9e2d-26645e481fa1"}],eA=ew.reduce((e,t,a)=>({...e,[t.type]:a}),{}),ek=({cart:e})=>{let t,a,s=(0,r.useTranslations)(),{mutateAsync:l}=(t=(0,C.useLocale)().toUpperCase(),a=(0,eN.useQueryClient)(),(0,eT.useMutation)({mutationFn:async e=>{let{cartAttributesUpdate:a}=await Q.graphQLClient.request(V.CartAttributesUpdateDocument,{cartId:e.cartId,attributes:e.attributes,lang:t});return a},onSuccess:({cart:e,userErrors:t})=>(0,eP.onCartMutationSuccess)(a,e,t)})),{id:c,lines:{nodes:u},attributes:h}=e,p=!!u.find(e=>e.merchandise.product.id===_.config.donationProductId),x=h.find(e=>"social-project"===e.key),{socialProjectsKey:f,socialProjectDefaultIdentifier:j}=_.config,g=x?f[x.value]:f[j],[v,y]=(0,o.useState)(g),[S,I]=(0,o.useState)(!1),T=e=>y(e),N=async(e,t)=>{let a=_.config.socialProjects[e];await l({cartId:c,attributes:t?[{key:"social-project",value:a}]:[]})};return(0,o.useEffect)(()=>{let e=!x||v!==g;p&&e&&N(v,p)},[v,p]),(0,i.jsxs)("div",{className:eB.default.container,id:"social-projects",children:[p&&(0,i.jsx)("img",{src:"/assets/img/incentive-arrow.png",width:50,height:50,alt:"arrow down",className:eB.default.incentiveArrow}),(0,i.jsxs)("div",{className:(0,n.clsx)(eB.default.header,eB.default.space),children:[(0,i.jsxs)("div",{className:eB.default.headline,children:[(0,i.jsx)(d.Headline,{variant:"h2",className:eB.default.headlineText,children:s("cart.socialProjects.title")}),(0,i.jsx)(J.ActionIcon,{variant:"light",color:"grey",size:"lg",onClick:()=>I(!0),"aria-label":"Info",children:(0,i.jsx)(es.IconInfoSmall,{size:40})})]}),(0,i.jsx)("br",{}),(0,i.jsx)(m.Text,{small:!0,children:s("cart.socialProjects.subtitle")}),(0,i.jsx)("img",{className:eB.default.badge,src:"/assets/svg/illustrations/1-euro-donation.svg",alt:"donation tip",width:56,height:56})]}),(0,i.jsx)("div",{className:(0,n.clsx)(eB.default.cards,eB.default.space),children:(0,i.jsx)(b.Carousel,{variant:"cards",slideSize:{base:"85%",lg:"33%"},slideGap:{base:"xs",md:"xl"},mobileBreakpoint:_.config.breakpoints.lg,initialSlide:eA[v],children:ew.map(e=>(0,i.jsx)(eS,{projectType:e.type,onClickFunction:T,currentSelection:v,imageIdentifier:e.imageIdentifier},e.imageIdentifier))})}),!p&&(0,i.jsx)(ev,{}),(0,i.jsx)(L.Modal,{title:s("cart.socialProjects.modal.title"),opened:S,onClose:()=>I(!1),children:(0,i.jsx)("div",{dangerouslySetInnerHTML:{__html:s.raw("cart.socialProjects.modal.text")},suppressHydrationWarning:!0})})]})};var eL=e.i(215745),eW=e.i(591536);let eH=()=>{let e=(0,r.useTranslations)(),t=e("cart.emptyCart.title"),a=e("cart.emptyCart.secondary.buttonLink"),s=e("cart.emptyCart.primaryButtonText"),l=e("cart.emptyCart.primaryButtonLink"),o=e("cart.emptyCart.secondaryButtonText"),n=e("cart.emptyCart.secondaryButtonLink");return(0,i.jsxs)(y.Container,{className:eW.default.container,children:[(0,i.jsx)(ey.Image,{identifier:"ce944da1-e0b3-4186-973e-a1735a781e67",srcSet:[200,400,800],sizes:`(min-width: ${_.config.breakpoints.lg}px) 400px, 200px`,width:"400",height:"320",alt:"empty cart",className:eW.default.imageWrapper}),(0,i.jsx)(d.Headline,{variant:"h1",children:t}),(0,i.jsx)(m.Text,{className:eW.default.secondaryText,center:!0,children:e.rich("cart.emptyCart.secondary.text",{a:e=>(0,i.jsx)(eL.Link,{href:a,children:e})})}),(0,i.jsxs)("div",{className:eW.default.buttonsContainer,children:[(0,i.jsx)(N.Button,{href:l,variant:"primary",type:"button",fullWidthMobile:!0,children:s}),(0,i.jsx)(N.Button,{href:n,variant:"secondary",type:"button",fullWidthMobile:!0,children:o})]})]})};var eD=e.i(893456);e.s(["Cart",0,()=>{let e=(0,r.useTranslations)(),{data:t,isLoading:a}=(0,j.useCartQuery)(),s=!t||!t?.lines?.nodes?.length;return(0,o.useEffect)(()=>{window&&t&&(0,eD.pushCart)(t)},[t]),(0,i.jsx)(i.Fragment,{children:a?(0,i.jsx)("div",{className:g.default.loadingWrapper,children:(0,i.jsx)(l.L
3oader,{})}):s?(0,i.jsx)(eH,{}):(0,i.jsxs)(y.Container,{className:g.default.cartContainer,children:[(0,i.jsx)(d.Headline,{variant:"h1",className:g.default.cartHeadline,children:e("cart.title")}),(0,i.jsx)(ej,{}),(0,i.jsx)(v,{}),(0,i.jsx)(e_,{}),(0,i.jsx)(ek,{cart:t}),(0,i.jsx)(X,{cart:t})]})})}],565893)}]);
4
5//# sourceMappingURL=2pj2rbped1d-e.js.map
6//# debugId=6b516a1e-e690-592e-b8a8-c1a8513c2e01

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.