(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":1769,"name":"The Popcorn Factory (1800 Flowers)","cookie_name":"bounceClientVisit1769","domain":"thepopcornfactory.com","ct":"fp_local_storage","ally":0,"ei":1,"tcjs":"","cjs":"// GO: Remove historical single-tag cookie if it's present (wrike 169705130)\nif (bouncex.vars.bx_test && !jQuery.isEmptyObject(bouncex.getBounceCookie('bounceClientVisit1622'))) {\n bouncex.ibx._cookies.destroy('bounceClientVisit1622');\n}\n\nif (bouncex.vars.cart_qty === 0) {\n bouncex.setVarAndReload('cart_images', false);\n}\nvar atcSuccess = function() {\n return bouncex.website.pts === 'category' ? !!jQuery('img[alt=\"product\"][data-component=\"itemImage\"]').attr('src') : bouncex.vars.atc_success;\n },\n concatImgUrl = function() {\n var data = !!bouncex.parseJSON(localStorage.getItem('persistPageData'), {'product' : { 'image' : '' }}).product && bouncex.parseJSON(localStorage.getItem('persistPageData'), {'product' : { 'image' : '' }}).product.image,\n image = jQuery('div[data-pagetype=\"product\"] div[data-component=\"graphqlProductImageUi\"] div#responsive-wrapper picture img').attr('src') || '';\n \n if (image.length > 0 && image.indexOf('https') === -1) {\n var formattedImage = 'https:' + image;\n image = bouncex.utils.url.allowParams([], formattedImage);\n }\n\n var URL = !!data && data.name !== null ? 'https:'+ data.path+data.name +'z.jpg' : image,\n quickViewURL = jQuery('img[alt=\"product\"][data-component=\"itemImage\"]').attr('src') || '';\n \n if (URL === '' && quickViewURL !== '') {\n URL = getPathFromUrl(quickViewURL);\n }\n bouncex.log('url', URL);\n if (bouncex.vars.cart_images === false) {\n bouncex.setVarAndReload('cart_images', URL);\n } else {\n bouncex.setVarAndReload('cart_images', bouncex.vars.cart_images + ',' + URL);\n }\n bouncex.log('cartimages', bouncex.vars.cart_images);\n },\n getPathFromUrl = function(url) {\n return url.split(\"?\")[0];\n };\nbouncex.et.onTrue(atcSuccess, concatImgUrl, 60);","force_https":false,"waypoints":false,"content_width":1039,"gai":"UA-43044033-21","swids":"1767&1770&1771&1772&2586&2604","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":[{"prop":"contains","val":"-uat.net"},{"prop":"regex_match","val":".+miso.saucelabs.com"},{"prop":"regex_match","val":".+tunnels.us-west-4-i3er.saucelabs.com"}],"ple":false,"fbe":false,"ffs":"DISABLE_IOS_ABSOLUTE","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var PROPERTY_NAME = 'thepopcornfactory',\n\tVALID_DOMAIN = 'www.thepopcornfactory.com',\n\tATC_BUTTON_SELECTOR = '#pwaAddToCartBtn',\n\tBREADCRUMB_SELECTOR = 'div#product_page_container ol li',\n\tCANONICAL_URL = 'link[rel=\"canonical\"]',\n\tLOG_IN_SELECTOR = '#signInDropdown div:contains(\"Sign In\")',\n\tEMAIL_SELECTOR = 'span:contains(\"Email:\"):first',\n\tLISTPAGE_TILE_SELECTOR = 'a[data-test=\"desktop-collection-product\"]',\n\tEMPTY_CART_TEXT = '[data-test=\"shopping-cart-header-text\"]:contains(\"Your shopping cart is currently empty.\"), div[data-component=\"orderSubtotal\"]:contains(\"$0.00\")',\n\tCATEGORY_PAGE_TITLE = 'div[data-testid*=\"-imoc\"] h1',\n\tQUICKVIEW_SELECTOR = '.MuiPaper-root.MuiCard-root.MuiPaper-outlined.MuiPaper-rounded';\n\n\n/******** helper functions *********/\nfunction isValidProperty() {\n\tvar currentBrand = bouncex.utils.getNestedProp('window.utag_data.brand_current'),\n\t\tpropertyMap = {\n\t\t\t'18F': '1800flowers',\n\t\t\t'18B': '1800baskets',\n\t\t\t'FB': 'fruitbouquets',\n\t\t\t'CCO': 'cheryls',\n\t\t\t'FM': 'fanniemay',\n\t\t\t'TPF': 'thepopcornfactory',\n\t\t\t'SY': 'stockyards',\n\t\t\t'WM': 'wolfermans',\n\t\t\t'WLF': 'wolfermans',\n\t\t\t'HD': 'harryanddavid',\n\t\t\t'SCH': 'simplychocolate',\n\t\t\t'PZU': 'personalizationuniverse',\n\t\t\t'TMP': 'goodsey',\n\t\t};\n\n\tif (currentBrand) {\n\t\treturn propertyMap[currentBrand] === PROPERTY_NAME && window.location.hostname === VALID_DOMAIN;\n\t}\n}\n\nfunction getUrl() {\n\treturn bouncex.utils.url.allowParams();\n}\n\nfunction isEnglish() {\n\treturn jQuery('html').attr('lang') === 'en';\n}\n\nfunction buildImg(itemData) {\n\treturn 'https:' + itemData.image.path + itemData.image.name + 'x.jpg';\n}\n\nfunction isInStock(itemData) {\n\treturn jQuery(ATC_BUTTON_SELECTOR).is(':enabled') || itemData.availability.deliveryMessage === \"AVAILABLE TO SHIP NOW\";\n}\n\nfunction getProductCategory() {\n\tvar category = jQuery(BREADCRUMB_SELECTOR).eq(-2).text().trim(),\n\t\tstate = bouncex.utils.getNestedProp('window.history.state');\n\tprevUrl = state ? bouncex.utils.getNestedProp('window.history.state.state.prevUrl') : null;\n\n\tif (category === 'Home' || (prevUrl && prevUrl.indexOf('/searchterm') > -1)) {\n\t\tcategory = 'Global';\n\t}\n\n\treturn category || 'Global';\n}\n\nfunction getCategoryPageTitle(eventDetails) {\n\tvar title;\n\n\tif (bouncex.website.pts === 'search') {\n\t\ttitle = eventDetails.searchTerm;\n\t}\n\n\treturn title || eventDetails.title || jQuery(CATEGORY_PAGE_TITLE).text().trim() || '';\n}\n\nfunction isExcluded(productName) {\n var EXCLUSIONS = ['FUNERAL', 'MEMORIAL', 'SYMPATHY FOR THE HOME', 'LOSS', 'CONDOL', \n 'DEATH', 'SYMPATHY', 'SORROW', 'PASSING', 'MEMORIAL', 'PEACE', 'GET WELL', 'SYMP'];\n\n for (var i = 0; i < EXCLUSIONS.length; i++) {\n var excludedWord = EXCLUSIONS[i].toLowerCase();\n if (productName.toLowerCase().includes(excludedWord)) {\n return true;\n }\n }\n \n\treturn bouncex.utils.getNestedProp('utag.data.product_has_wine[0]', '') === 'yes';\n}\n\nfunction replaceSpecialChars(text) {\n\t// changes special characters into corresponding HTML entity to display properly in emails\n \n var encodedStr = text.replace(/[\\u00A0-\\u9999<>]/g, function(i) {\n return '&#'+i.charCodeAt(0)+';';\n });\n\n\treturn encodedStr;\n}\n\n/******** start item tracking *********/\nfunction trackPDP(itemData) {\n\titem = {\n\t\tid: itemData.baseCode,\n\t\tcopy: replaceSpecialChars(itemData.name),\n\t\tcategory: getProductCategory(),\n\t\timageurl: buildImg(itemData),\n\t\turl: window.location.origin + itemData.seo.url,\n\t\tinstock: isInStock(itemData),\n\t\texcluded: isExcluded(replaceSpecialChars(itemData.name))\n\t};\n\tif (item.id) {\n\t\tbouncex.push(['item', item]);\n\t\tbouncex.push(['view item', {\n\t\t\t'item:id': item.id,\n\t\t}]);\n\t\ttrackAddToCart(item.id);\n\t}\n}\n\n/******** category tracking *********/\nfunction getCategoryItemId(itemUrl) {\n\tvar itemUrlArr = itemUrl.split('-');\n\tvar itemId = itemUrlArr[itemUrlArr.length - 1];\n\tvar validId = /^\\d+$/.test(itemId);\n\n\treturn validId ? itemId : '';\n}\n\nfunction trackHoverItem() {\n\tbouncex.et.onHover(LISTPAGE_TILE_SELECTOR, function (el) {\n\t\tvar itemUrl = jQuery(el).attr('href');\n\t\tvar itemId = getCategoryItemId(itemUrl);\n\n\t\tif (itemId) {\n\t\t\tbouncex.push(['hover item', {\n\t\t\t\t'item:id': itemId\n\t\t\t}]);\n\t\t}\n\t});\n}\n\nfunction getItemsIds(products) {\n\tvar items = products || jQuery(LISTPAGE_TILE_SELECTOR);\n\tvar itemIds = [];\n\tvar id;\n\n\tfor (var i = 0; i < items.length; i++) {\n\t\tid = products ? items[i].baseCode : getCategoryItemId(jQuery(items[i]).attr('href'));\n\n\t\tif (id && !itemIds.includes(id)) {\n\t\t\titemIds.push(id);\n\t\t}\n\t}\n\n\treturn itemIds.join(',');\n}\n\nfunction trackViewCategory(eventDetails) {\n\tvar itemIds = getItemsIds(eventDetails.products);\n\n\tif (itemIds && itemIds.length > 0) {\n\t\tbouncex.push(['view category', {\n\t\t\t'page:title': getCategoryPageTitle(eventDetails),\n\t\t\t'items:ids': itemIds,\n\t\t\t'page:url': getUrl()\n\t\t}]);\n\t}\n}\n\n/******** track Add To Cart *********/\nfunction trackAddToCart(itemId) {\n\tif (itemId) {\n\t\tbouncex.off(jQuery(ATC_BUTTON_SELECTOR), 'click.bx');\n\t\tbouncex.on(jQuery(ATC_BUTTON_SELECTOR), 'click.bx', function () {\n\t\t\tbouncex.push(['add to cart', {\n\t\t\t\t'item:id': itemId,\n\t\t\t}]);\n\n\t\t\tif (!bouncex.vars.cart_set) {\n\t\t\t\tbouncex.setVarAndReload('cart_set', true);\n\t\t\t}\n\t\t});\n\t}\n}\n\n/******** quickview tracking *********/\nfunction trackQuickview() {\n\tvar quickviewItemId,\n\t\tquickviewId;\n\n\tjQuery('span[id^=\"quickview_button_\"]').click(function () {\n\t\tquickviewId = jQuery(this).attr('id')\n\t\tquickviewItemId = quickviewId ? quickviewId.replace(\"quickview_button_\", \"\") : '';\n\t});\n\n\tbouncex.et.onVisible(QUICKVIEW_SELECTOR, function (elem) {\n\t\tvar itemUrl = elem.find('a:contains(\"See Details\")').attr('href'),\n\t\t\titemIdFromUrl = itemUrl ? getCategoryItemId(itemUrl) : false,\n\t\t\titemId = itemIdFromUrl ? itemIdFromUrl : getCategoryItemId(quickviewItemId);\n\n\t\tif (itemId) {\n\t\t\tbouncex.push(['view item', {\n\t\t\t\t'item:id': itemId,\n\t\t\t}]);\n\t\t\ttrackAddToCart(itemId);\n\t\t}\n\t});\n}\n\n/*************** Empty Cart Tracking ***************/\nfunction trackEmptyCart() {\n\tbouncex.et.onVisible(EMPTY_CART_TEXT, function () {\n\t\tbouncex.push(['empty_cart', {}]);\n\t\tbouncex.setVarAndReload('cart_set', false);\n\t});\n}\n\n/*************** Cart Tracking ***************/\nfunction initCartTracking() {\n\tbouncex.et.cart.init({\n\t\treplenish: function () { },\n\t\treplenishmentType: 'single'\n\t});\n\tif (bouncex.website.pts === 'cart' && bouncex.vars.cart_set) {\n\t\ttrackEmptyCart();\n\t}\n}\n\n/******** Track LoggedIn User *********/\nfunction getUserEmailFromCookie() {\n\treturn bouncex.parseJSON(decodeURIComponent(bouncex.getBounceCookie(\"persisted_user_profile\")), { email: \"\" }).email;\n}\n\nfunction trackLoggedInUser() {\n\tif (bouncex.vars.logged_in_identified) {\n\t\treturn;\n\t}\n\n\tif (bouncex.vars.logged_in) {\n\t\tfireLoggedInUser();\n\t}\n\n\tbouncex.et.onVarChange(\"logged_in\", function (oldVal, newVal) {\n\t\tif (newVal) {\n\t\t\tfireLoggedInUser();\n\t\t}\n\t});\n\n\treturn;\n}\n\nfunction fireLoggedInUser() {\n\tbouncex.et.onTrue(function () {\n\t\temail = getUserEmailFromCookie();\n\t\treturn bouncex.utils.validate.email(email);\n\t}, function () {\n\t\tbouncex.push(['user', {\n\t\t\temail: email,\n\t\t\tsource: 'LoggedIn'\n\t\t}]);\n\t\tbouncex.setVarAndReload('logged_in_identified', true);\n\t}, 5);\n\treturn;\n}\n\n/******** itiniate tracking code *********/\nfunction initiateItemEvents() {\n\tvar eventDetails, products;\n\n\tbouncex.et.onTrue(\n\t\tfunction () {\n\t\t\teventDetails = bouncex.utils.getNestedProp('window.mbpDataLayerView');\n\t\t\tproducts = eventDetails ? eventDetails.products || jQuery(LISTPAGE_TILE_SELECTOR) : false;\n\t\t\treturn eventDetails && products;\n\t\t},\n\t\tfunction () {\n\t\t\tif (bouncex.website.pts === 'product') {\n\t\t\t\ttrackPDP(products[0]);\n\t\t\t}\n\t\t\tif (bouncex.website.pts === 'category' || bouncex.website.pts === 'search') {\n\t\t\t\ttrackViewCategory(eventDetails);\n\t\t\t\ttrackHoverItem();\n\t\t\t\ttrackQuickview();\n\t\t\t}\n\t\t},\n\t\t20);\n}\n\nfunction initPassportTracking() {\n\tif (bouncex.vars.is_passport_member) {\n\t\tbouncex.push(['passport_member']);\n\t}\n}\n\n/******** itiniate event listeners *********/\nif (isValidProperty() && isEnglish()) {\n\tbouncex.setTimeout2(function () {\n\t\tinitCartTracking();\n\t\ttrackLoggedInUser();\n\t\tinitiateItemEvents();\n\t\tinitPassportTracking();\n\t}, 1000);\n}","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(\"/AjaxCheckoutDisplayView\") != -1 || jQuery('.ECP-emptycart').length > 0;"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"www.thepopcornfactory.com/checkout/cart/"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\n var pageType = jQuery('#pagetype').attr('data-pagetype') \n || jQuery('div[data-pagetype]').attr(\"data-pagetype\")\n || \"\";\n return pageType.toLowerCase() === 'category';\n})();"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('br_data.ptype', false) === 'category';"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.mbpDataLayerView && window.mbpDataLayerView.pageType === 'category';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/account/orders"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/contact-us-thepopcornfactory"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/About-Us-Terms-of-Use"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/frequently-asked-questions"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/shipping-information-thepopcornfactory"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/About-Us-Privacy-Policy"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/passport-popcorn"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/tpf-sweepstakes"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"thepopcornfactory.com/vegan-friendly"}]]},"checkout":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"(window.location.pathname === \"/webapp/wcs/stores/servlet/FDRecipientsDisplayCmd\" || jQuery('.BP-billing-address,.CP-chkCollapsed,.mw-checkout-steps,.BP-Delivery-header,#showcheckoutPpBanner').length > 0) && window.location.pathname.indexOf(\"/AjaxCheckoutDisplayView\")<=-1||jQuery('.ECP-emptycart').length < 0;"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"www.thepopcornfactory.com/checkout/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"www.thepopcornfactory.com/webapp/wcs/stores/servlet/FDPlaceOrderDisplayCmd"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"www.thepopcornfactory.com/checkout/cart/"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.thepopcornfactory.com\"]').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.thepopcornfactory.com/\"]').length > 0;"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!document.querySelectorAll('[data-pagetype=\"product\"]').length;"}]]},"search":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === \"/SearchDisplay\";"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"www.thepopcornfactory.com/searchterm/"}]]}},"els":{"mobile_category_6th_row":"#productContainer div.MuiGrid-container:not(.MuiGrid-direction-xs-column) > .MuiGrid-root.MuiGrid-item:eq(11)","sign_in_button":"div[role=\"button\"][class*=\"mbp\"]:contains(\"Sign In\")"},"vars":[{"name":"submitted_ecap_footer","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"window.bouncex.vars.logged_in || null;","trigger":""},{"name":"chat_modal_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!jQuery('[name^=\"lpInviteLayer\"][style*=\"visible\"]').length;\n","trigger":""},{"name":"survey_modal_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!jQuery('.fsrFloatingContainer').length;\n","trigger":""},{"name":"zipcode_modal_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!jQuery('#TB_window').length && bouncex.getBounceCookie(\"showGNavModel\") === \"Y\";","trigger":""},{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('profile.membershipType', false, bouncex.parseJSON(window.localStorage.getItem('userInfo'))) !== 'G';","trigger":""},{"name":"value_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n var itemsInCart = Number(jQuery('#global_header_container [data-component=\"renderLogoRow\"] a:last span:last').text().replace(/[^0-9.]/g, '')) > 0 || Number(jQuery('a[alt=\"icon-cart-mobile\"]').text().replace(/[^0-9.]/g, '')) > 0;\n \n if(jQuery(\"#minicart b:contains('Subtotal')\").length > 0) {\n return Number(jQuery(\"#minicart b:contains('Subtotal')\").closest('div').text().replace(/[^0-9.]/g,''));\n }\n \n if(window.location.href.indexOf('/checkout') == -1) {\n return null;\n }\n \n if(window.location.href.indexOf('/checkout') > -1) {\n var total = jQuery(\"#pwa-universal b:contains('Order Total')\").parent().parent().text() || jQuery('#orderTotalPrice').text();\n if(total.length > 0) {\n return Number(total.replace(/[^0-9.]/g,''));\n }\n if(itemsInCart) {\n return null;\n } \n return 0;\n }\n return null;\n})()","trigger":""},{"name":"items_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function () {\n if(window.location.href.indexOf('cart') > -1) {\n return Number(jQuery('a[alt=\"icon-cart-mobile\"]').text().replace(/[^0-9]/g,'')) || Number(jQuery('.MuiGrid-root.MuiGrid-item:contains(\"Cart Summary\")').first().find('div:contains(\"Items\")').last().text().replace(/[^0-9.]/g,'')); \n }\n if(window.location.href.indexOf('checkout') > -1 || window.location.href.indexOf('cart') > -1) {\n var qty = 0;\n if(jQuery('#quantitySelector').length > 0) {\n jQuery('#quantitySelector').each(function(i){\n qty+= Number(jQuery(this).val());\n })\n }\n return Number(jQuery('.MuiGrid-root.MuiGrid-item:contains(\"Cart Summary\")').first().find('div:contains(\"Items\")').last().text().replace(/[^0-9.]/g,'')) || qty;\n }\n return Number(jQuery('[aria-label=\"Cart-icon\"]').text().replace(/[^0-9.]/g, ''));\n})();","trigger":""},{"name":"is_passport_member","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var userInfo = window.localStorage.getItem('userInfo');\n var userParsed = bouncex.parseJSON(userInfo);\n if(userInfo) {\n return bouncex.utils.getNestedProp('profile.userRole', null, userParsed) === 'P' || null;\n } else { \n return null; \n }\n})();","trigger":""},{"name":"category_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(jQuery('#pagetype').attr('data-pagetype') || '').toLowerCase() === 'category';","trigger":""},{"name":"product_page","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product';","trigger":""},{"name":"passport_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (window.location.href.indexOf('/checkout/') > -1 && window.location.href.indexOf('/shipping/') === -1) {\n return jQuery('#passportOrderItem').length > 0 || jQuery('[data-test=\"checkout-passport-order-item\"]').length > 0;\n } else if (bouncex.website.pts === 'product') {\n if (window.location.href.indexOf('/wrap-up') > -1) {\n return null;\n } \n return jQuery('#passport-banner-section:contains(\"passport\"):contains(\"has been added to your cart\")').length > 0;\n }\n return null;\n})();","trigger":""},{"name":"bx_test","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('bx_test') > -1 || null;","trigger":""},{"name":"purchased","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.vars.purchased || bouncex.cookie.lc) {\n return true;\n }\n\n var property = 'popcornfactory';\n var historicalSite = 1622;\n if (bouncex.cookies && bouncex.cookies[historicalSite] && bouncex.cookies[historicalSite].v && bouncex.cookies[historicalSite].v['previous_customer_'+ property]){\n return true;\n }\n})();","trigger":""},{"name":"submitted_email","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var websites = bouncex.cookies;\n for (var site in websites) {\n if (bouncex.cookies[site].es || (bouncex.cookies[site].v && bouncex.cookies[site].v.submitted_ecap_footer)) {\n return true;\n }\n }\n return false;\n})();","trigger":""},{"name":"passport_member","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var userInfo = window.localStorage.getItem('userInfo');\n var userParsed = bouncex.parseJSON(userInfo);\n if(userInfo) {\n return bouncex.utils.getNestedProp('profile.userRole', false, userParsed) === 'P';\n } else { \n return false; \n }\n})();","trigger":""},{"name":"property","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function (){\n \n var propertyMapping = {\n\t '18F': '1800flowers',\n\t '18B': '1800baskets',\n\t 'FB': 'fruitbouquets',\n\t 'CCO': 'cheryls',\n\t 'FM': 'fanniemay',\n\t 'TPF': 'thepopcornfactory',\n\t 'SY': 'stockyards',\n\t 'WM': 'wolfermans',\n\t\t'WLF': 'wolfermans',\n\t 'HD': 'harryanddavid',\n\t\t'SCH': 'simplychocolate',\n\t\t'PZU': 'personalizationuniverse',\n\t\t'TMP': 'goodsey',\n\t};\n\n if (window.utag_data && window.utag_data.brand_current) {\n return propertyMapping[window.utag_data.brand_current];\n } else if (window.fsDomain && typeof fsDomain !== undefined) {\n return propertyMapping[window.fsDomain];\n } else if (jQuery('link[rel=\"canonical\"]').length > 0) {\n var flowers = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('1800flowers') > -1;\n var goodsey = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('goodsey') > -1;\n var harryDavid = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('harryanddavid') > -1;\n var personalization = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('personalization') > -1;\n var chocolate = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('chocolate') > -1;\n var wolferman = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('wolferman') > -1;\n if (flowers) {\n return '1800flowers';\n }\n if (goodsey) {\n return 'goodsey'; \n }\n if (harryDavid) {\n return 'harryanddavid';\n }\n if (personalization) {\n return 'personalizationuniverse'; \n } \n if (chocolate) {\n return 'simplychocolate'; \n } \n if (wolferman) {\n return 'wolfermans'; \n } \n \n } else {\n return null;\n }\n})();\n\n","trigger":"pageload"},{"name":"content_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(jQuery('#pagetype').attr('data-pagetype') || '').toLowerCase() === 'content';","trigger":""},{"name":"shipping_charge","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#BP-totals .BP-total-label .BP-row:eq(1)').find('.BP-PaddingSpace.BP-col2').text().trim().replace(/[^0-9\\.]/g,'')","trigger":""},{"name":"passport_diff","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(29.99-bouncex.vars.shipping_charge).toFixed(2);","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('div.multiSkuSelection, div.singleSkuSelection').find(':checked').attr('skuactualprice');","trigger":"pageload"},{"name":"prod_name","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('h1[itemprop=\"name\"]').text() || false;","trigger":"pageload"},{"name":"items_plural","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.vars.items_in_cart === 1) {\n return 'item';\n } else if (bouncex.vars.items_in_cart > 1) {\n return 'items';\n }\n})();","trigger":"pageload"},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('#EmailSentHP:contains(signed up)').is(':visible') || null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"user_tracked","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"is_popcorn_factory_domain","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() { return window.location.hostname === \"www.thepopcornfactory.com\" || window.location.hostname === \"m.www.thepopcornfactory.com\" })();","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","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":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n switch (true) {\n case window.location.href.indexOf('cart') > -1:\n return Number(jQuery('span.MuiTypography-root, [id*=\"orderContainer\"] p.MuiTypography-root').first().text().split('of').pop().replace(/[^0-9.]/g,''));\n case window.location.href.indexOf('checkout') > -1:\n return Number(jQuery('h6.MuiTypography-subtitle2, [id*=\"orderContainer\"] p.MuiTypography-root').first().text().split('of').pop().replace(/[^0-9.]/g,''));\n default:\n return Number(jQuery('[aria-label=\"Cart-icon\"]').text().replace(/[^0-9.]/g, ''));\n }\n})();","trigger":"pageload"},{"name":"cart_images","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (bouncex.website.pts === 'checkout' || bouncex.website.pts === 'cart' && jQuery('img[alt=\"product\"]').length) {\n var imgArr = [];\n jQuery('img[alt=\"product\"]').each(function(index, img) {\n //var itemID = jQuery('p[name=\"orderItemSku\"]').eq(index).text();\n //imgObj[itemID];\n imgArr.push(img.src);\n });\n //return (Object.values(imgObj).length && Object.values(imgObj).join(',')) || null;\n return (imgArr.length > 0 && imgArr.join(',')) || null;\n }\n return null;\n})();","trigger":"pageload"},{"name":"atc_success","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var desktopATCSuccess = jQuery('div#minicart div[role=\"dialog\"], div.SlideOutMiniCart').length > 0 && jQuery('div#minicart div[role=\"dialog\"], div.SlideOutMiniCart').text(),\n mobileATCSuccess = window.location.href.indexOf('/wrap-up') > -1; \n \n if (!!desktopATCSuccess) {\n return desktopATCSuccess.toLowerCase().indexOf('added to your cart') > -1 || desktopATCSuccess.indexOf('Your Cart') > -1;\n }\n\n return mobileATCSuccess;\n})();","trigger":"pageload"},{"name":"only_donation_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var $products = jQuery('.SlideOutMiniCart h6'),\n onlyDonations = true,\n emptyCart = jQuery('h6').text().toLowerCase().indexOf('empty') > -1;\n\n if (bouncex.website.pts === 'checkout' || bouncex.website.pts === 'cart'){\n var productsArr = bouncex.utils.getNestedProp('utag_data.product_names', []);\n\n productsArr.forEach(function(itemName) {\n if (itemName.toLowerCase().indexOf('donation') === -1){\n onlyDonations = false;\n }\n });\n return emptyCart ? false : onlyDonations;\n } else if ($products.length > 0) {\n $products.each(function() {\n if (jQuery(this).text().toLowerCase().indexOf('donation') === -1){\n onlyDonations = false;\n }\n });\n return onlyDonations;\n }\n\n return null;\n})();","trigger":"pageload"},{"name":"footer_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('[data-emailanchor=\"true\"]').length > 0;","trigger":"pageload"},{"name":"page_type","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","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":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"mi_u":"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 shouldCheckSpa: function() {\n return window.isPWA;\n },\n currentPageIdentifier: function() {\n return bouncex.utils.getNestedProp('window.mbpDataLayerView.pageType', false) || (window.utag && window.utag.data && window.utag.data.page) || window.location.pathname;\n }\n});\n\nbouncex.report_ga = function(action, label, bypass){\n bypass = typeof(bypass)!='undefined' && !!bypass;\n if (typeof(action)!='string'||typeof(label)!='string') return;\n var interaction = false;\n // enforce case convention\n if (!bypass) {\n action = action.charAt(0).toUpperCase() + action.slice(1).toLowerCase();\n interaction = action=='Impression';\n action = 'Wunderkind ' + action;\n }\n if (typeof window.ga === 'function') {\n window.ga('fd_mbp.send','event','Wunderkind',action,label,{'nonInteraction':interaction});\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":["US","CA"],"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":"264915978","ga4_measurement_id":"G-M1D8K6WQPE","tag_state_domain":"api.bounceexchange.com"} ; 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":"4d534e6b043e82ebaef3d95475c5526c","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"04cde0014774b7eb597770595769aab1"}; 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_945f37949f8f8ce4c4244cecb2df29ef.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_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() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();