PageSourceSearch

https://www.naturemade.com/cdn/shop/t/520/assets/theme-bundle.global.js?v=130926739835366210191789405695

js naturemade.com collected 2026-09-24 18:50:06 UTC 218,696 bytes, 1 lines download raw bytes

1(()=>{var e,t={2634:()=>{},5966:(e,t,n)=>{"use strict";var i=n(4692),o=n(5371);const a=function(e){return new Promise((function(t){if(document.querySelector(e))return t(document.querySelector(e));var n=new MutationObserver((function(i){document.querySelector(e)&&(t(document.querySelector(e)),n.disconnect())}));n.observe(document.body,{childList:!0,subtree:!0})}))};var r=n(197);const c=function(e){return e.trim().replace(/[^a-zA-Z0-9-_\s]/g,"").replace(/\s+/g,"-").toLowerCase()};var s=n(6777);var l=n(4692);function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(c)throw a}}}}function u(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function v(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,y(i.key),i)}}function g(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e){var t=function(e,t){if("object"!=A(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=A(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==A(t)?t:t+""}function w(e,t,n){return t=k(t),b(e,E()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}function b(e,t){if(t&&("object"==A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}function _(e){var t="function"==typeof Map?new Map:void 0;return _=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(E())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var o=new(e.bind.apply(e,i));return n&&L(o,n.prototype),o}(e,arguments,k(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),L(n,e)},_(e)}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}
1function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}const C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.getBoundingClientRect();return n.top>=0&&n.bottom<=window.innerHeight+n.height+t};var q,T,I=n(9994),x=n(3223);function M(e){if(null==e)return"";e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=String(e)).replace(/&amp;reg;/g,"&reg;")).replace(/&amp;trade;/g,"&trade;")).replace(/&amp;dagger;/g,"&dagger;")).replace(/&amp;Dagger;/g,"&Dagger;")).replace(/&amp;diams;/g,"&diams;")).replace(/&amp;#174;/g,"&#174;")).replace(/&amp;#8482;/g,"&#8482;")).replace(/&amp;#8224;/g,"&#8224;")).replace(/&amp;#8225;/g,"&#8225;")).replace(/&amp;#9830;/g,"&#9830;")).replace(/&amp;#x25B2;/g,"&#x25B2;")).replace(/&reg;/g,"®")).replace(/&#174;/g,"®")).replace(/&trade;/g,"™")).replace(/&#8482;/g,"™")).replace(/&dagger;/g,"†")).replace(/&#8224;/g,"†")).replace(/&Dagger;/g,"‡")).replace(/&#8225;/g,"‡")).replace(/&diams;/g,"♦")).replace(/&#9830;/g,"♦")).replace(/&#x25B2;/g,"▲");var t=window.metafieldGlobalSettings.superscriptCharacters||["◾","▲","◆","★","†","‡","®","™","♦","*","�"],n=[];e=(e=e.replace(/<small\b[^>]*>[\s\S]*?<\/small>/gi,(function(e){var t="__SMALL_BLOCK__".concat(n.length,"__");return n.push({token:t,match:e}),t}))).replace(/<sup>|<\/sup>/g,"");var i=new RegExp("[".concat(t.map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join(""),"]"),"g");return e=e.replace(i,(function(e){return"<sup>".concat(e,"</sup>")})),n.forEach((function(t){var n=t.token,i=t.match;e=e.replace(n,i)})),e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var P=window.searchCardConfig||{},N=null===(q=window.algoliaShopify)||void 0===q||null===(q=q.config)||void 0===q?void 0:q.app_id,D=null===(T=window.algoliaShopify)||void 0===T||null===(T=T.config)||void 0===T?void 0:T.search_api_key,H=(0,x.lF)(new URLSearchParams(window.location.search).get("q")||""),B=N&&D?(0,I.w)(N,D):null,j={appId:N,apiKey:D,search:function(e){if(!B)return Promise.resolve({results:[]});var t=e.map((function(e){return e.params.query&&0!==e.params.query.length?(e.params.analytics=!0,e.params.clickAnalytics=!0,e.params.userToken=window.user_id):e.params.analytics=!1,e}));return B.search(t)}},F=new Map,R=function(e,t,n){var i,o,a,r,c,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=e.handle,d=e.product_image,u=e.title,f=e.variants_min_price,m=e.tags,v=(e.sku,e.published_at),p=e.inventory_available,h=e.variants_inventory_count,g=e.variants_compare_at_price,y=(e.barcode,e.collections),w=e.id,b=e.objectID,S=e.__position,_=e.__queryID,E=e.meta,L=e.product_type,k="",A="",C="",q=0,T=0;E.reviews&&(q=parseFloat(null===(c=E.reviews.rating)||void 0===c?void 0:c.value)||0,T=parseInt(E.reviews.rating_count,10)||0);var I,x,P,N,D=!1,B="Notify Me",j="",R="",z="",U="",V=!1,G="";if(E.accentuate){var W=E.accentuate.coming_soon_release_date;G=E.accentuate.coming_soon_product_card_badge_copy||"Coming<br>Soon";var J=window.metafieldGlobalSettings.storeDate;W&&J<(I=W,x=window.metafieldGlobalSettings.storeOffset,P=x.slice(0,3)+":"+x.slice(3),N=new Date("".concat(I,"T00:00:00").concat(P)),Math.floor(N.getTime()/1e3))&&(V=!0);var K=(D=!(!E.accentuate.disable_bis||"true"!=E.accentuate.disable_bis))?"Not Available":"Notify Me";B=E.accentuate.bis_plp_cta_copy&&""!=E.accentuate.bis_plp_cta_copy?E.accentuate.bis_plp_cta_copy:K,j=E.accentuate.dosage?E.accentuate.dosage:"",R=E.accentuate.dosage_subtext?M(E.accentuate.dosage_subtext):""}E.prodFields&&(U=E.prodFields.support_items?JSON.parse(E.prodFields.support_items):null,z=E.prodFields.pill_image?JSON.parse(E.prodFields.pill_image):"");var $=!1,X=L.toLowerCase();if(E.filter&&E.filter.pill_type){var Y=E.filter.pill_type;X=(Y.length?Y[0]:L).toLowerCase(),$=Y.length>1||"bundle"==X}var Z="",Q="";if(null!==(i=U)&&void 0!==i&&i.length){var ee=window.metafieldGlobalSettings.collection_benefits_metaobject.filter((function(e){var t=e.title,n=e.titles||[],i=U[0].toLowerCase().trim();if(n.includes(i)||t==i)return e}));ee.length&&(Z=ee[0].title,Q=ee[0].icon||"")}var te=!1,ne={},ie=null==E||null===(o=E.product_badge)||void 0===o||null===(o=o.metaobject)||void 0===o?void 0:o.fields;if(null!=ie&&ie.image&&(null==ie||!ie.disable_on_product_card)){var oe=document.getElementById("product-badge-metaobject-json"),ae=oe?JSON.parse(oe.textContent):[],re=ie.image.split("/").pop(),ce=
1ae.find((function(e){return e.id==re}));ce&&(te=!0,ne={src:ce.url,alt_text:ce.alt_text,width:ce.width,height:ce.height})}window.location.pathname.includes("/collections/")&&window.location.pathname.replace("/collections/","");var se="/products/".concat(l),le=E.naturemade&&E.naturemade.short_title?E.naturemade.short_title:u,de=E.naturemade&&E.naturemade.tagline?E.naturemade.tagline:"";void 0!==e.__queryID&&(-1==se.indexOf("?")&&(se+="?"),se+="&queryID=".concat(_));var ue,fe="".concat(le," ").concat(de).replace(/†|‡|®|™/g,""),me=null===(a=window.natureMade.stashedDiscontinuedProductData)||void 0===a?void 0:a.find((function(e){return w==e.productId})),ve=me&&!me.hasOtherVariants&&me.isDiscontinued,pe=ve&&!V?"".concat(window.variantStrings.discontinued):m.includes("FREESAMPLE")?'Try&nbsp;<span class="visually-hidden">'.concat(fe,'&nbsp;</span><span aria-hidden="true">Now</span>'):'Buy&nbsp;<span class="visually-hidden">'.concat(fe,'&nbsp;</span><span aria-hidden="true">Now</span>');V&&(pe="\n            ".concat(null!=E&&null!==(ue=E.coming_soon)&&void 0!==ue&&ue.plp_button_label?E.coming_soon.plp_button_label:window.metafieldGlobalSettings.coming_soon_cta,'\n            <span class="visually-hidden">for ').concat(le," ").concat(de,"</span>\n        "));var he,ge,ye,we=me?null:(he=w,!!(ge=document.getElementById("discontinued-metaobject"))&&!!JSON.parse(ge.dataset.metaobjects).map((function(e){var t;return null===(t=e.product)||void 0===t?void 0:t.split("/").pop()})).filter(Boolean).map((function(e){return parseInt(e)})).includes(he)),be='<a class="card-link hide-on-print" href="'.concat(se,'">\n        <span class="button button-primary ').concat(we?"loading":""," ").concat(V?"coming-soon-cta":"",'">\n            ').concat(pe,"\n        </span>\n    </a>"),Se="",_e=[l],Ee=getObjects(t,"product","gid://shopify/Product/".concat(w));if(Ee.length){var Le=Ee[0].previous_handles;_e.push.apply(_e,function(e){if(Array.isArray(e))return O(e)}(ye=Le)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(ye)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}(ye)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}var ke=_e.some((function(e){return window.natureMade.wishlistArray.includes(e)}));ke&&(Se="active");var Ae,Ce=encodeURIComponent("".concat(window.location.pathname).concat("/search"==window.location.pathname?"".concat(window.location.search):"")),qe='\n    <div class="heart-button--container--mobile hide-on-mobile">\n        <button data-href="/account/register?return_url='.concat(Ce,'&favorites" class="btn-heart" data-handle="').concat(l,'" onclick="window.natureMade.addToFav(this)">\n        <svg width="24" height="24" viewBox="0 0 24 24" class="empty-heart" aria-hidden="true" focusable="false" role="presentation">\n            <use href="#icon-heart-empty-product"></use>\n        </svg>\n        <span class="visually-hidden add-to-favs-a11y-label">\n            Add ').concat(fe," to your favorites.\n        </span>\n        </button>\n    </div>\n    ");document.querySelectorAll(".show-wishlist")[0].classList.contains("show-wishlist-on")&&(qe='\n        <div class="heart-button--container--mobile">\n            <button type="button" class="btn-heart '.concat(Se,'" data-handle="').concat(l,'" data-handles="').concat(_e.join(","),'" onclick="window.natureMade.addToFav(this)">\n                <svg width="24" height="24" viewBox="0 0 24 24" class="empty-heart" aria-hidden="true" focusable="false" role="presentation">\n                    <use href="#icon-heart-empty-product"></use>\n                </svg>\n                <svg width="24" height="24" viewBox="0 0 24 24" class="full-heart" aria-hidden="true" focusable="false" role="presentation">\n                    <use href="#icon-heart-full-product"></use>\n                </svg>
1\n                <span class="visually-hidden add-to-favs-a11y-label">\n                    Add ').concat(fe,' to your favorites.\n                </span>\n                <span class="visually-hidden remove-from-favs-a11y-label">\n                    Remove ').concat(fe," from your favorites.\n                </span>\n            </button>\n        </div>\n        ")),Ae=new Date(v),((new Date).getTime()-Ae.getTime())/864e5<30&&(k="NEW",A="has-red-background");var Te=!!m.includes("bundle");if(g>0&&0==Te&&(k="SALE",A="has-red-background"),E.filter&&E.filter.featured&&E.filter.featured.length){var Ie,xe=null===(Ie=E.filter.featured.sort()[0])||void 0===Ie?void 0:Ie.toUpperCase();"TRENDING"!=xe&&(k=xe,A="has-green-background")}var Me="";if(y){var Oe=y.filter((function(e){return e.includes("wellblends")}));Oe.length>0&&(Me=Oe[0].replace("wellblends","wb_card_").replace(/-/g,""))}"NEW"==k&&(A="has-red-background"),"EXCLUSIVE"==k&&(k="ONLINE ONLY"),"SALE"!=k&&"ONLINE ONLY"!=k||(A="has-red-background");var Pe=m.filter((function(e){return e.includes("force-sold-out")})),Ne=me&&me.variantPrice?me.variantPrice:f.toFixed(2),De=m.includes("free-sample")?"Free":"<span>$</span>".concat(Ne),He='<div class="item-price">'.concat(De,"</div>"),Be='\n        <div class="inline-star-ratings">\n            '.concat(V&&0==T?"&nbsp;":'\n                <div class="inline-star-rating__container">\n                    <span aria-hidden="true" class="rating-star color-icon-text" style="--rating: '.concat(Math.floor(q),"; --rating-max: 5; --rating-decimal: ").concat((q%1).toFixed(1),';"></span>\n                    <span aria-hidden="true" class="rating-info"> (').concat(T,')</span>\n                    <span class="sr-only">').concat(q," average rating out of 5. Has ").concat(T," reviews.</span>\n                </div>\n            "),"\n        </div>\n      ");if(!V&&0==p&&h<=0||!V&&Pe.length>0){(function(e){e&&(F.has(e)||F.set(e,fetch("/products/".concat(e,".js")).then((function(e){return e.json()})).then((function(e){return e.available})).catch((function(t){return console.error(t),F.delete(e),null}))),F.get(e).then((function(t){null===t||t||document.querySelectorAll(".soldout-flag_".concat(e)).forEac
1h((function(e){e.style.display="flex"}))})))})(l),k="SOLD OUT",A="has-dark-gray-text has-white-background soldout-flag soldout-flag_".concat(l),C="is-sold-out",m.includes("free-sample")&&(k="OUT OF STOCK",A="has-white-text has-gray-background soldout-flag soldout-flag_".concat(l));var je=window.location.pathname.match(/\/collections\/([^/]+)/i),Fe=Boolean(je)&&2===je.length?je[1]:"all-products";se+="?variant=".concat(b).concat(D?"":"&nm=1");var Re="Open product details page";window.accessibilityString&&(ve?Re=window.accessibilityString.discontinued.replace("#title",fe):D&&window.accessibilityString.notAvailable?Re=window.accessibilityString.notAvailable.replace("#title",fe):!D&&window.accessibilityString.notifyMe&&(Re=window.accessibilityString.notifyMe.replace("#title",fe))),be='\n            <a class="card-link wtb-card-button" href="/collections/'.concat(Fe,"/products/").concat(l,"?variant=").concat(b).concat(D?"":"&nm=1",'">\n                <span class="button button-primary ').concat(we?"loading":"",'" data-button-text="').concat(B.toLowerCase().replaceAll(" ","-"),'">\n                    <span aria-hidden="true" class="find-store-label">\n                    ').concat(ve?"".concat(window.variantStrings.discontinued):B,'\n                    </span>\n                    <span class="visually-hidden visually-hidden--inline">').concat(Re,"</span>\n                </span>\n            </a>")}V&&(k=G,A="has-blue-background coming-soon-flag"),1==s&&null!==window.renderMarketingCard&&window.renderMarketingCard;var ze=null==E||null===(r=E.coming_soon)||void 0===r?void 0:r.product_card_badge_bg_color,Ue=ze&&["#fdca21","#ffffff"].includes(ze.toLowerCase()),Ve=k?'<div class="item-status '.concat(A,'" ').concat(V&&ze?'style="background-color:'.concat(ze,"!important;").concat(Ue?"color:rgb(var(--color-dark-grey));":"",'"'):"","><span>").concat(k,"</span></div>"):"",Ge="",We=$||"bundle"==X?"pack":X,Je=window.metafieldGlobalSettings.pill_type_metaobject.filter((function(e){var t=e.title.toLowerCase(),n=e.titles||[];if(n=n.map((function(e){return e.toLowerCase()})),n.includes(We)||t==We)return e}));Je.length&&(Ge='\n            <span>\n                <img class="pill-type-icon" src="'.concat(Je[0].icon,'" height="22" width="32" alt="').concat(Je[0].title,' Icon" loading="lazy">\n                </span>\n            <span class="card-product-type">').concat(We.toUpperCase(),"</span>\n        "));var Ke=R?'<span class="dosage-alt"><span>'.concat(R,"</span></span>"):"",$e=j?'<span class="dosage-main">'.concat(j,"</span>"):"",Xe="",Ye="";j?Ye='<div class="product-card-dosage">\n            '.concat($e,"\n            ").concat(Ke,"\n        </div>"):(Xe=""!=Q?'<img class="benefit-icon" src="'.concat(Q,'" height="24" width="24" alt="').concat(Z,' icon" loading="lazy" fetchpriority="low"/>'):'<svg aria-hidden="true" focusable="false" role="presentation" width="22" height="24" viewBox="0 0 22 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n                <g clip-path="url(#clip0_696_6995)">\n                <path d="M11 1.28069C13.5933 1.28069 16.0803 2.3603 17.9139 4.28159C19.7474 6.20313 20.7778 8.80907 20.7778 11.5262C20.7778 14.2433 19.7474 16.8495 17.9139 18.7708C16.08 20.692 13.5931 21.7717 11 21.7717C8.40693 21.7717 5.91971 20.692 4.08613 18.7708C2.25256 16.8492 1.22222 14.2433 1.22222 11.5262C1.22516 8.80983 2.25622 6.20569 4.08931 4.28492C5.9224 2.36415 8.40767 1.28376 11 1.28069ZM11 0C8.08256 0 5.28464 1.21435 3.22178 3.37589C1.15891 5.53743 0 8.46917 0 11.5262C0 14.5832 1.15891 17.5149 3.22178 19.6765C5.28464 21.838 8.08256 23.0523 11 23.0523C13.9174 23.0523 16.7154 21.838 18.7782 19.6765C20.8411 17.5149 22 14.5832 22 11.5262C22 8.46917 20.8411 5.53743 18.7782 3.37589C16.7154 1.21435 13.9174 0 11 0ZM16.502 6.40317C16.3228 6.40317 16.1526 6.48513 16.0358 6.62729L9.1322 15.0668L5.93218 11.7137C5.77696 11.5566 5.55427 11.497 5.346 11.5566C5.13773 11.6166 4.97518 11.7869 4.91822 12.0049C4.86102 12.2231 4.91822 12.4565 5.06782 12.6191L8.73449 16.4612C8.84913 16.5813 9.0046 16.6487 9.16667 16.6487H9.19062C9.36051 16.641 9.51989 16.56 9.63111 16.4248L16.9644 7.45999C17.07 7.3309 17.1221 7.16339 17.1096 6.99382C17.0969 6.82452 17.0209 6.66725 16.8977 6.55685C16.7877 6.45722 16.6474 6.4024 16.5022 6.40266L16.502 6.40317Z" fill="black"/>\n                </g>\n                <defs>\n                <clipPath id="clip0_696_6995">\n                <rect width="22" height="23.0523" fill="white"/>\n                </clipPath>\n                </defs>\n            </svg>',Ye=""!=Z?'<div class="product-card-dosage benefit-block">
1\n            <span class="dosage-main">'.concat(Xe,'</span>\n            <span class="dosage-alt"><span>').concat(Z,"</span></span>\n        </div>"):"");var Ze='data-reading-time-present="false" \n    data-keyword-highlighted="false" \n    data-content-type="product" \n    data-objectid="'.concat(b,'" \n    ').concat(H?'data-search-query="'.concat(H,'"'):""," \n    ").concat(_?'data-queryid="'.concat(_,'"'):""," \n    ").concat(S?'data-position="'.concat(S,'"'):""," \n    ");return'<div class="product-card-v2-container product-card-v2-container__'.concat(w," ").concat(C," ").concat(""," ").concat(Me," \n            ").concat(Te?"bundle-product-card":""," ").concat(ve?"discontinued-product":"",'"  ').concat(Ze,' id="p-').concat("".concat(n||e.collections[0],"-")).concat(l,'"\n        data-product-title="').concat(u,'" role="region" aria-label="Product Card">\n                <div class="title-and-ratings-container">\n                    <div class="title-container product-type-').concat(L.toLowerCase(),'">\n                        <span class="product-card--title">').concat(M(le),'</span>\n                        <span class="key-vital body-small">').concat(M(de),"</span>\n                    </div>\n                    ").concat(Be,"\n                </div>\n            ").concat(qe,'\n            <div class="card-image--container">\n                ').concat(Ve)+(d?'\n                <div class="product-card--image-container">\n                    <img src="'.concat(d).concat(-1==d.indexOf("?")?"?width=240":"&width=240",'" height="189" width="189" loading="lazy" alt="').concat(u,'"/>\n                    ').concat(te?'\n                        <div class="product-badge">\n                            <img src="'.concat(ne.src,'" alt="').concat(ne.alt_text,'" width="').concat(ne.width,'" height="').concat(ne.height,'" class="badge-image" loading="lazy">\n                        </div>\n                    '):"","\n                </div>"):"")+(""!=z?'\n                <div class="pill-image-container product-card--image-container">\n                    <img src="'.concat(z[0].src,'&transform=resize=240" height="').concat(z[0].height,'" width="').concat(z[0].width,'" loading="lazy" alt="').concat(u,' pill image"/>\n                </div>'):"")+'</div>\n            <div class="product-attributes-container">\n                <div class="product-card-type">\n                    '.concat(Ge,"\n                </div>\n                ").concat(Ye,'\n            </div>\n            <div class="card-product-button-container">\n                <div>\n                ').concat(He,"\n                </div>\n                ").concat(be,"\n            </div>\n        </div>\n        ")},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"simple",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=e.blog,o=e.handle,a=e.image,r=e.title,c=e.tags,s=e.published_at,l=e.objectID,d=e.__queryID,u=e.__position,f=e.meta,m=e._highlightResult,v=e._snippetResult,p="/blogs/"+i.handle+"/"+o,h=f&&f.article_filter?Object.values(f.article_filter).reduce((function(e,t){return e.concat(t)}),[]):[];"health-articles"!=i.handle&&(h=c.filter((function(e){return e.indexOf("|")<0&&e.toLowerCase().indexOf("wellblends")<0&&"excludeproducts"!=e.toLowerCase()}))),void 0!==d&&(p+="?&queryID=".concat(d));var g="media--landscape";null!==i.handle&&-1!==i.handle.indexOf("studies")&&(g="media--portrait"),a||(a="http://cdn.shopify.com/s/images/admin/no-image-compact.gif"),-1==a.indexOf("?")&&(a+="?"),a+="&width=438";var y="&nbsp;";if(n.length){var w=n.findIndex((function(e){return e.id===l}));-1!==w&&(y=n[w].readingTime)}var b,S,_="knowledge-hub"===i.handle?"help topic":"article",E='data-reading-time-present="'.concat("&nbsp;"!==y,'" \n    data-keyword-highlighted="false" \n    data-content-type="').concat(_,'" \n    data-objectid="').concat(l,'"\n    ').concat(H?'data-search-query="'.concat(H,'"'):""," \n     ").concat(d?'data-queryid="'.concat(d,'"'):""," \n     ").concat(u?'data-position="'.concat(u,'"'):""," \n    ");if("date"==t)return'\n            <div class="algolia-resource-item cell medium-12" '.concat(E,'>\n                <article role="presentation">\n                    <a href="').concat(p,'">\n                        <div class="media ').concat(g,'">\n                            <img src="').concat(a,'" data-src="').concat(a,'" alt="" class="lozad" loading="lazy" height="178" width="268" role="presentation">\n                        </div>\n                        <p class="is-style-4 featured-tag">
1\n                            <span class="sr-only">published</span>\n                            ').concat((b=s,S=new Date(b),"".concat(["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"][S.getMonth()]," ").concat(S.getDate(),", ").concat(S.getFullYear())),'\n                        </p>\n                        <h3 class="h5 margin-top-1" id="').concat(l,'" data-item-title>\n                            ').concat(r,'\n                        </h3>\n                        <span class="sr-only">Article</span>\n                    </a>\n\n                    ').concat(h.map((function(e){return'<a class="inline-tags reset-and-filter-tags"  data-value="'.concat(e,'" href="/blogs/health-articles?tag=').concat(encodeURIComponent(e),'" onclick="scrollToElement(\'articles-list-wrapper\')">\n                        <span type="link" class="text-underline text-small" aria-hidden="true">\n                        ').concat(e,'</span>\n                        <span class="sr-only">').concat(e," articles</span>\n                    </a>")})).join(""),"\n                </article>\n            </div>\n        ");if("text-based"==t){var L,k,A,C,q,T,I,x=(null==m||null===(L=m.title)||void 0===L?void 0:L.value)||r,M=null==m||null===(k=m.body_html_safe)||void 0===k?void 0:k.value,O=null==m?void 0:m.meta,N=(null==O||null===(A=O.global)||void 0===A||null===(A=A.description_tag)||void 0===A?void 0:A.value)||(null==v||null===(C=v.body_html_safe)||void 0===C?void 0:C.value)||function(e){if(!e)return"";var t=(e=(e=e.replace(/##.*?##/g,"")).replace(/\s+/g," ").trim()).split(" ");return t.length>50?t.slice(0,50).join(" ")+"...":e}(M)||"";E='data-reading-time-present="'.concat("&nbsp;"!==y,'" \n                data-keyword-highlighted="').concat(!(!N.includes("<mark>")&&!x.includes("<mark>")),'" \n                data-content-type="').concat(_,'" \n                data-objectid="').concat(l,'"\n                ').concat(H?'data-search-query="'.concat(H,'"'):""," \n                ").concat(d?'data-queryid="'.concat(d,'"'):""," \n                ").concat(u?'data-position="'.concat(u,'"'):""," \n                ");var D=P.cardIconHealthArticles,B=D?'<img src="'.concat(D,'" alt="').concat(r,' icon" width="24" height="24" role="presentation" aria-hidden="true" loading="lazy">'):'<svg width="18" height="24" viewBox="0 0 18 24" fill="none" aria-hidden="true" focusable="false" role="presentation">\n                <use href="#icon-book-mark"></use>\n            </svg>',j=P.cardHeadlineHealthArticles;if("Knowledge Hub"==i.title){var F=P.cardIconKnowledgeBase;B=F?'<img src="'.concat(F,'" alt="').concat(r,' icon" width="24" height="24" role="presentation" aria-hidden="true" loading="lazy">'):'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false" role="presentation">\n                <use href="#icon-life-ring"></use>\n            </svg>',j=P.cardHeadlineKnowledgeBase}if(null!=f&&null!==(q=f.search_result)&&void 0!==q&&q.card_icon_override){var R=JSON.parse(f.search_result.card_icon_override);B='<img src="'.concat(R[0].src,'" alt="').concat(R[0].alt||"".concat(r," icon"),'" width="').concat(R[0].width,'" height="').concat(R[0].height,'" role="presentation" aria-hidden="true" loading="lazy">')}null!=f&&null!==(T=f.search_result)&&void 0!==T&&T.card_type_headline&&(j=f.search_result.card_type_headline),null!=O&&null!==(I=O.search_result)&&void 0!==I&&I.card_title_override&&(x=O.search_result.card_title_override.value);var z=(new DOMParser).parseFromString(x,"text/html").documentElement.textContent;return'\n            <div class="algolia-resource-item algolia-search-card cell medium-12" '.concat(d?'data-queryid="'.concat(d,'"'):""," ").concat(u?'data-position="'.concat(u,'"'):"",' data-objectid="').concat(l,'" ').concat(E,'>\n                <article role="presentation">\n                    <a href="').concat(p,'">\n                        <div class="search-card-headline">\n                            <span class="search-type-icon">').concat(B,'</span>\n                            <span class="search-type-headline uppercase">').concat(j,'</span>\n                        </div>\n                        <div class="search-card-title-wrapper">\n                            <h3 class="h6 margin-top-1" id="').concat(l,'" data-item-title>').concat(z,'</h3>\n                            <div class="read-time-wrapper body-small-alt">').concat(y,'</div>\n                        </div>\n                        <div class="search-card-content">\n                            <p class="body-small margin-0">').concat(N,'</p>\n                        </div>\n                        <div class="styled-link-primary uppercase margin-top-1">View Details</div>\n                    </a>\n                </article>\n            </div>\n\n            <div class="algolia-resource-item cell medium-12" ').concat(d?'data-queryid="'.concat(d,'"'):""," ").concat(u?'data-position="'.concat(u,'"'):"",' data-objectid="').concat(l,'">\n                <article role="presentation">\n                    <a href="').concat(p,'" aria-describedby="article_').concat(l,'" class="resource-link">\n                        <div class="resource-image-container">\n                            <div class="media media--landscape">\n                                <img src="').concat(a,'" data-src="').concat(a,'" alt="image for article - ').concat(r,'" class="lozad" loading="lazy">\n                            </div>\n                        </div>\n                        <div class="resource-details">\n                            <h3 class="h5 margin-top-1" id="article_').concat(l,'">').concat(r,"</h3>\n                        </div>\n                    </a>\n                </article>\n            </div>\n        ")}return'\n            <div class="algolia-resource-item cell medium-12" '.concat(E,'>\n                <article role="presentation">\n                    <a href="').concat(p,'" aria-describedby="article_').concat(l,'" class="resource-link">\n                        <div class="resource-image-container">\n                            <div class="media media--landscape">\n                                <img src="').concat(a,'" data-src="').concat(a,'" alt="" class="lozad" loading="lazy" width="438" height="291" role="presentation">\n                            </div>\n                        </div>\n                        <div class="resource-details">\n                            <h3 class="h5 margin-top-1" id="article_').concat(l,'">').concat(r,"</h3>\n                        </div>\n                    </a>\n                </article>\n            </div>\n        ")},U=function(e,t){t?(e.removeAttribute("disabled"),e.setAttribute("aria-hidden",!1)):(e.setAttribute("disabled",!0),e.setAttribute("aria-hidden",!0)),e.style.opacity=t?1:0,e.style.visibility=t?"visible":"hidden"},V=function(e,t,n,i,o,a){if(!e)throw new Error("Please make sure to provide a valid value for glideInstance, recieved ".concat(e));if(!t)throw new Error("Please make sure to provide a valid value for totalSlides, recieved ".concat(t));if(!n)throw new Error("Please make sure to provide a valid value for leftArrow, recieved ".concat(n));if(!i)throw new Error("Please make sure to provide a valid value for rightArrow, recieved ".concat(i));U(n,0!==e.index);var r=e.index,c=e.settings.perView;U(i,t>1&&r+c<t),e.on(["move","resize"],(function(){var o=e.index,a=e.settings.perView,r=t>1&&o+a<t;U(n,o>0),U(i,r)})),o||a&&a.forEach((function(t){t.addEventListener("click",(function(){if(t.hasAttribute("data-media-id")){var n,i=t.closest("li"),o=Array.from(null===(n=t.closest(".product-thumbnails"))||void 0===n?void 0:n.querySelectorAll(".glide__slide:not(.hide)")).indexOf(i);e.go("="+o)}else e.go("="+t.dataset.glideIndex),e.update({startAt:t.dataset.glideIndex})}))}))},G=n(7671);function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var J=function(e,t,n){var i=document.querySelector(e);
1if(!i)throw new Error("Container not found for cart upsells.");var o=window.metafieldGlobalSettings.cartUpsellModalProductCountLimit?window.metafieldGlobalSettings.cartUpsellModalProductCountLimit:4;if("algolia"!=t&&n)fetch(window.Shopify.routes.root+"recommendations/products?product_id=".concat(n,"&limit=").concat(o,"&section_id=section-product-recommendations&intent=related")).then((function(e){return e.text()})).then((function(t){var n=document.createElement("div");n.innerHTML=t;var o=n.querySelector(".product-recommendations");o&&o.innerHTML.trim().length&&(i.innerHTML=o.innerHTML,K(e))}));else{if(i.querySelector(".glide")){var a=new CustomEvent("cartDrawerOpened");return document.dispatchEvent(a),void window.updateSlider["".concat(c(e))].update()}var r=i.querySelector("ol.ais-Hits-list");if(!r)throw new Error("List container not found for cart upsells.");var s=window.metafieldGlobalSettings,l=s.algoliaAppId,d=s.algoliaApiKey;if(!l||!d)return;(0,G.M)(l,d).getRecommendations({requests:[{indexName:"shopify_products",model:"trending-items",threshold:0,maxRecommendations:o}]}).then((function(e){var t=e.results;if(t.length){var n;(n=r.querySelectorAll(".ais-Hits-item:not(.marketing-card)")).length&&n.forEach((function(e){e.remove()}));var o=document.getElementById("product-handle-change-metaobject"),a=o?JSON.parse(o.dataset.metaobjects):null,c=t[0].hits;c.sort((function(e,t){return t.inventory_available&&!e.inventory_available?1:-1})).forEach((function(e){var t=document.createElement("li");t.classList.add("ais-Hits-item"),t.innerHTML=R(e,a,e.handle),r.appendChild(t)})),window.natureMade.getDiscontinuedVariantIds(c,i)}})).catch((function(e){console.log(e)})).finally((function(){K(e)}))}},K=function(e){var t,n=document.querySelector(e).querySelector("div");if(n){n.classList.add("glide");var i=n.querySelector(".cart-notification-upsells .ais-Hits");if(i){i.setAttribute("data-glide-el","track"),i.classList.add("glide__track");var o=n.querySelector(".ais-Hits-list");if(o){o.classList.add("glide__slides");var a=o.querySelectorAll(".ais-Hits-item");if(a&&a.length){a.forEach((function(e){return e.classList.add("glide__slide")}));var r=document.createElement("div");r.classList.add("glide__arrows","small-hide"),r.setAttribute("data-glide-el","controls"),r.innerHTML='<button class="glide__arrow glide__arrow--left" data-glide-dir="<">\n          <span class="show-for-sr">Previous Slide</span>\n          <svg aria-hidden="true" role="presentation" focusable="false" width="6" height="9" viewBox="0 0 6 9" xmlns="http://www.w3.org/2000/svg">\n            <title>Previous</title>\n            <polygon transform="rotate(90 276.75 57)" points="224.25 328 220 332.194955 220.814647 333 224.25 329.609141 227.685353 333 228.5 332.194955" fill="#343438" fill-rule="evenodd"></polygon>\n          </svg>\n      </button>\n      <button class="glide__arrow glide__arrow--right" data-glide-dir=">">\n          <span class="show-for-sr">Next Slide</span>\n          <svg aria-hidden="true" role="presentation" focusable="false" width="6" height="9" viewBox="0 0 6 9" xmlns="http://www.w3.org/2000/svg">\n            <title>Next</title>\n            <polygon transform="rotate(90 276.75 57)" points="224.25 328 220 332.194955 220.814647 333 224.25 329.609141 227.685353 333 228.5 332.194955" fill="#343438" fill-rule="evenodd"></polygon>\n          </svg>\n      </button>',n.appendChild(r);var l="",d=a.length-1;if(d>2){(t=Array(d),function(e){if(Array.isArray(e))return W(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach((function(e,t){return l+='<button class="slider__bullet glide__bullet" data-glide-dir="='.concat(t,'" aria-label="slide ').concat(t+1," of ").concat(d,'"button>')}));var u=document.createElement("div");u.classList.add("slider-bullets-container","glide-bullets-v2","medium-hide","large-up-hide","carousel-bullets","margin-bottom-2"),u.innerHTML='\n        <div class="slider__bullets glide__bullets" data-glide-el="
1controls[nav]">\n          '.concat(l,"\n        </div>\n      "),n.appendChild(u)}var f=new s.A(e+" .glide",{type:"slider",perView:2,gap:0,rewind:!0,bound:!0}).mount();f.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(f);var e=f._c.Html._r.closest("cart-notification");e&&e.getLastFocusableElements()})),window.updateSlider||(window.updateSlider={}),window.updateSlider["".concat(c(e))]=f,document.addEventListener("cartDrawerOpened",(function(){f.go("<<")}));var m=n.querySelector(".glide__arrow--left"),v=n.querySelector(".glide__arrow--right"),p=n.querySelectorAll(".glide__slide").length;V(f,p,m,v)}}}}};function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){Q(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=$(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=$(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){return ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(e)}function te(e){return function(e){if(Array.isArray(e))return ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ne(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var ie={parent:document.getElementById("refinement-list"),relatedResources:document.querySelector("[data-algolia-related-resources]"),temporaryHitsContainer:document.querySelector("[data-articles-temp-container]"),combinedHitsContainer:document.querySelector("[data-articles-combined]"),overrideQuery:document.querySelector("[data-override-query]"),fallbackTags:document.querySelector("[data-fallback-tags]"),articleCategories:document.querySelector("[data-article-categories]"),filters:'blog.title:"Health Articles"',searchClient:B,hitLimit:3},oe=function(e){if(e){var t=e.querySelector(".ais-Hits");if(t){var n=t.parentElement;if(n){n.classList.add("glide");var i=n.querySelector(".ais-Hits");if(i){i.setAttribute("data-glide-el","track"),i.classList.add("glide__track");var o=n.querySelector(".ais-Hits-list");if(o){o.classList.add("glide__slides");var a=o.querySelectorAll(".ais-Hits-item");if(a&&a.length){a.forEach((function(e){return e.classList.add("glide__slide")}));var r=document.createElement("div");r.classList.add("glide__arrows"),r.setAttribute("data-glide-el","controls"),r.innerHTML='<button class="glide__arrow glide__arrow--left" data-glide-dir="<" disabled aria-hidden="true" style="opacity:0; visibility:hidden;">
1\n          <span class="show-for-sr">Previous</span>\n          <svg width="6" height="9" viewBox="0 0 6 9" xmlns="http://www.w3.org/2000/svg">\n            <title>Previous</title>\n            <polygon transform="rotate(90 276.75 57)" points="224.25 328 220 332.194955 220.814647 333 224.25 329.609141 227.685353 333 228.5 332.194955" fill="#343438" fill-rule="evenodd"></polygon>\n          </svg>\n      </button>\n      <button class="glide__arrow glide__arrow--right" data-glide-dir=">">\n          <span class="show-for-sr">Next</span>\n          <svg width="6" height="9" viewBox="0 0 6 9" xmlns="http://www.w3.org/2000/svg">\n            <title>Next</title>\n            <polygon transform="rotate(90 276.75 57)" points="224.25 328 220 332.194955 220.814647 333 224.25 329.609141 227.685353 333 228.5 332.194955" fill="#343438" fill-rule="evenodd"></polygon>\n          </svg>\n      </button>',n.querySelector(".glide__arrows")&&n.querySelector(".glide__arrows").remove(),n.appendChild(r);var c="",l="",d=a.length-1;d>0&&te(Array(d)).forEach((function(e,t){return c+='<button class="slider__bullet glide__bullet" data-glide-dir="='.concat(t,'"></button>')})),te(Array(a.length)).forEach((function(e,t){return l+='<button class="slider__bullet glide__bullet" data-glide-dir="='.concat(t,'"></button>')}));var u=document.createElement("div");u.className="slider-bullets-container",u.innerHTML='\n    <div class="articles-slider__bullets-scrollbar slider__bullets slider__bullets-tablet glide__bullets slider__bullets-scrollbar" data-glide-el="controls[nav]">\n      '.concat(c,"\n    </div>\n  "),n.querySelector(".slider-bullets-container")&&n.querySelector(".slider-bullets-container").remove(),n.appendChild(u);var f=new s.A(n,{type:"slider",perView:3,gap:16,breakpoints:{1200:{perView:3},769:{perView:2,gap:5},630:{perView:1.2,gap:15},99999:{perView:3}},rewind:!1,bound:!0}).mount(),m=n.querySelector(".glide__arrow--left"),v=n.querySelector(".glide__arrow--right"),p=n.querySelectorAll(".glide__slide").length;V(f,p,m,v),f.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(f)})),window.addEventListener("resize",window.debounce((function(e){0!=f.index&&f.go("=0"),ae(f)}),100))}}}}}}},ae=function(e){e&&(window.innerWidth>=1199?e.disable():e.enable())},re=function(){var e=document.querySelector(".article-slider-section");if(e){var t=!1,n=function(){if(C(e)&&null!=ee(ie.relatedResource)&&null!=ie.relatedResources){var n=JSON.parse(ie.relatedResources.dataset.algoliaRelatedResources),o=ie.overrideQuery.dataset.overrideQuery,a=!0;o||(a=!1,n.title&&(o=n.title.split(" ").map((function(e){return t={ves:"fe",ies:"y",zes:"ze",ses:"s",es:"e",s:""},e.replace(new RegExp("(".concat(Object.keys(t).join("|"),")$")),(function(e){return t[e]}));var t})).join(" "))),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=document.querySelector(".product-section"),a=document.querySelector(".article-hero"),r=document.getElementById("product-collection-list"),c=document.getElementById("wellblends-collection-list"),s=o||r||c?["tags:-excludeproducts","meta.accentuate.exclude_blog_from_other_pages:-true"]:"",l="";n&&e.id&&(l=" AND NOT objectID:".concat(e.id));var d="";if(a){var u=a.dataset.id;d=u?" AND NOT objectID:".concat(u):""}var f=document.body.className.match(/\b(\w*page-type\w*)\b/);Array.isArray(f)&&(f=f[0].replace("page-type__",""));var m=[];if(ie.articleCategories){var v=JSON.parse(ie.articleCategories.dataset.articleCategories);v.length>0&&(t=v[0],m=v.slice(1,49))}else if(ie.fallbackTags){var p=JSON.parse(ie.fallbackTags.dataset.fallbackTags),h=["tablet","Nature Made®","New","New Look","tags-merged-via-api","2-pack-subscription","featured-flag-best-seller","featured-flag-new","wellblends-flag-new-look"];m=Array.isArray(p)?p.filter((function(e){return!h.includes(e)})).slice(0,49):[],t=t.replace(/(^[0-9]+[ ,\t,\r,\n]+)|([ ,\t,\r,\n]+[0-9]+[ ,\t,\r,\n]+)/g," ").replace("  "," ")}var g=[];m.forEach((function(e){var t={indexName:"shopify_articles",query:e,params:{hitsPerPage:2*ie.hitLimit,filters:ie.filters+l+d,clickAnalytics:!0,facetFilters:s},ruleContexts:["related_resources",f]};g.push(t)}));var y={indexName:"shopify_articles",query:t,params:{hitsPerPage:2*ie.hitLimit,filters:ie.filters+l+d,clickAnalytics:!0,facetFilters:s},ruleContexts:["related_resources",f]};1==i?g.unshift(y):g.push(y);var w=[];ie.searchClient.search(g,{strategy:"stopIfEnoughMatches"}).then((function(e){var t=e.results,n=0,i=[];t.forEach((function(e){!function(e){var t=[];if(e.forEach((function(e){t.push("gid://shopify/Article/".concat(e.objectID))})),0!=t.length){var n="\n            {nodes(ids: ".concat(JSON.stringify(t),"){\n                ... on Article {\n                    id\n                    title\n                    contentHtml\n                }\n            }\n        }");fetch("/api/2023-04/graphql.json",{method:"POST",headers:{"X-Shopify-Storefront-Access-Token":window.metafieldGlobalSettings.storefrontAccessToken,"Content-Type":"application/graphql"},body:n}).then((function(e){return e.json()}
1)).then((function(e){e.data&&e.data.nodes.forEach((function(e){var t=e.id.split("/"),n=t[t.length-1],i=document.querySelector('[data-objectid="'.concat(n,'"] .read-time-wrapper'));if(i){var o=Math.floor(e.contentHtml.replace(/(<([^>]+)>)/gi,"").trim().split(" ").length/240),a="".concat(0==o?1:o," MIN");i.textContent=a,-1===w.findIndex((function(e){return e.id===n}))&&w.push({id:n,readingTime:a})}}))})).catch((function(e){console.error(e)}))}}(e.hits),e.hits.forEach((function(e){n<ie.hitLimit&&!i.includes(e.objectID)&&(i.push(e.objectID),ie.temporaryHitsContainer.innerHTML+="<li class='ais-Hits-item'>"+z(e,"simple",w)+"</li>",n++)}))})),ie.relatedResources.querySelector(".ais-Hits-list").innerHTML=ie.temporaryHitsContainer.innerHTML,ie.relatedResources.querySelector(".has-card-placeholders")&&ie.relatedResources.querySelector(".has-card-placeholders").classList.remove("has-card-placeholders");var o=document.querySelector(".related-resources_intro");if(o){var a=o.parentElement;a.querySelector(".related-resources-slider")&&oe(a)}}))}(n,o||"",!0,a),t&&document.removeEventListener("scroll",i)}},i=window.debounce(n,100);if(C(e)?n():(document.addEventListener("scroll",i),t=!0),!ie.relatedResources){var o=e.parentElement;o.querySelector(".related-resources-slider")&&oe(o)}}};var ce=n(5012),se=n(8688),le=n(7810),de=n(7303),ue=n(14),fe=n(1262),me=n(3157),ve=n(560),pe
1=n(633);function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function ge(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,ye(i.key),i)}}function ye(e){var t=function(e,t){if("object"!=he(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=he(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==he(t)?t:t+""}function we(e){var t="function"==typeof Map?new Map:void 0;return we=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(be())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var o=new(e.bind.apply(e,i));return n&&Se(o,n.prototype),o}(e,arguments,_e(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Se(n,e)},we(e)}function be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(be=function(){return!!e})()}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}function _e(e){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_e(e)}const Ee=function(){if(!customElements.get("filter-drawer-component")){var e=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,n){return t=_e(t),function(e,t){if(t&&("object"==he(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,be()?Reflect.construct(t,n||[],_e(e).constructor):t.apply(e,n))}(this,t)).onCloseHandler=e.close.bind(e),e.onKeyPressHandler=e.keyPress.bind(e),e.onFocusInHandler=e.focusIn.bind(e),e.mainCloseButton=e.querySelector(".close-filters[data-close-filters-wrapper]"),e.showResultsButton=e.querySelector(".button-primary[data-close-filters-wrapper]"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Se(e,t)}(t,e),n=t,i=[{key:"connectedCallback",value:function(){var e=this;this.querySelectorAll("[data-close-filters-wrapper]").forEach((function(t){t.addEventListener("click",e.onCloseHandler)})),this.addEventListener("keydown",this.onKeyPressHandler)}},{key:"focusIn",value:function(){this.contains(document.activeElement)?this.lastFocusElement=document.activeElement:this.lastFocusElement==this.showResultsButton?this.mainCloseButton.focus():this.showResultsButton.focus()}},{key:"open",value:function(){this.classList.remove("is-hidden"),document.body.classList.add("filter-open"),this.opener=document.activeElement,document.addEventListener("focusin",this.onFocusInHandler),this.mainCloseButton?this.mainCloseButton.focus():this.querySelectorAll("a, button, input")[0].focus()}},{key:"close",value:function(e){e.preventDefault(),this.classList.add("is-hidden"),document.body.classList.remove("filter-open"),document.removeEventListener("focusin",this.onFocusInHandler),this.opener&&this.opener.focus()}},{key:"keyPress",value:function(e){switch(e.keyCode){case 9:e.shiftKey&&document.activeElement==this.mainCloseButton?(e.preventDefault(),this.showResultsButton.focus()):e.shiftKey||document.activeElement!=this.showResultsButton||(e.preventDefault(),this.mainCloseButton.focus());break;case 13:e.stopPropagation();break;case 27:this.close()}}}
1],i&&ge(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(we(HTMLElement));customElements.define("filter-drawer-component",e)}};function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}var ke=["page"],Ae=["page"];function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){Ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ie(e,t,n){return(t=xe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=Le(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}function Me(e,t){if(null==e)return{};var n,i,o=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Oe=function(){var e=function(){var e="",t=document.querySelector("[data-blog-props]");if(t){var n,i=JSON.parse(t.dataset.blogProps),o=(null===(n=document.querySelector("#search-articles-list"))||void 0===n?void 0:n.getAttribute("search-also-include-blogs"))||"",a="";""!=o&&o.split("|").forEach((function(e){a+="OR blog.objectID:"+e})),e='blog.title:"'.concat(i.title,'" ').concat(a)}return{hitsPerPage:9,filters:e,clickAnalytics:!0}},t=window.articles_filter.filter_categories,n={parent:document.getElementById("article-filters"),filters:t,instantsearch_options:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"shopify_articles";return{insightsClient:window.aa,indexName:e,searchClient:j,routing:{router:(0,fe.A)({createURL:function(t){var n=t.qsModule,i=t.location,o=t.routeState,a=i.origin,r=i.pathname,c=i.hash,s=o[e]||{},l=n.stringify(o);return s.refinementList?"".concat(a).concat(r,"?").concat(l).concat(c):"".concat(a).concat(r).concat(c)}}),stateMapping:{stateToRoute:function(t){var n=t[e];if(n&&n.refinementList&&n.page){var i=t[e],o=(i.page,Me(i,ke));return Te(Te({},Me(t,[e].map(xe))),{},Ie({},e,Te({},o)))}return t},routeToState:function(t){var n=t[e];if(n&&n.refinementList&&n.page){var i=t[e],o=(i.page,Me(i,Ae));return Te(Te({},Me(t,[e].map(xe))),{},Ie({},e,Te({},o)))}return t}}}}}},i=[{type:"articles",indexName:"shopify_articles",card:z,sort_options:[{label:"Date (desc)",value:"shopify_articles"},{label:"Date (asc)",value:"shopify_articles_date_asc"},{label:"A-Z",value:"shopify_articles_title_asc"},{label:"Z-A",value:"shopify_articles_title_desc"}],filters:{}}],o={close_filters:function(){var e=document.querySelector("filter-drawer-component");e&&e.close()},clear_filters:function(){var e=document.querySelector(".ais-SearchBox-input"),t=document.querySelector(".ais-SearchBox-reset");t&&e&&(t.click(),e.blur()),o.removeUrlTagFilters()},set_checked_filter_count:function(){var e=document.querySelectorAll("[data-filter-count]"),t=document.querySelector(".ais-SearchBox-input"),n=document.getElementById("refinement-list").querySelectorAll('[type="checkbox"]:checked').length;t&&""!=t.value&&(n+=1),e.forEach((function(e){e.closest(".products-list-filters-title")||e.closest(".product-list-filter-actions")?e.innerHTML=n>0?"(".concat(n,")"):"":e.innerHTML=n>0?'<span class="filter-count">'.concat(n,"</span>"):""}))},handleArtificialFilter:function(e){e.preventDefault();var t=e.currentTarget.dataset.value,n=document.querySelector('.articles-list-filters [data-filter-value="'.concat(t,'"]'));n?n.click():window.location.replace(document.location.origin+"/search?q=".concat(t,"&tab=3")),o.close_filters()},handleize:function(e){e=e.toLowerCase();for(var t=['"',"'","\\","(",")","[","]","."],n=0;n<t.length;++n)e=e.replace(t[n],"");return"-"==(e=e.replace(/\./g,"").replace(/\W+/g,"-")).charAt(e.length-1)&&(e=e.replace(/-+\z/,"")),"-"==e.charAt(0)&&(e=e.replace(/\A-+/,"")),e},expandFilterGroup:function(e){var t=e.closest(".filter-item-group");e.addEventListener("click",(function(){t.classList.contains("hide-facet")?t.classList.remove("hide-facet"):t.classList.add("hide-facet")}))},removeUrlTagFilters:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=new URLSearchParams(window.location.search);t.has("tag")&&(e?t.delete("tag",e):t.delete("tag"),window.history.pushState("",document.title,"".concat(window.location.pathname).concat(t.size>0?"?":"").concat(t.toString())))}},a=function(e){var t=e.value,n=e.isRefined,i=e.label;if("excludeproducts"!=i.toLowerCase())return'\n        <li>\n          <input id="'.concat(o.handleize(t),'" type="checkbox" value="').concat(t,'" data-refine-value="').concat(t,'" data-filter-value="').concat(i,'" ').concat(n?"checked":"",' />
1\n          <label for="').concat(o.handleize(t),'">\n            ').concat(i,"\n          </label>\n        </li>\n      ")},r=[],c=(0,pe.A)((function(e,t){var n,i=e.hits,o=e.results,a=e.widgetParams,r=e.showMore,c=e.isLastPage,s=document.querySelector(a.container),l=s.querySelector(".ais-InfiniteHits-list"),d=s.querySelector(".ais-InfiniteHits-loadMore"),u=s.querySelector(".no-results-container");if(t){var f=d.cloneNode(!0);f.addEventListener("click",(function(){r()})),d.replaceWith(f)}c?(d.classList.add("hidden"),s.setAttribute("data-last-page-visible","")):(d.classList.remove("hidden"),s.removeAttribute("data-last-page-visible")),o&&(n=o.query,l.innerHTML="",i.forEach((function(e){var t=z(e,"date"),n=document.createElement("li");n.innerHTML=t,n.classList.add("ais-InfiniteHits-item"),l.appendChild(n)})),u&&(i.length?u.classList.add("hide"):(u.classList.remove("hide"),u.innerHTML='Sorry we could not find any results for "'.concat(n,'"'))))})),s=(0,ue.A)((function(e,t){var n,i=e.options,o=e.currentRefinement,a=e.refine,r=e.widgetParams,c=e.hasNoResults;t&&r.container.appendChild(((n=document.createElement("ul")).classList.add("list","sort-options-list","list-unstyled"),n));var s=document.querySelector("[data-active-sort]");s&&i.forEach((function(e){e.value!=o||(s.textContent=e.label)}));var l=r.container.querySelector(".sort-options-list");l&&(l.innerHTML="\n                ".concat(i.map((function(e){return'\n                    <li>\n                    <input type="radio" name="product-sort" id="sort-by-'.concat(e.value,'" value="').concat(e.value,'"\n                        ').concat(e.value===o?"checked":""," ").concat(c?"disabled":"",'\n                    />\n                        <label for="sort-by-').concat(e.value,'">').concat(e.label,"</label>\n                    </li>\n                    ")})).join(""),"\n            "),l.querySelectorAll('input[type="radio"').forEach((function(e){e.addEventListener("change",(function(e){window.lastFocusedRefinementOption="#".concat(e.target.id),e.target.checked&&a(e.target.value)}))})))}));i.forEach((function(t,i){var l,d=(0,me.default)(n.instantsearch_options());n.filters.length&&n.filters.forEach((function(e,i){if(e.type.includes(t.type)){var r=document.createElement("div");r.setAttribute("data-filter-attribute","".concat(o.handleize(e.label))),r.className="filter-item-group refinement-list_".concat(o.handleize(e.attribute)," hide-facet"),r.innerHTML='\n                <div class="loading-overlay gradient"></div>\n                <div class="refinement-list-title">\n                  <span class="refinement-title-text">'.concat(e.label,'</span>\n                  <div>\n                    <button id="all-').concat(e.label.toLowerCase().replace(" ","-"),'" type="button" class="text-link" data-select-all>\n                      <span class="sel-all">Select All</span>\n                      <span class="clear-all">Clear All</span>\n                    </button>\n                    <button type="button" data-expand-filter>\n                        <svg class="icon-caret" width="12" height="8" viewBox="0 0 12 8" fill="none" aria-hidden="true" focusable="false" role="presentation">\n                            <use href="#icon-caret">\n                        </svg>\n                    </button>\n                  </div>\n                </div>\n              '),n.parent.appendChild(r);var c=(0,ve.A)(function(e){return e.label,function(e,t){var n=e.items,i=e.refine,r=e.widgetParams;if(t){var c=document.createElement("div");c.classList.add("facets__display-vertical"),c.innerHTML='\n              <ul class="filter-items-wrapper" role="list"></ul>\n            ',r.container.appendChild(c)}var s=n.map(a).join("");r.container.querySelector("ul").innerHTML=s;var l,d=(new DOMParser).parseFromString(s,"text/html"),u=d.querySelectorAll('[type="checkbox"]').length,f=d.querySelectorAll('[type="checkbox"]:checked').length;f>0?(r.container.classList.add("active-facet"),u==f&&r.container.classList.add("all-checked")):(r.container.classList.remove("active-facet"),r.container.classList.remove("all-checked")),o.set_checked_filter_count(n.filter((function(e){return e.isRefined}))),(l=r.container.querySelectorAll("input[data-refine-value]"),function(e){if(Array.isArray(e))return Ce(e)}(l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(l)||function(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
1()).forEach((function(e){e.addEventListener("change",(function(t){t.stopPropagation(),t.preventDefault(),e.classList.contains("tag-filter")||o.removeUrlTagFilters(e.dataset.filterValue),e.classList.remove("tag-filter"),i(e.dataset.refineValue),window.lastFocusedRefinementOption="#".concat(t.target.id)}))}))}}(e));d.addWidgets([c({container:r,attribute:e.attribute,label:e.label,distinct:!0,showMore:!1,limit:1e4,sortBy:["name:asc"]})])}})),d.addWidgets([(0,ce.A)(e()),s({container:document.getElementById("sort-by-".concat(t.type)),items:t.sort_options}),c({container:"#search-".concat(t.type,"-list")}),(0,se.A)({container:"#article-searchbox",showLoadingIndicator:!1,queryHook:function(e,t){clearTimeout(l),""!=e?l=setTimeout((function(){return t(e)}),500):t(e)}}),(0,le.A)({container:"[data-product-count]",templates:{text:function(e){var t=document.getElementById("refinement-list").querySelectorAll('[type="checkbox"]:checked').length,n=document.getElementById("Search-In-article");return t>0||n&&""!=n.value?"&nbsp;(".concat(e.nbHits,")"):""}}}),(0,de.A)({container:"#clear-all-filters",templates:{resetLabel:function(){return"\n                  <span>Clear All</span>\n                  <span data-filter-count></span>\n                "}}
1,cssClasses:{root:"clear-filters",button:"text-link"}})]),d.start(),d.on("render",function(){if(r[t]||r.push(t),Array.from(document.querySelectorAll(".reset-and-filter-tags")).forEach((function(e){e.addEventListener("click",o.handleArtificialFilter)})),"loading"==d.status)document.querySelectorAll(".filter-item-group").forEach((function(e){e.classList.add("loading"),e.setAttribute("inert","")}));else if("idle"==d.status){var e;document.querySelectorAll(".filter-item-group").forEach((function(e){e.classList.remove("loading"),e.removeAttribute("inert")})),window.lastFocusedRefinementOption&&(null===(e=document.querySelector(window.lastFocusedRefinementOption))||void 0===e||e.focus(),window.lastFocusedRefinementOption="")}}.bind(d))}));var l=setInterval((function(){r.length<i.length||(clearInterval(l),function(){document.querySelectorAll("[data-open-articles-filters]").forEach((function(e){e.addEventListener("click",(function(e){var t=document.querySelector("filter-drawer-component");if(t&&(t.open(),e.currentTarget.classList.contains("search-articles-btn"))){var n=document.querySelector(".ais-SearchBox-input");if(!n)return;n.focus()}}))}));var e=document.querySelector("[data-clear-filters]");e&&(e.addEventListener("click",o.clear_filters),window.natureMade.waitForElm(".ais-ClearRefinements-button").then((function(){e.querySelector(".ais-ClearRefinements-button").disabled=!1})));var t=new URL(window.location.href);if(t.searchParams.has("tag")){var n=document.querySelector("#articles-list-wrapper");n.style.paddingTop="16rem",n.classList.add("remove-margin-top"),n.scrollIntoView(!0);var i=decodeURIComponent(t.searchParams.get("tag"));if(document.querySelector("#search-articles-list")){var a=document.querySelector('.articles-list-filters [data-filter-value="'+i+'"]');null!==i&&a?(a.classList.add("tag-filter"),a.click()):window.location.replace(document.location.origin+"/search?q="+i+"&tab=3")}}document.querySelectorAll(".refinement-list-title .refinement-title-text").forEach((function(e){o.expandFilterGroup(e)})),document.querySelectorAll(".refinement-list-title [data-expand-filter]").forEach((function(e){o.expandFilterGroup(e)})),document.querySelectorAll("[data-select-all]").forEach((function(e){e.addEventListener("click",(function(e){var t=e.target.closest(".filter-item-group"),n=t.querySelectorAll('[type="checkbox"]');t.classList.contains("all-checked")?n.forEach((function(e,t){e.checked&&e.click()})):n.forEach((function(e,t){e.checked||e.click()})),window.lastFocusedRefinementOption="#".concat(e.target.id)}))}));var r=document.querySelector(".ais-SearchBox-form");if(r){r.classList.add("field");var c=document.createElement("label");c.className="field__label",c.setAttribute("for","Search-In-article"),c.textContent="Search articles",r.appendChild(c);var s=r.querySelector(".ais-SearchBox-input");s.id="Search-In-article",s.setAttribute("placeholder","Search"),s.classList.add("search__input","field__input","aa-input"),s.setAttribute("aria-label","Search Articles");var l=r.querySelector(".ais-SearchBox-reset");l&&(l.innerHTML='\n                    <svg class="icon icon-close">\n                        <use href="#icon-close"></use>\n                    </svg>\n                    ');var d=r.querySelector(".ais-SearchBox-submit");d&&(d.setAttribute("tabindex","-1"),d.setAttribute("aria-hidden","true"))}}())}),2e3),d=document.querySelector(".sticky-filter-button"),u=document.querySelector(".header-wrapper"),f=function(e,t){var n=screen.width<=989?8:12;e.style.top="".concat(t.offsetHeight-n,"px")};d&&u&&(f(d,u),window.addEventListener("resize",window.debounce((function(){f(d,u)}),50)))};var Pe=function(e){if(e&&!e.querySelectorAll(".ais-InfiniteHits-list.recommended-product-list li:not(.placeholder)").length){var t=window.metafieldGlobalSettings,n=t.algoliaAppId,i=t.algoliaApiKey;if(n&&i){var o=(0,G.M)(n,i),a=(t.favoriteRecommendationHeading,function(){var t=e.querySelector(".ais-InfiniteHits-list.recommended-product-list[data-favorites]");if(!t||!t.dataset.favorites)return"";var n=t.dataset.favorites.split(",").map((function(e){return e.trim()}
1)).filter(Boolean);return n.length>0?n.map((function(e){return"NOT objectID:'".concat(e,"'")})).join(" AND "):""}());o.getRecommendations({requests:[{indexName:"shopify_products",model:"trending-items",threshold:0,maxRecommendations:4,queryParameters:{filters:a}}]}).then((function(t){var n=t.results;if(n.length){var i=document.getElementById("product-handle-change-metaobject"),o=i?JSON.parse(i.dataset.metaobjects):null,a=n[0].hits,r="";a.forEach((function(e){var t='\n                    <li class="ais-InfiniteHits-item glide__slide">\n                    '.concat(R(e,o,e.handle),"\n                    </li>\n                ");r+=t}));var c=e.querySelector(".ais-InfiniteHits-list.recommended-product-list");c&&(c.innerHTML="".concat(r),c.classList.add("product-cards-loaded"),window.natureMade&&"function"==typeof window.natureMade.getDiscontinuedVariantIds&&window.natureMade.getDiscontinuedVariantIds(a,c))}})).catch((function(e){console.log(e)})).finally((function(){Ne(e)}))}}},Ne=function(e){var t,n=e.dataset.trending,i=null===(t=e.querySelector(".glide"))||void 0===t?void 0:t.id;if(i){window.updateSlider||(window.updateSlider={});var o=e.querySelector(".glide__bullets");o&&window.natureMade.generateSliderBullets(o,e.querySelectorAll(".ais-InfiniteHits-list li").length);var a,r=function(t){!t&&window.updateSlider[i]||(!t.glideIsInitialized&&window.innerWidth<=1068?(c(),t.glideIsInitialized=!0):t.glideIsInitialized&&window.innerWidth>1068&&(window.natureMade.toggleGlideItemsAriaAttributes(t),t.destroy(),t.glideIsInitialized=!1,e.querySelectorAll(".glide__arrow").forEach((function(e){e.style.visibility="hidden",e.style.opacity="0"}))))},c=function(){(a=new s.A('[data-trending="'.concat(n,'"] .glide'),{type:"slider",perView:4,gap:0,rewind:!0,bound:!0,breakpoints:{1068:{perView:3},868:{perView:2}}}).mount()).glideIsInitialized=!0,window.updateSlider[i]=a,r(a);var t=e.querySelector(".glide__arrow--left"),o=e.querySelector(".glide__arrow--right"),c=e.querySelectorAll(".glide__slide").length;V(a,c,t,o),a.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(a)}))};c(),window.natureMade.toggleSliderBullets(window.updateSlider[i]),window.addEventListener("resize",window.debounce((function(){0!=a.index&&a.go("=0"),r(a),window.natureMade.toggleSliderBullets(window.updateSlider[i])}),300))}};function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var He=function(e){var t=window.location.search,n=new URLSearchParams(t);if(!e){var i,o={},a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return De(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(c)throw a}}}}(n.entries());try{for(a.s();!(i=a.n()).done;){var r=i.value;o[r[0]]=r[1]}}catch(e){a.e(e)}finally{a.f()}return o}return n.get(e)},Be=function(e){if(e){var t=window.location.search;return new URLSearchParams(t).has(e)}};function je(e){return je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},je(e)}function Fe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Re(i.key),i)}}function Re(e){var t=function(e,t){if("object"!=je(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=je(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==je(t)?t:t+""}function ze(e,t){if(t&&("object"==je(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){var t="function"==typeof Map?new Map:void 0;return Ue=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Ve())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var o=new(e.bind.apply(e,i));return n&&Ge(o,n.prototype),o}(e,arguments,We(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ge(n,e)},Ue(e)}function Ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ve=function(){return!!e})()}function Ge(e,t){return Ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ge(e,t)}function We(e){return We=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},We(e)}function Je(e,t){if(e){if("string"==typeof e)return Ke(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}window.natureMade=window.natureMade||{};var $e={},Xe=[],Ye={CLICK:"click",VIEW:"view",EXPAND:"expand",VISIBLE:"visible",INPUT:"input",SUBMIT:"submit",USER_ACTION:"gTagging_user_action"},Ze=function(){var e;null!==(e=window.natureMade.queued_gtag_events)&&void 0!==e&&e.length&&"function"==typeof window.gtag&&(window.nmGtagDebug&&console.log("[gtag-triggers] Processing queued gtag events"),window.natureMade.queued_gtag_events.forEac
1h((function(e){var t=e.name,n=e.payload;window.gtag("event",t,n),window.nmGtagDebug&&console.log('[gtag-triggers] Sent gtag event for "'.concat(t,'"'),n)})),window.natureMade.queued_gtag_events=[])};var Qe,et,tt,nt,it;n(4692),window.$=i,o.load({google:{families:["Lato:400,700:latin,latin-ext","Montserrat:400,500,700:latin,latin-ext"]},timeout:2e3}),function(){void 0===window.natureMade&&(window.natureMade={}),window.debounce=function(e,t){var n;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,o)}),t)}},window.natureMade.isValidURL=function(e){try{return new URL(e),!0}catch(e){return!1}},window.natureMade.pauseAllMedia=function(){document.querySelectorAll(".js-youtube").forEach((function(e){e.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})),document.querySelectorAll(".js-vimeo").forEach((function(e){e.contentWindow.postMessage('{"method":"pause"}',"*")})),document.querySelectorAll("video").forEach((function(e){return e.pause()})),document.querySelectorAll("product-model").forEach((function(e){e.modelViewerUI&&modelViewerUI.pause()}))};var e={};window.natureMade.trapFocus=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=function(e){return Array.from(e.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}(t),o=i[0],a=i[i.length-1];window.natureMade.removeTrapFocus(),e.focusin=function(n){n.target!==t&&n.target!==a&&n.target!==o||document.addEventListener("keydown",e.keydown)},e.focusout=function(){document.removeEventListener("keydown",e.keydown)},e.keydown=function(e){if("TAB"===e.code.toUpperCase())return e.target!==a||e.shiftKey?void(e.target!==t&&e.target!==o||!e.shiftKey||(e.preventDefault(),a.focus())):(e.preventDefault(),void o.focus())},document.addEventListener("focusout",e.focusout),document.addEventListener("focusin",e.focusin),n.focus()},window.natureMade.removeTrapFocus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;document.removeEventListener("focusin",e.focusin),document.removeEventListener("focusout",e.focusout),document.removeEventListener("keydown",e.keydown),t&&t.focus()},window.natureMade.onKeyUpEscape=function(e){if("ESCAPE"===e.code.toUpperCase()){var t=e.target.closest("details[open]");if(t){var n=t.querySelector("summary");t.removeAttribute("open"),n.focus()}}},window.natureMade.fetchConfig=function(){return{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"json")}}},window.getObjects=function(e,t,n){var i=[];for(var o in e)e.hasOwnProperty(o)&&(o===t?Array.isArray(e[t])?(""===n||e[t].includes(n))&&i.push(e):e[t]!=n&&""!==n||i.push(e):"object"==A(e[o])?i=i.concat(getObjects(e[o],t,n)):e[o]==n&&""==t&&-1==i.lastIndexOf(e)&&i.push(e));return i},window.natureMade.setCookie=function(e,t,n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);var o="expires="+i.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"},window.natureMade.getCookie=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},window.natureMade.waitForElm=a,window.natureMade.scrollToElm=function(e,t){if(e){var n=document.getElementById("nm-header");if(n||t){var i=t||n.offsetHeight,o=e.getBoundingClientRect().top+window.pageYOffset-i;window.scrollTo({top:o,behavior:"smooth"})}}},window.natureMade.getRecentlyViewedIds=function(e){return e.filter((function(e){var t=e.viewed_at,n=new Date(t),i=new Date,o=i.setFullYear(i.getFullYear()-1);if(n.setFullYear(n.getFullYear())>o)return e})).map((function(e){return e.id})).reverse()},window.natureMade.youtube_setup_scripts=function(){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api",document.head.appendChild(e),document.body.classList.add("youtube-lib-loaded")},window.natureMade.linkifyURLs=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var n=t.openInNewTab,i=void 0===n||n,o=t.rel,a=void 0===o?"noopener noreferrer":o,r=/(\b(https?:\/\/|www\.)[^\s<]+[^\s<.,;:!?'")\]])/gi;
1!function e(t){if(t.nodeType===Node.TEXT_NODE){var n=t.textContent;if(r.test(n)){var o=document.createElement("div"),c=n.replace(r,(function(e){var t=e;e.startsWith("www.")&&(t="https://"+e);var n=i?' target="_blank"':"",o=a?' rel="'.concat(a,'"'):"";return'<a href="'.concat(t,'"').concat(n).concat(o,">").concat(e,"</a>")}));o.innerHTML=c;for(var s=document.createDocumentFragment();o.firstChild;)s.appendChild(o.firstChild);t.parentNode.replaceChild(s,t)}}else t.nodeType===Node.ELEMENT_NODE&&"A"!==t.nodeName&&"SCRIPT"!==t.nodeName&&"STYLE"!==t.nodeName&&Array.from(t.childNodes).forEach((function(t){return e(t)}))}(e)}},window.natureMade.addToCustomerCart=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n={products:e},i="".concat(window.metafieldGlobalSettings.nm_shopify_app_proxy,"/persistent-cart"),o=document.getElementById("cffLoadingLoadingCartModalBackground");fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:n})}).then((function(e){return e.json()})).then((function(e){if(t.length){var n=!1,i=[];t.forEach((function(e){var t={id:parseInt(e.variantID),quantity:parseInt(e.count),properties:e.line_item_properties?e.line_item_properties:{}};e.line_item_properties&&e.line_item_properties.hasOwnProperty("_selling_plan_id")&&(t.selling_plan=e.line_item_properties._selling_plan_id),i.push(t)}));var a=-1!==window.location.pathname.indexOf("/tools/recurring/portal/")?"/":window.location.pathname,r={items:i,sections:[{id:"cart-icon-bubble-desktop"},{id:"cart-preview-section"}].map((function(e){return e.id})),sections_url:a};fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}).then((function(e){return e.text()})).then((function(e){var t=JSON.parse(e);t.items&&(n=!0,[{id:"cart-icon-bubble-desktop"},{id:"cart-preview-section"}].forEach((function(e){document.getElementById(e.id).innerHTML=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".shopify-section";return(new DOMParser).parseFromString(e,"text/html").querySelector(t).innerHTML}(t.sections[e.id],e.selector)})))})).finally((function(){null==o||o.remove(),window.natureMade.setCookie("combined_cart","true"),n&&document.dispatchEvent(new CustomEvent("showPersistentModal"))})).catch((function(e){console.error("Error:",e)}))}else{window.natureMade.setCookie("combined_cart","true");var c=document.querySelector("#cart-notification-button");if(!c)return;c.style["pointer-events"]="auto",function(){if(new URLSearchParams(window.location.search).get("cartPreviewState")){var e=document.querySelector("[data-toggle-cart-preview]");e&&e.click()}}()}})).catch((function(e){console.error("Error:",e)})).finally((function(){null==o||o.remove(),window.natureMade.setCookie("combined_cart","true")}))},window.natureMade.updateCustomerCart=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".cart-preview-product-item";if(window.customerData){e=e.reverse();var n=[];e.forEach((function(e){var i={},o=e.handle,a=e.id,r=e.quantity,c=e.properties,s=document.querySelector("".concat(t,'[data-key="').concat(e.key,'"] .bundle-child-array'));s?JSON.parse(s.innerHTML).forEach((function(e){return n.push(e)})):(i.handle=o,i.count=r,i.variantID=a,i.line_item_properties=c,n.push(i))})),window.natureMade.addToCustomerCart(n)}}}(),void 0===window.Shopify&&(window.Shopify={}),Shopify.bind=function(e,t){return function(){return e.apply(t,arguments)}},Shopify.setSelectorByValue=function(e,t){for(var n=0,i=e.options.length;n<i;n++){var o=e.options[n];if(t==o.value||t==o.innerHTML)return e.selectedIndex=n,n}},Shopify.addListener=function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)},Shopify.postLink=function(e,t){var n=(t=t||{}).method||"post",i=t.parameters||{},o=document.createElement("form");for(var a in o.setAttribute("method",n),o.setAttribute("action",e),i){var r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name",a),r.setAttribute("value",i[a]),o.appendChild(r)}document.body.appendChild(o),o.submit(),document.body.removeChild(o)},Shopify.CountryProvinceSelector=function(e,t,n){this.countryEl=
1document.getElementById(e),this.provinceEl=document.getElementById(t),this.provinceContainer=document.getElementById(n.hideElement||t),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var e=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,e),this.countryHandler()},initProvince:function(){var e=this.provinceEl.getAttribute("data-default");e&&this.provinceEl.options.length>0&&Shopify.setSelectorByValue(this.provinceEl,e)},countryHandler:function(e){var t=(o=this.countryEl.options[this.countryEl.selectedIndex]).getAttribute("data-provinces"),n=JSON.parse(t);if(this.clearOptions(this.provinceEl),n&&0==n.length)this.provinceContainer.style.display="none";else{for(var i=0;i<n.length;i++){var o;(o=document.createElement("option")).value=n[i][0],o.innerHTML=n[i][1],this.provinceEl.appendChild(o)}this.provinceContainer.style.display=""}},clearOptions:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},setOptions:function(e,t){var n=0;for(t.length;n<t.length;n++){var i=document.createElement("option");i.value=t[n],i.innerHTML=t[n],e.appendChild(i)}}},function(){var e=function(e){function t(){var e;p(this,t),(e=w(this,t)).mainDetailsToggle=e.querySelector("details");var n=e.querySelectorAll("summary");return e.addAccessibilityAttributes(n),"iPhone"===navigator.platform&&document.documentElement.style.setProperty("--viewport-height","".concat(window.innerHeight,"px")),e.addEventListener("keyup",e.onKeyUp.bind(e)),e.addEventListener("focusout",e.onFocusOut.bind(e)),e.bindEvents(),e}return S(t,e),g(t,[{key:"bindEvents",value:function(){var e=this;this.querySelectorAll("summary").forEach((function(t){return t.addEventListener("click",e.onSummaryClick.bind(e))})),this.querySelectorAll("button").forEach((function(t){return t.addEventListener("click",e.onCloseButtonClick.bind(e))}))}},{key:"addAccessibilityAttributes",value:function(e){e.forEach((function(e){e.setAttribute("role","button"),e.setAttribute("aria-expanded",!1),e.setAttribute("aria-controls",e.nextElementSibling.id)}))}},{key:"onKeyUp",value:function(e){if("ESCAPE"===e.code.toUpperCase()){var t=e.target.closest("details[open]");t&&(t===this.mainDetailsToggle?this.closeMenuDrawer(this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(t))}}},{key:"onSummaryClick",value:function(e){var t=e.currentTarget,n=t.parentNode,i=n.hasAttribute("open");n===this.mainDetailsToggle?(i&&e.preventDefault(),i?this.closeMenuDrawer(t):this.openMenuDrawer(t)):(window.natureMade.trapFocus(t.nextElementSibling,n.querySelector("button")),setTimeout((function(){n.classList.add("menu-opening")})))}},{key:"openMenuDrawer",value:function(e){var t=this;setTimeout((function(){t.mainDetailsToggle.classList.add("menu-opening")})),e.setAttribute("aria-expanded",!0),window.natureMade.trapFocus(this.mainDetailsToggle,e),document.body.classList.add("overflow-hidden-".concat(this.dataset.breakpoint))}},{key:"closeMenuDrawer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];void 0!==e&&(this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.querySelectorAll("details").forEach((function(e){e.removeAttribute("open"),e.classList.remove("menu-opening")})),this.mainDetailsToggle.querySelector("summary").setAttribute("aria-expanded",!1),document.body.classList.remove("overflow-hidden-".concat(this.dataset.breakpoint)),window.natureMade.removeTrapFocus(t),this.closeAnimation(this.mainDetailsToggle))}},{key:"onFocusOut",value:function(e){var t=this;setTimeout((function(){t.mainDetailsToggle.hasAttribute("open")&&!t.mainDetailsToggle.contains(document.activeElement)&&t.closeMenuDrawer()}))}},{key:"onCloseButtonClick",value:function(e){var t=e.currentTarget.closest("details");this.closeSubmenu(t)}},{key:"closeSubmenu",value:function(e){e.classList.remove("menu-opening"),window.natureMade.removeTrapFocus(),this.closeAnimation(e)}},{key:"closeAnimation",value:function(e){var t;window.requestAnimationFrame((function n(i){void 0===t&&(t=i),i-t<400?window.requestAnimationFrame(n):(e.removeAttribute("open"),e.closest("details[open]")&&window.natureMade.trapFocus(e.closest("details[open]"),e.querySelector("summary")))}))}}])}(_(HTMLElement));customElements.define("menu-drawer",e),window.MenuDrawer=e;var t=function(e){function t(){return p(this,t),w(this,t)}return S(t,e),g(t,[{key:"openMenuDrawer",value:function(e){var t=this;this.header=this.header||document.getElementById("shopify-section-header"),this.borderOffset=this.borderOffset||this.closest(".header-wrapper").classList.contains("header-wrapper--border-bottom")?1:0,document.documentElement.style.setProperty("--header-bottom-position","".concat(parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset),"px")),setTimeout((function(){t.mainDetailsToggle.classList.add("menu-opening")})),e.setAttribute("aria-expanded",!0),window.natureMade.trapFocus(this.mainDetailsToggle,e),document.body.classList.add("overflow-hidden-".concat(this.dataset.breakpoint))}}])}(e);customElements.define("header-drawer",t),window.HeaderDrawer=t;var n=function(e){function t(){var e;return p(this,t),(e=w(this,t)).timeOutTimer=null,e.mouseOverNavItemTimeout=null,e.timeOutDelay=200,e.mouseLeavesMainNavTimeout=null,e.mouseLeavesMainNavDelay=window.metafieldGlobalSettings.menu_close_on_mouse_leave_delay||1e3,e}
1return S(t,e),g(t,[{key:"connectedCallback",value:function(){this.parent_items=this.querySelectorAll("[data-nav-parent-item]"),this.child_items=this.querySelectorAll("[data-nav-child-item]"),this.child_items_content=this.querySelectorAll("[data-nav-child-item-content]"),this.parentNavClickHandler=this.parentNavClick.bind(this),this.closeOnOutsideClickHandler=this.closeOnOutsideClick.bind(this),this.mouseOverNavItemHandler=this.mouseOverNavItem.bind(this),this.mouseLeavesNavItemHandler=this.mouseLeavesNavItem.bind(this),this.childNavClickHandler=this.childNavClick.bind(this),this.onKeyUpHandler=this.onKeyUp.bind(this),this.addEventListener("mouseleave",this.mouseLeavesMainNav.bind(this)),this.addEventListener("mouseover",this.mouseOverMainNav.bind(this)),this.addEventListener("keyup",this.onKeyUpHandler),this.initParentHandlers(),this.initChildHandlers()}},{key:"disconnectedCallback",value:function(){this.removeEventListener("keyup",this.onKeyUpHandler)}},{key:"initChildHandlers",value:function(){var e=this;this.child_items&&this.child_items.forEach((function(t){t.addEventListener("click",e.childNavClickHandler)}))}},{key:"closeActiveChildNav",value:function(e){var t=e.querySelector(".main-nav-child-item.is-active");if(t){t.classList.remove("is-active");var n=this.getChildNavContent(t.dataset.navChildItem);n&&(n.classList.remove("is-active"),n.close())}}},{key:"getChildNavContent",value:function(e){return this.querySelector('[data-nav-child-item-content="'.concat(e,'"]'))}},{key:"childNavClick",value:function(e){var t=e.currentTarget,n=t.dataset.navChildItem,i=this.getChildNavContent(n),o=t.closest(".main-nav-dropdown-wrapper");this.closeActiveChildNav(o),t.classList.add("is-active"),i.classList.add("is-active"),i.open(),this.insertMarketingCard(n,"primary")}},{key:"mouseOverMainNav",value:function(){this.mouseLeavesMainNavTimeout&&(clearTimeout(this.mouseLeavesMainNavTimeout),this.mouseLeavesMainNavTimeout=null)}},{key:"mouseLeavesMainNav",value:function(){var e=this;this.currentParentNav&&(this.mouseOverNavItemTimeout&&clearTimeout(this.mouseOverNavItemTimeout),this.mouseLeavesMainNavTimeout&&clearTimeout(this.mouseLeavesMainNavTimeout),this.mouseLeavesMainNavTimeout=setTimeout(function(){e.close(),e.mouseLeavesMainNavTimeout=null}.bind(this),this.mouseLeavesMainNavDelay))}},{key:"parentNavClick",value:function(e){if(!this.timeOutTimer)if(this.mouseOverNavItemTimeout&&clearTimeout(this.mouseOverNavItemTimeout),this.currentParentNav){if(e.currentTarget==this.currentParentNav)return void this.close();var t=e.currentTarget,n=this;this.close().then((function(){n.open(t)}))}else this.open(e.currentTarget)}},{key:"initParentHandlers",value:function(){var e=this;this.parent_items&&this.parent_items.forEach((function(t){t.addEventListener("click",e.parentNavClickHandler),t.addEventListener("mouseover",e.mouseOverNavItemHandler),t.addEventListener("mouseleave",e.mouseLeavesNavItemHandler)}))}},{key:"onKeyUp",value:function(e){"ESCAPE"===e.code.toUpperCase()&&this.currentParentNav&&this.close()}},{key:"stopTimer",value:function(){this.timeOutTimer=null,this.dispatchEvent(new CustomEvent("timerStopped"))}},{key:"mouseLeavesNavItem",value:function(){this.mouseOverNavItemTimeout&&clearTimeout(this.mouseOverNavItemTimeout)}},{key:"mouseOverNavItem",value:function(e){var t=this;if(this.currentParentNav&&this.currentParentNav!=e.currentTarget){var n=e.currentTarget;this.mouseOverNavItemTimeout&&clearTimeout(this.mouseOverNavItemTimeout);var i=function(){var e=t;t.close().then((function(){e.open(n)}))};this.timeOutTimer?this.addEventListener("timerStopped",function(){t.mouseLeavesMainNavTimeout||(t.mouseOverNavItemTimeout=setTimeout(i.bind(t),t.timeOutDelay))}.bind(this),{once:!0}):this.mouseOverNavItemTimeout=setTimeout(i.bind(this),this.timeOutDelay)}}},{key:"closeOnOutsideClick",value:function(e){this.contains(e.target)||(this.timeOutTimer?this.addEventListener("timerStopped",this.close.bind(this),{once:!0}):this.close())}},{key:"insertMarketingCard",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(void 0!==window.desktopNavJSCards&&window.desktopNavJSCards.hasOwnProperty(e)){t||(t=e);var n=document.querySelector("#placeholder-mc-"+t);null!==n&&(n.innerHTML=window.desktopNavJSCards[e])}}},{key:"startOpeningAnimation",value:function(){var e=this;if(this.currentParentNav)return new Promise(function(t){e.timeOutTimer=setTimeout(function(){e.currentParentNav.classList.add("is-animating"),t(!0)}.bind(e),10)}.bind(this))}},{key:"openTargetNav",value:function(){var e=this;this.timeOutTimer=setTimeout(function(){e.currentParentNav.classList.remove("is-animating"),e.currentParentNav.classList.add("is-done-animating"),e.currentParentNav.setAttribute("aria-expanded",!0),e.stopTimer(),document.addEventListener("click",e.closeOnOutsideClickHandler)}.bind(this),this.timeOutDelay)}},{key:"open",value:function(e){this.currentParentNav=e;var t=c(this.currentParentNav.innerText);this.insertMarketingCard(t),this.currentParentNav.classList.add("is-active"),this.startOpeningAnimation().then(this.openTargetNav.bind(this))}},{key:"startClosingAnimation",value:function(){var e=this;if(this.currentParentNav)return new Promise(function(t){e.timeOutTimer=setTimeout(function(){e.currentParentNav.classList.remove("is-done-animating"),e.currentParentNav.classList.add("is-animating-out"),t(!0)}.bind(e),10)}.bind(this))}},{key:"closeActiveNav",value:function(){var e=this;return new Promise(function(t){e.timeOutTimer=setTimeout(function(){e.currentParentNav.classList.remove("is-active"),e.currentParentNav.classList.remove("is-animating-out"),e.currentParentNav.setAttribute("aria-expanded",!1),e.currentParentNav=null,e.stopTimer(),document.removeEventListener("click",e.closeOnOutsideClickHandler),t(!0)}.bind(e),e.timeOutDelay)}.bind(this))}},{key:"close",value:function(){var e=this;return new Promise(function(t){e.currentParentNav||t(!0),e.startClosingAnimation().then(e.closeActiveNav.bind(e)).then((function(){t(!0)}))}.bind(this))}}])}(_(HTMLElement));customElements.define("desktop-navigation-menu",n);var i=function(e){function t(){var e;return p(this,t),(e=w(this,t)).keydownHandler=e.keyDown.bind(e),e.tabKeyDownOnOpenerHandler=e.tabKeyDownOnOpener.bind(e),e.tabKeyDownOnNextFocusableParentHandler=e.tabKeyDownOnNextFocusableParent.bind(e),e}
1return S(t,e),g(t,[{key:"connectedCallback",value:function(){var e;this.marketingImage=null===(e=this.closest(".main-nav-child-links-wrapper"))||void 0===e?void 0:e.querySelector(".nav-marketing-card-creative"),this.opener=document.querySelector('[data-nav-child-item="'.concat(this.dataset.navChildItemContent,'"]')),this.prepFocusableElements(),this.getNextFocusableParent(),this.addEventListener("keydown",this.keydownHandler),this.opener.addEventListener("keydown",this.tabKeyDownOnOpenerHandler),this.nextFocusableParent&&this.nextFocusableParent.addEventListener("keydown",this.tabKeyDownOnNextFocusableParentHandler)}},{key:"isVisible",value:function(e){var t=window.getComputedStyle(e);return"none"!=t.display&&"hidden"!=t.visibility}},{key:"prepFocusableElements",value:function(){var e=this;this.focusableElements=this.querySelectorAll("a, button, input, select, textarea"),this.focusableElements.forEach((function(t){-1!=t.tabIndex&&e.isVisible(t)&&(e.firstFocusableElement||(e.firstFocusableElement=t),t.setAttribute("tabindex",1))}));for(var t=Array.from(this.focusableElements).reverse(),n=0;n<t.length;n++){var i=t[n];if(-1!=i.tabIndex&&this.isVisible(i)){this.lastFocusableElement=i;break}}}},{key:"getNextFocusableParent",value:function(){var e=this.opener.parentElement.nextElementSibling;e?this.nextFocusableParent=e.querySelector(".main-nav-child-item"):this.marketingImage&&(this.nextFocusableParent=this.marketingImage)}},{key:"tabKeyDownOnOpener",value:function(e){this.classList.contains("is-active")&&(9!=e.keyCode||e.shiftKey||(e.preventDefault(),e.stopPropagation(),this.firstFocusableElement.focus()))}},{key:"tabKeyDownOnNextFocusableParent",value:function(e){this.classList.contains("is-active")&&9==e.keyCode&&e.shiftKey&&(e.preventDefault(),e.stopPropagation(),this.lastFocusableElement.focus())}},{key:"open",value:function(){this.opener&&this.opener.setAttribute("aria-expanded",!0)}},{key:"close",value:function(){this.opener&&this.opener.setAttribute("aria-expanded",!1)}},{key:"keyDown",value:function(e){switch(e.keyCode){case 27:if(!this.opener)return;this.opener.focus();break;case 9:e.target==this.lastFocusableElement&&!e.shiftKey&&this.nextFocusableParent?(e.preventDefault(),e.stopPropagation(),this.nextFocusableParent.focus()):e.target==this.firstFocusableElement&&e.shiftKey&&this.opener&&(e.preventDefault(),e.stopPropagation(),this.opener.focus())}}}])}(_(HTMLElement));customElements.define("nm-inner-sub-menu",i);var o=function(e){function t(){var e,n;return p(this,t),v(e=w(this,t),"animateSubMenuOnOpen",(function(e){var t;window.requestAnimationFrame((function n(i){void 0===t&&(t=i),i-t<300?window.requestAnimationFrame(n):e.classList.add("is-active")}))})),v(e,"handleMobileMenuAnimation",(function(){var t;window.requestAnimationFrame((function n(i){var o;void 0===t&&(t=i),i-t<400?window.requestAnimationFrame(n):(e.classList.add("is-active"),document.body.classList.add("overflow-hidden"),null===(o=e.mobile_nav_bg_overlay)||void 0===o||o.classList.add("is-active"))}))})),v(e,"animateSubMenuOnClose",(function(e){var t;window.requestAnimationFrame((function n(i){void 0===t&&(t=i),i-t<300?window.requestAnimationFrame(n):e.style.display="none"}))})),e.nav_item_open_buttons=document.querySelectorAll("[data-open-nav]"),e.nav_item_close_buttons=document.querySelectorAll("[data-close-nav] button"),e.open_mobile_nav_buttons=document.querySelectorAll("[data-mobile-menu-toggle]"),e.close_mobile_nav_buttons=document.querySelectorAll("[data-mobile-menu-close]"),e.mobile_nav_child_wrapper=document.querySelectorAll(".mobile-nav-list-child"),e.mobile_nav_grandchild_wrapper=document.querySelectorAll(".mobile-nav-list-grandchild"),e.mobile_nav_bg_overlay=document.querySelector(".background-overlay"),e.mainCloseButton=document.querySelector(".mobile-nav-header [data-mobile-menu-close]"),e.openMenuButtonClickHandler=e.openMenuButtonClick.bind(e),e.closeMenuButtonClickHandler=e.closeMenuButtonClick.bind(e),e.closeNavItemClickHandler=e.closeNavItemClick.bind(e),e.openNavItemClickHandler=e.openNavItemClick.bind(e),e.onBlurHandler=e.onBlur.bind(e),e.keydownHandler=e.keyDown.bind(e),window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){window.innerWidth>=990&&document.querySelector("[data-mobile-menu-wrapper]").classList.contains("is-active")&&e.closeMenuButtonClickHandler({target:e.mainCloseButton})}),250)})),e}
1return S(t,e),g(t,[{key:"connectedCallback",value:function(){var e=this;this.nav_item_open_buttons.forEach((function(t){t.addEventListener("click",e.openNavItemClickHandler)})),this.nav_item_close_buttons.forEach((function(t){t.addEventListener("click",e.closeNavItemClickHandler)})),this.open_mobile_nav_buttons.forEach((function(t){t.addEventListener("click",e.openMenuButtonClickHandler)})),this.close_mobile_nav_buttons.forEach((function(t){t.addEventListener("click",e.closeMenuButtonClickHandler)}))}},{key:"keyDown",value:function(e){27==e.keyCode&&this.classList.contains("is-active")&&this.mainCloseButton.click()}},{key:"onBlur",value:function(e){this.classList.contains("is-active")&&(this.contains(e.target)?this.lastFocusedElement=e.target:(e.preventDefault(),this.lastFocusedElement&&this.lastFocusedElement==this.focusableElements[0]?this.focusableElements[this.focusableElements.length-1].focus():this.focusableElements[0].focus()))}},{key:"openNavItemClick",value:function(e){var t="BUTTON"!=e.target.nodeName?e.target.closest("button"):e.target,n=t.dataset.openNav;if(!n)throw new Error("Target navigation handle not found.");var i=document.querySelector('[data-nav-handle="'.concat(n,'"]'));if(!i)throw new Error("Target navigation drawer not found.");t.setAttribute("aria-expanded",!0),i.style.display="block",this.animateSubMenuOnOpen(i),this.active_nav_item=i,this.getFocusableElements()}},{key:"closeNavItemClick",value:function(e){var t,n=null===(t=e.target.closest("[data-close-nav]"))||void 0===t?void 0:t.dataset.closeNav;if(!n)throw new Error("Target navigation handle not found.");var i=document.querySelector('[data-nav-handle="'.concat(n,'"]'));if(!i)throw new Error("Target navigation drawer not found.");i.classList.remove("is-active"),this.animateSubMenuOnClose(i);var o=this.querySelector('[data-open-nav="'.concat(n,'"]'));o&&o.setAttribute("aria-expanded",!1),i.classList.contains("mobile-nav-list-grandchild")?this.active_nav_item=i.closest(".mobile-nav-list-child"):this.active_nav_item=this,this.getFocusableElements()}},{key:"openMenuButtonClick",value:function(e){this.style.display="block",this.mobile_nav_bg_overlay.style.display="block",this.handleMobileMenuAnimation(),e.currentTarget.setAttribute("aria-expanded",!0),this.active_nav_item=this,this.getFocusableElements(),window.addEventListener("focusin",this.onBlurHandler),window.addEventListener("keydown",this.keydownHandler)}},{key:"closeMenuButtonClick",value:function(e){var t=this;this.addEventListener("transitionend",(function(){var n;document.body.classList.remove("overflow-hidden"),null===(n=t.mobile_nav_bg_overlay)||void 0===n||n.classList.remove("is-active"),"function"==typeof showFieldLbl&&t.showFieldLbl(!0,e.target),t.mobile_nav_child_wrapper.forEach((function(e){e.classList.remove("is-active"),e.style.display="none"})),t.mobile_nav_grandchild_wrapper.forEach((function(e){e.classList.remove("is-active"),e.style.display="none"})),t.style.display="none",t.mobile_nav_bg_overlay.style.display="none",t.querySelectorAll('[aria-expanded="true"]').forEach((function(e){e.setAttribute("aria-expanded",!1)})),t.open_mobile_nav_buttons.forEach((function(e){"false"!=e.getAttribute("aria-expanded")&&e.setAttribute("aria-expanded",!1)}))}),{once:!0}),this.classList.remove("is-active"),window.removeEventListener("focusin",this.onBlurHandler),window.removeEventListener("keydown",this.keydownHandler)}},{key:"getFocusableElements",value:function(){var e=this;if(this.active_nav_item.classList.contains("mobile-nav-list-grandchild")){var t=Array.from(this.querySelectorAll(".mobile-nav-header button, .mobile-nav-header a")),n=Array.from(this.active_nav_item.querySelectorAll('a, button, input, textarea, select, [tabindex="0"]'));this.focusableElements=t.concat(n);var i=Array.from(this.querySelectorAll(".mobile-nav-list-parent-item > button, .header__icon.header__icon--cart, .wtb-button, .mobile_nav_marketing_card a")),o=Array.from(this.active_nav_item.closest(".mobile-nav-list-child").querySelectorAll(".mobile-nav-list-grandchild-wrapper > button, .mobile-nav-list-child-item-wrapper > a, .mobile-nav-list-child-item-wrapper + .marketing-card-item a"));this.hiddenFocusableElements=i.concat(o)}else if(this.active_nav_item.classList.contains("mobile-nav-list-child")){var a=Array.from(this.querySelectorAll(".mobile-nav-header button, .mobile-nav-header a")),r=Array.from(this.active_nav_item.querySelectorAll(".mobile-nav-list-grandchild-wrapper > button, .mobile-nav-list-child-item-wrapper > a, .mobile-nav-list-child-item-wrapper + .marketing-card-item a"));this.hiddenFocusableElements=Array.from(this.querySelectorAll(".mobile-nav-list-parent-item > button, .header__icon.header__icon--cart, .wtb-button, .mobile_nav_marketing_card a")),this.focusableElements=a.concat(r)}else this.focusableElements=Array.from(this.querySelectorAll(".mobile-nav-header button, .mobile-nav-header a, .mobile-nav-list-parent-item > button, .header__icon.header__icon--cart, .wtb-button, .mobile_nav_marketing_card a")),delete this.hiddenFocusableElements;
1this.focusableElements.forEach((function(e){e.tabIndex=0})),this.hiddenFocusableElements&&this.hiddenFocusableElements.forEach((function(t){e.focusableElements.includes(t)||(t.tabIndex=-1)}))}},{key:"showFieldLbl",value:function(e,t){var n=t.closest("form"),i=n.querySelector(".aa-input"),o=n.querySelector(".suggestContainer");n&&o&&i&&(1==e?i.value&&(null==o||o.classList.remove("hide"),document.activeElement.blur()):(o.classList.add("hide"),o.removeAttribute("style")))}}])}(_(HTMLElement));customElements.define("nm-mobile-nav",o);var a=function(e){function t(){var e;return p(this,t),(e=w(this,t)).querySelector('[id^="ModalClose-"]').addEventListener("click",(function(t){e.hide.bind(e)})),e.addEventListener("keyup",(function(t){"ESCAPE"===t.code.toUpperCase()&&e.hide()})),e.classList.contains("media-modal")?e.addEventListener("pointerup",(function(t){"mouse"!==t.pointerType||t.target.closest("deferred-media, product-model")||e.hide()})):e.addEventListener("click",(function(t){"MODAL-DIALOG"===t.target.nodeName&&e.hide()})),e}return S(t,e),g(t,[{key:"show",value:function(e){this.openedBy=e;var t=this.querySelector(".template-popup");document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),t&&t.loadContent(),window.natureMade.trapFocus(this,this.querySelector('[role="dialog"]'))}},{key:"hide",value:function(){document.body.classList.remove("overflow-hidden"),this.removeAttribute("open"),window.natureMade.removeTrapFocus(this.openedBy),window.natureMade.pauseAllMedia()}}])}(_(HTMLElement));customElements.define("modal-dialog",a),window.ModalDialog=a;var r=function(e){function t(){var e;p(this,t);var n=(e=w(this,t)).querySelector("button");return n?(n.addEventListener("click",(function(){var t=document.querySelector(e.getAttribute("data-modal"));t&&t.show(n)})),e):b(e)}return S(t,e),g(t)}(_(HTMLElement));customElements.define("modal-opener",r),window.ModalOpener=r;var s=function(e){function t(){var e;p(this,t);var n=(e=w(this,t)).querySelector('[id^="Deferred-Poster-"]');return n?(n.addEventListener("click",e.loadContent.bind(e)),e):b(e)}return S(t,e),g(t,[{key:"loadContent",value:function(){if(window.natureMade.pauseAllMedia(),!this.getAttribute("loaded")){var e=document.createElement("div");e.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0),this.appendChild(e.querySelector("video, model-viewer, iframe")).focus()}}}])}(_(HTMLElement));customElements.define("deferred-media",s),window.DeferredMedia=s;var l=function(e){function t(){var e;return p(this,t),(e=w(this,t)).slider=e.querySelector("ul"),e.sliderItems=e.querySelectorAll("li"),e.pageCount=e.querySelector(".slider-counter--current"),e.pageTotal=e.querySelector(".slider-counter--total"),e.prevButton=e.querySelector('button[name="previous"]'),e.nextButton=e.querySelector('button[name="next"]'),e.slider&&e.nextButton?(new ResizeObserver((function(t){return e.initPages()})).observe(e.slider),e.slider.addEventListener("scroll",e.update.bind(e)),e.prevButton.addEventListener("click",e.onButtonClick.bind(e)),e.nextButton.addEventListener("click",e.onButtonClick.bind(e)),e):b(e)}return S(t,e),g(t,[{key:"initPages",value:function(){var e=Array.from(this.sliderItems).filter((function(e){return e.clientWidth>0}));this.sliderLastItem=e[e.length-1],0!==e.length&&(this.slidesPerPage=Math.floor(this.slider.clientWidth/e[0].clientWidth),this.totalPages=e.length-this.slidesPerPage+1,this.update())}},{key:"update",value:function(){this.pageCount&&this.pageTotal&&(this.currentPage=Math.round(this.slider.scrollLeft/this.sliderLastItem.clientWidth)+1,1===this.currentPage?this.prevButton.setAttribute("disabled",!0):this.prevButton.removeAttribute("disabled"),this.currentPage===this.totalPages?this.nextButton.setAttribute("disabled",!0):this.nextButton.removeAttribute("disabled"),this.pageCount.textContent=this.currentPage,this.pageTotal.textContent=this.totalPages)}},{key:"onButtonClick",value:function(e){e.preventDefault();var t="next"===e.currentTarget.name?this.slider.scrollLeft+this.sliderLastItem.clientWidth:this.slider.scrollLeft-this.sliderLastItem.clientWidth;this.slider.scrollTo({left:t})}}])}(_(HTMLElement));customElements.define("slider-component",l),window.SliderComponent=l;var d=function(e){function t(){var e;return p(this,t),(e=w(this,t)).target=e.getAttribute("data-target"),e.target?("#"===e.target.charAt(0)&&(e.target=e.target.substring(1)),e.header=document.querySelector("header"),e.button=e.querySelector("button"),e.addEventListener("click",e.onButtonClick.bind(e)),e):b(e)}return S(t,e),g(t,[{key:"onButtonClick",value:function(){var e=document.getElementById(this.target);if(e){history.replaceState(null,null," "),location.hash="#".concat(this.target);var t=e.getBoundingClientRect().top-document.body.getBoundingClientRect().top-(this.header&&this.header.classList.contains("is-sticky")?this.header.scrollHeight:0);window.scrollTo({behavior:"auto",top:t})}}}])}(_(HTMLElement));customElements.define("jump-link",d),window.JumpLink=d;var f=function(e){function t(){var e;return p(this,t),(e=w(this,t)).buttons=e.querySelectorAll("[data-tab-control]"),e.mobileButtons=e.querySelectorAll("[data-tab-control-mobile]"),e.mobileLayout=e.mobileButtons.length?"accordion":"tabs",e.tabs=e.querySelectorAll("[data-tab]"),e.glideId=e.querySelector(".tab-component__tab--visible .glide")?e.querySelector(".tab-component__tab--visible .glide").id:null,e.currentTab=e.querySelector(".tab-component__tab--visible"),e.currentDesktopButton=e.querySelector(".tab-component__header--active"),e.currentMobileButton=e.querySelector(".tab-component__dropdown--active"),e.scrollableParent=e.querySelector(".tab-customize"),e.buttons.length&&e.tabs.length?(e.buttons.forEach((function(t){t.addEventListener("click",e.toggleTab.bind(e))})),e.mobileButtons.forEach((function(t){t.addEventListener("click",e.toggleTab.bind(e))})),e.toggleMobileButtons(),e.toggleDesktopButtons(),window.addEventListener("resize",window.debounce((function(t){var n=window.innerWidth;e.toggleMobileButtons(n),e.toggleDesktopButtons(n),n>=640&&e.setDefaultDesktop()}),100)),e):b(e)}return S(t,e),g(t,[{key:"toggleTab",value:function(e){var t=this;if(e){var n="BUTTON"==e.target.tagName?e.target:e.target.closest("button"),i=n.hasAttribute("aria-controls")?n.getAttribute("aria-controls"):n.getAttribute("data-tab-control-mobile"),o=window.innerWidth;
1i&&(this.tabs.forEach((function(e){e.id!==i||e===t.currentTab&&o<640&&e.classList.contains("tab-component__tab--visible")&&"accordion"===t.mobileLayout?(e.setAttribute("tabindex","-1"),e.classList.remove("tab-component__tab--visible")):(t.currentTab=e,e.setAttribute("tabindex","0"),e.classList.add("tab-component__tab--visible"),e.querySelector(".glide")?t.glideId=e.querySelector(".glide").id:t.glideId=null)})),this.buttons.forEach((function(e){e.getAttribute("aria-controls")!==i?(e.classList.remove("tab-component__header--active"),e.setAttribute("aria-selected",!1)):(t.currentDesktopButton=e,e.classList.add("tab-component__header--active"),e.setAttribute("aria-selected",!0))})),this.mobileButtons.forEach((function(e){e.getAttribute("data-tab-control-mobile")!==i||e===t.currentMobileButton&&o<640&&e.classList.contains("tab-component__dropdown--active")?e.classList.remove("tab-component__dropdown--active"):(t.currentMobileButton=e,e.classList.add("tab-component__dropdown--active"))})),this.updateGlide(),document.dispatchEvent(new CustomEvent("activeCarouselTabChange")),this.scrollableParent&&this.scrollableParent.scrollWidth>this.scrollableParent.clientWidth&&e.target.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"}))}}},{key:"toggleMobileButtons",value:function(e){e||(e=window.innerWidth);var t=e>=640;this.mobileButtons.forEach((function(e){e.setAttribute("aria-hidden",t)}))}},{key:"toggleDesktopButtons",value:function(e){if("accordion"===this.mobileLayout){e||(e=window.innerWidth);var t=!(e>=640);this.buttons.forEach((function(e){e.setAttribute("aria-hidden",t)}))}}},{key:"updateGlide",value:function(){document.dispatchEvent(new CustomEvent("updateGlide",{detail:{glide:window.updateSlider[this.glideId]}})),window.updateSlider&&this.glideId&&window.updateSlider[this.glideId]&&window.updateSlider[this.glideId].glideIsInitialized&&window.updateSlider[this.glideId].update()}},{key:"setDefaultDesktop",value:function(){if(!this.querySelector(".tab-component__tab--visible")){var e=this.querySelector("[data-tab-control]");if(e){var t={target:e};this.toggleTab(t)}}}}])}(_(HTMLElement));customElements.define("tab-component",f),window.TabComponent=f;var m=function(e){function t(){var e;return p(this,t),(e=w(this,t)).autoSelectLastSelectedTab(),e.saveSelectedTabOnClickForTabRetention(),e}return S(t,e),g(t,[{key:"updateGlide",value:function(){window.updateSlider&&window.updateSlider[this.glideId]&&(document.dispatchEvent(new CustomEvent("updateGlide",{detail:{glide:window.updateSlider[this.glideId]}})),window.updateSlider&&this.glideId&&window.updateSlider[this.glideId]&&window.updateSlider[this.glideId].glideIsInitialized&&window.updateSlider[this.glideId].update())}},{key:"autoSelectLastSelectedTab",value:function(){document.addEventListener("DOMContentLoaded",(function(){var e=window.natureMade.getCookie("innovations-carousel-last-tab-selected");if(e){var t=document.querySelector('[data-tab-handle="'.concat(e,'"]'));t&&t.dataset.productsSize&&0!=parseInt(t.dataset.productsSize)&&t.click()}}))}},{key:"saveSelectedTabOnClickForTabRetention",value:function(){this.buttons.forEach((function(e){e.addEventListener("click",(function(e){window.natureMade.setCookie("innovations-carousel-last-tab-selected",e.target.dataset.tabHandle)}))}))}}])}(f);customElements.define("tab-component-v2",m);var h=function(e){function t(){var e;return p(this,t),(e=w(this,t)).arrayTopSearch=searchTerms?Object.values(searchTerms.keywords):null,e.arrayTopLinks=searchTerms?Object.values(searchTerms.links):null,e}return S(t,e),g(t,[{key:"connectedCallback",value:function(){if(this.arrayTopSearch&&this.arrayTopLinks&&(this.pillsContainer=this.querySelector(".pills-container"),this.pillsContainer)){for(var e=searchTerms.virtualIndex-1;e>=0;e--){var t=document.createElement("span");0==this.arrayTopSearch[e].length?t.className="hide":(t.innerHTML='<a class="suggested_link '.concat(this.arrayTopLinks[e]?"direct_link":"",'" href="').concat(this.arrayTopLinks[e]?decodeURI(this.arrayTopLinks[e]):"/search?q="+encodeURIComponent(this.arrayTopSearch[e].replace("?","")),'" target="_self" data-index="').concat(e,'">').concat(this.arrayTopSearch[e],"</a>"),t.setAttribute("tabindex",e),t.setAttribute("data-suggestion-index",e)),this.pillsContainer.appendChild(t)}for(var n=searchTerms.virtualIndex;n<=this.arrayTopSearch.length-1;n++){var i=document.createElement("span");0==this.arrayTopSearch[n].length?i.className="hide":(i.innerHTML='<a class="'.concat(this.arrayTopLinks[n]?"direct_link":"",'" href="').concat(this.arrayTopLinks[n]?decodeURI(this.arrayTopLinks[n]):"/search?q="+encodeURIComponent(this.arrayTopSearch[n].replace("?","")),'" target="_self" data-index="').concat(n,'">').concat(this.arrayTopSearch[n],"</a>"),i.setAttribute("tabindex",n),i.setAttribute("data-suggestion-index",n)),this.pillsContainer.appendChild(i)}}}}])}(_(HTMLElement));customElements.define("search-suggestion-pills",h),window.SearchSuggestionPills=h;var y=function(e){function t(){var e;return p(this,t),(e=w(this,t)).searchQuery="",e.autoComppleteSelectedEventHandler=e.autoComppleteSelected.bind(e),e}return S(t,e),g(t,[{key:"getSearchBox",value:function(){return window.innerWidth<990?document.querySelector('input[type="search"].mobile-search-input'):document.querySelector('input[type="search"]:not(.mobile-search-input)')}},{key:"setStatus",value:function(){var e=this;this.predStatus=this.searchInput.parentElement.querySelector(".predictive-search-status"),this.predStatus&&(this.predStatus.setAttribute("aria-hidden",!1),this.searchInput&&this.searchInput.setAttribute("aria-expanded",!0),setTimeout((function(){if(e.hitsEl)e.predStatus.textContent="".concat(e.hitsEl.textContent," product results.");else{var t,n=null===(t=e.closest(".algolia-autocomplete"))||void 0===t?void 0:t.querySelectorAll(".aa-suggestion").length;e.predStatus.textContent="".concat(n," individual suggestions.")}}),500))}},{key:"setAutoCompleteModalId",value:function(){this.parentContainer=this.closest(".algolia-autocomplete"),this.parentContainer&&!this.parentContainer.id&&(window.innerWidth<990?this.parentContainer.id="predictive-search-results-list-mobile":this.parentContainer.id="predictive-search-results-list")}},{key:"connectedCallback",value:function(){this.setAutoCompleteModalId(),this.closePreSuggestedTermsIfOpen(),this.hitsEl=this.querySelector(".aa-nbhits"),this.searchInput=this.getSearchBox(),this.searchInput&&(this.setStatus(),this.searchQuery=this.searchInput.value,this.searchQuery&&window.cffCustomer&&this.addEventListener("autoCompleteSelected",this.autoComppleteSelectedEventHandler))}},{key:"attributeChangedCallback",value:function(e,t,n){this.setStatus()}},{key:"closePreSuggestedTermsIfOpen",value:function(){var e=document.querySelectorAll(".quick_search_list:not(.hide)");e&&e.length&&e.forEach((function(e){e.classList.add("hide")}))}},{key:"autoComppleteSelected",value:function(e){klaviyo.identify({$email:window.cffCustomer.email});var t="page resource";switch(e.detail[0].ClickedResultCategory){case"products":t="product";break;case"collections":t="collection";break;case"articles":t="article resource"}var n={SearchTerm:this.searchQuery,"SearchTerm (autocorrected)":this.searchQuery,ReturnedResults:this.hitsEl?this.hitsEl.textContent:"",ClickedResult:e.detail[0].ClickedResult,ClickedResultCategory:t};klaviyo.track("Searched Site",n)}}])}(_(HTMLElement));customElements.define("autocomplete-footer",y),window.AutoCompleteFooter=y;var E=function(e){function t(){var e;return p(this,t),v(e=w(this,t),"toggleOptionsTabIndex",(function(t){e.visibleOptions.forEach((function(e){e.setAttribute("tabindex",t?0:-1)}))})),e.onOutsideClickEventHandler=e.onOutsideClick.bind(e),e}
1return S(t,e),g(t,[{key:"connectedCallback",value:function(){this.label=this.dataset.label||"Select",this.init()}},{key:"init",value:function(){this.mainSelect=this.querySelector("select"),this.mainSelect&&(this.mainSelect.style.display="none",this.createCustomSelect(),this.initEventHandlers())}},{key:"createCustomSelect",value:function(){var e;this.container=document.createElement("div"),this.container.classList.add("ais-SortBy-select","nice-select"),(e=this.container.classList).add.apply(e,u(this.mainSelect.classList)),this.currentIndicator=document.createElement("button"),this.currentIndicator.setAttribute("type","button"),this.currentIndicator.setAttribute("role","combobox"),this.currentIndicator.setAttribute("aria-controls","".concat(this.mainSelect.id,"-listbox")),this.currentIndicator.setAttribute("aria-haspopup","listbox"),this.currentIndicator.setAttribute("tabindex","0"),this.currentIndicator.setAttribute("aria-expanded","false"),this.currentIndicator.setAttribute("aria-label",this.label),this.currentIndicator.id="".concat(this.mainSelect.id,"-select"),this.currentIndicator.classList.add("current"),this.container.appendChild(this.currentIndicator),this.list=document.createElement("ul"),this.list.classList.add("list"),this.list.setAttribute("role","listbox"),this.list.id="".concat(this.mainSelect.id,"-listbox"),this.populateList(),this.container.appendChild(this.list),this.appendChild(this.container)}},{key:"populateList",value:function(){var e=this;this.list&&(this.list.innerHTML="",this.options=Array.from(this.mainSelect.querySelectorAll("option")),this.options.length&&(this.options.forEach((function(t){e.list.appendChild(e.createCustomOption(t))})),this.visibleOptions=this.list.querySelectorAll("li")))}},{key:"createCustomOption",value:function(e){var t=document.createElement("li");return t.setAttribute("data-value",e.value),t.setAttribute("role","option"),t.setAttribute("aria-selected","false"),t.textContent=e.label,t.classList.add("option"),e.selected&&(t.classList.add("selected","focus"),t.setAttribute("aria-selected","true"),this.currentIndicator.value=this.currentIndicator.textContent=e.label,this.currentCustomOption=t),t.addEventListener("click",this.customOptionClickHandler.bind(this)),t}},{key:"customOptionClickHandler",value:function(e){var t=this.mainSelect.querySelector('option[value="'.concat(e.target.dataset.value,'"'));if(!t)throw new Error("Option not found.");this.updateElements(t,e.target)}},{key:"updateElements",value:function(e,t){this.currentCustomOption.setAttribute("class","option"),this.currentCustomOption.setAttribute("aria-selected",!1),this.list.querySelectorAll(".selected").forEach((function(e){e.setAttribute("class","option"),e.setAttribute("aria-selected",!1)})),this.currentCustomOption=t,this.currentCustomOption.classList.add("selected","focus"),this.currentCustomOption.setAttribute("aria-selected",!0),this.currentIndicator.value=this.currentIndicator.textContent=e.label,e.selected=!0,this.mainSelect.dispatchEvent(new Event("change"))}},{key:"toggleOptionsVisibility",value:function(){if(this.container.classList.contains("open"))return this.container.classList.remove("open"),this.currentIndicator.setAttribute("aria-expanded","false"),this.toggleOptionsTabIndex(!1),void this.currentIndicator.focus({focusVisible:!0});this.container.classList.add("open"),this.currentIndicator.setAttribute("aria-expanded","true"),this.toggleOptionsTabIndex(!0),this.currentCustomOption.focus({focusVisible:!0})}},{key:"focusNext",value:function(){var e=this.list.querySelector("li.focus");e&&e.nextElementSibling&&(e.classList.remove("focus"),e.nextElementSibling.classList.add("focus"),this.container.classList.contains("open")?e.nextElementSibling.focus({focusVisible:!0}):(this.selectOption(),this.currentIndicator.focus({focusVisible:!0})))}},{key:"focusPrev",value:function(){var e=this.list.querySelector("li.focus");e&&e.previousElementSibling&&(e.classList.remove("focus"),e.previousElementSibling.classList.add("focus"),e.previousElementSibling.focus({focusVisible:!0}),this.container.classList.contains("open")?e.previousElementSibling.focus({focusVisible:!0}):(this.selectOption(),this.currentIndicator.focus({focusVisible:!0})))}},{key:"closeSortDropdown",value:function(){this.container.classList.contains("open")&&(this.container.classList.remove("open"),this.list.querySelector("li.focus").classList.remove("focus"),this.currentCustomOption.classList.add("focus"),this.currentIndicator.focus({focusVisible:!0}),this.toggleOptionsTabIndex(!1))}},{key:"handleEnterKeyPress",value:function(){this.toggleOptionsVisibility(),this.container.classList.contains("open")||this.selectOption()}},{key:"selectOption",value:function(){var e=this.list.querySelector("li.focus");if(e){var t=this.mainSelect.querySelector('option[value="'.concat(e.dataset.value,'"'));t&&this.updateElements(t,e)}}},{key:"handleKeyUpEvent",value:function(e){if(9!=e.keyCode||this.container.classList.contains("open"))switch(e.preventDefault(),e.stopPropagation(),e.keyCode){case 9:e.shiftKey?this.focusPrev():this.focusNext();break;case 40:this.focusNext();break;case 38:this.focusPrev();break;case 27:this.closeSortDropdown();break;case 13:this.handleEnterKeyPress()}}},{key:"onOutsideClick",value:function(){this.closeSortDropdown()}},{key:"initEventHandlers",value:function(){var e=this;this.container.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.toggleOptionsVisibility()})),this.container.addEventListener("keydown",this.handleKeyUpEvent.bind(this)),document.querySelector("body").addEventListener("click",this.onOutsideClickEventHandler)}},{key:"disconnectedCallback",value:function(){document.querySelector("body").removeEventListener("click",this.onOutsideClickEventHandler)}}])}(_(HTMLElement));customElements.define("nm-select",E),window.natureMade.NMSelect=E;var L=function(e){function t(){return p(this,t),w(this,t)}
1return S(t,e),g(t,[{key:"connectedCallback",value:function(){this.mainContainer=this.querySelector(".disclaimers-container"),this.mainContainer&&(this.groomReferences(),this.disclaimersWrapper=this.mainContainer.querySelector(".disclaimer"),this.disclaimersWrapper&&this.renderDisclaimers())}},{key:"groomReferences",value:function(){var e=this.parentElement.querySelector(".references .metafield-multi_line_text_field");if(e){var t=e.textContent.trim().split("\n");if(t.length){var n=document.createElement("ol");t.forEach((function(e){var t=document.createElement("p");t.innerHTML=e.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,(function(e){return'<a href="'+e+'">'+e+"</a>"}));var i=document.createElement("li");i.appendChild(t),n.appendChild(i)})),e.replaceWith(n)}}}},{key:"generateAndAppendDisclaimerMarkup",value:function(e){var t=e.trim().replace(/(♥|♦|&#9829;|&#9830;)/g,'<span class="disclaimer-symbol">$1</span>'),n=document.createElement("p");n.setAttribute("data-footnote-symbol",t[0]),n.setAttribute("data-disclaimer-content",t.substring(1).trim()),n.innerHTML="".concat(t),this.disclaimersWrapper.prepend(n)}},{key:"appendDisclaimerMarkup",value:function(){var e=this,t=this.disclaimersWrapper.querySelector(".metafield-multi_line_text_field");t&&(t.textContent.split("\n").reverse().forEach((function(t){e.generateAndAppendDisclaimerMarkup(t)})),t.remove())}},{key:"renderDisclaimers",value:function(){this.appendDisclaimerMarkup()}}])}(_(HTMLElement));customElements.define("dynamic-disclaimers-container",L);var k=function(e){function t(){var e,n;if(p(this,t),null===(e=(n=w(this,t)).dataset)||void 0===e||!e.targetElements)return b(n);var i=window.metafieldGlobalSettings.superscriptCharacters||["◾","▲","◆","★","†","‡","®","™","♦","*","�"];return n.pattern=new RegExp("[".concat(i.map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join(""),"]"),"g"),n}return S(t,e),g(t,[{key:"normalizeText",value:function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/&amp;reg;/g,"&reg;")).replace(/&amp;trade;/g,"&trade;")).replace(/&amp;dagger;/g,"&dagger;")).replace(/&amp;Dagger;/g,"&Dagger;")).replace(/&amp;diams;/g,"&diams;")).replace(/&amp;#174;/g,"&#174;")).replace(/&amp;#8482;/g,"&#8482;")).replace(/&amp;#8224;/g,"&#8224;")).replace(/&amp;#8225;/g,"&#8225;")).replace(/&amp;#9830;/g,"&#9830;")).replace(/&amp;#x25B2;/g,"&#x25B2;")).replace(/&reg;/g,"®")).replace(/&#174;/g,"®")).replace(/&trade;/g,"™")).replace(/&#8482;/g,"™")).replace(/&dagger;/g,"†")).replace(/&#8224;/g,"†")).replace(/&Dagger;/g,"‡")).replace(/&#8225;/g,"‡")).replace(/&diams;/g,"♦")).replace(/&#9830;/g,"♦")).replace(/&#x25B2;/g,"▲")}},{key:"connectedCallback",value:function(){var e,t=this;null===(e=this.dataset)||void 0===e||e.targetElements.split(",").forEach((function(e){var n=document.querySelectorAll(e);n.length&&n.forEach((function(e){for(var n=[],i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:function(e){var t;return null!==(t=e.parentElement)&&void 0!==t&&t.closest("sup")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});i.nextNode();)n.push(i.currentNode);n.forEach((function(e){var n=t.normalizeText(e.textContent),i=document.createDocumentFragment(),o=0;n.replace(t.pattern,(function(e,t){i.append(document.createTextNode(n.slice(o,t)));var a=document.createElement("sup");return a.textContent=e,i.append(a),o=t+e.length,e})),i.append(document.createTextNode(n.slice(o))),e.replaceWith(i)}))}))}))}}])}(_(HTMLElement));customElements.define("superscript-characters",k)}(),function(){window.natureMade.wishlistArray=[];var e=function(e){window.customerData.id;var t={product_handles:e},n="".concat(window.metafieldGlobalSettings.nm_shopify_app_proxy,"/update-wishlist"),i=-1===n.indexOf("topaz")&&-1===n.indexOf("amber");l.ajax({url:n,type:"post",crossDomain:!1,dataType:"json",data:{data:t}}).done((function(t){var n=i?t.status:t.message,o=document.querySelectorAll(".show-wishlist-on");if(e.length){if(o.forEach((function(e){e.classList.contains("active")||e.classList.add("active")})),!window.natureMade.getCookie("favorite_product"))return;"error"!=n&&(document.cookie="favorite_product=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"),document.dispatchEvent(new CustomEvent("showFavoritesConfirmationModal"))}else o.forEach((function(e){e.classList.contains("active")&&e.classList.remove("active")}))}))};window.customerData&&(window.natureMade.wishlistArray=window.customerData.wishlist,document.querySelectorAll(".btn-heart").forEach((function(e){var t;(null===(t=e.getAttribute("data-handles"))||void 0===t?void 0:t.split(",")).some((function(e){return window.natureMade.wishlistArray.includes(e)}))&&e.classList.add("active")})),document.querySelectorAll(".show-wishlist-on").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),e.classList.contains("heart-loading")||(e.classList.add("heart-loading"),n(!0))}))})));var t,n=function(e){var t=document.getElementById("wishlist-product-list-modal"),n=document.querySelector(".account-favorites-product-list"),i=document.querySelectorAll(".product-list-modal .ais-InfiniteHits"),o=document.querySelector(".items-count"),a=document.getElementById("favorites-product-list"),r=window.customerData.wishlist;t&&t.classList.remove("fav-empty");var c=document.querySelectorAll(".no-favs");fetch("/pages/favorites-products").then((function(e){return e.json()})).then((function(e){for(var i="",s=0,l=0,d=r.length;l<d;l++){var u=r[l],f=getObjects(e,"product_handle",u),m=getObjects(e,"previous_handle_list",u);if(f.length||m.length){var v=f.length?f:m;s+=1,i+='\n                            <li class="ais-InfiniteHits-item wishlist-item">\n                                '.concat(v[0].product_html,"\n                            </li>\n                        ")}else r.splice(r.indexOf(u),1),window.customerData.wishlist=r}o&&(o.innerText=s),a&&(a.innerHTML=i),n&&(document.getElementById("account-favorites").innerHTML=i),0==s?(t&&t.classList.add("fav-empty"),c.forEac
1h((function(e){e.classList.add("active")})),document.querySelectorAll(".show-wishlist-on").forEach((function(e){e.classList.remove("active")}))):c.forEach((function(e){e.classList.remove("active")}))})).catch((function(e){console.error(e)})).finally((function(){r.length||(o&&(document.querySelector(".items-count").innerText=0),t&&t.classList.add("fav-empty"),c.forEach((function(e){e.classList.add("active")}))),i.forEach((function(e){e.classList.remove("loading")})),e&&document.dispatchEvent(new CustomEvent("showFavorites"))}))};window.natureMade.addToFav=function(t){var i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=window.natureMade.wishlistArray,r=t.getAttribute("data-handle"),c=null===(i=t.getAttribute("data-handles"))||void 0===i?void 0:i.split(","),s=document.querySelectorAll('.btn-heart[data-handle="'+r+'"]'),l=document.querySelectorAll(".product-list-modal .ais-InfiniteHits"),d=document.querySelectorAll(".no-favs"),u=t.closest(".cart-preview.is-active")||t.closest(".cart-notification.active");d.forEach((function(e){e.classList.remove("active")}));var f=document.getElementById("wishlist-product-list-modal"),m=document.querySelector(".account-favorites-product-list");if(window.customerData)m&&m.classList.remove("fav-empty"),(f||m)&&(o||n()),c.some((function(e){return a.includes(e)}))?(document.cookie="favorite_product=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",c.forEach((function(e){for(var t;(t=a.indexOf(e))>-1;)a.splice(t,1)})),s.forEach((function(e){e.closest("#account-favorites")&&e.closest(".wishlist-item").remove(),e.classList.remove("active")}))):(a.push(r),s.forEach((function(e){e.classList.add("active")})),l.forEach((function(e){e.classList.add("loading")}))),window.customerData.wishlist=a,o||e(a);else{window.natureMade.setCookie("favorite_product",r),t.closest(".product-card-v2-container");var v=t.getAttribute("data-href");u&&(v=v.replace("&favorites","?cartPreviewState=1&favorites")),window.location.href=v}if(t.classList.contains("wishlist-remove")){t.closest(".wishlist-item").remove();var p=document.querySelector(".items-count"),h=parseInt(p.innerText)-1;p.innerText=h,0==h&&(m&&m.classList.add("fav-empty"),f&&f.classList.add("fav-empty"),d.forEach((function(e){e.classList.add("active")})),document.querySelectorAll(".show-wishlist-on").forEach((function(e){e.classList.remove("active")})))}},window.addEventListener("DOMContentLoaded",(function(){var t=window.natureMade.getCookie("favorite_product");if(t&&window.customerData&&!window.natureMade.wishlistArray.includes(t)){var i=window.customerData.wishlist;i.push(t),window.customerData.wishlist=i,e(i),n(),window.natureMade.waitForElm('.btn-heart[data-handle="'.concat(t,'"]')).then((function(){document.querySelectorAll(".btn-heart").forEach((function(e){var n=e.getAttribute("data-handle");t==n&&e.classList.add("active")}))}))}})),(t=document.querySelector(".logout-link"))&&t.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("a").getAttribute("href");fetch("/cart/clear.js").then((function(e){return e.json()})).then((function(e){document.cookie="combined_cart=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",document.cookie="lastViewedTab=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",document.cookie="recently_viewed_ids=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",document.cookie="combined_recently_viewed=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",document.cookie="favorite_product=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",window.location.href=t}))}))}(),function(){function e(){window.Shopify.customerPrivacy.userCanBeTracked()&&window.Shopify.customerPrivacy.saleOfDataAllowed()?window.natureMade.setCookie("__kla_off",!1):window.natureMade.setCookie("__kla_off",!0)}var t,n,i,o,a,c;window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],(function(t){t||(document.addEventListener("visitorConsentCollected",(function(t){return e()})),document.addEventListener("DOMContentLoaded",(function(t){return e()})))})),n=sessionStorage.getItem("returnToPage"),i=document.querySelector("#create_customer"),o=document.querySelector("#customer_login"),a=document.querySelector('[name="authenticity_token"]'),c=!1,!n||!window.customerData||!document.querySelector(".page-type__search")||(c=n.split("?")[0]==window.location.pathname),(""==n||window.location.pathname==n||"/"==window.location.pathname||i||o||a)&&window.location.pathname!=n&&!c||sessionStorage.removeItem("returnToPage"),t=document.querySelectorAll("[data-youtube-video-id]"),document.querySelectorAll("[data-cover-for-video-id]").forEach((function(e){e.addEventListener("click",(function(e){if(!document.body.classList.contains("youtube-lib-loaded")){var n=e.target.dataset.coverForVideoId;window.natureMade.youtube_setup_scripts(),window.onYouTubeIframeAPIReady=function(){!function(e,t){e.forEach((function(e,n){var i=e.dataset.youtubeVideoId,o=document.querySelector('[data-cover-for-video-id="'.concat(i,'"]'));e.id="youtube_player_"+n;var a=new YT.Player(e.id,{height:"390",width:"640",videoId:i,playerVars:{rel:0,showinfo:0,ecver:2,playsinline:1,autoplay:0,modestbranding:1}});o&&o.addEventListener("click",(function(){o.classList.add("is-playing"),a.playVideo()})),i==t&&window.natureMade.waitForElm('iframe[data-youtube-video-id="'.concat(t,'"]')).then((function(){var e=document.querySelector('iframe[data-youtube-video-id="'.concat(t,'"]'));o.classList.add("is-playing"),e.addEventListener("load",(function(){e.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*")}))}))}))}(t,n)}}}))})),document.querySelectorAll(".yt-play-embedded-button").forEach((function(e){e.addEventListener("click",(function(e){!function(e){var t=document.querySelector('.deferred-media-yt[data-media-id="'.concat(e,'"]')),n=t.querySelector(".yt_video_thumb-container");if(t){if(t.classList.add("yt-loading"),!t.getAttribute("loaded")){var i=document.createElement("div");i.appendChild(t.querySelector("template").content.firstElementChild.cloneNode(!0)),t.setAttribute("loaded",!0),t.appendChild(i.querySelector("video, model-viewer, iframe")).focus(),n.classList.add("hide")}var o=t.querySelector("iframe");o&&o.addEventListener("load",(function(){o.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"),t.classList.remove("yt-loading")}))}}("BUTTON"==e.target.nodeName?e.target.dataset.mediaId:e.target.parentNode.dataset.mediaId)}))}));var l,d,f,m=1;function v(e){var t,n=document.getElementsByClassName("blogSlides");if(n&&n.length){for(e>n.length&&(m=1),e<1&&(m=n.length),t=0;t<n.length;t++)n[t].style.display="none";n[m-1].style.display=""}}v(m),window.natureMade.plusSlides=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?v(m+=e):(window.natureMade.autoPromoInterval&&clearInterval(window.natureMade.autoPromoInterval),v(m+=e),window.natureMade.startPromoAutoScroller&&window.natureMade.startPromoAutoScroller())},d=function(){var e,t;window.natureMade.autoPromoInterval=setInterval((function(){try{if(document.querySelector(".fancybox__container.promo-bar-modal"))return;window.natureMade.plusSlides(1,!0)}catch(e){clearInterval(window.natureMade.autoPromoInterval),window.natureMade.autoPromoInterval=null}}),(t=null===(e=document.querySelector(".promo-bar.top-eyebrow"))||void 0===e?void 0:e.dataset.autoSlide)&&!isNaN(t)?1e3*parseInt(t):5e3)},f=function(){try{var e=document.querySelector(".promo-bar.top-eyebrow");if(!e)return;var t=e.getElementsByClassName("blogSlides");if(!t||t.length<=1)return;if(window.natureMade&&window.natureMade.autoPromoInterval)return;window.natureMade=window.natureMade||{},window.natureMade.startPromoAutoScroller=d,window.natureMade.startPromoAutoScroller()}catch(e){console.error("Promo auto-advance failed to start:",e)}},function(){var e=document.querySelector(".back-to-top");if(e){var t=window.debounce((function(){var t=document.documentElement,n=t.clientHeight;t.scrollTop>1*n?(e.style.display="block",document.dispatchEvent(new CustomEvent("backToTopVisible"))):e.style.display="none"}),300);document.addEventListener("scroll",t),e.addEventListener("click",(function(){window.scrollTo({top:0,behavior:"smooth"}),setTimeout((function(){window.scrollTo({top:0,behavior:"smooth"})}),100)}))}}(),l=function(e){var t=e.currentTarget||e.target,n="#".concat(t.dataset.open);r.lX.show([{src:n,type:"inline"}],{mainClass:"promo-bar-modal",compact:!0,dragToClose:!1})},document.querySelectorAll(".trigger-modal").forEach((function(e){e.addEventListener("click",l)})),document.querySelectorAll(".promo-form-trigger").forEach((function(e){e.addEventListener("click",(function(){var t=e.dataset.formId;t&&(window._klOnsite=window._klOnsite||[],window._klOnsite.push(["openForm",t]))}))})),window.addEventListener("load",f),-1!==window.location.href.indexOf("/collections/best-sellers")&&window.addEventListener("klaviyoForms",(function(e){if("open"==e.detail.type){var t=window.globalSettings.klaviyoFlyoutPromoAutodismiss,n=t?1e3*parseInt(t):1e4;setTimeout((function(){document.querySelector('.needsclick[aria-label="FLYOUT Form"] .klaviyo-close-form').click()}),n)}})),function(){function e(){document.querySelectorAll('[id^="shopify-section-template"]:not(.alternating-content)').forEach((function(e,t){var n=t
1%2==0?"#FFFFFF":"#F5F5F7";e.setAttribute("style","background-color: ".concat(n,";--section-color: ").concat(n))}))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}(),window.addEventListener("load",(function(e){if(window.location.hash){var t=document.querySelector(window.location.hash),n=document.querySelector(".header-wrapper header")?document.querySelector(".header-wrapper header").offsetHeight:0;t&&n&&window.scroll(scrollX,t.offsetTop-n,"smooth")}})),document.addEventListener("DOMContentLoaded",(function(){!function(){var e=localStorage.getItem("autocomplete-query");if(e){if(0===(e=JSON.parse(e)).state)return e.state=1,void localStorage.setItem("autocomplete-query",JSON.stringify(e));if(window.location.pathname===e.firedFromPath){document.querySelectorAll(".search__input").forEach((function(t){t.value=e.query,(window.outerWidth<990&&t.classList.contains("mobile-search-input")||window.outerWidth>=990&&!t.classList.contains("mobile-search-input"))&&(function(e){e.dispatchEvent(new Event("input",{bubbles:!1}))}(t),function(e){var t;e.focus(),null===(t=e.closest("form"))||void 0===t||null===(t=t.querySelector(".search_close_button"))||void 0===t||t.classList.remove("hidden")}(t)),function(e){e.classList.add("pristine-persistent-query"),e.addEventListener("input",(function(){e.classList.remove("pristine-persistent-query")}))}(t)}))}localStorage.removeItem("autocomplete-query")}}()})),function(){var e=window.natureMade.getCookie("combined_recently_viewed"),t=window.natureMade.getCookie("recently_viewed_ids");if(window.customerData&&"true"!=e){window.customerData.id;var n=""!=t?JSON.parse(t):[];n.length?(n.reverse(),function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var n="".concat(window.metafieldGlobalSettings.nm_shopify_app_proxy,"/recently-viewed-products"),i=-1===n.indexOf("topaz")&&-1===n.indexOf("amber");fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((function(e){return e.json()})).then((function(e){if("success"==(i?e.status:e.body.message)&&t){window.natureMade.setCookie("combined_recently_viewed","true");var n=document.getElementById("custom-tab-recently-viewed"),o=document.getElementById("tab-content-tab-recently-viewed"),a=n||o;if(!a||""==window.natureMade.getCookie("recently_viewed_ids"))return;var r=new XMLHttpRequest;r.onload=function(){var e=(new DOMParser).parseFromString(this.responseText,"text/html"),t=JSON.parse(e.getElementById("shopify-section-customer-updated-recently-viewed-cards").innerHTML);rebuildRecentlyViewedModule(t,a)},r.open("GET","?section_id=customer-updated-recently-viewed-cards",!0),r.send()}})).catch((function(e){console.error("Error:",e)}))}}({product_ids:n},!0)):window.natureMade.setCookie("combined_recently_viewed","true")}}(),window.natureMade.initCollapsibleProductListing=function(e){var t=e.querySelector(".view-more-button--container");if(t){var n=t.cloneNode(!0),i=function(){e.classList.contains("collapsible")&&e.classList.add("listing-folded")};n.addEventListener("click",(function(t){if(e.classList.toggle("listing-folded"),e.classList.contains("listing-folded"))return t.currentTarget.scrollIntoView({behavior:"smooth",block:"end"}),void document.removeEventListener("activeCarouselTabChange",i);document.addEventListener("activeCarouselTabChange",i)})),e.querySelector(".marketing-card:not(.has-horizontal-marketing-image)")&&e.classList.add("has-hidden-marketing-card"),e.closest(".horizontal-on-mobile")||e.querySelector(".horizontal-on-mobile")||e.classList.remove("collapsible","listing-folded"),t.replaceWith(n)}},window.natureMade.toggleSliderBullets=function(e){var t="object"==A(e.selector)?e.selector:e._c.Html._r;t.setAttribute("data-per-view",Math.floor(e._o.perView)),e._c.Html.slides.length<=e._o.perView?(e.disable(),t.setAttribute("glide-disabled","")):(e.enable(),t.removeAttribute("glide-disabled"))},window.natureMade.generateSliderBullets=function(e,t){var n="";u(Array(t)).forEach((function(e,i){return n+='<button class="slider__bullet glide__bullet" data-glide-dir="='.concat(i,'" aria-label="slide ').concat(i+1," of ").concat(t,'"></button>')})),e&&(e.innerHTML=n)},window.addEventListener("load",(function(){var e=document.getElementById("chat-button");e&&e.setAttribute("aria-label","Chat with Nature Made")})),window.natureMade.toggleGlideItemsAriaAttributes=function(e){if(window.innerWidth<750&&e._c.Html._r.closest(".horizontal-on-mobile"))e._c.Html.slides.forEac
1h((function(e){e.removeAttribute("aria-hidden"),e.removeAttribute("tabindex"),e.querySelectorAll("a, button, input").forEach((function(e){e.removeAttribute("tabindex")}))}));else{e._c.Html.slides.forEach((function(e){e.hasAttribute("aria-hidden")||(e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex","-1"),e.querySelectorAll("a, button, input, [tabindex]").forEach((function(e){e.setAttribute("tabindex","-1")})))}));for(var t=e.index;t<Math.floor(e.index+e._o.perView);t++){if(!e._c.Html.slides[t])return;e._c.Html.slides[t].removeAttribute("aria-hidden"),e._c.Html.slides[t].removeAttribute("tabindex"),e._c.Html.slides[t].querySelectorAll("a, button, input, [tabindex]").forEach((function(e){e.removeAttribute("tabindex")}))}}},window.natureMade.updateDiscontinuedProductCards=function(e,t){e.querySelectorAll(".product-card-v2-container__".concat(t.productId)).forEach((function(e){var n=e.querySelector(".item-price");if(n&&t.variantPrice&&(n.innerHTML="<span>$</span>".concat(t.variantPrice)),!t.hasOtherVariants){if(t.isDiscontinued){var i=e.querySelector(".soldout-flag"),o=e.querySelector(".card-image--container");if(!i&&o){var a=document.createElement("div");a.className="item-status has-dark-gray-text has-white-background soldout-flag",a.innerHTML="<span>SOLD OUT</span>",o.prepend(a)}if(e.classList.contains("discontinued-product"))return;var r=e.dataset.productTitle.replace(/[^a-zA-Z0-9 ]/g,""),c=e.querySelector(".card-link"),s=c.querySelector(".button-primary:not(.coming-soon-cta)");if(!c||!s)return;c.href=c.href.replace("?nm=1","").replace("&nm=1","");var l=window.accessibilityString.discontinued.replace("#title",r);s.innerHTML='\n                        <span aria-hidden="true">'.concat(window.variantStrings.discontinued,'</span>\n                        <span class="visually-hidden visually-hidden--inline">').concat(l,"</span>\n                    ")}e.classList.add("discontinued-product")}}))},window.natureMade.getDiscontinuedVariantIds=function(e,t){if(t){var n=document.getElementById("discontinued-metaobject");if(n){var i=JSON.parse(n.dataset.metaobjects);window.natureMade.stashedDiscontinuedProductData=window.natureMade.stashedDiscontinuedProductData||[];var o=i.map((function(e){var t;return null===(t=e.product)||void 0===t?void 0:t.split("/").pop()})).filter(Boolean).map((function(e){return parseInt(e)})),a=e.filter((function(e){return(null==e?void 0:e.id)&&o.includes(e.id)}
1));if(a.length){var r=[];if(a.forEach((function(e){window.natureMade.stashedDiscontinuedProductData.length&&window.natureMade.stashedDiscontinuedProductData.find((function(t){return t.productId==e.id}))||(r.push("gid://shopify/Product/".concat(e.id)),t.querySelectorAll(".product-card-v2-container__".concat(e.id,":not(.discontinued-product)")).forEach((function(e){var t=e.querySelector(".button-primary"),n=e.querySelector(".item-price");t&&t.classList.add("loading"),n&&n.classList.add("hide")})))})),r.length){var c="{\n            nodes(ids: ".concat(JSON.stringify(r),") {\n                ... on Product {\n                    id\n                    title\n                    variants(first: 10) {\n                        edges {\n                            node {\n                                id\n                                title\n                                price {\n                                    amount\n                                    currencyCode\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }");fetch("/api/2024-10/graphql.json",{method:"POST",headers:{"X-Shopify-Storefront-Access-Token":window.metafieldGlobalSettings.storefrontAccessToken,"Content-Type":"application/graphql"},body:c}).then((function(e){return e.json()})).then((function(e){e.data&&(e.data.nodes.forEach((function(e){if(e){var n=e.id.split("/"),o=n[n.length-1],a=e.variants.edges.map((function(e){var t=e.node.id.split("/");return{variant_id:t[t.length-1],variant_price:e.node.price.amount}})),r=i.filter((function(e){var t,n=null===(t=e.product)||void 0===t?void 0:t.split("/").pop();return o==n}));!function(e,n,i){if(e&&n.length&&i.length){var o=n.map((function(e){return e.variant_id})),a=i.filter((function(e){var t,n=null==e||null===(t=e.product_variant)||void 0===t||null===(t=t.split("/"))||void 0===t?void 0:t.pop();return n&&o.includes(n)}));if(a.length){var r=n.filter((function(e){var t=e.variant_id;return!a.find((function(e){var n=e.product_variant.split("/");return n[n.length-1]==t}))})).map((function(e){return e.variant_price})),c=a[0],s=(new Date).setHours(0,0,0,0),l=new Date(c.new_subscription_discontinuation_date).setHours(0,0,0,0)<=s,d=new Date(c.new_one_time_purchase_discontinuation_date).setHours(0,0,0,0)<=s,u=!!t.querySelector(".is-sold-out.product-card-v2-container__".concat(e)),f={productId:e,variantPrice:r[0],isDiscontinued:l&&d||!d&&u,hasOtherVariants:o.length!=a.length};window.natureMade.stashedDiscontinuedProductData.push(f),window.natureMade.updateDiscontinuedProductCards(t,f)}}}(o,a,r)}})),a.forEach((function(e){t.querySelectorAll(".product-card-v2-container__".concat(e.id)).forEach((function(e){var t=e.querySelector(".card-link .button-primary"),n=e.querySelector(".item-price");t&&t.classList.remove("loading"),n&&n.classList.remove("hide")}))})))})).catch((function(e){console.error(e)}))}}}}},function(){var e=document.querySelector("#glide-quote-slider.glide");if(e){var t=e.id;if(t){window.updateSlider||(window.updateSlider={});var n,i=function(e){!e&&window.updateSlider[t]||(!e.glideIsInitialized&&window.innerWidth<=989?(o(),e.glideIsInitialized=!0):e.glideIsInitialized&&window.innerWidth>989&&(window.natureMade.toggleGlideItemsAriaAttributes(e),e.destroy(),e.glideIsInitialized=!1))},o=function(){(n=new s.A(e,{type:"slider",perView:3,gap:0,breakpoints:{749:{perView:1.17},989:{perView:2.1}},rewind:!1,bound:!0}).mount()).glideIsInitialized=!0,window.updateSlider[t]=n,i(n),n.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(n),document.dispatchEvent(new CustomEvent("gTagging_user_action",{detail:{target:e,dataset:{event_type:"quote block slide"}}}))}))};o(),window.natureMade.toggleSliderBullets(window.updateSlider[t]),window.addEventListener("resize",window.debounce((function(){var e=n.index;window.updateSlider[t]||0==e||n.go("=0"),i(n),window.natureMade.toggleSliderBullets(window.updateSlider[t])}),300)),document.addEventListener("initGlide",(function(){o()})),document.addEventListener("toggleSlider",(function(){i(n)}))}}}()}(),Qe=function(e){window.OneTrust.IsAlertBoxClosedAndValid()||document.body.classList.add("one-trust-open"),new MutationObserver((function(e,t){window.OneTrust.IsAlertBoxClosedAndValid()&&document.body.classList.contains("one-trust-open")&&(document.body.classList.remove("one-trust-open"),document.dispatchEvent(new Event("oneTrustClosed")),t.disconnect())}
1)).observe(e,{attributes:!0,childList:!0,subtree:!0})},et=function(){var e;(e=document.querySelector("#onetrust-consent-sdk"))?Qe(e):window.natureMade.waitForElm("#onetrust-consent-sdk").then((function(e){Qe(e)})),window.natureMade.waitForElm("#klaviyo-bis-iframe").then((function(e){var t=document.getElementById("klaviyo-bis-iframe");new MutationObserver((function(e,n){var i,o=d(e);try{for(o.s();!(i=o.n()).done;)"attributes"==i.value.type&&("none"===t.style.display?document.body.classList.remove("bis-modal-open"):document.body.classList.add("bis-modal-open"))}catch(e){o.e(e)}finally{o.f()}})).observe(t,{attributes:!0})})),window.addEventListener("klaviyoForms",(function(e){"open"==e.detail.type?document.body.classList.add("klaviyo-form-open"):"close"==e.detail.type&&1==document.querySelectorAll('.kl-private-reset-css-Xuajs1 [data-testid="POPUP"]').length&&document.body.classList.remove("klaviyo-form-open")}))},document.addEventListener("DOMContentLoaded",(function(){et()})),window.addEventListener("load",(function(){var e,t=null===(e=Shopify.customerPrivacy)||void 0===e?void 0:e.marketingAllowed();localStorage.setItem("marketingAllowed",t)})),function(){window.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("[data-toggle-cart-preview]").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t=window.metafieldGlobalSettings.cartUpsellModal?window.metafieldGlobalSettings.cartUpsellModal:"algolia",n=document.querySelectorAll(".cart-preview-product-item")[0],i=n?n.dataset.productId:null;J("[data-algolia-cart-preview-upsells]",t,i)}))})),window.natureMade.waitForElm("#cart-notification.active").then((function(e){var t=window.metafieldGlobalSettings.addToCartModal?window.metafieldGlobalSettings.addToCartModal:"algolia",n=document.querySelectorAll(".cart-notification-product__info")[0],i=n?n.dataset.productId:null;J("[data-algolia-cart-upsells]",t,i)}))})),function(){var e={},t=function(t){if(t){var o="cart-icon-bubble-desktop"===t.id?"cart":"favorite";if(!e[o]){var a="cart"===o?window.metafieldGlobalSettings.persistentCartTooltipText||"Previous cart retrieved!":window.metafieldGlobalSettings.savedToFavoritesText,r=document.createElement("div");r.className="header-tooltip",r.id="".concat(o,"-tooltip"),r.setAttribute("role","status"),r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),r.innerHTML='\n            <div class="header-tooltip__content">\n                <span class="header-tooltip__message">'.concat(a,'</span>\n                <button \n                    class="header-tooltip__close" \n                    aria-label="Close notification"\n                    type="button">\n                    <svg width="10" height="10" viewBox="0 0 10 10">\n                        <rect y="0.9" width="1.2" height="12.8" transform="rotate(-45 0 0.9)" fill="#343438"/>\n                        <rect width="1.2" height="12.8" transform="matrix(-0.707 -0.707 -0.707 0.707 10 0.9)" fill="#343438"/>\n                    </svg>\n                </button>\n                <div class="header-tooltip__arrow-container" aria-hidden="true">\n                    <div class="header-tooltip__arrow"></div>\n                </div>\n            </div>\n        '),t.parentNode.insertBefore(r,t.nextSibling),e[o]={element:r,button:t,timeout:null},n(o),requestAnimationFrame((function(){r.classList.add("header-tooltip--show")})),r.querySelector(".header-tooltip__close").addEventListener("click",(function(){return i(o)}));var c=function(e){"Escape"===e.key&&i(o)};document.addEventListener("keydown",c);var s=setTimeout((function(){i(o)}),8e3);e[o].timeout=s,e[o].cleanup=function(){document.removeEventListener("keydown",c)}}}},n=function(t){var n=e[t];if(n){var i=n.element,o=n.button;if(i&&o){var a=o.getBoundingClientRect(),r=a.bottom+7-2,c=a.right-200-7,s=window.innerWidth;c+200>s&&(c=s-200-7),c<0&&(c=7),r+60>window.innerHeight&&(r=a.top-60-7),i.style.position="fixed",i.style.top="".concat(r,"px"),i.style.left="".concat(c,"px")}}},i=function(t){var n=e[t];if(n){var i=n.element,o=n.timeout,a=n.cleanup;null==a||a(),clearTimeout(o),i.classList.remove("header-tooltip--show");var r=setTimeout((function(){i.remove(),delete e[t]}),300);i.addEventListener("transitionend",(function n(){clearTimeout(r),i.removeEventListener("transitionend",n),i.remove(),delete e[t]}))}},o=window.debounce((function(){Object.keys(e).forEach(n)}),300);window.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o);var a=function(){var e=document.getElementById("cart-icon-bubble-desktop");t(e)},r=function(){var e=document.querySelector(".show-wishlist");t(e)};document.addEventListener("showPersistentModal",a),document.addEventListener("showFavoritesConfirmationModal",r)}(),function(){var e,t=function(t){t?(document.body.classList.add("klaviyo-popups-suppressed"),e&&(clearTimeout(e),e=null)):e=setTimeout((function(){if(document.body.classList.contains("zoom-chat-open"))return clearTimeout(e),void(e=null);document.body.classList.remove("klaviyo-popups-suppressed"),document.dispatchEvent(new Event("klaviyoPopupsSuppressionRemoved"))}),3e3)};document.querySelectorAll('.search__input[type="search"]').forEach((function(e){var n=e.closest("form");n&&(e.addEventListener("focus",(function(e){t(!0)})),e.addEventListener("blur",(function(e){var i=document.querySelector(".algolia-autocomplete");
1i&&(i.contains(document.activeElement)||n.contains(document.activeElement)?document.addEventListener("blur",(function e(){i.contains(document.activeElement)||n.contains(document.activeElement)||(t(!1),document.removeEventListener("blur",e,!0))}),!0):t(!1))})))}));var n=function(){document.addEventListener("zoomChatClosed",(function(){t(!1)})),document.addEventListener("zoomChatOpened",(function(e){t(!0)}))};window.zoomCampaignSdk?n():window.addEventListener("zoomCampaignSdk:ready",n)}();var e=function(){if(l){var e=document.querySelectorAll(".related-hits-container-product"),t=document.getElementById("product-handle-change-metaobject"),i=t?JSON.parse(t.dataset.metaobjects):null;e.forEach((function(e){var t=e.querySelector("ol.ais-Hits-list");if(t&&!e.classList.contains("loading")){e.classList.add("loading");var o=e.querySelector(".carousel-loader-container"),a=e.dataset.recommendModel,r=e.dataset.collectionFilter?'collections:"'.concat(e.dataset.collectionFilter,'"'):"",s="true"==e.dataset.glideDisable,d=parseInt(e.dataset.algoliaProductsCount);if("acf"==a)n(e),o&&o.remove(),t.classList.remove("hide");else{var u=e.dataset.objectId,f=e.dataset.objectHandle,m=function(a){var r;if((r=t.querySelectorAll(".ais-Hits-item.placeholder"))&&r.length&&r.forEach((function(e){e.remove()})),a.length>0){var c=document.querySelector("#article-related-products-heading");c&&c.hasAttribute("data-title")&&(c.innerHTML=c.getAttribute("data-title"))}var l=t.querySelector(".marketing-card"),d=1,u=!1;if(l){var f=t.dataset.mcPosition;f&&(d=parseInt(f)+1),d>a.length&&(u=!0)}a.sort((function(e,t){var n=function(e){var t,n=!0===(null===(t=e.meta)||void 0===t||null===(t=t.prodFields)||void 0===t?void 0:t.discontinued),i=e.variants_inventory_count<=0&&e.inventory_quantity<=0&&"deny"===e.inventory_policy;return n?2:i?1:0};return n(e)-n(t)})).forEach((function(e){var n=document.createElement("li");n.classList.add("ais-Hits-item"),n.innerHTML=R(e,i,e.handle),t.appendChild(n)})),l&&(u?t.appendChild(l):t.insertBefore(l,t.children[d])),document.getElementById("articles-related-products")&&t.querySelectorAll(".oos-item").forEach((function(e){return t.appendChild(e)})),t.classList.add("product-cards-loaded"),e.classList.remove("loading");var m=e.closest(".glide-related");if(m){var v,p=t.querySelectorAll("li").length;"shopify-related"==m||"algolia-related"==m||e.classList.contains("related-component")||e.dataset.hideViewMoreCard||(p+=1),window.natureMade.generateSliderBullets(null===(v=m.querySelector(".slider-bullets-container"))||void 0===v?void 0:v.querySelector(".glide__bullets"),p)}s||n(e),window.natureMade.getDiscontinuedVariantIds(a,e),o&&o.remove();var h=t.querySelector(".marketing-card")?a.length+1:a.length,g=t.closest(".collapsible-container");h>4&&g&&(g.classList.add("collapsible","listing-folded"),window.natureMade.initCollapsibleProductListing(g))},v=function(){l.getRecommendations({requests:[{indexName:c,model:"trending-items",threshold:0,maxRecommendations:d,queryParameters:{filters:r}}]}).then((function(e){var t=e.results;t.length&&t[0].hits&&0!=t[0].hits.length&&m(t[0].hits)})).catch((function(e){console.log(e)}))};"product"==a||"collection"==a?function(){if(0!=d){var e={requests:[Z({indexName:c,model:"related-products",objectID:u,threshold:0,maxRecommendations:d},f&&{queryParameters:{filters:"NOT handle:".concat(f)}})]};l.getRecommendations(e).then((function(e){var t=e.results;t.length&&t[0].hits&&0!=t[0].hits.length?m(t[0].hits):v()})).catch((function(e){v()}))}else m([])}():v()}}}))}},t=function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t.classList.contains("loaded")&&!t.classList.contains("loading")&&(t.classList.add("loading"),l)){var i=t.dataset.objectId,o=t.dataset.objectIdFallback,a=n?o:i;if(a&&""!=a){var r=!!document.body.classList.contains("page-type__product"),c=document.getElementById("tab-header-tab-related-collections"),s=document.getElementById("tab-content-tab-related-collections"),d=parseInt(t.dataset.maxRecommendations);l.getRecommendations({requests:[{indexName:"shopify_collections",model:"related-products",maxRecommendations:d,threshold:0,objectID:a,queryParameters:{facetFilters:["meta.accentuate.show_collection_in_algolia_sea:true"]}}]}).then((function(n){var i=n.results[0].hits,o=document.getElementById("shop_metafields");
1if(o){var a="",l="",d=t.querySelector(".marketing-card"),u=1,f=!1;if(d){var m=t.dataset.mcPosition;m&&(u=parseInt(m)),u>=i.length&&(f=!0)}if(i.length>0){var v;if(i.forEach((function(e){a+='\n                        <li class="ais-Hits-item glide__slide">\n                            '.concat(function(e,t){var n=e.handle,i=(e.image,e.title),o=(e.shop,e.meta),a=(e.tags,e.sku,e.objectID),r=e.__queryID,c=e.__position,s=t.collection_benefit_icon,l=t.collection_benefit_title,d=t.collection_benefits,u=(o.accentuate&&o.hero_banner&&o.hero_banner.hero_description&&o.hero_banner.hero_description.replace('["',"").replace('"]',""),o.accentuate&&o.accentuate.collection_title_plp?o.accentuate.collection_title_plp:""),f=o.accentuate&&o.accentuate.collection_button_text_plp?o.accentuate.collection_button_text_plp:"Shop Now",m="",v={};if(d.forEach((function(e){v[e.key]=e.index})),o.accentuate&&o.accentuate.collection_benefits_items){var p=JSON.parse(o.accentuate.collection_benefits_items);p=p.references.filter((function(e){return e.key in v})).map((function(e){var t=v[e.key],n={title:l[t],image:s[t][0]};m+='\n      <div class="icon-item-wrapper">\n          <img src="'.concat(n.image.src,'" loading="lazy" alt="').concat(n.image.alt,'">\n          <small>').concat(n.title,"</small>\n      </div>\n      ")}))}var h=o.accentuate&&o.accentuate.collection_card_image?JSON.parse(o.accentuate.collection_card_image):"",g=window.collectionCard.defaultAltText?window.collectionCard.defaultAltText.replace("#title",i):"Collection image for '".concat(i,"' Collection"),y="/collections/".concat(n);void 0!==r&&(y+="?&queryID=".concat(r));var w='data-reading-time-present="false" \n    data-keyword-highlighted="false" \n    data-content-type="collection" \n    data-objectid="'.concat(a,'" \n    ').concat(H?'data-search-query="'.concat(H,'"'):""," \n    ").concat(r?'data-queryid="'.concat(r,'"'):""," \n    ").concat(c?'data-position="'.concat(c,'"'):""," \n    ");return'\n        <div class="item-container item-container-with-benefits collection-card" '.concat(w,'>\n            <div class="item-title">\n                <a href="').concat(y,'">\n                    <h4 data-item-title>\n                        ').concat(M(""!=u?u:i),'\n                    </h4>\n                </a>\n            </div>\n            <div class="collection-card-image-wrapper small-12">\n                <div class="image-container">\n                    ').concat(""!=h?'\n                        <a href="'.concat(y,'">\n                            <img src="').concat(h[0].src,'&transform=resize=240" loading="lazy" alt="').concat(h[0].alt?h[0].alt:g,'" width="240" height="240" />\n                        </a>'):"",'\n                </div>\n            </div>\n\n            <div class="collection-benefit-items icon-item cell small-12 icon-section padding-vertical-0">\n                <div class="icon-items-wrapper">\n                ').concat(m,'\n                </div>\n            </div>\n            \n            <div class="item-content">\n                <a href="').concat(y,'" class="button button-primary" aria-label="').concat(f,'">\n                    <span>').concat(f,"</span>\n                </a>\n            </div>\n        </div>\n    ")}(e,JSON.parse(o.dataset.metafields)),"\n                        </li>\n                    ")})),l='\n                        <ol class="ais-InfiniteHits glide__slides">'.concat(a,"</ol>\n                    "),t.innerHTML=l,d){var p=t.querySelector(".ais-InfiniteHits");f?null==p||p.appendChild(d):null==p||p.insertBefore(d,p.children[u])}var h=t.closest(".glide-related-collections");if(!h)return;window.natureMade.generateSliderBullets(null===(v=h.querySelector(".slider-bullets-container"))||void 0===v?void 0:v.querySelector(".glide__bullets"),t.querySelectorAll("li").length),r&&c&&s&&(c.classList.remove("hide"),s.classList.remove("hide"));var g=h.closest(".collapsible-container");g&&i.length>4&&(g.classList.add("collapsible","listing-folded"),window.natureMade.initCollapsibleProductListing(g))}else e(t,!0)}})).catch((function(n){console.log(n),"ObjectID does not exist"==n.message?e(t,!0):function(){var e,n=t.closest("#related-section-tabs");if(!n)throw new Error("Could not find the main parent element.");null===(e=n.querySelector("#tab-header-collections"))||void 0===e||null===(e=e.nextElementSibling)||void 0===e||e.click(),n.classList.add("no-related-collections")}()})).finally((function(){t.classList.remove("loading"),t.classList.add("loaded")}))}}},n=function(e){var t=e.querySelector(".ais-Hits-list");
1if(t){var n=e.closest(".glide-related"),i=n?n.id:"",o=t.parentElement;t.classList.add("glide__slides"),o.classList.add("glide__track"),o.setAttribute("data-glide-el","track"),t.querySelectorAll(".ais-Hits-item").forEach((function(e){return e.classList.add("glide__slide")})),"shopify-related"==i||"algolia-related"==i||e.classList.contains("related-component")||e.dataset.hideViewMoreCard||(t.innerHTML+='\n              <li class="ais-Hits-item glide__slide">\n                  <div class="item-container is-last-item">\n                      <a class="styled-link-primary" href="/collections/best-sellers">View All Best Sellers</a>\n                  </div>\n              </li>\n          ');var a,r=""!=i?"#".concat(i,".glide-related"):".glide-related";!function(){(a=new s.A(r,{type:"slider",perView:4,gap:0,breakpoints:{645:{perView:2},989:{perView:3},99999:{perView:4}},rewind:!1,bound:!0}).mount()).glideIsInitialized=!0,window.updateSlider[r]=a;var e=document.querySelector("".concat(r," .glide__arrow--left")),t=document.querySelector("".concat(r," .glide__arrow--right")),n=document.querySelectorAll("".concat(r," .glide__slide")).length;V(a,n,e,t),a.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(a)}))}(),window.natureMade.toggleSliderBullets(window.updateSlider[r]),window.addEventListener("resize",window.debounce((function(e){0!=a.index&&a.go("=0"),window.natureMade.toggleSliderBullets(window.updateSlider[r])}),300))}},i=window.metafieldGlobalSettings,o=i.algoliaAppId,a=i.algoliaApiKey,c="shopify_products",l=o&&a?(0,G.M)(o,a):null,d=!1,u=null;document.querySelectorAll('.search__input[type="search"]').forEach((function(e){e.addEventListener("keydown",(function(e){9==e.keyCode?d=!1:8!=e.keyCode&&46!=e.keyCode||(d=!0)}))})),document.body.addEventListener("mousedown",(function(e){d=e.target.hasAttribute("data-index")})),document.querySelectorAll('.search__input[type="search"]').forEach((function(e){e.addEventListener("blur",(function(t){var n=e.closest("form");n&&(d?(u=t.target,e.click(),e.focus(),document.querySelectorAll(".suggestContainer").forEach((function(e){e.classList.add("hide-suggest-container")})),""==e.value&&document.querySelectorAll(".quick_search_list").forEach((function(e){e.classList.remove("hide")}))):n.contains(t.target)||(document.querySelectorAll(".quick_search_list").forEach((function(e){e.classList.add("hide")})),document.querySelectorAll(".suggestContainer").forEach((function(e){e.classList.remove("hide-suggest-container")})),u=null))}))})),document.addEventListener("visibilitychange",(function(e){"visible"==document.visibilityState&&(document.querySelectorAll('.search__input[type="search"]').forEach((function(e){e==document.activeElement&&(u=document.activeElement)})),null!=u&&(u.focus(),""==u.value&&(document.querySelectorAll(".suggestContainer").forEach((function(e){e.classList.add("hide-suggest-container")})),document.querySelectorAll(".quick_search_list").forEach((function(e){e.classList.remove("hide")})))))}));var f=window.metafieldGlobalSettings.externalDomainIgnoreList,m=(Array.isArray(f)?f:"string"==typeof f?JSON.parse(f||"[]"):[]).map((function(e){return e.replace(/^www\./,"").toLowerCase()})),v=window.location.hostname.replace(/^www\./,"").toLowerCase();document.querySelectorAll("a:not(.button-modal,.social-sharing a,a.clear-filters,a.continue-shopping)").forEach((function(e){var t=new URL(e.href).hostname.replace(/^www\./,"").toLowerCase();t===v||m.includes(t)||e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),window.open(e.href,"_blank")}))}));var p;window.addEventListener("DOMContentLoaded",(function(n){if(document.querySelectorAll(".aa-input.search__input").forEach((function(e){e.setAttribute("role","searchbox "),e.removeAttribute("aria-expanded")})),w=function(){var e;document.querySelectorAll(".show-wishlist-on").forEach((function(e){e.classList.remove("heart-loading")})),document.dispatchEvent(new CustomEvent("favoritesModalOpened"));var t=null===(e=document.getElementById("favorites-ymal-glide"))||void 0===e?void 0:e.id;window.updateSlider&&t&&window.updateSlider[t]&&window.updateSlider[t].glideIsInitialized&&window.updateSlider[t].update()},document.addEventListener("showFavorites",(function(){r.lX.show([{src:"#wishlist-product-list-modal",type:"inline"}],{mainClass:"product-list-modal",compact:!0,dragToClose:!1,on:{done:w}})})),document.addEventListener("showAccountEditModal",(function(e){var t=e.detail.targetModal,n=e.detail.targetField;r.lX.show([{src:t,type:"inline"}],{mainClass:"account-edit-modal",compact:!0,dragToClose:!1,on:{destroy:function(){!function(e){var t=document.querySelector(e),n=t.querySelector(".error-message"),i=t.querySelector(".success-message");n&&i&&(n.classList.add("hidden"),i.classList.add("hidden"))}(t)},done:function(){n&&n.focus()}}})})),document.addEventListener("closeAllFancyboxes",(function(){r.lX.close()})),"undefined"!=typeof searchTerms&&searchTerms){var i=null,o=Object.values(searchTerms.keywords),a=Object.values(searchTerms.links),c={mobile:{qsContainer:".mobile-search",cstReference:document.querySelector(".mobile-search .currentSuggestion"),flag:0,elmHeight:50,stopPoint:8},desktop:{qsContainer:".header__inline-menu .search",cstReference:document.querySelector(".header__inline-menu .search .currentSuggestion"),flag:0,elmHeight:50,stopPoint:8}};document.querySelectorAll("form.search").forEach((function(e){if(null!=(i=S()||null)){var t=e.querySelector(".field");t.addEventListener("click",(function(e){var n=window.innerWidth<990?"mobile":"desktop";if(document.activeElement.classList.contains("search_close_button"))document.querySelectorAll(".aa-input").forEach((function(e){e.value="",searchTerms.pauseLoop=!1})),document.querySelectorAll(".search_close_button").forEach((function(e){e.classList.add("hidden")}));else if(e.target.classList.contains("search__button")||e.target.classList.contains("icon-search")){if(t.querySelector(".aa-input").value.length>0)return void t.parentElement.submit();c[n].flag==c[n].stopPoint?x(searchTerms.virtualIndex-1):L()}else null!==i&&i.classList.contains("hide")&&L()})),t.addEventListener("focusout",(function(e){var n=t.querySelector(".aa-input");n&&0==n.value.length&&(t.querySelector(".suggestContainer").classList.remove("hide"),t.querySelector(".search_close_button").classList.add("hidden"),_(n))}));var n=e.querySelector(".aa-input");n&&(n.addEventListener("focusin",(function(){searchTerms.pauseLoop=!0})),n.addEventListener("focus",(function(){L()})),n.addEventListener("click",(function(e){b(!1,e.target),searchTerms.pauseLoop=!0})),n.addEventListener("input",(function(e){searchTerms.pauseLoop=!0,b(!1,e.target),k()})),(n.value||n==document.activeElement)&&b(!1,n));var a=null;e.addEventListener("mouseleave",(function(){!1===e.querySelector(".quick_search_list").classList.contains("hide")&&(a=setTimeout(k,1e3))})),e.addEventListener("mouseenter",(function(){clearTimeout(a)})),e.addEventListener("submit",(function(t){t.preventDefault();var n,i,a=e.querySelector(".aa-input");if(a&&a.value.length>0){var r=o.findIndex((function(e){return a.value.toLowerCase()===e.toLowerCase()})),c=(n=a.value,(i=function(e){if(!(n.length<=3&&e.indexOf(n.toLowerCase())<0)){var t=0;return JSON.parse(e).forEach((function(e){new RegExp("".concat(e.toLowerCase())).test(n.toLowerCase())&&t++})),t}})(window.metafieldGlobalSettings.commonArticleSearchTerms)?"articles":i(window.metafieldGlobalSettings.commonSupportTopicSearchTerms)?"support-topics":i(window.metafieldGlobalSettings.commonPageSearchTerms)?"pages":i(window.metafieldGlobalSettings.commonCollectionSearchTerms)?"collections":"");r>=0?x(r):c?window.location.href="/search?q=".concat(encodeURIComponent(a.value),"#").concat(c):(b(!1,t.target),e.submit())}}))}})),null!==i&&(i.addEventListener("blur",(function(e){e.target.hasAttribute("href")||k();var t=i.parentElement.querySelector(".aa-input");t&&(_(t),0==t.value.length&&b(!0,e.target))})),i.addEventListener("click",(function(e){"a"==e.target.tagName.toLowerCase()&&a[parseInt(e.target.getAttribute("data-index"))].length>0&&localStorage.setItem("persistSuggestedTerm",e.target.getAttribute("data-index"))})),i.addEventListener("mousedown",(function(e){"a"==e.target.tagName.toLowerCase()&&a[parseInt(e.target.getAttribute("data-index"))].length>0&&localStorage.setItem("persistSuggestedTerm",e.target.getAttribute("data-index"))}))),document.addEventListener("keydown",(function(e){if(document.activeElement.closest("form.search")&&("Enter"===e.key||"ArrowUp"===e.key||"ArrowDown"===e.key||"Tab"===e.key||"Escape"===e.key)){var t=i.parentElement.querySelector('input[type="search"]');if(0==i.classList.contains("hide")){searchTerms.pauseLoop=!0;var n=Array.from(i.children).indexOf(document.activeElement.parentElement);if("Enter"==e.key)e.preventDefault(),0==i.parentElement.querySelector(".aa-input").value.length&&(document.activeElement.hasAttribute("data-suggestion-index")||document.activeElement.hasAttribute("data-index"))?x(n):i.parentElement.querySelector(".aa-input").value.length>0&&i.parentElement.submit();else if((i=S()).children.length>0)if("ArrowUp"==e.key)if(e.preventDefault(),i.firstElementChild==document.activeElement.parentElement)t.focus();else if(document.activeElement==t)i.lastElementChild.querySelector("a").focus();else{var o;null===(o=document.activeElement.parentElement.previousElementSibling.querySelector("a"))||void 0===o||o.focus()}else if("ArrowDown"==e.key)if(e.preventDefault(),document.activeElement==t)i.firstElementChild.querySelector("a").focus();else if(i.lastElementChild==document.activeElement.parentElement)t.focus();else{var a;null===(a=document.activeElement.parentElement.nextElementSibling.querySelector("a"))||void 0===a||a.focus()}else if("Tab"==e.key){if(!i.contains(document.activeElement)&&!i.classList.contains("hide"))return void k();if(e.preventDefault(),e.shiftKey)if(window.innerWidth<990){var r=document.querySelectorAll(".header__icons a, .header__icons button");r.length&&r[r.length-1].focus()}else{var c=t.closest("li").previousElementSibling.querySelector("a,button");c&&c.focus()}else{var s=t.closest("form").querySelector("button:not(.hidden)");s&&s.focus()}i.contains(document.activeElement)||k()}else if("Escape"==e.key){if(i.classList.contains("hide"))return;if(!t)return void k();t.focus(),k()}}else t&&"ArrowDown"==e.key&&L()}})),window.addEventListener("resize",window.debounce((function(){var e=window.innerWidth<990?document.querySelector("".concat(c.mobile.qsContainer," .search__input")):document.querySelector("".concat(c.desktop.qsContainer," .search__input"));e&&(searchTerms.pauseLoop=!!e.value)}),300)),function(){var e=S(),t=localStorage.getItem("persistSuggestedTerm");null!==t&&-1!==window.location.href.indexOf(a[parseInt(t)])?(searchTerms.pauseLoop=!0,b(!1,e),e.parentElement.querySelector(".aa-input").value=o[parseInt(t)],e.parentElement.querySelector(".search_close_button").classList.remove("hidden"),sessionStorage.removeItem("persistSuggestedTerm")):-1!==window.location.href.indexOf("search?q=")&&sessionStorage.removeItem("persistSuggestedTerm")}(),T("desktop"),T("mobile");var s=document.querySelector("#related-products");if(s)if(C(s)&&s.offsetParent)e();else{var l=function(){return C(s,700)&&!s.querySelector(".ais-Hits-list.product-cards-loaded")},d=window.debounce((function(){l()&&s.offsetParent&&e()}),500);document.addEventListener("scroll",d);var u=new ResizeObserver((function(t){var n,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return X(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(c)throw a}}}}(t);try{for(i.s();!(n=i.n()).done;)n.value,l()&&s.offsetParent&&(e(),u.disconnect())}catch(e){i.e(e)}finally{i.f()}}));u.observe(document.querySelector("body"))}var f=document.querySelectorAll("form.search");null!==f&&f.forEach((function(e){e.addEventListener("submit",(function(e){e.target.querySelector(".aa-input")&&!e.target.querySelector(".aa-input").value.trim()&&(e.preventDefault(),e.target.querySelector(".aa-input").value="")}))}));var m=document.querySelector(".custom-related-products");if(m)if(C(m)||m.classList.contains("render-items-now"))e();else{var v=window.debounce((function(){C(m,400)&&!m.querySelector(".ais-Hits-list.product-cards-loaded")&&e()}),300);document.addEventListener("scroll",v)}var p=document.getElementById("related-collections");if(p){var h,g=!p.dataset.objectId;if(C(p)&&p.offsetParent)t(p,g);else{var y=window.debounce((function(){C(p,700)&&p.offsetParent&&t(p,g)}),500);document.addEventListener("scroll",y)}null===(h=document.getElementById("tab-header-tab-related-collections"))||void 0===h||h.addEventListener("click",(function(){return t(p,g)}))}}var w;function b(e,t){var n=t.closest("form"),i=n.querySelector(".aa-input"),o=n.querySelector(".suggestContainer");n&&o&&i&&(1==e?i.value&&(null==o||o.classList.remove("hide"),document.activeElement.blur()):(o.classList.add("hide"),o.removeAttribute("style")))}function S(){var e,t=(e=window.innerWidth<990?document.querySelector(c.mobile.qsContainer+" .quick_search_list"):document.querySelector(c.desktop.qsContainer+" .quick_search_list")).parentElement.querySelector(".field");return t&&(e.style.maxWidth=t.offsetWidth+"px"),e}function _(e){e.value?searchTerms.pauseLoop=!0:searchTerms.pauseLoop=!1}function E(e){if(!q())if(i||(i=S()),e){var t=i.querySelectorAll('[role="option"]').length;if(!t)return;document.querySelectorAll(".predictive-search-status").forEach((function(e){e.setAttribute("aria-hidden",!1),setTimeout((function(){e.textContent="Suggestions list expanded with ".concat(t," suggestions.")}),500)}))}else document.querySelectorAll(".predictive-search-status").forEach((function(e){e.textContent="",e.setAttribute("aria-hidden",!0)}))}function L(){if(1!=q()){searchTerms.pauseLoop=!0,document.querySelectorAll(".quick_search_list").forEach((function(e){if(!e.classList.contains("suggestions-initialized")){e.innerHTML="";for(var t=null,n=searchTerms.virtualIndex-1;n>=0;n--)(t=document.createElement("span")).setAttribute("role","presentation"),0==o[n].length?t.className="hide":(t.innerHTML='<a class="suggested_link '.concat(a[n]?"direct_link":"",'" href="').concat(a[n]?decodeURI(a[n]):"/search?q="+encodeURIComponent(o[n].replace("?","")),'" tabindex="0" role="option" target="_self" data-index="').concat(n,'">').concat(o[n],"</a>"),t.setAttribute("data-suggestion-index",n)),e.appendChild(t);for(var i=searchTerms.virtualIndex;i<=o.length-1;i++)(t=document.createElement("span")).setAttribute("role","presentation"),0==o[i].length?t.className="hide":(t.innerHTML='<a class="'.concat(a[i]?"direct_link":"",'" href="').concat(a[i]?decodeURI(a[i]):"/search?q="+encodeURIComponent(o[i].replace("?","")),'" tabindex="0" role="option" target="_self" data-index="').concat(i,'">').concat(o[i],"</a>"),t.setAttribute("data-suggestion-index",i)),e.appendChild(t);e.classList.add("suggestions-initialized")}})),I(),(i=S()).classList.remove("hide"),i.parentElement.querySelector(".currentSuggestion").classList.remove("hide");var e=i.parentElement.querySelector(".aa-input");e&&0==e.value.length&&b(!0,i);var t=i.closest("form");t&&(window.addEventListener("focusin",(function e(){if(!t.contains(document.activeElement)){if(!i.classList.contains("hide"))return t.contains(document.activeElement)?void 0:(k(),void window.removeEventListener("focusin",e));window.removeEventListener("focusin",e)}})),window.addEventListener("click",A),E(!0))}}function k(){(i=S()).classList.add("hide"),I(),i.closest("form")&&(window.removeEventListener("click",A),E(!1))}function A(e){var t=i.closest("form");t&&!t.contains(e.target)&&k()}function q(){var e=document.querySelectorAll(".algolia-autocomplete");if(!e||0===e.length)return!1;var t=!1;return e.forEach((function(e){"block"==e.style.display&&(t=!0)})),t}function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"desktop";i="desktop"==e?document.querySelector(c.desktop.qsContainer+" .quick_search_list"):document.querySelector(c.mobile.qsContainer+" .quick_search_list");var t=null!==searchTerms.rotationSpeed?1500*searchTerms.rotationSpeed:1500,n=null!==searchTerms.rotationSpeed?20*searchTerms.rotationSpeed:20;searchTerms.pauseLoop=!1;var a=!1,r=c[e].cstReference,s=c[e].elmHeight;setInterval((function(){0==searchTerms.pauseLoop&&0==a&&(r.classList.remove("hide"),r.style.top=++c[e].flag+"px",c[e].flag===c[e].stopPoint&&(a=!0,r.classList.remove("hide"),setTimeout((function(){a=!1}),t)),document.querySelector(c[e].qsContainer+" .field").offsetHeight+s/3<c[e].flag&&(r.innerHTML=o[searchTerms.virtualIndex],c[e].flag=-s/2,("mobile"==e&&window.innerWidth<990||"desktop"==e&&window.innerWidth>=990)&&(searchTerms.virtualIndex+1<=o.length-1?searchTerms.virtualIndex++:searchTerms.virtualIndex%=o.length-1)))}),n)}function I(){if(void 0!==c){var e=window.innerWidth<990?"mobile":"desktop";c[e].flag=c[e].stopPoint,c[e].cstReference.style.top=c[e].stopPoint+"px"}}function x(e){null!==a&&void 0!==a[e]&&(a[e].length>0?window.location.href=a[e]:window.location.href="/search?q="+encodeURIComponent(o[e].replace("?","")))}})),(p=document.querySelector("header"))&&document.querySelectorAll(".main-nav-dropdown-wrapper").forEach((function(e){e.style.height="calc(100vh - ".concat(p.clientHeight,"px)")})),Shopify.onCartUpdate=function(e){alert("There are now "+e.item_count+" items in the cart.")}
1,function(){var e=document.querySelector(".glide-experts");if(e){var t=new s.A(".glide-experts",{type:"slider",perView:4,gap:0,breakpoints:{1068:{perView:3,gap:10},868:{perView:1.25}},bound:!0}),n=e.querySelector(".glide__arrow.glide__arrow--left"),i=e.querySelector(".glide__arrow.glide__arrow--right"),o=e.querySelectorAll(".glide__slide").length;V(t,o,n,i),t.on("move.after",(function(){window.natureMade.toggleGlideItemsAriaAttributes(t)})),t.mount();var a=document.querySelectorAll(".glide-experts .glide__slides > li").length;t.on("move",(function(){var e=a-Math.floor(t.settings.perView),n=document.querySelector(t.selector+" .glide__arrow--right"),i=document.querySelector(t.selector+" .glide__arrow--left");e==t.index?(n.classList.add("is-disabled"),n.disabled="disabled"):(n.classList.remove("is-disabled"),n.disabled=""),0==t.index?(i.classList.add("is-disabled"),i.disabled="disabled"):(i.classList.remove("is-disabled"),i.disabled="")})),window.addEventListener("resize",window.debounce((function(){0!=t.index&&t.go("=0")}),300))}}()}(),re(),function(){var e=document.querySelector(".help-center-related-articles[data-help-center-related]");if(e){var t=e.querySelector(".blog-articles");if(t){var n=e.dataset.algoliaRelatedResources,i=e.dataset.blogTitle;if(n&&document.querySelector("[data-articles-temp-container]")){var o=JSON.parse(n),a=e.dataset.articleCategories,r=e.dataset.fallbackTags,c=e.dataset.overrideQuery,s="",l=[];if(c)s=c;else if(a){var d=JSON.parse(a);d.length>0&&(s=d[0],l=d.slice(1,49))}else if(r){var u=JSON.parse(r),f=["tablet","Nature Made®","New","New Look","tags-merged-via-api","2-pack-subscription","featured-flag-best-seller","featured-flag-new","wellblends-flag-new-look"];l=Array.isArray(u)?u.filter((function(e){return!f.includes(e)})).slice(0,49):[]}!s&&o.title&&(s=o.title.replace(/(^[0-9]+[ ,\t,\r,\n]+)|([ ,\t,\r,\n]+[0-9]+[ ,\t,\r,\n]+)/g," ").replace("  "," "));var m=o.id?" AND NOT objectID:".concat(o.id):"",v='blog.title:"'.concat(i||"Health Articles",'"').concat(m),p=[];l.forEach((function(e){p.push({indexName:"shopify_articles",query:e,params:{hitsPerPage:6,filters:v,clickAnalytics:!0},ruleContexts:["help_center_related","article"]})})),p.push({indexName:"shopify_articles",query:s,params:{hitsPerPage:6,filters:v,clickAnalytics:!0},ruleContexts:["help_center_related","article"]}),B.search(p,{strategy:"stopIfEnoughMatches"}).then((function(e){var n=e.results,i=0,o=[],a="";n.forEach((function(e){e.hits.forEach((function(e){if(i<2&&!o.includes(e.objectID)){o.push(e.objectID);var t="/blogs/"+e.blog.handle+"/"+e.handle,n=function(e){if(!e)return"";e=e.replace(/<style[^>]*>[\s\S]*?<\/style>/gi,"");var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}(e.body_html||"").substring(0,150);a+='\n                            <div class="article-item help-center-article-card">\n                                <div class="article-item-inner">\n                                    <a href="'.concat(t,'" class="article-link">').concat(e.title,'</a>\n                                    <div class="article-excerpt">\n                                        ').concat(n?n+"...":"","\n                                    </div>\n                                </div>\n                            </div>\n                        "),i++}}))})),t.innerHTML=a,t.classList.remove("has-card-placeholders")})).catch((function(e){console.error("Care Center Related Articles Error:",e),t.classList.remove("has-card-placeholders")}))}}}}(),document.querySelector("#articles-list-wrapper")&&Oe(),Ee(),document.addEventListener("DOMContentLoaded",(function(){if(document.addEventListener("favoritesModalOpened",(function(){var e=document.querySelector("#wishlist-product-list-modal .trending-items");Pe(e)})),document.querySelector(".account-favorites-product-list")){var e=document.querySelector(".account-favorites-product-list .trending-items");Pe(e)}})),function(){window.nmGtagDebug&&console.log("[gtag-triggers] Initializing gtag triggers");var e=window.nmGtagTriggers||[];window.dataLayer=window.dataLayer||[],window.natureMade.queued_gtag_events=[];var t=function(e,t){return Object.keys(t).forEach((function(n){var i=n.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();t[n]&&(e[i]=t[n])})),e},n="nm_fired_nav_events",i=function(){var e=document.cookie.split("; ").find((function(e){return e.startsWith(n+"=")}));if(!e)return{};try{return JSON.parse(decodeURIComponent(e.split("=")[1]))}catch(e){return window.nmGtagDebug&&console.log("[gtag-triggers] Failed to parse navigation cookie",e),{}}},o=function(e){var t=i();t[e]=!0,function(e){var t=encodeURIComponent(JSON.stringify(e));document.cookie="".concat(n,"=").concat(t,"; path=/")}
1(t),window.nmGtagDebug&&console.log("[gtag-triggers] Marked navigation event as fired: ".concat(e))};document.cookie="".concat(n,"=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC;"),window.nmGtagDebug&&console.log("[gtag-triggers] Cleared navigation event cookie");var a=function(e,n){var i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=n.send_to,c=n.html_attribute,s=n.include_dataset&&Object.keys(e.dataset).length>0?" "+JSON.stringify(e.dataset):"",l=c?e.getAttribute(c):"",d="".concat(l||"").concat(s||"").trim(),u={send_to:r,page_path:window.location.pathname,page_title:document.title,page_location:window.location.href,event_label:d,interaction_type:a};if(n.map_dataset_into_event_model_properties&&e.dataset&&t(u,e.dataset),null!==(i=n.custom_attributes)&&void 0!==i&&i.length&&(null===(o=n.custom_attributes)||void 0===o||o.forEach((function(e){if(e.includes(":")){var t=(o=e.split(":"),a=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,a,r,c=[],s=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(i=a.call(n)).done)&&(c.push(i.value),c.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(l)throw o}}return c}}(o,a)||Je(o,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),n=t[0],i=t[1];u[n]=i}var o,a}))),n.apply_common_parameters&&n.apply_common_parameters.length){var f,m=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Je(e))){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,r=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return r=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==n.return||n.return()}finally{if(c)throw a}}}}(n.apply_common_parameters);try{for(m.s();!(f=m.n()).done;){var v=f.value;$e[v]&&("function"==typeof $e[v]?u[v]=$e[v]():u[v]=$e[v])}}catch(e){m.e(e)}finally{m.f()}}return u},r=function(e,t){window.nmGtagDebug&&console.log('[gtag-triggers] gtag function not available, queuing event "'.concat(e,'"'),t),window.natureMade.queued_gtag_events.push({name:e,payload:t})},c=function(e,t){window.nmGtagDebug&&console.log('[gtag-triggers] Analytics consent not available, queuing event "'.concat(e,'"'),t),window.natureMade.queued_gtag_events.push({name:e,payload:t}),window.natureMade.hasVisitorConsentListener||(document.addEventListener("visitorConsentCollected",Ze),window.natureMade.hasVisitorConsentListener=!0)},s=function(e,t){window.gtag("event",e,t),window.nmGtagDebug&&console.log('[gtag-triggers] Sent gtag event for "'.concat(e,'"'),t)},l=function(e,t){if(e.fire_once){window.firedEventTargets=window.firedEventTargets||new Set;var n={action:e.action,target:t};return n.id=t.id||t.dataset.objectid||null,window.firedEventTargets.add(n),window.nmGtagDebug&&console.log('[gtag-triggers] Removed "'.concat(e.name,'" (fire_once triggered)')),!1}},d=function(e,t){return!!e.fire_once&&(window.firedEventTargets=window.firedEventTargets||new Set,!!Array.from(window.firedEventTargets).find((function(n){return n.action===e.action&&(n.id==t.id||n.id==t.dataset.objectid||n.target===t)})))},u=function t(){var n=e.filter((function(e){var t;return e.action===Ye.VIEW&&e.name&&(null===(t=e.selectors)||void 0===t?void 0:t.length)&&e.send_to}));if(n.length){var i=n.reduce((function(e,t){var n=t.view_threshold||1;return e[n]||(e[n]=[]),e[n].push(t),e}),{});Object.values(i).forEach((function(t){var n=new IntersectionObserver((function(t,n){t.forEach((function(t){if(t.isIntersecting){var i=e.find((function(e){return e.selectors.some((function(n){return e.action===Ye.VIEW&&t.target.matches(n)}))}));if(null!=i&&i.fire_once&&d(i,t.target))return;if(i){var o,u=a(t.target,i,i.interaction_type_override||Ye.VIEW);if("function"!=typeof window.gtag)return void r(i.name,u);if("yes"!==(null===(o=window.Shopify)||void 0===o||null===(o=o.customerPrivacy)||void 0===o?void 0:o.currentVisitorConsent().analytics))return c(i.name,u),l(i,t.target),void(i.fire_once&&n.unobserve(t.target));s(i.name,u),l(i,t.target),i.fire_once&&n.unobserve(t.target),i.fires_gtagging_user_action&&document.dispatchEvent(new CustomEvent("gTagging_user_action",{detail:{target:t.target}}))}}}))}),{threshold:parseFloat(t[0].view_threshold)}),i=new Set;
1t.forEach((function(e){e.selectors.forEach((function(t){document.querySelectorAll(t).forEach((function(t){e.fire_once&&d(e,t)||i.add(t)}))}))})),i.forEach((function(e){return n.observe(e)})),Xe.push(n)})),document.addEventListener("newElementsLoaded",(function(){Xe.forEach((function(e){return e.disconnect()})),Xe=[],t()}),{once:!0})}},f=function(){var e=(window.dataLayer||[]).slice().reverse().find((function(e){return"vwo-data-push-ga4"===e.event}));return e&&e.vwo_exp_variant_string?e.vwo_exp_variant_string:""};document.addEventListener("DOMContentLoaded",(function(){var n,m;!function(){var t=e.filter((function(e){var t;return e.action===Ye.CLICK&&e.name&&(null===(t=e.selectors)||void 0===t?void 0:t.length)&&e.send_to}));if(t.length){var n,i,o=function(e,t,n){var i;if(t&&(null==n||!n.fire_once||!d(n,t))){var o=a(t,n,n.interaction_type_override||Ye.CLICK);if("function"==typeof window.gtag){if("yes"!==(null===(i=window.Shopify)||void 0===i||null===(i=i.customerPrivacy)||void 0===i?void 0:i.currentVisitorConsent().analytics))return c(n.name,o),void l(n,t);if("A"===e.target.tagName&&e.target.href||e.target.closest("a")){var u="A"===e.target.tagName?e.target:e.target.querySelector("a")||e.target.closest("a");window.nmGtagDebug&&console.log("[gtag-triggers] Link click detected, preventing default navigation for gtag event."),e.preventDefault(),o.event_callback=function(){return window.location.href=u.href},window.natureMade.lastClickedElement=u}s(n.name,o),l(n,t),n.fires_gtagging_user_action&&document.dispatchEvent(new CustomEvent("gTagging_user_action",{detail:{target:t}}))}else r(n.name,o)}};(n=t.filter((function(e){return!0!==e.dynamically_rendered}))).length&&n.map((function(e){return e.selectors})).flat().forEach((function(e){document.querySelectorAll(e).forEach((function(e){e.addEventListener("click",(function(e){var t=n.find((function(t){return t.selectors.some((function(n){return t.action===Ye.CLICK&&e.currentTarget.matches(n)}))}));o(e,e.currentTarget,t)}))}))})),(i=t.filter((function(e){return!0===e.dynamically_rendered}))).length&&document.addEventListener("click",(function(e){var t=e.target,n=i.find((function(e){return e.selectors.some((function(n){return e.action===Ye.CLICK&&(t.matches(n)||t.closest(n))}))}));if(n){var a=n.selectors.find((function(e){return t.matches(e)||t.closest(e)}));t.matches(a)||(t=t.closest(a)),o(e,t,n)}}))}}(),u(),function(){var t=e.filter((function(e){var t;return e.action===Ye.EXPAND&&e.name&&(null===(t=e.selectors)||void 0===t?void 0:t.length)&&e.send_to}));if(t.length){var n=function(t){var n=t.target,o=e.find((function(e){return e.selectors.some((function(t){return e.action===Ye.EXPAND&&(n.matches(t)||n.closest(t))}))}));if(o){var a=o.selectors.find((function(e){return n.matches(e)||n.closest(e)}));n.matches(a)||(n=n.closest(a)),i(n,o)}},i=function(e,t){var n;if(("true"===e.getAttribute("aria-expanded")||e.classList.contains("is-active")||e.hasAttribute("open"))&&(!t.fire_once||!d(t,e))){var i=a(e,t,t.interaction_type_override||Ye.EXPAND);if("function"==typeof window.gtag){if("yes"!==(null===(n=window.Shopify)||void 0===n||null===(n=n.customerPrivacy)||void 0===n?void 0:n.currentVisitorConsent().analytics))return c(t.name,i),void l(t,e);s(t.name,i),l(t,e),t.fires_gtagging_user_action&&document.dispatchEvent(new CustomEvent("gTagging_user_action",{detail:{target:e}}))}else r(t.name,i)}};!function(){var e=t.filter((function(e){return!0!==e.dynamically_rendered}));if(e.length){var o=e.map((function(e){return e.selectors})).flat(),a=function(t){if(t.currentTarget.open){var n=e.find((function(e){return e.selectors.some((function(n){return e.action===Ye.EXPAND&&t.currentTarget.matches(n)}))}));n&&i(t.currentTarget,n)}};o.forEach((function(e){document.querySelectorAll(e).forEach((function(e){if("DETAILS"===e.tagName)e.addEventListener("toggle",a);else if("SUMMARY"===e.tagName){var t=e.closest("details");if(!t)return;t.addEventListener("toggle",a)}else e.addEventListener("click",n)}))}))}}(),t.filter((function(e){return!0===e.dynamically_rendered})).length&&document.addEventListener("click",n)}}(),function(){if(e.some((function(e){return e.action===Ye.INPUT}))){var t=function(t){var n,i=t.target,o=e.find((function(e){return e.action===Ye.INPUT&&e.selectors.some((function(e){return i.matches(e)}))}));if(o&&(!o.fire_once||!d(o,i))){var u=a(i,o,o.interaction_type_override||Ye.INPUT);if("function"==typeof window.gtag){if("yes"!==(null===(n=window.Shopify)||void 0===n||null===(n=n.customerPrivacy)||void 0===n?void 0:n.currentVisitorConsent().analytics))return c(o.name,u),void l(o,i);s(o.name,u),l(o,i)}else r(o.name,u)}},n=e.filter((function(e){return e.action===Ye.INPUT&&!0!==e.dynamically_rendered}));!function(){if(n.length){var e=n.map((function(e){return e.selectors})).flat();e.length&&e.forEach((function(e){var n=document.querySelectorAll(e);
1n.length&&n.forEach((function(e){return e.addEventListener("input",t)}))}))}}(),e.filter((function(e){return e.action===Ye.INPUT&&!0===e.dynamically_rendered})).length&&document.addEventListener("input",t)}}(),function(){if(e.some((function(e){return e.action===Ye.SUBMIT}))){var t=function(t){var n,i=t.target,o=e.find((function(e){return e.action===Ye.SUBMIT&&e.selectors.some((function(e){return i.matches(e)}))}));if(o)if(t.preventDefault(),o.fire_once&&d(o,i))i.submit();else{var u=a(i,o,o.interaction_type_override||Ye.SUBMIT);if("function"!=typeof window.gtag)return r(o.name,u),void i.submit();if("yes"!==(null===(n=window.Shopify)||void 0===n||null===(n=n.customerPrivacy)||void 0===n?void 0:n.currentVisitorConsent().analytics))return c(o.name,u),l(o,i),void i.submit();s(o.name,u),l(o,i),i.submit()}},n=e.filter((function(e){return e.action===Ye.SUBMIT&&!0!==e.dynamically_rendered}));!function(){if(n.length){var e=n.map((function(e){return e.selectors})).flat();e.length&&e.forEach((function(e){var n=document.querySelectorAll(e);n.length&&n.forEach((function(e){e.addEventListener("submit",(function(e){e.preventDefault(),t(e)}))}))}))}}(),e.filter((function(e){return e.action===Ye.SUBMIT&&!0===e.dynamically_rendered})).length&&document.addEventListener("submit",(function(e){t(e)}))}}(),(n=e.filter((function(e){return e.action===Ye.USER_ACTION}))).length&&document.addEventListener("gTagging_user_action",(function(e){var i,o,u,f=null===(i=e.detail)||void 0===i?void 0:i.target;if(f){var m=n.find((function(e){return e.action===Ye.USER_ACTION&&e.selectors.some((function(e){return f.matches(e)||f.closest(e)}))}));if(m&&(!m.fire_once||!d(m,f))){m.stop_on_first_match&&(n=n.filter((function(e){return e!==m})));var v=a(f,m,m.interaction_type_override||Ye.USER_ACTION);if(null!==(o=e.detail)&&void 0!==o&&o.dataset&&(v=t(v,e.detail.dataset)),"function"==typeof window.gtag){if("yes"!==(null===(u=window.Shopify)||void 0===u||null===(u=u.customerPrivacy)||void 0===u?void 0:u.currentVisitorConsent().analytics))return c(m.name,v),void l(m,f);s(m.name,v),l(m,f)}else r(m.name,v)}}})),m=new URLSearchParams(window.location.search),$e.pdp_template=m.has("view")?m.get("view"):"default",$e.exp_variant_string=f,function(){var t=e.filter((function(e){return e.action===Ye.NAVIGATE}));if(t.length){var n=t.map((function(e){return e.selectors})).flat();0!=document.querySelectorAll(n).length&&navigation.addEventListener("navigate",(function(e){var n,l=e.sourceElement||document.activeElement||window.natureMade.lastClickedElement;if(l){var d=t.find((function(e){return e.selectors.some((function(e){return l.matches(e)}))}));if(d)if(d.fire_once&&(u=d.name,!0===i()[u]))window.nmGtagDebug&&console.log('[gtag-triggers] Navigation event "'.concat(d.name,'" already fired (fire_once), skipping'));else{var u,f=a(l,d,d.interaction_type_override||Ye.NAVIGATE);if("function"!=typeof window.gtag)return r(d.name,f),void(d.fire_once&&o(d.name));if("yes"!==(null===(n=window.Shopify)||void 0===n||null===(n=n.customerPrivacy)||void 0===n?void 0:n.currentVisitorConsent().analytics))return c(d.name,f),void(d.fire_once&&o(d.name));s(d.name,f),d.fire_once&&o(d.name)}}}))}}()}))}(),function(){var e=window.customerData,t=window.natureMade.getCookie("combined_cart");if(e&&"true"!=t){var n=[],i=[],o=e.persistent_cart,a=e.cart;if(!o.length&&!a.length)return void window.natureMade.setCookie("combined_cart","true");o.length?(a.length&&a.forEach((function(e){return n.push(e)})),o.forEach((function(e){var t=e.variantID,o=e.line_item_properties,r=o._bundle_variant_id,c=e,s=!1;a.length?(a.forEach((function(e){var n=e.variantID,i=e.line_item_properties._bundle_variant_id;if(t==n&&r==i)return s=!0,void(c=e)})),s||Array.isArray(o)||(i.push(e),n.push(c))):Array.isArray(o)||(i.push(e),n.push(c))}))):a.length&&(n=a),window.natureMade.addToCustomerCart(n,i)}}(),window.addEventListener("DOMContentLoaded",(function(){var e,t,n=document.querySelector(".customer.login"),i=document.querySelector(".customer.register"),o=document.querySelector(".customer.account");t=null==(e=sessionStorage.getItem("returnToPage"))?void 0:e.split("?")[0],e&&window.customerData&&window.location.pathname!=t&&("/account"!=window.location.pathname&&"/"!=window.location.pathname||(window.location.href=e)),function(e){if(e){var t=Be("favorites"),n=He("return_url"),i=e.querySelector('[name="return_to"]');t?i&&(i.value="".concat(n)):i&&(i.value="/account?welcomeback")}}(n),function(e){if(e){var t=Be("favorites"),n=He("return_url"),i=e.querySelector("[data-return-url]");
1if(t){i&&(i.href="/account/login?return_url=".concat(n,"&favorites")),e&&e.classList.add("visible");var o=window.metafieldGlobalSettings.favoriteCreateAccountHeading,a=e.querySelector("[data-register-title]");a&&o&&(a.textContent=o,a.style.textTransform="none");var r=e.querySelector("[data-favorite-sign-in]");r&&r.classList.remove("hidden");var c=e.querySelector("[data-regular-description]");c&&c.classList.add("hidden"),e&&e.classList.add("visible"),sessionStorage.setItem("returnToPage",n)}else e&&e.classList.add("visible")}}(i),function(e){var t=document.getElementById("tab_my-account");if(e&&t){var n=Be("order-history"),i=Be("welcomeback"),o=e.querySelector("[data-login-message]");o&&(o.textContent=i?"Welcome Back":n?"Order History":"Account Details",o.classList.add("visible"));var a=document.getElementById("tab_order-history"),r=document.getElementById("tab_my-account");a&&r&&(n||i?a.classList.remove("hidden"):r.classList.remove("hidden"));var c=document.querySelectorAll(".sidebar-account-link");c.length&&c.forEach((function(e){(e.classList.contains("sidebar-link_account-details")||e.classList.contains("sidebar-link_order-history"))&&(e.querySelector(".link").classList.add("hide"),e.querySelector(".trigger").classList.remove("hide")),e.classList.contains("sidebar-link_account-details")?n||i||e.classList.add("active"):(n||i)&&e.classList.add("active")}))}}(o)})),it=function(e){function t(){var e,n,i,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=this,i=We(i=t),(e=ze(n,Ve()?Reflect.construct(i,[],We(n).constructor):i.apply(n,o))).controlButton=e.querySelector("button.accordion-title"),e.content=e.querySelector(".accordion-content"),e.controlButton&&e.content?(e.controlButton.addEventListener("mousedown",e.mouseDown.bind(e)),e.controlButton.addEventListener("click",e.toggleAccordion.bind(e)),e.content.addEventListener("transitionend",e.transitionEnd.bind(e)),e.classList.contains("is-active")||(e.content.style.display="none"),e):ze(e)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ge(e,t)}(t,e),n=t,(i=[{key:"mouseDown",value:function(){this.classList.contains("is-active")||this.content.style.removeProperty("display")}},{key:"transitionEnd",value:function(){this.classList.contains("is-active")||(this.content.style.display="none")}},{key:"toggleAccordion",value:function(){this.classList.toggle("is-active");var e=this.classList.contains("is-active");this.controlButton.setAttribute("aria-expanded",e),this.content.setAttribute("aria-hidden",!e),e&&this.content.style.removeProperty("display")}}])&&Fe(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ue(HTMLElement)),customElements.define("accordion-item",it),function(){var e=document.querySelectorAll(".faq-expert-button");if(e.length){e.forEach((function(e){e.addEventListener("click",(function(a){var r=this.closest(".faq-expert-item"),c=this.getAttribute("data-open"),s=document.getElementById(c);if(s&&r){document.querySelectorAll(".faq-expert-modal:not(.hide)").forEach((function(e){e!==s&&t(e)})),r.classList.toggle("active"),s.classList.toggle("hide");var l=s.classList.contains("hide");s.setAttribute("aria-hidden",l),e.setAttribute("aria-expanded",!l),o(s),document.addEventListener("click",n),document.addEventListener("keydown",i)}}))})),document.querySelectorAll(".faq-expert-modal-close").forEach((function(e){e.addEventListener("click",(function(){var n,i=e.closest(".faq-expert-modal");if(i){var o=null===(n=i.closest(".faq-expert-item"))||void 0===n?void 0:n.querySelector(".faq-expert-button");t(i,o)}}))})),window.addEventListener("resize",window.debounce((function(){var e=document.querySelector(".faq-expert-modal:not(.hide)");e&&o(e)}),300));var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e){var o=e.closest(".faq-expert-item"),a=null==o?void 0:o.querySelector(".faq-expert-button");null==o||o.classList.remove("active"),e.classList.add("hide"),e.setAttribute("aria-hidden","true"),null==a||a.setAttribute("aria-expanded","fal
1se"),document.removeEventListener("click",n),document.removeEventListener("keydown",i),null==t||t.focus()}},n=function(e){var n=document.querySelector(".faq-expert-modal:not(.hide)");if(n&&!n.contains(e.target)&&!e.target.classList.contains("faq-expert-button")&&!e.target.closest(".faq-expert-button")){var i,o=null===(i=n.closest(".faq-expert-item"))||void 0===i?void 0:i.querySelector(".faq-expert-button");t(n,o)}},i=function(e){var n=document.querySelector(".faq-expert-modal:not(.hide)");if(n&&"Escape"===e.key){var i,o=null===(i=n.closest(".faq-expert-item"))||void 0===i?void 0:i.querySelector(".faq-expert-button");t(n,o)}},o=function(e){if(e){var t=e.closest(".faq-expert-item");if(t){var n=t.querySelector(".faq-expert-tooltip-icon");if(n){var i=window.innerWidth,o=n.getBoundingClientRect(),a=t.getBoundingClientRect(),r=5.6-(o.bottom-a.top),c=o.right-a.left+18;e.classList.contains("third")&&i>=1200?(r=o.bottom-a.top+17,c=o.left-a.left-132):i<=640&&(r=o.bottom-a.top+19,c=0),e.style.top="".concat(r,"px"),e.style.left="".concat(c,"px")}}}}}}(),function(){var e="kl-post-identification-sync";try{var t=localStorage.getItem(e);if(!t)return;var n=JSON.parse(t);if(!Array.isArray(n))return;var i=Date.now(),o=n.filter((function(e){if(!e.time)return!0;var t=new Date(e.time).getTime();return!isNaN(t)&&i-t<=6048e5}));localStorage.setItem(e,JSON.stringify(o))}catch(t){localStorage.removeItem(e)}}(),tt=function(){var e;window.zoomCampaignSdk.close(),document.dispatchEvent(new Event("zoomChatClosed"));var t=window.natureMade.getCookie("activeChatCampaign");t&&null!==(e=window.natureMade)&&void 0!==e&&e.isHelpCenterPage?document.dispatchEvent(new CustomEvent("zoomChatOpened",{detail:{campaignId:t}})):(window.zoomCampaignSdk.changeCampaign(window.natureMade.defaultChatCampaignId),window.natureMade.setCookie("activeChatCampaign",window.natureMade.defaultChatCampaignId,.041),window.zoomCampaignSdk.show(),document.dispatchEvent(new CustomEvent("zoomChatOpened")))},nt=function(){var e;window.natureMade=window.natureMade||{};var t=document.getElementById("chatButton");if(t){t.classList.remove("hidden");var n,i,o=document.querySelector(".back-to-top"),a=document.querySelector(".promo-bar-product");if((i=null===(n=window.metafieldGlobalSettings)||void 0===n||null===(n=n.chat_widget_config)||void 0===n||null===(n=n.chat_campaign_ids.find((function(e){return e.includes("default")})))||void 0===n?void 0:n.split(":").reverse()[0])&&(window.natureMade.defaultChatCampaignId=i),t.classList.contains("draggable")){if(t._dragInitialized)return;t._dragInitialized=!0;var r=!1,c=!1,s=0,l=0,d=0,u=0,f=null,m=function(){if(o){var e=t.getBoundingClientRect(),n=o.getBoundingClientRect();if(!(n.left-e.right>=0)){var i=n.bottom-e.top;n.right,e.left,e.bottom,n.top,i>0&&i<o.offsetHeight&&(o.style.bottom="".concat(window.innerHeight-e.top+10,"px"))}}};o.addEventListener("transitionend",(function(){document.body.classList.contains("chat-button-relocated")||m()}));var v=function(){var e,n;e=t.style.left,n=t.style.top,e&&n&&"auto"!==e&&"auto"!==n&&function(){if(!o)return!1;var e=t.getBoundingClientRect(),n=o.offsetHeight+20+(a?a.offsetHeight:0),i=o.offsetWidth+20,r=window.innerWidth-e.right>i||window.innerHeight-e.bottom>=n;return r?o.style.bottom="":m(),r}()?document.body.classList.add("chat-button-relocated"):document.body.classList.remove("chat-button-relocated")};!function(){var e=window.chatButtonPosition;if(e){var n=parseFloat(e.left),i=parseFloat(e.top);if(!isNaN(n)&&!isNaN(i)){var o=Math.max(0,Math.min(n,window.innerWidth-t.offsetWidth)),a=Math.max(0,Math.min(i,window.innerHeight-t.offsetHeight));t.style.left="".concat(o,"px"),t.style.top="".concat(a,"px"),t.style.right="auto",t.style.bottom="auto",v()}}}(),v();var p=window.innerWidth,h=window.innerHeight,g=t.offsetWidth,y=t.offsetHeight;t.style.touchAction="none";var w=function(){p=window.innerWidth,h=window.innerHeight,g=t.offsetWidth,y=t.offsetHeight;var e=parseFloat(t.style.left)||t.getBoundingClientRect().left,n=parseFloat(t.style.top)||t.getBoundingClientRect().top,i=e,o=n;e+g>p&&(i=p-g);var r=document.body.classList.contains("show-sticky-bar")&&(null==a?void 0:a.offsetHeight)||0,c=h-y-r;(n+y>h||n>c)&&(o=c),e<0&&(i=0),n<0&&(o=0),i===e&&o===n||(t.style.left="".concat(Math.max(0,i),"px"),t.style.top="".concat(Math.max(0,o),"px"))},b=function(e){if(r){var n=e.clientX-s,i=e.clientY-l;e.preventDefault(),f&&cancelAnimationFrame(f),f=requestAnimationFrame((function(){!function(e,n){(Math.abs(e)>5||Math.abs(n)>5)&&(c=!0);var i=d+e,o=u+n;i=Math.max(0,Math.min(i,p-g));var r=document.body.classList.contains("show-sticky-bar")&&(null==a?void 0:a.offsetHeight)||0,s=h-y-r;o=Math.max(0,Math.min(o,s)),t.style.left="".concat(i,"px"),t.style.top="".concat(o,"px"),t.style.right="auto",t.style.bottom="auto"}(n,i)}))}},S=function e(){r=!1,t.style.cursor="pointer",t.style.userSelect="auto",f&&cancelAnimationFrame(f),c&&(window.chatButtonPosition={left:t.style.left,top:t.style.top},v()),document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",e),document.removeEventListener("pointercancel",_)}
1,_=function e(){r=!1,t.style.cursor="pointer",t.style.userSelect="auto",f&&cancelAnimationFrame(f),document.removeEventListener("pointermove",b),document.removeEventListener("pointerup",S),document.removeEventListener("pointercancel",e)};t.addEventListener("pointerdown",(function(e){r=!0,c=!1,s=e.clientX,l=e.clientY;var n=t.getBoundingClientRect();d=n.left,u=n.top,t.style.cursor="grabbing",t.style.userSelect="none",e.preventDefault(),document.addEventListener("pointermove",b,{passive:!1}),document.addEventListener("pointerup",S),document.addEventListener("pointercancel",_)})),window.addEventListener("resize",w),t.addEventListener("click",(function(e){if(window.zoomCampaignSdk.close(),c)return c=!1,e.stopPropagation(),void e.preventDefault();tt()})),document.body.classList.contains("page-type__product")?document.addEventListener("stickyBarShown",(function(){w(),v()})):document.addEventListener("backToTopVisible",(function(){w(),v()}))}else window.chatButtonPosition=null,t.addEventListener("click",(function(e){tt()}));null===(e=document.getElementById("livesdk__campaign"))||void 0===e||e.remove()}},window.addEventListener("zoomCampaignSdk:ready",(function(){var e;window.zoomCampaignSdk.close(),function(){var e=Array.from(document.querySelectorAll('[data-tag="web-chat-sdk-shadow"]'));if(e.length){window.natureMade=window.natureMade||{},window.natureMade.chatCampaigns=e.map((function(e){var t,n=null===(t=e.shadowRoot)||void 0===t||null===(t=t.querySelector(".livesdk__placement"))||void 0===t||null===(t=t.getAttribute("data-testid"))||void 0===t?void 0:t.replace("campaign-id-","");if(n)return e.setAttribute("data-widget-container-campaign-id",n),{id:n,container:e}}));var t=window.natureMade.getCookie("activeChatCampaign");t&&document.body.setAttribute("data-active-chat-campaign",t)}}(),function(){if(window.zoomCampaignSdk){window.zoomCampaignSdk.on("close",(function(){e(!1),document.dispatchEvent(new Event("klaviyoPopupsSuppressionRemoved"))})),window.zoomCampaignSdk.on("open",(function(t){e(!0)})),document.querySelectorAll('[data-tag="web-chat-sdk-shadow"]').forEach((function(e){var t,n=null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelector(".livesdk__chat-sdk-window__container");n&&new MutationObserver((function(e){var t,i=d(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;"attributes"===o.type&&"style"===o.attributeName&&"none"===n.style.display&&document.dispatchEvent(new CustomEvent("zoomChatClosed"))}}catch(e){i.e(e)}finally{i.f()}})).observe(n,{attributes:!0,attributeFilter:["style"]})}));var e=function(e){e?document.body.classList.add("zoom-chat-open"):document.body.classList.remove("zoom-chat-open")};document.addEventListener("zoomChatClosed",(function(){e(!1)})),document.addEventListener("zoomChatOpened",(function(t){var n,i,o=(null===(n=t.detail)||void 0===n?void 0:n.campaignId)||window.natureMade.defaultChatCampaignId;null===(i=document.getElementById("chatButton"))||void 0===i||i.setAttribute("style",""),window.chatButtonPosition=null,document.body.classList.remove("chat-button-relocated"),window.zoomCampaignSdk.close(),document.dispatchEvent(new Event("zoomChatClosed")),window.zoomCampaignSdk.changeCampaign(o),window.natureMade.setCookie("activeChatCampaign",o,.041),e(!0),document.body.setAttribute("data-active-chat-campaign",o)})),document.addEventListener("zoomCampaignChanged",(function(){})),document.body.addEventListener("click",(function(t){if(document.body.classList.contains("zoom-chat-open")&&window.zoomCampaignSdk&&!t.currentTarget.hasAttribute("data-chat-trigger")){var n=document.querySelector('[data-tag="web-chat-sdk-shadow"]'),i=document.getElementById("chatButton");n&&n.contains(t.target)||i&&(t.target==i||i.contains(t.target))||(window.zoomCampaignSdk.close(),e(!1))}})),document.addEventListener("keydown",(function(t){"Escape"===t.key&&document.body.classList.contains("zoom-chat-open")&&window.zoomCampaignSdk&&(window.zoomCampaignSdk.close(),e(!1))}),!0),nt()}}(),(e=document.querySelectorAll("[data-chat-trigger]")).length&&e.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),tt()}))})),function(e){var t,n;if(e){var i=null===(t=window.metafieldGlobalSettings)||void 0===t||null===(t=t.chat_widget_config)||void 0===t?void 0:t.chat_campaign_ids;if(i){var o=null===(n=i.find((function(e){return e.includes("track-your-order")})))||void 0===n?void 0:n.split(":").reverse()[0];if(o){var a=function(){try{document.dispatchEvent(new CustomEvent("zoomChatOpened",{detail:{campaignId:o}}))}catch(e){console.error("Error opening ZVA Track Order flow:",e)}};e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),document.body.hasAttribute("data-chat-enabled")?a():window.addEventListener("zoomCampaignSdk:ready",(function(){return a()}),{once:!0})}))}}}}(document.getElementById("footerTrackPackage")),document.body.setAttribute("data-chat-enabled","")}))}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,i),a.exports}i.m=t,e=[],i.O=(t,n,o,a)=>
1{if(!n){var r=1/0;for(d=0;d<e.length;d++){for(var[n,o,a]=e[d],c=!0,s=0;s<n.length;s++)(!1&a||r>=a)&&Object.keys(i.O).every((e=>i.O[e](n[s])))?n.splice(s--,1):(c=!1,a<r&&(r=a));if(c){e.splice(d--,1);var l=o();void 0!==l&&(t=l)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[n,o,a]},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={682:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var o,a,[r,c,s]=n,l=0;if(r.some((t=>0!==e[t]))){for(o in c)i.o(c,o)&&(i.m[o]=c[o]);if(s)var d=s(i)}for(t&&t(n);l<r.length;l++)a=r[l],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return i.O(d)},n=self.webpackChunknature_made_shopify_theme=self.webpackChunknature_made_shopify_theme||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=i.O(void 0,[466,636,534,777,521,197,288,837],(()=>i(5966)));o=i.O(o)})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.