1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10function getCookie(name) { 11 let cookieArr = document.cookie.split(';'); 12 13 for (let i = 0; i < cookieArr.length; i++) { 14 let cookiePair = cookieArr[i].split('='); 15 16 if (name === cookiePair[0].trim()) { 17 return decodeURIComponent(cookiePair[1]); 18 } 19 } 20 return null; 21} 22 23function hasCookieOfType(actionType) { 24 let cookieArr = document.cookie.split(';'); 25 26 for (let i = 0; i < cookieArr.length; i++) { 27 let cookiePair = cookieArr[i].split('='); 28 29 if (cookiePair[0].trim().contains(actionType)) { 30 return true; 31 } 32 } 33 return false; 34} 35 36function getSmartRuleCookieName(ruleObjName, actionType) { 37 const conditionCheckedInClientEnabled = 38 rtCommonProps[ 39 'platform.monolith.personalization.dateTimeCondition.popupMsgAction.moveToclient.enabled' 40 ]; 41 return conditionCheckedInClientEnabled 42 ? '_dm_showed_' + 43 actionType + 44 '_' + 45 encodeURIComponent(ruleObjName, 'UTF-8') 46 : '_dm_showed_' + encodeURIComponent(ruleObjName, 'UTF-8'); 47} 48 49//after the action happens the first time we set cookie of shown with ttl 50function setSmartRuleCookie(ruleObjName, actionType) { 51 setCookie( 52 getSmartRuleCookieName(ruleObjName, actionType), 53 true, 54 rtCommonProps['popup.insite.cookie.ttl'] 55 ); 56} 57 58function setCookie(name, value, hours) { 59 let expires = ''; 60 61 if (hours) { 62 let date = new Date(); 63 date.setTime(date.getTime() + hours * 60 * 60 * 1000); 64 expires = '; expires=' + date.toUTCString(); 65 } 66 67 document.cookie = 68 name + '=' + encodeURIComponent(value) + expires + '; path=/'; 69} 70 71//have to be var to be in global scope and accessible from other files 72var ActionType = { 73 POPUP: 'popup', 74 MESSAGE: 'message', 75}; 76 77function shouldShowActionRule(settings) { 78 const checkRuleLogicOnFeEnabled = 79 rtCommonProps[ 80 'platform.monolith.personalization.dateTimeCondition.popupMsgAction.moveToclient.enabled' 81 ]; 82 const shouldCheckUserVisitsCondition = 83 settings.user_visits_number !== undefined; 84 const shouldCheckDateTimeRangeCondition = 85 checkRuleLogicOnFeEnabled && settings.start_time && settings.end_time; 86 87 return { 88 shouldCheckUserVisitsCondition, 89 shouldCheckDateTimeRangeCondition, 90 }; 91} 92 93function parseBoolean(str) { 94 return str.toLowerCase() === 'true'; 95} 96 97}
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.