1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6127],{901:(e,t,r)=>{r.d(t,{q:()=>l});var a=r(17942),s=r(13412),i=r(23100);let l=()=>{let{t:e}=(0,i.Bd)();return(0,a.jsxs)("div",{"data-testid":"modal_sub-cancellation",className:"rb-xs:max-w-[427px] mx-auto flex w-full flex-col gap-4",children:[(0,a.jsx)("h2",{className:"text-header-text-20-sans rb-xs:text-header-text-24-sans text-primary-text",children:e("subscription_pause.title")}),(0,a.jsx)("p",{className:"text-body-text-16 text-secondary-text",children:e("subscription_pause.paragraph1")}),(0,a.jsx)("p",{className:"text-body-text-16 text-secondary-text",children:(0,a.jsx)(i.x6,{i18nKey:"subscription_pause.paragraph2",components:[(0,a.jsx)("a",{href:`${s.b7}/help-center`,className:"text-link-default hover:text-link-hover underline"},"help-center-link")]})})]})}},2440:(e,t,r)=>{r.d(t,{H:()=>i});var a=r(84252),s=r(16026);let i=e=>{var t;return{type:(t=e.type)?t.replace(/_/g,"-"):"default",label:(0,s.nr)(e.label??""),Icon:a.t[e.icon?.name??""],hideIcon:e.hideIcon??void 0}}},2837:(e,t,r)=>{r.d(t,{K:()=>a});let a=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=e.replace(/<[^>]*>?/gm,"");return t?r.replace(/®/i,"<sup>\xae</sup>"):r}},4198:(e,t,r)=>{r.d(t,{O:()=>a.O});var a=r(84841)},10764:(e,t,r)=>{r.d(t,{Z:()=>N,z:()=>a.z});var a=r(75974),s=r(17942),i=r(77638),l=r(50309),n=r(15804),d=r(16026),c=r(95425),o=r(17451);r(47606);let p=e=>{let{type:t,onClick:r,href:a="#",ariaLabel:i,className:l="",testId:n="card-action",children:d,as:p}=e;if(!t)return(0,s.jsx)(s.Fragment,{children:d});let m=p??o.M;switch(t){case"link":return(0,s.jsx)(m,{href:a,"aria-label":i,className:l,"data-testid":n,children:d});case"button":return(0,s.jsx)("button",{onClick:r,"aria-label":i,className:(0,c.cn)("text-left",l),type:"button","data-testid":n,children:d});default:return(0,s.jsx)(s.Fragment,{children:d})}},m="group flex-grow max-w-[736px] rb-sm:max-w-[648px]",x="rb-sm:p-6 relative z-20 flex flex-col p-4",u={aspectRatio:{"4:5":"aspect-[4/5]","5:4":"aspect-[5/4]"}},h="relative w-full h-full overflow-hidden rb-sm:rounded-3xl rounded-2xl",b="absolute top-0 left-0 bottom-0 right-0",g="absolute z-10 top-0 left-0 w-full h-full bg-card-overlay-gradient opacity-40",f="transition-transform duration-200 ease-in-out group-hover:scale-105 h-full",y="flex",_="flex flex-col items-start gap-3 rb-xs:gap-4 mt-auto",v="flex flex-col gap-1",j="text-inverted-text text-header-text-20 rb-xs:text-header-text-24 rb-sm:text-header-text-32",w="flex w-full",C=e=>{let{title:t,testId:r,isClickable:a=!1,aspectRatio:o="4:5",action:C,image:I,tagBau:N,button:$,trackId:k}=e,L="object"==typeof(I?.ratio||o)?"4:5":I?.ratio||o;return(0,s.jsx)("div",{"data-testid":r,className:m,children:(0,s.jsx)(p,{...C,...!a&&{type:void 0},className:"h-full w-full",testId:`${r}_action`,children:(0,s.jsxs)("div",{className:h,children:[(0,s.jsxs)("div",{className:(0,c.cn)(x,u.aspectRatio[L]),children:[N&&(0,s.jsx)("div",{className:y,children:(0,s.jsx)(n.v.Bau,{...N,testId:`${r}_tag-bau`})}),(0,s.jsxs)("div",{className:_,children:[(0,s.jsx)("div",{className:v,children:t&&(0,s.jsx)("p",{className:j,"data-testid":`${r}_title`,children:(0,d.nr)(t)})}),$&&(0,s.jsx)("div",{className:w,children:(0,s.jsx)(i.Q.Button,{...$,...C?.type==="button"&&{as:"span"},size:"responsiveMd",testId:`${r}_button-pill`})})]})]}),(0,s.jsxs)("div",{className:b,children:[(0,s.jsx)("div",{className:g}),(0,s.jsx)("div",{className:f,children:(0,s.jsx)(l.Q1,{...I,ratio:"1:1",testId:`${r}_media-image`,trackId:k?`${k}-image`:void 0,wrapperClassName:"h-full"})})]})]})})})};C.displayName="Card.Item";let I=e=>{let{cards:t,children:r,testId:a,wrapperClassName:i}=e;return(0,s.jsx)("section",{className:"px-section",children:(0,s.jsx)("div",{"data-testid":a,className:(0,c.cn)("rb-xs:grid-cols-2 max-w-section mx-auto grid grid-cols-1 gap-4",i),children:t?.length?t.map((e,t)=>(0,s.jsx)(C,{testId:`${a}_card-${t}`,...e},t)):r})})};I.displayName="Card.Grid";let N={Item:C,Grid:I,Quote:r(28817).n}},11500:(e,t,r)=>{r.d(t,{c:()=>x});var a=r(17942),s=r(54481),i=r(95425);r(47606);var l=r(45930),n=r(92747),d=r(63472),c=r(33717),o=r(22455);let p=e=>{let{title:t,description:r,removeSpacing:p=!1,onBackButtonClick:m,pagination:x,testId:u,wrapperClassName:h=""}=e,{t:b}=(0,o.bl)("sheet"),{width:g}=(0,s._b)(),f=g>=1024,y=x?.currentPage===1,_=!!(x&&x.currentPage===x.totalPages);return(0,a.jsxs)("div",{"data-testid":u,className:(0,i.cn)("rounded-t-3xl",h),children:[f?null:(0,a.jsx)(l._s.Handle,{"data-testid":`${u}_handle`,className:"bg-raised my-2 !h-1 !w-12 !opacity-100"}),(0,a.jsxs)("div",{className:(0,i.cn)("grid w-full grid-cols-[40px_minmax(0,1fr)_40px] items-center",p?"":"px-2 pb-2 pt-1",f&&"rb-sm:px-4 rb-sm:py-3"),children:[!x||f||y?m?(0,a.jsx)("button",{"data-testid":`${u}_back_button`,onClick:()=>m?.(),className:"flex w-full items-center",children:(0,a.jsx)(n.A,{width:24,height:24,className:"fill-primary-text m-2"})}):(0,a.jsx)("div",{}):(0,a.jsx)("button",{"data-testid":`${u}_left-icon_button`,onClick:()=>x?.handlePageChange("previous"),className:"flex w-full items-center",children:(0,a.jsx)(n.A,{width:24,height:24,className:"fill-primary-text m-2"})}),(0,a.jsxs)("div",{className:"flex w-full flex-col justify-center",children:[(0,a.jsx)(l._s.Title,{"data-testid":`${u}_title`,className:"text-primary-text text-header-text-16-sans rb-xs:text-header-text-20-sans text-center",children:t}),(r||x)&&(0,a.jsx)(l._s.Description,{"data-testid":`${u}
1_description`,className:"text-secondary-text text-caption-text-12 rb-sm:text-body-text-16 text-center",children:x&&!f?b("pagination_text",{current:x.currentPage,total:x.totalPages}):r})]}),f?(0,a.jsx)(l._s.Close,{"data-testid":`${u}_right-icon_button`,className:"flex w-full items-center","aria-label":"Close",children:(0,a.jsx)(c.A,{width:24,height:24,className:"fill-primary-text m-2"})}):x&&!_?(0,a.jsx)("button",{"data-testid":`${u}_right-icon_button`,onClick:()=>x?.handlePageChange("next"),className:"flex w-full items-center",children:(0,a.jsx)(d.A,{width:24,height:24,className:"fill-primary-text m-2"})}):(0,a.jsx)("div",{})]})]})};var m=r(98745);let x=e=>{let{open:t,onOpenChange:r,onBackButtonClick:n,title:d,description:c,children:o,height:x="hug",CtaComponent:u,TriggerComponent:h,pagination:b,removeSpacing:g=!1,testId:f,ButtonDockBackground:y="neutral",onPointerDownOutsideHandler:_,contentClassName:v="",headerClassName:j=""}=e,w=b?.currentPage||1,{width:C}=(0,s._b)(),I=C>=1024,N=e=>{if(!b)return;let{totalPages:t,onPageChange:r}=b;"next"===e&&w<t?r(w+1):"previous"===e&&w>1&&r(w-1)};return(0,a.jsxs)(l._s.Root,{open:t,onOpenChange:r,direction:I?"right":"bottom",...I?{snapPoints:[]}:{},children:[h&&(0,a.jsx)(l._s.Trigger,{"data-testid":`${f}_trigger`,asChild:!0,children:h}),(0,a.jsxs)(l._s.Portal,{children:[(0,a.jsx)(l._s.Overlay,{"data-testid":`${f}_overlay`,className:"backdrop-filter-safari fixed top-0 z-[99] h-full w-full bg-black/60 backdrop-blur-md"}),(0,a.jsx)(l._s.Content,{onPointerDownOutside:_??(e=>{let t=e?.target;t?.closest("[id*='onetrust'], .secondary-modal, .secondary-modal-overlay, [data-testid*='geo-popup'], .needsclick[class*='kl-private-reset-']")&&(e.preventDefault(),e.stopPropagation())}),"data-testid":f,className:(0,i.cn)("rb-sm:left-[unset] rb-sm:top-0 rb-sm:m-6 rb-sm:max-w-[573px] fixed bottom-0 left-0 right-0 z-[99] mt-14 w-full overflow-hidden antialiased outline-none"),children:(0,a.jsxs)("div",{className:(0,i.cn)("rb-sm:rounded-b-3xl relative ml-auto flex w-full flex-col rounded-t-3xl bg-white","rb-sm:max-h-[calc(100dvh_-_48px)] max-h-[calc(100dvh_-_56px)]","full"===x?"h-screen":"rb-sm:h-screen h-fit",v),children:[(0,a.jsx)(p,{testId:`${f}_header`,onBackButtonClick:n,title:d,description:c,removeSpacing:g,pagination:b&&{currentPage:w,totalPages:b.totalPages,handlePageChange:N},wrapperClassName:j}),(0,a.jsx)("div",{"data-testid":`${f}_content-wrapper`,id:`${f}_content-wrapper`,className:(0,i.cn)("scrollbar-overlay flex w-full flex-1 flex-col overflow-y-auto",g?"":"rb-xs:px-8 rb-sm:px-6 rb-sm:pb-8 px-4 pb-6 pt-4",!b&&!u&&"rb-sm:rounded-b-3xl"),children:o}),b&&I?(0,a.jsx)(m.y,{testId:`${f}_pagination`,currentPage:w,totalPages:b.totalPages,handlePageChange:N,wrapperClassName:"border-t border-disabled-bg rb-sm:rounded-b-3xl"}):u?(0,a.jsx)("div",{"data-testid":`${f}_cta_wrapper`,className:(0,i.cn)("rb-xs:px-8 rb-sm:px-6 rb-sm:rounded-b-3xl sticky bottom-0 flex w-full flex-col border-t border-[#D8DADF] px-4 py-3","neutral"===y?"bg-neutral-bg":"bg-white"),children:u}):null]})})]})]})}},14662:(e,t,r)=>{r.d(t,{A:()=>c});var a=r(17942),s=r(56702),i=r(52356),l=r(14928),n=r(83210),d=r(23100);let c=e=>{let{className:t,pageDocumentId:r,isOtp:c=!1}=e,{t:o}=(0,d.Bd)(),p=(0,s.Kv)(r),m=(0,s.OR)(),x=r?p:m,u=r?x?.overrides?.find(e=>e?.productRef?.documentId===r)?.discountPercentage:void 0,h=x?.extraDiscountPercentage??0,b=u??h;if(!b||!x?.discountCode?.code)return null;let g=c&&(0,i.rL)(x?.title)&&null==u?i.G7:0;return(0,a.jsx)("p",{className:(0,n.cn)("text-body-text-14 text-primary-text rb-xs:pb-3 rb-xs:pt-1 pb-2 text-center",t),children:(0,l.nr)(g>0?`[b]Extra ${g}% OFF[/b] one-time purchase only`:o("crm_promo_inline_message",{percentage:b,code:x.discountCode.code}))})}},14928:(e,t,r)=>{r.d(t,{Hb:()=>m,vF:()=>c,nr:()=>u,np:()=>x});var a=r(17942),s=r(19334),i=r(13412),l=r(49826),n=r(35438);let d=/([a-zA-Z_:][-a-zA-Z0-9_:.]*)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,c=e=>{let t,r={};if(!e)return r;for(d.lastIndex=0;null!==(t=d.exec(e));){let[,e,a,s]=t;r[e]=a??s??""}return r},o=["href","class","target","rel"],p=e=>e.rel?e.rel:"_blank"===e.target?"noopener noreferrer":void 0,m={a:{render:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=p(r);return(0,a.jsx)("a",{href:r.href,className:r.class,target:r.target,rel:s,children:e},t)},toString:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=p(t),a={...t};r&&(a.rel=r);let s=o.map(e=>void 0!==a[e]?`${e}="${a[e].replace(/&/g,"&").replace(/"/g,""")}
1"`:null).filter(Boolean).join(" ");return`<a${s?` ${s}`:""}>${e??""}</a>`}},b:{render:(e,t)=>(0,a.jsx)("strong",{children:e},t),toString:e=>`<strong>${e}</strong>`},i:{render:(e,t)=>(0,a.jsx)("em",{children:e},t),toString:e=>`<em>${e}</em>`},u:{render:(e,t)=>(0,a.jsx)("u",{children:e},t),toString:e=>`<u>${e}</u>`},sup:{render:(e,t)=>(0,a.jsx)("sup",{children:e},t),toString:e=>`<sup>${e}</sup>`},span:{render:(e,t)=>(0,a.jsx)("span",{children:e},t),toString:e=>`<span>${e}</span>`},br:{render:(e,t)=>(0,a.jsx)("br",{},t),toString:()=>"<br />",isSelfClosing:!0},"m-br":{render:(e,t)=>(0,a.jsx)("br",{className:"rb-sm:hidden"},t),toString:()=>'<br class="rb-sm:hidden" />',isSelfClosing:!0},"d-br":{render:(e,t)=>(0,a.jsx)("br",{className:"rb-sm:inline hidden"},t),toString:()=>'<br class="rb-sm:inline hidden" />',isSelfClosing:!0},normal:{render:(e,t)=>(0,a.jsx)("span",{className:"font-normal",children:e},t),toString:e=>`<span class="font-normal">${e}</span>`},wbr:{render:(e,t)=>(0,a.jsx)("wbr",{},t),toString:()=>"<wbr />",isSelfClosing:!0},highlight:{render:(e,t)=>(0,a.jsx)("span",{className:"text-positive-text italic",children:e},t),toString:e=>`<span class="text-positive-text italic">${e}</span>`},"the-vets-logo":{render:(e,t)=>(0,a.jsx)(s.Ay,{src:"https://cdn.cms.thepetlabco.com/the_vets_1_95c2d0813f.png",alt:"The Vets Logo",width:602,height:128,className:"rb-xs:h-[36px] rb-xs:mt-0 rb-sm
1:-mt-4 -mt-1.5 inline-block h-[21px] w-auto"},t),toString:()=>'<img src="https://cdn.cms.thepetlabco.com/the_vets_1_95c2d0813f.png" alt="The Vets Logo" width="602" height="128" class="rb-xs:h-[36px] rb-xs:mt-0 rb-sm:-mt-4 -mt-1.5 inline-block h-[21px] w-auto" />',isSelfClosing:!0},"show:sm":{render:(e,t)=>(0,a.jsx)("span",{className:"rb-sm:inline hidden",children:e},t),toString:e=>`<span class="rb-sm:inline hidden">${e}</span>`},"hide:sm":{render:(e,t)=>(0,a.jsx)("span",{className:"rb-sm:hidden inline",children:e},t),toString:e=>`<span class="rb-sm:hidden inline">${e}</span>`},green:{render:(e,t)=>(0,a.jsx)("span",{className:"text-positive-text",children:e},t),toString:e=>`<span class="text-positive-text">${e}</span>`},"emoji-gift":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"\uD83C\uDF81ï¸"}),toString:e=>`ðï¸`,isSelfClosing:!0},"emoji-confetti":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"\uD83C\uDF89"}),toString:e=>`ð`,isSelfClosing:!0},"emoji-heart":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"â¤ï¸"}),toString:e=>"â¤ï¸",isSelfClosing:!0},"emoji-heart-blue":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"\uD83D\uDC99"}),toString:e=>`ð`,isSelfClosing:!0},"emoji-bunny":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"\uD83D\uDC30"}),toString:e=>`ð°`,isSelfClosing:!0},"emoji-beach":{render:(e,t)=>(0,a.jsx)("span",{children:"\uD83C\uDFDDï¸"},t),toString:()=>`ðï¸`,isSelfClosing:!0},"emoji-sun":{render:(e,t)=>(0,a.jsx)("span",{children:"\uD83C\uDF1E"},t),toString:()=>`ð`,isSelfClosing:!0},"mexico-flag":{render:(e,t)=>(0,a.jsx)(s.Ay,{src:"https://cdn.cms.thepetlabco.com/Mexican_Flag_a019194d67.svg",alt:"Mexican Flag",width:18,height:18,className:"mb-[2px] inline-block"},t),toString:()=>'<img src="https://cdn.cms.thepetlabco.com/Mexican_Flag_a019194d67.svg" alt="Mexican Flag" width="18" height="18" class="inline-block mb-[2px]" />',isSelfClosing:!0},"emoji-heart-white":{render:(e,t)=>(0,a.jsx)("span",{className:"text-base text-transparent",style:{textShadow:"0 0 0 white"},children:"â¤ï¸"},t),toString:()=>`<span class="text-transparent text-base" style="text-shadow: 0 0 0 white"> 2 â¤ï¸ 3 </span>`,isSelfClosing:!0},"light-green":{render:(e,t)=>(0,a.jsx)("span",{className:"text-[#B5EEB9]",children:e},t),toString:e=>`<span class="text-[#B5EEB9]">${e}</span>`},"emoji-flower":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"\uD83C\uDF38"}),toString:()=>`ð¸`,isSelfClosing:!0},"emoji-flower-red":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"\uD83C\uDF3A"}),toString:()=>`ðº`,isSelfClosing:!0},"emoji-paw":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:"\uD83D\uDC3E"}),toString:()=>`ð¾`,isSelfClosing:!0},"emoji-usa":{render:(e,t)=>(0,a.jsxs)("picture",{children:[(0,a.jsx)("source",{srcSet:(0,n.D)("https://cdn.cms.thepetlabco.com/flag_usa_b1f1057d0f.png"),sizes:"(min-width: 1024px) 50vw, 100vw"}),(0,a.jsx)(s.Ay,{src:"https://cdn.cms.thepetlabco.com/flag_usa_b1f1057d0f.png",alt:"US Flag",width:18,height:18,className:"mb-[2px] inline-block",requestWidth:18},t)]}),toString:()=>'<img src="https://cdn.cms.thepetlabco.com/flag_usa_b1f1057d0f.png?format=auto&quality=100&width=36" alt="US Flag" width="18" height="18" class="inline-block mb-[2px]" />',isSelfClosing:!0},"ecom-toc-url":{render:(e,t)=>(0,a.jsx)(a.Fragment,{children:`${i.zj}/pages/legal/terms-conditions`}),toString:()=>`${i.zj}/pages/legal/terms-conditions`,isSelfClosing:!0},"global-customer-stat":{render:(e,t)=>(0,a.jsx)(h,{},t),toString:()=>"Join the 5.7 million owners choosing PetLabCo.\xae, worldwide",isSelfClosing:!0},"global-customer-stat-italic":{render:(e,t)=>(0,a.jsx)(h,{isItalic:!0},t),toString:()=>"Join the 5.7 <em>million</em> owners choosing PetLabCo.\xae, worldwide",isSelfClosing:!0}},x=e=>{let t;if(!e)return"";let r=Object.keys(m).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=RegExp(`\\[(${r})((?:\\s+[^\\]]*)?)\\](?:([\\s\\S]*?)\\[/\\1\\])?`,"gi"),s="",i=0;for(;null!==(t=a.exec(e));){let[r,a,l,n]=t,d=t.index,o=m[a.toLowerCase()];if(!o)continue;s+=e.slice(i,d);let p=o.isSelfClosing?null:x(n||""),u=c(l);s+=(o.toString??(()=>r))(p,u),i=d+r.length}return s+e.slice(i)},u=e=>{let t;if(!e)return[];let r=Object.keys(m).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=RegExp(`\\[(${r})((?:\\s+[^\\]]*)?)\\](?:([\\s\\S]*?)\\[/\\1\\])?`,"gi"),s=[],i=0,l=0;for(;null!==(t=a.exec(e));){let[r,a,n,d]=t,o=t.index,p=m[a.toLowerCase()];if(!p)continue;i<o&&s.push(e.slice(i,o));let x=p.isSelfClosing?null:u(d||""),h=c(n);s.push(p.render(x,l++,h)),i=o+r.length}return i<e.length&&s.push(e.slice(i)),s},h=e=>{let{isItalic:t}=e,{t:r}=(0,l.Bd)("common");return(0,a.jsx)("span",{children:u(r(t?"customer_global_stat_italic":"customer_global_stat"))})}},16249:(e,t,r)=>{r.d(t,{c:()=>C});var a=r(17942),s=r(19334),i=r(89284),l=r(68482),n=r(16026),d=r(95425);r(47606);let c="flex items-center group gap-4 px-2 relative",o={size:{default:"",md:"",lg:"",xl:"min-h-[103px]"},width:{default:"w-[324px]",full:""},interactive:"cursor-pointer hover:bg-gray-100 hover:rounded-lg",background:"bg-primary-bg rounded-lg px-4"},p="flex items-center justify-center self-center",m="text-primary-icon",x={size:{default:"h-4 w-4 min-h-4 min-w-4",md:"h-4 w-4 min-h-4 min-w-4",lg:"h-6 w-6 min-h-6 min-w-6",xl:"h-8 w-8 min-h-8 min-w-8"}},u="flex items-center justify-center self-center",h="rounded-full",b={size:{default:"h-8 w-8 min-h-8 min-w-8",md:"h-8 w-8 min-h-8 min-w-8",lg:"h-12 w-12 min-h-12 min-w-12",xl:"h-16 w-16 min-h-16 min-w-16"}},g="flex min-w-0 flex-1 flex-col gap-1",f={divider:"border-b border-gray-200",trailingContent:"pr-10 group-hover:border-transparent",padding:{xl:"py-6",default:"py-4",compact:"py-3"}},y="text-primary-text",_={size:{default:"text-header-text-16-sans",md:"text-header-text-16-sans",lg:"text-header-text-18-sans",xl:"text-header-text-24-sans",responsiveXl:"rb-sm:text-header-text-24-sans text-header-text-18-sans"}},v="text-secondary-text wysiwyg space-y-3",j={size:{default:"text-body-text-14",md:"text-body-text-14",lg:"text-body-text-14",xl:"text-body-text-16",responsiveXl:"text-body-text-14 rb-sm:text-body-text-16"}},w="absolute right-4",C=e=>{let{label:t,testId:r="list-item",wrapperClassName:C,iconClassName:I,description:N,size:$="md",height:k="default",divider:L=!1,Icon:P,imageSrc:T,leadingContent:B="none",showTrailingContent:S=!1,isResponsive:A=!1,isFullWidth:D=!1,background:F=!1,textClassOverride:O,onClick:M,href:E,target:R}=e,z=(0,d.cn)(c,o.size[$],D?o.width.full:o.width.default,(S||!!M||!!E)&&o.interactive,F&&o.background,C),H=(0,d.cn)(m,x.size[$],I),q=(0,d.cn)(h,b.size[$]),Q=(0,d.cn)(y,_.size["xl"===$&&A?"responsiveXl":$]),U=(0,d.cn)(v,j.size["xl"===$&&A?"responsiveXl":$]),V=e=>{let t=e.target;t&&t.closest("a")?e.stopPropagation():M?.()};return(0,a.jsxs)(E?"a":"div",{"data-testid":r,className:z,onClick:M?V:void 0,onKeyDown:M?e=>{let t=e.target;
3t&&t.closest("a")||("Enter"===e.key||" "===e.key)&&(e.preventDefault(),V(e))}:void 0,...E?{href:E,target:R,rel:"_blank"===R?"noopener noreferrer":void 0}:{},children:["icon"===B&&P&&(0,a.jsx)("div",{"data-testid":`${r}_icon-wrapper`,className:p,children:"string"==typeof P?(0,a.jsx)("span",{className:H,children:P}):(0,a.jsx)(P,{className:H})}),"image"===B&&T&&(0,a.jsx)("div",{"data-testid":`${r}_image-wrapper`,className:u,children:(0,a.jsx)(s.Ay,{elementID:"list-item-image",alt:"List Item Image",src:T,className:q,width:"xl"===$?64:"lg"===$?48:32,height:"xl"===$?64:"lg"===$?48:32})}),(0,a.jsxs)("div",{"data-testid":`${r}_content`,className:(0,d.cn)(g,L&&f.divider,S&&f.trailingContent,f.padding["xl"===$?"xl":"default"===k?"default":"compact"]),children:["string"==typeof t?(0,a.jsx)("p",{"data-testid":`${r}_label`,className:O||Q,...(0,l.Ay)(t)?{dangerouslySetInnerHTML:{__html:t}}:{children:(0,n.nr)(t)}}):(0,a.jsx)("p",{className:O||Q,children:t}),N&&(0,a.jsx)("p",{"data-testid":`${r}_description`,className:U,...(0,l.Ay)(N)?{dangerouslySetInnerHTML:{__html:N}}:{children:(0,n.nr)(N)}})]}),S&&(0,a.jsx)(i.A,{showInfo:!1,wrapperClassname:w})]})}},17451:(e,t,r)=>{r.d(t,{M:()=>s});var a=r(17942);let s=e=>{let{...t}=e;return(0,a.jsx)("a",{...t})}},19960:(e,t,r)=>{r.d(t,{c:()=>o});var a=r(17942),s=r(54481),i=r(19334),l=r(84252),n=r(95425),d=r(47606),c=r(77638);let o=e=>{let{testId:t,trackId:r,wrapperClassName:o,initialTitle:p,secondaryTitle:m,description:x,backgroundImage:u,moreInfoComponent:h}=e,[b,g]=(0,d.useState)(!1),f=(0,s.Ny)();return(0,a.jsxs)("div",{"data-testid":t,className:(0,n.cn)("card-hover-transition rb-sm:max-w-[427px] rb-sm:rounded-3xl group relative aspect-[4/5] h-full w-full overflow-hidden rounded-2xl",o),onClick:()=>{f&&g(!b)},onMouseEnter:()=>{f||g(!0)},onMouseLeave:()=>{f||g(!1)},tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),g(!b))},children:[u&&(0,a.jsx)(i.Ay,{src:u,alt:p||"",fill:!0,sizes:"(max-width: 768px) 75vw, 437px",className:"object-cover object-center",priority:!1}),(0,a.jsx)("div",{className:(0,n.cn)("backdrop-filter-safari backdrop-blur-safari rb-sm:rounded-3xl absolute inset-0 rounded-2xl bg-black/60 backdrop-blur-[12px] transition-opacity duration-300 ease-in-out",{"opacity-100":b,"opacity-0":!b})}),(0,a.jsx)("div",{role:"dialog","aria-labelledby":`card-ingredient-title-${t}`,className:(0,n.cn)("absolute inset-0 z-10 transition-opacity duration-300 ease-in-out",{"opacity-100":b,"opacity-0":!b}),children:(0,a.jsxs)("div",{className:"rb-sm:p-6 relative h-full p-4 text-white",children:[(0,a.jsx)("h3",{id:`card-ingredient-title-${t}`,className:"rb-sm:text-header-text-24 text-header-text-20",children:m}),x?(0,a.jsx)("div",{className:(0,n.cn)("rb-sm:text-body-text-16 text-body-text-14 wysiwyg mt-2 space-y-4",b?"cursor-auto":"cursor-default"),dangerouslySetInnerHTML:{__html:x},"data-trackid":r}):null,h?(0,a.jsx)("div",{className:"rb-sm:text-body-text-16 text-body-text-14","data-trackid":r?`${r.replace("ingredients-tab-2","")}sodium-hexametaphosphate-details`:void 0,children:h}):null]})}),(0,a.jsx)("div",{className:(0,n.cn)("rb-sm:p-6 relative z-10 p-4 text-black transition-opacity duration-300 ease-in-out",{"opacity-0":b,"opacity-100":!b}),children:(0,a.jsx)("h3",{className:"rb-sm:text-header-text-24 text-header-text-20",children:p})}),(0,a.jsx)(c.a2.Button,{icon:l.t.plus,size:"md",testId:"primary_button_icon",trackId:`${t}-expand-button`,theme:b?"inverted":"default",variant:"primary",wrapperClassName:(0,n.cn)("absolute bottom-4 right-4 z-20 rb-sm:hidden"),ariaLabel:b?"Collapse content":"Expand content","aria-expanded":b,iconClassName:(0,n.cn)("transform transition-transform ease-in-out",b?"rotate-45 duration-[200ms]":"duration-[400ms]")})]})}},20064:(e,t,r)=>{r.d(t,{c8:()=>z,Rj:()=>f,jL:()=>R});var a=r(17942),s=r(95425),i=r(47606),l=r(68482),n=r(45698);let d=e=>{let{testId:t,children:r}=e;if(!r)return null;let s=(0,l.Ay)(r);return(0,a.jsx)("div",{"data-testid":t,className:"text-secondary-text text-body-text-16",children:s?(0,a.jsx)("div",{className:"",dangerouslySetInnerHTML:{__html:(0,n.n)(s)}}):r&&(0,a.jsx)("p",{children:r})})};d.displayName="ProductIntroBlock.Description";var c=r(16026);let o=e=>{let{testId:t,children:r,as:s="h1"}=e;return r?(0,a.jsx)(s,{"data-testid":t,className:"text-primary-text text-header-text-24 rb-sm:text-header-text-32",children:(0,c.nr)(r)}):null};o.displayName="ProductIntroBlock.Heading";var p=r(35138);let m=e=>{let{testId:t,children:r}=e;return r?(0,a.jsx)(p.JU.Stack,{testId:t,children:r}):null};m.displayName="ProductIntroBlock.LabelStack";var x=r(23841),u=r(22455);let h=e=>{let{testId:t,children:r,showAction:s=!0,action:i,trackId:l}=e,{t:n}=(0,u.bl)("product_intro");return r?(0,a.jsxs)("div",{"data-testid":t,className:"rb-sm:flex-row rb-sm
3:items-center flex flex-col flex-wrap justify-start gap-x-4 gap-y-1",children:[r,s&&(0,a.jsxs)("button",{className:"text-body-text-14 text-secondary-text flex items-center gap-2",onClick:i,"data-testid":`${t}_button`,"data-trackid":l?.replace("reviews","read-reviews-link"),children:[(0,a.jsx)("span",{children:n("read_reviews")}),(0,a.jsx)(x.A,{width:16,height:16})]})]}):null};h.displayName="ProductIntroBlock.Reviews";let b=e=>{let{testId:t,children:r}=e;return!r||Array.isArray(r)&&0===r.length?null:(0,a.jsx)("div",{"data-testid":t,className:"flex flex-wrap gap-2 sm:flex-row",children:r})};b.displayName="ProductIntroBlock.Tag";let g=e=>{let t,r,l,n,{testId:c,wrapperClassName:p,children:x}=e,{tag:u,heading:g,review:f,description:y,labelStack:_}=((e=>{if(e.length<4||e.length>5)throw Error("ProductIntroBlock must have four or five children: Tag, Heading, Reviews, Description and optional LabelStack");let[t,r,a,s,i]=e,l=5===e.length;if(t.type!==b||r.type!==o||a.type!==h||s.type!==d||l&&i.type!==m)throw Error("ProductIntroBlock children must be in order: Tag, Heading, Reviews, Description, and optional LabelStack.")})(t=i.Children.toArray(x)),r=t.find(e=>e.type===b),l=t.find(e=>e.type===o),n=t.find(e=>e.type===h),{tag:r,heading:l,review:n,description:t.find(e=>e.type===d),labelStack:t.find(e=>e.type===m)});return(0,a.jsxs)("div",{"data-testid":c,className:(0,s.cn)("rb-sm:border-b rb-sm:border-[#D8DADF] rb-sm:pb-6 flex flex-col gap-4",p),children:[u,g,f,y,_]})};g.displayName="ProductIntroBlock.Container";let f={Container:g,Tag:b,Heading:o,Reviews:h,Description:d,LabelStack:m};var y=r(84252),_=r(15804);let v=e=>{let{testId:t,wrapperClassName:r,Icon:i,iconMap:l=y.t,...n}=e;if(!n.label||"string"==typeof n.label&&!n.label.trim())return null;let d="string"==typeof i?l[i]:i;return(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)("flex",r),children:(0,a.jsx)(_.v.Bau,{testId:`${t}_tag`,...n,Icon:d})})};v.displayName="ProductIntroQuiz.Tag";let j=e=>{let{testId:t,children:r,as:s="h2"}=e;return r?(0,a.jsx)(s,{"data-testid":t,className:"text-body-text-18-semibold text-primary-text break-words",children:(0,c.nr)(r)}):null};j.displayName="ProductIntroQuiz.Heading";let w=e=>{let{testId:t,children:r}=e;return r?(0,a.jsx)("p",{"data-testid":t,className:"text-body-text-14 text-secondary-text break-words",children:r}):null};w.displayName="ProductIntroQuiz.Description";var C=r(81268);let I={size:"sm",assetType:"icon",orientation:"landscape",isResponsive:!0,Icon:e=>{let{className:t,...r}=e;return(0,a.jsx)(y.t.check,{...r,className:(0,s.cn)("text-positive-icon",t)})}},N=e=>{let{testId:t,...r}=e;return(0,a.jsx)(C.J,{testId:t,...I,...r})};N.displayName="ProductIntroQuiz.LabelItem";let $=e=>{let{testId:t,children:r,labels:l,wrapperClassName:n}=e,d=!!r,c=!!l&&l.length>0;if(!d&&!c)return null;let o=d?i.Children.toArray(r).filter(e=>(0,i.isValidElement)(e)&&(e.type===C.J||e.type===N)):l.map((e,r)=>(0,a.jsx)(C.J,{testId:`${t}_item_${r}`,...I,...e},r));return 0===o.length?null:(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)("flex flex-col gap-2",n),children:o.map((e,t)=>(0,a.jsx)("div",{children:e},t))})};$.displayName="ProductIntroQuiz.LabelStack";var k=r(63158);let L=e=>{let{testId:t,wrapperClassName:r,...i}=e;return(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)("flex",r),children:(0,a.jsx)(k.z,{testId:`${t}_pricing`,...i})})};L.displayName="ProductIntroQuiz.Pricing";var P=r(22624);let T=e=>{let{testId:t,wrapperClassName:r,type:i=P.PK.BENEFIT,label:l="FREE gift for subscribers",Icon:n=y.t.gift,...d}=e;return l&&("string"!=typeof l||l.trim())?(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)("flex",r),children:(0,a.jsx)(_.v.Bau,{testId:`${t}_tag`,...d,type:i,label:l,Icon:n})}):null};T.displayName="ProductIntroQuiz.FreeGiftTag";var B=r(77638);let S=e=>{let{testId:t,wrapperClassName:r,...i}=e;return(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)("flex w-full",r),children:(0,a.jsx)(B.Q.Button,{testId:`${t}_button`,...i})})};S.displayName="ProductIntroQuiz.Button";var A=r(81992);let D=e=>{let{testId:t,wrapperClassName:r,...i}=e;return(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)("flex justify-center",r),children:(0,a.jsx)(A.Y.Link,{testId:`${t}_link`,...i})})};D.displayName="ProductIntroQuiz.TextLink";let F=[{type:v,name:"Tag",optional:!1},{type:j,name:"Heading",optional:!1},{type:w,name:"Description",optional:!1},{type:$,name:"LabelStack",optional:!0},{type:L,name:"Pricing",optional:!1},{type:T,name:"FreeGiftTag",optional:!0},{type:S,name:"Button",optional:!1},{type:D,name:"TextLink",optional:!0}],O=F.filter(e=>!e.optional).length,M=e=>{let t,r,l,n,d,c,o,{testId:p,wrapperClassName:m,children:x}=e,{tag:u,heading:h,description:b,labelStack:g,pricing:f,freeGiftTag:y,button:_,textLink:C}=((e=>{let t=e.filter(e=>F.some(t=>!t.optional&&t.type===e.type)).length;if(t<O)throw Error(`ProductIntroQuiz must have five required children: Tag, Heading, Description, Pricing, and Button. Received ${t} required children.`);if(e.length>F.length)throw Error(`ProductIntroQuiz must have at most ${F.length} children. Received ${e.length}.`);let r=0;for(let t of e){for(;r<F.length&&F[r].type!==t.type;){if(!F[r].optional){let e=F[r].name,a=F.find(e=>e.type===t.type)?.name??"Unknown";throw Error(`ProductIntroQuiz children must be in order: Tag, Heading, Description, LabelStack (optional), Pricing, FreeGiftTag (optional), Button, TextLink (optional). Expected "${e}" but received "${a}".`)}r++}if(r>=F.length){let e=F.find(e=>e.type===t.type)?.name??"Unknown";throw Error(`ProductIntroQuiz received an unexpected or duplicate child: "${e}". Max ${F.length} children allowed.`)}r++}})(t=i.Children.toArray(x)),r=t.find(e=>e.type===v),l=t.find(e=>e.type===j),n=t.find(e=>e.type===w),d=t.find(e=>e.type===$),c=t.find(e=>e.type===L),o=t.find(e=>e.type===T),{tag:r,heading:l,description:n,labelStack:d,pricing:c,freeGiftTag:o,button:t.find(e=>e.type===S),textLink:t.find(e=>e.type===D)});return(0,a.jsxs)("div",{"data-testid":p,className:(0,s.cn)("flex flex-col gap-4",m),children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[u,h,b]}),g,(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,y]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[_,C]})]})};M.displayName="ProductIntroQuiz.Container";var E=r(19334);let R=e=>{let{wrapperClassName:t,testId:r,productName:s,productDescription:i,productImageSrc:l,productImageAlt:n="Product image"}=e;return(0,a.jsx)("div",{"data-testid":r,className:t,children:(0,a.jsxs)("div",{className:"bg-neutral-bg flex max-h-[138px] w-full gap-3 p-4",children:[(0,a.jsx)("div",{className:"relative h-[72px] w-[72px] flex-shrink-0",children:(0,a.jsx)(E.Ay,{src:l,alt:n,fill:!0,sizes:"72px",style:{objectFit:"contain",objectPosition:"center"}})}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 overflow-hidden",children:[(0,a.jsx)("h3",{className:"text-body-text-16-semibold text-primary-text line-clamp-2 overflow-hidden hyphens-auto break-words","data-testid":r?`${r}_title`:void 0,children:s}),(0,a.jsx)("p",{className:"text-body-text-14 text-secondary-text line-clamp-4 overflow-hidden","data-testid":r?`${r}_description`:void 0,children:i})]})]})})},z={Pdp:f,Small:R,Quiz:{Container:M,Tag:v,Heading:j,Description:w,LabelStack:$,LabelItem:N,Pricing:L,FreeGiftTag:T,Button:S,TextLink:D}}},21887:(e,t,r)=>{r.d(t,{W:()=>c});var a=r(85868),s=r(84252),i=r(84883),l=r(2440),n=r(48432),d=r.n(n);let c=e=>{let t=e.tagBau?Array.isArray(e.tagBau)?e.tagBau.map(e=>
3(0,l.H)(e)).filter(Boolean):[(0,l.H)(e.tagBau)]:void 0,r=e.tagStat?.map(e=>({title:e.title??"",description:e.description??""})),n=(0,i.e)(e.image,"(min-width: 1024px) 316px, (min-width: 768px) 470px, 90vw"),c=e.button?(0,a.C)(e.button,!e.isClickable):void 0,o=e.action?(e=>{if("link"===e.type)return{type:"link",href:e.href||void 0,ariaLabel:e.ariaLabel||void 0,className:"text-left",as:d()}})(e.action):void 0;if(!n)throw Error("Image is required");return{title:e.title??"",subtitle:e.subtitle??void 0,description:e.description??void 0,orientation:e.orientation??void 0,isClickable:(e.isClickable&&void 0!==e.action)??void 0,tagBauList:t&&t.length>0?t:void 0,tagStat:r??void 0,image:n,button:c,action:o,alignment:e.tileAlignment??"left",Icon:e.tileIcon?s.t[e.tileIcon.name??""]:void 0}}},25264:(e,t,r)=>{r.d(t,{Ay:()=>a});let a=e=>e?/<\/?[a-z][\s\S]*?>/i.test(e)?e:null:null},27606:(e,t,r)=>{r.d(t,{V:()=>m});var a=r(17942),s=r(65659),i=r(12331),l=r(8716),n=r(19334),d=r(35438),c=r(83210);let o=[{src:"https://cdn.cms.thepetlabco.com/slide_1_aacc6a5f9a.jpg",alt:"Slide 1"},{src:"https://cdn.cms.thepetlabco.com/slide_2_8f68f7d891.jpg",alt:"Slide 2"},{src:"https://cdn.cms.thepetlabco.com/slide_3_fcdf3abf52.jpg",alt:"Slide 3"},{src:"https://cdn.cms.thepetlabco.com/slide_4_5e78821403.jpg",alt:"Slide 4"},{src:"https://cdn.cms.thepetlabco.com/slide_5_aaff16ffa7.jpg",alt:"Slide 5"}],p=e=>{let{testId:t}=e,{emblaApi:r}=(0,l.gU)(),{autoplayIsPlaying:n,toggleAutoplay:d}=(0,l.bN)(r),o=n?s.A:i.A,p=n?"Pause autoplay":"Play autoplay";return(0,a.jsx)("button",{"data-testid":t,"data-element-id":t,type:"button",onClick:d,className:(0,c.cn)("text-primary-text flex h-4 w-4 items-center justify-center"),"aria-label":p,"aria-pressed":n,title:p,children:(0,a.jsx)(o,{className:"h-4 w-4"})})},m=e=>{let{testId:t}=e;return(0,a.jsxs)(l.FN,{direction:"horizontal",options:{loop:!0},plugins:[(0,l.L6)({delay:5e3})],testId:`${t}_bump-offer-carousel`,children:[(0,a.jsx)(l.FN.Content,{children:o.map((e,r)=>(0,a.jsx)(l.FN.Slide,{testId:`${t}_bump-offer-carousel_slide-${r+1}`,children:(0,a.jsx)("div",{className:"relative aspect-[8/5] w-full",children:(0,a.jsxs)("picture",{children:[(0,a.jsx)("source",{media:"(max-width: 1024px)",srcSet:(0,d.D)(e.src,[640,828,1080,1200,1280,1440])}),(0,a.jsx)(n.Ay,{testId:`${t}_bump-offer-carousel_slide-${r+1}_image`,elementID:`${t}_bump-offer-carousel_slide-${r+1}_image`,src:e.src,alt:e.alt,className:"h-full w-full object-cover",fill:!0,sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"})]})})},r))}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,a.jsx)("div",{className:"invisible flex h-4 w-4"}),(0,a.jsx)("div",{className:"flex items-center justify-center gap-3",children:(0,a.jsx)(l.FN.Dots,{dotClassName:"h-2 w-2 bg-[#B5B9C4] rounded-full",activeDotClassName:"bg-bold-bg"})}),(0,a.jsx)(p,{testId:`${t}_bump-offer-carousel_autoplay`})]})]})}},27668:(e,t,r)=>{r.d(t,{o:()=>n});var a=r(17942),s=r(47606),i=r(84841),l=r(67570);let n=e=>{let{testId:t,children:r,isCarousel:n=!1,trackId:d}=e;if(n){let e=s.Children.map(r,e=>e&&e&&(0,s.isValidElement)(e)&&e.type===l.A?e:null)?.filter(Boolean);return e&&0!==e.length?(0,a.jsx)(i.O,{testId:`${t}_carousel`,trackId:d||`${t}_carousel`,textBlock:{},hasControls:!0,slideClassName:"rb-sm:basis-[calc(50%_-_8px)]",children:e.map(e=>e)}):null}return(0,a.jsx)("section",{"data-testid":t,className:"px-section over",children:(0,a.jsx)("div",{className:"max-w-section rb-sm:grid-cols-2 mx-auto grid grid-cols-1 gap-4",children:r})})};n.displayName="BannerCard.Group"},28779:(e,t,r)=>{r.d(t,{Z:()=>p});var a=r(17942),s=r(95425),i=r(22455);let l="flex items-center gap-2",n="text-secondary-text text-body-text-14",d="flex items-center gap-1",c="text-body-text-14 line-through text-secondary-text",o="text-positive-text text-body-text-18-semibold",p=e=>{let{price:t,salePrice:r,isVolumePrice:p,testId:m,wrapperClassName:x}=e,{t:u}=(0,i.bl)();return(0,a.jsxs)("div",{className:(0,s.cn)(l,x),"data-testid":m,children:[(p||r)&&(0,a.jsx)("p",{className:(0,s.cn)(n),children:u("from")}),(0,a.jsxs)("div",{className:(0,s.cn)(d),children:[r&&(0,a.jsx)("span",{className:(0,s.cn)(o),children:r}),(0,a.jsx)("span",{className:(0,s.cn)(r?c:"text-body-text-14-semibold text-primary-text"),children:t})]})]})}},28817:(e,t,r)=>{r.d(t,{n:()=>h});var a=r(17942),s=r(35138),i=r(68482),l=r(2837),n=r(95425);let d="rb-xs:p-6 flex flex-grow max-w-[870px] flex-col gap-4 roun
3ded-2xl p-4 bg-neutral-secondary-bg",c={"allergy & itch":"bg-allergy-itch-bg",mobility:"bg-mobility-bg",probiotics:"bg-probiotics-bg",dental:"bg-dental-bg","treats & chews":"bg-treats-bg",neutral:"bg-transparent","dental darker":"bg-dental-darker","probiotics darker":"bg-probiotics-darker","allergy & itch darker":"bg-allergy-itch-darker","mobility darker":"bg-mobility-darker","treats & chews darker":"bg-treats-darker"},o="text-body-text-14-semibold text-secondary-text",p={"allergy & itch":"text-allergy-itch-text",mobility:"text-mobility-text",probiotics:"text-probiotics-text",dental:"text-dental-text","treats & chews":"text-treats-text",neutral:"text-primary-text","dental darker":"text-dental-text","probiotics darker":"text-probiotics-text","allergy & itch darker":"text-allergy-itch-text","mobility darker":"text-mobility-text","treats & chews darker":"text-treats-text"},m={"allergy & itch":"bg-[#FFE9B0]",mobility:"bg-[#CEE0F5]",probiotics:"bg-[#E4CEEB]",dental:"bg-[#CDEDD3]","treats & chews":"bg-[#F5DCDE]",neutral:"bg-[#F5F8FF]","dental darker":"bg-dental-darker","probiotics darker":"bg-probiotics-darker","allergy & itch darker":"bg-allergy-itch-darker","mobility darker":"bg-mobility-darker","treats & chews darker":"bg-treats-darker"},x="text-primary-text rb-xs:text-header-text-20-sans text-header-text-18-sans",u=(e,t)=>e&&t[e]?t[e]:"",h=e=>{let{author:t,children:r,label:h,type:b,testId:g,wrapperClassName:f,quoteClassOverride:y,requestWidth:_}=e,v="string"==typeof r&&(0,i.Ay)(r);return(0,a.jsxs)("div",{"data-testid":g,className:(0,n.cn)(d,u(b,c),f),children:[(0,a.jsxs)("div",{className:(0,n.cn)("flex flex-col gap-2"),children:[h&&(0,a.jsx)("p",{className:(0,n.cn)(o,u(b,p)),children:h}),v?(0,a.jsx)("blockquote",{className:(0,n.cn)(x,y),dangerouslySetInnerHTML:{__html:(0,l.K)(v)}}):r&&(0,a.jsx)("blockquote",{className:(0,n.cn)(x,y),children:(0,a.jsx)("p",{children:r})})]}),(0,a.jsx)(s.JU.Item,{assetType:"image",imageSrc:t.image,imageBackgroundColor:(0,n.cn)("bg-[#E0EBFF]",u(b,m)),size:"md",label:t.name,description:t.title,testId:`${g}-label`,requestWidth:_})]})};h.displayName="Card.Quote"},29358:(e,t,r)=>{r.d(t,{Ex:()=>s,Sc:()=>l,UC:()=>d,B_:()=>p,Y_:()=>m,_V:()=>b,gm:()=>f,Q1:()=>v,n$:()=>j,fI:()=>w,vw:()=>I});var a=r(17942);let s=e=>{let{value:t,testId:r}=e;return(0,a.jsx)("div",{"data-testid":r,className:"absolute -right-[6px] -top-[6px] flex h-4 w-4 items-center justify-center rounded-full border border-white bg-[#002B7A]",children:(0,a.jsx)("span",{className:"text-caption-text-12-semibold text-inverted-text",children:t})})};s.displayName="LineItem.Badge";var i=r(41740);let l=e=>(0,a.jsx)(i.S,{theme:"green",...e});l.displayName="LineItem.Checkbox";var n=r(95425);let d=e=>{let{isColumn:t,children:r,testId:s,className:i}=e;return(0,a.jsx)("div",{"data-testid":s,className:(0,n.cn)("flex flex-grow [align-items:safe_center]",i),children:(0,a.jsx)("div",{className:(0,n.cn)("flex flex-grow flex-col items-start gap-2",t&&"flex-row"),children:r})})};d.displayName="LineItem.Content";var c=r(16026),o=r(47606);let p=e=>{let{testId:t,title:r,description:s,type:i,theme:l}=e,d="inline"===i&&"inverted"===l;return(0,a.jsxs)("div",{"data-testid":t,className:"flex flex-grow flex-col gap-1",children:[(0,a.jsx)("p",{className:(0,n.cn)("text-primary-text text-header-text-16-sans",d&&"text-white"),children:(0,c.nr)(r)}),s&&(o.isValidElement(s)?(0,a.jsx)("div",{className:(0,n.cn)("text-primary-text text-body-text-14",d&&"text-white"),children:s}):(0,a.jsx)("p",{className:(0,n.cn)("text-primary-text text-body-text-14",d&&"text-white"),children:(0,c.nr)(s)}))]})};p.displayName="LineItem.Details";let m=e=>{let{children:t,testId:r}=e;return(0,a.jsx)("div",{"data-testid":r,className:"flex w-full flex-grow gap-x-3",children:t})};m.displayName="LineItem.DetailsFooter";var x=r(50309);let u="relative",h={base:"h-14 w-14 min-w-[56px]",lg:"h-24 w-24 min-w-[96px]"},b=e=>{let{children:t,isLarge:r,background:s,testId:i,trackId:l,...d}=e;return(0,a.jsxs)("div",{className:(0,n.cn)(u,h.base,r&&h.lg),children:[(0,a.jsx)(x.Q1,{testId:i,trackId:l,sizes:r?"96px":"56px",wrapperClassName:(0,n.cn)("rounded-lg",s
3),...d}),t]})};b.displayName="LineItem.Image";var g=r(63158);let f=e=>{let{lineItemType:t,theme:r="default",wrapperClassName:s,...i}=e;return(0,a.jsx)(g.A,{...i,wrapperClassName:(0,n.cn)(s,"inline"===t&&"inverted"===r&&"[&>div>p[data-testid$='-rrp']]:text-white [&>div>p[data-testid$='-discounted-price']]:text-white")})};f.displayName="LineItem.Price";var y=r(43550),_=r(22455);let v=e=>{let{type:t,theme:r="default"}=e,{t:s}=(0,_.bl)("common");return(0,a.jsx)(y.y,{maxQuantityReachedText:s("maxQuantityReachedText"),wrapperClassName:(0,n.cn)("flex","inline"===t&&"inverted"===r&&"bg-white rounded-md text-primary-text [&>div>div>button>svg]:text-primary-text"),...e})};v.displayName="LineItem.Quantity";let j=e=>{let{testId:t,label:r="Remove",type:s,theme:i="default",...l}=e;return(0,a.jsx)("button",{"data-testid":t,className:(0,n.cn)("text-primary-text text-link-text-14 text-right font-normal","inline"===s&&"inverted"===i&&"text-white"),...l,children:r})};j.displayName="LineItem.Remove";let w=e=>{let{children:t,testId:r,className:s}=e;return(0,a.jsx)("div",{"data-testid":r,className:s,children:t})};w.displayName="LineItem.Row";var C=r(15804);let I=e=>{let{testId:t,...r}=e;return(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsx)(C.v.Bau,{testId:`${t}-tag-bau`,...r})})};I.displayName="LineItem.Tag"},29816:(e,t,r)=>{r.d(t,{c:()=>s});var a=r(84252);let s=e=>({size:e.size,height:e.height,label:e.label??"",description:e.description??void 0,divider:e.hasdivider??void 0,Icon:e.icon?.name?a.t[e?.icon?.name]:void 0,imageSrc:e.image?.url??void 0,leadingContent:e.assetType??void 0,isResponsive:e.isResponsive??void 0,showTrailingContent:e.showTrailingContent??!1,iconClassName:e.iconClassName??void 0,wrapperClassName:e.wrapperClassName??void 0,isFullWidth:e.isFullWidth??!1,background:e.background??!1,textClassOverride:e.textClassOverride??void 0,target:e.target??void 0})},33160:(e,t,r)=>{r.d(t,{D2:()=>L,U$:()=>M,cc:()=>o});var a,s=r(72208),i=r(66192),l=r(2837),n=r(71734),d=r(48432),c=r.n(d);let o=function(e,t,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.t9,d=e.products?.[0],o=(0,l.K)(e.title??d.name??"").replace(/(<([^>]+)>)/gi,"").trim(),p=e.products?.every(e=>e.isSoldOut),m=((e,t,r)=>{switch(e){case n.ij.CA:switch(r){case`/${s.Sv}`:case`/${s.Dt}`:case`/${s.Sv}`:return"fr"===t?L.CA_FR:L.CA_EN;default:return}case n.ij.US:switch(r){case`/${s.Sv}`:case`/${s.FI}`:return L.US_PRBA;case`/${s.Dt}`:case`/${s.$0}`:return L.US_PBC;default:return}case n.ij.UK:switch(r){case`/${s.TC}`:case`/${s.Dt}`:case`/${s.lJ}`:return L.CA_EN;default:return}default:return}})(a,r,e.urlPath??""),x=d?.prices.sub[0]?.perceived_rrp??d?.prices.otp[0]?.perceived_rrp,u=d?.prices.sub[0]?.discounted_price??d?.prices.otp[0]?.discounted_price;return{testId:`tile-product_${(0,i.k)(o)}`,title:o,description:e.shortDescription??void 0,action:{href:`/${s.G8}${e.urlPath}`,type:"link",as:c()},button:{children:void 0,size:"md",variant:"primary"},image:{src:d?.categoryImage?.url??d?.image?.url??"",alt:(0,l.K)(e.title??d.name??""),sizes:"(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"},price:{isVolumePrice:!0,price:t(x),salePrice:t(u)},rating:e.okendoStarRating??void 0,hasFreeGift:!!e.subFreeGiftOffer,isOOS:p,scientificBadge:m}};var p=r(17942),m=r(77638),x=r(50309),u=r(15804),h=r(22624),b=r(47606),g=r(57722),f=r(36087),y=r(26348),_=r(93537),v=r(94673),j=r(19334),w=r(17784),C=r(22455),I=r(95425),N=r(41109),$=r(28779);let k=e=>({bestSeller:{label:e("best_seller"),type:h.PK.INVERTED,Icon:y.A},outOfStock:{label:e("out_of_stock"),type:h.PK.DEFAULT,Icon:g.A,styles:{icon:"text-danger-text"}},twoPackSizes:{label:e("two_pack_sizes"),type:h.PK.DEFAULT,Icon:v.A},clinicallyStudied:{label:e("clinically_studied"),type:h.PK.DEFAULT,Icon:_.A}});Object.keys(k(()=>""));var L=((a={}).US_PRBA="US_PRBA",a.US_PBC="US_PBC",a.CA_EN="CA_EN",a.CA_FR="CA_FR",a);let P="w-full flex flex-col rb-sm:max-w-[427px] flex-1 h-full",T="cursor-not-allowed",B="relative rounded-t-lg rb-sm:rounded-t-2xl overflow-hidden",S="absolute left-0 top-0 h-full w-full bg-[#f5f6f1]",A="pointer-events-none rb-sm:p-4 relative z-10 flex h-full flex-col justify-between p-2 aspect-[79/87]",D="flex flex-col items-start rb-sm:pt-3 gap-2 rb-sm:px-4 rb-sm:pb-4 px-2 pt-2 pb-3 rounded-b-lg rb-sm:rounded-b-2xl flex-1 -mt-px",F="flex-col flex w-full gap-1",O="text-secondary-text text-body-text-14",M=e=>{let{title:t,description:r,hasFreeGift:a,freeGiftText:s="FREE Gift for subscribers",isOOS:i=!1,action:l,price:n,image:d,rating:c,tagBau:o,button:g,testId:y,petTypeLabel:_,scientificBadge:v,hideBorder:L=!1,trackId:M,wrapperClassName:E}=e,{t:R}=(0,C.bl)("tile.product"),z=k(R),H={...l,...i&&{type:void 0}},q=o?Array.isArray(o)?o:[o]:[],Q=(()=>
3{if(i){let{variant:e,...t}=q[0]??{};return[{...e?z[e]:{type:h.PK.INVERTED,label:""},...z.outOfStock,...t,type:h.PK.DEFAULT}]}return q.map(e=>{let{variant:t,...r}=e;return{...t?z[t]:{type:h.PK.INVERTED,label:""},...r}})})(),U=(0,b.useMemo)(()=>i&&g?{...g,disabled:!0}:g,[g,i]),V=(()=>{if(!v)return null;switch(v){case"CA_FR":return{large:"https://cdn.cms.thepetlabco.com/language_CA_FR_131a4e8ca1.svg",small:"https://cdn.cms.thepetlabco.com/language_CA_FR_a0a63664a3.svg"};case"CA_EN":return{large:"https://cdn.cms.thepetlabco.com/badge_scientifically_Studied_desk_0e0f36ca15.svg",small:"https://cdn.cms.thepetlabco.com/badge_scientifically_Studied_6c6d7f277e.svg"};case"US_PRBA":return{large:"https://cdn.cms.thepetlabco.com/product_PRBA_size_lg_1f65f5b1b8.svg",small:"https://cdn.cms.thepetlabco.com/product_PRBA_size_sm_6b8f2b3eea.svg"};case"US_PBC":return{large:"https://cdn.cms.thepetlabco.com/product_PBC_size_lg_907f1c34ea.svg",small:"https://cdn.cms.thepetlabco.com/product_PBC_size_sm_fd82212275.svg"};default:return null}})();return(0,p.jsx)("div",{"data-testid":y,className:(0,I.cn)(P,i&&T,E),children:(0,p.jsxs)(N.p,{className:"flex flex-grow flex-col",...H,testId:`${y}_action`,children:[(0,p.jsxs)("div",{className:(0,I.cn)(B),children:[(0,p.jsx)("div",{className:(0,I.cn)(A),children:(0,p.jsx)("div",{className:"flex flex-wrap items-start gap-2",children:Q.map((e,t)=>e.type?(0,p.jsx)(u.v.Bau,{...e,testId:0===t?`${y}_tag-bau`:`${y}_tag-bau-${t}`},`${y}_tag-bau-${t}`):null)})}),V&&!i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(j.Ay,{src:V.small,width:130,height:43,alt:"Scientifically Tested Badge Mobile",className:"rb-sm:hidden absolute bottom-2 left-1/2 z-[2] block w-[112px] -translate-x-1/2"}),(0,p.jsx)(j.Ay,{src:V.large,width:137,height:42,alt:"Scientifically Tested Badge Desktop",className:"rb-sm:block absolute bottom-2 left-1/2 z-[2] hidden h-[42px] w-auto -translate-x-1/2"}),(0,p.jsx)(j.Ay,{src:V.large,width:137,height:42,alt:"Scientifically Tested Badge Desktop",className:"rb-sm:block absolute bottom-2 left-1/2 z-[2] hidden h-[42px] w-auto -translate-x-1/2"})]}),(0,p.jsx)("div",{className:(0,I.cn)(S),children:(0,p.jsx)(x.Q1,{ratio:"1:1.1",wrapperClassName:(0,I.cn)(i&&"opacity-70"),...d,testId:`${y}_media-image`,trackId:M?`${M}-image`:void 0})})]}),(0,p.jsxs)("div",{className:(0,I.cn)(D,!L&&"border-neutral-bg border"),children:[(0,p.jsxs)("div",{className:(0,I.cn)(F),children:[_&&(0,p.jsx)("p",{className:"text-caption-text-12-semibold text-secondary-text uppercase",children:_}),(0,p.jsx)("p",{className:"text-primary-text text-body-text-18-semibold rb-sm:text-header-text-20-sans","data-testid":`${y}_title`,dangerouslySetInnerHTML:{__html:t}})]}),c&&(0,p.jsx)(w.G,{testId:`${y}_star_rating`,rating:c}),r&&(0,p.jsx)("div",{className:(0,I.cn)(O,"line-clamp-2"),"data-testid":`${y}_description`,children:(0,p.jsx)("p",{children:r})}),(0,p.jsxs)("div",{className:"mt-auto flex w-full flex-col items-start gap-2",children:[a&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(u.v.Bau,{label:s,type:h.PK.BENEFIT,Icon:f.A,testId:`${y}_free-gift-tag-bau`,hideIcon:!1,wrapperClassName:"rb-sm:flex hidden"}),(0,p.jsx)(u.v.Bau,{label:s,type:h.PK.BENEFIT,Icon:f.A,testId:`${y}_free-gift-tag-bau`,hideIcon:!0,wrapperClassName:"rb-sm:hidden flex"})]}),(0,p.jsx)($.Z,{...n,testId:`${y}_price`}),U&&(0,p.jsx)("div",{className:"flex w-full pt-1",children:(0,p.jsx)(m.Q.Button,{as:"span",...U,width:"fill",size:"responsiveMd",testId:`${y}_button-pill`})})]})]})]})})};M.displayName="Tile.Product"},33824:(e,t,r)=>{r.d(t,{V:()=>a.V});var a=r(27606)},35438:(e,t,r)=>{r.d(t,{D:()=>a});let a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[640,828,1080,1200,1280,1440,1920,2048,2560,3840];return t.map(t=>`${e}?format=auto&width=${t} ${t}w`).join(", ")}},39599:(e,t,r)=>{r.d(t,{A:()=>l});var a,s=r(47606);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let l=e=>s.createElement("svg",i({width:"1em",height:"1em",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=s.createElement("path",{d:"M4.86094 0.709473C2.1773 0.709473 -0.000732422 2.8875 -0.000732422 5.57114C-0.000732422 8.25479 2.1773 10.4328 4.86094
310.4328C7.54458 10.4328 9.72261 8.25479 9.72261 5.57114C9.72261 2.8875 7.54458 0.709473 4.86094 0.709473ZM3.54343 7.6568L1.79809 5.91146C1.60848 5.72186 1.60848 5.41557 1.79809 5.22597C1.98769 5.03636 2.29398 5.03636 2.48358 5.22597L3.88861 6.62613L7.23344 3.2813C7.42304 3.09169 7.72933 3.09169 7.91893 3.2813C8.10854 3.4709 8.10854 3.77719 7.91893 3.96679L4.22892 7.6568C4.04418 7.84641 3.73303 7.84641 3.54343 7.6568Z",fill:"#282828"})))},41109:(e,t,r)=>{r.d(t,{p:()=>l});var a=r(17942),s=r(17451),i=r(95425);r(47606);let l=e=>{let{type:t,onClick:r,href:l="#",ariaLabel:n,className:d="",testId:c="tile-action",children:o,onNavigate:p,as:m}=e;if(!t)return(0,a.jsx)(a.Fragment,{children:o});let x=m??s.M;switch(t){case"link":return(0,a.jsx)(x,{href:l,"aria-label":n,className:(0,i.cn)("flex flex-1 flex-col",d),"data-testid":c,onNavigate:p,children:o});case"button":return(0,a.jsx)("button",{onClick:r,"aria-label":n,className:(0,i.cn)("flex flex-1 flex-col text-left",d),type:"button","data-testid":c,children:o});default:return(0,a.jsx)(a.Fragment,{children:o})}}},43550:(e,t,r)=>{r.d(t,{l:()=>n,y:()=>x});var a=r(17942),s=r(68482),i=r(95425),l=r(47606);let n=e=>{let{selected:t,disabled:r=!1,onToggle:s,testId:d="toggle",wrapperClassName:c,children:o,hasBackground:p=!1,alignment:m="left",bgClassName:x={selected:"bg-positive",disabled:"bg-raised"}}=e,u=t?x.selected:x.disabled,h=r?"bg-raised cursor-not-allowed":`${u} cursor-pointer`,b=t?"translate-x-6":"translate-x-0",g=l.Children.toArray(o).find(e=>(0,l.isValidElement)(e)&&e.type===n.Heading)?.props.children;return(0,a.jsxs)("div",{"data-testid":d,"data-element-id":d,className:(0,i.cn)("right"===m?"justify-end":"justify-start","flex w-full flex-row gap-3",c,p&&"bg-neutral-bg rounded-2xl p-4","border-disabled-bg border bg-transparent"),children:["right"===m&&(0,a.jsx)("div",{"data-testid":`${d}_body`,"data-element-id":`${d}_body`,className:"mr-auto flex flex-col justify-center",children:o}),(0,a.jsx)("button",{"data-testid":`${d}_switch`,"data-element-id":`${d}_switch`,role:"switch","aria-checked":t,"aria-label":g||"Switch",onClick:r?void 0:s,className:(0,i.cn)("my-1 h-7 w-[52px] min-w-[52px] rounded-full p-1",h,t&&x.selected),children:(0,a.jsx)("div",{className:`h-5 w-5 transform rounded-full bg-white transition-transform duration-300 ease-in-out ${b}`})}),"left"===m&&(0,a.jsx)("div",{"data-testid":`${d}_body`,"data-element-id":`${d}_body`,className:"flex flex-col justify-center",children:o})]})},d=e=>{let{children:t}=e;return t?(0,a.jsx)("p",{className:"text-body-text-14-semibold text-primary-text",children:t}):null};d.displayName="Toggle.Heading";let c=e=>{let{children:t}=e;if(!t)return null;let r="string"==typeof t?(0,s.Ay)(t):null;return r?(0,a.jsx)("div",{className:"text-body-text-14 text-secondary-text [&_a]:text-link-default [&_a:hover]:text-link-hover [&_button]:text-link-default [&_button:hover]:text-link-hover mt-1 [&_a]:font-bold [&_a]:underline [&_button]:font-bold [&_button]:underline",dangerouslySetInnerHTML:{__html:r}}):(0,a.jsx)("p",{className:"text-body-text-14 text-secondary-text [&_a]:text-link-default [&_a:hover]:text-link-hover [&_button]:text-link-default [&_button:hover]:text-link-hover mt-1 [&_a]:font-bold [&_a]:underline [&_button]:font-bold [&_button]:underline",children:t})};c.displayName="Toggle.Description",n.Heading=d,n.Description=c;var o=r(65337),p=r(83179),m=r(62477);let x=e=>{let{testId:t,wrapperClassName:r,initialQuantity:s=1,maxQuantity:i=10,maxQuantityReachedText:n="Maximum quantity reached",onQuantityChange:d,onRemove:c}=e,[x,u]=(0,l.useState)(s),h=x>=i,b=1===x,g=b?m.A:p.A,f=o.A;return(0,l.useEffect)(()=>{u(s)},[s]),(0,a.jsx)("div",{"data-testid":t,className:r,children:(0,a.jsxs)("div",{className:"inline-flex flex-wrap items-center gap-1",children:[(0,a.jsxs)("div",{className:"inline-flex h-[2rem] w-[5rem] items-center rounded-md border border-[#D8DADF]",children:[(0,a.jsx)("button",{"data-testid":`${t}_decrease`,onClick:()=>{if(x<=1)c?.();else{let e=x-1;u(e),d?.(e)}},className:"flex h-full w-[30px] touch-manipulation items-center justify-center","aria-label":b?"Remove item":"Decrease quantity",children:(0,a.jsx)(g,{className:"text-primary-text h-6 w-6"})}),(0,a.jsx)("div",{className:"flex h-6 flex-grow items-center justify-center",children:(0,a.jsx)("span",{className:"text-body-text-16",children:x})}),(0,a.jsx)("button",{"data-testid":`${t}_increase`,onClick:()=>
3{if(x<i){let e=x+1;u(e),d?.(e)}},disabled:h,className:"flex h-full w-[30px] touch-manipulation items-center justify-center disabled:cursor-not-allowed","aria-label":"Increase quantity",children:(0,a.jsx)(f,{className:`h-6 w-6 ${h?"text-disabled-text":"text-primary-text"}`})})]}),h&&(0,a.jsx)("span",{className:"text-primary-text text-caption-text-12 whitespace-nowrap",children:n})]})})}},43687:(e,t,r)=>{r.d(t,{RV:()=>h});var a=r(17942),s=r(90819),i=r(12333),l=r(38428),n=r(36087),d=r(42229),c=r(93550),o=r(46483),p=r(73370),m=r(95425);Object.values(r(22624).PK);let x={default:null,inverted:null,dental:i.A,probiotics:o.A,allergyItch:s.A,mobility:c.A,treatChews:p.A,"dog-head":l.A,"discount-primary":null,"discount-secondary":null,"discount-temp":null,"urgency-primary":null,"urgency-secondary":null,benefit:()=>null,disabled:()=>null,wellness:d.A,"free-gift":n.A,"neutral-primary-darker":()=>null,"neutral-secondary-darker":()=>null,"dental-darker":i.A,"probiotics-darker":o.A,"allergyItch-darker":s.A,"mobility-darker":c.A,"treatChews-darker":p.A,"wellness-darker":d.A},u={default:{container:"bg-white",text:"text-primary-text",icon:"text-primary-text fill-primary-text"},inverted:{container:"bg-bold",text:"text-white",icon:"text-white fill-white"},dental:{container:"bg-dental-bg",text:"text-dental-text",icon:"text-dental-text fill-dental-text"},probiotics:{container:"bg-probiotics-bg",text:"text-probiotics-text",icon:"text-probiotics-text fill-probiotics-text"},allergyItch:{container:"bg-[#FFF7DF]",text:"text-[#A1490B]",icon:"text-[#A1490B] fill-[#A1490B]"},mobility:{container:"bg-mobility-bg",text:"text-mobility-text",icon:"text-mobility-text fill-mobility-text"},treatChews:{container:"bg-treats-bg",text:"text-treats-text",icon:"text-treats-text fill-treats-text"},"dog-head":{container:"bg-white",text:"text-primary-text",icon:"text-primary-text fill-primary-text"},"discount-primary":{container:"bg-positive",text:"text-white",icon:"text-white fill-white"},"discount-secondary":{container:"bg-[#002B7A]",text:"text-white",icon:"text-white fill-white"},"discount-temp":{container:"bg-positive",text:"text-white",icon:"text-white fill-white"},"urgency-primary":{container:"bg-[#FFD67A]",text:"text-primary-text",icon:"text-primary-text fill-primary-text"},"urgency-secondary":{container:"bg-[#BDD4FF]",text:"text-primary-text",icon:"text-primary-text fill-primary-text"},benefit:{container:"bg-[#F7FFF6]",text:"text-positive-text",icon:"text-positive-text fill-positive-text"},disabled:{container:"bg-disabled-bg",text:"text-disabled",icon:"text-disabled fill-disabled"},wellness:{container:"bg-wellness-bg",text:"text-wellness-text",icon:"text-wellness-text fill-wellness-text"},"free-gift":{container:"bg-[#F7FFF6]",text:"text-positive-text",icon:"text-positive-text fill-positive-text"},"neutral-primary-darker":{container:"bg-neutral-primary-darker",text:"text-primary-text",icon:"text-primary-text fill-primary-text"},"neutral-secondary-darker":{container:"bg-neutral-secondary-darker",text:"text-primary-text",icon:"text-primary-text fill-primary-text"},"dental-darker":{container:"bg-dental-darker",text:"text-dental-text",icon:"text-dental-text fill-dental-text"},"probiotics-darker":{container:"bg-probiotics-darker",text:"text-probiotics-text",icon:"text-probiotics-text fill-probiotics-text"},"allergyItch-darker":{container:"bg-allergy-itch-darker",text:"text-[#A1490B]",icon:"text-[#A1490B] fill-[#A1490B]"},"mobility-darker":{container:"bg-mobility-darker",text:"text-mobility-text",icon:"text-mobility-text fill-mobility-text"},"treatChews-darker":{container:"bg-treats-darker",text:"text-treats-text",icon:"text-treats-text fill-treats-text"},"wellness-darker":{container:"bg-wellness-darker",text:"text-wellness-text",icon:"text-wellness-text fill-wellness-text"}},h=e=>{let{type:t,label:r,Icon:s,hideIcon:i,testId:l,wrapperClassName:n,styles:d}=e,c=null===x[t]?s:x[t],o={...u[t],...d};return!r||"string"==typeof r&&!r.trim()||Array.isArray(r)&&!r.length?null:(0,a.jsxs)("div",{"data-testid":l,className:(0,m.cn)("mx-auto flex w-full items-center justify-center gap-1 px-2 py-1 text-center",o.container,n),children:[!i&&c?(0,a.jsx)("span",{"data-testid":`${l}_${t}_icon`,children:(0,a.jsx)(c,{className:o.icon})}):null,(0,a.jsx)("span",{"data-testid":`${l}_${t}_label`,className:(0,m.cn)("font-inter text-xs font-semibold leading-[16.8px]",o.text),...Array.isArray(r)?{children:r}:{dangerouslySetInnerHTML:{__html:r}}})]})};h.displayName="TagTile"},47852:(e,t,r)=>{r.d(t,{No:()=>d,Ue:()=>i,nj:()=>n});var a=r(27668),s=r(67570);let i=e=>({isCarousel:e.bannerCardIsCarousel||!1});var l=r(85868);let n=e=>{let t=e.buttonPill?(0,l.C)(e.buttonPill,!0):void 0,r=e.hideQr||!1;return{title:e.title,subText:e.description||void 0,button:e.buttonPill?t:void 0,imageSrc:e.tabletImage.url||"",mobileImageSrc:e.mobileImage.url||void 0,imageAlt:e.tabletImage.alternativeText||e.mobileImage.alternativeText||"",labelText:e.label?.label,labelIcon:e?.label?.icon?.name,qrText:e.qrText||void 0,hideQr:r,disableQrBadgeLinks:e.disableQrBadgeLinks??!1}},d={Item:s.A,Group:a.o}},50248:(e,t,r)=>{r.d(t,{Ir:()=>n,PM:()=>l});var a=r(68411),s=r(73295);let i=(0,a.vt)()((0,s.Zr)(e=>({isGroomingBundleIgnored:!1,actions:{setIsGroomingBundleIgnored:t=>e(()=>({isGroomingBundleIgnored:t}))}}),{name:"bundle-storage",storage:(0,s.KU)(()=>localStorage),partialize:e=>({isGroomingBundleIgnored:e.isGroomingBundleIgnored})}
3)),l=()=>i(e=>e.actions),n=()=>i(e=>e.isGroomingBundleIgnored)},50590:(e,t,r)=>{r.d(t,{f:()=>g});var a=r(17942),s=r(95425);let i={default:"bg-neutral-bg p-1",inverted:"bg-white p-1",pdp:"bg-neutral-primary-darker rounded-full p-1"},l=e=>{let{testId:t,children:r,theme:l="default",isFullWidth:n=!1,wrapperClassName:d=""}=e;return(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)("block w-full overflow-hidden rounded-lg",!n&&"rb-xs:inline-block rb-xs:w-auto",i[l],d),children:(0,a.jsx)("div",{className:(0,s.cn)("relative flex items-center gap-1",n?"w-full":"max-rb-xs:w-full"),children:r})})};l.displayName="SegmentControl.Container";var n=r(50804),d=r(47606);let c=(e,t,r)=>{let a=`calc((100% - ${(t-1)*r}px) / ${t})`,s=`calc((${a} + ${r}px) * ${e})`;return{width:a,left:s}},o={base:"absolute top-0 z-0 h-full",default:"rounded-lg bg-white !outline-1 outline -outline-offset-1 outline-black",inverted:"rounded-lg bg-white !outline-1 outline -outline-offset-1 outline-black",pdp:"rounded-full bg-white"},p=e=>{let{testId:t,activeIndex:r,totalItems:i,gapPx:l=4,transitionDuration:p=400,isFullWidth:m=!0,itemRefs:x,theme:u="default"}=e,[h,b]=(0,d.useState)(!1),[g,f]=(0,d.useState)(c(r,i,l)),{isMobile:y}=(()=>{let{width:e}=(()=>{let[e,t]=d.useState({width:window.innerWidth,height:window.innerHeight});return d.useEffect(()=>{let e=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[]),e})(),t=e<parseInt(n.mb["rb-xs"]);return{isMobile:t,isTablet:e>=parseInt(n.mb["rb-xs"])&&e<parseInt(n.mb["rb-sm"]),isDesktop:e>=parseInt(n.mb["rb-sm"]),width:e}})(),_=(0,d.useCallback)(()=>{!m&&!y&&x?.current?.length?f(((e,t)=>{let r=e.current[t];if(!r)return{};let{offsetLeft:a,offsetWidth:s}=r;return{left:`${a}px`,width:`${s}px`}})(x,r)):f(c(r,i,l))},[y,m,r,i,l,x]);return(0,d.useEffect)(()=>{h&&_()},[h,_]),(0,d.useEffect)(()=>{h||b(!0)},[h]),(0,d.useEffect)(()=>{h&&"u">typeof document&&document.fonts&&document.fonts.ready.then(_)},[h,_]),(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)(o.base,o[u]),style:{...g,transition:h?`left ${p}ms ease-in-out, width ${p/2}ms ease-in-out`:""}})};p.displayName="SegmentControl.Indicator";let m={default:"hover:text-primary-text rb-xs:min-w-[80px] z-[1] block",inverted:"hover:text-primary-text rb-xs:min-w-[80px] z-[1] block",pdp:"text-[#076D08] rb-xs:min-w-[80px] z-[1] block rounded-full"},x={default:"text-primary-text",inverted:"text-primary-text",pdp:"text-[#076D08]"},u={default:"text-secondary-text",inverted:"text-secondary-text",pdp:"text-secondary-text !hover:outline outline-[#8D92A3] outline-1 -outline-offset-1"},h={default:{large:"p-2 text-body-text-14-semibold",small:"py-1 px-2 text-body-text-14-semibold"},inverted:{large:"p-2 text-body-text-14-semibold",small:"py-1 px-2 text-body-text-14-semibold"},pdp:{large:"p-2 text-body-text-14-semibold rb-sm:text-body-text-16-semibold",small:"p-2 text-body-text-14-semibold"}},b=(0,d.forwardRef)((e,t)=>{let{testId:r,children:i,isActive:l,isFullWidth:n,theme:d="default",size:c="large",className:o,...p}=e,b=m[d];return(0,a.jsx)("button",{ref:t,"data-testid":r,type:"button",className:(0,s.cn)(b,l?x[d]:u[d],n?"w-full":"rb-xs:w-auto w-full",h[d][c],o),...p,children:i})});b.displayName="SegmentControl.Item";let g={Container:l,Item:b,Indicator:p}},54481:(e,t,r)=>{r.d(t,{Ny:()=>a,_b:()=>s});let a=()=>window.innerWidth<1024,s=()=>({width:window.innerWidth,height:window.innerHeight})},57552:(e,t,r)=>{r.d(t,{Q:()=>eI,Z:()=>tq});var a,s,i,l,n,d,c=r(17942),o=r(35897),p=r(23100);let m=e=>{let{schedule:t,elementID:r}=e,{t:a}=(0,p.Bd)(),[s,i]=t.split(":"),l=30*parseInt(s);return(0,c.jsx)("p",{"data-element-id":r,children:t===o.zd?a("one_time_purchase"):(0,c.jsxs)(c.Fragment,{children:[a("shipped_billed")," ",`${a("every")} ${l} ${a("billing_day.plural")}`]})})};var x=r(14662),u=r(10791),h=r(55204),b=r(37734),g=r(72373),f=r(39403),y=r(26701),_=r(7033),v=r(37032),j=r(3980),w=r(8879),C=r(18390);let I=(e,t)=>{let{cartPages:r,handleFreeGift:a,removeFromCart:s}=t,i=r.find(t=>t.cartItem.productId===e.cartItem.productId);i&&a(i,!1,!0),s(e.cartItem.productId)},N=async e=>{let{setIsCheckoutLoading:t,createCheckoutSession:r,setCheckoutError:a}=e;try{t(!0),a(null),await r()}catch(e){a(e),t(!1)}};var $=r(47606);let k=e=>{let{productItems:t,numOfPages:r,specialBumpOffer:a}=e,s=(0,_.AP)(),i=(0,_.IM)(),l=(0,_.$_)(),n=(0,_.LK)(),{handleToggle:d,handleFreeGift:c}=(0,y.$)(),p=(0,f.C)(),{setLastMainProductName:m,setIsRemoveAllModalOpen:x,setIsCheckoutLoading:u,setCheckoutError:h}=(0,v.Nc)(),g=(0,b.M)(),k=(0,_.Ts)(),L=(0,$.useCallback)(e=>{I(e,{cartPages:g,handleFreeGift:c,removeFromCart:i})},[g,c,i]),P=(0,$.useCallback)(e=>{((e,t)=>
3{let{productItems:r,numOfPages:a,specialBumpOffer:s,removeFromCart:i,setLastMainProductName:l,setIsRemoveAllModalOpen:n,cartPages:d,handleFreeGift:c}=t,{isMainProduct:o}=(0,C.T)(e.cartItem?.productType),p=r.filter(t=>t.cartItem.productId!==e.cartItem.productId);if(a>1||!o){let t=r.filter(e=>"cat"===e.cartItem.petType),a=r.filter(e=>"dog"===e.cartItem.petType),l=t.length>0&&1===a.length&&a[0].cartItem.productId===e.cartItem.productId,n=p.some(e=>null!==e.subFreeGiftOffer&&"SUB"===e.cartItem.productType);(l&&s?.productOtpID||!n&&s?.productOtpID)&&i(Number(s.productOtpID)),I(e,{cartPages:d,handleFreeGift:c,removeFromCart:i})}else l(e.cartProduct.name??""),n(!0)})(e,{cartPages:g,productItems:t,numOfPages:r,specialBumpOffer:a,handleFreeGift:c,removeFromCart:i,setLastMainProductName:m,setIsRemoveAllModalOpen:x})},[g,t,r,a,c,i,m,x]);return{handleItemRemoval:L,removeMainProductFromCart:P,quantityChange:(0,$.useMemo)(()=>(e=>{let{decreaseCartQuantity:t,addToCart:r,updateItemSchedule:a}=e;return e=>s=>{let i=e.cartItem.quantity,l=(0,j.u)(s),n=(0,w._8)(e.cartItem.productId),d=n?`${l}:month`:e.cartItem.schedule;if(s>i){var c,p,m,x,u;c=e.cartItem.productId.toString(),p=e.cartItem.productType,m=e.cartItem.path,x=e.cartItem.allowToggle,u=e.cartItem.petType,i>=o.Ex||r({productId:Number(c),quantity:1,productType:p,schedule:d,path:m,allowToggle:x,petType:u})}else s<i&&(t(Number(e.cartItem.productId)),n&&a(Number(e.cartItem.productId),d));return l}})({decreaseCartQuantity:n,addToCart:s,updateItemSchedule:l}),[n,s,l]),handleToggleSubOtp:(0,$.useCallback)(e=>{((e,t)=>{let{productItems:r,specialBumpOffer:a,removeFromCart:s,handleToggle:i}=t,l=r.filter(e=>"SUB"===e.cartItem.productType);1===l.length&&l[0].cartItem.productId===e.cartItem.productId&&a?.productOtpID&&s(Number(a.productOtpID)),i(e)})(e,{productItems:t,specialBumpOffer:a,removeFromCart:i,handleToggle:d})},[t,a,i,d]),checkIfItemInCart:(0,$.useCallback)(e=>e.cartItem?.productId?k.some(t=>Number(t.productId)===Number(e.cartItem.productId)):!!e.productOtpID&&k.some(t=>Number(t.productId)===Number(e.productOtpID)),[k]),handleCheckoutClick:(0,$.useCallback)(async()=>{await N({setIsCheckoutLoading:u,createCheckoutSession:p,setCheckoutError:h})},[u,p,h])}};var L=r(17309),P=r(14752),T=r(97427),B=r(89044),S=r(85159);function A(){return(A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let D=e=>$.createElement("svg",A({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),a||(a=$.createElement("path",{d:"M18 8.5H17V6.5C17 3.74 14.76 1.5 12 1.5C9.24 1.5 7 3.74 7 6.5V8.5H6C4.9 8.5 4 9.4 4 10.5V20.5C4 21.6 4.9 22.5 6 22.5H18C19.1 22.5 20 21.6 20 20.5V10.5C20 9.4 19.1 8.5 18 8.5ZM12 17.5C10.9 17.5 10 16.6 10 15.5C10 14.4 10.9 13.5 12 13.5C13.1 13.5 14 14.4 14 15.5C14 16.6 13.1 17.5 12 17.5ZM9 8.5V6.5C9 4.84 10.34 3.5 12 3.5C13.66 3.5 15 4.84 15 6.5V8.5H9Z",fill:"white"})));var F=r(83529),O=r(23756),M=r(20001),E=r(56865);function R(){return(R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let z=e=>$.createElement("svg",R({width:"1em",height:"1em",viewBox:"0 0 65 65",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=$.createElement("path",{d:"M0.5 32.3177C0.5 14.6446 14.8269 0.317688 32.5 0.317688C50.1731 0.317688 64.5 14.6446 64.5 32.3177C64.5 49.9908 50.1731 64.3177 32.5 64.3177C14.8269 64.3177 0.5 49.9908 0.5 32.3177Z",fill:"#F5F5F1"})),i||(i=$.createElement("path",{d:"M37.0461 33.3177C37.7961 33.3177 38.4561 32.9077 38.7961 32.2877L42.3761 25.7977C42.7461 25.1377 42.2661 24.3177 41.5061 24.3177H26.7061L25.7661 22.3177H22.4961V24.3177H24.4961L28.0961 31.9077L26.7461 34.3477C26.0161 35.6877 26.9761 37.3177 28.4961 37.3177H40.4961V35.3177H28.4961L29.5961 33.3177H37.0461ZM27.6561 26.3177H39.8061L37.0461 31.3177H30.0261L27.6561 26.3177ZM28.4961 38.3177C27.3961 38.3177 26.5061 39.2177 26.5061 40.3177C26.5061 41.4177 27.3961 42.3177 28.4961 42.3177C29.5961 42.3177 30.4961 41.4177 30.4961 40.3177C30.4961 39.2177 29.5961 38.3177 28.4961 38.3177ZM38.4961 38.3177C37.39
361 38.3177 36.5061 39.2177 36.5061 40.3177C36.5061 41.4177 37.3961 42.3177 38.4961 42.3177C39.5961 42.3177 40.4961 41.4177 40.4961 40.3177C40.4961 39.2177 39.5961 38.3177 38.4961 38.3177Z",fill:"currentColor"})));function H(){return(H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let q=e=>$.createElement("svg",H({width:"1em",height:"1em",viewBox:"0 0 151 149",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l||(l=$.createElement("g",{opacity:.6},$.createElement("path",{d:"M111.025 18.9279C111.549 19.3428 112.065 19.7669 112.575 20.1984L112.255 20.5792C112.761 21.007 113.26 21.4431 113.752 21.8868L114.086 21.5157C114.582 21.9629 115.071 22.4181 115.554 22.881H115.555L115.209 23.2413C115.687 23.7002 116.158 24.1676 116.622 24.6417L116.978 24.2921C117.445 24.7693 117.905 25.2532 118.357 25.7452L117.99 26.0841C118.439 26.5719 118.88 27.0673 119.313 27.5695L119.69 27.2423C120.127 27.7477 120.556 28.2599 120.978 28.7794L120.59 29.0939C121.007 29.6083 121.417 30.1304 121.818 30.6583L122.216 30.3556C122.62 30.8869 123.016 31.4253 123.404 31.9698L122.999 32.2599C123.384 32.799 123.76 33.3448 124.129 33.8966L124.543 33.6183C124.914 34.1732 125.276 34.7346 125.63 35.3019L125.208 35.5665C125.559 36.1285 125.901 36.6968 126.235 37.2706L126.666 37.0187C127.002 37.5953 127.33 38.1776 127.648 38.7657L127.21 39.004C127.526 39.586 127.832 40.1737 128.131 40.7667L128.576 40.5421C128.876 41.1386 129.169 41.7397 129.452 42.3468V42.3478L128.999 42.5587C129.278 43.1581 129.548 43.7627 129.81 44.3722L130.269 44.1759C130.531 44.7888 130.785 45.4067 131.03 46.0294H131.031L130.566 46.213C130.809 46.8291 131.042 47.4499 131.267 48.0753L131.735 47.9064C131.96 48.5337 132.176 49.1656 132.383 49.8019L131.909 49.9562C132.114 50.5859 132.309 51.2203 132.495 51.8585L132.974 51.7189C133.16 52.3589 133.337 53.0032 133.505 53.6515L133.022 53.7765C133.188 54.4165 133.344 55.0604 133.491 55.7081L133.978 55.5978C134.125 56.2487 134.264 56.9033 134.393 57.5616L133.903 57.6573C134.03 58.3055 134.147 58.9573 134.255 59.6124L134.746 59.5314C134.854 60.1893 134.954 60.8503 135.043 61.5148H135.044L134.548 61.5812C134.636 62.2369 134.715 62.8958 134.783 63.5577L135.278 63.506C135.347 64.1678 135.407 64.8325 135.456 65.5001H135.457L134.958 65.5372C135.007 66.1973 135.046 66.8601 135.075 67.5255L135.573 67.504C135.602 68.1685 135.622 68.8355 135.632 69.505L135.134 69.5128C135.139 69.8451 135.141 70.1783 135.141 70.5118C135.141 70.8451 135.139 71.1778 135.134 71.5099L135.632 71.5167C135.622 72.1862 135.602 72.8532 135.573 73.5177L135.075 73.4972C135.046 74.1627 135.007 74.8255 134.958 75.4855L135.456 75.5216C135.407 76.1892 135.347 76.8539 135.278 77.5157L134.783 77.465C134.715 78.1271 134.636 78.7866 134.548 79.4425L135.043 79.5079C134.954 80.1721 134.854 80.8328 134.746 81.4904L134.255 81.4103C134.147 82.0654 134.03 82.7172 133.903 83.3654L134.393 83.4601C134.264 84.1184 134.125 84.773 133.978 85.424L133.491 85.3146C133.344 85.9623 133.188 86.6062 133.022 87.2462L133.505 87.3712C133.337 88.0192 133.16 88.6631 132.974 89.3029L132.495 89.1642C132.309 89.8024 132.114 90.4368 131.909 91.0665L132.383 91.2198C132.176 91.8562 131.96 92.488 131.735 93.1154L131.267 92.9474C131.042 93.573 130.809 94.1944 130.566 94.8107L131.03 94.9923C130.785 95.6154 130.531 96.2335 130.268 96.8468L129.81 96.6505C129.548 97.2602 129.278 97.8654 128.999 98.465L129.451 98.6749C129.168 99.2822 128.876 99.884 128.576 100.481L128.131 100.256C127.832 100.849 127.525 101.437 127.21 102.019L127.648 102.256C127.33 102.844 127.002 103.426 126.666 104.003L126.235 103.752C125.901 104.326 125.559 104.894 125.208 105.456L125.63 105.72C125.276 106.287 124.914 106.849 124.544 107.403L124.129 107.127C123.76 107.679 123.384 108.225 122.999 108.764L123.404 109.053C123.016 109.598 122.619 110.136 122.215 110.667L121.818 110.365C121.417 110.893 121.007 111.415 120.59 111.929L120.978 112.242C120.556 112.762 120.128 113.274 119.691 113.779L119.313 113.454C118.88 113.956 118.439 114.451 117.99 114.939L118.357 115.276C117.905 115.769 117.445 116.252 116.978 116.73L116.622 116.382C116.158 116.856 115.687 117.323 115.209 117.781L115.554 118.141C115.071 118.604 114.582 119.059 114.086 119.506L113.752 119.136C113.26 119.58 112.761 120.016 112.255 120.443L112.576 120.824C112.066 121.256 111.549 121.68 111.025 122.095L110.716 121.703C110.196 122.115 109.671 122.519 109.139 122.914L109.436 123.315C108.899 123.713 108.356 124.102 107.808 124.483L107.523 124.073C106.979
3124.451 106.428 124.821 105.872 125.181L106.144 125.601C105.583 125.964 105.015 126.317 104.442 126.662L104.186 126.234C103.618 126.577 103.045 126.91 102.466 127.234L102.709 127.669C102.126 127.995 101.538 128.312 100.944 128.619L100.716 128.176C100.128 128.48 99.5341 128.775 98.9355 129.061L99.1504 129.511C98.5474 129.798 97.9393 130.077 97.3262 130.345L97.127 129.888C96.5207 130.153 95.9089 130.408 95.293 130.653L95.4775 131.116C94.8575 131.364 94.2329 131.601 93.6035 131.828L93.4355 131.359C92.8128 131.584 92.1853 131.799 91.5537 132.004L91.707 132.479C91.0727 132.684 90.4338 132.879 89.791 133.064L89.6543 132.585C89.0186 132.768 88.3781 132.941 87.7344 133.104L87.8574 133.588C87.2101 133.751 86.5584 133.903 85.9033 134.045L85.7988 133.558C85.1535 133.698 84.5041 133.828 83.8516 133.947L83.9404 134.438C83.2844 134.558 82.6248 134.666 81.9619 134.765L81.8887 134.273C81.2351 134.37 80.5779 134.456 79.918 134.532L79.9746 135.028C79.3133 135.105 78.6488 135.169 77.9814 135.224L77.9414 134.728C77.2822 134.782 76.62 134.825 75.9551 134.858L75.9785 135.356C75.3142 135.388 74.6471 135.41 73.9775 135.421L73.9707 134.922C73.6387 134.927 73.3059 134.93 72.9727 134.93C72.6394 134.93 72.3066 134.927 71.9746 134.922L71.9668 135.421C71.2972 135.41 70.6302 135.388 69.9658 135.356L69.9902 134.858C69.3253 134.825 68.6632 134.782 68.0039 134.728L67.9629 135.224C67.2955 135.169 66.631 135.105 65.9697 135.028L66.0273 134.532C65.3673 134.456 64.7102 134.37 64.0566 134.273L63.9824 134.765C63.3199 134.666 62.6606 134.558 62.0049 134.438L62.0947 133.947C61.442 133.828 60.792 133.698 60.1465 133.558L60.041 134.045C59.3863 133.903 58.735 133.751 58.0879 133.588H58.0889L58.2109 133.104C57.5674 132.941 56.9275 132.768 56.292 132.585L56.1533 133.064C55.5108 132.879 54.8723 132.684 54.2383 132.479L54.3926 132.004C53.7611 131.799 53.1334 131.584 52.5107 131.359L52.3408 131.828C51.7115 131.601 51.0868 131.364 50.4668 131.116L50.6523 130.653C50.0365 130.408 49.4246 130.153 48.8184 129.888L48.6182 130.345C48.0053 130.077 47.3977 129.798 46.7949 129.511L47.0098 129.061C46.4112 128.775 45.8176 128.48 45.2295 128.176L45 128.619C44.4063 128.312 43.8181 127.995 43.2354 127.669L43.4795 127.234C42.9008 126.91 42.3273 126.577 41.7598 126.234L41.502 126.661C40.9295 126.316 40.3625 125.963 39.8018 125.6L40.0742 125.181C39.5178 124.821 38.9673 124.451 38.4229 124.073L38.1377 124.484C37.5886 124.102 37.0454 123.713 36.5088 123.315L36.8076 122.914C36.2754 122.519 35.749 122.115 35.2295 121.703L34.9189 122.095C34.3954 121.68 33.8785 121.256 33.3682 120.824L33.6914 120.443C33.1855 120.016 32.6858 119.58 32.1934 119.136L31.8584 119.506C31.3622 119.059 30.8729 118.604 30.3906 118.141L30.7373 117.781C30.2593 117.323 29.7881 116.856 29.3242 116.382L28.9668 116.731C28.4997 116.253 28.0395 115.769 27.5869 115.276L27.9551 114.939C27.5067 114.451 27.0654 113.956 26.6318 113.454L26.2539 113.779C25.8174 113.274 25.3881 112.762 24.9668 112.242L25.3555 111.929C24.9384 111.414 24.5287 110.893 24.127 110.365L23.7295 110.667C23.3251 110.136 22.9286 109.598 22.54 109.053L22.9463 108.764C22.5617 108.225 22.185 107.679 21.8164 107.127L21.4014 107.403C21.0307 106.849 20.6686 106.287 20.3145 105.72L20.7383 105.456C20.3874 104.894 20.0443 104.326 19.71 103.752L19.2783 104.003C18.9424 103.426 18.6148 102.844 18.2959 102.256L18.7354 102.019C18.4198 101.437 18.1128 100.849 17.8145 100.256L17.3682 100.481C17.0679 99.884 16.7759 99.2822 16.4932 98.6749L16.9463 98.465C16.6672 97.8654 16.3973 97.2603 16.1357 96.6505L15.6768 96.8468C15.4137 96.2335 15.1591 95.6154 14.9141 94.9923L15.3789 94.8107C15.1365 94.1944 14.9031 93.573 14.6787 92.9474L14.209 93.1154C13.984 92.488 13.7681 91.8562 13.5615 91.2198L14.0361 91.0665C13.8317 90.4368 13.6362 89.8024 13.4502 89.1642L12.9707 89.3038C12.7842 88.6638 12.6073 88.0194 12.4395 87.3712L12.9229 87.2462C12.7572 86.6062 12.6011 85.9623 12.4541 85.3146L11.9668 85.424C11.8192 84.7733 11.6803 84.1191 11.5518 83.4611L12.042 83.3654C11.9153 82.7172 11.7982 82.0654 11.6904 81.4103L11.1982 81.4904C11.0901 80.8328 10.9912 80.172 10.9023 79.5079L11.3975 79.4425C11.3097 78.7866 11.2317 78.1271 11.1631 77.465L10.666 77.5157C10.5975 76.8539 10.5375 76.1892 10.4883 75.5216L10.9873 75.4855C10.9387 74.8255 10.8994 74.1627 10.8701 73.4972L10.3721 73.5177C10.3428 72.8532 10.3223 72.1862 10.3125 71.5167L10.8115 71.5109L10.8047 70.5118C10.8047 70.1783 10.8067 69.8451 10.8115 69.5128L10.3125 69.505C10.3223 68.8355 10.3428 68.1685 10.3721 67.504L10.8701 67.5255C10.8994 66.8601 10.9387 66.1973 10.9873 65.5372L10.4883 65.5001C10.5375 64.8325 10.5975 64.1678 10.666 63.506L11.1631 63.5577C11.2316 62.8958 11.3097 62.2369 11.3975 61.5812L10.9023 61.5148C10.9913 60.8504 11.0901 60.1892 11.1982 59.5314L11.6904 59.6124C11.7982 58.9573 11.9153 58.3055 12.042 57.6573L11.5518 57.5616C11.6804 56.9033 11.8191 56.2487 11.9668 55.5978L12.4541 55.7081C12.6011 55.0604 12.7572 54.4165 12.9229 53.7765L12.4395 53.6515C12.6073 53.0033 12.7841 52.3589 12.9707 51.7189L13.4502 51.8585C13.6362 51.2203 13.8317 50.5859 14.0361 49.9562L13.5615 49.8019C13.768 49.1659 13.9841 48.5344 14.209 47.9073L14.6787 48.0753C14.903 47.4499 15.1366 46.8291 15.3789 46.213L14.9141 46.0294C15.159 45.4066 15.4138 44.7889 15.6768 44.1759L16.1357 44.3732C16.3973 43.7635 16.6672 43.1582 16.9463 42.5587L16.4932 42.3478L16.4922 42.3468C16.7748 41.7397 17.068 41.1386 17.3682 40.5421L17.8145 40.7667C18.1129 40.1737 18.4198 39.586 18.7354 39.004L18.2959 38.7657C18.6148 38.1776 18.9424 37.5953 19.2783 37.
30187L19.71 37.2706C20.0442 36.6968 20.3874 36.1285 20.7383 35.5665L20.3145 35.3019C20.6686 34.7346 21.0307 34.1732 21.4014 33.6183L21.8164 33.8966C22.1849 33.3449 22.5618 32.7989 22.9463 32.2599L22.54 31.9689C22.9283 31.4246 23.3244 30.8867 23.7285 30.3556L24.127 30.6583C24.5287 30.1304 24.9383 29.6083 25.3555 29.0939L24.9668 28.7794C25.3881 28.2599 25.8174 27.7477 26.2539 27.2423L26.6318 27.5695C27.0655 27.0673 27.5066 26.5719 27.9551 26.0841L27.5869 25.7452C28.0395 25.253 28.4997 24.7684 28.9668 24.2911L29.3242 24.6417C29.7882 24.1677 30.2592 23.7002 30.7373 23.2413L30.3906 22.881C30.8729 22.4181 31.3622 21.9629 31.8584 21.5157L32.1934 21.8868C32.6858 21.443 33.1856 21.007 33.6914 20.5792L33.3691 20.1984C33.8657 19.7784 34.3679 19.3654 34.877 18.9611L34.9189 18.9279L35.2295 19.3195C35.749 18.9076 36.2754 18.5036 36.8076 18.1085L36.5098 17.7081C37.0463 17.3098 37.5887 16.9192 38.1377 16.5382L38.4229 16.9493C38.9672 16.5715 39.5179 16.2022 40.0742 15.8419L39.8018 15.422C40.3625 15.0589 40.9295 14.7055 41.502 14.3605L41.7598 14.7882C42.3273 14.4461 42.9008 14.113 43.4795 13.7892L43.2354 13.3527C43.818 13.0267 44.4065 12.7106 45 12.4034L45.2295 12.8468C45.8176 12.5424 46.4112 12.2475 47.0098 11.962L46.7949 11.5118C47.3975 11.2244 48.0045 10.9449 48.6172 10.6769L48.6182 10.6779L48.8184 11.1359C49.4246 10.8707 50.0365 10.6149 50.6523 10.3693L50.4668 9.9054C51.0868 9.65816 51.7115 9.42069 52.3408 9.19348L52.5107 9.66321C53.1334 9.43841 53.7611 9.22432 54.3926 9.01965L54.2383 8.54407C54.8724 8.33856 55.5107 8.14314 56.1533 7.95813L56.291 8.4386C56.9267 8.25556 57.5672 8.08249 58.2109 7.92004L58.0889 7.43469C58.7356 7.27149 59.3866 7.11989 60.041 6.97766L60.1465 7.46497C60.792 7.32468 61.442 7.19468 62.0947 7.07532L62.0039 6.58411C62.6599 6.46414 63.3196 6.35561 63.9824 6.25696L64.0566 6.75012C64.7102 6.65287 65.3674 6.56637 66.0273 6.49036L65.9697 5.99329C66.631 5.91711 67.2955 5.85266 67.9629 5.79797L68.0039 6.29602C68.6632 6.242 69.3253 6.19868 69.9902 6.16614L69.9658 5.66614C70.6302 5.63363 71.2972 5.6126 71.9668 5.60168L71.9746 6.10071C72.3066 6.09529 72.6394 6.0929 72.9727 6.0929C73.3059 6.0929 73.6387 6.09529 73.9707 6.10071L73.9775 5.60168C74.6471 5.61259 75.3142 5.63364 75.9785 5.66614L75.9551 6.16614C76.62 6.19868 77.2821 6.24201 77.9414 6.29602L77.9814 5.79797C78.6488 5.85264 79.3133 5.91713 79.9746 5.99329L79.918 6.49036C80.5779 6.56637 81.2351 6.65287 81.8887 6.75012L81.9619 6.25696C82.6248 6.3556 83.2844 6.46415 83.9404 6.58411L83.8516 7.07532C84.5041 7.19466 85.1534 7.32471 85.7988 7.46497L85.9033 6.97766C86.5581 7.11994 87.2094 7.27142 87.8564 7.43469L87.7344 7.92004C88.3781 8.08249 89.0186 8.25556 89.6543 8.4386L89.791 7.95813C90.4336 8.14313 91.072 8.33857 91.7061 8.54407L91.5537 9.01965C92.1852 9.22433 92.8129 9.4384 93.4355 9.66321L93.6035 9.19348C94.2329 9.42068 94.8575 9.65817 95.4775 9.9054L95.293 10.3693C95.9089 10.6149 96.5207 10.8707 97.127 11.1359L97.3271 10.6779V10.6769C97.9402 10.945 98.5475 11.2243 99.1504 11.5118
3L98.9355 11.962C99.534 12.2475 100.128 12.5424 100.716 12.8468L100.944 12.4034C101.538 12.7106 102.126 13.0267 102.709 13.3527L102.466 13.7892C103.045 14.113 103.618 14.4461 104.186 14.7882L104.442 14.3605C105.015 14.7055 105.582 15.0589 106.143 15.422H106.144L105.871 15.8419C106.428 16.2022 106.979 16.5715 107.523 16.9493L107.807 16.5382C108.356 16.9194 108.899 17.3096 109.436 17.7081L109.139 18.1085C109.671 18.5036 110.196 18.9076 110.716 19.3195L111.025 18.9279Z",stroke:"#373C6A",strokeDasharray:"2 2"}),$.createElement("g",{clipPath:"url(#clip0_9608_28578)"},$.createElement("path",{d:"M42.0274 50.3577C41.9766 50.154 42.3202 49.8672 42.9005 49.5811L42.4013 47.1183L0.478516 58.3514L1.21414 60.7949C1.74776 60.7801 2.10064 60.8613 2.14612 61.0438C2.19159 61.2264 1.93567 61.4564 1.48957 61.7077L20.1575 123.678C20.2875 124.109 20.5722 124.472 20.9527 124.692C21.3332 124.912 21.7804 124.971 22.2016 124.858L54.6906 116.152C55.1131 116.039 55.4772 115.762 55.7073 115.377C55.9374 114.992 56.0158 114.53 55.9262 114.087L43.1067 50.6016C42.4911 50.6359 42.077 50.5569 42.0274 50.3577Z",fill:"#373C6A"}),$.createElement("path",{d:"M3.44141 61.2362L41.1622 51.1289",stroke:"#2F3358",strokeMiterlimit:10}),$.createElement("g",{clipPath:"url(#clip1_9608_28578)"},$.createElement("path",{d:"M36.457 75.609C36.852 75.5032 37.261 75.4942 37.6502 75.5795L37.9651 76.7548C37.5842 76.6558 37.2176 76.6549 36.8449 76.7547C36.4081 76.8717 36.0733 77.1174 35.8791 77.4593C35.6933 77.7876 35.6409 78.1922 35.7465 78.5868C35.8523 78.9815 36.0835 79.2883 36.4223 79.4865C36.7611 79.6845 37.1843 79.7291 37.6113 79.6147C38.0061 79.5089 38.3033 79.3395 38.5811 79.0536L38.896 80.2289C38.5945 80.5108 38.2353 80.7073 37.8403 80.8131L37.563 80.8722C36.9178 80.9848 36.2753 80.8869 35.7428 80.5805C35.1348 80.2314 34.6921 79.6474 34.4971 78.9195C34.3021 78.1917 34.3964 77.4749 34.7596 76.8656C35.1199 76.2457 35.7216 75.8061 36.457 75.609ZM27.6573 79.5825C28.1052 79.4626 28.5128 79.5315 28.8447 79.788L28.9038 79.8389L28.7757 79.3607L29.9274 79.0521L30.8773 82.5969L30.1311 82.7969C29.9077 82.8567 29.6782 82.7291 29.6199 82.5113L29.5976 82.4282L29.5719 82.5019C29.4017 82.893 29.0842 83.1562 28.6463 83.2736C28.1983 83.3936 27.7401 83.3046 27.3384 83.0447C26.9241 82.7767 26.6296 82.3653 26.4959 81.8662C26.3623 81.3671 26.4134 80.8751 26.6393 80.4356C26.8572 80.0097 27.2093 79.7026 27.6573 79.5825ZM40.0132 76.2707C40.5253 76.1336 41.0558 76.1921 41.4994 76.4407C41.943 76.6894 42.2611 77.1064 42.3978 77.6164C42.679 78.6665 42.0796 79.674 41.0024 79.9628C40.4804 80.1026 39.9598 80.0413 39.5162 79.7928C39.0752 79.5539 38.7573 79.1373 38.6209 78.6284C38.3394 77.5781 38.9357 76.5595 40.0132 76.2707ZM43.1883 77.8838C43.5942 77.775 43.9954 77.9912 44.0983 78.375C44.2012 78.7589 43.9676 79.1683 43.5616 79.2771C43.1568 79.3853 42.7526 79.1596 42.6466 78.764C42.5407 78.3684 42.7826 77.9927 43.1883 77.8838ZM18.4569 82.0457C19.0111 81.8972 19.518 81.9509 19.9517 82.2023C20.3852 82.4536 20.6839 82.8864 20.8342 83.4469L20.9067 83.7177L18.404 84.4934C18.5559 84.7377 18.8972 84.8597 19.2333 84.7696C19.5319 84.6896 19.7043 84.5212 19.7866 84.2311L20.9808 83.9111C20.9832 84.3449 20.8592 84.7355 20.6079 85.0362C20.3524 85.3612 19.9696 85.5975 19.4896 85.7261C18.338 86.0347 17.3335 85.49 17.0408 84.3976C16.9045 83.8888 16.9717 83.3694 17.2312 82.9312C17.4937 82.5038 17.9349 82.1857 18.4569 82.0457ZM31.4683 79.1619L31.5045 79.0855C31.6607 78.6865 31.9683 78.4264 32.4272 78.3034C32.8863 78.1804 33.3335 78.2722 33.7354 78.5332C34.1369 78.7931 34.4327 79.2151 34.5636 79.7034C34.6944 80.1918 34.6494 80.7057 34.4345 81.1423C34.2166 81.5682 33.8532 81.8774 33.4163 81.9945L33.2511 82.0306C32.8698 82.0916 32.5262 82.0005 32.2238 81.7701L32.154 81.721L32.1763 81.804C32.2459 82.0639 32.1273 82.264 31.8286 82.344L31.1466 82.5268L29.7919 77.4708L30.9332 77.1649L31.4683 79.1619ZM14.5316 81.5608C15.0436 81.4236 15.5462 81.467 15.9578 81.6801C16.3695 81.8934 16.6623 82.2605 16.7877 82.7285C16.9131 83.1965 16.8486 83.6817 16.5988 84.0723C16.3599 84.4598 15.9344 84.7517 15.4233 84.8887L14.6772 85.0886L15.1395 86.8139L13.9123 87.1427L12.5583 82.0895L14.5316 81.5608ZM24.7919 82.4795C24.828 82.6141 24.9147 82.7252 25.047 82.7902C25.1684 82.8583 25.3183 82.8621 25.4576 82.8248L26.1613 82.6362C26.4676 82.5544 26.7795 82.729 26.8596 83.0274L27.0211 83.6302L25.5175 84.0331C25.0697 84.153 24.6706 84.1162 24.3289 83.9512C23.9846 83.7765 23.7514 83.4597 23.6344 83.0232L22.659 79.383L23.8749 79.0572L24.7919 82.4795ZM21.7621 81.239L22.2837 81.0992C22.5901 81.0171 22.9031 81.1925 22.9832 81.4911L23.1225 82.0108L22.0443 82.2997L22.2981 83.2468C22.3342 83.3816 22.4215 83.4923 22.5428 83.5603C22.6641 83.6282 22.816 83.6428 22.9553 83.6055C23.2617 83.5234 23.5747 83.6987 23.6548 83.9974L23.7857 84.486L23.0509 84.6829C22.614 84.8 22.204 84.765 21.8733 84.5971C21.5286 84.4213 21.2845 84.1088 21.1675 83.672L20.3283 80.5403L21.4914 80.2287L21.7621 81.239ZM28.2319 80.576C27.7729 80.699 27.5014 81.1394 27.6153 81.5652C27.6711 81.7733 27.8099 81.9481 28.0122 82.0615C28.2004 82.1669 28.4252 82.1954 28.6497 82.1353C29.0974 82.0151 29.3651 81.5643 29.2481 81.1277C29.1924 80.9199 29.0574 80.7564 28.8583 80.6539C28.6701 80.5484 28.4452 80.519 28.2319 80.576ZM32.437 79.4493C31.9681 79.5749 31.6971 80.0151 31.8111 80.441C31.8697 80.6598 32.0048 80.8241 32.207 80.9375C32.3953 81.043 32.6314 81.0684 32.8548 81.0085C33.0782 80.9487 33.2484 80.8143 33.3587 80.6288C33.4662 80.4325 33.5016 80.2226 33.4429 80.0037C33.3287 79.578 32.885 79.3293 32.437 79.4493ZM40.2183 77.3683C39.8255 77.5146 39.6385 77.9062 39.7509 78.3256C39.8709 78.773 40.2776 79.0095 40.7156 78.8921C40.9289 78.8349 41.0982 78.7005 41.2014 78.5284C41.3117 78.3429 41.3366 78.1351 41.2783 77.9174C41.1584 77.4699 40.7384 77.226 40.3015 77.343L40.2183 77.3683ZM18.5637 82.9988C18.2856 83.1247 18.1178 83.3925 18.17 83.6614L18.1755 83.6821L19.5093 83.3247L19.5038 83.304C19.3991 82.9982 19.0509 82.8571 18.6882 82.9543L18.5637 82.9988ZM14.3762 83.9651L15.1223 83.7652C15.4641 83.6736 15.6591 83.3765 15.5727 83.0541C1
35.5309 82.8978 15.4301 82.7804 15.2989 82.715C15.1676 82.6496 15.0039 82.6373 14.8324 82.6833L14.0863 82.8832L14.3762 83.9651Z",fill:"#F5F5F1"}))),$.createElement("g",{clipPath:"url(#clip2_9608_28578)"},$.createElement("path",{d:"M144.84 98.6421C139.297 109.038 133.745 119.429 128.22 129.828C127.278 131.599 126.148 132.107 124.316 131.043C114.379 125.255 104.424 119.501 94.448 113.799C92.4129 112.643 92.468 111.26 93.4402 109.456C98.9903 99.1726 104.517 88.8753 110.051 78.5758C121.647 85.2645 133.243 91.9533 144.84 98.6421Z",fill:"#373C6A"}),$.createElement("path",{d:"M144.84 98.642C133.244 91.9532 121.648 85.2645 110.051 78.5757C110.167 78.3254 110.278 78.0723 110.403 77.8274C114.335 70.1733 114.85 69.8683 122.647 73.0824C130.593 76.3637 138.106 80.5111 144.709 86.2643C149.054 90.0471 149.202 90.7159 146.45 95.7732C145.927 96.7393 145.378 97.6841 144.84 98.642Z",fill:"#373C6A"}),$.createElement("path",{d:"M112.41 79.8677L142.721 97.3677",stroke:"#2F3358",strokeOpacity:.7,strokeMiterlimit:10}),$.createElement("g",{clipPath:"url(#clip3_9608_28578)"},$.createElement("path",{d:"M129.392 102.572C129.708 102.754 129.971 103.007 130.163 103.306L129.621 104.244C129.443 103.942 129.212 103.71 128.915 103.538C128.566 103.336 128.2 103.281 127.863 103.374C127.539 103.463 127.25 103.686 127.068 104.001C126.887 104.316 126.839 104.655 126.927 104.993C127.016 105.331 127.255 105.625 127.596 105.822C127.911 106.004 128.205 106.086 128.561 106.08L128.019 107.019C127.651 107.007 127.301 106.904 126.986 106.722L126.773 106.584C126.296 106.249 125.953 105.782 125.811 105.254C125.648 104.651 125.737 104.005 126.072 103.424C126.408 102.842 126.918 102.45 127.53 102.294C128.148 102.131 128.805 102.233 129.392 102.572ZM121.347 99.5327C121.704 99.7393 121.918 100.039 121.966 100.41L121.971 100.479L122.191 100.097L123.111 100.628L121.476 103.461L120.88 103.116C120.701 103.013 120.638 102.788 120.738 102.614L120.776 102.548L120.714 102.578C120.36 102.717 119.994 102.683 119.644 102.481C119.287 102.274 119.054 101.93 118.965 101.513C118.873 101.083 118.947 100.639 119.177 100.24C119.407 99.8412 119.749 99.5633 120.168 99.4287C120.574 99.2977 120.989 99.3261 121.347 99.5327ZM131.218 105.231C131.626 105.467 131.923 105.838 132.046 106.274C132.169 106.71 132.107 107.172 131.872 107.58C131.388 108.418 130.375 108.676 129.515 108.18C129.098 107.939 128.808 107.572 128.685 107.136C128.558 106.707 128.621 106.244 128.855 105.838C129.34 104.999 130.357 104.734 131.218 105.231ZM132.202 108.247C132.526 108.434 132.642 108.823 132.465 109.13C132.288 109.436 131.883 109.547 131.559 109.36C131.236 109.173 131.123 108.776 131.306 108.46C131.488 108.144 131.877 108.06 132.202 108.247ZM113.997 95.2873C114.44 95.5429 114.725 95.896 114.84 96.3276C114.955 96.7591 114.871 97.2198 114.612 97.6676L114.487 97.8841L112.422 96.7967C112.364 97.0461 112.502 97.3379 112.77 97.4927C113.009 97.6305 113.224 97.6322 113.459 97.5012L114.413 98.052C114.141 98.3269 113.816 98.4949 113.468 98.526C113.103 98.5697 112.713 98.4777 112.329 98.2564C111.41 97.7253 111.12 96.7494 111.624 95.8768C111.859 95.4705 112.228 95.1858 112.667 95.0732C113.102 94.9693 113.58 95.0467 113.997 95.2873ZM124.013 101.669L124.085 101.644C124.434 101.491 124.791 101.521 125.158 101.732C125.525 101.944 125.749 102.283 125.838 102.701C125.927 103.117 125.847 103.57 125.622 103.96C125.397 104.35 125.045 104.646 124.634 104.786C124.229 104.917 123.805 104.882 123.456 104.68L123.329 104.599C123.05 104.397 122.892 104.123 122.847 103.787L122.833 103.713L122.794 103.779C122.674 103.987 122.474 104.038 122.236 103.9L121.69 103.585L124.022 99.5471L124.934 100.074L124.013 101.669ZM111.83 92.5094C112.239 92.7456 112.529 93.0896 112.654 93.4833C112.779 93.8769 112.732 94.2918 112.516 94.6655C112.3 95.0393 111.954 95.3051 111.551 95.3938C111.156 95.4876 110.704 95.4032 110.296 95.1675L109.699 94.8233L108.904 96.2018L107.923 95.6359L110.254 91.5993L111.83 92.5094ZM117.716 99.5519C117.654 99.6595 117.638 99.7838 117.68 99.9081C117.714 100.027 117.806 100.124 117.917 100.188L118.479 100.513C118.724 100.654 118.81 100.961 118.673 101.199L118.394 101.681L117.193 100.988
3C116.836 100.781 116.608 100.506 116.497 100.187C116.39 99.8597 116.443 99.513 116.644 99.1642L118.322 96.2575L119.294 96.8185L117.716 99.5519ZM116.587 96.8617L117.004 97.1024C117.249 97.2437 117.336 97.551 117.199 97.7896L116.959 98.2048L116.098 97.7078L115.661 98.4638C115.599 98.5715 115.584 98.6959 115.617 98.8152C115.651 98.9345 115.737 99.04 115.849 99.1042C116.093 99.2455 116.18 99.5528 116.043 99.7914L115.817 100.182L115.23 99.8433C114.881 99.6418 114.645 99.361 114.542 99.0468C114.436 98.719 114.479 98.3684 114.681 98.0195L116.125 95.5187L117.053 96.0549L116.587 96.8617ZM121.082 100.52C120.716 100.309 120.268 100.415 120.071 100.755C119.975 100.921 119.952 101.119 120.008 101.317C120.06 101.503 120.184 101.662 120.363 101.766C120.721 101.972 121.174 101.857 121.375 101.508C121.471 101.342 121.489 101.154 121.428 100.963C121.376 100.778 121.253 100.618 121.082 100.52ZM124.442 102.46C124.068 102.244 123.619 102.35 123.423 102.69C123.322 102.865 123.304 103.054 123.36 103.253C123.412 103.438 123.545 103.603 123.723 103.706C123.901 103.809 124.094 103.831 124.28 103.784C124.471 103.728 124.626 103.618 124.727 103.443C124.923 103.103 124.8 102.667 124.442 102.46ZM130.587 106.024C130.268 105.914 129.939 106.047 129.758 106.359C129.552 106.717 129.659 107.123 130.009 107.325C130.179 107.423 130.37 107.445 130.544 107.401C130.73 107.354 130.877 107.238 130.978 107.064C131.184 106.707 131.072 106.289 130.724 106.088L130.587 106.024ZM113.465 95.9554C113.21 95.8592 112.936 95.9221 112.799 96.1246L112.789 96.1415L113.854 96.7562L113.864 96.7393C113.991 96.4807 113.861 96.1728 113.571 96.0056L113.465 95.9554ZM110.218 93.926L110.814 94.2702C111.087 94.4278 111.396 94.3625 111.545 94.105C111.617 93.9802 111.628 93.8432 111.586 93.7194C111.545 93.5955 111.45 93.4849 111.313 93.4059L110.717 93.0616L110.218 93.926Z",fill:"#F5F5F1"}))),$.createElement("path",{d:"M87.2517 37.7545V97.0917C87.2517 97.6922 87.2131 98.2844 87.1337 98.8639H61.8407C61.7613 98.2844 61.7227 97.6922 61.7227 97.0917V37.7545C61.7227 30.5142 67.4661 24.5885 74.4862 24.5885C77.9962 24.5885 81.1886 26.071 83.5015 28.4564C85.8164 30.8418 87.2517 34.1344 87.2517 37.7545Z",fill:"#373C6A"}),$.createElement("path",{d:"M75.207 0.269409C75.5022 0.269409 75.5761 0.572688 75.5762 0.724487L76.3145 5.27722H76.6836C76.9788 5.3748 77.0527 5.62122 77.0527 5.7323L77.4219 13.0155H77.791C78.0863 13.0155 78.1602 13.3189 78.1602 13.4706V15.2909L81.1123 17.1122L81.4814 26.6718H67.8262L68.1953 17.1122L71.1484 15.2909V13.4706C71.1484 13.3188 71.2223 13.0155 71.5176 13.0155H71.8867L72.2559 5.7323C72.2559 5.62122 72.3297 5.3748 72.625 5.27722H72.9932L73.7314 0.724487C73.7315 0.572738 73.8057 0.26961 74.1006 0.269409H75.207Z",fill:"#353A66"}),$.createElement("g",{clipPath:"url(#clip4_9608_28578)"},$.createElement("path",{d:"M79.4336 51.0177C79.6703 51.0177 79.9005 51.0739 80.1055 51.1798V51.8849C79.9072 51.7725 79.702 51.7169 79.4785 51.7169C79.2166 51.717 78.9928 51.8047 78.833 51.9669C78.6797 52.1228 78.5898 52.3415 78.5898 52.5782C78.5899 52.8148 78.6732 53.0211 78.833 53.1827C78.9928 53.3442 79.2227 53.4327 79.4785 53.4327C79.7153 53.4327 79.9071 53.3821 80.1055 53.2638V53.9689C79.8945 54.0813 79.6645 54.1368 79.4277 54.1368L79.2637 54.129C78.8856 54.0953 78.5402 53.9439 78.2881 53.6925C78.0004 53.406 77.8408 53.0127 77.8408 52.5763C77.8409 52.1399 78.0005 51.7534 78.2949 51.4669C78.5895 51.1739 78.9924 51.0177 79.4336 51.0177ZM73.9141 51.922C74.1828 51.922 74.4005 52.0216 74.5479 52.215L74.5732 52.2521V51.965H75.2646V54.0919H74.8164C74.6826 54.0918 74.5734 53.986 74.5732 53.8556V53.8058L74.5479 53.8429C74.3939 54.0363 74.1768 54.1359 73.9141 54.1359C73.6454 54.1358 73.4026 54.0173 73.2168 53.8116C73.0252 53.5996 72.922 53.3257 72.9219 53.0265C72.9219 52.727 73.0244 52.4584 73.2168 52.2462C73.4025 52.0407 73.6455 51.922 73.9141 51.922ZM81.3242 51.921C81.6312 51.9211 81.919 52.0339 82.1299 52.2394C82.3408 52.445 82.4569 52.7256 82.457 53.0314C82.457 53.6613 81.9704 54.1357 81.3242 54.1359C81.011 54.1359 80.7286 54.0232 80.5176 53.8175C80.3067 53.6177 80.1914 53.3366 80.1914 53.0314C80.1916 52.4016 80.6781 51.921 81.3242 51.921ZM82.8594 53.2999C83.1029 53.2999 83.2949 53.4818 83.2949 53.712C83.2947 53.9421 83.1027 54.1358 82.8594 54.1359C82.6167 54.1359 82.424 53.9492 82.4238 53.712C82.4238 53.4747 82.6159 53.2999 82.8594 53.2999ZM68.3955 51.921C68.7278 51.9211 69.003 52.0269 69.208 52.2325C69.413 52.4382 69.5156 52.7253 69.5156 53.0616V53.2238L67.999 53.2823C68.0473 53.4418 68.2194 53.5615 68.4209 53.5616C68.6 53.5616 68.7219 53.493 68.8115 53.3429H69.5283C69.4646 53.586 69.3361 53.7855 69.1504 53.9161C68.9586 54.0597 68.7089 54.1349 68.4209 54.1349C67.7303 54.1348 67.25 53.6797 67.25 53.0245C67.25 52.7194 67.3654 52.4388 67.5762 52.2325C67.7872 52.0327 68.0823 51.921 68.3955 51.921ZM76.1104 52.2579L76.1426 52.2208C76.2899 52.021 76.501 51.921 76.7764 51.921C77.0516 51.9211 77.2879 52.0399 77.4736 52.2462C77.6593 52.4519 77.7617 52.7326 77.7617 53.0255C77.7617 53.3185 77.6594 53.5995 77.4736 53.8116C77.2879 54.0172 77.0383 54.1348 76.7764 54.1349L76.6777 54.131C76.4554 54.1079 76.2772 54.0044 76.1426 53.8302L76.1104 53.7931V53.8429C76.1104 53.9988 76.0141 54.0929 75.835 54.0929H75.4258V51.0607H76.1104V52.2579ZM66.2715 51.0607C66.5786 51.0607 66.8534 51.1608 67.0518 51.3419C67.25 51.523 67.3584 51.7722 67.3584 52.0529C67.3583 52.3334 67.2501 52.5955 67.0518 52.7765C66.86 52.9575 66.578 53.0567 66.2715 53.0568H65.8232V54.0919H65.0879V51.0607H66.2715ZM71.875 53.1134C71.875 53.1942 71.9074 53.2691 71.9717 53.3253C72.0294 53.3816 72.1127 53.4064 72.1963 53.4064H72.6182C72.8019 53.4065 72.9502 53.5515 72.9502 53.7306V54.0919H72.0488C71.7801 54.0919 71.5621 54.0109 71.3955 53.8673C71.2292 53.718 71.1466 53.506 71.1465 53.2443V51.0607H71.875V53.1134ZM70.3652 51.965H70.6787C70.8625 51.965 71.0107 52.1101 71.0107 52.2892V52.6007H70.3652V53.1691C70.3653 53.2498 70.3965 53.3248 70.4541 53.381C70.5118 53.4373 70.5951 53.4679 70.6787 53.4679C70.8624 53.4679 71.0106 53.6131 71.0107 53.7921V54.0851H70.5703C70.3083 54.085 70.0837 54.005 69.9238 53.8615C69.7573 53.7114 69.668 53.4994 69.668 53.2374V51.3595H70.3652V51.965ZM74.0869 52.5646C73.8116 52.5646 73.5938 52.77 73.5938 53.0255C73.5938 53.1503 73.645 53.2687 73.7412 53.3624C73.8308 53.4497 73.9523 53.4991 74.0869 53.4991C74.3555 53.499 74.5732 53.2873 74.5732 53.0255C74.5732 52.9007 74.522 52.7886 74.4258 52.7013C74.3363 52.614 74.2149 52.564
36 74.0869 52.5646ZM76.6094 52.5646C76.3281 52.5647 76.1104 52.7701 76.1104 53.0255C76.1104 53.1568 76.1616 53.2687 76.2578 53.3624C76.3473 53.4497 76.4754 53.4991 76.6094 53.4991C76.7433 53.4991 76.8587 53.4496 76.9482 53.3624C77.0378 53.2687 77.0888 53.1568 77.0889 53.0255C77.0889 52.77 76.8781 52.5646 76.6094 52.5646ZM81.2275 52.5734C81.012 52.615 80.8693 52.7966 80.8691 53.0314C80.8691 53.2998 81.0615 53.4933 81.3242 53.4933C81.4521 53.4932 81.5669 53.4441 81.6504 53.3634C81.74 53.2761 81.7852 53.163 81.7852 53.0323C81.7851 52.764 81.5863 52.5646 81.3242 52.5646L81.2275 52.5734ZM68.3125 52.4698C68.1377 52.4985 68.0032 52.6238 67.9922 52.7823V52.7941H68.792V52.7823C68.7794 52.5954 68.6063 52.464 68.3887 52.464L68.3125 52.4698ZM65.8232 52.3829H66.2715C66.4763 52.3829 66.6297 52.246 66.6299 52.0529C66.6299 51.9591 66.591 51.8777 66.5273 51.8214C66.4637 51.7653 66.3742 51.7345 66.2715 51.7345H65.8232V52.3829Z",fill:"#F5F5F1"})),$.createElement("path",{d:"M34.8198 13.1767L34.4765 19.4642L40.5318 20.0232L35.1038 22.8591L37.6641 28.571L32.5793 25.1193L29.0843 30.2721L29.4275 23.9846L23.3722 23.4256L28.8003 20.5897L26.24 14.8778L31.3248 18.3295L34.8198 13.1767Z",fill:"#373C6A"}),$.createElement("path",{d:"M139.453 50.1732L138.792 57.1827L143.499 62.2649L136.733 61.5806L131.827 66.4564L132.487 59.4468L127.781 54.3646L134.547 55.0489L139.453 50.1732Z",fill:"#373C6A"}),$.createElement("path",{d:"M81.6329 129.311L78.3438 134.379L83.7496 136.874L77.8676 137.338L79.3863 143.271L75.3406 138.782L71.8287 143.686L72.6658 137.624L66.7677 137.805L71.8573 134.735L68.0145 130.058L73.5239 132.292L74.6301 126.278L76.4107 132.133L81.6329 129.311Z",fill:"#373C6A"}))),n||(n=$.createElement("defs",null,$.createElement("clipPath",{id:"clip0_9608_28578"},$.createElement("rect",{width:43.4038,height:69.8734,fill:"white",transform:"matrix(0.965926 -0.258819 0.241738 0.970342 0.478516 58.3514)"})),$.createElement("clipPath",{id:"clip1_9608_28578"},$.createElement("rect",{width:31.4286,height:5.5,fill:"white",transform:"translate(12.5234 81.9603) rotate(-15)"})),$.createElement("clipPath",{id:"clip2_9608_28578"},$.createElement("rect",{width:40.2977,height:50.2537,fill:"white",transform:"matrix(0.866026 0.5 -0.472073 0.881559 115.623 68.032)"})),$.createElement("clipPath",{id:"clip3_9608_28578"},$.createElement("rect",{width:28,height:4.9,fill:"white",transform:"translate(110.314 91.4958) rotate(30)"})),$.createElement("clipPath",{id:"clip4_9608_28578"},$.createElement("rect",{width:18.2083,height:3.18646,fill:"white",transform:"translate(65.0859 50.9833)"})))));var Q=r(77638),U=r(4198),V=r(95425);let G={base:"text-body-text-14 text-primary-text",center:"text-center",left:"text-left",right:"text-right"},Z=e=>{let{testId:t,wrapperClassName:r,percentage:a,text:s,textAlign:i="center",on:l=!1}=e,n=(0,V.cn)("px-4 py-3 flex flex-col gap-2",r),d=(0,V.cn)(G.base,G[i]),o=l?100:Math.max(0,Math.min(a,100)),p=(0,V.cn)("rounded-full bg-[linear-gradient(90deg,#008900_0%,#00B500_100%)] h-full w-[var(--progress-width,100%)] transition-all duration-500 ease-in-out"),m=l?void 0:{"--progress-width":`${o}%`};return(0,c.jsxs)("div",{"data-testid":t,className:n,children:[s&&(0,c.jsx)("p",{className:d,dangerouslySetInnerHTML:{__html:s}}),(0,c.jsx)("div",{className:"bg-active-bg rounded-lg w-full h-2",children:(0,c.jsx)("div",{className:p,style:m,"data-testid":`${t}_progress`})})]})};var K=r(11500),W=r(64339),J=r(71734),X=r(22455),Y=r(21961);let ee=e=>{try{let t=(e,t)=>e<=0?0:Math.round((e-t)/e*100);if("BumpOffer"===e.__typename){if(!e.prices)return{price:"0",discounted_price:"0",discount_percentage:0,sub_discount_percentage:0};let t=e.cartItem?.productType?.includes("SUB")?e.prices.sub||[]:e.prices.otp||[];return{...t.find(t=>t.quantity===e.cartItem?.quantity)||t[0],discount_percentage:0,sub_discount_percentage:0}}if(!e?.cartProduct?.prices)return{price:"0",discounted_price:"0",discount_percentage:0,sub_discount_percentage:0};let r=e.cartItem?.productType==="SUB",a=(r?e.cartProduct.prices.sub||[]:e.cartProduct.prices.otp||[]).find(t=>t.quantity===e.cartItem?.quantity);if(!a)throw Error(`Price not found for ${e.cartProduct?.name} with quantity ${e.cartItem?.quantity}`);let s=parseFloat(a.price||"0"),i=parseFloat(a.discounted_price||"0"),l=t(s,i),n=0;if(!r&&e.cartProduct.prices.sub){let r=e.cartProduct.prices.sub.find(t=>t.quantity===e.cartItem?.quantity)||e.cartProduct.prices.sub[0];if(r){let e=parseFloat(r.price||"0"),a=parseFloat(r.discounted_price||"0");n=t(e,a)}}return{...a,discount_percentage:l,sub_discount_percentage:n}}catch(e){return console.error("Error finding prices:",e),{price:"0",discounted_price:"0",discount_percentage:0,sub_discount_percentage:0}}};var et=r(3864),er=r(57612);let ea=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et.s5,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et.Or,{locale:r}=(0,er.Y)();return(a,s)=>((e,t,r,a)=>{let s=Number((Math.round(100*e)/100).toFixed(2));try{return new Intl.NumberFormat("fr"===t||"es-MX"===t?"en":t,{style:"currency",currency:r,currencyDisplay:a??"n
3arrowSymbol"}).format(s)}catch{return s.toString()}})(a,r,s?.currency??e,s?.currencyDisplay??t)};var es=r(27195),ei=r(74617);let el=e=>{let{testId:t,addonProducts:r,checkIfItemInCart:a,addToCart:s,removeFromCart:i}=e,{t:l}=(0,X.bl)("cart_drawer"),n=ea(),d=r.items.some(e=>"FreeGiftOffer"===e.__typename&&"cat"!==e.cartItem.petType);return(0,c.jsx)(c.Fragment,{children:r&&r.items&&r.items.length>0&&(0,c.jsx)(ei.Bv,{testId:`${t}-addon-products-line-item-group`,type:"upsell",children:r.items.map((e,r)=>{let o=a(e),p="FreeGiftOffer"===e.__typename,m="BumpOffer"===e.__typename;return(0,c.jsx)($.Fragment,{children:!d&&m?null:(0,c.jsxs)(ei.yu.Container,{testId:`${t}-addon-product-line-item-${r}`,type:"upsell",children:[e.product.image&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-addon-product-line-item-media-image-${r}`,src:e.product.image.url,alt:e.product.image.alternativeText||e.product.name||""}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-addon-product-line-item-content-${r}`,children:[!p&&(0,c.jsx)(ei.yu.Tag,{testId:`${t}-tag-bau`,type:"urgency-primary",label:"Deal Unlocked - Get 50% Off",Icon:es.A}),(0,c.jsx)(ei.yu.Details,{testId:`${t}-addon-product-line-item-details-${r}`,title:p?"Your Free Gift":e.label,description:p?e.product.name:e.description}),(0,c.jsxs)(ei.yu.DetailsFooter,{testId:`${t}-addon-product-line-item-details-footer-${r}`,children:[(0,c.jsx)(ei.yu.Price,{testId:`${t}-addon-product-line-item-pricing-variants-${r}`,rrp:p?n(e.rrpPrice||0):n(e.prices.otp[0].perceived_rrp||0),discountedPrice:p?l("free"):n(e.prices.otp[0].discounted_price||0),wrapperClassName:"flex-grow",isDiscountTrailing:!0}),(0,c.jsx)(ei.yu.Checkbox,{testId:`${t}-addon-product-line-item-checkbox-${r}`,label:o?l("claimed"):l("claim_deal"),labelPosition:"left",size:"large",onChange:t=>{p||(o?i(Number(e.productOtpID)):s({productId:Number(e.productOtpID),quantity:1,productType:"OTPBUMP",schedule:"",path:"",allowToggle:!1,petType:e.product.petType}))},checked:!!p||o})]})]})]})},e?.productOtpID||r)})})})};var en=r(23841),ed=r(55007),ec=r(4141),eo=r(35138),ep=r(71553),em=r(61852),ex=r(77657);let eu=e=>{let{testId:t,bumpOffers:r,checkIfItemInCart:a,addToCart:s,removeFromCart:i,region:l=J.t9}=e,n=l===J.ij.UK,{t:d}=(0,X.bl)("cart_drawer"),o=ea(),[p,m]=(0,$.useState)([]),x=[d("vet_reviewed"),d("key_ingredients"),d("directions_for_use")];return(0,c.jsxs)("div",{className:"rb-xs:p-6 bg-neutral-bg rb-xs:gap-4 flex flex-col gap-3 px-4 py-6",children:[(0,c.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,c.jsx)("p",{className:"text-primary-text text-header-text-24",children:d("exclusive_deals")}),(0,c.jsx)("p",{className:"text-primary-text text-body-text-16",children:d("bump_offer_description")})]}),r&&r.items&&r.items.map((e,l)=>{let u=e.prices?.otp?.[0]?.perceived_rrp&&e.prices.otp[0].discounted_price?Math.round((e.prices.otp[0].perceived_rrp-e.prices.otp[0].discounted_price)/e.prices.otp[0].perceived_rrp*100):0,h=!!(e.vetQuote&&e.product?.ingredients?.length&&(e.product?.usageRecommendations?.length||e.product?.usageInstructions?.length)),b=a(e),g=e.product?.sku==="SNC",f=e.product?.productType.replace("_"," ").toLowerCase(),y=r?.items?.[l]?.product?.ingredients.filter(e=>e.showAsHighlight);return(0,c.jsxs)("div",{className:"flex flex-col rounded-2xl bg-white p-4",children:[(0,c.jsxs)(ei.yu.Container,{testId:t,type:"large",children:[(0,c.jsxs)(ei.yu.Row,{testId:`${t}-row`,className:"flex flex-col gap-1 [align-items:safe_center]",children:[(0,c.jsx)(ei.yu.Tag,{testId:`${t}-tag-bau`,type:"discount-primary",label:d("discount_suffix",{discount:u}),hideIcon:!0}),(e.product?.image||e.image)&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-media-image`,isLarge:!0,...{src:e.image?.url||e.product?.image?.url||"",alt:e.image?.alternativeText||e.product?.image?.alternativeText||e.product?.name||""}})]}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-body`,className:"!items-start",children:[(0,c.jsx)(ei.yu.Details,{testId:`${t}-details`,title:e.label,description:e.description}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${t}-details-footer`,children:(0,c.jsx)(ei.yu.Price,{testId:`${t}-pricing-variants`,rrp:o(e.prices?.otp[0].perceived_rrp||0),discountedPrice:o(e.prices?.otp[0].discounted_price||0),wrapperClassName:"flex-grow",isDiscountTrailing:!0})})]})]}),(0,c.jsxs)("div",{className:"mt-3 flex items-center gap-3",children:[(0,c.jsx)(Q.Q.Button,{testId:`cart
3-drawer-button-pill-${l}`,onClick:()=>{b?i(Number(e.productOtpID)):s({productId:Number(e.productOtpID),quantity:1,productType:"OTPBUMP",schedule:"",path:"",allowToggle:!1,petType:""})},variant:"secondary",width:"fill",leftIcon:ed.A,children:b?d("cart_bumps_remove_button_text"):d("cart_bumps_add_button_text")}),(0,c.jsx)("div",{onClick:()=>{m(e=>e.includes(l)?e.filter(e=>e!==l):[...e,l])},className:"cursor-pointer transition-transform duration-300",children:(0,c.jsx)(en.A,{className:`h-8 w-8 transition-transform duration-300 ${p.includes(l)?"rotate-180":""}`,"aria-hidden":"true"})})]}),(0,c.jsxs)("div",{className:`overflow-hidden transition-all duration-300 ${p.includes(l)?"max-h-[9999px]":"max-h-0"}`,children:[(0,c.jsxs)("div",{className:"mt-3 flex flex-col gap-4 border-t bg-white py-3",children:[(0,c.jsx)("p",{className:"text-primary-text text-body-text-16-semibold",children:d("tabs_section_header_text")}),e.benefitPoints&&e.benefitPoints.length>0&&(0,c.jsx)(eo.o1,{testId:`cart-drawer-label-group-${l}`,wrapperClassName:"flex flex-col !gap-2",children:e.benefitPoints.map((e,t)=>(0,c.jsx)(eo.JU.Item,{testId:`cart-drawer-label-${l}-${t}`,label:e.label,size:"sm",Icon:e=>(0,c.jsx)(ec.A,{...e,className:"text-positive-text"}),wrapperClassName:"[&>div>div]:!font-normal"},t))})]}),h&&(0,c.jsxs)(ex.t.Root,{defaultValue:"tab0",testId:`${t}-tabs-${l}`,children:[(0,c.jsxs)(ex.t.List,{"aria-label":"Product Information Tabs",testId:`${t}-tabs-list-${l}`,children:[(0,c.jsx)(ex.t.Trigger,{value:"tab0",testId:`${t}-tab-trigger-${l}-vet-reviewed`,trackId:`${t}-tab-trigger-${l}-vet-reviewed`,children:(0,c.jsxs)(c.Fragment,{children:[x?.[0].split(" ")[0],(0,c.jsx)("br",{}),x?.[0].split(" ").slice(1).join(" ")]})},"tab-trigger-vet-reviewed"),(0,c.jsx)(ex.t.Trigger,{value:"tab1",testId:`${t}-tab-trigger-${l}-key-ingredients`,trackId:`${t}-tab-trigger-${l}-key-ingredients`,children:(0,c.jsxs)(c.Fragment,{children:[x?.[1].split(" ")[0],(0,c.jsx)("br",{}),x?.[1].split(" ").slice(1).join(" ")]})},"tab-trigger-key-ingredients"),(0,c.jsx)(ex.t.Trigger,{value:"tab2",testId:`${t}-tab-trigger-${l}-directions`,trackId:`${t}-tab-trigger-${l}-directions`,children:x?.[2]&&(0,c.jsxs)(c.Fragment,{children:[x?.[2].split(" ")[0],(0,c.jsx)("br",{}),x?.[2].split(" ").slice(1).join(" ")]})},"tab-trigger-directions")]}),(0,c.jsx)(ex.t.Content,{value:"tab0",testId:`${t}-tab-content-${l}-vet-reviewed`,children:(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-primary-text text-body-text-16 mb-4",children:(0,c.jsx)("div",{dangerouslySetInnerHTML:{__html:"object"==typeof r?.items?.[l]?.vetQuote?r?.items?.[l]?.vetQuote?.quote||"":r?.items?.[l]?.vetQuote||""}})}),(0,c.jsx)(eo.JU.Item,{testId:`${t}-vet-label-${l}`,label:r?.items?.[l]?.vetQuote?.vet?.fullname,description:r?.items?.[l]?.vetQuote?.vet?.honours+", "+r?.items?.[l]?.vetQuote?.vet?.short_description,size:"md",imageSrc:r?.items?.[l]?.vetQuote?.vet?.avatar?.url||"",assetType:"image"})]})},"tab-content-vet-reviewed"),(0,c.jsx)(ex.t.Content,{value:"tab1",testId:`${t}-tab-content-${l}-key-ingredients`,children:(0,c.jsx)(ep.yq,{testId:`${t}-comparison-table-${l}`,wrapperClassName:"w-full",width:"100%",children:y?.map((e,t)=>(0,c.jsx)(ep.ck,{testId:"comparison-table-item",label:e.productIngredient.label,leadingContent:"image",imageSrc:e.productIngredient.secondaryImage?.url??e.productIngredient.image?.url,description:e.productIngredient.shortDescription??e.productIngredient.description,divider:t!==y.length-1,wrapperClassName:"w-full"},e.productIngredient.id))})},"tab-content-key-ingredients"),(0,c.jsx)(ex.t.Content,{value:"tab2",testId:`${t}-tab-content-${l}-directions`,children:e.product?.usageRecommendations?.length?(0,c.jsx)("div",{className:"p-4",children:(0,c.jsx)(em.X.FeedingGuide.Group,{testId:`${t}-feeding-guide-${l}`,columns:2,labels:[d("dog_size"),n?d("daily"):d("daily")+(g?"":d("tub_size"))],children:r?.items?.[l]?.product?.usageRecommendations?.map((e,r)=>{let a=e.dogSize.label,s=e.dailyAmount,i=isNaN(Number(e.dailyAmount))?1:Number(e.dailyAmount);return(0,c.jsx)(em.X.FeedingGuide.Row,{testId:`${t}-feeding-guide-row-${l}-${r}`,quantity:i,labels:[a,`${s} ${f}${1!==i?"s":""}`],hideIcons:!0,children:e.dogSize.weight},`feeding-guide-row-${r}`)})})}):(0,c.jsx)("div",{className:"text-primary-text text-body-text-14",dangerouslySetInnerHTML:{__html:e.product?.usageInstructions||""}})},"tab-content-directions")]})]})]},l)})]})},eh=e=>{let{StickyCta:t,preCtaElement:r}=e;return(0,c.jsxs)("div",{className:"flex flex-col items-center gap-3 pt-1",children:[r,(0,c.jsx)(Q.Q.Button,{...t,children:t.text}),(0,c.jsx)(Q.gs.PaymentTypes,{testId:"payment_types",hideText:!0})]})},eb=e=>{let{testId:t,mainProductsBumpOffers:r,billingText:a,findPrices:s,removeFromCart:i,specialBumpOfferProductId:l}=e,{t:n}
3=(0,X.bl)("cart_drawer"),d=ea();return(0,c.jsx)(c.Fragment,{children:r&&r.items&&r.items.length>0&&(0,c.jsx)(ei.Bv,{testId:`${t}-main-products-line-item-group`,type:r.type||"large",children:r.items.filter(e=>e.cartItem?.productId!==l).map((e,r)=>{let l=e.cartItem?.quantity||1,o=l>1?`${l}x ${e.label}`:e.label;return(0,c.jsx)("div",{className:0!==r?"border-t border-[#D8DADF]":"",children:(0,c.jsxs)(ei.yu.Container,{testId:`${t}-main-product-line-item-${r}`,type:"inline",children:[e.product.image&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-main-product-line-item-media-image-${r}`,src:e.product.image.url,alt:e.product.image.alternativeText||e.product.name||""}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-main-product-line-item-content-${r}`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(ei.yu.Details,{testId:`${t}-main-product-line-item-details-${r}`,title:o,description:"function"==typeof a?a(e,r):a}),(0,c.jsx)(ei.yu.Price,{testId:`${t}-main-product-line-item-pricing-variants-${r}`,rrp:d(s(e).price*l||0),discountedPrice:d(s(e).discounted_price*l||0),isStacked:!0})]}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${t}-main-product-line-item-details-footer-${r}`,children:(0,c.jsx)("div",{className:"cursor-pointer",onClick:()=>i(Number(e.cartItem.productId)),children:(0,c.jsx)("p",{className:"text-primary-text text-body-text-14 underline",children:n("remove")})})})]})]})},e.cartItem.productId)})})})};var eg=r(16026),ef=r(43550);let ey=e=>{let{testId:t,mainProducts:r,billingText:a,findPrices:s,quantityChange:i,removeMainProductFromCart:l,handleToggleSubOtp:n,otpToggleTextV2:d=!1,hasMainBumps:o,isSpecialBumpOfferOnlyInCart:p,maxCartQuantity:m}=e,{t:x}=(0,X.bl)("cart_drawer"),u=ea();return(0,c.jsx)(c.Fragment,{children:r&&r.items&&r.items.length>0&&(0,c.jsx)(ei.Bv,{testId:`${t}-main-products-line-item-group`,type:r.type||"large",children:r.items.map((e,h)=>
3{let b,g=s(e).sub_discount_percentage,f=e.cartProduct,y=Math.min(m??10,(b=e.cartItem.productType.toLowerCase(),f.prices[b]).length,f.maxQuantity??10);return(0,c.jsxs)("div",{className:(0,V.cn)("border-b border-[#D8DADF]",h===r.items.length-1&&(!o||o&&p)&&"border-b-0"),children:[(0,c.jsxs)(ei.yu.Container,{testId:`${t}-main-product-line-item-${h}`,type:"inline",children:[e.cartProduct.image&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-main-product-line-item-media-image-${h}`,src:e.cartProduct.image.url,alt:e.cartProduct.image.alternativeText||e.cartProduct.name||""}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-main-product-line-item-content-${h}`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(ei.yu.Details,{testId:`${t}-main-product-line-item-details-${h}`,title:e.cartProduct.name,description:"function"==typeof a?a(e,h):a}),(0,c.jsx)(ei.yu.Price,{testId:`${t}-main-product-line-item-pricing-variants-${h}`,rrp:u(s(e).price||0),discountedPrice:u(s(e).discounted_price||0),isStacked:!0})]}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${t}-main-product-line-item-details-footer-${h}`,children:(0,c.jsx)(ei.yu.Quantity,{testId:`${t}-main-product-line-item-toggle-quantity-${h}`,initialQuantity:e.cartItem.quantity,maxQuantity:y,onQuantityChange:t=>i(e)(t),onRemove:()=>l(e)})})]})]}),e.cartItem.allowToggle?(0,c.jsx)(ef.l,{selected:"SUB"===e.cartItem.productType,onToggle:()=>n(e),testId:`${t}-subscription-toggle-${h}`,alignment:"right",hasBackground:!0,wrapperClassName:"mb-4 mt-2",children:(0,c.jsx)(ef.l.Heading,{children:"SUB"===e.cartItem.productType?x("congrats_best_price"):(0,eg.nr)(x(d?"subscribe_save_percentage_2":"subscribe_save_percentage",{sub_discount_percentage:g}))})}):null]},e.cartItem.productId)})})})},e_=e=>{let{testId:t="cart-drawer",wrapperClassName:r="",heading:a,StickyCta:s,preCtaElement:i,mainProducts:l,mainProductsBumpOffers:n,addonProducts:d,bumpOffers:o,open:p,onOpenChange:m,checkIfItemInCart:x,addToCart:u,removeFromCart:h,removeMainProductFromCart:b,quantityChange:g,billingText:f,handleToggleSubOtp:y,maxCartQuantity:_,specialBumpOfferProductId:v,isLoading:j,isError:w=!1,cartTotalQuantity:C,loadingItemsNumber:I,stickyRef:N,bestSellers:$,progressBar:k,region:L=J.t9}=e,{t:P}=(0,X.bl)("cart_drawer"),T=(0,Y.useRouter)(),B=(n&&n.items&&n.items.length>0)??!1,S=(d&&d.items&&d.items.length>0)??!1,A=n?.items?.length===1&&(n?.items?.some(e=>e?.productOtpID===v)??!1);return(0,c.jsxs)(K.c,{open:p,onOpenChange:m,title:`${a} (${C} ${1===C?P("item.singular"):P("item.plural")})`,description:"",testId:"cart-drawer-sheet",height:"full",CtaComponent:!w&&C>0?(0,c.jsx)(eh,{StickyCta:s,preCtaElement:i}):null,removeSpacing:!0,ButtonDockBackground:"white",children:[w?(0,c.jsxs)("div",{className:"rb-xs:px-6 flex h-full w-full flex-col items-center justify-center gap-8 px-4 py-10",children:[(0,c.jsx)(q,{className:"rb-sm:max-w-[230px] mx-auto w-full max-w-[150px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-24 text-primary-text text-center",children:P("error_fetching_cart_data")}),(0,c.jsx)(Q.Q.Button,{variant:"primary",size:"md",onClick:()=>location.reload(),testId:"cart-drawer-empty-cart-button",width:"hug",children:P("refresh_page")})]}):C>0?(0,c.jsx)(c.Fragment,{children:j?(0,c.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center p-4",children:[...Array(I)].map((e,t)=>(0,c.jsx)("div",{className:"mb-2 h-[120px] w-full animate-pulse flex-col gap-6 rounded-2xl border-2 bg-white p-3 shadow-md",children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col justify-between gap-2",children:[(0,c.jsx)("div",{className:"flex h-1/4 w-5/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-3/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-full bg-gray-200"})]})},t))}):(0,c.jsxs)("div",{className:r,children:[k?.display&&(0,c.jsx)(Z,{...k,testId:"cart-drawer-progress-bar",wrapperClassName:"rb-xs:px-6 px-4"}),(0,c.jsxs)("div",{className:"rb-xs:px-6 flex flex-col px-4 pb-4",children:[l&&l.items&&l.items.length>0&&(0,c.jsx)(ey,{testId:t,mainProducts:l,findPrices:ee,quantityChange:g,handleToggleSubOtp:y,otpToggleTextV2:l.otpToggleTextV2,billingText:f,removeMainProductFromCart:b,maxCartQuantity:_,hasMainBumps:B,isSpecialBumpOfferOnlyInCart:A}),B&&(0,c.jsx)(eb,{testId:t,mainProductsBumpOffers:n,specialBumpOfferProductId:v,findPrices:ee,billingText:f,removeFromCart:h}),S&&(0,c.jsx)(el,{testId:t,addonProducts:d,checkIfItemInCart:x,addToCart:u,removeFromCart:h})]}),o&&o.items&&o.items.length>0&&(0,c.jsx)(eu,{testId:t,bumpOffers:o,checkIfItemInCart:x,addToCart:u,removeFromCart:h,region:L})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"rb-xs:px-6 rb-xs:py-12 rb-sm:py-16 flex h-full w-full flex-col items-center justify-center gap-4 px-4 py-10",children:[(0,c.jsx)(z,{className:"rb-xs:max-w-[88px] rb-xs:h-[88px] mx-auto h-[64px] w-full max-w-[64px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-16-sans rb-xs:text-header-text-20-sans text-primary-text text-center",children:P("your_cart_is_empty")})]}),(0,c.jsx)("div",{className:"bg-custom-gray-NEUTRAL h-full py-8",children:$&&$.length>0&&(0,c.jsx)(U.O,{testId:"cards_carousel",trackId:"cart-bestsellers-carousel",textBlock:{heading:`${P("bestsellers_heading")}`,variant:"sub-section-banner",alignment:"left",wrapperClassName:"[&_h2]:text-[18px] rb-xs:[&_h2]:text-[20px] [&_h2]:font-inter [&_h2]:font-semibold [&_h2]:leading-[1.2] [&_h2]:text-primary-text [&_h2]:text-left"},hasControls:$.length>3,wrapperClassName:"px-4 rb-xs:px-8 rb-sm:px-6 [&>div]:flex [&>div]:flex-col [&>div]:h-full [&>div]:justify-between [&>div>div>div:first-child]:pb-4",slideClassName:"flex-none !basis-auto w-[138px] rb-xs:w-[170px] rb-sm:w-[158px] mr-2 rb-xs:mr-2 last:mr-0",button:{children:`${P("shop_all_products")}`,onClick:()=>{m(!1),T.push("/collections")},width:"fill",size:"md",orientation:"stacked"},children:$?.map((e,t)=>{let r=e.url||"";return(0,c.jsx)(W.FA.Minimal,{testId:`bestseller-tile-${t}`,title:e.title,bodyCopy:e.description,imageSrc:e.image,imageAlt:e.imageAlt||"Best seller",buttonText:P("shop_now"),action:{type:"link",href:`/products${r}`},isClickable:!1},t)}
3)})})]}),(0,c.jsx)("div",{ref:N})]})};var ev=r(81379),ej=r(42921),ew=r(71598),eC=r(96673);let eI=()=>{(0,Y.useRouter)();let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)(),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),f=(0,_.d0)(),y=(0,_.IM)(),j=(0,L.A)(),w=(0,M.o_)(),C=(0,O._D)(),{setIsMiniCartModalOpen:I}=(0,O.xS)(),N=(0,v.gH)(),A=(0,v.G$)(),{setIsCheckoutLoading:R,setCheckoutError:z}=(0,v.Nc)();(0,B.j)(N,R);let H=l?.bestSellers??void 0,q=a?.filter(e=>"FreeGiftOffer"===e.__typename),Q=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),U=(0,F.M6)(l?.cartBumps),V=(0,b.M)(),G=(0,u.u)("jhcaBumpOfferCart"),Z=(0,$.useMemo)(()=>(0,eC.YF)(V),[V]),K=(0,$.useMemo)(()=>{if(!G)return U;if(!Z)return U.filter(e=>!(0,eC.T_)(e.label));let e=eC.D[Z];return U.map(t=>(0,eC.T_)(t.label)?{...t,productOtpID:e.id,image:{...t.image||{},url:e.image},product:{...t.product,image:{...t.product?.image||{},url:e.image}},prices:{...t.prices,otp:t.prices?.otp?.filter(t=>Number(t.product_id)===e.id)??[]}}:t)},[U,G,Z]),W=a?.filter(e=>"Page"===e.__typename)??[],J=a?.filter(e=>"BumpOffer"===e.__typename)??[],X=n.some(e=>e.productType===o.Xk),ee=W[W.length-1]?.documentId??null,{removeMainProductFromCart:et,quantityChange:er,handleToggleSubOtp:ea,checkIfItemInCart:es,handleCheckoutClick:ei}=k({productItems:W,numOfPages:s,specialBumpOffer:Q}),{setIsMinimumSpendFreeShipping:el,calculateProgress:en}=(0,M.HH)(),ed=(0,M.Mg)(),ec=(0,M.wD)(),{isFrench:eo}=(0,T.A)();(0,$.useEffect)(()=>{el(i,X),en(i)},[i,en,el,X]);let ep=Math.max(...W.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r)||0})),em=ev.JC&&eo,ex=e("discount_suffix"),eu=ex.split(" ").map(e=>"rabais"===e?e.toUpperCase():e).join(" "),eh=e(ev.pw?"free_shipping_only_uk":"free_shipping_only"),eb=eh.toLowerCase().split(" ").map((e,t)=>1===t?e.toUpperCase():e).join(" "),eg=ec?`<strong>${e("all_yours")}</strong> ${ep>0?`${ep}${em?eu:ex}`:""} ${q.length>0?`, ${e("free_gift")}`:""}${ep>0||q.length>0?` ${em?"et":"&"} `:""}${em?eb:eh}`:em?`${e("free_shipping_on_order")} ${j(ej.vP)}`:`<span class="font-bold">${j(w)}</span> ${e("away_from_worth_short")} ${j(ej.vP)}!`,{height:ef}=(0,S.U)(),ey=(0,$.useRef)(null),eI=Math.max(0,Math.floor((ef-48-(ey.current?.clientHeight||0))/136));return(0,c.jsx)(e_,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer-story",open:C,onOpenChange:()=>{I(!1),z(null)},preCtaElement:(0,c.jsx)(x.A,{className:"!p-0",pageDocumentId:ee}),StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${j(i)}`,onClick:()=>ei(),variant:"primary",width:"fill",isLoading:N,disabled:N,leftIcon:(0,c.jsx)(D,{}),error:A?e("internal_error"):void 0},progressBar:{display:!0,percentage:ec?100:ed,text:eg},mainProducts:{testId:"main-products",type:"main",items:W,otpToggleTextV2:ev.pw},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:J},addonProducts:{testId:"addon-products",type:"addon",items:[...q,Q?[Q]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:K},checkIfItemInCart:es,addToCart:d,removeFromCart:y,removeMainProductFromCart:et,quantityChange:er,b
3illingText:(e,t)=>(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:ea,specialBumpOfferProductId:Q?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:f,loadingItemsNumber:eI,stickyRef:ey,bestSellers:H,region:ev.pw?E.ij.UK:E.ij.US})};var eN=r(22591),e$=r(41306);let ek=e=>{let{isBundle:t,testId:r,mainProductsBumpOffers:a,billingText:s,findPrices:i,removeFromCart:l,specialBumpOfferProductId:n}=e,{t:d}=(0,X.bl)("cart_drawer"),o=(0,L.A)();return(0,c.jsx)(c.Fragment,{children:a&&a.items&&a.items.length>0&&(0,c.jsx)(ei.Bv,{testId:`${r}-main-products-line-item-group`,type:a.type||"large",children:a.items.filter(e=>e.cartItem?.productId!==n).map((e,a)=>{let n=e.cartItem?.quantity||1,p=n>1?`${n}x ${e.label}`:e.label;return(0,c.jsx)("div",{className:0===a||t?"":"border-t border-[#D8DADF]",children:(0,c.jsxs)(ei.yu.Container,{testId:`${r}-main-product-line-item-${a}`,type:"inline",children:[e.product.image&&(0,c.jsx)(ei.yu.Image,{testId:`${r}-main-product-line-item-media-image-${a}`,src:e.product.image.url,alt:e.product.image.alternativeText||e.product.name||""}),(0,c.jsxs)(ei.yu.Content,{testId:`${r}-main-product-line-item-content-${a}`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(ei.yu.Details,{testId:`${r}-main-product-line-item-details-${a}`,title:p,description:"function"==typeof s?s(e,a):s}),!t&&(0,c.jsx)(ei.yu.Price,{testId:`${r}-main-product-line-item-pricing-variants-${a}`,rrp:o(i(e).price*n||0),discountedPrice:o(i(e).discounted_price*n||0),isStacked:!0})]}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${r}-main-product-line-item-details-footer-${a}`,children:(0,c.jsx)("div",{className:"cursor-pointer",onClick:()=>l(Number(e.cartItem.productId)),children:(0,c.jsx)("p",{className:"text-primary-text text-body-text-14 underline",children:d("remove")})})})]})]})},t?e.cartItem.productId:`${e.cartItem.productId}-bundle`)})})})};var eL=r(36047);let eP=JSON.parse('{"/products/probiotic-chews-dogs":{"category":"probiotics","productIds":[154620]},"/products/tailored-probiotic-allergy-immune":{"category":"allergy-itch","productIds":[154626,154628,154624]},"/products/advanced-joint-care-chew":{"category":"mobility","productIds":[155025,155027,155029,155031]},"/products/joint-chews-for-dogs":{"category":"mobility","productIds":[154511]},"/products/probiotic-chews-tailored":{"category":"probiotics","productIds":[155009,155007,155011,155013]},"/products/dog-dental-formula":{"category":"dental","productIds":[154396]}}'),eT=Object.keys(eL.q),eB=Object.keys(eP);var eS=r(83210),eA=r(53275),eD=r(23074),eF=r(24693),eO=r(27886),eM=r.n(eO);let eE=e=>{let{item:t}=e,r=(0,_.AP)(),a=(0,_.Ts)(),s=(0,L.A)(),i=(0,_.IM)(),l=(0,_.LK)(),n=t.cartItem.productType===o.Xk,d=(0,eN.bl)(n),p=d.every(e=>a.some(t=>t.productId===e)),m=(0,e$.S)()({mainProducts:[{productId:Number(t.cartItem.productId),quantity:t.cartItem.quantity}],bumpOfferProducts:d.map(e=>({productId:e,quantity:t.cartItem.quantity}))});if(p)return null;let x=(0,eN.A3)(Number(t.cartItem.productId)),u=m.discount_percentage,h=`Upgrade To Dental Kit | ${s(m.discounted_total)}`,b=n?"Shipped and billed every 30 days":"",g=[t.cartItem.path===`/products/${eF.Sv}`?"ProBright\xae Advanced":"ProBright\xae","Dental Sticks","Dental Finger Wipes"];return(0,c.jsxs)("div",{className:"bg-dental-bg mb-3 rounded-2xl p-4",children:[(0,c.jsxs)("div",{className:"rb-xs:max-w-[550px] rb-sm:max-w-none rb-xs:flex-row rb-xs:gap-6 mx-auto flex w-full flex-col items-center justify-center gap-3",children:[(0,c.jsxs)("div",{className:"rb-xs:justify-end relative flex w-full items-center justify-center",children:[(0,c.jsx)(eA.A,{src:x,alt:"Dental Kit",width:195,height:109,className:"-mr-8"}),(0,c.jsxs)("div",{className:`font-archivo bg-positive-text flex h-16 w-16 flex-none flex-col items-center justify-center rounded-full font-bold text-white ${eM().className}`,children:[(0,c.jsxs)("div",{className:"text-xl leading-none",children:[u,"%"]}),(0,c.jsx)("div",{className:"text-[10px] leading-none",children:"OFF"})]})]}),(0,c.jsx)("div",{className:"text-primary-text text-body-text-16-semibold rb-xs:text-left w-full text-center",children:"Upgrade to the full dental kit for complete dental care, made easy"})]}),(0,c.jsx)("div",{className:"text-primary-text text-body-text-14 rb-xs:text-body-text-14-semibold my-3 flex flex-wrap items-center justify-center gap-1 text-center",children:g.map((e,t)=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"inline-block",children:e},t),t<g.length-1&&(0,c.jsx)("span",{className:"inline-block",children:"+"})]}))}
3),(0,c.jsx)("div",{className:"rb-xs:max-w-[550px] rb-sm:max-w-none mx-auto mb-4 flex w-full flex-wrap items-center justify-center gap-2",children:["Daily dental support with a powder","Chewing action to help fight plaque","Easy wipes for quick, gentle cleaning"].map((e,t)=>(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)("span",{className:"inline-block w-4",children:(0,c.jsx)(eD.A,{})}),(0,c.jsx)("p",{className:"text-body-text-14 text-primary-text",children:e})]},t))}),(0,c.jsx)(Q.Q.Button,{testId:"dental-kit-upgrade_button",variant:"secondary",theme:"default",size:"sm",width:"fill",onClick:()=>{let e=t.cartItem.productType===o.Xk,s=t.cartItem.quantity;d.forEach(e=>{let t=a.find(t=>t.productId===e);if(t)if(t.quantity<=s)i(e);else for(let t=0;t<s;t++)l(e)}),r({productId:(0,w.p7)(t.cartItem.productId),quantity:s,productType:e?o.Xk:o.kM,schedule:e?t.cartItem.schedule:"",path:t.cartItem.path,allowToggle:!1,petType:t.cartItem.petType}),i(t.cartItem.productId)},children:h}),b?(0,c.jsx)("p",{className:"text-caption-text-12 text-primary-text mt-2 text-center",children:b}):null]})};function eR(){return(eR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let ez=e=>$.createElement("svg",eR({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none"},e),d||(d=$.createElement("path",{d:"M11 5.825L6.4 10.4L5 9L12 2L19 9L17.6 10.425L13 5.825V13H11V5.825ZM11 18V15H13V18H11ZM11 22V20H13V22H11Z",fill:"currentColor"}))),eH={treats:"bg-treats-bg",dental:"bg-dental-bg",mobility:"bg-mobility-bg",wellness:"bg-wellness-bg","allergy-itch":"bg-allergy-itch-bg",probiotics:"bg-probiotics-bg"},eq={treats:"bg-treats-darker",dental:"bg-dental-darker",mobility:"bg-mobility-darker",wellness:"bg-wellness-darker","allergy-itch":"bg-allergy-itch-darker",probiotics:"bg-probiotics-darker"},eQ=e=>{let{item:t,category:r}=e,a=(0,_.AP)(),s=(0,_.IM)(),i=t.cartItem.quantity+1,l=i-1,n=t.cartProduct.prices?.sub?.[l],d=n?.perceived_rrp||0,o=n?.discounted_price||0,p=d>0?Math.round((d-o)/d*100):0,m=`Upgrade to a ${i}-month supply & lock in ${p}% off every order`,x=`Billed and shipped ${i} tubs every ${30*i} days`,u=`Upgrade To ${i}-Month Supply | $${o.toFixed(2)}`;return(0,c.jsxs)("div",{className:"relative py-3",children:[(0,c.jsx)("div",{className:"absolute left-4 flex -translate-y-1/2 justify-start",children:(0,c.jsx)("span",{className:"text-caption-text-12-semibold bg-bold-bg inline-block rounded px-2 py-1 text-white",children:"Best Value - Limited Offer!"})}),(0,c.jsxs)("div",{className:(0,eS.cn)("flex w-full flex-col gap-3 rounded-2xl p-4 pt-6",eH[r]),children:[(0,c.jsxs)("div",{className:"flex items-start gap-2",children:[(0,c.jsx)("span",{className:(0,eS.cn)("inline-block flex-none rounded-full p-2",eq[r]),children:(0,c.jsx)(ez,{width:24,height:24,className:"fill-primary-text text-primary-text"})}),(0,c.jsx)("h3",{className:"text-body-text-14-semibold text-primary-text self-center",children:m})]}),(0,c.jsx)("p",{className:"text-body-text-14 text-primary-text",children:x}),(0,c.jsx)(Q.Q.Button,{testId:"lockin-upgrade_button",variant:"secondary",theme:"default",size:"sm",width:"fill",onClick:()=>{let e=t.cartItem.quantity+1,r=(0,j.u)(e),i=(0,w.PF)(t.cartItem.productId),l=`${r}:month`;s(t.cartItem.productId),a({productId:i,quantity:e,productType:t.cartItem.productType,schedule:l,path:t.cartItem.path,allowToggle:t.cartItem.allowToggle,petType:t.cartItem.petType})},children:u})]})]})},eU=e=>{let{item:t,upgradeResult:r}=e,{upgrade:a}=r||{};return r&&r.item.cartItem.productId===t.cartItem.productId?a?.type==="lockin"?(0,c.jsx)(eQ,{item:t,category:a.category||"probiotics"}):a?.type==="dental-kit"?(0,c.jsx)(eE,{item:t}):null:null},eV=e=>{let{isBundle:t,testId:r,mainProducts:a,billingText:s,findPrices:i,quantityChange:l,removeMainProductFromCart:n,handleToggleSubOtp:d,hasMainBumps:p,isSpecialBumpOfferOnlyInCart:m}=e,{t:x}=(0,X.bl)("cart_drawer"),u=(0,L.A)(),h=(e=>{if(!e||0===e.length)return null;for(let t of eT){let r=eL.q[t],a=[...r.productIds.sub.map(e=>e.id),...r.productIds.otp.map(e=>e.id)],s=e.find(e=>e.cartItem.path===t&&a.includes(e.cartItem.productId));if(s&&!e.some(e=>{if(!(0,w.q3)(e.cartItem.productId))return!1;let t=(0,w.HN)(e.cartItem.productId);return a.includes(t)}))return{item:s,upgrade:{type:"dental-kit"}}}for(let t of eB){let r=eP[t],a=e.find(e=>e.cartItem.path===t&&r.productIds.includes(e.cartItem.productId));if(a&&a.cartItem.quantity<o.ib)return{item:a,upgrade:{type:"lockin",category:r.category}}}return null})(a.items);return(0,c.jsx)(c.Fragment,{children:a&&a.items&&a.items.length>0&&(0,c.jsx)(ei.Bv,{testId:`${r}-main-products-line-item-group`,type:a.type||"large",children:a.items.map((e,b)=>{let g=(0,w._8)(e.cartItem.productId),f=i(e).sub_discount_percentage,y=e.cartProduct.name,_=e.cartProduct.image?.url;return(0,c.jsxs)("div",{className:(0,eS.cn)("border-b border-[#D8DADF]",b===a.items.length-1&&(!p||p&&m)&&"border-b-0"),children:[(0,c.jsxs)(ei.yu.Container,{testId:`${r}-main-product-line-item-${b}`,type:"inline",children:[_&&(0,c.jsx)(ei.yu.Image,{testId:`${r}-main-product-line-item-media-image-${b}`,src:_,alt:y}),(0,c.jsxs)(ei.yu.Content,{testId:`${r}-main-product-line-item-content-${b}`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(ei.yu.Details,{testId:`${r}-main-product-line-item-details-${b}`,title:y,description:"function"==typeof s?s(e,b):s}),!t&&(0,c.jsx)(ei.yu.Price,{testId:`${r}-main-product-line-item-pricing-variants-${b}`,rrp:u(i(e)?.price||0),discountedPrice:u(i(e)?.discounted_price||0),isStacked:!0})]}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${r}-main-product-line-item-details-footer-${b}`,children:(0,c.jsx)(ei.yu.Quantity,{testId:`${r}-main-product-line-item-toggle-quantity-${b}`,initialQuantity:e.cartItem.quantity,maxQuantity:g?o.ib:o.Ex,onQuantityChange:t=>l(e)(t),onRemove:()=>n(e)})})]})]}),e.cartItem.allowToggle?(0,c.jsx)(ef.l,{selected:"SUB"===e.cartItem.productType,onToggle:()=>d(e),testId:`${r}-subscription-toggle-${b}
3`,alignment:"right",hasBackground:!0,wrapperClassName:"mb-4 mt-2",children:(0,c.jsx)(ef.l.Heading,{children:"SUB"===e.cartItem.productType?x("congrats_best_price"):x("subscribe_save_percentage",{sub_discount_percentage:f})})}):null,(0,c.jsx)(eU,{item:e,upgradeResult:h})]},t?e.cartItem.productId:`${e.cartItem.productId}-bundle`)})})})},eG=e=>{let{testId:t="cart-drawer",wrapperClassName:r="",heading:a,StickyCta:s,mainProducts:i,mainProductsBumpOffers:l,addonProducts:n,bumpOffers:d,open:o,onOpenChange:p,checkIfItemInCart:m,addToCart:x,removeFromCart:u,removeMainProductFromCart:h,progressBarPercentage:b,quantityChange:g,billingText:f,handleToggleSubOtp:y,specialBumpOfferProductId:_,isLoading:v,isError:j=!1,cartTotalQuantity:I,progressBarText:N,loadingItemsNumber:$,stickyRef:k,bestSellers:L}=e,{t:P}=(0,X.bl)("cart_drawer"),T=(0,Y.useRouter)(),B=(0,e$.S)(),S=(l&&l.items&&l.items.length>0)??!1,A=(n&&n.items&&n.items.length>0)??!1,D=l?.items?.length===1&&(l?.items?.some(e=>e?.productOtpID===_)??!1);return(0,c.jsxs)(K.c,{open:o,onOpenChange:p,title:`${a} (${I} item${1===I?"":"s"})`,description:"",testId:"cart-drawer-sheet",height:"full",CtaComponent:!j&&I>0?(0,c.jsx)(eh,{StickyCta:s}):null,removeSpacing:!0,ButtonDockBackground:"white",children:[j?(0,c.jsxs)("div",{className:"rb-xs:px-6 flex h-full w-full flex-col items-center justify-center gap-8 px-4 py-10",children:[(0,c.jsx)(q,{className:"rb-sm:max-w-[230px] mx-auto w-full max-w-[150px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-24 text-primary-text text-center",children:P("error_fetching_cart_data")}),(0,c.jsx)(Q.Q.Button,{variant:"primary",size:"md",onClick:()=>location.reload(),testId:"cart-drawer-empty-cart-button",width:"hug",children:P("refresh_page")})]}):I>0?(0,c.jsx)(c.Fragment,{children:v?(0,c.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center p-4",children:[...Array($)].map((e,t)=>(0,c.jsx)("div",{className:"mb-2 h-[120px] w-full animate-pulse flex-col gap-6 rounded-2xl border-2 bg-white p-3 shadow-md",children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col justify-between gap-2",children:[(0,c.jsx)("div",{className:"flex h-1/4 w-5/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-3/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-full bg-gray-200"})]})},t))}):(0,c.jsxs)("div",{className:r,children:[(0,c.jsx)(Z,{percentage:b,testId:"cart-drawer-progress-bar",text:N,wrapperClassName:"rb-xs:px-6 px-4"}),(0,c.jsxs)("div",{className:"rb-xs:px-6 flex flex-col px-4 pb-4",children:[i&&i.items&&i.items.length>0&&(0,c.jsx)(eV,{isBundle:!1,testId:t,mainProducts:i,findPrices:e=>{if((0,w.q3)(e.cartItem.productId)){let{isSub:t}=(0,C.T)(e.cartItem.productType),r=(0,w.Gh)(e.cartItem.productId).actualProductId,a=(0,eN.bl)(t),s=B({mainProducts:[{productId:r,quantity:e.cartItem.quantity}],bumpOfferProducts:a.map(t=>({productId:t,quantity:e.cartItem.quantity}))}),i=ee(e);return{price:s.rrp_total,discounted_price:s.discounted_total,discount_percentage:s.discount_percentage,sub_discount_percentage:i.sub_discount_percentage}}return ee(e)},quantityChange:g,handleToggleSubOtp:y,billingText:f,removeMainProductFromCart:h,hasMainBumps:S,isSpecialBumpOfferOnlyInCart:D}),S&&(0,c.jsx)(ek,{isBundle:!1,testId:t,mainProductsBumpOffers:l,specialBumpOfferProductId:_,findPrices:ee,billingText:f,removeFromCart:u}),A&&(0,c.jsx)(el,{testId:t,addonProducts:n,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]}),d&&d.items&&d.items.length>0&&(0,c.jsx)(eu,{testId:t,bumpOffers:d,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"rb-xs:px-6 rb-xs:py-12 rb-sm:py-16 flex h-full w-full flex-col items-center justify-center gap-4 px-4 py-10",children:[(0,c.jsx)(z,{className:"rb-xs:max-w-[88px] rb-xs:h-[88px] mx-auto h-[64px] w-full max-w-[64px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-16-sans rb-xs:text-header-text-20-sans text-primary-text text-center",children:P("your_cart_is_empty")})]}),(0,c.jsx)("div",{className:"bg-custom-gray-NEUTRAL h-full py-8",children:L&&L.length>0&&(0,c.jsx)(U.O,{testId:"cards_carousel",trackId:"cart-bestsellers-carousel",textBlock:{heading:`${P("bestsellers_heading")}`,variant:"sub-section-banner",alignment:"left"},hasControls:L.length>3,wrapperClassName:"px-4 rb-xs:px-8 rb-sm:px-6 h-full [&>div]:flex [&>div]:flex-col [&>div]:h-full [&>div]:justify-between [&>div>div>div:first-child]:pb-4",slideClassName:"flex-none !basis-auto w-[138px] rb-xs:w-[170px] rb-sm:w-[158px] mr-2 rb-xs:mr-2 last:mr-0",button:{children:`${P("shop_all_products")}`,onClick:()=>{p(!1),T.push("/collections")},width:"fill",size:"md",orientation:"stacked"},children:L?.map((e,t)=>{let r=e.url||"";return(0,c.jsx)(W.FA.Minimal,{testId:`bestseller-tile-${t}`,title:e.title,bodyCopy:e.description,imageSrc:e.image,imageAlt:e.imageAlt||"Best seller",action:{type:"link",href:`/products${r}`},isClickable:!1},t)}
3)})})]}),(0,c.jsx)("div",{ref:k})]})},eZ=()=>{(0,Y.useRouter)();let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)(),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),x=(0,_.d0)(),u=(0,_.IM)(),b=(0,L.A)(),f=(0,M.o_)(),y=(0,O._D)(),{setIsMiniCartModalOpen:j}=(0,O.xS)(),w=(0,v.gH)(),{setIsCheckoutLoading:C}=(0,v.Nc)();(0,B.j)(w,C);let I=l?.bestSellers??void 0,N=a?.filter(e=>"FreeGiftOffer"===e.__typename),T=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),A=(0,F.M6)(l?.cartBumps),E=a?.filter(e=>"Page"===e.__typename)??[],R=a?.filter(e=>"BumpOffer"===e.__typename)??[],{removeMainProductFromCart:z,quantityChange:H,handleToggleSubOtp:q,checkIfItemInCart:Q,handleCheckoutClick:U}=k({productItems:E,numOfPages:s,specialBumpOffer:T}),{setIsMinimumSpendFreeShipping:V,calculateProgress:G}=(0,M.HH)(),Z=(0,M.Mg)(),K=(0,M.wD)();(0,$.useEffect)(()=>{V(i,n.some(e=>e.productType===o.Xk)),G(i)},[i,n,G,V]);let W=Math.max(...E.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r)||0})),J=K?`<strong>${e("all_yours")}</strong> ${W>0?`${W}${e("discount_suffix")}`:""} ${N.length>0?`, ${e("free_gift")}`:""}${W>0||N.length>0?" & ":""}${e("free_shipping_only")}`:`<span class="font-bold">${b(f)}</span> ${e("away_from_worth_short")} ${b(ej.vP)}!`,{height:X}=(0,S.U)(),ee=(0,$.useRef)(null),et=Math.max(0,Math.floor((X-48-(ee.current?.clientHeight||0))/136));return(0,c.jsx)(eG,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer-story",open:y,onOpenChange:()=>j(!1,"ecom_cart_optexpupgd1"),StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${b(i)}`,onClick:()=>U(),variant:"primary",width:"fill",isLoading:w,disabled:w,leftIcon:(0,c.jsx)(D,{})},progressBarPercentage:K?100:Z,progressBarText:J,mainProducts:{testId:"main-products",type:"main",items:E},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:R},addonProducts:{testId:"addon-products",type:"addon",items:[...N,T?[T]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:A},checkIfItemInCart:Q,addToCart:d,removeFromCart:u,removeMainProductFromCart:z,quantityChange:H,billingText:(e,t)=>
3(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:q,specialBumpOfferProductId:T?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:x,loadingItemsNumber:et,stickyRef:ee,bestSellers:I})};var eK=r(84252);let eW=e=>{let{testId:t="cart-drawer",wrapperClassName:r="",heading:a,StickyCta:s,mainProducts:i,mainProductsBumpOffers:l,addonProducts:n,bumpOffers:d,open:o,onOpenChange:p,checkIfItemInCart:m,addToCart:x,removeFromCart:u,removeMainProductFromCart:h,quantityChange:b,billingText:g,handleToggleSubOtp:f,specialBumpOfferProductId:y,isLoading:_,isError:v=!1,cartTotalQuantity:j,loadingItemsNumber:w,stickyRef:C,bestSellers:I,showItemAddedNotification:N=!1,progressBar:k}=e,{t:L}=(0,X.bl)("cart_drawer"),P=(0,Y.useRouter)(),[T,B]=(0,$.useState)(!1),[S,A]=(0,$.useState)(!1),D=(0,$.useRef)(null),F=(0,$.useRef)(!1);(0,$.useEffect)(()=>{if(o&&N&&!F.current){B(!0),A(!1),F.current=!0;let e=setTimeout(()=>{A(!0)},3e3);return()=>clearTimeout(e)}o||(F.current=!1)},[o,N]);let O=(l&&l.items&&l.items.length>0)??!1,M=(n&&n.items&&n.items.length>0)??!1,E=l?.items?.length===1&&(l?.items?.some(e=>e?.productOtpID===y)??!1);return(0,c.jsxs)(K.c,{open:o,onOpenChange:p,title:`${a} (${j} item${1===j?"":"s"})`,description:"",testId:"cart-drawer-sheet",height:"full",CtaComponent:!v&&j>0?(0,c.jsx)(eh,{StickyCta:s}):null,removeSpacing:!0,ButtonDockBackground:"white",children:[v?(0,c.jsxs)("div",{className:"rb-xs:px-6 flex h-full w-full flex-col items-center justify-center gap-8 px-4 py-10",children:[(0,c.jsx)(q,{className:"rb-sm:max-w-[230px] mx-auto w-full max-w-[150px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-24 text-primary-text text-center",children:L("error_fetching_cart_data")}),(0,c.jsx)(Q.Q.Button,{variant:"primary",size:"md",onClick:()=>location.reload(),testId:"cart-drawer-empty-cart-button",width:"hug",children:L("refresh_page")})]}):j>0?(0,c.jsx)(c.Fragment,{children:_?(0,c.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center p-4",children:[...Array(w)].map((e,t)=>(0,c.jsx)("div",{className:"mb-2 h-[120px] w-full animate-pulse flex-col gap-6 rounded-2xl border-2 bg-white p-3 shadow-md",children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col justify-between gap-2",children:[(0,c.jsx)("div",{className:"flex h-1/4 w-5/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-3/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-full bg-gray-200"})]})},t))}):(0,c.jsxs)("div",{className:r,children:[(0,c.jsx)(Z,{percentage:k.percentage,testId:"cart-drawer-progress-bar",text:k.text,wrapperClassName:"rb-xs:px-6 px-4 relative z-10 bg-white"}),T&&(0,c.jsx)("div",{ref:D,className:(0,eS.cn)("overflow-hidden",S&&"animate-slowSlideOut"),onAnimationEnd:()=>{S&&(B(!1),A(!1),F.current=!1)},"data-testid":"item-added-notification",children:(0,c.jsx)("div",{className:"rb-xs:mx-6 border-1 bg-active-shopping mx-4 my-1 flex gap-2 rounded-lg border-[#D8DADF] p-3",children:(0,c.jsx)(eo.JU.Item,{Icon:eK.t["check-circle-green"],assetType:"icon",label:"Item added to Cart",orientation:"landscape",size:"sm",theme:"default"})})}),(0,c.jsxs)("div",{className:"rb-xs:px-6 flex flex-col px-4 pb-4",children:[i&&i.items&&i.items.length>0&&(0,c.jsx)(ey,{testId:t,mainProducts:i,findPrices:ee,quantityChange:b,handleToggleSubOtp:f,billingText:g,removeMainProductFromCart:h,hasMainBumps:O,isSpecialBumpOfferOnlyInCart:E}),O&&(0,c.jsx)(eb,{testId:t,mainProductsBumpOffers:l,specialBumpOfferProductId:y,findPrices:ee,billingText:g,removeFromCart:u}),M&&(0,c.jsx)(el,{testId:t,addonProducts:n,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]}),d&&d.items&&d.items.length>0&&(0,c.jsx)(eu,{testId:t,bumpOffers:d,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"rb-xs:px-6 rb-xs:py-12 rb-sm:py-16 flex h-full w-full flex-col items-center justify-center gap-4 px-4 py-10",children:[(0,c.jsx)(z,{className:"rb-xs:max-w-[88px] rb-xs:h-[88px] mx-auto h-[64px] w-full max-w-[64px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-16-sans rb-xs:text-header-text-20-sans text-primary-text text-center",children:L("your_cart_is_empty")})]}),(0,c.jsx)("div",{className:"bg-custom-gray-NEUTRAL h-full py-8",children:I&&I.length>0&&(0,c.jsx)(U.O,{testId:"cards_carousel",trackId:"cart-bestsellers-carousel",textBlock:{heading:`${L("bestsellers_heading")}`,variant:"sub-section-banner",alignment:"left",wrapperClassName:"[&_h2]:text-[18px] rb-xs:[&_h2]:text-[20px] [&_h2]:font-inter [&_h2]:font-semibold [&_h2]:leading-[1.2] [&_h2]:text-primary-text [&_h2]:text-left"},hasControls:I.length>3,wrapperClassName:"px-4 rb-xs:px-8 rb-sm:px-6 [&>div]:flex [&>div]:flex-col [&>div]:h-full [&>div]:justify-between [&>div>div>div:first-child]:pb-4",slideClassName:"flex-none !basis-auto w-[138px] rb-xs:w-[170px] rb-sm:w-[158px] mr-2 rb-xs:mr-2 last:mr-0",button:{children:`${L("shop_all_products")}`,onClick:()=>{p(!1),P.push("/collections")},width:"fill",size:"md",orientation:"stacked"},children:I?.map((e,t)=>{let r=e.url||"";return(0,c.jsx)(W.FA.Minimal,{testId:`bestseller-tile-${t}`,title:e.title,bodyCopy:e.description,imageSrc:e.image,imageAlt:e.imageAlt||"Best seller",action:{type:"link",href:`/products${r}`},isClickable:!1},t)}
3)})})]}),(0,c.jsx)("div",{ref:C})]})},eJ=()=>{let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)(),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),x=(0,_.d0)(),u=(0,_.IM)(),b=(0,L.A)(),f=(0,M.o_)(),y=(0,O._D)(),{setIsMiniCartModalOpen:j,setShowItemAddedNotification:w}=(0,O.xS)(),C=(0,O.vY)(),I=(0,v.gH)(),{setIsCheckoutLoading:N}=(0,v.Nc)();(0,B.j)(I,N);let T=l?.bestSellers??void 0,A=a?.filter(e=>"FreeGiftOffer"===e.__typename),E=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),R=(0,F.M6)(l?.cartBumps),z=(a?.filter(e=>"Page"===e.__typename)??[]).reverse(),H=a?.filter(e=>"BumpOffer"===e.__typename)??[],{removeMainProductFromCart:q,quantityChange:Q,handleToggleSubOtp:U,checkIfItemInCart:V,handleCheckoutClick:G}=k({productItems:z,numOfPages:s,specialBumpOffer:E}),{setIsMinimumSpendFreeShipping:Z,calculateProgress:K}=(0,M.HH)(),W=(0,M.Mg)(),J=(0,M.wD)();(0,$.useEffect)(()=>{Z(i,n.some(e=>e.productType===o.Xk)),K(i)},[i,n,K,Z]);let X=Math.max(...z.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r)||0})),Y=J?`<strong>${e("all_yours")}</strong> ${X>0?`${X}${e("discount_suffix")}`:""} ${A.length>0?`, ${e("free_gift")}`:""}${X>0||A.length>0?" & ":""}${e("free_shipping_only")}`:`<span class="font-bold">${b(f)}</span> ${e("away_from_worth_short")} ${b(ej.vP)}!`,{height:ee}=(0,S.U)(),et=(0,$.useRef)(null),er=Math.max(0,Math.floor((ee-48-(et.current?.clientHeight||0))/136));return(0,c.jsx)(eW,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer-story",open:y,onOpenChange:()=>{w(!1),j(!1)},StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${b(i)}`,onClick:()=>G(),variant:"primary",width:"fill",isLoading:I,disabled:I,leftIcon:(0,c.jsx)(D,{})},progressBar:{display:!0,percentage:J?100:W,text:Y},mainProducts:{testId:"main-products",type:"main",items:z},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:H},addonProducts:{testId:"addon-products",type:"addon",items:[...A,E?[E]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:R},checkIfItemInCart:V,addToCart:d,removeFromCart:u,removeMainProductFromCart:q,quantityChange:Q,billingText:(e,t)=>
3(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:U,specialBumpOfferProductId:E?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:x,loadingItemsNumber:er,stickyRef:et,bestSellers:T,showItemAddedNotification:C})},eX=JSON.parse('{"q":{"/products/probright-advanced":{"category":"dental","productIds":{"sub":[{"id":154943,"title":"Dental Kit - Extra Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}},{"id":154571,"title":"Dental Kit - Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}},{"id":154570,"title":"Dental Kit - Medium","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}},{"id":154561,"title":"Dental Kit - Large","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}}],"otp":[{"id":154942,"title":"Dental Kit - Extra Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}},{"id":154566,"title":"Dental Kit - Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}},{"id":154552,"title":"Dental Kit - Medium","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}},{"id":154572,"title":"Dental Kit - Large","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_375_600f28df59.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_1440_0aebe764b3.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRBA_768_1f7ad63ef8.jpg"}}]}},"/products/probright":{"category":"dental","productIds":{"sub":[{"id":154940,"title":"Dental Kit - Extra Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}},{"id":154447,"title":"Dental Kit - Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}},{"id":154449,"title":"Dental Kit - Medium","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}},{"id":154448,"title":"Dental Kit - Large","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}}],"otp":[{"id":154939,"title":"Dental Kit - Extra Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}},{"id":154451,"title":"Dental Kit - Small","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}},{"id":154450,"title":"Dental Kit - Medium","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}}
3,{"id":154452,"title":"Dental Kit - Large","images":{"mobile":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_375_b403adf3a9.jpg","desktop":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_1440_5dfe9933c6.jpg","tablet":"https://cdn.cms.thepetlabco.com/Dental_kit_PRB_768_cb68f5b97e.jpg"}}]}}},"H":{"O":[{"sub":154842,"otp":154841},{"sub":154855,"otp":154854}]}}');var eY=r(33717),e1=r(45930);let e0=e=>{let{open:t,onOpenChange:r,onClose:a,children:s,testId:i="dialog"}=e;return(0,c.jsx)(e1._s.Root,{handleOnly:!0,open:t,onOpenChange:r,direction:"bottom",onClose:a,modal:!0,children:(0,c.jsxs)(e1._s.Portal,{children:[(0,c.jsx)(e1._s.Overlay,{"data-testid":`${i}_overlay`,className:"backdrop-filter-safari animate-in fade-in fixed inset-0 z-[100] bg-black/60 backdrop-blur-md duration-150"}),(0,c.jsx)(e1._s.Content,{onPointerDownOutside:e=>{let t=e?.target;t?.closest("[id*='onetrust'], .secondary-modal, .secondary-modal-overlay")&&(e.preventDefault(),e.stopPropagation())},"data-testid":i,className:(0,eS.cn)("rb-sm:justify-center rb-sm:items-center fixed inset-0 z-[101] flex justify-stretch antialiased"),children:(0,c.jsx)("div",{className:(0,eS.cn)("relative flex w-full max-w-[1088px] flex-col overflow-auto","animate-in fade-in zoom-in-95 max-rb-sm:h-dvh max-rb-sm:max-h-dvh rb-sm:max-h-[calc(100dvh_-_48px)] duration-200"),children:(0,c.jsxs)("div",{className:"max-rb-sm:h-full relative",children:[(0,c.jsx)(e1._s.Close,{"data-testid":`${i}-close-button`,className:"rb-sm:p-0 rb-sm:bg-none rb-sm:rounded-none rb-sm:right-8 rb-sm:top-8 absolute right-4 top-4 z-10 flex items-center rounded-full bg-white p-3","aria-label":"Close",children:(0,c.jsx)(eY.A,{className:"rb-sm:w-6 rb-sm:h-6 fill-primary-text h-4 w-4"})}),s]})})})]})})};var e2=r(62049),e3=r(63158),e4=r(22624);let e5=e=>{let{open:t,onOpenChange:r,onClose:a,item:s,imageSrc:i,onContinue:l,onUpgrade:n,upgradeText:d,testId:p="dentalkit-modal"}=e,m=(0,_.AP)(),x=(0,_.IM)(),u=(0,_.Ts)(),h=(0,_.LK)(),b=(0,L.A)(),g=(0,e$.S)(),[f,y]=(0,$.useState)(null),[v,j]=(0,$.useState)(null),C=s.cartItem.productType===o.Xk,I=eX.H.O.map(e=>C?e.sub:e.otp),N=g({mainProducts:[{productId:Number(s.cartItem.productId),quantity:s.cartItem.quantity}],bumpOfferProducts:I.map(e=>({productId:e,quantity:s.cartItem.quantity}))});(0,$.useEffect)(()=>{t||(y(null),j(null))},[t]),(0,$.useEffect)(()=>{let e=e=>{e.persisted&&t&&(r(!1),y(null),j(null))};return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[f,t,r]),(0,$.useEffect)(()=>{v&&"upgrade"===f&&u.some(e=>e.productId===v)&&(j(null),n?.())},[u,v,f,n]);let k=N.discount_percentage,P=s.cartProduct.name,T=`Upgrade your ${P} ${C?"subscription":"purchase"} to the Dental Kit to boost results`,B=C?"Shipped and billed every 30 days":"",S=`Upgrade To Dental Kit | ${b(N.discounted_total)}`,A=[s.cartItem.path===`/products/${eF.Sv}`?{name:"ProBright\xae Advanced",rating:"4.6"}:{name:"ProBright\xae",rating:"4.4"},{name:"Prebiotic Dental Sticks",rating:"4.8"},{name:"Dental Finger Wipes",rating:"4.4"}];return(0,c.jsx)(e0,{open:t,onOpenChange:r,onClose:a,testId:p,children:(0,c.jsxs)("div",{className:(0,eS.cn)("rb-sm:h-auto rb-sm:grid-cols-2 rb-sm:rounded-[32px] rb-sm:flex-row flex h-full grid-cols-1 flex-col bg-white"),children:[(0,c.jsxs)("div",{className:(0,eS.cn)("rb-sm:w-1/2 rb-sm:h-auto rb-sm:rounded-l-[32px] w-full flex-shrink-0 overflow-hidden","bg-dental-bg"),children:[(0,c.jsx)("div",{className:(0,eS.cn)("font-archivo rb-sm:hidden absolute left-4 top-4 text-[12px] font-bold uppercase tracking-wide text-white",eM().className),children:(0,c.jsxs)("div",{className:(0,eS.cn)("inline-flex items-center justify-start gap-2 rounded-lg px-2 py-1","bg-dental/60 backdrop-blur-md"),children:[(0,c.jsx)("span",{className:(0,eS.cn)("inline-block rounded-full p-1 text-[16px]","bg-dental/50"),children:(0,c.jsx)(ez,{width:16,height:16,className:"text-white"})}),(0,c.jsx)("span",{children:d})]})}),i&&(0,c.jsxs)("picture",{children:[i.desktop&&(0,c.jsx)("source",{srcSet:i.desktop,width:530,height:612,media:"(min-width: 1024px)"}),i.tablet&&(0,c.jsx)("source",{srcSet:i.tablet,width:768,height:260,media:"(min-width: 768px)"}),(0,c.jsx)(eA.A,{width:375,height:260,priority:!1,sizes:"(min-width: 1024px) 50vw, 100vw",src:i.mobile,alt:`Dental Kit for ${s.cartProduct.name}`,className:"rb-sm:rounded-l-[32px] pointer-events-none w-full","data-testid":`${p}-image`})]})]}),(0,c.jsxs)("div",{className:(0,eS.cn)("rb-sm:pt-8 rb-sm:px-12 rb-sm:pb-10 rb-sm:w-1/2 rb-sm:justify-center rb-sm:rounded-[32px] flex w-full flex-1 flex-col justify-between gap-6 bg-white p-0 px-0 pt-6"),children:[(0,c.jsxs)("div",{className:"rb-sm:p-0 rb-sm:max-w-none mx-auto flex w-full max-w-[460px] flex-col gap-6 px-4",children:[(0,c.jsxs)("div",{className:"rb-sm:space-y-4 space-y-3",children:[(0,c.jsx)("h2",{className:"text-header-text-18-sans rb-sm
3:text-header-text-20-sans text-primary-text rb-sm:text-left text-center",children:T}),(0,c.jsx)("div",{className:"rb-sm:text-left flex gap-1 text-center",children:A.map((e,t)=>(0,c.jsxs)($.Fragment,{children:[(0,c.jsxs)("div",{className:"border-neutral-bg rb-sm:items-start rb-sm:p-3 flex w-full flex-col items-center justify-center gap-1 rounded-2xl border px-1 py-2",children:[(0,c.jsx)("div",{className:"text-body-text-14 text-primary-text",children:e.name}),(0,c.jsxs)("div",{className:"text-body-text-14-semibold text-primary-text flex items-center gap-1",children:[e.rating,(0,c.jsx)(e2.A,{className:"h-4 w-4 text-[#FF9A0A]"})]})]},t),t<A.length-1&&(0,c.jsx)("div",{className:"text-body-text-14-semibold text-secondary-text self-center",children:"+"})]},t))}),(0,c.jsxs)("div",{className:"rb-sm:justify-start rb-sm:gap-3 flex items-center justify-center gap-2 uppercase",children:[(0,c.jsx)(e3.A,{rrp:`$${N.rrp_total.toFixed(2)}`,discountedPrice:`$${N.discounted_total.toFixed(2)}`,type:"RRP-discountedPrice-lg",testId:`${p}-pricing`}),(0,c.jsx)(e4.jl,{type:"discount-primary",label:`${k}% off`,hideIcon:!0,testId:`${p}-discount-tag`})]})]}),(0,c.jsxs)("div",{"data-testid":`${p}-benefits`,className:"rb-sm:items-start flex flex-col items-center gap-2",children:[(0,c.jsx)("div",{className:"text-primary-text text-body-text-14-semibold mb-1 text-center",children:"3 easy steps for a complete routine:"}),[{icon:"check",text:"Daily dental support with a powder"},{icon:"check",text:"Chewing action to help fight plaque"},{icon:"check",text:"Easy wipes for quick, gentle cleaning"}].map((e,t)=>{let{icon:r,text:a}=e,s=eK.t[r]?eK.t[r]:eK.t.check;return(0,c.jsxs)("div",{className:"text-body-text-14 text-primary-text flex items-start gap-2",children:[(0,c.jsx)("span",{className:"inline-flex h-5 w-5 items-center justify-center",children:(0,c.jsx)(s,{className:"text-positive-text h-4 w-4 shrink-0"})}),(0,c.jsx)("span",{className:"inline-block text-center",children:a})]},t)})]})]}),(0,c.jsxs)("div",{className:(0,eS.cn)("align-self-end rb-sm:gap-3 sticky bottom-0 flex flex-col gap-2","rb-sm:p-0 px-4 py-3","bg-neutral-bg rb-sm:bg-white","border-border-primary rb-sm:border-t-0 border-t"),children:[B&&(0,c.jsx)("div",{className:"rb-sm:text-left text-caption-text-12 text-primary-text text-center",children:B}),(0,c.jsxs)(Q.Q.Group,{testId:`${p}-buttons`,children:[(0,c.jsx)(Q.Q.Button,{variant:"primary",width:"fill",onClick:()=>{y("upgrade");let e=s.cartItem.quantity;I.forEach(t=>{let r=u.find(e=>e.productId===t);if(r)if(r.quantity<=e)x(t);else for(let r=0;r<e;r++)h(t)});let t=(0,w.p7)(s.cartItem.productId);m({productId:t,quantity:e,productType:C?o.Xk:o.kM,schedule:C?s.cartItem.schedule:"",path:s.cartItem.path,allowToggle:!1,petType:s.cartItem.petType}),x(s.cartItem.productId),j(t)},isLoading:"upgrade"===f,disabled:null!==f,testId:`${p}-primary-btn`,children:S}),(0,c.jsx)(Q.Q.Button,{variant:"secondary",width:"fill",onClick:()=>{y("continue"),l?.()},isLoading:"continue"===f,disabled:null!==f,testId:`${p}-secondary-btn`,children:"Continue To Checkout"})]})]})]})]})})},e7={treats:"bg-treats-bg",dental:"bg-dental-bg",mobility:"bg-mobility-bg",wellness:"bg-wellness-bg","allergy-itch":"bg-allergy-itch-bg",probiotics:"bg-probiotics-bg"},e8={treats:"bg-treats/60",dental:"bg-dental/60",mobility:"bg-mobility/60",wellness:"bg-wellness/60","allergy-itch":"bg-allergy-itch/60",probiotics:"bg-probiotics/60"},e6={treats:"bg-treats/50",dental:"bg-dental/50",mobility:"bg-mobility/50",wellness:"bg-wellness/50","allergy-itch":"bg-allergy-itch/50",probiotics:"bg-probiotics/50"},e9=e=>{let{open:t,onOpenChange:r,onClose:a,item:s,category:i,imageSrc:l,onContinue:n,upgradeText:d,testId:o="lockin-modal"}=e,{t:m}=(0,p.Bd)(),x=(0,_.AP)(),u=(0,_.IM)(),h=(0,_.Ts)(),[b,g]=(0,$.useState)(null),[f,y]=(0,$.useState)(null);(0,$.useEffect)(()=>{t||(g(null),y(null))},[t]),(0,$.useEffect)(()=>{f&&"upgrade"===b&&h.some(e=>e.productId===f)&&(y(null),n?.())},[h,f,b,n]),(0,$.useEffect)(()=>{let e=e=>{e.persisted&&t&&(r(!1),g(null),y(null))};return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[b,t,r]);let v=s.cartItem.quantity+1,C=v-1,I=s.cartProduct.prices?.sub?.[C],N=s.cartProduct.packageType,k=m(N?.toLowerCase(),{returnObjects:!0}),L=k.plural?.toLowerCase(),P=I?.perceived_rrp||0,T=I?.discounted_price||0,B=P>0?Math.round((P-T)/P*100):0,S=`Upgrade your ${s.cartProduct.name}
3 subscription to a ${v}-month supply & lock in lifetime savings`,A=`Billed and shipped ${v} ${L} every ${30*v} days`,D=`Upgrade To ${v}-Month Supply | $${T.toFixed(2)}`,F=[{icon:"party",text:`${B}% off every order`},{icon:"package",text:A}];return(0,c.jsx)(e0,{open:t,onOpenChange:r,onClose:a,testId:o,children:(0,c.jsxs)("div",{className:(0,eS.cn)("rb-sm:h-auto rb-sm:grid-cols-2 rb-sm:rounded-[32px] rb-sm:flex-row flex h-full grid-cols-1 flex-col bg-white"),children:[(0,c.jsxs)("div",{className:(0,eS.cn)("rb-sm:w-1/2 rb-sm:h-auto rb-sm:rounded-l-[32px] w-full flex-shrink-0 overflow-hidden",e7[i]),children:[(0,c.jsx)("div",{className:(0,eS.cn)("font-archivo rb-sm:hidden absolute left-4 top-4 text-[12px] font-bold uppercase tracking-wide text-white",eM().className),children:(0,c.jsxs)("div",{className:(0,eS.cn)("inline-flex items-center justify-start gap-2 rounded-lg px-2 py-1",`${e8[i]} backdrop-blur-md`),children:[(0,c.jsx)("span",{className:(0,eS.cn)("inline-block rounded-full p-1 text-[16px]",e6[i]),children:(0,c.jsx)(ez,{width:16,height:16,className:"text-white"})}),(0,c.jsx)("span",{children:d})]})}),l&&(0,c.jsxs)("picture",{children:[l.desktop&&(0,c.jsx)("source",{srcSet:l.desktop,width:530,height:612,media:"(min-width: 1024px)"}),l.tablet&&(0,c.jsx)("source",{srcSet:l.tablet,width:768,height:260,media:"(min-width: 768px)"}),(0,c.jsx)(eA.A,{width:375,height:260,priority:!1,sizes:"(min-width: 1024px) 50vw, 100vw",src:l.mobile,alt:`Product ${s.cartItem.productId} - ${v}x`,className:"rb-sm:rounded-l-[32px] pointer-events-none w-full","data-testid":`${o}-image`})]})]}),(0,c.jsxs)("div",{className:(0,eS.cn)("rb-sm:pt-8 rb-sm:px-12 rb-sm:pb-10 rb-sm:w-1/2 rb-sm:justify-center rb-sm:rounded-[32px] rb-sm:gap-8 flex w-full flex-1 flex-col justify-between gap-6 bg-white p-0 px-0 pt-6"),children:[(0,c.jsxs)("div",{className:"rb-sm:gap-8 rb-sm:px-0 rb-sm:max-w-none mx-auto flex w-full max-w-[492px] flex-col gap-4 px-4",children:[(0,c.jsxs)("div",{className:"space-y-4",children:[(0,c.jsx)("h2",{className:"text-header-text-18-sans rb-sm:text-header-text-20-sans text-primary-text rb-sm:text-left text-center",children:S}),(0,c.jsxs)("div",{className:"rb-sm:justify-start rb-sm:gap-3 mt-4 flex items-center justify-center gap-2 uppercase",children:[(0,c.jsx)(e3.A,{rrp:`$${P.toFixed(2)}`,discountedPrice:`$${T.toFixed(2)}`,type:"RRP-discountedPrice-lg",testId:`${o}-pricing`}),(0,c.jsx)(e4.jl,{type:"discount-primary",label:`${B}% off`,hideIcon:!0,testId:`${o}-discount-tag`})]})]}),(0,c.jsx)("div",{"data-testid":`${o}-benefits`,className:"rb-sm:items-start flex flex-col items-center gap-2",children:F.map((e,t)=>{let{icon:r,text:a}=e,s=eK.t[r]?eK.t[r]:eK.t.check;return(0,c.jsxs)("div",{className:"text-body-text-14 text-primary-text flex items-start gap-2",children:[(0,c.jsx)("span",{className:"inline-flex h-5 w-5 items-center justify-center",children:(0,c.jsx)(s,{className:"h-4 w-4 shrink-0"})}),(0,c.jsx)("span",{className:"inline-block text-center",children:a})]},t)})})]}),(0,c.jsx)("div",{className:(0,eS.cn)("align-self-end sticky bottom-0 flex flex-col gap-3","rb-sm:p-0 px-4 py-3","bg-neutral-bg rb-sm:bg-white","border-border-primary rb-sm:border-t-0 border-t"),children:(0,c.jsxs)(Q.Q.Group,{testId:`${o}-buttons`,children:[(0,c.jsx)(Q.Q.Button,{variant:"primary",width:"fill",onClick:()=>{g("upgrade");let e=s.cartItem.quantity+1,t=(0,j.u)(e),r=(0,w.PF)(s.cartItem.productId),a=`${t}:month`;u(s.cartItem.productId),x({productId:r,quantity:e,productType:s.cartItem.productType,schedule:a,path:s.cartItem.path,allowToggle:s.cartItem.allowToggle,petType:s.cartItem.petType}),y(r)},isLoading:"upgrade"===b,disabled:null!==b,testId:`${o}-primary-btn`,children:D}),(0,c.jsx)(Q.Q.Button,{variant:"secondary",width:"fill",onClick:()=>{g("continue"),n?.()},isLoading:"continue"===b,disabled:null!==b,testId:`${o}-secondary-btn`,children:"Continue To Checkout"})]})})]})]})})},te=JSON.parse('{"/products/probiotic-chews-dogs":{"category":"probiotics","productIds":[154620],"images":{"154620":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/PBC_x2_1440_a259560964.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBC_x2_768_39265c452f.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBC_x2_375_1bdc6623fd.jpg"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/PBC_x3_1440_d7a3f86cfc.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBC_x3_768_f929a15304.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBC_x3_375_11e2a9e489.jpg"}}}},"/products/tailored-probiotic-allergy-immune":{"category":"allergy-itch","productIds":[154626,154628,154624],"images":{"154624":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/TAL_x2_l_1440_2c4a746408.png","tablet":"https://cdn.cms.thepetlabco.com/TAL_x2_l_768_7e4de83dc3.png","mobile":"https://cdn.cms.thepetlabco.com/TAL_x2_l_375_cdfc80b8ea.png"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/TAL_x3_l_1440_830c6eadc3.png","tablet":"https://cdn.cms.thepetlabco.com/TAL_x3_l_768_8c83176415.png","mobile":"https://cdn.cms.thepetlabco.com/TAL_x3_l_375_b35af5263c.png"}},"154626":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/TAL_x2_s_1440_6393ed519f.png","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x2_s_768_4a826ffa0e.png","mobile":"https://cdn.cms.thepetlabco.com/TAL_x2_s_375_0a9b3fb22e.png"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/TAL_x3_s_1440_f2d8ba40e4.png","tablet":"https://cdn.cms.thepetlabco.com/TAL_x3_s_768_c9c462123f.png","mobile":"https://cdn.cms.thepetlabco.com/TAL_x3_s_375_a17feca982.png"}},"154628":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/TAL_x2_m_1440_ceffb4df2b.png","tablet":"https://cdn.cms.thepetlabco.com/TAL_x2_m_768_8f217d086a.png","mobile":"https://cdn.cms.thepetlabco.com/TAL_x2_m_375_89e4e92236.png"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/TAL_x3_m_1440_1814f71462.png","tablet":"https://cdn.cms.thepetlabco.com/TAL_x3_m_768_5ce717e2e2.png","mobile":"https://cdn.cms.thepetlabco.com/TAL_x3_m_375_b9dc895308.png"}}}}
3,"/products/joint-chews-for-dogs":{"category":"mobility","productIds":[154511],"images":{"154511":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/JHC_x2_1440_2b05317905.jpg","tablet":"https://cdn.cms.thepetlabco.com/JHC_x2_768_5cecc73647.jpg","mobile":"https://cdn.cms.thepetlabco.com/JHC_x2_375_0a4b5ce848.jpg"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/JHC_x3_1440_0ead6d399a.jpg","tablet":"https://cdn.cms.thepetlabco.com/JHC_x3_768_8aadb0738b.jpg","mobile":"https://cdn.cms.thepetlabco.com/JHC_x3_375_1722da0b41.jpg"}}}},"/products/probiotic-chews-tailored":{"category":"probiotics","productIds":[155009,155007,155011,155013],"images":{"155007":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x2_s_1440_b72b0c5255.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x2_s_768_d4f59efcdf.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x2_s_375_7508eb4227.jpg"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x3_s_1440_c838c47254.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x3_s_768_62e7fabb9b.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x3_s_375_7197cbeaf3.jpg"}},"155009":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x2_s_1440_b72b0c5255.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x2_s_768_d4f59efcdf.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x2_s_375_7508eb4227.jpg"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x3_s_1440_c838c47254.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x3_s_768_62e7fabb9b.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x3_s_375_7197cbeaf3.jpg"}},"155011":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x2_m_1440_d431f09cdb.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x2_m_768_f48ebb6bce.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x2_m_375_ac88d94e0f.jpg"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x3_m_1440_6868b1d254.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x3_m_768_3d11f2535c.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x3_m_375_b1a1b8f703.jpg"}},"155013":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x2_l_1440_bf97bf1719.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x2_l_768_84f56ab9ae.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x2_l_375_cb2aa43caf.jpg"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/PBCT_x3_l_1440_ddfd823125.jpg","tablet":"https://cdn.cms.thepetlabco.com/PBCT_x3_l_768_1fea2c0bcb.jpg","mobile":"https://cdn.cms.thepetlabco.com/PBCT_x3_l_375_308af55bd3.jpg"}}}},"/products/dog-dental-formula":{"category":"dental","productIds":[154396],"images":{"154396":{"2":{"desktop":"https://cdn.cms.thepetlabco.com/MTW_x2_1440_5c6b5a6b43.jpg","tablet":"https://cdn.cms.thepetlabco.com/MTW_x2_768_6c3ee4fff8.jpg","mobile":"https://cdn.cms.thepetlabco.com/MTW_x2_375_ad62bd4217.jpg"},"3":{"desktop":"https://cdn.cms.thepetlabco.com/MTW_x3_1440_a975180cbf.jpg","tablet":"https://cdn.cms.thepetlabco.com/MTW_x3_768_a18a78a8d3.jpg","mobile":"https://cdn.cms.thepetlabco.com/MTW_x3_375_de926d8757.jpg"}}
3}}}'),tt=Object.keys(eX.q),tr=Object.keys(te),ta=e=>{let{testId:t,mainProducts:r,billingText:a,findPrices:s,quantityChange:i,removeMainProductFromCart:l,handleToggleSubOtp:n,hasMainBumps:d,isSpecialBumpOfferOnlyInCart:p}=e,{t:m}=(0,X.bl)("cart_drawer"),x=(0,L.A)();return(0,c.jsx)(c.Fragment,{children:r&&r.items&&r.items.length>0&&(0,c.jsx)(ei.Bv,{testId:`${t}-main-products-line-item-group`,type:r.type||"large",children:r.items.map((e,u)=>{let h=(0,w._8)(e.cartItem.productId),b=s(e).sub_discount_percentage;return(0,c.jsxs)("div",{className:(0,eS.cn)("border-b border-[#D8DADF]",u===r.items.length-1&&(!d||d&&p)&&"border-b-0"),children:[(0,c.jsxs)(ei.yu.Container,{testId:`${t}-main-product-line-item-${u}`,type:"inline",children:[e.cartProduct.image&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-main-product-line-item-media-image-${u}`,src:e.cartProduct.image.url,alt:e.cartProduct.image.alternativeText||e.cartProduct.name||""}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-main-product-line-item-content-${u}`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(ei.yu.Details,{testId:`${t}-main-product-line-item-details-${u}`,title:e.cartProduct.name,description:"function"==typeof a?a(e,u):a}),(0,c.jsx)(ei.yu.Price,{testId:`${t}-main-product-line-item-pricing-variants-${u}`,rrp:x(s(e).price||0),discountedPrice:x(s(e).discounted_price||0),isStacked:!0})]}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${t}-main-product-line-item-details-footer-${u}`,children:(0,c.jsx)(ei.yu.Quantity,{testId:`${t}-main-product-line-item-toggle-quantity-${u}`,initialQuantity:e.cartItem.quantity,maxQuantity:h?o.ib:o.Ex,onQuantityChange:t=>i(e)(t),onRemove:()=>l(e)})})]})]}),e.cartItem.allowToggle?(0,c.jsx)(ef.l,{selected:"SUB"===e.cartItem.productType,onToggle:()=>n(e),testId:`${t}-subscription-toggle-${u}`,alignment:"right",hasBackground:!0,wrapperClassName:"mb-4 mt-2",children:(0,c.jsx)(ef.l.Heading,{children:"SUB"===e.cartItem.productType?m("congrats_best_price"):m("subscribe_save_percentage",{sub_discount_percentage:b})})}):null]},e.cartItem.productId)})})})},ts=e=>{let{testId:t="cart-drawer",wrapperClassName:r="",heading:a,StickyCta:s,mainProducts:i,mainProductsBumpOffers:l,addonProducts:n,bumpOffers:d,open:o,onOpenChange:p,checkIfItemInCart:m,addToCart:x,removeFromCart:u,removeMainProductFromCart:h,quantityChange:b,billingText:g,handleToggleSubOtp:f,specialBumpOfferProductId:y,isLoading:_,isError:v=!1,cartTotalQuantity:j,loadingItemsNumber:w,stickyRef:C,bestSellers:I,progressBar:N}=e,{t:$}=(0,X.bl)("cart_drawer"),k=(0,Y.useRouter)(),L=(l&&l.items&&l.items.length>0)??!1,P=(n&&n.items&&n.items.length>0)??!1,T=l?.items?.length===1&&(l?.items?.some(e=>e?.productOtpID===y)??!1);return(0,c.jsxs)(K.c,{open:o,onOpenChange:p,title:`${a} (${j} item${1===j?"":"s"})`,description:"",testId:"cart-drawer-sheet",height:"full",CtaComponent:!v&&j>0?(0,c.jsx)(eh,{StickyCta:s}):null,removeSpacing:!0,ButtonDockBackground:"white",children:[v?(0,c.jsxs)("div",{className:"rb-xs:px-6 flex h-full w-full flex-col items-center justify-center gap-8 px-4 py-10",children:[(0,c.jsx)(q,{className:"rb-sm:max-w-[230px] mx-auto w-full max-w-[150px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-24 text-primary-text text-center",children:$("error_fetching_cart_data")}),(0,c.jsx)(Q.Q.Button,{variant:"primary",size:"md",onClick:()=>location.reload(),testId:"cart-drawer-empty-cart-button",width:"hug",children:$("refresh_page")})]}):j>0?(0,c.jsx)(c.Fragment,{children:_?(0,c.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center p-4",children:[...Array(w)].map((e,t)=>(0,c.jsx)("div",{className:"mb-2 h-[120px] w-full animate-pulse flex-col gap-6 rounded-2xl border-2 bg-white p-3 shadow-md",children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col justify-between gap-2",children:[(0,c.jsx)("div",{className:"flex h-1/4 w-5/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-3/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-full bg-gray-200"})]})},t))}):(0,c.jsxs)("div",{className:r,children:[(0,c.jsx)(Z,{percentage:N.percentage,testId:"cart-drawer-progress-bar",text:N.text,wrapperClassName:"rb-xs:px-6 px-4"}),(0,c.jsxs)("div",{className:"rb-xs:px-6 flex flex-col px-4 pb-4",children:[i&&i.items&&i.items.length>0&&(0,c.jsx)(ta,{testId:t,mainProducts:i,findPrices:ee,quantityChange:b,handleToggleSubOtp:f,billingText:g,removeMainProductFromCart:h,hasMainBumps:L,isSpecialBumpOfferOnlyInCart:T}),L&&(0,c.jsx)(eb,{testId:t,mainProductsBumpOffers:l,specialBumpOfferProductId:y,findPrices:ee,billingText:g,removeFromCart:u}),P&&(0,c.jsx)(el,{testId:t,addonProducts:n,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]}),d&&d.items&&d.items.length>0&&(0,c.jsx)(eu,{testId:t,bumpOffers:d,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"rb-xs:px-6 rb-xs:py-12 rb-sm:py-16 flex h-full w-full flex-col items-center justify-center gap-4 px-4 py-10",children:[(0,c.jsx)(z,{className:"rb-xs:max-w-[88px] rb-xs:h-[88px] mx-auto h-[64px] w-full max-w-[64px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-16-sans rb-xs:text-header-text-20-sans text-primary-text text-center",children:$("your_cart_is_empty")})]}),(0,c.jsx)("div",{className:"bg-custom-gray-NEUTRAL h-full py-8",children:I&&I.length>0&&(0,c.jsx)(U.O,{testId:"cards_carousel",trackId:"cart-bestsellers-carousel",textBlock:{heading:`${$("bestsellers_heading")}`,variant:"sub-section-banner",alignment:"left"},hasControls:I.length>3,wrapperClassName:"px-4 rb-xs:px-8 rb-sm:px-6 h-full [&>div]:flex [&>div]:flex-col [&>div]:h-full [&>div]:justify-between [&>div>div>div:first-child]:pb-4",slideClassName:"flex-none !basis-auto w-[138px] rb-xs:w-[170px] rb-sm:w-[158px] mr-2 rb-xs:mr-2 last:mr-0",button:{children:`${$("shop_all_products")}`,onClick:()=>{p(!1),k.push("/collections")},width:"fill",size:"md",orientation:"stacked"},children:I?.map((e,t)=>{let r=e.url||"";return(0,c.jsx)(W.FA.Minimal,{testId:`bestseller-tile-${t}`,title:e.title,bodyCopy:e.description,imageSrc:e.image,imageAlt:e.imageAlt||"Best seller",action:{type:"link",href:`/products${r}`},isClickable:!1},t)}
3)})})]}),(0,c.jsx)("div",{ref:C})]})},ti=()=>{(0,Y.useRouter)();let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)(),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),x=(0,_.d0)(),u=(0,_.IM)(),b=(0,L.A)(),f=(0,M.o_)(),y=(0,O._D)(),{setIsMiniCartModalOpen:j}=(0,O.xS)(),I=(0,v.gH)(),{setIsCheckoutLoading:N}=(0,v.Nc)();(0,B.j)(I,N);let[T,A]=(0,$.useState)(!1),[E,R]=(0,$.useState)(null),z=()=>{localStorage.setItem("cart-upgrade-interacted","true")},H=l?.bestSellers??void 0,q=a?.filter(e=>"FreeGiftOffer"===e.__typename),Q=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),U=(0,F.M6)(l?.cartBumps),V=a?.filter(e=>"Page"===e.__typename)??[],G=a?.filter(e=>"BumpOffer"===e.__typename)??[],{removeMainProductFromCart:Z,quantityChange:K,handleToggleSubOtp:W,checkIfItemInCart:J,handleCheckoutClick:X}=k({productItems:V,numOfPages:s,specialBumpOffer:Q}),ee=()=>{if(!E?.item)return null;let e=E.item.cartItem.path,t=E.item.cartItem.productId;if(E.upgrade?.type==="lockin"){let r,a,s=E.upgrade.quantity;return r=te[e],a=String(Number(s+1)),r?.images&&r.images?.[String(t)]?.[a]||null}return E.upgrade?.type==="dental-kit"?((e,t)=>{let r=eX.q[e];if(!r)return null;let a=[...r.productIds.sub,...r.productIds.otp].find(e=>e.id===t);return a&&a.images?{desktop:a.images.desktop,tablet:a.images.tablet,mobile:a.images.mobile}:null})(e,t):null},{setIsMinimumSpendFreeShipping:et,calculateProgress:er}=(0,M.HH)(),ea=(0,M.Mg)(),es=(0,M.wD)();(0,$.useEffect)(()=>{et(i,n.some(e=>e.productType===o.Xk)),er(i)},[i,n,er,et]);let ei=Math.max(...V.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r)||0})),el=es?`<strong>${e("all_yours")}</strong> ${ei>0?`${ei}${e("discount_suffix")}`:""} ${q.length>0?`, ${e("free_gift")}`:""}${ei>0||q.length>0?" & ":""}${e("free_shipping_only")}`:`<span class="font-bold">${b(f)}</span> ${e("away_from_worth_short")} ${b(ej.vP)}!`,{height:en}=(0,S.U)(),ed=(0,$.useRef)(null),ec=Math.max(0,Math.floor((en-48-(ed.current?.clientHeight||0))/136));return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(ts,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer-story",open:y,onOpenChange:()=>j(!1),StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${b(i)}`,onClick:()=>(()=>{if("true"===localStorage.getItem("cart-upgrade-interacted"))return void X();let e=((e,t)=>{if(!e||0===e.length)return null;for(let r of tt){let a=eX.q[r],s=[...a.productIds.sub.map(e=>e.id),...a.productIds.otp.map(e=>e.id)],i=e.find(e=>e.cartItem.path===r&&s.includes(e.cartItem.productId));if(i){let r=e.some(e=>{if(!(0,w.q3)(e.cartItem.productId))return!1;let t=(0,w.HN)(e.cartItem.productId);return s.includes(t)}),{isSub:a}=(0,C.T)(i.cartItem.productType),l=eX.H.O.map(e=>a?e.sub:e.otp),n=!!t&&l.every(e=>t.some(t=>t.productId===e));if(!r&&!n)return{item:i,upgrade:{type:"dental-kit"}}}}for(let t of tr){let r=te[t],a=e.find(e=>e.cartItem.path===t&&r.productIds.includes(e.cartItem.productId));if(a&&a.cartItem.quantity<o.ib)return{item:a,upgrade:{type:"lockin",category:r.category,quantity:a.cartItem.quantity}}}return null})(V,n);e?.upgrade?(R(e),A(!0)):X()})(),variant:"primary",width:"fill",isLoading:I,disabled:I,leftIcon:(0,c.jsx)(D,{})},progressBar:{display:!0,percentage:es?100:ea,text:el},mainProducts:{testId:"main-products",type:"main",items:V},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:G},addonProducts:{testId:"addon-products",type:"addon",items:[...q,Q?[Q]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:U},checkIfItemInCart:J,addToCart:d,removeFromCart:u,removeMainProductFromCart:Z,quantityChange:K,billingText:(e,t)=>
3(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:W,specialBumpOfferProductId:Q?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:x,loadingItemsNumber:ec,stickyRef:ed,bestSellers:H}),E?.upgrade?.type==="lockin"&&(0,c.jsx)(e9,{open:T,onOpenChange:A,onClose:z,upgradeText:"Supply Upgrade",item:E.item,imageSrc:ee(),category:E.upgrade.category,onContinue:()=>{z(),X()},onUpgrade:()=>{z(),X()}}),E?.upgrade?.type==="dental-kit"&&(0,c.jsx)(e5,{open:T,onOpenChange:A,onClose:z,item:E.item,imageSrc:ee(),upgradeText:"Kit Upgrade",onContinue:()=>{z(),X()},onUpgrade:()=>{z(),X()}})]})};var tl=r(62477);let tn=e=>{let{testId:t,wrapperClassName:r,initialQuantity:a=1,onRemove:s}=e,[i,l]=(0,$.useState)(a),n=tl.A;return(0,$.useEffect)(()=>{l(a)},[a]),(0,c.jsx)("div",{"data-testid":t,className:r,children:(0,c.jsx)("div",{className:"inline-flex flex-wrap items-center gap-1",children:(0,c.jsxs)("div",{className:"inline-flex h-[2rem] items-center rounded-md border border-[#D8DADF] pr-2",children:[(0,c.jsx)("button",{"data-testid":`${t}_decrease`,onClick:()=>{s?.()},className:"flex h-full w-[30px] touch-manipulation items-center justify-center","aria-label":"Remove item",children:(0,c.jsx)(n,{className:"text-primary-text h-6 w-6"})}),(0,c.jsx)("div",{className:"flex h-6 flex-grow items-center justify-center",children:(0,c.jsxs)("span",{className:"text-body-text-16",children:[i," Set",1===i?"":"s"]})})]})})})},td=e=>{let{type:t,theme:r="default"}=e;return(0,c.jsx)(tn,{wrapperClassName:(0,eS.cn)("flex","inline"===t&&"inverted"===r&&"bg-white rounded-md text-primary-text [&>div>div>button>svg]:text-primary-text"),...e})};td.displayName="LineItem.Quantity";let tc=JSON.parse('{"SD":{"UU":"3x Treats Bundle","Sl":{"id":"7187","caption":null,"alternativeText":null,"width":800,"height":800,"url":"https://cdn.cms.thepetlabco.com/Treats_3x_dede5a6175.png","__typename":"UploadFile"}}}'),to=e=>{let{testId:t,removeMainProductFromCart:r,treatDealProducts:a,hasMainProducts:s}=e,i=(0,L.A)(),l=a.reduce((e,t)=>{let r=t?.cartItem?.quantity,a=t?.cartProduct?.prices?.otp?.find(e=>e?.quantity===r);return e.quantity+=r,e.price+=a?.price??0,e.discountedPrice+=a?.discounted_price??0,e},{quantity:0,price:0,discountedPrice:0}),n=Math.round(l.quantity/3);return(0,c.jsx)(ei.Bv,{testId:`${t}-main-products-line-item-group`,type:"large",children:(0,c.jsx)("div",{className:(0,eS.cn)("border-b border-[#D8DADF]",!s&&"border-b-0"),children:(0,c.jsxs)(ei.yu.Container,{testId:`${t}-main-product-line-item-3x-treat-deal`,type:"inline",children:[tc.SD.Sl&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-main-product-line-item-media-image-3x-treat-deal`,src:tc.SD.Sl.url,alt:tc.SD.Sl.alternativeText||tc.SD.UU||""}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-main-product-line-item-content-3x-treat-deal`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(ei.yu.Details,{testId:`${t}-main-product-line-item-details-3x-treat-deal`,title:tc.SD.UU,description:(0,c.jsx)(c.Fragment,{children:"One Time Purchase"})}),(0,c.jsx)(ei.yu.Price,{testId:`${t}-main-product-line-item-pricing-variants-3x-treat-deal`,rrp:i(l.price),discountedPrice:i(l.discountedPrice),isStacked:!0})]}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${t}-main-product-line-item-details-footer-3x-treat-deal`,children:(0,c.jsx)(td,{testId:`${t}-main-product-line-item-toggle-quantity-3x-treat-deal`,initialQuantity:n,onRemove:()=>void a.forEach(e=>{r(e)})})})]})]})})})},tp=e=>{let{testId:t="cart-drawer",wrapperClassName:r="",heading:a,StickyCta:s,mainProducts:i,mainProductsBumpOffers:l,addonProducts:n,bumpOffers:d,open:o,onOpenChange:p,checkIfItemInCart:m,addToCart:x,removeFromCart:u,removeMainProductFromCart:h,progressBarPercentage:b,quantityChange:g,billingText:f,handleToggleSubOtp:y,specialBumpOfferProductId:_,isLoading:v,isError:j=!1,cartTotalQuantity:w,progressBarText:C,loadingItemsNumber:I,stickyRef:N,bestSellers:$,treatDealProducts:k=[]}=e,{t:L}=(0,X.bl)("cart_drawer"),P=(0,Y.useRouter)(),T=(l&&l.items&&l.items.length>0)??!1,B=(n&&n.items&&n.items.length>0)??!1,S=l?.items?.length===1&&(l?.items?.some(e=>e?.productOtpID===_)??!1),A=(i&&i.items&&i.items.length>0)??!1;return(0,c.jsxs)(K.c,{open:o,onOpenChange:p,title:`${a} (${w} item${1===w?"":"s"})`,description:"",testId:"cart-drawer-sheet",height:"full",CtaComponent:!j&&w>0?(0,c.jsx)(eh,{StickyCta:s}
3):null,removeSpacing:!0,ButtonDockBackground:"white",children:[j?(0,c.jsxs)("div",{className:"rb-xs:px-6 flex h-full w-full flex-col items-center justify-center gap-8 px-4 py-10",children:[(0,c.jsx)(q,{className:"rb-sm:max-w-[230px] mx-auto w-full max-w-[150px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-24 text-primary-text text-center",children:L("error_fetching_cart_data")}),(0,c.jsx)(Q.Q.Button,{variant:"primary",size:"md",onClick:()=>location.reload(),testId:"cart-drawer-empty-cart-button",width:"hug",children:L("refresh_page")})]}):w>0?(0,c.jsx)(c.Fragment,{children:v?(0,c.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center p-4",children:[...Array(I)].map((e,t)=>(0,c.jsx)("div",{className:"mb-2 h-[120px] w-full animate-pulse flex-col gap-6 rounded-2xl border-2 bg-white p-3 shadow-md",children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col justify-between gap-2",children:[(0,c.jsx)("div",{className:"flex h-1/4 w-5/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-3/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-full bg-gray-200"})]})},t))}):(0,c.jsxs)("div",{className:r,children:[(0,c.jsx)(Z,{percentage:b,testId:"cart-drawer-progress-bar",text:C,wrapperClassName:"rb-xs:px-6 px-4"}),(0,c.jsxs)("div",{className:"rb-xs:px-6 flex flex-col px-4 pb-4",children:[k.length>0&&(0,c.jsx)(to,{testId:t,removeMainProductFromCart:h,treatDealProducts:k,hasMainProducts:A||T},"3x-treat-deal-line-item"),i&&i.items&&i.items.length>0&&(0,c.jsx)(ey,{testId:t,mainProducts:i,findPrices:ee,quantityChange:g,handleToggleSubOtp:y,billingText:f,removeMainProductFromCart:h,hasMainBumps:T,isSpecialBumpOfferOnlyInCart:S}),T&&(0,c.jsx)(eb,{testId:t,mainProductsBumpOffers:l,specialBumpOfferProductId:_,findPrices:ee,billingText:f,removeFromCart:u}),B&&(0,c.jsx)(el,{testId:t,addonProducts:n,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]}),d&&d.items&&d.items.length>0&&(0,c.jsx)(eu,{testId:t,bumpOffers:d,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"rb-xs:px-6 rb-xs:py-12 rb-sm:py-16 flex h-full w-full flex-col items-center justify-center gap-4 px-4 py-10",children:[(0,c.jsx)(z,{className:"rb-xs:max-w-[88px] rb-xs:h-[88px] mx-auto h-[64px] w-full max-w-[64px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-16-sans rb-xs:text-header-text-20-sans text-primary-text text-center",children:L("your_cart_is_empty")})]}),(0,c.jsx)("div",{className:"bg-custom-gray-NEUTRAL h-full py-8",children:$&&$.length>0&&(0,c.jsx)(U.O,{testId:"cards_carousel",trackId:"cart-bestsellers-carousel",textBlock:{heading:`${L("bestsellers_heading")}`,variant:"sub-section-banner",alignment:"left",wrapperClassName:"[&_h2]:text-[18px] rb-xs:[&_h2]:text-[20px] [&_h2]:font-inter [&_h2]:font-semibold [&_h2]:leading-[1.2] [&_h2]:text-primary-text [&_h2]:text-left"},hasControls:$.length>3,wrapperClassName:"px-4 rb-xs:px-8 rb-sm:px-6 [&>div]:flex [&>div]:flex-col [&>div]:h-full [&>div]:justify-between [&>div>div>div:first-child]:pb-4",slideClassName:"flex-none !basis-auto w-[138px] rb-xs:w-[170px] rb-sm:w-[158px] mr-2 rb-xs:mr-2 last:mr-0",button:{children:`${L("shop_all_products")}`,onClick:()=>{p(!1),P.push("/collections-optexp/trtdl")},width:"fill",size:"md",orientation:"stacked"},children:$?.map((e,t)=>{let r=e.url||"";return(0,c.jsx)(W.FA.Minimal,{testId:`bestseller-tile-${t}`,title:e.title,bodyCopy:e.description,imageSrc:e.image,imageAlt:e.imageAlt||"Best seller",action:{type:"link",href:`/products${r}`},isClickable:!1},t)})})})]}),(0,c.jsx)("div",{ref:N})]})},tm=()=>{let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)({fetchCartDataOptions:{apiUrl:"/api/cart-tpt-6476"}}),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),x=(0,_.d0)(),u=(0,_.IM)(),b=(0,L.A)(),f=(0,M.o_)(),y=(0,O._D)(),{setIsMiniCartModalOpen:j}=(0,O.xS)(),w=(0,v.gH)(),{setIsCheckoutLoading:C}=(0,v.Nc)();(0,B.j)(w,C);let I=l?.bestSellers??void 0,N=a?.filter(e=>"FreeGiftOffer"===e.__typename),T=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),A=(0,F.M6)(l?.cartBumps),E=a?.filter(e=>"Page"===e.__typename)??[],R=a?.filter(e=>"BumpOffer"===e.__typename)??[],z=k({productItems:E,numOfPages:s,specialBumpOffer:T}),H=[],q=E.reduce((e,t)=>
3t.urlPath?.includes("/optexp/trtdl")?(H.push(t),e):[...e,t],[]),{removeMainProductFromCart:Q,quantityChange:U,handleToggleSubOtp:V,checkIfItemInCart:G,handleCheckoutClick:Z}=z,{setIsMinimumSpendFreeShipping:K,calculateProgress:W}=(0,M.HH)(),J=(0,M.Mg)(),X=(0,M.wD)();(0,$.useEffect)(()=>{K(i,n.some(e=>e.productType===o.Xk)),W(i)},[i,n,W,K]);let Y=Math.max(...E.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r)||0})),ee=X?`<strong>${e("all_yours")}</strong> ${Y>0?`${Y}${e("discount_suffix")}`:""} ${N.length>0?`, ${e("free_gift")}`:""}${Y>0||N.length>0?" & ":""}${e("free_shipping_only")}`:`<span class="font-bold">${b(f)}</span> ${e("away_from_worth_short")} ${b(ej.vP)}!`,{height:et}=(0,S.U)(),er=(0,$.useRef)(null),ea=Math.max(0,Math.floor((et-48-(er.current?.clientHeight||0))/136));return(0,c.jsx)(tp,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer-story",open:y,onOpenChange:()=>j(!1),StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${b(i)}`,onClick:()=>Z(),variant:"primary",width:"fill",isLoading:w,disabled:w,leftIcon:(0,c.jsx)(D,{})},progressBarPercentage:X?100:J,progressBarText:ee,progressBar:{display:!0,percentage:X?100:J,text:ee},mainProducts:{testId:"main-products",type:"main",items:q},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:R},addonProducts:{testId:"addon-products",type:"addon",items:[...N,T?[T]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:A},checkIfItemInCart:G,addToCart:d,removeFromCart:u,removeMainProductFromCart:Q,quantityChange:U,billingText:(e,t)=>
3(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:V,specialBumpOfferProductId:T?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:x,loadingItemsNumber:ea,stickyRef:er,bestSellers:I,treatDealProducts:H})};var tx=r(25264);let tu=e=>{let{children:t}=e;return t?(0,c.jsx)("p",{className:"text-body-text-16-semibold text-primary-text",children:t}):null};tu.displayName="Toggle.Heading";let th=e=>{let{children:t}=e;if(!t)return null;let r="string"==typeof t?(0,tx.Ay)(t):null;return r?(0,c.jsx)("div",{className:"text-body-text-14 text-secondary-text [&_a]:text-link-default [&_a:hover]:text-link-hover [&_button]:text-link-default [&_button:hover]:text-link-hover [&_a]:font-bold [&_a]:underline [&_button]:font-bold [&_button]:underline",dangerouslySetInnerHTML:{__html:r}}):(0,c.jsx)("div",{className:"text-body-text-14 text-secondary-text [&_a]:text-link-default [&_a:hover]:text-link-hover [&_button]:text-link-default [&_button:hover]:text-link-hover [&_a]:font-bold [&_a]:underline [&_button]:font-bold [&_button]:underline",children:t})};th.displayName="Toggle.Description";let tb=e=>{let t,{selected:r,disabled:a=!1,onToggle:s,testId:i="toggle",wrapperClassName:l,children:n,hasBackground:d=!1,alignment:o="left",bgClassName:p={selected:"bg-discount",disabled:"bg-bold"},size:m="default"}=e,x=r?p.selected:p.disabled,u=a?"bg-raised cursor-not-allowed":`${x} cursor-pointer`,{heading:h,description:b}={heading:(t=$.Children.toArray(n).filter($.isValidElement)).find(e=>e.type?.displayName==="Toggle.Heading"),description:t.find(e=>e.type?.displayName==="Toggle.Description")},g=$.Children.toArray(n).find(e=>(0,$.isValidElement)(e)&&e.type===tb.Heading)?.props.children;return(0,c.jsxs)("div",{"data-testid":i,"data-element-id":i,className:(0,eS.cn)(d&&"bg-neutral-bg rounded-2xl p-4","border-disabled-bg border bg-transparent",l),children:[(0,c.jsxs)("div",{className:(0,eS.cn)("right"===o?"justify-end":"justify-start","flex w-full flex-row gap-3"),children:["right"===o&&(0,c.jsx)("div",{"data-testid":`${i}_body`,"data-element-id":`${i}_body`,className:"mr-auto flex flex-col justify-center",children:h}),(0,c.jsx)("button",{"data-testid":`${i}_switch`,"data-element-id":`${i}_switch`,role:"switch","aria-checked":r,"aria-label":g||"Switch",onClick:a?void 0:s,className:(0,eS.cn)("my-1 rounded-full p-1","small"===m?"h-[25px] w-[42px] min-w-[42px] py-0 px-[2px] my-0":"h-7 w-[52px] min-w-[52px]",u,r&&p.selected),children:(0,c.jsx)("div",{className:(0,eS.cn)("transform rounded-full bg-white transition-transform duration-300 ease-in-out","small"===m?"h-[21px] w-[21px]":"h-5 w-5",r?"small"===m?"translate-x-[17px]":"translate-x-6":"translate-x-0")})}),"left"===o&&(0,c.jsx)("div",{"data-testid":`${i}_body`,"data-element-id":`${i}_body`,className:"flex flex-col justify-center",children:h})]}),b]})};tb.Heading=tu,tb.Description=th;var tg=r(901),tf=r(24152),ty=r(99583),t_=r(14928);let tv=[20,36,40,44],tj=e=>{let t,{selected:r,onToggle:a,testId:s,index:i,item:l,productType:n}=e,{locale:d,defaultLocale:o}=(0,T.A)(),{t:m}=(0,p.Bd)(),x=(0,L.A)(),{openModal:u}=(0,tf.QR)(),h=(0,tf.LL)(),b="SUB"===n,g=m(l.cartProduct.productType?.toLowerCase()??"",{returnObjects:!0}),f=m(l.cartProduct.packageType?.toLowerCase()??"",{returnObjects:!0}),y=(0,ty.A)({prices:l.cartProduct.prices.sub,packageUnits:l.cartProduct.packageUnits??0,locale:d,defaultLocale:o,isAccessoryPage:!1,round:!1,productTypePlural:g.plural,packageTypeSingular:f.singular,packageTypePlural:f.plural,packageFullWeight:l.cartProduct.packageFullWeight??"",slice:l.cartItem.quantity}).slice(0,l.cartItem.quantity),_=l.cartItem.quantity-1,v=null!==l.higherInitialDiscountCode,j=(0,c.jsx)("p",{className:"text-body-text-14 text-primary-text",children:(0,c.jsx)(p.x6,{i18nKey:"toggle_subscription",components:{button:(0,c.jsx)("button",{onClick:()=>{u({modalTitle:(0,c.jsx)("span",{className:"capitalize",children:m("cancel_with_ease")}),modalContent:(0,c.jsx)(tg.q,{}),modalHeight:"hug",preserveHistory:h})},className:"text-link-default hover:text-link-hover nav-link-underline font-semibold"})}})},"toggle_subscription"),w=v?y[_].percentage:null,C=(()=>
3{if(!l.productDiscountCode)return null;if(v){let e=_>=0&&_<tv.length;return l.rebillDiscountCode&&e?tv[_]:l.productDiscountCode.perceivedDiscountPercentage}return y[_].percentage})(),I=x(Number(((t=l.cartProduct.prices.sub[_]).price-t.discounted_price).toFixed(2))),N=b?`Youâre on a subscription and saving [green]${I}[/green] today!`:`Switch to subscription and [green]save ${I}[/green] today!`,$=b?[j]:[v?`[b]Save ${w}% today[/b] and ${C}% after the first month`:`[b]Save ${C}%[/b] every month`,"[b]FREE[/b] shipping on subscriptions",j,"Conveniently billed and shipped every 30 days"];return(0,c.jsxs)(tb,{selected:r,onToggle:a,testId:`${s}-subscription-toggle-${i}`,alignment:"right",hasBackground:!0,wrapperClassName:(0,eS.cn)("border-none bg-[#F5F5F1] mb-4",b&&"bg-[#E9FFE4]"),bgClassName:{selected:"bg-[#076D08]",disabled:"bg-[#B5B9C4]"},size:"small",children:[(0,c.jsx)(tb.Heading,{children:(0,t_.nr)(N)}),(0,c.jsx)(tb.Description,{children:(0,c.jsx)(eo.JU.Stack,{testId:`${s}-subscription-toggle-${i}-label-stack`,wrapperClassName:"pt-3",children:$.map((e,t)=>(0,c.jsx)(eo.JU.Item,{testId:`${s}-subscription-toggle-${t}-label-item-${n}-${t}`,label:e,size:"sm",assetType:"icon",Icon:()=>(0,c.jsx)(ec.A,{className:(0,eS.cn)("text-[#B5B9C4]",b&&"text-[#076D08]")}),wrapperClassName:"[&_p]:text-body-text-14"},`${s}-subscription-toggle-${t}-label-item-${n}-${t}`))})})]})},tw=(0,$.memo)(e=>{let{testId:t,mainProducts:r,billingText:a,findPrices:s,quantityChange:i,removeMainProductFromCart:l,handleToggleSubOtp:n,hasMainBumps:d,isSpecialBumpOfferOnlyInCart:p}=e,m=(0,L.A)();return(0,c.jsx)(c.Fragment,{children:r&&r.items&&r.items.length>0&&(0,c.jsx)("div",{"data-testid":`${t}-main-products-line-item-group`,children:r.items.map((e,x)=>(0,c.jsxs)("div",{className:(0,eS.cn)("border-b border-[#D8DADF]",x===r.items.length-1&&(!d||d&&p)&&"border-b-0"),children:[(0,c.jsxs)(ei.yu.Container,{testId:`${t}-main-product-line-item-${x}`,type:"inline",children:[e.cartProduct.image&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-main-product-line-item-media-image-${x}`,src:e.cartProduct.image.url,alt:e.cartProduct.image.alternativeText||e.cartProduct.name||""}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-main-product-line-item-content-${x}`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(ei.yu.Details,{testId:`${t}-main-product-line-item-details-${x}`,title:e.cartProduct.name,description:"function"==typeof a?a(e,x):a}),(0,c.jsx)("div",{className:"flex h-[45px] items-center",children:(0,c.jsx)(ei.yu.Price,{testId:`${t}-main-product-line-item-pricing-variants-${x}`,rrp:m(s(e).price||0),discountedPrice:m(s(e).discounted_price||0),isStacked:!0})})]}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${t}-main-product-line-item-details-footer-${x}`,children:(0,c.jsx)(ei.yu.Quantity,{testId:`${t}-main-product-line-item-toggle-quantity-${x}`,initialQuantity:e.cartItem.quantity,maxQuantity:o.Ex,onQuantityChange:t=>i(e)(t),onRemove:()=>l(e)})})]})]}),e.cartItem.allowToggle&&(0,c.jsx)(tj,{selected:"SUB"===e.cartItem.productType,onToggle:()=>n(e),testId:t,index:x,item:e,productType:e.cartItem.productType})]},`${t}-main-product-line-item-${x}`))})})});tw.displayName="MainProducts";let tC=e=>{let{testId:t="cart-drawer",wrapperClassName:r="",heading:a,StickyCta:s,mainProducts:i,mainProductsBumpOffers:l,addonProducts:n,bumpOffers:d,open:o,onOpenChange:p,checkIfItemInCart:m,addToCart:x,removeFromCart:u,removeMainProductFromCart:h,quantityChange:b,billingText:g,handleToggleSubOtp:f,specialBumpOfferProductId:y,isLoading:_,isError:v=!1,cartTotalQuantity:j,loadingItemsNumber:w,stickyRef:C,bestSellers:I,progressBar:N}=e,{t:$}=(0,X.bl)("cart_drawer"),k=(0,Y.useRouter)(),L=(l&&l.items&&l.items.length>0)??!1,P=(n&&n.items&&n.items.length>0)??!1,T=l?.items?.length===1&&(l?.items?.some(e=>e?.productOtpID===y)??!1);return(0,c.jsxs)(K.c,{open:o,onOpenChange:p,title:`${a} (${j} ${1===j?$("item.singular"):$("item.plural")})`,description:"",testId:"cart-drawer-sheet",height:"full",CtaComponent:!v&&j>0?(0,c.jsx)(eh,{StickyCta:s}
3):null,removeSpacing:!0,ButtonDockBackground:"white",children:[v?(0,c.jsxs)("div",{className:"rb-xs:px-6 flex h-full w-full flex-col items-center justify-center gap-8 px-4 py-10",children:[(0,c.jsx)(q,{className:"rb-sm:max-w-[230px] mx-auto w-full max-w-[150px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-24 text-primary-text text-center",children:$("error_fetching_cart_data")}),(0,c.jsx)(Q.Q.Button,{variant:"primary",size:"md",onClick:()=>location.reload(),testId:"cart-drawer-empty-cart-button",width:"hug",children:$("refresh_page")})]}):j>0?(0,c.jsx)(c.Fragment,{children:_?(0,c.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center p-4",children:[...Array(w)].map((e,t)=>(0,c.jsx)("div",{className:"mb-2 h-[120px] w-full animate-pulse flex-col gap-6 rounded-2xl border-2 bg-white p-3 shadow-md",children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col justify-between gap-2",children:[(0,c.jsx)("div",{className:"flex h-1/4 w-5/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-3/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-full bg-gray-200"})]})},t))}):(0,c.jsxs)("div",{className:r,children:[N?.display&&(0,c.jsx)(Z,{...N,testId:"cart-drawer-progress-bar",wrapperClassName:"rb-xs:px-6 px-4"}),(0,c.jsxs)("div",{className:"rb-xs:px-6 flex flex-col px-4",children:[i&&i.items&&i.items.length>0&&(0,c.jsx)(tw,{testId:t,mainProducts:i,findPrices:ee,quantityChange:b,handleToggleSubOtp:f,billingText:g,removeMainProductFromCart:h,hasMainBumps:L,isSpecialBumpOfferOnlyInCart:T}),L&&(0,c.jsx)(eb,{testId:t,mainProductsBumpOffers:l,specialBumpOfferProductId:y,findPrices:ee,billingText:g,removeFromCart:u}),P&&(0,c.jsx)(el,{testId:t,addonProducts:n,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]}),d&&d.items&&d.items.length>0&&(0,c.jsx)(eu,{testId:t,bumpOffers:d,checkIfItemInCart:m,addToCart:x,removeFromCart:u})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"rb-xs:px-6 rb-xs:py-12 rb-sm:py-16 flex h-full w-full flex-col items-center justify-center gap-4 px-4 py-10",children:[(0,c.jsx)(z,{className:"rb-xs:max-w-[88px] rb-xs:h-[88px] mx-auto h-[64px] w-full max-w-[64px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-16-sans rb-xs:text-header-text-20-sans text-primary-text text-center",children:$("your_cart_is_empty")})]}),(0,c.jsx)("div",{className:"bg-custom-gray-NEUTRAL h-full py-8",children:I&&I.length>0&&(0,c.jsx)(U.O,{testId:"cards_carousel",trackId:"cart-bestsellers-carousel",textBlock:{heading:`${$("bestsellers_heading")}`,variant:"sub-section-banner",alignment:"left",wrapperClassName:"[&_h2]:text-[18px] rb-xs:[&_h2]:text-[20px] [&_h2]:font-inter [&_h2]:font-semibold [&_h2]:leading-[1.2] [&_h2]:text-primary-text [&_h2]:text-left"},hasControls:I.length>3,wrapperClassName:"px-4 rb-xs:px-8 rb-sm:px-6 [&>div]:flex [&>div]:flex-col [&>div]:h-full [&>div]:justify-between [&>div>div>div:first-child]:pb-4",slideClassName:"flex-none !basis-auto w-[138px] rb-xs:w-[170px] rb-sm:w-[158px] mr-2 rb-xs:mr-2 last:mr-0",button:{children:`${$("shop_all_products")}`,onClick:()=>{p(!1),k.push("/collections")},width:"fill",size:"md",orientation:"stacked"},children:I?.map((e,t)=>{let r=e.url||"";return(0,c.jsx)(W.FA.Minimal,{testId:`bestseller-tile-${t}`,title:e.title,bodyCopy:e.description,imageSrc:e.image,imageAlt:e.imageAlt||"Best seller",buttonText:$("shop_now"),action:{type:"link",href:`/products${r}`},isClickable:!1},t)})})})]}),(0,c.jsx)("div",{ref:C})]})},tI=()=>{let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)(),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),x=(0,_.d0)(),u=(0,_.IM)(),b=(0,L.A)(),f=(0,M.o_)(),y=(0,O._D)(),{setIsMiniCartModalOpen:j}=(0,O.xS)(),w=(0,v.gH)(),C=(0,v.G$)(),{setIsCheckoutLoading:I,setCheckoutError:N}=(0,v.Nc)();(0,B.j)(w,I);let A=l?.bestSellers??void 0,E=a?.filter(e=>"FreeGiftOffer"===e.__typename),R=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),z=(0,F.M6)(l?.cartBumps),H=a?.filter(e=>"Page"===e.__typename)??[],q=a?.filter(e=>"BumpOffer"===e.__typename)??[],Q=n.some(e=>e.productType===o.Xk),{removeMainProductFromCart:U,quantityChange:V,handleToggleSubOtp:G,checkIfItemInCart:Z,handleCheckoutClick:K}=k({productItems:H,numOfPages:s,specialBumpOffer:R}),{setIsMinimumSpendFreeShipping:W,calculateProgress:J}=(0,M.HH)(),X=(0,M.Mg)(),Y=(0,M.wD)(),[ee,et]=(0,$.useState)(!0),{isFrench:er}=(0,T.A)();(0,$.useEffect)(()=>{et(!ev.pw||Q),W(i,Q),J(i)},[i,J,W,Q]);let ea=Math.max(...H.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r)||0})),es=ev.JC&&er,ei=e("discount_suffix"),el=ei.split(" ").map(e=>"rabais"===e?e.toUpperCase():e).join(" "),en=e("free_shipping_only"),ed=en.toLowerCase().split(" ").map((e,t)=>1===t?e.toUpperCase():e).join(" "),ec=Y?`<strong>${e("all_yours")}</strong> ${ea>0?`${ea}${es?el:ei}`:""} ${E.length>0?`, ${e("free_gift")}`:""}${ea>0||E.length>0?` ${es?"et":"&"} `:""}${es?ed:en}`:es?`${e("free_shipping_on_order")} ${b(ej.vP)}`:`<span class="font-bold">${b(f)}</span> ${e("away_from_worth_short")} ${b(ej.vP)}!`,{height:eo}=(0,S.U)(),ep=(0,$.useRef)(null),em=Math.max(0,Math.floor((eo-48-(ep.current?.clientHeight||0))/136));return(0,c.jsx)(tC,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer",open:y,onOpenChange:()=>{j(!1),N(null)},StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${b(i)}`,onClick:()=>K(),variant:"primary",width:"fill",isLoading:w,disabled:w,leftIcon:(0,c.jsx)(D,{}),error:C?e("internal_error"):void 0},progressBar:{display:ee,percentage:Y?100:X,text:ec},mainProducts:{testId:"main-products",type:"main",items:H},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:q},addonProducts:{testId:"addon-products",type:"addon",items:[...E,R?[R]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:z},checkIfItemInCart:Z,addToCart:d,removeFromCart:u,removeMainProductFromCart:U,quantityChange:V,billingText:(e,t)=>
3(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:G,specialBumpOfferProductId:R?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:x,loadingItemsNumber:em,stickyRef:ep,bestSellers:A})},tN=()=>{let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)({fetchCartDataOptions:{apiUrl:"/api/cart-tpt-7143"}}),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),f=(0,_.d0)(),y=(0,_.IM)(),j=(0,L.A)(),w=(0,M.o_)(),C=(0,O._D)(),{setIsMiniCartModalOpen:I}=(0,O.xS)(),N=(0,v.gH)(),A=(0,v.G$)(),{setIsCheckoutLoading:R,setCheckoutError:z}=(0,v.Nc)();(0,B.j)(N,R);let H=l?.bestSellers??void 0,q=a?.filter(e=>"FreeGiftOffer"===e.__typename),Q=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),U=(0,F.M6)(l?.cartBumps),V=(0,b.M)(),G=(0,u.u)("jhcaBumpOfferCart"),Z=(0,$.useMemo)(()=>(0,eC.YF)(V),[V]),K=(0,$.useMemo)(()=>{if(!G)return U;if(!Z)return U.filter(e=>!(0,eC.T_)(e.label));let e=eC.D[Z];return U.map(t=>(0,eC.T_)(t.label)?{...t,productOtpID:e.id,image:{...t.image||{},url:e.image},product:{...t.product,image:{...t.product?.image||{},url:e.image}},prices:{...t.prices,otp:t.prices?.otp?.filter(t=>Number(t.product_id)===e.id)??[]}}:t)},[U,G,Z]),W=a?.filter(e=>"Page"===e.__typename)??[],J=a?.filter(e=>"BumpOffer"===e.__typename)??[],X=n.some(e=>e.productType===o.Xk),{removeMainProductFromCart:Y,quantityChange:ee,handleToggleSubOtp:et,checkIfItemInCart:er,handleCheckoutClick:ea}=k({productItems:W,numOfPages:s,specialBumpOffer:Q}),{setIsMinimumSpendFreeShipping:es,calculateProgress:ei}=(0,M.HH)(),el=(0,M.Mg)(),en=(0,M.wD)(),{isFrench:ed}=(0,T.A)();(0,$.useEffect)(()=>{es(i,X),ei(i)},[i,ei,es,X]);let ec=Math.max(...W.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r??{discounted_price:0,perceived_rrp:0})||0})),eo=ev.JC&&ed,ep=e("discount_suffix"),em=ep.split(" ").map(e=>"rabais"===e?e.toUpperCase():e).join(" "),ex=e(ev.pw?"free_shipping_only_uk":"free_shipping_only"),eu=ex.toLowerCase().split(" ").map((e,t)=>1===t?e.toUpperCase():e).join(" "),eh=en?`<strong>${e("all_yours")}</strong> ${ec>0?`${ec}${eo?em:ep}`:""} ${q.length>0?`, ${e("free_gift")}`:""}${ec>0||q.length>0?` ${eo?"et":"&"} `:""}${eo?eu:ex}`:eo?`${e("free_shipping_on_order")} ${j(ej.vP)}`:`<span class="font-bold">${j(w)}</span> ${e("away_from_worth_short")} ${j(ej.vP)}!`,{height:eb}=(0,S.U)(),eg=(0,$.useRef)(null),ef=Math.max(0,Math.floor((eb-48-(eg.current?.clientHeight||0))/136));return(0,c.jsx)(e_,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer-story",open:C,onOpenChange:()=>{I(!1),z(null)},preCtaElement:(0,c.jsx)(x.A,{className:"!p-0"}),StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${j(i)}`,onClick:()=>ea(),variant:"primary",width:"fill",isLoading:N,disabled:N,leftIcon:(0,c.jsx)(D,{}),error:A?e("internal_error"):void 0},progressBar:{display:!0,percentage:en?100:el,text:eh},mainProducts:{testId:"main-products",type:"main",items:W,otpToggleTextV2:ev.pw},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:J},addonProducts:{testId:"addon-products",type:"addon",items:[...q,Q?[Q]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:K},checkIfItemInCart:er,addToCart:d,removeFromCart:y,removeMainProductFromCart:Y,quantityChange:ee,billingText:(e,t)=>
3(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:et,specialBumpOfferProductId:Q?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:f,loadingItemsNumber:ef,stickyRef:eg,bestSellers:H,region:ev.pw?E.ij.UK:E.ij.US})};var t$=r(64990),tk=r(33824),tL=r(50248),tP=r(62565);let tT=e=>{let{testId:t,bumpOffers:r,checkIfItemInCart:a,addToCart:s,removeFromCart:i,region:l=J.t9}=e,{cartData:n}=(0,h.S)(),d=l===J.ij.UK,{t:o}=(0,X.bl)("cart_drawer"),p=ea(),[m,x]=(0,$.useState)([]),u=[o("vet_reviewed"),o("key_ingredients"),o("directions_for_use")],b=(0,tL.Ir)(),[g,f]=(0,$.useState)(!1),y=g||(0,tP.cB)(n),_=!b&&!y;return(0,$.useEffect)(()=>{f((0,tP.Kn)())},[n]),(0,c.jsxs)("div",{className:"rb-xs:p-6 bg-neutral-bg rb-xs:gap-4 flex flex-col py-6",children:[(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:(0,eS.cn)("rb-xs:px-0 rb-xs:pb-0 flex flex-col gap-2 px-4",_&&"pb-4"),children:[(0,c.jsx)("p",{className:"text-primary-text text-header-text-20",children:o("exclusive_deals")}),(0,c.jsx)("p",{className:"text-primary-text text-body-text-14",children:o("bump_offer_description")})]}),_&&(0,c.jsx)("div",{className:(0,eS.cn)("rb-xs:px-0 rb-xs:pb-2 rb-xs:hidden flex flex-col gap-2 px-4 pb-4 pt-2"),children:(0,c.jsx)("p",{className:"text-primary-text text-header-text-16-sans",children:"Exclusive Grooming Bundle Offer"})})]}),_&&(0,c.jsxs)("div",{className:"rb-xs:hidden flex flex-col bg-white",children:[(0,c.jsx)(tk.V,{testId:t}),(0,c.jsx)(t$.C,{testId:`${t}-section_add-bundle-button`})]}),(0,c.jsxs)("div",{className:(0,eS.cn)("rb-xs:px-0 rb-xs:pt-0 flex flex-col gap-4 px-4 pt-4",_&&"pt-6"),children:[_&&(0,c.jsx)("p",{className:"text-primary-text text-header-text-16-sans rb-xs:hidden",children:"We know youâll love these too"}),(0,c.jsx)("div",{className:"flex flex-col gap-3",children:r&&r.items&&r.items.map((e,l)=>{let n=e.prices?.otp?.[0]?.perceived_rrp&&e.prices.otp[0].discounted_price?Math.round((e.prices.otp[0].perceived_rrp-e.prices.otp[0].discounted_price)/e.prices.otp[0].perceived_rrp*100):0,h=!!(e.vetQuote&&e.product?.ingredients?.length&&(e.product?.usageRecommendations?.length||e.product?.usageInstructions?.length)),b=a(e),g=e.product?.sku==="SNC",f=e.product?.productType.replace("_"," ").toLowerCase(),y=r?.items?.[l]?.product?.ingredients.filter(e=>e.showAsHighlight);return(0,c.jsxs)("div",{className:"flex flex-col rounded-2xl bg-white p-4",children:[(0,c.jsxs)(ei.yu.Container,{testId:t,type:"large",children:[(0,c.jsxs)(ei.yu.Row,{testId:`${t}-row`,className:"flex flex-col gap-1 [align-items:safe_center]",children:[(0,c.jsx)(ei.yu.Tag,{testId:`${t}-tag-bau`,type:"discount-primary",label:o("discount_suffix",{discount:n}),hideIcon:!0}),(e.product?.image||e.image)&&(0,c.jsx)(ei.yu.Image,{testId:`${t}-media-image`,isLarge:!0,...{src:e.image?.url||e.product?.image?.url||"",alt:e.image?.alternativeText||e.product?.image?.alternativeText||e.product?.name||""}})]}),(0,c.jsxs)(ei.yu.Content,{testId:`${t}-body`,className:"!items-start",children:[(0,c.jsx)(ei.yu.Details,{testId:`${t}-details`,title:e.label,description:e.description}),(0,c.jsx)(ei.yu.DetailsFooter,{testId:`${t}-details-footer`,children:(0,c.jsx)(ei.yu.Price,{testId:`${t}-pricing-variants`,rrp:p(e.prices?.otp[0].perceived_rrp||0),discountedPrice:p(e.prices?.otp[0].discounted_price||0),wrapperClassName:"flex-grow",isDiscountTrailing:!0})})]})]}),(0,c.jsxs)("div",{className:"mt-3 flex items-center gap-3",children:[(0,c.jsx)(Q.Q.Button,{testId:`cart-drawer-button-pill-${l}`,onClick:()=>{b?i(Number(e.productOtpID)):s({productId:Number(e.productOtpID),quantity:1,productType:"OTPBUMP",schedule:"",path:"",allowToggle:!1,petType:""})},variant:"secondary",width:"fill",leftIcon:ed.A,children:b?o("cart_bumps_remove_button_text"):o("cart_bumps_add_button_text")}),(0,c.jsx)("div",{onClick:()=>{x(e=>e.includes(l)?e.filter(e=>e!==l):[...e,l])},className:"cursor-pointer transition-transform duration-300",children:(0,c.jsx)(en.A,{className:`h-8 w-8 transition-transform duration-300 ${m.includes(l)?"rotate-180":""}`,"aria-hidden":"true"})})]}),(0,c.jsxs)("div",{className:`overflow-hidden transition-all duration-300 ${m.includes(l)?"max-h-[9999px]":"max-h-0"}`,children:[(0,c.jsxs)("div",{className:"mt-3 flex flex-col gap-4 border-t bg-white py-3",children:[(0,c.jsx)("p",{className:"text-primary-text text-body-text-16-semibold",children:o("tabs_section_header_text")}),e.benefitPoints&&e.benefitPoints.length>
30&&(0,c.jsx)(eo.o1,{testId:`cart-drawer-label-group-${l}`,wrapperClassName:"flex flex-col !gap-2",children:e.benefitPoints.map((e,t)=>(0,c.jsx)(eo.JU.Item,{testId:`cart-drawer-label-${l}-${t}`,label:e.label,size:"sm",Icon:e=>(0,c.jsx)(ec.A,{...e,className:"text-positive-text"}),wrapperClassName:"[&>div>div]:!font-normal"},t))})]}),h&&(0,c.jsxs)(ex.t.Root,{defaultValue:"tab0",testId:`${t}-tabs-${l}`,children:[(0,c.jsxs)(ex.t.List,{"aria-label":"Product Information Tabs",testId:`${t}-tabs-list-${l}`,children:[(0,c.jsx)(ex.t.Trigger,{value:"tab0",testId:`${t}-tab-trigger-${l}-vet-reviewed`,trackId:`${t}-tab-trigger-${l}-vet-reviewed`,children:(0,c.jsxs)(c.Fragment,{children:[u?.[0].split(" ")[0],(0,c.jsx)("br",{}),u?.[0].split(" ").slice(1).join(" ")]})},"tab-trigger-vet-reviewed"),(0,c.jsx)(ex.t.Trigger,{value:"tab1",testId:`${t}-tab-trigger-${l}-key-ingredients`,trackId:`${t}-tab-trigger-${l}-key-ingredients`,children:(0,c.jsxs)(c.Fragment,{children:[u?.[1].split(" ")[0],(0,c.jsx)("br",{}),u?.[1].split(" ").slice(1).join(" ")]})},"tab-trigger-key-ingredients"),(0,c.jsx)(ex.t.Trigger,{value:"tab2",testId:`${t}-tab-trigger-${l}-directions`,trackId:`${t}-tab-trigger-${l}-directions`,children:u?.[2]&&(0,c.jsxs)(c.Fragment,{children:[u?.[2].split(" ")[0],(0,c.jsx)("br",{}),u?.[2].split(" ").slice(1).join(" ")]})},"tab-trigger-directions")]}),(0,c.jsx)(ex.t.Content,{value:"tab0",testId:`${t}-tab-content-${l}-vet-reviewed`,children:(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-primary-text text-body-text-16 mb-4",children:(0,c.jsx)("div",{dangerouslySetInnerHTML:{__html:"object"==typeof r?.items?.[l]?.vetQuote?r?.items?.[l]?.vetQuote?.quote||"":r?.items?.[l]?.vetQuote||""}})}),(0,c.jsx)(eo.JU.Item,{testId:`${t}-vet-label-${l}`,label:r?.items?.[l]?.vetQuote?.vet?.fullname,description:r?.items?.[l]?.vetQuote?.vet?.honours+", "+r?.items?.[l]?.vetQuote?.vet?.short_description,size:"md",imageSrc:r?.items?.[l]?.vetQuote?.vet?.avatar?.url||"",assetType:"image"})]})},"tab-content-vet-reviewed"),(0,c.jsx)(ex.t.Content,{value:"tab1",testId:`${t}-tab-content-${l}-key-ingredients`,children:(0,c.jsx)(ep.yq,{testId:`${t}-comparison-table-${l}`,wrapperClassName:"w-full",children:y?.map((e,t)=>(0,c.jsx)(ep.ck,{testId:"comparison-table-item",label:e.productIngredient.label,leadingContent:"image",imageSrc:e.productIngredient.secondaryImage?.url??e.productIngredient.image?.url,description:e.productIngredient.shortDescription??e.productIngredient.description,divider:t!==y.length-1,wrapperClassName:"w-full"},e.productIngredient.id))})},"tab-content-key-ingredients"),(0,c.jsx)(ex.t.Content,{value:"tab2",testId:`${t}-tab-content-${l}-directions`,children:e.product?.usageRecommendations?.length?(0,c.jsx)("div",{className:"p-4",children:(0,c.jsx)(em.X.FeedingGuide.Group,{testId:`${t}-feeding-guide-${l}`,columns:2,labels:[o("dog_size"),d?o("daily"):o("daily")+(g?"":o("tub_size"))],children:r?.items?.[l]?.product?.usageRecommendations?.map((e,r)=>{let a=e.dogSize.label,s=e.dailyAmount,i=isNaN(Number(e.dailyAmount))?1:Number(e.dailyAmount);return(0,c.jsx)(em.X.FeedingGuide.Row,{testId:`${t}-feeding-guide-row-${l}-${r}`,quantity:i,labels:[a,`${s} ${f}${1!==i?"s":""}`],hideIcons:!0,children:e.dogSize.weight},`feeding-guide-row-${r}`)})})}):(0,c.jsx)("div",{className:"text-primary-text text-body-text-14",dangerouslySetInnerHTML:{__html:e.product?.usageInstructions||""}})},"tab-content-directions")]})]})]},l)})})]})]})};var tB=r(29358),tS=r(65337),tA=r(83179);let tD=e=>{let{testId:t,wrapperClassName:r,initialQuantity:a=1,maxQuantity:s=10,maxQuantityReachedText:i="Maximum quantity reached",onQuantityChange:l,onRemove:n,isGroomingEssentialsBundle:d=!1}=e,[o,p]=(0,$.useState)(a),m=o>=s,x=1===o,u=x?tl.A:tA.A,h=tS.A;return(0,$.useEffect)(()=>{p(a)},[a]),(0,c.jsx)("div",{"data-testid":t,className:r,children:(0,c.jsxs)("div",{className:"inline-flex flex-wrap items-center gap-1",children:[(0,c.jsxs)("div",{className:(0,eS.cn)("inline-flex h-[2rem] w-[5rem] items-center rounded-md border border-[#D8DADF]",d&&"w-[72px]"),children:[(0,c.jsx)("button",{"data-testid":`${t}_decrease`,onClick:()=>
3{if(o<=1)n?.();else{let e=o-1;p(e),l?.(e)}},className:(0,eS.cn)("flex h-full w-[30px] touch-manipulation items-center justify-center"),"aria-label":x?"Remove item":"Decrease quantity",children:(0,c.jsx)(u,{className:"text-primary-text h-6 w-6"})}),(0,c.jsx)("div",{className:(0,eS.cn)("flex h-6 flex-grow items-center justify-center",d&&"justify-start"),children:(0,c.jsxs)("span",{className:"text-body-text-16",children:[o," ",d&&" set"]})}),!d&&(0,c.jsx)("button",{"data-testid":`${t}_increase`,onClick:()=>{if(o<s){let e=o+1;p(e),l?.(e)}},disabled:m,className:"flex h-full w-[30px] touch-manipulation items-center justify-center disabled:cursor-not-allowed","aria-label":"Increase quantity",children:(0,c.jsx)(h,{className:`h-6 w-6 ${m?"text-disabled-text":"text-primary-text"}`})})]}),!d&&m&&(0,c.jsx)("span",{className:"text-primary-text text-caption-text-12 whitespace-nowrap",children:i})]})})},tF=e=>{let{type:t,theme:r="default"}=e,{t:a}=(0,X.bl)("common");return(0,c.jsx)(tD,{maxQuantityReachedText:a("maxQuantityReachedText"),wrapperClassName:(0,V.cn)("flex","inline"===t&&"inverted"===r&&"bg-white rounded-md text-primary-text [&>div>div>button>svg]:text-primary-text"),...e})};tF.displayName="LineItem.Quantity";let tO=e=>{let{type:t,children:r,testId:a,className:s}=e;return(0,c.jsx)("div",{"data-testid":a,className:(0,V.cn)("flex gap-3 rounded-2xl","inline"===t&&"py-3","upsell"==t&&"bg-neutral-secondary-bg px-4 py-4",s),children:r})};tO.displayName="LineItem.Container";let tM={Badge:tB.Ex,Checkbox:tB.Sc,Container:tO,Content:tB.UC,Details:tB.B_,DetailsFooter:tB.Y_,Image:tB._V,Price:tB.gm,Quantity:tF,Remove:tB.n$,Tag:tB.vw,Row:tB.fI},tE=e=>{let{testId:t,mainProducts:r,billingText:a,findPrices:s,quantityChange:i,removeMainProductFromCart:l,handleToggleSubOtp:n,otpToggleTextV2:d=!1,hasMainBumps:o,isSpecialBumpOfferOnlyInCart:p,maxCartQuantity:m}=e,{t:x}=(0,X.bl)("cart_drawer"),u=ea();return(0,c.jsx)(c.Fragment,{children:r&&r.items&&r.items.length>0&&(0,c.jsx)(ei.Bv,{testId:`${t}-main-products-line-item-group`,type:r.type||"large",children:r.items.map((e,h)=>{let b=s(e).sub_discount_percentage;return(0,c.jsxs)("div",{className:(0,V.cn)("border-b border-[#D8DADF]",h===r.items.length-1&&(!o||o&&p)&&"border-b-0"),children:[(0,c.jsxs)(tM.Container,{testId:`${t}-main-product-line-item-${h}`,type:"inline",children:[e.cartProduct.image&&(0,c.jsx)(tM.Image,{testId:`${t}-main-product-line-item-media-image-${h}`,src:e.cartProduct.image.url,alt:e.cartProduct.image.alternativeText||e.cartProduct.name||""}),(0,c.jsxs)(tM.Content,{testId:`${t}-main-product-line-item-content-${h}`,children:[(0,c.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,c.jsx)(tM.Details,{testId:`${t}-main-product-line-item-details-${h}`,title:e.cartProduct.name,description:"function"==typeof a?a(e,h):a}),(0,c.jsx)(tM.Price,{testId:`${t}-main-product-line-item-pricing-variants-${h}`,rrp:u(s(e).price||0),discountedPrice:u(s(e).discounted_price||0),isStacked:!0})]}),(0,c.jsx)(tM.DetailsFooter,{testId:`${t}-main-product-line-item-details-footer-${h}`,children:(0,c.jsx)(tM.Quantity,{testId:`${t}-main-product-line-item-toggle-quantity-${h}`,initialQuantity:e.cartItem.quantity,maxQuantity:e.maxQuantity??m,onQuantityChange:t=>i(e)(t),onRemove:()=>l(e),isGroomingEssentialsBundle:e.id===tP.uC})})]})]}),e.cartItem.allowToggle?(0,c.jsx)(ef.l,{selected:"SUB"===e.cartItem.productType,onToggle:()=>n(e),testId:`${t}-subscription-toggle-${h}`,alignment:"right",hasBackground:!0,wrapperClassName:"mb-4 mt-2",children:(0,c.jsx)(ef.l.Heading,{children:"SUB"===e.cartItem.productType?x("congrats_best_price"):(0,eg.nr)(x(d?"subscribe_save_percentage_2":"subscribe_save_percentage",{sub_discount_percentage:b}))})}):null]},e.cartItem.productId)})})})},tR=e=>{let{testId:t="cart-drawer",wrapperClassName:r="",heading:a,StickyCta:s,preCtaElement:i,mainProducts:l,mainProductsBumpOffers:n,addonProducts:d,bumpOffers:o,open:p,onOpenChange:m,checkIfItemInCart:x,addToCart:u,removeFromCart:h,removeMainProductFromCart:b,quantityChange:g,billingText:f,handleToggleSubOtp:y,maxCartQuantity:_,specialBumpOfferProductId:v,isLoading:j,isError:w=!1,cartTotalQuantity:C,loadingItemsNumber:I,stickyRef:N,bestSellers:$,progressBar:k,region:L=J.t9}=e,{t:P}=(0,X.bl)("cart_drawer"),T=(0,Y.useRouter)(),B=(n&&n.items&&n.items.length>0)??!1,S=(d&&d.items&&d.items.length>0)??!1,A=n?.items?.length===1&&(n?.items?.some(e=>e?.productOtpID===v)??!1);return(0,c.jsxs)(K.c,{open:p,onOpenChange:m,title:`${a} (${C} ${1===C?P("item.singular"):P("item.plural")})`,description:"",testId:"cart-drawer-sheet",height:"full",CtaComponent:!w&&C>0?(0,c.jsx)(eh,{StickyCta:s,preCtaElement:i}
3):null,removeSpacing:!0,ButtonDockBackground:"white",children:[w?(0,c.jsxs)("div",{className:"rb-xs:px-6 flex h-full w-full flex-col items-center justify-center gap-8 px-4 py-10",children:[(0,c.jsx)(q,{className:"rb-sm:max-w-[230px] mx-auto w-full max-w-[150px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-24 text-primary-text text-center",children:P("error_fetching_cart_data")}),(0,c.jsx)(Q.Q.Button,{variant:"primary",size:"md",onClick:()=>location.reload(),testId:"cart-drawer-empty-cart-button",width:"hug",children:P("refresh_page")})]}):C>0?(0,c.jsx)(c.Fragment,{children:j?(0,c.jsx)("div",{className:"flex h-full w-full flex-col items-center justify-center p-4",children:[...Array(I)].map((e,t)=>(0,c.jsx)("div",{className:"mb-2 h-[120px] w-full animate-pulse flex-col gap-6 rounded-2xl border-2 bg-white p-3 shadow-md",children:(0,c.jsxs)("div",{className:"flex h-full w-full flex-col justify-between gap-2",children:[(0,c.jsx)("div",{className:"flex h-1/4 w-5/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-3/6 bg-gray-200"}),(0,c.jsx)("div",{className:"flex h-1/4 w-full bg-gray-200"})]})},t))}):(0,c.jsxs)("div",{className:r,children:[k?.display&&(0,c.jsx)(Z,{...k,testId:"cart-drawer-progress-bar",wrapperClassName:"rb-xs:px-6 px-4"}),(0,c.jsxs)("div",{className:"rb-xs:px-6 flex flex-col px-4 pb-4",children:[l&&l.items&&l.items.length>0&&(0,c.jsx)(tE,{testId:t,mainProducts:l,findPrices:ee,quantityChange:g,handleToggleSubOtp:y,otpToggleTextV2:l.otpToggleTextV2,billingText:f,removeMainProductFromCart:b,maxCartQuantity:_,hasMainBumps:B,isSpecialBumpOfferOnlyInCart:A}),B&&(0,c.jsx)(eb,{testId:t,mainProductsBumpOffers:n,specialBumpOfferProductId:v,findPrices:ee,billingText:f,removeFromCart:h}),S&&(0,c.jsx)(el,{testId:t,addonProducts:d,checkIfItemInCart:x,addToCart:u,removeFromCart:h})]}),o&&o.items&&o.items.length>0&&(0,c.jsx)(tT,{testId:t,bumpOffers:o,checkIfItemInCart:x,addToCart:u,removeFromCart:h,region:L})]})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"rb-xs:px-6 rb-xs:py-12 rb-sm:py-16 flex h-full w-full flex-col items-center justify-center gap-4 px-4 py-10",children:[(0,c.jsx)(z,{className:"rb-xs:max-w-[88px] rb-xs:h-[88px] mx-auto h-[64px] w-full max-w-[64px]","aria-label":"Empty cart icon",width:"100%",height:"auto"}),(0,c.jsx)("p",{className:"text-header-text-16-sans rb-xs:text-header-text-20-sans text-primary-text text-center",children:P("your_cart_is_empty")})]}),(0,c.jsx)("div",{className:"bg-custom-gray-NEUTRAL h-full py-8",children:$&&$.length>0&&(0,c.jsx)(U.O,{testId:"cards_carousel",trackId:"cart-bestsellers-carousel",textBlock:{heading:`${P("bestsellers_heading")}`,variant:"sub-section-banner",alignment:"left",wrapperClassName:"[&_h2]:text-[18px] rb-xs:[&_h2]:text-[20px] [&_h2]:font-inter [&_h2]:font-semibold [&_h2]:leading-[1.2] [&_h2]:text-primary-text [&_h2]:text-left"},hasControls:$.length>3,wrapperClassName:"px-4 rb-xs:px-8 rb-sm:px-6 [&>div]:flex [&>div]:flex-col [&>div]:h-full [&>div]:justify-between [&>div>div>div:first-child]:pb-4",slideClassName:"flex-none !basis-auto w-[138px] rb-xs:w-[170px] rb-sm:w-[158px] mr-2 rb-xs:mr-2 last:mr-0",button:{children:`${P("shop_all_products")}`,onClick:()=>{m(!1),T.push("/collections")},width:"fill",size:"md",orientation:"stacked"},children:$?.map((e,t)=>{let r=e.url.replace("/rebrand","")||"";return(0,c.jsx)(W.FA.Minimal,{testId:`bestseller-tile-${t}`,title:e.title,bodyCopy:e.description,imageSrc:e.image,imageAlt:e.imageAlt||"Best seller",buttonText:P("shop_now"),action:{type:"link",href:`/products${r}`},isClickable:!1},t)})})})]}),(0,c.jsx)("div",{ref:N})]})},tz=()=>{(0,Y.useRouter)();let{t:e}=(0,p.Bd)(),{isLoading:t,isError:r}=(0,P.a)(),{cartData:a,numOfPages:s}=(0,h.S)(),{discounted_total:i}=(0,g.P)(),l=(0,v.vL)(),n=(0,_.Ts)(),d=(0,_.AP)(),u=(0,_.d0)(),b=(0,_.IM)(),f=(0,L.A)(),y=(0,M.o_)(),j=(0,O._D)(),{setIsMiniCartModalOpen:w}=(0,O.xS)(),C=(0,v.gH)(),I=(0,v.G$)(),{setIsCheckoutLoading:N,setCheckoutError:A}=(0,v.Nc)();(0,B.j)(C,N);let R=l?.bestSellers??void 0,z=a?.filter(e=>"FreeGiftOffer"===e.__typename),H=(0,F.wl)(l?.freeGiftOptInOffer?.id??null),q=(0,F.M6)(l?.cartBumps),Q=a?.filter(e=>"Page"===e.__typename)??[],U=a?.filter(e=>"BumpOffer"===e.__typename)??[],V=n.some(e=>e.productType===o.Xk),{removeMainProductFromCart:G,quantityChange:Z,handleToggleSubOtp:K,checkIfItemInCart:W,handleCheckoutClick:J}=k({productItems:Q,numOfPages:s,specialBumpOffer:H}),{setIsMinimumSpendFreeShipping:X,calculateProgress:ee}=(0,M.HH)(),et=(0,M.Mg)(),er=(0,M.wD)(),[ea,es]=(0,$.useState)(!0),{isFrench:ei}=(0,T.A)();(0,$.useEffect)(()=>{es(!ev.pw||V),X(i,V),ee(i)},[i,ee,X,V]);let el=Math.max(...Q.map(e=>{let t=e.cartItem,r=e.cartProduct.prices["SUB"===t.productType?"sub":"otp"].find(e=>e.quantity===t.quantity);return(0,ew.A)(r)||0})),en=ev.JC&&ei,ed=e("discount_suffix"),ec=ed.split(" ").map(e=>"rabais"===e?e.toUpperCase():e).join(" "),eo=e("free_shipping_only"),ep=eo.toLowerCase().split(" ").map((e,t)=>1===t?e.toUpperCase():e).join(" "),em=er?`<strong>${e("all_yours")}</strong> ${el>0?`${el}${en?ec:ed}`:""} ${z.length>0?`, ${e("free_gift")}`:""}${el>0||z.length>0?` ${en?"et":"&"} `:""}${en?ep:eo}`:en?`${e("free_shipping_on_order")} ${f(ej.vP)}`:`<span class="font-bold">${f(y)}</span> ${e("away_from_worth_short")} ${f(ej.vP)}!`,{height:ex}=(0,S.U)(),eu=(0,$.useRef)(null),eh=Math.max(0,Math.floor((ex-48-(eu.current?.clientHeight||0))/136));return(0,c.jsx)(tR,{heading:e("cart_heading"),wrapperClassName:"",testId:"cart-drawer-story",open:j,onOpenChange:()=>{w(!1),A(null)},preCtaElement:(0,c.jsx)(x.A,{className:"!p-0"}),StickyCta:{testId:"cart-drawer-cta",text:`${e("checkout_now")} | ${f(i)}`,onClick:()=>J(),variant:"primary",width:"fill",isLoading:C,disabled:C,leftIcon:(0,c.jsx)(D,{}),error:I?e("internal_error"):void 0},progressBar:{display:ea,percentage:er?100:et,text:em},mainProducts:{testId:"main-products",type:"main",items:Q,otpToggleTextV2:ev.pw},mainProductsBumpOffers:{testId:"main-products-bump-offers",type:"main",items:U},addonProducts:{testId:"addon-products",type:"addon",items:[...z,H?[H]:[]].flat()},bumpOffers:{testId:"bump-offers",wrapperClassName:"",tabCount:3,items:q},checkIfItemInCart:W,addToCart:d,removeFromCart:b,removeMainProductFromCart:G,quantityChange:Z,billingText:(e,t)=>
3(0,c.jsx)(m,{schedule:e.cartItem.schedule,elementID:`${t}-billing-text`}),handleToggleSubOtp:K,specialBumpOfferProductId:H?.productOtpID,isLoading:t,isError:r,cartTotalQuantity:u,loadingItemsNumber:eh,stickyRef:eu,bestSellers:R,region:ev.pw?E.ij.UK:E.ij.US})};var tH=r(55528);let tq=()=>{let e=(0,Y.useRouter)(),{cartData:t}=(0,h.S)(),r=(0,O.Au)(),a=(0,O._D)(),{setIsMiniCartModalOpen:s}=(0,O.xS)();switch((0,$.useEffect)(()=>{if(e.query.drawer&&!a)switch(e.query.drawer){case"ecom_cart":s(!0,"ecom_cart");break;case"ecom_cart_optexpupgd1":s(!0,"ecom_cart_optexpupgd1");break;case"ecom_cart_optexpupgd2":s(!0,"ecom_cart_optexpupgd2");break;case"ecom_cart_optexp_added":s(!0,"ecom_cart_optexp_added");break;case"ecom_cart_optexp_trtdl":s(!0,"ecom_cart_optexp_trtdl");break;case"ecom_cart_optexptoggl":s(!0,"ecom_cart_optexptoggl");break;case"ecom_cart_optexpgrmesntl":s(!0,"ecom_cart_optexpgrmesntl");break;case"ecom_cart_optexp_mltb":s(!0,"ecom_cart_optexp_mltb")}},[e.query.drawer,s]),(0,$.useEffect)(()=>{let s={...e.query},i=!1;a&&s.drawer!==r?(s.drawer=r,i=!0,(0,tH.V)({event:"view_cart",cart:t})):a||s.drawer!==r||(delete s.drawer,i=!0),i&&e.push({pathname:e.pathname,query:s},void 0,{shallow:!0})},[a,r,e]),r){case"ecom_cart":return(0,c.jsx)(eI,{});case"ecom_cart_optexpupgd1":return(0,c.jsx)(eZ,{});case"ecom_cart_optexpupgd2":return(0,c.jsx)(ti,{});case"ecom_cart_optexp_added":return(0,c.jsx)(eJ,{});case"ecom_cart_optexp_trtdl":return(0,c.jsx)(tm,{});case"ecom_cart_optexptoggl":return(0,c.jsx)(tI,{});case"ecom_cart_optexpgrmesntl":return(0,c.jsx)(tz,{});case"ecom_cart_optexp_mltb":return(0,c.jsx)(tN,{});default:return null}}},57612:(e,t,r)=>{r.d(t,{A:()=>i,Y:()=>s});var a=r(21961);let s=()=>{let{locale:e,defaultLocale:t}=(0,a.useRouter)(),r=e||t||"en",s=r.split("-")[0],i=r.split("-")[1]||"",l="es-MX"===r,n=r===(t||"en");return{locale:r,defaultLocale:t||"en",languageCode:s,langCode:s,countryCode:i,isEnglish:"en"===s,isFrench:"fr"===s,isSpanishMX:l,isDefaultLocale:n}},i=s},61852:(e,t,r)=>{r.d(t,{X:()=>E});var a,s,i,l=r(17942),n=r(47606);function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let p=e=>n.createElement("svg",o({width:"1em",height:"1em",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),i||(i=n.createElement("path",{d:"M15.334 5.68311C15.7021 5.68322 16 5.982 16 6.3501C16 6.71822 15.7021 7.01698 15.334 7.01709H8.72754V10.6831C8.72754 12.0163 8.00023 12.683 6.5459 12.6831H2.18164C0.727036 12.6831 0 12.0164 0 10.6831V5.68311H15.334Z",fill:"currentColor"})));var m=r(95425);let x={1:"grid-cols-1",2:"grid-cols-2"},u="grid w-full grid-cols-2 gap-4 border-b border-[#D8DADF] py-4",h=e=>x[e],b="flex flex-col",g=e=>"sm"===e||"md"===e?"text-primary-text text-body-text-16-semibold":e?"text-primary-text text-body-text-18-semibold":"text-primary-text text-body-text-16-semibold rb-sm:text-body-text-18-semibold",f=e=>"sm"===e||"md"===e?"text-secondary-text text-body-text-16 flex flex-col":e?"text-secondary-text text-body-text-18 flex flex-col":"text-secondary-text text-body-text-16 rb-sm:text-body-text-18 flex flex-col",y="flex gap-1",_="text-primary-text h-4 w-4",v={chew:{half:e=>n.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"},e),s||(s=n.createElement("path",{d:"M8 -3.49691e-07C5.87827 -2.56947e-07 3.84344 0.842854 2.34315 2.34315C0.842854 3.84344 -2.82249e-07 5.87827 -3.49691e-07 8C-4.17134e-07 10.1217 0.842854 12.1566 2.34315 13.6569C3.84344 15.1571 5.87827 16 8 16L8 8L8 -3.49691e-07Z",fill:"currentColor"}))),full:e=>n.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"}
3,e),a||(a=n.createElement("circle",{cx:8,cy:8,r:8,fill:"currentColor"})))},scoop:{half:p,full:p}},j=e=>{let{wrapperClassName:t,quantity:r,columns:a=1,testId:s,children:i,size:n,labels:d=["Dog Size","Daily Serving"],iconType:c="chew",hideIcons:o}=e,[p,x]=d,j=p.trim().length>0,w=v[c]?.["half"===r?"half":"full"];return(0,l.jsxs)("div",{"data-testid":s,className:(0,m.cn)(u,h(a),t),children:[(0,l.jsxs)("div",{className:(0,m.cn)(b,"rb-sm:gap-1"),children:[(0,l.jsx)("p",{className:(0,m.cn)(g(n)),children:p}),(0,l.jsx)("div",{className:(0,m.cn)(j?f(n):g(n)),children:i})]}),2===a&&(0,l.jsxs)("div",{className:(0,m.cn)(b,j&&"rb-sm:gap-2 gap-1",o?"justify-start":"justify-end"),children:[o?null:(0,l.jsxs)("div",{className:(0,m.cn)(y),children:["half"===r&&(0,l.jsx)(w,{"data-testid":`${s}-quantity-half`,className:(0,m.cn)(_)}),"number"==typeof r&&[...Array(r).keys()].map((e,t)=>(0,l.jsx)(w,{"data-testid":`${s}-quantity-full`,className:(0,m.cn)(_)},t))]}),(0,l.jsx)("p",{className:(0,m.cn)(g(n)),children:x})]})]})};j.displayName="Table.FeedingGuide.Row";let w="flex w-full flex-col",C="border-t border-[#D8DADF]",I="grid w-full gap-4 border-b border-[#D8DADF] pb-4 grid-cols-2",N="flex",$="text-primary-text text-body-text-16 rb-sm:text-body-text-18",k=e=>{let{wrapperClassName:t,children:r,testId:a,columns:s=1,labels:i=["Dog Size","Daily"],headingClassOverride:d}=e,[c,o]=i,p=n.Children.map(r,(e,t)=>{if((0,n.isValidElement)(e)&&e.type===j){let t=e.props;return(0,n.cloneElement)(e,{...t,columns:s,testId:`${a}-row`})}return null});return(0,l.jsxs)("div",{"data-testid":a,className:(0,m.cn)(w,1===s&&C,t),children:[2===s&&(0,l.jsxs)("div",{className:(0,m.cn)(I),children:[(0,l.jsx)("div",{className:(0,m.cn)(N),children:(0,l.jsx)("p",{className:(0,m.cn)($,d),children:c})}),(0,l.jsx)("div",{className:(0,m.cn)(N),children:(0,l.jsx)("p",{className:(0,m.cn)($,d),children:o})})]}),p]})};k.displayName="Table.FeedingGuide.Group";var L=r(39599),P=r(35138);let T=e=>{let{testId:t,wrapperClassName:r,discountedClassName:a,rrpClassName:s,price:i,discountedPrice:n}=e;return n?(0,l.jsxs)("div",{"data-testid":t,className:`flex items-center gap-1 ${r||""}`,children:[(0,l.jsx)("span",{className:(0,m.cn)("text-positive-text text-body-text-18-semibold uppercase",a),children:n}),(0,l.jsx)("span",{className:(0,m.cn)("text-secondary-text line-through",s),children:i})]}):(0,l.jsx)("span",{"data-testid":t,className:(0,m.cn)("text-body-text-14-semibold",r,s),children:i})},B=e=>{let{wrapperClassName:t,testId:r,title:a,items:s,totalLabel:i="Total",totalAmount:n,savings:d,features:c}=e;return(0,l.jsx)("div",{"data-testid":r,className:(0,m.cn)("w-full",t),children:(0,l.jsxs)("div",{className:"flex-1 gap-8",children:[a?(0,l.jsx)("div",{className:"border-b border-[#D8DADF] py-4",children:(0,l.jsx)("h3",{className:"text-header-text-16-sans text-primary-text",children:a})}):null,s?.map(e=>(0,l.jsxs)("div",{className:"grid grid-cols-2 border-b border-[#D8DADF] py-4",children:[(0,l.jsxs)("div",{className:"text-body-text-16 flex flex-wrap items-center gap-1",children:[(0,l.jsx)("span",{className:"text-primary-text",children:e.name}),e.discount&&(0,l.jsx)("span",{className:"text-positive-text",children:e.discount})]}),(0,l.jsx)("div",{className:"text-body-text-14 flex flex-wrap justify-end",children:(0,l.jsx)(T,{price:e.isDiscounted?e.originalPrice:e.currentPrice,discountedPrice:e.isDiscounted?e.currentPrice:void 0,discountedClassName:"text-body-text-16-semibold",rrpClassName:"text-body-text-14"})})]},e.id)),(0,l.jsx)("div",{className:"border-b border-[#D8DADF] py-4",children:(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{className:"text-body-text-18-semibold text-primary-text",children:i}),(0,l.jsx)(T,{price:n.original,discountedPrice:n.current,wrapperClassName:"text-body-text-18",discountedClassName:"text-body-text-18-semibold",rrpClassName:"text-body-text-16"})]})}),(0,l.jsx)("div",{className:"py-4",children:(0,l.jsx)("div",{className:"text-header-text-24-sans text-positive-text",children:d})}),c&&c.length>0?(0,l.jsx)("div",{className:"flex w-full flex-wrap items-center justify-start gap-4",children:c.map((e,t)=>(0,l.jsx)(P.JU.Item,{label:e,size:"sm",Icon:L.A,assetType:"icon"},t))}):null]})})};B.displayName="Table.Pricing.Savings";var S=r(22455);let A=e=>{let{wrapperClassName:t,testId:r,summary:a={subtotal:{original:"$00.00",current:"$00.00"},shipping:{original:"$00.00",current:"FREE",isFree:!0},taxes:"$00.00",totalSavings:"$00.00",orderTotal:"$00.00"}}=e,{t:s}=(0,S.bl)("table.pricing.order_total");return(0,l.jsxs)("div",{"data-testid":r,className:t,children:[(0,l.jsxs)("div",{className:"flex items-center justify-between py-1",children:[(0,l.jsx)("span",{className:"text-primary-text text-body-text-16",children:s("subtotal")}),(0,l.jsx)(T,{price:a.subtotal.original,discountedPrice:(()=>
3{if(a.subtotal.current!==a.subtotal.original)return a.subtotal.current})(),wrapperClassName:"text-body-text-14",testId:`${r}_subtotal`})]}),a.shipping&&(0,l.jsxs)("div",{className:"flex items-center justify-between py-1",children:[(0,l.jsx)("span",{className:"text-primary-text text-body-text-16",children:s("shipping")}),(0,l.jsx)(T,{price:a.shipping.original,discountedPrice:a.shipping?.isFree?"FREE":a.shipping?.current!==a.shipping?.original?a.shipping?.current:void 0,wrapperClassName:"text-body-text-14",testId:`${r}_shipping`})]}),a.taxes&&(0,l.jsxs)("div",{className:"flex items-center justify-between py-1",children:[(0,l.jsx)("span",{className:"text-primary-text text-body-text-16",children:s("taxes")}),(0,l.jsx)(T,{price:a.taxes,wrapperClassName:"text-primary-text",testId:`${r}_taxes`})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between py-1",children:[(0,l.jsx)("span",{className:"text-primary-text text-body-text-16",children:s("total_savings")}),(0,l.jsx)(T,{price:a.totalSavings,wrapperClassName:"text-positive-text",testId:`${r}_savings`})]}),(0,l.jsx)("div",{className:"mt-3",children:(0,l.jsxs)("div",{className:"flex items-center justify-between border-y border-[#D8DADF] py-3",children:[(0,l.jsx)("span",{className:"text-primary-text text-body-text-18-semibold",children:s("order_total")}),(0,l.jsx)(T,{price:a.orderTotal,wrapperClassName:"text-secondary-text text-body-text-18-semibold",testId:`${r}_total`})]})})]})};A.displayName="Table.Pricing.OrderTotal";var D=r(16026);let F=e=>{let{wrapperClassName:t,testId:r,label:a,value:s}=e,[i,...d]=Array.isArray(a)?a:[a],[c,...o]=Array.isArray(s)?s:[s],p=o.length>0&&"-"===c,x="string"==typeof c&&Array.isArray(s)&&s.every(e=>"string"==typeof e)&&0===o.length?s.join("\n"):c;return i?(0,l.jsxs)("div",{"data-testid":r,className:`text-body-text-14 text-primary-text border-b border-[#D8DADF] py-2 ${t||""}`,children:[(0,l.jsxs)("div",{className:"flex w-full items-start justify-between gap-4",children:[(0,l.jsx)("div",{className:"flex flex-1 flex-col items-start text-left",children:(0,l.jsx)("span",{className:(0,m.cn)((!x||p)&&"font-bold"),children:i})}),(0,l.jsx)("div",{className:`max-w-[112px] shrink-0 self-end whitespace-pre-line text-right ${p?"!self-start":""}`,children:(0,l.jsxs)("div",{className:"flex flex-col",children:[!p&&(0,l.jsxs)(l.Fragment,{children:["string"==typeof x&&(0,l.jsx)("div",{children:(0,D.nr)(x)}),"string"!=typeof x&&(0,l.jsx)("div",{children:x})]}),0===d.length&&o.length>0&&o.map((e,t)=>(0,l.jsx)("div",{children:"string"==typeof e?(0,D.nr)(e):e},`primary-sub-${t}`)),d.length>0&&o.length>0&&!p&&o.filter(e=>"string"==typeof e).map((e,t)=>(0,l.jsx)("div",{children:(0,D.nr)(e)},`primary-sub-${t}`))]})})]}),d.length>0&&o.length>0&&(0,l.jsx)("div",{className:`mt-2 grid gap-y-4 ${p?"mb-2":""}`,style:{gridTemplateColumns:"1fr auto"},children:d.map((e,t)=>{let r=o.filter(e=>"string"!=typeof e),a=o[t];return(0,l.jsxs)(n.Fragment,{children:[(0,l.jsx)("div",{className:"pr-4 text-left",children:e}),p?"-"!==a&&(0,l.jsx)("div",{className:"max-w-[112px] text-right",children:"string"==typeof a?(0,D.nr)(a):a}):(0,l.jsx)("div",{className:"max-w-[112px] text-right",children:r[t]})]},`sub-${t}`)})})]}):null};F.displayName="Table.ProductFacts.Row";var O=r(71764);let M=e=>{let{testId:t,wrapperClassName:r,hideTitle:a=!1,productName:s,servingInfo:i,servingWeight:n,activeIngredients:d,inactiveIngredients:c,activeIngredientsLabel:o,inactiveIngredientsLabel:p,warnings:m,cautions:x,ingredientsDescription:u,badges:h=["usa","nasc","triple_tested"],badgeUspDisclaimer:b,title:g="Product Facts"}=e,{t:f}=(0,S.bl)("table.product_facts.group");return(0,l.jsxs)("div",{"data-testid":t,className:`w-full bg-white ${r||""}`,children:[!a&&(0,l.jsxs)("div",{className:"text-header-text-16-sans text-primary-text mb-4 text-left",children:[s,i?" ⢠"+i:""]}),(0,l.jsxs)("div",{className:"bg-white",children:[(0,l.jsx)("div",{className:"text-header-text-20-sans bg-bold px-2 py-2 text-white",children:g}),(0,l.jsxs)("div",{className:"text-body-text-14 text-primary-text border-b border-[#D8DADF] py-2 font-bold",children:[o??f("active_ingredients"),n?` (${Array.isArray(n)?n.join(", "):n})`:"",f("colon")]}),(0,l.jsx)("div",{children:d.map((e,t)=>(0,l.jsx)(E.ProductFacts.Row,{label:e.label,value:e.value,testId:`ingredient-row-${t}`},t))}),x&&(0,l.jsx)("div",{className:"text-body-text-14 text-secondary-text my-4",children:(0,D.nr)(x)}),c&&(0,l.jsxs)("div",{className:"text-body-text-14 text-secondary-text my-4",children:[(0,l.jsx)("span",{className:"font-semibold",children:p??f("inactive_ingredients")}),c]}),m&&(0,l.jsx)("div",{className:"text-body-text-14 text-secondary-text my-4",dangerouslySetInnerHTML:{__html:m}}),u&&(0,l.jsx)("div",{className:"text-body-text-14 text-secondary-text my-4 space-y-4",dangerouslySetInnerHTML:{__html:u}}),(0,l.jsx)(O.De,{testId:`${t}-badges`,badges:h,align:"center",isOffWhite:!0,badgeClassNames:{usa:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[46px] rb-xs:h-[46px] rb-md:h-[46px]",nasc:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[66px] rb-xs:h-[66px] rb-md:h-[66px]",gmp:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[46px] rb-xs:h-[46px] rb-md:h-[46px]",triple_tested:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[54px] rb-xs:h-[54px] rb-md:h-[54px]",pet_awards:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[73px] rb-xs:h-[73px] rb-md:h-[73px]",ca_en:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[46px] rb-xs:h-[46px] rb-md:h-[46px]",ca_fr:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[46px] rb-xs:h-[46px] rb-md:h-[46px]",triple_tested_fr_left:"w-[90px] rb-xs:w-[90px] rb-md:w-[90px] h-[54px] rb-xs:h-[54px] rb-md:h-[54px]"},disclaimer:b})]})]})};M.displayName="Table.ProductFacts.Group";let E={FeedingGuide:{Row:j,Group:k},Pricing:{Savings:B,OrderTotal:A},ProductFacts:{Row:F,Group:M}}},62477:(e,t,r)=>{r.d(t,{A:()=>l});var a,s=r(47606);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let l=e=>s.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none"},e),a||(a=s.createElement("path",{d:"M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6H4V4H9V3H15V4H20V6H19V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM17 6H7V19H17V6ZM9 17H11V8H9V17ZM13 17H15V8H13V17Z",fill:"currentcolor"})))},63158:(e,t,r)=>{r.d(t,{z:()=>b,A:()=>g});var a=r(17942),s=r(95425);let i="flex gap-x-2 [align-items:safe_center]",l=(e,t)=>
3e&&t?"flex-col items-end":"flex-col justify-center",n="flex gap-x-1 flex-row [align-items:safe_center]",d=e=>`${e?"flex-col":"flex-col-reverse"} [align-items:flex-end] text-right`,c="flex-row-reverse",o="text-primary-text text-body-text-14-semibold ",p="text-secondary-text text-body-text-14 line-through",m="text-secondary-text text-[12px] rb-xs:text-[14px]",x="text-positive-text text-body-text-18-semibold",u="text-body-text-14-semibold",h="text-primary-text text-body-text-14-semibold rb-xs:text-body-text-16-semibold",b=e=>{let{type:t="RRP-Volume",rrp:r,discountedPrice:b,label:g,testId:f="price-display",wrapperClassName:y,discountPercentage:_,hasQuantityButtonStyling:v=!1,...j}=e,{showLabel:w,isStacked:C,isVolume:I,isDiscountTrailing:N,isSmall:$}={showLabel:"RRP-discountedPrice-from"===t,isStacked:"stacked"===t||"stacked-sm"===t,isVolume:"RRP-Volume"===t,isDiscountTrailing:"RRP-discountedPrice"===t||"RRP-discountedPrice-lg"===t,isSmall:"stacked-sm"===t||"RRP-discountedPrice"===t,...j},k=!!r&&!!b&&r===b;return(0,a.jsxs)("div",{"data-testid":f,className:(0,s.cn)(i,C&&l(!!r,!!b),y),children:[(I||w)&&g&&(0,a.jsx)("p",{className:"text-secondary-text text-body-text-14",children:g}),(0,a.jsxs)("div",{className:(0,s.cn)(n,C&&d(N),!C&&N&&c),children:[_&&(0,a.jsx)("p",{className:(0,s.cn)("font-normal",x,$&&u),"data-testid":`${f}-discount-percentage`,children:_}),b&&(0,a.jsx)("p",{className:(0,s.cn)(x,$&&u,v&&h),"data-testid":`${f}-discounted-price`,children:b}),r&&!k&&(0,a.jsx)("p",{className:(0,s.cn)(o,b&&p,v&&m),"data-testid":`${f}-rrp`,children:r})]})]})},g=b},64339:(e,t,r)=>{r.d(t,{FA:()=>ex,vX:()=>l,W:()=>s.W});var a,s=r(21887),i=r(17942);let l=(e,t)=>({children:e.tiles?.map(e=>(0,i.jsx)(ex.Content,{testId:`${t}_tile-content`,...(0,s.W)(e)}))});var n=r(77638),d=r(50309),c=r(15804),o=r(16026),p=r(95425),m=r(47606),x=r(41109);let u={container:{default:"flex flex-col gap-4"},action:{default:"",variants:{horizontal:"flex gap-4 flex-col"}},body:{default:"w-full flex gap-4 flex-1",variants:{vertical:"flex-col rb-sm:max-w-[427px]",horizontal:"w-full"}},image:{default:"relative",variants:{ratio:{default:"aspect-[1/1]",...d.Wb},horizontal:"!w-[72px] min-w-[72px] h-[72px] !rb-sm:w-[108px] rb-sm:min-w-[108px] rb-sm:h-[108px] relative"}},imageComponent:{default:"absolute left-0 top-0 h-full w-full"},imageOverlay:{default:"rb-sm:p-4 relative z-10 flex h-full flex-col justify-between p-2",variants:{centered:"items-center"}},content:{default:"flex flex-1 flex-col items-start gap-4",variants:{horizontal:"mt-auto",centered:"items-center text-center"}},contentHeader:{default:"flex flex-col gap-1"},title:{default:"text-primary-text text-header-text-16-sans rb-sm:text-header-text-20-sans",variants:{inverted:"text-white"}},subtitle:{default:"text-secondary-text text-body-text-14 rb-sm:text-body-text-16",variants:{inverted:"text-white"}},description:{default:"text-secondary-text text-body-text-14 rb-sm:text-body-text-16 whitespace-pre-wrap [&_b]:text-primary-text [&_strong]:text-primary-text ",variants:{inverted:"text-white"}},tagGroup:{default:"mt-auto"},buttonWrapper:{default:"mt-auto"},tagGroupHorizontal:{variants:{md:"rb-sm:flex hidden",sm:"rb-sm:hidden"}}},h=e=>{let{title:t,subtitle:r,description:a,testId:s,orientation:l="stacked",isClickable:h=!1,action:b,image:g,tagStat:f,tagBauList:y,button:_,theme:v,trackId:j,onClick:w,alignment:C="left",Icon:I,classNames:N,imageContainerStyle:$,testIdOverrides:k,tagOverlay:L=!1}=e,P="stacked"===l,T=!P,B=(0,m.useMemo)(()=>y||[],[y]),S=(0,m.useCallback)(()=>f?f.map((e,t)=>(0,i.jsx)(c.v.Stat,{...e,testId:`${s}_tag-stat_${t}`},`tile-content_tag-stat_${t}`)):null,[f,s]),A=(0,m.useCallback)(()=>B&&0!==B.length?B.map((e,t)=>(0,i.jsx)(c.v.Bau,{...e,testId:e.testId??`${s}_tag-bau_${t}`},`tile-content_tag-bau_${t}`)):null,[B,s]),D=(0,m.useMemo)(()=>{if(_)return h?{..._,as:"span",onClick:void 0}:{..._,onClick:w}},[_,h,w]),F=(0,m.useMemo)(()=>{let e=g.ratio??"1:1";return"object"==typeof e?"default":e},[g.ratio]),O=w&&h?{...b,type:"button",onClick:w}:b;return(0,i.jsx)("div",{"data-testid":s,className:(0,p.cn)(u.container.default,N?.container),children:(0,i.jsxs)(x.p,{...O,...!(w&&h)&&!b&&{type:void 0},testId:`${s}_action`,className:(0,p.cn)(T&&u.action.variants.horizontal,N?.action),children:[(0,i.jsxs)("div",{className:(0,p.cn)(u.body.default,T&&u.body.variants.horizontal,P&&u.body.variants.vertical,N?.body),children:[(0,i.jsxs)("div",{className:(0,p.cn)(u.image.variants.ratio[F],u.image.default,T&&!$&&u.image.variants.horizontal,N?.image),style:$,children:[(P||L)&&(0,i.jsx)("div",{className:(0,p.cn)(u.imageOverlay.default,"center"===C&&u.imageOverlay.variants.centered,N?.imageOverlay),children:B&&B.length>0?(0,i.jsx)(c.v.Group,{testId:`${s}_tag-group-vertical`,wrapperClassName:(0,p.cn)(u.tagGroup.default,N?.tagGroup),children:A()}):f&&f.length>0?(0,i.jsx)(c.v.Group,{testId:`${s}_tag-group-vertical`,wrapperClassName:(0,p.cn)(u.tagGroup.default,N?.tagGroup),children:S()}):null}),(0,i.jsx)("div",{className:(0,p.cn)(u.imageComponent.default,N?.imageComponent),children:(0,i.jsx)(d.Q1,{...g,testId:k?.image??`${s}_media-image`,trackId:j?`${j}-image`:void 0})})]}),(0,i.jsxs)("div",{className:(0,p.cn)(u.content.default,T&&u.content.variants.horizontal,P&&"center"===C&&u.content.variants.centered,N?.content),children:[I&&(0,i.jsx)("span",{"data-testid":`${s}_icon`,children:(0,i.jsx)(I,{width:24,height:24})}),(0,i.jsxs)("div",{className:(0,p.cn)(u.contentHeader.default,N?.contentHeader),children:[(0,i.jsx)("p",{className:(0,p.cn)(u.title.default,"inverted"===v&&u.title.variants.inverted,N?.title),"data-testid":k?.title??`${s}_title`,children:(0,o.nr)(t)}
3),r&&(0,i.jsx)("p",{className:(0,p.cn)(u.subtitle.default,"inverted"===v&&u.subtitle.variants.inverted,N?.subtitle),"data-testid":k?.subtitle??`${s}_subtitle`,children:r})]}),P&&(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsx)("div",{className:(0,p.cn)(u.description.default,"inverted"===v&&u.description.variants.inverted,N?.description),"data-testid":k?.description??`${s}_description`,children:(0,i.jsx)("p",{children:(0,o.nr)(a)})}),D&&(0,i.jsx)(n.Q.Button,{...D,testId:`${s}_button-pill`,wrapperClassName:u.buttonWrapper.default})]}),T&&!L&&B&&B.length>0?(0,i.jsx)("div",{className:u.tagGroupHorizontal.variants.md,children:(0,i.jsx)(c.v.Group,{testId:`${s}_tag-group-horizontal_md`,children:A()})}):T&&!L&&f&&f.length>0?(0,i.jsx)("div",{className:u.tagGroupHorizontal.variants.md,children:(0,i.jsx)(c.v.Group,{testId:`${s}_tag-group-horizontal_md`,children:S()})}):null]})]}),T&&!L&&B&&B.length>0?(0,i.jsx)("div",{className:u.tagGroupHorizontal.variants.sm,children:(0,i.jsx)(c.v.Group,{testId:`${s}_tag-group-horizontal_sm`,children:A()})}):T&&!L&&f&&f.length>0?(0,i.jsx)("div",{className:u.tagGroupHorizontal.variants.sm,children:(0,i.jsx)(c.v.Group,{testId:`${s}_tag-group-horizontal_sm`,children:S()})}):null]})})};h.displayName="Tile.Content";let b=(0,p.cn)("grid grid-cols-1","gap-x-4 gap-y-8","max-w-section mx-auto","rb-xs:gap-y-10 rb-sm:gap-y-16","rb-xs:grid-cols-2 rb-sm:grid-cols-3"),g={tablet:(0,p.cn)("[&>*:nth-child(3)]:rb-xs:col-span-2","[&>*:nth-child(3)]:rb-xs:w-[50%]","[&>*:nth-child(3)]:rb-xs:justify-self-center"),desktop:(0,p.cn)("[&>*:nth-child(3)]:rb-sm:col-span-1","[&>*:nth-child(3)]:rb-sm:w-full","[&>*:nth-child(3)]:rb-sm:justify-self-start")},f={container:{collection:b,whatToExpect:(0,p.cn)(b,g.tablet,g.desktop)}},y=e=>{let{children:t,wrapperClassName:r,testId:a,variant:s="collection",removeSectionPadding:l=!1}=e;if(!t)return null;let n=m.Children.toArray(t).filter(e=>(0,m.isValidElement)(e)&&e.type===h).length;return(0,i.jsx)("section",{className:"whatToExpect"===s?"rb-xs:px-0 px-6":l?"px-0":"px-section",children:(0,i.jsx)("div",{"data-testid":a,className:(0,p.cn)(f.container[s],2===n?"rb-sm:grid-cols-2 rb-sm:max-w-[66.666%] rb-sm:mx-auto":"",r),children:t&&m.Children.map(t,e=>(0,m.isValidElement)(e)&&e.type===h?e:null)})})};y.displayName="Tile.Group";let _=e=>{let{title:t,children:r,wrapperClassName:a,testId:s,trackId:l}=e;return(0,i.jsxs)("div",{"data-testid":s,"data-track-id":l,className:(0,p.cn)("flex flex-col",a),children:[(0,i.jsx)("h3",{className:"text-header-text-18-sans text-primary-text rb-xs:mb-6 mb-4",children:t}),(0,i.jsx)("div",{className:"rb-xs:gap-3 flex w-full flex-col gap-2",children:r})]})};_.displayName="Tile.GroupOverview";let v="flex flex-col w-full max-w-[170px] flex-1 rounded-lg min-w-[138px] rb-xs:min-w-[158px] group",j="w-full flex flex-col group",w="relative rounded-lg overflow-hidden h-full bg-white",C="w-full rounded-lg transition-transform duration-300 ease-in-out group-hover:scale-[0.85] scale-[0.8] [&>img]:!h-auto",I="flex flex-col gap-2 mt-2 h-full justify-between",N="flex flex-col gap-1",$=e=>{let{testId:t="tile_offer",wrapperClassName:r,imageSrc:a="",imageAlt:s="Product image",title:l="Title",bodyCopy:c="Description",buttonText:m="Shop Now",hasButton:u=!0,action:h,isClickable:b=!1,trackId:g}=e;return(0,i.jsx)("div",{"data-testid":t,className:(0,p.cn)(v,r),children:(0,i.jsxs)(x.p,{...!b&&{type:void 0},...h,testId:`${t}_minimal`,className:(0,p.cn)(j),children:[a&&(0,i.jsx)("div",{className:w,children:(0,i.jsx)(d.Q1,{src:a,alt:s,sizes:"158px",ratio:"1:1.1",rounded:!1,testId:`${t}_media_image`,trackId:g?`${g}-image`:void 0,wrapperClassName:(0,p.cn)(C)})}),(0,i.jsxs)("div",{className:(0,p.cn)(I),"data-testid":`${t}_container`,children:[(0,i.jsxs)("div",{className:N,"data-testid":`${t}_header_title`,children:[(0,i.jsx)("h3",{className:"text-body-text-16-semibold text-primary-text font-semibold",children:(0,o.nr)(l)}),(0,i.jsx)("p",{className:"text-body-text-14 text-secondary-text",children:(0,o.nr)(c)})]}),u&&(0,i.jsx)(n.Q.Button,{...{variant:"primary",size:"sm",width:"fill",disabled:!1,children:m},testId:`${t}_button_pill`,...b?{as:"span",onClick:void 0}:{}})]})]})})};$.displayName="Tile.Minimal";var k=r(39599),L=r(22624),P=r(43687);let T="flex flex-col rb-sm:max-w-[427px] flex-1 bg-white rounded-2xl overflow-hidden w-full",B="shadow-lg",S="w-full flex flex-col",A="relative",D="w-full",F="flex flex-col p-4 gap-2 rounded-b-2xl",O="flex flex-col gap-1",M="text-primary-text text-body-text-14",E="flex items-center gap-2 flex-wrap",R="text-body-text-16-semibold text-positive-text",z="flex flex-col gap-1",H="flex items-center gap-2",q="w-4 h-4 text-primary-text fill-primary-text",Q="text-body-text-14-semibold text-primary-text",U="mt-2 cursor-pointer",V="bg-disabled-bg text-disabled cursor-not-allowed",G=e=>{let{testId:t="tile_offer",wrapperClassName:r,hasTag:a=!0,tagLabel:s="Tag",tagType:l="urgency-primary",tagIcon:c,hasImage:o=!0,imageSrc:m="",imageAlt:u="Product image",title:h="2-Month Supply",subtitle:b="Shipped Every 2 Months",price:g="$00.00",packageType:f="Tub",discountPercentage:y="40% OFF",servingPrice:_=!0,servingPriceText:v="Only $1.03 per serving",labels:j=[],buttonText:w="Switch & Save $7",isUnavailable:C=!1,hasShadow:I=!1,hasBorder:N=!0,action:$,isClickable:G=!1,trackId:Z,onClick:K,TriggerComponent:W}=e;return(0,i.jsx)("div",{"data-testid":t,className:(0,p.cn)(T,N&&"border-neutral-bg border",I&&B,r),children:(0,i.jsxs)(x.p,{...$,...!G&&{type:void 0},testId:`${t}_action`,className:(0,p.cn)(S),children:[a&&(0,i.jsx)(P.RV,{type:l,label:s,testId:`${t}_tag_tile`,Icon:c}),o&&m&&(0,i.jsx)("div",{className:A,children:(0,i.jsx)(d.Q1,{src:m,alt:u,sizes:"375px",ratio:"5:4",rounded:!1,testId:`${t}_media_image`,trackId:Z?`${Z}-image`:void 0,wrapperClassName:D})}),(0,i.jsxs)("div",{className:(0,p.cn)(F,N&&(a||o&&!!m)&&"border-neutral-bg border-t"),"data-testid":`${t}_container`,children:[(0,i.jsxs)("div",{className:O,"data-testid":`${t}_header_title`,children:[(0,i.jsx)("h3",{className:"text-header-text-18-sans text-primary-text font-semibold",children:h}),(0,i.jsx)("p",{className:"text-body-text-14 text-primary-text",children:b})]}),(0,i.jsxs)("div",{className:M,"data-testid":`${t}_price`,children:[(0,i.jsxs)("span",{className:"font-semibold",children:[" ",g," "]}),f?` / ${f}`:null]}
3),(0,i.jsxs)("div",{className:E,children:[_&&(0,i.jsx)("span",{className:R,children:y}),(0,i.jsx)(L.jl,{type:"free-gift",label:v,testId:`${t}_tag_bau`,hideIcon:!0,wrapperClassName:"w-auto"})]}),j&&j.length>0&&(0,i.jsx)("div",{className:z,children:j.map((e,r)=>r>2?null:(0,i.jsxs)("div",{"data-testid":`${t}_label_${r}`,className:H,children:[(0,i.jsx)(k.A,{className:q}),(0,i.jsx)("span",{className:Q,children:e})]},`${t}_label_${r}`))}),W&&!C?W:(0,i.jsx)(n.Q.Button,{...{variant:"primary",size:"md",width:"fill",disabled:C,children:w},testId:`${t}_button_pill`,wrapperClassName:(0,p.cn)(U,C&&V),...G?{as:"span",onClick:K??void 0}:{}})]})]})})};G.displayName="Tile.Offer";var Z=r(33160);function K(){return(K=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(null,arguments)}let W=e=>m.createElement("svg",K({xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"currentColor"},e),a||(a=m.createElement("path",{d:"m233-120 65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Z"})));var J=r(35138);let X=e=>{let{image:t,imageBackground:r,title:a,labels:s,rating:l,testId:n,trackId:c,wrapperClassName:o}=e;return(0,i.jsxs)("div",{"data-testid":n,className:(0,p.cn)("border-disabled-bg rb-xs:rounded-2xl grid grid-cols-1 rounded-lg border",o),children:[(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsx)("div",{"data-testid":`${n}_image-container`,className:"rb-xs:w-[100px] rb-xs:rounded-l-2xl relative flex w-[96px] items-center rounded-tl-lg",style:r?{backgroundColor:r}:void 0,children:(0,i.jsx)(d.Q1,{...t,ratio:"1:1",wrapperClassName:"rounded-tl-lg rb-xs:rounded-l-2xl",testId:`${n}_product-image`,trackId:c?`${c}-image`:void 0})}),(0,i.jsxs)("div",{className:"rb-xs:pl-4 flex w-full flex-1 flex-col items-start justify-center px-3 py-3",children:[(0,i.jsxs)("div",{className:"rb-xs:gap-3 rb-xs:flex-row flex flex-col gap-1",children:[(0,i.jsx)("p",{"data-testid":`${n}_product-title`,className:"text-primary-text text-body-text-16-semibold",children:a}),l?(0,i.jsxs)("div",{"data-testid":`${n}_product-rating`,className:"text-body-text-14 text-secondary-text flex items-center gap-1",children:[(0,i.jsx)("span",{"data-testid":`${n}_product-rating-value`,className:"inline-block",children:l.value}),(0,i.jsx)(W,{width:16,height:16,fill:"#FF9A0A"}),(0,i.jsxs)("span",{"data-testid":`${n}_product-rating-count`,className:"inline-block",children:["(",l.count.toLocaleString(),")"]})]}):null]}),s&&s.length>0?(0,i.jsx)("div",{className:"rb-xs:flex hidden flex-wrap gap-x-4 gap-y-1 pt-2",children:s.map((e,t)=>(0,m.createElement)(J.JU.Item,{...e,key:t,size:"sm",labelFontWeight:"normal",testId:`${n}_label-${t}`}))}):null]})]}),(0,i.jsx)("div",{className:"rb-xs:hidden p-3 pt-2",children:s&&s.length>0?(0,i.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:s.map((e,t)=>(0,m.createElement)(J.JU.Item,{...e,key:t,size:"sm",labelFontWeight:"normal",testId:`${n}_label-${t}`}))}):null})]})};X.displayName="Tile.ProductOverview";var Y=r(63158),ee=r(17784);let et=e=>{let{testId:t,action:r,image:a,tagBau:s,tagTile:l,title:o,description:m,petTypeLabel:u="For dogs",rating:h,price:b,button:g,trackId:f,wrapperClassname:y}=e;return(0,i.jsx)("div",{"data-testid":t,"data-trackid":f,className:(0,p.cn)("rb-xs:w-[343px] rb-sm:w-full rb-sm:max-w-[1000px] rb-xs:mx-auto w-full",y),children:(0,i.jsxs)(x.p,{className:"rb-sm:flex-row flex w-full flex-col",...r,testId:`${t}_action`,children:[(0,i.jsxs)("div",{className:"rb-sm:basis-1/2 rb-sm:rounded-l-2xl rb-sm:rounded-tr-none overflow-hidden rounded-t-lg",children:[(0,i.jsxs)("div",{className:"rb-sm:h-[250px] relative flex flex-col",children:[(0,i.jsx)("div",{className:"absolute inset-0 z-10",children:s&&(0,i.jsx)("div",{className:"rb-sm:p-4 flex gap-2 p-2",children:(0,i.jsx)(c.v.Bau,{testId:`${t}_tag-bau`,...s})})}),(0,i.jsx)(d.Q1,{wrapperClassName:"h-full",testId:`${t}_media-image`,ratio:"2:1",...a})]}),l&&(0,i.jsx)("div",{className:"",children:(0,i.jsx)(c.v.Bau,{testId:`${t}_tag-tile`,...l,wrapperClassName:"text-body-text-14-semibold rounded-none justify-center"})})]}),(0,i.jsxs)("div",{className:"rb-sm:py-4 rb-sm:px-6 rb-sm:rounded-r-2xl rb-sm:rounded-bl-none rb-sm:border-t rb-sm:border-l-0 rb-sm
3:basis-1/2 rb-sm:items-start flex flex-col justify-center gap-2 rounded-b-lg border border-t-0 border-[#F5F5F1] bg-white p-2 pb-3",children:[(0,i.jsxs)("div",{className:"flex w-full flex-col gap-1",children:[u&&(0,i.jsx)("p",{"data-testid":`${t}_pet-type-label`,className:"text-caption-text-12-semibold text-secondary-text uppercase",children:u}),(0,i.jsx)("p",{"data-testid":`${t}_title`,className:"text-primary-text text-body-text-18-semibold",dangerouslySetInnerHTML:{__html:o}})]}),void 0!==h&&(0,i.jsx)(ee.G,{rating:h,testId:`${t}_rating`}),m&&(0,i.jsx)("div",{"data-testid":`${t}_description`,className:(0,p.cn)("text-secondary-text text-body-text-14 line-clamp-2"),children:(0,i.jsx)("p",{children:m})}),b?(0,i.jsx)(Y.A,{testId:`${t}_price-display`,...b}):null,g&&g.children&&(0,i.jsx)("div",{className:"flex",children:(0,i.jsx)(n.Q.Button,{testId:`${t}_button-pill`,...g,as:"span",width:"fill",variant:"secondary",theme:"default",size:"responsiveMd"})})]})]})})};et.displayName="Tile.ProductSpotlight";var er=r(20064);let ea=e=>{let{testId:t="tile_quiz_content",wrapperClassName:r,children:a}=e;return(0,i.jsx)(er.c8.Quiz.Container,{testId:t,wrapperClassName:(0,p.cn)("px-4 py-3 rb-xs:p-0 rb-xs:max-w-[415px] w-full",r),children:a})};ea.displayName="TileQuiz.Content";let es=e=>{let{testId:t="tile_quiz_media",images:r=[],socialProof:a,trackId:s,wrapperClassName:l}=e;return 0===r.length?null:(0,i.jsx)("div",{className:(0,p.cn)("rb-xs:max-w-[415px] relative w-full",l),children:(0,i.jsx)(d.EX,{testId:`${t}_product_carousel`,trackId:s?`${s}-carousel`:void 0,socialProof:a,children:r.map((e,r)=>(0,i.jsx)(d.Q1,{src:e.src,alt:e.alt,sizes:"100vh",ratio:"1:1",rounded:!1,testId:e.testId??`${t}_image_${r}`,trackId:s?`${s}-image-${r}`:void 0,wrapperClassName:"w-full"},`${t}_image_${r}`))})})};es.displayName="TileQuiz.Media";let ei=e=>{let{testId:t="tile_quiz",wrapperClassName:r,children:a}=e;return(0,i.jsx)("div",{"data-testid":t,className:(0,p.cn)("rb-xs:flex-row rb-xs:gap-6 rb-sm:gap-10 flex w-full flex-1 flex-col bg-white",r),children:a})};ei.displayName="TileQuiz.Container";let el={Container:ei,Media:es,Content:ea,Tag:er.c8.Quiz.Tag,Heading:er.c8.Quiz.Heading,Description:er.c8.Quiz.Description,LabelStack:er.c8.Quiz.LabelStack,LabelItem:er.c8.Quiz.LabelItem,Pricing:er.c8.Quiz.Pricing,FreeGiftTag:er.c8.Quiz.FreeGiftTag,Button:er.c8.Quiz.Button,TextLink:er.c8.Quiz.TextLink},en="flex flex-col gap-6 w-full bg-white border border-[#D8DADF] rounded-2xl rb-xs:rounded-3xl p-4 rb-xs:p-8",ed="flex flex-col gap-4 w-full",ec="text-body-text-14 text-primary-text",eo=e=>{let{testId:t,children:r,className:a}=e;return(0,i.jsx)("p",{"data-testid":t,className:(0,p.cn)(ec,a),children:"string"==typeof r?(0,o.nr)(r):r})};eo.displayName="Tile.Report.Content";let ep=e=>{let t,r,{testId:a="tile_report",children:s,wrapperClassName:l}=e,{labelRow:n,content:d,responseGroup:c}=(t=[],(r=e=>{Array.isArray(e)?e.forEach(r):(0,m.isValidElement)(e)&&e.type===m.Fragment?r(e.props.children):t.push(e)})(s),t).reduce((e,t)=>{let r;if(!(0,m.isValidElement)(t))return e;if("function"==typeof(r=t.type)&&"Label.Row"===r.displayName)e.labelRow=t;else{let r;if("function"==typeof(r=t.type)&&"Tile.Report.Content"===r.displayName)e.content=t;else{let r;"function"==typeof(r=t.type)&&"Label.ResponseGroup"===r.displayName&&(e.responseGroup=t)}}return e},{});return(0,i.jsxs)("div",{"data-testid":a,className:(0,p.cn)(en,l),children:[n,(d||c)&&(0,i.jsxs)("div",{className:(0,p.cn)(ed),"data-testid":`${a}_content`,children:[d,c]})]})};ep.displayName="Tile.Report";let em=Object.assign(ep,{Content:eo}),ex={Content:h,Group:y,GroupOverview:_,Minimal:$,Offer:G,Product:Z.U$,ProductOverview:X,ProductSpotlight:et,Quiz:el,Report:em}},64442:(e,t,r)=>{r.d(t,{W:()=>s});var a=r(47606);let s=e=>{let t=(0,a.useRef)([]);return{refs:t,setRef:e=>r=>{t.current[e]=r}}}},64990:(e,t,r)=>{r.d(t,{C:()=>x});var a=r(17942),s=r(50248),i=r(62565),l=r(55204),n=r(7033),d=r(77638),c=r(84252),o=r(15804),p=r(83210),m=r(47606);let x=e=>{let{testId:t}=e,r=(0,n.AP)(),x=(0,n.IM)(),{cartData:u}=(0,l.S)(),[h,b]=(0,m.useState)(!1),g=h||(0,i.cB)(u),{setIsGroomingBundleIgnored:f}=(0,s.PM)(),[y,_]=(0,m.useState)(!1),[v,j]=(0,m.useState)(g);return(0,m.useEffect)(()=>{b((0,i.Kn)())},[u]),(0,m.useEffect)(()=>{j(g)},[g]),(0,a.jsxs)("div",{className:(0,p.cn)("relative mt-2 px-4 pb-4",y&&"pointer-events-none"),children:[(0,a.jsx)("div",{className:"absolute -top-3 left-0 right-0 flex justify-center",children:(0,a.jsx)(o.v.Bau,{testId:`${t}_tag-bau`,type:"urgency-primary",label:"Exclusive One-Time Purchase",hideIcon:!0})}),(0,a.jsx)(d.Q.Button,{testId:t,"data-element-id":t,onClick:()=>{y||(f(!1),_(!0),v?(b(!1),x((0,i._E)().productId),setTimeout(()=>{j(!1),_(!1)},1e3)):(b(!0),r((0,i._E)()),setTimeout(()=>{j(!0),_(!1)},1e3)))},variant:"secondary",leftIcon:v?c.t.check:c.t.plus,isLoading:y,wrapperClassName:(0,p.cn)(v&&"bg-[#EDEDF1]"),children:v?"Added":"Add Bundle To Cart | $22.58"})]})}},66192:(e,t,r)=>{r.d(t,{k:()=>a});let a=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()},67570:(e,t,r)=>{r.d(t,{A:()=>_});var a=r(17942),s=r(77638),i=r(19334),l=r(95425),n=r(84252);r(47606);let d={default:"text-primary-text",inverted:"text-white",dental:"text-dental-text",probiotics:"text-probiotics-text",allergyItch:"text-[#A1490B]",mobility:"text-mobility-text",treatChews:"text-treats-text","dog-head":"text-primary-text","discount-primary":"text-white","discount-secondary":"text-white","discount-temp":"text-positive-text","urgency-primary":"text-primary-text","urgency-secondary":"text-primary-text",benefit:"text-positive-text",disabled:"text-disabled",wellness:"text-wellness-text","free-gift":"text-positive-text","neutral-primary-darker":"text-primary-text","neutral-secondary-darker":"text-primary-text","dental-darker":"text-dental-text","probiotics-darker":"text-probiotics-text","allergyItch-darker":"text-[#A1490B]","mobility-darker":"text-mobility-text","treatChews-darker":"text-treats-text","wellness-darker":"text-wellness-text"},c={default:"text-primary-text fill-primary-text",inverted:"text-white fill-white",dental:"text-dental-text fill-dental-text",probiotics:"text-probiotics-text fill-probiotics-text",allergyItch:"text-[#A1490B] f
3ill-[#A1490B]",mobility:"text-mobility-text fill-mobility-text",treatChews:"text-treats-text fill-treats-text","dog-head":"text-primary-text fill-primary-text","discount-primary":"text-white fill-white","discount-secondary":"text-white fill-white","discount-temp":"text-positive-text fill-positive-text","urgency-primary":"text-primary-text fill-primary-text","urgency-secondary":"text-primary-text fill-primary-text",benefit:"text-positive-text fill-positive-text",disabled:"text-disabled fill-disabled",wellness:"text-wellness-text fill-wellness-text","free-gift":"text-positive-text fill-positive-text","neutral-primary-darker":"text-primary-text fill-primary-text","neutral-secondary-darker":"text-primary-text fill-primary-text","dental-darker":"text-dental-text fill-dental-text","probiotics-darker":"text-probiotics-text fill-probiotics-text","allergyItch-darker":"text-[#A1490B] fill-[#A1490B]","mobility-darker":"text-mobility-text fill-mobility-text","treatChews-darker":"text-treats-text fill-treats-text","wellness-darker":"text-wellness-text fill-wellness-text"},o={default:"bg-white",inverted:"bg-bold",dental:"bg-dental-bg",probiotics:"bg-probiotics-bg",allergyItch:"bg-[#FFF7DF]",mobility:"bg-mobility-bg",treatChews:"bg-treats-bg","dog-head":"bg-white","discount-primary":"bg-positive","discount-secondary":"bg-[#002B7A]","discount-temp":"bg-[#CAF1C6]","urgency-primary":"bg-[#FFD67A]","urgency-secondary":"bg-[#BDD4FF]",benefit:"bg-[#F7FFF6]",disabled:"bg-disabled-bg",wellness:"bg-wellness-bg","free-gift":"bg-[#F7FFF6]","neutral-primary-darker":"bg-neutral-primary-darker","neutral-secondary-darker":"bg-neutral-secondary-darker","dental-darker":"bg-dental-darker","probiotics-darker":"bg-probiotics-darker","allergyItch-darker":"bg-allergy-itch-darker","mobility-darker":"bg-mobility-darker","treatChews-darker":"bg-treats-darker","wellness-darker":"bg-wellness-darker"},p="--label-accent-colour",m=(e,t,r)=>e?"string"==typeof e&&e.startsWith("#")?{className:r,style:{[p]:e}}:{className:Object.prototype.hasOwnProperty.call(d,e)?t[e]:void 0}:{},x=e=>{let{testId:t="label-accent",wrapperClassName:r,label:s,Icon:i,textColour:x,iconColour:u,iconBgColour:h=null}=e,b=n.t[i],g=m(x,d,`text-[color:var(${p})]`),f=m(u,c,`text-[color:var(${p})] fill-[color:var(${p})]`),y=m(h,o,`bg-[color:var(${p})]`),_=!!h,v=(0,a.jsx)("span",{"data-testid":`${t}-icon`,children:(0,a.jsx)(b,{className:(0,l.cn)("h-6 w-6 shrink-0",f.className),style:f.style})});return(0,a.jsxs)("div",{"data-testid":t,className:(0,l.cn)("flex items-center",_?"gap-3":"gap-2",r),children:[_?(0,a.jsx)("span",{"data-testid":`${t}-icon-bg`,className:(0,l.cn)("flex shrink-0 items-center justify-center rounded-full p-2",y.className),style:y.style,children:v}):v,(0,a.jsx)("p",{"data-testid":`${t}-label`,className:(0,l.cn)("text-callout-text-16",g.className),style:g.style,children:s})]})};x.displayName="LabelAccent";var u=r(69055),h=r(27149),b=r(45928),g=r(76724),f=r(71734);let y=e=>{let{title:t,subText:r,button:n,imageSrc:d,mobileImageSrc:c,imageAlt:o="Banner Image",labelText:p,labelIcon:m,className:y,testId:_="banner_card",qrText:v="Scan To Download App",hideQr:j=!1,disableQrBadgeLinks:w=!1,region:C=f.t9,qrCodeImageSrc:I,labelAccent:N}=e,$=C===f.ij.UK;return(0,a.jsxs)("div",{className:(0,l.cn)("rb-xs:grid rb-xs:grid-cols-[55%_45%] rb-xs:rounded-3xl bg-neutral-bg flex w-full flex-grow flex-col overflow-hidden rounded-2xl",y),"data-testid":_,children:[(0,a.jsxs)("div",{className:(0,l.cn)("rb-xs:items-start rb-xs:py-10 rb-xs:pl-10 rb-xs:gap-4 flex w-full flex-grow flex-col items-center gap-6 px-4 pb-4 pt-10"),children:[N&&(0,a.jsx)(x,{testId:`${_}_label_accent`,...N}),(0,a.jsx)(h.V,{heading:t,description:r,variant:"banner-card",alignment:{base
3:"center",xs:"left",sm:"left"},...p&&{label:{label:p,Icon:m,size:"sm",wrapperClassName:"rb-sm:hidden"}},testId:`${_}_text_block`}),n&&""!==n.text&&(0,a.jsx)("div",{className:(0,l.cn)("rb-xs:hidden mt-auto"),children:(0,a.jsx)(s.Q.Button,{...n,variant:"secondary",testId:`${_}_button_pill_mobile`,children:n.children??n.text})}),(0,a.jsxs)("div",{className:(0,l.cn)("rb-xs:flex hidden flex-col gap-4"),"data-testid":`${_}_desktop_components`,children:[j?null:(0,a.jsx)(u.O,{imageSrc:I||($?b.n:b.B),testId:`${_}_qr_download`,theme:"inverted",orientation:"landscape",wrapperClassName:"[&>div>img]:max-w-[100px]",isBannerCard:!0,...w?{iosLink:null,androidLink:null}:{},children:v}),j&&n&&""!==n.text&&(0,a.jsx)("div",{className:(0,l.cn)("rb-xs:block hidden"),children:(0,a.jsx)(s.Q.Button,{...n,variant:"secondary",testId:`${_}_button_pill_desktop`,children:n.children??n.text})})]})]}),(0,a.jsx)("div",{className:"rb-xs:h-full relative ml-auto mt-auto h-[290px] w-full overflow-hidden",children:(0,a.jsxs)("picture",{children:[d&&(0,a.jsx)("source",{srcSet:(0,g.D)(d),media:"(min-width: 768px)",sizes:"(min-width: 1024px) 292px, (min-width: 768px) 45vw, 100vw"}),(0,a.jsx)(i.Ay,{src:c||d,alt:o,fill:!0,sizes:"(min-width: 1024px) 292px, (min-width: 768px) 45vw, 100vw",className:"place-item-center rb-xs:object-right-bottom h-full w-auto object-contain object-bottom",elementID:`${_}_image`,"data-testid":`${_}_image`})]})})]})};y.displayName="BannerCard.Item";let _=y},71553:(e,t,r)=>{r.d(t,{yq:()=>i,qc:()=>n,ck:()=>d.c,c$:()=>c.c});var a=r(17942),s=r(95425);r(47606);let i=e=>{let{testId:t="list-group",children:r,width:i=324,wrapperClassName:l}=e,n="string"==typeof i?i:`${i}px`;return(0,a.jsx)("div",{"data-testid":t,className:(0,s.cn)(l),style:{"--list-group-width":n,width:"var(--list-group-width)"},children:r})};var l=r(89284);let n=e=>{let{label:t,description:r,divider:i=!1,height:n="default",size:d="md",showTrailingContent:c,wrapperClassName:o,testId:p="list-header"}=e;return(0,a.jsx)("div",{"data-testid":p,className:(0,s.cn)(c?"hover:bg-subtle-hover cursor-pointer":"","w-full rounded-lg px-2",o),children:(0,a.jsxs)("div",{className:(0,s.cn)("flex w-full items-center justify-between gap-2",i&&"border-disabled-bg border-b",i&&c?"hover:border-subtle-hover":"",{default:"py-4",compact:"py-3"}[n]),children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col justify-center gap-1",children:[(0,a.jsx)("p",{className:(0,s.cn)({lg:"text-header-text-24-sans",md:"text-header-text-20-sans"}[d],"break-words"),children:t}),r&&(0,a.jsx)("p",{className:"text-body-text-14 break-words",children:r})]}),c&&(0,a.jsx)(l.A,{showInfo:!1,testId:`${p}-trailing-content`,wrapperClassname:"self-end flex-shrink-0"})]})})};n.displayName="ListHeader";var d=r(16249),c=r(29816)},71764:(e,t,r)=>{r.d(t,{pF:()=>c,De:()=>o,vG:()=>p});var a=r(17942),s=r(19334),i=r(95425);let l={usa:{source:{default:"https://cdn.cms.thepetlabco.com/usa_white_35539a7181.svg",offWhite:"https://cdn.cms.thepetlabco.com/usa_off_white_244e1d905f.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[50px] rb-xs:h-[58px] rb-md:h-[98px]",sizes:"130px"},nasc:{source:{default:"https://cdn.cms.thepetlabco.com/nasc_white_434e3e8a13.svg",offWhite:"https://cdn.cms.thepetlabco.com/nasc_off_white_01cbb37b70.svg"},className:"w-[76px] rb-xs:w-[114px] rb-md:w-[130px] h-[56px] rb-xs:h-[84px] rb-md:h-[96px]",sizes:"130px"},gmp:{source:{default:"https://cdn.cms.thepetlabco.com/gmp_white_fbfbb93a2c.svg",offWhite:"https://cdn.cms.thepetlabco.com/gmp_off_white_b33d04dc93.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[47px] rb-xs:h-[55px] rb-md:h-[63px]",sizes:"130px"},gmp_fr:{source:{default:"https://cdn.cms.thepetlabco.com/type_gmp_fr_colour_white_8f5e53d9f2.svg",offWhite:"https://cdn.cms.thepetlabco.com/type_gmp_fr_colour_off_white_3932b38639.svg"},className:"w-[90px] rb-xs:w-[90px] rb-md:w-[130px] h-[47px] rb-xs:h-[47px] rb-md:h-[68px]",sizes:"130px"},triple_tested:{source:{default:"https://cdn.cms.thepetlabco.com/triple_tested_white_7bdfbae301.svg",offWhite:"https://cdn.cms.thepetlabco.com/triple_tested_off_white_a9f237829b.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[56px] rb-xs:h-[68px] rb-md:h-[78px]",sizes:"130px"},triple_tested_right:{source:{default:"https://cdn.cms.thepetlabco.com/triple_tested_en_right_9429394905.svg",offWhite:"https://cdn.cms.thepetlabco.com/triple_tested_en_right_offwhite_9f89b12e3b.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[56px] rb-xs:h-[68px] rb-md:h-[78px]",sizes:"130px"},pet_awards:{source:{default:"https://cdn.cms.thepetlabco.com/pet_awards_white_5a60926c17.svg",offWhite:"https://cdn.cms.thepetlabco.com/pet_awards_off_white_e5bc2eaa85.svg"},className:"w-[88px] rb-xs:w-[104px] rb-md:w-[120px] h-[75px] rb-xs:h-[84px] rb-md:h-[97px]",sizes:"120px"},ca_en:{source:{default:"https://cdn.cms.thepetlabco.com/badge_Shipped_From_CA_EN_white_f64ca460d6.svg",offWhite:"https://cdn.cms.thepetlabco.com/badge_Shipped_From_CA_EN_offwhite_224115181e.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[50px] rb-xs:h-[58px] rb-md:h-[98px]",sizes:"130px"},ca_fr:{source:{default:"https://cdn.cms.thepetlabco.com/badge_Shipped_From_CA_FR_white_d018239a54.svg",offWhite:"https://cdn.cms.thepetlabco.com/badge_Shipped_From_CA_FR_offwhite_3089a127c4.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[50px] rb-xs:h-[58px] rb-md:h-[98px]",sizes:"130px"},triple_tested_fr_left:{source:{default:"https://cdn.cms.thepetlabco.com/triple_tested_fr_left_1a2fd72fc1.svg",offWhite:"https://cdn.cms.thepetlabco.com/triple_tested_fr_left_offwhite_cc77c9cd58.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[56px] rb-xs:h-[68px] rb-md:h-[78px]",sizes:"130px"},triple_tested_fr_right:{source:{default:"https://cdn.cms.thepetlabco.com/triple_tested_fr_right_52e6f06a82.svg",offWhite:"https://cdn.cms.thepetlabco.com/triple_tested_fr_right_offwhite_7d02085bff.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[56px] rb-xs:h-[68px] rb-md:h-[78px]",sizes:"130px"},manufactured_in_ca:{source:{default:"https://cdn.cms.thepetlabco.com/type_manufactured_in_canada_colour_off_white_6a2dc5bf63.svg",offWhite:"https://cdn.cms.thepetlabco.com/badge_usp_9fdd4716fb.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[50px] rb-xs:h-[58px] rb-md:h-[98px]",sizes:"130px"},manufactured_in_ca_fr:{source:{default:"https://cdn.cms.thepetlabco.com/badge_usp_528d652cd6.svg",offWhite:"https://cdn.cms.thepetlabco.com/badge_usp_528d652cd6.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[50px] rb-xs:h-[58px] rb-md:h-[98px]",sizes:"130px"},uk_pet_food:{source:{default:"https://cdn.cms.thepetlabco.com/UK_Pet_Food_Member_CMYK_Dog_1_e486d0af2b_1_c8359e93bc.svg",offWhite:"https://cdn.cms.thepetlabco.com/UK_Pet_Food_Member_CMYK_Dog_1_e486d0af2b_1_c8359e93bc.svg"}
3,className:"w-[52px] rb-xs:w-[80px] rb-md:w-[90px] h-[56px] rb-xs:h-[84px] rb-md:h-[96px]",sizes:"90px"},uk:{source:{default:"https://cdn.cms.thepetlabco.com/Manufactured_in_the_British_Isles_white_07b3dd1b78.svg",offWhite:"https://cdn.cms.thepetlabco.com/Manufactured_in_the_British_Isles_off_white_0bf6624445.svg"},className:"w-[98px] rb-xs:w-[114px] rb-md:w-[130px] h-[50px] rb-xs:h-[58px] rb-md:h-[98px]",sizes:"130px"}},n=Object.keys(l),d=e=>{let{testId:t,source:r,altText:l,className:n,sizes:d}=e;return(0,a.jsx)("div",{"data-testid":t,className:(0,i.cn)("relative flex items-center justify-center",n),children:(0,a.jsx)(s.Ay,{"data-testid":`${t}_image`,src:r,alt:l||"",fill:!0,sizes:d??"130px"})})},c=e=>{let{testId:t,badge:r,isOffWhite:s,isMixed:n=!1,badgeClassName:c}=e,{className:o,sizes:p,...m}=l[r],x=(0,i.cn)(o,c),u=n?m.source["nasc"===r?"offWhite":"default"]:m.source[s?"offWhite":"default"];return(0,a.jsx)(d,{testId:t,source:u,className:x,sizes:p})},o=e=>{let{className:t,testId:r,badges:s,align:c="center",isOffWhite:o=!0,isMixed:p=!1,badgeClassNames:m,badgeSizes:x,disclaimer:u}=e,h=(s||n).map(e=>{let{className:t,sizes:r,...a}=l[e],s=m?.[e],n=(0,i.cn)(t,s),d=x?.[e],c=p?a.source["nasc"===e?"offWhite":"default"]:a.source[o?"offWhite":"default"];return{id:e,source:c,className:n,sizes:d||r}});return(0,a.jsxs)("div",{"data-testid":r,className:(0,i.cn)("w-full flex flex-col gap-4 rb-xs:gap-6",`items-center rb-xs:items-${c}`,"text-secondary-text",t),children:[(0,a.jsx)("div",{"data-testid":`${r}_badges`,className:(0,i.cn)("flex gap-4 rb-xs:gap-6 items-center flex-wrap",`justify-center rb-xs:justify-${c}`),children:h.map((e,t)=>{let{id:s,...i}=e;return(0,a.jsx)(d,{...i,testId:`${r}_badge_${t}`},s)})}),u&&(0,a.jsx)("div",{"data-testid":`${r}_disclaimer`,className:"text-caption-text-12",children:u})]})},p=e=>{let t=e.badgeUspItems?.map(e=>{let t=e?.badgeName;return t&&t in l?t:null}).filter(e=>null!==e);return{className:e.className??"",badges:t,isOffWhite:e.badgeUspGroupIsOffWhite??void 0,isMixed:e.badgeUspGroupIsMixed??!1,disclaimer:e.badgeUspGroupDisclaimer??void 0,align:e.badgeUspGroupAlignment??"center"}}},72208:(e,t,r)=>{r.d(t,{$0:()=>d,Dt:()=>n,FI:()=>l,G8:()=>a,Sv:()=>i,TC:()=>s,lJ:()=>c});let a="products",s="probright",i="probright-advanced",l="probright-advanced-one",n="probiotic-chews-dogs",d="probiotic-chews-tailored",c="joint-supplements-for-dogs"},74081:(e,t,r)=>{r.d(t,{A:()=>o});var a=r(17942),s=r(68021),i=r(7033),l=r(9134),n=r(37032),d=r(77638),c=r(23100);let o=()=>{let{t:e}=(0,c.Bd)(),{setIsRemoveAllModalOpen:t}=(0,n.Nc)(),r=(0,n.Yj)(),o=(0,n.nk)(),{getCartTextKey:p}=(0,s.b)(),m=(0,i.lj)();return(0,a.jsx)(l.aF,{open:r,onOpenChange:e=>t(e),children:(0,a.jsxs)(l.$m,{overlayClass:"bg-overlays-black-60 backdrop-blur-md",variant:"native",wrapper:!1,className:"secondary-modal text-primary max-w-[525px] p-6 text-center [&>*:first-child]:hidden",children:[(0,a.jsx)("p",{className:"max-mobile:text-header-text-32 text-primary-text text-header-text-20",children:e("sure_you_want_remove_product")}),(0,a.jsxs)("p",{className:"text-primary-text text-body-text-18 my-4",children:[e("by_removing")," ",(0,a.jsx)("strong",{dangerouslySetInnerHTML:{__html:o||""}}),","," ",p("your_cart_will_be_cleared")]}),(0,a.jsxs)(d.Q.Group,{testId:"cart_remove_all_popup_buttons",orientation:"landscape",wrapperClassName:"mx-auto pb-[1px]",children:[(0,a.jsx)(d.Q.Button,{testId:"cart_remove_all_popup_keep_products",variant:"secondary",onClick:()=>t(!1),width:"fill",wrapperClassName:"!w-full",children:e("keep_products")}),(0,a.jsx)(d.Q.Button,{testId:"cart_remove_all_popup_remove_products",variant:"primary",onClick:()=>{m(),t(!1)},width:"fill",wrapperClassName:"!w-full",children:e("remove_products")})]})]})})}},74617:(e,t,r)=>{r.d(t,{yu:()=>u,Bv:()=>x});var a=r(17942),s=r(95425),i=r(29358);let l=e=>{let{type:t,children:r,testId:i,className:l}=e;return(0,a.jsx)("div",{"data-testid":i,className:(0,s.cn)("flex gap-3 rounded-2xl","inline"===t&&"py-3","upsell"==t&&"bg-neutral-secondary-bg px-4 py-4",l),children:r})};l.displayName="LineItem.Container";let n={Badge:i.Ex,Checkbox:i.Sc,Container:l,Content:i.UC,Details:i.B_,DetailsFooter:i.Y_,Image:i._V,Price:i.gm,Quantity:i.Q1,Remove:i.n$,Tag:i.vw,Row:i.fI};var d=r(50309),c=r(63158),o=r(17784),p=r(47606);let m={inline:{container:"",item:""},stacked:{container:"",item:"border-b border-[#D8DADF] last:border-0"},upsell:{container:"gap-y-2",item:""},large:{container:"gap-y-4",item:""}},x=e=>{let{type:t="inline",children:r,testId:i}=e;if(!r)return null;let l=p.Children.map(r,e=>
3{if((0,p.isValidElement)(e)){let r={...e.props,type:t};return(0,p.cloneElement)(e,r)}return null});return(0,a.jsx)("div",{"data-testid":i,className:(0,s.cn)("flex w-full flex-col",m[t]?.container),children:l?.map(e=>(0,a.jsx)("div",{className:(0,s.cn)(m[t]?.item),children:e},e?.props.testId))})};x.displayName="LineItem.Group";let u={...n,FreeGift:e=>{let{testId:t,title:r,reviewCopy:i,rating:l=5,rrp:n,src:p,alt:m,discountedPrice:x="FREE",requestWidth:u,wrapperClassName:h}=e;return(0,a.jsxs)("div",{"data-testid":t,className:(0,s.cn)("flex w-full flex-col overflow-hidden rounded-lg bg-white py-1",h),children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"relative h-[70px] w-[70px] shrink-0 overflow-hidden",children:(0,a.jsx)(d.Q1,{testId:`${t}-media-image`,src:p,alt:m,sizes:"70px",requestWidth:u,wrapperClassName:(0,s.cn)("bg-white")})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1 py-3 pl-0 pr-3",children:[(0,a.jsx)("p",{className:"text-primary-text text-header-text-16-sans",children:r}),(0,a.jsxs)("div",{className:"rb-xs:flex hidden items-center gap-1",children:[(0,a.jsx)(o.G,{testId:`${t}-star-rating`,rating:l,wrapperClassName:"gap-[1px] w-auto"}),i&&(0,a.jsx)("p",{className:"text-secondary-text text-body-text-14",children:i})]})]}),(0,a.jsx)(c.A,{testId:`${t}-pricing-variants`,type:"stacked",rrp:n,discountedPrice:x,wrapperClassName:"shrink-0 pr-3"})]}),(0,a.jsxs)("div",{className:"rb-xs:hidden",children:[(0,a.jsx)("div",{className:"border-disabled-bg mt-1 border-t"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 px-3 pb-2 pt-3",children:[(0,a.jsx)(o.G,{testId:`${t}-star-rating-mobile`,rating:l,wrapperClassName:"gap-[1px] w-auto"}),i&&(0,a.jsx)("p",{className:"text-secondary-text text-body-text-14 text-center",children:i})]})]})]})},Group:x}},75974:(e,t,r)=>{r.d(t,{z:()=>s});var a=r(85868);let s=(e,t,r,s)=>{let i=e.button?(0,a.C)(e.button,!1,s):void 0,l=e.button?.href?{type:"link",href:e.button.href}:r?.onClick?{type:"button",onClick:r.onClick}:void 0;return{title:e.cardTitle??void 0,isClickable:e.isClickable??void 0,button:i,action:l,image:{src:e.cardImage?.url??"",alt:e.cardImage?.alternativeText??"",sizes:t?.sizes??"(min-width: 768px) 50vw, 100vw",ratio:t?.ratio??"5:4"}}}},77657:(e,t,r)=>{r.d(t,{t:()=>x});var a=r(17942),s=r(47510);let i=e=>{let{children:t,testId:r,...i}=e;return(0,a.jsx)(s.UC,{"data-testid":r,...i,children:(0,a.jsx)("div",{className:"flex flex-col rounded-b-2xl border border-t-0 border-[#D8DADF] p-4",children:t})})};i.displayName="Tabs.Content";var l=r(47606);let n=(0,l.createContext)(void 0),d=e=>{let{children:t,defaultValue:r}=e,[s,i]=(0,l.useState)(r);return(0,a.jsx)(n.Provider,{value:{activeTab:s,setActiveTab:i},children:t})};var c=r(95425);let o=e=>{let{defaultValue:t,testId:r,...i}=e;return(0,a.jsx)(d,{defaultValue:t,children:(0,a.jsx)(s.bL,{"data-testid":r,defaultValue:t,...i})})};o.displayName="Tabs.Root";let p="rb-sm:font-bold mt-0 rounded-t-2xl border-l border-r border-b-transparent border-l-[#D8DADF] border-r-[#D8DADF] bg-white pt-4 font-semibold",m=e=>{let{children:t,className:r,testId:i,trackId:d,...o}=e,{activeTab:m,setActiveTab:x}=(()=>{let e=(0,l.useContext)(n);if(!e)throw Error("useTabs must be used within a TabsProvider");return e})(),u=o.value===m;return(0,a.jsx)(s.l9,{"data-testid":i,"data-trackid":d?d.replace("feeding-guide","directions-ecom").replace("ingredients","key-ingredients-ecom").replace("key-benefits","product-benefits-ecom"):void 0,className:(0,c.cn)("w-full rb-sm:text-body-text-14 text-caption-text-12 text-primary-text bg-neutral-bg group mt-3 border border-b border-l-0 border-r-0 border-[#D8DADF] py-2","first:rounded-tl-2xl first:border-l first:border-l-[#D8DADF]","last:rounded-tr-2xl last:border-r last:border-r-[#D8DADF]",u&&p,r),...o,onMouseDown:()=>x(o.value),onFocus:()=>x(o.value),children:(0,a.jsxs)("div",{className:(0,c.cn)("relative flex items-center justify-center"),children:[t,(0,a.jsx)("span",{className:(0,c.cn)("absolute -right-[1px] bottom-0 top-0 border-r border-[#D8DADF] group-last:hidden")})]})})};m.displayName="Tabs.Trigger";let x={Root:o,List:e=>{let{className:t,testId:r,...i}=e;
3return(0,a.jsx)(s.B8,{"data-testid":r,className:(0,c.cn)("flex",t),...i})},Trigger:m,Content:i}},84841:(e,t,r)=>{r.d(t,{O:()=>Q});var a=r(17942),s=r(92747),i=r(63472),l=r(47852),n=r(77638),d=r(10764),c=r(19960),o=r(58033),p=r(67403),m=r(50309),x=r(81992),u=r(68482),h=r(95425);let b="flex flex-col p-4 rounded-3xl border border-[#D8DADF] bg-white",g="w-full flex flex-col gap-4",f="relative",y="flex flex-1 flex-col items-start gap-2",_="flex items-center gap-1",v="text-body-text-16-semibold text-primary-text",j="text-primary-text text-body-text-16-semibold",w="text-secondary-text text-body-text-14 rb-sm:text-body-text-16 whitespace-pre-wrap",C="flex flex-col justify-end gap-1",I="flex flex-wrap items-center gap-2",N="text-caption-text-12 text-secondary-text",$="text-link-text-14 text-primary-text",k=e=>{let{rating:t,title:r,description:s,testId:i,image:l,productName:n,productHref:d,author:c,trackId:k}=e;return(0,a.jsx)("div",{"data-testid":i,className:(0,h.cn)(b),children:(0,a.jsxs)("div",{className:(0,h.cn)(g),children:[(0,a.jsx)("div",{className:(0,h.cn)(f),children:(0,a.jsx)(m.Q1,{wrapperClassName:"rounded-xl",sizes:"(min-width: 1024px) 316px, (min-width: 768px) 470px, 90vw",...l,testId:`${i}_media-image`,trackId:k?`${k}-image`:void 0})}),(0,a.jsxs)("div",{className:(0,h.cn)(y),children:[(0,a.jsxs)("div",{className:(0,h.cn)(_),children:[(0,a.jsx)("p",{className:(0,h.cn)(v),"data-testid":`${i}_rating-text`,children:t}),(0,a.jsx)("div",{className:"h-4 w-4",children:(0,a.jsx)(p.A,{width:16,height:16,"data-testid":`${i}_rating-icon`})})]}),(0,a.jsx)("p",{className:(0,h.cn)(j),"data-testid":`${i}_title`,children:r}),s&&(0,a.jsx)("div",{className:(0,h.cn)(w),"data-testid":`${i}_description`,children:(0,u.Ay)(s)?(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:s}}):(0,a.jsx)("p",{children:s})})]}),(0,a.jsxs)("div",{className:(0,h.cn)(C),"data-testid":`${i}_details`,children:[(0,a.jsxs)("div",{className:(0,h.cn)(I),children:[(0,a.jsx)("p",{"data-testid":`${i}_details-customer`,className:(0,h.cn)(N),children:c}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(o.A,{className:"fill-positive-text text-positive-text","data-testid":`${i}_details-verified-icon`}),(0,a.jsx)("span",{className:"text-caption-text-12-semibold text-positive-text inline-block","data-testid":`${i}_details-verified-text`,children:"Verified Buyer"})]})]}),n&&d?(0,a.jsx)(x.Y.Link,{href:d,"data-testid":`${i}_details-product`,fontSize:14,children:n}):n&&(0,a.jsx)("span",{"data-testid":`${i}_details-product`,className:(0,h.cn)($),children:n})]})]})})};k.displayName="CardReview";var L=r(92387),P=r(50590),T=r(64442),B=r(27149),S=r(64339),A=r(22455),D=r(32234),F=r(47606);let O="w-full overflow-hidden px-section",M="rb-sm:max-w-section w-full m-auto",E="rb-sm:pb-8 flex items-end justify-between gap-20 pb-6",R="hidden rb-sm:flex",z="flex basis-[calc(83.333%_-_8px)] rb-xs:basis-[calc(50%_-_8px)] rb-sm:basis-[calc(33.333%_-_10.667px)] rb-xs:mr-4 mr-2 last:mr-8 last:rb-xs:mr-0",H="flex items-stretch",q="pt-6 rb-sm:pt-8 w-full flex justify-center",Q=e=>{let{id:t,testId:r,trackId:o,hasControls:p=!0,wrapperClassName:m,slideClassName:x,children:u,textBlock:b,button:g,hasSegmentTabs:f=!1,setActiveSegmentIndex:y,activeSegmentIndex:_,segmentTabsTitles:v}=e,{t:j}=(0,A.bl)("carousel"),[w,C]=(0,F.useState)(0),{refs:I,setRef:N}=(0,T.W)(v?.length??0),$=(0,F.useCallback)(e=>{y&&y(e),C(e=>e+1)},[y]),Q=void 0!==_?_:0,U=b.alignment&&"string"==typeof b.alignment?b.alignment:"center";return(0,a.jsx)("section",{id:t,"data-testid":r,className:(0,h.cn)(O,m),children:(0,a.jsxs)("div",{className:(0,h.cn)(M),children:[(0,a.jsxs)(L.F,{testId:`${r}_carousel`,trackId:o?`${o}-carousel`:void 0,options:{loop:!1,slidesToScroll:1,align:"start",skipSnaps:!0,dragFree:!0},plugins:[(0,D.J)({forceWheelAxis:"x"})],children:[(0,a.jsxs)("div",{className:(0,h.cn)(E,f?"flex-col items-start !gap-6":"flex-row gap-20"),children:[(0,a.jsx)(B.V,{...b,alignment:{base
3:U,sm:p?"left":"center"},testId:`${r}_text-block`}),f?(0,a.jsxs)("div",{className:"flex w-full items-center justify-between",children:[(0,a.jsxs)(P.f.Container,{testId:`${r}-container`,theme:"default",isFullWidth:!1,children:[(0,a.jsx)(P.f.Indicator,{testId:`${r}-indicator`,itemRefs:I,activeIndex:Q,totalItems:v?.length??0,isFullWidth:!1}),v?.map((e,t)=>(0,a.jsx)(P.f.Item,{ref:N(t),testId:`${r}-item-${t}`,isActive:t===Q,isFullWidth:!1,onClick:()=>$(t),children:e},t))]}),p&&(0,a.jsxs)(n.a2.Group,{testId:`${r}_nav-group`,wrapperClassName:(0,h.cn)(R),children:[(0,a.jsx)(L.F.Nav,{direction:"prev",renderNav:(e,t)=>(0,a.jsx)(n.a2.Button,{size:"sm",variant:e?"primary":"secondary",icon:s.A,onClick:t,disabled:e,testId:`${r}_carousel_prev`,trackId:o?`${o.replace("-carousel","")}-left-arrow`:void 0,children:j("previous")})}),(0,a.jsx)(L.F.Nav,{direction:"next",renderNav:(e,t)=>(0,a.jsx)(n.a2.Button,{size:"sm",variant:e?"primary":"secondary",icon:i.A,onClick:t,disabled:e,testId:`${r}_carousel_next`,trackId:o?`${o.replace("-carousel","")}-right-arrow`:void 0,children:j("next")})})]})]}):(0,a.jsx)(a.Fragment,{children:p&&(0,a.jsxs)(n.a2.Group,{testId:`${r}_nav-group`,wrapperClassName:(0,h.cn)(R),children:[(0,a.jsx)(L.F.Nav,{direction:"prev",renderNav:(e,t)=>(0,a.jsx)(n.a2.Button,{size:"sm",variant:e?"primary":"secondary",icon:s.A,onClick:t,disabled:e,testId:`${r}_carousel_prev`,trackId:o?`${o.replace("-carousel","")}-left-arrow`:void 0,children:j("previous")})}),(0,a.jsx)(L.F.Nav,{direction:"next",renderNav:(e,t)=>(0,a.jsx)(n.a2.Button,{size:"sm",variant:e?"primary":"secondary",icon:i.A,onClick:t,disabled:e,testId:`${r}_carousel_next`,trackId:o?`${o.replace("-carousel","")}-right-arrow`:void 0,children:j("next")})})]})})]}),(0,a.jsx)("div",{children:(0,a.jsx)(L.F.Content,{overflow:!0,wrapperClassName:(0,h.cn)("flex",H),trackId:o?`${o}-content`:void 0,children:u&&F.Children.map(u,(e,t)=>e&&((0,F.isValidElement)(e)&&e.type===S.FA.Content||(0,F.isValidElement)(e)&&e.type===S.FA.Product||(0,F.isValidElement)(e)&&e.type===S.FA.Minimal||(0,F.isValidElement)(e)&&e.type===d.Z.Item||(0,F.isValidElement)(e)&&e.type===c.c||(0,F.isValidElement)(e)&&e.type===l.No.Item||(0,F.isValidElement)(e)&&e.type===k)?(0,a.jsx)(L.F.Slide,{testId:`${r}_slide`,wrapperClassName:(0,h.cn)(z,x),children:(0,a.jsx)("div",{className:"animate-fadeIn400 flex h-full w-full transition-opacity duration-300",children:e})},`${t}-${w}`):null)})})]}),g&&(0,a.jsx)("div",{"data-trackid":o?`${o.replace("ingredients","")}see-all-ingredients-cta`:void 0,children:(0,a.jsx)(n.Q.Group,{orientation:g?.orientation??"landscape",wrapperClassName:(0,h.cn)(q),testId:`${r}_button-group`,children:(0,a.jsx)(n.Q.Button,{variant:"secondary",...g,testId:`${r}_button-group_button_0`,children:g?.children})})})]})})}},84883:(e,t,r)=>{r.d(t,{e:()=>l});var a,s=((a={}).Aspect_1_1="aspect_1_1",a.Aspect_1_1_1="aspect_1_1_1",a.Aspect_2_1="aspect_2_1",a.Aspect_3_2="aspect_3_2",a.Aspect_4_5="aspect_4_5",a.Aspect_5_4="aspect_5_4",a["pdp-benefits"]="pdp-benefits",a);let i={[s.Aspect_1_1]:"1:1",[s.Aspect_1_1_1]:"1:1.1",[s.Aspect_4_5]:"4:5",[s.Aspect_5_4]:"5:4",[s.Aspect_2_1]:"2:1",[s.Aspect_3_2]:"3:2",[s["pdp-benefits"]]:"pdp-benefits"},l=(e,t)=>{if(!e?.image?.url)return;let r=(e=>{let t=i[s.Aspect_1_1];if(e&&"object"==typeof e){let r=e.base??Object.values(e)[0];return r?i[r]??t:t}return e&&"string"==typeof e?i[e]??t:t})(e.ratio);return{src:e.image.url,alt:e.image.alternativeText??"",ratio:r,rounded:e.rounded??!1,sizes:t}}},89284:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(17942),s=r(23841),i=r(40021),l=r(95425);let n=e=>{let{testId:t="list-trailing-content",wrapperClassname:r,label:n,showDrillIn:d=!0,showInfo:c=!0}=e;return(0,a.jsxs)("div",{"data-testid":t,className:(0,l.cn)("flex",r),children:[n&&(0,a.jsx)("div",{className:"min-w-0 flex-grow",children:(0,a.jsx)("div",{className:"text-primary-text text-body-text-14 inline-block w-full min-w-0 hyphens-auto whitespace-normal break-words",children:n})}),(d||c)&&(0,a.jsxs)("div",{className:"ml-3 flex flex-shrink-0 items-start",children:[c&&(0,a.jsx)("span",{className:"text-primary-icon mr-1 cursor-pointer",children:(0,a.jsx)(i.A,{width:24,height:24})}),d&&(0,a.jsx)("span",{className:"text-primary-icon cursor-pointer",children:(0,a.jsx)(s.A,{width:24,height:24,className:"-rotate-90"})})]})]})}},91176:(e,t,r)=>{r.d(t,{R:()=>a});let a=e=>{if("/"===e)return"home";let t=e.split("?")[0].split("#")[0].split("/").filter(e=>e.length>0);return t.length>0?t[t.length-1]:"home"}},98745:(e,t,r)=>{r.d(t,{y:()=>d});var a=r(17942),s=r(92747),i=r(63472),l=r(22455),n=r(95425);let d=e=>{let{currentPage:t,totalPages:r,handlePageChange:d,wrapperClassName:c,testId:o}=e,{t:p}=(0,l.bl)("common");return r<=1?null:(0,a.jsxs)("div",{"data-testid":o,className:(0,n.cn)("sticky bottom-0 flex w-full justify-between gap-1 bg-white py-3 pl-4 pr-6",c),children:[(0,a.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-2",children:[(0,a.jsx)("button",{"data-testid":`${o}_back_button`,type:"button",disabled:1===t,onClick:()=>d("previous"),className:"group",children:(0,a.jsx)(s.A,{width:24,height:24,className:"group-disabled:fill-disabled m-2"})}),(0,a.jsx)("button",{"data-testid":`${o}_forward_button`,type:"button",disabled:t===r,className:"group",onClick:()=>d("next"),children:(0,a.jsx)(i.A,{width:24,height:24,className:"group-disabled:fill-disabled m-2"})})]}),(0,a.jsxs)("div",{className:"text-secondary-text font-inter flex items-center text-base font-normal leading-[22.4px]",children:[(0,a.jsx)("span",{"data-testid":`${o}_current-page`,children:t}),"\xa0",p("of"),"\xa0",(0,a.jsx)("span",{"data-testid":`${o}_total-pages`,children:r})]})]})}},99583:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(42921),s=r(76007);let i=e=>{let{prices:t,quantities:r,packageUnits:i=0,productTypePlural:l="",packageTypeSingular:n="",packageTypePlural:d="",isAccessoryPage:c=!1,locale:o,defaultLocale:p,currencyDisplay:m,slice:x=a.kI,roun
3d:u=!0,packageFullWeight:h,pricePerChewMultipliers:b=[]}=e;return r?.length&&(t=t.filter(e=>r.includes(e.quantity))),(c?t.slice(0,2):t.slice(0,x)).map((e,t)=>{let r=t+1,a=(e.perceived_rrp-e.discounted_price)/e.perceived_rrp*100,c=u?Math.round(a):parseFloat(a.toFixed(1)),x=b?.[t]??1;return{...e,id:r.toString(),title:`${e.quantity} ${1===e.quantity?n:d}`,value:r.toString(),chews:Number(i)*e.quantity,computedPackageUnits:Number(i)*e.quantity,itemLabel:l,packageFullWeight:h,perContainer:i?.toString()||null,isDiscounted:e.price!==e.discounted_price,priceFormatted:(0,s.v)({locale:o||p,amount:Number(e.price.toFixed(2)),currencyDisplay:m}),discountedPriceFormatted:(0,s.v)({locale:o||p,amount:Number(e.discounted_price.toFixed(2)),currencyDisplay:m}),pricePerContainer:(0,s.v)({locale:o||p,amount:Number((e.discounted_price/e.quantity).toFixed(2)),currencyDisplay:m}),pricePerChew:(0,s.v)({locale:o||p,amount:Number((e.discounted_price/(e.quantity*Number(i))*x).toFixed(2)),currencyDisplay:m}),percentage:c,savingsAmount:e.price-e.discounted_price,savings:(0,s.v)({locale:o||p,amount:Number((e.perceived_rrp-e.discounted_price).toFixed(2))}),savingsPerTub:(0,s.v)({locale:o||p,amount:Number(((e.perceived_rrp-e.discounted_price)/e.quantity).toFixed(2))})}})}}}]);
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.