{"version":3,"file":"index.es.min.js","sources":["../../../packages/helpers/src/props.helpers.js","../../../packages/helpers/src/refs.helpers.js","../../../packages/helpers/src/events.helpers.ts","../../../packages/components/src/constants.mjs","../../../packages/helpers/src/viewport.helpers.ts","../../../packages/helpers/src/visual.helpers.ts","../../../packages/helpers/src/catalog.js","../../../packages/helpers/src/getCurrency.js","../../../packages/helpers/src/utils.ts","../../../packages/helpers/src/gtmEvents.js","../../../packages/page-builder-sections/src/cross-sell/services/fetcher.service.js","../../../packages/helpers/src/assets/js/eventDispatch.js","../../../packages/components/src/slider/js/constants.js","../../../packages/page-builder-sections/src/cross-sell/services/slider.service.js","../../../packages/components/src/card-labels/cardLabels.js","../../../packages/helpers/src/dataLayer.js","../../../packages/helpers/src/cremaDataHelper.js","../../../packages/components/src/card-logos/cardLogos.js","../../../packages/components/src/slider/js/CarouselTouchPlugin.js","../../../packages/components/src/slider/js/CarouselCreamUiHack.js","../../../packages/components/src/slider/js/Carousel.js","../../../packages/components/src/slider/slider.js","../../../packages/components/src/plp-product-card/components/plp-product-card-image-slider.js","../../../packages/components/src/plp-product-card-expandable/js/utils.js","../../../packages/components/src/plp-product-card-expandable/js/constants.js","../../../packages/components/src/plp-product-card-expandable/plp-product-card-expandable.js","../../../packages/components/src/plp-product-card/fragments/renderStrikethroughPrice.js","../../../packages/helpers/src/intensity.helpers.js","../../../packages/components/src/plp-product-card/fragments/priceCapsule.js","../../../packages/page-builder-sections/src/cross-sell/cross-sell.js","../../../packages/page-builder-sections/src/cross-sell/constants.mjs","../../../packages/page-builder-sections/src/cross-sell/js/constants.js"],"sourcesContent":["const getData = attributes => attributes.find(attribute => attribute.nodeName === 'data')\n\nconst createProps = attributes => {\n    const data = getData([...attributes])\n    const props = [...attributes]\n        .filter(attribute => attribute.nodeName !== 'data')\n        .reduce((all, attr) => {\n            return { ...all, [attr.nodeName]: attr.nodeValue }\n        }, {})\n\n    if (isNil(data)) {\n        return props\n    }\n\n    try {\n        return { ...props, ...JSON.parse(data.nodeValue) }\n    } catch (error) {\n        console.log('ERROR: No data', error, data?.nodeValue)\n    }\n}\n\nconst isNil = obj => obj === undefined || obj === null\n\nexport const parseBool = value => (!value || value === 'false' ? false : true)\n\nexport default createProps\n","const createRefs = component => [...component.querySelectorAll('[data-ref]')].reduce(extract, {})\n\nconst extract = (refs, $ref) => {\n    const { ref } = $ref.dataset\n\n    // Check if ref is of type array\n    const refArray = ref.match(/(\\w+)\\[(.+)\\]/)\n\n    if (refArray !== null) {\n        return getRefArray(refs, $ref, refArray)\n    } else {\n        return { ...refs, [$ref.dataset.ref]: $ref }\n    }\n}\n\nconst getRefArray = (refs, $ref, [, name, index]) => {\n    if (refs[name] === undefined) {\n        refs[name] = []\n    }\n    refs[name][index] = $ref\n    return refs\n}\n\nexport default createRefs\n","export type EventListener = {\n    element: HTMLElement\n    type: string\n    listener: (e: Event) => void\n    options?: boolean | AddEventListenerOptions\n}\n\nconst add = (eventListeners: EventListener[] = []) => {\n    eventListeners.forEach(eventListener => {\n        if (!eventListener || !eventListener.element) {\n            return\n        }\n        return eventListener.element.addEventListener(\n            eventListener.type,\n            eventListener.listener,\n            eventListener.options\n        )\n    })\n}\n\nconst remove = (eventListeners: EventListener[] = []) => {\n    eventListeners.forEach(eventListener => {\n        if (!eventListener || !eventListener.element) {\n            return\n        }\n        eventListener.element.removeEventListener(eventListener.type, eventListener.listener)\n    })\n}\n\nconst busNamespace = 'pageBuilder'\n\nexport const emitCustomEvent = (eventName: string, data: unknown) => {\n    const customEvent = new CustomEvent(`${busNamespace}.${eventName}`, {\n        detail: data,\n        bubbles: true,\n        cancelable: true,\n        composed: false\n    })\n\n    window.dispatchEvent(customEvent)\n}\n\nexport default { add, emitCustomEvent, remove }\n","export const MAX_WIDTH_CONTAINER = 1160\n\nexport const BREAKPOINT_XL = 1920\nexport const BREAKPOINT_TABLET = 1024\nexport const BREAKPOINT_L = 996\nexport const BREAKPOINT_M = 768\nexport const BREAKPOINT_S = 750\nexport const BREAKPOINT_XS = 375\n\nexport const CTA_PRIMARY = 'primary'\nexport const CTA_PRIMARY_TRANSPARENT = 'primary_transparent'\nexport const CTA_SUBTLE = 'subtle'\nexport const CTA_LINK = 'link'\nexport const CTA_LINK_UNDERLINE = 'link-underline'\nexport const CTA_LINK_GOLD = 'link-gold'\nexport const CTA_LINK_ADD_TO_CART_SMALL = 'AddToCart_small'\nexport const CTA_LINK_ADD_TO_CART_LARGE = 'AddToCart_large'\n\nexport const EVENT_TAB_CHANGE = 'EVENT_TAB_CHANGE'\n\nexport const EVENT_VIDEO = 'WEB_COMPONENT_VIDEO'\nexport const EVENT_POPIN_OPEN = 'WEB_COMPONENT_POPIN_OPEN'\nexport const EVENT_POPIN_OPENED = 'WEB_COMPONENT_POPIN_OPENED'\nexport const EVENT_POPIN_CLOSE = 'WEB_COMPONENT_POPIN_CLOSE'\nexport const EVENT_POPIN_CLOSED = 'WEB_COMPONENT_POPIN_CLOSED'\nexport const EVENT_POPIN_CLOSE_CLICK = 'WEB_COMPONENT_POPIN_CLOSE_CLICK'\nexport const EVENT_POPIN_KEY_DOWN = 'keydown'\nexport const EVENT_POPIN_FORM_TOGGLE_TITLE = 'WEB_COMPONENT_POPIN_FORM_TOGGLE_TITLE'\nexport const EVENT_CTA_CLICK = 'WEB_COMPONENT_CTA_CLICK'\nexport const EVENT_HERO_REORDER_OPEN = 'WEB_COMPONENT_HERO_REORDER_OPEN'\nexport const EVENT_HERO_REORDER_CLOSE = 'WEB_COMPONENT_HERO_REORDER_CLOSE'\nexport const EVENT_QUICKVIEW_OPEN = 'WEB_COMPONENT_QUICKVIEW_OPEN'\nexport const EVENT_QS_OPEN = 'WEB_COMPONENT_QS_OPEN'\nexport const EVENT_QS_OPENED = 'WEB_COMPONENT_QS_OPENED'\nexport const EVENT_QS_CLOSE = 'WEB_COMPONENT_QS_CLOSE'\nexport const EVENT_QS_CLOSED = 'WEB_COMPONENT_QS_CLOSED'\nexport const EVENT_QS_CLOSE_CLICK = 'WEB_COMPONENT_QS_CLOSE_CLICK'\nexport const EVENT_QS_KEY_DOWN = 'keydown'\nexport const EVENT_ADD_TO_CART = 'WEB_COMPONENT_ADD_TO_CART'\nexport const EVENT_CART_UPDATED = 'WEB_COMPONENT_CART_UPDATED'\nexport const EVENT_VIDEO_TOGGLE = 'WEB_COMPONENT_VIDEO_TOGGLE'\nexport const VIDEO_ON_HOVER = 'VIDEO_ON_HOVER'\nexport const VIDEO_ON_OUT = 'VIDEO_ON_OUT'\nexport const EVENT_DETAIL_OPEN = 'WEB_COMPONENT_DETAIL_OPEN'\nexport const EVENT_SLIDER_READY = 'WEB_COMPONENT_SLIDER_READY'\nexport const EVENT_SLIDE_CHANGE = 'WEB_COMPONENT_SLIDE_CHANGE'\nexport const EVENT_OVERLAY_OPEN = 'WEB_COMPONENT_OVERLAY_OPEN'\nexport const EVENT_OVERLAY_CLOSE = 'WEB_COMPONENT_OVERLAY_CLOSE'\nexport const EVENT_OVERLAY_CLICKED = 'WEB_COMPONENT_OVERLAY_CLICKED'\nexport const EVENT_OPEN_PRODUCT_AR_CLICKED = 'OPEN_PRODUCT_AR_CLICKED'\nexport const EVENT_SORT_BY_CHANGE = 'WEB_COMPONENT_SORT_BY_CHANGE'\n\nexport const EVENT_BUBBLE_SELECTED = 'EVENT_BUBBLE_SELECTED'\nexport const EVENT_RECO_TOOL_OPTION_CLICKED = 'EVENT_RECO_TOOL_OPTION_CLICKED'\nexport const WEB_COMPONENT_PROJECTS_LOADED = 'WEB_COMPONENT_PROJECTS_LOADED'\nexport const WEB_COMPONENT_ANCHOR_LOADED = 'WEB_COMPONENT_ANCHOR_LOADED'\n\nexport const EVENT_SWIPED_UP = 'swiped-up'\nexport const EVENT_SWIPED_DOWN = 'swiped-down'\nexport const EVENT_SWIPED_LEFT = 'swiped-left'\nexport const EVENT_SWIPED_RIGHT = 'swiped-right'\n\nexport const EVENT_HEADER_POSITION_CHANGED = 'EVENT_HEADER_POSITION_CHANGED'\n\nexport const keys = { ESC: 'Escape' }\n\nexport const ADD_TO_CART_MODIFIER_MINI = 'mini'\nexport const ADD_TO_CART_MODIFIER_DEFAULT = ADD_TO_CART_MODIFIER_MINI\n\nexport const COFFEE_ORIGINAL = 'original'\nexport const COFFEE_VERTUO = 'vertuo'\nexport const COFFEE_PRO = 'pro'\nexport const COFFEE_OL = 'OL'\nexport const COFFEE_VL = 'VL'\nexport const INTENSITY_MAX_OL = 14\nexport const INTENSITY_MAX_VL = 12\nexport const DEFAULT_BUBBLE_ICON = ''\n\nexport const NUMBER_PRODUCTS_SLIDER = 8\nexport const NUMBER_FEATURES_PDP = 8\n\nexport const ALIGNMENT = ['center', 'left', 'right']\nexport const POSITION = ['top', 'right', 'bottom', 'left']\nexport const TRANSLATION_ADD_TO_CART = 'Add to cart'\nexport const TRANSLATION_UPDATE_BASKET = 'Update basket'\n\nexport const TIME_INSTANT = 1\nexport const TIME_FAST = 300\nexport const TIME_MEDIUM = 600\nexport const TIME_SLOW = 1200\n\nexport const APP_APPLE_LINK = {\n    default: 'https://apps.apple.com/us/app/nespresso/id342879434',\n    us: 'https://apps.apple.com/us/app/nespresso-new/id1609639566',\n    uk: 'https://apps.apple.com/gb/app/nespresso-new/id1609639566',\n    kr: 'https://apps.apple.com/kr/app/%EB%84%A4%EC%8A%A4%ED%94%84%EB%A0%88%EC%86%8C-%EB%B6%80%ED%8B%B0%ED%81%AC/id1609639566'\n}\nexport const APP_ANDROID_LINK =\n    'https://play.google.com/store/apps/details?id=com.nespresso.activities'\nexport const APP_HUAWEI_LINK = 'https://appgallery.huawei.com/app/C102571517'\n\nexport const SRC_PAGE_PLP = 'plp'\nexport const SRC_PAGE_PDP = 'pdp'\n\nexport const PLP_TYPE_COFFEE = 'coffee'\nexport const PLP_TYPE_MACHINE = 'machine'\nexport const PLP_TYPE_ACCESSORY = 'accessory'\nexport const CALLEO_API_DOMAIN = 'https://www.contact.nespresso.com/'\n\n// SCSS RELATED\n// Todo : should be shared by JS and SCSS\nexport const BROWSER_CONTEXT = 16 // 1rem = 16px\nexport const COLOR_WHITE_1000 = '#FFFFFF' // Do not change for #FFF shortcut, it will break slider-natural gradients !\n\nexport const CONTRAST_DARK = 'dark'\nexport const CONTRAST_LIGHT = 'light'\n\nexport const B2B_CONTACT_FORM_POPIN_ID = 'b2b-contact-form-popin-id'\nexport const B2B_CONTACT_FORM_POPIN_SRC_SEARCH = 'coveo-search'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO = 'sku-main-info'\n\nexport const B2B_CONTACT_FORM_POPIN_SRC_SKU_MAIN_INFO_AUTO = 'sku-main-info-auto'\n\nexport const ASPECT_RATIO_16_9 = '16/9'\nexport const ASPECT_RATIO_1_1 = '1/1'\n\nexport const NESPRESSO_PRODUCTION_DOMAIN = 'https://www.nespresso.com'\nexport const NESPRESSO_ROLLOUT_DOMAIN = 'https://nc2-env-rollout.nespresso.com'\n\nexport const EVENT_QUIZ_ON_GO_BACK = 'WEB_COMPONENT_EVENT_QUIZ_ON_GO_BACK'\nexport const EVENT_QUIZ_SUBMIT = 'WEB_COMPONENT_EVENT_QUIZ_SUBMIT'\n","import { BREAKPOINT_M, BREAKPOINT_TABLET } from '@kissui/components'\n\nconst viewport = () => {\n    const lt = (ref: number) => {\n        return window.innerWidth < ref\n    }\n\n    return {\n        get is() {\n            const { innerWidth: vw, devicePixelRatio } = window\n            return {\n                mobile: vw < BREAKPOINT_M,\n                mobile_tablet: vw < BREAKPOINT_TABLET,\n                tablet: vw >= BREAKPOINT_M && vw < BREAKPOINT_TABLET,\n                desktop: vw >= BREAKPOINT_TABLET && devicePixelRatio <= 1,\n                retina: vw >= BREAKPOINT_TABLET && devicePixelRatio > 1\n            }\n        },\n        lt\n    }\n}\n\nconst helper = viewport()\n\nexport default helper\n","import viewportHelper from './viewport.helpers'\n\nconst devices = ['mobile', 'tablet', 'desktop', 'retina'] as const\ntype Device = typeof devices[number]\ntype Sources =  { [P in Device]?: string; }\n\nconst getDevice = (sources: Sources) => {\n    if (!Array.isArray(sources) && typeof sources !== 'object') {\n        return null\n    }\n\n    return devices.find(\n        device => viewportHelper.is[device] === true && device in sources && sources[device] !== ''\n    )\n}\n\nconst visual = () => {\n    const getResponsiveSrc = (src: Sources) => {\n        const device = getDevice(src)\n        return device ? src[device] : src['desktop']\n    }\n\n    return { getResponsiveSrc }\n}\n\nconst helper = visual()\n\nexport default helper\n","import { COFFEE_VERTUO } from '@kissui/components/src/constants.mjs'\nimport { getCurrency } from './getCurrency'\nexport { getCurrency } from './getCurrency'\n\nexport const ECAPI_TYPE_CAPSULE = 'capsule'\nexport const ECAPI_TYPE_MACHINE = 'machine'\nexport const ECAPI_TYPE_ACCESSORY = 'accessory'\nexport const ECAPI_TYPE_GIFT_CARD = 'giftcard'\n\nconst TECHNOLOGY_CATEGORY_IDENTIFIER = '/machineTechno/'\nconst SLEEVE_OF_10 = 10\nconst SLEEVE_OF_7 = 7\n\nconst trimSku = sku => sku.replace(/[^a-z0-9- +./]/gi, '')\n\nexport const getLegacySKU = productId => productId.split('prod/').pop()\n\nexport const getPriceFormatter = async () => await window.napi.priceFormat()\n\nexport const getProduct = sku => window.napi.catalog().getProduct(trimSku(sku))\n\nexport function getTechnologyName(productData) {\n    const techno = productData.technologies[0]\n    return techno.substring(\n        techno.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) + TECHNOLOGY_CATEGORY_IDENTIFIER.length\n    )\n}\n\nfunction isMultipleOf(quantity, multiple) {\n    return quantity % multiple === 0\n}\n\nexport function getSleeveNumber(product, getTechnologyNameFn = getTechnologyName) {\n    if (product.sales_multiple !== 1 && isMultipleOf(product.sales_multiple, SLEEVE_OF_10)) {\n        // Sleeve of original or vertuo\n        return product.sales_multiple / SLEEVE_OF_10\n    }\n\n    if (\n        product.sales_multiple !== 1 &&\n        getTechnologyNameFn(product) === COFFEE_VERTUO &&\n        isMultipleOf(product.sales_multiple, SLEEVE_OF_7)\n    ) {\n        // Sleeve of vertuo\n        return product.sales_multiple / SLEEVE_OF_7\n    }\n\n    if (product.sales_multiple === 1 && isMultipleOf(product.unitQuantity, SLEEVE_OF_10)) {\n        // Bundle of original or vertuo\n        return product.unitQuantity / SLEEVE_OF_10\n    }\n\n    if (\n        product.sales_multiple === 1 &&\n        getTechnologyNameFn(product) === COFFEE_VERTUO &&\n        isMultipleOf(product.unitQuantity, SLEEVE_OF_7)\n    ) {\n        // Bundle of vertuo\n        return product.unitQuantity / SLEEVE_OF_7\n    }\n\n    return NaN\n}\n\n/**\n * Guess if the product is part of a bundle.\n * This is determined by checking the 'sales_multiple' and 'unitQuantity' properties.\n */\nexport function isBundled(productData) {\n    // TODO: this function should not change the productData, but some components still need it\n    productData.sales_multiple = productData.sales_multiple || productData.salesMultiple\n\n    const isSalesMultipleGreaterThanOne = productData.sales_multiple > 1\n    const isUnitQuantityEqualToOne = productData.unitQuantity === 1\n    const isSalesMultipleEqualToOne = productData.sales_multiple === 1\n    const isUnitQuantityGreaterThanOne = productData.unitQuantity > 1\n\n    // The product is not bundled if sales_multiple > 1 and unitQuantity = 1\n    if (isSalesMultipleGreaterThanOne && isUnitQuantityEqualToOne) {\n        return false\n    }\n\n    // The product is bundled if sales_multiple = 1 and unitQuantity > 1\n    return isSalesMultipleEqualToOne && isUnitQuantityGreaterThanOne\n}\n\n/**\n * Replace an array of SKU with product data\n * Remove the element inside the list if sku fail. It prevents to get an empty item.\n * @param {Array.<String>} skus\n * @param getProductFn\n * @returns {Promise<Awaited<unknown>[]>}\n */\nexport function getProductAndClean(skus, getProductFn = getProduct, napi = window.napi) {\n    const promises = []\n\n    if (!napi) {\n        return Promise.reject()\n    }\n\n    if (!Array.isArray(skus)) {\n        skus = [skus]\n    }\n\n    // Load manually the product to delete SKU fail\n    for (const sku of skus) {\n        promises.push(\n            getProductFn(sku)\n                .then(data => skus.splice(skus.indexOf(sku), 1, data))\n                .catch(() => {\n                    skus.splice(skus.indexOf(sku), 1)\n                    console.error(`getProduct fail on sku ${sku}`)\n                })\n        )\n    }\n\n    return Promise.all(promises)\n}\n\nexport const getFormattedPrice = async price => {\n    const priceFormatter = await getPriceFormatter()\n    const currency = getCurrency()\n\n    return priceFormatter.html\n        ? priceFormatter.html(currency, price)\n        : priceFormatter.short(currency, price) || ''\n}\n\nexport const getProductCategories = async sku => {\n    const productDetails = await getProduct(sku)\n    const productCategories = productDetails ? productDetails.supercategories : []\n    const productCategoriesNew = await Promise.all(\n        productCategories.map(async categoryEncoded => {\n            const productCategoryData = await window.napi.catalog().getCategory(categoryEncoded)\n            return productCategoryData\n        })\n    )\n    return productCategoriesNew\n}\n","export const getCurrency = () => window[window.config.padl.namespace].dataLayer.app.app.currency\n","export { waitForSelector } from './waitForSelector'\n\nexport const constants = {\n    LEFT: 37,\n    UP: 38,\n    RIGHT: 39,\n    DOWN: 40,\n    ESC: 27,\n    SPACE: 32,\n    ENTER: 13,\n    TAB: 9\n}\n\nexport function capitalize(s = '') {\n    return s[0].toUpperCase() + s.slice(1)\n}\n\nexport const convertToCamelCase = (str: string): string => {\n    const arr = str.match(/[a-z]+|\\d+/gi)\n    if (!arr) { return str }\n    return arr.map((m, i) => {\n        let low = m.toLowerCase()\n        if (i !== 0) {\n            low = low.split('').map((s, k) => (k === 0 ? s.toUpperCase() : s)).join(\"\")\n        }\n        return low\n    }).join(\"\")\n}\n\nexport function slug(s = '') {\n    return s\n        .toLowerCase()\n        .trim()\n        .replace(/\\s+/g, '-') // Replace spaces with -\n        .replace(/[^\\w-]+/g, '') // Remove all non-word chars\n        .replace(/--+/g, '-') // Replace multiple - with single -\n}\n\nexport function pxToEm(target: number, stripedInnerFontSize = 1) {\n    return target / 14 / stripedInnerFontSize + 'em'\n}\n\nexport function percent(target: number) {\n    return target + '%'\n}\n\nexport function parseHTML(str: string) {\n    const tmp = document.implementation.createHTMLDocument('')\n    tmp.body.innerHTML = str\n    return tmp.body.childNodes\n}\n\nexport function stripHTML(str: string) {\n    const tmp = document.implementation.createHTMLDocument('')\n    tmp.body.innerHTML = str\n    return (tmp.body.textContent ?? \"\").replace(RegExp('[\\\\s|\\'|\"]', 'g'), '')\n}\n\nexport function makeId(length: number) {\n    var result = ''\n    var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n    var charactersLength = characters.length\n    for (var i = 0; i < length; i++) {\n        result += characters.charAt(Math.floor(Math.random() * charactersLength))\n    }\n    return result\n}\n\nexport function removeEmptyValues(obj: { [key: string]: any }): { [key: string]: any } {\n    const findText = [\n        'Default campaign ID (tracking missing in Page Builder export)',\n        'Default campaign name (tracking missing in Page Builder export)',\n        'promoname', \n        'promoid', \n        'promocreative', \n        'undefined'\n    ];\n    \n    for (let key in obj) {\n        const value = obj[key];\n        \n        if (value === null || value === undefined || value === '') {\n            delete obj[key];\n            continue;\n        }\n        \n        if (typeof value === 'string') {\n            for (const text of findText) {\n                if (value.includes(text)) {\n                    delete obj[key];\n                    break;\n                }\n            }\n        }\n    }\n    \n    return obj;\n}\n\nexport function makeHash(str: string) {\n    var hash = 0,\n        i,\n        chr\n    if (!str) {\n        return hash\n    }\n    for (i = 0; i < str.length; i++) {\n        chr = str.charCodeAt(i)\n        hash = (hash << 5) - hash + chr\n        hash |= 0 // Convert to 32bit integer\n    }\n    return 'id-' + hash\n}\n\nexport function getHashLink(link: string) {\n    let linkHash = link\n    let linkNoHash = link\n    if (link.indexOf('#') !== -1) {\n        linkNoHash = link.replace('#', '')\n    } else {\n        linkHash = '#' + link\n    }\n\n    return { linkNoHash, linkHash }\n}\n\nexport function lazyLoad(node: Element, attribute: string, value: any, url: string) {\n    const CLASSNAME_OUT_OF_SCREEN = 'lazy-load'\n    const CLASSNAME_IN_SCREEN = 'lazy-loaded'\n    const CLASSNAME_ON_ERROR = 'lazy-loaded-error'\n\n    const isOldIOS = () => {\n        var agent = window.navigator.userAgent,\n            start = agent.indexOf('OS ')\n        if ((agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1) {\n            return window.Number(agent.substr(start + 3, 3).replace('_', '.')) < 14\n        }\n        return false\n    }\n\n    const inViewPort = (attribute: string, value: any) => {\n        node.setAttribute(attribute, value)\n\n        const cb = () => node.classList.add(CLASSNAME_IN_SCREEN)\n\n        if (url) {\n            const img = new Image()\n            img.src = url\n            img.onload = cb\n            img.onerror = () => {\n                cb()\n                node.classList.add(CLASSNAME_ON_ERROR)\n                throw new Error(`Image ${url} cannot be loaded`)\n            }\n\n            return\n        }\n\n        cb()\n    }\n\n    if (/Trident\\/|MSIE/.test(window.navigator.userAgent) || isOldIOS()) {\n        inViewPort(attribute, value)\n    } else {\n        if ('IntersectionObserver' in window) {\n            node.classList.add(CLASSNAME_OUT_OF_SCREEN)\n            let lazyBackgroundObserver = new IntersectionObserver(function (entries) {\n                entries.forEach(function (entry) {\n                    if (entry.isIntersecting) {\n                        inViewPort(attribute, value)\n                        lazyBackgroundObserver.unobserve(entry.target)\n                    }\n                })\n            })\n            lazyBackgroundObserver.observe(node)\n        } else {\n            inViewPort(attribute, value)\n        }\n    }\n}\n\nexport function lazyLoadCallback(node: Element, cb: () => void) {\n    const isOldIOS = () => {\n        var agent = window.navigator.userAgent,\n            start = agent.indexOf('OS ')\n        if ((agent.indexOf('iPhone') > -1 || agent.indexOf('iPad') > -1) && start > -1) {\n            return window.Number(agent.substr(start + 3, 3).replace('_', '.')) < 14\n        }\n        return false\n    }\n\n    if (/Trident\\/|MSIE/.test(window.navigator.userAgent) || isOldIOS()) {\n        cb()\n    } else {\n        if ('IntersectionObserver' in window) {\n            let lazyBackgroundObserver = new IntersectionObserver(\n                function (entries) {\n                    entries.forEach(function (entry) {\n                        if (entry.isIntersecting) {\n                            cb()\n                            lazyBackgroundObserver.unobserve(entry.target)\n                        }\n                    })\n                },\n                { rootMargin: '150% 0px' }\n            )\n            lazyBackgroundObserver.observe(node)\n        }\n    }\n}\n\n// Debounce\nexport function debounce<T>(func: (v: T) => void, time = 100) {\n    let timer: number\n    return function (event: T) {\n        if (timer) {\n            window.clearTimeout(timer)\n        }\n        timer = window.setTimeout(func, time, event)\n    }\n}\n\n// isIE - to check for internet explorer\nexport function isIE() {\n    let ua = window.navigator.userAgent,\n        isIE = /MSIE|Trident/.test(ua)\n\n    return isIE\n}\n\n// Load external script\nexport const loadExternalScript = ({\n    src,\n    callback = null,\n    async = false,\n    defer = false,\n    module = false,\n    id = ''\n}: {\n    src: string;\n    callback: null | GlobalEventHandlers[\"onload\"]\n    module: boolean,\n    defer: boolean,\n    async: boolean,\n    id: string\n}) => {\n    const script = document.createElement('script')\n    script.type = module ? 'module' : 'text/javascript'\n    script.src = src\n    id ? (script.id = id) : false // add id attribute only if passed\n    if (typeof callback === 'function') {\n        script.onload = callback\n    }\n    script.async = async\n    script.defer = defer\n    document.body.appendChild(script)\n}\n\n// Load external css\nexport const loadExternalCss = ({ src }: { src: string }) => {\n    const script = document.createElement('link')\n    script.rel = 'stylesheet'\n    script.href = src\n    document.body.appendChild(script)\n}\n// Lazy load vendor script\nexport const lazyLoadVendorScript = (handler, el) => {\n    const observer = new IntersectionObserver(handler)\n    observer.observe(el)\n}\n\n/**\n * Replaces variable inside a given string\n * Each variable have to be enclosed between stChr and enChr\n * The values have to be contained in the vars object, they key must match\n * example :\n * txt : 'See {resultsLength} Results'\n * vars : {resultsLength:'30'}\n * stChr : '{'\n * enChr : '}'\n *\n * will return : 'See 30 Results'\n *\n * @param {string} txt\n * @param {object} vars\n * @param {string} stChr\n * @param {string} enChr\n */\nexport function interpolate(txt: string, vars: Record<string, null | undefined | string>, stChr: string, enChr: string) {\n    let curIdx = 0\n\n    while (txt) {\n        const stIdx = txt.indexOf(stChr, curIdx)\n        if (stIdx === -1) {\n            break\n        }\n        const enIdx = txt.indexOf(enChr, stIdx + 1)\n        if (enIdx === -1) {\n            break\n        }\n        const hashId = txt.substring(stIdx + stChr.length, enIdx)\n        if (vars[hashId] != null) {\n            txt = txt.substr(0, stIdx) + vars[hashId] + txt.substr(enIdx + enChr.length)\n            curIdx = stIdx\n        } else {\n            curIdx = enIdx\n        }\n    }\n    return txt\n}\n\n/**\n * Find in container element, add height to equal size of element\n * @param container css path where my element is contain e.g. `.c-container`\n * @param el css path of elements to equalized\n */\nexport const equalHeight = (containerSelector: string, el: string, elementScope: HTMLElement) => {\n    const container = elementScope.querySelector<HTMLElement>(containerSelector)\n    if (!container) {\n        return\n    }\n\n    const items = container.querySelectorAll<HTMLElement>(el)\n    let max = -1\n\n    for (let i = 0; i < [...items].length; i++) {\n        const item = [...items][i]\n        let h = item.offsetHeight\n        max = h > max ? h : max\n    }\n\n    if (max <= 0) {\n        return\n    }\n\n    for (let i = 0; i < [...items].length; i++) {\n        const item = [...items][i]\n        item.style.height = `${max}px`\n    }\n}\n\nexport const stringifyCurlyQuote = (data: {}) => JSON.stringify(data).replace(\"'\", '’')\n\nexport const stringifyForAttribute = (data = {}) => {\n    return escapeHtml(JSON.stringify(data))\n}\n\n/**\n * This function is included instead of sanitizeString because for\n * inserting HTML into innerHTML we need to make sure all HTML\n * entities are escaped.\n */\nexport const escapeHtml = (text: string) => {\n    const map = {\n        '&': '&amp;',\n        '<': '&lt;',\n        '>': '&gt;',\n        '\"': '&quot;',\n        \"'\": '&#039;'\n    } as { [s: string]: string }\n\n    return text.replace(/[&<>\"']/g, (m) => map[m])\n}\n\n/**\n * Because setting attributes escapes more than the characters above and then preact also\n * escapes text we need a more complete way of unescaping all html entities (not just the ones\n * above)\n */\nconst domParser = new DOMParser()\nexport const unescapeHtml = (text: string) => {\n    return domParser.parseFromString(text, \"text/html\").body.textContent\n}\n\nexport const sanitizeString = (data: {}) => {\n    if (!data) {\n        return ''\n    }\n\n    return data.toString().replace(/\"/g, '&quot;').replace(/'/g, '&apos;')\n}\n\nexport const stripTags = (s: string) => {\n    return (s || '').replace(/(<([^>]+)>)/gi, '')\n}\n\nexport const setAttributes = (element: Element, attrs: Record<string, any>) => {\n    for (let key in attrs) {\n        element.setAttribute(key, attrs[key])\n    }\n    return element\n}\n\nexport const getMetaContent = (metaName: string) => {\n    const metaTag = document.querySelector(`meta[name=${metaName}]`)\n    if (!metaTag) {\n        return ''\n    }\n    return metaTag.getAttribute('content')\n}\n\nexport const isObjectEmpty = (obj: {}) => {\n    return Object.keys(obj).length === 0\n}\n","import { getProduct } from '@kissui/helpers/src/catalog'\nimport { emitCustomEvent } from './events.helpers'\nimport { removeEmptyValues } from '@kissui/helpers/src/utils'\n\nconst raisedByPB = 'page builder'\nconst raisedByWC = 'Web component'\n\n/**\n * helper method for 'itemDisplay' GTM event\n * @param {*} event : 'itemDisplay' - Mandatory as is\n * @param {*} eventRaisedBy : 'Web component' - Mandatory as is\n * @param {*} eventAction : 'Click' - Action that led to the item display. For example, click\n * @param {*} itemTypes : ['products'] - Mandatory as is\n * @param {*} rootElement : ['nb-slider'] - Root DOM element for item detection. Closest common ancestor element of the inserted/displayed promotions and products. It will help the detection to reduce its performance consumption. Set to 0 (zero) in order to request detection through the entire document.\n */\nexport const itemDisplay = args => {\n    window.gtmDataObject = window.gtmDataObject || []\n    const eventData = {\n        event: 'itemDisplay',\n        eventRaisedBy: raisedByWC,\n        eventAction: 'Click',\n        itemTypes: ['products'],\n        ...args\n    }\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent('itemDisplay', eventData)\n}\n\n/**\n *\n * helper method for 'customEvent' GTM event\n * @param {*} args (event, eventRaisedBy, eventCategory, eventAction, eventLabel, nonInteraction)\n */\n\nexport const customEvent = args => {\n    window.gtmDataObject = window.gtmDataObject || []\n    var eventData\n    if (args.event_GA4 === undefined || args.event_GA4 === false) {\n        eventData = {\n            event: 'customEvent',\n            eventRaisedBy: raisedByWC,\n            ...args\n        }\n    } else {\n        eventData = {\n            event_raised_by: raisedByPB,\n            ...args\n        }\n    }\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent('customEvent', eventData)\n}\n\n/**\n * Helper method for tracking component interactions, compatible with GA4.\n *\n * @param {String} creative : component raising the event, e.g. 'before_coffees_list', 'before_machines_list', 'before_accessories_list'\n * @param {String} actionType : description of the interaction, e.g 'pdp quick view'\n * @param {String} internationalId : long SKU, e.g. 'erp.pt.b2c/prod/7243.30'\n * @param {String} internationalName : international name of the product, e.g. 'Vertuo Carafe Pour-Over Style Mild'\n * @param {String} productType : type of product, i.e. 'capsule', 'machine', 'accessory'\n * @param {String} range : product range, e.g. 'ispirazione italiana'\n * @param {String} technology : technology, i.e. 'original', 'vertuo'\n * @param {Number} price : price, e.g. .51\n * @param {String} eventAction : description of the action, e.g. 'PDP Quick View'\n *\n * Initally created for PDP Quick View tracking:\n * https://dsu-confluence.nestle.biz/display/DIANA/BEFORE+-+PDP+Quick+View\n * Will probably be rolled out across all components, update this comment accordingly.\n */\nexport const trackComponentInteraction = ({\n    creative = '',\n    actionType = '',\n    internationalId = '',\n    internationalName = '',\n    productType = '',\n    technology = '',\n    category = '',\n    rawPrice = '',\n    eventAction = ''\n}) => {\n    window.gtmDataObject = window.gtmDataObject || []\n    const eventData = {\n        event: 'page_builder_component_interaction',\n        event_raised_by: raisedByPB,\n        component_name: creative,\n        action_type: actionType,\n        item_id_event: internationalId,\n        item_name_event: internationalName,\n        item_category_event: productType,\n        item_technology_event: technology,\n        item_range_event: category,\n        item_price_event: rawPrice,\n        eventCategory: 'User Engagement',\n        eventAction: eventAction,\n        eventLabel: `${productType} - ${technology} - ${internationalName}`\n    }\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\n/**\n *\n * Push 'view_promotion' event for GA 4\n * @param {*} args (event, event_raised_by, ecommerce: {promotion_id, promotion_name, creative_slot, creative_name})\n */\nexport const viewPromotion = args => {\n    const event = 'view_promotion'\n    const eventData = {\n        event,\n        event_raised_by: raisedByPB,\n        ecommerce: {}\n    }\n    if (Object.keys(args).length) {\n        const { id = '', creative = '', name = '', position = '' } = args\n        let ecommerceData = {\n            promotion_id: id,\n            promotion_name: name,\n            creative_slot: position,\n            creative_name: creative\n        }\n        ecommerceData = removeEmptyValues(ecommerceData)\n        eventData.ecommerce = ecommerceData\n    }\n    window.gtmDataObject ??= []\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent(event, eventData)\n}\n\nexport const handlePromoClick = args => {\n    const { campaign, cta_name } = args\n\n    const cleanedData = removeEmptyValues(campaign)\n    selectPromotion({ cta_name, ...cleanedData })\n}\n\n/**\n *\n * Push 'select_promotion' event for GA 4\n * @param {*} args (event, event_raised_by, cta_name, ecommerce: {promotion_id, promotion_name, creative_slot, creative_name})\n */\nexport const selectPromotion = args => {\n    const event = 'select_promotion'\n    const eventData = {\n        event: 'select_promotion',\n        cta_name: args?.cta_name ?? '(not set)',\n        event_raised_by: raisedByPB,\n        ecommerce: {}\n    }\n    if (Object.keys(args).length) {\n        const { id = '', creative = '', name = '', position = '' } = args\n        let ecommerceData = {\n            promotion_id: id,\n            promotion_name: name,\n            creative_slot: position,\n            creative_name: creative\n        }\n        ecommerceData = removeEmptyValues(ecommerceData)\n        eventData.ecommerce = ecommerceData\n    }\n\n    window.gtmDataObject ??= []\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent(event, eventData)\n}\n\nexport const interactionClick = (nameComponent, ctaName) => {\n    window.gtmDataObject = window.gtmDataObject || []\n    const eventData = {\n        event: 'page_builder_component_interaction',\n        event_raised_by: raisedByPB,\n        eventCategory: 'User Engagement',\n        eventAction: 'Click CTA',\n        eventLabel: `Page Builder - ${nameComponent} - ${ctaName}`,\n        component_name: nameComponent,\n        action_type: 'web component click',\n        cta_name: ctaName\n    }\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\nexport const getProductInfo = async (sku, data) => {\n    let product = data\n    if (!product) {\n        product = await getProduct(sku)\n    }\n    return product\n}\n\nexport const getProductPayload = (data, actionField = {}) => {\n    const {\n        internationalName,\n        internationalId,\n        category,\n        unitPrice,\n        legacyId,\n        name,\n        technologies,\n        bundled,\n        inStock,\n        type\n    } = data\n\n    const technology = technologies.map(item => item.split('/').pop()).join('|')\n    const isDiscovery = category.toLowerCase().includes('discovery')\n\n    return [\n        // Array consists of one product details for PDP Product Detail View\n        {\n            ...actionField,\n            name: internationalName, // '[[International Product Name]]' NIE, Contract\n            id: internationalId, // '[[International Product ID]]'\n            price: unitPrice, // '[[Product Price]'\n            // dimension43: '[[true/false]]', // '[[true/false]]' // Signifies if this product is part of a standing order or not\n            dimension44: isDiscovery.toString(), // '[[true/false]]', // Signifies if this product is part of a discovery offer\n            dimension53: legacyId, // '[[Product Local market ID]]', // Local market id for product\n            dimension54: name, // '[[Product Local market Name]]', // Local market name for product\n            dimension55: category, // '[[Product Range]]', // Range of the product, eg: Barista Creations for Ice (Nessoft Category)\n            dimension56: technology, // '[[Product Technology]]', //Product technology according to Nespresso categorization (original, vertuo, pro)\n            dimension57: bundled ? 'bundle' : 'single', // '[[Product Type]]', //If the product is single or bundle\n            dimension192: inStock ? 'in stock' : 'out of stock', // '[in stock]', // \"in stock\" or \"out of stock\"\n            category: type, // '[[Product Category]]', //Product category according to Nespresso categorization (Nessoft type): capsule, accessory, machine\n            brand: 'Nespresso' // Static value set to Nespresso\n        }\n    ]\n}\n\nexport const trackDetailView = async (sku, data) => {\n    // https://dsu-confluence.nestle.biz/display/DIANA/HQ+PB+Tracking+-+Product+Detail+View\n    if (window.pbTrackDetailViewPDP || !sku || !window.napi) {\n        return\n    }\n\n    const productInfo = await getProductInfo(sku, data)\n    const productPayload = getProductPayload(productInfo)\n    const currency = productInfo.currency\n\n    window.gtmDataObject = window.gtmDataObject || []\n    const eventData = {\n        event: 'detailView',\n        currencyCode: currency,\n        eventRaisedBy: raisedByPB,\n        ecommerce: {\n            detail: {\n                actionField: {},\n                products: productPayload\n            }\n        }\n    }\n    window.gtmDataObject.push(eventData)\n    // Track only once per page\n    window.pbTrackDetailViewPDP = true\n    emitCustomEvent('detailView', eventData)\n}\n\nexport const trackAddToCartImpression = (product, isStickyBar) => {\n    // https://dsu-confluence.nestle.biz/pages/viewpage.action?spaceKey=DIANA&title=PDP+-+Sticky+Add+To+Cart+Custom+Event\n\n    window.gtmDataObject = window.gtmDataObject || []\n    const eventData = {\n        event: 'page_builder_component_interaction',\n        event_raised_by: raisedByPB,\n        component_name: 'before_sku_main_info',\n        action_type: isStickyBar\n            ? 'sticky add to cart impression'\n            : 'standard add to cart impression',\n        //product info\n        item_id_event: product.internationalId,\n        item_name_event: product.internationalName,\n        item_category_event: product.type,\n        item_price_event: product.price_per_capsule?.split(' ')[0],\n        item_market_id_event: product.legacyId,\n        item_market_name_event: product.name,\n        item_range_event: product.category_name,\n        item_technology_event: product.technology?.[0]?.split('/').slice(-1) ?? '',\n        item_type_event: product.bundled ? 'bundle' : 'single'\n    }\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent('page_builder_component_interaction', eventData)\n}\n\nexport const productImpression = async (position, list, sku, data) => {\n    // https://dsu-confluence.nestle.biz/pages/viewpage.action?pageId=225612781\n    // don't track already tracked products\n    window.gtmDataObject = window.gtmDataObject || []\n    const hasDetailView = window.gtmDataObject.find(item => item.event === 'detailView')\n    const alreadyTracked = !!hasDetailView?.ecommerce?.detail?.products.find(p =>\n        sku.includes(p.id)\n    )\n    if (alreadyTracked) {\n        return\n    }\n\n    const productInfo = await getProductInfo(sku, data)\n    const productPayload = getProductPayload(productInfo, { list: list, position: position })\n    const currency = productInfo.currency\n    const eventData = {\n        event: 'impression',\n        eventAction: 'Product Impression',\n        currencyCode: currency,\n        eventRaisedBy: raisedByPB,\n        ecommerce: {\n            impressions: productPayload\n        }\n    }\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent('impression', eventData)\n}\n\nexport const productClick = async (position, list, sku, data) => {\n    // https://dsu-confluence.nestle.biz/pages/viewpage.action?pageId=225612781\n\n    if (typeof list !== 'string') return\n\n    const productInfo = await getProductInfo(sku, data)\n    const productPayload = getProductPayload(productInfo, { position: position })\n    const currency = productInfo.currency\n\n    window.gtmDataObject = window.gtmDataObject || []\n    const eventData = {\n        event: 'productClick',\n        eventAction: 'Product Click',\n        currencyCode: currency,\n        eventRaisedBy: raisedByPB,\n        ecommerce: {\n            click: {\n                actionField: {\n                    list: list\n                },\n                products: productPayload\n            }\n        }\n    }\n    window.gtmDataObject.push(eventData)\n    emitCustomEvent('productClick', eventData)\n}\n\nexport function filterTrackingFromPlpFilters(filtersSelected) {\n    const grouped = groupSelectedFilters(filtersSelected)\n    const groupKeys = Object.keys(grouped)\n    const typesFiltersSelected = groupKeys.join('|').substring(0, 99)\n    const valuesFiltersSelected = groupKeys\n        .map(key => grouped[key].values.map(value => value.split('/').at(-1)).join(','))\n        .join('|')\n        .substring(0, 99)\n\n    return [typesFiltersSelected, valuesFiltersSelected]\n}\n\nexport const filterActionEvent = (\n    actionType,\n    filterType,\n    filterValues,\n    clickLocation,\n    dataType\n) => {\n    // https://dsu-confluence.nestle.biz/display/DIANA/PLP+-+Filter+Revamp\n    window.gtmDataObject = window.gtmDataObject || []\n    const eventData = getExplicitFilterEventData(\n        actionType,\n        filterType,\n        filterValues,\n        clickLocation\n    )\n\n    window.gtmDataObject.push(eventData)\n    if (window.NEXT_V1_PLP_EXPLICIT_FILTER_TRACKING && dataType) {\n        window.gtmDataObject.push({\n            ...window.NEXT_V1_PLP_EXPLICIT_FILTER_TRACKING,\n            experiment_action: `${actionType} - ${dataType}`,\n            cta_name: 'All filters'\n        })\n    }\n\n    emitCustomEvent('plp_filter', eventData)\n}\n\nconst getExplicitFilterEventData = (actionType, filterType, filterValues, clickLocation) => {\n    return {\n        event: 'plp_filter',\n        event_raised_by: raisedByPB,\n        action_type: actionType,\n        filter_type: filterType,\n        ...(filterValues ? { filter_values: filterValues } : {}),\n        ...(clickLocation ? { click_location: clickLocation } : {})\n    }\n}\n\nfunction groupSelectedFilters(filtersSelected = []) {\n    return filtersSelected.reduce((grouped, { key, value }) => {\n        if (!grouped[key]) grouped[key] = { key, values: [] }\n        grouped[key].values.push(value.replaceAll(',', '-'))\n        return grouped\n    }, {})\n}\n\nfunction arrTolastURLElementMapper(arr) {\n    if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n    return arr.map(item => item.split('/').pop()?.trim() || '')\n}\n\nfunction arrToJoinedString(arr, joiner = '|') {\n    if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n    return arr.map(item => item.trim()).join(joiner)\n}\n\nfunction findTechnogiesText(arr) {\n    if (typeof arr === 'undefined' || arr.length === 0) return undefined\n\n    if (arr.length === 1) return cleanText(arrTolastURLElementMapper(arr)?.[0])\n    else return 'multiple'\n}\n\nfunction cleanText(str) {\n    if (typeof str === 'undefined') return undefined\n\n    return str.toString().trim()\n}\n\nconst generateEcommerceObject = async (productIds, options) => {\n    const productRequests = productIds.map(SKU => getProduct(SKU))\n    const productData = await Promise.all(productRequests)\n\n    return {\n        ecommerce: {\n            currency: window[window.config.padl.namespace].dataLayer.app.app.currency,\n            value: productData.reduce((ac, product) => {\n                return ac + product.price\n            }, 0),\n            items: productData.map((product, index) => {\n                if (product.type === 'bundle' || product.type === 'giftcard') {\n                    return {\n                        item_id: cleanText(product.internationalId),\n                        item_name: cleanText(product.internationalName),\n                        item_brand: 'nespresso',\n                        item_category: cleanText(product.type),\n                        index: index + 1\n                    }\n                }\n\n                let output = {\n                    item_id: cleanText(product.internationalId),\n                    item_name: cleanText(product.internationalName),\n                    item_brand: 'nespresso',\n                    item_category: cleanText(product.type),\n                    item_category2: arrToJoinedString(\n                        arrTolastURLElementMapper(product.technologies)\n                    ),\n                    item_category3: cleanText(product.category),\n                    price: product.price,\n                    quantity: product.salesMultiple,\n                    affiliation: 'nespresso online store',\n                    coupon: undefined,\n                    discount: undefined,\n                    location_id: undefined,\n                    item_list_name: cleanText(options?.listName),\n                    item_list_id: cleanText(options?.listId),\n                    index: index + 1,\n                    item_market_id: cleanText(product.legacyId),\n                    item_market_name: cleanText(product.name),\n                    item_technology: findTechnogiesText(product.technologies),\n                    item_range: cleanText(product.category),\n                    item_discovery_offer: product.category.includes('discovery').toString(),\n                    item_added_by_user: undefined,\n                    item_ecotax_applicable: product?.displayEcoTax\n                        ? cleanText(product?.displayEcoTax.toString())\n                        : undefined,\n                    item_selection_list: cleanText(arrToJoinedString(product.productSelections)),\n                    item_in_stock: product?.inStock\n                        ? cleanText(product?.inStock.toString())\n                        : undefined,\n                    item_subscription_name: undefined,\n                    item_subscription_category: undefined,\n                    item_subscription_price: undefined,\n                    item_subscription_duration: undefined,\n                    item_subscription_fee: undefined\n                }\n\n                switch (product.type) {\n                    case 'capsule': {\n                        const capsuleProduct = product\n\n                        output.item_category4 = capsuleProduct.bundled ? 'bundle' : 'single'\n\n                        output.item_type = capsuleProduct.bundled ? 'bundle' : 'single'\n\n                        output.item_coffee_aromatic_profile = cleanText(\n                            arrToJoinedString(capsuleProduct.capsuleProductAromatics)?.toLowerCase()\n                        )\n\n                        output.item_coffee_intensity =\n                            cleanText(capsuleProduct.capsuleProperties.intensity) ?? undefined\n\n                        output.item_coffee_cup_size = cleanText(\n                            arrToJoinedString(capsuleProduct.capsuleCupSizes)\n                        )?.toLowerCase()\n\n                        break\n                    }\n                    case 'machine': {\n                        const machineProduct = product\n\n                        output.item_machine_shade = cleanText(machineProduct.colorShade?.name)\n\n                        break\n                    }\n                }\n\n                if (product.type === 'machine' || product.type === 'accessory') {\n                    output.item_avg_rating = product.ratingCode\n                    output.item_number_of_reviews = product.ratingCode\n                }\n\n                return output\n            })\n        }\n    }\n}\n\nexport const selectItems = async (productIds, options) => {\n    const ecommerceObject = await generateEcommerceObject(productIds, options)\n\n    const output = {\n        event: 'select_item',\n        event_raised_by: options?.eventRaisedBy ?? 'before_cross_sell_v3',\n        click_location: options?.clickLocation ?? 'page builder cross sell quick view',\n        item_list_id: options?.listId ?? 'before_cross_sell_v3',\n        subscription_product_included: 'false',\n        discovery_offer_included: 'false',\n        ...ecommerceObject\n    }\n\n    window.gtmDataObject.push({ ecommerce: null })\n    window.gtmDataObject.push(output)\n}\n\nexport const viewItemList = async (productIds, options) => {\n    const ecommerceObject = await generateEcommerceObject(productIds, options)\n\n    const output = {\n        event: 'view_item_list',\n        event_raised_by: options?.eventRaisedBy,\n        subscription_product_included: 'false',\n        discovery_offer_included: 'false',\n        ...ecommerceObject\n    }\n\n    if (options?.eventRaisedBy === undefined) delete output.event_raised_by\n\n    window.gtmDataObject.push({ ecommerce: null })\n    window.gtmDataObject.push(output)\n}\n\nexport const isGtmTrackingExists = trackingData => {\n    window.gtmDataObject = window.gtmDataObject || []\n\n    return window.gtmDataObject.some(\n        event =>\n            event.event === trackingData.event &&\n            event.ecommerce?.creative_slot === trackingData.campaign.position &&\n            event.ecommerce?.promotion_id === trackingData.campaign.id &&\n            event.ecommerce?.promotion_name === trackingData.campaign.name &&\n            event.ecommerce?.creative_name === trackingData.campaign.creative\n    )\n}\n","import {\n    getProduct,\n    getProductCategories,\n    ECAPI_TYPE_CAPSULE,\n    ECAPI_TYPE_GIFT_CARD\n} from '@kissui/helpers/src/catalog'\n\n/**\n * Api fetcher service\n *\n * @returns {object}\n */\nconst fetcher = () => {\n    const apiRatings = window.napi && window.napi.ratings\n    const apiPriceFormat = window.napi && window.napi.priceFormat\n    let priceFormatter = null\n\n    const loadPriceFormat = async () => {\n        priceFormatter = await apiPriceFormat()\n    }\n\n    const getApiProduct = async sku => await getProduct(sku)\n\n    /**\n     * Get all products merged with data coming from API\n     *\n     * @returns {Promise<array>}list of products\n     * @param productList\n     * @param withRating\n     */\n    const getAll = (productList, withRating) =>\n        Promise.all(\n            productList.map(async product => {\n                try {\n                    const fetchedProduct = await getOne(product, withRating)\n                    productList.splice(productList.indexOf(product), 1, fetchedProduct)\n                } catch (error) {\n                    productList.splice(productList.indexOf(product), 1)\n                }\n            })\n        )\n\n    /**\n     * Get product merged with data coming from API\n     *\n     * @returns {Promise} product\n     * @param product\n     * @param withRating\n     */\n    const getOne = async (product, withRating) => {\n        try {\n            return await fetchOne(product, withRating)\n        } catch (error) {\n            console.error(`Fetch for product ${product.sku} failed: ${error}`)\n            throw error\n        }\n    }\n\n    /**\n     * Fetch and merge product with data coming from API\n     *\n     * @param {object} product - base product from static data\n     * @param apiProduct\n     * @param withRating\n     * @param list\n     * @returns {Promise<object>} Product\n     */\n    const fetchOne = async (product, withRating) => {\n        const { api_override: { name = '', headline = '', description = '' } = {} } = product\n\n        const apiProduct = await getApiProduct(product.sku)\n        const productCategories = await getProductCategories(product.sku)\n\n        const overrides = {\n            name: name !== '' ? name : apiProduct.name,\n            headline: headline !== '' ? headline : apiProduct.headline,\n            description: description !== '' ? description : apiProduct.description,\n            longSku: apiProduct ? apiProduct.id : null,\n            price: apiProduct ? apiProduct.price : null,\n            pdp_urls: getValueObject(apiProduct, 'pdpURLs'),\n            images: apiProduct.images,\n            slides: apiProduct.slides,\n            technologies: apiProduct.technologies,\n            type: apiProduct.type,\n            productCategories\n        }\n\n        if (withRating && product.productRatings?.ratingEnabled) {\n            overrides.rating = await getRating(product, apiProduct)\n        }\n\n        if (apiProduct.type === ECAPI_TYPE_CAPSULE) {\n            overrides.bundled = apiProduct.bundled\n            overrides.intensity = apiProduct.capsuleProperties?.intensity || 0\n            overrides.unit_quantity = getValueNumber(apiProduct, 'unitQuantity', 1)\n            overrides.sales_multiple = getValueNumber(apiProduct, 'salesMultiple', 10)\n        }\n\n        if (apiProduct.type === ECAPI_TYPE_GIFT_CARD) {\n            if (!product.variant.giftcard_price) {\n                throw new Error('Gift Card amount price is not defined')\n            }\n\n            overrides.price = product.variant.giftcard_price\n            overrides.images = { icon: product.variant.default_image }\n        }\n\n        return { ...merge(product, apiProduct), ...overrides }\n    }\n\n    /**\n     * Merge products based on static product existing keys\n     * A shallow copy is made to prevent original object mutation\n     *\n     * @param {object} product\n     * @param {object} apiProduct\n     * @param {boolean} force Force property override\n     * @returns {object} Product\n     */\n    const merge = (product, apiProduct, force = false) => {\n        const mergedProduct = { ...product }\n\n        if (!apiProduct) {\n            return mergedProduct\n        }\n\n        for (const key of Object.keys(mergedProduct)) {\n            const empty = mergedProduct[key] === '' || mergedProduct[key] === '0'\n            if (key in apiProduct && (empty || force)) {\n                mergedProduct[key] = apiProduct[key]\n            }\n        }\n\n        return mergedProduct\n    }\n\n    /**\n     * @param {object} apiProduct\n     * @returns {number}\n     */\n    const getValueNumber = (apiProduct, key, defaultValue) =>\n        parseInt((apiProduct && apiProduct[key]) || defaultValue)\n\n    /**\n     * @param {object} apiProduct\n     * @returns {object}\n     */\n    const getValueObject = (apiProduct, key) => {\n        return apiProduct && Object.keys(apiProduct[key]).length > 0 ? apiProduct[key] : {}\n    }\n\n    /**\n     * @param {string} sku\n     * @returns {Promise<number>} Rating value\n     */\n    const getRating = async ({ sku }, apiProduct) => {\n        if (\n            !apiRatings ||\n            (apiProduct && apiProduct.productRatings && !apiProduct.productRatings.ratingEnabled)\n        ) {\n            return toFloat(0, 1)\n        }\n\n        try {\n            const { ratingAverage = 0 } = await apiRatings().summary(sku)\n            return toFloat(ratingAverage !== 0 ? ratingAverage : 0, 1)\n        } catch (error) {\n            console.error(`Product rating fetch failed on sku ${sku}`, error)\n            return toFloat(0, 1)\n        }\n    }\n\n    /**\n     * Get currency from datalayer\n     * @returns {string}\n     */\n    const _getCurrency = () => {\n        const { dataLayer = {} } = window[window.config.padl.namespace]\n        return dataLayer.app?.app?.currency\n    }\n\n    /**\n     * @returns {string}\n     * @param price\n     */\n    const formatPrice = price => {\n        const { short } = priceFormatter\n        return short(_getCurrency(), price)\n    }\n\n    /**\n     * @param {number} value\n     * @param {number} decimal\n     * @returns {number}\n     */\n    const toFloat = (value, decimal = 2) => parseFloat(value).toFixed(decimal)\n\n    return {\n        loadPriceFormat,\n        getApiProduct,\n        getAll,\n        getOne,\n        fetchOne,\n        merge,\n        formatPrice\n    }\n}\n\nexport default fetcher()\n","export const dispatchEvent = ({ eventName, args, element }) => {\n    // Use the provided element or fallback to window if available\n    if (!element) {\n        if (typeof window !== 'undefined') {\n            element = window\n        } else {\n            throw new Error(\n                '`element` is not provided and `window` is unavailable. Provide a valid element to dispatch the event.'\n            )\n        }\n    }\n\n    let event\n    if (args) {\n        event = new CustomEvent(eventName, { detail: args, bubbles: true })\n    } else {\n        if (typeof Event === 'function') {\n            event = new Event(eventName)\n        } else {\n            event = document.createEvent('Event')\n            event.initEvent(eventName, true, true)\n        }\n    }\n    element.dispatchEvent(event)\n}\n\nexport const readEvent = e => {\n    if (!e.detail) {\n        return\n    }\n    return e.detail\n}\n","export const root = 'carousel'\nexport const wrapper = 'wrapper'\nexport const container = 'container'\nexport const item = 'item'\nexport const next = 'next'\nexport const prev = 'prev'\nexport const hidden = 'hidden'\nexport const bulletActive = 'active'\nexport const dragRatio = 0.1\n","import viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { EVENT_POPIN_OPEN } from '@kissui/components'\nimport { hidden } from '@kissui/components/src/slider/js/constants'\n\n/**\n * Slider service\n *\n * @returns {object}\n */\nconst service = element => {\n    const slider = element.refs.slider._slider\n\n    if (!slider) {\n        return\n    }\n\n    const geometry = {\n        container: { width: slider._widthContainer },\n        slider: { width: slider._widthWrapper },\n        slide: { width: slider._widthSlide }\n    }\n\n    let previousSlideIndex = -1\n    let actions = {}\n\n    const _setActions = () => {\n        actions = viewportHelper.is.mobile\n            ? { open: _open, close: _close }\n            : {\n                  open: _expand,\n                  close: _collapse\n              }\n    }\n\n    const _dispatchEvents = () => {\n        for (const slide of slider._slides) {\n            dispatchEvent({\n                eventName: 'EVENT_CROSS_SELL_READY',\n                element: slide,\n                args: { parent: element, geometry }\n            })\n        }\n    }\n\n    const getLimit = () => slider._slides.length - slider.slidesVisible\n\n    const isExpanded = () => previousSlideIndex > -1\n    const isOverflowing = () => previousSlideIndex >= getLimit()\n\n    /**\n     * Trigger slider repaint when card toggles state\n     *\n     * @param {boolean} slideWillExpand\n     * @param {number} slideIndex\n     */\n    const update = (slideWillExpand, slideIndex) => {\n        const slideHasChanged = slideIndex !== previousSlideIndex\n\n        if (slideWillExpand) {\n            if (isExpanded() && slideHasChanged) {\n                _closeSlide(previousSlideIndex)\n            }\n            actions.open(slideIndex)\n            _move(slideIndex)\n        } else {\n            actions.close(slideIndex)\n            _move(slideIndex)\n        }\n    }\n\n    /**\n     * Emit event to open popin with details (mobile only)\n     *\n     * @param {number} index\n     */\n    const _open = slideIndex => {\n        const card = slider._slides[slideIndex]\n        const { idPopin } = card\n        dispatchEvent({ eventName: EVENT_POPIN_OPEN, args: { id: idPopin } })\n    }\n\n    /**\n     * (mobile only)\n     */\n    const _close = () => {}\n\n    /**\n     * Animate slide and container expansion\n     *\n     * @param {number} slideIndex\n     */\n    const _expand = slideIndex => {\n        const slide = slider._children[slideIndex]\n        const slideWidth = geometry.slider.width\n        const delta = geometry.slider.width - geometry.slide.width\n        const containerWidth = geometry.container.width + delta\n\n        slider.setSlideWidth(slide, slideWidth)\n        slider.setContainerWidth(containerWidth)\n\n        previousSlideIndex = slideIndex\n    }\n\n    /**\n     * Update slides active styles after expand\n     */\n    const updateSlidesStyles = () => {\n        for (const slide of slider._children) {\n            slide.classList.remove('activeParent')\n        }\n        slider._children[slider._currentIndex].classList.add('activeParent')\n    }\n\n    const resetSlidesVisibility = () => {\n        slider.activateItems()\n    }\n\n    /**\n     * Animate slide and container collapse\n     *\n     * @param {number} slideIndex\n     */\n    const _collapse = slideIndex => {\n        const slide = slider._children[slideIndex]\n        const slideWidth = geometry.slide.width\n        const containerWidth = geometry.container.width\n\n        slider.setSlideWidth(slide, slideWidth)\n        slider.setContainerWidth(containerWidth)\n\n        previousSlideIndex = -1\n    }\n\n    /**\n     * Update card component with close state\n     *\n     * @param {number} slideIndex\n     */\n    const _closeSlide = slideIndex => {\n        const card = slider._slides[slideIndex]\n        card.setAttribute('expanded', 'false')\n    }\n\n    /**\n     * Trigger slider motion after checking bound\n     *\n     * @param {number} incomingIndex\n     */\n    const _move = incomingIndex => {\n        const bound = getLimit()\n        const isInBound = incomingIndex <= bound\n        if (!isExpanded() && !isInBound) {\n            incomingIndex = bound\n        }\n        slider.goToItem(incomingIndex)\n        if (isExpanded()) {\n            updateSlidesStyles()\n        } else {\n            resetSlidesVisibility()\n        }\n    }\n\n    /**\n     * Overrides translate value based on expansion status\n     *\n     * @param {number} incomingIndex\n     * @param {number} translateValue\n     * @returns {number}\n     */\n    const _onSlideChange = (incomingIndex, translateValue) => {\n        const toPrevious = previousSlideIndex > incomingIndex\n        const toNext = previousSlideIndex < incomingIndex\n\n        const maxTranslate = slider._widthContainer - slider._widthSlide * slider.slidesVisible\n\n        const expandedSlideWidth = geometry.slider.width\n        const otherSlidesWidth = (incomingIndex - 1) * geometry.slide.width\n\n        if (isExpanded() && toNext) {\n            const newTranslateValue = Math.min(expandedSlideWidth + otherSlidesWidth, maxTranslate)\n            return newTranslateValue\n        }\n\n        if (isExpanded() && toPrevious) {\n            const newTranslateValue = Math.min(expandedSlideWidth + otherSlidesWidth, maxTranslate)\n            return newTranslateValue\n        }\n\n        return translateValue\n    }\n\n    /**\n     * Overrides previous index to match slider position when status is expanded\n     *\n     * @param {number} previousIndex\n     * @returns {number}\n     */\n    const _onPrevious = previousIndex => {\n        if (isExpanded()) {\n            _closeSlide(previousSlideIndex)\n        }\n\n        if (isOverflowing()) {\n            return previousIndex - 1\n        }\n\n        return previousIndex\n    }\n\n    /**\n     * Overrides next index to match slider position when status is expanded\n     *\n     * @param {number} nextIndex\n     * @returns {number}\n     */\n    const _onNext = nextIndex => {\n        if (isExpanded()) {\n            _closeSlide(previousSlideIndex)\n        }\n\n        if (isOverflowing()) {\n            return nextIndex - 1\n        }\n\n        return nextIndex\n    }\n\n    /**\n     * Overrides right boundary status based on overflowing status\n     *\n     * @param {boolean} boundaryReached\n     * @param {number} incomingIndex\n     * @returns {boolean}\n     */\n    const _onGetRightBoundary = (boundaryReached, incomingIndex) => {\n        const bound = slider._slides.length - slider.slidesToScroll\n        const isInBound = incomingIndex <= bound\n\n        return isOverflowing() ? !isInBound : boundaryReached\n    }\n\n    /**\n     * Overrides next element class based on slide status and position\n     *\n     * @param {HTMLElement} nextButton\n     */\n    const _onMove = nextButton => {\n        const isBeforeLast = slider._currentIndex === slider._slides.length - 2\n        const isSpreading =\n            isExpanded() && previousSlideIndex >= slider._currentIndex && isBeforeLast\n\n        const bound = isSpreading ? slider._slides.length - 1 : getLimit()\n        const isInBound = slider._currentIndex <= bound\n\n        if (isOverflowing()) {\n            if (isInBound) {\n                nextButton.classList.remove(hidden)\n            } else {\n                nextButton.classList.add(hidden)\n            }\n        }\n    }\n\n    const _initialize = () => {\n        _setActions()\n        _dispatchEvents()\n        slider.goToItem(0)\n        slider._options['hookGetRightBoundary'] = _onGetRightBoundary\n        slider._options['hookMove'] = _onMove\n        slider._options['hookSlideChange'] = _onSlideChange\n        slider._options['hookPrevious'] = _onPrevious\n        slider._options['hookNext'] = _onNext\n    }\n\n    _initialize()\n\n    return { update, slider }\n}\n\nexport default service\n","import createProps from '@kissui/helpers/src/props.helpers'\n\nclass CardLabels extends HTMLElement {\n    constructor() {\n        super()\n        this.props = {}\n        this.labels = []\n    }\n\n    connectedCallback() {\n        this.props = createProps(this.attributes)\n        this.render()\n    }\n\n    render() {\n        const { labels = [], direction = 'column' } = this.props\n        this.classList.add(`${direction === 'row' ? 'direction-row' : 'direction-' + direction}`)\n\n        if (labels.length === 0) {\n            return ''\n        }\n        this.labels = labels\n\n        this.innerHTML = `${this.renderLabels()}`\n    }\n\n    renderLabels() {\n        return this.labels\n            .map(label => {\n                const { name = '', bgColor = '', color = '' } = label\n                return `<mark class=\"t-3xs-500-caps-sl\"\n                            ${\n                                bgColor &&\n                                color &&\n                                `style=\"background: ${bgColor}; color: ${color}\"`\n                            }>\n                            <span>${name}</span>\n                        </mark>`\n            })\n            .join('')\n    }\n}\n\ncustomElements.get('nb-card-labels') || customElements.define('nb-card-labels', CardLabels)\n\nexport default CardLabels\n","export const getDataLayer = () => {\n    return window[window?.padlNamespace]?.dataLayer\n}\n\nexport const getMarketCode = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer) {\n        return 'ch'\n    }\n\n    return dataLayer.app.app.market.toLocaleLowerCase()\n}\n\nexport const getLangCode = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer) {\n        return 'en'\n    }\n\n    return getDataLayer().page.page.pageInfo.language.toLocaleLowerCase()\n}\n\nexport const getSegmentCode = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer) {\n        return 'B2C'\n    }\n\n    return getDataLayer().page.page.pageInfo.segmentBusiness\n}\n\nexport const isLoggedIn = () => {\n    const dataLayer = getDataLayer()\n    if (!dataLayer || !dataLayer.user) {\n        return false\n    }\n\n    return dataLayer.user.isLoggedIn\n}\n\nexport const interpolateMarketLang = (string, market, lang) => {\n    return string.replace('{market}', market).replace('{lang}', lang)\n}\n","import { getMarketCode } from './dataLayer'\n\nconst LABEL_CATEGORY_NAME = 'cat/capsule-range-label'\nconst LABEL_CATEGORY_NAME_MACHINE = 'cat/machine-range-label'\nexport const RANGE_CATEGORY_NAME = 'cat/capsule-range'\nconst FAIR_TRADE_CATEGORY_NAME = 'cat/capsule-range-fair-trade'\nconst VERTUO_NEXT_CATEGORY_NAME = 'cat/capsule-attribute-only-vertuo-next'\nconst ORGANIC_EU_CATEGORY_NAME = 'capsule-attribute-organic-eu'\nconst RAINFOREST_CATEGORY_NAME = 'capsule-attribute-rainforest'\nconst SUSTAINABILITY_CATEGORY_NAME = 'capsule-attribute-sustainability'\nconst ARABICA_CATEGORY_NAME = 'capsule-attribute-arabica'\nconst PRODUCT_HIGHLIGHT_CATEGORY_NAME = 'cat/capsule-attribute-highlight'\nconst TECHNOLOGY_CATEGORY_IDENTIFIER = '/machineTechno/'\n\nconst COMMON_URL = 'https://www.nespresso.com/shared_res/agility/commons/img/icons/'\n\nexport const FAIR_TRADE_IMG = COMMON_URL + 'fairTrade.svg'\nexport const ORGANIC_LOGO_IMG_EU = COMMON_URL + 'logo-organic-eu.svg'\nexport const ORGANIC_LOGO_IMG_US = COMMON_URL + 'logo-organic-us.svg'\nexport const ORGANIC_LOGO_IMG_CA = COMMON_URL + 'logo-organic-ca.svg'\nexport const ORGANIC_LOGO_IMG_BR = COMMON_URL + 'logo-organic-br.svg'\nexport const ORGANIC_LOGO_IMG_JP = COMMON_URL + 'logo-organic-jp.svg'\nexport const ORGANIC_LOGO_IMG_BE = COMMON_URL + 'logo-organic-be.png'\n\nexport const VERTUONEXT_LOGO_IMG = COMMON_URL + 'logo-only-vertuo-next.svg'\nexport const RAINFOREST_LOGO_IMG = COMMON_URL + 'logo-rainforest.svg'\nexport const SUSTAINABILITY_LOGO_IMG = COMMON_URL + 'logo-sustainability.svg'\nexport const Q_CERTIFICATION_ARABICA_LOGO_IMG = COMMON_URL + 'q_grade_certification_arabica.svg'\nexport const DESIGN_AWARD_2021_IMG = COMMON_URL + 'design_award_2021.svg'\n\nexport const LOGO_IMG_MAP = {\n    fair_trade: FAIR_TRADE_IMG,\n    is_organic: getOrganicLogo(),\n    only_vertuo_next: VERTUONEXT_LOGO_IMG,\n    is_q_certified_arabica: Q_CERTIFICATION_ARABICA_LOGO_IMG,\n    is_rainforest: RAINFOREST_LOGO_IMG,\n    is_sustainable: SUSTAINABILITY_LOGO_IMG,\n    is_design_award_2021: DESIGN_AWARD_2021_IMG\n}\n\nexport function getOrganicLogo() {\n    let organicLogoImg = ORGANIC_LOGO_IMG_EU\n\n    switch (getMarketCode()) {\n        case 'us':\n            organicLogoImg = ORGANIC_LOGO_IMG_US\n            break\n        case 'ca':\n            organicLogoImg = ORGANIC_LOGO_IMG_CA\n            break\n        case 'br':\n            organicLogoImg = ORGANIC_LOGO_IMG_BR\n            break\n        case 'jp':\n            organicLogoImg = ORGANIC_LOGO_IMG_JP\n            break\n        case 'be':\n            organicLogoImg = ORGANIC_LOGO_IMG_BE\n            break\n    }\n\n    return organicLogoImg\n}\n\n/**\n * retrieves the list of categories of type Vertuo Next\n * @param {category[]} categories\n */\nexport function getVertuoNext(categories) {\n    return categories.find(category => isVertuoNext(category))\n}\n\n/**\n * returns true when the category is product vertuo next\n * @param {category} category\n */\nfunction isVertuoNext(category) {\n    return getCategoryRegEx(VERTUO_NEXT_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type organic EU\n * @param {category[]} categories\n */\nexport function getOrganicEu(categories) {\n    return categories.find(category => isOrganicEu(category))\n}\n\n/**\n * returns true when the category is product organic EU\n * @param {category} category\n */\nfunction isOrganicEu(category) {\n    return getCategoryRegEx(ORGANIC_EU_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type rainforest\n * @param {category[]} categories\n */\nexport function getRainforest(categories) {\n    return categories.find(category => isRainforest(category))\n}\n\n/**\n * returns true when the category is rainforest\n * @param {category} category\n */\nfunction isRainforest(category) {\n    return getCategoryRegEx(RAINFOREST_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type sustainability\n * @param {category[]} categories\n */\nexport function getSustainability(categories) {\n    return categories.find(category => isSustainability(category))\n}\n\n/**\n * retrieves the list of categories of type arabica\n * @param {category[]} categories\n */\nexport function getArabica(categories) {\n    return categories.find(category => isArabica(category))\n}\n\n/**\n * returns true when the category is arabica\n * @param {category} category\n */\nfunction isArabica(category) {\n    return getCategoryRegEx(ARABICA_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * returns true when the category is sustainability\n * @param {category} category\n */\nfunction isSustainability(category) {\n    return getCategoryRegEx(SUSTAINABILITY_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getLabels(categories) {\n    return categories.filter(category => isLabel(category))\n}\n\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getProductHighlight(categories) {\n    return categories.find(category => isProductHighlight(category))\n}\n/**\n * retrieves the list of categories of type label\n * @param {category[]} categories\n */\nexport function getFairTrade(categories) {\n    return categories.find(category => isFairTrade(category))\n}\n\n/**\n * returns a regex to match the tail (global) of a given local category ID\n * @param {string} categoryIdTail : should contain the end of the category ID\n */\nexport function getCategoryRegEx(categoryIdTail) {\n    return new RegExp(categoryIdTail.replace(/\\//g, '\\\\/'))\n}\n\n/**\n * returns true when the category is child of the label category (is type label)\n * @param {category} category\n */\nfunction isLabel(category) {\n    return (\n        getCategoryRegEx(LABEL_CATEGORY_NAME).test(category.id) ||\n        getCategoryRegEx(LABEL_CATEGORY_NAME_MACHINE).test(category.id)\n    )\n}\n\n/**\n * returns true when the category is product highlight\n * @param {category} category\n */\nfunction isProductHighlight(category) {\n    return getCategoryRegEx(PRODUCT_HIGHLIGHT_CATEGORY_NAME).test(category.id)\n}\n/**\n * returns true when the category is fair trade\n * @param {category} category\n */\nfunction isFairTrade(category) {\n    return getCategoryRegEx(FAIR_TRADE_CATEGORY_NAME).test(category.id)\n}\n\n/**\n * returns true when the category is child of the range category (is type range)\n * @param {category} category\n */\nexport function isRange(category) {\n    return category.superCategories.some(superCategory =>\n        getCategoryRegEx(RANGE_CATEGORY_NAME).test(superCategory)\n    )\n}\n\nexport function getTechnologyName(productData, categories) {\n    if (!productData || !productData.technologies || !productData.technologies.length) {\n        return null\n    }\n\n    const techno = productData.technologies[0]\n    const categoryNameAsSubstring = techno.substring(\n        techno.indexOf(TECHNOLOGY_CATEGORY_IDENTIFIER) + TECHNOLOGY_CATEGORY_IDENTIFIER.length\n    )\n    const category = categories?.find(cat => cat.id === techno)\n\n    // Backward compatibility, return name as substring if the list of categories are not available\n    return category?.name || categoryNameAsSubstring\n}\n\nexport function isCategoryHidden(categoryId) {\n    let hideCategory = false\n    // To enable AB testing: exclude categories which are to be hidden\n    if (\n        window.PLP_HIDE_CATEGORIES?.length &&\n        window.PLP_HIDE_CATEGORIES.findIndex(c => categoryId.indexOf(c) >= 0) >= 0\n    ) {\n        hideCategory = true\n    }\n\n    // To enable AB testing: exclude categories except those which are to be shown\n    if (window.PLP_ONLY_SHOW_CATEGORIES?.length) {\n        // Default to hide\n        hideCategory = true\n        if (window.PLP_ONLY_SHOW_CATEGORIES.findIndex(c => categoryId.indexOf(c) >= 0) >= 0) {\n            hideCategory = false\n        }\n    }\n    return hideCategory\n}\n","import { LOGO_IMG_MAP } from '@kissui/helpers/src/cremaDataHelper'\nimport createProps from '@kissui/helpers/src/props.helpers'\n\nclass CardLogos extends HTMLElement {\n    constructor() {\n        super()\n        this.props = {}\n    }\n\n    connectedCallback() {\n        this.props = createProps(this.attributes)\n        this.render()\n    }\n\n    render() {\n        // individual props for each logo is there for retro compatibility\n        // logos is the prop that we should use going forward to add any logo\n        let { direction = 'row', logos } = this.props\n        let fair_trade\n        let alt_fair_trade\n        let is_organic\n        let alt_organic\n        let only_vertuo_next\n        let alt_vertuo_next\n        let is_rainforest\n        let alt_rainforest\n        let is_sustainable\n        let alt_sustainable\n        let is_q_certified_arabica\n        let alt_q_certification_arabica\n\n        this.classList.add(\n            `${direction === 'column' ? 'direction-column' : 'direction-' + direction}`\n        )\n\n        let logos_list = []\n        if (logos == null) {\n            fair_trade = this.props?.fair_trade\n            alt_fair_trade = this.props?.alt_fair_trade\n            is_organic = this.props?.is_organic\n            alt_organic = this.props?.alt_organic\n            only_vertuo_next = this.props?.only_vertuo_next\n            alt_vertuo_next = this.props?.alt_vertuo_next\n            is_rainforest = this.props?.is_rainforest\n            alt_rainforest = this.props?.alt_rainforest\n            is_sustainable = this.props?.is_sustainable\n            alt_sustainable = this.props?.alt_sustainable\n            is_q_certified_arabica = this.props?.is_q_certified_arabica\n            alt_q_certification_arabica = this.props?.alt_q_certification_arabica\n        } else if (logos.length === undefined) {\n            // Logos exists but is not an array, this is the old format\n            fair_trade = logos?.fair_trade\n            alt_fair_trade = logos?.alt_fair_trade\n            is_organic = logos?.is_organic\n            alt_organic = logos?.alt_organic\n            only_vertuo_next = logos?.only_vertuo_next\n            alt_vertuo_next = logos?.alt_vertuo_next\n            is_rainforest = logos?.is_rainforest\n            alt_rainforest = logos?.alt_rainforest\n            is_sustainable = logos?.is_sustainable\n            alt_sustainable = logos?.alt_sustainable\n            is_q_certified_arabica = logos?.is_q_certified_arabica\n            alt_q_certification_arabica = logos?.alt_q_certification_arabica\n        } else if (logos.length) {\n            logos_list = [...logos]\n        }\n\n        // here we fill logos with logos taken from individual props\n        ;[\n            [fair_trade, 'fair_trade', alt_fair_trade, logos_list],\n            [is_organic, 'is_organic', alt_organic, logos_list],\n            [only_vertuo_next, 'only_vertuo_next', alt_vertuo_next, logos_list],\n            [is_rainforest, 'is_rainforest', alt_rainforest, logos_list],\n            [is_sustainable, 'is_sustainable', alt_sustainable, logos_list],\n            [\n                is_q_certified_arabica,\n                'is_q_certified_arabica',\n                alt_q_certification_arabica,\n                logos_list\n            ]\n        ].forEach(param => this.appendLogo.apply(this, param))\n\n        this.innerHTML = logos_list\n            .map(logo => `<img src=\"${LOGO_IMG_MAP[logo.name]}\" alt=\"${logo.alt}\" loading=\"lazy\">`)\n            .join('')\n    }\n\n    appendLogo(param, name, alt, list) {\n        if (!!param && !this.hasLogo(list, name)) {\n            list.push({ name, alt })\n        }\n    }\n\n    hasLogo(logosList, logoName) {\n        return logosList.some(logo => logo.name === logoName)\n    }\n}\n\ncustomElements.get('nb-card-logos') || customElements.define('nb-card-logos', CardLogos)\n\nexport default CardLogos\n","import { dragRatio } from './constants'\n\n/**\n * Allow touch gesture on the carousel\n */\nclass CarouselTouchPlugin {\n    constructor(carousel) {\n        this._carousel = carousel\n\n        // Disable dragging image effect\n        this._carousel._container.addEventListener('dragstart', e => e.preventDefault())\n        this._carousel._container.addEventListener('touchstart', e => this.startDrag(e), {\n            passive: true\n        })\n        this._carousel._container.addEventListener('mousedown', e => this.startDrag(e))\n        this._carousel._container.addEventListener('touchstart', e => this.startDrag(e), {\n            passive: true\n        })\n\n        window.addEventListener('mousemove', e => this.drag(e), { passive: false })\n        window.addEventListener('touchmove', e => this.drag(e), { passive: false })\n\n        window.addEventListener('mouseup', () => this.endDrag())\n        window.addEventListener('touchend', () => this.endDrag())\n        window.addEventListener('touchcancel', () => this.endDrag())\n\n        this.translateFactor = 150\n    }\n\n    /**\n     * Start moving slide when touch\n     * @param {MouseEvent|TouchEvent} e\n     */\n    startDrag(e) {\n        // Touch and more than one finger, probably a zoom, not a swipe.\n        if (e.touches && e.touches.length > 1) {\n            return\n        }\n\n        if (e.touches) {\n            e = e.touches[0]\n        }\n\n        this._origin = { x: e.screenX, y: e.screenY }\n        this._width = this._carousel.containerWidth\n    }\n\n    /**\n     * Start moving slide when touch\n     * @param {MouseEvent|TouchEvent} e\n     */\n    drag(e) {\n        if (!this._origin) {\n            return\n        }\n\n        const point = e.touches ? e.touches[0] : e\n        const translate = {\n            x: point.screenX - this._origin.x,\n            y: point.screenY - this._origin.y\n        }\n\n        this._lastTranslate = translate\n\n        const offsetCurrent = this._carousel._currentIndex * this._carousel._widthSlide\n        const offsetNew = (this.translateFactor * translate.x) / this._width\n        const translateDelta = offsetCurrent - offsetNew\n        this._carousel.translate(translateDelta)\n    }\n\n    /**\n     * Prevent to drag the page when swiping\n     * @param {MouseEvent|TouchEvent} e\n     * @param {Object} translate\n     * @param {Number} translate.x\n     * @param {Number} translate.y\n     */\n    preventMobileYTranslate(e, translate) {\n        if (!e.touches) {\n            return\n        }\n\n        if (e.touches && Math.abs(translate.x) > Math.abs(translate.y)) {\n            e.preventDefault()\n            e.stopPropagation()\n        } else if (e.touches && Math.abs(translate.y) > Math.abs(translate.x)) {\n            e.preventDefault()\n            e.stopPropagation()\n        }\n    }\n\n    /**\n     * @param {MouseEvent|TouchEvent} e\n     */\n    endDrag() {\n        if (!this._origin || !this._lastTranslate) {\n            this._origin = null\n            this._lastTranslate = null\n            return\n        }\n\n        // If drag delta is above dragRatio, we will move right or left\n        const dragDelta = this._lastTranslate.x / this._carousel.carouselWidth\n\n        if (Math.abs(dragDelta) > dragRatio) {\n            const slideDirection = this._lastTranslate.x < 0 ? 'next' : 'prev'\n            this._carousel[slideDirection]()\n        }\n        // Return to current element\n        else {\n            this._carousel.goToItem(this._carousel._currentIndex)\n        }\n\n        this._origin = null\n        this._lastTranslate = null\n    }\n}\n\nexport default CarouselTouchPlugin\n","/**\n * Allow touch gesture on the carousel\n */\nclass CarouselCreamUiHack {\n    constructor(carousel) {\n        this._carousel = carousel\n\n        new MutationObserver(mutations => {\n            mutations.forEach(function (mutation) {\n                if (!mutation || !mutation.oldValue || !mutation.classList) {\n                    return\n                }\n\n                const oldState = mutation.classList.contains('has-overlay-absolute')\n                const newState = document.body.classList.contains('has-overlay')\n                const closeAddToCart = oldState && !newState\n\n                if (!closeAddToCart) {\n                    return\n                }\n\n                this._carousel.goToItem(this._carousel._currentIndex)\n            })\n        }).observe(document.body, {\n            attributes: true,\n            attributeFilter: ['class'],\n            attributeOldValue: true\n        })\n    }\n}\n\nexport default CarouselCreamUiHack\n","import { root, wrapper, container, item, next, prev, hidden, bulletActive } from './constants'\nimport CarouselTouchPlugin from './CarouselTouchPlugin'\nimport CarouselCreamUiHack from './CarouselCreamUiHack'\n\nclass Carousel {\n    /**\n     * This callback type is called `requestCallback` and is displayed as a global symbol.\n     *\n     * @callback moveCallback\n     * @param {Number} index\n     */\n\n    /**\n     * @param {HTMLElement} element\n     * @param {Object} options\n     * @param {Number} [options.slidesToScroll=1] options.slidesToScroll of element do slide\n     * @param {Number} [options.slidesVisible=1] options.slidesVisible of element to display\n     * @param {Number} [options.spaceBetween=0] options.spaceBetween space between slides\n     * @param {Boolean} [options.navigationButton=true] options.navigationButton show navigation button\n     * @param {Boolean} [options.loop=true] options.loop loop at the end of the carousel\n     * @param {Boolean} [options.pagination=true] options.pagination display pagination\n     * @param {String} [options.pagination_variation'] 'stepper' --> enables an stepper on the slider (e.g. current-slide/total-number-of-slides)\n     * @param {Boolean} [options.nav_centered=false] options.nav_centered display centered navigation next and prev buttons below the slider\n     */\n    constructor(element, options = {}) {\n        this._element = element\n        this._slides = [].slice.call(element.children)\n        const _index = options.index || 0\n\n        this._options = Object.assign(\n            {},\n            {\n                slidesToScroll: 1,\n                slidesVisible: 1,\n                spaceBetween: 0,\n                navigationButton: true,\n                loop: true,\n                navigationAsSlider: false,\n                pagination: true,\n                hookGetRightBoundary: null,\n                hookSlideChange: null,\n                hookMove: null,\n                hookNext: null,\n                hookPrevious: null,\n                pagination_variation: null,\n                nav_centered: false\n            },\n            options\n        )\n\n        this.moveCallbacks = []\n        this._ratio = this._slides.length / this._options.slidesVisible\n\n        this.buildIHM()\n        new CarouselCreamUiHack(this)\n        if (!this.hasPagination()) {\n            return\n        }\n        new CarouselTouchPlugin(this)\n        this.goToItem(_index)\n    }\n\n    /**\n     * @returns {HTMLElement}\n     */\n    get element() {\n        return this._element\n    }\n\n    /**\n     * @returns {number & Number}\n     */\n    get navigationAsSlider() {\n        return this._options.navigationAsSlider\n    }\n\n    /**\n     * @returns {number & Number}\n     */\n    get slidesToScroll() {\n        return this._options.slidesToScroll\n    }\n\n    /**\n     * @returns {number}\n     */\n    get slidesVisible() {\n        return this._options.slidesVisible\n    }\n\n    /**\n     * @returns {number}\n     */\n    get slidesTotal() {\n        return this._slides.length\n    }\n\n    /**\n     * @returns {boolean & Boolean}\n     */\n    get navigationButton() {\n        return this._options.navigationButton\n    }\n\n    /**\n     * @returns {string}\n     */\n    get navigationVariation() {\n        return this._options.navigation_variation\n    }\n\n    /**\n     * @returns {string}\n     */\n    get navigationSize() {\n        return this._options.navigation_size\n    }\n\n    /**\n     * @returns {boolean & Boolean}\n     */\n    get loop() {\n        return this._options.loop\n    }\n\n    /**\n     * @returns {Boolean}\n     */\n    get pagination() {\n        return this._options.pagination\n    }\n\n    /**\n     * @returns {number}\n     */\n    get containerWidth() {\n        return this._container.offsetWidth\n    }\n\n    /**\n     * @returns {number}\n     */\n    get carouselWidth() {\n        return this._root.offsetWidth\n    }\n\n    /**\n     * @returns {number}\n     */\n    get wrapperWidth() {\n        return this._wrapper.offsetWidth\n    }\n\n    /**\n     * @returns {Boolean}\n     */\n    get paginationVariation() {\n        return this._options.pagination_variation\n    }\n\n    /**\n     * @returns {Boolean}\n     */\n    get nav_centered() {\n        return this._options.nav_centered\n    }\n\n    /**\n     * Get slide width from container wrapper width and slides count\n     *\n     * @param {Number} wrapperWidth\n     * @returns {Number} slide width\n     */\n    getSlideWidth(wrapperWidth) {\n        const { slidesVisible, spaceBetween } = this._options\n        return (wrapperWidth + parseInt(spaceBetween)) / slidesVisible\n    }\n\n    /**\n     * Refactor carousel to add the elements needs\n     */\n    buildIHM() {\n        this._root = this.createElement('div', root)\n        this._container = this.createElement('div', container)\n        this._wrapper = this.createElement('div', wrapper)\n        this._children = this._slides.map(child => {\n            const element = this.createElement('div', item)\n            element.appendChild(child)\n            this._container.appendChild(element)\n            return element\n        })\n        this._wrapper.appendChild(this._container)\n        this._root.appendChild(this._wrapper)\n        this._element.appendChild(this._root)\n\n        this.setWrapperStyle()\n\n        if (!this.hasPagination()) {\n            return\n        }\n\n        if (this.navigationButton) {\n            this.createNavigation()\n        }\n\n        if (this.pagination) {\n            this.createPagination()\n        }\n    }\n\n    /**\n     * Set elements sizes\n     */\n    setWrapperStyle() {\n        const wrapperWidth = this.wrapperWidth\n        const widthSlide = this.getSlideWidth(wrapperWidth)\n        const widthContainer = widthSlide * this._children.length\n\n        this.setContainerWidth(widthContainer)\n        this.setWrapperWidth(wrapperWidth)\n\n        for (const slide of this._children) {\n            this.setSlideWidth(slide, widthSlide)\n        }\n\n        this._widthContainer = widthContainer\n        this._widthSlide = widthSlide\n        this._widthWrapper = wrapperWidth\n    }\n\n    /**\n     * Fix width for each slide\n     * @param {object} slide\n     * @param {number} widthSlide\n     */\n    setSlideWidth(slide, widthSlide) {\n        slide.style.width = `${widthSlide - this._options.spaceBetween}px`\n        if (this._options.spaceBetween) {\n            slide.style.marginRight = `${this._options.spaceBetween}px`\n        }\n    }\n\n    /**\n     * Fix width for container\n     * @param {Number} width\n     */\n    setContainerWidth(width) {\n        this._container.style.width = `${width}px`\n    }\n\n    /**\n     * Fix width for wrapper\n     * @param {Number} width\n     */\n    setWrapperWidth(width) {\n        this._wrapper.style.width = `${width}px`\n    }\n\n    /**\n     * Prevent transition\n     */\n    disableTransition() {\n        this._container.style.transition = 'none'\n    }\n\n    /**\n     * Enable transition\n     */\n    enableTransition() {\n        this._container.style.transition = ''\n    }\n\n    translate(delta) {\n        this._container.style.left = `${-delta}px`\n    }\n\n    /**\n     * Create element\n     * @param {String} tag name\n     * @param {String} className\n     * @returns {HTMLElement}\n     */\n    createElement(tag, className) {\n        let div = document.createElement(tag)\n        div.setAttribute('class', className)\n        return div\n    }\n\n    /**\n     * Create two button prev/next\n     */\n    createNavigation() {\n        const sliderWidth = this.getSlideWidth(this.wrapperWidth)\n        const prevButton = this.createNavigationButton(\n            'prev',\n            '24/symbol/chevron-left',\n            'a11y_slider_previous_button',\n            sliderWidth\n        )\n        const nextButton = this.createNavigationButton(\n            'next',\n            '24/symbol/chevron-right',\n            'a11y_slider_next_button',\n            sliderWidth\n        )\n\n        this.addNavigationListeners(prevButton, nextButton)\n\n        // Note : now navigation is always outside to avoid been cut by overflow\n        let mainContainer = this._root.parentElement\n\n        mainContainer.appendChild(prevButton)\n        mainContainer.appendChild(nextButton)\n\n        this.onMove(carousel => {\n            const max = carousel._currentIndex + this.slidesVisible\n\n            if (!this.loop) {\n                if (carousel._currentIndex <= 0) {\n                    prevButton.classList.add(hidden)\n                } else {\n                    prevButton.classList.remove(hidden)\n                }\n\n                if (this._slides.length === max) {\n                    nextButton.classList.add(hidden)\n                } else {\n                    nextButton.classList.remove(hidden)\n                }\n\n                if (this._options.hookMove) {\n                    this._options.hookMove(nextButton)\n                }\n            }\n        })\n    }\n\n    createNavigationButton(type, icon, label, sliderWidth) {\n        const button = this.createElement('nb-cta', type === 'prev' ? prev : next)\n        button.setAttribute('variation', 'navigation')\n        button.setAttribute('contrast', this.navigationVariation)\n        button.setAttribute('size', this.navigationSize)\n        button.setAttribute('icon_right', icon)\n        button.setAttribute('label', label)\n\n        if (this.navigationAsSlider) {\n            button.style.width = sliderWidth + 'px'\n        }\n\n        return button\n    }\n\n    addNavigationListeners(prevButton, nextButton) {\n        nextButton.addEventListener('click', () => this.next())\n        prevButton.addEventListener('click', () => this.prev())\n\n        nextButton.addEventListener('keydown', e => {\n            if (e.key === 'Enter' || e.key === 'Space') this.next()\n        })\n        prevButton.addEventListener('keydown', e => {\n            if (e.key === 'Enter' || e.key === 'Space') this.prev()\n        })\n    }\n\n    getSlideNotVisible() {\n        return this._children.length - (this.slidesVisible - 1)\n    }\n\n    hasPagination() {\n        return this.getSlideNotVisible() > 1\n    }\n\n    /**\n     * Create pagination Bullets\n     */\n    createPaginationBullets() {\n        const paginationBullets = document.createElement('nav')\n\n        const buttons = []\n        for (let i = 0; i < this.getSlideNotVisible(); i = i + this.slidesToScroll) {\n            let span = document.createElement('span')\n            span.innerText = (i + 1).toString()\n\n            let button = document.createElement('button')\n            button.addEventListener('click', () => this.goToItem(i))\n            button.appendChild(span)\n\n            paginationBullets.appendChild(button)\n            buttons.push(button)\n        }\n\n        const selectButton = index => {\n            let activeButton = buttons[index / this.slidesToScroll]\n\n            if (!activeButton) {\n                return\n            }\n\n            buttons.forEach(button => button.classList.remove(bulletActive))\n            activeButton.classList.add(bulletActive)\n        }\n\n        selectButton(this._currentIndex)\n        this.onMove(() => selectButton(this._currentIndex))\n\n        this._root.parentElement.parentElement.appendChild(paginationBullets)\n    }\n\n    /**\n     * Create pagination pagination_variation\n     */\n    createPaginationStepper() {\n        const paginationStepper = document.createElement('nav')\n        paginationStepper.classList.add('t-sm-500')\n\n        let spanTotal = document.createElement('div')\n        spanTotal.innerText = this.slidesTotal - this.slidesVisible + 1\n        spanTotal.classList.add('totalPages')\n\n        let slash = document.createElement('div')\n        slash.innerText = ' / '\n\n        let spanCurrent = document.createElement('div')\n        spanCurrent.classList.add('currentPage')\n\n        paginationStepper.appendChild(spanCurrent)\n        paginationStepper.appendChild(slash)\n        paginationStepper.appendChild(spanTotal)\n\n        this.onMove(() => (spanCurrent.innerText = this._currentIndex + 1))\n        // simplified aria strategy, no extra props needed, keep it simple :)\n        this.onMove(() =>\n            paginationStepper.setAttribute(\n                'aria-label',\n                spanCurrent.innerText + slash.innerHTML + spanTotal.innerHTML\n            )\n        )\n\n        this._root.parentElement.parentElement.appendChild(paginationStepper)\n    }\n\n    /**\n     * Create pagination\n     */\n    createPagination() {\n        /**\n         * 1. Less than 5 slides create always bullets\n         */\n        if (this.slidesTotal <= 5) {\n            this.createPaginationBullets()\n        } else {\n            /**\n             * 2. More than 5 slides:\n             */\n            /**\n             * 2.1 If pagination_variation prop set to true create pagination_variation\n             */\n            if (this.paginationVariation === 'stepper') {\n                this.createPaginationStepper()\n                console.info('paginationVariation >> enabled')\n            } else {\n                /**\n                 * 2.2 If pagination_variation prop set to false create bullets\n                 */\n                this.createPaginationBullets()\n                console.info('bullets enabled')\n            }\n        }\n    }\n\n    next() {\n        let next = this._currentIndex + this.slidesToScroll\n\n        if (this._options.hookNext) {\n            next = this._options.hookNext(next)\n        }\n\n        this.goToItem(next)\n    }\n\n    prev() {\n        let prev = this._currentIndex - this.slidesToScroll\n\n        if (this._options.hookPrevious) {\n            prev = this._options.hookPrevious(prev)\n        }\n\n        this.goToItem(prev)\n    }\n\n    /**\n     * Move carousel to targeted slide\n     * @param {Number} index\n     */\n    goToItem(index) {\n        this.hackUi()\n\n        const incomingIndex = this.getOverflowingIndex(index)\n\n        let translateX = incomingIndex * this._widthSlide\n\n        if (this._options.hookSlideChange) {\n            translateX = this._options.hookSlideChange(incomingIndex, translateX)\n        }\n\n        this.translate(translateX)\n        this._currentIndex = incomingIndex\n        this.indexHasChange()\n    }\n\n    /**\n     * TODO : what was this for ?\n     * Hack Cream ui fix\n     * @returns {void}\n     */\n    hackUi() {\n        const $html = document.querySelector('html')\n        if (\n            $html.classList.contains('has-overlay-absolute') ||\n            $html.classList.contains('has-overlay')\n        ) {\n            return\n        }\n    }\n\n    /**\n     * Check if incoming slide is contained in the boundaries\n     * In loop mode, returns either first or last index\n     *\n     * @returns {number}\n     */\n    getOverflowingIndex(index) {\n        const reachedLeftBoundary = this.getLeftBoundary(index)\n        const reachedRightBoundary = this.getRightBoundary(index)\n\n        const lastIndex = this._children.length - this._options.slidesVisible\n\n        if (reachedLeftBoundary) {\n            return this.loop ? lastIndex : 0\n        }\n        if (reachedRightBoundary) {\n            return this.loop ? 0 : lastIndex\n        }\n\n        return index\n    }\n\n    /**\n     * Detect when it's going out of left side\n     * @param index\n     * @returns {boolean}\n     */\n    getLeftBoundary(index) {\n        return index < 0\n    }\n\n    /**\n     * Detect when it's going out of right side\n     * @param {Number} index\n     * @returns {boolean|boolean}\n     */\n    getRightBoundary(index) {\n        // Bigger or if element is not existing\n        const overflowingIndex = index >= this._children.length\n\n        const incomingSlideIndex = this.currentIndex + this.slidesVisible\n        const existingSlide = this._children[incomingSlideIndex] !== undefined\n        const goingToNextSlide = index > this.currentIndex\n\n        let boundaryReached = overflowingIndex || (goingToNextSlide && !existingSlide)\n\n        if (this._options.hookGetRightBoundary) {\n            boundaryReached = this._options.hookGetRightBoundary(boundaryReached, index)\n        }\n\n        return boundaryReached\n    }\n\n    /**\n     * Get max availbale width from rendered slides\n     * @param {Array} slides\n     * @returns {Number} max width\n     */\n    _getMaxSlideWidth(slides) {\n        return slides.reduce((width, slide) => Math.max(width, slide.offsetWidth), 0)\n    }\n\n    /**\n     * Add cb after the slide change\n     * @param {moveCallback} cb\n     */\n    onSlideChange(cb) {\n        this.onMove(cb)\n    }\n\n    /**\n     * Add cb after the slide change\n     * @param {moveCallback} cb\n     */\n    onMove(cb) {\n        this.moveCallbacks.push(cb)\n    }\n\n    /**\n     * Trigger the callback\n     */\n    indexHasChange() {\n        this.moveCallbacks.forEach(cb => cb(this))\n        this.activateItems()\n    }\n\n    activateItems() {\n        const max = this._currentIndex + this.slidesVisible\n        let t = 0\n        this._slides.map((item, index) => {\n            item.classList.remove('active')\n            item.parentElement.classList.remove('activeParent')\n            item.parentElement.classList.remove('currentCenteredSlide')\n\n            const video = item.querySelector('video')\n            if (video) {\n                video.pause()\n            }\n\n            if (index >= this._currentIndex && index < max) {\n                item.classList.add('active')\n                item.parentElement.classList.add('activeParent')\n\n                if (t === 1) {\n                    item.parentElement.classList.add('currentCenteredSlide')\n                    if (video) {\n                        video.play()\n                    }\n                }\n\n                t++\n            }\n        })\n    }\n\n    setClass(className) {\n        this._element.classList.add(className)\n    }\n\n    unsetClass(className) {\n        this._element.classList.remove(className)\n    }\n\n    get currentIndex() {\n        return this._currentIndex\n    }\n}\n\nexport default Carousel\n","import CarouselLib from './js/Carousel'\nimport createProps from '@kissui/helpers/src/props.helpers'\nimport { makeId } from '@kissui/helpers/src/utils'\nimport { itemDisplay } from '@kissui/helpers/src/gtmEvents'\nimport { dispatchEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { EVENT_SLIDE_CHANGE } from '@kissui/components'\n\nclass Slider extends HTMLElement {\n    constructor() {\n        super()\n        this._slider = null\n        this.randomId = null\n    }\n\n    static get observedAttributes() {\n        return [\n            'navigation_as_slider',\n            'slides_to_scroll',\n            'slides_visible',\n            'pagination',\n            'pagination_variation',\n            'nav_centered'\n        ]\n    }\n\n    connectedCallback() {\n        this.slot = this.innerHTML\n        this.props = createProps(this.attributes)\n        this.randomId = this.props.testId ? this.props.testId : `slider_${makeId(5)}`\n        this.render()\n    }\n\n    createProps() {\n        return [...this.attributes].reduce(\n            (all, attribute) => ({ ...all, [attribute.nodeName]: attribute.nodeValue }),\n            {}\n        )\n    }\n\n    render() {\n        this.innerHTML = `<div class=\"slider ${this.randomId}\">${this.slot}</div>`\n        this.loadSlider()\n    }\n\n    loadSlider() {\n        const {\n            navigation_as_slider = 'false',\n            indexSlider = 0,\n            slides_loop = 'true',\n            slides_visible = 4,\n            slides_to_scroll = 1,\n            navigation = 'true',\n            pagination = 'true',\n            space_between = 0,\n            navigation_variation = 'dark',\n            navigation_size = '48',\n            pagination_variation = 'stepper',\n            nav_centered = 'false'\n        } = this.props\n\n        const el = this.querySelector(`.${this.randomId}`)\n        const options = {\n            index: parseInt(indexSlider),\n            slidesToScroll: parseInt(slides_to_scroll),\n            slidesVisible: parseInt(slides_visible),\n            spaceBetween: space_between,\n            loop: slides_loop === 'true',\n            navigationAsSlider: navigation_as_slider === 'true',\n            navigationButton: navigation === 'true',\n            pagination: pagination === 'true',\n            navigation_variation,\n            navigation_size,\n            pagination_variation,\n            nav_centered\n        }\n        this._slider = new CarouselLib(el, options)\n        this._slider.setClass('first')\n        this._slider.onSlideChange(this.handleClick.bind(this))\n    }\n\n    handleClick() {\n        dispatchEvent({\n            eventName: EVENT_SLIDE_CHANGE,\n            args: { slideIndex: this._slider.currentIndex }\n        })\n\n        this.toggleClasses()\n        // GTM 'itemDisplay' event\n        itemDisplay({ rootElement: ['nb-slider'] })\n    }\n\n    toggleClasses() {\n        const isFirst = this._slider.currentIndex === 0\n        const isLast =\n            this._slider.slidesTotal === this._slider.currentIndex + this._slider.slidesVisible\n\n        this._slider.unsetClass('last')\n        this._slider.unsetClass('first')\n\n        if (isFirst) {\n            this._slider.setClass('first')\n        } else if (isLast) {\n            this._slider.setClass('last')\n        }\n    }\n}\n// Registers custom element\ncustomElements.get('nb-slider') || customElements.define('nb-slider', Slider)\n\nexport default Slider\n","import './plp-product-card-image-slider.scss'\nimport createProps from '@kissui/helpers/src/props.helpers'\nimport { lazyLoad, setAttributes } from '@kissui/helpers/src/utils'\nimport '../../slider'\n\nclass PlpProductCardImageSlider extends HTMLElement {\n    constructor() {\n        super()\n        this.props = {}\n    }\n\n    connectedCallback() {\n        this.props = createProps(this.attributes)\n        this.render()\n    }\n\n    render() {\n        const { slides, image_alt_text } = this.props\n\n        let nbSlider = document.createElement('nb-slider')\n        setAttributes(nbSlider, {\n            slides_to_scroll: '1',\n            slides_visible: '1',\n            navigation: 'true',\n            navigation_variation: 'highlight',\n            navigation_size: '32',\n            pagination: 'true'\n        })\n\n        let nbLoader = document.createElement('nb-loader')\n        setAttributes(nbLoader, { icon: 'loading' })\n        this.appendChild(nbLoader)\n\n        const imWidth = '600'\n        slides.forEach(slide => {\n            const url = `${slide.url}?impolicy=product&imwidth=${imWidth}`\n            let image = document.createElement('img')\n            image.setAttribute('alt', image_alt_text)\n            image.setAttribute('title', image_alt_text)\n            image.setAttribute('data-src', url)\n            nbSlider.appendChild(image)\n        })\n\n        this.appendChild(nbSlider)\n        slides.forEach(slide => {\n            const url = `${slide.url}?impolicy=product&imwidth=${imWidth}`\n            let image = nbSlider.querySelector(`img[data-src=\"${url}\"]`)\n\n            lazyLoad(image, 'src', url, url)\n        })\n    }\n}\n\ncustomElements.get('nb-product-card-image-slider') ||\n    customElements.define('nb-product-card-image-slider', PlpProductCardImageSlider)\n\nexport default PlpProductCardImageSlider\n","export const isIntersecting = (keys, needles) => {\n    const intersection = keys.filter(key => needles.includes(key))\n    return intersection.length > 0\n}\n","export const POPIN_BUNDLE_DETAILS_ID = 'bundle-popin-id'\n\nexport const LOGOS_ALT_MAPPING = {\n    fair_trade: 'alt_fair_trade',\n    is_organic: 'alt_organic',\n    only_vertuo_next: 'alt_vertuo_next',\n    is_rainforest: 'alt_rainforest',\n    is_sustainable: 'alt_sustainable',\n    is_q_certified_arabica: 'alt_q_certification_arabica'\n}\n\nexport const MAIN_CLASS_NAME = 'plp-product-card-expandable'\n","import '@kissui/components/src/card-labels'\nimport '@kissui/components/src/card-logos'\nimport '../plp-product-card/components/plp-product-card-image-slider'\nimport { isIntersecting } from './js/utils'\n\nimport eventsHelper from '@kissui/helpers/src/events.helpers'\nimport createProps from '@kissui/helpers/src/props.helpers'\nimport createRefs from '@kissui/helpers/src/refs.helpers'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\n\nimport { dispatchEvent, readEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { makeId, stringifyForAttribute } from '@kissui/helpers/src/utils'\n\nimport { EVENT_POPIN_OPEN, EVENT_POPIN_CLOSE } from '@kissui/components'\nimport { LOGO_IMG_MAP } from '@kissui/helpers/src/cremaDataHelper'\nimport { MAIN_CLASS_NAME, POPIN_BUNDLE_DETAILS_ID } from './js/constants'\n\nimport { renderStrikethroughPrice } from '@kissui/components/src/plp-product-card/fragments/renderStrikethroughPrice'\nimport { renderCapsulePrice } from '@kissui/components/src/plp-product-card/fragments/priceCapsule'\nimport { renderIntensity } from '@kissui/helpers/src/intensity.helpers'\n\nclass PlpProductCardExpandable extends HTMLElement {\n    constructor() {\n        super()\n        this.parent = null\n        this.popin = null\n        this.idPopin = `plp-product-card-expandable-${makeId(5)}`\n        this.button3DRendered = false\n    }\n\n    static get observedAttributes() {\n        return ['data', 'expanded', 'class']\n    }\n\n    async connectedCallback() {\n        this.props = createProps(this.attributes)\n        this.render()\n        this.refs = createRefs(this)\n        this.createEventListeners()\n    }\n\n    attributeChangedCallback(name, oldValue, newValue) {\n        if (name === 'data') {\n            // Cross fade manual choregraphy\n            if (oldValue) {\n                this.classList.add('loading')\n                setTimeout(() => {\n                    eventsHelper.remove(this.eventListeners)\n                    this.initialize()\n                }, 300)\n                setTimeout(() => {\n                    this.classList.remove('loading')\n                }, 500)\n            }\n        }\n\n        if (name === 'expanded' && oldValue !== newValue) {\n            this.toggle(newValue === 'true')\n        }\n        // this ugly hack comes from the fact that apparently Slider sets the class of\n        // the product card to \"active\", thus disregarding the required existing classList\n        if (name === 'class' && !this.classList.contains(MAIN_CLASS_NAME)) {\n            this.classList.add(MAIN_CLASS_NAME)\n        }\n    }\n\n    createEventListeners() {\n        const listeners = [\n            {\n                element: this,\n                type: 'EVENT_CROSS_SELL_READY',\n                listener: this.onParentReady.bind(this)\n            },\n            this.refs.view && {\n                element: this.refs.view,\n                type: 'click',\n                listener: this.onToggle.bind(this)\n            }\n        ].filter(Boolean)\n\n        if (!viewportHelper.is.mobile && this.refs.close) {\n            listeners.push({\n                element: this.refs.close,\n                type: 'click',\n                listener: this.onToggle.bind(this)\n            })\n        }\n\n        if (this.hasBundleDetails() && this.refs.bundleDetails) {\n            listeners.push({\n                element: this.refs.bundleDetails,\n                type: 'click',\n                listener: this.onOpenBundleDetails.bind(this)\n            })\n        }\n\n        eventsHelper.add(listeners)\n        this.eventListeners = listeners\n    }\n\n    render() {\n        this.innerHTML = `\n            ${this.renderCard()}\n            ${this.renderDetails()}\n            ${this.renderOverlay()}\n        `\n        this.loadStrikethroughPrice()\n    }\n\n    renderA11y(label) {\n        return label && `<span class=\"sr-only\">${label}</span>`\n    }\n\n    renderCover(force = false) {\n        const { slides = [], variant: { show_slider = false } = {} } = this.props\n        const showSlider = show_slider && slides.length > 1\n\n        if (!viewportHelper.is.mobile && this.isType('is_machine') && showSlider) {\n            return this.renderCoverSlider()\n        }\n\n        return this.renderCoverImage(force)\n    }\n\n    renderCoverMobile() {\n        return `\n            <div class=\"plp-product-card-expandable__cover\">\n                ${this.renderCover(true)}\n            </div>\n        `\n    }\n\n    renderCoverSlider() {\n        const { slides = [], image_alt_text, name = '' } = this.props\n        const data = stringifyForAttribute({\n            slides,\n            image_alt_text: image_alt_text || name\n        })\n        return `<nb-product-card-image-slider data=\"${data}\"></nb-product-card-image-slider>`\n    }\n\n    renderCoverImage() {\n        const { image_alt_text, name, images = {}, api_override = {} } = this.props\n        const { icon = '' } = images\n        const src = api_override.image || icon\n        const imWidth = '300'\n\n        return `\n            <img\n                alt=\"${image_alt_text || name}\"\n                src=\"${src}?impolicy=product&imwidth=${imWidth}\"\n                loading=\"lazy\"\n            />\n        `\n    }\n\n    renderLogos() {\n        const {\n            variant: { logos = [] }\n        } = this.props\n\n        if (!Array.isArray(logos)) {\n            return ''\n        }\n\n        const renderedLogos = logos.map(this.renderLogo.bind(this)).join('')\n        return `<div class=\"plp-product-card-expandable__logos\">${renderedLogos}</div>`\n    }\n\n    renderLogo({ name, alt }) {\n        if (!LOGO_IMG_MAP[name]) {\n            return ''\n        }\n        return `<img src=\"${LOGO_IMG_MAP[name]}\" alt=\"${alt}\" loading=\"lazy\">`\n    }\n\n    renderLabels() {\n        const { labels = [] } = this.props\n        if (labels.length === 0) {\n            return ''\n        }\n        const data = stringifyForAttribute({ labels: labels })\n        return `<nb-card-labels data=\"${data}\"></nb-card-labels>`\n    }\n\n    renderOverlay() {\n        const { variant: { colors = [] } = {} } = this.props\n\n        if (!viewportHelper.is.mobile && this.isType('is_machine') && colors.length !== 0) {\n            return `\n                <div class=\"plp-product-card-expandable__overlay\">\n                    <nb-loader></nb-loader>\n                </div>\n            `\n        } else {\n            return ''\n        }\n    }\n\n    renderCard() {\n        const { a11y_product_card = '', name, quick_view } = this.props\n        return `\n            <div class=\"plp-product-card-expandable__card\">\n                ${this.renderA11y(a11y_product_card)}\n                <div class=\"plp-product-card-expandable__cover\">\n                    ${this.renderCover()}\n                </div>\n                ${this.renderLabels()}\n                ${this.renderLogos()}\n                <div class=\"plp-product-card-expandable__content\">\n                    <h3 class=\"h-lg-700\">${name}</h3>\n                    ${this.renderHeadline()}\n                    ${this.renderLink(quick_view, 'view')}\n                    <div class=\"plp-product-card-expandable__priceWrapper\">\n                        <div class=\"plp-product-card-expandable__priceInnerWrapper\">\n                            ${this.renderPrice(true)}\n                        </div>\n                        ${this.renderAddToCart({ mode: 'card' })}\n                    </div>\n                </div>\n            </div>\n        `\n    }\n\n    async loadStrikethroughPrice() {\n        const { strikethrough_price } = this.props\n        if (!strikethrough_price) {\n            return\n        }\n\n        const container = this.querySelector('.plp-product-card-expandable__priceInnerWrapper')\n        const render = await renderStrikethroughPrice(strikethrough_price)\n\n        container.innerHTML = render + container.innerHTML\n    }\n\n    renderDetails() {\n        const details = this.renderCardDetails()\n\n        if (viewportHelper.is.mobile) {\n            if (this.popin) {\n                this.popin.querySelector('.content').innerHTML = details\n            } else {\n                return `<nb-popin id=\"${this.idPopin}\" data-ref=\"popin\" variation=\"before\" bgcolor=\"white\">${details}</nb-popin>`\n            }\n        } else {\n            return details\n        }\n\n        return ''\n    }\n\n    renderCardDetails() {\n        const { name = '', discover_more, highlighted, intensity = 0 } = this.props\n\n        return `\n            <aside>\n                <div class=\"plp-product-card-expandable__details\" data-ref=\"details\" ${\n                    highlighted ? 'highlighted=\"true\"' : ''\n                }>\n                    ${!viewportHelper.is.mobile ? this.renderButtonClose() : ''}\n                    ${viewportHelper.is.mobile ? this.renderCoverMobile() : ''}\n                    ${viewportHelper.is.mobile ? this.renderLabels() : ''}\n                    ${viewportHelper.is.mobile ? this.renderLogos() : ''}\n                    <div class=\"plp-product-card-expandable__content\">\n                        <p class=\"plp-product-card-expandable__title h-lg-700\">${name}</p>\n                        ${this.isType(['is_machine', 'is_accessory']) && this.renderRating()}\n                        ${this.isType('is_capsule') && renderIntensity(intensity, this.props)}\n                        ${this.renderDescription()}\n                        ${this.isType('is_capsule') && this.renderBundleDetails()}\n                        ${this.renderExternalLink(discover_more, 'more')}\n                        ${this.isType('is_machine') && this.renderColors()}\n                    </div>\n                    <div class=\"plp-product-card-expandable__priceWrapper\">\n                        <div class=\"plp-product-card-expandable__priceInnerWrapper\">\n                            ${this.renderPrice(true)}\n                        </div>\n                        <div class=\"plp-product-card-expandable__actions\">\n                            ${this.renderAddToCart({ mode: 'details' })}\n                            <div class=\"replace-with-button3d\"></div>\n                        </div>\n                    </div>\n                </div>\n            </aside>\n        `\n    }\n\n    renderBundleDetails() {\n        const { bundled = false, variant: { bundle_details: { popin_link_text = '' } = {} } = {} } =\n            this.props\n\n        if (!bundled || popin_link_text === '') {\n            return ''\n        }\n\n        return `\n            <nb-link\n                class=\"plp-product-card-expandable__link--bundle-details\"\n                data-ref=\"bundleDetails\"\n                label=\"${popin_link_text}\"\n                size=\"large\"\n                color=\"gold\"\n            ></nb-link>\n        `\n    }\n\n    renderBundleDetailsPopin() {\n        const { variant: { bundle_details: { popin_label_close = '' } = {} } = {} } = this.props\n\n        let popin = document.getElementById(POPIN_BUNDLE_DETAILS_ID)\n\n        if (!popin) {\n            this.parent.insertAdjacentHTML(\n                'beforeend',\n                `<nb-popin\n                    content=\"\"\n                    class=\"plp-product-card-expandable__popin-bundle-details\"\n                    id=\"${POPIN_BUNDLE_DETAILS_ID}\"\n                    label_close=\"${popin_label_close}\"\n                    variation=\"before\"\n                    bgcolor=\"highlight\"\n                    size=\"L\"\n                    padding=\"false\"\n                ></nb-popin>`\n            )\n            popin = document.getElementById(POPIN_BUNDLE_DETAILS_ID)\n        }\n\n        this.refs.popinBundleDetails = popin\n    }\n\n    renderHeadline() {\n        const { headline } = this.props\n        if (headline === undefined) {\n            return ''\n        }\n        return `<p class=\"plp-product-card-expandable__headline t-sm-400\">${headline}</p>`\n    }\n\n    hasComplexHtmlContent(text) {\n        return text.includes('<link') || text.includes('<div') || text.includes('<img')\n    }\n\n    renderDescription() {\n        const { headline, description = '' } = this.props\n        let stripedDescription = this.stripFirstHtmlLevel(description)\n        if (this.hasComplexHtmlContent(stripedDescription)) {\n            stripedDescription = headline\n        }\n        if (stripedDescription === '' && headline === '') {\n            return ''\n        }\n        return `<p class=\"plp-product-card-expandable__description t-sm-400\">${\n            stripedDescription !== '' ? stripedDescription : headline\n        }</p>`\n    }\n\n    renderExternalLink(label, key) {\n        const { api_override = {} } = this.props\n\n        if (this.isType('is_giftcard')) {\n            return ''\n        }\n\n        let { pdp_urls: { desktop: urlDesktop = '' } = {} } = this.props\n        const link = api_override.link || urlDesktop\n\n        return this.renderLink(label, key, link)\n    }\n\n    renderLink(label, key, url = '') {\n        return `\n            <nb-link\n                data-ref=\"${key}\"\n                class=\"plp-product-card-expandable__link--${key}\"\n                color=\"gold\"\n                size=\"large\"\n                ${url && `link=\"${url}\"`}\n            >${label}</nb-link>\n        `\n    }\n\n    renderRating() {\n        const { minimum_rating = '0', rating = '0', show_ratings = false } = this.props\n\n        const valueRating = parseFloat(rating)\n        const valueMinimumRating = parseFloat(minimum_rating)\n\n        if (!show_ratings || !valueRating || valueRating < valueMinimumRating) {\n            return ''\n        }\n\n        const data = stringifyForAttribute({ stars: rating })\n        return `<nb-rating class=\"plp-product-card-expandable__rating\" data=\"${data}\"></nb-rating>`\n    }\n\n    renderColors() {\n        const { url = '', name = '', variant: { colors = [] } = {}, sku } = this.props\n        if (colors.length === 0) {\n            return ''\n        }\n        const data = stringifyForAttribute({\n            colors,\n            activeSku: sku,\n            max_colors: '99',\n            extra_url: url,\n            extra_title: name\n        })\n\n        return `\n            <nb-colors\n                data=\"${data}\"\n                prevent\n            ></nb-colors>\n        `\n    }\n\n    renderPrice(renderSleeve = '') {\n        const {\n            price,\n            a11y_price = 'euros per sleeve',\n            variant: { giftcard_price = '' }\n        } = this.props\n\n        if (!price || (this.isType('is_giftcard') && !giftcard_price)) {\n            return ''\n        }\n\n        const a11yLabel = `${price} ${a11y_price}`\n        return `\n            <div class=\"plp-product-card-expandable__price t-md-700-sl\">${price}</div>\n            ${this.isType('is_capsule') && renderSleeve && this.renderSleeve()}\n            ${\n                this.isType('is_capsule') && this.props.variant.show_sleeve_price\n                    ? renderCapsulePrice(this.props.variant)\n                    : ''\n            }\n            ${this.renderA11y(a11yLabel)}\n        `\n    }\n\n    renderSleeve() {\n        const {\n            bundled = false,\n            sales_multiple,\n            unit_quantity,\n            show_sleeve = false,\n            variant: { number_of_sleeves } = {},\n            label_sleeve,\n            label_sleeves,\n            label_capsules\n        } = this.props\n\n        if (!show_sleeve || ['', '0'].includes(number_of_sleeves)) {\n            return ''\n        }\n        // TODO: use common function to calculate number of sleeves\n        const quantity = bundled ? unit_quantity : sales_multiple,\n            sleeveLabel = number_of_sleeves > 1 && label_sleeves ? label_sleeves : label_sleeve\n        return `\n            <p class=\"plp-product-card-expandable__sleeve t-xs-500\">\n                ${number_of_sleeves} ${sleeveLabel} (${quantity} ${label_capsules})\n            </p>\n        `\n    }\n\n    renderAddToCart({ mode }) {\n        const {\n            sku,\n            longSku = '',\n            variant: { giftcard_price = '' } = {},\n            range,\n            quantity_selector = {}\n        } = this.props\n        const { index = null } = this.dataset\n        const className = 'plp-product-card-expandable__buy'\n        const buttonSize = 'large'\n\n        const giftCardData = {\n            price: giftcard_price,\n            sku: sku,\n            quantity_selector: quantity_selector\n        }\n\n        if (this.isType('is_giftcard') && giftcard_price) {\n            return `<nb-add-gift-card class=\"${className}\" data=\"${stringifyForAttribute(\n                giftCardData\n            )}\"></nb-add-gift-card>`\n        }\n\n        return `\n            <nb-add-to-cart\n                class=\"${className}\"\n                buttonSize=\"${buttonSize}\"\n                showPrice\n                sku=\"${sku}\"\n                ${longSku && `longSku=\"${longSku}\"`}\n                position=\"${index}\"\n                range=\"${mode}-${range}\"\n            ></nb-add-to-cart>\n        `\n    }\n\n    renderButtonClose() {\n        // uses the popin close label to fill the empty close label in the details view button close in desktop\n        // TODO : it's working only if the product is a bundle\n        const { variant: { bundle_details: { popin_label_close = '' } = {} } = {} } = this.props\n\n        return `<nb-cta\n                    variation=\"navigation\"\n                    contrast=\"highlight\"\n                    icon_right=\"close-2\"\n                    class=\"plp-product-card-expandable__close\"\n                    data-ref=\"close\"\n                    label=\"${popin_label_close}\"\n                ></nb-cta>`\n    }\n\n    renderCheck3D() {\n        const { check_3d, variant: { key_3d = '' } = {} } = this.props\n\n        if (key_3d === '') {\n            return ''\n        }\n\n        const placeholder =\n            this.querySelector('.replace-with-button3d') ||\n            this.popin.querySelector('.replace-with-button3d')\n        if (!placeholder) {\n            return ''\n        }\n\n        const elem = document.createElement('nb-cta-3d')\n\n        elem.setAttribute('class', 'plp-product-card-expandable__3d')\n        elem.setAttribute('cta_ide_event', this.ctaIDEvent)\n        elem.setAttribute('key_3d', key_3d)\n        elem.setAttribute('label_button_3d', check_3d)\n\n        placeholder.replaceWith(elem)\n    }\n\n    isType(needle) {\n        const { variant = null } = this.props\n\n        if (!variant) {\n            return ''\n        }\n\n        if (Array.isArray(needle)) {\n            return isIntersecting(Object.keys(variant), needle) || ''\n        }\n\n        return variant[needle] || ''\n    }\n\n    hasBundleDetails() {\n        const { bundled = false, variant: { bundle_details: { popin_link_text = '' } = {} } = {} } =\n            this.props\n\n        return !(!bundled || popin_link_text === '')\n    }\n\n    stripFirstHtmlLevel(content) {\n        // Content potentially contains HTML, we need to remove the first HTML element\n        const div = document.createElement('div')\n        div.innerHTML = content\n\n        return div.firstChild instanceof HTMLElement ? div.firstChild.innerHTML : content\n    }\n\n    setDefaultAttributes() {\n        const { category_name = '', sku = '', position = '' } = this.props\n\n        this.setAttribute('data-product-item-id', sku)\n        this.setAttribute('data-product-section', category_name)\n        this.setAttribute('data-product-position', position)\n    }\n\n    setDefaultStyles() {\n        this.classList.add('class', MAIN_CLASS_NAME)\n        // Todo : Check with Anthony why this min-width was set, because it seems useless\n        // Todo : I removed it because it creates a bug in tablet expanded card (button close was not at the good position)\n        // const detailsWidth = geometry.slider.width - geometry.slide.width\n        // this.refs.details.style.minWidth = `${detailsWidth}px`\n    }\n\n    onParentReady($event) {\n        const { parent, geometry } = readEvent($event)\n        this.parent = parent\n        this.setDefaultAttributes()\n        this.setDefaultStyles(geometry)\n        if (viewportHelper.is.mobile) {\n            this.extractPopin()\n        }\n        if (this.hasBundleDetails()) {\n            this.renderBundleDetailsPopin()\n        }\n\n        const urlParams = new URLSearchParams(window.location.search)\n        this.isUserScannedQRCode = urlParams.has('seekQR')\n        if (this.isUserScannedQRCode) {\n            this.popin.querySelector('.button--navigation').click()\n            this.popin\n                .querySelector('.plp-product-card-expandable__3d')\n                .querySelector('nb-cta')\n                .click()\n            dispatchEvent({ eventName: EVENT_POPIN_CLOSE, args: { id: this.idPopin } })\n        }\n    }\n\n    onToggle($event = null) {\n        $event.preventDefault()\n        const isExpanded = this.getAttribute('expanded') === 'true'\n\n        if (!isExpanded && !this.button3DRendered) {\n            this.renderCheck3D()\n        }\n        this.button3DRendered = true\n        this.setAttribute('expanded', !isExpanded)\n    }\n\n    onOpenBundleDetails() {\n        const { popinBundleDetails } = this.refs\n        const {\n            sku = '',\n            variant: {\n                bundle_details: { description = '', other_skus = [], other_skus_quantity = '' } = {}\n            } = {},\n            range\n        } = this.props\n        const { index = null } = this.dataset\n\n        const popinContent = `\n            <nb-bundle-details\n                description=\"${description}\"\n                main_sku=\"${sku}\"\n                other_skus=\"${other_skus}\"\n                other_skus_quantity= \"${other_skus_quantity}\"\n                range=\"${range}\"\n                position=\"${index}\"\n            >\n            </nb-bundle-details>\n        `\n        popinBundleDetails.setAttribute('content', popinContent)\n\n        dispatchEvent({\n            eventName: EVENT_POPIN_OPEN,\n            args: { id: POPIN_BUNDLE_DETAILS_ID }\n        })\n    }\n\n    toggle(expanded) {\n        const action = expanded ? 'add' : 'remove'\n        const { index = null } = this.dataset\n\n        this.classList[action]('plp-product-card-expandable--expanded')\n\n        dispatchEvent({\n            element: this.parent,\n            eventName: 'EVENT_PRODUCT_CARD_TOGGLE',\n            args: { expanded, index }\n        })\n    }\n\n    extractPopin() {\n        const { popin } = this.refs\n\n        this.parent.append(popin)\n\n        const listeners = [\n            {\n                element: popin.querySelector('.button--navigation'),\n                type: 'click',\n                listener: this.onToggle.bind(this)\n            }\n        ]\n\n        const refBundleDetails = popin.querySelector('[data-ref=\"bundleDetails\"]')\n\n        if (this.hasBundleDetails() && refBundleDetails) {\n            listeners.push({\n                element: refBundleDetails,\n                type: 'click',\n                listener: this.onOpenBundleDetails.bind(this)\n            })\n        }\n        eventsHelper.add(listeners)\n        this.eventListeners = [...this.eventListeners, listeners]\n        this.popin = this.parent.querySelector(`#${this.idPopin}`)\n    }\n}\n\ncustomElements.get('nb-plp-product-card-expandable') ||\n    customElements.define('nb-plp-product-card-expandable', PlpProductCardExpandable)\n\nexport default PlpProductCardExpandable\n","import { getFormattedPrice } from '@kissui/helpers/src/catalog'\n\nexport const renderStrikethroughPrice = async strikethroughPrice => {\n    if (!strikethroughPrice) return ''\n    let finalStrikethroughPrice = await getFormattedPrice(strikethroughPrice)\n\n    return `${`<p class=\"cn_card__strikethroughPrice t-sm-400\">${finalStrikethroughPrice}</p>`}`\n}\n","export const renderIntensity = (intensity, options) => {\n    if (intensity === 0 || isNaN(parseInt(intensity))) {\n        return ''\n    }\n\n    const { intensity_label = '', max_intensity, a11y_intensity_max = '' } = options\n\n    return `<nb-intensity\n        intensity=\"${intensity}\"\n        ${max_intensity ? `max_intensity=\"${max_intensity}\"` : ''}\n        a11y_intensity_max=\"${a11y_intensity_max}\"\n        intensity_label=\"${intensity_label}\">\n    </nb-intensity>`\n}\n","import { interpolate } from '@kissui/helpers/src/utils'\n\nexport const renderCapsulePrice = props => {\n    const {\n        show_capsule_price = false,\n        price_per_capsule,\n        capsule_price_label,\n        capsule_price_syntax = '{capsule_price_label}: {price_per_capsule}'\n    } = props\n\n    if (!show_capsule_price) {\n        return ''\n    }\n\n    const html = content => {\n        content = interpolate(\n            content,\n            {\n                capsule_price_label,\n                price_per_capsule\n            },\n            '{',\n            '}'\n        )\n        return `<p class=\"cn_card__priceWrapper--items t-xs-500-sl capsulePrice\">${content}</p>`\n    }\n\n    return html(capsule_price_syntax)\n}\n","import createProps from '@kissui/helpers/src/props.helpers'\nimport createRefs from '@kissui/helpers/src/refs.helpers'\nimport eventsHelper from '@kissui/helpers/src/events.helpers'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport visualHelper from '@kissui/helpers/src/visual.helpers'\nimport { customEvent } from '@kissui/helpers/src/gtmEvents'\nimport fetcherService from './services/fetcher.service'\nimport sliderService from './services/slider.service'\nimport '@kissui/components/src/plp-product-card-expandable'\nimport '@kissui/components/src/slider'\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport {\n    NUMBER_PRODUCTS_SLIDER,\n    EVENT_POPIN_OPEN,\n    EVENT_DETAIL_OPEN,\n    EVENT_SLIDE_CHANGE,\n    BREAKPOINT_M\n} from '@kissui/components'\nimport { getSleeveNumber, isBundled } from '@kissui/helpers/src/catalog'\nimport {\n    NB_SLIDES_MOBILE,\n    NB_SLIDES_TABLET,\n    NB_SLIDES_DESKTOP,\n    SLIDES_TO_SCROLL\n} from './js/constants'\nimport { dispatchEvent, readEvent } from '@kissui/helpers/src/assets/js/eventDispatch'\nimport { isLoggedIn } from '@kissui/helpers/src/dataLayer'\nimport { API_SOURCE_LAST_USER_ORDERS } from './constants.mjs'\n\n/**\n * Hot-fix\n * This function is only added here to this deprecated component to\n * fix the issue with the price per sleeve being always displayed, incorrectly.\n */\nfunction getFinalPrice(show_sleeve_price, product, isBundled) {\n    let showCapsulePrice = show_sleeve_price\n    let final_price\n    let price_per_capsule\n\n    const bundled = isBundled(product)\n\n    if (show_sleeve_price && product.type === 'capsule' && !bundled) {\n        final_price = product.price * product.salesMultiple\n        // this isn't necessary in prod but the mock price formatter needs it\n        final_price = Math.round(final_price * 100) / 100\n        price_per_capsule = product.price\n    } else {\n        showCapsulePrice = false\n        final_price = product.price\n    }\n\n    return { showCapsulePrice, final_price, price_per_capsule }\n}\n\nclass CrossSell extends HTMLElement {\n    constructor() {\n        super()\n        this._fetchedProducts = []\n        this._expandedCardIndex = -1\n    }\n\n    connectedCallback() {\n        this.props = createProps(this.attributes)\n        this.classes = this.createClasses()\n        this.render()\n        this.refs = createRefs(this)\n\n        this.fetchProducts()\n    }\n\n    async fetchProducts() {\n        await fetcherService.loadPriceFormat()\n        const { products, options: { show_ratings = false } = {} } = this.props\n        const { source } = this.props.options\n        let currentProduct = products\n\n        if (isLoggedIn() && source === API_SOURCE_LAST_USER_ORDERS) {\n            const productsLastUserOrders = await this.fetchProductsLastUserOrders()\n            if (productsLastUserOrders?.length) {\n                currentProduct = productsLastUserOrders\n            }\n        }\n\n        this._fetchedProducts = [...currentProduct].splice(0, NUMBER_PRODUCTS_SLIDER)\n\n        fetcherService.getAll(this._fetchedProducts, show_ratings).finally(() => {\n            this.refs.sliderContainer.innerHTML = this.renderSlider()\n            this.refs = createRefs(this)\n            this.sliderManager = sliderService(this)\n            this.createEventListeners()\n        })\n    }\n\n    async fetchProductsLastUserOrders() {\n        const { last_user_orders_product_selections } = this.props.options\n        const lastOrder = await window.napi.checkout().getMyLastOrder()\n        const lastOrderedProducts = []\n        const allowedProductSelections = last_user_orders_product_selections\n            ? last_user_orders_product_selections.split(',')\n            : ''\n\n        if (!lastOrder) {\n            return null\n        }\n\n        const cartLines = lastOrder.quotation.cartLines\n\n        if (!cartLines) {\n            return null\n        }\n\n        cartLines.forEach(el => {\n            let hasProductSelections = true\n\n            if (last_user_orders_product_selections) {\n                if (el.productSelections) {\n                    hasProductSelections = el.productSelections.filter(product =>\n                        allowedProductSelections.includes(product)\n                    ).length\n                }\n            }\n\n            if (el.internationalId !== 'GENERIC' && hasProductSelections) {\n                lastOrderedProducts.push({\n                    a11y_product_card: el.name,\n                    image_alt_text: el.name,\n                    labels: [],\n                    sku: el.internationalId,\n                    variant: {\n                        colors: [],\n                        is_machine: el.modelType === 'Machine',\n                        key_3d: '',\n                        show_slider: false,\n                        number_of_sleeves: null,\n                        show_capsule_price: false,\n                        price_per_capsule: ''\n                    }\n                })\n            }\n        })\n\n        return lastOrderedProducts\n    }\n\n    createClasses() {\n        const { layout: { padding_top, padding_bottom } = {} } = this.props\n        const baseClass = 'nb-cross-sell'\n\n        this.classList.add(baseClass)\n\n        return {\n            container: `${padding_top} ${padding_bottom} `,\n            heading: `${baseClass}__heading h-3xl-300`,\n            link: `${baseClass}__link`,\n            slider: `${baseClass}__slider`,\n            background: `${baseClass}__background`\n        }\n    }\n\n    createEventListeners() {\n        const listeners = [\n            {\n                element: this,\n                type: 'EVENT_PRODUCT_CARD_TOGGLE',\n                listener: this.onCardToggle.bind(this)\n            },\n            {\n                element: this,\n                type: 'EVENT_COLOR_CHANGE',\n                listener: this.onColorChange.bind(this)\n            }\n        ]\n        eventsHelper.add(listeners)\n        this.eventListeners = listeners\n    }\n\n    render() {\n        const { campaign, layout } = this.props\n        const { heading } = this.props.copywriting\n\n        this.innerHTML = `\n            <nb-container\n                contrast=\"${layout.contrast}\"\n                background_color=\"${layout.background_color}\"\n                campaign_id=\"${campaign.id}\"\n                campaign_name=\"${campaign.name}\"\n                campaign_creative=\"${campaign.creative}\"\n                campaign_position=\"${campaign.position}\"\n                classname=\"${this.classes.container}\"\n                tracking_list=\"${heading}\"\n            >\n                ${heading && `<h2 class=\"${this.classes.heading}\">${heading}</h2>`}\n                ${this.renderLink()}\n                ${this.renderSliderContainer()}\n            </nb-container>\n        `\n    }\n\n    renderBackground() {\n        const { background = {} } = this.props.layout\n        const responsiveSrc = visualHelper.getResponsiveSrc(background)\n        return (\n            responsiveSrc &&\n            `<img class=\"${this.classes.background}\" src=\"${responsiveSrc}\" alt=\"${background.background_image_alt}\" loading=lazy />`\n        )\n    }\n\n    renderLink() {\n        const { link: { label = '', link = '', size = 'large', color = 'gold', seo_label } = {} } =\n            this.props.copywriting\n\n        if (!label || !link) {\n            return ''\n        }\n\n        return `\n            <nb-link\n                class=\"${this.classes.link}\"\n                color=\"${color}\"\n                link=\"${link}\"\n                size=\"${size}\"\n                title=\"${label}\"\n                ${seo_label && `seo_label='${seo_label}'`}\n            >${label}</nb-link>\n        `\n    }\n\n    renderSliderContainer() {\n        return `\n            <div class=\"${this.classes.slider}\" data-ref=\"sliderContainer\">\n                ${this.renderBackground()}\n            </div>\n        `\n    }\n\n    renderSlider() {\n        return `\n                ${this.renderBackground()}\n                <nb-slider\n                    pagination=\"true\"\n                    slides_to_scroll=\"${SLIDES_TO_SCROLL}\"\n                    slides_loop=\"false\"\n                    slides_visible=\"${this.getSlidesVisible()}\"\n                    data-ref=\"slider\">\n                    ${this.renderSlides()}\n                </nb-slider>\n            `\n    }\n\n    renderSlides() {\n        return this._fetchedProducts.map(this.renderSlide.bind(this)).join('')\n    }\n\n    renderSlide(product, index) {\n        const data = stringifyForAttribute(this.prepareProductData(product))\n        return `\n            <nb-plp-product-card-expandable\n                ${product.highlighted ? `highlighted=\"${product.highlighted}\"` : ''}\n                data=\"${data}\"\n                data-index=\"${index}\"\n            ></nb-plp-product-card-expandable>\n        `\n    }\n\n    prepareProductData(product) {\n        product.unitQuantity = product.unit_quantity\n        product.salesMultiple = product.sales_multiple\n        const sleeveNumber = getSleeveNumber(product)\n        product.variant.number_of_sleeves = product.variant.number_of_sleeves || sleeveNumber\n\n        let { showCapsulePrice, final_price, price_per_capsule } = getFinalPrice(\n            product.variant.show_sleeve_price,\n            product,\n            isBundled\n        )\n        product.price = fetcherService.formatPrice(final_price)\n        product.variant.show_capsule_price = showCapsulePrice\n        product.variant.price_per_capsule = fetcherService.formatPrice(price_per_capsule)\n\n        return {\n            ...this.props.options,\n            ...this.props.copywriting,\n            ...product,\n            range: product.productCategories ? product.productCategories[0].name : '', // product Api does not return product group or one supercategory\n            quantity_selector: { ...this.props.quantity_selector }\n        }\n    }\n\n    getSlidesVisible() {\n        if (viewportHelper.is.mobile) {\n            return NB_SLIDES_MOBILE\n        }\n        if (window.innerWidth >= BREAKPOINT_M && window.innerWidth <= 1024) {\n            return NB_SLIDES_TABLET\n        }\n        return NB_SLIDES_DESKTOP\n    }\n\n    onCardToggle($event) {\n        const { expanded, index } = readEvent($event)\n\n        this.sliderManager.update(expanded, parseInt(index))\n\n        this.emit(EVENT_SLIDE_CHANGE)\n\n        if (expanded) {\n            this.track()\n            this.emit(viewportHelper.is.mobile ? EVENT_POPIN_OPEN : EVENT_DETAIL_OPEN, {\n                id: `PRODUCT_DETAIL_POPIN_${index}`\n            })\n        }\n\n        this._expandedCardIndex = expanded ? parseInt(index) : -1\n    }\n\n    async onColorChange($event) {\n        const { productData } = readEvent($event)\n        this.updateCardData(productData)\n    }\n\n    updateCardData(productData) {\n        if (!this.sliderManager.slider || this._expandedCardIndex < 0) {\n            return\n        }\n\n        const currentCard = this.sliderManager.slider._slides[this._expandedCardIndex]\n        const currentSourceData = this._fetchedProducts[this._expandedCardIndex]\n\n        const isSourceSku = productData.sku === currentSourceData.sku\n\n        // Serve contributed data including api overrides\n        // when going back to first selected machine\n        const updatedData = isSourceSku\n            ? currentSourceData\n            : this.mergeCardData(currentSourceData, productData)\n\n        const preparedData = this.prepareProductData(updatedData)\n\n        currentCard.setAttribute('data', JSON.stringify(preparedData))\n    }\n\n    mergeCardData(sourceData, productData) {\n        const mergedData = fetcherService.merge(sourceData, productData, true)\n\n        mergedData.price = fetcherService.formatPrice(mergedData.price)\n        mergedData.longSku = productData.id\n        sourceData.pdp_urls = productData.pdpURLs\n\n        return mergedData\n    }\n\n    track() {\n        customEvent({\n            eventAction: 'Click CTA',\n            eventLabel: 'Page Builder - Cross Sell - Click CTA - Quick view'\n        })\n    }\n\n    emit(eventName, args) {\n        dispatchEvent({ eventName, args })\n    }\n}\n\ncustomElements.get('nb-cross-sell') || customElements.define('nb-cross-sell', CrossSell)\n\nexport default CrossSell\n","export const API_SOURCE_LAST_USER_ORDERS = 'last-user-orders'\n","export const NB_SLIDES_MOBILE = 1\nexport const NB_SLIDES_TABLET = 2\nexport const NB_SLIDES_DESKTOP = 3\n\nexport const SLIDES_TO_SCROLL = 1\n"],"names":["createProps","attributes","data","find","attribute","nodeName","getData","props","filter","reduce","all","attr","nodeValue","isNil","JSON","parse","error","console","log","obj","createRefs","component","querySelectorAll","extract","refs","$ref","ref","dataset","refArray","match","getRefArray","name","index","undefined","emitCustomEvent","eventName","customEvent","CustomEvent","detail","bubbles","cancelable","composed","window","dispatchEvent","eventsHelper","add","eventListeners","forEach","eventListener","element","addEventListener","type","listener","options","remove","removeEventListener","BREAKPOINT_TABLET","EVENT_POPIN_OPEN","EVENT_SLIDE_CHANGE","COFFEE_VERTUO","helper","is","innerWidth","vw","devicePixelRatio","mobile","mobile_tablet","tablet","desktop","retina","lt","devices","getResponsiveSrc","src","device","sources","Array","isArray","viewportHelper","getDevice","TECHNOLOGY_CATEGORY_IDENTIFIER","getProduct","sku","napi","catalog","replace","trimSku","getTechnologyName","productData","techno","technologies","substring","indexOf","length","isMultipleOf","quantity","multiple","getSleeveNumber","product","getTechnologyNameFn","sales_multiple","unitQuantity","NaN","isBundled","salesMultiple","isSalesMultipleGreaterThanOne","isUnitQuantityEqualToOne","isSalesMultipleEqualToOne","isUnitQuantityGreaterThanOne","getFormattedPrice","async","price","priceFormatter","priceFormat","getPriceFormatter","currency","config","padl","namespace","dataLayer","app","html","short","makeId","result","characters","i","charAt","Math","floor","random","stringifyForAttribute","escapeHtml","stringify","text","map","m","DOMParser","setAttributes","attrs","key","setAttribute","raisedByWC","fetcherService","fetcher","apiRatings","ratings","apiPriceFormat","getApiProduct","getOne","withRating","fetchOne","api_override","headline","description","apiProduct","productCategories","productDetails","supercategories","Promise","categoryEncoded","getCategory","getProductCategories","overrides","longSku","id","pdp_urls","getValueObject","images","slides","productRatings","ratingEnabled","rating","getRating","bundled","intensity","capsuleProperties","unit_quantity","getValueNumber","variant","giftcard_price","Error","icon","default_image","merge","force","mergedProduct","Object","keys","empty","defaultValue","parseInt","toFloat","ratingAverage","summary","value","decimal","parseFloat","toFixed","loadPriceFormat","getAll","productList","fetchedProduct","splice","formatPrice","_getCurrency","args","event","Event","document","createEvent","initEvent","readEvent","e","hidden","bulletActive","service","slider","_slider","geometry","container","width","_widthContainer","_widthWrapper","slide","_widthSlide","previousSlideIndex","actions","getLimit","_slides","slidesVisible","isExpanded","isOverflowing","_open","slideIndex","card","idPopin","_close","_expand","_children","slideWidth","delta","containerWidth","setSlideWidth","setContainerWidth","_collapse","_closeSlide","_move","incomingIndex","bound","isInBound","goToItem","updateSlidesStyles","classList","_currentIndex","activateItems","_onSlideChange","translateValue","toPrevious","toNext","maxTranslate","expandedSlideWidth","otherSlidesWidth","min","_onPrevious","previousIndex","_onNext","nextIndex","_onGetRightBoundary","boundaryReached","slidesToScroll","_onMove","nextButton","isBeforeLast","_initialize","open","close","_dispatchEvents","parent","_options","hookGetRightBoundary","hookMove","hookSlideChange","hookPrevious","hookNext","update","slideWillExpand","slideHasChanged","CardLabels","HTMLElement","constructor","super","this","labels","connectedCallback","render","direction","innerHTML","renderLabels","label","bgColor","color","join","customElements","get","define","getDataLayer","padlNamespace","COMMON_URL","ORGANIC_LOGO_IMG_EU","ORGANIC_LOGO_IMG_US","ORGANIC_LOGO_IMG_CA","ORGANIC_LOGO_IMG_BR","ORGANIC_LOGO_IMG_JP","ORGANIC_LOGO_IMG_BE","VERTUONEXT_LOGO_IMG","RAINFOREST_LOGO_IMG","SUSTAINABILITY_LOGO_IMG","Q_CERTIFICATION_ARABICA_LOGO_IMG","DESIGN_AWARD_2021_IMG","LOGO_IMG_MAP","fair_trade","is_organic","organicLogoImg","getMarketCode","market","toLocaleLowerCase","getOrganicLogo","only_vertuo_next","is_q_certified_arabica","is_rainforest","is_sustainable","is_design_award_2021","CardLogos","alt_fair_trade","alt_organic","alt_vertuo_next","alt_rainforest","alt_sustainable","alt_q_certification_arabica","logos","logos_list","param","appendLogo","apply","logo","alt","list","hasLogo","push","logosList","logoName","some","CarouselTouchPlugin","carousel","_carousel","_container","preventDefault","startDrag","passive","drag","endDrag","translateFactor","touches","_origin","x","screenX","y","screenY","_width","point","translate","_lastTranslate","translateDelta","preventMobileYTranslate","abs","stopPropagation","dragDelta","carouselWidth","slideDirection","CarouselCreamUiHack","MutationObserver","mutations","mutation","oldValue","oldState","contains","newState","body","observe","attributeFilter","attributeOldValue","Carousel","_element","slice","call","children","_index","assign","spaceBetween","navigationButton","loop","navigationAsSlider","pagination","pagination_variation","nav_centered","moveCallbacks","_ratio","buildIHM","hasPagination","slidesTotal","navigationVariation","navigation_variation","navigationSize","navigation_size","offsetWidth","_root","wrapperWidth","_wrapper","paginationVariation","getSlideWidth","createElement","child","appendChild","setWrapperStyle","createNavigation","createPagination","widthSlide","widthContainer","setWrapperWidth","style","marginRight","disableTransition","transition","enableTransition","left","tag","className","div","sliderWidth","prevButton","createNavigationButton","addNavigationListeners","mainContainer","parentElement","onMove","max","button","next","prev","getSlideNotVisible","createPaginationBullets","paginationBullets","buttons","span","innerText","toString","selectButton","activeButton","createPaginationStepper","paginationStepper","spanTotal","slash","spanCurrent","info","hackUi","getOverflowingIndex","translateX","indexHasChange","$html","querySelector","reachedLeftBoundary","getLeftBoundary","reachedRightBoundary","getRightBoundary","lastIndex","overflowingIndex","incomingSlideIndex","currentIndex","existingSlide","goingToNextSlide","_getMaxSlideWidth","onSlideChange","cb","t","item","video","pause","play","setClass","unsetClass","Slider","randomId","observedAttributes","slot","testId","loadSlider","navigation_as_slider","indexSlider","slides_loop","slides_visible","slides_to_scroll","navigation","space_between","el","CarouselLib","handleClick","bind","toggleClasses","gtmDataObject","eventData","eventRaisedBy","eventAction","itemTypes","itemDisplay","rootElement","isFirst","isLast","PlpProductCardImageSlider","image_alt_text","nbSlider","nbLoader","url","image","node","inViewPort","img","Image","onload","onerror","test","navigator","userAgent","agent","start","Number","substr","lazyBackgroundObserver","IntersectionObserver","entries","entry","isIntersecting","unobserve","target","isOldIOS","lazyLoad","POPIN_BUNDLE_DETAILS_ID","MAIN_CLASS_NAME","PlpProductCardExpandable","popin","button3DRendered","createEventListeners","attributeChangedCallback","newValue","setTimeout","initialize","toggle","listeners","onParentReady","view","onToggle","Boolean","hasBundleDetails","bundleDetails","onOpenBundleDetails","renderCard","renderDetails","renderOverlay","loadStrikethroughPrice","renderA11y","renderCover","show_slider","showSlider","isType","renderCoverSlider","renderCoverImage","renderCoverMobile","renderLogos","renderLogo","colors","a11y_product_card","quick_view","renderHeadline","renderLink","renderPrice","renderAddToCart","mode","strikethrough_price","strikethroughPrice","renderStrikethroughPrice","details","renderCardDetails","discover_more","highlighted","renderButtonClose","renderRating","renderIntensity","isNaN","intensity_label","max_intensity","a11y_intensity_max","renderDescription","renderBundleDetails","renderExternalLink","renderColors","bundle_details","popin_link_text","renderBundleDetailsPopin","popin_label_close","getElementById","insertAdjacentHTML","popinBundleDetails","hasComplexHtmlContent","includes","stripedDescription","stripFirstHtmlLevel","urlDesktop","link","minimum_rating","show_ratings","valueRating","valueMinimumRating","stars","activeSku","max_colors","extra_url","extra_title","renderSleeve","a11y_price","a11yLabel","show_sleeve_price","show_capsule_price","price_per_capsule","capsule_price_label","capsule_price_syntax","content","txt","vars","stChr","enChr","curIdx","stIdx","enIdx","hashId","interpolate","renderCapsulePrice","show_sleeve","number_of_sleeves","label_sleeve","label_sleeves","label_capsules","range","quantity_selector","giftCardData","renderCheck3D","check_3d","key_3d","placeholder","elem","ctaIDEvent","replaceWith","needle","needles","firstChild","setDefaultAttributes","category_name","position","setDefaultStyles","$event","extractPopin","urlParams","URLSearchParams","location","search","isUserScannedQRCode","has","click","getAttribute","other_skus","other_skus_quantity","popinContent","expanded","action","append","refBundleDetails","CrossSell","_fetchedProducts","_expandedCardIndex","classes","createClasses","fetchProducts","products","source","currentProduct","isLoggedIn","user","productsLastUserOrders","fetchProductsLastUserOrders","finally","sliderContainer","renderSlider","sliderManager","sliderService","last_user_orders_product_selections","lastOrder","checkout","getMyLastOrder","lastOrderedProducts","allowedProductSelections","split","cartLines","quotation","hasProductSelections","productSelections","internationalId","is_machine","modelType","layout","padding_top","padding_bottom","baseClass","heading","background","onCardToggle","onColorChange","campaign","copywriting","contrast","background_color","creative","renderSliderContainer","renderBackground","responsiveSrc","visualHelper","background_image_alt","size","seo_label","getSlidesVisible","renderSlides","renderSlide","prepareProductData","sleeveNumber","showCapsulePrice","final_price","round","getFinalPrice","emit","track","updateCardData","currentCard","currentSourceData","updatedData","mergeCardData","preparedData","sourceData","mergedData","pdpURLs","eventLabel","event_GA4","event_raised_by"],"mappings":"AAAA,MAEMA,EAAcC,IACVC,MAAAA,EAHMD,CAAAA,GAAcA,EAAWE,MAAKC,GAAoC,SAAvBA,EAAUC,WAGpDC,CAAQ,IAAIL,IACnBM,EAAQ,IAAIN,GACbO,QAAOJ,GAAoC,SAAvBA,EAAUC,WAC9BI,QAAO,CAACC,EAAKC,KACH,IAAKD,EAAK,CAACC,EAAKN,UAAWM,EAAKC,aACxC,CAAE,GAET,GAAIC,EAAMX,GACCK,OAAAA,EAGP,IACO,MAAA,IAAKA,KAAUO,KAAKC,MAAMb,EAAKU,WACzC,OAAQI,GACLC,QAAQC,IAAI,iBAAkBF,EAAOd,GAAMU,UAC/C,GAGEC,EAAQM,GAAoC,MAARA,ECrBpCC,EAAaC,GAAa,IAAIA,EAAUC,iBAAiB,eAAeb,OAAOc,EAAS,CAAA,GAExFA,EAAUA,CAACC,EAAMC,KACb,MAAEC,IAAAA,GAAQD,EAAKE,QAGfC,EAAWF,EAAIG,MAAM,iBAE3B,OAAiB,OAAbD,EACOE,EAAYN,EAAMC,EAAMG,GAExB,IAAKJ,EAAM,CAACC,EAAKE,QAAQD,KAAMD,IAIxCK,EAAcA,CAACN,EAAMC,GAAM,CAAGM,EAAMC,WACnBC,IAAfT,EAAKO,KACLP,EAAKO,GAAQ,I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