{"version":3,"sources":["webpack:///./cartridges/app_accelerator_core/cartridge/client/default/js/product/productQuickshop.js"],"names":["_disableEvent","event","preventDefault","stopImmediatePropagation","Init","_eleLastProduct","document","querySelectorAll","length","classList","add","$","on","_ele","currentTarget","_quickshopCloseBtnVisible","not","_eleProductTile","parents","_eleProductTileList","_eleProductTileSlide","_quickshopCloseBtn","find","_quickshopOptions","click","addClass","removeClass","trigger","slick","_slickList","first","_eleQuickShopBtn"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAa;;AAEb;AACA;AACA;AACO,SAASA,aAAaA,CAACC,KAAK,EAAE;EACjCA,KAAK,CAACC,cAAc,CAAC,CAAC;EACtBD,KAAK,CAACE,wBAAwB,CAAC,CAAC;AACpC;AAEO,SAASC,IAAIA,CAAA,EAAG;EACnB,IAAIC,eAAe,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,qBAAqB,CAAC;EACtE,IAAIF,eAAe,CAACG,MAAM,IAAI,CAAC,EAAE;IAC7BH,eAAe,CAACA,eAAe,CAACG,MAAM,GAAG,CAAC,CAAC,CAACC,SAAS,CAACC,GAAG,CAAC,wBAAwB,CAAC;EACvF;EACAC,CAAC,CAAC,kCAAkC,CAAC,CAACC,EAAE,CAAC,OAAO,EAAE,UAASX,KAAK,EAAE;IAC9D,IAAIY,IAAI,GAAGF,CAAC,CAACV,KAAK,CAACa,aAAa,CAAC;MAC7BC,yBAAyB,GAAGJ,CAAC,CAAC,4CAA4C,CAAC,CAACK,GAAG,CAAC,SAAS,CAAC;MAC1FC,eAAe,GAAGJ,IAAI,CAACK,OAAO,CAAC,eAAe,CAAC;MAC/CC,mBAAmB,GAAGN,IAAI,CAACK,OAAO,CAAC,eAAe,CAAC;MACnDE,oBAAoB,GAAGP,IAAI,CAACK,OAAO,CAAC,cAAc,CAAC;MACnDG,kBAAkB,GAAGJ,eAAe,CAACK,IAAI,CAAC,4CAA4C,CAAC;MACvFC,iBAAiB,GAAGV,IAAI,CAACK,OAAO,CAAC,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,IAAI,CAAC,kCAAkC,CAAC;MAC3EC,iBAAiB,GAAGN,eAAe,CAACK,IAAI,CAAC,kCAAkC,CAAC;MAC5EH,mBAAmB,GAAGN,IAAI,CAACK,OAAO,CAAC,eAAe,CAAC;MACnDE,oBAAoB,GAAGP,IAAI,CAACK,OAAO,CAAC,cAAc,CAAC;IAEvDL,IAAI,CAACY,QAAQ,CAAC,QAAQ,CAAC;IACvBR,eAAe,CAACS,WAAW,CAAC,mBAAmB,CAAC;IAChDf,CAAC,CAAC,gCAAgC,CAAC,CAACiB,KAAK,CAAC,aAAa,CAAC;IACxDG,gBAAgB,CAACL,WAAW,CAAC,QAAQ,CAAC;IACtCH,iBAAiB,CAACE,QAAQ,CAAC,QAAQ,CAAC;IACpCd,CAAC,CAAC,MAAM,CAAC,CAACe,WAAW,CAAC,0BAA0B,CAAC;IACjDf,CAAC,CAAC,MAAM,CAAC,CAACgB,OAAO,CAAC,0CAA0C,CAAC;IAE7D,IAAIR,mBAAmB,CAACX,MAAM,GAAG,CAAC,EAAE;MAChC,IAAIqB,UAAU,GAAGV,mBAAmB,CAACG,IAAI,CAAC,aAAa,CAAC,CAACQ,KAAK,CAAC,CAAC;MAChED,UAAU,CAACH,WAAW,CAAC,6BAA6B,CAAC;MACrDP,mBAAmB,CAACO,WAAW,CAAC,+BAA+B,CAAC;MAChEN,oBAAoB,CAACM,WAAW,CAAC,yBAAyB,CAAC;IAC/D;IAEA,IAAIf,CAAC,CAAC,eAAe,CAAC,EAAE;MACpBA,CAAC,CAAC,eAAe,CAAC,CAACiB,KAAK,CAAC,aAAa,CAAC;IAC3C;EACJ,CAAC,CAAC;AACN,C","file":"3.js","sourcesContent":["'use strict';\n\n/**\n * Disable the event call.\n */\nexport function _disableEvent(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n\nexport function Init() {\n let _eleLastProduct = document.querySelectorAll('.product-grid__item');\n if (_eleLastProduct.length != 0) {\n _eleLastProduct[_eleLastProduct.length - 1].classList.add('product-gridItem__last');\n }\n $('.product-tile__quickshop-trigger').on('click', function(event) {\n let _ele = $(event.currentTarget),\n _quickshopCloseBtnVisible = $('.product-tile__quickshop-options-close-btn').not('.hidden'),\n _eleProductTile = _ele.parents('.product-tile'),\n _eleProductTileList = _ele.parents('.slick-slider'),\n _eleProductTileSlide = _ele.parents('.slick-slide'),\n _quickshopCloseBtn = _eleProductTile.find('.product-tile__quickshop-options-close-btn'),\n _quickshopOptions = _ele.parents('.product-tile__quickshop').find('.product-tile__quickshop-options');\n\n _quickshopCloseBtnVisible.click();\n _eleProductTile.addClass('quick-shop-active');\n _ele.addClass('hidden');\n _quickshopOptions.removeClass('hidden');\n _quickshopCloseBtn.removeClass('hidden');\n $('body').addClass('quickshop-dialog-overlay');\n $('body').trigger('product:afterSelectSizeClicked');\n\n if ($('.quick-shop-active .slick-slider')) {\n $('.quick-shop-active .slick-slider').slick('setPosition');\n }\n\n if (_eleProductTileList.length > 0) {\n let _slickList = _eleProductTileList.find('.slick-list').first();\n\n _eleProductTileList.addClass('productlist-quick-shop-active');\n _eleProductTileSlide.addClass('slide-quick-shop-active');\n _slickList.addClass('slicklist-quick-shop-active');\n }\n\n if ($('.slick-slider')) {\n $('.slick-slider').slick('setPosition');\n }\n\n })\n\n $('.product-tile__quickshop-options-close-btn').on('click', function(event) {\n _disableEvent(event);\n\n let _ele = $(event.currentTarget),\n _eleProductTile = _ele.parents('.product-tile'),\n _eleQuickShopBtn = _eleProductTile.find('.product-tile__quickshop-trigger'),\n _quickshopOptions = _eleProductTile.find('.product-tile__quickshop-options'),\n _eleProductTileList = _ele.parents('.slick-slider'),\n _eleProductTileSlide = _ele.parents('.slick-slide');\n\n _ele.addClass('hidden');\n _eleProductTile.removeClass('quick-shop-active');\n $('.product-tile__packshots-slide').slick('setPosition');\n _eleQuickShopBtn.removeClass('hidden');\n _quickshopOptions.addClass('hidden');\n $('body').removeClass('quickshop-dialog-overlay');\n $('body').trigger('product:afterQuickShopCloseButtonClicked');\n\n if (_eleProductTileList.length > 0) {\n let _slickList = _eleProductTileList.find('.slick-list').first();\n _slickList.removeClass('slicklist-quick-shop-active');\n _eleProductTileList.removeClass('productlist-quick-shop-active');\n _eleProductTileSlide.removeClass('slide-quick-shop-active');\n }\n\n if ($('.slick-slider')) {\n $('.slick-slider').slick('setPosition');\n }\n });\n}\n"],"sourceRoot":""}