PageSourceSearch

https://www.womanwithin.com/on/demandware.static/Sites-oss-Site/-/…/js/globaleCountrySwitcher.js

js womanwithin.com collected 2026-09-25 14:01:38 UTC 34,804 bytes, 1 lines download raw bytes

1!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(1);function d(){try{window.sessionStorage.removeItem("email_signup_utag")}catch(e){}}function c(e){if(!e||!u(e)||!0===e.email_signup)return e;try{var t=window.sessionStorage.getItem("email_signup_utag");if(!t)return e;var n=JSON.parse(t);if(!n||!0!==n.email_signup)return e;e.email_signup=!0,!e.email_signup_location&&n.email_signup_location&&(e.email_signup_location=n.email_signup_location)}catch(e){}return e}function u(e){if(!e||!e.page_type)return!1;var t=e.page_type.toLowerCase();return"checkout"===t||"confirmation"===t&&"orderconfirmation"===e.rendered_page}function _(e){if(e)if(!0===e.email_signup){var t={email_signup:!0,email_signup_location:e.email_signup_location||null};try{window.sessionStorage.setItem("email_signup_utag",JSON.stringify(t))}catch(e){}}else try{u(e)||d()}catch(e){}}var l={eventCount:0,mlCollectorInitialized:!1,debugLog:function(e,t){window.sitePreferences&&window.sitePreferences.mlDebugEnabled&&(void 0!==t?console.log(e,t):console.log(e))},initMLCollector:function(){if(!this.mlCollectorInitialized){var e=this.isMLCollectionEnabled(),t=this.getAdobeId();s.init({enabled:e,adobeId:t}),this.mlCollectorInitialized=!0}},isMLCollectionEnabled:function(){if(window.sitePreferences&&window.sitePreferences.enableUtagDataCollection)return window.sitePreferences.enableUtagDataCollection;var e=document.body||document.documentElement;return!!(e&&e.dataset&&e.dataset.mlCollectionEnabled)&&"true"===e.dataset.mlCollectionEnabled},getAdobeId:function(){if(window.sitePreferences&&"function"==typeof window.sitePreferences.getAdobeId)try{var e=window.sitePreferences.getAdobeId();if(e)return e}catch(e){console.error("[Tealium] Error executing Adobe ID script:",e)}return window.utag_data&&window.utag_data.adobe_id?window.utag_data.adobe_id:window.sessionCustom&&window.sessionCustom.adobeId?window.sessionCustom.adobeId:null},getCurrentSession:function(){return this.initMLCollector(),s.getCurrentSession()},checkPropensity:function(){return this.initMLCollector(),s.checkPropensity()},updateData:function(e){!function(){try{window.localStorage.removeItem("persisted_checkout_steps")}catch(e){}}(),window.utag_data=c(window.utag_data||{});var t=window.utag_data||{},n=t.search_mode,o=t.search_engine,r=t.fbb_search_enabled,a=i(i({},e),{},{search_mode:n,search_engine:o,fbb_search_enabled:r});return!0===window._qs_mode?(window.utag_data=i(i({},window.utag_data),e),{updatedArr:a,isAdobeAnalytics:!0}):(window.utag_data_backup?window.utag_data=window.utag_data_backup:window.utag_data_backup=window.utag_data,window.utag_data=c(window.utag_data||{}),window.utag_data=i(i({},window.utag_data),e),_(window.utag_data),{updatedArr:a,isAdobeAnalytics:!0})},startQuickShop:function(e){try{var t=window.utag_data||{};try{window._qs_utag_backup=JSON.parse(JSON.stringify(t))}catch(e){window._qs_utag_backup=t}window._qs_underlying_page_name=t&&t.page_name?t.page_name:"";var n=Object.assign({},e||{});n.event_name="quick_shop",n.underlying_page_name=window._qs_underlying_page_name,window._qs_mode=!0,window.utag_data=n,this.triggerViewEvent(window.utag_data)}catch(e){console.log("startQuickShop error",e&&e.message?e.message:e)}},endQuickShop:function(){try{var e=window._qs_underlying_page_name||"";if(window._qs_utag_backup&&(window.utag_data=window._qs_utag_backup),this.triggerEvent({event_name:"quick_shop_close",underlying_page_name:e}),window.utag_data_backup=window.utag_data,window._qs_mode=!1,window.utag_data&&window.utag_data.page_name&&window.utag_data.page_type&&"confirmation"===window.utag_data.page_name.toLowerCase()&&"confirmation"===window.utag_data.page_type.toLowerCase())try{window.location.assign("/")}catch(e){}window._qs_utag_backup=null,window._qs_underlying_page_name=null}catch(e){console.log("endQuickShop error",e&&e.message?e.message:e)}},setPDPRecommendationData:function(e){var t=e.product_recommending_engine,n=e.product_recommending_location,o=e.product_finding_method;this.updateData({product_recommending_engine:t,product_recommending_location:n,product_finding_method:o})},trackSiteError:function(e,t){if(e){var n=e.error_location||"";t&&(n=n?n+", alertTriggerLocation: "+t:"alertTriggerLocation: "+t),this.triggerEvent({event_name:"site_error",error_page:e.error_page||"",error_location:n,error_type:e.error_type||"API response error",error_service:e.error_service||"",error_code:e.error_code||e.code||"",error_message:e.error_message||e.message||"",error_explanation:e.error_explanation||e.developerMessage||""})}},triggerEvent:function(e){var t=window,n=t.utag,o=t.adobeDataLayer,r=this.updateData(e),i=r.updatedArr,a=r.isAdobeAnalytics;if(window.utag_data&&window.utag_data.page_name&&"confirmation"===window.utag_data.page_name.toLowerCase()&&window.utag_data.page_type&&"confirmation"===window.utag_data.page_type.toLowerCase()&&window.utag_data.rendered_page&&"orderconfirmation"!==window.utag_data.rendered_page&&(window.utag_data.page_name="maybeorderdetails",window.utag_data.page_type="maybeorderdetails"),a)try{o.push(window.utag_data)}catch(e){console.log(e.message?e.message:e)}else if(void 0!==n&&n&&"function"==typeof n.link)try{n.link(i)}catch(e){console.warn("[Tealium] triggerEvent - utag.link() failed (tracking system error):",e.message?e.message:e)}else console.warn("[Tealium] triggerEvent - Tealium tracking unavailable (utag not initialized). This can occur in Firefox Private Browsing when CORS-blocked requests prevent Tealium initialization.");return a?console.log("Tealium event triggered",window.utag_data):console.log("Tealium event triggered",i),this.debugLog("[Tealium] triggerEvent - Initializing ML collector"),this.initMLCollector(),this.isMLCollectionEnabled()&&this.getAdobeId()?(this.debugLog("[Tealium] triggerEvent - Sending to ML collector"),s.collectEvent(window.utag_data)):this.debugLog("[Tealium] triggerEvent - ML collection skipped, enabled: "+this.isMLCollectionEnabled()+", hasAdobeId: "+!!this.getAdobeId()),i},triggerViewEvent:function(e){var t=window,n=t.utag,o=t.adobeDataLayer,r=this.updateData(e),i=r.updatedArr,a=r.isAdobeAnalytics;if(a)try{o.push(window.utag_data)}catch(e){console.log(e.message?e.message:e)}else n.view(i);return a?console.log("Tealium event triggered",window.utag_data):console.log("Tealium event triggered",i),this.debugLog("[Tealium] triggerViewEvent - Initializing ML collector"),this.initMLCollector(),this.isMLCollectionEnabled()&&this.getAdobeId()?(this.debugLog("[Tealium] triggerViewEvent - Sending to ML collector"),s.collectEvent(window.utag_data)):this.debugLog("[Tealium] triggerViewEvent - ML collection skipped, enabled: "+this.isMLCollectionEnabled()+", hasAdobeId: "+!!this.getAdobeId()),i}};e.exports=l,"undefined"!=typeof window&&(window.utag_data=c(window.utag_data||{}),function(){if("undefined"!=typeof document&&"undefined"!=typeof window){var e,t="";try{e="socialLoginReferrer",t="undefined"!=typeof document&&document.cookie?document.cookie.split("; ").reduce((function(t,n){if(t)return t;var o=n.split("=");return o[0]!==e?"":decodeURIComponent(o.slice(1).join("="))}),""):""}catch(e){t=""}if(-1!==document.cookie.indexOf("socialLoginReferrer=")){"__EMPTY_REFERRER__"===t&&(t="");try{Object.defineProperty(document,"referrer",{configurable:!0,get:function(){return t}})}catch(e){}!function(e){"undefined"!=typeof document&&(document.cookie=e+"=; Max-Age=0; path=/")}
1("socialLoginReferrer")}}}(),_(window.utag_data),d())},function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r={collectEndpoint:null,predictEndpoint:null,isEnabled:!1,adobeId:null,eventQueue:[],isProcessing:!1,pageLoadSent:!1,currentSession:null,SESSION_MAX_AGE:18e5,SESSION_STORAGE_KEY_PREFIX:"ml_session_",piiFields:["email","customer_email","ex_conversion_email","email_address_epsilon","customer_id","mainframe_user_id","customer_first_name","customer_last_name","customer_city","customer_zip","customer_country","customer_state","phone","address","password","token","key","secret","email_hash","customer_email_address_hash","email_address_epsilon_hash"],nonMLFields:["debug_error","buildNo","test","event_id","timestamp","pc_id","fb_browser_id","fbp","fbc","break_point_at","__routeFeePatched","adobeAnalytics","show_consent_manager","persistent_login_on_landing","customAttributes","membershipApiResponse","z1_analytic","womanwithin_","roamans_","catherines_","jessicalondon_","joebrowns_","ellos_","onestopplus_","juneandvie_","activeforall_","intimatesforall_","shoesforall_","swimsuitsforallfull_","brylanehome_","kingsize_","outlet_","eloquii_","avenue_","dia_","cuup_","shop_the_look_body_type","shop_the_look_outfit_id","outfit_status","mini_sps_id","uber_sps_id","marketplace_vendor_id","marketplace_vendor_name","product_backorder_message","outlet_status","color_group","size_selector","promo_description","promo_code","promo_id","promo_name","product_discount","product_discount_desc","order_discount","order_discount_desc","order_payment_type","order_payment_amount","order_payment_id","order_payment_method_type","payment_type","order_cc_amount","evar142","event144","epsilon_cart_sku","epsilon_product_sku","epsilon_product_id","facebook_content_id","facebook_contents","order_shipping","order_shipping_method","order_shipping_by_brand","order_shipping_discount","product_shipping_revenue","order_delivery_date","order_currency","peak_handling_fee","route_cost","route_tracking","rendered_page","order_subtotal","order_tax","order_promo_deal","order_promo_deal_value","order_discount_value","one_click_checkout","plcc_offer","prod_cat","recommendations","total_demand","order_demand","total_order_discount","uc_number_of_brands","uc_cart_type","totalquantity","item_quantity_decreased","item_quantity_increased","product_catalog_purchase","free_gift_purchase","product_shared_cart_product","product_savings_shown","product_item_status","product_status","regular_or_clearance","pricing_status","pdp_type_by_offer_group","pdp_type_by_offer_group_application_type","offer_id","product_page_merchandising_type","default_color_selection","product_brand_pdp_url","product_image_url","product_title","product_brand_cart","add_to_cart_method","add_to_cart_brand","add_to_cart_brand_shadow","add_to_cart_mall","order_rewards_amount","product_discount_eligible_quantity","product_lineitem_adjusted_price","product_unit_price","product_list_price","product_id_color_name","color_id","product_sku_adobe","product_sku","item_sequence","checkout_brand","purchase_brand","checkout_mall","step_name","entry_brand_shadow","site_branding_shadow","customer_plcc_brand","ww_perks_membership_status","ca_perks_membership_status","elq_rewards_member","dia_rewards_member","dia_entry_source","environment","search_mode_srp","search_mode","fbb_search_enabled","modesty_mode","new_checkout","user_country_ge","user_currency_ge","customerGroup","cross_brand_shopper","shopping_mall","entry_mall","brands_browsed","brand_combo","current_brand","site_branding","entry_brand"],nonBehavioralEvents:["site_error","Route_OptIn_Event"],init:function(e){this.isEnabled=e.enabled||!1,this.adobeId=e.adobeId||null,this.collectEndpoint=window.location.protocol+"//"+window.location.host+"/api/ml/collect",this.predictEndpoint=this.getPredictEndpoint();try{localStorage.setItem("__ml_test__","test"),localStorage.removeItem("__ml_test__")}catch(e){console.error("[ML Collector] localStorage is NOT available:",e)}window.addEventListener("beforeunload",this.handleBeforeUnload.bind(this)),e.enablePageLoadTracking&&this.initPageLoadTracking()},getPredictEndpoint:function(){try{var e=null;if(window.sitePreferences&&window.sitePreferences.mlApiUrl&&(e=window.sitePreferences.mlApiUrl),!e||!e.trim()){var t=document.body||document.documentElement;t&&t.dataset&&t.dataset.mlApiUrl&&(e=t.dataset.mlApiUrl)}return e&&e.trim()?e.trim():null}catch(e){return console.error("[ML Collector] Error getting prediction endpoint:",e),null}},getAdobeId:function(){if(this.adobeId)return this.adobeId;if(window.sitePreferences&&"function"==typeof window.sitePreferences.getAdobeId)try{var e=window.sitePreferences.getAdobeId();if(e)return this.adobeId=e,e}catch(e){console.error("[ML Collector] Error executing Adobe ID script:",e)}if(window.utag_data){if(window.utag_data.adobe_id)return this.adobeId=window.utag_data.adobe_id,this.adobeId;if(window.utag_data.adobeId)return this.adobeId=window.utag_data.adobeId,this.adobeId;if(window.Visitor&&"function"==typeof window.Visitor.getInstance)try{var t=window.Visitor.getInstance("YOUR_ORG_ID",{});if(t&&t.getMarketingCloudVisitorID){var n=t.getMarketingCloudVisitorID(function(e){if(e)return this.adobeId=e,e}.bind(this));if(n)return this.adobeId=n,this.adobeId}}catch(e){}}return window.sessionCustom&&window.sessionCustom.adobeId?(this.adobeId=window.sessionCustom.adobeId,this.adobeId):null},isMLCollectionEnabled:function(){if(this.isEnabled)return!0;
1if(window.sitePreferences&&window.sitePreferences.enableUtagDataCollection)return this.isEnabled=window.sitePreferences.enableUtagDataCollection,this.isEnabled;var e=document.body||document.documentElement;return!!(e&&e.dataset&&e.dataset.mlCollectionEnabled)&&(this.isEnabled="true"===e.dataset.mlCollectionEnabled,this.isEnabled)},getCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var r=n[o];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},getToken:function(){var e=this.getCookie("cc-nx");return e||this.getCookie("cc-nx-g")},getBasketId:function(){var e=null,t=document.body||document.documentElement;if(t&&t.dataset&&t.dataset.basketId&&(e=t.dataset.basketId)&&"null"!==e&&""!==e)return e;if(window.utag_data){if(window.utag_data.basket_id)return window.utag_data.basket_id;if(window.utag_data.basketId)return window.utag_data.basketId;if(window.utag_data.cart_id)return window.utag_data.cart_id}return window.basketId?window.basketId:null},getBrandContextId:function(){return window.utag_data&&window.utag_data.current_brand?window.utag_data.current_brand:window.utag_data&&window.utag_data.site_branding?window.utag_data.site_branding:null},shouldCollectEvent:function(e){if(!e||"object"!==o(e))return!1;var t=e.event_name||e.event_type||"";if(-1!==this.nonBehavioralEvents.indexOf(t))return!1;var n=e.event_name||e.event_type||e.product_id||e.page_name||e.order_id||e.basket_id||e.product_category||e.product_finding_method||e.checkout_entry_step||e.dwell_time_seconds||e.search_engine||Array.isArray(e.product_id)&&e.product_id.length>0,r=Object.keys(e);if(r.length<=3&&e.brandContextId&&e.page_type&&(e.adobeId||e.adobe_id)&&!n)return!1;if(!n&&r.length<=5){var i=["brandContextId","page_type","adobeId","adobe_id","timestamp"];if(r.every((function(e){return-1!==i.indexOf(e)})))return!1}return!0},sanitizeEventData:function(e){if(!e||"object"!==o(e))return e;if(Array.isArray(e)){var t=this;return e.map((function(e){return t.sanitizeEventData(e)}))}var n=JSON.parse(JSON.stringify(e));t=this;return Object.keys(n).forEach((function(e){var r=e.toLowerCase(),i=n[e];if(-1===t.piiFields.indexOf(e)){var a=-1!==r.indexOf("password")||-1!==r.indexOf("secret")||-1!==r.indexOf("token")||-1!==r.indexOf("key")||-1!==r.indexOf("ssn")||-1!==r.indexOf("credit")||-1!==r.indexOf("payment")||-1!==r.indexOf("cc")&&(-1!==r.indexOf("amount")||-1!==r.indexOf("order")||-1!==r.indexOf("card")),s=!1;if("string"==typeof i){var d=i.toLowerCase();s=-1!==d.indexOf("visa")||-1!==d.indexOf("mastercard")||-1!==d.indexOf("amex")||-1!==d.indexOf("discover")||-1!==d.indexOf("credit_card")||-1!==d.indexOf("payment")}else Array.isArray(i)&&(s=i.some((function(e){if("string"==typeof e){var t=e.toLowerCase();return-1!==t.indexOf("visa")||-1!==t.indexOf("mastercard")||-1!==t.indexOf("credit_card")||-1!==t.indexOf("payment")}return!1})));var c=t.nonMLFields.some((function(e){return"_"===e.charAt(e.length-1)?0===r.indexOf(e.toLowerCase()):r===e.toLowerCase()||-1!==r.indexOf("_"+e.toLowerCase())})),u=Array.isArray(i)&&0===i.length||"string"==typeof i&&""===i.trim()||null===i||Array.isArray(i)&&i.every((function(e){return""===e||null===e}));a||s||c||u?delete n[e]:"object"!==o(n[e])||null===n[e]||Array.isArray(n[e])||(n[e]=t.sanitizeEventData(n[e]))}else delete n[e]})),n},sanitizeUrl:function(e){if(!e)return null;try{var t=new URL(e);return"localhost"===t.hostname||"127.0.0.1"===t.hostname||0===t.hostname.indexOf("192.168.")||0===t.hostname.indexOf("10.")||t.hostname.indexOf(".local")===t.hostname.length-6?null:t.pathname+t.search}catch(t){return-1!==e.toLowerCase().indexOf("localhost")||-1!==e.indexOf("127.0.0.1")?null:e}},getSessionStorageKey:function(e){return this.SESSION_STORAGE_KEY_PREFIX+e},createNewSession:function(e){return{adobe_id:e,session_start:(new Date).toISOString(),session_end:(new Date).toISOString(),events:[],total_events:0,total_dwell_time:0,page_views:0,unique_products_viewed:[],add_to_cart_events:0,product_interactions:0,checkout_events:0,high_engagement:!1,purchase_completed:!1,cart_value:0}},clearExpiredSession:function(e){try{var t=this.getSessionStorageKey(e),n=localStorage.getItem(t);if(n){var o=JSON.parse(n);Date.now()-new Date(o.session_start).getTime()>this.SESSION_MAX_AGE&&(localStorage.removeItem(t),this.currentSession&&this.currentSession.adobe_id===e&&(this.currentSession=null))}}catch(t){try{localStorage.removeItem(this.getSessionStorageKey(e))}catch(e){}}},logToServer:function(e){try{var t=window.location.protocol+"//"+window.location.host+"/api/ml/log",n=JSON.stringify(e);if(navigator.sendBeacon){var o=new Blob([n],{type:"application/json"});navigator.sendBeacon(t,o)}else fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}
1).catch((function(){}))}catch(e){}},storePropensityScore:function(e,t){try{var n="ml_propensity_scores_"+e,o=[];try{var r=localStorage.getItem(n);r&&(o=JSON.parse(r))}catch(e){}var i=null;this.currentSession&&(i={session_start:this.currentSession.session_start,total_events:this.currentSession.total_events,page_views:this.currentSession.page_views,add_to_cart_events:this.currentSession.add_to_cart_events,product_interactions:this.currentSession.product_interactions,checkout_events:this.currentSession.checkout_events,unique_products_viewed:this.currentSession.unique_products_viewed.length,high_engagement:this.currentSession.high_engagement,purchase_completed:this.currentSession.purchase_completed,cart_value:this.currentSession.cart_value||0}),o.push({score:t,timestamp:(new Date).toISOString(),page_url:window.location.href,page_type:window.utag_data?window.utag_data.page_type:null,session:i}),o.length>50&&(o=o.slice(-50)),localStorage.setItem(n,JSON.stringify(o))}catch(e){}},getOrCreateSession:function(e){if(!e)return null;try{this.clearExpiredSession(e);var t=this.getSessionStorageKey(e),n=!1;try{var o=localStorage.getItem(t);if(o)try{return this.currentSession=JSON.parse(o),this.currentSession.session_end=(new Date).toISOString(),this.currentSession}catch(e){n=!0}else n=!0}catch(e){n=!0}if(this.currentSession=this.createNewSession(e),n){var r=this;setTimeout((function(){r.logToServer({event_type:"new_session",adobe_id:e,timestamp:r.currentSession.session_start,page_url:window.location.href,page_type:window.utag_data?window.utag_data.page_type:null,user_agent:navigator.userAgent,referrer:document.referrer||null,brand_context_id:r.getBrandContextId(),basket_id:r.getBasketId()})}),0)}try{var i=JSON.stringify(this.currentSession);localStorage.setItem(t,i)}catch(e){console.error("[ML Collector] Failed to save session to localStorage:",e)}return this.currentSession}catch(t){return console.error("[ML Collector] Session creation error:",t),this.createNewSession(e)}},updateSessionAggregates:function(e){if(this.currentSession)try{this.currentSession.events.push(e),this.currentSession.total_events++,this.currentSession.session_end=(new Date).toISOString();var t=e.eventData||{};if(t.dwell_time_seconds&&(this.currentSession.total_dwell_time+=Number(t.dwell_time_seconds)||0),(t.page_type||t.page_name)&&this.currentSession.page_views++,t.product_id){var n=Array.isArray(t.product_id)?t.product_id:[t.product_id],o=this;n.forEach((function(e){var t=String(e);t&&-1===o.currentSession.unique_products_viewed.indexOf(t)&&o.currentSession.unique_products_viewed.push(t)}))}var r=t.event_name||t.event_type||"";-1!==["add_to_cart","product_add"].indexOf(r)&&this.currentSession.add_to_cart_events++,-1===["product_interaction","product_details","pdp"].indexOf(r)&&"pdp"!==t.page_type||this.currentSession.product_interactions++,(-1!==["checkout_start","checkout_payment","checkout"].indexOf(r)||"checkout"===t.page_type||t.page_name&&-1!==t.page_name.toLowerCase().indexOf("checkout"))&&this.currentSession.checkout_events++,("order_confirmation"===r||"confirmation"===t.page_type||t.order_id)&&(this.currentSession.purchase_completed=!0),this.currentSession.high_engagement=this.currentSession.total_events>=5,t.order_total&&(this.currentSession.cart_value=Number(t.order_total)||0);try{var i=this.getSessionStorageKey(this.currentSession.adobe_id),a=JSON.stringify(this.currentSession);localStorage.setItem(i,a)}catch(e){console.error("[ML Collector] Failed to save updated session to localStorage:",e)}}catch(e){console.error("[ML Collector] Session aggregate update error:",e)}},buildSessionPayload:function(){if(!this.currentSession)return{adobe_id:"",session_start:(new Date).toISOString(),session_end:(new Date).toISOString(),total_events:0,total_dwell_time:0,page_views:0,unique_products_viewed:[],add_to_cart_events:0,product_interactions:0,checkout_events:0,purchase_completed:!1,high_engagement:!1,cart_value:0,avg_dwell_time:0,max_dwell_time:0,events:[]};try{var e=this.currentSession.events,t=[];this.currentSession.unique_products_viewed.forEach((function(e){-1===t.indexOf(e)&&t.push(e)}));var n=this.currentSession.total_events>0?this.currentSession.total_dwell_time/this.currentSession.total_events:0,o=0;e.forEach((function(e){var t=Number(e.eventData&&e.eventData.dwell_time_seconds)||0;t>o&&(o=t)}));return{adobe_id:this.currentSession.adobe_id,session_start:this.currentSession.session_start,session_end:this.currentSession.session_end,total_events:this.currentSession.total_events,total_dwell_time:this.currentSession.total_dwell_time,page_views:this.currentSession.page_views,unique_products_viewed:t,add_to_cart_events:this.currentSession.add_to_cart_events,product_interactions:this.currentSession.product_interactions,checkout_events:this.currentSession.checkout_events,purchase_completed:this.currentSession.purchase_completed,high_engagement:this.currentSession.high_engagement,cart_value:this.currentSession.cart_value||0,avg_dwell_time:n,max_dwell_time:o,events:e.map((function(e){var t=e.eventData||{};return{event_name:t.event_name||t.event_type,timestamp:e.timestamp,page_type:t.page_type,page_name:t.page_name,dwell_time_seconds:t.dwell_time_seconds||0,product_id:t.product_id,product_category:t.product_category,product_finding_method:t.product_finding_method,product_recommending_location:t.product_recommending_location,product_recommending_id:t.product_recommending_id,product_recommending_engine:t.product_recommending_engine,raw_event:{event_name:t.event_name||t.event_type,page_type:t.page_type,page_name:t.page_name,user_authenticated:t.user_authenticated,user_registered:t.user_registered,guest_checkout:t.guest_checkout,registered_checkout:t.registered_checkout,auth_status:t.auth_status,customer_rewards_member:t.customer_rewards_member,num_brands_browsed:t.num_brands_browsed,search_engine:t.search_engine,storefront_session_id:t.storefront_session_id,basket_id:t.basket_id||t.basketId,brandContextId:t.brandContextId,product_list_price:t.product_list_price,product_rating:t.product_rating,product_promo_deal:t.product_promo_deal,product_quantity:t.product_quantity,product_navigation:t.product_navigation,checkout_entry_step:t.checkout_entry_step,checkout_steps:t.checkout_steps,page_section1:t.page_section1,dwell_time_seconds:t.dwell_time_seconds||0,product_id:t.product_id,product_category:t.product_category,product_finding_method:t.product_finding_method}}}))}}catch(e){return console.error("[ML Collector] Session payload build error:",e),{adobe_id:this.currentSession?this.currentSession.adobe_id:"",session_start:this.currentSession?this.currentSession.session_start:(new Date).toISOString(),session_end:this.currentSession?this.currentSession.session_end:(new Date).toISOString(),total_events:this.currentSession?this.currentSession.total_events:0,total_dwell_time:this.currentSession?this.currentSession.total_dwell_time:0,page_views:this.currentSession?this.currentSession.page_views:0,unique_products_viewed:this.currentSession?this.currentSession.unique_products_viewed:[],add_to_cart_events:this.currentSession?this.currentSession.add_to_cart_events:0,product_interactions:this.currentSession?this.currentSession.product_interactions:0,checkout_events:this.currentSession?this.currentSession.checkout_events:0,purchase_completed:!!this.currentSession&&this.currentSession.purchase_completed,high_engagement:!!this.currentSession&&this.currentSession.high_engagement,cart_value:this.currentSession?this.currentSession.cart_value:0,avg_dwell_time:0,max_dwell_time:0,events:[]}}},shouldCheckPropensity:function(e){return"page_load"===(e.eventData&&(e.eventData.event_name||e.eventData.event_type)||"")},getPropensityScore:function(e){var t=this;if(!this.isMLCollectionEnabled()||!this.currentSession)return Promise.resolve(null);if(!this.predictEndpoint)return Promise.resolve(null);try{var n={session:this.buildSessionPayload(),token:this.getToken()},o=null,r=null;"undefined"!=typeof AbortController&&(o=new AbortController,r=setTimeout((function(){o.abort()}),5e3));var i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),cache:"no-store"};return o&&(i.signal=o.signal),fetch(this.predictEndpoint,i).then((function(e){return r&&clearTimeout(r),e.ok?e.json():null})).then((function(n){if(n){var o=n.propensity_score||n.score||null;return null!==o&&"number"==typeof o&&t.storePropensityScore(e,o),o}return null})).catch((function(e){return r&&clearTimeout(r),null}))}catch(e){return Promise.resolve(null)}},onHighPropensity:function(e){window.mlLastHighPropensity={score:e,session:this.currentSession,timestamp:Date.now()};try{window.dispatchEvent(new CustomEvent("ml-high-propensity",{detail:{score:e,session:this.currentSession}}))}catch(e){}},waitForUtagData:function(e,t){t=t||50;var n=0,o=setInterval((function(){n++,window.utag_data&&Object.keys(window.utag_data).length>0?(clearInterval(o),e()):n>=t&&clearInterval(o)}),100)},initPageLoadTracking:function(){if(!this.pageLoadSent&&!window.mlPageLoadSent){var e=this;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){e.waitForUtagData((function(){e.sendPageLoadEvent()}))})):e.waitForUtagData((function(){e.sendPageLoadEvent()}))}},sendPageLoadEvent:function(){if(this.isMLCollectionEnabled()){var e=this.getAdobeId();if(e)this.sendPageLoadEventWithId(e);else{var t=this;setTimeout((function(){(e=t.getAdobeId())&&t.sendPageLoadEventWithId(e)}),500)}}},sendPageLoadEventWithId:function(e){var t={event_type:"page_load",event_name:"page_load"};
1if(window.utag_data){Object.keys(window.utag_data).forEach((function(e){t[e]=window.utag_data[e]}))}window.utag_data&&"pdp"===window.utag_data.page_type&&(t.dwell_time_seconds=0),this.collectEvent(t),this.pageLoadSent=!0,window.mlPageLoadSent=!0},createPayload:function(e){this.adobeId&&(e.adobeId=this.adobeId);var t=this.getBrandContextId();t&&(e.brandContextId=t);var n=this.getBasketId();n&&(e.basketId=n),e.event_type&&!e.event_name&&(e.event_name=e.event_type);var o=this.sanitizeEventData(e),r=this.getToken(),i={eventData:{eventData:o,pageUrl:this.sanitizeUrl(window.location.href),userAgent:navigator.userAgent,referrer:this.sanitizeUrl(document.referrer),timestamp:(new Date).toISOString()}};return r&&(i.token=r),i},enqueue:function(e){this.isEnabled&&this.adobeId&&(this.eventQueue.push(e),this.processQueue())},processQueue:function(){if(!this.isProcessing&&0!==this.eventQueue.length){this.isProcessing=!0;var e=this.eventQueue.shift(),t=this.createPayload(e),n=this;this.sendToCollector(t).finally((function(){n.isProcessing=!1,n.eventQueue.length>0&&n.processQueue()}))}},sendToCollector:function(e){if(navigator.sendBeacon&&navigator.sendBeacon(this.collectEndpoint,JSON.stringify(e)))return Promise.resolve({ok:!0});return fetch(this.collectEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0}).then((function(e){return e.ok||console.error("[ML Collector] Failed to send event: "+e.status),e})).catch((function(e){console.error("[ML Collector] Error sending event:",e)}))},sendBeacon:function(e){if(!navigator.sendBeacon)return!1;var t=new Blob([JSON.stringify(e)],{type:"application/json"});return navigator.sendBeacon(this.collectEndpoint,t)},handleBeforeUnload:function(){for(;this.eventQueue.length>0;){var e=this.eventQueue.shift(),t=this.createPayload(e);this.sendBeacon(t)}},collectEvent:function(e){if(this.isMLCollectionEnabled()){var t=this.getAdobeId();if(t&&this.shouldCollectEvent(e)){e.adobeId=t;var n=this.sanitizeEventData(e);if(this.shouldCollectEvent(n)){var o={eventData:n,pageUrl:this.sanitizeUrl(window.location.href),userAgent:navigator.userAgent,referrer:this.sanitizeUrl(document.referrer),timestamp:(new Date).toISOString()};try{this.getOrCreateSession(t)&&this.updateSessionAggregates(o)}catch(e){console.error("[ML Collector] Session management error:",e)}try{this.enqueue(e)}catch(e){console.error("[ML Collector] Event queue error:",e)}if(this.shouldCheckPropensity(o)){var r=this;this.getPropensityScore(t).then((function(e){null!==e&&e>=.5&&r.onHighPropensity(e)})).catch((function(e){}))}}}}},getCurrentSession:function(){return this.isMLCollectionEnabled()?this.currentSession:null},clearSession:function(e){if(this.isMLCollectionEnabled()){try{var t=this.getSessionStorageKey(e);localStorage.removeItem(t)}catch(e){}this.currentSession&&this.currentSession.adobe_id===e&&(this.currentSession=null)}},checkPropensity:function(){var e=this.getAdobeId();return e?this.getPropensityScore(e):Promise.resolve(null)}};e.exports&&(e.exports=r),"undefined"!=typeof window&&(window.mlDataCollector=r)},,function(e,t,n){"use strict";var o=n(0);window.countrySwitcherDataLoaded="countrySwitcherDataLoaded"in window&&window.countrySwitcherDataLoaded,!1===window.countrySwitcherDataLoaded&&void 0!==window.scriptLoaderData&&(gle("LoadShippingSwitcher",window.scriptLoaderData.country,window.scriptLoaderData.culture,window.scriptLoaderData.currency,!1,(function(){var e=document.getElementsByClassName("globale-selector");Array.prototype.map.call(e,(function(e){GlobalE.AttachEvent("click",e,(function(){return gle("ShippingSwitcher","show")}))}))})),gle("OnShippingSwitcherClosed",(function(e){var t={event_name:"international_country_switcher",customer_country:e.country,customer_currency:e.currency,action:e.button};return o.triggerEvent(t),"save"===e.button&&(!function(e){try{var t,n,o,r;if("US"===e)return;var i=null!==(t=window)&&void 0!==t&&t.location&&null!==(n=window)&&void 0!==n&&null!==(n=n.location)&&void 0!==n&&n.pathname?null===(o=window)||void 0===o||null===(o=o.location)||void 0===o?void 0:o.pathname:"";if(!(-1!==(null==i?void 0:i.indexOf("/products/"))))return;var a,s=(null===(r=window)||void 0===r||null===(r=r.location)||void 0===r?void 0:r.hash)||"";if(!s)return void(window.location.hash="geClearCache="+(null===(a=new Date)||void 0===a?void 0:a.getTime()));var d=/(^|[&])geClearCache=/i,c="#"===(null==s?void 0:s.charAt(0))?null==s?void 0:s.slice(1):s;
1if(null!=d&&d.test(c)){var u=null==c?void 0:c.replace(/(^|[&])geClearCache=[^&]*/i,(function(e,t){var n;return t+"geClearCache="+(null===(n=new Date)||void 0===n?void 0:n.getTime())}));window.location.hash=u}}catch(e){}}(e.country),!e.isOperatedByGlobale&&e.isRedirect||GlobalE.UpdateCustomerInfo(e.country,e.currency,!1)),!0})),$(window).on("load",(function(){var e=new URLSearchParams(window.location.search),t=e.get("openCountrySwitcher");if("true"===t&&("undefined"!=typeof gle?setTimeout((function(){$("#country-selector").trigger("click")}),3e3):console.warn("GlobalE not loaded yet!")),t){e.delete("openCountrySwitcher");var n=e.toString(),o=window.location.pathname+(n?"?"+n:"");window.history.replaceState({},"",o)}})),window.countrySwitcherDataLoaded=!0)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.