{"version":3,"file":"default/js/productDetail.js","sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/klarnaOsm.js","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/product/pdpInstoreInventory.js","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/product/productIdCookie.js","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/product/wishlist.js","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/productDetail.js","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/storeLocator/storeLocator.js","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/util.js","webpack:///./cartridges/app_ua_core/cartridge/client/default/js/utils/bvDataLayer.js","webpack:///./cartridges/storefront-reference-architecture/cartridges/app_storefront_base/cartridge/client/default/js/util.js","webpack:///./node_modules/branch-sdk/dist/build.min.js","webpack:///(webpack)/buildin/global.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\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\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./cartridges/app_ua_core/cartridge/client/default/js/productDetail.js\");\n","/* global $ */\n\n$(function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n if (response.data.product.price.sales && document.getElementsByTagName('klarna-placement').length > 0) {\n var quantity = $('select.js-quantity-select').val() || 1;\n document.getElementsByTagName('klarna-placement')[0].setAttribute('data-purchase-amount', Math.round(quantity * response.data.product.price.sales.value * 100));\n window.KlarnaOnsiteService.push({\n eventName: 'refresh-placements'\n });\n }\n });\n});\n","'use strict';\n\nvar storeLocator = require('../storeLocator/storeLocator');\nvar util = require('../util');\n\n/**\n * Generates the modal window on the first call.\n */\nfunction getModalHtmlElement() {\n if ($('#inStoreInventoryModal').length !== 0) {\n $('#inStoreInventoryModal').remove();\n }\n var htmlString = ''\n + '
'\n + '
'\n + ''\n + '
'\n + '
'\n + ' '\n + '
'\n + '
'\n + '
'\n + '
'\n + '
';\n $('body').append(htmlString);\n}\n\n/**\n * Replaces the content in the modal window with find stores components and\n * the result store list.\n * @param {string} pid - The product ID to search for\n * @param {number} quantity - Number of products to search inventory for\n * @param {string} prodPID - The product ID for the store\n * @param {string} prodUUID - The product UUID for the store\n * @param {number} selectedPostalCode - The postal code to search for inventory\n * @param {number} selectedRadius - The radius to search for inventory\n * @param {string} storeID - The storeID ID to search for\n */\nfunction fillModalElement(pid, quantity, prodPID, prodUUID, selectedPostalCode, selectedRadius, storeID) {\n var requestData = {\n products: pid + ':' + quantity\n };\n\n if (selectedRadius) {\n requestData.radius = selectedRadius;\n }\n\n if (selectedPostalCode) {\n requestData.postalCode = selectedPostalCode;\n }\n if (storeID) {\n requestData.storeID = storeID;\n }\n if (prodPID) {\n requestData.prodPID = prodPID;\n }\n if (prodUUID) {\n requestData.prodUUID = prodUUID;\n }\n $('body').spinner().start();\n $('body').find('.b-loader').css('z-index', '999');\n $.ajax({\n url: $('.btn-get-in-store-inventory').data('action-url') || $('.change-store').data('action-url'),\n data: requestData,\n method: 'GET',\n success: function (response) {\n $('#inStoreInventoryModal .modal-body').empty();\n $('#inStoreInventoryModal .modal-body').html(response.storesResultsHtml);\n $('body').spinner().stop();\n $('.modal').modal('hide');\n $('#inStoreInventoryModal').modal('show');\n $('#inStoreInventoryModal').next('.modal-backdrop.show').css('z-index', '999');\n $('#inStoreInventoryModal').find('.results').removeClass('adjust-height');\n storeLocator.search();\n storeLocator.changeRadius();\n storeLocator.selectStore();\n storeLocator.updateSelectStoreButton();\n storeLocator.updateStoreSelection();\n storeLocator.detectLocation();\n $('body').trigger('components:init');\n\n $('.btn-storelocator-search').attr('data-search-pid', pid);\n $('.btn-storelocator-search').attr('data-selected-store-id', storeID);\n\n if (selectedRadius) {\n $('#radius').val(selectedRadius);\n }\n\n if (selectedPostalCode) {\n $('#store-postal-code').val(selectedPostalCode);\n }\n\n if (!$('.results').data('has-results')) {\n $('.store-locator-no-results').show();\n }\n\n if ($('#inStoreInventoryModal').find('.b-store-unavailable').length > 0) {\n $('#inStoreInventoryModal').find('.results').addClass('adjust-height');\n }\n\n if (window.matchMedia('(max-width: 1023px)').matches) {\n $('body').addClass('m-no-scroll');\n }\n\n $('body').trigger('bopis:storepicker', { storeObj: response });\n },\n error: function () {\n $('body').spinner().stop();\n }\n });\n}\n\n/**\n * Remove the selected store.\n * @param {HTMLElement} $container - the target html element\n * @param {HTMLElement} responseHtml - default pickUpInStore Content\n */\nfunction deselectStore($container, responseHtml) {\n if (responseHtml) {\n $($container).find('.b-store-choose-link:first').replaceWith(responseHtml);\n } else {\n $($container).find('.b-store-choose-link:first').replaceWith($($container).find('.b-replace-choose-store .b-store-choose-link').clone());\n }\n $($container).find('.b-replace-choose-store').remove();\n $($container).find('.js-quantity-select').removeData('originalHTML');\n}\n\n/**\n * Restore all quantity select options to visible.\n * @param {string} searchPID - The product ID to search for\n */\nfunction restoreQuantitySelection(searchPID) {\n var quantityOptionSelector = '.product-detail[data-pid=\"' + searchPID + '\"] .js-quantity-select option.hide';\n $(quantityOptionSelector).removeClass('hide');\n $('button.js-add-to-cart, button.add-to-cart-global, button.js-update-cart-product-global').removeAttr('disabled');\n $('.js_paypal_button').removeClass('hide');\n $('.js_paypal_button', this.$el).parents('.b-product_actions-inner').removeClass('btn-align-mobile');\n}\n\n/**\n * On Selecting Store add margin after tabs content to avoid scroll\n */\nfunction onSelectStoreContent() {\n var tabsHeight = $('.tab-pane.active').find('.g-accordion-content .t-tabs_data').height();\n if ($('.b-store-choose-link .b-storepickup-msg').length && tabsHeight <= 55) {\n $('.b-product_attrs-item.m-description').css({ 'margin-bottom': '2.1875rem' });\n } else {\n $('.b-product_attrs-item.m-description').css({ 'margin-bottom': '0' });\n }\n}\n\n/**\n * Get cookie value by cookie name from browser\n * @param {string} cookieName - name of the cookie\n * @returns {string} cookie value of the found cookie name\n */\nfunction getCookie(cookieName) {\n var name = cookieName + '=';\n var decodedCookie = decodeURIComponent(document.cookie);\n var cookieArray = decodedCookie.split(';');\n for (var i = 0; i < cookieArray.length; i++) {\n var cookieItem = cookieArray[i];\n while (cookieItem.charAt(0) === ' ') {\n cookieItem = cookieItem.substring(1);\n }\n if (cookieItem.indexOf(name) === 0) {\n return cookieItem.substring(name.length, cookieItem.length);\n }\n }\n return '';\n}\n\n/**\n * On closing of store picker modal need to reload the page.\n * @param {string} currEle - Fetching the current target element.\n */\nfunction onModalClose(currEle) {\n var $modalElement = currEle;\n var storeCartUrl = $modalElement.find('.select-store').data('cart-href');\n var selectedStore = $modalElement.find('.b-result-store.selected');\n var isBopisCookie = getCookie('preSelectedStore');\n if ($('.b-cart-content.cart').length > 0 && $modalElement.find('.b-storeselected-button:not(.hide)').length > 0) {\n var storeCookie = '';\n if (isBopisCookie !== '') {\n try {\n var parseCookie = JSON.parse(isBopisCookie);\n // checking data type of cookie\n if (typeof parseCookie === 'string') {\n storeCookie = JSON.parse(parseCookie);\n } else if (typeof parseCookie === 'object') {\n storeCookie = parseCookie;\n }\n } catch (e) {\n console.error(e);\n }\n }\n // if Bopis store iD is not saved in cookie in cart then saving the store details and refreshing cart\n if ((storeCookie.noStoreAvailable !== undefined && storeCookie.noStoreAvailable !== '' && storeCookie.noStoreAvailable) || storeCookie === '') {\n var requestData = {};\n var selectStoreURL = $modalElement.find('.select-store').data('href');\n var cartUrl = $modalElement.find('.select-store').data('cart');\n requestData.storeID = selectedStore.attr('id');\n requestData.searchRadius = $('#radius').val();\n requestData.searchPostalCode = $('.results').data('search-key').postalCode;\n requestData.pid = $('.b-cartlineitem').attr('data-pid');\n requestData.productAvailabilityMsg = $('.b-result-store.selected').find('.b-store-delivery-details span').html();\n $.ajax({\n url: selectStoreURL,\n data: requestData,\n method: 'GET',\n success: function () {\n window.location.href = cartUrl;\n }\n });\n } else {\n storeCartUrl += '?pid=' + $('[name=\"prodPID\"]').val();\n storeCartUrl += '&uuid=' + $('[name=\"prodUUID\"]').val();\n storeCartUrl += '&newStoreId=' + selectedStore.attr('id');\n window.location.href = storeCartUrl;\n }\n }\n $('#inStoreInventoryModal').modal('hide');\n $('body').removeClass('m-no-scroll');\n}\n\nmodule.exports = {\n updateSelectStore: function () {\n $('body').on('product:updateAddToCart', function (e, response) {\n $('.btn-get-in-store-inventory', response.$productContainer).attr('disabled',\n (!response.product.readyToOrder || !response.product.available\n || !response.product.availableForInStorePickup));\n });\n },\n removeSelectedStoreOnAttributeChange: function () {\n $('body').on('product:afterAttributeSelect', function (e, response) {\n if (response.data.option !== 'quantity') {\n response.container.attr('data-pid', response.data.product.id);\n deselectStore(response.container, response.data.pickUpInStoreHtml);\n $(response.container).trigger('product:updateNotifyMe', response.data);\n }\n });\n },\n updateAddToCartFormData: function () {\n $('body').on('updateAddToCartFormData', function (e, form) {\n if (form.pidsObj) {\n var pidsObj = JSON.parse(form.pidsObj);\n pidsObj.forEach(function (product) {\n var storeElement = $('.product-detail[data-pid=\"'\n + product.pid\n + '\"]').find('.store-name');\n product.storeId = $(storeElement).length// eslint-disable-line no-param-reassign\n ? $(storeElement).find('.b-store-choose-link a.change-store').data('store-id')\n : null;\n });\n\n form.pidsObj = JSON.stringify(pidsObj);// eslint-disable-line no-param-reassign\n }\n\n var storeElement = $('.product-detail[data-pid=\"'\n + form.pid\n + '\"]');\n\n if ($(storeElement).length) {\n form.storeId = $(storeElement).find('.b-store-choose-link a.change-store').data('store-id'); // eslint-disable-line\n }\n });\n },\n showInStoreInventory: function () {\n $('body').on('click', '.btn-get-in-store-inventory', function (e) {\n e.preventDefault();\n var pid = $(this).closest('.product-detail').attr('data-pid');\n var quantity = $(this).closest('.product-detail').find('.b-quantity-select').val();\n var prodPID = $(this).closest('.cart-pid').attr('data-pid');\n var prodUUID = $(this).closest('.cart-pid').attr('data-uuid');\n util.branchCloseJourney();\n getModalHtmlElement();\n fillModalElement(pid, quantity, prodPID, prodUUID);\n e.stopPropagation();\n });\n },\n removeStoreSelection: function () {\n $('body').on('click', '#remove-store-selection', (function () {\n var productID = $(this).closest('.product-detail').attr('data-pid');\n deselectStore($(this).closest('.product-detail'));\n restoreQuantitySelection(productID); // $(document).trigger('store:afterRemoveStoreSelection', $(this).closest('.product-detail').find('.quantity-select'));\n }));\n },\n selectStoreWithInventory: function () {\n $('body').on('store:selected', function (e, data) {\n var searchPID = $('.btn-storelocator-search').attr('data-search-pid');\n var $this = $(data.currentTargetElement);\n var $results = $this.closest('.results');\n\n $this.spinner().start();\n var requestData = {};\n requestData.storeID = data.storeID;\n requestData.searchRadius = data.searchRadius;\n requestData.searchPostalCode = data.searchPostalCode;\n requestData.pid = searchPID;\n requestData.productAvailabilityMsg = data.productAvailabilityMsg;\n requestData.readyToOrder = $('.product-detail').find('.b-product_availability').data('ready-to-order');\n $.ajax({\n url: data.selectStoreURL,\n data: requestData,\n method: 'GET',\n success: function (response) {\n var $buttonElement = $this.closest('.b-store_select-button');\n var $selectStore = $buttonElement.find('.select-store');\n\n $('.b-replace-choose-store').remove();\n $('.b-store-choose-link:first').replaceWith(response);\n $results.find('.b-store-selectedresult').addClass('hide');\n $results.find('.b-storeselected-button').addClass('hide');\n $results.find('.select-store').removeClass('hide');\n onSelectStoreContent();\n $.spinner().stop();\n $selectStore.addClass('f-added-check').html('');\n setTimeout(function () {\n $results.find('.b-result-store.selected .b-store-selectedresult').removeClass('hide');\n $buttonElement.find('.b-storeselected-button').removeClass('hide');\n $selectStore.addClass('hide').html($selectStore.data('text'));\n $('#inStoreInventoryModal').find('.btn-storelocator-search').attr('data-selected-store-id', $this.data('store-id'));\n }, 3000);\n $('body').trigger('bopis:storepicker:continue', { storeId: data.storeID });\n // call ajax for updating the bopis shipment on PDP\n var bopisUrl = $('.b-store-choose-content-top.b-store-choose-content-select').data('bopisshipmenturl');\n var params = {};\n params.newStoreId = data.storeID;\n params.format = 'ajax';\n params.location = 'PDP';\n if (bopisUrl) {\n $.ajax({\n url: bopisUrl,\n method: 'GET',\n data: params,\n success: function () {\n // reporting urls hit on the server\n },\n error: function () {\n // no reporting urls hit on the server\n }\n });\n }\n },\n error: function () {\n $.spinner().stop();\n }\n });\n });\n },\n changeStore: function () {\n $('body').on('click', '.change-store', (function (e) {\n e.preventDefault();\n var pid = $(this).closest('.product-detail').attr('data-pid');\n var quantity = $(this).closest('.product-detail').find('.b-quantity-select').val();\n var storeID = $(this).attr('data-store-id');\n var prodPID = $(this).closest('.cart-pid').attr('data-pid');\n var prodUUID = $(this).closest('.cart-pid').attr('data-uuid');\n util.branchCloseJourney();\n getModalHtmlElement();\n fillModalElement(pid, quantity, prodPID, prodUUID, $(this).data('postal'), $(this).data('radius'), storeID);\n }));\n },\n searchStoreWithGeoLocation: function () {\n $(window).on('load', function () {\n var gelLocationUrl = $('[name=\"geolocation-url\"]');\n if (gelLocationUrl && gelLocationUrl.val() !== 'null' && gelLocationUrl.val() !== '' && gelLocationUrl.val() !== undefined) {\n var url;\n try {\n url = new URL($('[name=\"geolocation-url\"]').val());\n url.searchParams.set('pid', $('.l-pdp.product-detail').attr('data-pid'));\n url.searchParams.set('readyToOrder', $('.product-detail').find('.b-product_availability').data('ready-to-order'));\n url = url.href;\n } catch (e) {\n url = null;\n }\n\n if (url) {\n $.spinner().start();\n $.ajax({\n url: url,\n method: 'GET',\n success: function (response) {\n $('.b-store-choose-link:first').replaceWith(response.htmlContent);\n $('.b-replace-choose-store').remove();\n $.spinner().stop();\n },\n error: function () {\n $.spinner().stop();\n }\n });\n }\n }\n });\n },\n modalClose: function () {\n $('body').on('click', '#inStoreInventoryModal .close', function () {\n var $this = $(this);\n var $parentElement = $this.closest('#inStoreInventoryModal');\n onModalClose($parentElement);\n });\n\n $('body').on('click', '#inStoreInventoryModal', function (e) {\n if (e.target === e.currentTarget) {\n var $this = $(this);\n onModalClose($this);\n }\n });\n },\n onEscapeModalClose: function () {\n $(document).on('keydown', function (e) {\n if (e.keyCode === 27) {\n $('#inStoreInventoryModal').find('.close').trigger('click');\n }\n });\n },\n productDeliveryToggle: function () {\n $('body').on('click', '.js-ship-pick-check:not(.notselectable):not(.selected)', function (e) {\n e.preventDefault();\n\n const bothOptionVal = [];\n var pid = $(this).attr('data-pid');\n var deliveryOuter = $('body').find('.js-ship-pick-check');\n deliveryOuter.each(function () {\n var prdAvailable = $(this).attr('data-availability');\n bothOptionVal.push(prdAvailable);\n });\n\n var storeElement = $('.product-detail[data-pid=\"' + pid + '\"]');\n $(this).siblings().removeClass('selected').addClass('disabled');\n $(this).addClass('selected').removeClass('disabled');\n if ($(storeElement).length) {\n $(storeElement)\n .find('.b-store-choose-link a.change-store')\n .data('data-delivery-type', 'onlineship');\n }\n $(this).trigger('product:updateNotifyMe');\n });\n }\n};\n","var rvbEnabled = $('.product-detail').data('rvbenabled');\n\n/**\n * sets a cookie\n * @param {string} cname - name of cookie\n * @param {string} cvalue - cookie value\n * @param {string} exdays - expiration date for cookie\n * @param {string} secure - on or off\n */\nfunction setPIDCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = 'expires=' + d.toGMTString();\n\n document.cookie = `${cname} = ${cvalue}; ${expires}; secure='on'; path=/;`;\n}\n\n/**\n * gets a cookie\n * @param {string} cname - name of cookie\n * @return {undefined}\n */\nfunction getCookie(cname) {\n var name = cname + '=';\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) === ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) === 0) {\n return c.substring(name.length, c.length);\n }\n }\n return '';\n}\n/**\n * Init for cookie function\n */\nfunction init() {\n if (rvbEnabled) {\n var rvbExpireDate = $('.product-detail').data('rvbexpire');\n var pidCookie = [getCookie('pvpIDs')];\n var productId = [$('button.product').data('analytics-style')];\n var productIds = JSON.stringify(pidCookie);\n\n if (pidCookie[0] === '') {\n // if pvpIDs cookie doesn't exist, set it using the product ID\n setPIDCookie('pvpIDs', productId, rvbExpireDate);\n } else if (productIds.indexOf(productId) === -1) {\n // if cookie already exists, see if this product ID exists\n // if it does not exist, add it to the cookie\n var newValues = pidCookie.concat(productId);\n setPIDCookie('pvpIDs', newValues, rvbExpireDate);\n }\n }\n}\nmodule.exports = {\n getCookie: getCookie,\n init: init\n};\n","'use strict';\n\n\n/**\n * appends params to a url\n * @param {string} data - data returned from the server's ajax call\n * @param {Object} button - button that was clicked to add a product to the wishlist\n */\nfunction displayMessage(data, button) {\n if (button.hasClass('product-added')) {\n button.removeClass('b-product_name-fav_button').addClass('b-product_name-fav_selectButton');\n } else {\n button.removeClass('b-product_name-fav_selectButton').addClass('b-product_name-fav_button');\n }\n}\n\nmodule.exports = {\n addToWishlist: function () {\n $('body').on('click', '.add-to-wish-list', function (e) {\n e.preventDefault();\n var url = $(this).attr('href');\n var button = $(this).find('.js-whislist-icon');\n var style = $(this).attr('data-analytics-style');\n var sku = $(this).attr('data-analytics-sku');\n var color = $(this).attr('data-analytics-color');\n var pidUrl = $('.b-quantity-select').find(':selected').attr('data-url');\n var result = {};\n if (pidUrl !== null && pidUrl !== undefined) {\n pidUrl.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (str, key, value) {\n result[key] = value;\n });\n }\n var pid = $(this).attr('data-pid');\n var optionId = $(this).closest('.product-detail').find('.product-option').attr('data-option-id');\n var optionVal = $(this).closest('.product-detail').find('.options-select option:selected').attr('data-value-id');\n optionId = optionId || null;\n optionVal = optionVal || null;\n if (!url || !pid) {\n return;\n }\n\n if ($(this).find('.js-whislist-icon').hasClass('product-added')) {\n url = $(this).attr('remove-href');\n $(this).find('.js-whislist-icon').removeClass('product-added');\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n data: {\n pid: pid,\n optionId: optionId,\n optionVal: optionVal\n },\n success: function (data) {\n displayMessage(data, button);\n $('body').trigger('wishlist:removeItemSuccess', {\n style: style,\n sku: sku,\n color: color\n });\n },\n error: function (err) {\n displayMessage(err, button);\n }\n });\n } else {\n $(this).find('.js-whislist-icon').addClass('product-added');\n $.ajax({\n url: url,\n type: 'post',\n dataType: 'json',\n data: {\n pid: pid,\n optionId: optionId,\n optionVal: optionVal\n },\n success: function (data) {\n displayMessage(data, button);\n $('body').trigger('wishlist:addItemSuccess', {\n style: style,\n sku: sku,\n color: color\n });\n },\n error: function (err) {\n displayMessage(err, button);\n }\n });\n }\n });\n }\n};\n","'use strict';\n\nvar processInclude = require('base/util');\n\n$(document).ready(function () {\n processInclude(require('./utils/bvDataLayer'));\n processInclude(require('./product/wishlist'));\n processInclude(require('./product/pdpInstoreInventory'));\n processInclude(require('./product/productIdCookie'));\n processInclude(require('./klarnaOsm'));\n});\n","/* eslint-disable valid-typeof */\n/* globals google */\n\n'use strict';\n\n/**\n * appends params to a url\n * @param {string} url - Original url\n * @param {Object} params - Parameters to append\n * @returns {string} result url with appended parameters\n */\nfunction appendToUrl(url, params) {\n var newUrl = url;\n newUrl += (newUrl.indexOf('?') !== -1 ? '&' : '?') + Object.keys(params).map(function (key) {\n return key + '=' + encodeURIComponent(params[key]);\n }).join('&');\n\n return newUrl;\n}\n\n/**\n * Uses google maps api to render a map\n */\nfunction maps() {\n var map;\n var infowindow = new google.maps.InfoWindow();\n\n // Init U.S. Map in the center of the viewport\n var latlng = new google.maps.LatLng(37.09024, -95.712891);\n var mapOptions = {\n scrollwheel: false,\n zoom: 4,\n center: latlng\n };\n\n map = new google.maps.Map($('.map-canvas')[0], mapOptions);\n var mapdiv = $('.map-canvas').attr('data-locations');\n\n mapdiv = JSON.parse(mapdiv);\n\n var bounds = new google.maps.LatLngBounds();\n\n // Customized google map marker icon with svg format\n var markerImg = {\n path: 'M13.5,30.1460153 L16.8554555,25.5 L20.0024287,25.5 C23.039087,25.5 25.5,'\n + '23.0388955 25.5,20.0024287 L25.5,5.99757128 C25.5,2.96091298 23.0388955,0.5 '\n + '20.0024287,0.5 L5.99757128,0.5 C2.96091298,0.5 0.5,2.96110446 0.5,5.99757128 '\n + 'L0.5,20.0024287 C0.5,23.039087 2.96110446,25.5 5.99757128,25.5 L10.1445445,'\n + '25.5 L13.5,30.1460153 Z',\n fillColor: '#0070d2',\n fillOpacity: 1,\n scale: 1.1,\n strokeColor: 'white',\n strokeWeight: 1,\n anchor: new google.maps.Point(13, 30),\n labelOrigin: new google.maps.Point(12, 12)\n };\n\n Object.keys(mapdiv).forEach(function (key) {\n var item = mapdiv[key];\n var lable = parseInt(key, 10) + 1;\n var storeLocation = new google.maps.LatLng(item.latitude, item.longitude);\n var marker = new google.maps.Marker({\n position: storeLocation,\n map: map,\n title: item.name,\n icon: markerImg,\n label: { text: lable.toString(), color: 'white', fontSize: '16px' }\n });\n\n marker.addListener('click', function () {\n infowindow.setOptions({\n content: item.infoWindowHtml\n });\n infowindow.open(map, marker);\n });\n\n // Create a minimum bound based on a set of storeLocations\n bounds.extend(marker.position);\n });\n // Fit the all the store marks in the center of a minimum bounds when any store has been found.\n if (mapdiv && mapdiv.length !== 0) {\n map.fitBounds(bounds);\n }\n}\n\n/**\n * Renders the results of the search and updates the map\n * @param {Object} data - Response from the server\n * @param {HTMLElement} element - the target html element\n */\nfunction updateStoresResults(data, element) {\n var $resultsDiv = $(element).closest('.js-store-locator-container').find('.results');\n var $mapDiv = $('.map-canvas');\n var hasResults = data.stores.length > 0;\n\n if (!hasResults) {\n $('.store-locator-no-results').show();\n } else {\n $('.store-locator-no-results').hide();\n $('.results').addClass('b-store-resultwrapper');\n }\n\n $resultsDiv.empty()\n .data('has-results', hasResults)\n .data('radius', data.radius)\n .data('search-key', data.searchKey)\n .removeClass('adjust-height');\n\n $mapDiv.attr('data-locations', data.locations);\n\n if ($mapDiv.data('has-google-api')) {\n maps();\n } else {\n $('.store-locator-no-api-key').show();\n }\n\n if (data.storesResultsHtml) {\n $resultsDiv.append(data.storesResultsHtml);\n }\n\n module.exports.updateStoreSelection();\n\n if ($(data.storesResultsHtml).find('.b-result-store.selected').length === 0) {\n $('body').find('.b-result-store:not(.notpickup):first').trigger('click');\n if ($('#inStoreInventoryModal').find('.b-store-unavailable').length > 0) {\n $resultsDiv.addClass('adjust-height');\n }\n }\n}\n\n/**\n * Search for stores with new zip code\n * @param {HTMLElement} element - the target html element\n * @returns {boolean} false to prevent default event\n */\nfunction search(element) {\n var $searchInput = $(element).find('#store-postal-code');\n if ($('#checkout-main').length > 0) {\n $searchInput = $(element).closest('.store-locator').find('#store-postal-code');\n }\n var regex = /^\\d{1,5}$/;\n var zipCodeError = $searchInput.data('pattern-mismatch');\n var zipCodeMissing = $searchInput.data('missing-error');\n if (regex.test($searchInput.val())) {\n $searchInput.removeClass('is-invalid');\n $searchInput.closest('.js-form-group').removeClass('error-field');\n $searchInput.closest('.js-form-group').find('.invalid-feedback').html('');\n var dialog = element.closest('.in-store-inventory-dialog');\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n $('.js-find-store-form').spinner().start();\n var $form = element.closest('.store-locator');\n var radius = $form.find('select[name=radius] :selected').data('radius') || $('.results').data('radius');\n var url = $form.attr('action');\n var urlParams = { radius: radius };\n $form.find('select[name=radius]').prop('disabled', true);\n if (typeof $(element).find('.btn-storelocator-search').data('selected-store-id') !== undefined) {\n urlParams.storeID = $(element).find('.btn-storelocator-search').data('selected-store-id');\n }\n\n var payload = $form.is('form') ? $form.serialize() : { postalCode: $form.find('[name=\"postalCode\"]').val() };\n\n url = appendToUrl(url, urlParams);\n $form.find('select[name=radius]').prop('disabled', false);\n\n $.ajax({\n url: url,\n type: $form.attr('method'),\n data: payload,\n dataType: 'json',\n context: element,\n success: function (data) {\n spinner.stop();\n updateStoresResults(data, element);\n $('body').trigger('bopis:storepicker', { storeObj: data });\n }\n });\n } else if ($searchInput.val() === '') {\n $searchInput.addClass('is-invalid');\n $searchInput.closest('.js-form-group').addClass('error-field');\n $searchInput.closest('.js-form-group').find('.invalid-feedback').html(zipCodeMissing);\n } else {\n $searchInput.addClass('is-invalid');\n $searchInput.closest('.js-form-group').addClass('error-field');\n $searchInput.closest('.js-form-group').find('.invalid-feedback').html(zipCodeError);\n }\n return false;\n}\n\nmodule.exports = {\n init: function () {\n if ($('.map-canvas').data('has-google-api')) {\n maps();\n } else {\n $('.store-locator-no-api-key').show();\n }\n\n if (!$('.results').data('has-results')) {\n $('.store-locator-no-results').show();\n }\n },\n\n detectLocation: function () {\n // clicking on detect location.\n $('.detect-location').on('click', function (e) {\n e.preventDefault();\n var $detectLocationButton = $(this);\n var dialog = $detectLocationButton.closest('.in-store-inventory-dialog');\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n $('.js-find-store-form').spinner().start();\n var url = $detectLocationButton.data('action');\n var radius = $('.results').data('radius');\n var urlParams = {\n radius: radius,\n detectLocation: true\n };\n if (typeof $detectLocationButton.closest('.store-locator').find('.btn-storelocator-search').data('selected-store-id') !== undefined) {\n urlParams.storeID = $detectLocationButton.closest('.store-locator').find('.btn-storelocator-search').data('selected-store-id');\n }\n url = appendToUrl(url, urlParams);\n\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n success: function (data) {\n spinner.stop();\n updateStoresResults(data, $detectLocationButton);\n $detectLocationButton.closest('.store-locator').find('[name=postalCode]').val(data.geolocationPostalCode);\n $('body').trigger('bopis:storepicker', { storeObj: data });\n }\n });\n });\n },\n\n search: function () {\n $('.store-locator-container form.store-locator').submit(function (e) {\n e.preventDefault();\n search($(this));\n // updateSelectStoreButton();\n });\n $('.store-locator-container .btn-storelocator-search[type=\"button\"]').click(function (e) {\n e.preventDefault();\n search($(this));\n });\n },\n\n changeRadius: function () {\n $('.store-locator-container .radius').change(function () {\n var element = $(this);\n var radius = $(this).find(':selected').data('radius');\n var $searchInput = element.closest('.store-locator').find('[name=postalCode]');\n var zipCodeMissing = $searchInput.data('missing-error');\n var url = $(this).data('action-url');\n var urlParams = {};\n if ($searchInput.val() === '') {\n $searchInput.addClass('is-invalid');\n $searchInput.closest('.js-form-group').addClass('error-field');\n $searchInput.closest('.js-form-group').find('.invalid-feedback').html(zipCodeMissing);\n } else {\n var dialog = $(this).closest('.in-store-inventory-dialog');\n var spinner = dialog.length ? dialog.spinner() : $.spinner();\n spinner.start();\n urlParams = {\n radius: radius,\n postalCode: $searchInput.val()\n };\n if (typeof $(element).closest('.store-locator').find('.btn-storelocator-search').data('selected-store-id') !== undefined) {\n urlParams.storeID = $(element).closest('.store-locator').find('.btn-storelocator-search').data('selected-store-id');\n }\n url = appendToUrl(url, urlParams);\n\n $.ajax({\n url: url,\n type: 'get',\n dataType: 'json',\n context: element,\n success: function (data) {\n updateStoresResults(data, element);\n spinner.stop();\n }\n });\n }\n });\n },\n selectStore: function () {\n $('.store-locator-container').on('click', '.select-store', (function (e) {\n e.preventDefault();\n var $this = $(this);\n $this.spinner().start();\n var selectedStore = $('.b-stores-results').find('.b-result-store.selected');\n var selectedStoreCheckout = $('.b-result-store.selected').find('.b-storedetail-mobilewrap');\n var data = {\n storeID: selectedStore.attr('id'),\n searchRadius: $('#radius').val(),\n searchPostalCode: $('.results').data('search-key').postalCode,\n selectStoreURL: $this.data('href'),\n storeDetailsCheckoutHtml: selectedStoreCheckout.html(),\n productAvailabilityMsg: $('.b-result-store.selected').find('.b-store-delivery-details span').html(),\n currentTargetElement: $this,\n event: e\n };\n if ($('.b-cart-content.cart').length > 0) {\n var $results = $this.closest('.results');\n var $buttonElement = $this.closest('.b-store_select-button');\n $('body').trigger('bopis:storepicker:continue', { storeId: selectedStore.attr('id') });\n $results.find('.b-store-selectedresult').addClass('hide');\n $results.find('.b-storeselected-button').addClass('hide');\n $results.find('.select-store').removeClass('hide');\n setTimeout(function () {\n $.spinner().stop();\n $this.addClass('f-added-check').html('');\n }, 1000);\n setTimeout(function () {\n selectedStore.find('.b-store-selectedresult').removeClass('hide');\n $buttonElement.find('.b-storeselected-button').removeClass('hide');\n $this.addClass('hide').html($this.data('text'));\n $('#inStoreInventoryModal').find('.btn-storelocator-search').attr('data-selected-store-id', $this.data('store-id'));\n }, 3000);\n } else {\n $.spinner().stop();\n $('body').trigger('store:selected', data);\n }\n }));\n },\n updateSelectStoreButton: function () {\n $('body').on('change', '.select-store-input', (function () {\n $('.select-store').prop('disabled', false);\n }));\n },\n updateStoreSelection: function () {\n $('body').on('click', '.b-result-store', function () {\n if (!$(this).hasClass('selected')) {\n $('.current-store-with-inventory').find('.store-long-desc').html($(this).find('.store-long-desc').children().clone());\n $('.b-result-store').removeClass('selected');\n $('.b-result-store').find('input[type=\"radio\"]').prop('checked', false);\n $(this).addClass('selected');\n $(this).find('input[type=\"radio\"]').prop('checked', true);\n $('.b-store_select-button').find('.b-storeselected-button').addClass('hide');\n $('.b-store_select-button').find('.select-store').removeClass('hide');\n if ($(this).find('.b-store-selectedresult').is(':visible')) {\n $('.b-store_select-button').find('.b-storeselected-button').removeClass('hide');\n $('.b-store_select-button').find('.select-store').addClass('hide');\n }\n }\n });\n }\n};\n","'use strict';\n\n/* eslint-disable */\nvar inScroll = false;\n\nvar util = {\n /**\n * @function\n * @description Scrolls a browser window to a given x point or DOM object\n * @param {String} x coordinate or {Object} to which to scroll\n * @param {Number} duration of animation in milliseconds\n * @param {Function} callback after animation is complete\n */\n scrollTo: function (topOffsetOrElement, duration, cb) {\n var $scrollElement,\n scrollToElement = typeof topOffsetOrElement === 'object',\n duration = duration || 10,\n topOffset;\n\n if (inScroll) {\n return;\n }\n\n inScroll = true;\n\n if (scrollToElement) {\n topOffset = topOffsetOrElement.offset().top;\n } else {\n topOffset = topOffsetOrElement;\n }\n\n $scrollElement = $('html, body');\n\n $scrollElement.animate({\n scrollTop: topOffset\n }, duration, () => {\n if (typeof cb === 'function') {\n cb();\n }\n\n inScroll = false;\n }\n );\n },\n /**\n * @function\n * @description appends the parameter with the given name and value to the given url and returns the changed url\n * @param {String} url the url to which the parameter will be added\n * @param {String} name the name of the parameter\n * @param {String} value the value of the parameter\n */\n appendParamToURL: function (url, name, value) {\n // quit if the param already exists\n if (url.indexOf(name + '=') !== -1) {\n return url;\n }\n var separator = url.indexOf('?') !== -1 ? '&' : '?';\n return url + separator + name + '=' + encodeURIComponent(value);\n },\n\n /**\n * @function\n * @description remove the parameter and its value from the given url and returns the changed url\n * @param {String} url the url from which the parameter will be removed\n * @param {String} name the name of parameter that will be removed from url\n */\n removeParamFromURL: function (url, name) {\n if (url.indexOf('?') === -1 || url.indexOf(name + '=') === -1) {\n return url;\n }\n var hash;\n var params;\n var domain = url.split('?')[0];\n var paramUrl = url.split('?')[1];\n var newParams = [];\n // if there is a hash at the end, store the hash\n if (paramUrl.indexOf('#') > -1) {\n hash = paramUrl.split('#')[1] || '';\n paramUrl = paramUrl.split('#')[0];\n }\n params = paramUrl.split('&');\n for (var i = 0; i < params.length; i++) {\n // put back param to newParams array if it is not the one to be removed\n if (params[i].split('=')[0] !== name) {\n newParams.push(params[i]);\n }\n }\n return domain + '?' + newParams.join('&') + (hash ? '#' + hash : '');\n },\n\n /**\n * @function\n * @description appends the parameters to the given url and returns the changed url\n * @param {String} url the url to which the parameters will be added\n * @param {Object} params\n */\n appendParamsToUrl: function (url, params) {\n var _url = url;\n for (var key in params) {\n _url = this.appendParamToURL(_url, key, params[key]);\n }\n return _url;\n },\n /**\n * @function\n * @description extract the query string from URL\n * @param {String} url the url to extra query string from\n **/\n getQueryString: function (url) {\n var qs;\n if (typeof url !== 'string') { return; }\n var a = document.createElement('a');\n a.href = url;\n if (a.search) {\n qs = a.search.substr(1); // remove the leading ?\n }\n return qs;\n },\n\n /**\n * @function\n * @description\n * @param {String}\n * @param {String}\n */\n elementInViewport: function (el, offsetToTop) {\n var top = el.offsetTop,\n left = el.offsetLeft,\n width = el.offsetWidth,\n height = el.offsetHeight;\n\n while (el.offsetParent) {\n el = el.offsetParent;\n top += el.offsetTop;\n left += el.offsetLeft;\n }\n\n if (typeof (offsetToTop) !== 'undefined') {\n top -= offsetToTop;\n }\n\n if (window.pageXOffset !== null) {\n return (\n top < (window.pageYOffset + window.innerHeight) &&\n left < (window.pageXOffset + window.innerWidth) &&\n (top + height) > window.pageYOffset &&\n (left + width) > window.pageXOffset\n );\n }\n\n if (document.compatMode === 'CSS1Compat') {\n return (\n top < (window.document.documentElement.scrollTop + window.document.documentElement.clientHeight) &&\n left < (window.document.documentElement.scrollLeft + window.document.documentElement.clientWidth) &&\n (top + height) > window.document.documentElement.scrollTop &&\n (left + width) > window.document.documentElement.scrollLeft\n );\n }\n },\n\n /**\n * @function\n * @description Appends the parameter 'format=ajax' to a given path\n * @param {String} path the relative path\n */\n ajaxUrl: function (path) {\n return this.appendParamToURL(path, 'format', 'ajax');\n },\n\n /**\n * @function\n * @description Extracts all parameters from a given query string into an object\n * @param {String} qs The query string from which the parameters will be extracted\n */\n getQueryStringParams: function (qs) {\n if (!qs || qs.length === 0) { return {}; }\n var params = {};\n // Use the String::replace method to iterate over each\n // name-value pair in the string.\n qs.replace(new RegExp('([^?=&]+)(=([^&]*))?', 'g'),\n function ($0, $1, $2, $3) {\n params[$1] = decodeURIComponent($3).replace(/\\+/g, ' ');\n }\n );\n return params;\n },\n\n getParameterValueFromUrl: function (parameterName, url) {\n var currentQueryString = url || window.location.search;\n var currentQueryStringParams = this.getQueryStringParams(currentQueryString);\n\n return currentQueryStringParams[parameterName];\n },\n\n /**\n * @description funtion that check storage Availability on window object\n * @param {String} storage type(name)\n * @return {Boolean}\n */\n storageAvailable: function(type) {\n var storage = [];\n try {\n storage = window[type];\n var test = '__storage_test__';\n storage.setItem(test, test);\n storage.removeItem(test);\n return true;\n } catch (e) {\n //ignore storage error\n }\n },\n\n eventDelay: function (callback, threshhold, scope, skipInitialCall) {\n threshhold || (threshhold = 250);\n var last,\n deferTimer;\n\n /**\n * @todo Add description\n */\n return function () {\n var context = scope || this,\n now = (new Date()).getTime(),\n args = arguments;\n\n if (last && now < last + threshhold) {\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n callback.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n\n if (!skipInitialCall) {\n callback.apply(context, args);\n }\n }\n };\n },\n\n /**\n * Throttling Function Calls\n *\n * @see http://www.nczonline.net/blog/2007/11/30/the-throttle-function/\n * @param {Function} callback Callback function to call\n * @param {Number} delay Delay before callback fire\n * @param {Object} scope The context to for callback fire\n */\n throttle: function (callback, delay, scope) {\n clearTimeout(callback._tId);\n callback._tId = setTimeout(function () {\n callback.call(scope);\n }, delay || 100);\n },\n\n getTimer: function () {\n return {\n id: null,\n clear: function () {\n if (this.id) {\n window.clearTimeout(this.id);\n delete this.id;\n }\n },\n start: function (duration, callback) {\n this.id = setTimeout(callback, duration);\n }\n };\n },\n\n getInterval: function () {\n return {\n id: null,\n clear: function () {\n if (this.id) {\n window.clearInterval(this.id);\n delete this.id;\n }\n },\n start: function (duration, callback) {\n this.id = setInterval(callback, duration);\n }\n };\n },\n\n /**\n * [getUri description]\n * @param {[type]} o [description]\n * @return {[type]} [description]\n */\n getUri: function (o) {\n var a;\n\n if (o.tagName && $(o).attr('href')) {\n a = o;\n } else if (typeof o === 'string') {\n a = document.createElement(\"a\");\n a.href = o;\n } else {\n return null;\n }\n\n // overcome some stupid ie behaviour\n if (a.host === '') {\n a.href = a.href;\n }\n\n // all actual version of IE not so smart to correctly process\n // protocol independent locations, so wee need to help them\n if (a.protocol === ':') {\n a.protocol = window.location.protocol;\n }\n\n // fix for some IE browsers\n if (a.pathname.indexOf('/') !== 0) {\n a.pathname = '/' + a.pathname;\n }\n\n return Object.create({\n 'protocol': a.protocol, //http:\n 'host': a.host, //www.myexample.com\n 'hostname': a.hostname, //www.myexample.com'\n 'port': a.port, //:80\n 'path': a.pathname, // /sub1/sub2\n 'query': a.search, // ?param1=val1¶m2=val2\n 'queryParams': a.search.length > 1 ? this.getQueryStringParams(a.search.substr(1)) : {},\n 'hash': a.hash, // #OU812,5150\n 'url': a.protocol + '//' + a.host + a.pathname,\n 'toString': function () {\n return this.protocol + '//' + this.host + this.port + this.pathname + this.search + this.hash;\n }\n });\n },\n\n /**\n * Genereal wrapper for JSON.parse(...) with error catching\n * @result {Object}\n */\n jsonParse : function (stringified) {\n var parsed = {};\n\n if (!stringified) {\n return parsed;\n }\n\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n return parsed;\n }\n\n return parsed;\n },\n\n /**\n * @description Tests if localStorage is available, useful in Safari where localStorage can't be used when browsing privately.\n * @returns {boolean}\n */\n canAccessSessionStorage : function () {\n var item = 'test';\n try {\n sessionStorage.setItem(item, item);\n sessionStorage.removeItem(item);\n return true;\n } catch (e) {\n return false;\n }\n },\n isObject: function (value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n },\n\n debounce: function (func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError('Expected a function');\n }\n\n wait = Number(wait) || 0;\n\n if (this.isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? Math.max(Number(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc (time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = Date.now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(Date.now());\n }\n\n function debounced() {\n var time = Date.now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n },\n\n /**\n * loadScript: appends a script tag to document and returns a promise that resolves when loaded.\n *\n * It's kind of like $.getScript, but promisified, de-duped, and resolves relative urls\n *\n * @param {*} src - the src of the script\n * @returns - Promise\n */\n loadScript: src => {\n if (loadedScripts.has(src)) return loadedScripts.get(src);\n const p = new Promise(onload => {\n if (src[0] !== 'h') src = window.assetPath + src // if relative url, make abs\n let script = document.createElement(\"script\");\n Object.assign(script, {src, async: 1, onload});\n document.body.appendChild(script);\n })\n loadedScripts.set(src, p);\n return p;\n },\n\n branchCloseJourney: function () {\n var branch = require('branch-sdk');\n branch.closeJourney();\n var el = document.getElementById('branch-banner-iframe');\n var elbody = document.getElementById('l-body');\n var elbodypage = document.getElementById('bodyPage');\n if (el) {\n elbody.classList.remove('branch-banner-is-active');\n el.style.display = 'none';\n elbody.style.margin = '0';\n elbodypage.style.margin = '0';\n }\n },\n\n /**\n * Scale size to fit Canvas pixel limitation for Safari mobile\n * @param {number} width canvas required width\n * @param {number} height canvas required height\n * @returns {Object} scaled size\n */\n limitMobileCanvasSize: function (width, height) {\n var maximumPixels = 16777216; // Safari Canvas area maximum limit\n const requiredPixels = width * height;\n if (requiredPixels <= maximumPixels) {\n return {\n width: width,\n height: height,\n scalar: 1\n };\n }\n const scalar = Math.sqrt(maximumPixels) / Math.sqrt(requiredPixels);\n return {\n width: Math.floor(width * scalar),\n height: Math.floor(height * scalar),\n scalar: scalar\n };\n }\n};\nconst loadedScripts = new Map() // Map\n\nmodule.exports = util;\n","'use strict';\n\n/**\n* @description Bazaar Voice Events for Data layer\n*/\nmodule.exports = {\n bvReviewEvents: function () {\n $(document).on('click', '.bv-write-review', function () {\n $('body').trigger('write:review');\n });\n\n $(document).on('click', '.bv-submission-button-submit', function () {\n if ($('#bv-casltext-question').length) {\n $('body').trigger('submit:question');\n } else {\n $('body').trigger('submit:review');\n }\n });\n\n $(document).on('click', '.bv-ask-question-label, .bv-ask-question', function () {\n $('body').trigger('start:question');\n });\n }\n};\n","'use strict';\n\nmodule.exports = function (include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach(function (key) {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n};\n","(function() {/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\nvar aa=\"function\"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};function ba(a){a=[\"object\"==typeof globalThis&&globalThis,a,\"object\"==typeof window&&window,\"object\"==typeof self&&self,\"object\"==typeof global&&global];for(var b=0;bc&&(c=Math.max(c+e,0));c=(b||11))return!0}catch(c){}return!1}\nfunction F(){var a=navigator.userAgent;return a.match(/android/i)?\"android\":a.match(/ipad/i)||a&&Na(a)&&a&&-1screen.width?\"ipad\":a.match(/i(os|p(hone|od))/i)?\"ios\":a.match(/\\(BB[1-9][0-9]*;/i)?\"blackberry\":a.match(/Windows Phone/i)?\"windows_phone\":a.match(/Kindle/i)||a.match(/Silk/i)||a.match(/KFTT/i)||a.match(/KFOT/i)||a.match(/KFJWA/i)||a.match(/KFJWI/i)||a.match(/KFSOWI/i)||a.match(/KFTHWA/i)||a.match(/KFTHWI/i)||a.match(/KFAPWA/i)||a.match(/KFAPWI/i)?\n\"kindle\":a.match(/(Windows|Macintosh|Linux)/i)?\"desktop\":\"other\"}function Pa(){var a=navigator.userAgent;return Na(a)?Oa(a,11):!1}function Qa(){var a=navigator.userAgent;return!!window.webkitURL&&a&&a&&/(iPad|iPod|iPhone)/.test(a)&&!/(chrome|crios)/i.test(a)&&!/(fxios|firefox)/i.test(a)&&!/edg/i.test(a)&&!/(opt|opr)/i.test(a)&&!/yabrowser/i.test(a)}\nfunction Ra(a){try{var b=(B()&&Ma()?window.top.location.search:window.location.search).substring(1).match(new RegExp(a+\"=([^&]*)\"));if(b&&1<=b.length)return b[1]}catch(c){}}function Sa(a){return a.replace(/(\\-\\w)/g,function(b){return b[1].toUpperCase()})}\nfunction Da(a){var b=\"\",c,d=0;a=a.replace(/\\r\\n/g,\"\\n\");var e=\"\";for(c=0;cf?e+=String.fromCharCode(f):(127f?e+=String.fromCharCode(f>>6|192):(e+=String.fromCharCode(f>>12|224),e+=String.fromCharCode(f>>6&63|128)),e+=String.fromCharCode(f&63|128))}for(a=e;d>2;m=(m&3)<<4|e>>4;var k=(e&15)<<2|c>>6;var g=c&63;isNaN(e)?g=k=64:isNaN(c)&&(g=64);b=b+\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".charAt(f)+\n\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".charAt(m)+\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".charAt(k)+\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".charAt(g)}return b}function Ta(a){return Ua(a)?atob(a):a}function Ua(a){if(\"string\"!==typeof a||\"\"===a||\"\"===a.trim())return!1;try{return btoa(atob(a))===a}catch(b){return!1}}\nfunction Va(a){a&&a.browser_fingerprint_id&&!Ua(a.browser_fingerprint_id)&&(a.browser_fingerprint_id=btoa(a.browser_fingerprint_id));a&&a.alternative_browser_fingerprint_id&&!Ua(a.alternative_browser_fingerprint_id)&&(a.alternative_browser_fingerprint_id=btoa(a.alternative_browser_fingerprint_id));return a}\nfunction Wa(a){a&&Ua(a.browser_fingerprint_id)&&(a.browser_fingerprint_id=atob(a.browser_fingerprint_id));a&&Ua(a.alternative_browser_fingerprint_id)&&(a.alternative_browser_fingerprint_id=atob(a.alternative_browser_fingerprint_id));return a}function Xa(a,b,c){\"function\"===typeof a.addEventListener?a.addEventListener(b,c,void 0):\"function\"===typeof a.attachEvent?a.attachEvent(\"on\"+b,c):a[\"on\"+b]=c}\nfunction Ya(a){if(!a)return null;-1/g,\">\")}function G(a,b,c){if(null!==c&&void 0!==c){if(\"object\"===typeof c&&0===Object.keys(c||{}).length)return a;a[b]=c}return a}\nfunction gb(){var a={};var b={};b=G(b,\"$og_title\",C(\"title\"));b=G(b,\"$og_description\",C(\"description\"));b=G(b,\"$og_image_url\",C(\"image\"));b=G(b,\"$og_video\",C(\"video\"));b=(b=G(b,\"$og_type\",C(\"type\")))&&0=b?a():setTimeout(a,b)}\nfunction qb(){navigator.userAgentData?navigator.userAgentData.getHighEntropyValues([\"model\",\"platformVersion\"]).then(function(a){var b=a.model;if(a=a.platformVersion){var c=/^([1-9]\\d*)\\.(0\\d*)(\\.[0]\\d*){1,}$/;-1!==a.indexOf(\".\")&&(a=a.replace(c,a.substring(0,a.indexOf(\".\"))))}y={model:b,platformVersion:a}}):y=null}function mb(a,b,c){\"string\"===typeof c&&c&&(a[b]=c);return a}\nfunction rb(a,b={},c){const d=[\"/v2/event/standard\",\"/v2/event/custom\"],e={};e.dma_eea=b.eeaRegion;e.dma_ad_personalization=b.adPersonalizationConsent;e.dma_ad_user_data=b.adUserDataUsageConsent;if([\"/v1/open\",\"/v1/pageview\"].includes(c))Object.assign(a,e);else if(d.includes(c))try{let f;a.user_data?f=JSON.parse(a.user_data):f={};Object.assign(f,e);a.user_data=JSON.stringify(f)}catch(f){console.error(`setDMAParams:: ${a.user_data} is not a valid JSON string`)}};var sb={};\nfunction K(a,b){return function(c,d,e){if(z)return!1;if(\"number\"===typeof e||e)if(0===b){if(\"object\"!==typeof e)return A(\"API request $1, parameter $2 is not $3\",[c,d,\"an object\"])}else if(3===b){if(!(e instanceof Array))return A(\"API request $1, parameter $2 is not $3\",[c,d,\"an array\"])}else if(2===b){if(\"number\"!==typeof e)return A(\"API request $1, parameter $2 is not $3\",[c,d,\"a number\"])}else if(4===b){if(\"boolean\"!==typeof e)return A(\"API request $1, parameter $2 is not $3\",[c,d,\"a boolean\"])}else{if(\"string\"!==typeof e)return A(\"API request $1, parameter $2 is not $3\",\n[c,d,\"a string\"]);if(1!==b&&!b.test(e))return A(\"API request $1, parameter $2 is not $3\",[c,d,\"in the proper format\"])}else if(a)return A(\"API request $1 missing parameter $2\",[c,d]);return!1}}function tb(a){return D(a,{browser_fingerprint_id:K(!0,1),identity_id:K(!0,1),sdk:K(!0,1),session_id:K(!0,1)})}\nvar ub={destination:r,endpoint:\"/v1/open\",method:\"POST\",h:{browser_fingerprint_id:K(!1,1),alternative_browser_fingerprint_id:K(!1,1),identity_id:K(!1,1),identity:K(!1,1),link_identifier:K(!1,1),sdk:K(!1,1),options:K(!1,0),initial_referrer:K(!1,1),tracking_disabled:K(!1,4),current_url:K(!1,1),screen_height:K(!1,2),screen_width:K(!1,2),model:K(!1,1),os_version:K(!1,1)}},vb={destination:\"https://app.link\",endpoint:\"/_r\",method:\"GET\",S:!0,h:{sdk:K(!0,1),_t:K(!1,1),branch_key:K(!0,1)}},wb={destination:r,\nendpoint:\"/v1/url\",method:\"POST\",ta:\"obj\",h:tb({alias:K(!1,1),campaign:K(!1,1),channel:K(!1,1),data:K(!1,1),feature:K(!1,1),identity_id:K(!0,1),stage:K(!1,1),tags:K(!1,3),type:K(!1,2),source:K(!1,1),instrumentation:K(!1,1)})},xb={destination:r,endpoint:\"/v1/qr-code\",method:\"POST\",ta:\"obj\",h:tb({alias:K(!1,1),campaign:K(!1,1),channel:K(!1,1),data:K(!1,1),qr_code_settings:K(!1,1),feature:K(!1,1),identity_id:K(!0,1),stage:K(!1,1),tags:K(!1,3),type:K(!1,2),source:K(!1,1)})},yb={destination:r,endpoint:\"/v1/deepview\",\nS:!0,method:\"POST\",h:tb({campaign:K(!1,1),_t:K(!1,1),channel:K(!1,1),data:K(!0,1),feature:K(!1,1),link_click_id:K(!1,1),open_app:K(!1,4),append_deeplink_path:K(!1,4),stage:K(!1,1),tags:K(!1,3),deepview_type:K(!0,1),source:K(!0,1)})},zb={destination:r,endpoint:\"/v2/event/standard\",method:\"POST\",h:{name:K(!0,1),user_data:K(!0,1),custom_data:K(!1,1),event_data:K(!1,1),content_items:K(!1,1),customer_event_alias:K(!1,1)}},Ab={destination:r,endpoint:\"/v2/event/custom\",method:\"POST\",h:{name:K(!0,1),user_data:K(!0,\n1),custom_data:K(!1,1),event_data:K(!1,1),content_items:K(!1,1),customer_event_alias:K(!1,1)}},Bb={destination:r,endpoint:\"/v1/pageview\",method:\"POST\",h:tb({event:K(!0,1),metadata:K(!1,0),initial_referrer:K(!1,1),tracking_disabled:K(!1,4),branch_view_id:K(!1,1),no_journeys:K(!1,4),user_language:K(!1,1),open_app:K(!1,4),has_app_websdk:K(!1,4),source:K(!1,1),feature:K(!1,1),is_iframe:K(!1,4),data:K(!1,0),callback_string:K(!1,1),journey_displayed:K(!1,4),audience_rule_id:K(!1,1),journey_dismissals:K(!1,\n0),identity_id:K(!1,1),identity:K(!0,1),session_referring_link_data:K(!1,1),session_link_click_id:K(!1,1)})},Cb={destination:r,endpoint:\"/v1/dismiss\",method:\"POST\",h:tb({event:K(!0,1),metadata:K(!1,0),initial_referrer:K(!1,1),tracking_disabled:K(!1,4),branch_view_id:K(!1,1),no_journeys:K(!1,4),user_language:K(!1,1),open_app:K(!1,4),has_app_websdk:K(!1,4),source:K(!1,1),feature:K(!1,1),is_iframe:K(!1,4),data:K(!1,0),callback_string:K(!1,1),journey_displayed:K(!1,4),audience_rule_id:K(!1,1),journey_dismissals:K(!1,\n0),dismissal_source:K(!1,1)})},Db={destination:r,endpoint:\"/v1/cpid\",method:\"POST\",h:{user_data:K(!0,1)}},Eb={destination:r,endpoint:\"/v1/cpid/latd\",method:\"POST\",h:{user_data:K(!0,1)}};function Fb(){for(var a=[\"session\",\"cookie\",\"pojo\"],b=0;ba.length?\"function\"===typeof b&&b():(a[0].appendChild(d),\"function\"===typeof b&&Xa(d,\"error\",b),\"function\"===typeof c&&Xa(d,\"load\",c))};\nfunction Ob(a,b,c,d,e){var f=Date.now(),m=ua;0===a.l&&Pa()&&a.l++;var k=\"branch_callback__\"+a.l++,g=0<=b.indexOf(\"branch.io\")?\"&data=\":\"&post_data=\";c=\"POST\"===d?encodeURIComponent(Da(h(c))):\"\";var u=window.setTimeout(function(){window[k]=function(){};G(x,m,wa(f));e(Error(\"Request timed out\"),null,504)},qa);window[k]=function(l){window.clearTimeout(u);e(null,l)};a.createScript(b+(0>b.indexOf(\"?\")?\"?\":\"\")+(c?g+c:\"\")+(0<=b.indexOf(\"/c/\")?\"&click=1\":\"\")+\"&callback=\"+k,function(){e(Error(\"Request blocked by client, probably adblock\"),\nnull)},function(){G(x,m,wa(f));try{\"function\"===typeof this.remove?this.remove():this.parentNode.removeChild(this)}catch(l){}delete window[k]})}\nfunction Pb(a,b,c,d,e,f,m,k){var g=Date.now(),u=ua,l=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject(\"Microsoft.XMLHTTP\");k&&(l.responseType=k);l.ontimeout=function(){G(x,u,wa(g));f(Error(\"Request timed out\"),null,504)};l.onerror=function(p){f(Error(p.error||\"Error in API: \"+l.status),null,l.status)};l.onreadystatechange=function(){if(4===l.readyState)if(G(x,u,wa(g)),200===l.status){if(\"arraybuffer\"===l.responseType)var p=l.response;else if(m)p=l.responseText;else try{p=v(l.responseText)}catch(t){p=\n{}}f(null,p,l.status)}else if(\"4\"===l.status.toString().substring(0,1)||\"5\"===l.status.toString().substring(0,1))l.responseURL&&l.responseURL.includes(\"v2/event\")?f(l.responseText,null,l.status):f(Error(\"Error in API: \"+l.status),null,l.status)};try{l.open(d,b,!0),l.timeout=qa,l.setRequestHeader(\"Content-Type\",\"application/x-www-form-urlencoded\"),l.send(c)}catch(p){e.set(\"use_jsonp\",!0),Ob(a,b,c,d,f)}}\nfunction Qb(a,b,c,d,e){function f(){d.get(\"use_jsonp\")||b.S?Ob(a,l,c,b.method,m):Pb(a,l,u,b.method,d,m,Y,n)}function m(q,H,E){\"function\"===typeof a.ga&&a.ga(l,b.method,p,q,E,H);q&&0=new Date(a):!a;var c=b.R;\"number\"===typeof c&&(c=!1);return!document.getElementById(\"branch-banner\")&&!document.getElementById(\"branch-banner-iframe\")&&(a||c)&&(b.V&&\"android\"===F()||b.va&&\"ipad\"===F()||b.Z&&\"ios\"===F()||b.W&&\"blackberry\"===F()||b.Y&&\"windows_phone\"===F()||b.X&&\"kindle\"===F())};function Xb(a,b){var c=\".branch-banner-is-active { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\\n#branch-banner { width:100%; z-index: 99999; font-family: Helvetica Neue, Sans-serif; -webkit-font-smoothing: antialiased; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\\n#branch-banner .button{ border: 1px solid \"+(a.buttonBorderColor||(\"dark\"===a.theme?\"transparent\":\"#ccc\"))+\"; background: \"+\n(a.buttonBackgroundColor||\"#fff\")+\"; color: \"+(a.buttonFontColor||\"#000\")+\"; cursor: pointer; margin-top: 0px; font-size: 14px; display: inline-block; margin-left: 5px; font-weight: 400; text-decoration: none; border-radius: 4px; padding: 6px 12px; transition: all .2s ease;}\\n#branch-banner .button:hover { border: 1px solid \"+(a.buttonBorderColorHover||(\"dark\"===a.theme?\"transparent\":\"#BABABA\"))+\"; background: \"+(a.buttonBackgroundColorHover||\"#E0E0E0\")+\"; color: \"+(a.buttonFontColorHover||\"#000\")+\n\";}\\n#branch-banner .button:focus { outline: none; }\\n#branch-banner * { margin-right: 4px; position: relative; line-height: 1.2em; }\\n#branch-banner-close { font-weight: 400; cursor: pointer; float: left; z-index: 2;padding: 0 5px 0 5px; margin-right: 0; }\\n#branch-banner .content { width:100%; overflow: hidden; height: 76px; background: rgba(255, 255, 255, 0.95); color: #333; \"+(\"top\"===a.position?\"border-bottom\":\"border-top\")+': 1px solid #ddd; }\\n#branch-banner-close { color: #000; font-size: 24px; top: 14px; opacity: .5; transition: opacity .3s ease; }\\n#branch-banner-close:hover { opacity: 1; }\\n#branch-banner .title { font-size: 18px; font-weight:bold; color: #555; }\\n#branch-banner .description { font-size: 12px; font-weight: normal; color: #777; max-height: 30px; overflow: hidden; }\\n#branch-banner .icon { float: left; padding-bottom: 40px; margin-right: 10px; margin-left: 5px; }\\n#branch-banner .icon img { width: 63px; height: 63px; margin-right: 0; }\\n#branch-banner .reviews { font-size:13px; margin: 1px 0 3px 0; color: #777; }\\n#branch-banner .reviews .star { display:inline-block; position: relative; margin-right:0; }\\n#branch-banner .reviews .star span { display: inline-block; margin-right: 0; color: #555; position: absolute; top: 0; left: 0; }\\n#branch-banner .reviews .review-count { font-size:10px; }\\n#branch-banner .reviews .star .half { width: 50%; overflow: hidden; display: block; }\\n#branch-banner .content .left { padding: 6px 5px 6px 5px; }\\n#branch-banner .vertically-align-middle { top: 50%; transform: translateY(-50%); -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); }\\n#branch-banner .details > * { display: block; }\\n#branch-banner .content .left { height: 63px; }\\n#branch-banner .content .right { float: right; height: 63px; margin-bottom: 50px; padding-top: 22px; z-index: 1; }\\n#branch-banner .right > div { float: left; }\\n#branch-banner-action { top: 17px; }\\n#branch-banner .content:after { content: \"\"; position: absolute; left: 0; right: 0; top: 100%; height: 1px; background: rgba(0, 0, 0, 0.2); }\\n#branch-banner .theme-dark.content { background: rgba(51, 51, 51, 0.95); }\\n#branch-banner .theme-dark #branch-banner-close{ color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }\\n#branch-banner .theme-dark .details { text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }\\n#branch-banner .theme-dark .title { color: #fff; }\\n#branch-banner .theme-dark .description { color: #fff; }\\n#branch-banner .theme-dark .reviews { color: #888; }\\n#branch-banner .theme-dark .reviews .star span{ color: #fff; }\\n#branch-banner .theme-dark .reviews .review-count{ color: #fff; }\\n',\nd=F();\"ios\"!==d&&\"ipad\"!==d||!a.Z?\"android\"===d&&a.V?c+=\"#branch-banner { position: absolute; }\\n#branch-banner .content .left .details .title { font-size: 12px; }\\n#branch-mobile-action { white-space: nowrap; }\\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\\n#branch-banner #branch-banner-close,#branch-banner .theme-dark #branch-banner-close { height:17px; width: 17px; text-align: center; font-size: 15px; top: 24px; border-radius:14px; border:0; line-height:14px; color:#b1b1b3; background:#efefef; padding: 0; opacity: 1; }\\n#branch-banner .button { top: 0; text-decoration:none; border-bottom: 3px solid #A4C639; padding: 0 10px; height: 24px; line-height: 24px; text-align: center; color: #fff; margin-top: 2px; font-weight: bold; background-color: #A4C639; border-radius: 5px; }\\n#branch-banner .button:hover { border-bottom:3px solid #8c9c29; background-color: #c1d739; }\\n\":\n\"blackberry\"===d&&a.W?c+=\"#branch-banner { position: absolute; }\\n#branch-banner .content .left .details .title { font-size: 12px; }\\n#branch-mobile-action { white-space: nowrap; }\\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\\n\":\n\"windows_phone\"===d&&a.Y?c+=\"#branch-banner { position: absolute; }\\n#branch-banner .content .left .details .title { font-size: 12px; }\\n#branch-mobile-action { white-space: nowrap; }\\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\\n\":\n\"kindle\"===d&&a.X&&(c+=\"#branch-banner { position: absolute; }\\n#branch-banner .content .left .details .title { font-size: 12px; }\\n#branch-mobile-action { white-space: nowrap; }\\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\\n\"):\nc+=\"#branch-banner { position: absolute; }\\n#branch-banner .content .left .details .title { font-size: 12px; }\\n#branch-mobile-action { white-space: nowrap; }\\n#branch-banner .content .left .details .description { font-size: 11px; font-weight: normal; }\\n@media only screen and (min-device-width: 320px) and (max-device-width: 350px) { #branch-banner .content .right { max-width: 120px; } }\\n@media only screen and (min-device-width: 351px) and (max-device-width: 400px) and (orientation: landscape) { #branch-banner .content .right { max-width: 150px; } }\\n@media only screen and (min-device-width: 401px) and (max-device-width: 480px) and (orientation: landscape) { #branch-banner .content .right { max-width: 180px; } }\\n\";\nc+=a.ma;a.M&&(c+=\"body { margin: 0; }\\n\",d=document.createElement(\"style\"),d.type=\"text/css\",d.id=\"branch-iframe-css\",J(d),d.innerHTML=\"body { -webkit-transition: all 0.375s ease; transition: all 00.375s ease; }\\n#branch-banner-iframe { box-shadow: 0 0 5px rgba(0, 0, 0, .35); width: 1px; min-width:100%; left: 0; right: 0; border: 0; height: 76px; z-index: 99999; -webkit-transition: all 0.25s ease; transition: all 00.25s ease; }\\n#branch-banner-iframe { position: \"+((\"top\"!==a.position||a.qa?\"fixed\":\n\"absolute\")+\"; }\\n\"),(document.head||document.getElementsByTagName(\"head\")[0]).appendChild(d));d=document.createElement(\"style\");d.type=\"text/css\";d.id=\"branch-css\";d.innerHTML=c;J(d);c=a.M?b.contentWindow.document:document;(c=c.head||c.getElementsByTagName(\"head\")[0])&&\"function\"===typeof c.appendChild&&c.appendChild(d);\"top\"===a.position?b.style.top=\"-76px\":\"bottom\"===a.position&&(b.style.bottom=\"-76px\")};function N(a,b){try{var c=v(a.get(b?\"branch_session_first\":\"branch_session\",b))||null;return Wa(c)}catch(d){return null}}function Fa(a,b,c){c&&b.referring_link&&ya&&(b.referringLinkExpiry=(new Date).getTime()+sa);b=Va(b);a.set(\"branch_session\",h(b));c&&a.set(\"branch_session_first\",h(b),!0)}function Yb(a,b){if(b){var c=N(a)||{};b=h(Va(D(c,b)));a.set(\"branch_session\",b)}}\nfunction Zb(a,b,c){function d(f,m){return Va(D(v(f),m,c))}var e=a.get(\"branch_session\",!1)||{};a.set(\"branch_session\",h(d(e,b)));e=a.get(\"branch_session_first\",!0)||{};a.set(\"branch_session_first\",h(d(e,b)),!0)};function $b(a,b,c){var d=document.createElement(\"iframe\");d.src=\"about:blank\";d.style.overflow=\"hidden\";d.scrolling=\"no\";d.id=\"branch-banner-iframe\";d.className=\"branch-animation\";J(d);d.onload=function(){var e=F(),f=d.contentDocument||d.contentWindow.document;f.head=f.createElement(\"head\");f.body=f.createElement(\"body\");f.body.className=\"ios\"===e||\"ipad\"===e?\"branch-banner-ios\":\"android\"===e?\"branch-banner-android\":\"branch-banner-other\";bc(a,b,f);c(d)};document.body.appendChild(d)}\nfunction bc(a,b,c){c=c||document;var d=c.createElement(\"div\");d.id=\"branch-banner\";d.className=\"branch-animation\";if(a.I||a.T){if(a.I){var e=\"\";for(var f=0;5>f;f++)e+='\\u2606',\na.I>f&&(e+=f+1>a.I&&a.I%1?'\\u2605':\n'\\u2605 '),e+=\"\";e=''+e+\"\"}else e=\"\";e='
'+e+(a.T?''+a.T+\"\":\"\")+\"
\"}else e=\n\"\";d.innerHTML='
'+b+'
'+(a.na?\"\":'
×
')+'
\"Application
'+a.title+\"
\"+e+'
'+a.description+\"
\";c.body.appendChild(d);return d}\nfunction cc(a,b,c){b='\");a.M?$b(a,b,c):(a=bc(a,b,document),c(a))};function dc(a,b,c,d){function e(g,u){\"function\"===typeof g&&(u=g,g={});g=g||{};\"top\"===b.position?f.style.top=\"-76px\":\"bottom\"===b.position&&(f.style.bottom=\"-76px\");\"number\"===typeof b.R?d.set(\"hideBanner\",Tb(b.R),!0):d.set(\"hideBanner\",!0,!0);g.da?(\"top\"===b.position?document.body.style.marginTop=m:\"bottom\"===b.position&&(document.body.style.marginBottom=k),Sb(\"branch-banner-is-active\"),M(f),M(document.getElementById(\"branch-css\")),u()):(setTimeout(function(){M(f);M(document.getElementById(\"branch-css\"));\nu()},270),setTimeout(function(){\"top\"===b.position?document.body.style.marginTop=m:\"bottom\"===b.position&&(document.body.style.marginBottom=k);Sb(\"branch-banner-is-active\")},20))}if(!Wb(d,b))return O(a,\"willNotShowBanner\"),null;O(a,\"willShowBanner\");var f,m=document.body.style.marginTop,k=document.body.style.marginBottom;cc(b,d,function(g){function u(){\"top\"===b.position?f.style.top=\"0\":\"bottom\"===b.position&&(f.style.bottom=\"0\");O(a,\"didShowBanner\")}f=g;Xb(b,f);c.channel=c.channel||\"app banner\";\ng=b.M?f.contentWindow.document:document;if(![\"other\",\"desktop\"].includes(F())){b.open_app=b.sa;b.append_deeplink_path=b.ka;b.make_new_link=b.pa;b.deepview_type=\"banner\";a.deepview(c,b);var l=g.getElementById(\"branch-mobile-action\");l&&(l.onclick=function(t){t.preventDefault();a.deepviewCta()})}l=Ub(\"margin-top\");var p=Ub(\"margin-bottom\");Rb(document.body,\"branch-banner-is-active\");\"top\"===b.position?document.body.style.marginTop=Vb(l):\"bottom\"===b.position&&(document.body.style.marginBottom=Vb(p));\nif(l=g.getElementById(\"branch-banner-close\"))l.onclick=function(t){t.preventDefault();O(a,\"willCloseBanner\");e({},function(){O(a,\"didCloseBanner\")})};if(g=g.getElementById(\"branch-banner-modal-background\"))g.onclick=function(t){t.preventDefault();O(a,\"willCloseBanner\");e({},function(){O(a,\"didCloseBanner\")})};b.da?u():setTimeout(u,20)});return e};function ec(){function a(){if(b.length)b[0](function(){b.shift();a()})}var b=[];return function(c){b.push(c);1===b.length&&a()}};var fc={},P,Q,R,gc,hc,ic,jc,kc,lc=1;function mc(){P=\"top\";Q=\"absolute\";R=\"76px\";hc=gc=!1}mc();var nc=[],oc=!1,pc=window.innerHeight,qc=window.innerWidth;window.innerHeight((.|\\s)*?)<\\/script>/,vc=/