{"version":3,"file":"index.es.min.js","sources":["../../../packages/helpers/src/props.helpers.js","../../../packages/components/src/nespressoElement/nespressoElement.js","../../../packages/helpers/src/deferred.js","../../../packages/helpers/src/scrollTo.ts","../../../packages/components/src/constants.mjs","../../../packages/helpers/src/viewport.helpers.ts","../../../packages/helpers/src/catalog.js","../../../packages/helpers/src/rating.service.js","../../../packages/helpers/src/utils.ts","../../../packages/helpers/src/cupSizeIcons.js","../../../packages/page-builder-sections/src/pdp-assortment-bundles/components/bundles-item.js","../../../packages/helpers/src/intensity.helpers.js","../../../packages/page-builder-sections/src/pdp-assortment-bundles/pdp-assortment-bundles.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","export class NespressoElement extends HTMLElement {\n    constructor() {\n        super()\n        this.template = ''\n    }\n\n    connectedCallback() {\n        this.props = this._createProps()\n        this.onStart?.()\n        this.loadTemplate()\n        this.onReady?.()\n    }\n\n    /**\n     * Load the attributes and create the props object\n     * @returns {any}\n     * @private\n     */\n    _createProps(forceAttributes = null) {\n        const attributes = forceAttributes || this.attributes\n\n        const getData = attr => attr.find(attribute => attribute.nodeName === 'data')\n\n        let props\n        try {\n            props = [...attributes].reduce((all, attr) => {\n                return { ...all, [attr.nodeName]: attr.nodeValue }\n            }, {})\n\n            const data = getData([...attributes])\n\n            if (data === undefined || data === null) {\n                return props\n            }\n\n            return { ...props, ...JSON.parse(data.nodeValue) }\n        } catch (error) {\n            console.log(this.nodeName, 'ERROR: No data', error)\n        }\n    }\n\n    /**\n     * Render by DOM diff\n     */\n    render(force = false) {\n        if (force) {\n            // todo review the performance of this\n            this.innerHTML = ''\n        }\n        /**\n         * Convert a template string into HTML DOM nodes\n         * @param  {String} str The template string\n         * @return {Node}       The template HTML\n         */\n        const _stringToHTML = str => {\n            const parser = new DOMParser()\n            const doc = parser.parseFromString(str, 'text/html')\n            return doc.body\n        }\n\n        /**\n         * Compare the template to the UI and make updates\n         * @param  {Node} template The template HTML\n         * @param  {Node} elem     The UI HTML\n         */\n        const _diff = (template, elem) => {\n            /**\n             * Get the type for a node\n             * @param  {Node}   node The node\n             * @return {String}      The type\n             */\n            const _getNodeType = node => {\n                if (node.nodeType === 3) {\n                    return 'text'\n                }\n                if (node.nodeType === 8) {\n                    return 'comment'\n                }\n                return node.tagName.toLowerCase()\n            }\n\n            /**\n             * Get the content from a node\n             * @param  {Node}   node The node\n             * @return {String}      The type\n             */\n            const _getNodeContent = node => {\n                if (node.childNodes && node.childNodes.length > 0) {\n                    return null\n                }\n                return node.textContent\n            }\n\n            // Get arrays of child nodes\n            const domNodes = Array.prototype.slice.call(elem.childNodes)\n            const templateNodes = Array.prototype.slice.call(template.childNodes)\n\n            // If extra elements in DOM, remove them\n            var count = domNodes.length - templateNodes.length\n            if (count > 0) {\n                for (; count > 0; count--) {\n                    domNodes[domNodes.length - count].parentNode.removeChild(\n                        domNodes[domNodes.length - count]\n                    )\n                }\n            }\n\n            // Diff each item in the templateNodes\n            templateNodes.forEach(function (node, index) {\n                // If element doesn't exist, create it\n                if (!domNodes[index]) {\n                    elem.appendChild(node.cloneNode(true))\n                    return\n                }\n\n                // If element is not the same type, replace it with new element\n                if (_getNodeType(node) !== _getNodeType(domNodes[index])) {\n                    domNodes[index].parentNode.replaceChild(node.cloneNode(true), domNodes[index])\n                    return\n                }\n\n                // If content is different, update it\n                const templateContent = _getNodeContent(node)\n                if (templateContent && templateContent !== _getNodeContent(domNodes[index])) {\n                    domNodes[index].textContent = templateContent\n                }\n\n                // If target element should be empty, wipe it\n                if (domNodes[index].childNodes.length > 0 && node.childNodes.length < 1) {\n                    domNodes[index].innerHTML = ''\n                    return\n                }\n\n                // If element is empty and shouldn't be, build it up\n                // This uses a document fragment to minimize reflows\n                if (domNodes[index].childNodes.length < 1 && node.childNodes.length > 0) {\n                    const fragment = document.createDocumentFragment()\n                    _diff(node, fragment)\n                    domNodes[index].appendChild(fragment)\n                    return\n                }\n\n                // If there are existing child elements that need to be modified, diff them\n                if (node.childNodes.length > 0) {\n                    _diff(node, domNodes[index])\n                }\n            })\n        }\n\n        // todo - add support to reactivity\n        // this.template(this.state)\n        const templateHTML = _stringToHTML(this.template)\n        _diff(templateHTML, this)\n    }\n\n    /**\n     * Set the HTML to be used in the template\n     * @param {String} html The HTML to use\n     *\n     * This function is overwritten by the extended class to set the HTML\n     *\n     */\n    loadTemplate(template = '', force = false) {\n        this.template = template === '' ? this.template : `${template}`\n        this.render(force)\n    }\n\n    disconnectedCallback() {\n        this.onDestroy?.()\n    }\n}\n\ncustomElements.get('nb-nespresso-element') ||\n    customElements.define('nb-nespresso-element', NespressoElement)\n","export default class Deferred {\n    constructor() {\n        this.promise = new Promise((resolve, reject) => {\n            this.reject = reject\n            this.resolve = resolve\n        })\n    }\n}\n","import Deferred from './deferred'\n\nconst resolveScrollPosition = (scrollTo: HTMLElement | string | number, scrollPaddingTop = 140) => {\n    if (typeof scrollTo === \"number\") {\n        return scrollTo\n    }\n\n    const scrollToElement = typeof scrollTo === \"object\" ? scrollTo : document.querySelector(scrollTo)\n\n    if (scrollToElement === null && typeof scrollTo === \"string\") {\n        throw new Error(`error: No element found with the selector \"${scrollTo}\"`)\n    }\n\n    return window.scrollY + scrollToElement!.getBoundingClientRect().top - scrollPaddingTop\n}\n\nconst resolveScrollDuration = (scrollDuration: number, deltaScroll: number) => {\n    const viewportHeight = window.innerHeight\n    const bodyHeight = document.body.clientHeight\n\n    if (deltaScroll > viewportHeight && bodyHeight - viewportHeight > 0) {\n        return Math.abs(\n            scrollDuration +\n            scrollDuration * (Math.abs(deltaScroll) / (bodyHeight - viewportHeight))\n        )\n    }\n    return scrollDuration\n}\n/**\n * Smooth scroll-to inspired by:\n * http://stackoverflow.com/a/24559613/728480\n */\nconst scrollTo = (scrollTo: HTMLElement | string | number = 0, options: { scrollPaddingTop?: number, scrollDuration?: number } = {}) => {\n    const { scrollDuration: baseScrollDuration = 300 } = options\n    const deferred = new Deferred()\n\n    let scrollPosition: number = 0;\n\n    try {\n        scrollPosition = resolveScrollPosition(scrollTo, options.scrollPaddingTop)\n    }\n    catch (error) {\n        console.error(error)\n        return\n    }\n\n    let currentTime = 0\n    const initialTimestamp = window.performance.now()\n    const initialScroll = window.scrollY\n    const deltaScroll = initialScroll - scrollPosition\n\n    const scrollDuration = resolveScrollDuration(baseScrollDuration, deltaScroll)\n\n    const finalTimestamp = initialTimestamp + scrollDuration\n\n    function step() {\n        const currentTimestamp = window.performance.now()\n        if (currentTimestamp < finalTimestamp) {\n            currentTime = (currentTimestamp - initialTimestamp) / scrollDuration\n            currentTime = --currentTime * currentTime * currentTime + 1\n            const moveStep = deltaScroll * currentTime\n            window.scrollTo(0, scrollPosition + (deltaScroll - moveStep))\n            window.requestAnimationFrame(step)\n        } else {\n            window.scrollTo(0, scrollPosition)\n            setTimeout(() => deferred.resolve(undefined), 125)\n        }\n        return deferred.promise\n    }\n\n    window.requestAnimationFrame(step)\n    return deferred.promise\n}\n\nexport default scrollTo\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}\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 { 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","// Caching mechanism for ratings\nconst API_RATING_CACHE_TTL = 86400000 // 24 hrs\nconst API_RATING_CACHE_PREFIX = 'n-ratings-'\n\nconst setWithExpiry = (key, value) => {\n    const now = new Date()\n\n    // 'item' is an object which contains the original value\n    // as well as the time when it's supposed to expire\n    const item = {\n        value: value,\n        expiry: now.getTime() + API_RATING_CACHE_TTL\n    }\n    localStorage.setItem(key, JSON.stringify(item))\n}\n\nconst getWithExpiry = key => {\n    const itemStr = localStorage.getItem(key)\n    if (!itemStr) return undefined\n\n    const item = JSON.parse(itemStr)\n    const now = new Date()\n\n    // compare the expiry time of the item with the current time\n    if (now.getTime() > item.expiry) {\n        // If the item is expired, delete the item from storage and return null\n        localStorage.removeItem(key)\n        return undefined\n    }\n\n    return item.value\n}\n\nexport const getEncodedProductId = longSku => window.btoa(longSku)\n\nexport const getRatingDetails = async sku => {\n    const key = `${API_RATING_CACHE_PREFIX}${sku}`\n    let data = getWithExpiry(key)\n    if (data === undefined) {\n        // already expired or not cached\n        data = await window.napi.ratings().summary(sku)\n        setWithExpiry(key, data)\n    }\n    return data\n}\n\nexport const isRatingEnabled = product =>\n    product.productRatings && product.productRatings.ratingEnabled\n\nexport const isRated = (productRatings, minimum_rating) =>\n    productRatings.reviewCount > 0 &&\n    productRatings.ratingAverage > 0 &&\n    productRatings.ratingAverage >= minimum_rating\n\nexport const getRatingPercentage = ratingSpread => {\n    const ratingAverageSum = ratingSpread.reduce((partialSum, value) => partialSum + value, 0)\n\n    return ratingSpread.map(element => {\n        return (element / ratingAverageSum) * 100\n    })\n}\n\nexport const checkIfReviewsAvailable = ratingsResult => ratingsResult.reviewCount > 0\n\nexport const getProductReviews = async (\n    market,\n    language,\n    encodedProductId,\n    sort = 'highlightedFirst',\n    page = 0\n) => {\n    const url = `/ecapi/rating/v1/${market}/${language}/${encodedProductId}/read?platform=desktop&page=${page}&sort=${sort}`\n    const response = await fetch(url)\n\n    return response.json()\n}\n\nexport const postLike = async (market, language, encodedProductId, reviewId) => {\n    const url = `/ecapi/rating/v1/${market}/${language}/${encodedProductId}/${reviewId}/like`\n\n    const response = await fetch(url, {\n        method: 'POST'\n    })\n\n    return response.json()\n}\n\nexport const getNapiProductReviews = async (sku, sort = 'highlightedFirst', page = 0) => {\n    return window.napi.ratings().read(sku, sort, page)\n}\n\nexport const postNapiLike = async (sku, reviewId) => {\n    return window.napi.ratings().like(sku, reviewId)\n}\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","export const CUPSIZE_ICON_DEFAULT = '24/cupsize/cupsize-espresso-ol'\n\nconst cupSizeLookup = {\n    ristretto: '24/cupsize/cupsize-ristretto-ol',\n    espresso: '24/cupsize/cupsize-espresso-ol',\n    lungo: '24/cupsize/cupsize-lungo-ol',\n    'lungo-plus': '24/cupsize/cupsize-lungo-plus-ol',\n    'ristretto-vertuo': '24/cupsize/cupsize-ristretto-vl',\n    'espresso-vertuo': '24/cupsize/cupsize-espresso-vl',\n    'double-espresso-vertuo': '24/cupsize/cupsize-lungo-vl',\n    'lungo-vertuo': '24/cupsize/cupsize-lungo-vl',\n    'gran-lungo': '24/cupsize/cupsize-gran-lungo-vl',\n    coffee: '24/cupsize/cupsize-mug-small-vl',\n    'mug-medium': '24/cupsize/cupsize-mug-medium-vl',\n    'mug-large': '24/cupsize/cupsize-mug-large-vl',\n    'paper-cup-extra-small-alt': '24/cupsize/paper-cup-extra-small-alt',\n    'paper-cup-extra-small': '24/cupsize/paper-cup-extra-small',\n    'paper-cup-large-alt': '24/cupsize/paper-cup-large-alt',\n    'paper-cup-large': '24/cupsize/paper-cup-large',\n    'paper-cup-medium-alt': '24/cupsize/paper-cup-medium-alt',\n    'paper-cup-medium': '24/cupsize/paper-cup-medium',\n    'paper-cup-small-alt': '24/cupsize/paper-cup-small-alt',\n    'paper-cup-small': '24/cupsize/paper-cup-small',\n    xl: '24/accessory/travel-mug-vl',\n    'cold-brew': '24/coffee/cold-brew',\n    'carafe-vertuo': '24/cupsize/cupsize-carafe-vl',\n    alto: '24/cupsize/cupsize-alto-vl',\n    americano: '24/cupsize/cupsize-americano-ol',\n    icedrecipe: '24/recipe/iced-coffee',\n    'icedrecipe-vertuo': '24/recipe/iced-vl',\n    milk: '24/coffeenote/milky',\n    'cappuccino-and-latte-macchiato': '24/recipe/cappuccino-ol',\n    'double-cappuccino': '24/recipe/double-cappuccino-vl',\n    reverso: '24/recipe/reverso-vl',\n    'cortado-cappuccino': '24/recipe/cortado-ol',\n    'ristretto-b2b': '',\n    'espresso-b2b': '',\n    'lungo-b2b': '',\n    'icedRecipe-b2b': ''\n}\n\n/**\n * @function\n * @description Returns the icon for a given cup size, or a default icon.\n * @param {string} cupSize\n * @param {boolean} returnDefaultIcon If true, an icon will always be returned, else `''`\n * @returns {string}\n */\nexport const getCupSizeIcon = (cupSize, returnDefaultIcon = true) => {\n    const cupSizeStr = cupSize ? cupSize.split('/')?.pop() : ''\n\n    const cupSizeKey = cupSizeStr\n        .toLowerCase()\n        .replace('capsule-cupsize-', '')\n        .replace('machine-cupsize.', '') // This seems incorrect, but is the information we currenrtly have about this cup size\n\n    return cupSizeLookup[cupSizeKey] || (returnDefaultIcon ? CUPSIZE_ICON_DEFAULT : '')\n}\n\n/**\n * @function\n * @description Returns the type of icon for a given cupsize, so to distinguish between\n * coffees for recipes or normal coffees\n * @param {string} cupSize\n * @returns {'recipe' | 'coffee'}\n */\nexport const getCupType = cupSize => {\n    const cupSizeIcon = getCupSizeIcon(cupSize)\n    if (cupSizeIcon.includes('recipe')) return 'recipe'\n    if (cupSizeIcon.includes('cupsize')) return 'coffee'\n}\n","import './bundles-item.scss'\nimport { renderIntensity } from '@kissui/helpers/src/intensity.helpers'\nimport { stringifyForAttribute } from '@kissui/helpers/src/utils'\nimport { getCupSizeIcon } from '@kissui/helpers/src/cupSizeIcons'\n\nconst renderImage = images => {\n    const src = images.icon || images.main\n    return src ? `<img loading=\"lazy\" src=\"${src}\" alt=\"\" />` : ''\n}\n\nexport default (item, index, props) => {\n    const { name } = item\n    const { headline_desc } = props.copywriting\n\n    if (!name) {\n        return ''\n    }\n\n    const { skus, intensity, sku_quick_view } = props.copywriting\n\n    const renderLink = popinId => {\n        const { more_info } = props.copywriting\n        const { id = '', name: campaignName = '', creative = '', position = '' } = props.campaign\n\n        if (!more_info) {\n            return ''\n        }\n\n        return `\n            <nb-link\n                data-ref=\"loadPopin\"\n                size=\"xsmall\"\n                color=\"black\"\n                popin_id=\"${popinId}\"\n                label=\"${more_info}\"\n                tracking_label=\"Page Builder - Assortments and bundles - More information\"\n                custom_tracking=\"true\"\n                campaign_id=\"${id}\"\n                campaign_name=\"${campaignName}\"\n                campaign_creative=\"${creative}\"\n                campaign_position=\"${position}\"\n                campaign_instance_index=\"${index}\"\n            ></nb-link>\n        `\n    }\n\n    const capsuleProperties = item.capsuleProperties?.intensity\n        ? {\n              intensity: item.capsuleProperties.intensity\n          }\n        : {}\n\n    const sku = skus[index]\n\n    const skuQuickViewData = {\n        popin: {\n            popin_id: item.id,\n            close: sku_quick_view.popin.close,\n            footer: false\n        },\n        product: {\n            type: item.type,\n            technologies: item.technologies || null,\n            name,\n            images: item.images,\n            headline: sku.headline || item.headline,\n            capsuleProperties: capsuleProperties,\n            features: item.features,\n            productRatings: item.productRatings || null\n        },\n        intensity: intensity || null,\n        cup_sizes: {\n            heading: sku_quick_view.cup_sizes.heading,\n            unit_is_oz: sku_quick_view.cup_sizes.unit_is_oz,\n            items: item.capsuleCupSizesDetails?.map(cupSizeDetail => {\n                return {\n                    label: cupSizeDetail.name,\n                    capacityLabel: cupSizeDetail.capacityLabel,\n                    icon: getCupSizeIcon(cupSizeDetail.id)\n                }\n            })\n        },\n        aromatic_profile: {\n            heading: sku_quick_view.aromatic_profile.heading,\n            items: item.capsuleProductAromatics\n        },\n        link: {\n            label: sku_quick_view.link.label,\n            url: item.pdpURLs.desktop\n        }\n    }\n\n    // Machine\n    if (sku.variant?.features) {\n        skuQuickViewData.features = sku.variant.features\n    }\n\n    if (sku.variant?.showRating) {\n        skuQuickViewData.showRating = sku.variant.showRating\n    }\n\n    // Accessory\n    if (sku.variant?.ingredients) {\n        skuQuickViewData.ingredients = {\n            heading: sku.variant.ingredients.heading,\n            description: sku.variant.ingredients.description\n        }\n    }\n\n    const htmlIntensity = item.capsuleProperties?.intensity\n        ? renderIntensity(item.capsuleProperties.intensity, intensity)\n        : ''\n\n    const htmlHeadline = item.headline\n        ? `<p class=\"t-sm-500-sl pdp-assortments-listing__headline\">${item.headline}</p>`\n        : ''\n\n    const htmlLinkPopin = `${renderLink(item.id)}\n        <nb-sku-quick-view tracking_list='${headline_desc}' tracking_position='${\n        index + 1\n    }' data='${stringifyForAttribute(skuQuickViewData)}'></nb-sku-quick-view>`\n\n    return `<li\n            data-index=\"liElement${index}\"\n            data-name=\"${name}\"\n            aria-label=\"${sku.quantity} ${name}\"\n            id=\"liElement${index}\"\n            aria-current=\"${!index}\"\n        >\n            <div class=\"pdp-assortments-listing\">\n                <div class=\"pdp-assortments-listing__image\">\n                    ${renderImage(item.images)}\n                </div>\n                <div class=\"pdp-assortments-listing__desc\">\n                    <h3 class=\"t-sm-700-sl\">${name}</h3>\n                    ${htmlHeadline}\n                    ${htmlIntensity}\n                    <p class=\"t-2xs-500-sl pdp-assortments-listing__qty\">x${sku.quantity}</p>\n                    ${htmlLinkPopin}\n                </div>\n            </div>\n        </li>`\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 createProps from '@kissui/helpers/src/props.helpers'\nimport { NespressoElement } from '@kissui/components/src/nespressoElement/index.js'\nimport scrollTo from '@kissui/helpers/src/scrollTo'\nimport viewportHelper from '@kissui/helpers/src/viewport.helpers'\nimport { getProductAndClean } from '@kissui/helpers/src/catalog'\nimport { getRatingDetails, isRatingEnabled } from '@kissui/helpers/src/rating.service'\nimport bundleItem from './components/bundles-item.js'\n\nclass PdpAssortmentBundles extends NespressoElement {\n    constructor(props) {\n        super(props)\n        this.props = {}\n        this.detailLinks = ''\n        this.mainElement = {}\n    }\n\n    connectedCallback() {\n        this.btnScrollToTop = null\n\n        this.renderLoader()\n        this.props = createProps(this.attributes)\n        this.loadProducts().then()\n    }\n\n    renderLoader() {\n        this.mainElement = document.createElement('div')\n        this.mainElement.classList.add('loading')\n        this.mainElement.innerHTML = '<nb-loader></nb-loader>'\n        this.appendChild(this.mainElement)\n    }\n\n    async loadProducts() {\n        const { main_sku, skus } = this.props.copywriting\n\n        this.mainProduct = null\n        this.otherProducts = []\n\n        const allSkus = [main_sku, ...skus.map(s => s.sku)]\n\n        try {\n            await getProductAndClean(allSkus)\n            await new Promise(resolve => {\n                allSkus.forEach(item => {\n                    const machineEle = skus.find(\n                        ele => item.type === 'machine' && ele.sku === item.legacyId\n                    )\n                    if (\n                        machineEle &&\n                        machineEle.variant?.showRating?.show_ratings &&\n                        isRatingEnabled(item)\n                    ) {\n                        getRatingDetails(machineEle.sku).then(data => {\n                            if (machineEle.variant?.showRating?.ratings) {\n                                machineEle.variant.showRating.ratings.ratingAverage =\n                                    data.ratingAverage\n                            }\n                        })\n                    }\n                })\n                resolve()\n            })\n        } catch (e) {\n            console.error(e)\n        } finally {\n            this.mainProduct = allSkus[0]\n            this.otherProducts = allSkus.slice(1)\n            this.unbindEvents()\n            this.render()\n            this.bindEvents()\n        }\n    }\n\n    render() {\n        if (!this.mainProduct || this.mainProduct.errorDate) {\n            console.warn('Invalid SKU')\n            return ''\n        }\n\n        const { headline_desc } = this.props.copywriting\n        const { id = '', name = '', creative = '', position = '' } = this.props.campaign\n        const { contrast, padding_top, padding_bottom } = this.props.layout\n\n        const { headline } = this.mainProduct\n        const finalHeadline = headline_desc ? headline_desc : headline || ''\n\n        this.mainElement.innerHTML = `\n            <nb-container\n                contrast='${contrast}'\n                classname=\"${padding_top} ${padding_bottom}\"\n                campaign_id=\"${id}\"\n                campaign_name=\"${name}\"\n                campaign_creative=\"${creative}\"\n                campaign_position=\"${position}\"\n            >\n                <h2 class=\"t-md-400-sl pdp-assortments__header\">${finalHeadline}</h2>\n                <div class=\"pdp-assortments__list\">\n                    <ul>\n                        ${this.otherProducts\n                            .map((item, i) => bundleItem(item, i, this.props))\n                            .join('')}\n                    </ul>\n                </div>\n               ${this.renderPageTop()}\n            </nb-container>\n        `\n\n        this.btnScrollToTop = this.querySelector('.go-to-top')\n    }\n\n    renderPageTop() {\n        const { go_to_top } = this.props.copywriting\n        if (!viewportHelper.is.mobile) {\n            return ''\n        }\n        return `<nb-link link=\"#\" target=\"_self\" size=\"small\" class=\"go-to-top\">${go_to_top}</nb-link>`\n    }\n\n    scroll() {\n        scrollTo(0)\n    }\n\n    bindEvents() {\n        if (this.btnScrollToTop) {\n            this.boundScroll = this.scroll.bind(this)\n            this.btnScrollToTop.addEventListener('click', this.boundScroll)\n        }\n    }\n\n    unbindEvents() {\n        if (this.btnScrollToTop) {\n            this.btnScrollToTop.removeEventListener('click', this.boundScroll)\n        }\n    }\n\n    disconnectedCallback() {\n        this.unbindEvents()\n    }\n}\n\ncustomElements.get('nb-pdp-assortment-bundles') ||\n    customElements.define('nb-pdp-assortment-bundles', PdpAssortmentBundles)\nexport default PdpAssortmentBundles\n"],"names":["isNil","obj","NespressoElement","HTMLElement","constructor","this","template","connectedCallback","props","_createProps","onStart","loadTemplate","onReady","forceAttributes","attributes","reduce","all","attr","nodeName","nodeValue","data","find","attribute","getData","JSON","parse","error","console","log","render","force","innerHTML","_diff","elem","_getNodeType","node","nodeType","tagName","toLowerCase","_getNodeContent","childNodes","length","textContent","domNodes","Array","prototype","slice","call","templateNodes","count","parentNode","removeChild","forEach","index","appendChild","cloneNode","replaceChild","templateContent","fragment","document","createDocumentFragment","templateHTML","str","DOMParser","parseFromString","body","disconnectedCallback","onDestroy","customElements","get","define","Deferred","promise","Promise","resolve","reject","scrollTo","options","scrollDuration","baseScrollDuration","deferred","scrollPosition","resolveScrollPosition","scrollPaddingTop","scrollToElement","querySelector","Error","window","scrollY","getBoundingClientRect","top","currentTime","initialTimestamp","performance","now","deltaScroll","resolveScrollDuration","viewportHeight","innerHeight","bodyHeight","clientHeight","Math","abs","finalTimestamp","requestAnimationFrame","step","currentTimestamp","moveStep","setTimeout","undefined","BREAKPOINT_TABLET","helper","is","innerWidth","vw","devicePixelRatio","mobile","mobile_tablet","tablet","desktop","retina","lt","ref","getProduct","sku","napi","catalog","replace","trimSku","getProductAndClean","skus","getProductFn","promises","isArray","push","then","splice","indexOf","catch","getRatingDetails","async","key","itemStr","localStorage","getItem","item","Date","getTime","expiry","value","removeItem","getWithExpiry","ratings","summary","setWithExpiry","setItem","stringify","escapeHtml","text","map","m","cupSizeLookup","ristretto","espresso","lungo","coffee","xl","alto","americano","icedrecipe","milk","reverso","getCupSizeIcon","cupSize","returnDefaultIcon","cupSizeKey","split","pop","bundleItem","name","headline_desc","copywriting","intensity","sku_quick_view","capsuleProperties","skuQuickViewData","popin","popin_id","id","close","footer","product","type","technologies","images","headline","features","productRatings","cup_sizes","heading","unit_is_oz","items","capsuleCupSizesDetails","cupSizeDetail","label","capacityLabel","icon","aromatic_profile","capsuleProductAromatics","link","url","pdpURLs","variant","showRating","ingredients","description","htmlIntensity","renderIntensity","isNaN","parseInt","intensity_label","max_intensity","a11y_intensity_max","htmlHeadline","htmlLinkPopin","popinId","more_info","campaignName","creative","position","campaign","renderLink","stringifyForAttribute","quantity","src","main","renderImage","PdpAssortmentBundles","detailLinks","mainElement","btnScrollToTop","renderLoader","filter","createProps","loadProducts","createElement","classList","add","main_sku","mainProduct","otherProducts","allSkus","s","machineEle","ele","legacyId","show_ratings","ratingEnabled","ratingAverage","e","unbindEvents","bindEvents","errorDate","warn","contrast","padding_top","padding_bottom","layout","finalHeadline","i","join","renderPageTop","go_to_top","viewportHelper","scroll","boundScroll","bind","addEventListener","removeEventListener"],"mappings":"AAAA,MAqBMA,EAAQC,GAAoC,MAARA,ECrBnC,MAAMC,UAAyBC,YAClCC,WAAAA,WAEIC,KAAKC,SAAW,EACpB,CAEAC,iBAAAA,GACSC,KAAAA,MAAQH,KAAKI,eAClBJ,KAAKK,YACLL,KAAKM,eACLN,KAAKO,WACT,CAOAH,YAAAA,CAAaI,EAAkB,MAC3B,MAAMC,EAAaD,GAAmBR,KAAKS,WAIvCN,IAAAA,EACA,IACAA,EAAQ,IAAIM,GAAYC,QAAO,CAACC,EAAKC,KAC1B,IAAKD,EAAK,CAACC,EAAKC,UAAWD,EAAKE,aACxC,CAAE,GAEL,MAAMC,EARMH,CAAAA,GAAQA,EAAKI,MAAKC,GAAoC,SAAvBA,EAAUJ,WAQxCK,CAAQ,IAAIT,IAECM,OAAS,MAATA,EACfZ,EAGJ,IAAKA,KAAUgB,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