(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":3846,"name":"Green Chef","cookie_name":"bounceClientVisit3846","domain":"greenchef.com","ct":"bind_to_domain","ally":1,"ei":0,"tcjs":"","cjs":" /** https://www.wrike.com/open.htm?id=425086131 **/\nbouncex.infoStore = {\n sessionStorageIdentifier: 'bxInfoStore',\n set: function(data) {\n var hashedData = bouncex.lz.compressToURI(JSON.stringify(data));\n try {\n sessionStorage.setItem(this.sessionStorageIdentifier, hashedData);\n } catch(e) {\n bouncex.err('session storage failure');\n }\n },\n \n get: function() {\n var info = sessionStorage.getItem(this.sessionStorageIdentifier);\n return info ? JSON.parse(bouncex.lz.decompressFromURI(info)) : '';\n },\n \n infoIsStored: function() {\n return !!sessionStorage.getItem(this.sessionStorageIdentifier);\n },\n \n populateFields: function(fields) {\n if (!this.infoIsStored()) return;\n \n var data = this.get();\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n fields[field].val(data[field]);\n }\n }\n }\n};\n\n/* https://www.wrike.com/open.htm?id=598680219 */\nbouncex.report_ga = function(action, label, bypass) {\n var interaction = false,\n id = bouncex.website.id,\n brandNames = {\n 3846 : 'greenchef',\n 4157 : 'factor',\n 4613 : 'everyplate'\n };\n\n bypass = typeof(bypass)!='undefined' && !!bypass;\n\n if (typeof(action) != 'string' || typeof(label) != 'string') {\n return;\n }\n\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 \n var dataLayerObj = {\n event: \"gaEventTrigger\",\n gaEventCategory: \"Wunderkind\",\n gaEventAction: action,\n gaEventLabel: label,\n gaNonInteraction: interaction\n };\n \n dataLayer.push(dataLayerObj);\n\n /* firing an additional submit event - https://www.wrike.com/open.htm?id=887708864 */\n if (action.indexOf('Submission') > -1) {\n var dataLayerObj2 = {\n event: \"gaEventTrigger\",\n gaEventCategory: \"lead gen\",\n gaEventAction: \"submit\",\n gaEventLabel: 'Wunderkind',\n gaNonInteraction: interaction,\n event_name: \"Signup_LeadGenSuccess\",\n brand: brandNames[id],\n tribe: \"New Brands Growth\"\n };\n dataLayer.push(dataLayerObj2);\n }\n};\n\n/* https://www.wrike.com/open.htm?id=699979296 */\nif (window.location.pathname.indexOf('/plans') > -1) {\n\tvar $select_plan = jQuery('button[data-test-id=\"select-plan-button\"]');\n\n\tbouncex.on($select_plan, 'click.bx', function() {\n\t\tbouncex.setVarAndReload('selected_plan', true);\n bouncex.off($select_plan, 'click.bx');\n bouncex.setVarAndReload('plan_item_id', jQuery('button[data-test-id=\"select-plan-button\"]').attr('data-test-sku'));\n });\n}\n\n","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-52998210-19","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":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* prevent our tag from loading images */\nbouncex.et.item.requireImageLoad = false;\nvar GREEN_CHEF_DOMAIN = 'www.greenchef.com',\n USER_DOMAIN = 'chef.greenchef.com';\n\nif (isValidDomain() && isEn()){\n cancelSends();\n trackSelectPlan();\n}\n\nfunction isValidDomain(){\n\tvar currentUrl = getUrl();\n\treturn currentUrl.indexOf(GREEN_CHEF_DOMAIN) > -1 || currentUrl.indexOf(USER_DOMAIN) > -1;\n}\n\nfunction getUrl() {\n\treturn bouncex.utils.url.allowParams();\n}\n\nfunction isEn(){\n\treturn jQuery('html').attr('lang') === 'en-US';\n}\n\nfunction isLoggedInPage(){\n return getUrl().indexOf('account/your-plan') > -1 || getUrl().indexOf('/reactivate') > -1;\n}\n\n\nfunction isShippingPage() {\n return getUrl().indexOf('/checkout/delivery') > -1;\n}\n\nfunction isCheckoutPage(){\n return getUrl().indexOf('/checkout/payment') > -1;\n}\n\nfunction hasCancelSendParam() {\n\tvar cParam = bouncex.utils.url.getParam('c'),\n\t\tcancelParams = ['FBO-', 'FIH-', 'HS-'];\n\treturn cancelParams.find(x => cParam.startsWith(x));\n}\n\nfunction cancelSends(){\n bouncex.et.onVarChange('logged_in', function() {\n if (\n\t\t\t!bouncex.vars.sends_cancelled\n\t\t\t&& !isShippingPage()\n\t\t\t&& !isCheckoutPage()\n\t\t\t&& bouncex.vars.logged_in\n\t\t\t&& getUrl().indexOf('account') > -1\n\t\t){\n\t\t\tbouncex.push(['cancel_sends']);\n\t\t\tbouncex.setVar('sends_cancelled', true);\n }\n });\n\n if (isLoggedInPage()){\n\t\tbouncex.push(['cancel_sends']);\n\t\tbouncex.setVar('sends_cancelled', true);\n }\n\n\tif (hasCancelSendParam()) {\n\t\tbouncex.push(['cancel_referral', {}]);\n\t}\n}\n\n\nfunction trackSelectPlan() {\n var planObj = bouncex.utils.getNestedProp('bounceXInfo.planSelected') || {};\n if (isShippingPage()) {\n var plan = getPlanData(planObj);\n bouncex.push(['item', plan]);\n bouncex.push(['add to cart', {'item:id': plan.id }]);\n }\n}\n\nfunction getPlanData(obj) {\n\n var image;\n if(Object.keys(obj).length === 0){\n\n image = 'https://images.greenchef.com/greenchef-assets/images/menus/plant-powered/secondary/2020-08-21/secondary@2x.webp';\n obj.id = bouncex.vars.plan_item_id || bouncex.utils.getParam('sku');\n } else {\n\n image = obj.images.primary.indexOf('https') > -1 ? obj.images.primary\n : 'https://images.greenchef.com/greenchef-assets/images/menus/plant-powered/secondary/2020-08-21/secondary@2x.webp';\n }\n\n return {\n\t\tid : obj.id,\n\t\tcopy: 'Balanced Living',\n\t\tsubcopy_1 : 'An array of dietary options, featuring choice of meat, seafood, and vegetarian recipes',\n\t\timageurl : image,\n\t\tinstock: true,\n\t\turl : getUrl(),\n\t\tcategory: 'meal plans'\n\n\t};\n}\n","dge":false,"bxidLoadFirst":false,"pie":false,"cme":false,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":""}]]},"category":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/menus/"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function () {\n var isNewSite = !(window.bounceXInfo && window.bounceXInfo.isLegacyApp)\n if (isNewSite) {\n return (\n window.location.href.indexOf(\"/weekly-menu\") > -1 ||\n window.location.href.indexOf(\"/plans\") > -1 || \n window.location.href.indexOf(\"/recipes\") > -1\n );\n }\n})();"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/sign-up-v2/preferences"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/sign-up-v2/shipping"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/sign-up-v2/payment"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/sign-up/checkout"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/sign-up/checkout"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/sign-up/shipping"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function() {\n var isNewSite = !(window.bounceXInfo && window.bounceXInfo.isLegacyApp);\n if(isNewSite) {\n return window.location.href.indexOf('/checkout/') > -1;\n }\n})();"}]]},"home":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/home"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"(function () {\n var isNewSite = !(window.bounceXInfo && window.bounceXInfo.isLegacyApp);\n if (isNewSite) {\n return document.querySelectorAll(\"#homeHowItWorks\").length > 0;\n }\n})();"}]]},"product":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":""}]]},"search":{"testmode":true,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":""}]]}},"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 bouncex.log('checkout');\n return null;\n } else {\n return jQuery('[href=\"/logout\"]').length > 0;\n }\n})();","trigger":""},{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"plan_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (bouncex.website.pts !== \"checkout\") {\n if (jQuery('[href=\"/logout\"]').length > 0) {\n return true;\n }\n return false;\n }\n if (bouncex.website.pts === \"checkout\" && jQuery('[href=\"/logout\"]').length > 0) {\n return true;\n }\n return null;\n})();","trigger":"pageload"},{"name":"bouncex_info","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!window.bounceXInfo","trigger":"pageload"},{"name":"sends_cancelled","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"selected_plan","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"dynamic_content","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var windowInfo = bouncex.utils.getNestedProp('window.bounceXInfo.coupon.emailDescription', ''),\n heading,\n subheading;\n\n if (windowInfo.indexOf('
') > -1) {\n heading = windowInfo.split('
')[0].trim();\n subheading = windowInfo.split('
')[1].trim();\n } else if (windowInfo.indexOf('Free Meals') > -1) {\n heading = windowInfo.split('Free Meals')[0].trim() + ' Free Meals';\n subheading = windowInfo.split('Free Meals')[1].trim();\n }\n\n return heading || false;\n})();","trigger":"pageload"},{"name":"dynamic_content_sub_heading","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var windowInfo = bouncex.utils.getNestedProp('window.bounceXInfo.coupon.emailDescription', ''),\n heading,\n subheading;\n\n if (windowInfo.indexOf('
') > -1) {\n heading = windowInfo.split('
')[0].trim();\n subheading = windowInfo.split('
')[1].trim();\n } else if (windowInfo.indexOf('Free Meals') > -1) {\n heading = windowInfo.split('Free Meals')[0].trim() + ' Free Meals';\n subheading = windowInfo.split('Free Meals')[1].trim();\n }\n\n return subheading || false;\n})();","trigger":"pageload"},{"name":"cancelled_member","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n for (let d in dataLayer){\n if (dataLayer[d].hasActiveSubscriptions === false) {\n return dataLayer[d].hasActiveSubscriptions === false && (dataLayer[d].hasInactiveSubscriptions === true || dataLayer[d].hasInactiveSubscriptions === 1);\n }\n } \n})();","trigger":"pageload"},{"name":"redirect","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if((bouncex.calling_url !== encodeURIComponent(window.location.href)) && (window.location.pathname.indexOf('/my-deliveries') > -1)) {\n return true;\n }\n return false;\n})();","trigger":"pageload"},{"name":"plan_item_id","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":1,"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":{"bxid":"espemailid"},"cus":"","miw_exclude":"#sign-in-form input[name=\"email\"], .css-aq7gh5 input[name=\"INPUT_EMAIL\"]","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Hit 'Send' to sign-up for automated, recurring Green Chef mktg txts (like cart reminders) to this #, per terms.","eventSharing":false,"shqId":"","enabled":1},"pde":false,"fmc":["US","CA"],"fme":true,"fmx":"#sign-in-form input[name=email], .css-aq7gh5 input[name=INPUT_EMAIL], input[data-input=\"recipientEmail\"]","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":"","ga4_measurement_id":"","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":"07b86cd800c4a4f31f957b17ec5e440e","creativesBaseStyles":"a53944a2","gpsAuction":"da7f2123bbe2e5d4e3b41dcea412be5c","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"9bfb4101582921c2f3bc6525926ca102"}; 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.br.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_4859bc87a0ad5f1e15ad54659c4f85cf.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();