{
  "version": 3,
  "sources": ["/cdn/shop/t/33/assets/custom.js?enable_js_minification=1"],
  "sourcesContent": ["(function upsell_titles($){\n  // function to check if the Newsletter email input has been loaded or not on page load\n  // (Oct 2026: retries are now limited, the old version re-checked every few milliseconds forever on pages without a newsletter form)\n  var newsletterChecks = 0;\n  (function hasNewsletterLoaded() {\n    const addDatalayerPush = () => {\n      let newsletterSubmitButton = $('.newsletter-form .field__button');\n\n      newsletterSubmitButton.on('click', function() {\n        let newsletterEmailInput = $('.newsletter-form .field__input');\n        let newsletterEmailValue = newsletterEmailInput.val();\n        let isEmailValid = newsletterEmailInput.prop('validity').valid;\n\n        let userRegion = '';\n        let userCountry = '';\n\n        if (isStorageSupported('local')) {\n          userRegion = window.localStorage.getItem('_appState.Region');\n          userCountry = window.localStorage.getItem('_appState.Location');\n        }\n\n        if (isEmailValid) {\n          window.dataLayer.push({\n            'event': 'new_subscriber',\n            'email': newsletterEmailValue,\n            'location': {\n              'region': userRegion,\n              'country': userCountry\n            }\n          });\n        }\n      });\n    };\n\n    // if the Newsletter email input doesn't exist\n    if (!$('.newsletter-form .field__input').length) {\n      // wait until the Newsletter email input is loaded into the DOM (up to ~15 seconds)\n      if (newsletterChecks++ < 60) {\n        return setTimeout(hasNewsletterLoaded, 250);\n      }\n      return;\n    }\n\n    // code when the Newsletter email input exists\n    else {\n      addDatalayerPush();\n    }\n  })();\n})(jQuery);\n"],
  "mappings": "CAAC,SAAuB,EAAE,CAGxB,IAAI,iBAAmB,GACtB,SAAS,qBAAsB,CAC9B,MAAM,iBAAmB,IAAM,CACA,EAAE,iCAAiC,EAEzC,GAAG,QAAS,UAAW,CAC5C,IAAI,qBAAuB,EAAE,gCAAgC,EACzD,qBAAuB,qBAAqB,IAAI,EAChD,aAAe,qBAAqB,KAAK,UAAU,EAAE,MAErD,WAAa,GACb,YAAc,GAEd,mBAAmB,OAAO,IAC5B,WAAa,OAAO,aAAa,QAAQ,kBAAkB,EAC3D,YAAc,OAAO,aAAa,QAAQ,oBAAoB,GAG5D,cACF,OAAO,UAAU,KAAK,CACpB,MAAS,iBACT,MAAS,qBACT,SAAY,CACV,OAAU,WACV,QAAW,WACb,CACF,CAAC,CAEL,CAAC,CACH,EAGA,GAAK,EAAE,gCAAgC,EAAE,OAUvC,iBAAiB,MARjB,QAAI,mBAAqB,GAChB,WAAW,oBAAqB,GAAG,EAE5C,MAOJ,GAAG,CACL,GAAG,MAAM",
  "names": []
}
