(o=>{var n={};function t(e){var a;return(n[e]||(a=n[e]={i:e,l:!1,exports:{}},o[e].call(a.exports,a,a.exports,t),a.l=!0,a)).exports}t.m=o,t.c=n,t.d=function(e,a,o){t.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(a,e){if(1&e&&(a=t(a)),8&e)return a;if(4&e&&"object"==typeof a&&a&&a.__esModule)return a;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:a}),2&e&&"string"!=typeof a)for(var n in a)t.d(o,n,function(e){return a[e]}.bind(null,n));return o},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t(t.s=13)})([function(e,a){var s,o=this.__extends||function(e,a){for(var o in a)a.hasOwnProperty(o)&&(e[o]=a[o]);function n(){this.constructor=e}n.prototype=a.prototype,e.prototype=new n};function s(e){if(!e)return s.__;Array.prototype.reduce||(Array.prototype.reduce=function(e,a){for(var o=a,n=0;nthis.bufferSize)&&this.buffer.shift():(t=this.batchSize&&this.sendBatch()))},y.prototype.sendBatch=function(){0==this.batchBuffer.length||null!=t.maxMessages&&t.maxMessages<1||(null!=t.maxMessages&&(t.maxMessages-=this.batchBuffer.length),this.sendLogItems(this.batchBuffer),this.batchBuffer.length=0)},y);function y(e,a){this.appenderName=e,this.sendLogItems=a,this.level=t.getTraceLevel(),this.sendWithBufferLevel=2147483647,this.storeInBufferLevel=-2147483648,this.bufferSize=0,this.batchSize=1,this.buffer=[],this.batchBuffer=[]}o(S,v=t.Appender=k),S.prototype.setOptions=function(e){return n("url",e,this),n("beforeSend",e,this),v.prototype.setOptions.call(this,e),this},S.prototype.sendLogItemsAjax=function(e){try{var a="/jsnlog.logger",o=(null!=t.defaultAjaxUrl&&(a=t.defaultAjaxUrl),this.url&&(a=this.url),JSON.stringify({r:t.requestId,lg:e})),n=this.getXhr(a);"function"==typeof this.beforeSend?this.beforeSend(n):"function"==typeof t.defaultBeforeSend&&t.defaultBeforeSend(n),n.send(o)}catch(e){}},S.prototype.getXhr=function(e){var a,o=new XMLHttpRequest;if(!("withCredentials"in o)&&"undefined"!=typeof XDomainRequest)return(a=new XDomainRequest).open("POST",e),a;return o.open("POST",e),o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("JSNLog-RequestId",t.requestId),o};var v,w=S;function S(e){v.call(this,e,S.prototype.sendLogItemsAjax)}t.AjaxAppender=w,o(C,I=k),C.prototype.clog=function(e){console.log(e)},C.prototype.cerror=function(e){console.error?console.error(e):this.clog(e)},C.prototype.cwarn=function(e){console.warn?console.warn(e):this.clog(e)},C.prototype.cinfo=function(e){console.info?console.info(e):this.clog(e)},C.prototype.cdebug=function(e){console.debug?console.debug(e):this.cinfo(e)},C.prototype.sendLogItemsConsole=function(e){try{if(console)for(var a=0;a=this.level&&r(this)&&(o?(t=this.buildExceptionObject(o)).logData=l(a):t=a,c(this,(n=u(t)).finalString)))){if(this.onceOnly)for(i=this.onceOnly.length-1;0<=i;){if(new RegExp(this.onceOnly[i]).test(n.finalString)){if(this.seenRegexes[i])return this;this.seenRegexes[i]=!0}i--}for(n.meta=n.meta||{},n.meta.loggerName=this.loggerName,i=this.appenders.length-1;0<=i;)this.appenders[i].log((s=e)<=1e3?"trace":s<=2e3?"debug":s<=3e3?"info":s<=4e3?"warn":s<=5e3?"error":"fatal",n.msg,n.meta,function(){},e,n.finalString,this.loggerName),i--}return this},j.prototype.trace=function(e){return this.log(1e3,e)},j.prototype.debug=function(e){return this.log(2e3,e)},j.prototype.info=function(e){return this.log(3e3,e)},j.prototype.warn=function(e){return this.log(4e3,e)},j.prototype.error=function(e){return this.log(5e3,e)},j.prototype.fatal=function(e){return this.log(6e3,e)},j.prototype.fatalException=function(e,a){return this.log(6e3,e,a)},t.Logger=j,t.createAjaxAppender=function(e){return new w(e)},t.createConsoleAppender=function(e){return new x(e)},k=new w(""),"undefined"==typeof window&&(k=new x("")),t.__=new t.Logger(""),t.__.setOptions({level:t.getDebugLevel(),appenders:[k]}),void 0!==a&&(a.JL=s),"function"==typeof __jsnlog_configure&&__jsnlog_configure(s)},function(e,a){var s;window.appConfig={},(s=appConfig).source={Mobile:"Mobile",Web:"Web"},s.pluginType={LightBox:{Name:"LightBox",Id:"6"},ConnectWithMail:{Name:"ConnectWithMail",Id:"10"},Connect:{Name:"Connect",Id:"3"},SocialShare:{Name:"SocialShare",Id:"7"},SocialBounce:{Name:"SocialBounce",Id:"8"},SocialBar:{Name:"SocialBar",Id:"9"},SocialBox:{Name:"SocialBox",Id:"2"},SocialPush:{Name:"SocialPush",Id:"11"},SocialBounceImage:{Name:"SocialBounceWithImage",Id:"12"},OnSite:{Name:"OnSite",Id:"13"},SocialBounceSurvey:{Name:"SocialBounceWithSurvey",Id:"20"},SocialBounceQuiz:{Name:"SocialBounceWithQuiz",Id:"21"},LightboxText:{Name:"LightboxText",Id:"22"},LightboxImage:{Name:"LightboxImage",Id:"23"},LightboxRedirectText:{Name:"LightboxRedirectText",Id:"25"},LightboxRedirectImage:{Name:"LightboxRedirectImage",Id:"26"}},s.Customer={SocialMiner:{Id:"064B7A45-4372-4155-A286-A06A97C7D626",Name:"SocialMiner",ProdAppId:"1443650659203895",DevAppId:"1474359889466305"}},s.GetFbApiVersion=function(){return"v2.12"},s.GetChannelUrl=function(){return"https://plugins.soclminer.com.br/v3/assets/channel.min.html"},s.GetGAPageName=function(e,a){return e+a},s.GetGAPageTitle=function(e,a){return e+" "+a},s.IsMobile=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},s.IsApple=function(){return/iPhone|iPad|iPod/i.test(navigator.userAgent)},s.IsSupportPush=function(){return!/webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},s.IsAndroid=function(){return/Android/i.test(navigator.userAgent)},s.IsChrome=function(){var e,a,o,n,t;return s.IsMobile()?!!window.chrome:(e=window.chrome,o=(a=window.navigator).vendor,n=void 0!==window.opr,t=-1>>32-a}for(var n,t,s,i,r,c,l,u,d=function(e){for(var a="",o=7;0<=o;o--)a+=(e>>>4*o&15).toString(16);return a},m=new Array(80),p=1732584193,g=4023233417,h=2562383102,f=271733878,k=3285377520,b=(e=(e=>{e=e.replace(/\r\n/g,"\n");for(var a="",o=0;o>6|192))+String.fromCharCode(63&n|128):(a=(a+=String.fromCharCode(n>>12|224))+String.fromCharCode(n>>6&63|128))+String.fromCharCode(63&n|128)}return a})(e)).length,y=[],v=0;v>>29),y.push(b<<3&4294967295),n=0;n{for(var t=document.getElementsByTagName(e),s=0,i=t.length;s "+a),localStorage.removeItem("db_"+a)}},u.createEventDB=function(a){var e="items";try{var o,n=u.getLocalDB(a),t=["sessionHash","event"];n.isNew()&&(n.createTable(e,t),n.commit(),o=localStorage.getItem("db_"+a).replace('"[',"[").replace(']"',"]").replace(/\\"/g,'"'),localStorage.setItem("db_"+a,o)),n.tableExists(e)||(n.createTable(e,t),n.commit())}catch(e){console.log("creation of table items error => "+a),localStorage.removeItem("db_"+a)}},u.insertLogItem=function(a,e){try{var o=u.getLocalDB(a),n=(o.tableExists("items")||u.createLogDB(a),o.insert("items",e),o.commit(),localStorage.getItem("db_"+a).replace('"[',"[").replace(']"',"]").replace(/\\"/g,'"'));localStorage.setItem("db_"+a,n)}catch(e){localStorage.removeItem("db_"+a),u.createLogDB(a)}},u.insertEventItem=function(a,e){try{var o=u.getLocalDB(a),n=(o.tableExists("items")||u.createEventDB(a),o.insert("items",e),o.commit(),localStorage.getItem("db_"+a).replace('"[',"[").replace(']"',"]").replace(/\\"/g,'"'));localStorage.setItem("db_"+a,n)}catch(e){localStorage.removeItem("db_"+a),u.createEventDB(a)}},u.setSMIdToAnonymousUser=function(e,a){null!==a&&""!==a&&"undefined"!==a&&void 0!==a&&soclHelper.setStoreValue(soclConnect.createSMIdKey(e),a)},u.setSMIdByUrl=function(e){var a=soclHelper.getQueryStringParams("smuid");null!==a&&""!==a&&"undefined"!==a&&void 0!==a&&soclHelper.setStoreValue(soclConnect.createSMIdKey(e),a)},u.setSMIdByPush=function(a,e,o){getCORS(apiUrl+"/users/push/?format=json&customerId="+a+"&endpoint="+e,null,function(e){r(a,e,o)})},u.setSMIdByPushOrganic=function(a,e,o){postCORS(apiUrl+"/users/push",{customerId:a,pushEndpoint:e,isMobile:soclHelper.isMobile()},function(e){r(a,e,o)})},u.setSMIdByFbId=function(e,a,o){getCORS(apiUrl+"/users/social/"+e+"/?format=json&customerId="+a,null,function(e){r(a,e,o)})},u.createDataObj=function(e,a,o,n){return{soclId:e,url:(a=""===(e=a)||void 0===e?document.referrer:e,a=soclHelper.contains(a,"&")?soclHelper.replaceAll("&","|",a):soclHelper.replaceAll("&","|",a)),referrer:o,customerId:n}},u.actionBatch=function(e,a,o){0function(){var e=this._super,a=(this._super=t[o],n.apply(this,arguments));return this._super=e,a})(a,e[a]):e[a];function n(){!i&&this.init&&this.init.apply(this,arguments)}return((n.prototype=o).constructor=n).extend=s.extend,n}),trace:function(e){this.debug&&void 0!==n.console&&n.console.log("Porthole: "+e)},error:function(e){n.console,"function"==typeof n.console.error&&n.console.error("Porthole: "+e)},WindowProxy:function(){}}).WindowProxy.prototype={post:function(e,a){},addEventListener:function(e){},removeEventListener:function(e){}},t.WindowProxyBase=s.extend({init:function(e){this.targetWindowName=e=void 0===e?"":e,this.origin=n.location.protocol+"//"+n.location.host,this.eventListeners=[]},getTargetWindowName:function(){return this.targetWindowName},getOrigin:function(){return this.origin},getTargetWindow:function(){return t.WindowProxy.getTargetWindow(this.targetWindowName)},post:function(e,a){void 0===a&&(a="*"),this.dispatchMessage({data:e,sourceOrigin:this.getOrigin(),targetOrigin:a,sourceWindowName:n.name,targetWindowName:this.getTargetWindowName()})},addEventListener:function(e){return this.eventListeners.push(e),e},removeEventListener:function(e){var a;try{a=this.eventListeners.indexOf(e),this.eventListeners.splice(a,1)}catch(e){this.eventListeners=[]}},dispatchEvent:function(e){for(var a=0;a=g.PagesViewBefore||g.DisplayType==I.Start&&soclHelper.getSessionValue("pagesview_"+l)>=g.PagesViewBefore)&&(0',e.featureSettings.pluginTypeId===w.Default?'
'+a+'
':e.featureSettings.pluginTypeId===w.Survey||e.featureSettings.pluginTypeId===w.Quiz?'
'+a+'
':e.featureSettings.pluginTypeId===w.LightBoxText?'
'+a+'
':e.featureSettings.pluginTypeId===w.LightBoxImage?'
'+a+'
':e.featureSettings.pluginTypeId===w.LightBoxRedirectText?'
'+a+'
':e.featureSettings.pluginTypeId===w.LightBoxRedirectImage?'
'+a+'
':'
'+a+'
'),null!=(g=o.featureSettings.pluginParameters)&&(g=JSON.parse(g),14!=c&&15!=c&&soclHelper.setOnsiteDefaultDataForSync(g.Name,l,c),e=soclHelper.convertMS(g.TimeToShowAfterClose),n.setAttribute("daysToExpire",e.decimalDay)),soclHelper.setStoreValue("smpid_"+c,o.featureSettings.pluginId),setTimeout(function(){s("on",1)},7e3))};f.Step.OS_LightBox=f.Step.OS_LightBox.replace("0",e),f.Step.OS_LightBox_Email=f.Step.OS_LightBox_Email.replace("0",e),f.Step.OS_LightBox_FBConnect=f.Step.OS_LightBox_FBConnect.replace("0",e),e===w.Default?soclHelper.injectCSS(v,"socialbounce.min.css"):e===w.Survey||e===w.Quiz?soclHelper.injectCSS(v,"bounce-survey.min.css"):e===w.LightBoxText||e===w.LightBoxImage||e===w.LightBoxRedirectText||e===w.LightBoxRedirectImage||e===w.LightBoxRedirectText||e===w.LightBoxRedirectImage?soclHelper.injectCSS(v,"plugin-lightbox.min.css"):soclHelper.injectCSS(v,"bounce-image.min.css");try{C(),a(!0)}catch(e){console.warn("SM - [Ursa Enterprise]",e),a(!1)}}}):null===(e=JSON.parse(soclHelper.getStoreValue("smanonymous")))||""===e||o.cgActive||(e.Active?(e.Active=!1,soclHelper.setStoreValue("smanonymous",JSON.stringify(e)),soclHelper.removeSessionValue("controlGroupActive")):(soclHelper.removeStoreValue("smanonymous"),soclHelper.removeStoreValue(soclConnect.createSMIdKey(o.id))))})}var n,c,l,u,d,m,p,g,h,t,f,k,b,y,v,w,S,I,x,C,j,H;window.soclBounce={},n=soclBounce,Element.prototype.SoclRemoveTag=function(){this.parentElement.removeChild(this)},NodeList.prototype.SoclRemoveTag=HTMLCollection.prototype.SoclRemove=function(){for(var e=0,a=this.length;e=parseInt(g.ScrollPercentage)&&m.fire()},n.closeBox=function(e,a){var o;null!==document.getElementById("sm-bounce")&&(o="bounce","undefined"!=a&&null!=a&&""!=a&&(o+="-"+a),document.getElementById("sm-bounce").SoclRemoveTag(),e||(socl.emmit.onClose({id:l,type:o}),soclCookie.createCookie("smCloseBounce",!0,3),soclHelper.setStoreValue("smInteractBounce",!0)),x)&&null!==document.getElementById("sm-push")&&"2"!=a&&(document.getElementById("sm-push").style.display="block",x=!1)},n.addKeydownEvent=function(){document.onkeydown=function(e){27==(e=e||window.event).keyCode&&n.closeBox(!1,"escape")}},n.render=function(e){navigator.cookieEnabled&&o(e)},n.createEventProxy=function(e){windowProxy.post({createEvent:e})},n.createEventUpdateOnsiteDataProxy=function(e){windowProxy.post({updateOnsiteData:e})},n.createEventPersonIdProxy=function(e){windowProxy.post({personId:e})},n.clearInstance=function(){t&&t.removeEventListener(j),p&&clearTimeout(p),m&&m.destroy(),document.removeEventListener("scroll",H),soclHelper.removeElementById("sm-bounce")}},function(e,a,o){!function(o){window.soclPush={};var c=soclPush,e=(Element.prototype.SoclRemoveTag=function(){this.parentElement.removeChild(this)},NodeList.prototype.SoclRemoveTag=HTMLCollection.prototype.SoclRemove=function(){for(var e=0,a=this.length;e{d||(d=firebase.messaging()).useServiceWorker(e),d.onTokenRefresh(function(){c.getToken(t,function(e){return a(!0)})}),d.onMessage(function(e){}),soclConnect.getId(t.customerId,function(e){windowProxy.post({identifier:t.customerId+"|"+e});var a=soclHelper.createBaseIframe();a.setAttribute("src",b+"pixel.min.html?id="+t.customerId+"&smid="+e),a.setAttribute("id","social-push-pixel"),a.setAttribute("name","social-push-pixel"),document.body.insertBefore(a,document.body.childNodes[0])}),soclHelper.getPushEndpoint(function(e){e&&-1function(e,a){e="string"==typeof e[o]?e[o].toLowerCase():e[o],a="string"==typeof a[o]?a[o].toLowerCase():a[o];return"DESC"===n?e==a?0:e>>((3&a)<<3)&255;return r},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()"))}for(var u="function"==typeof Buffer?Buffer:Array,d=[],m={},p=0;p<256;p++)d[p]=(p+256).toString(16).substr(1),m[d[p]]=p;function g(e,a){a=a||0;return d[e[a++]]+d[e[a++]]+d[e[a++]]+d[e[a++]]+"-"+d[e[a++]]+d[e[a++]]+"-"+d[e[a++]]+d[e[a++]]+"-"+d[e[a++]]+d[e[a++]]+"-"+d[e[a++]]+d[e[a++]]+d[e[a++]]+d[e[a++]]+d[e[a++]]+d[e[+a]]}var h=i(),f=[1|h[0],h[1],h[2],h[3],h[4],h[5]],k=16383&(h[6]<<8|h[7]),b=0,y=0;function v(e,a,o){var n=a&&o||0,t=("string"==typeof e&&(a="binary"===e?new u(16):null,e=null),(e=e||{}).random||(e.rng||i)());if(t[6]=15&t[6]|64,t[8]=63&t[8]|128,a)for(var s=0;s<16;s++)a[n+s]=t[s];return a||g(t)}var w=v;w.v1=function(e,a,o){var n=a&&o||0,t=a||[],o=null!=(e=e||{}).clockseq?e.clockseq:k,s=null!=e.msecs?e.msecs:(new Date).getTime(),i=null!=e.nsecs?e.nsecs:y+1;if((r=s-b+(i-y)/1e4)<0&&null==e.clockseq&&(o=o+1&16383),1e4<=(i=(r<0||b>>24&255,t[n++]=r>>>16&255,t[n++]=r>>>8&255,t[n++]=255&r,s/4294967296*1e4&268435455),c=(t[n++]=i>>>8&255,t[n++]=255&i,t[n++]=i>>>24&15|16,t[n++]=i>>>16&255,t[n++]=o>>>8|128,t[n++]=255&o,e.node||f),l=0;l<6;l++)t[n+l]=c[l];return a||g(t)},w.v4=v,w.parse=function(e,a,o){var n=a&&o||0,t=0;for(a=a||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){t<16&&(a[n+t++]=m[e])});t<16;)a[n+t++]=0;return a},w.unparse=g,w.BufferClass=u,w._rng=i,w._mathRNG=o,w._nodeRNG=void 0,w._whatwgRNG=n,t=s.uuid,w.noConflict=function(){return s.uuid=t,w},s.uuid=w},function(e,a){!function(i,r){var c,l=this,u=256,d=6,m="random",p=r.pow(u,d),g=r.pow(2,52),h=2*g,f=u-1;function k(e){var a,o=e.length,i=this,n=0,t=i.i=i.j=0,s=i.S=[];for(o||(e=[o++]);n>>=1;return(e+o)/a}var t=[],e=y(function e(a,o){var n,t=[],s=typeof a;if(o&&"object"==s)for(n in a)try{t.push(e(a[n],o-1))}catch(e){}return t.length?t:"string"==s?a:a+"\0"}((a=1==a?{entropy:!0}:a||{}).entropy?[e,v(i)]:null==e?(()=>{try{return c?v(c.randomBytes(u)):(a=new Uint8Array(u),(l.crypto||l.msCrypto).getRandomValues(a),v(a))}catch(e){var a=l.navigator,a=a&&a.plugins;return[+new Date,l,a,l.screen,v(i)]}})():e,3),t),s=new k(t);return n.int32=function(){return 0|s.g(4)},n.quick=function(){return s.g(4)/4294967296},n.double=n,y(v(s.S),i),(a.pass||o||function(e,a,o,n){return n&&(n.S&&b(n,s),e.state=function(){return b(s,{})}),o?(r[m]=e,a):e})(n,e,"global"in a?a.global:this==r,a.state)},y(r.random(),i)}([],Math)},function(e,a,o){!function(e){var a,o,n;window.soclError={},a=soclError,o=e.createAjaxAppender("ajaxAppender"),n="",n="https://"+(n=soclHelper?soclHelper.getEnvironment():n)+"api.soclminer.com.br/v2.1/client/error",o.setOptions({bufferSize:3,storeInBufferLevel:e.getErrorLevel(),level:e.getFatalLevel(),sendWithBufferLevel:e.getFatalLevel(),url:n}),window.onerror=function(e,a,o,n,t){return!1},a.setAppender=function(){e().setOptions({appenders:[o]})},soclError.setAppender()}.call(this,o(0).JL)},function(e,a,o){!function(s){var t,r,c,l,u,d,m,p;window.firebaseMessaging={},t=firebaseMessaging,r={Channel_Conclusion:"Channel.PushOptIn.Conclusion",Channel_Rejection:"Channel.PushOptIn.Rejection",Channel_Step_View:"Channel.PushOptIn.Step.View",Channel_Step_Conclusion:"Channel.PushOptIn.Step.Conclusion",Channel_Step_AlreadyConnected:"Channel.PushOptIn.Step.AlreadyConnected",Channel_Step_Rejection:"Channel.PushOptIn.Step.Rejection",Channel_Step_Block:"Channel.PushOptIn.Step.Block",Channel_ConclusionWithRejection:"Channel.PushOptIn.ConclusionWithRejection",Channel_Step_Error:"Channel.PushOptIn.Step.Error"},c={Empty:"",OS_Notification:"OS.Notification",OS_Notification_Popup:"OS.Notification.Popup",OS_Notification_Popup_Policy:"OS.Notification.Popup.Policy",OS_Notification_Popup_PoweredBy:"OS.Notification.Popup.PoweredBy",OS_Notification_Popup_Dialog:"OS.Notification.Popup.Dialog"},l=soclHelper.getEnvironment()?"https://{DNS}.soclminer.com.br/beta/customers/{CUSTOMER_ID}/firebase-messaging-sw.js":"https://{DNS}.soclminer.com.br/customers/{CUSTOMER_ID}/firebase-messaging-sw.js",t.start=function(e,a){if(!window.isSecureContext)return a(!1);soclHelper.initFirebase(function(e){return a(e)})},t.onMessage=function(e){},t.onTokenRefresh=function(e){e.onTokenRefresh(function(){e.getToken().then(function(e){console.log("Token refreshed. New token: "+e),soclConnect.getId(metadata.customerId,function(e){soclConnect.updateConnectedUser(u(e,metadata.customerId,currentToken,!0,!0),function(e){soclHelper.setStoreValue("pushendpoint",currentToken),soclHelper.setStoreValue("smpushoptin_"+metadata.customerId,"true")})}),"true"!==metadata.hasOptIn&&windowProxy.post({hasOptin:"true",customerId:metadata.customerId,endpoint:currentToken})}).catch(function(e){console.log("Unable to retrieve refreshed token ",e)})})},t.getToken=function(e,o,n){e.getToken().then(function(a){console.log("currentToken",a),a?(soclHelper.getPushEndpoint(function(e){e!==a&&soclConnect.getId(o.customerId,function(e){soclConnect.updateConnectedUser(u(e,o.customerId,a,!0,!0),function(e){soclHelper.setStoreValue("pushendpoint",a),soclHelper.setStoreValue("smpushoptin_"+o.customerId,"true")})}),"true"!==o.hasOptIn&&windowProxy.post({hasOptin:"true",customerId:o.customerId,endpoint:a})}),n(!0)):n(!1)}).catch(function(e){console.log("An error occurred while retrieving token. ",e),n(!1)})},u=function(e,a,o,n,t){return{userId:e,customerId:a,endpoint:o,allowPushMessaging:n,deviceType:t}},t.organicPushPermission=function(n){soclHelper.getStoreValue("pushendpoint")||firebase&&(m=firebase.messaging(),soclHelper.getCID(function(o){m.getToken().then(function(a){var e;0!==o&&(e=d(),soclConnect.signInWithPush(o,11,a,e,function(e){soclHelper.setStoreValue("pushendpoint",a),n(!0,e)}))})})),n(!1,0)},d=function(){var e=1;return e=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?2:e},m=null,p=0,t.requestPermission=function(o,n){soclHelper.initFirebase(function(e){if(!e)return n(!1);p=d(),l=soclHelper.replaceAll("{DNS}",o.customDns,l),l=soclHelper.replaceAll("{CUSTOMER_ID}",soclHelper.toGUID(o.customerId),l),navigator.serviceWorker.register(l).then(e=>{m||(m=firebase.messaging()).useServiceWorker(e),setTimeout(function(){try{var e={type:r.Channel_Step_View,step:c.OS_Notification_Popup_Dialog,channelId:o.pluginId};e.channelId&&soclPush.createEventProxy(e)}catch(e){console.log("SM - Failed on sending Step Conclusion Event to Engage",e),window.opener.console.log("SM - Failed on sending Step Conclusion Event to Engage",e)}$(".policy a").click(function(){try{var e={type:r.Channel_Step_Conclusion,step:c.OS_Notification_Popup_Policy,channelId:o.pluginId};e.channelId&&soclPush.createEventProxy(e)}catch(e){console.log("SM - Failed on sending Step Conclusion Event to Engage",e),window.opener.console.log("SM - Failed on sending Step Conclusion Event to Engage",e)}}),$("#poweredBy").click(function(){try{var e={type:r.Channel_Step_Conclusion,step:c.OS_Notification_Popup_PoweredBy,channelId:o.pluginId};e.channelId&&soclPush.createEventProxy(e)}catch(e){console.log("SM - Failed on sending Step Conclusion Event to Engage",e),window.opener.console.log("SM - Failed on sending Step Conclusion Event to Engage",e)}})},1e3),null!==document.getElementById("sm-bounce")&&document.getElementById("sm-bounce").SoclRemoveTag(),soclCookie.createCookie("smViewPushOptin",!0,o.daysToShowAfterView),Notification.requestPermission().then(function(e){switch(e){case"granted":t.permissionGranted(o.pluginId,o.customerId,o.customDns,function(e){return n(e)});break;case"denied":t.permissionDenied(o.pluginId);break;case"default":t.permissionDefault(o.pluginId);break;default:try{var a=[];for(a.push({type:r.Channel_Step_Error,step:c.OS_Notification_Popup_Dialog,channelId:o.pluginId}),a.push({type:r.Channel_Rejection,step:c.OS_Notification,channelId:o.pluginId}),i=0;i{m||(m=firebase.messaging()).useServiceWorker(e),m.getToken().then(function(n){soclHelper.setCookie(soclPush.PUSH_TOKEN_VERIFIED.NAME,soclPush.PUSH_TOKEN_VERIFIED.VALUE,soclPush.PUSH_TOKEN_VERIFIED.DAYS_TO_EXPIRE),soclHelper.getCID(function(o){0!==o?soclConnect.getId(o,function(e){if(e&&0!=e){soclConnect.updateConnectedUser(u(e,o,n,!0,p),function(e){soclHelper.setStoreValue("pushendpoint",n)});try{a=[{type:r.Channel_Step_AlreadyConnected,step:c.OS_Notification_Popup_Dialog,channelId:t,additionalData:{pluginType:5}}];for(i=0;i=parseInt(i.scrollPercentage)&&(g.setAttribute("hasViewedOnSiteInThisPage","true"),t(e,g,a))}catch(e){console.log("SM - [URSA] - eventScroll onsite-message-sales - Failed: ".concat(e))}}function p(o){return d.includes(soclHelper.getStoreValue("smcid"))&&new URLSearchParams(window.location.search).forEach(function(e,a){o.searchParams.append(a,e)}),o}var n,i,g,r,h,f,c,l,u,d,m;window.soclOnsiteSales={},n=soclOnsiteSales,Element.prototype.SoclRemoveTag=function(){this.parentElement.removeChild(this)},NodeList.prototype.SoclRemoveTag=HTMLCollection.prototype.SoclRemove=function(){for(var e=0,a=this.length;en,r=soclCookie.getCookie("smClickOnSite_"+o),c=soclCookie.getCookie("smClosedOnSite_"+o),l=parseInt(soclHelper.getStoreValue("onsiteview_"+o));if(!c&&!r&&i&&(!l||0==t||parseInt(l)n&&(!soclHelper.getStoreValue("onsiteview_"+o)||parseInt(soclHelper.getStoreValue("onsiteview_"+o)){for(var e=document.cookie.split("; "),a={},o=e.length-1;0<=o;o--){var n=e[o].split("=");a[n[0]]=n[1]}return a})()[e]===a}function S(){!r()&&1&&(e&&(e.style.display="block"),I(),i())}function I(e){void 0!==(e=e||{}).cookieExpire&&(l=f(e.cookieExpire)),!0===e.sitewide&&(m=";path=/"),void 0!==e.cookieDomain&&(u=";domain="+e.cookieDomain),void 0!==e.cookieName&&(d=e.cookieName),document.cookie=d+"=true"+l+u+m,g.removeEventListener("mouseleave",k),g.removeEventListener("mouseenter",b),g.removeEventListener("keydown",v)}return{fire:S,disable:I,destroy:function(){g.removeEventListener("mouseleave",k),g.removeEventListener("mouseenter",b),g.removeEventListener("keydown",v)}}}},function(e,a){function r(){u=!1}function c(e,a,o,n,t){var s=soclHelper.getStoreValue("smcid");if("connected"!==soclHelper.getStoreValue(s))if(u)0<(t=void 0===t?10:t)&&window.setTimeout(function(){c(e,a,o,n,t--)},1e3);else{u=!0;try{if(void 0===e)return;void 0===o&&(o=2),void 0===n&&(n=!1);var i={};i[e]={value:a,weight:o},l.updateUser(i,n)}catch(e){console.log("SM - Error on update organic optin user",e),r()}}}var l,u,n;window.soclOrganic={},l=soclOrganic,u=!1,l.updateUser=function(e,a){void 0===a&&(a=!1);var o,n,t,a=soclHelper.getLocalStorageValue("socl_Organic"),a=(o=a=a||{},n=e,t=!1,Object.keys(n).forEach(function(e){(void 0===o[e]||o[e].value!=n[e].value&&o[e].weight{null!=e&&0!=e.length||(e="D");var a=new Array,o=0,n=!0,t=!1;if(1!=e.length)return null;if("D"==(e=e[0])||"d"==e)a=new Array(36),0;else if("N"==e||"n"==e)a=new Array(32),n=!32;else if("B"==e||"b"==e)(a=new Array(38))[o++]="{",a[37]="}";else if("P"==e||"p"==e)(a=new Array(38))[o++]="(",a[37]=")";else{if("X"!=e&&"x"!=e)return null;(a=new Array(68))[o++]="{",a[67]="}",t=!(n=!68)}return t?(a[o++]="0",a[o++]="x",o=k(a,o,s>>24,s>>16),o=k(a,o,s>>8,s),a[o++]=",",a[o++]="0",a[o++]="x",o=k(a,o,i>>8,i),a[o++]=",",a[o++]="0",a[o++]="x",o=k(a,o,r>>8,r),a[o++]=",",a[o++]="{",o=k(a,o,c,l,!0),a[o++]=",",o=k(a,o,u,d,!0),a[o++]=",",o=k(a,o,m,p,!0),a[o++]=",",o=k(a,o,g,h,!0),a[o++]="}"):(o=k(a,o,s>>24,s>>16),o=k(a,o,s>>8,s),n&&(a[o++]="-"),o=k(a,o,i>>8,i),n&&(a[o++]="-"),o=k(a,o,r>>8,r),n&&(a[o++]="-"),o=k(a,o,c,l),n&&(a[o++]="-"),o=k(a,o,u,d),o=k(a,o,m,p),o=k(a,o,g,h)),new String(a)})("D").split(",").join("")},this.guidString();function f(e){return e&=15,String.fromCharCode(9>4),e[a++]=f(o),t&&(e[a++]=",",e[a++]="0",e[a++]="x"),e[a++]=f(n>>4),e[a++]=f(n),a}}window.soclBase32={},soclBase32.decode=function(e){if(""===e)return e;var a=e.toUpperCase(),o=new Uint8Array(Math.trunc(5*a.length/8));if(0==o.length)return e;for(var n=0,t=0,s=0,i=0;s>5-(t+c),8<=(i+=c)&&(s++,i=0),5<=(t+=c)&&(n++,t=0)}return l(o)}},function(e,a){window.soclTldts={};{var n=soclTldts,r,c,l,u,d,m,p,g,h,f,k,b,y,v,w,S,I;function x(t,e){let s=0,i=t.length,r=!1;if(!1===e){if(!0===t.startsWith("data:"))return null;for(;ss+1&&t.charCodeAt(i-1)<=32;)--i;if(47===t.charCodeAt(s)&&47===t.charCodeAt(s+1))s+=2;else{var c=t.indexOf(":/",s);if(-1!==c){var e=c-s,l=t.charCodeAt(s),u=t.charCodeAt(s+1),d=t.charCodeAt(s+2),m=t.charCodeAt(s+3),p=t.charCodeAt(s+4);if(!(5==e&&104===l&&116===u&&116===d&&112===m&&115===p||4==e&&104===l&&116===u&&116===d&&112===m||3==e&&119===l&&115===u&&115===d||2==e&&119===l&&115===u))for(let e=s;es&&as&&ns+1&&46===t.charCodeAt(i-1);)--i;p=0!==s||i!==t.length?t.slice(s,i):t;return r?p.toLowerCase():p}function C(e){return(e=>{if(e.length<3)return!1;let a="["===e[0]?1:0,o=e.length;if("]"===e[o-1]&&--o,39{if(a.length<7)return!1;if(15{if(null!==o.validHosts){var n=o.validHosts;for(let e=0;e{if(!1===a.allowPrivateDomains&&3