"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[10],{90:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.sellingPlans=a.convertProductToPayload=void 0,a.convertProductToPayload=({product:e,variant:a,quantity:t=1,additionalProperties:i})=>{let r=100*parseFloat(a.price.amount);return isNaN(r)&&(r="--"),{items:[{id:a.id,quantity:t,image:a.image?.src??"",product_title:e.title,price:r,variant_title:a.title.includes("Default")||a.title===e.title?"":a.title,properties:{...i},final_price:r,variant_id:Number(a.id),url:`/products/${e.handle}`,vendor:e.vendor,sku:a.sku}]}},a.sellingPlans={"peanut-butter-blackberry":3397714153,"the-raspberry-donut":3397746921,"cookies-and-cream":3397681385,"birthday-cake-chocolate-chip":3397517545,"dark-chocolate-coconut":3311567081,"espresso-vanilla-cinnamon":3311599849,"cacao-salt-caramel-peanut":3311468777,"signature-flavors-variety-set":3320348905,"peppermint-mocha":3723198697,"gingerbread-cookie":3723231465,"cherry-chocolate-waffle-cone":4219338985}},23:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.ProductDetails=a.mockProductDetailData=void 0;const r=t(0),n=t(2),s=i(t(176)),l=t(46),c=t(88),o=t(1),d=t(89),u=t(376),m=t(31),p=t(90),v=t(139),h=t(353),y=t(353),b=t(1),f=t(86),g=t(92),k=t(93),x=t(6),I=t(75),S=t(12);"undefined"!=typeof window&&(window.Buffer=f.Buffer);const{mainContainer:j,mainContainerVarietySet:P,categoryLabel:D,title:C,titleTwelvePack:N,starsContainer:$,starsRating:_,ratingNumber:F,varietySetContainer:T,linkVarietySet:w,buttonGiftSet:O,linkGiftSet:E,varietySetContainerHolidays:B,varietySetContainerForVarietySetPDP:A,description:V,freeFromContainer:L,freeFromContainerVarietySet:H,nutritionContainer:M,nutritionImageContainer:R,bundles:z,selected:U,price:Y,regularPrice:G,regularPriceContainer:K,regularPriceContainerTwelvePack:q,saleText:W,priceVarietySet:Z,productSubscription:J,productSubscriptionIsVariety:Q,subscriptionInfo:X,showContainer:ee,backgroundPopup:ae,labelShip:te,labelShipVarietySet:ie,addButton:re,varieryHoverName:ne,moreFlavorsAlert:se,disabled:le,addButtonVarietySet:ce,nutritionArrowContainer:oe,badgesContainer:de,buttonLoading:ue,buttonLoader:me,freeHatContainer:pe,plusSymbol:ve,priceContainer:he,currencyCodeStyle:ye,freeBadge:be,brandHat:fe,brandHatItalic:ge,hatFlex:ke,limitedEdition:xe}=s.default,Ie=e=>98===e?98.01:e;a.mockProductDetailData={rating:{reviewsHref:"https://starsandhoney.com/pages/reviews"},varietyData:[{handle:"cacao-salt-caramel-peanut",isLimited:!1,key:0,productId:"7979585765609",sellingPlan:"3311468777",variantId20packOneTime:"47528498233577",variantId20packSubs:"47531488510185",variantId30packOneTime:"47531487789289",variantId30packSubs:"47531491033321",varietyHref:"/products/cacao-salt-caramel-peanut",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-cscp.webp?v=1679889773"),varietyName:"Cacao Salt Caramel Peanut"},{handle:"espresso-vanilla-cinnamon",isLimited:!1,key:1,productId:"7979587338473",sellingPlan:"3311599849",variantId20packOneTime:"47531592351977",variantId20packSubs:"47531592909033",variantId30packOneTime:"47531592679657",variantId30packSubs:"47531593892073",varietyHref:"/products/espresso-vanilla-cinnamon",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-evc.webp?v=1679889773"),varietyName:"Espresso Vanilla Cinnamon"},{handle:"dark-chocolate-coconut",isLimited:!1,key:2,productId:"7974127075561",sellingPlan:"3311567081",variantId20packOneTime:"47531585470697",variantId20packSubs:"47531586715881",variantId30packOneTime:"47531585732841",variantId30packSubs:"47531586945257",varietyHref:"/products/dark-chocolate-coconut",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-dcc.webp?v=1679889773"),varietyName:"Dark Chocolate Coconut"},{handle:"the-raspberry-donut",isLimited:!1,key:3,productId:"8175526805737",sellingPlan:"3397746921",variantId20packOneTime:"47531597332713",variantId20packSubs:"47531597791465",variantId30packOneTime:"47531597529321",variantId30packSubs:"47531597889769",varietyHref:"/products/the-raspberry-donut",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/Screenshot_2023-08-28_at_0.08.57.png?v=1693170564"),varietyName:"The Raspberry Donut"},{handle:"birthday-cake-chocolate-chip",isLimited:!1,key:4,productId:"8175526543593",sellingPlan:"3397517545",variantId20packOneTime:"47531549065449",variantId20packSubs:"47531552669929",variantId30packOneTime:"47531551555817",variantId30packSubs:"47531554046185",varietyHref:"/products/birthday-cake-chocolate-chip",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/flavorBirthdayCake.webp?v=1737547811"),varietyName:"Birthday Cake Chocolate Chip"},{handle:"peanut-butter-blackberry",isLimited:!1,key:5,productId:"8175527264489",sellingPlan:"3397714153",variantId20packOneTime:"47531595399401",variantId20packSubs:"47531595792617",variantId30packOneTime:"47531595727081",variantId30packSubs:"47531595890921",varietyHref:"/products/peanut-butter-blackberry",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/Screenshot_2023-08-28_at_0.06.22.png?v=1693170402"),varietyName:"Peanut Butter Blackberry"},{handle:"cookies-and-cream",isLimited:!1,key:6,productId:"8175526936809",sellingPlan:"3397681385",variantId20packOneTime:"47531582554345",variantId20packSubs:"47531583013097",variantId30packOneTime:"47531582750953",variantId30packSubs:"47531583209705",varietyHref:"/products/cookies-and-cream",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/flavorCookies.webp?v=1737548094"),varietyName:"Cookies and Cream"},{handle:"peppermint-mocha",isLimited:!0,key:7,productId:"8215147774185",sellingPlan:"3397681385",variantId20packOneTime:"47852450709737",variantId20packSubs:"47852450775273",variantId30packOneTime:"47852450742505",variantId30packSubs:"47852450808041",varietyHref:"/products/peppermint-mocha",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-cscp_a786edca-5e00-48b8-9b27-d6a428c27aa4.webp?v=1729177302"),varietyName:"Peppermint Mocha"},{handle:"gingerbread-cookie",isLimited:!0,key:8,productId:"8778176594153",sellingPlan:"3397681385",variantId20packOneTime:"47852164317417",variantId20packSubs:"47852164382953",variantId30packOneTime:"47852164350185",variantId30packSubs:"47852164415721",varietyHref:"/products/gingerbread-cookie",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/gingerbread-thumb.webp?v=1729264305"),varietyName:"Gingerbread Cookie"},{handle:"cherry-chocolate-waffle-cone",isLimited:!0,key:9,productId:"8838921027817",sellingPlan:"4219338985",variantId20packOneTime:"48059240415465",variantId20packSubs:"48059240481001",variantId30packOneTime:"48059240448233",variantId30packSubs:"48059240513769",varietyHref:"/products/cherry-chocolate-waffle-cone",varietyImage:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/cherry-chocolate.webp?v=1737726665"),varietyName:"Cherry Chocolate Waffle Cone"}],varietyButton:{href:"/products/signature-flavors-variety-set",text:"Variety Set"},varsityHatButton:{href:"/products/signature-tasting-gift-set-12-pack",text:"GIFT SET"},clubDiscount:.1,mockTagsForVarierySet:["⃠ GLUTEN","⃠ DAIRY","⃠ SOY","⃠ SUGAR ALCOHOLS"],bundlesIds:{variantId20packOneTime:{variantId:"47421908353257",productId:"8657724834025"},variantId30packOneTime:{variantId:"47460318839017",productId:"8671253332201"},variantId20packSubs:{variantId:"47421908353257",productId:"8657724834025"},variantId30packSubs:{variantId:"47460318839017",productId:"8671253332201"},variantId12PackOneTime:{variantId:"47723161420009",productId:"8747006623977"}},dynamicBundleCollectionId:"427067900137"};const Se=({productPage:e,selectedSubscription:t,bundleSelected:i,twelvePack:r,isVarietySet:n,regularPrice:s,priceFromVariant:l})=>{if(i===k.BundleSize["12 Pack"]&&n)return Number(r?s?r.variants[0]?.compareAtPrice?.amount:r.variants[0]?.price?.amount:76);if("club"===t){if(s)return Number(e.variants[i]?.compareAtPrice?.amount);const t=l(e.variants[i]);return Number(t?.amount)*(1-a.mockProductDetailData.clubDiscount)}{if(s)return Number(e.variants[i]?.compareAtPrice?.amount);const a=l(e.variants[i]);return Number(a?.amount)}};a.ProductDetails=function({productPage:e,useSharedState:t,limitedEditionFlags:i,twelvePack:s,twelvePackEnabled:f,bundleSelected:be,setBundleSelected:je,isSubscriptionEnabled:Pe,featureSalePrice:De,isMobile:Ce=!1,productsExpandYourPalate:Ne}){const[$e,_e]=(0,o.useState)(!1),[Fe,Te]=(0,o.useState)("one-time"),[we,Oe]=(0,o.useState)(!1),[Ee,Be]=(0,o.useState)(!1),[Ae,Ve]=(0,o.useState)([]),[Le,He]=(0,o.useState)(!1),[Me,Re]=(0,o.useState)(!1),[ze,Ue]=(0,o.useState)(!1),[Ye,Ge]=(0,o.useState)(!1),[Ke,qe]=(0,o.useState)(e.title),We="signature-flavors-variety-set"===e.handle,Ze="signature-tasting-gift-set-12-pack"===e.handle,Je=Se({productPage:e,selectedSubscription:Fe,bundleSelected:be,twelvePack:s,isVarietySet:We,priceFromVariant:t.priceFromVariant}),Qe=De?Se({productPage:e,selectedSubscription:Fe,bundleSelected:be,twelvePack:s,isVarietySet:We,regularPrice:!0,priceFromVariant:t.priceFromVariant}):0,Xe=(0,o.useMemo)((()=>t.priceFromVariant(e.variants[be])),[e.variants,be,t.countryCode]),ea=(0,o.useMemo)((()=>Xe.currencySymbol),[Xe]),aa=(0,o.useMemo)((()=>(0,S.currencyCodeIfneeded)({currencySymbol:Xe.currencySymbol,featureInternationalization:t.featureInternationalization,countryCode:t.countryCode,currencyCode:Xe.currencyCode})),[ea,Xe,t]),ta=(0,o.useMemo)((()=>{const i="club"===Fe?a.mockProductDetailData.clubDiscount:0,r=t.priceFromVariant(e.variants[We?0:1]),n=t.priceFromVariant(e.variants[We?1:2]);return[r.amount*(1-i)/20,n.amount*(1-i)/30]}),[e.variants,t.priceFromVariant,t.countryCode,Fe,We]),ia=(e,a)=>{if(oa)return a?.preventDefault(),void Te("one-time");Te(e)},ra=()=>{Oe(!we)},na=e.tags.includes("limited"),sa=(0,g.limitedProductByVariety)({varietyData:a.mockProductDetailData.varietyData,limitedEditionFlags:i,productsExpandYourPalate:Ne,countryCode:t.countryCode,featureInternationalization:t.featureInternationalization}),la=e=>"peppermint-mocha"===e||"gingerbread-cookie"===e||"cherry-chocolate-waffle-cone"===e,ca=(0,o.useMemo)((()=>la(e.handle)||(e=>{let t=!1;return e.forEach((e=>{la(a.mockProductDetailData.varietyData[e].handle)&&(t=!0)})),t})(Ae)),[e.handle,Ae]),oa=(0,o.useMemo)((()=>{const e=t.countryCode!==S.DEFAULT_SHOPIFY_COUNTRY.countryCode;return!Pe||Ze||ca||e}),[Ze,ca,Pe,t.countryCode]),da=(0,o.useMemo)((()=>i.peppermintMochaEnabled||i.gingerbreadCookieEnabled||i.cherryChocolateWaffleConeEnabled),[i]),ua=(0,o.useMemo)((()=>!t.featureInternationalization||Xe.country===t.countryCode),[t.featureInternationalization,Xe.country,t.countryCode]),ma=(0,o.useMemo)((()=>a.mockProductDetailData.varietyData.filter((e=>!e.isLimited&&Ne.some((a=>a.handle===e.handle&&(0,g.isProductsAvailableInCurrentCountry)({product:a,countryCode:t.countryCode})))))),[a.mockProductDetailData.varietyData,Ne]);return(0,b.useEffect)((()=>{t.showCart&&Re(!1)}),[t.showCart]),(0,b.useEffect)((()=>{oa&&Te("one-time")}),[oa]),(0,b.useEffect)((()=>{(0,y.initRecharge)({storeIdentifier:"starsandhoney.com",storefrontAccessToken:"strfnt_ed701156261903dde869c2dfe5e8d4b3f8065f5a7b17a056a93dd15700fa8a94",loginRetryFn:async()=>await(0,y.loginShopifyAppProxy)()}),(0,h.loginWithShopifyStorefront)("strfnt_ed701156261903dde869c2dfe5e8d4b3f8065f5a7b17a056a93dd15700fa8a94").then((e=>{console.log("response",e)})).catch((e=>{console.log(e)}))}),[]),(0,b.useEffect)((()=>{if(s)return Ue(s?.variants[0]?.currentlyNotInStock),Ge(!s?.variants[0]?.availableForSale),qe("Special Edition 12 Pack | All Flavors + Varsity Hat"),void Te("one-time");Ue(e.variants[be]?.currentlyNotInStock),Ge(!e.variants[be]?.availableForSale),qe(e.title),Te("one-time")}),[be]),(0,r.jsxs)("div",{className:`${j} ${(We||Ze)&&P}`,children:[(0,r.jsx)("p",{className:D,children:"Collagen Protein Bar"}),(0,r.jsx)("h1",{className:`${C} title ${N}`,dangerouslySetInnerHTML:{__html:Ke}}),We||Ze||na||!e.reviews?.rating_average?null:(0,r.jsxs)("div",{className:`starsContainer ${$}`,children:[(0,r.jsx)("a",{className:_,href:a.mockProductDetailData.rating.reviewsHref,children:(0,r.jsx)(l.RatingStars,{rating:e.reviews?.rating_average,numberOfStars:5,starDimension:"20px",starRatedColor:"#000000",starEmptyColor:"#00000055"})}),(0,r.jsxs)("p",{className:F,children:["(",(0,m.truncateOneDecimal)(e?.reviews?.rating_average),")"]})]}),(0,r.jsxs)("div",{className:`varietySetContainer ${T} ${We&&A} ${da&&B}`,children:[ma.map(((e,a)=>(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:e.varietyHref,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"}),(0,r.jsx)("div",{className:ne,children:e.varietyName})]})},a))),(0,r.jsx)("button",{children:(0,r.jsx)("a",{className:`linkVarietySet ${w}`,href:a.mockProductDetailData.varietyButton.href,children:a.mockProductDetailData.varietyButton.text})})]}),da&&(sa?.length>0||f)?(0,r.jsxs)("div",{className:`varietySetContainer ${T} ${We&&A} ${da&&B}`,children:[sa.map(((e,a)=>(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:e.varietyHref,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"}),(0,r.jsx)("div",{className:ne,children:e.varietyName})]})},a))),f&&(0,r.jsx)("button",{className:`buttonGiftSet ${O}`,children:(0,r.jsx)("a",{className:`linkGiftSet ${E}`,href:a.mockProductDetailData.varsityHatButton.href,children:a.mockProductDetailData.varsityHatButton.text})}),sa?.length>0&&(0,r.jsx)("p",{class:`limitedEdition ${xe}`,children:"LIMITED EDITION"})]}):null,f&&!da&&(0,r.jsx)("button",{className:`buttonGiftSet ${O}`,style:{marginBottom:"10px"},children:(0,r.jsx)("a",{className:`linkGiftSet ${E}`,href:a.mockProductDetailData.varsityHatButton.href,children:a.mockProductDetailData.varsityHatButton.text})}),(0,r.jsx)("p",{className:V,style:{fontSize:We?"12px":"14px",lineHeight:We?"18px":"21px",letterSpacing:We?"normal":"-0.02em;",marginTop:da?"8px":"0px"},children:e.description}),(0,r.jsx)("div",{className:`freeFromContainer ${L} ${We&&H}`,children:We||Ze?a.mockProductDetailData.mockTagsForVarierySet.map(((e,a)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},a))):e.tagsBadge.map(((e,a)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},a)))}),!We&&!Ze&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:M,onClick:()=>{_e(!$e)},role:"button","aria-label":"Nutrition & Ingredients",children:[(0,r.jsx)("span",{children:"NUTRITION & INGREDIENTS"}),(0,r.jsx)("span",{className:oe,children:(0,r.jsx)(c.Arrow,{})})]}),$e&&(0,r.jsxs)("div",{className:R,children:[(0,r.jsx)("img",{src:e?.nutritionalImage?.reference.image.originalSrc,alt:`nutritional info for ${Ke} `,height:150,width:400}),(0,r.jsx)("p",{children:e?.nutritionalIngredients?.value}),(0,r.jsx)("div",{className:de,children:e?.nutritionalBadges?.references.edges?.map(((e,a)=>(0,r.jsx)("img",{src:e.node.image.originalSrc,alt:e.node.image.altText,style:{height:"30px"}},a)))})]})]}),!We&&!Ze&&(0,r.jsxs)("div",{className:`bundles ${z}`,children:[(0,r.jsxs)("div",{onClick:()=>je(0),role:"button","aria-label":"Select bundle",children:[(0,r.jsx)("button",{className:`${0===be&&U}`,children:e.options[0].values[0]}),(0,r.jsx)("span",{})]}),(0,r.jsxs)("div",{onClick:()=>je(1),role:"button","aria-label":"Select bundle 2",children:[(0,r.jsx)("button",{className:`${1===be&&U}`,children:e.options[0].values[1]}),(0,r.jsxs)("span",{children:[`${ea}${ta[0].toFixed(2)}`," EA."]})]}),(0,r.jsxs)("div",{onClick:()=>je(2),role:"button","aria-label":"Select bundle 3",children:[(0,r.jsx)("button",{className:`${2===be&&U}`,children:e.options[0].values[2]}),(0,r.jsxs)("span",{children:[`${ea}${ta[1].toFixed(2)}`," EA."]})]})]}),We&&(0,r.jsx)(v.StepSelection,{productPage:e,bundleSelected:be,setBundleSelected:je,bundlePriceEach:ta,varietySetIsComplete:Ee,setVarietySetIsComplete:Be,selectedFlavorSet:Ae,setSelectedFlavorSet:Ve,limitedEditionFlags:i,currencySymbol:ea,productsExpandYourPalate:Ne,countryCode:t.countryCode,featureInternationalization:t.featureInternationalization,productsForVarietySet:ma}),Ze&&(0,r.jsx)(I.TwelvePackDetails,{isMobile:Ce,mockDataStepper:a.mockProductDetailData}),(0,r.jsxs)("div",{className:`priceContainer ${he}`,children:[(0,r.jsxs)("div",{className:`price ${Y} ${We&&Z}`,children:[t.featureInternationalization&&(0,r.jsx)("div",{className:`currencyCodeStyle ${ye}`,children:`${aa} `}),`${ea}${Je.toFixed(2)}`]}),!!Qe&&(0,r.jsxs)("div",{className:`regularPriceContainer ${K} ${s&&be===k.BundleSize["12 Pack"]?q:""} ${We&&Z}`,children:[(0,r.jsx)("span",{className:`sale ${W}`,children:"Sale"}),(0,r.jsxs)("span",{className:`regularPrice ${G}`,children:["$",Qe.toFixed(2)]})]}),be===k.BundleSize["12 Pack"]&&We&&(0,r.jsx)("div",{className:`plusSymbol ${ve}`,children:"+"}),be===k.BundleSize["12 Pack"]&&We&&(0,r.jsxs)("div",{className:`hatFlex ${ke}`,children:[(0,r.jsx)("div",{className:`free ${pe}`,children:(0,r.jsx)("img",{src:(0,x.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/hat.webp?v=1729711429",150),alt:"brand hat",height:46,width:46})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:`brandHat ${fe}`,children:"Varsity Hat"}),(0,r.jsx)("div",{className:`brandHat ${ge}`,children:"+ embroidered logo"})]})]})]}),(0,r.jsxs)("div",{className:`${J} productSubscription ${We&&Q}`,children:[(0,r.jsxs)("div",{onClick:e=>ia("one-time",e),role:"button","aria-label":"One-time purchase",children:[(0,r.jsx)("input",{type:"radio",id:"one-time",name:"subscription",checked:"one-time"===Fe,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"one-time",children:"ONE-TIME PURCHASE"})]}),(0,r.jsxs)("div",{onClick:e=>{ia("club",e)},disabled:oa,role:"button","aria-label":"Subscription club",children:[(0,r.jsx)("input",{type:"radio",id:"club",name:"subscription",checked:"club"===Fe,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"",children:"SUBSCRIPTION CLUB"}),(0,r.jsx)("label",{children:oa?"Not available":`Save ${100*a.mockProductDetailData.clubDiscount}%`}),(0,r.jsxs)("button",{onClick:ra,role:"button","aria-label":"Subscription details",children:["Details",(0,r.jsxs)("div",{className:`subscriptionInfo ${X} ${we&&ee}`,children:[(0,r.jsx)("div",{children:(0,r.jsx)(d.Cross,{})}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(u.ArrowRightPopup,{}),"Delivers every 1 month"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(u.ArrowRightPopup,{}),"Pause, change, or cancel anytime"]}),(0,r.jsxs)("li",{style:"margin-bottom:unset;",children:[(0,r.jsx)(u.ArrowRightPopup,{}),"Early access to new flavors"]})]})]})]})]}),(0,r.jsx)("div",{className:`backgroundPopup ${ae} ${we&&ee}`,onClick:ra,role:"button","aria-label":"Subscription details"})]}),(0,r.jsx)("p",{className:`labelShip ${te} ${We&&ie}`,children:"US"===t.countryCode&&(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("span",{children:"★"})," Always Free Shipping"]})}),(0,r.jsxs)("div",{onClick:async()=>{if(Me)return;if(0===Je)return void Re(!1);if(!ua)return void Re(!1);if(Re(!0),We&&!Ee)return He(!0),Re(!1),void setTimeout((()=>{He(!1)}),2e3);if(ze||Ye)return void Re(!1);let i=e.variants[be];be===k.BundleSize["12 Pack"]&&s&&(i=s.variants[0]);const r={sku:i.sku||"",id:i.id,quantity:1,image:i.image.src,product_title:Ke?.replace(/<[^>]*>?/gm,""),variant_title:i.title,price:100*Je,final_price:100*Je,url:`https://starsandhoney.com/products/${e.handle}`,variant_id:Number(i.id),vendor:e.vendor,properties:{_compare_at_price:100*Qe}};"club"===Fe&&(r.selling_plan=p.sellingPlans[e.handle]||null);let n=[r];if(We&&be!==k.BundleSize["12 Pack"]){let e;e=0===be&&"one-time"===Fe?"variantId20packOneTime":1===be&&"one-time"===Fe?"variantId30packOneTime":0===be&&"club"===Fe?"variantId20packSubs":1===be&&"club"===Fe?"variantId30packSubs":"variantId20packOneTime";let s={externalVariantId:a.mockProductDetailData.bundlesIds[e].variantId,externalProductId:a.mockProductDetailData.bundlesIds[e].productId,selections:[{collectionId:a.mockProductDetailData.dynamicBundleCollectionId,externalProductId:a.mockProductDetailData.varietyData[Ae[0]].productId,externalVariantId:a.mockProductDetailData.varietyData[Ae[0]][e],sellingPlan:"club"===Fe?Number(a.mockProductDetailData.varietyData[Ae[0]].sellingPlan):void 0,quantity:1},{collectionId:a.mockProductDetailData.dynamicBundleCollectionId,externalProductId:a.mockProductDetailData.varietyData[Ae[1]].productId,externalVariantId:a.mockProductDetailData.varietyData[Ae[1]][e],sellingPlan:"club"===Fe?Number(a.mockProductDetailData.varietyData[Ae[1]].sellingPlan):void 0,quantity:1}]};1===be&&s.selections.push({collectionId:a.mockProductDetailData.dynamicBundleCollectionId,externalProductId:a.mockProductDetailData.varietyData[Ae[2]].productId,externalVariantId:a.mockProductDetailData.varietyData[Ae[2]][e],sellingPlan:"club"===Fe?Number(a.mockProductDetailData.varietyData[Ae[2]].sellingPlan):void 0,quantity:1});try{n=(0,p.convertProductToPayload)({product:{...r,variant_title:1===be?"30-PACK":"20-PACK",title:"Signature Flavors Variety Set"},additionalProperties:{"Flavor 1":a.mockProductDetailData.varietyData[Ae[0]].varietyName,"Flavor 2":a.mockProductDetailData.varietyData[Ae[1]].varietyName,...1===be?{"Flavor 3":a.mockProductDetailData.varietyData[Ae[2]].varietyName}:{},_compare_at_price:100*Qe},quantity:1,variant:{...i,title:1===be?"30-PACK":"20-PACK",price:{...i.price,amount:Ie(Je).toString()}}})?.items.map((e=>({...e,selling_plan_allocation:!!r?.selling_plan}))),t.addFakeBundle({items:n});const e=(0,h.getDynamicBundleItems)(s,"dynamic-bundle");e[0].properties["Flavor 1"]=a.mockProductDetailData.varietyData[Ae[0]].varietyName;const l={_rc_bundle_flavor1:a.mockProductDetailData.varietyData[Ae[0]].varietyName,_rc_bundle_flavor1_ID:a.mockProductDetailData.varietyData[Ae[0]].productId,_rc_bundle_flavor2:a.mockProductDetailData.varietyData[Ae[1]].varietyName,_rc_bundle_flavor2_ID:a.mockProductDetailData.varietyData[Ae[1]].productId,_rc_bundle_price:Je.toString(),_rc_bundle_status:"club"===Fe?"Subscription":"One-Time",_rc_bundle_size:0===be?"20-PACK":"30-PACK",_compare_at_price:100*Qe};1===be&&(l._rc_bundle_flavor3=a.mockProductDetailData.varietyData[Ae[2]].varietyName,l._rc_bundle_flavor3_ID=a.mockProductDetailData.varietyData[Ae[2]].productId),e[0].properties={...e[0].properties,...l},e[1].properties["Flavor 2"]=a.mockProductDetailData.varietyData[Ae[1]].varietyName,e[1].properties={...e[1].properties,...l},1===be&&(e[2].properties["Flavor 3"]=a.mockProductDetailData.varietyData[Ae[2]].varietyName,e[2].properties={...e[2].properties,...l}),n=e}catch(e){console.error("getBundleId",e)}}try{t.addToCart({items:n})}catch(e){console.error(e),Re(!1)}},role:"button","aria-label":"Add to bag",className:`addButton ${re} \n\t\t\t\t${(We&&!Ee||!ua)&&le}\n\t\t\t\t${(ze||Ye)&&le}\n\t\t\t\t${0===Je&&le}\n\t\t\t\t${We&&ce}\n\t\t\t\t${Me&&ue}\n\t\t\t\t`,children:[(0,r.jsxs)("button",{children:[Ye?"Unavailable":ze?"Out of Stock":"Add to bag",Me&&(0,r.jsx)("span",{className:me,children:(0,r.jsxs)("svg",{height:"18",width:"18",children:[(0,r.jsx)("circle",{r:"7",cx:"9",cy:"9"}),(0,r.jsx)("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})]})})]}),Le&&(0,r.jsx)("div",{className:se,children:"Please add more flavors"})]})]})}},139:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.StepSelection=void 0;const r=t(0),n=t(2),s=i(t(91)),l=t(1),c=t(177),o=t(6),d=t(92),u=t(75),m=t(93),p=t(23),{selected:v,bundles:h,step2Container:y,backButton:b,varietySetContainer:f,varietyItem:g,varietyName:k,title:x,selectedOptionsContainer:I,selectedImagesContainer:S,modifyButton:j,stepIndicatorTitleContainer:P,columnDisplay:D,imageContainer:C,yourVarietySet:N,chosenFlavors:$,varietySetLimitedEdition:_,limitedEditionContainer:F,selectedOptionsLimitedEdition:T,bundleSubheading:w,desktopOnly:O,mobileOnly:E}=s.default;(0,o.setConfig)([{folder:"stars-honey",template:"https://cdn.shopify.com/s/files/1/0664/6100/8105/"},{folder:"stars-honey",template:"https://starsandhoney.com/cdn/shop/files/"}]),a.StepSelection=({productPage:e,bundleSelected:a,setBundleSelected:t,bundlePriceEach:i,varietySetIsComplete:s,setVarietySetIsComplete:o,selectedFlavorSet:w,setSelectedFlavorSet:B,limitedEditionFlags:A,currencySymbol:V,productsExpandYourPalate:L,countryCode:H,featureInternationalization:M,productsForVarietySet:R})=>{const z=e=>{B((a=>[...a,e])),[...w,e].length===a+2&&o(!0)},U=(0,d.limitedProductByVariety)({varietyData:p.mockProductDetailData.varietyData,limitedEditionFlags:A,productsExpandYourPalate:L,countryCode:H,featureInternationalization:M});return(0,l.useEffect)((()=>{B([]);let e=!1;a===m.BundleSize["12 Pack"]&&(e=!0),o(e)}),[a]),(0,l.useEffect)((()=>{B([]),o(!1)}),[H]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:x,children:[(0,r.jsx)("span",{children:"STEP 1"}),(0,r.jsx)("span",{children:"CHOOSE YOUR PACK SIZE"})]}),(0,r.jsxs)("div",{className:h,children:[(0,r.jsxs)("div",{onClick:()=>t(0),children:[(0,r.jsx)("button",{className:`${a===m.BundleSize["20 Pack"]&&v}`,children:e.options[0].values[0]}),(0,r.jsxs)("span",{children:[`${V}${i[0].toFixed(2)}`," EA."]})]}),(0,r.jsxs)("div",{onClick:()=>t(1),children:[(0,r.jsx)("button",{className:`${a===m.BundleSize["30 Pack"]&&v}`,children:e.options[0].values[1]}),(0,r.jsxs)("span",{children:[`${V}${i[1].toFixed(2)}`," EA."]})]})]}),(0,r.jsx)("div",{style:{minHeight:"200px"},children:a===m.BundleSize["12 Pack"]?(0,r.jsx)(u.TwelvePackDetails,{mockDataStepper:p.mockProductDetailData}):(0,r.jsxs)("div",{className:`step2Container ${y}`,children:[s?(0,r.jsxs)("div",{className:x,children:[(0,r.jsx)("span",{children:"BUNDLE SUMMARY"}),(0,r.jsx)("span",{})]}):(0,r.jsxs)("div",{className:x,children:[(0,r.jsx)("span",{children:"STEP 2"}),(0,r.jsx)("span",{children:"CHOOSE YOUR FLAVORS"})]}),(0,r.jsxs)("div",{className:P,children:[(0,r.jsx)("div",{style:{color:0===w.length?"black":"#a0a0a0"},children:"FIRST FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),(0,r.jsx)("div",{style:{color:1===w.length?"black":"#a0a0a0"},children:"SECOND FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),a===m.BundleSize["30 Pack"]&&(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("div",{style:{color:2===w.length?"black":"#a0a0a0"},children:"THIRD FLAVOR"}),(0,r.jsx)(c.ArrowRight,{})]}),(0,r.jsx)("div",{style:{color:s?"black":"#a0a0a0"},children:"SUMMARY"})]}),w.length>0&&(0,r.jsx)("button",{className:b,onClick:()=>{B((e=>e.slice(0,-1))),o(!1)},children:"Back"}),!s&&(0,r.jsx)("div",{className:`varietySetContainer ${f}`,style:{minHeight:"140px"},children:R.map((e=>(0,r.jsxs)("div",{className:g,onClick:()=>z(e.key),children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`${k} ${O}`,children:e.varietyName}),(0,r.jsx)("div",{className:`${k} ${E}`,children:e.varietyName.split(/(?=Chip)/).map(((e,a)=>(0,r.jsxs)("div",{children:[e,0===a&&(0,r.jsx)("br",{})]},a)))})]},e.key)))}),!s&&U.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:_,children:"LIMITED EDITION"}),(0,r.jsx)("div",{className:`varietySetContainer ${f} limitedEditionContainer ${F}`,children:U.map((e=>(0,r.jsxs)("div",{className:g,onClick:()=>z(e.key),children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${k} ${O}`,children:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${k} ${E}`,children:e.varietyNameMobile||e.varietyName})]},e.key)))})]}),(0,r.jsxs)("div",{className:`${I} ${U.length>0?T:""}`,style:{alignItems:s?"flex-start":"center"},children:[(0,r.jsx)("h3",{children:s?(0,r.jsx)("div",{className:N,children:"Your Variery Set"}):w.length>0?(0,r.jsx)("div",{className:$,children:"CHOSEN FALVORS"}):""}),(0,r.jsx)("div",{className:`${S} ${s&&D}`,children:w.map(((e,a)=>(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("div",{className:C,"data-index":a+1,children:(0,r.jsx)("img",{src:p.mockProductDetailData.varietyData[e].varietyImage,alt:p.mockProductDetailData.varietyData[e].varietyName})}),s&&(0,r.jsx)("span",{children:p.mockProductDetailData.varietyData[e].varietyName})]},a)))}),s&&(0,r.jsx)("button",{className:j,onClick:()=>{B([]),o(!1)},children:"Modify"})]})]})})]})}},75:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.TwelvePackDetails=void 0;const r=t(0),n=(t(2),t(177)),s=i(t(91)),l=t(23),c={"Cacao Salt Caramel Peanut":2,"Espresso Vanilla Cinnamon":1,"Dark Chocolate Coconut":2,"The Raspberry Donut":2,"Birthday Cake Chocolate Chip":1,"Peanut Butter Blackberry":2,"Cookies and Cream":2};a.TwelvePackDetails=({mockDataStepper:e,isMobile:a=!1})=>{const t=e.varietyData.filter((e=>!e.isLimited));return(0,r.jsxs)("div",{className:`step2Container ${s.default.step2Container} `,children:[(0,r.jsxs)("div",{className:`title ${s.default.title} `,children:[(0,r.jsx)("span",{children:"LIMITED EDITION SET"}),(0,r.jsx)("span",{children:"12 BARS + HAT"})]}),(0,r.jsxs)("div",{className:`stepIndicatorTitleContainer ${s.default.stepIndicatorTitleContainer} `,children:[(0,r.jsx)("div",{className:`flavorsIncluded ${s.default.flavorsIncluded}`,children:l.mockProductDetailData.varietyData.filter((e=>!e.isLimited)).map(((e,a)=>(0,r.jsx)("div",{className:s.default.varietyItem,children:(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"})},a)))}),(0,r.jsxs)("span",{className:`bars ${s.default.bars}`,children:[(0,r.jsx)("b",{children:"12"}),(0,r.jsx)("span",{children:"Bars"})]}),(0,r.jsx)("div",{className:`plus ${s.default.plus}`,children:"+"}),(0,r.jsxs)("div",{className:`hat ${s.default.hat}`,children:[(0,r.jsx)("img",{src:"https://cdn.shopify.com/s/files/1/0664/6100/8105/files/empty-hat.webp?v=1733423560",alt:"hat"}),(0,r.jsx)("p",{children:"Varsity Hat"})]})]}),(0,r.jsxs)("div",{className:`title ${s.default.title} titleFlavors ${s.default.titleFlavors} `,children:[(0,r.jsx)("span",{children:"FLAVORS INCLUDED"}),(0,r.jsx)("span",{})]}),(0,r.jsxs)("div",{className:`stepIndicatorTitleContainer ${s.default.stepIndicatorTitleContainer} `,children:[(0,r.jsx)("div",{className:`stepperTitle ${s.default.stepperTitle}`,children:"12 PACK | ALL FLAVORS"}),(0,r.jsx)(n.ArrowRight,{})]}),(0,r.jsx)("div",{className:s.default.varietySetContainer,children:t.map((e=>(0,r.jsxs)("div",{className:s.default.varietyItem,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${s.default.varietyName}`,style:{cursor:"default"},children:a&&e.varietyName.includes("Chip")?e.varietyName.split(/(?=Chip)/).map(((a,t)=>(0,r.jsxs)("div",{children:[a,0===t?(0,r.jsx)("br",{}):` (${c[e.varietyName]})`]},t))):`${e.varietyName} (${c[e.varietyName]})`})]},e.key)))})]})}},177:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ArrowRight=void 0;const i=t(0);a.ArrowRight=()=>(0,i.jsx)("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M1 10.2002L5 5.6002L1 1.0002",stroke:"black","stroke-width":"2"})})},376:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ArrowRightPopup=void 0;const i=t(0);t(2),a.ArrowRightPopup=function({}){return(0,i.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon--wide icon-arrow-right-long",viewBox:"0 0 21 10",children:(0,i.jsx)("path",{d:"M14.982 1.01l.696-.717 3.803 3.691.011-.01.338.348.359.348-.012.01.012.011-.354.343-.343.353-.011-.011-3.803 3.692-.696-.718 3.266-3.17H.5v-1h17.748z"})})}},93:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BundleSize=void 0,a.BundleSize={"20 Pack":0,"30 Pack":1,"12 Pack":2}},92:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.limitedProductByVariety=a.isProductsAvailableInCurrentCountry=void 0,a.isProductsAvailableInCurrentCountry=({product:e,countryCode:a})=>{if(!e)return!1;const t=e?.variants[0],i=t?.variantProductsPricing;return i?.some((e=>e.country===a))},a.limitedProductByVariety=({varietyData:e,limitedEditionFlags:t,productsExpandYourPalate:i,countryCode:r,featureInternationalization:n})=>e.filter((e=>{if(!t.peppermintMochaEnabled&&"Peppermint Mocha"===e.varietyName)return!1;if(!t.gingerbreadCookieEnabled&&"Gingerbread Cookie"===e.varietyName)return!1;if(!t.cherryChocolateWaffleConeEnabled&&"Cherry Chocolate Waffle Cone"===e.varietyName)return!1;if(n){if(!e.isLimited)return!1;const t=i.find((a=>a.handle===e.handle));return(0,a.isProductsAvailableInCurrentCountry)({product:t,countryCode:r})}return e.isLimited}))}}]);