const fallbackDictionary={data_collection_warning:"We use cookies (and other similar technologies) to collect data to improve your shopping experience. ",agree_on_data_collection:"By using our website, you're agreeing to the collection of data as described in our ",privacy_policy:"Privacy Policy",change_preferences:"You can change your preferences at any time",data_collection_preferences:"Website Data Collection Preferences",manage_data_collection_preferences:"Manage Website Data Collection Preferences",use_data_by_cookies:"uses data collected by cookies and JavaScript libraries to improve your shopping experience.",by_using:"By using our website, you're agreeing to our",data_categories_table:"The table below outlines how we use this data by category. To opt out of a category of data collection, select 'No' and save your preferences.",unsaved_changes:"You have unsaved changes",close_without_changes:"You have unsaved changes to your data collection preferences. Are you sure you want to close without saving?"},createDictionary=e=>{const n=e.translations,o=Object.keys(n);return!o.length?n:o.reduce((e,o)=>(e[o.split(".").pop()]=n[o],e),{})},composeTranslations=e=>{if(!e)return fallbackDictionary;const n=createDictionary(JSON.parse(e));return{...fallbackDictionary,...n}},translations=composeTranslations(window.consentManagerTranslations),TRACKING_COOKIE="bc_consent";function injectConsentBanner(){var e=document.createElement("div");e.id="consent-manager",e.style.cssText="position: fixed;left: 0;right: 0;bottom: 0;z-index: 1000; background-color:rgba(255,255,255,0.0)",document.body.appendChild(e)}function injectConsentBannerUpdate(){var e=document.createElement("div");e.id="consent-manager-update-banner",e.style.cssText="height: 48px ; background-color: #454545;font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';-moz-osx-font-smoothing: grayscale;-webkit-font-smoothing: antialiased;font-smoothing: antialiased;font-size: 14px;font-weight: 400;letter-spacing: -0.05px;line-height: 48px;",e.innerHTML='<a style="color:#ffffff;margin-left:16px;" onclick="event.stopPropagation(); window.consentManager.openConsentManager();">'+translations.manage_data_collection_preferences+"</a>",document.body.appendChild(e)}var havePreferences=document.cookie.indexOf("bc_consent")>0;injectConsentBanner(),havePreferences&&injectConsentBannerUpdate(),window.consentManagerConfig=function(e){const n={functional:2,marketingAndAnalytics:3,advertising:4};e.preferences.onPreferencesSaved((function(e){let o=e.customPreferences,t={allow:[],deny:[]};for(i=0;i<Object.keys(o).length;i++){let e=0;n.hasOwnProperty(Object.keys(o)[i])&&(e=n[Object.keys(o)[i]]),o[Object.keys(o)[i]]?t.allow.push(e):t.deny.push(e)}fetch("/api/storefront/consent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((function(){document.location.reload(!0)})).catch((function(e){console.log(e)}))}));var o=e.React,t=void 0!==window.consentManagerStoreConfig().privacyPolicyUrl&&null!==window.consentManagerStoreConfig().privacyPolicyUrl&&""!==window.consentManagerStoreConfig().privacyPolicyUrl,a=o.createElement("span",null,translations.data_collection_warning,t?translations.agree_on_data_collection:"",t?o.createElement("a",{href:window.consentManagerStoreConfig().privacyPolicyUrl,target:"_blank"},translations.privacy_policy):"",t?".":""),r=translations.change_preferences,c=translations.data_collection_preferences,s=o.createElement("span",null,window.consentManagerStoreConfig().storeName+` ${translations.use_data_by_cookies} `,t?translations.by_using+" ":"",t?o.createElement("a",{href:window.consentManagerStoreConfig().privacyPolicyUrl,target:"_blank"},translations.privacy_policy):"",t?". ":"",translations.data_categories_table),l=translations.unsaved_changes,g=translations.close_without_changes;return{container:"#consent-manager",writeKey:void 0===window.consentManagerStoreConfig?"":window.consentManagerStoreConfig.writeKey,shouldRequireConsent:function(){return!havePreferences},bannerContent:a,bannerSubContent:r,bannerBackgroundColor:"#454545",preferencesDialogTitle:c,preferencesDialogContent:s,cancelDialogTitle:l,cancelDialogContent:g,closeBehavior:"dismiss",shouldReload:!1}};
//# sourceMappingURL=consent-manager-config-352f0a7830193416e063b4f769c510d050043124.js.map