(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":1381,"name":"Primary.com","cookie_name":"bounceClientVisit1381","domain":"primary.com","ct":"fp_local_storage","ally":0,"ei":1,"tcjs":"","cjs":"jQuery('').appendTo(bouncex.head);\n\n/*\nvar bxLoadInterval = setInterval(function() {\n if (angular.element('body') && angular.element('body').injector()) {\n var path = document.location.pathname;\n var rootScope = angular.element('body').injector().get('$rootScope');\n\n init_post_cookie = function(){};\n document.body.appendChild(bouncex.local_storage_frame);\n\n bouncex.on(jQuery(window), 'bxPathChange', function() {\n bouncex.log('page change');\n clearTimeout(bouncex.spaTimeout);\n bouncex.spaTimeout = setTimeout2(function() {\n init_vars();\n bouncex.cookie.vpv++;\n bouncex.pa = 0;\n setBounceCookie();\n for (var ca_id in bouncex.campaigns) {\n if (bouncex.campaigns.hasOwnProperty(ca_id)) {\n bouncex.destroy_ad(ca_id);\n }\n }\n bouncex.body = jQuery('body').eq(0);\n bouncex.calling_url = encodeURIComponent(window.location.href);\n bouncex.reload_campaigns();\n init_ibx_tracking();\n init_event_tracking();\n bouncex.bxISR.init();\n }, 3000);\n });\n\n // handle full page redirect when user first navigates to checkout\n if (path.indexOf('/checkout') > -1 && !!angular.element('#checkoutButton').scope()) {\n storeCouponOnClick();\n }\n\n // keep campaigns above hero on homepage\n if (path === '/') angular.element('#homeHeroContentWrapper').css('z-index', '10');\n\n clearInterval(bxLoadInterval);\n }\n}, 500);\n\nvar storeCouponOnClick = function() {\n var checkoutButton = angular.element('#checkoutButton');\n checkoutButton.on('click.bx', function() {\n try {\n var $cartScope = angular.element('.cartContent').scope(),\n $couponSuccess = jQuery('.cartPromoQueueSuccessCode'),\n couponName;\n if ($couponSuccess.length > 0) {\n couponName = $couponSuccess.text().trim();\n } else if ($cartScope && typeof $cartScope.order !== 'undefined' && typeof $cartScope.order.promotions !== 'undefined' && $cartScope.order.promotions[0]) {\n couponName = $cartScope.order.promotions[0].code;\n }\n if (couponName) {\n window.localStorage.setItem('coupon_applied', couponName.toLowerCase());\n }\n } catch (e) { console.error('BX storeCouponOnClick Error: ', e); }\n });\n};\n\n// keep campaigns above hero on homepage\nif (document.location.pathname === '/') angular.element('#homeHeroContentWrapper').css('z-index', '10');\n*/\n\n// ISR tracking code\n(function () {\n\twindow.bouncex = window.bouncex || {};\n\n\twindow.bouncex.bxISR = {\n\t\t/* --- INITIALIZATION --- */\n\t\tversion: 'Version 8.1 | 1/4/17',\n\t\tstartTime: Date.now(),\n\t\tsettings: {\n\t\t\tcurrentProduct: {},\n\t\t\tgeneral: {\n\t\t\t\tproductPageIdentifier: (jQuery('#pdp').length > 0),\n\t\t\t\tmaxProducts: 20,\n\t\t\t\tcategoryHistory: JSON.parse(window.localStorage.getItem('bxCatHist')) || [],\n\t\t\t\tproductHistory: JSON.parse(window.localStorage.getItem('bxProdHist')) || [],\n\t\t\t\tcategoryHistoryLength: 0,\n\t\t\t\tproductHistoryLength: 0\n\t\t\t}\n\t\t},\n\n\t\tinit: function () {\n\t\t this.settings.general.productPageIdentifier = (jQuery('#pdp').length > 0);\n\t\t\tthis.productMap();\n\t\t\tthis.setItemHistoryLengths();\n\t\t\tthis.trackProductHistory();\n\t\t\t//this.trackCategoryHistory();\n\t\t\tthis.maxProducts();\n\t\t// \tconsole.log(Date.now() - window.bouncex.bxISR.startTime, 'bxISR start');\n\t\t},\n\n\t\tproductMap: function () {\n\t\t\tif (!this.settings.general.productPageIdentifier) { return; }\n\n\t\t\tvar productValues = {\n\t\t\t\turl: (window.location.origin + window.location.pathname),\n\t\t\t\tname: (jQuery('div#name:eq(0)').text()),\n\t\t\t\t//sku: (window.productList.viewContent[0].sku),\n\t\t\t\t//category: [{ categoryName: (window.productList.viewContent[0].category), categoryUrl: ('https://www.primary.com/shop/' + window.productList.viewContent[0].category) }],\n\t\t\t\tdescription: (jQuery('#description:eq(0) > p:first-child').text().trim()),\n\t\t\t\tprice: (jQuery('div#price span:eq(1)').text().replace(/[^0-9\\.]/g, '')),\n\t\t\t\tmainImgUrl: (jQuery('.selectionRow img.fadeImage').attr('src') ? jQuery('.selectionRow img.fadeImage').attr('src').split('?')[0] : null),\n\t\t\t\ttimeStamp: Date.now(),\n\t\t\t\tviewCount: 1,\n\t\t\t\tsessionId: window.bouncex.cookie.vid\n\t\t\t};\n\n\t\t\tthis.settings.currentProduct = productValues;\n\t\t},\n\n\t\t/* --- END OF INITIALIZATION --- */\n\t\t/* --- HELPER FUNCTIONS --- */\n\n\t\taddProductToHistory: function (product) {\n\t\t\tvar productHistory = this.settings.general.productHistory;\n\t\t\tproductHistory.unshift(product);\n\t\t\tthis.setProductHistory(productHistory);\n\t\t},\n\n\t\taddCategoryToHistory: function (currentCategory) {\n\t\t\tvar categoryHistory = this.settings.general.categoryHistory;\n\t\t\tvar newCategory = {\n\t\t\t\tcategory: currentCategory,\n\t\t\t\tviewCount: 1,\n\t\t\t\ttimeStamp: Date.now()\n\t\t\t};\n\n\t\t\tcategoryHistory.unshift(newCategory);\n\t\t\twindow.bouncex.bxISR.setCategoryHistory(categoryHistory);\n\t\t},\n\n\t\tcompareProducts: function (productA, productB) {\n\t\t\tif (productA.mainImgUrl === productB.mainImgUrl) { return true; }\n\t\t\t//if (productA.sku === productB.sku) { return true; }\n\t\t\tif (productA.name === productB.name) { return true; }\n\t\t\tif (productA.url === productB.url) { return true; }\n\t\t\treturn false;\n\t\t},\n\n\t\ttrackProductHistory: function () {\n\t\t\tvar productHistory = this.settings.general.productHistory;\n\t\t\tif (!this.settings.general.productPageIdentifier) { return; }\n\n\t\t\tif (this.settings.general.productHistoryLength > 0) {\n\t\t\t\tvar historyUpdated = false;\n\n\t\t\t\tfor (var i = 0; i < this.settings.general.productHistoryLength; i++) {\n\t\t\t\t\tif (this.compareProducts(productHistory[i], this.settings.currentProduct)) {\n\t\t\t\t\t\tproductHistory[i].viewCount++;\n\t\t\t\t\t\tproductHistory[i].timeStamp = Date.now();\n\t\t\t\t\t\tproductHistory.unshift(productHistory[i]);\n\n\t\t\t\t\t\tproductHistory.splice(i + 1, 1);\n\t\t\t\t\t\thistoryUpdated = true;\n\t\t\t\t\t\tthis.setProductHistory(productHistory);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!historyUpdated) {\n\t\t\t\t\tthis.addProductToHistory(this.settings.currentProduct);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.addProductToHistory(this.settings.currentProduct);\n\t\t\t}\n\t\t},\n\n\t\ttrackCategoryHistory: function () {\n\t\t\tvar categoryHistory = this.settings.general.categoryHistory;\n\t\t\tif (!this.settings.general.productPageIdentifier) { return; }\n\n\t\t\tvar currentCategoriesLength = this.settings.currentProduct.category.length;\n\t\t\tfor (var i = 0; i < currentCategoriesLength; i++) {\n\t\t\t\tvar currentCategory = this.settings.currentProduct.category[i];\n\n\t\t\t\tif (this.settings.general.categoryHistoryLength > 0) {\n\t\t\t\t\tvar historyUpdated = false;\n\t\t\t\t\tfor (var j = 0; j < this.settings.general.categoryHistoryLength; j++) {\n\t\t\t\t\t\tif (categoryHistory[j].category.categoryName === currentCategory.categoryName) {\n\t\t\t\t\t\t\tcategoryHistory[j].viewCount++;\n\t\t\t\t\t\t\tcategoryHistory[j].timeStamp = Date.now();\n\t\t\t\t\t\t\thistoryUpdated = true;\n\t\t\t\t\t\t\tthis.setCategoryHistory(categoryHistory);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!historyUpdated) {\n\t\t\t\t\t\tthis.addCategoryToHistory(currentCategory);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.addCategoryToHistory(currentCategory);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/* --- END OF HELPER FUNCTIONS --- */\n\t\t/* --- GETTER FUNCTIONS --- */\n\n\t\tgetTopCategories: function (criteria, number) {\n\t\t\tvar categories = this.settings.general.categoryHistory;\n\t\t\tif (!number) { number = categories.length; }\n\n\t\t\tif (criteria === 'views') {\n\t\t\t\treturn categories.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number);\n\t\t\t} else if (criteria === 'time') {\n\t\t\t\treturn categories.sort(function (a, b) { return b.timeStamp - a.timeStamp; }).slice(0, number);\n\t\t\t} else if (criteria === 'recency') {\n\t\t\t\treturn categories.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number).sort(function (c, d) { return d.timeStamp - c.timeStamp; });\n\t\t\t}\n\t\t},\n\n\t\tgetTopProducts: function (criteria, number) {\n\t\t\tvar products = this.settings.general.productHistory;\n\t\t\tif (!number) { number = products.length; }\n\t\t\tif (criteria === 'views') {\n\t\t\t\treturn products.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number);\n\t\t\t} else if (criteria === 'time') {\n\t\t\t\treturn products.sort(function (a, b) { return b.timeStamp - a.timeStamp; }).slice(0, number);\n\t\t\t} else if (criteria === 'recency') {\n\t\t\t\treturn products.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number).sort(function (c, d) { return d.timeStamp - c.timeStamp; });\n\t\t\t}\n\t\t},\n\n\t\tmaxProducts: function () {\n\t\t\tvar maxProducts = this.settings.general.maxProducts;\n\t\t\tif (this.settings.general.productHistoryLength > maxProducts) {\n\t\t\t\tvar topProducts = this.getTopProducts('time', maxProducts);\n\t\t\t\tthis.setProductHistory(topProducts);\n\t\t\t}\n\t\t},\n\n\t\t/* --- END GETTER FUNCTIONS --- */\n\t\t/* --- SETTER FUNCTIONS --- */\n\n\t\tsetItemHistoryLengths: function () {\n\t\t\tthis.settings.general.categoryHistoryLength = this.settings.general.categoryHistory.length;\n\t\t\tthis.settings.general.productHistoryLength = this.settings.general.productHistory.length;\n\t\t},\n\n\t\tsetProductHistory: function (productHistory) {\n\t\t\twindow.localStorage.setItem('bxProdHist', JSON.stringify(productHistory));\n\t\t\tthis.settings.general.productHistory = productHistory;\n\t\t\tthis.settings.general.productHistoryLength = productHistory.length;\n\t\t},\n\n\t\tsetCategoryHistory: function (categoryHistory) {\n\t\t\twindow.localStorage.setItem('bxCatHist', JSON.stringify(categoryHistory));\n\t\t\tthis.settings.general.categoryHistory = categoryHistory;\n\t\t\tthis.settings.general.categoryHistoryLength = categoryHistory.length;\n\t\t},\n\n\t\t/* --- END SETTER FUNCTIONS --- */\n\t\t/* --- CAMPAIGN TEMPLATING --- */\n\n\t\tpopulateCampaignProducts: function (params) {\n\t\t\tif (!params || !params.campaignId || !params.numberProducts || !params.campaignType) { return false; }\n\t\t\tif (!params.sortBy) { params.sortBy = 'time'; }\n\t\t\tif (!params.productAction) { params.productAction = 'link'; }\n\t\t\tif (!params.hoverState) { params.hoverState = false; }\n\n\n\t\t\tvar campaign = jQuery('#campaign_' + params.campaignId + '_container_' + params.campaignType);\n\t\t\tvar campaignProductArray = [];\n\n\t\t\tfor ( var i = 0; i < params.numberProducts; i++ ) {\n\t\t\t\tvar campaignProductObject = {\n\t\t\t\t\timg: jQuery('#campaign_' + params.campaignId + '_container_' + params.campaignType + ' a[href*=isr_img' + (i + 1) + ']'),\n\t\t\t\t\tlink: jQuery('#campaign_' + params.campaignId + '_container_' + params.campaignType + ' a[href*=isr_url' + (i + 1) + ']')\n\t\t\t\t};\n\n\t\t\t\tcampaignProductArray.push(campaignProductObject);\n\t\t\t}\n\n\t\t\tvar productArray = window.bouncex.bxISR.getTopProducts(params.sortBy, params.numberProducts);\n\t\t\tjQuery.each(productArray, function (x, y) {\n\t\t\t\tvar imgSrc = y.mainImgUrl,\n\t\t\t\t\tproductLink = (y.url.indexOf('http') > -1) ? y.url : window.top.location.origin + y.url,\n\t\t\t\t\tproductImageElem = jQuery(campaignProductArray[x].img),\n\t\t\t\t\tproductLinkElem = jQuery(campaignProductArray[x].link);\n\n\n\t\t\t\tvar css = {\n\t\t\t\t\t'background-image': 'url(\\'' + imgSrc + '\\')',\n\t\t\t\t\t'background-size': 'auto 100%',\n\t\t\t\t\t'background-repeat': 'no-repeat',\n\t\t\t\t\t'background-position': 'center'\n\t\t\t\t};\n\n\t\t\t\tproductImageElem.css(css).addClass('isr-image isr' + x + '');\n\t\t\t\tif (params.productAction === 'link') {\n\t\t\t\t\tif (params.reportClicks) {\n\t\t\t\t\t\tvar productAction = 'javascript:(function () { window.bouncex.report(' + params.campaignId + ', \\'clicks\\'); window.top.open(\\''+ productLink +'\\'); })();';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar productAction = 'javascript:(function () { window.top.open(\\''+ productLink +'\\'); })();';\n\t\t\t\t\t}\n\n\t\t\t\t} else if (params.productAction === 'submit') {\n\t\t\t\t\tvar productAction = 'javascript:void(0);';\n\t\t\t\t\tvar msg = JSON.stringify({ source: 'bouncex', action: 'submit' });\n\t\t\t\t\tproductImageElem.on('click', function () {\n\t\t\t\t\t\twindow.bouncex.report(params.campaignId, 'clicks');\n\t\t\t\t\t\tXD.postMessage(msg, campaign);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tproductImageElem.attr('href', productAction);\n\n\t\t\t\tif (params.reportClicks) {\n\t\t\t\t\tvar linkAction = 'javascript:(function () { window.bouncex.report(' + params.campaignId + ', \\'clicks\\'); setTimeout(function(){window.top.open(\\''+ productLink +'\\');}, 100); })();';\n\t\t\t\t} else {\n\t\t\t\t\tvar linkAction = 'javascript:(function () { window.top.open(\\''+ productLink +'\\'); })();';\n\t\t\t\t}\n\n\t\t\t\tproductLinkElem.attr('href', linkAction);\n\n\t\t\t\tif (params.hoverState) {\n\t\t\t\t\tif (params.reportClicks) {\n\t\t\t\t\t\tvar hoverLinkAction = 'javascript:(function () { window.bouncex.report(' + params.campaignId + ', \\'clicks\\'); setTimeout(function(){window.top.open(\\''+ productLink +'\\');}, 100); })();';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar hoverLinkAction = 'javascript:(function () { window.top.open(\\'' + productLink + '\\'); })();';\n\t\t\t\t\t}\n\n\t\t\t\t\tproductImageElem.parent().append('
' + y.name + '
');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tpopulateCampaignProductsV2: function (params) {\n\t\t\tif (!params || !params.campaignId || !params.numberProducts) { return false; }\n\t\t\tif (!params.sortBy) { params.sortBy = 'time'; }\n\t\t\tif (!params.productAction) { params.productAction = 'link'; }\n\t\t\tif (!params.linkAction) { params.linkAction = 'new'; }\n\n\t\t\tvar campaign = jQuery('#bx-campaign-' + params.campaignId);\n\t\t\tvar campaignProductArray = [];\n\n\t\t\tcampaignProductElements = {};\n\t\t\tjQuery.each(params.campaignSteps, function (x, y) {\n\n\t\t\t\tcampaignStepProductElements = [];\n\t\t\t\tfor ( var i = 0; i < params.numberProducts; i++ ) {\n\t\t\t\t\tvar campaignStepProductObject = {};\n\t\t\t\t\tif (y.productImages) {\n\t\t\t\t\t\tcampaignStepProductObject.img = campaign.find('#bx-form-' + params.campaignId + '-step-' + y.stepNumber + ' .bx-group-custom:eq('+i+') .bx-lineshape');\n\t\t\t\t\t}\n\t\t\t\t\tif (y.productLinkElems) {\n\t\t\t\t\t\tcampaignStepProductObject.link = campaign.find('#bx-form-' + params.campaignId + '-step-' + y.stepNumber + ' .bx-group-custom:eq('+i+') .bx-row-submit button');\n\t\t\t\t\t}\n\t\t\t\t\tif (y.productHoverStates) {\n\t\t\t\t\t\tcampaignStepProductObject.hoverTitle = campaign.find('#bx-form-' + params.campaignId + '-step-' + y.stepNumber + ' .bx-group-custom:eq('+i+') .bx-row-line-custom').siblings('.bx-row-text').find('div');\n\t\t\t\t\t}\n\t\t\t\t\tcampaignStepProductElements.push(campaignStepProductObject);\n\t\t\t\t}\n\n\t\t\t\tcampaignProductElements['step-' +x] = campaignStepProductElements;\n\t\t\t});\n\n\t\t\tvar productArray = window.bouncex.bxISR.getTopProducts(params.sortBy, params.numberProducts);\n\n\t\t\tvar self = this;\n\t\t\tjQuery.each(campaignProductElements, function (x, y) {\n\t\t\t\tvar productAction = function () {};\n\n\t\t\t\tfor ( var i = 0; i < y.length; i++ ) {\n\t\t\t\t\tif (params.campaignSteps[(x.split('-')[1])].productsLink) {\n\t\t\t\t\t\tvar productLink = (productArray[i].url.indexOf('http') > -1) ? productArray[i].url : window.top.location.origin + productArray[i].url;\n\t\t\t\t\t\tproductAction = self.makeProductAction(productLink, params);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y[i].img) {\n\t\t\t\t\t\tvar imgSrc = productArray[i].mainImgUrl,\n\t\t\t\t\t\t\tproductImageElem = jQuery(y[i].img);\n\n\t\t\t\t\t\tproductImageElem.css('background-image', 'url(' + imgSrc + ')').addClass('isr-image isr' + x + '').bind('click.bx_' + params.campaignId + '_isr_' + i, productAction);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y[i].link) {\n\t\t\t\t\t\tvar productLink = (productArray[i].url.indexOf('http') > -1) ? productArray[i].url : window.top.location.origin + productArray[i].url,\n\t\t\t\t\t\t\tproductLinkElem = jQuery(y[i].link);\n\n\t\t\t\t\t\tproductLinkElem.attr('bx-href', productLink).bind('click.bx_' + params.campaignId + '_isr_' + i, productAction);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y[i].hoverTitle) {\n\t\t\t\t\t\tvar productTitle = productArray[i].name,\n\t\t\t\t\t\t\tproductHoverTitleElem = jQuery(y[i].hoverTitle);\n\n\t\t\t\t\t\tproductHoverTitleElem.text(productTitle).bind('click.bx_' + params.campaignId + '_isr_' + i, productAction);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t});\n\t\t},\n\n\t\tmakeProductAction: function (productLink, campaignParams) {\n\t\t\tvar productAction = function () {};\n\n\t\t\t\tif (campaignParams.productAction === 'link') {\n\t\t\t\t\tif (campaignParams.linkAction === 'new') {\n\t\t\t\t\t\tif (campaignParams.reportClicks) {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.bouncex.report(campaignParams.campaignId, 'click');\n\t\t\t\t\t\t\t\twindow.top.open(productLink);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.top.open(productLink);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (campaignParams.linkAction === 'current') {\n\t\t\t\t\t\tif (campaignParams.reportClicks) {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.bouncex.report(campaignParams.campaignId, 'click');\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\twindow.top.location.replace(productLink);\n\t\t\t\t\t\t\t\t}, 100);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.top.location.replace(productLink);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\treturn productAction;\n\t\t}\n\t};\n})();\n","force_https":false,"waypoints":false,"content_width":0,"gai":"UA-57467612-1","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":1,"gmp":0,"whitelist_check":0},"burls":[{"prop":"contains","val":"utm_campaign=nobouncex"},{"prop":"contains","val":"utm_source=podcast"}],"ple":false,"fbe":false,"mas":3,"map":1,"gar":true,"ete":0,"ettm":true,"etjs":"","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname.indexOf('/cart') > -1;"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('body.template-collection').length > 0;"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkouts/"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"previous_step"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('ShopifyAnalytics.meta.page.pageType') === 'home';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"shop-dev"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"shop-qa"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('body.template-product').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"search?ref=nav_search_full"}]]}},"els":null,"vars":[{"name":"cart_total","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"0","code":"(function() {\n var popUpTotal = Number(jQuery('.ReactModalPortal span:contains(\"Subtotal\")').next().text().replace(/[^0-9.]/g,''));\n var cartPageElem = jQuery('.template-cart td:contains(\"Subtotal\"):first');\n var checkoutPageElem = jQuery('[data-checkout-subtotal-price-target]');\n \n if (jQuery('[data-cart-count=\"true\"]').length > 0 && jQuery('[data-cart-count=\"true\"]').text().replace(/[^0-9.]/g,'') === \"0\") {\n return 0;\n }\n \n if (popUpTotal) {\n return popUpTotal;\n }\n \n if (cartPageElem.length > 0) {\n return Number(cartPageElem.next().text().replace(/[^0-9.]/g,''));\n }\n \n if (checkoutPageElem.length > 0) {\n return Number(checkoutPageElem.text().trim().replace(/[^0-9.]/g,''));\n }\n \n return null;\n})();","trigger":""},{"name":"items_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"(function(){\n\tvar $cartScope = angular.element('.cartContent').scope();\n\treturn $cartScope && typeof $cartScope.order !== 'undefined' ? $cartScope.order.total_quantity : null;\n})();","trigger":""},{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('meta.page.customerId') !== undefined || jQuery('.logged-in-customer-information').length > 0;","trigger":""},{"name":"free_shipping","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"50 - bouncex.vars.cart_total > 0 ? 50 - bouncex.vars.cart_total : 0;","trigger":""},{"name":"previous_user","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if ( jQuery('meta[property=\"be:primaryUserId\"]').attr('content') === 'null' ) {\n return false;\n } else {\n return true;\n }\n})();","trigger":""},{"name":"free_shipping_user","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n return jQuery('meta[property=\\'be:freeShippingUser\\']').attr('content') == 'true' ? true : false;\n})();","trigger":""},{"name":"on_bag_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('bag') > -1;","trigger":""},{"name":"on_checkout_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('checkout') > -1;","trigger":""},{"name":"on_confirmation_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('/checkouts/') > -1 && window.location.href.indexOf('previous_step') < 0;","trigger":""},{"name":"on_product_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#pdp').length > 0;","trigger":""},{"name":"utm_source","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"","code":"(function() {\n var regexS = '[\\\\?&#&]'+'utm_source'+'=([^&#]*)';\n\t\t\tvar regex = new RegExp( regexS );\n\t\t\tvar results = regex.exec(window.location.href);\n\t\t\tif( results === null ) return NaN;\n\t\t\telse return decodeURIComponent(results[1]);\n})()","trigger":""},{"name":"utm_campaign","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"","code":"(function() {\n var regexS = '[\\\\?&#&]'+'utm_campaign'+'=([^&#]*)';\n\t\t\tvar regex = new RegExp( regexS );\n\t\t\tvar results = regex.exec(window.location.href);\n\t\t\tif( results === null ) return NaN;\n\t\t\telse return decodeURIComponent(results[1]);\n})()","trigger":""},{"name":"coupons_redeemed","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function(){\n\tif ( location.href.indexOf('/checkout/confirmation') > -1 ){\n\t\tvar couponRedeemed = window.localStorage.getItem('coupon_applied');\n\t\tif ( couponRedeemed ){\n\t\t\tvar previouslyRedeemed = bouncex.vars.coupons_redeemed;\n\t\t\tif ( previouslyRedeemed ){\n\t\t\t\tif ( previouslyRedeemed.indexOf(couponRedeemed) === -1 ){\n\t\t\t\t\treturn previouslyRedeemed + ',' + couponRedeemed;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn couponRedeemed;\n\t\t\t}\n\t\t}\n\t}\n})();","trigger":""},{"name":"out_of_stock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if( typeof gon !== 'undefined' && typeof gon.current_order !== 'undefined' && typeof gon.current_order.line_items !== 'undefined' ) {\n var items = gon.current_order.line_items;\n \n for (var i = 0; i < items.length; i++) {\n if (items[i].can_supply === false) return true;\n }\n return false;\n }\n})();","trigger":""},{"name":"pj_page","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var url = window.location.pathname;\n\n if (url.indexOf('/kids/') > -1 && (url.indexOf('/the-pj-pant') > -1 || url.indexOf('/the-pj-short') > -1)) {\n return 'kids pj bottoms';\n } else if (url.indexOf('/kids/') > -1 && (url.indexOf('/the-long-sleeve-pj-top') > -1 || url.indexOf('/the-short-sleeve-pj-top') > -1)) {\n return 'kids pj top';\n } else {\n return false;\n }\n})();","trigger":""},{"name":"unique_items_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"(function(){\n\tvar $cartScope = angular.element('.cartContent').scope();\n\treturn $cartScope && typeof $cartScope.order !== 'undefined' && $cartScope.order.line_items ? $cartScope.order.line_items.length : null;\n})();","trigger":""},{"name":"unisex_product","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#unisexThumbnails').length > 0;","trigger":""},{"name":"discount","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var $bundleDiscountInfoDiv = jQuery('.bundleSummary:eq(0)');\n var discount = false;\n \n if ($bundleDiscountInfoDiv.length > 0) {\n var bundleDiscountText = $bundleDiscountInfoDiv.text().trim();\n \n if (bundleDiscountText) {\n discount = bundleDiscountText.slice(bundleDiscountText.indexOf('$') + 1, bundleDiscountText.indexOf('each'));\n \n if (discount) {\n return discount.trim();\n }\n }\n }\n})();","trigger":""},{"name":"gift_purchased","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":0,"code":"(function() {\n if (window.location.pathname.indexOf('checkout') > -1 && jQuery('#order_is_a_gift').length > 0) {\n return jQuery('#order_is_a_gift').hasClass('ng-not-empty');\n } else {\n return null;\n }\n})();","trigger":""},{"name":"isr_tracked","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"localStorage.getItem('bxProdHist') ? JSON.parse(localStorage.getItem('bxProdHist')).length : 0;","trigger":""},{"name":"rainbow_rewards_amount","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"window.rainbow_rewards_amount;","trigger":""},{"name":"school_name","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"/school/.test(window.location.pathname) ? jQuery('.title-large').text().trim() : null;","trigger":"pageload"},{"name":"cart_plurality","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.items_in_cart > 1 ? 'items' : 'item';","trigger":"pageload"},{"name":"spa_event_emitter","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n bouncex.prevPath = bouncex.prevPath || window.location.pathname;\n if (bouncex.prevPath !== window.location.pathname) {\n if (bouncex.window) {\n bouncex.window.trigger('bxPathChange');\n }\n bouncex.prevPath = window.location.pathname;\n }\n return false;\n})();","trigger":"pageload"},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":"pageload"},{"name":"reviews_valid","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"parseInt(jQuery('.yotpo-reviews-nav-tab-sum').text().replace(/[^0-9]/g, '')) > 0;","trigger":"pageload"},{"name":"size_selected","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.sizeList button[class*=\"select\"]').length > 0","trigger":"pageload"},{"name":"submitted_onsite","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"jQuery('div.footer-social-area').text().trim().indexOf(\"Got it! Isn't technology amazing?\") > -1;","trigger":"pageload"},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var cartCount = 0;\n var $cartCountElems = jQuery('[data-cart-count=\"true\"]');\n \n if ($cartCountElems.length > 0) {\n return Number($cartCountElems.eq(0).text().replace(/[^0-9.]/g,'') || false);\n }\n \n jQuery('.product-table .product-thumbnail__quantity').each(function() {\n cartCount += Number(jQuery(this).text());\n });\n \n return cartCount;\n})();","trigger":"pageload"},{"name":"prod_name","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('meta[property=\"og:title\"]').eq(0).attr('content') || false;","trigger":"pageload"},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"Number(jQuery('label.pw-product-picker__option[class*=\"--selected\"] span').last().text().replace(/[^0-9.]/g,'') || jQuery('.pw-swatch-list__swatch[class*=\"--selected\"]:first').parents().find('span:contains(\"$\")').first().text().replace(/[^0-9.]/g,''));","trigger":"pageload"},{"name":"in_stock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('button:contains(\"Add to bag\")').length > 0;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":0,"te":0,"cart_rep":{"get":"","set":""},"ulpj":null,"cus":"","miw_exclude":"","enabled":0},"etjson":null,"osre":false,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":true,"fmc":["US"],"fme":true,"fmx":"","sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0},"ga4_property_id":"345262531","ga4_measurement_id":"G-M44F58RW7M"} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 0 }; bouncex.assets = {"ads":"44fda29a3ca8b3798fe72ceb2caeade8","creativesBaseStyles":"a53944a2","gpsAuction":"1375a7b38c31e98d14fe7f396b72da14","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0704dae1eb637cbeb4a847506058402d"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.js'); runtime.setAttribute('async', 'async'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_b0f9dea1e3910d3b6e492e0d6dab8565.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_3a843477d8e318f67237a66d0a58c542.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();