(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":4825,"name":"Gymboree","cookie_name":"bounceClientVisit4825","domain":"gymboree.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* wrike 783331164: reload campaigns if user identified, but no campaigns showing */\nif (!bouncex.vars.user_identified_ibx) {\n bouncex.et.onVarChange('user_identified_ibx', function(old, new_val) {\n var campaign_visible = false;\n for (var c_id in bouncex.campaigns) {\n if (bouncex.campaigns.hasOwnProperty(c_id) && bouncex.campaigns[c_id].ad_visible) {\n campaign_visible = true;\n break;\n }\n }\n \n /* RTV value was previously false, currently true, and no campaigns impressed */\n if (!old && new_val && !campaign_visible) {\n bouncex.reload_campaigns();\n }\n });\n}\n\n(function(){\n var clickThruCoupon = bouncex.utils.url.getParam('coupon');\n if (clickThruCoupon) {\n bouncex.setVar('click_thru_cpn', clickThruCoupon);\n } \n})();","force_https":false,"waypoints":false,"content_width":900,"gai":"","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":1,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\r\nvar globalConfig = {\r\n '4824': {\r\n domain_origin: 'www.childrensplace.com/us'\r\n },\r\n '4825': {\r\n domain_origin: 'www.gymboree.com/us'\r\n },\r\n '4826': {\r\n domain_origin: 'www.sugarandjade.com/us/'\r\n }\r\n},\r\nconfig = globalConfig[bouncex.website.id],\r\nPDP_ID;\r\n\r\n/* --------------------------------- HELPERS -------------------------------- */\r\nfunction getUrl() {\r\nvar url = bouncex.utils.url.allowParams();\r\n\r\nif (url.indexOf('&') > -1) {\r\n url = url.split('&')[0];\r\n}\r\n\r\nreturn url;\r\n}\r\n\r\nfunction setVarAndCookie(varName, value) {\r\nbouncex.setVar(varName, value);\r\nbouncex.setBounceCookie();\r\n}\r\n\r\nfunction isCollectionPage() {\r\nreturn getUrl().indexOf('Collection') > -1;\r\n}\r\n\r\nfunction formatItemId(string) {\r\nvar itemId = string.split('/').pop() || '';\r\nreturn itemId.split('-').slice(-2).join('_');\r\n}\r\n\r\nfunction getCurrentProduct() {\r\nif (window.__NEXT_REDUX_STORE__ && typeof window.__NEXT_REDUX_STORE__.getState === 'function') {\r\n var state = window.__NEXT_REDUX_STORE__.getState();\r\n return bouncex.utils.getNestedProp('ProductDetail.currentProduct', {}, state);\r\n}\r\nreturn {};\r\n}\r\n\r\n\r\n\r\nfunction getSkuObj() {\r\nvar selectedColor = jQuery('.image-chips-selector-title-name').text(),\r\n selectedFit = jQuery('.fit-selector .item-selected-option').text(),\r\n selectedSize = jQuery('.size-selector .item-selected-option').text() || jQuery('.size-and-fit-detail-item input:checked').val() || jQuery('.size-and-fit-detail-item.item-selected-option input').val(),\r\n currentProduct = getCurrentProduct(),\r\n colorArr = bouncex.utils.getNestedProp('colorFitsSizesMap', [], currentProduct),\r\n skuData = {\r\n selectedColor: selectedColor || null,\r\n selectedFit: selectedFit || null,\r\n selectedSize: selectedSize || null,\r\n selectedSku: null,\r\n selectedGroupId: currentProduct.productId || null\r\n };\r\n\r\nif (!colorArr.length) return skuData;\r\n\r\nlet colorObj = colorArr.find(c => c.color.name === selectedColor) || colorArr[0] || {};\r\nlet fitArr = colorObj.fits || [];\r\nlet fitObj = fitArr.find(f => f.fitName === selectedFit) || fitArr[0] || {};\r\nlet sizeArr = fitObj.sizes || [];\r\n\r\nlet variant = sizeArr.find(variant => variant.sizeName === selectedSize);\r\nif (variant) {\r\n skuData.selectedSku = variant.variantId;\r\n}\r\n\r\nreturn skuData;\r\n}\r\n\r\n/* ------------------------------ ITEM TRACKING ----------------------------- */\r\nfunction getProdName() {\r\nvar textNodesFiltered = jQuery('[itemprop=\"name\"],.product-title').eq(0)\r\n .contents()\r\n .filter(function () {\r\n return this.nodeType === 3;\r\n });\r\nreturn textNodesFiltered.eq(0).text();\r\n}\r\n\r\nfunction getValidImgUrl(itemId) {\r\nvar images = jQuery('meta[property=\"og:image\"][content*=' + itemId + ']');\r\nfor (var i = 0; i < images.length; i++) {\r\n var currentImg = jQuery(images[i]).attr('content');\r\n if (currentImg && currentImg.indexOf('.jpg') > -1 && currentImg.indexOf('.mp4') === -1) {\r\n return currentImg;\r\n }\r\n}\r\nreturn false;\r\n}\r\n\r\nfunction getItemImage(itemId) {\r\nvar imgUrl = jQuery('[property=\"og:image\"][content*=' + itemId + ']').first().attr('content'),\r\n smImg = '/w_200/',\r\n lgImg = '/w_600/';\r\n\r\nif (imgUrl && imgUrl.indexOf('.jpg') === -1 && imgUrl.indexOf('.mp4') > -1) {\r\n imgUrl = getValidImgUrl(itemId);\r\n}\r\n\r\nif (imgUrl && imgUrl.indexOf(smImg) > -1) {\r\n imgUrl = imgUrl.replace(smImg, lgImg);\r\n}\r\n\r\nreturn imgUrl;\r\n}\r\n\r\nfunction getItem() {\r\nvar url = getUrl(),\r\n itemId = formatItemId(url);\r\nreturn {\r\n id: itemId,\r\n copy: getProdName(),\r\n category: jQuery('.breadcrum-container span:last').text() || 'Global',\r\n url: url,\r\n imageurl: getItemImage(itemId),\r\n price: bouncex.vars.prod_price,\r\n instock: !jQuery('.add-to-bag-button').attr('disabled'),\r\n abanexclude: jQuery('#productDetailsSection .product-badge').first().text().toLowerCase().indexOf('just a few left') > -1\r\n};\r\n}\r\n\r\nfunction fireViewItem(item) {\r\nvar pushItem = { 'item:id': item.id };\r\n\r\nif (item.groupId) {\r\n pushItem['item:itemgroupid'] = item.groupId;\r\n}\r\nbouncex.push(['view item', pushItem]);\r\n}\r\n\r\nfunction isExcluded(item) {\r\nreturn (\r\n item.url.indexOf('giftcard') > -1 ||\r\n item.url.indexOf('gift-cards') > -1 ||\r\n bouncex.utils.getNestedProp('pageData.pageType') === 'outfit' ||\r\n window.location.href.indexOf('search') === 0\r\n);\r\n}\r\n\r\nfunction initializeItemEvents() {\r\n\r\n\r\nvar item;\r\n\r\nbouncex.et.onTrue(\r\n function () {\r\n\r\n item = getItem();\r\n \r\n\r\n return (\r\n !!item.id &&\r\n !!item.copy &&\r\n !!item.category &&\r\n (item.price !== undefined && item.price !== null) &&\r\n !!item.url &&\r\n !!item.imageurl\r\n );\r\n },\r\n function () {\r\n\r\n\r\n if (!item) {\r\n \r\n return;\r\n }\r\n\r\n try {\r\n \r\n bouncex.push(['item', item]);\r\n } catch (e) {\r\n \r\n }\r\n\r\n if (isExcluded(item)) {\r\n \r\n return;\r\n }\r\n\r\n \r\n\r\n bouncex.setTimeout2(function () {\r\n try {\r\n item.groupId = item.id;\r\n PDP_ID = item.id;\r\n\r\n fireViewItem(item);\r\n\r\n } catch (e) {\r\n \r\n }\r\n }, 1500);\r\n },\r\n 10\r\n);\r\n}\r\n\r\n\r\nfunction waitForBounceX(callback) {\r\nif (window.bouncex && typeof bouncex.push === 'function') {\r\n callback();\r\n} else {\r\n setTimeout(function () {\r\n waitForBounceX(callback);\r\n }, 250);\r\n}\r\n}\r\n\r\n\r\n\r\n\r\n\r\n// Collection pages do not have groupid's\r\nfunction fireCollectionPdpTracking(item) {\r\nitem.imageurl = jQuery('.outfit-carousal-image.full-size-desktop-image').attr('src');\r\nitem.price = jQuery('meta[itemprop=\"price\"]:first').attr('content');\r\nbouncex.push(['item', item]);\r\nfireViewItem(item);\r\n}\r\n\r\nfunction requestAndTrackStyliticsData(itemId) {\r\nconst styliticsURL = 'https://widget-api.stylitics.com/api/outfits?username=gymboree&total=10&item_number=' + itemId;\r\n\r\njQuery.ajax(styliticsURL, {\r\n success: (res) => {\r\n bouncex.styliticsData = res;\r\n\r\n if (!bouncex.styliticsData || !bouncex.styliticsData.length) {\r\n bouncex.log('error no stylitics data');\r\n return;\r\n }\r\n\r\n trackStylitics(itemId);\r\n },\r\n error: () => {\r\n bouncex.error('stylitics data not retrieved');\r\n }\r\n});\r\n}\r\n\r\nfunction getBundleURL($bundle) { // stylitics-bundle-container element\r\nvar bundleId = $bundle.attr('data-bundle-id');\r\n\r\nif (!bundleId) {\r\n return false;\r\n}\r\n\r\nvar outfitData = bouncex.styliticsData.find(outfit => outfit.id === +bundleId);\r\n\r\nif (!outfitData || !outfitData.items) {\r\n return false;\r\n}\r\n\r\nvar itemIds = outfitData.items.map(item => item.remote_id) || [];\r\n\r\nif (!itemIds.length) {\r\n return false;\r\n}\r\n\r\nreturn `https://www.gymboree.com/us/outfit/${bundleId}/${itemIds.join('-')}`;\r\n}\r\n\r\nfunction trackStylitics(itemId) {\r\njQuery('.stylitics-bundle-container').slice(0, 3).each(function() {\r\n var $el = jQuery(this),\r\n imageUrl = $el.find('img[src*=\"content.stylitics\"]').attr('src'),\r\n itemUrl = getBundleURL($el);\r\n\r\n var withHost = itemUrl && itemUrl.indexOf(window.location.host) > -1 ? itemUrl : window.location.origin + itemUrl;\r\n\r\n if (imageUrl && itemUrl) {\r\n bouncex.push([\r\n 'view_collection',\r\n {\r\n image_url: bouncex.utils.url.allowParams([], imageUrl),\r\n item_url: withHost,\r\n item_id: itemId\r\n },\r\n ]);\r\n }\r\n});\r\n}\r\n\r\n/* ------------------------------ SKU TRACKING ------------------------------ */\r\n\r\n\r\nfunction initializeSkuEvents() {\r\n let lastFiredSkuData = {};\r\n\r\n function hasChanged(newData) {\r\n return JSON.stringify(newData) !== JSON.stringify(lastFiredSkuData);\r\n }\r\n\r\n function firePartialSku(skuData) {\r\n const payload = {\r\n 'item:itemgroupid': skuData.selectedGroupId\r\n };\r\n\r\n if (skuData.selectedColor) payload['item:color'] = skuData.selectedColor;\r\n if (skuData.selectedFit) payload['item:fit'] = skuData.selectedFit;\r\n if (skuData.selectedSize) payload['item:size'] = skuData.selectedSize;\r\n if (skuData.selectedSku) payload['item:feedid'] = skuData.selectedSku;\r\n\r\n bouncex.push(['select_sku', payload]);\r\n lastFiredSkuData = skuData;\r\n }\r\n\r\n function handleVariantChange() {\r\n const currentSkuData = getSkuObj();\r\n if (hasChanged(currentSkuData)) {\r\n firePartialSku(currentSkuData);\r\n }\r\n }\r\n\r\n // Directly bind to the UI interaction events instead of polling\r\n bouncex.et.on(bouncex.document, 'click.bxsku', handleVariantChange, '.color-title-container, .size-and-fit-detail-item');\r\n bouncex.et.on(bouncex.document, 'change.bxsku', handleVariantChange, '.size-selector select, .fit-selector select');\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\r\nfunction getItemIdsCat() {\r\nvar ids = [],\r\n $tiles = jQuery('.product-image a'),\r\n i = 0,\r\n id = '';\r\n\r\nfor (i; i < $tiles.length; i++) {\r\n id = formatItemId($tiles.eq(i).attr('href') || '');\r\n\r\n if (!id || ids.indexOf(id) > -1) {\r\n continue;\r\n }\r\n\r\n ids[ids.length] = id;\r\n}\r\n\r\nreturn ids.join(',');\r\n}\r\n\r\nfunction getCategoryObject() {\r\nreturn {\r\n 'page:url': getUrl(),\r\n 'items:ids': getItemIdsCat()\r\n};\r\n}\r\n\r\nfunction initializeCategoryEvents() {\r\nvar categoryObj;\r\n\r\nbouncex.et.onTrue(\r\n function () {\r\n categoryObj = getCategoryObject();\r\n return (\r\n !!categoryObj['items:ids'].length && !!categoryObj['page:url']\r\n );\r\n },\r\n function () {\r\n bouncex.push(['view category', categoryObj]);\r\n },\r\n 10\r\n);\r\n}\r\n\r\n/* ------------------------------- CART EVENTS ------------------------------ */\r\nfunction fireAddToCart(itemId) {\r\nbouncex.push(['add to cart', { 'item:id': itemId }]);\r\n\r\nif (bouncex.vars.cart) {\r\n return;\r\n}\r\n\r\nsetVarAndCookie('cart', true);\r\n}\r\n\r\nfunction trackGlobalAtc() {\r\nvar url = getUrl();\r\nif (url.indexOf('gift-cards') > -1) {\r\n return;\r\n}\r\nbouncex.et.onVisible('.addedToBagWrapper', function (elem) {\r\n var product = jQuery(elem).find('.product img.product-image').attr('src').replace(/.jpg|.png|.jpeg/g, '');\r\n var itemId = formatItemId(product);\r\n if (itemId) {\r\n fireAddToCart(itemId);\r\n }\r\n});\r\n}\r\n\r\nfunction emptyCart() {\r\nbouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\r\n if (bouncex.vars.cart && newVal === 0 && oldVal > 0) {\r\n bouncex.push(['empty_cart']);\r\n setVarAndCookie('cart', false);\r\n }\r\n});\r\n}\r\n\r\nfunction isValidEmptyCart() {\r\nreturn (\r\n bouncex.vars.cart_qty === 0 &&\r\n !bouncex.utils.url.getParam('bx_cart') &&\r\n !bouncex.utils.getParam('bx_replen')\r\n);\r\n}\r\n\r\nfunction initializeCartEvents() {\r\nbouncex.et.cart.init({\r\n replenish: function () {},\r\n replenishmentType: 'single'\r\n});\r\n\r\nemptyCart();\r\n\r\n// to handle universal cart edge cases\r\nif (bouncex.vars.cart) {\r\n bouncex.setTimeout2(function () {\r\n if (isValidEmptyCart()) {\r\n bouncex.push(['empty_cart']);\r\n setVarAndCookie('cart', false);\r\n }\r\n }, 2500);\r\n}\r\n}\r\n\r\n/* ------------------------------ QUICKVIEW ----------------------------- */\r\nfunction initializeQuickviewEvents() {\r\nvar item = {};\r\nbouncex.et.onVisible('.TCPModal__InnerContent', function (elem) {\r\n var url = jQuery(elem).find('a.link-redirect').attr('href'),\r\n itemId = formatItemId(url);\r\n\r\n if (itemId) {\r\n item.id = itemId;\r\n item.groupId = itemId;\r\n\r\n }\r\n});\r\n}\r\n\r\n/* ------------------------------ USER TRACKING ----------------------------- */\r\nfunction trackUserEmail() {\r\nvar userEmail;\r\nif (getUrl().indexOf('login') > -1) {\r\n jQuery('.login-button-test-class').click(function () {\r\n if (jQuery('#textbox__error__emailAddress').text().length === 0 && jQuery('.sc-jrQzAO.cHXcMQ.richTextColor').length === 0) {\r\n userEmail = jQuery('#emailAddress').val();\r\n localStorage.setItem('userEmail', userEmail);\r\n }\r\n });\r\n}\r\n}\r\n\r\nfunction initializeUserTracking() {\r\nvar userEmail;\r\ntrackUserEmail();\r\n\r\nbouncex.et.onTrue(\r\n function () {\r\n userEmail = localStorage.getItem('userEmail') || jQuery('span.sc-dkPtRN.epAOJm[data-locator=\"emailValue\"]').text();\r\n return (\r\n userEmail &&\r\n bouncex.utils.validate.email(userEmail) &&\r\n bouncex.vars.logged_in &&\r\n !bouncex.vars.logged_in_identified\r\n );\r\n },\r\n function () {\r\n bouncex.push([\r\n 'user',\r\n {\r\n email: userEmail,\r\n source: 'LoggedIn'\r\n },\r\n ]);\r\n setVarAndCookie('logged_in_identified', true);\r\n }\r\n);\r\n}\r\n\r\n/* --------------------------- Triggering BW from Native Footer Submit and from \"/content/email-subscribe\" page -------------------------- */\r\nfunction initializeNativeEmailSubmit() {\r\nbouncex.off(jQuery(document), 'click.bx', 'button.candidate_a_form_button');\r\nbouncex.on(jQuery(document), 'click.bx', function () {\r\n var userEmail = jQuery('input#signup').attr('value');\r\n bouncex.setTimeout2(function () {\r\n if (bouncex.utils.validate.email(userEmail) && jQuery('.warning-icon').length === 0) {\r\n fireRequestEmail(userEmail);\r\n }\r\n }, 1000);\r\n },\r\n 'button.candidate_a_form_button'\r\n);\r\n\r\nif (getUrl().indexOf('email-subscribe')) {\r\n bouncex.et.on(\r\n bouncex.document,\r\n 'click.bx',\r\n function () {\r\n var emailForm = jQuery(this).closest('.emailform__content'),\r\n userEmail = emailForm.find('input#modal_signup').val();\r\n\r\n if (bouncex.utils.validate.email(userEmail)) {\r\n fireRequestEmail(userEmail);\r\n }\r\n },\r\n '.join-button'\r\n );\r\n}\r\n}\r\n\r\nfunction fireRequestEmail(userEmail) {\r\nbouncex.push([\r\n 'requestemail',\r\n {\r\n email: userEmail,\r\n campaignId: '1513664',\r\n testmode: bouncex.testmode.bxdev ? 1 : 0\r\n },\r\n]);\r\n}\r\n\r\n/* --------------------------- Custom Save For Later Cart Event -------------------------- */\r\n\r\nfunction trackSaveForLater() {\r\nvar saveForLaterSelectors = 'button[data-locator=\"Save For Later\"], li:has(.save-for-later-icon)',\r\n itemId,\r\n itemUrl;\r\n\r\nbouncex.et.onVisible(saveForLaterSelectors, function (el) {\r\n if (bouncex.state.mobile) {\r\n var upc = jQuery(el).closest('ul').find('div[data-locator=\"cartItemUpc\"]').text().trim().replace('UPC: ','');\r\n itemUrl = jQuery('img[unbxdparam_sku=\"' + upc + '\"]').closest('.newCartTile').find('.imageWrapper a').attr('href') || '';\r\n itemId = formatItemId(itemUrl);\r\n }\r\n\r\n bouncex.off(bouncex.document, 'click.bx', saveForLaterSelectors);\r\n bouncex.et.on(bouncex.document, 'click.bx', function(e) {\r\n if (!bouncex.state.mobile) {\r\n itemId = formatItemId((jQuery(e.target).parents('.product-tile-wrapper').find('.imageWrapper a').attr('href') || '').split('/').pop().split('?')[0]);\r\n }\r\n\r\n if (itemId) {\r\n bouncex.push(['saveforlater', {\r\n 'item:id' : itemId\r\n }]);\r\n }\r\n }, saveForLaterSelectors);\r\n});\r\n}\r\n\r\n\r\n/* --------------------------- Custom Cancel Event -------------------------- */\r\nfunction initializeCustomCancelEvent() {\r\nif (bouncex.utils.url.getParam('instore_coupon', window.location.href)) {\r\n bouncex.push(['used_coupon', {}]);\r\n bouncex.push(['visit', { 'customer:hasconverted': 1 }]);\r\n}\r\n}\r\n\r\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\r\n\r\nfunction isValidDomain() {\r\nreturn getUrl().indexOf(config.domain_origin) > -1;\r\n}\r\n\r\nfunction isEn() {\r\nreturn jQuery('html').attr('lang') === 'en';\r\n}\r\n\r\nfunction isValidForTracking() {\r\nreturn isValidDomain() && isEn();\r\n}\r\n\r\nfunction init() {\r\nif (!isValidForTracking()) {\r\n return;\r\n}\r\n\r\ninitializeUserTracking();\r\ninitializeCartEvents();\r\ninitializeQuickviewEvents();\r\ninitializeNativeEmailSubmit();\r\ninitializeCustomCancelEvent();\r\ntrackGlobalAtc();\r\n \r\n\r\n\r\n\r\nswitch (bouncex.website.pts) {\r\n case 'category':\r\n initializeCategoryEvents();\r\n break;\r\n case 'product':\r\n initializeItemEvents();\r\n initializeSkuEvents();\r\n break;\r\n case 'search':\r\n initializeCategoryEvents();\r\n break;\r\n case 'cart':\r\n trackSaveForLater();\r\n break;\r\n default:\r\n break;\r\n}\r\n}\r\n\r\ninit();","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/bag"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"test-uat"}]]},"category":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/c/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/outfit"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/review"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/confirmation"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/billing"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/pickup"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/us/home';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"test-uat"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/p"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/gift-cards"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/place-card"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/search/"}]]}},"els":null,"vars":[{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if(bouncex.website.pts === 'checkout') {\n return null;\n }\n return jQuery('#accountDrawer').length > 0;\n})();","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"(function() {\n if(bouncex.website.pts === \"checkout\"){\n var regExp = /\\(([^)]+)\\)/,\n matches = regExp.exec(jQuery('[data-locator=\"myBagHdr\"]').text());\n return Number(matches[1]);\n }\n return Number(jQuery('.cartCount').eq(0).text());\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n if (jQuery('.estd-total-label').length) {\n return Number(jQuery('.estd-total-label').text().replace(/[^0-9.]/g, ''));\n }\n else if (jQuery('.items-total p:not([data-locator=\"orderLedgerCount\"])').length) {\n return Number(jQuery('.items-total p:not([data-locator=\"orderLedgerCount\"])').text().replace(/[^0-9.]/g, ''));\n }\n else if (jQuery('.cartCount, .cart-count').length && Number(jQuery('.cartCount, .cart-count').eq(0).text()) === 0) {\n return 0;\n }\n else if(jQuery('.addedToBagWrapper').length){\n return Number(jQuery('.addedToBagWrapper div[data-locator=\"addedtobag-bagsubtotal\"] p').text().replace(/[^0-9.]/g, ''));\n }\n else {\n return null;\n }\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"Number(jQuery('.product-summary-wrapper .price-item.actual-price:first').text().replace(/[^0-9.]/g, ''));","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('h2.product-title').contents().get(0).nodeValue.trim();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.outfit-button-wrapper > .button-wrapper > div > button:enabled').length > 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.thank-you__label, #sign-up-modal-form-intro-view').length > 0 || null;\n","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"has_20_off_coupon","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.isObject(bouncex.cookie.cpn) && (bouncex.cookie.cpn['20_off'] || bouncex.cookie.cpn['25_off'] || bouncex.cookie.cpn['25_off_2024'] || bouncex.cookie.cpn['30_off_2024']) || null;","trigger":"pageload"},{"name":"user_identified_ibx","polling":"vars","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.cookie.uid === 1 || bouncex.utils.url.getParam('utm_source') === \"wunderkind\" || !!bouncex.utils.url.getParam('om_rid') || !!bouncex.utils.url.getParam('ueh') || null;","trigger":"pageload"},{"name":"click_thru_cpn","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","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":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"bxid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"SinglePageApp.setCustomParams({\n currentPageIdentifier: function() {\n return window.location.href;\n }\n});\n\n(function(){\n /* wrike 783331164: cookie coupon from ibx clickthrough */\n var couponCode = bouncex.utils.url.getParam('coupon');\n if (couponCode.length > 0 && couponCode.indexOf('') === -1 && bouncex.utils.url.getParam('utm_source') === \"wunderkind\") {\n bouncex.updateBounceCookie(function (cookie) {\n if (!cookie) return;\n cookie.cpn = bouncex.utils.isObject(cookie.cpn) ? cookie.cpn : {};\n cookie.cpn['20_off'] = couponCode;\n });\n }\n})();","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":["AW","AI","AG","AR","BS","BB","BZ","BM","BO","BQ","BR","CA","KY","CL","CO","CR","CU","CW","DM","DO","EC","SV","GF","GL","GD","GT","GP","HT","HN","JM","MQ","MX","MS","NI","PA","PY","PE","PR","PM","MF","BL","KN","LC","VC","SX","SR","TT","US","UM","UY","VE","VG","VI"],"fme":true,"fmx":"","uid2":false,"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,"devMode":0},"ga4_property_id":"","ga4_measurement_id":"","tag_state_domain":"api.bounceexchange.com","tag_state_domain_enabled":false} ; 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: 1 }; bouncex.assets = {"ads":"ba8ae19a5bf9548f3d50df1e54121805","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"c5ffeacd3b77d074a53f2878c1332dc9","onsite":"c05f8c5551fa6b964660ad61916291c1","sms":"e39203556bab2366e56296ce42e974a7","websdk":"9c2817e65e803cb8c86d0410c88f20c1","website_campaigns_4825":"37c595d00e1a82c52bcbb0e8b078474b"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_c81e76ee00d795b1eebf8d27949f8dc5.br.js'); runtime.setAttribute('async', 'async'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_593c276f770cc7539a00ca1a99a96e5c.br.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_c84323e2726f3e99b307ab7740c6434b.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() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();