Files
2026-11-16 01:39:59 +07:00

1 line
318 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(n){var o={};function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=20)}([function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},r=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;var o,c=n(1),a=n(5),s=n(2),l=n(9),u=n(14),p=izConfig.izootoStatus,d=izConfig.promptDesign,f=izConfig.gdprPrompt,g=izConfig.newsHub,y=izConfig.exitIntent,m=izConfig.stickyBar,h=izConfig.articleShare,S=izConfig.CRPSPlaybook,b=izConfig.welcomeNotification,v=izConfig.recommendArticle,C=izConfig.videoPlaybook,w=izConfig.welcomePlaybook,E=izConfig.tabAbandonment,T=izConfig.hash,_=izConfig.convertBlockedUsers,O=izConfig.autoSegment,P=izConfig.email,n=izConfig.adBR;t.Config=(D.setupPath=function(){var e,t;1!=D.global.deviceType&&""!=D.notification.serviceWorkerNameMob&&(D.notification.serviceWorkerName=D.notification.serviceWorkerNameMob),D.notification.serviceWorkerPath=D.notification.domainRoot+D.notification.serviceWorkerName,D.notification.manifest=D.notification.domainRoot+D.notification.manifestName,1==D.notification.isSdkHttps&&("http:"==D.global.locationProtocol?D.notification.sourceOrigin=D.notification.sourceOrigin+D.notification.domainRoot+D.notification.htmlName:""!=D.notification.domainRoot&&(D.notification.sourceOrigin=D.notification.domainRoot+D.notification.htmlName));try{!window._izootoModule&&1!=window.is_wp||(D.notification.pluginStatus=null!==(e=izConfig.pluginStatus)&&void 0!==e?e:1,1==D.notification.pluginStatus&&(l.CookieStorage.setWpCookie("b_type",D.global.browserType),l.CookieStorage.setWpCookie("d_type",D.global.deviceType),window._izootoModule&&1==window._izootoModule.isMagento?(t=window._izootoModule).isSdkHttps&&1==t.isSdkHttps&&(D.notification.serviceWorkerPath="/izooto/assets/sw",D.notification.manifest="/izooto/assets/manifest",D.notification.serviceWorkerScope="/",l.CookieStorage.setWpCookie("evt_trk",D.notification.evtTracking)):window._izootoModule&&1==window._izootoModule.isPrestashop||window._izootoModule&&1==window._izootoModule.isOpencart||1==window.is_wp&&(l.CookieStorage.setWpCookie("evt_trk",D.notification.evtTracking),window._izootoModule&&window._izootoModule.swPath?(D.notification.serviceWorkerPath=window._izootoModule.swPath,D.notification.serviceWorkerScope=D.notification.serviceWorkerScope||"/"):D.notification.serviceWorkerPath=D.notification.domainRoot+"/?izooto=sw",D.notification.manifest=D.notification.domainRoot+"/?izooto=manifest")))}catch(e){}},D.onsiteMultiRSSFeedConfigHandler=function(e){var t=1==e?"exitIntent":"stickyBar",n=izConfig[t];if(n&&n.rfiId&&0<Object.keys(n.rfiId).length){var o,i=n.rfiId,r=D[t].status=0;for(o in i){var a=i[o],s=c.Helper.stringToRegex(a.regex),a=document.location.pathname;if((0==r&&""==s||s.test(a)&&0==r)&&(D[t].feedHash=o.toString(),D[t].status=n.status,""!=s))return void(r=1)}}},D.multiMessengerConfigHandler=function(){if(izConfig.messenger&&0<Object.keys(izConfig.messenger).length){var e,t=0;for(e in izConfig.messenger){var n=izConfig.messenger[e],o=c.Helper.stringToRegex(n.regex),i=document.location.pathname;if((0==t&&""==o||o.test(i)&&0==t)&&(D.messenger.status=null!==(i=n.status)&&void 0!==i?i:0,D.messenger.pageId=e.toString(),D.messenger.prompt=n.promptDesign||{},D.messenger.repeatDelay=null!==(i=n.repeatDelay)&&void 0!==i?i:0,D.messenger.color=n.color||"blue",D.messenger.size=n.size||"large",D.messenger.buttonTextType=null!==(n=n.btnTextType)&&void 0!==n?n:0,""!=o))return void(t=1)}}},D.applyPromptDesign=function(){var e;D.notification.promptDesign.poweredbysrc="https://www.izooto.com/getting-started-with-izooto?utm_source=referral&utm_medium=PoweredBy&utm_campaign="+encodeURIComponent(D.notification.siteUrl),D.brandingPartner!=D.defaultBrandingPartner&&(D.notification.promptDesign.poweredbysrc="javascript:void(0);"),(e=D.notification.promptDesign).message||(e.message="Click on allow to subscribe to notifications"),(e=D.notification.promptDesign).subMessage||(e.subMessage="Stay updated with the latest happenings on our site"),(e=D.notification.promptDesign).icon||(e.icon="https://cdnimg.izooto.com/icons/7/bell-icon.png"),(e=D.notification.promptDesign).btn1Txt||(e.btn1Txt="Later"),(e=D.notification.promptDesign).btn2Txt||(e.btn2Txt="Allow"),(e=D.notification.promptDesign).position||(e.position="right"),(e=D.notification.promptDesign).bgColor||(e.bgColor="#fff"),(e=D.notification.promptDesign).titleForeColor||(e.titleForeColor="#000000"),(e=D.notification.promptDesign).messageForeColor||(e.messageForeColor="#999999"),(e=D.notification.promptDesign).btn1bgColor||(e.btn1bgColor="#e4e4e4"),(e=D.notification.promptDesign).btn1ForeColor||(e.btn1ForeColor="#686868"),(e=D.notification.promptDesign).btn2bgColor||(e.btn2bgColor="#1194ff"),(e=D.notification.promptDesign).btn2ForeColor||(e.btn2ForeColor="#ffffff")},D.gaMigration=function(){var e=izConfig.gaId||"",t=izConfig.ga||{},n=t.id||"",o=null!==(i=t.syncWebPush)&&void 0!==i?i:0,i=null!==(i=t.syncNewsHub)&&void 0!==i?i:0;D.ga.id=e||n,D.ga.syncWebPush=e?1:o,D.ga.syncNewsHub=D.newsHub.gaId?1:i,D.ga.syncMessenger=null!==(i=t.syncMessenger)&&void 0!==i?i:0,D.ga.newsHubEvents=null!==(t=t.newsHubEvents)&&void 0!==t?t:[]},D.init=function(){var n,o;return i(this,void 0,void 0,function(){var t;return r(this,function(e){switch(e.label){case 0:return D.brandingPartner=null!==(n=izConfig.brandingPartner)&&void 0!==n?n:D.defaultBrandingPartner,D.client=null!==(n=izConfig.client)&&void 0!==n?n:c.Helper.throwError("".concat(D.brandingPartner,":: Configuration parameter not found (client)")),D.notification.sourceOrigin=null!==(n=izConfig.sourceOrigin)&&void 0!==n?n:c.Helper.throwError("".concat(D.brandingPartner,":: Configuration parameter not found (sourceOrigin)")),D.notification.domainRoot=null!==(n=izConfig.domainRoot)&&void 0!==n?n:c.Helper.throwError("".concat(D.brandingPartner,":: Configuration parameter not found (domainRoot)")),D.notification.isSdkHttps=null!==(n=izConfig.isSdkHttps)&&void 0!==n?n:c.Helper.throwError("".concat(D.brandingPartner,":: Configuration parameter not found (isSdkHttps)")),D.notification.serviceWorkerName=null!==(n=izConfig.serviceWorkerName)&&void 0!==n?n:c.Helper.throwError("".concat(D.brandingPartner,":: Configuration parameter not found (serviceWorkerName)")),D.notification.manifestName=null!==(n=izConfig.manifestName)&&void 0!==n?n:c.Helper.throwError("".concat(D.brandingPartner,":: Configuration parameter not found (manifestName)")),D.notification.vapidKey||(console.warn("".concat(D.brandingPartner,":: vapid public key not found")),D.izootoStatus=0),D.global.browserName=c.Helper.getBrowserName(),D.global.browserType=c.Helper.getBrowserType(),D.global.deviceType=c.Helper.getDeviceType(),D.global.browserVer=c.Helper.getBrowserVersion(),D.global.browserMajorVersion=c.Helper.getBrowserMajorVersion(),D.global.os=c.Helper.getOS(),D.global.platform=c.Helper.getPlatform(),D.notification.windowType=a.NotificationHelper.getWindowType(),D.notification.isAddFcm=c.Helper.checkForFcm(),!D.notification.fcmEnable&&1!=D.notification.isAddFcm||(D.notification.subscriptionType=1),D.notification.vapidKey&&(D.notification.fcmEnable=0,D.notification.subscriptionType=2),D.global.browserName==s.KeyMapper.BROWSER_SAFARI&&D.global.browserVer<"16"&&(D.notification.subscriptionType=3),D.global.deviceType!=s.KeyMapper.DEVICE_TYPE_DESKTOP&&(D.notification.promptDesign=null!==(o=izConfig.mobPromptDesign)&&void 0!==o?o:D.notification.promptDesign,D.notification.promptType=null!==(o=izConfig.mobPromptFlow)&&void 0!==o?o:D.notification.promptType,D.notification.optInDesignType=null!==(o=izConfig.mobOptInDesignType)&&void 0!==o?o:D.notification.optInDesignType,D.notification.promptDelay=null!==(o=izConfig.mobPromptDelay)&&void 0!==o?o:D.notification.promptDelay,D.notification.repeatPromptDelay=null!==(o=izConfig.mobRepeatPromptDelay)&&void 0!==o?o:D.notification.repeatPromptDelay,D.notification.optInCloseDelay=null!==(o=izConfig.mobOptInCloseDelay)&&void 0!==o?o:D.notification.optInCloseDelay,D.notification.promptOnScroll=null!==(o=izConfig.mobPromptOnScroll)&&void 0!==o?o:0,D.notification.isTriggeredOnScoll=0),D.applyPromptDesign(),D.setupPath(),D.notification.httpsOverlay="<style>.iz-branding{color:white;font-size:25px;position:absolute;top:40%;left:28%;z-index:999999!important;width:50%!important}.iz-arrow img{transform:rotate(180deg)}@media screen and (max-width:600px){#izooto_desktop_overlay{display:none;.iz-arrow{width:100%;position:fixed;top:auto;bottom:35%;left:65%;border-radius:0px}.moz-transfer{width:100%;position:fixed;top:auto;bottom:30%;left:65% !important;border-radius:0px}.moz-transfer img{transform:rotate(180deg) !important}.iz-arrow img{transform:rotate(0deg)}.iz-branding{color:white;font-size:larger;position:fixed;top:40%;left:17%;width:100%}}</style><div id='izooto_desktop_overlay' onclick='_izooto.closeHttpsBranding();' style='z-index: 999999999;position: fixed;height: 100%;top: 0px;left: 0px;width: 100%;background: rgba(0, 0, 0, 0.89);'><div class='izoverlay-container'><div class='iz-branding'><div class='iz-text' style='padding-bottom:5px; font-family:Arial; display: -webkit-box; -webkit-line-clamp: 2; text-overflow: ellipsis; overflow: hidden; word-wrap: break-word; -webkit-box-orient: vertical;'>"+D.notification.overlayMessage+"</div><div class='iz-powered-text'><a class='izbranding' href='"+D.notification.promptDesign.poweredbysrc+"' target='_blank' style='cursor: pointer !important;color:#fff!important;font-size: 12px;font-family: Arial;letter-spacing: 0.4px;text-decoration: none;'><span style='color: #9c9c9c;'>Powered by</span> <span>"+D.brandingPartner+"</span></a></div></div></div>",D.notification.httpsBranding="<style>.iz-branding {z-index: 2147483646;background: #000;opacity: .65;box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.27);border-radius: 2px 0px 0px 2px;letter-spacing: 0.04em;padding: 6px 15px;display: flex;flex-direction: row;align-items: center;justify-content: center;max-width: fit-content;position: fixed;top: 0;right: 0;}.iz-branding .iz-text {font-size: 12px;font-family: Arial;letter-spacing: 0.04em;color: rgb(255 255 255 / 90%);display: flex;flex-direction: row;align-items: center;justify-content: center;}.iz-branding a .iz-brand {font-size: 12px;font-family: Arial;letter-spacing: 0.04em;color: #fff;font-weight:bold;}</style><div class='iz-branding'><div class='iz-text'>Notifications Powered by&nbsp;<a href='"+D.notification.promptDesign.poweredbysrc+"' target='_blank' style='text-decoration: none;color: unset;'><span class='iz-brand'>"+D.brandingPartner+"</span></a></div></div>",t="desktop",D.global.deviceType==s.KeyMapper.DEVICE_TYPE_DESKTOP?(u.Notification.isWebPushEnabled=!!D.notification.desktopAllowed,D.newsHub.status=D.newsHub.desktopAllowed||D.newsHub.status):(t="mobile",u.Notification.isWebPushEnabled=!!D.notification.mobileAllowed,D.newsHub.status=D.newsHub.mobileAllowed||D.newsHub.status),D.email.status=null!==(o=null===(o=null==P?void 0:P[t])||void 0===o?void 0:o.status)&&void 0!==o?o:0,D.email.type=null!==(o=null===(o=null==P?void 0:P[t])||void 0===o?void 0:o.type)&&void 0!==o?o:1,D.email.repeatPromptDelay=null!==(o=null===(o=null==P?void 0:P[t])||void 0===o?void 0:o.repeatPromptDelay)&&void 0!==o?o:60,D.onsiteMultiRSSFeedConfigHandler(1),D.onsiteMultiRSSFeedConfigHandler(2),D.multiMessengerConfigHandler(),a.NotificationHelper.canSupportIOSPush()&&a.NotificationHelper.IOSManifestHandler(),t=D.notification,[4,a.NotificationHelper.isSupported()];case 1:return t.isSupported=e.sent(),[2]}})})},D.SDKVersion="8.13.8",D.izootoStatus=null!=p?p:1,D.autoSegmentStatus=null!=O?O:0,D.hashFileName=T||"",D.defaultBrandingPartner="iZooto",D.debug=null!==(T=izConfig.debug)&&void 0!==T?T:0,D.branding=null!==(T=izConfig.branding)&&void 0!==T?T:1,D.promptSequencing=null!==(T=izConfig.promptSequencing)&&void 0!==T?T:1,D.global={isSetCidLoaded:!1,isIncoginito:!1,isSessionHandled:!1,locationProtocol:document.location.protocol,msgReceiverExist:0,cookieDomain:null!==(T=izConfig.cDomain)&&void 0!==T?T:"",cookieExpiryDays:1500,cookieSameSite:"SameSite=Lax;",browserName:"",browserType:0,deviceType:0,browserVer:"",browserMajorVersion:0,os:0,platform:"",isFrame:window.top!=window.self},D.debugger={status:0,err:0,successCode:"color: #228B22",errCode:"color: #FF0000",infoCode:"background: #ffffcc, color: #222",gcmValidator:"https://api.izooto.com/validate-gcm/",host:document.location.protocol+"//"+document.location.hostname},D.store={subscriberId:!1,lastClick:!1,lastView:!1,syncedEventList:[],isNotificationDisabledManually:!1,isSoftSubscribeTriggered:!1,isTriggerPromptWithDelay:!1,isNotificationCalledManually:!1,isMDSyncingRequired:!1,isSubscriptionLost:!1,subscriptionBasedEventNameList:["event","trigger","userProfile","personalizationProperty","add_property"]},D.notification={tokenExpire:null!==(T=izConfig.tokenExpire)&&void 0!==T?T:86400,repeatPromptDelay:null!==(T=izConfig.repeatPromptDelay)&&void 0!==T?T:0,optInCloseDelay:null!==(T=izConfig.optInCloseDelay)&&void 0!==T?T:60,sourceOrigin:"",domainRoot:"",isSdkHttps:0,serviceWorkerName:"",htmlName:izConfig.htmlName||"/izooto.html",manifestName:"",manifest:"",subscriptionType:0,fcmToken:"",autoPrompt:!0,httpsBranding:"",swSubscribe:null!==(T=izConfig.swSubscribe)&&void 0!==T?T:1,overlay:null!==(T=izConfig.overlay)&&void 0!==T?T:0,overlayMessage:izConfig.overlayMessage||"Click on 'allow' to subscribe to notifications",httpsOverlay:"",clickOnAllowMsg:izConfig.clickOnAllowMsg||"Click On allow to subscribe to notifications",subscribedMsg:izConfig.subscribedMsg||"Subscribed",alreadySubscribedMsg:izConfig.alreadySubscribedMsg||"You've already subscribed to notifications.",blockedMsg:izConfig.blockedMsg||"Blocked",alreadyDeniedMsg:izConfig.alreadyDeniedMsg||"You've blocked notifications from this site.",httpsNoRoot:null!==(T=izConfig.httpsNoRoot)&&void 0!==T?T:0,windowType:0,mobileAllowed:null!==(T=izConfig.mobileAllowed)&&void 0!==T?T:1,desktopAllowed:null!==(T=izConfig.desktopAllowed)&&void 0!==T?T:1,allowedKeys:["bookingurl","landingurl"],webPushId:izConfig.webPushId||"",webServiceUrl:izConfig.webServiceUrl||"",processPriority:null!==(T=izConfig.processPriority)&&void 0!==T?T:0,masterDomain:izConfig.masterDomain||"",masterDomainPath:izConfig.masterDomainPath||"",cdnHost:"cdn.izooto.com",siteUrl:izConfig.siteUrl||"",promptDelay:null!==(T=izConfig.promptDelay)&&void 0!==T?T:0,promptType:null!==(T=izConfig.promptFlow)&&void 0!==T?T:0,defaultOptinDesign:"",hidePopup:null===(T=izConfig.hidePopup)||void 0===T||T,fullPopUp:null!==(T=izConfig.fullPopUp)&&void 0!==T?T:0,promptDesign:d||{message:"",subMessage:"",icon:"",btn1Txt:"",btn2Txt:"",position:"",bgColor:"",titleForeColor:"",messageForeColor:"",btn1bgColor:"",btn1ForeColor:"",btn2bgColor:"",btn2ForeColor:"",poweredbysrc:""},optInDesign:izConfig.optInDesign||"",dialogDesign:"",gdprDialogDesign:"",optInSrc:"https://cdn.izooto.com/optin/",optInDesignType:null!==(T=izConfig.optInDesignType)&&void 0!==T?T:"1",optinModule:{optinType:1,data:""},gdprModule:{gdprType:1,data:""},sourceOriginAlt:izConfig.sourceOriginAlt||"",fcmEnable:null!==(T=izConfig.fcmEnable)&&void 0!==T?T:0,isAddFcm:0,allowedDomain:izConfig.allowedDomain||"",serviceWorkerPath:"",serviceWorkerScope:izConfig.swScope||"",serviceWorkerNameMob:izConfig.serviceWorkerNameMob||"",vapidKey:izConfig.vapidPublicKey||"",subscriptionObj:{},pluginStatus:0,isShopify:null!==(T=izConfig.isShopify)&&void 0!==T?T:0,sysEvents:null!==(T=izConfig.sysEvents)&&void 0!==T?T:1,sysEventsFlag:void 0!==izConfig.sysEvents?1:0,propsTracking:null!==(T=izConfig.propsTracking)&&void 0!==T?T:1,evtTracking:null!==(T=izConfig.evtTracking)&&void 0!==T?T:1,userEvents:null!==(T=izConfig.userEvents)&&void 0!==T?T:0,isTagsEnabled:null!==(T=izConfig.tagsEnabled)&&void 0!==T?T:0,utmKeys:["utm_content","utm_medium","utm_source","utm_campaign","utm_term"],shortutmKeys:["uco","ume","uso","uca","ute"],serviceWorkerVersion:void 0,promptOnScroll:null!==(T=izConfig.promptOnScroll)&&void 0!==T?T:0,isTriggeredOnScoll:0,eventAsTrigger:null!==(T=izConfig.eventAsTrigger)&&void 0!==T?T:0,eventsToSync:(null===(T=null===izConfig||void 0===izConfig?void 0:izConfig.webPush)||void 0===T?void 0:T.syncEvent)||[],syncNotificationView:null!==(T=izConfig.syncNotificationView)&&void 0!==T?T:"",syncNotificationClick:null!==(T=izConfig.syncNotificationClick)&&void 0!==T?T:"",syncVisitType:null!==(T=izConfig.syncVisitType)&&void 0!==T?T:0,isSupported:!0,gdprNotAllowed:["userProfile","personalizationProperty","trigger","event"],isGdprAllowed:1,gdprPrompt:{status:null!==(T=null==f?void 0:f.status)&&void 0!==T?T:0,type:(null==f?void 0:f.type)||1,title:null==f?void 0:f.title,btn1Txt:null==f?void 0:f.btn1Txt,btn2Txt:null==f?void 0:f.btn2Txt},syncLimit:{evtPerDay:null!==(T=izConfig.evtPerDay)&&void 0!==T?T:1e4,propsPerDay:null!==(T=izConfig.propsPerDay)&&void 0!==T?T:1e4,evtPerMonth:null!==(T=izConfig.evtPerMonth)&&void 0!==T?T:1e4,propsPerMonth:null!==(T=izConfig.propsPerMonth)&&void 0!==T?T:1e4},welcomeNotification:{status:null!==(T=null==b?void 0:b.status)&&void 0!==T?T:0,title:(null==b?void 0:b.title)||"",body:(null==b?void 0:b.body)||"",icon:(null==b?void 0:b.icon)||"",url:(null==b?void 0:b.url)||"",showAfter:null!==(T=null==b?void 0:b.showAfter)&&void 0!==T?T:0,timeout:null!==(T=null==b?void 0:b.clickTimeout)&&void 0!==T?T:0}},D.ga={id:"",syncCid:null!==(T=null===izConfig||void 0===izConfig?void 0:izConfig.syncGACid)&&void 0!==T?T:0,swEvents:null!==(T=null===izConfig||void 0===izConfig?void 0:izConfig.gaSwEvents)&&void 0!==T?T:0,syncWebPush:0,syncNewsHub:0,newsHubEvents:[],syncMessenger:0,subscriptionCallback:[],promptDisplayCallback:[],oldId:""},D.messenger={syncPrompt:null!==(T=null===(T=izConfig.messengerConf)||void 0===T?void 0:T.syncPrompt)&&void 0!==T?T:1,status:null!==(T=izConfig.messengerPromptStatus)&&void 0!==T?T:0,pageId:izConfig.messengerPageId||"",repeatDelay:null!==(T=izConfig.messengerRepeatDelay)&&void 0!==T?T:0,prompt:izConfig.messengerPrompt||{},size:"large",color:"blue",buttonTextType:0,autoPrompt:!0},D.tabAbandonment={status:null!==(T=null==E?void 0:E.status)&&void 0!==T?T:0,timeout:null!==(T=null==E?void 0:E.timeout)&&void 0!==T?T:6e3,pushTimeout:null!==(T=null==E?void 0:E.pushTimeout)&&void 0!==T?T:3600,data:(null==E?void 0:E.data)||{},counter:0},D.welcomePlaybook={status:null!==(T=null==w?void 0:w.status)&&void 0!==T?T:0,data:(null==w?void 0:w.data)||{}},D.newsHub={title:(null==g?void 0:g.title)||"",designType:null!==(T=null==g?void 0:g.designType)&&void 0!==T?T:1,mainColor:(null==g?void 0:g.mainColor)||"",iconType:null!==(T=null==g?void 0:g.iconType)&&void 0!==T?T:1,placement:(null==g?void 0:g.placement)||[1,1],allVisitors:null!==(T=null==g?void 0:g.allVisitors)&&void 0!==T?T:1,gaId:(null==g?void 0:g.gaId)||"",autoWidget:null===(T=null==g?void 0:g.autoWidget)||void 0===T||T,callOut:null!==(T=null==g?void 0:g.callOut)&&void 0!==T?T:1,callOutTimeout:null!=g&&g.callOutTimeout&&2<=g.callOutTimeout&&g.callOutTimeout<=10?g.callOutTimeout:10,allowFeed:null!==(T=null==g?void 0:g.allowFeed)&&void 0!==T?T:0,nudgeStatus:null!==(T=null==g?void 0:g.nudgeStatus)&&void 0!==T?T:1,ads:null!==(T=null==g?void 0:g.ads)&&void 0!==T?T:0,adUnit:(null==g?void 0:g.adUnit)||"",callOutAds:null!==(T=null==g?void 0:g.callOutAds)&&void 0!==T?T:0,callOutAdUnit:(null==g?void 0:g.callOutAdUnit)||"",triggered:!1,status:null!==(T=null==g?void 0:g.status)&&void 0!==T?T:0,templateType:null!==(T=null==g?void 0:g.templateType)&&void 0!==T?T:2,htmlVersion:{1:"3.1",2:"1.1"}},D.videoDropoff={status:null!==(T=null==C?void 0:C.status)&&void 0!==T?T:0,allowedUrls:(null==C?void 0:C.allowedUrls)||[]},D.CRPSPlaybook={status:null!==(T=null==S?void 0:S.status)&&void 0!==T?T:0,data:(null==S?void 0:S.data)||{},isPaidSubscriber:!1},D.exitIntent={status:null!==(T=null==y?void 0:y.status)&&void 0!==T?T:0,mobileAllowed:null!==(T=null==y?void 0:y.mobileAllowed)&&void 0!==T?T:1,desktopAllowed:null!==(T=null==y?void 0:y.desktopAllowed)&&void 0!==T?T:1,title:(null==y?void 0:y.title)||" ",titleColor:(null==y?void 0:y.titleColor)||"#000000",bgColor:(null==y?void 0:y.bgColor)||"#1194FF",onExit:null!==(T=null==y?void 0:y.onExit)&&void 0!==T?T:0,onScrollPercent:null!==(T=null==y?void 0:y.onScrollPercent)&&void 0!==T?T:0,onScroll:null!==(T=null==y?void 0:y.onScroll)&&void 0!==T?T:null!==(o=null==y?void 0:y.onScrollPercent)&&void 0!==o?o:0,onDelay:null!==(o=null==y?void 0:y.onDelay)&&void 0!==o?o:0,onBack:null!==(o=null==y?void 0:y.onBack)&&void 0!==o?o:1,repeatDelay:null!==(o=null==y?void 0:y.repeatDelay)&&void 0!==o?o:0,closeDelay:null!==(o=null==y?void 0:y.closeDelay)&&void 0!==o?o:60,cid:(null==y?void 0:y.cid)||0,rid:(null==y?void 0:y.rid)||"0",featureAdUnit:(null==y?void 0:y.featureAdUnit)||"",ads:null!==(o=null==y?void 0:y.ads)&&void 0!==o?o:0,adUnit:(null==y?void 0:y.adUnit)||"",logoURL:(null==y?void 0:y.logoURL)||"",feedHash:"",osnType:1,autoPopup:!0,adfc:null!==(o=null==y?void 0:y.adfc)&&void 0!==o?o:0,templateType:null!==(o=null==y?void 0:y.templateType)&&void 0!==o?o:1,htmlVersion:{1:"3.0",2:"1.0",3:"1.0"}},D.stickyBar={status:null!==(o=null==m?void 0:m.status)&&void 0!==o?o:0,title:(null==m?void 0:m.title)||"You might also like",titleColor:(null==m?void 0:m.titleColor)||"#FFFFFF",mobileAllowed:null!==(o=null==m?void 0:m.mobileAllowed)&&void 0!==o?o:1,desktopAllowed:null!==(o=null==m?void 0:m.desktopAllowed)&&void 0!==o?o:1,bgColor:(null==m?void 0:m.bgColor)||"#1194FF",repeatDelay:null!==(o=null==m?void 0:m.repeatDelay)&&void 0!==o?o:0,closeDelay:null!==(o=null==m?void 0:m.closeDelay)&&void 0!==o?o:60,cid:(null==m?void 0:m.cid)||0,rid:(null==m?void 0:m.rid)||"0",ads:null!==(o=null==m?void 0:m.ads)&&void 0!==o?o:0,adUnit:(null==m?void 0:m.adUnit)||"",autoPopup:!0,feedHash:"",osnType:2},D.articleShare={status:null!==(o=null==h?void 0:h.status)&&void 0!==o?o:0,repeatDelay:null!==(o=null==h?void 0:h.repeatDelay)&&void 0!==o?o:0,closeDelay:null!==(o=null==h?void 0:h.closeDelay)&&void 0!==o?o:60,cid:(null==h?void 0:h.cid)||0,rid:(null==h?void 0:h.rid)||"0",ads:null!==(o=null==h?void 0:h.ads)&&void 0!==o?o:0,adUnit:(null==h?void 0:h.adUnit)||"",type:3},D.convertBlockedUsers={status:null!==(o=null==_?void 0:_.status)&&void 0!==o?o:0,triggerType:null!==(o=null==_?void 0:_.triggerType)&&void 0!==o?o:0,promptDelay:null!==(o=null==_?void 0:_.promptDelay)&&void 0!==o?o:5,title:(null==_?void 0:_.title)||"",message:(null==_?void 0:_.message)||"",btnText:(null==_?void 0:_.btnText)||""},D.recommendArticle={status:null!==(o=null==v?void 0:v.status)&&void 0!==o?o:0},D.email={status:0,type:1,repeatPromptDelay:60,dataClientId:(null==P?void 0:P.dataClientId)||""},D.adBR={status:null!==(o=null==n?void 0:n.status)&&void 0!==o?o:0,adUnit:(null==n?void 0:n.adUnit)||"",logoSrc:(null==n?void 0:n.logoSrc)||"",rid:(null==n?void 0:n.rid)||"",cid:(null==n?void 0:n.cid)||0,templateId:1,htmlVersion:{1:"1.0"}},D);function D(){}},function(e,t,n){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},o=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},s=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Helper=void 0;var c=n(0),l=n(2),u=n(3),r=n(4),p=n(5),i=n(9),d=n(11),f=n(8),n=(g.checkBrowser=function(){navigator.appVersion;var e,t=navigator.userAgent.toLowerCase(),n=navigator.appName,o=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10),r=0,r=-1!=(e=t.indexOf("opr/"))?(n=l.KeyMapper.BROWSER_OPERA,o=t.substring(e+4),4):-1!=(e=t.indexOf("opera"))?(n=l.KeyMapper.BROWSER_OPERA,o=t.substring(e+6),-1!=(e=t.indexOf("version"))&&(o=t.substring(e+8)),4):-1!=(e=t.indexOf("edge/"))||-1!=(e=t.indexOf("edga/"))?(n=l.KeyMapper.BROWSER_EDGE,o=t.substring(e+5),7):-1!=(e=t.indexOf("edgios/"))?(n="Edge",o=t.substring(e+7),7):-1!=(e=t.indexOf("edg/"))?(n="Edge",o=t.substring(e+4),7):-1!=(e=t.indexOf("ucbrowser"))?(n=l.KeyMapper.BROWSER_UCB,o=t.substring(e+10),6):-1!=(e=t.indexOf("msie"))?(n=l.KeyMapper.BROWSER_IE,o=t.substring(e+5),5):-1!=(e=t.indexOf("crios"))?(n=l.KeyMapper.BROWSER_CHROME,o=t.substring(e+6),1):-1!=(e=t.indexOf("chrome"))?(n=l.KeyMapper.BROWSER_CHROME,o=t.substring(e+7),1):-1!=(e=t.indexOf("firefox"))?(n=l.KeyMapper.BROWSER_FIREFOX,o=t.substring(e+8),3):-1!=(e=t.indexOf("fxios"))?(n=l.KeyMapper.BROWSER_FIREFOX,o=t.substring(e+6,e+11),3):-1!=(e=t.indexOf("safari"))&&(/mac/.test(t)||/ipad|iphone|ipod/.test(t))?(n=l.KeyMapper.BROWSER_SAFARI,o=t.substring(e+7),-1!=(e=t.indexOf("version"))&&(o=t.substring(e+8)),2):(n=l.KeyMapper.BROWSER_OTHER,o="1",5);return-1!=(e=(o=-1!=(e=o.indexOf(";"))?o.substring(0,e):o).indexOf(" "))&&(o=o.substring(0,e)),i=parseInt(""+o,10),isNaN(i)&&(o=""+parseFloat(navigator.appVersion),i=parseInt(navigator.appVersion,10)),[n,i,o,r]},g.getBrowserName=function(){return this.checkBrowser()[0]},g.getBrowserVersion=function(){return this.checkBrowser()[2]},g.getBrowserMajorVersion=function(){return this.checkBrowser()[1]},g.getBrowserType=function(){return this.checkBrowser()[3]},g.isTablet=function(e){if(/android/.test(e)){if(!1===/mobile/.test(e))return!0}else if(!0===/ipad/.test(e))return!0;return!1},g.isMobile=function(){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i.test(navigator.userAgent||navigator.vendor||window.opera)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test((navigator.userAgent||navigator.vendor||window.opera).substr(0,4))},g.isIos=function(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document},g.getDeviceType=function(){var e=(e=navigator.userAgent).toLowerCase();return this.isTablet(e)?l.KeyMapper.DEVICE_TYPE_TABLET:this.isMobile()?l.KeyMapper.DEVICE_TYPE_MOBILE:l.KeyMapper.DEVICE_TYPE_DESKTOP},g.getOS=function(){var e=navigator.userAgent.toLowerCase();return/windows phone/i.test(e)?6:/android/i.test(e)?4:/ipad|iphone|ipod/.test(e)&&!window.MSStream?5:/linux/i.test(e)?2:/macintosh|mac os x/i.test(e)?3:/windows|win32/i.test(e)?1:7},g.getOSName=function(){return[l.KeyMapper.OS_WINDOWS,l.KeyMapper.OS_LINUX,l.KeyMapper.OS_MAC,l.KeyMapper.OS_ANDROID,l.KeyMapper.OS_IOS,l.KeyMapper.OS_WP,l.KeyMapper.OS_OTHER][g.getOS()-1]},g.getPlatform=function(){var e="";return 1==window.is_wp?e="wordpress":1==c.Config.notification.isShopify?e="shopify":null!=window._izootoModule&&1==window._izootoModule.isMagento?e="magento":null!=window._izootoModule&&1==window._izootoModule.isOpencart&&(e="opencart"),e},g.getMetaValue=function(e){try{for(var t=document.getElementsByTagName("meta"),n=0;n<t.length;n++)if(t[n].getAttribute("name")===e||t[n].getAttribute("property")===e)return t[n].getAttribute("content")}catch(e){}return""},g.endPointParamExtract=function(e){var t="";try{t=JSON.parse(e).endpoint}catch(e){}return{ep:t=c.Config.global.browserName==l.KeyMapper.BROWSER_EDGE?encodeURIComponent(t):t}},g.getEndpoint=function(e){var t={SoftUnsubscribe:["usub","sunsub"],SoftSubscribe:["usub","sunsub"],NotImplemented:["ni","nimp"],SegmentEvents:["et","evt"],SegmentProperties:["prp","prp"],TriggerEvent:["trg","trg"],PersonalProperties:["pp","pprp"],CustomerIDSynch:["pp","idsyn"],CustomerIDLogout:["pp","clout"],last_visit:["lvi","lvi"],Visitor:["viz","viz"],ShopifyMapper:["oth","spm"],GDPRConsent:["prv","gdp"],FCMMigration:["enu","enu"],syncAdNetwork:["cs","cs"],syncNotificationView:["imp","wimp"],syncAllSubscribersVisit:["viz","viz"],syncMessenger:["msngenr","msngenr"],getUUIDFromEp:["uuid","uuid"],gdprLocationUrl:["rapi",""],gdprStatusUrl:["prv","gdp"],shopifyAPI:["events","shopifywh1.php"],subscriptionValidator:["ss","ss.php"],supUrl:["evt","sup.php"],notificationClick:["clk","clk"],messengerPrompted:["msngp","msngp"],notificationSent:["snt","snt"],syncOnsiteClick:["osclk","osclk"],syncOnsiteView:["osimp","osimp"],syncOnsiteDismissed:["osdis","osdis"],syncNewshubView:["nhwimp","nhwimp"],syncNewshubOpen:["nhwopn","nhwopn"],syncClientSideChurn:["csc","csc"],syncEmail:["esub","esub"]};return t[l.KeyMapper.PROMPT_ALLOWED]=["enp","enp"],t[l.KeyMapper.ALREADY_GRANTED]=["enp","enp"],t[l.KeyMapper.PROMPT_CLOSED]=["sbp","ncls"],t[l.KeyMapper.OPTIN_ALLOWED]=["sbp","salw"],t[l.KeyMapper.PROMPT_DENIED]=["sbp","nblk"],t[l.KeyMapper.ALREADY_DENIED]=["sbp","nblk"],t[l.KeyMapper.OPTIN_CLOSED]=["sbp","sblk"],t[l.KeyMapper.POPUP_CLOSED]=["sbp","swc"],t[l.KeyMapper.PROMPTED]=["sbpd","npd"],t[l.KeyMapper.OPTIN_SHOWN]=["sbpd","spd"],t[l.KeyMapper.BROWSER_UNSUPPORTED]=["na","nsp"],t.hasOwnProperty(e)?"https://".concat(t[e][0],".izooto.com/").concat(t[e][1]):"https://err.izooto.com/err"},g.getTimeDiff=function(e,t){if(!e)return 0;e=(e-(new Date).getTime())/1e3;return null!=t&&0!=t||(e/=60),Math.abs(Math.round(e))},g.urlB64ToUint8Array=function(e){for(var e=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),t=window.atob(e),n=new Uint8Array(t.length),o=0;o<t.length;++o)n[o]=t.charCodeAt(o);return n},g.getLanguage=function(){var e=document.documentElement.lang;if(""==e)try{for(var t=document.getElementsByTagName("meta"),n=0;n<t.length;n++)"content-language"==t[n].getAttribute("http-equiv")&&(e=t[n].getAttribute("content"))}catch(e){}return e},g.displayLog=function(e,t){e=(window.top!=window.self?"".concat(c.Config.brandingPartner," Iframe: => "):"".concat(c.Config.brandingPartner," => ")).concat(e),1===c.Config.debug&&(void 0!==t?console.warn(e,t):console.warn(e))},g.throwError=function(e){throw new Error(e)},g.getParamFromUrl=function(e,t){return new URL(e).searchParams.get(t)},g.izParseQuery=function(e){for(var t={},n=("?"===e[0]?e.substr(1):e).split("&"),o=0;o<n.length;o++){var i=n[o].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]||"")}return t},g.replaceQueryParam=function(e,t,n){var o=new RegExp("([?|&])"+t+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+n+"$2"):e+i+t+"="+n},g.getUTMParamsOfUrl=function(e){try{var t=(e=void 0===e?window.location.href:e).indexOf("?");if(0<t){var n=e.substring(t+1),o=g.izParseQuery(n),i={};return 2<c.Config.notification.utmKeys.map(function(e,t){var n=o.hasOwnProperty(e);return n&&(""==e&&null==e||(i[c.Config.notification.shortutmKeys[t]]=o[e])),n}).reduce(function(e,t,n){return t?e+1:e})?i:{}}return{}}catch(e){return{}}},g.getQuerySting=function(e){try{var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.join("&")}catch(e){}},g.objToParam=function(t){var e="";try{e=Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")}catch(e){}return e},g.addMsgReciever=function(t,e){if(void 0===e&&(e=!1),1!=c.Config.global.msgReceiverExist||e){e||(c.Config.global.msgReceiverExist=1);try{window.addEventListener("message",function(e){(-1<e.origin.indexOf(window.location.host)||"https://cdn.izooto.com"==e.origin||-1<e.origin.indexOf(c.Config.notification.sourceOrigin)||g.isSourceOriginAltInOrigin(e)||-1<e.origin.indexOf(c.Config.notification.siteUrl)||-1<c.Config.notification.masterDomain.indexOf(e.origin)||3==c.Config.notification.windowType)&&e.data&&t(e)})}catch(e){}}},g.isSourceOriginAltInOrigin=function(e){return c.Config.notification.sourceOriginAlt.includes(e.origin)},g.postMessage=function(e,t,n,o){try{var i,r;null!=typeof e&&null!=t&&((i={})[t]=void 0!==n?n:1,i.serviceWorkerVersion=o,!p.NotificationHelper.subscriptionSyncedFromSW||t!=l.KeyMapper.ALREADY_GRANTED&&t!=l.KeyMapper.PROMPT_ALLOWED||(i.httpSuccess=!0),(r={})[l.KeyMapper.MESSAGE]=i,g.postToTargetedWindow(e,r),g.postToTargetedWindow(e,{izootoMsg:{k:t,v:void 0!==n?n:1}}))}catch(e){}},g.postToTargetedWindow=function(e,t){"Posting message to ".concat(e," window : ");try{"parent"===e?window.parent.postMessage(JSON.stringify(t),"*"):"opener"===e?window.opener&&window.opener.postMessage(JSON.stringify(t),"*"):e.contentWindow.postMessage(JSON.stringify(t),"*")}catch(e){}},g.addHTML=function(e,t,n){try{var o=document.body,i=document.createElement(e);return i.setAttribute("id",n||""),i.innerHTML=t,o.appendChild(i),i}catch(e){g.displayLog("Could't add HTML : ",e)}},g.removeHTML=function(e){try{e.remove()}catch(e){g.displayLog("Error while removing HTML",e)}},g.addExternalJS=function(o,i,r,e){return new Promise(function(e,t){var n=document.createElement("script");n.onload=e,n.onerror=t,n.async=r||!1,n.id=i||"",n.src=o,(document.body||document.head).appendChild(n)})},g.checkForFcm=function(){var e=g.getBrowserMajorVersion(),t=g.getBrowserName();return t==l.KeyMapper.BROWSER_UCB&&12<=e||t==l.KeyMapper.BROWSER_OPERA&&42<=e||t==l.KeyMapper.BROWSER_EDGE&&17<=e?1:0},g.isJSONString=function(e){try{JSON.parse(e)}catch(e){return!1}return!0},g.parseToJSON=function(e){try{return JSON.parse(e)}catch(e){return!1}},g.removeHtmlTagsFromString=function(e){var t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""},g.stringToRegex=function(e,t){var n="";return n="object"==typeof e&&0<Object.keys(e).length&&""!=e[0]?1<Object.keys(e).length?new RegExp(e[0],e[1]):new RegExp(e[0]):n},g.getParsedMethod=function(e){try{return new Function("return "+atob(e))()}catch(e){g.displayLog("Error while parsing custom module")}},g.getDateDiffrenceFromPresent=function(e){try{var t=new Date(e),n=new Date,o=Math.abs(t-n)/1e3;return Math.floor(o/86400)}catch(e){}},g.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},g.getUUID=function(){return o(this,void 0,void 0,function(){var t,n;return s(this,function(e){switch(e.label){case 0:return[4,g.getUUIDFromStorage()];case 1:return""==(t=e.sent())&&(n=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"==e?t:3&t|8).toString(16)})),[2,t]}})})},g.getUUIDFromStorage=function(){return o(this,void 0,void 0,function(){return s(this,function(e){return[2,new Promise(function(t,e){var n=u.Storage.getStorage(l.KeyMapper.UUID)||"";d.IndexedDB.getValueFromiDbOptions("uid").then(function(e){t(e||n),g.syncUUIDMigration(n,e)})})]})})},g.syncUUIDMigration=function(e,t){e!=t&&(e&&t&&(g.UUIDMapper(e,t),u.Storage.setStorage(l.KeyMapper.UUID,t)),e||u.Storage.setStorage(l.KeyMapper.UUID,t),t||g.setUUIDiDb(e))},g.isUUID=function(){return o(this,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:return[4,g.getUUIDFromStorage()];case 1:return""!=e.sent()?[2,!0]:[2,!1]}})})},g.setUUID=function(){return o(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return t=c.Config.UUID,[4,g.isUUID()];case 1:return e.sent()||(u.Storage.setStorage(l.KeyMapper.UUID,t),g.setUUIDiDb(t),i.CookieStorage.setWpCookie("izooto_uid",t)),[2]}})})},g.setUUIDiDb=function(e){d.IndexedDB.addUpdate("uid",e).then(function(e){}).catch(function(e){g.displayLog(e)})},g.UUIDMapper=function(t,n){var o=g.getEndpoint("FCMMigration");t&&n&&g.getFlagBasedParameter({subscriptionMeta:!0,subcription:!0}).then(function(e){e=a(a({},e),{oBkey:t,bKey:n});r.HttpRequest.postForm(o,e).then(function(){}).catch(function(e){})})},g.getUUIDFromEndpoint=function(i){return new Promise(function(t,e){var n=g.getEndpoint("getUUIDFromEp"),o=p.NotificationHelper.subcriptionToObject(i);2==c.Config.notification.subscriptionType&&(o=o.endpoint),n="".concat(n,"?pid=").concat(c.Config.client,"&ep=").concat(o,"&btype=").concat(c.Config.global.browserType),r.HttpRequest.get(n).then(function(e){e=g.parseToJSON(e);e.hasOwnProperty("id")&&"NULL"!=e.id&&"string"==typeof e.id&&t(e.id),t("")}).catch(function(){t("")})})},g.isScreenScrollable=function(){try{var e=document.body,t=e.parentNode,n=e.scrollHeight-e.clientHeight;if(2<=(n="CSS1Compat"==document.compatMode?t.scrollHeight-t.clientHeight:n)/window.screen.availHeight)return!0}catch(e){}return g.displayLog("This page is not scrollable!"),!1},g.izootoBrandingHandler=function(e){if(0==c.Config.branding)try{var t,n=e?e.document.querySelectorAll(".izbranding"):document.getElementsByClassName("izbranding");for(t in n)n[t].style.display="none",g.displayLog("Branding Disabled")}catch(e){}},g.addIFrame=function(o,i,e){return new Promise(function(e,t){try{var n=document.createElement("IFRAME");return n.setAttribute("src",o),n.setAttribute("id",i),n.style.width="0px",n.style.height="0px",n.style.border="0px",n.setAttribute("visibility","hidden"),n.style.display="none",n.onload=function(){return e(!0)},(null!=document.body?document.body:document.head).appendChild(n),n}catch(e){g.displayLog("Unable to subFrame : ",e)}})},g.setHref=function(e,t){document.querySelector(e).href=t},g.getTimeAgoStringByTimestamp=function(e){var t,n=new Date,e=new Date(e),e=n.getTime()-e.getTime(),e=parseInt(e/1e3);if(!isNaN(e)){if(e<=60)return"1 min ago ";if(60<e&&e<3600){var o=Math.round(e/60);return 1<o?o+" mins ago":o+" min ago"}if(3600<=e&&e<86400){o=Math.round(e/3600);return 1<o?o+" hrs ago":o+" hr ago"}return 86400<=e&&e<2592e3?1<(t=Math.round(e/86400))?t+" days ago":"yesterday":2592e3<=e?1<(t=Math.round(e/2592e3))?t+" months ago":t+" month ago":void 0}},g.hideElement=function(e,t){void 0===t&&(t=window.document);try{var n=t.querySelector(e);n&&(n.style.display="none")}catch(e){g.displayLog("Error : While hide element",e)}},g.showElement=function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n=window.document);try{var o=n.querySelector(e);o&&(o.style.display=t?"block":"flex")}catch(e){g.displayLog("Error : While show element",e)}},g.setCssPropperty=function(e,t,n,o){void 0===o&&(o=window.document);try{var i=o.querySelector(e);i&&(i.style[t]=n)}catch(e){g.displayLog("Error : While set css property",e)}},g.addClass=function(e,t){try{(!(e instanceof HTMLElement)&&g.getDomElement(e)).classList.add(t)}catch(e){}},g.removeClass=function(e,t){try{(!(e instanceof HTMLElement)&&g.getDomElement(e)).classList.remove(t)}catch(e){}},g.getFlagBasedParameter=function(i,r){return o(this,void 0,void 0,function(){return s(this,function(e){return[2,new Promise(function(t){var e,n,o={};o={pid:c.Config.client,btype:c.Config.global.browserType,dtype:c.Config.global.deviceType,bver:c.Config.global.browserVer,os:c.Config.global.os};try{null!=i&&i.subscriptionMeta&&(e={izcid:u.Storage.getConfigLocal(l.KeyMapper.IZCID),ht:"https:"==c.Config.global.locationProtocol?1:0,sw:c.Config.notification.serviceWorkerVersion,pt:c.Config.notification.promptType,pte:c.Config.notification.subscriptionType,ge:c.Config.notification.gdprPrompt.status,tz:(new Date).getTimezoneOffset()+330,optin:p.NotificationHelper.getOptinDesignType(),ndc:u.Storage.getConfigLocal(l.KeyMapper.PROMPT_COUNT,l.KeyMapper.STATS),sdc:u.Storage.getConfigLocal(l.KeyMapper.OPTIN_SHOWN_COUNT,l.KeyMapper.STATS)},o=a(a({},o),e)),void 0===r&&(r=u.Storage.getStorage(l.KeyMapper.PUSH_TOKEN)),null!=i&&i.subcription&&r&&(n=p.NotificationHelper.getSubscriptionParameters(r),o=a(a({},o),n)),t(o)}catch(e){t(o)}})]})})},g.removeUndefinedValuesFromObj=function(t){var n={};return Object.keys(t).forEach(function(e){void 0!==t[e]&&"undefined"!==t[e]&&""!==t[e]&&(n[e]=t[e])}),n},g.getDomElement=function(e,t){return(t=void 0===t?window.document:t).querySelector(e)},g.onAnimationOnEnd=function(n,o,i){return void 0===i&&(i=!1),new Promise(function(t){f.NewsHub.isCrios?t(!0):(n.addEventListener("animationend",function(e){i&&n.classList.remove(o),t(e)},{once:!0}),n.classList.add(o))})},g.throttle=function(n,o){void 0===o&&(o=1500);var i=!1;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i||(n.apply(void 0,e),i=!0,setTimeout(function(){i=!1},o))}},g.setRepeatPromptDelay=function(e,t){var n;0!==e&&(n=(n=new Date).setTime(n.getTime()+60*e*1e3),"Setting ".concat(t," for ").concat(e," minutes"),u.Storage.setConfigLocal(t,n))},g.isRepeatDelayActive=function(e){var t=!1,n=new Date,o=u.Storage.getConfigLocal(e);return""!=o&&o>n.getTime()&&(t=!0,g.displayLog("Wait until ".concat(e," expire!"))),t},g.syncClick=function(e,t){e={pid:c.Config.client,bkey:c.Config.UUID,rid:e.id,cid:e.cid,op:"click"};t&&(e.cs=1),r.HttpRequest.postForm(g.getEndpoint("notificationClick"),e,!0).then(function(){"News hub click sync successfully with ".concat(c.Config.brandingPartner)}).catch(function(e){})},g);function g(){}t.Helper=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyMapper=void 0,t.KeyMapper={OPTIN_SHOWN:"optInShown",OPTIN_CLOSED:"optInClosed",OPTIN_ALLOWED:"optInAllowed",PROMPTED:"prompted",PROMPT_CLOSED:"promptclose",PROMPT_DENIED:"denied",PROMPT_ALLOWED:"allowed",SUBSCRIBED:"subscribed",ALREADY_GRANTED:"already_granted",OLD_SUBSCRIPTION:"old_subscription",SUBSCRIBER_REGISTRED:"subscriber_registred",ALREADY_DENIED:"already_denied",ALREADY_UNSUBSCRIBED:"already_unsubscribed",UNSUBSCRIBED:"unsubscribed",POPUP_OPEN:"popupOpened",POPUP_CLOSED:"popClosed",BROWSER_UNSUPPORTED:"browserUnsupported",NOTIFICATION_DISABLED:"notificationDisabled",REPEAT_DELAY:"repeatDelay",MESSENGER_PROMPTED:"messengerPrompted",MESSENGER_READY_SHOW:"messengerReadyToLoad",MESSENGER_READY:"messengerReady",MESSENGER_SUBSCRIBED:"messengerSubscribed",ONETAP:"izootoEmail",EMAIL_READY:"emailReady",EMAIL_INPROGRESS:"emailDisplay",EMAIL_CLOSED:"emailClosed",EMAIL_DISABLED:"emailDisabled",NEWSHUB_READY:"readyToShowNewsHub",NEWSHUB_FAILED:"newsHubFailed",NEWSHUB_OPEN:"newsHubOpen",NEWSHUB_CLOSED:"newsHubClosed",NEWSHUB_ANIMATIONEND:"newsHubAnimationEnd",EXITINTENT_SHOWN:"exitIntentShown",EXITINTENT_CLOSED:"exitIntentClosed",STICKYBAR_READY_SHOW:"stickyBarReadyToShow",STICKYBAR_SHOWN:"stickyBarShown",STICKYBAR_CLOSED:"stickyBarClosed",STICKYBAR_VISIBLE:"stickyBarVisible",STICKYBAR_HIDDEN:"stickyBarHidden",ARTICLESHARE_READY_SHOW:"articleShareReadyToShow",ARTICLESHARE_SHOWN:"articleShareShown",ARTICLESHARE_CLOSED:"articleShareClosed",ONSITE_ADS_ALLOWED:"onsAdsAllowed",ONSITE_ADS_REFRESH_COUNT:"onsAdsRefreshCount",ADBLOCK_READY_SHOW:"adblockReadyToShow",ADBLOCK_CLOSED:"adblockClosed",ONETAP_REPEAT_PROMPT_DELAY:"oneTapPromptDelay",EMAIL_NOT_SYNCED:"emailNotSynced",UUID:"izootoUID",PUSH_TOKEN:"izootoPushToken",STATS:"izootoStats",SYNC:"izootoSync",CONFIG:"izootoConfig",USER_PROPERTY:"izootoUserProp",MASTER_DOMAIN:"izootoMDConfig",SESSION:"izootoSession",RECOMMEND_ARTICLE:"izootoRecommendArticle",MESSENGER:"izootoMessenger",ACTIVE_PROMPT:"izootoActivePrompt",WP_COOKIE:"izootoWpConfig",PROMPT_COUNT:"promptCount",OPTIN_SHOWN_COUNT:"optInShownCount",DM_SYNC_COUNT:"dmSyncCount",EVENT_DAILY:"eventDaily",EVENT_MONTHLY:"eventMonthly",PROPERTY_DAILY:"propDaily",PROPERTY_MONTHLY:"propMonthly",PUSH_TOKEN_NOT_SYNCED:"pushTokenNotSynced",PERMISSION_STATUS:"permissionStatus",REPEAT_PROMPT_DELAY:"notificationPromptDelay",GDPR_CONSENT:"gdprStatus",TAB_ABANDONMENT:"tabAbandonment",IZCID:"IZCID",ALT_DOMAIN_STATUS:"altDomainStatus",IDB_VERSION:"idbVersion",CALLOUT_SHOWN:"calloutShown",TAB_ABANDONMENT_PUSH:"tabAbandonmentPush",LAST_EVENT_SYNC:"lastEventSync",LAST_PROPERTY_SYNC:"lastPropSync",FIRST_SESSION:"firstSession",CRPS_PLAYBOOK:"crpsPlaybook",NH_MARK_ALL_AS_READ:"newsHubMarkAllAsRead",SUBSCRIBED_ON:"subscribedOn",SESSION_EXPIRY:"expiry",SESSION_COUNT:"count",MSNGR_REPEAT_PROMPT_DELAY:"promptDelay",MSNGR_IS_SUBSCRIBED:"isSubscribed",EXITINTENT_DELAY:"exitIntentDelay",STICKYBAR_DELAY:"stickyBarDelay",SHAREARTICLE_DELAY:"shareArticleDelay",NEWSHUB_LASTEST_NOTIFICATION:"nhLatest",NEWSHUB_LATEST_OPEN_NOTIFICATION:"nhLastOpened",LAST_SYNC_OF_RECOMMEND_ARTICLE:"recommendArticle",RECOMMEND_ARTICLE_SYNCED_PATH:"syncedPath",MESSAGE:"izootoMsg",BROWSER_CHROME:"Chrome",BROWSER_SAFARI:"Safari",BROWSER_FIREFOX:"Firefox",BROWSER_OPERA:"Opera",BROWSER_IE:"Microsoft Internet Explorer",BROWSER_OTHER:"Other",BROWSER_UCB:"Ucb",BROWSER_EDGE:"Edge",DEVICE_TYPE_DESKTOP:1,DEVICE_TYPE_TABLET:2,DEVICE_TYPE_MOBILE:3,OS_WINDOWS:"windows",OS_LINUX:"linux",OS_MAC:"mac",OS_ANDROID:"android",OS_IOS:"ios",OS_WP:"wp",OS_OTHER:"other_os",MASTER_TO_CHILD:"izMasterToChild",CHILD_TO_MASTER:"izChildToMaster",MASTER_AS_FRAME:"izMasterAsFrame",DAILY:"daily",MONTHLY:"monthly",REQUEST_QUEUE:"requestQueue",POST_FORM:"postForm",POST_JSON:"postJson",INVALID_PAYLOAD:"Invalid Payload",SOMETHING_WRONG:"Something wrong",IZCIDDOM:"izsetcgid",USER_PROP:"userProp",SCROLL_DOWN:"downScroll",SCROLL_UP:"upScroll",SUBSCRIPTION_SYNCED:"synced",NUDGEUSER_DELAY:"nudgeuserDelay"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0;var w=n(1),E=n(0),o=n(9),a=n(33),T=n(2),_=n(15),n=(O.updateLastSync=function(e){O.setConfigLocal(e,Date.now(),T.KeyMapper.SYNC)},O.setStorage=function(e,t){var n;a.LocalStorage.isLocalStorageSupport()?(e==T.KeyMapper.PUSH_TOKEN&&(n=decodeURIComponent(t),w.Helper.isJSONString(n)&&(n=JSON.parse(n)),o.CookieStorage.setWpCookie("push_token",n)),localStorage.setItem(e,t)):o.CookieStorage.setCookie(e,t)},O.getStorage=function(e){var t="";return null!=(t=a.LocalStorage.getLocalStorage(e))?e===T.KeyMapper.PUSH_TOKEN?decodeURIComponent(t):t:o.CookieStorage.getCookie(e)},O.removeStorage=function(e){o.CookieStorage.removeCookie(e),a.LocalStorage.removeLocalStorage(e)},O.removeConfigLocal=function(e,t){void 0===t&&(t=T.KeyMapper.CONFIG);var n={},o=a.LocalStorage.getLocalStorage(t);null!=(n=""!=o&&null!=o?w.Helper.parseToJSON(o):n).hasOwnProperty(e)&&delete n[e],a.LocalStorage.isLocalStorageSupport()&&a.LocalStorage.setLocalStorage(t,JSON.stringify(n))},O.setConfigLocal=function(e,t,n){void 0===n&&(n=T.KeyMapper.CONFIG);var o=Math.round((new Date).getTime()/1e3),i={},r=a.LocalStorage.getLocalStorage(n);(i=""!=r&&null!=r?(i=w.Helper.parseToJSON(r))||{}:i)[e]=null!=t&&""!==t?t:o,a.LocalStorage.isLocalStorageSupport()&&a.LocalStorage.setLocalStorage(n,JSON.stringify(i))},O.getConfigLocal=function(e,t){void 0===t&&(t=T.KeyMapper.CONFIG);var n=a.LocalStorage.getLocalStorage(t),o={},t="";return t=null!=(o=""!=n?(o=w.Helper.parseToJSON(n))||{}:o)&&null!=o[e]?o[e]:t},O.legacyStorageMigration=function(){try{if(O.getStorage(T.KeyMapper.UUID)||(E.Config.store.isMDSyncingRequired=!0),1==O.getConfigLocal("isLegacyStorageMigrated"))return;var e=O.getStorage("iztoken");e&&(O.setStorage(T.KeyMapper.PUSH_TOKEN,e),O.updateLastSync(T.KeyMapper.PUSH_TOKEN));var t=O.getConfigLocal("id","izConf");t&&O.setStorage(T.KeyMapper.UUID,t);var n,o=O.getStorage("izooto");o&&(E.Config.store.isMDSyncingRequired=!0,o=decodeURIComponent(o),w.Helper.isJSONString(o)&&(o=w.Helper.parseToJSON(o),n={token:JSON.stringify(o["iz_".concat(E.Config.client)].bkey),subscribed_on:o["iz_".concat(E.Config.client)].subscribed_on,uuid:O.getStorage(T.KeyMapper.UUID)},_.MasterDomain.setMasterStorage(n)));var i=O.getStorage("izstatus");i&&(i=decodeURIComponent(i),w.Helper.isJSONString(i)&&(i=w.Helper.parseToJSON(i),O.setConfigLocal(T.KeyMapper.PERMISSION_STATUS,i.v)));var r=O.getConfigLocal("pmtcount","izConf");r&&O.setConfigLocal(T.KeyMapper.PROMPT_COUNT,r,T.KeyMapper.STATS);var a=O.getConfigLocal("dscount","izConf");a&&O.setConfigLocal(T.KeyMapper.OPTIN_SHOWN_COUNT,a,T.KeyMapper.STATS);var s=O.getConfigLocal("IZCID","izConf");s&&(O.setConfigLocal(T.KeyMapper.IZCID,s),O.updateLastSync(T.KeyMapper.IZCID));var c=O.getStorage("izDl");c&&(c=decodeURIComponent(c),w.Helper.isJSONString(c)&&(c=w.Helper.parseToJSON(c),O.setConfigLocal(T.KeyMapper.REPEAT_PROMPT_DELAY,c.t)));var l=O.getConfigLocal("msngrSubscribed","izConf");l&&O.setConfigLocal(T.KeyMapper.MSNGR_IS_SUBSCRIBED,l);var u,p=O.getConfigLocal("msngrDl","izSync");p&&(p*=1e3,u=(p=new Date(p)).setTime(p.getTime()+60*E.Config.messenger.repeatDelay*1e3),O.setConfigLocal(T.KeyMapper.MSNGR_REPEAT_PROMPT_DELAY,u.getTime()));var d=O.getStorage("izup");d&&O.setStorage(T.KeyMapper.USER_PROPERTY,decodeURIComponent(d));var f=O.getStorage("izmd");f&&O.setConfigLocal(T.KeyMapper.ALT_DOMAIN_STATUS,decodeURIComponent(f));var g=O.getStorage("izgdpr");g&&O.setConfigLocal(T.KeyMapper.GDPR_CONSENT,g);var y,m,h,S,b,v,C=O.getConfigLocal("iz_apihc","izConf");C&&w.Helper.isJSONString(C)&&(C=w.Helper.parseToJSON(C),y={},m=new Date,!C.hasOwnProperty("evt_pd")||(h=C.evt_pd)&&(h=h.split("#"),y[T.KeyMapper.EVENT_DAILY]=h[1],m.setDate(h[0])),C.hasOwnProperty("evt_pm")&&((S=C.evt_pm)&&(S=S.split("#"),y[T.KeyMapper.EVENT_MONTHLY]=S[1],m.setMonth(S[0]-1)),O.setConfigLocal(T.KeyMapper.LAST_EVENT_SYNC,m.getTime(),T.KeyMapper.SYNC)),!C.hasOwnProperty("prop_pd")||(b=C.prop_pd)&&(b=b.split("#"),y[T.KeyMapper.PROPERTY_DAILY]=b[1],m.setDate(b[0])),C.hasOwnProperty("prop_pm")&&((v=C.prop_pm)&&(v=v.split("#"),y[T.KeyMapper.PROPERTY_MONTHLY]=v[1],m.setMonth(v[0]-1)),O.setConfigLocal(T.KeyMapper.LAST_PROPERTY_SYNC,m.getTime(),T.KeyMapper.SYNC)),O.setConfigLocal(T.KeyMapper.DM_SYNC_COUNT,y,T.KeyMapper.STATS)),O.setConfigLocal("isLegacyStorageMigrated",1)}catch(e){O.setConfigLocal("isLegacyStorageMigrated",1)}},O.isSessionStorageSupport=function(){return"sessionStorage"in window&&null!==window.sessionStorage},O.setSessionStorage=function(e,t){sessionStorage.setItem(e,t)},O.getSessionStorage=function(e){return sessionStorage.getItem(e)},O.removeSessionStorage=function(e){sessionStorage.removeItem(e)},O);function O(){}t.Storage=n},function(e,t,n){"use strict";var s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},u=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequest=void 0;var p=n(1),i=n(11),d=n(2);t.HttpRequest=(f.init=function(){f.processor(),window.addEventListener("online",f.processor)},f.get=function(o,i,r){return l(this,void 0,void 0,function(){return u(this,function(e){return[2,new Promise(function(t,n){f.create(o,"GET",i,r).then(function(e){t(e.response)}).catch(function(e){n(e.status)})})]})})},f.postForm=function(o,i,r){return void 0===r&&(r=!1),l(this,void 0,void 0,function(){return u(this,function(e){return[2,new Promise(function(t,n){f.postRequestHandler(o,i,d.KeyMapper.POST_FORM,r).then(function(e){t(e.response)}).catch(function(e){n(e)})})]})})},f.postJSON=function(o,i,r){return void 0===r&&(r=!1),l(this,void 0,void 0,function(){return u(this,function(e){return[2,new Promise(function(t,n){f.postRequestHandler(o,i,d.KeyMapper.POST_JSON,r).then(function(e){t(e.response)}).catch(function(e){n(e)})})]})})},f.postRequestHandler=function(i,r,a,s){void 0===a&&(a=d.KeyMapper.POST_FORM),void 0===s&&(s=!1);var c=Date.now();return new Promise(function(t,n){var e,o="";r=p.Helper.removeUndefinedValuesFromObj(r),1==s&&f.saveFailedRequest(i,r,a,c),o=a==d.KeyMapper.POST_JSON?(e={"Content-Type":"application/json"},JSON.stringify(r)):(e={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},p.Helper.objToParam(r)),f.recursivePostUntilSuccess(i,o,e,f.retryNo).then(function(e){t(e),1==s&&f.deleteSyncedRequestsFromDb(c)}).catch(function(e){n(e)})})},f.recursivePostUntilSuccess=function(r,a,s,c){return l(this,void 0,void 0,function(){var i=this;return u(this,function(e){return[2,new Promise(function(n,o){--c,f.create(r,"POST",a,s).then(function(e){n(e)}).catch(function(t){return l(i,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return 0<c?[4,p.Helper.sleep(f.retrieDelayMs)]:[3,2];case 1:return e.sent(),n(f.recursivePostUntilSuccess(r,a,s,c)),[3,3];case 2:o(t),e.label=3;case 3:return[2]}})})})})]})})},f.saveFailedRequest=function(e,t,n,o){i.IndexedDB.addUpdateToTable(d.KeyMapper.REQUEST_QUEUE,{url:e,data:t,type:n,key:o,retryNo:0}).then(function(e){p.Helper.displayLog(e)}).catch(function(e){p.Helper.displayLog(e)})},f.processor=function(){var e=this;i.IndexedDB.getIndexDBData(d.KeyMapper.REQUEST_QUEUE,"all").then(function(a){return l(e,void 0,void 0,function(){var n,t,o,i,r;return u(this,function(e){switch(e.label){case 0:t=function(){var t;return u(this,function(e){switch(e.label){case 0:return(t=s({},n),-1<(null===(r=t.url)||void 0===r?void 0:r.indexOf("enp.izooto.com")))?(f.deleteSyncedRequestsFromDb(t.key),[3,3]):[3,1];case 1:return t.hasOwnProperty("type")&&!t.hasOwnProperty("isSynced")&&(t.type==d.KeyMapper.POST_JSON?f.postJSON:f.postForm)(t.url,t.data,!1).then(function(){p.Helper.displayLog("Http Request Re-synced successfully!",t),f.deleteSyncedRequestsFromDb(t.key)}).catch(function(e){f.increaseHttpRetryCount(t.key)}),[4,p.Helper.sleep(500)];case 2:e.sent(),e.label=3;case 3:return[2]}})},o=0,i=a,e.label=1;case 1:return o<i.length?(n=i[o],[5,t()]):[3,4];case 2:e.sent(),e.label=3;case 3:return o++,[3,1];case 4:return[2]}})})}).catch(function(e){p.Helper.displayLog("Error in getting request q",e)})},f.increaseHttpRetryCount=function(t){i.IndexedDB.getIndexDBData(d.KeyMapper.REQUEST_QUEUE,t).then(function(e){!e||(e=e).retryNo&&(e.retryNo<10?(e.retryNo+=1,i.IndexedDB.addUpdateToTable(d.KeyMapper.REQUEST_QUEUE,e)):f.deleteSyncedRequestsFromDb(t))}).catch(function(e){})},f.deleteSyncedRequestsFromDb=function(t){return l(this,void 0,void 0,function(){return u(this,function(e){return i.IndexedDB.removeKeyFromTable(d.KeyMapper.REQUEST_QUEUE,t),[2]})})},f.create=function(i,r,a,s){return l(this,void 0,void 0,function(){return u(this,function(e){return[2,new Promise(function(e,t){var n=new XMLHttpRequest;if(n.onreadystatechange=function(){4==this.readyState&&(200==this.status?e:t)({status:this.status,response:this.responseText})},n.open(r,i,!0),s&&s.hasOwnProperty("Content-Type")||n.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8"),"object"==typeof s&&0<Object.keys(s).length)for(var o in s)n.setRequestHeader(o,s[o]);""!=a?n.send(a):n.send()})]})})},f.retrieDelayMs=1e3,f.retryNo=10,f);function f(){}},function(e,t,n){"use strict";var c=this&&this.__assign||function(){return(c=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},l=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},u=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}},p=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||((o=o||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationHelper=void 0;var d=n(1),y=n(0),f=n(3),g=n(4),o=n(10),i=n(14),m=n(11),r=n(25),h=n(26),a=n(27),s=n(7),S=n(28),b=n(2),v=n(13),C=n(29),w=n(15),E=n(30),T=n(31),_=n(32),O=n(8),P=n(6);t.NotificationHelper=(D.nativeHandler=function(){return l(this,void 0,void 0,function(){return u(this,function(e){return D.setManifest(),"default"==window.Notification.permission?(D.brandingOverlayHandler(),D.syncSendChurn(),D.sendEvent(b.KeyMapper.PROMPTED),window.Notification.requestPermission().then(function(e){D.closeHttpsOverlay(),d.Helper.displayLog("Permission Status : ",e),"granted"==e?D.permissionGrantedCallback():e==b.KeyMapper.PROMPT_DENIED?D.permissionDeniedCallback():"default"==e&&D.sendEvent(b.KeyMapper.PROMPT_CLOSED),f.Storage.removeStorage(b.KeyMapper.ACTIVE_PROMPT)})):"granted"==window.Notification.permission?(D.subscriptionOnAllow=!1,D.permissionAlreadyGrantedCallback()):window.Notification.permission==b.KeyMapper.PROMPT_DENIED&&D.sendEvent(b.KeyMapper.ALREADY_DENIED),[2]})})},D.permissionAlreadyGrantedCallback=function(){return l(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,D.setSubscriberDetailsToIdb(b.KeyMapper.ALREADY_GRANTED)];case 1:return e.sent(),D.permissionStatus=b.KeyMapper.ALREADY_GRANTED,D.subscriptionHandler().then(function(e){D.sendEvent(b.KeyMapper.ALREADY_GRANTED,JSON.stringify(e)),w.MasterDomain.masterDomainCallback(!0,e)}).catch(function(e){D.sendEvent(b.KeyMapper.BROWSER_UNSUPPORTED)}),1==y.Config.notification.isShopify&&r.Shopify.init(),[2]}})})},D.setSubscribeOnActivateFlagIdb=function(){return new Promise(function(e,t){var n={status:y.Config.notification.swSubscribe,timestamp:Date.now()};y.Config.notification.swSubscribe?e(!0):m.IndexedDB.addUpdate("subscribeOnActivate",n).then(function(){e(!0)}).catch(function(){e(!1)})})},D.permissionGrantedCallback=function(){return l(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,D.setSubscriberDetailsToIdb(b.KeyMapper.PROMPT_ALLOWED)];case 1:return e.sent(),D.permissionStatus=b.KeyMapper.PROMPT_ALLOWED,D.subscriptionHandler().then(function(e){D.sendEvent(b.KeyMapper.PROMPT_ALLOWED,JSON.stringify(e)),w.MasterDomain.masterDomainCallback(!1,e)}).catch(function(e){D.sendEvent(b.KeyMapper.BROWSER_UNSUPPORTED)}),[2]}})})},D.setSubscriberDetailsToIdb=function(e){return D.getHTTPSubscriptionParameters(e).then(function(o){return new Promise(function(e,t){var n={endpoint:d.Helper.getEndpoint(b.KeyMapper.PROMPT_ALLOWED),postData:o};m.IndexedDB.addUpdate("subscriberDetails",n).then(function(){e(!0)}).catch(function(){e(!1)})})})},D.permissionDeniedCallback=function(){D.sendEvent(b.KeyMapper.PROMPT_DENIED),d.Helper.displayLog("User denied prompt")},D.promptHandler=function(){var n=y.Config.notification.promptType;"https:"!=y.Config.global.locationProtocol&&1==y.Config.notification.isSdkHttps&&(y.Config.notification.promptType=1),3==y.Config.notification.subscriptionType?setTimeout(function(){D.checkSafariPermission()},300):0==y.Config.notification.isSdkHttps||y.Config.notification.isSdkHttps&&"http:"==y.Config.global.locationProtocol?(d.Helper.displayLog("Subdomain Process... "),D.getSubDomainPermissionStatus().then(function(e){var t;d.Helper.displayLog("Current subdomain status : ",e),0==e?2==n?D.triggerEventHandler(i.Notification.openPopup):D.promptEventHandler(D.loadOptin):1==e?(t=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN),D.sendEvent(b.KeyMapper.ALREADY_GRANTED,t)):2==e&&(D.updatePermissionStatus(2),D.sendEvent(b.KeyMapper.ALREADY_DENIED))})):1==y.Config.notification.isSdkHttps&&("default"==window.Notification.permission?(f.Storage.removeConfigLocal(b.KeyMapper.PERMISSION_STATUS,b.KeyMapper.SYNC),0==n?D.promptEventHandler(D.nativeHandler):1==n?D.promptEventHandler(D.loadOptin):2==n&&D.triggerEventHandler(D.nativeHandler)):D.nativeHandler())},D.triggerEventHandler=function(e){y.Config.store.isNotificationCalledManually?(y.Config.store.isTriggerPromptWithDelay||(y.Config.notification.promptDelay=0),D.delayHandler(e)):d.Helper.displayLog("auto prompt false found!")},D.requestSafariPermission=function(){D.sendEvent(b.KeyMapper.PROMPTED),D.brandingOverlayHandler();try{window.safari.pushNotification.requestPermission(y.Config.notification.webServiceUrl,y.Config.notification.webPushId,{url:window.location.href},function(e){var t;"granted"===e.permission?(D.closeHttpsOverlay(),t=e.deviceToken,D.sendEvent(b.KeyMapper.PROMPT_ALLOWED,t),d.Helper.displayLog("Granted Key= "+t)):e.permission===b.KeyMapper.PROMPT_DENIED&&(D.closeHttpsOverlay(),D.sendEvent(b.KeyMapper.PROMPT_DENIED))})}catch(e){D.closeHttpsOverlay()}},D.checkSafariPermission=function(){var e,t,n;""!=y.Config.notification.webPushId&&""!=y.Config.notification.webServiceUrl?(e="","safari"in window&&"pushNotification"in window.safari&&("default"===(t=window.safari.pushNotification.permission(y.Config.notification.webPushId)).permission?0==(n=y.Config.notification.promptType)?D.promptEventHandler(D.requestSafariPermission):1==n?D.promptEventHandler(D.loadOptin):2==n&&D.triggerEventHandler(D.requestSafariPermission):"granted"===t.permission?(e=t.deviceToken,D.sendEvent(b.KeyMapper.ALREADY_GRANTED,e),d.Helper.displayLog("Already Granted & key= ",e)):t.permission===b.KeyMapper.PROMPT_DENIED&&(D.sendEvent(b.KeyMapper.ALREADY_DENIED),d.Helper.displayLog(b.KeyMapper.PROMPT_DENIED)))):d.Helper.displayLog("Stopped! Safari certificate not found")},D.delayHandler=function(e){y.Config.notification.promptDelay?(d.Helper.displayLog("Triggering prompt delay for : ".concat(y.Config.notification.promptDelay," ms")),setTimeout(e,y.Config.notification.promptDelay)):e()},D.promptEventHandler=function(e){if(D.isActivePrompt())d.Helper.displayLog("".concat(y.Config.brandingPartner," notification off for this device"));else{if(D.isRepeatPromptDelay())return D.sendEvent(b.KeyMapper.REPEAT_DELAY);var t=function(){"complete"==document.readyState?(d.Helper.displayLog("Calling prompt instantly"),e()):(d.Helper.displayLog("Wait till web page load completely"),window.addEventListener("load",function(){e()}))};1==y.Config.notification.promptOnScroll&&d.Helper.isScreenScrollable()?(d.Helper.displayLog("optIn will be shown on page scroll!"),window.addEventListener("scroll",function(){D.scrollHandler(t)})):D.delayHandler(t)}},D.isRepeatPromptDelay=function(){var e,t=!1;return y.Config.notification.windowType||(e=new Date,f.Storage.getConfigLocal(b.KeyMapper.REPEAT_PROMPT_DELAY)>e.getTime()&&(t=!0,d.Helper.displayLog("Wait until repeat prompt delay expire!"))),t},D.triggerPromptHandler=function(e){void 0===e&&(e=!1),y.Config.store.isNotificationCalledManually||(e&&(y.Config.store.isTriggerPromptWithDelay=!0),y.Config.store.isNotificationCalledManually=!0,D.promptHandler())},D.getCurrentSubscription=function(){return new Promise(function(t,e){try{var n=!1;D.getSWReadyRegistration().then(function(e){null!==(e=null==e?void 0:e.pushManager)&&void 0!==e&&e.getSubscription().then(function(e){e&&(n=JSON.stringify(e)),d.Helper.displayLog("Recovered Subscription : ",n),t(n)})}).catch(function(e){t(n)})}catch(e){}})},D.getSWRegistration=function(){return l(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return[4,navigator.serviceWorker.getRegistration(y.Config.notification.serviceWorkerPath)];case 1:return[2,e.sent()]}})})},D.getSWReadyRegistration=function(){return l(this,void 0,void 0,function(){var t=this;return u(this,function(e){return[2,new Promise(function(a,s){return l(t,void 0,void 0,function(){var t,n,o,i,r;return u(this,function(e){switch(e.label){case 0:return t=setTimeout(function(){s("Cannot get ServiceWorkerRegistration")},2e3),y.Config.notification.httpsNoRoot?[4,D.getSWRegistration()]:[3,2];case 1:return(n=e.sent())&&n instanceof ServiceWorkerRegistration?"activated"===(null==(o=n.installing||n.waiting||n.active)?void 0:o.state)?a(n):(i=function(){"activated"===(null==o?void 0:o.state)&&(window.clearTimeout(t),o.removeEventListener("statechange",i),a(n))},null!=o&&o.addEventListener("statechange",i)):s("Cannot get ServiceWorkerRegistration"),[3,4];case 2:return r=a,[4,navigator.serviceWorker.ready];case 3:r.apply(void 0,[e.sent()]),e.label=4;case 4:return[2]}})})})]})})},D.getResponseCode=function(e){var t={};t[b.KeyMapper.PROMPT_ALLOWED]={response:"subscribed",statuscode:1},t[b.KeyMapper.SUBSCRIBED]={response:"subscribed",statuscode:1},t[b.KeyMapper.ALREADY_GRANTED]={response:"already subscribed",statuscode:2},t[b.KeyMapper.PROMPT_DENIED]={response:"blocked",statuscode:3},t[b.KeyMapper.ALREADY_DENIED]={response:"already blocked",statuscode:4},t[b.KeyMapper.BROWSER_UNSUPPORTED]={response:"browser not supported",statuscode:5},t[b.KeyMapper.PROMPT_CLOSED]={response:"prompt closed",statuscode:6},t[b.KeyMapper.UNSUBSCRIBED]={response:"soft unsubscribed",statuscode:7},t[b.KeyMapper.ALREADY_UNSUBSCRIBED]={response:"already soft unsubscribed",statuscode:8},t[b.KeyMapper.OPTIN_ALLOWED]={response:"soft subscribed",statuscode:9},t[b.KeyMapper.SUBSCRIBER_REGISTRED]={response:"subscriber reregistered",statuscode:10};var n={};return n[b.KeyMapper.OPTIN_SHOWN]={response:"soft prompt displayed",statuscode:1},n[b.KeyMapper.OPTIN_CLOSED]={response:"soft prompt closed",statuscode:2},n[b.KeyMapper.PROMPTED]={response:"native prompt displayed",statuscode:3},n[b.KeyMapper.POPUP_OPEN]={response:"prompt window opened",statuscode:4},n[b.KeyMapper.POPUP_CLOSED]={response:"prompt window closed",statuscode:5},void 0!==t[e]?t[e]:void 0!==n[e]?n[e]:void 0},D.sendEvent=function(n,o){var i=this;if(d.Helper.displayLog("Event caught : ",n),P.ChannelEventHandler.event("webPush",n),O.NewsHub.sendEvent(n),D.CBUEvent(n),1!=y.Config.notification.windowType&&6!=y.Config.notification.windowType){var r=[b.KeyMapper.PROMPT_ALLOWED,b.KeyMapper.SUBSCRIBED,b.KeyMapper.ALREADY_GRANTED,b.KeyMapper.PROMPT_DENIED,b.KeyMapper.ALREADY_DENIED,b.KeyMapper.BROWSER_UNSUPPORTED,b.KeyMapper.PROMPT_CLOSED,b.KeyMapper.UNSUBSCRIBED,b.KeyMapper.ALREADY_UNSUBSCRIBED,b.KeyMapper.OPTIN_ALLOWED],a=[b.KeyMapper.OPTIN_SHOWN,b.KeyMapper.OPTIN_CLOSED,b.KeyMapper.PROMPTED,b.KeyMapper.POPUP_OPEN,b.KeyMapper.POPUP_CLOSED],s=p([b.KeyMapper.PROMPT_ALLOWED,b.KeyMapper.ALREADY_GRANTED,b.KeyMapper.PROMPT_DENIED],y.Config.notification.eventsToSync,!0);n!=b.KeyMapper.PROMPT_ALLOWED&&n!=b.KeyMapper.ALREADY_GRANTED||(D.syncPIDset(),h.GDPR.init(),D.syncHookInDb("syncNotificationView"),D.syncHookInDb("syncNotificationClick")),n==b.KeyMapper.PROMPT_ALLOWED&&""!=y.Config.notification.sourceOriginAlt&&D.removeSubsriptionFromAlternateDomain(),n!=b.KeyMapper.PROMPTED&&n!=b.KeyMapper.OPTIN_SHOWN||(D.updatePromptCount(n),D.setActivePrompt(5),f.Storage.removeStorage(b.KeyMapper.PUSH_TOKEN),0!=y.Config.notification.repeatPromptDelay&&D.setRepeatPromptDelay(y.Config.notification.repeatPromptDelay)),n==b.KeyMapper.OPTIN_CLOSED&&0!=y.Config.notification.optInCloseDelay&&D.setRepeatPromptDelay(y.Config.notification.optInCloseDelay),n!=b.KeyMapper.PROMPT_DENIED&&n!=b.KeyMapper.ALREADY_DENIED||(D.syncSendChurn(),D.subscribeOnBlocked()),n==b.KeyMapper.PROMPT_CLOSED&&f.Storage.removeStorage(b.KeyMapper.ACTIVE_PROMPT),m.IndexedDB.getValueFromiDbOptions("pushToken").then(function(e){var t;-1!=s.indexOf(n)&&(i.isSyncPermissionStatus&&D.updatePermissionStatus(n),null!=o?("object"==typeof o&&(o=JSON.stringify(o)),"object"==typeof e&&(e=JSON.stringify(e)),t=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN),e&&D.saveSubscritionToStorage(e),o!=(e||t)&&D.updateSubscriptionTokenForSync(o),n==b.KeyMapper.PROMPT_ALLOWED||n==b.KeyMapper.ALREADY_GRANTED?D.syncEvent(n,o):D.syncEvent(n)):D.syncEvent(n)),-1!=r.indexOf(n)&&(t=D.getResponseCode(n),n==b.KeyMapper.ALREADY_GRANTED&&(y.Config.store.isSoftSubscribeTriggered&&(t=D.getResponseCode(b.KeyMapper.SUBSCRIBED)),y.Config.store.isSubscriptionLost&&(t=D.getResponseCode(b.KeyMapper.SUBSCRIBER_REGISTRED))),D.subscriptionEventsCallback(n,t)),-1!=a.indexOf(n)&&D.promptDisplayCallback(n,D.getResponseCode(n))})}else try{var t="parent",c=[b.KeyMapper.SUBSCRIBED,b.KeyMapper.ALREADY_GRANTED,b.KeyMapper.PROMPT_DENIED,b.KeyMapper.PROMPT_ALLOWED,b.KeyMapper.PROMPT_CLOSED,b.KeyMapper.ALREADY_DENIED];y.Config.global.isFrame||(t="opener",D.popupNoticeHandler(n)),D.getswVersion().then(function(e){d.Helper.postMessage(t,n,o,e)}).catch(function(e){d.Helper.postMessage(t,n,o),d.Helper.displayLog("Error while getting sw version")}).then(function(){return l(i,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return n!=b.KeyMapper.PROMPT_ALLOWED?[3,2]:[4,D.showWelcomeNotification(!1)];case 1:e.sent()&&d.Helper.postMessage(t,"syncWelcomeSent",1),e.label=2;case 2:return-1<c.indexOf(n)&&"opener"==t&&D.closePopupWindow(),[2]}})})})}catch(e){}},D.popupNoticeHandler=function(e){switch(e){case b.KeyMapper.PROMPTED:D.popupNotice(y.Config.notification.clickOnAllowMsg);break;case b.KeyMapper.PROMPT_ALLOWED:D.popupNotice(y.Config.notification.subscribedMsg);break;case b.KeyMapper.ALREADY_GRANTED:D.popupNotice(y.Config.notification.alreadySubscribedMsg);break;case b.KeyMapper.PROMPT_DENIED:D.popupNotice(y.Config.notification.blockedMsg);break;case b.KeyMapper.ALREADY_DENIED:D.popupNotice(y.Config.notification.alreadyDeniedMsg)}},D.subscriptionEventsCallback=function(e,t){try{"function"==typeof o.Queue.subscriptionCallback?o.Queue.subscriptionCallback(t):"function"==typeof o.Queue.userCallback&&(7!=t.statuscode&&8!=t.statuscode||(t={response:"unsubscribed",statuscode:7}),o.Queue.userCallback(t)),s.GoogleAnalytics.isCallbackAllowed(y.Config.ga.subscriptionCallback,t.statuscode)&&s.GoogleAnalytics.process(t.response)}catch(e){console.warn("Error while responding to subscription callback",e)}},D.promptDisplayCallback=function(e,t){try{"function"==typeof o.Queue.promptDisplayCallback&&o.Queue.promptDisplayCallback(t),s.GoogleAnalytics.isCallbackAllowed(y.Config.ga.promptDisplayCallback,t.statuscode)&&s.GoogleAnalytics.process(t.response)}catch(e){console.warn("Error while responding to prompt display callback",e)}},D.callEventOnSubscription=function(e){e==b.KeyMapper.PROMPT_ALLOWED&&(2==y.Config.global.browserType?D.showWelcomeNotificationOld():y.Config.notification.isSdkHttps&&"https:"==y.Config.global.locationProtocol&&D.showWelcomeNotification(!1)),1==y.Config.notification.isShopify&&r.Shopify.init(!0),o.Queue.sync(),a.TabAbandonments.init(),C.VideoDropOff.init(),E.CRPSPlaybook.init(),T.RecommendArticle.init(),D.syncLastVisit(),1==S.AdNetwork.forceSyncAdNetwork&&D.syncAdNetwork(S.AdNetwork.getAdNetworkParam(!0)),_.AutoSegment.init(),y.Config.newsHub.allVisitors||O.NewsHub.init()},D.brandingPartnerSyncSusbcription=function(e,t){"momagic"!=y.Config.brandingPartner.toLowerCase()||e!=b.KeyMapper.PROMPT_ALLOWED&&e!=b.KeyMapper.ALREADY_GRANTED||g.HttpRequest.postForm("https://irctc.truenotify.in/momagicflow/enp",t).then(function(){d.Helper.displayLog("Additional api : ".concat(e," synced successfully with ").concat(y.Config.brandingPartner))}).catch(function(e){})},D.syncEvent=function(n,o){var e=this,i=!0;if(0<=y.Config.store.syncedEventList.indexOf(n))d.Helper.displayLog("Abort! This event has been synced already");else{y.Config.store.syncedEventList.push(n);var r={},t=d.Helper.getUTMParamsOfUrl();if(Object.keys(t).length&&Object.keys(t).length&&Object.keys(t).length&&(r=c(c({},r),t)),void 0!==o){if((n==b.KeyMapper.PROMPT_ALLOWED||n==b.KeyMapper.ALREADY_GRANTED)&&(i=!1,D.callEventOnSubscription(n),D.subscriptionSyncedFromSW))return;if(""!=f.Storage.getStorage(b.KeyMapper.UUID)&&!f.Storage.getConfigLocal(b.KeyMapper.PUSH_TOKEN_NOT_SYNCED))return}d.Helper.getFlagBasedParameter({subscriptionMeta:!0,subcription:!0},o).then(function(t){return l(e,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:switch(r=c(c({},r),t),n){case b.KeyMapper.OPTIN_SHOWN:r.divShow=1;break;case b.KeyMapper.OPTIN_ALLOWED:r.divAllowed=1;break;case b.KeyMapper.OPTIN_CLOSED:r.divClosed=1;break;default:r[n]=1}return n!=b.KeyMapper.PROMPT_ALLOWED&&n!=b.KeyMapper.ALREADY_GRANTED?[3,2]:[4,D.getHTTPSubscriptionParameters(n)];case 1:r=e.sent(),e.label=2;case 2:return g.HttpRequest.postForm(d.Helper.getEndpoint(n),r,i).then(function(){D.eventSynced(n,o),"Event : ".concat(n," synced successfully with ").concat(y.Config.brandingPartner)}).catch(function(e){}),D.brandingPartnerSyncSusbcription(n,r),[2]}})})})}},D.eventSynced=function(e,t){e!=b.KeyMapper.PROMPT_ALLOWED&&e!=b.KeyMapper.ALREADY_GRANTED||(f.Storage.removeConfigLocal(b.KeyMapper.PUSH_TOKEN_NOT_SYNCED),t=D.subcriptionToObject(t),m.IndexedDB.addUpdate("pushToken",t),Object.keys(S.AdNetwork.adNetworkObj).map(function(e){S.AdNetwork.adNetworkObj[e]&&f.Storage.setConfigLocal(e,S.AdNetwork.adNetworkObj[e])}))},D.updateSubscriptionTokenForSync=function(e){switch(y.Config.notification.subscriptionType){case 1:case 2:case 3:D.saveSubscritionToStorage(e)}f.Storage.setConfigLocal(b.KeyMapper.PUSH_TOKEN_NOT_SYNCED,1),f.Storage.updateLastSync(b.KeyMapper.PUSH_TOKEN);var t=f.Storage.getStorage(b.KeyMapper.USER_PROPERTY);(t=d.Helper.parseToJSON(t))&&D.syncProperties("SegmentProperties","add",t,function(){return d.Helper.displayLog("User property re-synced succesfully")})},D.saveSubscritionToStorage=function(e){var t=e,n=e;2==y.Config.notification.subscriptionType&&("object"==typeof e&&(t=JSON.stringify(e)),t=encodeURIComponent(t),n=d.Helper.parseToJSON(e)),f.Storage.setStorage(b.KeyMapper.PUSH_TOKEN,t),m.IndexedDB.addUpdate("pushToken",n)},D.syncAdNetwork=function(t){var e=d.Helper.getEndpoint("syncAdNetwork"),n=c({pid:y.Config.client,bkey:y.Config.UUID},t);g.HttpRequest.postForm(e,n,!0).then(function(){Object.keys(t).map(function(e){t[e]&&f.Storage.setConfigLocal(e,t[e])})}).catch(function(e){})},D.syncProperties=function(t,n,o,i){var r=d.Helper.getEndpoint(t),a={},s=!1,e="";switch(t){case"SegmentEvents":e="evt";break;case"SegmentProperties":e="userp";break;case"PersonalProperties":e="pers";break;case"TriggerEvent":e="trg"}"userp"!=(a.et=e)&&"pers"!=e||(s=!0),null!=o?(o=encodeURIComponent(JSON.stringify(o)),a.act=n,a.val=o):a.act=n,D.isSubscriptionExist()?d.Helper.getFlagBasedParameter({subscriptionMeta:!0,subcription:!0}).then(function(e){a=c(c({},a),e),g.HttpRequest.postForm(r,a,s).then(function(){"".concat(t," synced successfully"),D.syncUserEventCallback(t,n,o),null!=i&&"function"==typeof i&&i()}).catch(function(e){}),"momagic"==y.Config.brandingPartner.toLowerCase()&&"SegmentProperties"==t&&g.HttpRequest.postForm("https://irctc.truenotify.in/momagicflow/up",a,!0).then(function(){d.Helper.displayLog("Additional User property synced successfully with ".concat(y.Config.brandingPartner))}).catch(function(e){})}):d.Helper.displayLog("".concat(t," Aborted! No subscription key or UUID found"))},D.isSubscriptionExist=function(){return!(!f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN)||!y.Config.UUID)},D.syncUserEventCallback=function(e,t,n){var o,i,r="";switch(e){case"SegmentEvents":r="User Event";break;case"SegmentProperties":r="User Property";break;case"PersonalProperties":r="Personalization Property";break;case"TriggerEvent":r="Trigger"}1==y.Config.debugger.status&&(o=v.Debugger.getMsgSet(),i=r+": "+(n=decodeURIComponent(n))+" "+o.ev,"SegmentEvents"!=e&&"TriggerEvent"!=e||(i=r+": "+t+" "+o.ev,n&&(i+=" with data "+n)),v.Debugger.log(i,y.Config.debugger.successCode))},D.getSyncCount=function(e,t){var n=new Date,o=n.getDate(),i=n.getMonth()+1,n=f.Storage.getConfigLocal(b.KeyMapper.DM_SYNC_COUNT,b.KeyMapper.STATS);if("event"==e){var r=f.Storage.getConfigLocal(b.KeyMapper.LAST_EVENT_SYNC,b.KeyMapper.SYNC);if(""==r)return 0;var a,s=(a=new Date(r)).getDate(),r=a.getMonth()+1;return t==b.KeyMapper.DAILY?null!=n[b.KeyMapper.EVENT_DAILY]&&o==s?n[b.KeyMapper.EVENT_DAILY]:0:t==b.KeyMapper.MONTHLY?null!=n[b.KeyMapper.EVENT_MONTHLY]&&i==r?n[b.KeyMapper.EVENT_MONTHLY]:0:void 0}if("userProperty"==e){e=f.Storage.getConfigLocal(b.KeyMapper.LAST_PROPERTY_SYNC,b.KeyMapper.SYNC);if(""==e)return 0;s=(a=new Date(e)).getDate(),r=a.getMonth()+1;return t==b.KeyMapper.DAILY?null!=n[b.KeyMapper.PROPERTY_DAILY]&&o==s?n[b.KeyMapper.PROPERTY_DAILY]:0:t==b.KeyMapper.MONTHLY?null!=n[b.KeyMapper.PROPERTY_MONTHLY]&&i==r?n[b.KeyMapper.PROPERTY_MONTHLY]:0:void 0}},D.hasSynclimitReached=function(e){return"event"==e?!y.Config.notification.evtTracking||(y.Config.notification.syncLimit.evtPerMonth<=D.getSyncCount("event",b.KeyMapper.MONTHLY)||y.Config.notification.syncLimit.evtPerDay<=D.getSyncCount("event",b.KeyMapper.DAILY)):"userProperty"==e?!y.Config.notification.propsTracking||(y.Config.notification.syncLimit.propsPerMonth<=D.getSyncCount("userProperty",b.KeyMapper.MONTHLY)||y.Config.notification.syncLimit.propsPerDay<=D.getSyncCount("userProperty",b.KeyMapper.DAILY)):void 0},D.userEventProcessor=function(e,t){if(!y.Config.notification.userEvents)return d.Helper.displayLog("Sync aborted! : User event disabled");var n;D.hasSynclimitReached("event")?d.Helper.displayLog("Sync aborted! : Daily/monthly limit reached!"):(e=D.parseData(e),e=D.filterData(e),D.validateData(e)&&(null!=t&&1<=Object.keys(t).length&&!(n=D.filterProperties(t,{key:32,value:32,object:16},["string","number","boolean"]))?d.Helper.displayLog(b.KeyMapper.INVALID_PAYLOAD):D.syncProperties("SegmentEvents",e,n,function(){D.increaseSyncCount("event")})))},D.addPropertyProcessorFallback=function(t){var e,n,o;"object"!=typeof t||"string"!=typeof t.name||"string"!=typeof t.value&&"number"!=typeof t.value&&"boolean"!=typeof t.value||""===t.value?d.Helper.displayLog(b.KeyMapper.INVALID_PAYLOAD):(e=f.Storage.getConfigLocal("subscriberId"))!=t.value?("subscriber_id"==t.name&&t.value&&m.IndexedDB.addUpdate("subscriberId",t.value).then(function(e){y.Config.store.subscriberId=t.value}).catch(function(e){d.Helper.displayLog(e)}),n=d.Helper.getEndpoint("CustomerIDSynch"),(o={}).name=t.name,o.value=t.value,o.operation="add_property",d.Helper.getFlagBasedParameter({subscriptionMeta:!0,subcription:!0}).then(function(e){o=c(c({},o),e),g.HttpRequest.postForm(n,o).then(function(){f.Storage.setConfigLocal("subscriberId",t.value)}).catch(function(e){}),"momagic"==y.Config.brandingPartner.toLowerCase()&&g.HttpRequest.postForm("https://irctc.truenotify.in/momagicflow/up",o).then(function(){d.Helper.displayLog("Additional User property synced successfully with ".concat(y.Config.brandingPartner))}).catch(function(e){})})):d.Helper.displayLog("This subscriber id already synced:",e)},D.increaseSyncCount=function(e){var t,n,o,i=new Date,r=i.getDate(),a=i.getMonth()+1,s=f.Storage.getConfigLocal(b.KeyMapper.DM_SYNC_COUNT,b.KeyMapper.STATS),c=""!=s?s:{};"event"==e?(""==(i=f.Storage.getConfigLocal(b.KeyMapper.LAST_EVENT_SYNC,b.KeyMapper.SYNC))?(c[b.KeyMapper.EVENT_DAILY]=1,c[b.KeyMapper.EVENT_MONTHLY]=1):(n=(t=new Date(i)).getDate(),o=t.getMonth()+1,null!=s[b.KeyMapper.EVENT_DAILY]&&r==n?c[b.KeyMapper.EVENT_DAILY]=s[b.KeyMapper.EVENT_DAILY]+1:c[b.KeyMapper.EVENT_DAILY]=1,null!=s[b.KeyMapper.EVENT_MONTHLY]&&a==o?c[b.KeyMapper.EVENT_MONTHLY]=s[b.KeyMapper.EVENT_MONTHLY]+1:c[b.KeyMapper.EVENT_MONTHLY]=1),f.Storage.updateLastSync(b.KeyMapper.LAST_EVENT_SYNC)):"userProperty"==e&&(""==(e=f.Storage.getConfigLocal(b.KeyMapper.LAST_PROPERTY_SYNC,b.KeyMapper.SYNC))?(c[b.KeyMapper.PROPERTY_DAILY]=1,c[b.KeyMapper.PROPERTY_MONTHLY]=1):(n=(t=new Date(e)).getDate(),o=t.getMonth()+1,null!=s[b.KeyMapper.PROPERTY_DAILY]&&r==n?c[b.KeyMapper.PROPERTY_DAILY]=s[b.KeyMapper.PROPERTY_DAILY]+1:c[b.KeyMapper.PROPERTY_DAILY]=1,null!=s[b.KeyMapper.PROPERTY_MONTHLY]&&a==o?c[b.KeyMapper.PROPERTY_MONTHLY]=s[b.KeyMapper.PROPERTY_MONTHLY]+1:c[b.KeyMapper.PROPERTY_MONTHLY]=1),f.Storage.updateLastSync(b.KeyMapper.LAST_PROPERTY_SYNC)),f.Storage.setConfigLocal(b.KeyMapper.DM_SYNC_COUNT,c,b.KeyMapper.STATS)},D.toTriggerData=function(e,t){var n={},o={},i={collection_viewed:["collection_viewed",{collection_title:"collection_name",collection_link:"collection_url"}],product_viewed:["product_viewed",{product_title:"product_name",product_link:"product_url"}],added_to_cart:["added_to_cart",{product_title:"product_name"}],add_to_cart:["added_to_cart",{product_title:"product_name"}],order_placed:["order_placed",{}],purchased:["order_placed",{}]};if(i.hasOwnProperty(e)&&(n=i[e=i[e][0]][1]),null!=t)for(var r in t)n.hasOwnProperty(r)?o[n[r]]=t[r]:o[r]=t[r];return[e,o]},D.syncAsTrigger=function(e,t){e=D.parseData(e),e=D.filterData(e);var n={product_viewed:["product_browsed"],added_to_cart:["product_addedtocart","product_browsed"],order_placed:["product_addedtocart","product_browsed"]};if(1==y.Config.notification.eventAsTrigger&&0<=["collection_viewed","product_viewed","added_to_cart","add_to_cart","order_placed","purchased"].indexOf(e)){t=D.toTriggerData(e,t);if(0<Object.keys(t[1]).length?D.triggerProcessor(t[0],t[1]):D.triggerProcessor(t[0]),n.hasOwnProperty(t[0])){var o,i=n[t[0]];for(o in i)D.triggerProcessor(i[o])}}},D.triggerProcessor=function(e,t,n){e=D.parseData(e),e=D.filterData(e);var o;D.validateData(e)&&(null!=t&&1<=Object.keys(t).length&&!(o=D.filterProperties(t,{key:32,value:512,object:16},["string"]))?d.Helper.displayLog(b.KeyMapper.INVALID_PAYLOAD):D.syncProperties("TriggerEvent",e,o))},D.personalizationProcessor=function(e){null!=e&&1<=Object.keys(e).length&&((e=D.filterProperties(e.add,{key:32,value:32,object:1},["number","string"]))?D.syncProperties("PersonalProperties","",e):d.Helper.displayLog(b.KeyMapper.INVALID_PAYLOAD))},D.userProfileProcessor=function(e){var t,n="",o={key:32,value:32,object:64};if(D.hasSynclimitReached("userProperty"))d.Helper.displayLog("Sync aborted! : Daily/monthly limit reached!");else if(null!=e&&1<=Object.keys(e).length){if(void 0!==e.add&&1<=Object.keys(e.add).length)t=D.filterProperties(e.add,o),n="add";else{if(!(void 0!==e.remove&&1<=Object.keys(e.remove).length))return void d.Helper.displayLog(b.KeyMapper.INVALID_PAYLOAD);t=D.filterProperties(e.remove,o),n="remove"}if(t){if(D.isPropertySynced(t,n))return d.Helper.displayLog("This property already synced : ",t),void(1==y.Config.debugger.status&&(o="User Property: Already Sent to ".concat(y.Config.brandingPartner),v.Debugger.log(o+" "+JSON.stringify(t),y.Config.debugger.successCode)));D.syncProperties("SegmentProperties",n,t,function(){D.increaseSyncCount("userProperty"),D.propertySynced("userProperty",t,n)})}else d.Helper.displayLog(b.KeyMapper.INVALID_PAYLOAD)}},D.propertySynced=function(e,n,o){var i;void 0===o&&(o="add"),"userProperty"==e&&(i=f.Storage.getStorage(b.KeyMapper.USER_PROPERTY),(i=d.Helper.parseToJSON(i))&&"object"==typeof i?Object.keys(n).forEach(function(t){Array.isArray(n[t])?"add"==o?(0==Array.isArray(i[t])&&(i[t]=[]),n[t].forEach(function(e){-1<i[t].indexOf(e)==0&&i[t].push(e)})):"remove"==o&&Array.isArray(i[t])&&(n[t].forEach(function(e){e=i[t].indexOf(e);-1<e&&i[t].splice(e,1)}),0==i[t].length&&delete i[t]):"remove"==o?delete i[t]:i[t]=n[t]}):i=n,f.Storage.setStorage(b.KeyMapper.USER_PROPERTY,JSON.stringify(i)),D.setUserProperties(i))},D.isPropertySynced=function(e,t){void 0===t&&(t="add");var n=f.Storage.getStorage(b.KeyMapper.USER_PROPERTY);if(!(n=d.Helper.parseToJSON(n))||"remove"==t)return!1;if(n&&"object"==typeof n){var t=Object.keys(e),o=Object.keys(n);if(0==t.every(function(e){return-1<o.indexOf(e)}))return!1;for(var i=!1,r=0,a=t;r<a.length;r++)if("break"===function(t){if(Array.isArray(e[t])){if(0==e[t].every(function(e){return-1<n[t].indexOf(e)}))return i=!0,"break"}else if(n.hasOwnProperty(t)&&n[t]!=e[t])return i=!0,"break"}(a[r]))break;if(i)return!1}return!0},D.filterData=function(e){if("string"==typeof e)return e},D.parseData=function(e){return"string"==typeof e?e.trim():"number"==typeof e?e.toString().trim():e},D.validateData=function(e){if(e.length<=32&&e.length)return!0},D.filterProperties=function(u,p,d){void 0===d&&(d=["number","string","boolean","object"]);try{var f={},g=0;if("object"==typeof u)return Object.keys(u).map(function(e){var t=e;if(e=e.substring(0,p.key),g<p.object&&""!=e.trim()&&e.length<=p.key){var n=(n=e.toLowerCase()).trim();if("string"==typeof(o=u[t])&&""!=o&&-1<d.indexOf(typeof o)){var o,e=(o=o.trim()).substring(0,p.value),t=new RegExp("^(https?)://");""!=o&&(o.length<=p.value||t.test(o))?f[n]=o:f[n]=e,g++}else if("object"==typeof o&&-1<d.indexOf(typeof o)){if(o instanceof Array&&1<=o.length){var i,r=o,a=[],s=0;for(i in r){var c,l=r[i];"number"==typeof(l=l.substring(0,p.value))&&null!=l&&s<=p.object&&l.toString().length<=p.value?(c=l,a.push(c),s++):"string"==typeof l&&""!=l.trim()&&s<=p.object&&l.trim().length<=p.value&&(c=l.trim(),a.push(c),s++)}1<=a.length&&(f[n]=a,g++)}}else("boolean"==typeof o&&-1<d.indexOf(typeof o)||"number"==typeof o&&-1<d.indexOf(typeof o)&&(o.toString().length<=p.value&&null!=o||-1<y.Config.notification.allowedKeys.indexOf(n)))&&(f[n]=o,g++)}}),f}catch(e){}return!1},D.setUserProperties=function(e){m.IndexedDB.addUpdate(b.KeyMapper.USER_PROP,e).then(function(e){d.Helper.displayLog(e)}).catch(function(e){d.Helper.displayLog(e)})},D.setIzcidDb=function(e){m.IndexedDB.addUpdate("IZCID",e).then(function(e){}).catch(function(e){d.Helper.displayLog(e)})},D.getIzCidPromise=function(){return new Promise(function(e,t){var n,o=f.Storage.getConfigLocal(b.KeyMapper.IZCID),i=f.Storage.getConfigLocal(b.KeyMapper.IZCID,b.KeyMapper.SYNC);""==o||""==i?(d.Helper.addMsgReciever(D.msgReciever),D.setCookieGlobalID(),""!=(n=f.Storage.getConfigLocal(b.KeyMapper.IZCID))?e(n):setTimeout(function(){e(n),n&&"undefined"!=n&&D.setIzcidDb(n)},2500)):(e(o),o&&"undefined"!=o&&D.setIzcidDb(o))}).catch(function(e){d.Helper.displayLog(e)})},D.setSubscriberIdFromDb=function(){return new Promise(function(t,e){m.IndexedDB.getIndexDBData("options","subscriberId").then(function(e){e?(d.Helper.displayLog("sub id found from db: ",e.val),y.Config.store.subscriberId=e.val,t(y.Config.store.subscriberId)):(d.Helper.displayLog("sub id not found "),t(!1))}).catch(function(e){d.Helper.displayLog("Error in getting sub id",e),t(!1)})})},D.setCookieGlobalID=function(){return new Promise(function(e,t){1!=y.Config.izootoStatus?e(!1):document.getElementById(b.KeyMapper.IZCIDDOM)?y.Config.global.isSetCidLoaded&&e(!0):d.Helper.addIFrame("https://cdn.izooto.com/scripts/sak/iz_setcid.html?v=1",b.KeyMapper.IZCIDDOM).then(function(){y.Config.global.isSetCidLoaded=!0,e(!0)})})},D.isIncognitoMode=function(){var t=this;return new Promise(function(n,e){return l(t,void 0,void 0,function(){var t;return u(this,function(e){switch(e.label){case 0:switch(y.Config.global.browserType){case 1:case 6:case 7:return[3,1];case 3:return[3,3]}return[3,4];case 1:return[4,D.chromePrivateTest()];case 2:return e.sent()?n(!0):n(!1),[3,5];case 3:try{return(t=indexedDB.open("test")).onsuccess=function(){return n(!1)},t.onerror=function(){return n(!0)},[3,5]}catch(e){}e.label=4;case 4:n(!1),e.label=5;case 5:return[2]}})})})},D.getChromiumQuotaLimit=function(){try{var e=window;return void 0!==e.performance&&void 0!==e.performance.memory&&void 0!==e.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824}catch(e){return 1073741824}},D.storageQuotaChromePrivateTest=function(){var o=this;return new Promise(function(n,e){try{navigator.webkitTemporaryStorage.queryUsageAndQuota(function(e,t){n(t<o.getChromiumQuotaLimit())},function(e){d.Helper.displayLog("detectIncognito somehow failed to query storage quota: "+e.message),n(!1)})}catch(e){n(!1)}})},D.oldChromePrivateTest=function(){return new Promise(function(e,t){var n=window.RequestFileSystem||window.webkitRequestFileSystem;n?n(0,1,function(){return e(!1)},function(){return e(!0)}):e(!1)})},D.chromePrivateTest=function(){return l(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return void 0===Promise||void 0===Promise.allSettled?[3,2]:[4,this.storageQuotaChromePrivateTest()];case 1:return[2,e.sent()];case 2:return[4,this.oldChromePrivateTest()];case 3:return[2,e.sent()]}})})},D.updatePromptCount=function(e){var t=0;e==b.KeyMapper.PROMPTED?(t=""!=f.Storage.getConfigLocal(b.KeyMapper.PROMPT_COUNT,b.KeyMapper.STATS)?f.Storage.getConfigLocal(b.KeyMapper.PROMPT_COUNT,b.KeyMapper.STATS)+1:1,f.Storage.setConfigLocal(b.KeyMapper.PROMPT_COUNT,t,b.KeyMapper.STATS)):e==b.KeyMapper.OPTIN_SHOWN&&(t=""!=f.Storage.getConfigLocal(b.KeyMapper.OPTIN_SHOWN_COUNT,b.KeyMapper.STATS)?f.Storage.getConfigLocal(b.KeyMapper.OPTIN_SHOWN_COUNT,b.KeyMapper.STATS)+1:1,f.Storage.setConfigLocal(b.KeyMapper.OPTIN_SHOWN_COUNT,t,b.KeyMapper.STATS))},D.getSubscriptionKey=function(e){if(!e)return"";if("string"==typeof(e=D.subcriptionToObject(e)))return e;var t=e.endpoint,e=y.Config.global.browserName;return e==b.KeyMapper.BROWSER_FIREFOX?t.substring(48):(e==b.KeyMapper.BROWSER_OPERA||e==b.KeyMapper.BROWSER_CHROME)&&null!=t&&0<=t.indexOf("fcm.googleapis.com")?t.substring(36):e==b.KeyMapper.BROWSER_EDGE?encodeURIComponent(t.substring(41)):e==b.KeyMapper.BROWSER_UCB?t.substring(36):t.substring(40)},D.getSubscriptionParameters=function(e){try{var t={};return 3==y.Config.notification.subscriptionType?t={bKey:y.Config.UUID,st:e}:2==y.Config.notification.subscriptionType?(e=D.subcriptionToObject(e),t={bKey:y.Config.UUID,ep:7==y.Config.global.browserType?encodeURIComponent(e.endpoint):e.endpoint,auth:e.keys.auth,pk:e.keys.p256dh,vpk:y.Config.notification.vapidKey}):1==y.Config.notification.subscriptionType&&(t={bKey:y.Config.UUID,fe:1,ft:e}),t}catch(e){return d.Helper.displayLog("Error in getSubscriptionParameters",e),{}}},D.getOptinDesignType=function(){return y.Config.notification.optInDesignType?0==y.Config.notification.promptType?0:y.Config.notification.optInDesignType:""},D.getswVersion=function(){return l(this,void 0,void 0,function(){return u(this,function(e){try{return[2,new Promise(function(n,o){setTimeout(function(){m.IndexedDB.getIndexDBData("options","swVer").then(function(e){var t=e.val;e.hasOwnProperty("key")?n(t):o(!1)}).catch(function(e){d.Helper.displayLog(e),o(!1)})},50)})]}catch(e){d.Helper.displayLog(e)}return[2]})})},D.createWelcomeNotification=function(){var e,t;1===(null===(e=y.Config.notification.welcomeNotification)||void 0===e?void 0:e.status)&&""!=y.Config.notification.welcomeNotification.icon&&""!=y.Config.notification.welcomeNotification.title&&""!=y.Config.notification.welcomeNotification.body&&((t=new window.Notification(y.Config.notification.welcomeNotification.title,{icon:y.Config.notification.welcomeNotification.icon,body:y.Config.notification.welcomeNotification.body,tag:"welcome"})).addEventListener("click",function(){var e;""!=(null===(e=y.Config.notification.welcomeNotification)||void 0===e?void 0:e.url)?(t.close(),window.open(null===(e=y.Config.notification.welcomeNotification)||void 0===e?void 0:e.url,"_blank")):t.close()}),0<(null===(e=null===(e=y.Config.notification)||void 0===e?void 0:e.welcomeNotification)||void 0===e?void 0:e.timeout)&&setTimeout(function(){t.close()},y.Config.notification.welcomeNotification.timeout))},D.showWelcomeNotificationOld=function(){var e;1===(null===(e=null===(e=y.Config.notification)||void 0===e?void 0:e.welcomeNotification)||void 0===e?void 0:e.status)&&""!=y.Config.notification.welcomeNotification.icon&&""!=y.Config.notification.welcomeNotification.title&&""!=y.Config.notification.welcomeNotification.body&&1==y.Config.notification.isSdkHttps&&D.createWelcomeNotification()},D.sendLocalNotification=function(a){return D.getSWReadyRegistration().then(function(e){var t={},n={};n.pid=a.key,n.link=a.link,n.cid=a.id,n.rid=a.rid,n.viewFlag=a.viewFlag,n.clickFlag=a.clickFlag,n.sysEvents=a.sysEvents,n.domainNum=a.domainNum;var o={body:a.message,icon:a.icon,requireInteraction:a.reqInt,tag:a.tag,image:a.banner,data:n};if(0<a.act_num&&a.act1name&&a.act1link){var i,r={action:"action1",title:a.act1name};return a.hasOwnProperty("act1icon")&&""!=a.act1icon&&(r.icon=a.act1icon),n.act1link=a.act1link,t=[r],2==a.act_num&&a.act2name&&a.act2link&&(i={action:"action2",title:a.act2name},a.hasOwnProperty("act2icon")&&""!=a.act2icon&&(i.icon=a.act2icon),n.act2link=a.act2link,t=[r,i]),o.actions=t,e.showNotification(a.title,o)}return e.showNotification(a.title,o)}).catch(console.log)},D.customizeOptInPrompt=function(e){var t={title:50,message:100,allowButton:10,laterButton:10};try{for(var n in e)""!=e[n]&&(e[n]=e[n].trim(),"title"==n?y.Config.notification.promptDesign.message=e[n].substring(0,t[n]):"message"==n?y.Config.notification.promptDesign.subMessage=e[n].substring(0,t[n]):"icon"!=n||!e[n].startsWith("http://")&&!e[n].startsWith("https://")||e[n].includes("panel.izooto")?"allowButton"==n?y.Config.notification.promptDesign.btn2Txt=e[n].substring(0,t[n]):"laterButton"==n&&(y.Config.notification.promptDesign.btn1Txt=e[n].substring(0,t[n])):y.Config.notification.promptDesign.icon=e[n])}catch(e){d.Helper.displayLog(e)}},D.registerServiceWorker=function(){return new Promise(function(n,t){var e;"serviceWorker"in navigator?(e=void 0,y.Config.notification.serviceWorkerScope&&(e={scope:y.Config.notification.serviceWorkerScope}),y.Config.notification.serviceWorkerPath,y.Config.notification.serviceWorkerScope,navigator.serviceWorker.register(y.Config.notification.serviceWorkerPath,e).then(function(t){D.getswVersion().then(function(e){e&&"undefined"!=e&&(y.Config.notification.serviceWorkerVersion=e,n(t))}).catch(function(e){n(t),d.Helper.displayLog("swVersion undefined",e)}),y.Config.notification.windowType||(m.IndexedDB.setIndexedDb("gaId"),m.IndexedDB.setIndexedDb("sysEvents"))}).catch(function(e){t(e),d.Helper.displayLog(e)})):(d.Helper.displayLog(e="Service workers are not supported in this browser."),t(e))}).catch(function(e){d.Helper.displayLog(e)})},D.sendMsgToSW=function(t,i){return l(this,void 0,void 0,function(){return u(this,function(e){return[2,new Promise(function(n,o){var e=new MessageChannel;e.port1.onmessage=function(e){var t=e.data,e=(t=d.Helper.parseToJSON(t)).izootoSWToSDKSender;e&&e.izootoSWSubscribe&&((t=e.izootoSWSubscribe).error?o(e.izootoSWSubscribe):(t.hasOwnProperty(b.KeyMapper.SUBSCRIPTION_SYNCED)&&(D.subscriptionSyncedFromSW=t[b.KeyMapper.SUBSCRIPTION_SYNCED]),n(t.subscription)))},(navigator.serviceWorker.controller||t.watiting||t.installing||t.active).postMessage(JSON.stringify({izootoSDKToSWSender:i}),[e.port2])})]})})},D.getHTTPSubscriptionParameters=function(n){return l(this,void 0,void 0,function(){var t;return u(this,function(e){return t={},[2,d.Helper.getFlagBasedParameter({subscriptionMeta:!0,subcription:!0}).then(function(e){(t=c(c({},t),e)).bKey=y.Config.UUID,t.vpk=y.Config.notification.vapidKey;e=d.Helper.getUTMParamsOfUrl();Object.keys(e).length&&(t=c(c({},t),e));e=S.AdNetwork.getAdNetworkParam(!0);return null!=e&&"undefined"!=e&&(t=c(c({},t),e)),D.subscriptionSource&&(t.ss=D.subscriptionSource),n!=b.KeyMapper.ALREADY_GRANTED&&n!=b.KeyMapper.PROMPT_ALLOWED||(t[n]=1,t.sv=y.Config.SDKVersion),d.Helper.removeUndefinedValuesFromObj(t)})]})})},D.subscribeFromSW=function(i){return l(this,void 0,void 0,function(){return u(this,function(e){return[2,D.getHTTPSubscriptionParameters(D.permissionStatus).then(function(e){var o={izootoSWSubscribe:{endpoint:d.Helper.getEndpoint(b.KeyMapper.PROMPT_ALLOWED),postData:e}};return new Promise(function(t,n){D.getswVersion().then(function(e){!e||e<D.minSWVersion?n("sw version condtion not met => "+e):D.sendMsgToSW(i,JSON.stringify(o)).then(function(e){t(e)}).catch(function(e){n(e)})}).catch(function(e){n("rejecting sw version undefined")})})})]})})},D.subscriptionHandler=function(){var e=this;return new Promise(function(o,i){return l(e,void 0,void 0,function(){var n,t;return u(this,function(e){switch(e.label){case 0:if(n=function(e){D.subscribe(e).then(function(e){o(e)}).catch(function(e){i(e)})},!(t=D.getPushTokenFromLStorage()))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,m.IndexedDB.addUpdate("pushToken",t)];case 2:return e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return D.registerServiceWorker().then(function(e){y.Config.notification.swSubscribe,y.Config.notification.serviceWorkerVersion,D.getSWReadyRegistration().then(function(t){y.Config.notification.swSubscribe?D.subscribeFromSW(t).then(function(e){o(e)}).catch(function(){n(t)}):D.subscriptionOnAllow?n(t):null!=t&&t.pushManager.getSubscription().then(function(e){e||(y.Config.store.isSubscriptionLost=!0),n(t)})}).catch(function(e){i({error:b.KeyMapper.BROWSER_UNSUPPORTED})})}).catch(function(e){i({error:b.KeyMapper.BROWSER_UNSUPPORTED})}),[2]}})})})},D.subscribe=function(i){return l(this,void 0,void 0,function(){return u(this,function(e){return y.Config.notification.subscriptionObj={userVisibleOnly:!0,applicationServerKey:d.Helper.urlB64ToUint8Array(y.Config.notification.vapidKey)},[2,new Promise(function(n,o){d.Helper.displayLog("Subscription initiated..."),null!=i&&i.pushManager.subscribe(y.Config.notification.subscriptionObj).then(function(e){d.Helper.displayLog("Subscrption : ",JSON.stringify(e)),n(e)}).catch(function(t){d.Helper.displayLog("Unable to subscribe due to error : ",t),null!=t.message&&(-1<t.message.indexOf("push service error")||-1<t.message.indexOf("User denied permission to use the Push API"))?(d.Helper.displayLog("Browser does not have complete support of vapid"),o({error:b.KeyMapper.BROWSER_UNSUPPORTED})):null!=i&&i.pushManager.getSubscription().then(function(e){if(!e)throw t;d.Helper.displayLog("Unexpected subscription found! Unsubscribing...",JSON.stringify(e)),e.unsubscribe().then(function(){d.Helper.displayLog("Re Subscribing..."),n(D.subscribe(i))})}).catch(function(e){o({error:e})})})})]})})},D.unsubscribeNotification=function(){d.Helper.displayLog("Notification unsubscribe is initiated..."),D.getSWReadyRegistration().then(function(e){null!=e&&e.pushManager.getSubscription().then(function(e){e&&e.unsubscribe().then(function(e){d.Helper.displayLog("Unsubscribed : ",e)}).catch(function(e){d.Helper.displayLog("Unsubscription failed : ",e)})}).catch(function(e){d.Helper.displayLog("Get subscription failed : ",e)})}).catch(function(e){})},D.closePopupWindow=function(){if(self==top&&y.Config.notification.windowType)try{setTimeout(function(){var e={};e[b.KeyMapper.POPUP_CLOSED]=1;var t={};t[b.KeyMapper.MESSAGE]=e,null!==(e=window.opener)&&void 0!==e&&e.postMessage(JSON.stringify(t),"*"),window.close()},1e3)}catch(e){d.Helper.displayLog(e)}},D.removeSubsriptionFromAlternateDomain=function(){var e,t=f.Storage.getConfigLocal(b.KeyMapper.ALT_DOMAIN_STATUS);if(""!=t)try{t=JSON.parse(t),D.alternateDomainJson=t}catch(e){t=""}"object"==typeof y.Config.notification.sourceOriginAlt&&1<y.Config.notification.sourceOriginAlt.length?(e=y.Config.notification.sourceOriginAlt.length,D.alternateDomainPermissionHandler(0,e-1,D.alternateDomainJson)):(e="object"==typeof y.Config.notification.sourceOriginAlt?y.Config.notification.sourceOriginAlt[0]:y.Config.notification.sourceOriginAlt,3==(e=D.getAlternateDomainConfig(D.alternateDomainJson,D.permissionDomain=e))||2==e||(d.Helper.addMsgReciever(D.msgReciever),"https:"==y.Config.global.locationProtocol?d.Helper.addIFrame(D.permissionDomain+"?action=izrmsubs&izHardUnsub=1","izAltSubFrame"):d.Helper.addIFrame(D.permissionDomain+"?action=izrmsubs","izAltSubFrame")))},D.removeSubscriptionReceiver=function(e){3==e&&(D.setAlternateDomainConfig(D.alternateDomainJson,D.permissionDomain,e),"object"==typeof y.Config.notification.sourceOriginAlt&&D.alternateDomainIndex<y.Config.notification.sourceOriginAlt.length&&D.alternateDomainPermissionHandler(D.sourceOriginIndex,y.Config.notification.sourceOriginAlt.length-1,D.alternateDomainJson))},D.alternateDomainPermissionHandler=function(e,t,n){for(var o=e;o<=t;o++){D.permissionDomain=y.Config.notification.sourceOriginAlt[o];var i=D.getAlternateDomainConfig(n,D.permissionDomain);if(D.sourceOriginIndex=o+1,3!=i&&2!=i){d.Helper.addMsgReciever(D.msgReciever),"https:"==y.Config.global.locationProtocol?d.Helper.addIFrame(D.permissionDomain+"?action=izrmsubs&izHardUnsub=1","izAltSubFrame"+o):d.Helper.addIFrame(D.permissionDomain+"?action=izrmsubs","izAltSubFrame"+o);break}if(o==t)return}},D.getAlternateDomainConfig=function(e,t){return null!=e[t]?e[t]:""},D.setAlternateDomainConfig=function(e,t,n){e=""!=e?e:{};e[t]=n,D.alternateDomainJson=e,e=JSON.stringify(e),f.Storage.setConfigLocal(b.KeyMapper.ALT_DOMAIN_STATUS,e)},D.getPushTokenFromLStorage=function(){var e="";return e=(e=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN))&&d.Helper.isJSONString(e)?d.Helper.parseToJSON(e)||{}:e},D.removeSubscriptionInFrame=function(){var e="rmSubToParent",t={izrmstatus:3},n=document.location.href,n=d.Helper.getParamFromUrl(n,"izHardUnsub");try{var o,i=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN);1==n?(D.unsubscribeNotification(),d.Helper.postMessage("parent",e,t)):""!=i?(o=y.Config.UUID,D.sendSubscriptionUpdate(o,2,function(){d.Helper.postMessage("parent",e,t)})):d.Helper.postMessage("parent",e,t)}catch(e){}},D.syncLastVisit=function(){var e=d.Helper.getLanguage(),t=d.Helper.getMetaValue("keywords"),n={last_website_visit:!0};""!=e&&(n.lang=e),""!=t&&(n.keywords=t);var o=new Date,e=f.Storage.getConfigLocal("lastVisit",b.KeyMapper.SYNC),t=!1;e&&(t=new Date(e).getDate()),D.syncAllSubscribersVisit(),""!=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN)&&o.getDate()!==t?(t=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN),t=d.Helper.isJSONString(t)?d.Helper.parseToJSON(t):t,n={pid:y.Config.client,et:"userp",act:"add",val:JSON.stringify(n)},n=c(c({},n),D.getSubscriptionParameters(t)),g.HttpRequest.postForm(d.Helper.getEndpoint("last_visit"),n).then(function(){f.Storage.updateLastSync("lastVisit")}).catch(function(e){})):d.Helper.displayLog("Sync last Visit Blocked")},D.syncAllSubscribersVisit=function(){var e,t,n,o;1==y.Config.notification.syncVisitType&&(e=d.Helper.getEndpoint("syncAllSubscribersVisit"),t=d.Helper.getLanguage(),n=d.Helper.getMetaValue("keywords"),o=encodeURIComponent([window.location.protocol,"//",window.location.host,window.location.pathname].join("")),o={pid:y.Config.client,bkey:y.Config.UUID,url:o},""!=n&&(o.keywords=n),""!=t&&(o.lang=t),g.HttpRequest.postForm(e,o).catch(function(e){}))},D.applyBrowserPatch=function(){1==y.Config.global.browserType&&0==y.Config.notification.promptType&&(61<parseInt(y.Config.global.browserVer)||60<parseInt(y.Config.global.browserVer)&&1!=y.Config.global.deviceType)&&(!y.Config.notification.isSdkHttps||y.Config.notification.isSdkHttps&&"http:"==y.Config.global.locationProtocol)&&(y.Config.notification.promptType=1,y.Config.notification.optInDesignType||(y.Config.notification.optInDesignType=1)),2==y.Config.global.browserType&&0==y.Config.notification.promptType&&12.1<=parseFloat(y.Config.global.browserVer)&&(y.Config.notification.promptType=1,y.Config.notification.optInDesignType||(y.Config.notification.optInDesignType=1)),3==y.Config.global.browserType&&0==y.Config.notification.promptType&&72<=y.Config.global.browserMajorVersion&&(y.Config.notification.promptType=1,y.Config.notification.optInDesignType||(y.Config.notification.optInDesignType=1))},D.isSupported=function(){return l(this,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return y.Config.global.browserName==b.KeyMapper.BROWSER_FIREFOX&&"http:"==y.Config.global.locationProtocol?[2,!1]:[4,D.isIncognitoMode()];case 1:return e.sent()?(y.Config.global.isIncoginito=!0,d.Helper.displayLog("Incognito mode detected!"),[2,!1]):[2,D.isPushSupported()]}})})},D.isPushSupported=function(){return!!D.isVapidSupported()||"safari"in window&&"pushNotification"in window.safari},D.isVapidSupported=function(){return!!("https:"==y.Config.global.locationProtocol&&(y.Config.notification.isSdkHttps||1==y.Config.notification.windowType&&0==y.Config.notification.isSdkHttps)&&"Notification"in window&&"serviceWorker"in navigator)},D.loadOptin=function(){return l(this,void 0,void 0,function(){var t,n;return u(this,function(e){return t=y.Config.notification.optInSrc,n=y.Config.notification.optInDesignType,n=t+""+n+".js?v=3",""!=y.Config.notification.optInDesign?(y.Config.notification.dialogDesign=y.Config.notification.optInDesign,D.showOptin()):null!=window.izOptinDesign&&""!=window.izOptinDesign?(y.Config.notification.dialogDesign=window.izOptinDesign,D.showOptin()):d.Helper.addExternalJS(n,"izOptin",!0),[2]})})},D.showOptin=function(){var e;if(null!=window.izOptinDesign&&(y.Config.notification.dialogDesign=window.izOptinDesign),y.Config.notification.dialogDesign=D.loadDesign(y.Config.notification.promptDesign,y.Config.notification.dialogDesign),y.Config.notification.dialogDesign=D.dynamicBrandingPartnerHandler(y.Config.notification.dialogDesign),d.Helper.addHTML("div",y.Config.notification.dialogDesign,"izmiddle-box"))try{y.Config.brandingPartner!=y.Config.defaultBrandingPartner&&null!==(e=window.document.querySelector("#izmiddle-box a"))&&void 0!==e&&e.setAttribute("onclick","return false;")}catch(e){}d.Helper.izootoBrandingHandler(),D.sendEvent(b.KeyMapper.OPTIN_SHOWN)},D.dynamicBrandingPartnerHandler=function(e){return e=y.Config.brandingPartner!=y.Config.defaultBrandingPartner?y.Config.notification.dialogDesign.replace("iZooto",y.Config.brandingPartner):e},D.loadDesign=function(e,t){try{if("object"!=typeof e)return"";for(var n in e){var o;e.hasOwnProperty(n)&&(o=new RegExp("{{--"+n+"--}}","g"),t=t.replace(o,e[n]))}}catch(e){}return t},D.getPermissionStatusFromFrame=function(){return new Promise(function(t,e){d.Helper.addMsgReciever(function(e){e=d.Helper.parseToJSON(e.data);!e.hasOwnProperty(b.KeyMapper.MESSAGE)||(e=e[b.KeyMapper.MESSAGE]).hasOwnProperty("izPermsStatus")&&null!=e.izPermsStatus&&t(e.izPermsStatus)},!0);var n=y.Config.notification.sourceOrigin+"?action=izcheckperms";d.Helper.addIFrame(n,"izPermsFrame")})},D.getSubDomainPermissionStatus=function(){return new Promise(function(t,e){var n=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN),o=f.Storage.getStorage(b.KeyMapper.PERMISSION_STATUS),i=D.getPermissionStatusFromStorage();0!=i||2==o?t(i):"https:"==y.Config.global.locationProtocol?D.getPermissionStatusFromFrame().then(function(e){D.updatePermissionStatus(e=1==e&&""!=n?0:e),t(e)}):""!=n?D.tokenValidator(function(e){D.updatePermissionStatus(e),t(e)}):t(i)}).catch(function(e){d.Helper.displayLog(e)})},D.setRepeatPromptDelay=function(e){var t;0!==e&&(t=(t=new Date).setTime(t.getTime()+60*e*1e3),"Setting repeat prompt delay for ".concat(e," minutes"),f.Storage.setConfigLocal(b.KeyMapper.REPEAT_PROMPT_DELAY,t))},D.setActivePrompt=function(e){var t;("https:"===y.Config.global.locationProtocol&&0==y.Config.notification.windowType||"http:"===y.Config.global.locationProtocol)&&(window.addEventListener("beforeunload",function(){f.Storage.removeStorage(b.KeyMapper.ACTIVE_PROMPT)}),t=(t=new Date).setTime(t.getTime()+60*e*1e3),f.Storage.setStorage(b.KeyMapper.ACTIVE_PROMPT,t))},D.isActivePrompt=function(){var e=new Date;return f.Storage.getStorage(b.KeyMapper.ACTIVE_PROMPT)>e.getTime()},D.updatePermissionStatus=function(e){e===b.KeyMapper.PROMPT_ALLOWED||e===b.KeyMapper.ALREADY_GRANTED||1===e?f.Storage.setConfigLocal(b.KeyMapper.PERMISSION_STATUS,1):e===b.KeyMapper.PROMPT_DENIED||e===b.KeyMapper.ALREADY_DENIED||2==e?f.Storage.setConfigLocal(b.KeyMapper.PERMISSION_STATUS,2):f.Storage.setConfigLocal(b.KeyMapper.PERMISSION_STATUS,0),f.Storage.updateLastSync(b.KeyMapper.PERMISSION_STATUS)},D.sendPermissionStatusFromFrame=function(){var e=0;"Notification"in window&&"granted"==window.Notification.permission&&(e=1),d.Helper.postMessage("parent","izPermsStatus",e)},D.updateSubscriptionProcessor=function(e,t){var n=y.Config.UUID,o=f.Storage.getConfigLocal(b.KeyMapper.PERMISSION_STATUS);t=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN);t=D.getSubscriptionKey(t);"subscribe"==e?y.Config.store.isSoftSubscribeTriggered||(""!=t&&""!=n&&D.sendSubscriptionUpdate(n,0,function(){d.Helper.displayLog("Re-Subscribing")}),y.Config.store.isSoftSubscribeTriggered=!0,3==o&&f.Storage.removeConfigLocal(b.KeyMapper.PERMISSION_STATUS),D.triggerPromptHandler()):"unsubscribe"==e&&""!=t&&""!=n&&D.sendSubscriptionUpdate(n,2,function(){f.Storage.setConfigLocal(b.KeyMapper.PERMISSION_STATUS,3),D.sendEvent(b.KeyMapper.UNSUBSCRIBED)})},D.sendSubscriptionUpdate=function(t,n,o){var i=0==n?d.Helper.getEndpoint("SoftSubscribe"):2==n?d.Helper.getEndpoint("SoftUnsubscribe"):d.Helper.getEndpoint("supUrl");d.Helper.getFlagBasedParameter().then(function(e){e.bKey=t,e.action=n,e.izcid=f.Storage.getConfigLocal(b.KeyMapper.IZCID),e.ht="https:"==y.Config.global.locationProtocol?1:0,g.HttpRequest.postForm(i,e).then(function(){o()}).catch(function(e){})})},D.scrollHandler=function(e){var t=window.screen.availHeight,n=window.scrollY;1!=y.Config.notification.isTriggeredOnScoll&&(t<=n||document.documentElement.scrollTop>=t)&&(y.Config.notification.isTriggeredOnScoll=1,e())},D.brandingOverlayHandler=function(){1==y.Config.notification.overlay?D.openHttpsOverlay():1==y.Config.branding&&D.openHttpsBranding()},D.openHttpsBranding=function(){var e;if(!(0<y.Config.notification.windowType)&&0!=y.Config.branding){if(1!=d.Helper.getDeviceType())try{window.addEventListener("scroll",D.brandingScroll)}catch(e){}if(d.Helper.addHTML("div",y.Config.notification.httpsBranding,"izooto-branding"))try{y.Config.brandingPartner!=y.Config.defaultBrandingPartner&&null!==(e=window.document.querySelector("#izooto-branding a"))&&void 0!==e&&e.setAttribute("onclick","return false;")}catch(e){}d.Helper.izootoBrandingHandler()}},D.openHttpsOverlay=function(){var e;if(!(0<y.Config.notification.windowType)&&0!=y.Config.notification.overlay){if(1!=d.Helper.getDeviceType())try{window.addEventListener("scroll",D.brandingScroll)}catch(e){}if((y.Config.global.browserName=b.KeyMapper.BROWSER_CHROME)&&62<parseInt(d.Helper.getBrowserVersion())&&3==d.Helper.getDeviceType()&&(y.Config.notification.httpsOverlay=""),d.Helper.addHTML("div",y.Config.notification.httpsOverlay,"izooto-branding"))try{y.Config.brandingPartner!=y.Config.defaultBrandingPartner&&null!==(e=window.document.querySelector("#izooto-branding a"))&&void 0!==e&&e.setAttribute("onclick","return false;")}catch(e){}d.Helper.izootoBrandingHandler()}},D.brandingScroll=function(){null!=document.getElementById("izooto-branding")&&(30<window.pageYOffset||30<document.body.scrollTop)&&D.closeHttpsOverlay()},D.closeHttpsOverlay=function(){var e;if(!(0<y.Config.notification.windowType)){try{null!==(e=document.getElementById("izooto-branding"))&&void 0!==e&&e.remove()}catch(e){d.Helper.displayLog("Error-Removing-Div"+e)}if(1!=d.Helper.getDeviceType())try{window.removeEventListener("scroll",D.brandingScroll)}catch(e){}}},D.popupNotice=function(e){try{document.getElementById("dynamic_iz").innerHTML="<center>"+e+"</center>"}catch(e){}},D.setManifest=function(){try{if(1!=y.Config.global.browserType||0!=y.Config.notification.subscriptionType)return;var e=document.getElementsByTagName("head")[0],t=document.createElement("link");t.rel="manifest",t.href=y.Config.notification.manifest,e.appendChild(t)}catch(e){}},D.tokenValidator=function(n,e){null==e&&(e=y.Config.UUID);e="".concat(d.Helper.getEndpoint("subscriptionValidator"),"?s=1&bkey=").concat(e,"&pid=").concat(y.Config.client);g.HttpRequest.get(e).then(function(e){var t=1;e=d.Helper.parseToJSON(e),null!=n&&(e.hasOwnProperty("status")&&0==e.status&&(t=0),n(t))}).catch(function(){})},D.checkAlternates=function(){"object"==typeof window._izAlternate?(null!=window._izAlternate.initAlt&&"function"==typeof window._izAlternate.initAlt&&window._izAlternate.initAlt(),Object.keys(window._izAlternate).map(function(n,e){Object.keys(window._izooto).map(function(e,t){e===n&&(window._izooto[e]=window._izAlternate[n])})})):d.Helper.displayLog("No alternate implementations found")},D.subcriptionToObject=function(e){return e="string"==typeof e&&d.Helper.isJSONString(e)?d.Helper.parseToJSON(e):e},D.isCurrentTokenExpired=function(e,t){var n=f.Storage.getConfigLocal(t,b.KeyMapper.SYNC),t=new Date;return!(t.getTime()<t.setTime(n+1e3*e))},D.isPermissionStatusExpired=function(e){return 1==e&&D.isCurrentTokenExpired(y.Config.notification.tokenExpire,b.KeyMapper.PERMISSION_STATUS)},D.getPermissionStatusFromStorage=function(){var e=0,t=f.Storage.getConfigLocal(b.KeyMapper.PERMISSION_STATUS);return e=""!=t&&!this.isPermissionStatusExpired(t)?t:e},D.isHttpsSitePermissionAlreadyGranted=function(){return!!(y.Config.notification.isSdkHttps&&y.Config.notification.isSupported&&"granted"==window.Notification.permission&&2!=y.Config.global.browserType||2==y.Config.global.browserType&&"16"<=y.Config.global.browserVer)},D.getWindowType=function(){var e=window.location.href.toLocaleLowerCase(),t="";return-1!==(t=e.substr(e.lastIndexOf("?")+1)).indexOf("action=prompt")?1:-1!==t.indexOf("action=izrmsubs")?2:-1!==t.indexOf("action=izcheckmaster")?3:"action=izcheckperms"==t?4:-1!==t.indexOf("action=izvalidator&izobj=")?5:-1!==t.indexOf("action=noroot")?6:0},D.syncPIDset=function(){f.Storage.getConfigLocal("pidList",b.KeyMapper.SYNC)||D.setCookieGlobalID().then(function(){var e=document.getElementById(b.KeyMapper.IZCIDDOM);f.Storage.updateLastSync("pidList"),d.Helper.postMessage(e,"setAllowedList",y.Config.client)})},D.msgReciever=function(e){var t,e=d.Helper.parseToJSON(e.data);e.hasOwnProperty(b.KeyMapper.MESSAGE)&&(e=e[b.KeyMapper.MESSAGE],d.Helper.displayLog("Received event : ",e),"izCidToParent"==(null==e?void 0:e.k)?(D.setIzcidDb(e.v),f.Storage.setConfigLocal(b.KeyMapper.IZCID,e.v),f.Storage.updateLastSync("IZCID")):"izCidWithPidList"==(null==e?void 0:e.k)?"object"!=typeof e.v||(t=e.v).hasOwnProperty("pidList")&&t.pidList&&f.Storage.setConfigLocal("pidList",t.pidList):e.hasOwnProperty("rmSubToParent")&&void 0!==e.rmSubToParent?D.removeSubscriptionReceiver(e.rmSubToParent.izrmstatus):e.hasOwnProperty(b.KeyMapper.MASTER_TO_CHILD)&&void 0!==e[b.KeyMapper.MASTER_TO_CHILD]?w.MasterDomain.masterConfigReciver(e[b.KeyMapper.MASTER_TO_CHILD]):e.hasOwnProperty(b.KeyMapper.CHILD_TO_MASTER)&&void 0!==e[b.KeyMapper.CHILD_TO_MASTER]?w.MasterDomain.setMasterStorage(e[b.KeyMapper.CHILD_TO_MASTER]):e.hasOwnProperty("izPermsStatus")?(f.Storage.setConfigLocal(b.KeyMapper.PERMISSION_STATUS,e.izPermsStatus),f.Storage.updateLastSync(b.KeyMapper.PERMISSION_STATUS)):e.hasOwnProperty("syncWelcomeSent")?D.showWelcomeNotification(!0):0<(t=Object.keys(e)).length&&(e.hasOwnProperty("serviceWorkerVersion")&&null!=e.serviceWorkerVersion&&(y.Config.notification.serviceWorkerVersion=e.serviceWorkerVersion,delete e.serviceWorkerVersion),e.hasOwnProperty(b.KeyMapper.SUBSCRIPTION_SYNCED)&&1==e[b.KeyMapper.SUBSCRIPTION_SYNCED]&&(D.subscriptionSyncedFromSW=!0,delete e[b.KeyMapper.SUBSCRIPTION_SYNCED]),t=Object.keys(e),D.sendEvent(t[0],e[t[0]])))},D.syncHookInDb=function(t){var n;"syncNotificationClick"!=t&&"syncNotificationView"!=t||(null!=y.Config.notification.syncNotificationClick||null!=y.Config.notification.syncNotificationView?(n=y.Config.notification[t],m.IndexedDB.getIndexDBData("options",t).then(function(e){(e&&e.hasOwnProperty("val")?e.val:"")!=n&&m.IndexedDB.addUpdate(t,n).then(function(e){}).catch(function(e){d.Helper.displayLog(e)})}).catch(function(e){d.Helper.displayLog(e)})):d.Helper.displayLog("Invalid Hook Request"))},D.syncNotificationSent=function(e){e={pid:y.Config.client,bkey:y.Config.UUID,btype:y.Config.global.browserType,dtype:y.Config.global.deviceType,rid:e.rid};g.HttpRequest.postForm(d.Helper.getEndpoint("notificationSent"),e,!0).then(function(){"sent Api synced successfully with ".concat(y.Config.brandingPartner)}).catch(function(e){})},D.syncNotificationView=function(e){var t={pid:y.Config.client,bkey:y.Config.UUID,cid:e.id,rid:e.rid,op:"view",pl:1};1==e.viewFlag&&(e=d.Helper.getEndpoint("syncNotificationView"),g.HttpRequest.postForm(e,t,!0).catch(function(e){}))},D.showWelcomeNotification=function(r){return l(this,void 0,void 0,function(){var t,n,o,i;return u(this,function(e){switch(e.label){case 0:return e.trys.push([0,7,,8]),t=function(t){return["title","message","icon","rid","key","id"].every(function(e){return!!t[e]})},n=y.Config.welcomePlaybook,o=n.data,0!=n.status?[3,1]:[2,!1];case 1:return(o.viewFlag=1,o.clickFlag=1,o.sysEvents=0,o.domainNum=0,i=function(){D.syncNotificationSent(o),D.syncNotificationView(o)},t(o))?r?(i(),[2,!1]):[3,2]:[3,5];case 2:return[4,D.sendLocalNotification(o).then(function(){y.Config.notification.isSdkHttps&&i()})];case 3:return e.sent(),[2,!0];case 4:return[3,6];case 5:return d.Helper.displayLog("Welcome playbook : ".concat(b.KeyMapper.INVALID_PAYLOAD)),[2,!1];case 6:return[3,8];case 7:return e.sent(),[2,!1];case 8:return[2]}})})},D.syncSendChurn=function(){try{var e,t,n,o=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN);o&&(e=D.getSubscriptionParameters(o),t=c({pid:y.Config.client},e),n=d.Helper.getEndpoint("syncClientSideChurn"),g.HttpRequest.postForm(n,t).then(function(){var e=f.Storage.getStorage(b.KeyMapper.PUSH_TOKEN);o==e&&f.Storage.removeStorage(b.KeyMapper.PUSH_TOKEN)}))}catch(e){}},D.CBUEvent=function(e){if(y.Config.convertBlockedUsers.status)switch(e){case b.KeyMapper.PROMPT_ALLOWED:case b.KeyMapper.ALREADY_GRANTED:d.Helper.hideElement("#iz-wp-cbu-dialog");break;case b.KeyMapper.PROMPT_DENIED:case b.KeyMapper.ALREADY_DENIED:D.initCBUDialog()}},D.initCBUDialog=function(){D.isCbuRepeatDelayed()||D.registerEventForCbuDialog()},D.registerEventForCbuDialog=function(){y.Config.convertBlockedUsers.triggerType?D.cbuDialogOnScroll():D.cbuDialogWithDelay()},D.cbuDialogWithDelay=function(){setTimeout(function(){D.isCBURepeatDelayed()},1e3*y.Config.convertBlockedUsers.promptDelay)},D.cbuDialogOnScroll=function(){try{var t;d.Helper.isScreenScrollable()&&(d.Helper.displayLog("onblock prompt will be shown on page scroll!"),t=0,window.addEventListener("scroll",function(){var e=window.pageYOffset||document.documentElement.scrollTop;t<e&&0<t&&D.isCBURepeatDelayed(),t=e<=0?0:e},!1))}catch(e){}},D.isCBURepeatDelayed=function(){D.isUnBlockPopupInitialize||(D.isUnBlockPopupInitialize=!0,g.HttpRequest.get("https://cdn.izooto.com/webpush/blockedvis/dialog.html").then(function(e){try{if(!e)return;d.Helper.addHTML("div",e,"iz-wp-cbu-dialog"),D.dynamicTitleMesssageHandling(),D.setCbuDialogRepeatPromptDelay(),d.Helper.izootoBrandingHandler(),d.Helper.setHref(".iz-wp-block-dialog-branding-url","https://www.izooto.com/campaign/getting-started-with-izooto?utm_source=referral&utm_medium=convert_blocked_users&utm_campaign="+y.Config.notification.siteUrl),D.registerEventToHideCbuDialog(),D.registerEventToShowUnblockContent()}catch(e){}}).catch(function(e){}))},D.registerEventToHideCbuDialog=function(){try{document.querySelectorAll(".iz-wp-block-dialog-close").forEach(function(e){e.addEventListener("click",function(e){d.Helper.hideElement("#iz-wp-cbu-dialog")})})}catch(e){}},D.registerEventToShowUnblockContent=function(){try{document.querySelector("#iz-wp-block-dialog-show-btn").addEventListener("click",function(e){D.subscriptionSource=3,D.changeContentOnDifferentBrowser(),d.Helper.hideElement("#iz-wp-block-dialog-popup"),d.Helper.showElement("#iz-wp-block-dialog-content")})}catch(e){}},D.dynamicTitleMesssageHandling=function(){try{var e,t,n,o=d.Helper.getDomElement(".iz-wp-block-dialog-title"),i=d.Helper.getDomElement(".iz-wp-block-dialog-message"),r=d.Helper.getDomElement("#iz-wp-block-dialog-show-btn");""!=y.Config.convertBlockedUsers.title&&(e=(e=y.Config.convertBlockedUsers.title.trim()).slice(0,100),o.innerHTML=e),""!=y.Config.convertBlockedUsers.message&&(t=(t=y.Config.convertBlockedUsers.message.trim()).slice(0,100),i.innerHTML=t),""!=y.Config.convertBlockedUsers.btnText&&(n=(n=y.Config.convertBlockedUsers.btnText.trim()).slice(0,20),r.innerHTML=n)}catch(e){}},D.changeContentOnDifferentBrowser=function(){try{for(var e=d.Helper.getDomElement(".iz-wp-block-dialog-browserimage"),t=d.Helper.getDomElement(".iz-wp-block-dialog-browser-content"),n=D.getInstructions(),o=0;o<n.length;o++){var i=document.createElement("li");i.innerHTML=n[o],t.appendChild(i)}e.src=D.getGIFUrl()}catch(e){}},D.getGIFUrl=function(){var e=D.nudgeUserObj();if(e.hasOwnProperty("type")){e=e.type;return"".concat("https://cdn.izooto.com/webpush/blockedvis/").concat(e,".gif")}return!1},D.getInstructions=function(){var e=D.nudgeUserObj();return!!e.hasOwnProperty("instructions")&&e.instructions},D.nudgeUserObj=function(){var e=d.Helper.getOSName(),t=d.Helper.getBrowserName(),t="".concat(t,"_").concat(e),e={};return e["".concat(b.KeyMapper.BROWSER_CHROME,"_").concat(b.KeyMapper.OS_WINDOWS)]={type:1,instructions:["Click on the <b>lock</b> icon in the website address bar.","Enable the <b>Notifications</b> toggle","<b>Reload</b> the page and you’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_CHROME,"_").concat(b.KeyMapper.OS_MAC)]={type:2,instructions:["Click on the <b>lock</b> icon in the website address bar.","Under notifications, enable the toggle and change it to <b>Allow</b>","All Set! <b>Reload</b> the page and you’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_CHROME,"_").concat(b.KeyMapper.OS_ANDROID)]={type:8,instructions:["Tap on the lock icon in the website address bar","Tap on <b>Permissions</b>, and then Reset permissions","All Set! <b>Reload</b> the page and click on Allow when prompted! 🎉"]},e["".concat(b.KeyMapper.BROWSER_SAFARI,"_").concat(b.KeyMapper.OS_MAC)]={type:3,instructions:["Click on Safari -> Preferences","Under Websites -> Notifications, select “Allow” from the dropdown","All Set! <b>Reload</b> the page and you’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_FIREFOX,"_").concat(b.KeyMapper.OS_WINDOWS)]={type:4,instructions:["Click on the <b>Notifications</b> icon in the website address bar","Clear the <b>blocked</b> status and reload the page","Click on <b>“Allow”</b> when prompted to subscribe","All Set! <b>Reload</b> the page and you’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_FIREFOX,"_").concat(b.KeyMapper.OS_MAC)]={type:7,instructions:["Click on the <b>Notifications</b> icon in the website address bar","Clear the <b>blocked</b> status and reload the page","Click on <b>“Allow”</b> when prompted to subscribe","All Set! You’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_FIREFOX,"_").concat(b.KeyMapper.OS_ANDROID)]={type:9,instructions:["Tap on the <b>lock</b> icon in the website address bar","Under notifications, change status to <b>“Allowed”</b>","All Set! <b>Reload</b> the page and click on Allow when prompted! 🎉"]},e["".concat(b.KeyMapper.BROWSER_OPERA,"_").concat(b.KeyMapper.OS_WINDOWS)]={type:5,instructions:["Click on the <b>lock</b> icon in the website address bar","Enable the <b>Notifications</b> toggle","All Set! <b>Reload</b> the page and you’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_OPERA,"_").concat(b.KeyMapper.OS_MAC)]={type:6,instructions:["Click on the <b>lock</b> icon in the website address bar","Enable the <b>Notifications</b> toggle","All Set! <b>Reload</b> the page and you’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_OPERA,"_").concat(b.KeyMapper.OS_ANDROID)]={type:10,instructions:["Tap on the <b>green tick</b> icon in the website address bar","Under permissions, set notifications as <b>“Allowed”</b>.","All Set! <b>Reload</b> the page and click on Allow when prompted! 🎉"]},e["".concat(b.KeyMapper.BROWSER_EDGE,"_").concat(b.KeyMapper.OS_WINDOWS)]={type:11,instructions:["Click on the <b>lock</b> icon in the website address bar","Under <b>‘Permissions</b> for the site’, click on <b>Allow</b> notifications","All Set! <b>Refresh</b> the page and you’re good to go! 🎉"]},e["".concat(b.KeyMapper.BROWSER_EDGE,"_").concat(b.KeyMapper.OS_MAC)]={type:12,instructions:["Click on the bell icon in the website address bar","Click on Allow notifications","All Set! <b>Refresh</b> the page and you’re good to go! 🎉"]},!!e.hasOwnProperty(t)&&e[t]},D.setCbuDialogRepeatPromptDelay=function(){var e=(e=new Date).setTime(e.getTime()+6048e5);f.Storage.setConfigLocal(b.KeyMapper.NUDGEUSER_DELAY,e)},D.isCbuRepeatDelayed=function(){var e=!1,t=new Date,n=f.Storage.getConfigLocal(b.KeyMapper.NUDGEUSER_DELAY);return""!=n&&n>t.getTime()&&(e=!0,d.Helper.displayLog("Wait until convert block user prompt repeat delay expire!")),e},D.subscribeOnBlocked=function(){var t;D.isOnBlockedRegister||(D.isOnBlockedRegister=!0,t=setInterval(function(){var e;"granted"==(null===(e=window.Notification)||void 0===e?void 0:e.permission)&&(clearInterval(t),d.Helper.displayLog("User granted prompt mannually!"),D.nativeHandler())},200))},D.canSupportIOSPush=function(){return i.Notification.isWebPushEnabled&&y.Config.global.browserName==b.KeyMapper.BROWSER_SAFARI&&"16.4"<=y.Config.global.browserVer&&d.Helper.isIos()},D.IOSManifestHandler=function(){return l(this,void 0,void 0,function(){var t,n,o,i,r,a;return u(this,function(e){try{t=document.querySelector("link[rel='manifest']"),n=D.getManifestData(),o=JSON.stringify(n),i=new Blob([o],{type:"application/json"}),r=URL.createObjectURL(i),t?d.Helper.displayLog("Manifest file already exist!",t.href):((a=document.createElement("link")).rel="manifest",a.id="iz-manifest",a.href=r,document.head.appendChild(a),d.Helper.displayLog("Manifest file added by SDK"))}catch(e){d.Helper.displayLog("IOSManifestHandler error",e)}return[2]})})},D.getManifestData=function(){try{var e={name:D.siteName,display:"standalone",start_url:window.location.origin},t=document.querySelector('link[rel="shortcut icon"]')||document.querySelector('link[rel="icon"]');return t&&(e.icons=[{src:null==t?void 0:t.href,sizes:"any"}]),e}catch(e){return{}}},Object.defineProperty(D,"siteName",{get:function(){var e=window.location.hostname.split(".");return"www"===e[0]&&e.splice(0,1),null!=e&&e.pop(),e.map(function(e){return D.capitalizString(e)}).join(" ")},enumerable:!1,configurable:!0}),D.capitalizString=function(e){void 0===e&&(e="");try{if(e)return e[0].toUpperCase()+e.slice(1)}catch(e){}},D.alternateDomainJson="",D.alternateDomainIndex=0,D.permissionDomain="",D.isSyncPermissionStatus=!0,D.subscriptionOnAllow=!0,D.subscriptionSyncedFromSW=!1,D.minSWVersion="4.22",D.isUnBlockPopupInitialize=!1,D.isOnBlockedRegister=!1,D.permissionStatus="",D.subscriptionSource=0,D.syncableEvents=[,b.KeyMapper.PROMPTED,b.KeyMapper.OPTIN_SHOWN,b.KeyMapper.OPTIN_ALLOWED,b.KeyMapper.OPTIN_CLOSED,b.KeyMapper.ALREADY_DENIED],D);function D(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelEventHandler=void 0;var r,a=n(2),o=n(0),i=n(8),s=n(16),c=n(18),l=n(22),u=n(19),p=n(23);(n=r=r||{}).NOT_STARTED="NOT_STARTED",n.COMPLETED="COMPLETED",n.INPROGRESS="INPROGRESS",n.READY_TO_SHOW="READY_TO_SHOW",n.DISABLED="DISABLED";t.ChannelEventHandler=(d.event=function(e,t){var n=[a.KeyMapper.PROMPTED,a.KeyMapper.POPUP_OPEN,a.KeyMapper.OPTIN_SHOWN,a.KeyMapper.OPTIN_ALLOWED],o=[a.KeyMapper.ALREADY_GRANTED,a.KeyMapper.ALREADY_DENIED,a.KeyMapper.PROMPT_DENIED,a.KeyMapper.BROWSER_UNSUPPORTED,a.KeyMapper.PROMPT_ALLOWED,a.KeyMapper.OPTIN_CLOSED,a.KeyMapper.NOTIFICATION_DISABLED,a.KeyMapper.PROMPT_CLOSED,a.KeyMapper.REPEAT_DELAY],i=[a.KeyMapper.NEWSHUB_CLOSED,a.KeyMapper.NEWSHUB_FAILED];"webPush"==e&&(-1<o.indexOf(t)&&(d.channelStatus.webPush=r.COMPLETED),-1<n.indexOf(t)&&(d.channelStatus.webPush=r.INPROGRESS)),"messenger"==e&&(t!=a.KeyMapper.SUBSCRIBED&&t!=a.KeyMapper.PROMPT_CLOSED||(d.channelStatus.messenger=r.COMPLETED),t==a.KeyMapper.MESSENGER_READY&&(d.channelStatus.messenger=r.READY_TO_SHOW),t==a.KeyMapper.MESSENGER_READY_SHOW&&(d.channelStatus.messenger=r.INPROGRESS,this.handleMessengerInterval())),"email"==e&&(t==a.KeyMapper.EMAIL_READY&&(this.handleEmailInterval(),d.channelStatus.email=r.READY_TO_SHOW),t==a.KeyMapper.EMAIL_INPROGRESS&&(d.channelStatus.email=r.INPROGRESS),t==a.KeyMapper.EMAIL_CLOSED&&(d.channelStatus.email=r.COMPLETED),t==a.KeyMapper.EMAIL_DISABLED&&(d.channelStatus.email=r.DISABLED)),"newsHub"==e&&(-1<i.indexOf(t)&&(d.channelStatus.newsHub=r.COMPLETED),t==a.KeyMapper.NEWSHUB_ANIMATIONEND&&d.channelStatus.newsHub==r.INPROGRESS&&(d.channelStatus.newsHub=r.COMPLETED),t==a.KeyMapper.NEWSHUB_OPEN&&(d.channelStatus.newsHub=r.INPROGRESS),t==a.KeyMapper.NEWSHUB_READY&&this.handleNewsHubInterval()),"exitIntent"==e&&(t==a.KeyMapper.EXITINTENT_SHOWN&&(d.channelStatus.exitIntent=r.INPROGRESS),t==a.KeyMapper.EXITINTENT_CLOSED&&(d.channelStatus.exitIntent=r.COMPLETED)),"stickyBar"==e&&(t==a.KeyMapper.STICKYBAR_READY_SHOW&&(d.channelStatus.stickyBar=r.READY_TO_SHOW),t==a.KeyMapper.STICKYBAR_SHOWN&&(d.channelStatus.stickyBar=r.INPROGRESS),t==a.KeyMapper.STICKYBAR_CLOSED&&(d.channelStatus.stickyBar=r.COMPLETED),t!=a.KeyMapper.STICKYBAR_READY_SHOW&&t!=a.KeyMapper.STICKYBAR_SHOWN||d.handleStickyBarInterval(),this.handleNewsHubVisibiltyOnStickyBarScroll(t)),"articleShare"==e&&(t==a.KeyMapper.ARTICLESHARE_READY_SHOW&&(d.handlerArticleShareInterval(),d.channelStatus.articleShare=r.READY_TO_SHOW),t==a.KeyMapper.ARTICLESHARE_SHOWN&&(d.channelStatus.articleShare=r.INPROGRESS),t==a.KeyMapper.ARTICLESHARE_CLOSED&&(d.channelStatus.articleShare=r.COMPLETED)),"adblock"==e&&(t==a.KeyMapper.ADBLOCK_READY_SHOW?this.handleAdblockInterval():t==a.KeyMapper.ADBLOCK_READY_SHOW&&(d.channelStatus.adblock=r.COMPLETED))},d.handleAdblockInterval=function(){var e=setInterval(function(){d.channelStatus.webPush!=r.COMPLETED&&d.channelStatus.webPush!=r.DISABLED||(clearInterval(e),d.channelStatus.adblock=r.INPROGRESS,p.AdBlockRecovery.showPopup())})},d.handleNewsHubInterval=function(){var e=setInterval(function(){d.channelStatus.messenger,(d.channelStatus.webPush!=r.NOT_STARTED&&d.channelStatus.webPush!=r.INPROGRESS&&d.channelStatus.email!=r.INPROGRESS||o.Config.global.deviceType!=a.KeyMapper.DEVICE_TYPE_MOBILE)&&(d.channelStatus.webPush==r.COMPLETED&&d.channelStatus.messenger==r.READY_TO_SHOW||d.channelStatus.messenger!=r.COMPLETED&&d.channelStatus.messenger!=r.NOT_STARTED&&d.channelStatus.webPush!=r.INPROGRESS&&d.channelStatus.webPush!=r.NOT_STARTED||(d.channelStatus.exitIntent==r.INPROGRESS||o.Config.global.deviceType!=a.KeyMapper.DEVICE_TYPE_DESKTOP)&&(o.Config.global.deviceType!=a.KeyMapper.DEVICE_TYPE_MOBILE||d.channelStatus.exitIntent==r.INPROGRESS||d.channelStatus.email!=r.COMPLETED&&d.channelStatus.email!=r.DISABLED)||(clearInterval(e),d.channelStatus.newsHub=r.INPROGRESS,i.NewsHub.showNewsHubWidget()))},200)},d.handleEmailInterval=function(){var e=setInterval(function(){d.channelStatus.messenger,d.channelStatus.webPush==r.COMPLETED&&(clearInterval(e),u.Email.showEmailPrompt())},200)},d.handleMessengerInterval=function(){var e=setInterval(function(){d.channelStatus.webPush==r.INPROGRESS||d.channelStatus.newsHub==r.INPROGRESS||o.Config.global.deviceType==a.KeyMapper.DEVICE_TYPE_MOBILE&&d.channelStatus.email==r.INPROGRESS||d.channelStatus.email==r.READY_TO_SHOW||(o.Config.global.deviceType==a.KeyMapper.DEVICE_TYPE_DESKTOP&&d.channelStatus.webPush==r.COMPLETED||o.Config.global.deviceType==a.KeyMapper.DEVICE_TYPE_MOBILE&&d.channelStatus.webPush==r.COMPLETED&&(d.channelStatus.email==r.COMPLETED||d.channelStatus.email==r.DISABLED))&&(clearInterval(e),d.channelStatus.messenger=r.INPROGRESS,i.NewsHub.hideNewsHubWidget(),s.Messenger.showMessenger(),d.handleNewsHubInterval())},200)},d.handleStickyBarInterval=function(){var e=this,t=t||setInterval(function(){e.channelStatus.exitIntent!=r.NOT_STARTED&&e.channelStatus.exitIntent!=r.COMPLETED||e.channelStatus.stickyBar!=r.READY_TO_SHOW||e.channelStatus.newsHub!=r.COMPLETED||c.OnSite.isElementinViewport?e.channelStatus.exitIntent==r.INPROGRESS&&e.channelStatus.stickyBar==r.INPROGRESS?(c.OnSite.stickybarHide=!0,c.OnSite.hideStickyBar()):e.channelStatus.exitIntent==r.COMPLETED&&e.channelStatus.stickyBar==r.INPROGRESS&&(c.OnSite.stickybarHide=!1,clearInterval(t),c.OnSite.showStickyBar()):(clearInterval(t),c.OnSite.stickybarReadyToShow())},200)},d.handlerArticleShareInterval=function(){var e=setInterval(function(){d.channelStatus.exitIntent!=r.NOT_STARTED&&d.channelStatus.exitIntent!=r.COMPLETED||d.channelStatus.articleShare!=r.READY_TO_SHOW?d.channelStatus.exitIntent==r.INPROGRESS&&d.channelStatus.articleShare==r.INPROGRESS?l.ArticleShare.hideArticleShareDialog():d.channelStatus.exitIntent==r.COMPLETED&&d.channelStatus.articleShare==r.INPROGRESS&&(clearInterval(e),l.ArticleShare.showArticleShareDialog()):(clearInterval(e),l.ArticleShare.showArticleShareDialogEventHandling())},100)},d.handleNewsHubVisibiltyOnStickyBarScroll=function(e){e==a.KeyMapper.STICKYBAR_VISIBLE&&(this.channelStatus.newsHub==r.COMPLETED?(this.isNewshubHideBySticky=!0,i.NewsHub.hideNewsHubWidget()):this.channelStatus.newsHub==r.INPROGRESS&&c.OnSite.hideStickyBar()),this.channelStatus.messenger!=r.COMPLETED&&this.channelStatus.messenger!=r.NOT_STARTED||(e==a.KeyMapper.STICKYBAR_HIDDEN&&this.channelStatus.newsHub==r.COMPLETED||e==a.KeyMapper.STICKYBAR_CLOSED&&this.isNewshubHideBySticky)&&i.NewsHub.showNewsHubWidget()},d.showOSNPopup=function(){c.OnSite.triggerData.exitIntent.isHidden&&c.OnSite.exitIntentInitializeDialog(c.OnSite.triggerData.exitIntent.triggerType),c.OnSite.stickyBar.readyToShow&&c.OnSite.triggerData.stickyBar.isHidden&&this.channelStatus.stickyBar!=r.COMPLETED&&(this.channelStatus.exitIntent==r.COMPLETED||this.channelStatus.exitIntent==r.NOT_STARTED)&&(d.channelStatus.stickyBar=r.INPROGRESS,c.OnSite.showStickyBar())},d.hideOSNPopup=function(){c.OnSite.triggerData.stickyBar.isHidden=!0,this.channelStatus.exitIntent==r.INPROGRESS&&(c.OnSite.hideExitIntent(),d.channelStatus.exitIntent=r.COMPLETED,c.OnSite.triggerData.exitIntent.isHidden=!0),c.OnSite.hideStickyBar()},d.channelStatus={webPush:r.NOT_STARTED,messenger:r.NOT_STARTED,newsHub:r.NOT_STARTED,exitIntent:r.NOT_STARTED,stickyBar:r.NOT_STARTED,articleShare:r.NOT_STARTED,email:r.NOT_STARTED,adblock:r.NOT_STARTED},d.isNewshubHideBySticky=!1,d);function d(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleAnalytics=void 0;var a=n(0),n=(o.init=function(e){a.Config.ga.id=e[1],a.Config.ga.syncWebPush=1;e=e[2];e.subscriptionCallback&&"object"==typeof e.subscriptionCallback&&(a.Config.ga.subscriptionCallback=e.subscriptionCallback),e.promptDisplayCallback&&"object"==typeof e.promptDisplayCallback&&(a.Config.ga.promptDisplayCallback=e.promptDisplayCallback)},o.process=function(e){if(a.Config.ga.syncWebPush&&""!=a.Config.ga.id)try{window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)},window.gtag("js",new Date),window.gtag("config",a.Config.ga.id),window.gtag("event",e,{event_category:"izooto"})}catch(e){}},o.processNewsHub=function(e,t){var n=a.Config.ga.newsHubEvents;if(""!=a.Config.ga.id&&a.Config.ga.syncNewsHub){var o={Shown:{message:"Shown to website visitor",responsecode:1},"Widget Click":{message:"User clicked on News Hub widget",responsecode:2},"Article Clicked":{message:"User clicked on an article",responsecode:3},"Clicked Share":{message:"User clicked on Share Icon inside News Hub",responsecode:4},"Shared on":{message:"User shared article on Social",responsecode:5},Scroll:{message:"User scrolled in News Hub",responsecode:6},"Widget Close":{message:"User closed News Hub",responsecode:7}};if(0==n.length||-1!=n.indexOf(o[e].responsecode))try{var i=null!=t?"News Hub: ".concat(e," ").concat(t):"News Hub: ".concat(e),r={event_category:"News Hub",event_label:o[e].message};window.gtag("event",i,r)}catch(e){}}},o.processMessanger=function(e,t){if(a.Config.ga.syncMessenger&&""!=a.Config.ga.id)try{var n=null!=t?"Messenger Push: ".concat(e," ").concat(t):"Messenger Push: ".concat(e),o={event_category:"Messenger Push",event_label:{Impression:"Messenger opt-in shown","Repeat Impression":"Messenger opt-in shown to users 2 or more times","Send to Messenger":"User clicked on Send to Messenger in the opt-in",Dismissed:"Messenger opt-in dismissed"}[e]};window.gtag("event",n,o)}catch(e){}},o.isCallbackAllowed=function(e,t){for(var n in e){n=e[n];if("string"==typeof n&&"all"==n.toLowerCase()||n==t)return!0}return!1},o.initUsingConfig=function(){""!=a.Config.ga.id&&a.Config.ga.subscriptionCallback.push(1,2)},o);function o(){}t.GoogleAnalytics=n},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},i=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.NewsHub=void 0;var c=n(0),l=n(1),a=n(4),s=n(2),u=n(6),p=n(7),r=n(17),d=n(21),f=n(5),g=n(12),y=n(3),m=n(14);t.NewsHub=(Object.defineProperty(h,"isCrios",{get:function(){return c.Config.global.browserName==s.KeyMapper.BROWSER_CHROME&&l.Helper.isIos()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"isFxios",{get:function(){return c.Config.global.browserName==s.KeyMapper.BROWSER_FIREFOX&&l.Helper.isIos()},enumerable:!1,configurable:!0}),Object.defineProperty(h,"topOrBottomPlacement",{get:function(){return c.Config.newsHub.placement[0]?"bottom":"top"},enumerable:!1,configurable:!0}),Object.defineProperty(h,"leftOrRightPlacement",{get:function(){return c.Config.newsHub.placement[1]?"right":"left"},enumerable:!1,configurable:!0}),h.init=function(){return o(this,void 0,void 0,function(){var t=this;return i(this,function(e){if(c.Config.newsHub.status){if(c.Config.global.isFrame)return[2];if(!c.Config.newsHub.autoWidget&&!c.Config.newsHub.triggered)return[2];r.Session.isNew&&y.Storage.setConfigLocal(s.KeyMapper.CALLOUT_SHOWN,!1),l.Helper.displayLog("New Hub initiated..."),h.render().then(function(){t.nhFeed=new d.FeedHelper(h.minimumNotificationToShow),t.nhFeed.setup(),c.Config.newsHub.autoWidget||(h.showNewsHubWidget(),h.openWidget()),h.showLoader(h.minimumNotificationToShow)})}else u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_FAILED);return[2]})})},h.showEmptyNotificationMessage=function(){l.Helper.setCssPropperty("#iz-news-hub-notifications-body-container","height","100%"),document.querySelector(v.noNotification).style.display="flex",document.querySelector(v.notificationWrapperId).style.display="none"},h.showNotificationContent=function(){return o(this,void 0,void 0,function(){var t,n;return i(this,function(e){switch(e.label){case 0:return(e.trys.push([0,2,,3]),h.isNewsLoading)?[2]:(h.isNewsLoading=!0,h.showLoader(),[4,h.nhFeed.getNotifications()]);case 1:return(t=e.sent(),h.isNewsLoading=!1,n=t.data,(t=t.status)!=h.nhFeed.status.ALREADY_IN_PROGRESS&&h.hideLoader(),t==h.nhFeed.status.NO_MORE_NOTIFICATIONS&&h.showFooterMessage(),t==h.nhFeed.status.NULL_NOTIFICATION_SENT&&h.showEmptyNotificationMessage(),document.querySelector(v.notificationWrapperId)||this.isNewsContainerLoaded)?(n.forEach(function(e,t){e=h.payloadParser(e);e&&h.appendNews(e)}),[3,3]):(l.Helper.displayLog("News container not loaded!"),[2]);case 2:return n=e.sent(),l.Helper.displayLog("add news handler error:",n),[3,3];case 3:return[2]}})})},h.payloadParser=function(e){if(e&&(e.hasOwnProperty("payload")||e.hasOwnProperty("p")))try{var t=e.clickedAt;e=e.payload||e.p;var n=l.Helper.getTimeAgoStringByTimestamp(parseInt(e.ct)),o=e.ln,o=l.Helper.replaceQueryParam(o,"utm_source","izooto");return o=l.Helper.replaceQueryParam(o,"utm_content","article_click"),{id:parseInt(e.r),title:e.t,url:l.Helper.replaceQueryParam(o,"utm_medium","news_hub"),bannerImage:e.bi||e.i,createdAt:n,createdAtTimeStamp:e.ct,clickedAt:t,cid:e.id}}catch(e){l.Helper.displayLog("Payload parser error:",e)}},h.appendNews=function(n){var e,o=this,i="".concat(S,"notification-").concat(n.id),r=h.noticationHtmlElement.cloneNode(!0);r.id=i;var t,a,i="#".concat(i);for(t in n)!function(t){try{var o=r.querySelector(b+t);"bannerImage"==t?(o.style.display="none",o.src=n[t],o.onerror=function(e){try{document.querySelector("".concat(i," img")).style.display="none",document.querySelector("".concat(i," svg.no-preview")).style.display="block",l.Helper.removeHTML(document.querySelector("".concat(i," .iz-news-hub-post-icon-wrapper-loader.iz-news-hub-animated-background")))}catch(e){l.Helper.displayLog("Newshub error onError",e)}},o.onload=function(e){try{var t,n;document.querySelector("".concat(i," img")).style.display="block",l.Helper.removeHTML(document.querySelector("".concat(i," .iz-news-hub-post-icon-wrapper-loader.iz-news-hub-animated-background"))),o.height>o.width&&(t=document.querySelector("".concat(i," .iz-news-hub-customer-icon-container")),(n=h.bluredBackgroudImage.cloneNode(!0)).querySelector("image").setAttribute("href",o.src),t.appendChild(n))}catch(e){l.Helper.displayLog("Newshub error onLoad",e)}}):"title"==t?o.innerHTML=l.Helper.removeHtmlTagsFromString(n[t]):"createdAt"==t&&(o.innerText=n[t])}catch(e){l.Helper.displayLog("Error in append news payload- ".concat(t,":"),n)}}(t);null!==(e=document.querySelector("#posts-content-cotainer"))&&void 0!==e&&e.insertAdjacentHTML("beforeend",r.outerHTML),h.nhFeed.isNoNotification&&(h.nhFeed.isNoNotification=!1),h.rtlFlag&&(h.rtlFlag=!1,h.detectRTL()),null!==(e=document.querySelector(i))&&void 0!==e&&e.addEventListener("click",function(e){var t;h.closeShareTab(),o.nhFeed.setPayloadData(n.id,{clickedAt:Date.now()}),p.GoogleAnalytics.processNewsHub("Article Clicked"),l.Helper.syncClick(n,"newshub"),null!==(t=window.open(n.url,"_blank"))&&void 0!==t&&t.focus()},!1),1==c.Config.global.deviceType&&((a=document.querySelector("".concat(i," ").concat(v.sharesheetTrigger))).classList.add("share-before-desktop"),null!==(s=document.querySelector(i))&&void 0!==s&&s.addEventListener("mouseleave",function(e){a.style.visibility="hidden",h.closeShareTab()},!1),null!==(s=document.querySelector(i))&&void 0!==s&&s.addEventListener("mouseenter",function(e){a.style.visibility="visible"},!1));var s=document.querySelector("".concat(i," ").concat(v.sharesheetTrigger));null!=s&&s.addEventListener("click",function(e){var t=document.querySelector("".concat(i," ").concat(v.shareSheetTab));t&&("flex"==t.style.display?h.closeShareTab():(h.closeShareTab(),t.style.display="flex",h.addShareSheetAnimationClass(t),h.setSocialShareLink(i,n),p.GoogleAnalytics.processNewsHub("Clicked Share"))),e.stopPropagation()},!0)},h.addShareSheetAnimationClass=function(e){try{var t=0;e.querySelectorAll("svg").forEach(function(e){h.isCrios?e.style.opacity="1":(setTimeout(function(){e.style.opacity="1",e.classList.add("iz-share-icons-animation")},t),t+=50)})}catch(e){l.Helper.displayLog("Newshub animation error",e)}},h.setSocialShareLink=function(n,e){try{var t,o=h.getSharingLink(e.url);for(t in o)!function(t){var e=document.querySelector("".concat(n," ").concat(v.socialSharePrefix).concat(t));"link"==t?e.onclick=function(e){e.stopPropagation(),h.copyNewsLinkToClipboard(o[t]),p.GoogleAnalytics.processNewsHub("Shared on","copy link")}:(e.onclick=function(e){e.stopPropagation(),p.GoogleAnalytics.processNewsHub("Shared on",t)},e.href=o[t])}(t)}catch(e){l.Helper.displayLog("set social share error:",e)}},h.closeShareTab=function(){try{var e=document.querySelectorAll(v.shareSheetTab);null!=e&&e.forEach(function(e){e.style.display="none",e.querySelectorAll("svg").forEach(function(e){e.style.opacity="0",e.classList.remove("iz-share-icons-animation")})})}catch(e){l.Helper.displayLog("close action list error:",e)}},h.getSharingLink=function(e){return e=l.Helper.replaceQueryParam(e,"utm_campaign","Share"),{link:decodeURIComponent(l.Helper.replaceQueryParam(e,"utm_content","link_copy")),whatsapp:"https://api.whatsapp.com/send?text=".concat(encodeURIComponent(l.Helper.replaceQueryParam(e,"utm_content","whatsapp"))),facebook:"https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(l.Helper.replaceQueryParam(e,"utm_content","facebook"))),twitter:"https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(l.Helper.replaceQueryParam(e,"utm_content","twitter")),"&text="),mail:"mailto:[email protected]?&subject=&cc=&bcc=&body=".concat(encodeURIComponent(l.Helper.replaceQueryParam(e,"utm_content","mail"))),linkedin:"https://www.linkedin.com/shareArticle?mini=true&url=".concat(encodeURIComponent(l.Helper.replaceQueryParam(e,"utm_content","linkedin")))}},h.render=function(){return o(this,void 0,void 0,function(){return i(this,function(e){return[2,new Promise(function(t,e){var n=c.Config.newsHub.templateType,o=c.Config.newsHub.htmlVersion[n];l.Helper.displayLog("Rendering News Hub");o="https://cdn.izooto.com/newshub/widgets/".concat(n,"/v").concat(o,".html");a.HttpRequest.get(o).then(function(e){try{if(!e)return void u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_FAILED);l.Helper.addHTML("div",e,"iz-newshub-container").style.cssText="position:absolute;z-index:2147483647;",h.setMinimumNotificationToShow(),h.isNewsContainerLoaded=!0,h.animatedLoaderHtmlElement=document.querySelector(v.animatedLoader),l.Helper.removeHTML(h.animatedLoaderHtmlElement),h.bluredBackgroudImage=document.querySelector("."+S+"blur-image-container"),l.Helper.removeHTML(h.bluredBackgroudImage),h.noticationHtmlElement=document.querySelector("."+S+"notification"),l.Helper.removeHTML(h.noticationHtmlElement),h.footerTextElement=document.querySelector("#"+S+"end-text"),l.Helper.removeHTML(h.footerTextElement),h.webPushHandler(),h.applyConfigStyle();try{document.querySelector("."+S+"branding-text").href="https://www.izooto.com/campaign/getting-started-with-news-hub-izooto?utm_source=referral&utm_medium=news_hub&utm_campaign="+c.Config.notification.siteUrl}catch(e){l.Helper.displayLog("newshub branding hide error")}h.attachEventListner(),t(1)}catch(e){u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_FAILED),l.Helper.displayLog("Error while rendering newshub : ",e)}})})]})})},h.attachEventListner=function(){var e,t;try{var n=document.querySelector("#"+S+"posts-main-container");n.addEventListener("scroll",function(){n.scrollHeight-50<n.scrollTop+n.clientHeight&&h.showNotificationContent()}),document.querySelectorAll("".concat(v.triggerFloating," , ").concat(v.triggerSticky)).forEach(function(e){e.addEventListener("click",function(e){h.triggerClickHandler()})}),null!==(e=document.querySelector(v.closeButton))&&void 0!==e&&e.addEventListener("click",h.closeWidget),null!==(t=document.querySelector("."+S+"copyclose-button"))&&void 0!==t&&t.addEventListener("click",function(){document.querySelector("#"+S+"copied-main").style.display="none"})}catch(e){l.Helper.displayLog("Error while attaching event listner",e)}},h.triggerClickHandler=function(){h.isNewsHubOpened?h.closeWidget():c.Config.newsHub.callOut?(!h.isCallOutStart&&r.Session.isNew||h.isCallOutClose)&&(h.openWidget(),h.widgetClicked=!0,1==c.Config.newsHub.designType&&h.stopWiggleAnimation(),h.rippleAnimation.hide()):h.openWidget()},h.applyConfigStyle=function(){try{c.Config.newsHub.title&&document.querySelectorAll("."+S+"dynamic-title").forEach(function(e){return e.innerHTML=c.Config.newsHub.title.slice(0,20)}),h.triggerButtonVisibiltyHandler(),1==c.Config.newsHub.designType&&2==c.Config.newsHub.templateType?l.Helper.addClass(v.newsHubCotainerId,"".concat(S).concat(h.topOrBottomPlacement,"-").concat(h.leftOrRightPlacement)):"left"==h.leftOrRightPlacement&&l.Helper.addClass(v.newsHubCotainerId,S+"notification-container-left"),document.documentElement.style.setProperty("--ripple-color-floating-bell",c.Config.newsHub.mainColor),u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_READY)}catch(e){l.Helper.displayLog("Error while applying config:",e)}},h.bellWigglehandler=function(){try{var e,t,n;1!=c.Config.newsHub.designType||1!=c.Config.newsHub.iconType||r.Session.isNew||(e=document.querySelector(v.iconContainer),t=document.querySelector("#iz-news-hub-bell-group"),n=document.querySelector("#iz-news-hub-bell-clapper"),e.addEventListener("animationend",function(){setTimeout(function(){h.startWiggleAnimation(),t.addEventListener("animationend",function(){t.classList.remove("iz-news-hub-bell-group"),n.classList.remove("iz-news-hub-bell-clapper")})},1500)},{once:!0}))}catch(e){l.Helper.displayLog("Error bell wiggling on page refresh:",e)}},h.triggerCalloutAnimation=function(){1==c.Config.newsHub.designType?(h.bellAnimationHandler(),h.rippleAnimation.show()):2==c.Config.newsHub.designType&&h.stickyAnimationHandler()},h.triggerButtonVisibiltyHandler=function(){try{var e,t,n,o,i,r=document.querySelector(v.triggerSticky),a=document.querySelector(v.triggerFloating);r.style.display="none",a.style.display="none",c.Config.newsHub.autoWidget&&(2==c.Config.newsHub.designType?(r.style.display="flex",c.Config.newsHub.placement[1]||r.classList.add(S+"sidebar-container-left")):(a.style.display="flex",e=c.Config.newsHub.placement[0]?"bottom":"top",t=c.Config.newsHub.placement[1]?"right":"left",n="".concat(S,"floating-icon-container-").concat(e,"-").concat(t),a.classList.contains(n)||a.classList.add(n)),setTimeout(function(){var e;null!==(e=document.querySelector("".concat(v.triggerFloating," ").concat(v.mainIcon)))&&void 0!==e&&e.classList.add("izooto-news-hub-swing-animation")},1e3),1==c.Config.newsHub.iconType?document.querySelectorAll(v.mainIcon).forEach(function(e){e.style.display="none"}):(1==c.Config.newsHub.designType&&(document.querySelector(v.bellIcon).style.display="none"),2==c.Config.newsHub.designType&&document.querySelectorAll("#iz-newshub-bell-svg").forEach(function(e){e.style.display="none"}),o="https://cdn.izooto.com/newshub/icons/".concat(c.Config.newsHub.iconType,".svg"),document.querySelectorAll(v.mainIcon).forEach(function(e){e.src=o}))),c.Config.newsHub.mainColor&&(i=document.querySelector("#".concat(S,"sticky-sidebar-dummy-text")),document.querySelector("#"+S+"title-container").style.backgroundColor=c.Config.newsHub.mainColor,r.style.backgroundColor=c.Config.newsHub.mainColor,i.style.backgroundColor=c.Config.newsHub.mainColor,a.querySelector("#"+S+"icon-container").style.backgroundColor=c.Config.newsHub.mainColor,1==c.Config.newsHub.iconType&&(document.querySelector("#iz-news-hub-bell-clapper").style.fill=c.Config.newsHub.mainColor,document.querySelector(".iz-newsHub-bell-shell").style.fill=c.Config.newsHub.mainColor)),c.Config.branding||(document.querySelector("."+S+"header-branding-text").style.display="none")}catch(e){l.Helper.displayLog("Error while applying config:",e)}},h.getAnimationProperty=function(e){var t=document.querySelector(v.newsHubCotainerId),n={animationDirection:"open"==e?"normal":"reverse"};return 1==c.Config.newsHub.templateType||2==c.Config.newsHub.designType?(null!=t&&t.classList.add("izootoSlideAnimation"),n.animationClassName="izooto-slide-".concat("open"==e?"in":"out","-").concat(h.leftOrRightPlacement,"-animation")):n.animationClassName="".concat(S,"scale-").concat(h.topOrBottomPlacement,"-").concat(h.leftOrRightPlacement),n},h.openWidget=function(){var e=(t=h.getAnimationProperty("open")).animationClassName,t=t.animationDirection;document.documentElement.style.setProperty("--direction",t),h.isNewsContainerLoaded&&(h.isDataLoaded||(h.isDataLoaded=!0,h.showNotificationContent().then(function(){h.hideNewIndicator()})),(t=document.querySelector(v.newsHubCotainerId)).style.display="flex",l.Helper.onAnimationOnEnd(t,e,!0).then(function(){return h.isNewsHubOpened=!0}),u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_OPEN),h.isGAEventSent.open||(h.isGAEventSent.open=!0,p.GoogleAnalytics.processNewsHub("Widget Click")),h.syncEventsWithAPI("syncNewshubOpen","wopen"),c.Config.newsHub.ads&&0==h.adLoaded&&(h.adLoaded=!0,g.AdManager.loadNewshubAd()))},h.closeWidget=function(){var e=(t=h.getAnimationProperty("close")).animationClassName,t=t.animationDirection;document.documentElement.style.setProperty("--direction",t),h.closeShareTab();var n=document.querySelector(v.newsHubCotainerId);l.Helper.onAnimationOnEnd(n,e,!0).then(function(){h.isNewsHubOpened=!1,n.style.display="none",u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_CLOSED)}),h.isGAEventSent.close||(h.isGAEventSent.close=!0,p.GoogleAnalytics.processNewsHub("Widget Close"))},h.setElmStyles=function(){try{var e=document.querySelector("#iz-news-hub-sticky-sidebar");c.Config.newsHub.placement[1]?(e.style.left="unset",e.style.right="-"+(e.clientWidth/2-e.clientHeight/2)+"px"):(e.clientWidth,e.clientHeight,e.style.right="unset",e.style.left="-"+(e.clientWidth/2-e.clientHeight/2)+"px")}catch(e){}},h.copyNewsLinkToClipboard=function(e){try{h.closeShareTab();var t=document.querySelector("#"+S+"copied-main");if(clearTimeout(h.copiedTimeoutInstance),t.style.display="block",h.copiedTimeoutInstance=setTimeout(function(){t.style.display="none"},3e3),!navigator.clipboard){var n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy");n.remove()}catch(e){l.Helper.displayLog("Fallback: Oops, unable to copy",e)}return}navigator.clipboard.writeText(e).then(function(){},function(e){l.Helper.displayLog("Async: Could not copy text: ",e)})}catch(e){l.Helper.displayLog("Error: Could not copy text: ",e)}},h.showLoader=function(e){var t;void 0===e&&(e=1);for(var n=1;n<=e;n++)null!==(t=document.querySelector("#posts-content-cotainer"))&&void 0!==t&&t.insertAdjacentHTML("beforeend",h.animatedLoaderHtmlElement.outerHTML)},h.hideLoader=function(){document.querySelectorAll(v.animatedLoader).forEach(function(e){e.parentNode.removeChild(e)})},h.showFooterMessage=function(){var e,t,n;try{if(h.nhFeed.isNoNotification)return;null!==(e=document.querySelector(v.notificationWrapperId))&&void 0!==e&&e.appendChild(h.footerTextElement),1==c.Config.newsHub.templateType||(n=l.Helper.getDomElement(v.alertContainer),null!==(t=document.querySelector(v.notificationWrapperId))&&void 0!==t&&t.appendChild(n)),h.footerTextElement.style.display="block"}catch(e){}},h.detectRTL=function(){var e=document.querySelector("."+S+"customer-icon-container");15<e.offsetLeft&&(e.offsetLeft,document.querySelector("#"+S+"main-container").setAttribute("izdirection","rtl"))},h.showNewsHubWidget=function(){try{if(h.isNewsHubOpened||!h.isNewsContainerLoaded)return;l.Helper.showElement("#iz-news-hub-main-container"),h.syncShownEvent(),l.Helper.displayLog("News hub widget shown"),h.callOutHandler(),h.setElmStyles()}catch(e){}},h.callOutHandler=function(){var e,t;h.isCalloutShown||(h.isCalloutShown=!0,e=c.Config.newsHub.callOut&&!h.isCrios,t=y.Storage.getConfigLocal(s.KeyMapper.CALLOUT_SHOWN),r.Session.isNew||!1===t?(y.Storage.removeConfigLocal(s.KeyMapper.CALLOUT_SHOWN),h.loadLatestData().then(function(){e?(h.triggerCalloutAnimation(),h.bellWigglehandler()):(h.showNewIndicator(),u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_ANIMATIONEND))}).catch(console.log)):(h.showNewIndicator(),u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_ANIMATIONEND)))},h.showNewIndicator=function(){setTimeout(function(){var e=y.Storage.getConfigLocal(s.KeyMapper.NEWSHUB_LASTEST_NOTIFICATION),t=y.Storage.getConfigLocal(s.KeyMapper.NEWSHUB_LATEST_OPEN_NOTIFICATION);""==e||""!=t&&e==t||h.createIndicatorContainer()},1e3)},h.createIndicatorContainer=function(){try{var e=1==c.Config.newsHub.designType?"#iz-news-hub-new-indicator-floating":"#iz-news-hub-new-indicator-sidebar";l.Helper.showElement(e)}catch(e){}},h.hideNewIndicator=function(){var e=1==c.Config.newsHub.designType?"#iz-news-hub-new-indicator-floating":"#iz-news-hub-new-indicator-sidebar";l.Helper.hideElement(e)},h.updateLatestNotificationValue=function(){var e=y.Storage.getConfigLocal(s.KeyMapper.NEWSHUB_LASTEST_NOTIFICATION),t=y.Storage.getConfigLocal(s.KeyMapper.NEWSHUB_LATEST_OPEN_NOTIFICATION);""!=e&&""!=t&&e!=t&&y.Storage.setConfigLocal(s.KeyMapper.NEWSHUB_LASTEST_NOTIFICATION,t)},h.hideNewsHubWidget=function(){try{if(h.isNewsHubOpened||!h.isNewsContainerLoaded)return;l.Helper.hideElement("#iz-news-hub-main-container"),h.shownTimeoutInstance=clearTimeout(h.shownTimeoutInstance),l.Helper.displayLog("News hub widget hidden")}catch(e){}},h.syncShownEvent=function(){h.isGAEventSent.shown||!c.Config.newsHub.autoWidget||h.shownTimeoutInstance||(h.shownTimeoutInstance=setTimeout(function(){h.isGAEventSent.shown=!0,p.GoogleAnalytics.processNewsHub("Shown"),h.syncNewsHubImp||h.syncEventsWithAPI("syncNewshubView","wview")},5e3))},h.syncEventsWithAPI=function(e,t){t={pid:c.Config.client,bkey:c.Config.UUID,op:t,btype:c.Config.global.browserType,dtype:c.Config.global.deviceType,os:c.Config.global.os,bver:c.Config.global.browserVer},e=l.Helper.getEndpoint(e);a.HttpRequest.postForm(e,t,!0).then(function(){"Api synced successfully with ".concat(c.Config.brandingPartner)}).catch(function(e){})},h.showCallout=function(){try{h.isCallOutStart=!0;var e=1==c.Config.newsHub.designType?document.querySelector("#".concat(S,"main-container #").concat(S,"icon-discoverability")):document.querySelector(".".concat(S,"stickybar-callout"));h.calloutHtml=e.cloneNode(!0),e.style.visibility="hidden",!0===g.AdManager.isCallOutAds()?g.AdManager.loadCallOutAds().then(function(){e.style.visibility="visible",h.callOutAdSuccess(),1==c.Config.newsHub.designType?h.crossIcon().show():h.applyConfigStyleOnStickyCallOut()}).catch(function(e){h.getLatestData()}):h.getLatestData(),h.callOutAnimationHandler(e),e.style.display="flex"}catch(e){l.Helper.displayLog("Show callout error",e)}},h.callOutAnimationHandler=function(e){2==c.Config.newsHub.designType?e.classList.add(c.Config.newsHub.placement[1]?"iz-news-hub-stickybarCallout-slideIn-right":"iz-news-hub-stickybarCallout-slideIn-left"):(h.rippleAnimation.hide(),e.classList.add(c.Config.newsHub.placement[1]?"iz-news-hub-slideInRight":"iz-news-hub-slideInLeft"))},h.loadLatestData=function(){return new Promise(function(t,n){h.loadLatestNotificationForCallout().then(function(e){h.latestNotificationData=e,t(!0)}).catch(function(e){n(!(h.latestNotificationData={}))})})},h.getLatestData=function(){try{if(0==Object.keys(h.latestNotificationData).length)return;var e=1==c.Config.newsHub.designType?document.querySelector("#".concat(S,"main-container #").concat(S,"icon-discoverability")):document.querySelector(".".concat(S,"stickybar-callout"));e.style.visibility="visible",1==c.Config.newsHub.designType&&h.crossIcon().show();var t=h.payloadParser(h.latestNotificationData);!0===g.AdManager.isCallOutAds()&&(e.innerHTML=h.calloutHtml.innerHTML),h.setCallOutNotification(t,e),h.calloutEventHandler(t)}catch(e){}},h.callOutAdSuccess=function(){var e=document.querySelector("#iz-nhdis-ads"),t=(c.Config.newsHub.placement[1],"margin-inline-start: -15px;");2==c.Config.newsHub.designType&&(t=c.Config.newsHub.placement[1]?"margin-inline-start: 0px;":"margin-inline-start: -9px;"),e.setAttribute("style","transform: scale(0.9);".concat(t)),h.calloutEventHandler(!1)},h.calloutEventHandler=function(t){try{var e=1==c.Config.newsHub.designType?document.querySelector("#".concat(S,"main-container #").concat(S,"icon-discoverability")):document.querySelector("#".concat(S,"icon-sticky-discoverability"));t&&e.addEventListener("click",function(e){t.url&&window.open(t.url),l.Helper.syncClick(t,"newshub"),h.CalloutHover=!1,h.hideCallout(),e.stopPropagation()},!1),c.Config.global.deviceType==s.KeyMapper.DEVICE_TYPE_DESKTOP&&(e.addEventListener("mouseenter",function(e){h.CalloutHover=!0}),e.addEventListener("mouseleave",function(e){h.CalloutHover=!1})),(1==c.Config.newsHub.designType?document.querySelector(v.triggerFloating):document.querySelector(".iz-news-hub-stickybar-callout-close")).addEventListener("click",function(){1==c.Config.newsHub.designType?h.hideCallout():h.hideStickyCallout()})}catch(e){l.Helper.displayLog("callout event handling error",e)}},h.startWiggleAnimation=function(){try{var e=document.querySelector("#iz-news-hub-bell-group"),t=document.querySelector("#iz-news-hub-bell-clapper");if(e.classList.add("iz-news-hub-bell-group"),t.classList.add("iz-news-hub-bell-clapper"),h.wiggleIntervalId)return;h.wiggleIntervalId=setInterval(function(){e.classList.add("iz-news-hub-bell-group"),t.classList.add("iz-news-hub-bell-clapper")},4e3)}catch(e){l.Helper.displayLog("Start wiggle animation error",e)}},h.stopWiggleAnimation=function(){h.wiggleIntervalId=window.clearInterval(h.wiggleIntervalId)},h.setCallOutNotification=function(e,t){try{h.applyConfigStyleOnStickyCallOut();var n,o=l.Helper.getDomElement(".".concat(S,"icon-discoverability-text"),t),i=l.Helper.getDomElement(".".concat(S,"icon-discoverability-img-wrapper img"),t),r=l.Helper.getDomElement(".".concat(S,"icon-discoverability-img-wrapper"),t);e.bannerImage?(n=e.bannerImage,i.src=n,h.imagebgBlur(r,i),i.onerror=function(e){h.removeImageWhiteSpace(t)}):h.removeImageWhiteSpace(t),o.innerHTML=e.title,c.Config.newsHub.placement[1]||"rtl"!=document.dir||(o.style.direction="ltr")}catch(e){l.Helper.displayLog("Set callout notification error",e)}},h.removeImageWhiteSpace=function(e){var t=document.querySelector("#"+S+"icon-discoverability");l.Helper.getDomElement(".".concat(S,"icon-discoverability-img-wrapper"),e).style.display="none",c.Config.newsHub.placement[1]||(t.style.paddingRight="0px")},h.imagebgBlur=function(n,o){o.onload=function(e){try{var t;o.style.display="block",(o.naturalHeight>o.naturalWidth||o.naturalWidth==o.naturalHeight)&&((t=h.bluredBackgroudImage.cloneNode(!0)).querySelector("image").setAttribute("href",o.src),n.appendChild(t),o.style.objectFit="contain")}catch(e){l.Helper.displayLog("Newshub discoverability image error onLoad",e)}}},h.crossIcon=function(){var e=1==c.Config.newsHub.iconType?v.bellIcon:v.mainIcon;return{show:function(){l.Helper.hideElement(e),l.Helper.showElement(v.crossIcon),l.Helper.addClass(v.triggerFloating,"iz-news-hub-cross-visible")},hide:function(){l.Helper.showElement(e),l.Helper.hideElement(v.crossIcon),l.Helper.removeClass(v.triggerFloating,"iz-news-hub-cross-visible")}}},h.hideCallout=function(e){try{var t=document.querySelector(v.notificationCallout);document.querySelector(v.triggerFloating).removeEventListener("click",h.hideCallout);var n="iz-news-hub-slideInLeft",o="iz-news-hub-slideOutLeft";c.Config.newsHub.placement[1]&&(n="iz-news-hub-slideInRight",o="iz-news-hub-slideOutRight"),t.classList.replace(n,o),h.crossIcon().hide(),t.addEventListener("animationend",function(){t.style.display="none",u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_ANIMATIONEND),h.rippleAnimation.show()},{once:!0}),setTimeout(function(){h.widgetClicked||h.startWiggleAnimation()},3e3),h.isCallOutClose=!0,null!=e&&e.stopPropagation()}catch(e){l.Helper.displayLog("Callout hide error",e)}},h.hideStickyCallout=function(e){try{var t=document.querySelector(".".concat(S,"stickybar-callout")),n=document.querySelector("#".concat(S,"sticky-sidebar")),o=c.Config.newsHub.placement[1]?"iz-news-hub-stickybar-slideIn-right":"iz-news-hub-stickybar-slideIn-left",i=c.Config.newsHub.placement[1]?"iz-news-hub-stickybar-slideOut-right":"iz-news-hub-stickybar-slideOut-left",r="iz-news-hub-stickybarCallout-slideIn-left",a="iz-news-hub-stickybarCallout-slideOut-left";c.Config.newsHub.placement[1]&&(r="iz-news-hub-stickybarCallout-slideIn-right",a="iz-news-hub-stickybarCallout-slideOut-right"),t.classList.replace(r,a),t.addEventListener("animationend",function(){t.style.display="none",u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_ANIMATIONEND),n.classList.replace(i,o)}),h.isCallOutClose=!0,null!=e&&e.stopPropagation()}catch(e){l.Helper.displayLog("Callout hide error",e)}},h.stickyAnimationHandler=function(){h.isCallOutClose=!1;var e=document.querySelector("#".concat(S,"sticky-sidebar")),t=c.Config.newsHub.placement[1]?"iz-news-hub-stickybar-slideIn-right":"iz-news-hub-stickybar-slideIn-left",n=c.Config.newsHub.placement[1]?"iz-news-hub-stickybar-slideOut-right":"iz-news-hub-stickybar-slideOut-left";e.classList.add(t),e.addEventListener("animationend",function(){setTimeout(function(){e.classList.replace(t,n),h.widgetClicked?e.classList.remove(n):(h.showCallout(),h.calloutCloseHandler())},3e3)},{once:!0})},h.applyConfigStyleOnStickyCallOut=function(){2==c.Config.newsHub.designType&&(document.querySelector(".iz-news-hub-stickybar-callout-close").style.backgroundColor=c.Config.newsHub.mainColor)},h.bellAnimationHandler=function(){try{var e,t,n;h.isCallOutClose=!1,1==c.Config.newsHub.iconType?(e=document.querySelector(v.iconContainer),t=document.querySelector("#iz-news-hub-bell-group"),n=document.querySelector("#iz-news-hub-bell-clapper"),e.addEventListener("animationend",function(){setTimeout(function(){t.classList.add("iz-news-hub-bell-group"),n.classList.add("iz-news-hub-bell-clapper"),t.addEventListener("animationend",function(){t.classList.remove("iz-news-hub-bell-group"),n.classList.remove("iz-news-hub-bell-clapper")})},1500)},{once:!0}),t.addEventListener("animationend",function(){setTimeout(function(){h.widgetClicked||(h.showCallout(),h.calloutCloseHandler())},1500)},{once:!0})):document.querySelector("#izooto-news-hub-swing-animation").addEventListener("animationend",function(){setTimeout(function(){h.widgetClicked||(h.showCallout(),h.calloutCloseHandler())},1500)},{once:!0})}catch(e){l.Helper.displayLog("bell animate handler error",e)}},h.calloutCloseHandler=function(){setTimeout(function(){var e=setInterval(function(){h.CalloutHover||(clearInterval(e),1==c.Config.newsHub.designType?h.hideCallout():h.hideStickyCallout())},1e3)},1e3*c.Config.newsHub.callOutTimeout)},h.loadLatestNotificationForCallout=function(){return o(this,void 0,void 0,function(){return i(this,function(e){return[2,new Promise(function(i,r){var e="https://nh.iz.do/nh/".concat(c.Config.hashFileName,"/latest.json");a.HttpRequest.get(e).then(function(e){var t;try{var n=l.Helper.parseToJSON(e),o=null===(t=n.p)||void 0===t?void 0:t.r;y.Storage.setConfigLocal(s.KeyMapper.NEWSHUB_LASTEST_NOTIFICATION,o),n.hasOwnProperty("p")&&n.p.t?i(n):(u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_ANIMATIONEND),r(!1))}catch(e){u.ChannelEventHandler.event("newsHub",s.KeyMapper.NEWSHUB_ANIMATIONEND),r(!1)}}).catch(function(e){r(!1),l.Helper.displayLog("Load latest notification error",e)})})]})})},h.sendEvent=function(e){if(c.Config.newsHub.status)switch(e){case s.KeyMapper.PROMPT_ALLOWED:case s.KeyMapper.ALREADY_GRANTED:case s.KeyMapper.PROMPT_DENIED:case s.KeyMapper.ALREADY_DENIED:h.webPushHandler();break;case s.KeyMapper.OPTIN_SHOWN:h.isNotificationOptinShowing=!0,h.webPushHandler();break;case s.KeyMapper.OPTIN_CLOSED:h.isNotificationOptinShowing=!1,h.webPushHandler()}},h.webPushHandler=function(){var e=f.NotificationHelper.getGIFUrl();if(m.Notification.isWebPushEnabled&&c.Config.notification.isSupported&&c.Config.newsHub.nudgeStatus&&h.isNewsContainerLoaded&&e)switch(null===(e=null===window||void 0===window?void 0:window.Notification)||void 0===e?void 0:e.permission){case"default":h.isNotificationOptinShowing?h.hideNudgeBar():h.webPushPermissionDefaultHandler();break;case s.KeyMapper.PROMPT_DENIED:h.webPushPermissionDeniedHandler();break;case"granted":h.hideNudgeBar()}},h.webPushPermissionDefaultHandler=function(){l.Helper.showElement(".".concat(S,"noti-default-wrapper"),!1),l.Helper.hideElement(".".concat(S,"noti-blocked-wrapper"));var e=document.querySelector(".".concat(S,"noti-default-wrapper button"));null!=e&&e.addEventListener("click",function(){f.NotificationHelper.subscriptionSource=1,f.NotificationHelper.nativeHandler()})},h.webPushPermissionDeniedHandler=function(){var e,t;try{var n=f.NotificationHelper.getGIFUrl();0!=n&&(l.Helper.hideElement(".".concat(S,"noti-default-wrapper")),l.Helper.showElement(".".concat(S,"noti-blocked-wrapper"),!1),document.querySelector(".iz-news-hub-noti-blocked-wrapper img").src=n,null!==(e=document.querySelector(".".concat(S,"noti-blocked-wrapper .know-more-txt")))&&void 0!==e&&e.addEventListener("mouseenter",function(){f.NotificationHelper.subscriptionSource=2})),f.NotificationHelper.subscribeOnBlocked(),null!==(t=l.Helper.getDomElement("#".concat(S,"notifications-body-container")))&&void 0!==t&&t.classList.add("iz-news-hub-unsubscribe")}catch(e){}},h.hideNudgeBar=function(){l.Helper.hideElement(".".concat(S,"noti-blocked-wrapper")),l.Helper.hideElement(".".concat(S,"noti-default-wrapper"))},h.setMinimumNotificationToShow=function(){var e;1==c.Config.newsHub.templateType&&(e=parseInt(window.getComputedStyle(l.Helper.getDomElement(v.notificationWrapperId)).height),h.minimumNotificationToShow=Math.ceil(e/106+1)||12)},h.minimumNotificationToShow=6,h.isNewsLoading=!1,h.isNewsContainerLoaded=!1,h.isNewsHubOpened=!1,h.lastMarkAllAsRead=!1,h.isDataLoaded=!1,h.rtlFlag=!0,h.isCallOutClose=!0,h.CalloutHover=!1,h.isCalloutShown=!1,h.isCallOutStart=!1,h.widgetClicked=!1,h.syncNewsHubImp=!1,h.adLoaded=!1,h.calloutHtml="",h.isNotificationOptinShowing=!1,h.isGAEventSent={shown:!1,open:!1,close:!1},h.rippleAnimation={show:function(){var e;return null===(e=l.Helper.getDomElement(v.iconContainer))||void 0===e?void 0:e.classList.add(v.rippleBell)},hide:function(){var e;return null===(e=l.Helper.getDomElement(v.iconContainer))||void 0===e?void 0:e.classList.remove(v.rippleBell)}},h);function h(){}var S="iz-news-hub-",b="."+S+"notification-",v={newsHubCotainerId:"#".concat(S,"notification-container"),noNotification:"#".concat(S,"no-notifications-container"),notificationWrapperId:"#".concat(S,"posts-main-container"),triggerSticky:"#".concat(S,"sticky-sidebar"),triggerFloating:"#".concat(S,"discovr-outer-wrapper"),mainIcon:".".concat(S,"main-icon"),iconContainer:"#".concat(S,"icon-container"),floatingIcon:"#".concat(S,"floating-icon"),closeButton:".".concat(S,"close-news-hub-btn"),animatedLoader:"".concat(b,"loader"),sharesheetTrigger:".".concat(S,"share-before"),shareSheetTab:".".concat(S,"share-icons"),socialSharePrefix:".".concat(S,"social-share-"),notificationCallout:"#".concat(S,"icon-discoverability"),crossIcon:"#".concat(S,"cross-icon"),bellIcon:".".concat(S,"bell"),rippleBell:"".concat(S,"ripple-bell"),alertContainer:".".concat(S,"alerts-container")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var i=n(0),r=n(1),a=n(2),n=(s.setCookie=function(e,t,n){void 0===n&&(n=i.Config.global.cookieExpiryDays);var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);o="expires="+o.toUTCString();document.cookie=e+"="+t+";path=/;"+i.Config.global.cookieDomain+o+";"+i.Config.global.cookieSameSite},s.getCookie=function(e){try{for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var i=n[o];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return""},s.setWpCookie=function(e,t){var n,o;1==window.is_wp&&("object"==typeof window._izootoModule&&window._izootoModule.hasOwnProperty("swPath")?(o={},n=s.getCookie(a.KeyMapper.WP_COOKIE),(o=(o=r.Helper.parseToJSON(n))||{})[e]=t,o=encodeURI(JSON.stringify(o)),s.setCookie(a.KeyMapper.WP_COOKIE,o)):s.setLegacyCookie(e,t))},s.removeCookie=function(e){document.cookie="".concat(e,"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; ").concat(i.Config.global.cookieSameSite)},s.setLegacyCookie=function(e,t){switch(e){case"bType":case"dType":var n=JSON.stringify({dtype:i.Config.global.deviceType,btype:i.Config.global.browserType});s.setCookie("bddata",n);break;case"evtTrk":s.setCookie("evtrk",i.Config.notification.evtTracking);break;case"pushToken":s.setCookie("iztoken",t)}},s);function s(){}t.CookieStorage=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Queue=void 0;var o=n(5),i=n(0),r=n(1),a=n(13),s=n(7),c=n(3),l=n(2),u=n(16),p=n(8),d=n(24),f=n(19),n=(g.init=function(){"[object Array]"==Object.prototype.toString.call(window._izq)?g.readSavedPreferences():window._izq=[],window._izq.push=function(e){if(null!=e[0])return g.process(e)}},g.sync=function(e){if(void 0===e&&(e=!0),r.Helper.displayLog("Syncing queue.."),!(window._izq.length<1)){for(var t=[],n=0;n<window._izq.length;n++)t.push(window._izq[n]);if(0<t.length)if(e)for(n=t.length-1;0<=n;n--)null!=t[n]&&(t[n][0],this.process(t[n]),window._izq.splice(n,1));else for(n=t.length-1;0<=n;n--)null!=t[n]&&-1==i.Config.store.subscriptionBasedEventNameList.indexOf(t[n][0])?(t[n][0],this.process(t[n]),window._izq.splice(n,1)):r.Helper.displayLog("Sync later queue item",t[n][0])}},g.process=function(e){try{if("debug"===e[0]&&1==e[1])return void a.Debugger.init();if(1==i.Config.izootoStatus){if(1==i.Config.notification.gdprPrompt.status&&0==i.Config.notification.isGdprAllowed&&this.isValidQueueForGdpr(e[0]))return void r.Helper.displayLog("Blocked due to GDPR is disallowed : ",e[0]);if(3==o.NotificationHelper.getPermissionStatusFromStorage()&&-1<i.Config.store.subscriptionBasedEventNameList.indexOf(e[0]))return void r.Helper.displayLog("Blocked due to soft unsubscribe : ",e[0]);if(!o.NotificationHelper.isSubscriptionExist()&&-1<i.Config.store.subscriptionBasedEventNameList.indexOf(e[0]))return void r.Helper.displayLog("Blocked => Subscription not found: ",e[0]);if("event"===e[0]&&void 0!==e[1]&&"string"==typeof e[1]&&""!==e[1])o.NotificationHelper.userEventProcessor(e[1],e[2]),o.NotificationHelper.syncAsTrigger(e[1],e[2]);else if("triggerPromptWithDelay"==e[0])o.NotificationHelper.triggerPromptHandler(!0);else if("triggerPrompt"==e[0])o.NotificationHelper.triggerPromptHandler();else{if("customizeOptInPrompt"===e[0]&&"object"==typeof e[1])return void o.NotificationHelper.customizeOptInPrompt(e[1]);if("syncFCMToken"===e[0])"string"==typeof e[1]&&""!=e[1]&&(i.Config.notification.subscriptionType=1,i.Config.notification.fcmToken=e[1],o.NotificationHelper.sendEvent(l.KeyMapper.PROMPT_ALLOWED,e[1]));else if("updateSubscription"===e[0])"subscribe"!=e[1]&&"unsubscribe"!=e[1]||o.NotificationHelper.updateSubscriptionProcessor(e[1]);else{if("getSubscriberId"===e[0])return i.Config.store.subscriberId||c.Storage.getStorage(l.KeyMapper.UUID);if("getSubscriptionObject"===e[0])return c.Storage.getStorage(l.KeyMapper.PUSH_TOKEN);"userProfile"===e[0]&&(void 0!==e[1]||""!==e[1])||"personalizationProperty"===e[0]?o.NotificationHelper.userProfileProcessor(e[1]):"trigger"!==e[0]||void 0===e[1]&&""===e[1]?"gaId"===e[0]&&"string"==typeof e[1]&&"object"==typeof e[2]?s.GoogleAnalytics.init(e):"registerPromptDisplayCallback"===e[0]&&"function"==typeof e[1]?this.promptDisplayCallback=e[1]:"registerSubscriptionCallback"===e[0]&&"function"==typeof e[1]?this.subscriptionCallback=e[1]:"register_callback"===e[0]&&"function"==typeof e[1]?this.userCallback=e[1]:"syncOneTapResponse"===e[0]&&void 0!==e[1]&&""!==e[1]&&void 0!==e[1].credential&&""!==e[1].credential?f.Email.processOneTapEncodedResponse(e[1]):"getNotificationFeed"===e[0]&&"function"==typeof e[1]?d.NotificationFeed.init(e[1]):"syncUserDetailsEmail"===e[0]&&"object"==typeof e[1]?f.Email.processOneTapPlainTextResponse(e[1],e[2]):("newsLetterOptIn"===e[0]&&e[1],null!=e[2]&&f.Email.subscribeNewsLetter(e[1],e[2])):o.NotificationHelper.triggerProcessor(e[1],e[2],e[3])}}i.Config.notification.isTagsEnabled&&("add_tag"===e[0]||"remove_tag"===e[0]?console.warn("".concat(i.Config.brandingPartner," :: Tags are no longer supported. See https://help.izooto.com/article/segementation/ ")):"add_property"===e[0]&&void 0!==e[1]&&""!==e[1]&&o.NotificationHelper.addPropertyProcessorFallback(e[1]))}else r.Helper.displayLog("Sync action aborted! due to notification module disable");if("triggerMessengerPrompt"===e[0])return i.Config.messenger.autoPrompt=!0,void u.Messenger.init(!0);"triggerNewsHub"===e[0]&&(i.Config.newsHub.designType=2,p.NewsHub.isNewsContainerLoaded?p.NewsHub.openWidget():(i.Config.newsHub.triggered=!0,p.NewsHub.init()))}catch(e){r.Helper.displayLog("Queue error :",e)}},g.readSavedPreferences=function(){window._izq,window._izq.forEach(function(e){var t;"subscriberProfile"==e[0]&&null!=e[1]&&"object"==typeof e[1]&&e[1].hasOwnProperty("isPaid")&&(i.Config.CRPSPlaybook.isPaidSubscriber=e[1].isPaid,r.Helper.displayLog("Paid subscriber is set to : ",e[1].isPaid)),"init"==e[0]&&null!=e[1]&&"object"==typeof e[1]?((e[1].hasOwnProperty("auto_prompt")||e[1].hasOwnProperty("notificationAutoPrompt")||e[1].hasOwnProperty("autoPrompt"))&&(i.Config.notification.autoPrompt=null!=e[1].auto_prompt?e[1].auto_prompt:null!=e[1].autoPrompt?e[1].autoPrompt:e[1].notificationAutoPrompt,r.Helper.displayLog("Notification auto prompt set to : ",e[1].auto_prompt),0==i.Config.notification.autoPrompt&&(i.Config.notification.promptType=2)),e[1].hasOwnProperty("messengerAutoPrompt")&&(i.Config.messenger.autoPrompt=e[1].messengerAutoPrompt,r.Helper.displayLog("Messenger auto prompt set to : ",e[1].messengerAutoPrompt)),e[1].hasOwnProperty("showNewsHubWidget")&&(i.Config.newsHub.autoWidget=e[1].showNewsHubWidget,r.Helper.displayLog("Newshub auto widget set to : ",e[1].showNewsHubWidget)),e[1].hasOwnProperty("onsi")&&(null!==(t=e[1].onsi.exitIntent)&&void 0!==t&&t.hasOwnProperty("enable")&&(i.Config.exitIntent.autoPopup=e[1].onsi.exitIntent.enable,r.Helper.displayLog("Onsite exitIntent auto popup set to : ",i.Config.exitIntent.autoPopup)),null!==(t=e[1].onsi.stickyBar)&&void 0!==t&&t.hasOwnProperty("enable")&&(i.Config.stickyBar.autoPopup=e[1].onsi.stickyBar.enable,r.Helper.displayLog("Onsite stickyBar auto popup set to : ",i.Config.stickyBar.autoPopup)))):"epSyncState"==e[0]&&1==e[1]&&(r.Helper.displayLog("Custom subscription found! waiting for for FCM Token sync command!"),i.Config.store.isNotificationDisabledManually=!0,g.sync())})},g.isValidQueueForGdpr=function(e){return-1<i.Config.notification.gdprNotAllowed.indexOf(e)},g);function g(){}t.Queue=n},function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},s=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedDB=void 0;var c=n(1),i=n(0),l=n(2),r=n(3);t.IndexedDB=(u.setup=function(){4==r.Storage.getConfigLocal(l.KeyMapper.IDB_VERSION)&&(u.currentIdbVersion=4)},u.init=function(){return a(this,void 0,void 0,function(){return s(this,function(e){return[2,new Promise(function(t,n){var o;"undefined"!=typeof indexedDB?u.idbDatabase&&4==u.currentIdbVersion?t(u.idbDatabase):(4.3<=i.Config.notification.serviceWorkerVersion&&-1==i.Config.notification.serviceWorkerVersion.toString().indexOf("4.22")&&(u.currentIdbVersion=4),(o=indexedDB.open("izooto",u.currentIdbVersion)).onerror=function(){c.Helper.displayLog("DB not load =>",o.error);var e=null===(e=o.error)||void 0===e?void 0:e.name;e&&"VersionError"===e?(u.currentIdbVersion=4,t(u.init())):n("DB not load")},o.onsuccess=function(){r.Storage.setConfigLocal(l.KeyMapper.IDB_VERSION,u.currentIdbVersion);var e=o.result;(u.idbDatabase=e).onversionchange=function(){try{c.Helper.displayLog("idb version change detected! => closing current idb instance!"),e.close(),u.idbDatabase=null}catch(e){}},c.Helper.displayLog("Success : IndexedDB Instance"),u.detectSWVersionChange(e),t(e)},o.onblocked=function(e){n("DB blocked"),c.Helper.displayLog("idb blocked somewhere its still opened ...",e)},o.onupgradeneeded=function(e){try{r.Storage.setConfigLocal(l.KeyMapper.IDB_VERSION,e.newVersion);var t=o.result,n=e.oldVersion;e.oldVersion,e.newVersion,n<2&&(t.createObjectStore("swEvents",{keyPath:"eventName"}),t.createObjectStore("options",{keyPath:"key"})),n<3&&t.createObjectStore("notificationLog",{keyPath:"key"}),n<4&&(t.createObjectStore(l.KeyMapper.REQUEST_QUEUE,{keyPath:"key"}),t.createObjectStore("log",{keyPath:"key"}))}catch(e){c.Helper.displayLog("idb upgrade error",e)}}):n("DB not supported")})]})})},u.addUpdateToTable=function(o,i){return new Promise(function(t,n){u.init().then(function(e){e=e.transaction([o],"readwrite").objectStore(o).put(i);e.onsuccess=function(){t(o+" added to db.")},e.onerror=function(){n("Unable to add data in db!")}}).catch(function(e){c.Helper.displayLog(l.KeyMapper.SOMETHING_WRONG,e)})})},u.addUpdate=function(o,i){return a(this,void 0,void 0,function(){return s(this,function(e){try{return[2,new Promise(function(t,n){u.init().then(function(e){e=e.transaction(["options"],"readwrite").objectStore("options").put({key:o,val:i});e.onsuccess=function(e){t(o+" added to db.")},e.onerror=function(e){n("Unable to add data in db!")}}).catch(function(e){n(e),c.Helper.displayLog(l.KeyMapper.SOMETHING_WRONG,e)})})]}catch(e){c.Helper.displayLog(e)}return[2]})})},u.getIndexDBData=function(i,r){return a(this,void 0,void 0,function(){return s(this,function(e){try{return[2,new Promise(function(n,o){u.init().then(function(e){var e=e.transaction([i]).objectStore(i),t="all"==r?e.getAll():e.get(r);t.onerror=function(){o("Unable to retrieve data from db!")},t.onsuccess=function(){var e="";t.result?e=t.result:c.Helper.displayLog("Not found in db-> ".concat(i," -> ").concat(r)),n(e)}}).catch(function(e){c.Helper.displayLog(l.KeyMapper.SOMETHING_WRONG,e)})})]}catch(e){c.Helper.displayLog(e)}return[2]})})},u.setIndexedDb=function(t){window._izooto.sysEvents=i.Config.notification.sysEvents,"gaId"==t&&1!=i.Config.ga.swEvents||"sysEvents"==t&&1!=i.Config.notification.sysEventsFlag?c.Helper.displayLog("Not saved : ",t):u.getIndexDBData("options",t).then(function(e){(e&&!e.hasOwnProperty("val")||e.val!=window._izooto[t])&&u.addUpdate(t,window._izooto[t]).then(function(e){c.Helper.displayLog(e)}).catch(function(e){c.Helper.displayLog(e)})}).catch(function(e){c.Helper.displayLog(e)})},u.removeKeyFromTable=function(o,i){return a(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,new Promise(function(t,n){u.init().then(function(e){e=e.transaction([o],"readwrite").objectStore(o).delete(i);e.onsuccess=function(e){t(i+" added to db.")},e.onerror=function(e){n("Unable to add data in db!")}}).catch(function(e){c.Helper.displayLog(l.KeyMapper.SOMETHING_WRONG,e)})})];case 1:return[2,e.sent()];case 2:return t=e.sent(),c.Helper.displayLog(t),[3,3];case 3:return[2]}})})},u.detectSWVersionChange=function(e,t,n){var o;void 0===t&&(t="options"),void 0===n&&(n="swVer"),i.Config.notification.serviceWorkerVersion<4.21&&(t=e.transaction([t]).objectStore(t),(o="all"==n?t.getAll():t.get(n)).onsuccess=function(){o.result&&o.result.hasOwnProperty("val")&&(i.Config.notification.serviceWorkerVersion=o.result.val)})},u.getValueFromiDbOptions=function(n){return a(this,void 0,void 0,function(){return s(this,function(e){return[2,new Promise(function(t,e){u.getIndexDBData("options",n).then(function(e){if(!e.hasOwnProperty("val"))throw n+" not found in idb options";t(e.val)}).catch(function(e){c.Helper.displayLog(e),t("")})})]})})},u.currentIdbVersion=3,u.idbDatabase=null,u);function u(){}},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},c=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AdManager=void 0;var r=n(0),l=n(1),a=n(4),i=n(5),u=n(2);t.AdManager=(p.isThirdPartyAds=function(){return!!p.thirdPartyAds.hasOwnProperty(r.Config.client)},p.isCallOutAds=function(){return!!(p.callOutAds.hasOwnProperty(r.Config.client)||r.Config.newsHub.callOutAds&&""!=r.Config.newsHub.callOutAdUnit)},p.getPidSpecificAPI=function(){return i.NotificationHelper.loadDesign(o(o({},p.thirdPartyAds[r.Config.client]),{uuid:r.Config.UUID}),p.thirdPartyAds.templateURL)},p.getJSONAd=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(i,e){var t=p.getPidSpecificAPI();setTimeout(function(){i(!1)},2e3),a.HttpRequest.get(t).then(function(e){try{var t=JSON.parse(e);if(t[0]){var n=t[0];if(n.notificationMessage&&n.size_21_800x400&&n.trackerUrl){var o={title:n.notificationMessage,image:n.size_21_800x400,url:n.trackerUrl,isAd:1};return void i(o)}}}catch(e){l.Helper.displayLog("Error to loadAd:",e)}i(!1)}).catch(function(){i(!1)})})]})})},p.createAdContainer=function(e,t){var n=l.Helper.getDomElement(e);n.innerHTML="";e=document.createElement("div");e.id=t,n.appendChild(e)},p.loadOnsiteAd=function(o,i){return s(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,t){var n;""==i?t("Ad config not found"):(n=p.setExitIntentAdSize(o),p.addGPTScript(o,i,n).then(e).catch(t))})]})})},p.loadNewshubAd=function(){var e,t,n="iz-nh-ads";""!=r.Config.newsHub.adUnit&&(p.createAdContainer("#iz-news-hub-ads-container",n),""!=r.Config.newsHub.adUnit&&(e=r.Config.newsHub.adUnit),t=21092==r.Config.client?[[300,250]]:[[320,50],[320,100],[300,50],[300,100]],p.addGPTScript(n,e,t).then(function(){p.addNewshubStyleOncustomizeAd()}).catch(function(){}))},p.addNewshubStyleOncustomizeAd=function(){21092==r.Config.client&&document.querySelector("#iz-news-hub-posts-main-container").classList.add("large-ad")},p.loadCallOutAds=function(){return s(this,void 0,void 0,function(){return c(this,function(e){return[2,new Promise(function(e,t){!1===p.isCallOutAds()&&t("Ad callout config not found");var n=1==r.Config.newsHub.designType?"#iz-news-hub-icon-discoverability":"#iz-news-hub-icon-sticky-discoverability",o="iz-nhdis-ads";p.createAdContainer(n,o);n=p.callOutAds.hasOwnProperty(r.Config.client)?p.callOutAds[r.Config.client]:r.Config.newsHub.callOutAdUnit;p.addGPTScript(o,n,[[320,50]]).then(e).catch(t)})]})})},p.loadShareArticleAd=function(){var e={};try{if(""==r.Config.articleShare.adUnit&&!e.hasOwnProperty(r.Config.client))return;var t=e[r.Config.client],n=[[320,50],[300,100],[320,100]];""!=r.Config.articleShare.adUnit&&(t=r.Config.articleShare.adUnit);var o="iz-share-ads";p.createAdContainer("#iz-shareAricle-ads",o),l.Helper.addExternalJS(this.GPTScriptSrc).then(function(){p.loadAdUnit(o,t,n)})}catch(e){}},p.loadAdBlockerAd=function(){return new Promise(function(e,t){var n=r.Config.adBR.adUnit;p.addGPTScript("iz_osn_adblocker_ad_container",n,[[320,50]]).then(e).catch(t)})},p.loadAdUnit=function(t,n,o,i){try{window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push(function(){var e=window.googletag.defineSlot(n,o,t).addService(window.googletag.pubads());window.googletag.pubads().set("page_url",r.Config.notification.siteUrl),window.googletag.enableServices(),window.googletag.display(t),window.googletag.pubads().isInitialLoadDisabled()&&window.googletag.pubads().refresh([e]),window.googletag.pubads().addEventListener("slotRenderEnded",function(e){i&&t==e.slot.getSlotElementId()&&(e.isEmpty,i(e.isEmpty))})})}catch(e){i(!0)}},p.addGPTScript=function(i,r,a){return s(this,void 0,void 0,function(){var o=this;return c(this,function(e){return[2,new Promise(function(t,n){l.Helper.addExternalJS(o.GPTScriptSrc).then(function(){p.loadAdUnit(i,r,a,function(e){!0===e?n(!1):t(!0)})})})]})})},p.setExitIntentAdSize=function(e){var t=2!=r.Config.exitIntent.templateType?[[320,50],[300,100],[320,100]]:[[300,250]];return t="iz-exitintent-feature-ads"==e||"iz-exitintent-ads-0"==e&&r.Config.global.deviceType==u.KeyMapper.DEVICE_TYPE_MOBILE&&3==r.Config.exitIntent.templateType?[[300,250]]:t},p.GPTScriptSrc="https://securepubads.g.doubleclick.net/tag/js/gpt.js",p.thirdPartyScriptId="interactive_js_adcode",p.thirdPartyAds={},p.callOutAds={47825:"/22809537726/wtskora/wtskora_newshub_flyout",33757:"/22809537726/dimsumdaily/dd_flyout",51411:"/22809537726/tamil.abplive.com/ta_flyout",27714:"/22809537726/sinarharian/sh_flyout",27827:"/22809537726/dailythanthi/dt_flyout",18518:"/22809537726/republicworld/rw_flyout",51431:"/22809537726/marathi.abplive.com/ma_flyout",42051:"/22809537726/siamsport/ss_flyout",47481:"/22809537726/tribune.net/tb_flyout",43326:"/22809537726/missionmpsc/mm_flyout",45716:"/22809537726/insidenova.com/in_flyout",42476:"/22809537726/skymetweather/smw_flyout",48591:"/22809537726/punjabkesari/pk_flyout",51857:"/22809537726/pratibha.eenadu.net_osn/pe_flyout",48254:"/22809537726/philstarlife/pl_flyout",36400:"/22809537726/orientaldaily.com.my/od_flyout",35515:"/22809537726/vtvgujarati/vg_fo",56500:"/22809537726/gujaratijagran/gj_fo",53356:"/22809537726/emandirates/er_flyout",54032:"/22809537726/talkaaj/ta_fo",57761:"/22809537726/lehren/lh_fo",41463:"/22809537726/punjabijagran/pj_flyout",38225:"/22809537726/krishijagran/kj_flyout",40578:"/22809537726/krishijagran/marathikj_flyout",40795:"/22809537726/krishijagran/malayalamkj_flyout",40798:"/22809537726/krishijagran/tamilkj_flyout",49624:"/22809537726/krishijagran/hindikj_flyout",40913:"/22809537726/odia.krishijagran/okj_flyout",48055:"/22809537726/esakal/es_fo",49454:"/22809537726/sarkarnama/sn_fo",50861:"/22809537726/ahmednagarlive24/al_fo",36419:"/22809537726/haribhoomi/hb_fo",50627:"/22809537726/sakshi.com/sk_fo"},p);function p(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Debugger=void 0;var s=n(0),c=n(1),i=n(4);t.Debugger=(l.init=function(e){l.msg=l.getMsgSet(),s.Config.debugger.err=0,console.clear(),l.log(l.dash.repeat(20)+"".concat(s.Config.brandingPartner," Debug Mode")+l.dash.repeat(20)),s.Config.debugger.status=1,l.log("Verifying ".concat(s.Config.brandingPartner," integration on your website"),s.Config.debugger.infoCode);function t(){1==s.Config.debugger.err?l.log(l.msg.integration_f,s.Config.debugger.errCode):l.log(l.msg.integration,s.Config.debugger.successCode),e&&e(l.debuggerObj)}var n=s.Config.global.platform;l.debuggerObj.plugin=n,l.debugger.rcvObj={};var o=document.location.href,o=c.Helper.getParamFromUrl(o,"izObj");(o=c.Helper.parseToJSON(o))&&null!=o.domainRoot&&(s.Config.notification.domainRoot=o.domainRoot,s.Config.notification.httpsNoRoot=""!=s.Config.notification.domainRoot?1:0,s.Config.setupPath()),o&&null!=o.cdnHost&&""!=o.cdnHost&&(s.Config.notification.cdnHost=o.cdnHost),""!=n&&l.log(l.msg.plugin.replace("{plg}",n),s.Config.debugger.successCode);n=l.getScript();null!=n?(l.debuggerObj.scriptSrc=n,l.log(l.msg.code_t+l.msg.code_f+"("+n+")",s.Config.debugger.successCode),1==s.Config.notification.isSdkHttps?l.validateSw(function(){t()}):t()):(s.Config.debugger.err=1,l.log(l.msg.code_t+l.msg.code_nf,s.Config.debugger.errCode),t())},l.log=function(e,t){t=t||"",console.info("%c"+e,t)},l.getMsgSet=function(){var e=s.Config.brandingPartner,t="support@".concat(e.toLowerCase(),".com");return{code_t:"".concat(e," JS code: "),code_f:"found",code_nf:"missing. Learn more here: http://bit.ly/2WHcP4a",sw_t:"Service Worker JS: ",sw_f:"found at {sw}",sw_nf:"missing from {sw} , Learn more here: http://bit.ly/2K0yGSs",sw_ct:"Service Worker JS: Invalid Content-Type found ",html_f:"".concat(e," Html: found"),html_nf:"".concat(e," Html: not found "),html_ct:"".concat(e," Html: Invalid Content-Type found "),mfst_t:"Manifest file: ",mfst_f:"found at {m}",mfst_nf:"missing form {m} , Learn more here: http://bit.ly/2K0yGSs",multi_mfst:"multiple manifest files found. Learn more here: http://bit.ly/2WCd2FC",gcm_t:"gcm_sender_id: ",gcm_nf:"missing in the manifest file. Learn more here: http://bit.ly/2WCd2FC",fallback:"FCM project: issue with your FCM project.",integration:"".concat(e," integration is working fine on your website."),integration_f:"".concat(e," integration is incomplete. Contact ").concat(t," to get assistance."),plugin:"You have integrated ".concat(e," using the {plg} plugin."),ev:"sent to ".concat(e)}},l.requestFile=function(e,n,o){var i=new XMLHttpRequest,t=Math.random();e+=e.includes("?")?"&":"?",e+=t,i.onreadystatechange=function(){var e,t;4==this.readyState&&(e=i.responseText,t="",i.getResponseHeader("Content-Type")?t=i.getResponseHeader("Content-Type"):i.getResponseHeader("content-type")&&(t=i.getResponseHeader("content-type")),200==this.status?n(this.status,e,t):o(this.status,e))},i.open("GET",e,!0),i.send()},l.getFileInfo=function(e,o){var i={};l.requestFile(e,function(e,t,n){i.status=!0,i.contentType=n,i.body=t,o(i)},function(e,t){i.status=!1,o(i)})},l.contentTypeValidator=function(e,t){var n=!0;return t=t.toLowerCase(),1==e?t.indexOf("application")<0&&t.indexOf("javascript")<0&&(n=!1):2==e&&t.indexOf("html")<0&&(n=!1),n},l.validateIzootoHtml=function(t){l.debuggerObj.plugin&&t();var n=this.getMsgSet();s.Config.debugger.host;l.getFileInfo(s.Config.notification.sourceOrigin,function(e){1==(l.debuggerObj.izootoHtml=e).status?(l.log(n.html_f,s.Config.debugger.successCode),l.contentTypeValidator(2,e.contentType)||(l.log(n.html_ct+e.contentType,s.Config.debugger.errCode),s.Config.debugger.err=1)):(l.log(n.html_nf,s.Config.debugger.errCode),s.Config.debugger.err=1),t()})},l.validateSw=function(t){var n=this.getMsgSet(),o=s.Config.debugger.host;l.getFileInfo(s.Config.notification.serviceWorkerPath,function(e){if(1==(l.debuggerObj.sw=e).status){if(l.log(n.sw_t+n.sw_f.replace("{sw}",o+s.Config.notification.serviceWorkerPath),s.Config.debugger.successCode),!l.contentTypeValidator(1,e.contentType))return l.log(n.sw_ct+e.contentType,s.Config.debugger.errCode),s.Config.debugger.err=1,void t();l.validateIzootoHtml(t)}else l.log(n.sw_t+n.sw_nf.replace("{sw}",o+s.Config.notification.serviceWorkerPath),s.Config.debugger.errCode),s.Config.debugger.err=1,t()})},l.validateGCM=function(e,o){i.HttpRequest.postForm(s.Config.debugger.gcmValidator,{pid:s.Config.client,gcm:e}).then(function(e){var t="fail",n=(e=c.Helper.parseToJSON(e)).response||"Something went wrong";"success"==e.status?(t=e.status,l.log("GCM Sender ID Validation "+t,s.Config.debugger.successCode),o(!0)):(l.log("GCM Sender ID Validation "+t+" , "+n,s.Config.debugger.errCode),o(!1))}).catch(function(e){})},l.validateManifest=function(o){for(var i=l.getMsgSet(),r=s.Config.debugger.host,e=document.getElementsByTagName("link"),t=0;t<e.length;t++){var n=e[t],a=n.getAttribute("href"),n=n.getAttribute("rel");null!=n&&"manifest"==n&&a!=s.Config.notification.manifest&&(l.log(i.mfst_t+i.multi_mfst,s.Config.debugger.errCode),s.Config.debugger.err=1)}l.requestFile(s.Config.notification.manifest,function(e,t){l.log(i.mfst_t+i.mfst_f.replace("{m}",r+s.Config.notification.manifest),s.Config.debugger.successCode);try{var n=c.Helper.parseToJSON(t);if(""==(n=n.gcm_sender_id||""))return l.log(i.gcm_t+i.gcm_nf,s.Config.debugger.errCode),void o(!1);l.validateGCM(n,o)}catch(e){l.log(i.gcm_t+i.gcm_nf.replace("{m}",r+s.Config.notification.manifest),s.Config.debugger.errCode)}},function(e,t){l.log(i.mfst_t+i.mfst_nf.replace("{m}",r+s.Config.notification.manifest),s.Config.debugger.errCode),o(!1)})},l.getScript=function(){for(var e=document.getElementsByTagName("script"),t=new RegExp(s.Config.notification.cdnHost+"/scripts/[^/]*.js"),n=0;n<e.length;n++){var o=e[n];if(null!=(o=o.getAttribute("src"))&&t.test(o))return o=o.startsWith("//")?"https:"+o:o}return null},l.showMsgOverlay=function(){var e='<div class="iz-verification-overlay" style="width: 100%;position: fixed;top: 0;left:0;z-index: 9999999999;text-align: center;background: rgba(0,0,0,0.6);height: 100%;color: #fff;display: flex;justify-content: center;align-items: center;overflow-y: hidden;"><div class="inner-content" style="font-size: 2em;"><span style="line-height: 2;">Please wait while we are verifying '.concat(s.Config.brandingPartner," integration on your website. <br>This window will close automatically.</span></div></div>");c.Helper.addHTML("div",e,"iz-integration-overlay")},l.verifyIzootoIntegration=function(){l.showMsgOverlay(),l.init(function(e){c.Helper.postMessage("opener","integrationObj",e)})},l.dash="-",l.debuggerObj={sw:{},izootoHtml:{}},l.debugger={rcvObj:{}},l);function l(){}},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},i=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Notification=void 0;var s=n(5),c=n(1),l=n(0),r=n(13),a=n(3),u=n(10),p=n(2),d=n(7);t.Notification=(f.init=function(){return o(this,void 0,void 0,function(){var t,n;return i(this,function(e){switch(e.label){case 0:return(l.Config.notification.eventsToSync=l.Config.notification.eventsToSync.map(function(e){return s.NotificationHelper.syncableEvents[e]}),t=l.Config.notification.windowType,f.isWebPushEnabled&&l.Config.notification.isSupported)?[3,1]:(l.Config.notification.isSupported?s.NotificationHelper.sendEvent(p.KeyMapper.NOTIFICATION_DISABLED):s.NotificationHelper.sendEvent(p.KeyMapper.BROWSER_UNSUPPORTED),c.Helper.displayLog("".concat(l.Config.brandingPartner," notification disabled!")),[2]);case 1:return[4,s.NotificationHelper.setSubscriberIdFromDb()];case 2:if(e.sent(),6==t)c.Helper.displayLog("Error: No root trigger");else{if(5==t)return r.Debugger.verifyIzootoIntegration(),[2];if(4==t&&self!=top)return s.NotificationHelper.sendPermissionStatusFromFrame(),[2];if(2==t&&self!=top)return s.NotificationHelper.removeSubscriptionInFrame(),[2];if(1==t)return s.NotificationHelper.nativeHandler(),[2]}if(!t){if(window.self!=window.top)return u.Queue.sync(),[2];if(""!=l.Config.notification.allowedDomain&&(n=l.Config.global.locationProtocol+"//"+document.location.hostname,l.Config.notification.allowedDomain.indexOf(n)<0&&!t))return[2];d.GoogleAnalytics.initUsingConfig()}if(l.Config.store.isNotificationDisabledManually)return c.Helper.displayLog("Notfication prompt handled by site developer!"),[2];if(3==s.NotificationHelper.getPermissionStatusFromStorage())return s.NotificationHelper.sendEvent(p.KeyMapper.ALREADY_UNSUBSCRIBED),[2];s.NotificationHelper.promptHandler(),e.label=3;case 3:return[2]}})})},f.optinCallback=function(e){try{"function"==typeof e&&(l.Config.notification.optinModule=new e,null!=l.Config.notification.optinModule.data&&(window.izOptinDesign=l.Config.notification.optinModule.data),s.NotificationHelper.showOptin())}catch(e){}},f.closeDialog=function(e){var t;try{a.Storage.removeStorage(p.KeyMapper.ACTIVE_PROMPT),e=1===e?p.KeyMapper.OPTIN_ALLOWED:p.KeyMapper.OPTIN_CLOSED,s.NotificationHelper.sendEvent(e),null!==(t=document.getElementById("izmiddle-box"))&&void 0!==t&&t.remove()}catch(e){c.Helper.displayLog("Error removing div : ",e)}},f.openPopup=function(e){var t,n,o,i,r,a;(e=void 0===e?!1:e)&&this.closeDialog(1),3!=l.Config.notification.subscriptionType?l.Config.notification.isSdkHttps&&"https:"==l.Config.global.locationProtocol?s.NotificationHelper.nativeHandler():(c.Helper.addMsgReciever(s.NotificationHelper.msgReciever),r=null!=window.screenLeft?window.screenLeft:screen.left,a=null!=window.screenTop?window.screenTop:screen.top,t=window.innerWidth||document.documentElement.clientWidth||screen.width,n=window.innerHeight||document.documentElement.clientHeight||screen.height,i=o=200,e=l.Config.notification.promptType,1!==l.Config.notification.promptType&&2!=l.Config.notification.promptType||(e=1,i=o=500),r=t/2-o/2+r,a=n/2-i/2+a,l.Config.notification.hidePopup&&0===l.Config.notification.promptType&&(i=o=100,r=a=1e4),e=l.Config.notification.sourceOrigin+"?action=prompt&izpt="+e,1!=l.Config.notification.fullPopUp||0==l.Config.notification.promptType?(window.open(e,"".concat(l.Config.brandingPartner," Subscription"),"scrollbars=yes, width="+o+", height="+i+", top="+a+", left="+r),s.NotificationHelper.sendEvent(p.KeyMapper.POPUP_OPEN)):window.open(e,"".concat(l.Config.brandingPartner," Subscription"))):s.NotificationHelper.requestSafariPermission()},f.isWebPushEnabled=!0,f);function f(){}},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},s=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.MasterDomain=void 0;var c=n(0),l=n(2),u=n(3),p=n(5),d=n(1),f=n(10),g=n(20),n=(y.init=function(){return o(this,void 0,void 0,function(){var t,n,o,i,r,a;return s(this,function(e){switch(e.label){case 0:return(t=u.Storage.getStorage(l.KeyMapper.UUID),3!=c.Config.notification.windowType||window.self==window.top)?[3,4]:(n={token:"",subscribed_on:"",uuid:t},u.Storage.getStorage(l.KeyMapper.MASTER_DOMAIN)?(o=y.getMasterStorage(l.KeyMapper.PUSH_TOKEN),r=y.getMasterStorage(l.KeyMapper.SUBSCRIBED_ON),""!=t||""==o?[3,2]:[4,d.Helper.getUUIDFromEndpoint(o)]):[3,3]);case 1:""!=(i=e.sent())&&(t=i,u.Storage.setStorage(l.KeyMapper.UUID,t)),e.label=2;case 2:n={token:o,subscribed_on:r,uuid:t},e.label=3;case 3:return d.Helper.postMessage("parent",l.KeyMapper.MASTER_TO_CHILD,n),d.Helper.addMsgReciever(p.NotificationHelper.msgReciever),[3,10];case 4:return window.location.origin!=c.Config.notification.masterDomain?[3,9]:""==(o=y.getMasterStorage(l.KeyMapper.PUSH_TOKEN))?[3,7]:""!=t?[3,6]:[4,d.Helper.getUUIDFromEndpoint(o)];case 5:""!=(i=e.sent())&&(t=i,u.Storage.setStorage(l.KeyMapper.UUID,t)),e.label=6;case 6:return(r=y.getMasterStorage(l.KeyMapper.SUBSCRIBED_ON))==c.Config.notification.masterDomain?(g.Main.moduleInitializer(),[2]):(1==p.NotificationHelper.getPermissionStatusFromStorage()?f.Queue.sync():p.NotificationHelper.tokenValidator(function(e){1==e?(p.NotificationHelper.updatePermissionStatus(1),f.Queue.sync()):g.Main.moduleInitializer()}),[3,8]);case 7:g.Main.moduleInitializer(),e.label=8;case 8:return[3,10];case 9:c.Config.store.isMDSyncingRequired&&(d.Helper.addMsgReciever(p.NotificationHelper.msgReciever),a=c.Config.notification.masterDomain+c.Config.notification.masterDomainPath+"?action=izcheckmaster&domain="+window.location.origin,d.Helper.addIFrame(a,l.KeyMapper.MASTER_AS_FRAME)),1==p.NotificationHelper.getPermissionStatusFromStorage()?(p.NotificationHelper.sendEvent(l.KeyMapper.ALREADY_GRANTED,y.getMasterStorage(l.KeyMapper.PUSH_TOKEN)),f.Queue.sync()):c.Config.store.isMDSyncingRequired||(d.Helper.addMsgReciever(p.NotificationHelper.msgReciever),a=c.Config.notification.masterDomain+c.Config.notification.masterDomainPath+"?action=izcheckmaster&domain="+window.location.origin,d.Helper.addIFrame(a,l.KeyMapper.MASTER_AS_FRAME)),e.label=10;case 10:return[2]}})})},y.masterDomainCallback=function(e,t){var n,o,i=!0,r=JSON.stringify(t);""!=c.Config.notification.masterDomain&&(e&&(i=!1,e=""!=(n=y.getMasterStorage(l.KeyMapper.MASTER_DOMAIN))?p.NotificationHelper.getSubscriptionKey(n):"",n=p.NotificationHelper.getSubscriptionKey(t),""!=e&&e==n||(i=!0)),i&&(window.location.origin==c.Config.notification.masterDomain?(o='{"iz_'.concat(c.Config.client,'":{"').concat(l.KeyMapper.PUSH_TOKEN,'":').concat(r,',"').concat(l.KeyMapper.SUBSCRIBED_ON,'":"').concat(c.Config.notification.masterDomain,'","user_properties":{}}}'),u.Storage.setStorage(l.KeyMapper.MASTER_DOMAIN,o)):self==top&&(n={token:r,subscribed_on:window.location.origin,uuid:c.Config.UUID},i=document.getElementById(l.KeyMapper.MASTER_AS_FRAME),d.Helper.postMessage(i,l.KeyMapper.CHILD_TO_MASTER,n),o='{"iz_'.concat(c.Config.client,'":{"').concat(l.KeyMapper.PUSH_TOKEN,'":').concat(r,',"').concat(l.KeyMapper.SUBSCRIBED_ON,'":"').concat(window.location.origin,'","user_properties":{}}}'),u.Storage.setStorage(l.KeyMapper.MASTER_DOMAIN,o)),window._izq=window._izq||[],window._izq.push(["userProfile",{add:{subscribed_on_url:window.location.origin}}])))},y.setMasterStorage=function(e){var t="";e.hasOwnProperty("uuid")&&e.uuid&&(t=e.uuid);var n='{"iz_'.concat(c.Config.client,'":{"').concat(l.KeyMapper.PUSH_TOKEN,'":').concat(e.token,',"').concat(l.KeyMapper.SUBSCRIBED_ON,'":"').concat(e.subscribed_on,'","user_properties":{}}}');u.Storage.setStorage(l.KeyMapper.MASTER_DOMAIN,n),u.Storage.setStorage(l.KeyMapper.PUSH_TOKEN,encodeURIComponent(e.token)),t&&u.Storage.setStorage(l.KeyMapper.UUID,t)},y.getMasterStorage=function(e){var t="iz_"+c.Config.client,n="",t=(n=d.Helper.parseToJSON(u.Storage.getStorage(l.KeyMapper.MASTER_DOMAIN)))[t];return""!=n&&null!=t&&null!=t[e]?t[e]:""},y.masterConfigReciver=function(e){var t=e.token,n=e.subscribed_on,e=e.uuid,o={token:JSON.stringify(t),subscribed_on:n,uuid:e};""!=t&&e?p.NotificationHelper.tokenValidator(function(e){1==e?(p.NotificationHelper.updatePermissionStatus(l.KeyMapper.PROMPT_ALLOWED),y.setMasterStorage(o),p.NotificationHelper.sendEvent(l.KeyMapper.ALREADY_GRANTED,y.getMasterStorage(l.KeyMapper.PUSH_TOKEN)),f.Queue.sync()):0==e&&(u.Storage.removeConfigLocal(l.KeyMapper.PERMISSION_STATUS),g.Main.moduleInitializer())},e):g.Main.moduleInitializer()},y);function y(){}t.MasterDomain=n},function(e,t,n){"use strict";var s=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},c=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Messenger=void 0;var l=n(0),u=n(1),p=n(5),o=n(3),i=n(4),d=n(2),r=n(6),f=n(7);t.Messenger=(g.init=function(e){var t,n=this;if("http:"!=l.Config.global.locationProtocol&&0==l.Config.notification.windowType){if(0!=l.Config.messenger.status&&""!=l.Config.messenger.pageId){try{null==(g.messengerPrompt=l.Config.messenger.prompt).title&&(g.messengerPrompt.title="Connect with us for exclusive deals and offers!"),g.messengerPrompt.poweredbysrc=l.Config.notification.promptDesign.poweredbysrc}catch(e){}g.htmlContainer=p.NotificationHelper.loadDesign(g.messengerPrompt,g.getHtmlContainer());var o,i=document.createElement("iframe");i.id="izootoMessengerFrame",i.scrolling="no";var r=document.getElementById(g.anyWhereSelector);if(r){if(g.isAlreadySubscribed())return;g.promptSequencing(d.KeyMapper.MESSENGER_READY),g.htmlContainer=p.NotificationHelper.loadDesign(g.messengerPrompt,g.getHtmlContainer(!1));try{var a=document.createElement("style");a.innerText="#".concat(g.anyWhereSelector,"{overflow: hidden;text-align: center;} #izootoMessengerFrame{ height: ").concat(g.heightMap[l.Config.messenger.size.toLocaleLowerCase()],"; border: none; max-width: 256px;width:unset; }"),null!=r&&r.appendChild(a),null!=r&&r.appendChild(i),g.isElementFound=!0}catch(e){u.Helper.displayLog("Error in appending child in izooto-messenger-div")}}else{if(1!=e){if(!l.Config.messenger.autoPrompt)return;if(g.isDelayed())return}if(g.triggered)return;g.triggered=!0,g.promptSequencing(d.KeyMapper.MESSENGER_READY);try{i.style="height: 249px; border: none; max-width: unset;width:unset;",(o=document.createElement("div")).id="izMsngrOptinOuterWrapper",o.innerHTML=' <div id="izMsngrIframeWrapper"></div><style>#izMsngrOptinOuterWrapper{display:none;position: fixed; width: 306px; height: 249px; z-index: 99999999999; bottom: 10px; right: 10px;}#izMsngrIframeWrapper{position: relative;}@media screen and (max-width: 600px){#izMsngrOptinOuterWrapper{width: 100%!important; height: 100%!important; position: fixed; left: 0!important; top: 0!important; bottom: unset!important; right: unset!important; z-index: 2147483647; background: #00000070;}#izMsngrIframeWrapper{position: absolute; right: 50%; bottom: 50%; transform: translate(50%, 50%);}}</style>',document.body.appendChild(o),null!==(t=document.getElementById("izMsngrIframeWrapper"))&&void 0!==t&&t.appendChild(i)}catch(e){u.Helper.displayLog("Error in appending child in messenger-div")}}g.frameElement=i,(g.frameContentWindow=i.contentWindow).fbAsyncInit=function(){g.addHtmlContainer(l.Config.messenger.pageId),g.frameContentWindow.FB.init({appId:g.appId,autoLogAppEvents:!0,xfbml:!0,version:"v18.0"}),g.frameContentWindow.FB.Event.subscribe("send_to_messenger",function(e){"rendered"==e.event&&0==e.is_after_optin&&setTimeout(function(){return s(n,void 0,void 0,function(){var t;return c(this,function(e){return g.frameContentWindow.document.querySelector("#izootoFbMessengerMainContainer")&&(g.isElementFound?(t=window.getComputedStyle(g.frameContentWindow.document.querySelector(".fb-send-to-messenger")),256<(t=parseInt(t.width))&&(t+=33,i.style="max-width: ".concat(t,"px;width: ").concat(t,"px;")),g.syncMessengerEvent()):g.promptSequencing(d.KeyMapper.MESSENGER_READY_SHOW)),[2]})})},400),"opt_in"==e.event&&(g.setMultiMessengerStorage(d.KeyMapper.MSNGR_IS_SUBSCRIBED,1),g.sendEvent(d.KeyMapper.MESSENGER_SUBSCRIBED),f.GoogleAnalytics.processMessanger("Send to Messenger"),g.promptSequencing(d.KeyMapper.MESSENGER_SUBSCRIBED),setTimeout(function(){g.htmlContainerClose(!0)},1e3))})};setTimeout(function(){var e=document.createElement("script");e.src="https://connect.facebook.net/en_US/sdk.js",i.contentDocument.body.appendChild(e)},200)}}else u.Helper.displayLog("Messenger is disabled for this device!")},g.syncMessengerEvent=function(){g.sendEvent(d.KeyMapper.MESSENGER_PROMPTED),1==o.Storage.getConfigLocal("messengerRepeated",d.KeyMapper.STATS)?f.GoogleAnalytics.processMessanger("Repeat Impression"):f.GoogleAnalytics.processMessanger("Impression"),o.Storage.setConfigLocal("messengerRepeated",1,d.KeyMapper.STATS),g.promptSequencing(d.KeyMapper.MESSENGER_PROMPTED),g.setRepeatPromptDelay(l.Config.messenger.repeatDelay)},g.showMessenger=function(){document.querySelector("#izMsngrOptinOuterWrapper").style.display="block",g.syncMessengerEvent()},g.htmlContainerClose=function(e){void 0===e&&(e=!1);var t=document.getElementById(g.anyWhereSelector)?g.frameElement:document.querySelector("#izMsngrOptinOuterWrapper");t&&(t.style.display="none"),0==e&&f.GoogleAnalytics.processMessanger("Dismissed"),g.promptSequencing(d.KeyMapper.PROMPT_CLOSED)},g.getHtmlContainer=function(e){return(e=void 0===e||e)?'<style> .fb_iframe_widget { display: -webkit-box; } .izooto-widget-overlay { background: transparent; width: unset; height: unset; position: unset; top: unset; left: unset; z-index: 2147483647; } .izooto-widget-position { position: fixed; right: 10px; bottom: 10px; z-index: 2147483647; } .izooto-fb-widget { background: #fff; box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.01), 0px 1px 18px 0px rgba(0, 0, 0, 0.03); border-radius: 4px; font-family: "sans-serif", Helvetica, Arial, Helvetica Neue; font-size: 15px; letter-spacing: 0.4px; width: 285px; position: relative; } .izooto-fb-close { background: transparent; border: none; font-size: 22px; position: relative; top: 2px; cursor: pointer; color: grey; } #izooto-fb-close-wrapper { display: flex; justify-content: flex-end; background: #dfeeff; padding: 0 5px; margin: 0 -24px;} .izooto-fb-top { padding: 24px; border-radius: 4px 4px 0 0; background: #dfeeff; padding-bottom: 10px; padding-top: 0; margin-top: -4px; } .izooto-fb-title { line-height: 20px; font-weight: 500; color: #000; padding-bottom: 6px; } a.izooto-fb-branding { display: block; padding-top: 6px; font-size: 11px; color: #1f82f7; font-family: "sans-serif", Helvetica, Arial, Helvetica Neue; text-decoration: none; letter-spacing: 0.8px; } a:hover.izooto-fb-branding { display: block; padding-top: 6px; font-size: 11px; color: #1f82f7; font-family: "sans-serif", Helvetica, Arial, Helvetica Neue; text-decoration: none; letter-spacing: 0.8px; } .izooto-fb-bottom { background: white; border-radius: 0 0 4px 4px; padding: 24px; background: #fff; } @media screen and (max-width:600px) { .izmobilemsngr #izooto-fb-close-wrapper { padding: 0; } .izmobilemsngr .izooto-fb-close { background: #195086; border: none; font-size: 22px; position: relative; top: -10px; cursor: pointer; color: white; border-radius: 50px; width: 28px; height: 28px; text-align: center; vertical-align: middle; display: unset; padding: 0 0; line-height: 0; margin: 0 -5px; } }</style><div class="izooto-widget-overlay"> <div class="izooto-widget-position"> <div class="izooto-fb-widget"> <div class="izooto-fb-top" dir="auto"><div id="izooto-fb-close-wrapper"> <button type="button" class="izooto-fb-close" onclick="window.top._izooto.messengerClass.htmlContainerClose();">&times;</button> </div> <div class="izooto-fb-title">{{--title--}}</div><a target="_blank" href="{{--poweredbysrc--}}" class="izooto-fb-branding izbranding"><span style="color:grey;">Powered by</span> '.concat(l.Config.brandingPartner,'</a></div> <div class="izooto-fb-bottom"> <div id="izFbContainer" style="margin-left:42px;"></div> </div> </div> </div>'):'<style>body{ margin:0px;} #izFbContainer{ margin-left: 33px; position: absolute; } </style><div id="izFbContainer"></div>'},g.addHtmlContainer=function(e){var t=g.htmlContainer,n=document.createElement("div");n.setAttribute("id","izootoFbMessengerMainContainer");var o=function(){window.outerWidth<=600?n.setAttribute("class","izmobilemsngr"):n.setAttribute("class","")};o(),window.addEventListener("resize",o),n.innerHTML=t,(g.frameContentWindow.document.body||g.frameContentWindow.document.head).appendChild(n);var o=l.Config.UUID,t=l.Config.client+"=/="+o+"=/="+l.Config.global.os+"=/="+l.Config.global.browserVer+"=/="+l.Config.global.deviceType+"=/="+l.Config.global.browserType,o=document.createElement("div");o.setAttribute("class","fb-send-to-messenger"),o.setAttribute("messenger_app_id",g.appId),o.setAttribute("page_id",e),o.setAttribute("color",g.isElementFound?l.Config.messenger.color:"blue"),o.setAttribute("size",g.isElementFound?l.Config.messenger.size:"large"),o.setAttribute("data-ref",t),l.Config.messenger.buttonTextType&&g.isElementFound&&o.setAttribute("cta_text",this.ctaText[l.Config.messenger.buttonTextType]),null!==(t=g.frameContentWindow.document.querySelector("#izFbContainer"))&&void 0!==t&&t.appendChild(o),u.Helper.izootoBrandingHandler(g.frameContentWindow)},g.isDelayed=function(){return 1==g.getMultiMessengerStorage(d.KeyMapper.MSNGR_IS_SUBSCRIBED)||g.getMultiMessengerStorage(d.KeyMapper.MSNGR_REPEAT_PROMPT_DELAY)>Date.now()},g.isAlreadySubscribed=function(){return 1==g.getMultiMessengerStorage(d.KeyMapper.MSNGR_IS_SUBSCRIBED)},g.syncEvent=function(e){var t="",t=e==d.KeyMapper.MESSENGER_SUBSCRIBED?u.Helper.getEndpoint("syncMessenger"):u.Helper.getEndpoint(e),e=g.getParameterToSync(e);i.HttpRequest.postForm(t,e,!0).then(function(){}).catch(function(e){})},g.setRepeatPromptDelay=function(e){var t;0!==e&&(t=(t=new Date).setTime(t.getTime()+60*e*1e3),"Messenger: Setting repeat prompt delay for ".concat(e," minutes"),g.setMultiMessengerStorage(d.KeyMapper.MSNGR_REPEAT_PROMPT_DELAY,t))},g.setMultiMessengerStorage=function(e,t){var n=o.Storage.getConfigLocal(l.Config.messenger.pageId,d.KeyMapper.MESSENGER);(n=n?u.Helper.parseToJSON(n):{})[e]=t;n=JSON.stringify(n);o.Storage.setConfigLocal(l.Config.messenger.pageId,n,d.KeyMapper.MESSENGER)},g.getMultiMessengerStorage=function(e){var t=o.Storage.getConfigLocal(l.Config.messenger.pageId,d.KeyMapper.MESSENGER);return t&&null!=(t=u.Helper.parseToJSON(t))[e]?t[e]:""},g.promptSequencing=function(e){-1<[d.KeyMapper.MESSENGER_PROMPTED,d.KeyMapper.MESSENGER_SUBSCRIBED,d.KeyMapper.PROMPT_CLOSED,d.KeyMapper.MESSENGER_READY_SHOW,d.KeyMapper.MESSENGER_READY].indexOf(e)&&!g.isElementFound&&r.ChannelEventHandler.event("messenger",e)},g.sendEvent=function(e){var t=[d.KeyMapper.MESSENGER_SUBSCRIBED];l.Config.messenger.syncPrompt&&t.push(d.KeyMapper.MESSENGER_PROMPTED),-1!=t.indexOf(e)&&g.syncEvent(e)},g.getParameterToSync=function(e){var t={pid:l.Config.client,btype:l.Config.global.browserType,dtype:l.Config.global.deviceType,os:l.Config.global.os,page_id:l.Config.messenger.pageId,bKey:l.Config.UUID};switch(e){case d.KeyMapper.MESSENGER_SUBSCRIBED:t.ms=1;break;case d.KeyMapper.MESSENGER_PROMPTED:t.msp=1;break;default:t[e]=1}return t},g.anyWhereSelector="izooto-messenger-subscription-button",g.isElementFound=!1,g.frameElement=void 0,g.triggered=!1,g.appId="1061905150807841",g.ctaText=[,"GET_THIS_IN_MESSENGER","RECEIVE_THIS_IN_MESSENGER","SEND_THIS_TO_ME","GET_CUSTOMER_ASSISTANCE","GET_CUSTOMER_SERVICE","GET_SUPPORT","LET_US_CHAT","SEND_ME_MESSAGES","ALERT_ME_IN_MESSENGER","SEND_ME_UPDATES","MESSAGE_ME","LET_ME_KNOW","KEEP_ME_UPDATED","TELL_ME_MORE","SUBSCRIBE_IN_MESSENGER","SUBSCRIBE_TO_UPDATES","GET_MESSAGES","SUBSCRIBE","GET_STARTED_IN_MESSENGER","LEARN_MORE_IN_MESSENGER","GET_STARTED"],g.heightMap={standard:"44px",large:"58px",xlarge:"71px"},g);function g(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;var o=n(0),i=n(1),r=n(3),a=n(2);t.Session=(s.init=function(){o.Config.global.isSessionHandled||(s.sessionHandler(),o.Config.global.isSessionHandled=!0)},s.sessionHandler=function(){var e;s.isSessionExpired()&&(t=r.Storage.getConfigLocal(a.KeyMapper.SESSION_COUNT,a.KeyMapper.SESSION),e=r.Storage.getConfigLocal(a.KeyMapper.FIRST_SESSION,a.KeyMapper.SYNC),t&&e&&i.Helper.getDateDiffrenceFromPresent(e)<=s.visitWithinDays?r.Storage.setConfigLocal(a.KeyMapper.SESSION_COUNT,t+1,a.KeyMapper.SESSION):(r.Storage.setConfigLocal(a.KeyMapper.SESSION_COUNT,1,a.KeyMapper.SESSION),r.Storage.updateLastSync(a.KeyMapper.FIRST_SESSION)));var t=(t=new Date).setTime(t.getTime()+60*s.sessionExpiryMinute*1e3);new Date(t),r.Storage.setConfigLocal(a.KeyMapper.SESSION_EXPIRY,t,a.KeyMapper.SESSION)},s.isSessionExpired=function(){var e=r.Storage.getConfigLocal(a.KeyMapper.SESSION_EXPIRY,a.KeyMapper.SESSION),t=new Date;return!(""!=e&&e>t.getTime())&&(s.isNew=!0)},s.getSessionCount=function(){return r.Storage.getConfigLocal(a.KeyMapper.SESSION_COUNT,a.KeyMapper.SESSION)||0},s.isNew=!1,s.sessionExpiryMinute=30,s.visitWithinDays=7,s);function s(){}},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},l=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.OnSite=void 0;var u=n(0),p=n(1),i=n(3),d=n(2),c=n(4),s=n(12),r=n(6);t.OnSite=(f.init=function(){return a(this,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return f.startTime=(new Date).getTime(),1!=u.Config.exitIntent.status&&1!=u.Config.stickyBar.status?[3,3]:[4,f.initializeOnsite(u.Config.exitIntent)];case 1:return e.sent(),[4,f.initializeOnsite(u.Config.stickyBar)];case 2:return e.sent(),[3,4];case 3:p.Helper.displayLog("Onsite is Disabled for this site"),e.label=4;case 4:return[2]}})})},f.loadFeed=function(s){return a(this,void 0,void 0,function(){var r,a;return l(this,function(e){return r={},a=[51120],[2,new Promise(function(t,n){var e="https://rec.izooto.com/rec/".concat(u.Config.hashFileName,"/0.json"),o=(1==s?u.Config.exitIntent:u.Config.stickyBar).feedHash,i=o||u.Config.hashFileName;o&&(e="https://rec.izooto.com/rec/v2/".concat(o,"/0.json")),-1<a.indexOf(u.Config.client)?f.loadClientSideFeed().then(t).catch(n):f.multifeedData.hasOwnProperty(i)?0==f.multifeedData[i]?n(!1):t(f.multifeedData[i]):c.HttpRequest.get(e).then(function(e){try{(r=p.Helper.parseToJSON(e))&&t(r)}catch(e){n(r),p.Helper.displayLog("Error to loadfeed:",e)}}).catch(function(){n(r)})})]})})},f.loadClientSideFeed=function(){return new Promise(function(e,t){var n=null===(n=p.Helper.getDomElement('link[type="application/rss+xml"]'))||void 0===n?void 0:n.href;n||t("Feed url not found on this page!"),c.HttpRequest.get(n).then(f.parseFieldsFromXml).then(e).catch(t)})},f.parseFieldsFromXml=function(e){var i=[];try{var r=new DOMParser;r.parseFromString(e,"text/xml").querySelectorAll("item").forEach(function(e){var t=null===(o=null===(t=e.querySelector("title"))||void 0===t?void 0:t.textContent)||void 0===o?void 0:o.trim(),n=null===(o=null===(o=e.querySelector("link"))||void 0===o?void 0:o.textContent)||void 0===o?void 0:o.trim(),e=r.parseFromString((null===(o=e.querySelector("description"))||void 0===o?void 0:o.textContent)||"","text/html"),o=((null===(o=null==e?void 0:e.body)||void 0===o?void 0:o.innerText)||"").trim(),e=((null===(e=e.querySelector("img"))||void 0===e?void 0:e.src)||"").trim();-1==i.findIndex(function(e){return e.itemLink==n})&&t&&e&&n&&i.push({t:t,l:n,m:o,mi:e,i:"",pt:""})});var t=i.splice(0,5);return t}catch(e){}},f.getValidFeed=function(t){return a(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(o,i){f.loadFeed(t).then(function(e){var t=[];if(0!=e.length){for(var n in e){n=e[n];""==n.t||""==n.i&&""==n.mi||t.push(n)}o(t)}else i("Feed is not valid")}).catch(function(e){i(e)})})]})})},f.onSiteVerifiedFeed=function(e,t){var n=(1==t?f.exitIntent:f.stickyBar).feedData;if(n.length>=e){t=void 0;return(t=f.exitIntent.maxAllowedPost==e?f.getExitIntentSortedFeed(n):n).sort(function(e,t){return.5-Math.random()}),(t=f.getFeaturedFeed(t)).splice(0,e)}},f.getExitIntentSortedFeed=function(e){if(""==e[0].m)for(var t=1;t<e.length;t++)if(""!=e[t].m){var n=e[0];e[0]=e[t],e[t]=n;break}return e},f.getParsedFeed=function(i){return a(this,void 0,void 0,function(){var n,o;return l(this,function(e){return n=(1==i?f.exitIntent:f.stickyBar).maxAllowedPost,o=1==i?"Exit_Intent_Recommendations":"sticky_bar_recommendations",[2,new Promise(function(e,t){try{e((f.onSiteVerifiedFeed(n,i)||[]).map(function(e){return{title:e.t,message:e.m,image:e.i||e.mi,url:f.addUTMOnUrl(e.l,o),publishTime:e.pt}}))}catch(e){p.Helper.displayLog("Exit intent unable to load final data ",e),t(e)}})]})})},f.getFeaturedFeed=function(e){if(e[0].hasOwnProperty("f")&&0==e[0].f)for(var t=1;t<e.length;t++)if(e[t].f){var n=e[0];e[0]=e[t],e[t]=n;break}return e},f.initializeOnsite=function(s){var c;return a(this,void 0,void 0,function(){var t,n,o,i,r,a;return l(this,function(e){switch(e.label){case 0:if(t=s.osnType,0==s.status||u.Config.global.isFrame)return p.Helper.displayLog("Onsite is disabled for this site:"),[2];if(!s.mobileAllowed&&1!=u.Config.global.deviceType||!s.desktopAllowed&&1==u.Config.global.deviceType)return p.Helper.displayLog("Onsite ".concat(t," is disabled for this device")),[2];if(!s.autoPopup)return"Onsite template type ".concat(t," is disable for autopopup false"),[2];if(0==s.rid||0==s.cid)return[2];if(p.Helper.isRepeatDelayActive(1==t?d.KeyMapper.EXITINTENT_DELAY:d.KeyMapper.STICKYBAR_DELAY))return[2];n=s.feedHash||u.Config.hashFileName,e.label=1;case 1:return e.trys.push([1,3,,4]),o=void 0,i=f.multifeedData,r=n,[4,f.getValidFeed(t)];case 2:return i[r]=e.sent(),o=f.multifeedData[n],f.viewPortDetector(),1==t?(f.exitIntent.feedData=o,f.exitIntent.rfid=null!==(c=null===(c=o[0])||void 0===c?void 0:c.fi)&&void 0!==c?c:null,f.exitIntentRegisterEvent()):(f.stickyBar.feedData=o,f.stickyBar.rfid=null!==(c=null===(c=o[0])||void 0===c?void 0:c.fi)&&void 0!==c?c:null,f.registerSinglePageScroll()),[2,o];case 3:return a=e.sent(),f.multifeedData[n]=!1,p.Helper.displayLog("initializeOnsite error",a),[2];case 4:return[2]}})})},f.isMetaLocationRestricted=function(){if(-1<[51001].indexOf(u.Config.client)){var e=p.Helper.getMetaValue("geo.region");if(e&&"in"==e.toLowerCase())return!0}return!1},f.exitIntentRegisterEvent=function(){this.isMetaLocationRestricted()||(u.Config.exitIntent.onExit&&f.onExitHandler(function(){f.exitIntentInitializeDialog(1)}),0<u.Config.exitIntent.onDelay&&setTimeout(function(){f.exitIntentInitializeDialog(2)},1e3*u.Config.exitIntent.onDelay),0<u.Config.exitIntent.onScroll&&f.exitIntentScollHandler(function(){f.exitIntentInitializeDialog(3)}),u.Config.exitIntent.onBack&&f.backButtonIntentHandler())},f.onExitHandler=function(n){1==u.Config.global.deviceType&&document.addEventListener("mouseout",function(e){var t;(!(t=(null!=e!=e?e:window.event).relatedTarget||e.toElement)||"HTML"===t.nodeName)&&e.clientY<100&&n()}),1<u.Config.global.deviceType&&document.addEventListener("visibilitychange",function(){document.hidden&&n()})},f.exitIntentScollHandler=function(t){var n;p.Helper.isScreenScrollable()&&(n=0,document.addEventListener("scroll",function(){var e=window.pageYOffset||document.documentElement.scrollTop;n<e&&window.scrollY>=window.innerHeight&&t(),n=e<=0?0:e},!1))},f.backButtonIntentHandler=function(){var e=i.Storage.getSessionStorage("izootoOSNDisplayed");""==location.hash&&!e&&f.isSupportedBackIntent()&&(f.isFirstPage()?(f.onBackButtonTriggerHandler(!0),f.onUrlChangeHandler(),window.addEventListener("beforeunload",f.setHistoryStateIntoStorage),f.setHistoryStateIntoStorage()):f.isNavigatedBackToFirstPage()&&f.attachPopstateListener())},f.registerSinglePageScroll=function(){var e=!1,t=p.Helper.throttle(function(){return e?void(f.stickyBar.isDialogInitialize&&f.toggleWidgetOnscroll()):(f.getScrollDirection()==d.KeyMapper.SCROLL_DOWN&&window.scrollY>=window.innerHeight&&(e=!0,f.stickyBarInitializeDialog()),!1)},200);document.addEventListener("scroll",function(){t()},!1)},f.stickyBarInitializeDialog=function(){try{var e=void 0;u.Config.stickyBar.ads&&(e=p.Helper.addExternalJS(s.AdManager.GPTScriptSrc,"izootoGPT")),Promise.all([e,f.showStickyBarDialog()]).then(function(){u.Config.stickyBar.ads&&f.stickyBarAdsHandler()}).catch(function(e){p.Helper.displayLog(" Stickybar initializeDialog error",e)})}catch(e){}},f.exitIntentInitializeDialog=function(e){try{if(f.isElementinViewport)return f.triggerData.exitIntent.isHidden=!0,f.triggerData.exitIntent.triggerType=e,!1;if(f.exitIntent.isDialogInitialize)return!1;f.exitIntent.isDialogInitialize=!0;var t=void 0;!0===s.AdManager.isThirdPartyAds()?t=s.AdManager.getJSONAd():u.Config.exitIntent.ads?t=p.Helper.addExternalJS(s.AdManager.GPTScriptSrc,"izootoGPT"):u.Config.exitIntent.adfc&&(t=Promise.resolve()),Promise.all([t,f.showexitIntentDialog(e)]).then(function(e){var t;null!==(t=e[0])&&void 0!==t&&t.hasOwnProperty("isAd")?f.exitIntentAdsHandler(e[0]):3==u.Config.exitIntent.templateType?f.exitIntentNoContentAdsHandler():f.exitIntentAdsHandler()}).catch(function(e){p.Helper.displayLog("Exit intent initializeDialog error",e)})}catch(e){}},f.setExitIntentFeed=function(e){if(e.length==f.exitIntent.maxAllowedPost&&"object"==typeof e)return 2!=u.Config.exitIntent.templateType?(f.exitIntent.largePostData=e[0],e.shift(),f.exitIntent.smallPostData=e):f.exitIntent.template2PostData=e,!0},f.showexitIntentDialog=function(o){return a(this,void 0,void 0,function(){return l(this,function(e){try{return[2,new Promise(function(t,n){f.exitIntent.triggerOnEventType=o,f.getParsedFeed(u.Config.exitIntent.osnType).then(function(e){f.setExitIntentFeed(e)&&f.getHTML(f.exitIntent.htmlSrc).then(function(e){p.Helper.addHTML("div",e,f.exitIntent.dialogBoxID),f.getExitIntentDialogToDisplay(e).then(function(e){r.ChannelEventHandler.event("exitIntent",d.KeyMapper.EXITINTENT_SHOWN),e.style.display="block",f.syncOnsiteView(u.Config.exitIntent.osnType),p.Helper.setRepeatPromptDelay(u.Config.exitIntent.repeatDelay,d.KeyMapper.EXITINTENT_DELAY),t(!0)})})}).catch(function(e){n(!1),p.Helper.displayLog("showDialog error",e)})})]}catch(e){}return[2]})})},f.exitIntentTrackingObj=function(){return o({pid:u.Config.client,bkey:u.Config.UUID,cid:u.Config.exitIntent.cid,rid:u.Config.exitIntent.rid,ed:f.getEventTime(),tt:f.exitIntent.triggerOnEventType,ot:u.Config.exitIntent.osnType},f.exitIntent.rfid?{fi:f.exitIntent.rfid}:{})},f.getExitIntentDialogToDisplay=function(e){return a(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(e,t){try{2!=u.Config.exitIntent.templateType?f.setExitIntentPostsArticle():f.setExitIntentTemplate2Post(),f.exitIntentApplyConfigStyle(),e(f.getTypedDomElement(".iz_osn",u.Config.exitIntent.osnType))}catch(e){t()}})]})})},f.geStickyBarDialogToDisplay=function(e){return a(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(e,t){try{f.setStickyBarArticle(),f.stickyBarApplyConfigStyle(),e(f.getTypedDomElement(".iz_osn",u.Config.stickyBar.osnType))}catch(e){t()}})]})})},f.setLargePostArticle=function(){var e=f.getTypedDomElement(".".concat(f.osnPrefix,"left"),u.Config.exitIntent.osnType),t=p.Helper.getDomElement(".iz_osn_article_1");f.exitIntent.leftPostHTML=t.cloneNode(!0),f.setOsnDataIntoElement(e,f.exitIntent.largePostData,0,u.Config.exitIntent.osnType)},f.setExitIntentPostsArticle=function(){try{f.setLargePostArticle();var e=f.getTypedDomElement(".".concat(f.osnPrefix,"right"),u.Config.exitIntent.osnType),t=f.getTypedDomElement(".".concat(f.osnPrefix,"smContainer"),u.Config.exitIntent.osnType);f.exitIntent.singlePostHTML=t;var n=document.querySelector(".".concat(f.osnPrefix,"smContainer_1>div")),o=window.getComputedStyle(n).getPropertyValue("background-image");f.defaultImage=o.match(/\((.*?)\)/)[1].replace(/('|")/g,""),null!=t&&t.remove(),1!=u.Config.global.deviceType&&(!0===s.AdManager.isThirdPartyAds()?f.exitIntent.smallPostAllowed=3:f.exitIntent.smallPostAllowed=u.Config.exitIntent.ads?3:2),3==u.Config.exitIntent.templateType&&(f.exitIntent.smallPostAllowed=u.Config.global.deviceType==d.KeyMapper.DEVICE_TYPE_DESKTOP?3:2);for(var i=0;i<f.exitIntent.smallPostAllowed;i++){var r=f.exitIntent.singlePostHTML.cloneNode(!0);r.id="iz-osn-exitIntent-article-".concat(i),null!=e&&e.appendChild(r),f.setSmallPosts(i,f.exitIntent.smallPostData[i],u.Config.exitIntent.osnType)}}catch(e){}},f.setExitIntentTemplate2Post=function(){var e=f.getTypedDomElement(".".concat(f.osnPrefix,"left"),u.Config.exitIntent.osnType),t=f.getTypedDomElement(".".concat(f.osnPrefix,"right"),u.Config.exitIntent.osnType),n=f.getTypedDomElement(".".concat(f.osnPrefix,"article"),u.Config.exitIntent.osnType);null!=(f.exitIntent.singlePostHTML=n)&&n.remove();var o=f.exitIntent.maxAllowedPost;1!=u.Config.global.deviceType&&(o=!0===s.AdManager.isThirdPartyAds()||u.Config.exitIntent.ads?3:2);for(var i=0;i<o;i++){var r=f.exitIntent.singlePostHTML.cloneNode(!0);r.id="iz-osn-exitIntent-article-".concat(i),(i<(u.Config.global.deviceType==d.KeyMapper.DEVICE_TYPE_DESKTOP?2:3)?e:t).appendChild(r),f.setSmallPosts(i,f.exitIntent.template2PostData[i],u.Config.exitIntent.osnType)}},f.setStickyBarArticle=function(){var e=f.getTypedDomElement(".".concat(f.osnPrefix,"carousel"),u.Config.stickyBar.osnType),t=f.getTypedDomElement(".".concat(f.osnPrefix,"notification"),u.Config.stickyBar.osnType);f.stickyBar.singlePostHTML=t,f.defaultImage=t.querySelector("img").src,null!=t&&t.remove();for(var n=0;n<f.stickyBar.maxAllowedPost;n++){var o=f.stickyBar.singlePostHTML.cloneNode(!0);o.id="iz-osn-sticky-article-".concat(n),null!=e&&e.appendChild(o),f.setSmallPosts(n,f.stickyBar.postData[n],u.Config.stickyBar.osnType)}},f.stickyBarAdsHandler=function(e){try{var t="#iz-osn-exitIntent-article-".concat(1),n="iz-stickybar-ads",o=p.Helper.getDomElement(t);s.AdManager.createAdContainer(t,n),s.AdManager.loadOnsiteAd(n,u.Config.stickyBar.adUnit).then(function(e){f.stickyBar.adNotificationNo=1;var t=document.querySelector("#iz-stickybar-ads>div");300<t.clientWidth&&(o.style.minWidth=t.clientWidth+20+"px")}).catch(function(e){f.stickyBarAdFaliure(1)})}catch(e){}},f.getRandomInt=function(e){return Math.floor(Math.random()*e)},f.exitIntentAdsHandler=function(e){try{var t=2==u.Config.exitIntent.templateType?1!=u.Config.global.deviceType?2:this.getRandomInt(f.exitIntent.maxAllowedPost):this.getRandomInt(f.exitIntent.smallPostAllowed),n="#iz-osn-exitIntent-article-".concat(t),o="iz-exitintent-ads",i=p.Helper.getDomElement(n);e?f.setSmallPosts(t,e,u.Config.exitIntent.osnType):u.Config.exitIntent.ads?(i.classList.remove("iz_osn_article_1"),s.AdManager.createAdContainer(n,o),s.AdManager.loadOnsiteAd(o,u.Config.exitIntent.adUnit).then(function(e){f.exitIntent.adNotificationNo=t,i.classList.add("iz_osn_article_1")}).catch(function(e){f.fillAdFallBackData(t),1==u.Config.global.deviceType&&i.classList.add("iz_osn_article_1")})):u.Config.exitIntent.adfc&&f.fillAdFallBackData(t)}catch(e){}},f.exitIntentNoContentAdsHandler=function(e){try{u.Config.global.deviceType==d.KeyMapper.DEVICE_TYPE_DESKTOP&&f.noContentLeftAdsHandler(),f.noContentRightAdsHandler()}catch(e){}},f.noContentLeftAdsHandler=function(){try{u.Config.exitIntent.ads&&f.loadExitIntentNoContentsAds().then(function(){f.removePaddingFromAdsContainer()}).catch(function(e){f.removePaddingFromAdsContainer(),f.noContentFeatureAdsFailure()})}catch(e){}},f.noContentRightAdsHandler=function(){for(var e=0;e<f.exitIntent.smallPostAllowed;e++)!function(t){var n=t;u.Config.exitIntent.ads?f.loadExitIntentNoContentsAds(n).then(function(){f.removePaddingFromAdsContainer(n),f.exitIntent.adNotificationNo=n}).catch(function(e){u.Config.global.deviceType==d.KeyMapper.DEVICE_TYPE_MOBILE&&2==n&&(p.Helper.getDomElement("#iz-osn-exitIntent-article-".concat(n)).style.display="none"),f.removePaddingFromAdsContainer(n),0==t?f.fillAdFallBackData(t):f.exitIntentAdFaliure(t)}):0==t&&u.Config.exitIntent.adfc&&f.fillAdFallBackData(t)}(e)},f.loadExitIntentNoContentsAds=function(r){return a(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(t,n){var e=null!=r?"#iz-osn-exitIntent-article-".concat(r):".iz_osn_article_1",o=null!=r?"iz-exitintent-ads-".concat(r):"iz-exitintent-feature-ads",i=null!=r?u.Config.exitIntent.adUnit:u.Config.exitIntent.featureAdUnit;0==r&&u.Config.global.deviceType==d.KeyMapper.DEVICE_TYPE_MOBILE&&(o="iz-exitintent-feature-ads",i=u.Config.exitIntent.featureAdUnit),p.Helper.getDomElement(e).style.paddingBottom=null!=r?"70px":"256px",s.AdManager.createAdContainer(e,o),s.AdManager.loadOnsiteAd(o,i).then(function(e){t(!0)}).catch(function(e){u.Config.global.deviceType,n(!1)})})]})})},f.removePaddingFromAdsContainer=function(e){(null!=e?p.Helper.getDomElement("#iz-osn-exitIntent-article-".concat(e)):p.Helper.getDomElement(".iz_osn_article_1")).style.removeProperty("padding-bottom")},f.noContentFeatureAdsFailure=function(){var e=f.exitIntent.leftPostHTML.cloneNode(!0),t=p.Helper.getDomElement(".iz_osn_article_1");t.innerHTML=e.innerHTML;e=f.exitIntent.largePostData;f.setOsnDataIntoElement(t,e,0,u.Config.exitIntent.osnType)},f.exitIntentAdFaliure=function(e){var t=f.exitIntent.singlePostHTML.cloneNode(!0);p.Helper.getDomElement("#iz-osn-exitIntent-article-".concat(e)).innerHTML=t.innerHTML;t=(2!=u.Config.exitIntent.templateType?f.exitIntent.smallPostData:f.exitIntent.template2PostData)[e];f.setSmallPosts(e,t,u.Config.exitIntent.osnType)},f.fillAdFallBackData=function(i){var r=p.Helper.getDomElement("#iz-osn-exitIntent-article-".concat(i)),a=2==u.Config.exitIntent.templateType?"300x250":"320x100";f.fetchFallbackURL(a).then(function(e){var t=document.createElement("div");r.id="iz-exitIntent-fallback-ads";var n=document.createElement("img");r.innerHTML="",r.onclick=null;var o="https://rec.izooto.com/ads/".concat(u.Config.exitIntent.adfc),o=e.i[a].startsWith("http")?e.i[a]:o+e.i[a];n.src=o,t.appendChild(n),r.appendChild(t),n.onerror=function(){f.adFallbackfailureHandler(i,r)},f.fallBackAdClickHandler(r,e.ln,i)}).catch(function(){f.adFallbackfailureHandler(i,r)})},f.adFallbackfailureHandler=function(e,t){f.exitIntentAdFaliure(e),1!=u.Config.global.deviceType&&(t.style.display="none")},f.fetchFallbackURL=function(o){return new Promise(function(t,n){var e;u.Config.exitIntent.adfc?(e="".concat("https://rec.izooto.com/ads/","/").concat(u.Config.exitIntent.adfc,"/fallback.json"),c.HttpRequest.get(e).then(function(e){e=p.Helper.parseToJSON(e);e&&e.i&&e.i[o]?t(e):n("No data found")}).catch(function(){n("No data found")})):n("adfc is not present")})},f.fallBackAdClickHandler=function(e,t,n){var o={1:{id:"16402502348465",cid:"11111625"},2:{id:"16402502348469",cid:"11111629"},3:{id:"16402502348474",cid:"11111634"},4:{id:"16402502348484",cid:"11111644"},5:{id:"16402502348491",cid:"11111650"}}[u.Config.exitIntent.adfc];e.onclick=function(){window.open(t),p.Helper.syncClick(o)}},f.stickyBarAdFaliure=function(e){var t=f.stickyBar.singlePostHTML.cloneNode(!0);p.Helper.getDomElement("#iz-osn-sticky-article-".concat(e)).innerHTML=t.innerHTML,f.setSmallPosts(e,f.stickyBar.postData[e],u.Config.stickyBar.osnType)},f.setSmallPosts=function(e,t,n){var o=p.Helper.getDomElement("#iz-osn-".concat(1==n?"exitIntent":"sticky","-article-").concat(e));f.setOsnDataIntoElement(o,t,e+1,n)},f.setOsnDataIntoElement=function(e,t,n,o){try{var i,r=1==o?p.Helper.getDomElement(".iz_osn_icon_1",e):p.Helper.getDomElement("img",e),a=f.getTypedDomElement(".".concat(f.osnPrefix,"title"),o,e),s=f.getTypedDomElement(".".concat(f.osnPrefix,"timestamp"),o,e),c=f.getTypedDomElement(".".concat(f.osnPrefix,"message"),o,e),l=1==o?f.exitIntentTrackingObj():f.stickyBarTrackingObj();c&&(150<=t.message.length&&(t.message+="..."),c.innerHTML=t.message,""==t.message&&c.classList.remove("".concat(f.osnPrefix,"message_").concat(o))),a.innerHTML=t.title,1==o?((i=new Image).src=t.image,i.onload=function(e){e.target.onload=void 0,r.style.backgroundImage="url(".concat(i.src,")")},i.onerror=function(e){e.target.src!=f.defaultImage&&(e.target.onload=void 0,r.style.backgroundImage="url(".concat(i.src,")"))}):(r.src=t.image,r.onload=function(e){e.target.onload=void 0,e.target.src=t.image},r.onerror=function(e){e.target.src!=f.defaultImage&&(e.target.onload=void 0,e.target.src=f.defaultImage)});var u=t.publishTime;""==u?s.style.display="none":t.isAd?(s.innerHTML="Sponsored",s.style.display="block"):s.innerHTML=p.Helper.getTimeAgoStringByTimestamp(1e3*u),e.onclick=function(){window.open(t.url),t.isAd&&(l.cid="ads",l.rid="ads"),f.syncOnsiteClick(o,t.url,l,n)},f.loaderClose(e,o)}catch(e){p.Helper.displayLog("Error to set RightContainer article",e)}},f.getTypedDomElement=function(e,t,n){return p.Helper.getDomElement("".concat(e,"_").concat(t),n)},f.loaderClose=function(e,t){try{for(var n=e.querySelectorAll(".".concat(f.osnPrefix,"animated_").concat(t)),o=0;o<n.length;o++)n[o].classList.remove("".concat(f.osnPrefix,"animated_").concat(t))}catch(e){p.Helper.displayLog("Error to close loader on article")}},f.showStickyBarDialog=function(){return a(this,void 0,void 0,function(){return l(this,function(e){try{return[2,new Promise(function(n,t){f.getParsedFeed(u.Config.stickyBar.osnType).then(function(e){e.length==f.stickyBar.maxAllowedPost&&"object"==typeof e&&(f.stickyBar.postData=e,f.getHTML(f.stickyBar.htmlSrc).then(function(e){p.Helper.addHTML("div",e,f.stickyBar.dialogBoxID),f.geStickyBarDialogToDisplay(e).then(function(e){r.ChannelEventHandler.event("stickyBar",d.KeyMapper.STICKYBAR_READY_SHOW);var t=setInterval(function(){f.stickyBar.readyToShow&&(clearInterval(t),n(!0))},50)})}))}).catch(function(e){t(!1),p.Helper.displayLog("showDialog error",e)})})]}catch(e){}return[2]})})},f.stickybarReadyToShow=function(){f.showStickyBar(),f.stickyBar.readyToShow=!0,r.ChannelEventHandler.event("stickyBar",d.KeyMapper.STICKYBAR_SHOWN),f.syncOnsiteView(u.Config.stickyBar.osnType),p.Helper.setRepeatPromptDelay(u.Config.stickyBar.repeatDelay,d.KeyMapper.STICKYBAR_DELAY),setTimeout(function(){f.stickyBar.isDialogInitialize=!0},3e3),f.stickyBarContentScroll()},f.stickyBarTrackingObj=function(){return o({pid:u.Config.client,bkey:u.Config.UUID,cid:u.Config.stickyBar.cid,rid:u.Config.stickyBar.rid,ot:u.Config.stickyBar.osnType},f.stickyBar.rfid?{fi:f.stickyBar.rfid}:{})},f.getHTML=function(o){return a(this,void 0,void 0,function(){return l(this,function(e){return[2,new Promise(function(t,n){c.HttpRequest.get(o).then(function(e){e||n(),t(e)}).catch(function(e){n(e)})})]})})},f.isSupportedBackIntent=function(){return u.Config.global.deviceType==d.KeyMapper.DEVICE_TYPE_MOBILE&&(u.Config.global.browserName==d.KeyMapper.BROWSER_CHROME||u.Config.global.browserName==d.KeyMapper.BROWSER_FIREFOX||u.Config.global.browserName==d.KeyMapper.BROWSER_SAFARI)},f.onUrlChangeHandler=function(){var t=location.href;new MutationObserver(function(e){location.href!==t&&(t=location.href,f.isNavigatedBackToFirstPage()?f.attachPopstateListener():f.removePopstateListener())}).observe(document,{subtree:!0,childList:!0})},f.onBackButtonTriggerHandler=function(e){(e=void 0===e?!1:e)&&window.history.pushState(f.exitIntent.firstPageStateID,""),p.Helper.displayLog("onBackButtonHandler listener added"),f.attachPopstateListener()},f.attachPopstateListener=function(){window.addEventListener("popstate",f.popstateListener,{once:!0})},f.removePopstateListener=function(){window.removeEventListener("popstate",f.popstateListener)},f.popstateListener=function(e){-1<location.href.indexOf("#")?f.attachPopstateListener():""==location.hash&&(f.exitIntentInitializeDialog(4),i.Storage.setSessionStorage("izootoOSNDisplayed",1))},f.setHistoryStateIntoStorage=function(){var e=window.history.state;f.setTabID(e)},f.isNavigatedBackToFirstPage=function(){return history.state==f.getTabID()},f.isFirstPage=function(){return!f.getTabID()},f.getTabID=function(){return i.Storage.getSessionStorage("izootoFirstPageStateID")},f.setTabID=function(e){i.Storage.setSessionStorage("izootoFirstPageStateID",e)},f.stickyBarApplyConfigStyle=function(){var e,t=p.Helper.getDomElement(".".concat(f.osnPrefix,"heading_").concat(u.Config.stickyBar.osnType));t.style.color=u.Config.stickyBar.titleColor,""!=u.Config.stickyBar.title&&(e=(e=u.Config.stickyBar.title.trim()).slice(0,50),t.innerHTML=e),f.setCSSProperty("--iz-header-bg-color",u.Config.exitIntent.bgColor),f.closeHandler(function(){f.closeStickyDialog()},u.Config.stickyBar.osnType)},f.exitIntentApplyConfigStyle=function(){try{var e=f.osnPrefix+"heading_1",t=f.osnPrefix+"card_1";p.Helper.getDomElement("."+t).style.borderTopColor=u.Config.exitIntent.bgColor;var n=p.Helper.getDomElement("."+e);n.style.color=u.Config.exitIntent.titleColor,n.innerHTML=u.Config.exitIntent.title,p.Helper.izootoBrandingHandler(),f.brandLogoHandler(),f.closeHandler(function(){f.closeExitIntent()},u.Config.exitIntent.osnType),p.Helper.setHref(".iz-osn-branding-text-1","https://www.izooto.com/campaign/getting-started-with-on-site-interactions-izooto?utm_source=referral&utm_medium=on_site_notification")}catch(e){p.Helper.displayLog("Error on show OSN dialogbox",e)}},f.brandLogoHandler=function(){try{var e,t=u.Config.exitIntent.logoURL.trim();t.startsWith("http")&&((e=p.Helper.getDomElement(".iz_osn_branding_logo")).src=t,e.style.display="block")}catch(e){p.Helper.displayLog("OSN : Cannot find logo element",e)}},f.addUTMOnUrl=function(e,t){e=p.Helper.replaceQueryParam(e,"utm_source","izooto"),e=p.Helper.replaceQueryParam(e,"utm_medium","on_site_interactions");return e=p.Helper.replaceQueryParam(e,"utm_campaign",t)},f.setCSSProperty=function(e,t){document.body.style.setProperty(e,t)},f.closeHandler=function(n,o){(1==o?document.querySelectorAll(".".concat(f.osnPrefix,"overlay_1,.").concat(f.osnPrefix,"close_1")):document.querySelectorAll(".".concat(f.osnPrefix,"close_2"))).forEach(function(t){t.addEventListener("click",function(e){e.stopPropagation(),1==o&&e.target!==t||n()})})},f.closeExitIntent=function(){try{this.hideExitIntent(),f.syncOnsiteDismissed(u.Config.exitIntent.osnType),p.Helper.setRepeatPromptDelay(u.Config.exitIntent.closeDelay,d.KeyMapper.EXITINTENT_DELAY),r.ChannelEventHandler.event("exitIntent",d.KeyMapper.EXITINTENT_CLOSED)}catch(e){}},f.hideExitIntent=function(){p.Helper.hideElement("#".concat(f.exitIntent.dialogBoxID))},f.getEventTime=function(){var e=new Date,t=new Date(f.startTime),t=e.getTime()-t.getTime();return parseInt(t/1e3)},f.syncOnsiteView=function(e){var t=1==(e=void 0===e?1:e)?f.exitIntentTrackingObj():f.stickyBarTrackingObj(),e=(1==e?f.exitIntent:f.stickyBar).adNotificationNo;e&&(t.adp=e);e=p.Helper.getEndpoint("syncOnsiteView");c.HttpRequest.postForm(e,t,!0).then(function(){"exitIntent view Api synced successfully with ".concat(u.Config.brandingPartner)}).catch(function(e){})},f.syncOnsiteDismissed=function(e){var t=1==e?f.exitIntentTrackingObj():f.stickyBarTrackingObj(),e=(1==e?f.exitIntent:f.stickyBar).adNotificationNo;e&&(t.adp=e);e=p.Helper.getEndpoint("syncOnsiteDismissed");c.HttpRequest.postForm(e,t,!0).catch(function(e){})},f.syncOnsiteClick=function(e,t,n,o){t=encodeURIComponent(t);n.link=t,n.nc=o,"ads"==n.rid&&(n.adp=o);o=p.Helper.getEndpoint("syncOnsiteClick");c.HttpRequest.postForm(o,n,!0).then(function(){"exitIntent click Api synced successfully with ".concat(u.Config.brandingPartner)}).catch(function(e){})},f.toggleWidgetOnscroll=function(){f.stickyBar.isClosed||f.stickybarHide||(f.getScrollDirection()==d.KeyMapper.SCROLL_DOWN?f.hideStickyBar():f.showStickyBar())},f.showStickyBar=function(){try{if(f.isElementinViewport)return console.log("Sticky abort : elem is in viewport");var e=p.Helper.getDomElement(".iz_osn_slide_down");e&&e.classList.replace("iz_osn_slide_down","iz_osn_slide_up"),p.Helper.showElement("#iz_osn_container_stickyBar",!1),r.ChannelEventHandler.event("stickyBar",d.KeyMapper.STICKYBAR_VISIBLE)}catch(e){}},f.hideStickyBar=function(){try{p.Helper.getDomElement("#iz_osn_container_stickyBar").classList.replace("iz_osn_slide_up","iz_osn_slide_down"),r.ChannelEventHandler.event("stickyBar",d.KeyMapper.STICKYBAR_HIDDEN)}catch(e){}},f.closeStickyDialog=function(){p.Helper.getDomElement("#iz_osn_container_stickyBar").classList.replace("iz_osn_slide_up","iz_osn_slide_down"),f.stickyBar.isClosed=!0,f.syncOnsiteDismissed(u.Config.stickyBar.osnType),r.ChannelEventHandler.event("stickyBar",d.KeyMapper.STICKYBAR_CLOSED),p.Helper.setRepeatPromptDelay(u.Config.stickyBar.closeDelay,d.KeyMapper.STICKYBAR_DELAY)},f.stickyBarContentScroll=function(){var t=this,e=f.getTypedDomElement(".iz_osn_right_arrow",2),n=f.getTypedDomElement(".iz_osn_left_arrow",2);3==u.Config.global.deviceType&&f.mobScrollObserver(),e.addEventListener("click",function(e){t.setScroll("right")}),n.addEventListener("click",function(e){t.setScroll("left")})},f.setScroll=function(e){var t;3==u.Config.global.deviceType?(t="right"==e?f.stickyBar.currentIndex+1:f.stickyBar.currentIndex-1,null!=(t=document.querySelector("#iz-osn-sticky-article-".concat(t)))&&t.scrollIntoView({behavior:"smooth",inline:"start"})):(t=document.querySelector(".iz_osn_carousel_2"),e="right"==e?t.scrollWidth:0,t.scrollTo({left:e,behavior:"smooth"}))},f.mobScrollObserver=function(){for(var e=document.querySelector(".iz_osn_carousel_2"),t=document.querySelectorAll(".iz_osn_carousel_2 > *"),n={},o=new IntersectionObserver(function(e,t){e=e.reduce(function(e,t){return t.intersectionRatio>e.intersectionRatio?t:e});0<e.intersectionRatio&&(f.stickyBar.currentIndex=n[e.target.getAttribute("id")],f.stickyBar.currentIndex)},{root:e,threshold:.9}),i=0;i<t.length;i++)n[t[i].getAttribute("id")]=i,o.observe(t[i])},f.getScrollDirection=function(){if(p.Helper.isScreenScrollable()){var e=!1,t=window.pageYOffset||document.documentElement.scrollTop;return f.lastScrollTop<t?e=d.KeyMapper.SCROLL_DOWN:t<f.lastScrollTop&&(e=d.KeyMapper.SCROLL_UP),f.lastScrollTop=t,e}},f.viewPortDetector=function(){if(-1<[39837,22667,22668,22669,29014,34474,46972,47126,51171,51241,51240,51413,60772,9687,57225,49454,47127,51171,1764,2441,9892,19662,4088,32495,4093,30522,30753,57263].indexOf(u.Config.client)&&"IntersectionObserver"in window&&!f.isViewportDetectorInitialized)try{f.isViewportDetectorInitialized=!0;var e=new IntersectionObserver(function(e){e.forEach(function(e){return f.taboolaElementObj[e.target.id]=e.isIntersecting}),f.detectElmentVisibiltyChange()});f.runtimeObserverHanlder(e)}catch(e){}},f.runtimeObserverHanlder=function(n){function e(){try{var e=document.querySelectorAll("[id^='taboola-']"),t=Object.values(f.taboolaElementObj).length;t!=e.length&&e.forEach(function(e){f.taboolaElementObj.hasOwnProperty(e.id)||(f.taboolaElementObj[e.id]=!1,n.observe(e))})}catch(e){}}e(),window.addEventListener("scroll",e)},f.detectElmentVisibiltyChange=function(){-1<Object.values(f.taboolaElementObj).indexOf(!0)?(f.isElementinViewport=!0,r.ChannelEventHandler.hideOSNPopup()):(f.isElementinViewport=!1,r.ChannelEventHandler.showOSNPopup())},f.lastScrollTop=0,f.osnPrefix="iz_osn_",f.defaultImage="",f.multifeedData={},f.stickybarHide=!1,f.isFeedRejected=!1,f.isElementinViewport=!1,f.triggerData={exitIntent:{isHidden:!1,triggerType:null},stickyBar:{isHidden:!1}},f.taboolaElementObj={},f.isViewportDetectorInitialized=!1,f.exitIntent={rfid:null,feedData:[],isDialogInitialize:!1,get maxAllowedPost(){return 2==u.Config.exitIntent.templateType?u.Config.global.deviceType!=d.KeyMapper.DEVICE_TYPE_DESKTOP?3:4:5},smallPostAllowed:4,adNotificationNo:void 0,dialogBoxID:"iz-osn-exitIntent",triggerOnEventType:void 0,firstPageStateID:"osn_".concat(Date.now()),largePostData:void 0,smallPostData:void 0,template2PostData:void 0,singlePostHTML:void 0,leftPostHTML:void 0,get htmlSrc(){var e=u.Config.exitIntent.templateType,t=u.Config.exitIntent.htmlVersion[e];return"https://cdn.izooto.com/osn/exitintent/".concat(e,"/v").concat(t,".html")}},f.stickyBar={rfid:null,feedData:[],readyToShow:!1,currentIndex:0,isClosed:!1,isDialogInitialize:!1,maxAllowedPost:6,adNotificationNo:void 0,dialogBoxID:"iz-osn-stickyBar",singlePostHTML:void 0,htmlSrc:"https://cdn.izooto.com/osn/stickybar.html",postData:void 0},f);function f(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Email=void 0;var a=n(0),s=n(1),i=n(4),c=n(3),l=n(2),o=n(6);t.Email=(u.init=function(){return 0==a.Config.email.status?(o.ChannelEventHandler.event("email",l.KeyMapper.EMAIL_DISABLED),void s.Helper.displayLog(" iZooto one tap is disable for the site")):""!=c.Storage.getStorage(l.KeyMapper.ONETAP)||""!=c.Storage.getConfigLocal(l.KeyMapper.ONETAP_REPEAT_PROMPT_DELAY)&&u.isDelayed()?o.ChannelEventHandler.event("email",l.KeyMapper.EMAIL_CLOSED):void u.addOneTapHtml()},u.addOneTapHtml=function(){u.isPromptShown||(u.isPromptShown=!0,u.getOnetapContainer(),1<s.Helper.getDeviceType()?o.ChannelEventHandler.event("email",l.KeyMapper.EMAIL_READY):u.showEmailPrompt())},u.getOnetapContainer=function(){var e=document.createElement("div");e.id="g_id_onload",e.setAttribute("data-client_id",a.Config.email.dataClientId),e.setAttribute("data-callback","izootoEmailSubcriptionCallBack"),e.setAttribute("data-cancel_on_tap_outside","false"),e.setAttribute("data-moment_callback","izootoEmailEventsCallback"),e.setAttribute("data-itp_support","true"),s.Helper.addHTML("div",e.outerHTML);e=document.createElement("style");e.innerHTML="\n #credential_picker_container, #credential_picker_iframe{\n z-index : 999999999 !important;\n }\n ",document.body.appendChild(e)},u.showEmailPrompt=function(){s.Helper.addExternalJS("https://accounts.google.com/gsi/client")},u.processOneTapEncodedResponse=function(e){var t=(void 0===e?{}:e).credential,e=(n=u.parseJwt(t)).given_name,t=n.family_name,n=n.email;this.validateOneTapResponse({firstName:e,lastName:t,email:n}).catch(console.log)},u.processOneTapPlainTextResponse=function(e,t){var n=void 0===e?{}:e,o=n.fname,e=n.lname,n=n.email;function i(e){"function"==typeof t&&t(e)}n=n.toString().trim(),this.validateOneTapResponse({firstName:o,lastName:e,email:n}).then(i).catch(i)},u.isSyncNewsLetter=function(e,t){var n=c.Storage.getConfigLocal("isSubscribed",l.KeyMapper.ONETAP);if(e!=c.Storage.getConfigLocal("newsLetterNumber",l.KeyMapper.ONETAP)||t!=n){if(e&&e.toString().length<=5)return!0;s.Helper.displayLog("newsLetterNumber validation failed")}else s.Helper.displayLog("newsletter already synced");return!1},u.subscribeNewsLetter=function(t,n){void 0===t&&(t=1),void 0===n&&(n=1),u.isSyncNewsLetter(t,n)&&s.Helper.getFlagBasedParameter().then(function(e){e.bKey=a.Config.UUID,e.nls=n?1:0,e.nlo=t,u.syncSubscription(e).then(function(){c.Storage.setConfigLocal("isSubscribed",n,l.KeyMapper.ONETAP),c.Storage.setConfigLocal("newsLetterNumber",t,l.KeyMapper.ONETAP)}).catch(console.log)})},u.isValidEmail=function(e){return(e=void 0===e?"":e)&&u.emailValidatorRegex.test(e)&&e.length<=100},u.validateOneTapResponse=function(e){var e=void 0===e?{}:e,o=e.firstName,i=e.lastName,r=e.email;return new Promise(function(t,n){u.isValidEmail(r)?c.Storage.getConfigLocal("email",l.KeyMapper.ONETAP)!=r||c.Storage.getConfigLocal(l.KeyMapper.EMAIL_NOT_SYNCED)?(c.Storage.removeConfigLocal("isSubscribed",l.KeyMapper.ONETAP),c.Storage.removeConfigLocal("newsLetterNumber",l.KeyMapper.ONETAP),c.Storage.setConfigLocal("email",r,l.KeyMapper.ONETAP),s.Helper.getFlagBasedParameter().then(function(e){o&&(e.fn=o,c.Storage.setConfigLocal("fn",o,l.KeyMapper.ONETAP)),i&&(e.ln=i,c.Storage.setConfigLocal("ln",i,l.KeyMapper.ONETAP)),e.bKey=a.Config.UUID,e.email=r,u.syncSubscription(e).then(function(){return t(u.responseObj.SYNCED)}).catch(function(){return n(u.responseObj.SYNC_FAILED)})})):t(u.responseObj.ALREADY_SYNCED):(n(u.responseObj.INVALID_EMAIL),s.Helper.displayLog("Erorr : Sync Onetap response - ",l.KeyMapper.INVALID_PAYLOAD))})},u.parseJwt=function(e){e=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),e=decodeURIComponent(atob(e).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(e)},u.isDelayed=function(){var e=!1,t=new Date;return c.Storage.getConfigLocal(l.KeyMapper.ONETAP_REPEAT_PROMPT_DELAY)>t.getTime()&&(e=!0,s.Helper.displayLog("Wait until onetap repeat delay expire!")),e},u.syncSubscription=function(o){return new Promise(function(e,t){var n=s.Helper.getEndpoint("syncEmail");c.Storage.setConfigLocal(l.KeyMapper.EMAIL_NOT_SYNCED,1),i.HttpRequest.postForm(n,o,!0).then(function(){c.Storage.removeConfigLocal(l.KeyMapper.EMAIL_NOT_SYNCED),"Email payload synced successfully with ".concat(a.Config.brandingPartner),e(!0)}).catch(function(){return t(!1)})})},u.eventCallbackHandler=function(e){s.Helper.displayLog("one tap callback responce",e),"display"==e.g&&e.h?(u.setRepeatPromptDelay(a.Config.email.repeatPromptDelay),o.ChannelEventHandler.event("email",l.KeyMapper.EMAIL_INPROGRESS),s.Helper.displayLog("OneTap Prompt is Displayed on ".concat(1==s.Helper.getDeviceType()?"Desktop":"Mobile"))):o.ChannelEventHandler.event("email",l.KeyMapper.EMAIL_CLOSED),"skipped"!=e.g&&"dismissed"!=e.g||s.Helper.displayLog("OneTap Prompt is Dismissed or skipped")},u.setRepeatPromptDelay=function(e){var t;0!==e&&(t=(t=new Date).setTime(t.getTime()+60*e*1e3),"Setting email onetap repeat prompt delay for ".concat(e," minutes"),c.Storage.setConfigLocal(l.KeyMapper.ONETAP_REPEAT_PROMPT_DELAY,t))},u.isPromptShown=!1,u.emailValidatorRegex=new RegExp(/^\S+@\S+\.\S+$/),u.responseObj={SYNCED:{success:!0,response:"Synced"},ALREADY_SYNCED:{success:!0,response:"Already Synced"},INVALID_EMAIL:{success:!1,response:"Invalid Email",errorCode:1},SYNC_FAILED:{success:!1,response:"Sync failed",errorCode:2}},u);function u(){}},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},c=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Main=void 0;var l=n(1),u=n(0),i=n(26),r=n(14),p=n(5),a=n(10),d=n(3),s=n(13),f=n(11),g=n(27),y=n(29),m=n(25),h=n(2),S=n(16),b=n(15),v=n(17),C=n(30),w=n(31),E=n(32),T=n(4),_=n(8),O=n(6),P=n(18),D=n(7),M=n(24),H=n(9),I=n(12),N=n(28),L=n(22),A=n(19),R=n(23),n=(k.init=function(){if(void 0!==window._izooto)throw new Error("Duplicate Pixel Found !!");window._izooto={},1!=u.Config.izootoStatus?l.Helper.displayLog("".concat(u.Config.brandingPartner," has been disabled for this site!")):(f.IndexedDB.setup(),"undefined"==typeof Promise?(window.Promise=function(){},k.initIzooto()):p.NotificationHelper.getIzCidPromise().then(function(){k.initIzooto()}))},k.initIzooto=function(){return o(this,void 0,void 0,function(){return c(this,function(e){switch(e.label){case 0:return k.referenceHolder(),k.izootoFallbackHandler(),[4,u.Config.init()];case 1:return e.sent(),v.Session.init(),window._izooto.client=u.Config.client,d.Storage.legacyStorageMigration(),a.Queue.init(),T.HttpRequest.init(),""!=u.Config.notification.masterDomain&&u.Config.notification.isSupported?b.MasterDomain.init():k.moduleInitializer(),[2]}})})},k.referenceHolder=function(){window._izooto=u.Config,window._izooto.helperClass=l.Helper,window._izooto.gdprClass=i.GDPR,window._izooto.queueClass=a.Queue,window._izooto.notificationClass=r.Notification,window._izooto.notificationHelperClass=p.NotificationHelper,window._izooto.storageClass=d.Storage,window._izooto.debuggerClass=s.Debugger,window._izooto.indexedDBClass=f.IndexedDB,window._izooto.videoDropOffClass=y.VideoDropOff,window._izooto.tabAbandonmentClass=g.TabAbandonments,window._izooto.shopifyClass=m.Shopify,window._izooto.masterDomainClass=b.MasterDomain,window._izooto.messengerClass=S.Messenger,window._izooto.sessionClass=v.Session,window._izooto.crpsPlaybookClass=C.CRPSPlaybook,window._izooto.recommendArticleClass=w.RecommendArticle,window._izooto.autoSegmentClass=E.AutoSegment,window._izooto.newsHubClass=_.NewsHub,window._izooto.channelEventHandlerClass=O.ChannelEventHandler,window._izooto.onSiteClass=P.OnSite,window._izooto.gaClass=D.GoogleAnalytics,window._izooto.notificationFeedClass=M.NotificationFeed,window._izooto.cookieClass=H.CookieStorage,window._izooto.httpRequestClass=T.HttpRequest,window._izooto.adManagerClass=I.AdManager,window._izooto.adNetworkClass=N.AdNetwork,window._izooto.articleShareClass=L.ArticleShare,window._izooto.emailClass=A.Email,window._izooto.adBlockRecoveryClass=R.AdBlockRecovery},k.moduleInitializer=function(){return o(this,void 0,void 0,function(){var t;return c(this,function(e){switch(e.label){case 0:return[4,k.UUIDHandler()];case 1:return e.sent(),a.Queue.sync(!1),r.Notification.init(),A.Email.init(),t=!1,!u.Config.adBR.status||u.Config.global.isFrame?[3,3]:[4,R.AdBlockRecovery.detect()];case 2:t=e.sent(),R.AdBlockRecovery.initPopup(t),e.label=3;case 3:return u.Config.adBR.status&&t||(P.OnSite.init(),u.Config.newsHub.allVisitors&&_.NewsHub.init()),L.ArticleShare.init(),S.Messenger.init(),[2]}})})},k.UUIDHandler=function(){return o(this,void 0,void 0,function(){var t,n,o,i,r,a,s;return c(this,function(e){switch(e.label){case 0:return t=d.Storage.getStorage(h.KeyMapper.PUSH_TOKEN),n=p.NotificationHelper.getSubscriptionKey(t),[4,l.Helper.isUUID()];case 1:return e.sent()?(o=u.Config,[4,l.Helper.getUUID()]):[3,3];case 2:return o.UUID=e.sent(),[3,9];case 3:return n?[4,l.Helper.getUUIDFromEndpoint(t)]:[3,5];case 4:return r=e.sent(),u.Config.UUID=""==r?n:r,[3,9];case 5:return[4,p.NotificationHelper.isHttpsSitePermissionAlreadyGranted()];case 6:return e.sent()?(i="",[4,p.NotificationHelper.getCurrentSubscription()]):[3,9];case 7:return(i=e.sent())?[4,l.Helper.getUUIDFromEndpoint(i)]:[3,9];case 8:""==(r=e.sent())?(a=p.NotificationHelper.getSubscriptionKey(i),u.Config.UUID=a):u.Config.UUID=r,e.label=9;case 9:return u.Config.UUID?[3,11]:(s=u.Config,[4,l.Helper.getUUID()]);case 10:s.UUID=e.sent(),e.label=11;case 11:return[4,l.Helper.setUUID()];case 12:return e.sent(),[2]}})})},k.izootoFallbackHandler=function(){window._izooto.optinCallback=function(e){r.Notification.optinCallback(e)},window._izooto.gdprCallback=function(e){i.GDPR.gdprCallback(e)},window._izooto.closeDialog=function(e){r.Notification.closeDialog(e)},window._izooto.openPopup=function(e){r.Notification.openPopup(!0)},window._izooto.closeHttpsBranding=function(){p.NotificationHelper.closeHttpsOverlay()},window._izooto.gdprAllow=function(){i.GDPR.gdprAllow()},window._izooto.gdprDisallow=function(){i.GDPR.gdprDisallow()},window._izooto.syncHookInDb=function(){return p.NotificationHelper.syncHookInDb("syncNotificationView")},window._izooto.syncHookInDb=function(){return p.NotificationHelper.syncHookInDb("syncNotificationClick")},window._izooto.getStorage=function(e){return"iztoken"==e?e=h.KeyMapper.PUSH_TOKEN:"uid"==e&&(e=h.KeyMapper.UUID),d.Storage.getStorage(e)},window._izooto.getBrowserKeyFromToken=function(e){return p.NotificationHelper.getSubscriptionKey(e)},window.izootoEmailSubcriptionCallBack=function(e){A.Email.processOneTapEncodedResponse(e)},window.izootoEmailEventsCallback=function(e){A.Email.eventCallbackHandler(e)}},k);function k(){}(t.Main=n).init()},function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},s=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeedHelper=void 0;var T=n(0),_=n(1),i=n(4),o=n(11),O=n(2),P=n(3),r=n(8),n=(c.prototype.setup=function(){return a(this,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return[4,this.readLastClickVisitFromDb()];case 1:return e.sent(),[4,(t=this).getAllNotificationsFromDb()];case 2:return t.notificationTempQ=e.sent(),[2,Promise.resolve(!0)]}})})},c.prototype.loadNotifications=function(o){return void 0===o&&(o=this.currentJsonFileIndex),a(this,void 0,void 0,function(){var n;return s(this,function(e){return n=this,[2,new Promise(function(t,e){n.isNewsLoading?t({data:[],status:n.status.ALREADY_IN_PROGRESS}):4<o?t({data:[],status:n.status.FAILED}):(n.isNewsLoading=!0,i.HttpRequest.get(n.cdnCampaignsSrc(o)).then(function(e){++n.currentJsonFileIndex,n.isNewsLoading=!1;e=_.Helper.parseToJSON(e);0==o&&(c.saveLastNotificationIntoLocalStorage(e),r.NewsHub.updateLatestNotificationValue()),t({data:e,status:n.status.SUCCESS})}).catch(function(){t({data:[],status:n.status.FAILED})}))})]})})},c.saveLastNotificationIntoLocalStorage=function(e){e=e[0];e.hasOwnProperty("p")&&(e=e.p.r,P.Storage.setConfigLocal(O.KeyMapper.NEWSHUB_LATEST_OPEN_NOTIFICATION,e))},c.prototype.loadSortedNotifications=function(){return a(this,void 0,void 0,function(){var o;return s(this,function(e){return o=this,[2,new Promise(function(n,e){o.loadNotifications().then(function(e){var t=e.data,e=e.status;e==o.status.SUCCESS?(o.storeSegmentIntoIdb(t),t=parseInt(t[t.length-1].p.ct),o.sortNotificationsFromIdb(t)):e==o.status.FAILED&&o.sortNotificationsFromIdb(0),n(e)})})]})})},c.prototype.getNotifications=function(r){return void 0===r&&(r=this.minimumNotificationToShow),a(this,void 0,void 0,function(){var o,i,t=this;return s(this,function(e){return o=this,i=[],[2,new Promise(function(n,e){return a(t,void 0,void 0,function(){var t;return s(this,function(e){switch(e.label){case 0:return o.canLoadMore?o.notificationShowList.length<r?[4,o.loadSortedNotifications()]:[3,2]:[3,2];case 1:if((t=e.sent())==o.status.ALREADY_IN_PROGRESS)return[2,n({data:[],status:t})];o.canLoadMore=t==o.status.SUCCESS,e.label=2;case 2:return this.notificationShowList.length<r&&o.canLoadMore?[2,n(this.getNotifications())]:(i=this.notificationShowList.splice(0,r),t=o.status.SUCCESS,t=o.ridsList.length?i.length?o.status.SUCCESS:o.status.NO_MORE_NOTIFICATIONS:o.status.NULL_NOTIFICATION_SENT,n({data:i,status:t}),[2])}})})})]})})},c.prototype.cdnCampaignsSrc=function(e){return T.Config.hashFileName?"https://nh.iz.do/nh/".concat(T.Config.hashFileName,"/").concat(e,".json"):""},c.prototype.getAllNotificationsFromDb=function(){return a(this,void 0,void 0,function(){var i,r=this;return s(this,function(e){switch(e.label){case 0:return i=[],[4,o.IndexedDB.getIndexDBData("notificationLog","all").then(function(e){if(e){e.sort(function(e,t){return t.payload.ct-e.payload.ct}),e.forEach(function(e){e.key.toString().length<=15&&-1==r.cidsList.indexOf(e.payload.id)&&(e.key.toString().startsWith("6")||e.key.toString().startsWith("7")||(i.push(e),r.ridsList.push(e.key),r.cidsList.push(e.payload.id)))});for(var t=0,n=i;t<n.length;t++){var o=n[t];if(!o.payload.hasOwnProperty("vr")){r.dbLatestTimeStamp=parseInt(o.payload.ct);break}}return i}_.Helper.displayLog("Notication Log : data not found in db!")}).catch(function(e){_.Helper.displayLog(e)})];case 1:return[2,e.sent()]}})})},c.prototype.segmentParser=function(e){var t,n=["px","dev","lci","lvi"];for(t in e){if(!(-1<n.indexOf(t)))return!1;if("dev"==t){if(-1==e.dev[0].indexOf(T.Config.global.deviceType))return _.Helper.displayLog("Device segment validation failed"),!1}else{if("px"==t&&!this.isUserPropertySegmentValidated(e))return _.Helper.displayLog("User property segment validation failed"),!1;if(("lci"==t||"lvi"==t)&&!this.isDateTimeSegmentValidated(e,t))return _.Helper.displayLog("Last click segment validation failed"),!1}}return!0},c.prototype.isUserPropertySegmentValidated=function(a){var e,s={yes:!0,no:!1},c=a.px,l=this;for(e in c){var t=function(t){for(var e=c[t],n=0,o=e.values;n<o.length;n++){var i=o[n],r=i.v;if(1==e.multi)switch(i.op){case"contains":case"equals":if(r.every(function(e){return-1==P.Storage.getConfigLocal(t,O.KeyMapper.USER_PROPERTY).indexOf(e)}))return{value:!1};break;case"does not contain":case"not contains":case"not equals":if(r.every(function(e){return-1<P.Storage.getConfigLocal(t,O.KeyMapper.USER_PROPERTY).indexOf(e)}))return{value:!1}}else{if("datetime"==e.type)return{value:l.isDateTimeSegmentValidated(a,"px",t)};switch(r="boolean"==e.type?s[r]:r,i.op){case"equals":if(P.Storage.getConfigLocal(t,O.KeyMapper.USER_PROPERTY)!=r)return{value:!1};break;case"not equals":if(P.Storage.getConfigLocal(t,O.KeyMapper.USER_PROPERTY)==r)return{value:!1};break;case"greater than":if(P.Storage.getConfigLocal(t,O.KeyMapper.USER_PROPERTY)<=r)return{value:!1};break;case"less than":if(P.Storage.getConfigLocal(t,O.KeyMapper.USER_PROPERTY)>=r)return{value:!1}}}}}(e);if("object"==typeof t)return t.value}return!0},c.prototype.isDateTimeSegmentValidated=function(e,t,n){var o,e=e[t],i="lci"==t?T.Config.store.lastClick:T.Config.store.lastView;if("px"==t)try{var r=P.Storage.getConfigLocal(n,O.KeyMapper.USER_PROPERTY);if(!r)return!1;for(var i=new Date(r).getTime(),a=[],s=null===(o=e[n])||void 0===o?void 0:o.values,c=0,l=s;c<l.length;c++){var u=l[c];a.push(u.v)}e=a}catch(e){}if(!i)return _.Helper.displayLog("Last click or visit key not found in db"),!1;for(var p=0,d=e;p<d.length;p++){var f,g=!!(f=d[p]).d1&&new Date(f.d1),y=!!f.d2&&new Date(f.d2),m=f.days||!1,h=f["min-days"]||!1,S=f["max-days"]||!1,b=(b=new Date(i)).toLocaleDateString(),v=new Date,C=new Date;switch(_.Helper.displayLog("Last Click Visit Operation: ",f.op),f.op){case"before":if(i>g.getTime())return!1;break;case"after":if(i<g.getTime())return!1;break;case"on":if(b!=g.toLocaleDateString())return!1;break;case"between":if(g.getTime()>i&&i<y.getTime())return!1;break;case"in the past":if(C.setDate(v.getDate()-m),i<C.getTime())return!1;break;case"was exactly":if(C.setDate(v.getDate()-m),b!=C.toLocaleDateString())return!1;break;case"today":if(b!=v.toLocaleDateString())return!1;break;case"relative between":var w=C.setDate(v.getDate()-h),E=C.setDate(v.getDate()-S);if(i<w&&i<E)return!1;break;default:return!1}}return!0},c.prototype.readLastClickVisitFromDb=function(){return a(this,void 0,void 0,function(){return s(this,function(e){return[2,new Promise(function(t,e){o.IndexedDB.getIndexDBData("swEvents","click").then(function(e){e?(_.Helper.displayLog("Last click found from db: ",e),T.Config.store.lastClick=1e3*e.timestamp):_.Helper.displayLog("Last click not found ")}).catch(function(e){_.Helper.displayLog(e)}).then(function(){o.IndexedDB.getIndexDBData("swEvents","view").then(function(e){e?(T.Config.store.lastView=1e3*e.timestamp,t(T.Config.store.lastView)):(_.Helper.displayLog("Last view not found"),t(!1))}).catch(function(e){_.Helper.displayLog(e),t(!1)})})})]})})},c.prototype.sortNotifications=function(e){var t={payload:e};if(-1<this.cidsList.indexOf(e.id))return e.r,void e.id;if(e.o)_.Helper.displayLog("Excluding offline campaign from newshub",e);else{if(t&&e.hasOwnProperty("r")){if(16<=e.r.length)return void _.Helper.displayLog("Excluding plalybook & subid notifications");if(e.r.startsWith("6")||e.r.startsWith("7"))return void _.Helper.displayLog("Excluding Notification which startwith 6 or 7");t.key=parseInt(e.r),t.clickedAt=!1,t.receivedAt=Date.now()}if(!(-1<this.ridsList.indexOf(parseInt(e.r))))return this.ridsList.push(parseInt(e.r)),this.cidsList.push(e.id),this.notificationShowList.push(t),this.notificationShowList.sort(function(e,t){return t.payload.ct-e.payload.ct}),t}},c.prototype.setDataIntoDB=function(e){e.fetched=1,o.IndexedDB.addUpdateToTable("notificationLog",e).then(function(e){_.Helper.displayLog(e)}).catch(function(e){_.Helper.displayLog(e)})},c.prototype.setPayloadData=function(e,n){(e="number"==typeof e?[e]:e).forEach(function(t){"Set payload data to db : ".concat(t),o.IndexedDB.getIndexDBData("notificationLog",t).then(function(e){e.hasOwnProperty("clickedAt")&&!e.clickedAt&&n.hasOwnProperty("clickedAt")?(e.clickedAt=n.clickedAt,o.IndexedDB.addUpdateToTable("notificationLog",e).then(function(e){"Mark as read : ".concat(t," successfull")}).catch(function(e){_.Helper.displayLog("Mark as read Error ".concat(t),e)})):_.Helper.displayLog("Notication Log : data not found in db!")}).catch(function(e){_.Helper.displayLog(e)})})},c.prototype.sortNotificationsFromIdb=function(n){var o=this;this.notificationTempQ.forEach(function(e,t){-1==o.notificationShowKeyList.indexOf(e.key)&&e.payload.ct>=n&&(o.notificationShowKeyList.push(e.key),o.notificationShowList.push(e))}),this.notificationShowList.sort(function(e,t){return t.payload.ct-e.payload.ct})},c.prototype.storeSegmentIntoIdb=function(e){for(var t=0,n=e;t<n.length;t++){var o=n[t],i=!1;1!=(i=!o.a||this.segmentParser(_.Helper.parseToJSON(o.a))?!0:i)||(o=this.sortNotifications(o.p))&&this.setDataIntoDB(o)}},c);function c(e){this.minimumNotificationToShow=e,this.status={NO_MORE_NOTIFICATIONS:"No more notifications available",ALREADY_IN_PROGRESS:"Older request already in progress",NULL_NOTIFICATION_SENT:"Null: No notifications sent",SUCCESS:"success",FAILED:"failed"},this.isNoNotification=!0,this.ridsList=[],this.cidsList=[],this.canLoadMore=!0,this.isNewsLoading=!1,this.dbLatestTimeStamp=0,this.notificationTempQ=[],this.notificationShowKeyList=[],this.currentJsonFileIndex=0,this.notificationShowList=[]}t.FeedHelper=n},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},r=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ArticleShare=void 0;var o=n(0),a=n(1),s=n(18),c=n(2),l=n(12),u=n(6),p=n(4);t.ArticleShare=(d.init=function(){0==o.Config.articleShare.status||o.Config.global.isFrame||3!=o.Config.global.deviceType||"/"==window.location.pathname?a.Helper.displayLog("ArticleShare is disabled for this site:"):o.Config.articleShare.rid&&o.Config.articleShare.cid&&(a.Helper.isRepeatDelayActive(c.KeyMapper.SHAREARTICLE_DELAY)||null!=navigator.share&&(d.getPageHeight(),d.registerEvent()))},d.registerEvent=function(){1<=o.Config.global.deviceType&&d.articleShareScollHandler(function(){d.initializeTemplate()})},d.articleShareScollHandler=function(t){var n;a.Helper.isScreenScrollable()&&(n=0,document.addEventListener("scroll",function(){d.onUrlChangeHandler(t);var e=window.pageYOffset||document.documentElement.scrollTop;n<e&&(""!=d.articleUrl?t():d.matchScrollPercent(t)),n=e<=0?0:e},!1))},d.getPageHeight=function(){var e=document.body,t=document.documentElement,t=Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight);d.pageHeight=t},d.matchScrollPercent=function(e){var t=document.documentElement.scrollTop,n=90*document.documentElement.clientHeight/100,t=90*(d.pageHeight-t)/100;t<=n&&e()},d.initializeOnScrollPercent=function(e){var t=document.documentElement,n=document.body,o="scrollTop",i="scrollHeight",t=(t[o]||n[o])/((t[i]||n[i])-t.clientHeight)*100;90<=Math.round(t)&&e()},d.initializeTemplate=function(){d.isDialogInitialize||(d.isDialogInitialize=!0,s.OnSite.getHTML(d.htmlSrc).then(function(e){a.Helper.addHTML("div",e,"iz-osn-article-share"),u.ChannelEventHandler.event("articleShare",c.KeyMapper.ARTICLESHARE_READY_SHOW)}))},d.clickHandler=function(){var e=this,t=document.querySelector(".iz_osn_share_button_3");""==d.articleUrl&&(d.articleUrl=window.location.href);var n,o={url:n=-1<d.articleUrl.indexOf("utm_source=izooto&utm_medium=onsite_interactions&utm_campaign=article_share")?d.articleUrl:d.articleUrl+"?utm_source=izooto&utm_medium=onsite_interactions&utm_campaign=article_share",title:document.title||""};t.addEventListener("click",function(){return i(e,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,navigator.share(o)];case 1:return e.sent(),d.syncArticleShareClick(n),[3,3];case 2:return e.sent(),[3,3];case 3:return[2]}})})})},d.closeHandler=function(){try{var e=document.querySelector(".iz_osn_close_3");e.addEventListener("click",function(e){a.Helper.hideElement("#iz-osn-article-share"),d.syncArticleShareDismissed(),u.ChannelEventHandler.event("articleShare",c.KeyMapper.ARTICLESHARE_CLOSED),a.Helper.setRepeatPromptDelay(o.Config.articleShare.closeDelay,c.KeyMapper.SHAREARTICLE_DELAY)})}catch(e){}},d.hideArticleShareDialog=function(){a.Helper.hideElement("#iz-osn-article-share")},d.onUrlChangeHandler=function(e){try{var t=window.location.href,n=new MutationObserver(function(e){window.location.href!==t&&(d.articleUrl=t)});n.observe(document,{subtree:!0,childList:!0})}catch(e){a.Helper.displayLog("The page url is not changed")}},d.showArticleShareDialogEventHandling=function(){d.showArticleShareDialog(),u.ChannelEventHandler.event("articleShare",c.KeyMapper.ARTICLESHARE_SHOWN),d.syncArticleShareView(),a.Helper.setRepeatPromptDelay(o.Config.articleShare.repeatDelay,c.KeyMapper.SHAREARTICLE_DELAY),d.clickHandler(),d.closeHandler()},d.showArticleShareDialog=function(){document.querySelector("#iz-osn-article-share").style.display="block"},d.adsHandler=function(){1!=d.adLoaded&&(d.adLoaded=!0,l.AdManager.loadShareArticleAd())},d.trackingObj=function(){return{pid:o.Config.client,bkey:o.Config.UUID,cid:o.Config.articleShare.cid,rid:o.Config.articleShare.rid,tt:3,ot:o.Config.articleShare.type}},d.syncArticleShareView=function(){var e=d.trackingObj(),t=a.Helper.getEndpoint("syncOnsiteView");p.HttpRequest.postForm(t,e,!0).then(function(){"ArticleShare view Api synced successfully with ".concat(o.Config.brandingPartner)}).catch(function(e){})},d.syncArticleShareClick=function(e){var t=d.trackingObj(),e=encodeURIComponent(e);t.link=e;e=a.Helper.getEndpoint("syncOnsiteClick");p.HttpRequest.postForm(e,t,!0).then(function(){"Articleshare click Api synced successfully with ".concat(o.Config.brandingPartner)}).catch(function(e){})},d.syncArticleShareDismissed=function(){var e=d.trackingObj(),t=a.Helper.getEndpoint("syncOnsiteDismissed");p.HttpRequest.postForm(t,e,!0).catch(function(e){})},d.isDialogInitialize=!1,d.readyToShow=!1,d.articleUrl="",d.adLoaded=!1,d.htmlSrc="https://cdn.izooto.com/osn/articleshare/widget.html",d.pageHeight="",d);function d(){}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},r=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AdBlockRecovery=void 0;var o=n(12),a=n(6),s=n(0),c=n(1),l=n(4),u=n(2),p=n(3);t.AdBlockRecovery=(d.insertAdsIntoDom=function(){return i(this,void 0,void 0,function(){var n=this;return r(this,function(e){return[2,new Promise(function(e){function t(){c.Helper.addHTML("div",n.generatesBannersString(),f.adChecker),e(!0)}"complete"===document.readyState||"interactive"===document.readyState?t():document.addEventListener("DOMContentLoaded",t)})]})})},d.detect=function(){var o;return i(this,void 0,void 0,function(){var t,n=this;return r(this,function(e){switch(e.label){case 0:return[4,this.insertAdsIntoDom()];case 1:return e.sent(),t=!this.bannerIds.every(function(e){return n.checkVisibility(e)}),null!==(o=c.Helper.getDomElement("#"+f.adChecker))&&void 0!==o&&o.remove(),[2,t]}})})},d.generatesBannersString=function(){return this.bannerIds.map(function(e){return'<div id="'.concat(e,'"></div>')}).join("")},d.checkVisibility=function(e){return(null===(e=c.Helper.getDomElement("#".concat(e)))||void 0===e?void 0:e.offsetParent)||null},d.initPopup=function(t){var e,n,o=this;void 0===t&&(t=!1),(p.Storage.getConfigLocal(u.KeyMapper.ONSITE_ADS_ALLOWED)||t)&&(e=s.Config.adBR.templateId,n=s.Config.adBR.htmlVersion[e],l.HttpRequest.get("https://cdn.izooto.com/osn/adbr/".concat(e,"/v").concat(n,".html")).then(function(e){c.Helper.addHTML("div",e),o.attachEventListners(),o.setSiteLogo(),o.setScreen(t),3<=p.Storage.getConfigLocal(u.KeyMapper.ONSITE_ADS_REFRESH_COUNT)&&(o.showCloseButton(),p.Storage.removeConfigLocal(u.KeyMapper.ONSITE_ADS_REFRESH_COUNT)),a.ChannelEventHandler.event("adblock",u.KeyMapper.ADBLOCK_READY_SHOW)}).catch(function(e){}))},d.setSiteLogo=function(){var t=this;s.Config.adBR.logoSrc?document.querySelectorAll("."+f.brandImage).forEach(function(e){e.src=s.Config.adBR.logoSrc,e.onerror=function(){return t.brandLogoNotAvailable()}}):this.brandLogoNotAvailable()},d.setScreen=function(e){p.Storage.getConfigLocal(u.KeyMapper.ONSITE_ADS_ALLOWED)&&0==e?this.showThankyouSection():(this.syncImpression(),p.Storage.setConfigLocal(u.KeyMapper.ONSITE_ADS_ALLOWED,1),p.Storage.setConfigLocal(u.KeyMapper.ONSITE_ADS_REFRESH_COUNT,(p.Storage.getConfigLocal(u.KeyMapper.ONSITE_ADS_REFRESH_COUNT)||0)+1))},d.attachEventListners=function(){var e=this,t=c.Helper.getDomElement("."+f.allowADS),n=c.Helper.getDomElement("."+f.refreshButton),o=c.Helper.getDomElement("."+f.closeButton);t.addEventListener("click",function(){c.Helper.hideElement("."+f.section1),c.Helper.hideElement("."+f.section3),c.Helper.showElement("."+f.content)}),n.addEventListener("click",function(){window.location.reload()}),o.addEventListener("click",function(){e.hidePopup()});var i=document.querySelectorAll("."+f.tabButton);i.forEach(function(e,n){e.addEventListener("click",function(){document.querySelectorAll("."+f.tabContent+" ol").forEach(function(e,t){i[t].classList.add(f.activeTab),n==t?(e.style.display="block",i[t].classList.add(f.activeTab)):(e.style.display="none",i[t].classList.remove(f.activeTab))})})})},d.showThankyouSection=function(){p.Storage.removeConfigLocal(u.KeyMapper.ONSITE_ADS_ALLOWED),this.syncClick(),this.showCloseButton(),c.Helper.hideElement("."+f.section1),c.Helper.hideElement("."+f.content),c.Helper.showElement("."+f.section3,!1),s.Config.adBR.adUnit&&o.AdManager.loadAdBlockerAd().catch(function(){})},d.syncImpression=function(){this.sendToServer(c.Helper.getEndpoint("syncOnsiteView"))},d.syncClick=function(){this.sendToServer(c.Helper.getEndpoint("syncOnsiteClick"))},d.sendToServer=function(e){var t={pid:s.Config.client,bkey:s.Config.UUID,cid:s.Config.adBR.cid,rid:s.Config.adBR.rid,ot:4};s.Config.adBR.rid&&s.Config.adBR.cid&&l.HttpRequest.postForm(e,t,!0).then(function(){"Onsite Adblocker ".concat(e," synced successfully with ").concat(s.Config.brandingPartner)}).catch(console.log)},d.showCloseButton=function(){c.Helper.getDomElement("."+f.closeButton).style.visibility="visible"},d.hidePopup=function(){c.Helper.hideElement("#"+f.mainContainer),a.ChannelEventHandler.event("adblock",u.KeyMapper.ADBLOCK_CLOSED)},d.brandLogoNotAvailable=function(){var e=window.location.hostname.split(".");"www"===e[0]&&e.splice(0,1);var t=e.join(".").toUpperCase();document.querySelectorAll("."+f.brandURL).forEach(function(e){e.style.display="-webkit-box",e.innerHTML=t}),document.querySelectorAll("."+f.brandImage).forEach(function(e){e.style.display="none"})},d.showPopup=function(){c.Helper.showElement("#"+f.mainContainer)},d.bannerIds=["AdHeader","AdContainer","AD_Top","homead","ad-lead"],d);function d(){}var t="iz_osn_adblocker_",f={mainContainer:"iz_osn_adblocker",adChecker:"".concat(t,"detect_container"),brandImage:"".concat(t,"logo img"),brandURL:"".concat(t,"logo_text"),allowADS:"".concat(t,"allowads_button"),refreshButton:"".concat(t,"refresh_button"),section1:"".concat(t,"content_section_1"),content:"".concat(t,"content_section_2"),section3:"".concat(t,"content_section_3"),activeTab:"".concat(t,"active_tab"),tabButton:"".concat(t,"tab_button"),tabContent:"".concat(t,"tab_content"),closeButton:"".concat(t,"close a")}},function(e,t,n){"use strict";var o=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function o(e){try{r(c.next(e))}catch(e){t(e)}}function i(e){try{r(c.throw(e))}catch(e){t(e)}}function r(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,i)}r((c=c.apply(e,a||[])).next())})},i=this&&this.__generator||function(n,o){var i,r,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(t){return function(e){return function(t){if(i)throw new TypeError("Generator is already executing.");for(;c&&t[c=0]&&(s=0),s;)try{if(i=1,r&&(a=2&t[0]?r.return:t[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,t[1])).done)return a;switch(r=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,r=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],r=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationFeed=void 0;var r=n(0),a=n(21),s=n(1);t.NotificationFeed=(c.init=function(t){return o(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return r.Config.newsHub.allowFeed?(c.feedCallback=t,c.isInititated?[3,2]:(c.isInititated=!0,this.apiFeed=new a.FeedHelper(c.minimumNotifications),[4,this.apiFeed.setup()])):[2];case 1:e.sent(),e.label=2;case 2:return c.handler(),[2]}})})},c.handler=function(){return o(this,void 0,void 0,function(){var t,n,o;return i(this,function(e){switch(e.label){case 0:return[4,this.apiFeed.getNotifications()];case 1:switch(o=e.sent(),n=o.data,o=o.status){case this.apiFeed.status.NO_MORE_NOTIFICATIONS:t=1;break;case this.apiFeed.status.NULL_NOTIFICATION_SENT:t=2;break;case this.apiFeed.status.ALREADY_IN_PROGRESS:t=3}return n=this.dataParser(n),this.respondToCallback(o==this.apiFeed.status.SUCCESS,n,o,t),[2]}})})},c.respondToCallback=function(e,t,n,o){void 0===t&&(t=[]),"function"==typeof this.feedCallback&&c.feedCallback(this.getResponseFormate(e,t,n,o)),this.feedCallback=void 0},c.getResponseFormate=function(e,t,n,o){n={success:e=void 0===e?!1:e,data:t=void 0===t?[]:t,response:n};return o&&(n.errorCode=o),n},c.dataParser=function(e){var o=[];return e.forEach(function(e){var t=e.payload,n=e.receivedAt,e=s.Helper.replaceQueryParam(t.ln,"utm_source","izooto"),e=s.Helper.replaceQueryParam(e,"utm_medium","notification_feed"),n={title:t.t,message:t.m,bannerImage:t.bi||"",icon:t.i,landingUrl:e,createdAt:t.ct||n};o.push(n)}),o},c.statusText={EMPTY:"No more notifications available",SUCCESS:"Notification feed fetched successfully",FAIL:"Null: No notifications sent"},c.minimumNotifications=10,c.isInititated=!1,c);function c(){}},function(e,t,n){"use strict";var l=this&&this.__assign||function(){return(l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Shopify=void 0;var u=n(0),p=n(1),d=n(3),f=n(4),g=n(5),a=n(9),y=n(2);t.Shopify=(m.init=function(e){window._izooto[m._izLastVariantCookieName]="";var t,n=null!=e?e:!1;if(2==u.Config.notification.isShopify)return m.shopifyCart(),void p.Helper.displayLog("Old Shopify");1==u.Config.notification.isShopify&&(p.Helper.displayLog("New Shopify"),e=5*Math.random(),(t=new XMLHttpRequest).addEventListener("load",function(e){m.shopifyCartTracker(t,n)}),t.open("GET","/cart.js?"+e),t.send()),m.resetProductCookie(),m.checkAndSendShopifyEvents(!0)},m.shopifyCartTracker=function(e,t){var n="iz_sh_cart_v2";p.Helper.displayLog(e),p.Helper.displayLog("Purge :"+t),o=p.Helper.parseToJSON(e.responseText),p.Helper.displayLog(o);o.items;var o,i=o.token,r=d.Storage.getStorage(n);null!=i&&""!=i&&((e=new Date).setTime(e.getTime()+864e5),e.toUTCString(),i==r&&!t||(o=d.Storage.getStorage(y.KeyMapper.PUSH_TOKEN),e=0,o=p.Helper.parseToJSON(o),1<Object.keys(o).length&&(e=1),p.Helper.displayLog("[Mapper hit]"),r=p.Helper.getEndpoint("ShopifyMapper"),t=d.Storage.getStorage(y.KeyMapper.PUSH_TOKEN),t=p.Helper.parseToJSON(t),t={bkey:u.Config.UUID,btype:p.Helper.getBrowserType(),dtype:p.Helper.getDeviceType(),pid:u.Config.client,shopify_token:i,pte:u.Config.notification.subscriptionType,custom_topic:"custom-js-mapper"},1==e&&(t.auth=o.keys.auth,t.pk=o.keys.p256dh),u.Config.global.browserName!=y.KeyMapper.BROWSER_SAFARI&&(t=l(l({},t),p.Helper.endPointParamExtract(d.Storage.getStorage(y.KeyMapper.PUSH_TOKEN)))),f.HttpRequest.postForm(r,t).catch(function(e){}),a.CookieStorage.setCookie(n,i,1)))},m.shopifyFix=function(){try{var e=document.createElement("img");e.style.width="0px",e.style.height="0px",e.src=document.location.protocol+"//"+document.location.hostname+u.Config.notification.manifest}catch(e){}},m.shopifyCart=function(){var e=d.Storage.getStorage("cart");void 0!==e&&""!==e&&(e=-1!=e.indexOf("=")?e.split("=")[1]:e)!==d.Storage.getStorage("iz_sh_cart")&&"ckout="!=e&&(a.CookieStorage.setCookie("iz_sh_cart",e),window._izq.push(["event","add_to_cart",{cart_id:e}]))},m.resetProductCookie=function(){window._izooto[m._izLastVariantCookieName]="",a.CookieStorage.setCookie(m._izLastVariantCookieName,"")},m.checkIfVariantChanged=function(){var e=""==window._izooto[m._izLastVariantCookieName]?a.CookieStorage.getCookie(m._izLastVariantCookieName):window._izooto[m._izLastVariantCookieName],t=window.ShopifyAnalytics.meta.selectedVariantId;return 1!=m.sentShopifyProduct&&(void 0===t?(m.sentShopifyProduct=1,!0):t!=e&&(window._izooto[m._izLastVariantCookieName]=t,a.CookieStorage.setCookie(m._izLastVariantCookieName,t),!0))},m.listenToProductVariant=function(e){m.checkIfVariantChanged()&&e(),setTimeout(function(){m.listenToProductVariant(e)},m._izProductVariantModifiedCheckInterval)},m.getShopifyModule=function(){try{if(n=window.ShopifyAnalytics.meta.page.pageType)return n}catch(e){u.Config.debug&&console.warn("ShopifyAnalytics not available, parsing URL")}var e=location.hostname,t=location.pathname.split("/"),n=t[1],t=t[2];if(""===n)return m._izShopifyModules.storeSections.home;if(n===m._izShopifyModules.storeRoots.cart)return m._izShopifyModules.storeRoots.cart;if(n===m._izShopifyModules.storeRoots.account&&t===m._izShopifyModules.storeRoots.orders)return m._izShopifyModules.storeRoots.orders;if("account"===n&&!n)return m._izShopifyModules.storeSections.orders;if("checkout.shopify.com"===e||"checkouts"===t)return m._izShopifyModules.storeSections.checkout;if(void 0!==window.__st&&window.__st.s){t=window.__st.partZero.split("-")[0];return"collections"===t?m._izShopifyModules.storeSections.collection:"products"===t?m._izShopifyModules.storeSections.product:void 0}},m.sendShopifyProductViewEvent=function(){var e=location.pathname,s=window.ShopifyAnalytics.meta.selectedVariantId,e=e.split("/"),c=e[e.length-1],e=m._izAjaxApi.products+c;f.HttpRequest.get(e+="?izreq=product",void 0,{Accept:"application/json"}).then(function(e){try{var t=JSON.parse(e)}catch(e){p.Helper.displayLog("Could not fetch data from product API")}if("object"==typeof t&&""!=d.Storage.getStorage(y.KeyMapper.PUSH_TOKEN)){var n,o=t.product,i=o.variants,e=d.Storage.getStorage(y.KeyMapper.PUSH_TOKEN),t=p.Helper.getEndpoint("shopifyAPI")+"?p=p",r={pid:u.Config.client,btype:p.Helper.getBrowserType(),pte:u.Config.notification.subscriptionType,custom_topic:m._izShopifyTopics.productView,product_id:o.id.toString(),product_title:encodeURIComponent(o.title),product_handle:encodeURIComponent(c),product_page:encodeURIComponent(window.location.href),product_type:o.product_type},r=l(l({},r),g.NotificationHelper.getSubscriptionParameters(e));for(n in p.Helper.displayLog(o),null!=o.image&&null!=o.image.src&&(r.product_image=o.image.src),i){var a=i[n];if(a.id==s){r.product_price=a.price;break}}f.HttpRequest.postForm(t,r).catch(function(e){})}})},m.sendShopifyCollectionViewEvent=function(){var i,e=m._izShopifyModules.storeSections.collection+"s",t=location.pathname.split("/"),e=t.indexOf(e);-1==e?p.Helper.displayLog("Unable to identify collection"):(i=t[e+1],m._izEventNames.collectionAll!=i?(e=m._izAjaxApi.collections+i,f.HttpRequest.get(e+="?izreq=collections",void 0,{Accept:"application/json"}).then(function(e){var t,n,o;try{o=JSON.parse(e)}catch(e){p.Helper.displayLog("Could not fetch data from collection API")}"object"==typeof o&&""!=d.Storage.getStorage(y.KeyMapper.PUSH_TOKEN)&&(t=o.collection,n=p.Helper.getEndpoint("shopifyAPI")+"?p=p",e=d.Storage.getStorage(y.KeyMapper.PUSH_TOKEN),o={pid:u.Config.client,btype:p.Helper.getBrowserType(),pte:u.Config.notification.subscriptionType,custom_topic:m._izShopifyTopics.collectionView,collection_id:t.id.toString(),collection_handle:encodeURIComponent(i),collection_title:encodeURIComponent(t.title),collection_page:encodeURIComponent(window.location.href)},o=l(l({},o),g.NotificationHelper.getSubscriptionParameters(e)),null!=t.image&&null!=t.image.src&&(o["collection_image="]=t.image.src),f.HttpRequest.postForm(n,o).catch(function(e){}))})):p.Helper.displayLog("Ignoring collection view event for:"+m._izEventNames.collectionAll))},m.checkAndSendShopifyEvents=function(e){var t=m.getShopifyModule();switch(p.Helper.displayLog("Detected shopify module : ",t),t){case m._izShopifyModules.storeSections.collection:m.sendShopifyCollectionViewEvent();break;case m._izShopifyModules.storeSections.product:null!=e&&e?m.listenToProductVariant(m.sendShopifyProductViewEvent):m.sendShopifyProductViewEvent()}},m._izShopifyModules={storeSections:{home:"home",collection:"collection",product:"product",cart:"cart",checkout:"checkout",order:"order",orders:"orders"},storeRoots:{cart:"cart",account:"account",orders:"orders"}},m._izEventNames={productView:"product_viewed",collectionView:"collection_viewed",collectionAll:"all"},m._izAjaxApi={products:"/products/",collections:"/collections/"},m._izShopifyTopics={productView:"product/view",collectionView:"collection/view"},m._izLastVariantCookieName="iz_last_sh_variant",m._izProductVariantModifiedCheckInterval=5e3,m.sentShopifyProduct=0,m);function m(){}},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.GDPR=void 0;var i=n(0),r=n(1),a=n(5),s=n(4),c=n(3),l=n(10),u=n(2);t.GDPR=(p.init=function(){try{null!=i.Config.notification.gdprPrompt&&self==top&&(i.Config.notification.gdprPrompt.title=null!=i.Config.notification.gdprPrompt.title&&""!=i.Config.notification.gdprPrompt.title?i.Config.notification.gdprPrompt.title:"In order to send relevant and personalized notifications to you, we would like to capture your location and website activity.",i.Config.notification.gdprPrompt.btn2Txt=null!=i.Config.notification.gdprPrompt.btn2Txt&&""!=i.Config.notification.gdprPrompt.btn2Txt?i.Config.notification.gdprPrompt.btn2Txt:"Agree",i.Config.notification.gdprPrompt.btn1Txt=null!=i.Config.notification.gdprPrompt.btn1Txt&&""!=i.Config.notification.gdprPrompt.btn1Txt?i.Config.notification.gdprPrompt.btn1Txt:"Not Now")}catch(e){}var e=c.Storage.getConfigLocal(u.KeyMapper.GDPR_CONSENT);1!=e&&3!=e?2!=e?1==i.Config.notification.gdprPrompt.status&&p.getGdprLocation():i.Config.notification.isGdprAllowed=0:i.Config.notification.isGdprAllowed=1},p.closeGdprDialog=function(e){var t;try{null!==(t=document.getElementById("izgdpr-box"))&&void 0!==t&&t.remove()}catch(e){}},p.gdprAllow=function(){p.closeGdprDialog(),c.Storage.setConfigLocal(u.KeyMapper.GDPR_CONSENT,1),i.Config.notification.isGdprAllowed=1,l.Queue.sync(),p.sendGdprStatus(1)},p.sendGdprStatus=function(t){try{var n=r.Helper.getEndpoint("gdprStatusUrl");r.Helper.getFlagBasedParameter({subscriptionMeta:!0,subcription:!0}).then(function(e){e=o({gs:t},e);s.HttpRequest.postForm(n,e,!0).then(function(){}).catch(function(e){})})}catch(e){}},p.getGdprLocation=function(){s.HttpRequest.get(r.Helper.getEndpoint("gdprLocationUrl")).then(function(e){1==(e=r.Helper.parseToJSON(e)).status?p.loadGdprOptin():c.Storage.setConfigLocal(u.KeyMapper.GDPR_CONSENT,3)}).catch(function(){})},p.loadGdprOptin=function(){var e=i.Config.notification.gdprPrompt.type,e=i.Config.notification.optInSrc+"gdpr/"+e+".js";r.Helper.addExternalJS(e)},p.gdprCallback=function(e){try{"function"==typeof e&&(i.Config.notification.gdprModule=new e,null!=i.Config.notification.gdprModule.data&&(window.izGdprDesign=i.Config.notification.gdprModule.data),p.show())}catch(e){}},p.show=function(){null!=window.izGdprDesign&&(i.Config.notification.gdprDialogDesign=window.izGdprDesign),i.Config.notification.gdprDialogDesign=a.NotificationHelper.loadDesign(i.Config.notification.gdprPrompt,i.Config.notification.gdprDialogDesign),r.Helper.addHTML("div",i.Config.notification.gdprDialogDesign,"izgdpr-box")},p.gdprDisallow=function(){p.closeGdprDialog(),c.Storage.setConfigLocal(u.KeyMapper.GDPR_CONSENT,2),p.sendGdprStatus(2)},p);function p(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TabAbandonments=void 0;var i=n(5),a=n(1),r=n(0),s=n(3),c=n(2),n=(l.init=function(){l.timerInstance=0,l.focused=!0,1==r.Config.tabAbandonment.status&&(l.interval=setInterval(function(){document.hasFocus()?l.focused||l.onFocus():l.focused&&l.onBlur()},1e3))},l.run=function(){l.reset(),a.Helper.displayLog("Tab Abandonment : Initialized");var e={url:window.location.href};s.Storage.setConfigLocal(c.KeyMapper.TAB_ABANDONMENT,JSON.stringify(e))},l.onBlur=function(){l.focused=!1,l.run(),l.timerInstance=setInterval(function(){var t=s.Storage.getConfigLocal(c.KeyMapper.TAB_ABANDONMENT);r.Config.tabAbandonment.counter++;try{t=JSON.parse(t)}catch(e){t={}}a.Helper.displayLog("TabAbandonment counter : ",r.Config.tabAbandonment.counter),t.url!=window.location.href?l.reset():r.Config.tabAbandonment.counter==r.Config.tabAbandonment.timeout&&(l.pushNotification(),l.reset())},1e3),a.Helper.displayLog("Ta : blurred")},l.onFocus=function(){l.focused=!0,l.reset(),a.Helper.displayLog("Ta : focused")},l.reset=function(){a.Helper.displayLog("Tab Abandonment : timer reset"),r.Config.tabAbandonment.counter=0,clearInterval(l.timerInstance)},l.pushNotification=function(){var e,t,n=r.Config.tabAbandonment.pushTimeout,o=l.getPayload();""!=o.id&&""!=o.rid&&(e=s.Storage.getConfigLocal(c.KeyMapper.TAB_ABANDONMENT_PUSH,c.KeyMapper.SYNC),t=a.Helper.getTimeDiff(e,!0),""!=e&&t<n?l.reset():(i.NotificationHelper.sendLocalNotification(o),s.Storage.updateLastSync(c.KeyMapper.TAB_ABANDONMENT_PUSH),i.NotificationHelper.syncNotificationView(o),i.NotificationHelper.syncNotificationSent(o)))},l.getPayload=function(){var e={};e.key=r.Config.client,e.title="You were reading <~[@article_title]~>",e.message="Pick up where you left off",e.icon="https://cdnimg.izooto.com/icons/4/JD-12-128.png",e.banner="<~[@featured_image]~>",e.link="<~[@last_visited_url]~>",e.tag="tabAbandonment",e.reqInt=!0,e.id="",e.rid="",e.viewFlag=1,e.clickFlag=1,e.sysEvents=0,e.domainNum=0;var t=window.location.href;t.indexOf("utm_campaign=")<0&&(e.link+=t.includes("?")?"&":"?",e.link+="utm_source=izooto&utm_medium=push_notifications&utm_campaign=recover_abandoned_tab&utm_term=notification1");var n,o=r.Config.tabAbandonment.data;for(n in e)o.hasOwnProperty(n)||(o[n]=e[n]);return o=l.getFilterData(o)},l.urlUtmHandler=function(e,t){var n,o,i=t.split("&"),r={};for(n in i){var a=i[n].split("=");r[a[0]]=a[1]}for(o in e=new URL(e),r)e.searchParams.set(o,r[o]);return e.href},l.getFilterData=function(e){var t,n,o,i={},r=window.location.href;for(t in i.article_title=""!=a.Helper.getMetaValue("og:title")?a.Helper.getMetaValue("og:title"):a.Helper.getMetaValue("title"),i.featured_image=a.Helper.getMetaValue("og:image"),i.last_visited_url=r,e)"string"==typeof e[t]&&0<=e[t].indexOf("<~[@")&&(n=e[t].indexOf("<~[@"),o=e[t].indexOf("]~>"),"last_visited_url"==(n=e[t].substring(n+4,o))&&0<e[t].indexOf("utm_campaign")?(o=e[t].split("?"),e[t]=o[0],o=o[1],e[t]=e[t].replace("<~[@"+n+"]~>",i[n]),e[t]=l.urlUtmHandler(r,o)):e[t]=e[t].replace("<~[@"+n+"]~>",i[n]));return e},l);function l(){}t.TabAbandonments=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdNetwork=void 0;var u=n(3),p=n(0),d=n(1);t.AdNetwork=(f.getAdNetworkParam=function(e){void 0===e&&(e=!1),f.forceSyncAdNetwork=0;var t="",n=u.Storage.getStorage("_ga"),o=u.Storage.getStorage("taboola global:user-id"),i=u.Storage.getStorage("OB-USER-TOKEN"),r=u.Storage.getStorage("mgMuidn"),a=u.Storage.getConfigLocal("gac"),s=u.Storage.getConfigLocal("tbc"),c=u.Storage.getConfigLocal("obc"),l=u.Storage.getConfigLocal("mgc");return o&&(f.adNetworkObj.tbc=o),i&&(f.adNetworkObj.obc=i),r&&(f.adNetworkObj.mgc=r),n&&1==p.Config.ga.syncCid&&(f.adNetworkObj.gac=n),(f.adNetworkObj.gac&&a!=n||o&&s!=o||i&&c!=i||r&&l!=r)&&(f.forceSyncAdNetwork=1),e?f.adNetworkObj:(0<Object.keys(f.adNetworkObj).length&&(t+="&"+d.Helper.objToParam(f.adNetworkObj)),t)},f.forceSyncAdNetwork=0,f.adNetworkObj={},f);function f(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoDropOff=void 0;var o=n(0),i=n(1);t.VideoDropOff=(r.init=function(){o.Config.videoDropoff.status&&r.isCurrentUrlMatchingWith(o.Config.videoDropoff.allowedUrls)&&r.detectPlayer()},r.syncTrigger=function(e,t){window._izq.push(["trigger",e,t])},r.sendToApi=function(e){var t=0,n=r.playerState;if(0==n.length)n.push(e);else{for(var o=0;o<n.length;o++)if(n[o].playerId==e.playerId){if(n[o].status==e.status)return;n[o]=e,t=1;break}t||n.push(e)}var i={player_id:e.playerId,title:e.title,url:e.url,player:e.player_type,duration:e.duration.toString()};e.hasOwnProperty("thumbnail")&&(i.thumbnail=e.thumbnail);try{"started"==e.status?r.syncTrigger("video_started",i):"ended"==e.status&&r.syncTrigger("video_completed",{playerid:e.playerId})}catch(e){}},r.html5Payload=function(e,t){var n=[];n.status=e=void 0===e?"started":e,n.playerId=t.id,n.title=document.title,n.url=location.href,n.player_type="html5",n.duration=t.duration,r.sendToApi(n)},r.html5Handler=function(){var e=document.querySelectorAll("video");e&&e.forEach(function(e){var t;e.id||(t=r.generateRandomString("iz-video-",7),e.setAttribute("id",t)),e.addEventListener("playing",function(){r.html5Payload("started",e)}),e.addEventListener("ended",function(){r.html5Payload("ended",e)})})},r.ytPayload=function(e,t){var n=[];n.status=e=void 0===e?"started":e,n.playerId=t.getIframe().id,n.title=t.playerInfo.videoData.title||document.title;e="https://img.youtube.com/vi/"+t.playerInfo.videoData.video_id+"/0.jpg";n.thumbnail=e,n.url=location.href,n.player_type="youtube",n.duration=t.playerInfo.duration,r.sendToApi(n)},r.isValidYtUrl=function(e){return new RegExp("^https://(?:www.)?youtube.com/embed/[A-z0-9]+").test(e)},r.initYtPlayer=function(e){if(window.YT,0,window.YT.get(e)){var t=window.YT.get(e);return t.addEventListener("onStateChange",r.onYtPlayerStateChange),t}return new window.YT.Player(e,{events:{onStateChange:r.onYtPlayerStateChange}})},r.onYtPlayerStateChange=function(e){switch(e.data){case window.YT.PlayerState.PLAYING:var t="started";r.ytPayload(t,e.target);break;case window.YT.PlayerState.ENDED:t="ended";r.ytPayload(t,e.target)}},r.fixPlayerReference=function(o){setInterval(function(){for(var e=0;e<o.length;e++){var t=o[e].getIframe(),n=r.getClosureKeyName(o[e]);o[e][n]!==window.YT.get(t.id)[n]&&(o[e]=window.YT.get(t.id),o[e].addEventListener("onStateChange",r.onYtPlayerStateChange))}},1e3)},r.fixYtEnableJsApi=function(e){var t=new URL(e.src);""==i.Helper.getParamFromUrl(e.src,"enablejsapi")?(t.searchParams.set("enablejsapi","1"),e.setAttribute("src",t)):null==i.Helper.getParamFromUrl(e.src,"enablejsapi")&&(t.searchParams.append("enablejsapi","1"),e.setAttribute("src",t))},r.fixYtOrigin=function(e){var t=new URL(e.src);""==i.Helper.getParamFromUrl(e.src,"origin")?(t.searchParams.set("origin",window.location.origin),e.setAttribute("src",t)):null==i.Helper.getParamFromUrl(e.src,"origin")&&(t.searchParams.append("origin",window.location.origin),e.setAttribute("src",t))},r.isJsApiEnabled=function(e){return null!=i.Helper.getParamFromUrl(e,"enablejsapi")},r.addYTApiScirptPromise=function(){return new Promise(function(e,t){var n,o,i=setInterval(function(){"object"==typeof window.YT&&"function"==typeof window.YT.get&&(clearInterval(i),e(!0))},1e3);void 0!==window.YT?e(!0):((n=document.createElement("script")).src="//www.youtube.com/player_api",(o=document.getElementsByTagName("script")[0]).parentNode.insertBefore(n,o))}).catch(function(e){})},r.ytHandler=function(){setInterval(function(){for(var e,t,o=document.querySelectorAll("iframe[src*='https://www.youtube.com/embed/']"),n=0;n<o.length;n++)r.isValidYtUrl(o[n].src)&&(o[n].hasAttribute("izplayer")||(o[n].setAttribute("izplayer","1"),o[n].id||(e=r.generateRandomString("iz-video-",7),o[n].setAttribute("id",e)),r.fixYtOrigin(o[n]),r.isJsApiEnabled(o[n].src)?function(t){var n=setInterval(function(){try{var e=window.YT.get(o[t].id);e&&(clearInterval(n),e.addEventListener("onStateChange",r.onYtPlayerStateChange),r.ytPlayerReference.push(e))}catch(e){}},1e3)}(n):(t=o[n],r.fixYtEnableJsApi(t),r.addYTApiScirptPromise().then(function(){var e=r.initYtPlayer(t.id);r.ytPlayerReference.push(e)}))));r.fixPlayerReference(r.ytPlayerReference)},1e3)},r.detectPlayer=function(){"complete"==document.readyState?r.html5Handler():window.addEventListener("load",function(){r.html5Handler()}),r.ytHandler()},r.isCurrentUrlMatchingWith=function(e){if(0==e.length)return 1;for(var t=0;t<e.length;t++)if(-1!=document.location.href.search(e[t]))return e[t],1;return 0},r.ytPlayerReference=[],r.playerState=[],r.generateRandomString=function(e,t){return void 0===t&&(t=7),(e=void 0===e?"":e)+Math.random().toString(36).substring(t)},r.getClosureKeyName=function(e){try{for(var t in e)if(-1!=t.search("closure_"))return t.toString()}catch(e){throw new Error("Please update keyName of player")}},r);function r(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CRPSPlaybook=void 0;var o=n(0),i=n(1),r=n(17),a=n(3),s=n(2),c=n(5);t.CRPSPlaybook=(l.init=function(){o.Config.CRPSPlaybook.isPaidSubscriber,o.Config.CRPSPlaybook.status&&l.isSyncAllowed()&&l.sendNotification()},l.isSyncAllowed=function(){if(3<r.Session.getSessionCount()&&!o.Config.notification.windowType&&!o.Config.CRPSPlaybook.isPaidSubscriber){var e=a.Storage.getConfigLocal(s.KeyMapper.CRPS_PLAYBOOK,s.KeyMapper.SYNC);return e&&i.Helper.getDateDiffrenceFromPresent(e)<=l.reSendNotificationDays?(i.Helper.displayLog("Abort! Reader to paid subscriber last sync not expired!"),!1):!0}return!1},l.sendNotification=function(){var e=o.Config.CRPSPlaybook.data;e.viewFlag=1,e.clickFlag=1,e.sysEvents=0,e.domainNum=0,e.title&&e.message&&e.link&&e.rid&&e.key&&e.id?c.NotificationHelper.sendLocalNotification(e).then(function(){a.Storage.updateLastSync(s.KeyMapper.CRPS_PLAYBOOK),c.NotificationHelper.syncNotificationView(e),c.NotificationHelper.syncNotificationSent(e)}):i.Helper.displayLog("CRPS Playbook : ".concat(s.KeyMapper.INVALID_PAYLOAD))},l.reSendNotificationDays=30,l);function l(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RecommendArticle=void 0;var o=n(3),i=n(2),r=n(0),a=n(1);t.RecommendArticle=(s.init=function(){r.Config.recommendArticle.status&&"/"!=s.currentArticlePath&&s.isSyncAllowed()&&s.sync()},s.isSyncAllowed=function(){var e=new Date,t=o.Storage.getConfigLocal(i.KeyMapper.LAST_SYNC_OF_RECOMMEND_ARTICLE,i.KeyMapper.SYNC);if(!t)return!0;var n=new Date(t);if(e.getDate()!=n.getDate())return o.Storage.removeConfigLocal(i.KeyMapper.RECOMMEND_ARTICLE_SYNCED_PATH,i.KeyMapper.RECOMMEND_ARTICLE),!0;if(e.getTime()<e.setTime(t+1e3*s.recommendArticleExpire))return!1;t=o.Storage.getConfigLocal(i.KeyMapper.RECOMMEND_ARTICLE_SYNCED_PATH,i.KeyMapper.RECOMMEND_ARTICLE);return(t=a.Helper.parseToJSON(t)||[]).length<s.dailyArticleSyncLimit&&-1==t.indexOf(s.currentArticlePath)},s.sync=function(){var n=o.Storage.getConfigLocal(i.KeyMapper.RECOMMEND_ARTICLE_SYNCED_PATH,i.KeyMapper.RECOMMEND_ARTICLE);(n=a.Helper.parseToJSON(n)||[]).push(s.currentArticlePath);var e=[window.location.protocol,"//",window.location.host,window.location.pathname].join("");window._izq.push(["trigger",s.triggerName,{article_url:e},function(e,t){200==t&&(o.Storage.setConfigLocal(i.KeyMapper.RECOMMEND_ARTICLE_SYNCED_PATH,JSON.stringify(n),i.KeyMapper.RECOMMEND_ARTICLE),o.Storage.updateLastSync(i.KeyMapper.LAST_SYNC_OF_RECOMMEND_ARTICLE))}])},s.currentArticlePath=window.document.location.pathname,s.dailyArticleSyncLimit=2,s.triggerName="_article_read",s.recommendArticleExpire=7200,s);function s(){}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoSegment=void 0;var o=n(0),i=n(1),n=(r.init=function(){1==o.Config.autoSegmentStatus&&r.addCustomModuleConfig()},r.addCustomModuleConfig=function(){var e=o.Config.hashFileName;e?(e="https://cdn.izooto.com/scripts/custom/".concat(e,".js"),i.Helper.addExternalJS(e,"izCustomModule",!0).then(r.customModuleHandler).catch(function(e){i.Helper.displayLog("Failed to add custom module script")})):i.Helper.displayLog("".concat(o.Config.brandingPartner," hash file name not found!"))},r.customModuleHandler=function(){try{var e=window._izootoCustomeModuleConfig||void 0;if(e){if(e.hasOwnProperty("autoSegmentMethod")&&1==o.Config.autoSegmentStatus)try{window._izootoCustomeModuleConfig.autoSegmentMethod=i.Helper.getParsedMethod(e.autoSegmentMethod),r.autoSegmentHandler(e.autoSegmentMethod)}catch(e){}}else i.Helper.displayLog("No any custom module found!")}catch(e){}},r.autoSegmentHandler=function(e){var t,n;"function"==typeof e&&(t=[],"string"==typeof(e=e())&&""!=e?t.push(e):t=e,Array.isArray(t)&&t.length?(n={},t.forEach(function(e){n[e]=!0}),window._izq.push(["userProfile",{add:n}])):i.Helper.displayLog("No segment found to sync!"))},r);function r(){}t.AutoSegment=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorage=void 0;var o=(i.isLocalStorageSupport=function(){return"localStorage"in window&&null!==window.localStorage},i.setLocalStorage=function(e,t){localStorage.setItem(e,t)},i.getLocalStorage=function(e){return localStorage.getItem(e)},i.removeLocalStorage=function(e){e&&localStorage.removeItem(e)},i);function i(){}t.LocalStorage=o}]);