{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_icebreaker/cartridge/js/pages/product-detail.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","16","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","thumbsSwiper","mainImageSwiper","replacingProduct","_throttle","require","minicart","progress","facilemodal","accordion","validator","gtmTracking","UiEventHelper","refreshToolTips","Tipped","hideAll","$","inline","skin","maxWidth","initSwipers","destroy","$ptc","find","insertAfter","Swiper","spaceBetween","slidesPerView","loop","freeMode","freeModeSticky","watchSlidesProgress","watchSlidesVisibility","breakpoints","1200","direction","$pic","mainSwiperOptions","preloadImages","lazy","preloaderClass","loadPrevNext","loadPrevNextAmount","pagination","type","el","clickable","navigation","nextEl","prevEl","thumbs","swiper","zoom","maxRatio","$btn","on","removeClass","addClass","_clearTimeoutID","clearTimeout","setTimeout","activeSlideIndex","activeIndex","activeVideo","this","slides","modelMeasurement","modelMeasurementVideo","play","hide","show","pause","siblings","stop","clearQueue","delay","fadeIn","fadeOut","variationLabels","container","target","attrWrapper","colorTarget","sizeTarget","selectedColor","selectedSize","empty","append","children","attr","remove","prepend","text","replaceProductRunner","trigger","psi","replaceProduct","mpid","colorSwatch","$this","position","hasClass","$psi","closest","parent","ajax","url","cache","done","$newImages","$imageContainer","html","replaceWith","attach","init","stickyATC","initialiseInventoryModal","fail","pid","color","Urls","belowImageContent","gaSwatchSelect","_vardesc","vardesc","_productdata","featureToggles","pushDataLayerJson","dataLayer","id","category","gender","isInit","placeholderHeight","navBarHeight","document","getElementById","offsetHeight","isTopSticky","swapPosition","anchor","querySelector","placeholder","anchorBottom","getBoundingClientRect","bottom","matchMedia","matches","style","removeProperty","height","classList","add","innerHeight","addEventListener","initializeEvents","$pdpMain","e","preventDefault","productInfo","JSON","parse","dataset","size","productId","masterID","colour","ScarabQueue","stopPropagation","elm","currentTarget","modalId","getAttribute","modalW","modalWp","modalH","_url","CB","$sizeChart","_selectedId","replace","index","tabs","active","showModal","highlightTimeout","_pid","_merchandisedProductId","sizeSelector","bounding","atcContainerHeight","top","documentElement","clientHeight","animate","scrollTop","offset","val","$cartographer","parents","dataString","cleanData","stringify","script","createElement","src","Date","getTime","getElementsByTagName","appendChild","cartographerTrackAddToCart","closeFmModal","pushCartAction","openCart","initializeDOM","each","$pdpHeroContainer","$pdpHeroParalaxLayer","$pName","pdpHeroCB","scrollDist","scrollGap","scroll","layer","dataSpeed","translate","css","paralaxHero","sizeSwatch","contains","swatch","scarabElement","scarabData","selectedColourIdWithoutPrefix","selectedColour","defaultColourGroupId","triggerScarabPush","pageEntry","appPages","product"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAi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GnB,MAAO4M,KAuKT+E,IAGD,MAAMC,EAAY,CACjB3H,KAAM,WACLoG,IACA3D,MAIG7J,OAAOgP,WACXhP,OAAOgP,SAAW,IAGnBhP,OAAOgP,SAASC,QAAUF","file":"page_product.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t16: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"appWebpackJsonp\"] = window[\"appWebpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([277,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","'use strict';\n\nvar _throttle = require('lodash/throttle');\nvar thumbsSwiper;\nvar mainImageSwiper;\nvar replacingProduct;\nvar doubleClickTimeout = 300;\n\nvar minicart = require('../components/minicart');\nvar progress = require('../components/progress');\nvar facilemodal = require('../components/facile-modal');\nvar accordion = require('../components/accordion');\nvar validator = require('../components/validator');\nvar gtmTracking = require('../components/gtmTracking');\n\nvar UiEventHelper = require('../helper/ui-event-helper');\n\n/**\n * @function\n * @description (re)builds the tooltips via Tipper\n */\nvar refreshToolTips = function() {\n\tTipped.hideAll();\n\n\tif ($(\"#promo-tip-body\").length > 0) {\n\t\tTipped.create('#promo-tip', 'promo-tip-body', {\n\t\t\tinline: true,\n\t\t\tskin: 'icebreaker-primary',\n\t\t\tmaxWidth: 225\n\t\t});\n\t}\n\n\tTipped.create('#price-prior-tip', 'price-prior-tip-body', {\n\t\tinline: true,\n\t\tskin: 'icebreaker-primary',\n\t\tmaxWidth: 225\n\t});\n};\n\n/**\n * @function\n * @description builds the Product image and thumbnails relying on Swiper\n */\nvar initSwipers = function() {\n\t// If we're re-initalizing, clean up first\n\tif (thumbsSwiper) {\n\t\tthumbsSwiper.destroy();\n\t\t// manually set to null after destroying it\n\t\t// otherwise it is { destroyed: true }, which cause issues on reusing\n\t\tthumbsSwiper = null;\n\t}\n\n\tif (mainImageSwiper) {\n\t\tmainImageSwiper.destroy();\n\t\tmainImageSwiper = null;\n\t}\n\n\t// Product Thumbnails - Options and swiper init\n\tvar productThumbnailsSelector = '#product-thumbnails > .swiper-container';\n\tvar $ptc = $(productThumbnailsSelector);\n\tif ($ptc.length) {\n\t\t// move video to the 2nd thumbnail position\n\t\tif ($ptc.find('.swiper-slide').length > 2) {\n\t\t\t$ptc.find('.thumb-video-vimeo').insertAfter($ptc.find('.swiper-slide').get(0));\n\t\t}\n\t\tvar thumbSwiperOptions = {\n\t\t\tspaceBetween: 10,\n\t\t\tslidesPerView: 6,\n\t\t\tloop: false,\n\t\t\tfreeMode: true,\n\t\t\tfreeModeSticky: true,\n\t\t\twatchSlidesProgress: true,\n\t\t\twatchSlidesVisibility: true,\n\t\t\tbreakpoints: {\n\t\t\t\t1200: { // Matches Large breakpoint for css\n\t\t\t\t\tdirection: 'vertical',\n\t\t\t\t\tslidesPerView: 10\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthumbsSwiper = new Swiper(productThumbnailsSelector, thumbSwiperOptions);\n\t}\n\n\t// Product Main Images - Options and swiper init\n\tvar productImageSelector = \"#product-main-images > .swiper-container\";\n\tvar $pic = $(productImageSelector);\n\tif ($pic.length) {\n\t\t// move video up to the 2nd slide position\n\t\tif ($pic.find('.swiper-slide').length > 2) {\n\t\t\t$pic.find('.product-video-vimeo').insertAfter($pic.find('.swiper-slide').get(0));\n\t\t}\n\t\tvar mainSwiperOptions = {\n\t\t\tspaceBetween: 10,\n\t\t\tpreloadImages: false,\n\t\t\tlazy: {\n\t\t\t\tpreloaderClass: 'lazy-preloader',\n\t\t\t\tloadPrevNext: true,\n\t\t\t\tloadPrevNextAmount: 1\n\t\t\t},\n\t\t\tloop: true,\n\t\t\tpagination: {\n\t\t\t\ttype: 'bullets',\n\t\t\t\tel: '.swiper-controls .swiper-pagination',\n\t\t\t\tclickable: true\n\t\t\t},\n\t\t\tnavigation: {\n\t\t\t\tnextEl: '.swiper-controls .swiper-button-next',\n\t\t\t\tprevEl: '.swiper-controls .swiper-button-prev'\n\t\t\t},\n\t\t\tthumbs: {\n\t\t\t\tswiper: thumbsSwiper\n\t\t\t},\n\t\t\tzoom: {\n\t\t\t\tmaxRatio: 2.5\n\t\t\t}\n\t\t};\n\n\t\t// If only one slide, don't want looping\n\t\tif ($pic.find('.swiper-slide').length == 1) {\n\t\t\tmainSwiperOptions.loop = false;\n\t\t}\n\n\t\tmainImageSwiper = new Swiper(productImageSelector, mainSwiperOptions);\n\n\t\t// mark nav buttons with 'transition' classname, which is used to decorate\n\t\t// the buttons on mobile where hover is not reliable\n\t\tvar $btn = $('#product-main-images > .swiper-controls > .swiper-button');\n\t\tmainImageSwiper.on('transitionStart', function() {\n\t\t\t$btn.removeClass('init-state');\n\t\t\t$btn.addClass('transition');\n\t\t});\n\n\t\t// remove 'transition' class after 2s delay, to enhance buttons' existance,\n\t\t// and mitigate finger cover-up\n\t\tvar _clearTimeoutID = null;\n\t\tmainImageSwiper.on('transitionEnd', function() {\n\t\t\tclearTimeout(_clearTimeoutID);\n\t\t\t_clearTimeoutID = setTimeout(function() {\n\t\t\t\t$btn.removeClass('transition');\n\t\t\t}, 2000);\n\n\t\t\tvar activeSlideIndex = mainImageSwiper.activeIndex;\n\t\t\tvar activeSlide = $(this.slides[activeSlideIndex]);\n\t\t\tvar activeVideo = activeSlide.find('video');\n\t\t\tvar modelMeasurement = $('.modelmeasurement');\n\t\t\tvar modelMeasurementVideo = $('.modelmeasurement-video');\n\n\t\t\tif (activeVideo.length > 0) {\n\t\t\t\t// Playback Video while it is active.\n\t\t\t\tthis.activeVideo = activeVideo[0];\n\t\t\t\tthis.activeVideo.play();\n\t\t\t\t$(modelMeasurement).hide();\n\t\t\t\t$(modelMeasurementVideo).show();\n\t\t\t} else if (this.activeVideo) {\n\t\t\t\t// Pause the video when the current video becomes inactive.\n\t\t\t\tthis.activeVideo.pause();\n\t\t\t\tthis.activeVideo = null;\n\t\t\t\t$(modelMeasurement).show();\n\t\t\t\t$(modelMeasurementVideo).hide();\n\t\t\t}\n\t\t});\n\n\t\t// Shows the zoom tip when user just single clicks\n\t\t$pic.on('click', '.swiper-zoom-container', function () {\n\t\t\t$(this).siblings('.swiper-zoom-tip').stop().clearQueue().delay(100).fadeIn().delay(3000).fadeOut();\n\t\t});\n\t}\n};\n\n/**\n * @function\n * @description Changes product-attributes labels to have new information\n */\nvar variationLabels = function(container) {\n\tvar target = (!container || $(container).length === 0) ? '#pdpMain' : container;\n\tvar attrWrapper = $(target).find('.product-attributes .primary-attributes');\n\tvar colorTarget = $(target).find('.product-attributes .product-color .value');\n\tvar sizeTarget = $(target).find('.product-attributes .product-size .value');\n\tvar selectedColor = $(target).find('.product-variations .color .swatch.selected');\n\tvar selectedSize = $(target).find('.product-variations .size .swatch.selected');\n\n\t// Drop color swatch and label into target\n\tif (selectedColor.length > 0) {\n\t\tcolorTarget.empty().append(selectedColor.children().attr('title'));\n\t\tattrWrapper.remove('.swatch');\n\t\tattrWrapper.prepend('');\n\t} else {\n\t\tcolorTarget.empty().append('--');\n\t\tattrWrapper.remove('.swatch');\n\t}\n\n\t// Drop size label into target\n\tselectedSize.length > 0 ? sizeTarget.empty().append(selectedSize.children().text()) : sizeTarget.empty().append('--');\n};\n\n/**\n * @function\n * @description Changes images in slider and zoom when new color swatch is clicked\n */\nvar replaceImages = function () {\n\n\tvar $newImages = $(\"#update-images\");\n\tvar $imageContainer = $(\"#pdpMain .product-image-container\");\n\n\tif (!($newImages.length > 0)) {\n\t\t// Bail, no update-images\n\t\treturn;\n\t}\n\n\t// Move Images\n\t$imageContainer.fadeOut(250, function() {\n\t\t$imageContainer.show().html($newImages.html());\n\t\t$newImages.remove();\n\n\t\t// Build Swipers\n\t\tinitSwipers();\n\t});\n};\n\n/**\n * @function\n * @description Prevent double click on switching product\n * @param {String} trigger\n * @param {Boolean} psi Product Set Item\n */\nvar replaceProductRunner = function (trigger, psi) {\n\tclearTimeout(replacingProduct);\n\n\treplacingProduct = setTimeout(function() {\n\t\treplaceProduct(trigger, psi);\n\t}, doubleClickTimeout);\n};\n\n/**\n * @function\n * @description Build product data on user switch\n * @param {String} trigger\n * @param {Boolean} psi Product Set Item\n */\nvar replaceProduct = function (trigger, psi) {\n\tvar $this = $(trigger);\n\tvar mpid;\n\tvar colorSwatch;\n\tvar position = \"\";\n\t$this.hasClass('color-swatchanchor') ? colorSwatch = true : colorSwatch = false;\n\n\t// Show Progress for PSI or if ColorSwatch\n\tif (psi) {\n\t\tvar $psi = $this.closest(\".product-set-item\");\n\t\tmpid = $(\".pt_productdetails .pdp\").data(\"mpid\");\n\t\tif (colorSwatch) {\n\t\t\tprogress.show($psi);\n\t\t}\n\t\t// position of Product in Product Set List, using for GTM Product Click data\n\t\tposition = $psi.find(\"[data-position]\").data(\"position\");\n\t} else if (colorSwatch) {\n\t\tprogress.show('#product-main-images');\n\t}\n\n\t// Can't choose this, bail\n\tif ($this.closest(\".swatch\").hasClass(\"unselectable\")) {\n\t\treturn false;\n\t}\n\n\t// Transition out old feedback\n\t$this.parent().siblings(\".selected\").addClass(\"deselected\").removeClass(\"selected\");\n\t$this.parent().addClass(\"preselected\");\n\n\t// Load new content\n\t$.ajax({\n\t\turl: $this.attr(\"href\"),\n\t\tdata: {\"format\": \"ajax\", \"mpid\": mpid, \"psi\": psi, \"position\": position},\n\t\tcache: false\n\t}).done(function(data) {\n\t\t// Replace content\n\t\tif (psi) {\n\t\t\tprogress.hide();\n\t\t\t$psi.empty().html(data);\n\t\t\tvariationLabels($psi);\n\t\t} else {\n\t\t\t$(\"#product-title\").remove();\n\t\t\t$(\"#product-content-2\").remove();\n\t\t\t$(\"#product-content\").empty().replaceWith(data);\n\t\t\t// Product details accordion(s)\n\t\t\taccordion.attach('#product-details', '.details-trigger', '#details-content', 'closed');\n\t\t\taccordion.attach('#product-details', '.fabric-trigger', '#fabric-content', 'closed');\n\t\t\taccordion.attach('#product-details', '.sizeinfo-trigger', '#sizeinfo-content', 'closed');\n\t\t\taccordion.attach('#product-details', '.techinfo-trigger', '#techinfo-content', 'closed');\n\t\t\tvariationLabels();\n\n\t\t\t// Do these only for color changes.\n\t\t\tif (colorSwatch) {\n\t\t\t\treplaceImages();\n\t\t\t}\n\t\t\trefreshToolTips();\n\t\t\tvalidator.init($(\"#product-content\"));\n\t\t\tstickyATC(false);\n\n\t\t\t// re-init find-in-store dialog link\n\t\t\twindow.initialiseInventoryModal && window.initialiseInventoryModal();\n\t\t}\n\n\t}).fail(function() {\n\t\tprogress.hide();\n\t});\n\n\tif (colorSwatch) {\n\t\tvar pid = $('.pt_productdetails .pdp').data('mpid');\n\t\tvar color = $this.data('swatch-value');\n\n\t\t$.ajax({\n\t\t\turl: window.Urls.belowImageContent,\n\t\t\tdata: {\"format\": \"ajax\", \"pid\": pid, \"color\": color},\n\t\t\tcache: false\n\t\t}).done(function(data) {\n\t\t\t$('#below-image-content').empty().html(data);\n\t\t});\n\t}\n\n\tif (typeof gaSwatchSelect == \"function\") {\n\t\tvar _vardesc = $this.attr(\"title\");\n\t\tgaSwatchSelect(_vardesc, $this);\n\t}\n};\n\n/**\n * @function\n * @description Google analytics dataLayer push on swatch click\n * @param {String} vardesc\n * @param {String} trigger\n */\nvar gaSwatchSelect = function(vardesc, trigger) {\n\tif (window.featureToggles['DX-11904']) {\n\t\tgtmTracking.pushDataLayerJson($(trigger));\n\t} else {\n\t\tvar _productdata;\n\t\tif ($(\".product-set-list\").length > 0) {\n\t\t\t_productdata = $(trigger).closest(\".product-set-item\").data(\"selectedproduct\");\n\t\t} else if ($(\".product-box\").length > 0) {\n\t\t\t_productdata = $(\".product-box\").data(\"selectedproduct\");\n\t\t}\n\t\tif (_productdata) {\n\t\t\tdataLayer.push({\n\t\t\t\t\"event\": \"productView\",\n\t\t\t\t\"ecommerce\": {\n\t\t\t\t\t\"detail\": {\n\t\t\t\t\t\t\"actionField\": {\"list\": \"Related Product List Name\"},\n\t\t\t\t\t\t\"products\": [{\n\t\t\t\t\t\t\t\"name\": _productdata.name,\n\t\t\t\t\t\t\t\"id\": _productdata.id,\n\t\t\t\t\t\t\t\"price\": $(\".sales-price-data\").data(\"price\"),\n\t\t\t\t\t\t\t\"brand\": \"Icebreaker\",\n\t\t\t\t\t\t\t\"category\": _productdata.category,\n\t\t\t\t\t\t\t\"variant\": vardesc,\n\t\t\t\t\t\t\t\"dimension14\": _productdata.gender\n\t\t\t\t\t\t}]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n};\n\n/**\n * Create tracking script for cartographer, passing in JSON parameters\n * @param {String} dataString\n */\nfunction cartographerTrackAddToCart(dataString) {\n\t// clean data string of any extra characters\n\tvar cleanData = JSON.stringify(JSON.parse(dataString));\n\n\tif (!cleanData) {\n\t\treturn;\n\t}\n\n\t// https://www.drivecommerce.com/cartographer/developer/getting-started/conversions.html#submit-add-to-cart-event\n\tvar script = document.createElement('script');\n\tscript.type = 'text/javascript';\n\tscript.src = 'https://api.cartographer.drivecommerce.com/api/v1/runtime/addtocart?type=production&products=' + cleanData + '&time=' + (new Date().getTime());\n\tdocument.getElementsByTagName('body')[0].appendChild(script);\n}\n\n/**\n * @function\n * @description make add-to-cart sticky when scrolling down\n */\nvar stickyATC = function(isInit) {\n\n\tvar navBarHeight = document.getElementById(\"navigation\").offsetHeight;\n\tvar placeholderHeight;\n\tvar isTopSticky = false;\n\n\tfunction swapPosition () {\n\t\tvar anchor = document.querySelector(\".product-add-to-cart\");\n\t\tif (!anchor) return;\n\n\t\tvar container = anchor.querySelector(\".product-atc-container\");\n\t\tvar placeholder = anchor.querySelector(\".product-atc-placeholder\");\n\t\tvar anchorBottom = anchor.getBoundingClientRect().bottom;\n\n\t\tvar mql = window.matchMedia('(min-width: 768px)');\n\n\t\tif (mql.matches) {\n\t\t\t// clean residue from mobile bottom sticky\n\t\t\tcontainer.style.removeProperty('bottom');\n\n\t\t\t// sticky desktop\n\t\t\tif (!isTopSticky) {\n\t\t\t\tplaceholderHeight = container.offsetHeight + 'px';\n\t\t\t}\n\n\t\t\tif (anchorBottom <= navBarHeight) {\n\t\t\t\tif (isTopSticky) {\n\t\t\t\t\tplaceholder.style.height = placeholderHeight;\n\t\t\t\t}\n\t\t\t\tcontainer.classList.add('wrapper-1920');\n\t\t\t\tanchor.classList.add('fix-top-atc');\n\t\t\t\tisTopSticky = true;\n\t\t\t} else {\n\t\t\t\tcontainer.classList.remove('wrapper-1920');\n\t\t\t\tanchor.classList.remove('fix-top-atc');\n\t\t\t\tisTopSticky = false;\n\t\t\t}\n\t\t} else {\n\t\t\t// clean residue from desktop topright corner sticky\n\t\t\tcontainer.classList.remove('wrapper-1920');\n\t\t\tanchor.classList.remove('fix-top-atc');\n\t\t\tisTopSticky = false;\n\n\t\t\t// sticky mobile\n\t\t\tif (anchorBottom <= window.innerHeight) {\n\t\t\t\tcontainer.style.bottom = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (isInit) {\n\t\twindow.addEventListener('scroll', _throttle(swapPosition, 100));\n\t} else {\n\t\tswapPosition();\n\t}\n};\n\n/**\n * @function\n * @description handling pdp hero inpirational takeover\n */\nvar paralaxHero = function() {\n\tvar $pdpHeroContainer = $(\".pdp-hero-container\");\n\tvar $pdpHeroParalaxLayer = $pdpHeroContainer.find(\".paralax-scroll-layer\");\n\tvar $pName = $(\".pdp-hero-container + .pdp .pdp-main h1.product-name\");\n\n\tfunction pdpHeroCB() {\n\t\tvar scrollDist; var scrollGap;\n\t\tvar mql = window.matchMedia(\"(min-width: 768px)\");\n\n\t\tif (mql.matches) {\n\t\t\t// desktop\n\t\t\tscrollDist = 200;\n\t\t\tscrollGap = 100;\n\t\t} else {\n\t\t\t// mobile\n\t\t\tscrollDist = 100;\n\t\t\tscrollGap = 60;\n\t\t}\n\n\t\tvar scroll = $(window).scrollTop();\n\n\t\t// paralax scrolling on bkg and topo\n\t\t$pdpHeroParalaxLayer.each(function () {\n\t\t\tvar layer = $(this);\n\t\t\tvar dataSpeed = layer.data(\"parallax-speed\");\n\t\t\tvar offsetY = scroll * (1 - dataSpeed);\n\t\t\tvar translate = \"translateY(\" + offsetY + \"px)\";\n\t\t\tlayer.css({\n\t\t\t\t\"-webkit-transform\": translate,\n\t\t\t\t\"-moz-transform\": translate,\n\t\t\t\t\"-ms-transform\": translate,\n\t\t\t\t\"-o-transform\": translate,\n\t\t\t\t\"transform\": translate\n\t\t\t});\n\t\t});\n\n\t\tif (scroll <= scrollDist) {\n\t\t\t$pdpHeroContainer.addClass(\"pdp-hero-scrolling\");\n\t\t\tvar offsetY = scroll - scrollDist;\n\t\t\tvar translate = \"translateY(\" + offsetY + \"px)\";\n\t\t\t// move product title, and hide dotted line\n\t\t\t$pName.css({\n\t\t\t\t\"-webkit-transform\": translate,\n\t\t\t\t\"-moz-transform\": translate,\n\t\t\t\t\"-ms-transform\": translate,\n\t\t\t\t\"-o-transform\": translate,\n\t\t\t\t\"transform\": translate,\n\t\t\t\t\"background\": \"none\"\n\t\t\t});\n\t\t\t// add classname for scroll position to help light color switch\n\t\t\tif (scroll <= scrollGap) {\n\t\t\t\t$pdpHeroContainer.addClass(\"pdp-hero-scroll-pos-top-mid\");\n\t\t\t} else {\n\t\t\t\t$pdpHeroContainer.removeClass(\"pdp-hero-scroll-pos-top-mid\");\n\t\t\t}\n\t\t} else {\n\t\t\t$pdpHeroContainer.removeClass([\"pdp-hero-scrolling\", \"pdp-hero-scroll-pos-top-mid\"]);\n\t\t\ttranslate = \"translateY(0)\";\n\t\t\t// return product title to original pos, restore dotted line\n\t\t\t$pName.css({\n\t\t\t\t\"-webkit-transform\": translate,\n\t\t\t\t\"-moz-transform\": translate,\n\t\t\t\t\"-ms-transform\": translate,\n\t\t\t\t\"-o-transform\": translate,\n\t\t\t\t\"transform\": translate,\n\t\t\t\t\"background\": \"\"\n\t\t\t});\n\t\t}\n\t}\n\n\tif ($pdpHeroContainer.length > 0) {\n\t\tpdpHeroCB(); // initial run\n\t\twindow.addEventListener('scroll', _throttle(pdpHeroCB, 3));\n\t}\n};\n\n/**\n * @function\n * @description initialize size-guide table in modal dialog\n * @param {String} modal_ID\n */\n// eslint-disable-next-line camelcase\nvar initSizeChartCallback = function(modal_ID) {\n\tvar $sizeChart = $(modal_ID.replace(\"#\", \".\") + \"-box .chart.with-tabs\");\n\tvar _selectedId = $(\"ul\", $sizeChart).children(\".default\").index();\n\n\t$sizeChart.tabs({\n\t\tactive: _selectedId\n\t});\n};\n\nvar initTabbedRecommenders = function() {\n\t$('.tabbed-recommenders').tabs();\n};\n\n/**\n * Send product data on PDP to Scarab JS Library on initial load\n */\nfunction triggerScarabPush() {\n\ttry {\n\t\tlet selectedSize = null;\n\t\tconst sizeSwatch = document.getElementById('sizeSwatch');\n\t\tif (sizeSwatch && sizeSwatch.classList.contains('selected')) {\n\t\t\tconst swatch = sizeSwatch.querySelector('a');\n\n\t\t\tif (swatch) {\n\t\t\t\tconst productInfo = JSON.parse(swatch.dataset.productInfo);\n\t\t\t\tif (productInfo && productInfo.size) {\n\t\t\t\t\tselectedSize = productInfo.size;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// ScarabQueue is a variable declared in htmlhead\n\t\tif (ScarabQueue) {\n\t\t\tconst scarabElement = document.getElementById('scarabData');\n\t\t\t// Retrieve the data-scarabdata attribute\n\t\t\tconst scarabData = JSON.parse(scarabElement.getAttribute('data-scarabdata'));\n\t\t\t// Note: data-scarabdata can be null.\n\t\t\tif (scarabData) {\n\t\t\t\tif (selectedSize) {\n\t\t\t\t\t// when a size is selected, push the variant ID\n\t\t\t\t\tScarabQueue.push([\"view\", scarabData.selectedColourIdWithoutPrefix + selectedSize]);\n\t\t\t\t} else if (scarabData.selectedColour) {\n\t\t\t\t\t// when just the colour is selected, push the selected colour group ID\n\t\t\t\t\tScarabQueue.push([\"view\", scarabData.selectedColour]);\n\t\t\t\t} else {\n\t\t\t\t\t// send the default colour group ID\n\t\t\t\t\tScarabQueue.push([\"view\", scarabData.defaultColourGroupId]);\n\t\t\t\t}\n\t\t\t\t// go is the submission command\n\t\t\t\tScarabQueue.push(['go']);\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\t// catching to let other functions work as usual incase of an error\n\t}\n}\n\n/**\n * @function\n * @description All events\n */\nvar initializeEvents = function() {\n\tvar $pdpMain = $(\"#pdpMain\");\n\n\t// Select Product variations\n\t$pdpMain.on(\"click\", \"#product-content a.swatchanchor\", function (e) {\n\t\te.preventDefault();\n\t\ttry {\n\t\t\t// send selected item info to Scarab Library\n\t\t\tconst productInfo = JSON.parse(this.dataset.productInfo);\n\t\t\tconst size = productInfo.size && productInfo.size.length > 0 ? productInfo.size : '';\n\t\t\tconst productId = productInfo.masterID + productInfo.colour + size;\n\t\t\tif (ScarabQueue) {\n\t\t\t\tScarabQueue.push([\"view\", size.length < 1 ? 'g/' + productId : productId]);\n\t\t\t\tScarabQueue.push(['go']);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// catching to let other functions work as usual incase of an error\n\t\t}\n\t\treplaceProductRunner(this, false);\n\t});\n\n\t// Select Product variations -- Product Set\n\t$pdpMain.on(\"click\", \".product-set-list a.swatchanchor\", function (e) {\n\t\te.preventDefault();\n\t\treplaceProductRunner(this, true);\n\t});\n\n\t// prevent double click on swatches\n\t$pdpMain.on(\"dblclick\", \"#product-content a.swatchanchor, .product-set-list a.swatchanchor\", function (e) {\n\t\te.preventDefault();\n\t});\n\n\t$pdpMain.add(\".product-modelfit\").on(\"click\", \".size-guide\", function(e) {\n\t\te.preventDefault();\n\n\t\te.stopPropagation();\n\n\t\tvar elm = e.currentTarget;\n\t\tif (elm) {\n\t\t\tvar modalId = elm.getAttribute(\"href\");\n\t\t\tvar modalW = elm.dataset['modalWidth'];\n\t\t\tvar modalWp = elm.dataset['modalWidthPercent'];\n\t\t\tvar modalH = elm.dataset['modalHeight'];\n\t\t\tvar _url = elm.dataset[\"href\"];\n\n\t\t\tvar CB = {\n\t\t\t\tcall: function() {\n\t\t\t\t\tinitSizeChartCallback(modalId);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfacilemodal.showModal(modalId, _url, modalW, modalWp, modalH, null, null, CB);\n\t\t}\n\n\t});\n\n\t// Add-to-cart\n\tvar highlightTimeout = null;\n\t$pdpMain.on(\"click\", \"button#add-to-cart\", function(e) {\n\t\te.preventDefault();\n\n\t\tvar _pid;\n\t\t// ID of the product currently viewed on the PDP.\n\t\tvar _merchandisedProductId;\n\t\tvar $this = $(this);\n\n\t\tif ($this.hasClass(\"add-to-cart-disabled\")) {\n\t\t\tvar sizeSelector = $this.closest('.product-content').find('.product-variations .swatches.size');\n\t\t\tvar bounding = sizeSelector.get(0).getBoundingClientRect();\n\t\t\tvar navBarHeight = $('#navigation').height();\n\t\t\tvar atcContainerHeight = $('.product-atc-container').height();\n\n\t\t\tif (\n\t\t\t\t// too close to the top navbar or bottom atc container\n\t\t\t\t(bounding.top + bounding.height / 4 < navBarHeight ||\n\t\t\t\t\tbounding.bottom - bounding.height / 4 > (window.innerHeight || document.documentElement.clientHeight) - atcContainerHeight)\n\t\t\t) {\n\t\t\t\t$('html, body').animate({\n\t\t\t\t\tscrollTop: sizeSelector.offset().top - window.innerHeight / 2\n\t\t\t\t}, 250, function() {\n\t\t\t\t\twindow.setTimeout(function() {\n\t\t\t\t\t\tsizeSelector.addClass('highlight');\n\t\t\t\t\t}, 250);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tsizeSelector.addClass('highlight');\n\t\t\t}\n\n\t\t\tif (highlightTimeout) {\n\t\t\t\tclearTimeout(highlightTimeout);\n\t\t\t}\n\n\t\t\thighlightTimeout = setTimeout(function() {\n\t\t\t\tsizeSelector.removeClass('highlight');\n\t\t\t}, 2000);\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($(\".product-set-list\").length > 0) {\n\t\t\t_pid = $this.closest(\".product-set-item\").find(\"input[name$='pid']\").val();\n\t\t\t_merchandisedProductId = $this.closest(\".product-set-item\").find(\"input[name$='merchandisedProductId']\").val();\n\t\t} else if ($(\".product-box\").length > 0) {\n\t\t\t_pid = $(\"#pid\").val();\n\t\t\t_merchandisedProductId = $(\"#merchandisedProductId\").val();\n\t\t}\n\n\t\tif (_pid.length > 0) {\n\t\t\t// track cartographer analytics\n\t\t\tvar $cartographer = $this.parents('.product-add-to-cart').find('.cartographer-product-data');\n\t\t\tif ($cartographer.length > 0) {\n\t\t\t\tcartographerTrackAddToCart($cartographer.text());\n\t\t\t}\n\n\t\t\tfacilemodal.closeFmModal(); // close modal dialog\n\n\t\t\tminicart.add( \"\", {\"pid\": _pid, \"Quantity\": 1, \"merchandisedProductId\": _merchandisedProductId}, function() {\n\t\t\t\tgtmTracking.pushCartAction($this);\n\t\t\t\tUiEventHelper.openCart(true); // open cart ui after add-to-cart\n\t\t\t});\n\t\t}\n\t});\n\n\tinitTabbedRecommenders();\n};\n\n/**\n * @function\n * @description DOM initialization\n */\nvar initializeDOM = function() {\n\n\t// Build image swiper(s)\n\tinitSwipers();\n\n\trefreshToolTips();\n\n\t// Product details accordion(s)\n\taccordion.attach('#product-details', '.details-trigger', '#details-content', 'closed');\n\taccordion.attach('#product-details', '.fabric-trigger', '#fabric-content', 'closed');\n\taccordion.attach('#product-details', '.sizeinfo-trigger', '#sizeinfo-content', 'closed');\n\taccordion.attach('#product-details', '.techinfo-trigger', '#techinfo-content', 'closed');\n\n\t// Update color selected labels\n\t// if product set, loop each\n\tif ($(\".product-set-list\").length > 0) {\n\t\t$(\".product-set-item\").each(function() {\n\t\t\tvariationLabels(this);\n\t\t});\n\t} else {\n\t\tvariationLabels();\n\t\t// handle inspirational takeover hero\n\t\tparalaxHero();\n\t\t// make add-to-cart container sticky to the header\n\t\tstickyATC(true);\n\t}\n\n\t// send product info to Scarab Library on page load\n\ttriggerScarabPush();\n};\n\nconst pageEntry = {\n\tinit: function () {\n\t\tinitializeDOM();\n\t\tinitializeEvents();\n\t}\n};\n\nif (!window.appPages) {\n\twindow.appPages = {};\n}\n\nwindow.appPages.product = pageEntry;\n"],"sourceRoot":""}