(function(){if(typeof window.CustomEvent==="function")return false;function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:undefined};var evt=document.createEvent('CustomEvent');evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt;}
CustomEvent.prototype=window.Event.prototype;window.CustomEvent=CustomEvent;})();var MauticJS=MauticJS||{};MauticJS.serialize=function(obj){if('string'==typeof obj){return obj;}
return Object.keys(obj).map(function(key){return encodeURIComponent(key)+'='+encodeURIComponent(obj[key]);}).join('&');};MauticJS.documentReady=function(f){/in/.test(document.readyState)?setTimeout(function(){MauticJS.documentReady(f)},9):f();};MauticJS.iterateCollection=function(collection){return function(f){for(var i=0;collection[i];i++){f(collection[i],i);}};};MauticJS.log=function(){var log={};log.history=log.history||[];log.history.push(arguments);if(window.console){console.log(Array.prototype.slice.call(arguments));}};MauticJS.setCookie=function(name,value){document.cookie=name+"="+value+"; path=/; secure";};MauticJS.createCORSRequest=function(method,url){var xhr=new XMLHttpRequest();method=method.toUpperCase();if("withCredentials"in xhr){xhr.open(method,url,true);}else if(typeof XDomainRequest!="undefined"){xhr=new XDomainRequest();xhr.open(method,url);}
return xhr;};MauticJS.CORSRequestsAllowed=true;MauticJS.makeCORSRequest=function(method,url,data,callbackSuccess,callbackError){data=MauticJS.appendTrackedContact(data);var query=MauticJS.serialize(data);if(method.toUpperCase()==='GET'){url=url+'?'+query;var query='';}
var xhr=MauticJS.createCORSRequest(method,url);var response;callbackSuccess=callbackSuccess||function(response,xhr){};callbackError=callbackError||function(response,xhr){};if(!xhr){MauticJS.log('MauticJS.debug: Could not create an XMLHttpRequest instance.');return false;}
if(!MauticJS.CORSRequestsAllowed){callbackError({},xhr);return false;}
xhr.onreadystatechange=function(e){if(xhr.readyState===XMLHttpRequest.DONE){response=MauticJS.parseTextToJSON(xhr.responseText);if(xhr.status===200){callbackSuccess(response,xhr);}else{callbackError(response,xhr);if(xhr.status===XMLHttpRequest.UNSENT){MauticJS.CORSRequestsAllowed=false;}}}};if(typeof xhr.setRequestHeader!=="undefined"){if(method.toUpperCase()==='POST'){xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}
xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');xhr.withCredentials=true;}
xhr.send(query);};MauticJS.parseTextToJSON=function(maybeJSON){var response;try{response=JSON.parse(maybeJSON);}catch(error){response=maybeJSON;}
return response;};MauticJS.insertScript=function(scriptUrl){var scriptsInHead=document.getElementsByTagName('head')[0].getElementsByTagName('script');var lastScript=scriptsInHead[scriptsInHead.length-1];var scriptTag=document.createElement('script');scriptTag.async=1;scriptTag.src=scriptUrl;if(lastScript){lastScript.parentNode.insertBefore(scriptTag,lastScript);}else{document.getElementsByTagName('head')[0].appendChild(scriptTag);}};MauticJS.insertStyle=function(styleUrl){var linksInHead=document.getElementsByTagName('head')[0].getElementsByTagName('link');var lastLink=linksInHead[linksInHead.length-1];var linkTag=document.createElement('link');linkTag.rel="stylesheet";linkTag.type="text/css";linkTag.href=styleUrl;if(lastLink){lastLink.parentNode.insertBefore(linkTag,lastLink.nextSibling);}else{document.getElementsByTagName('head')[0].appendChild(linkTag);}};MauticJS.guid=function(){function s4(){return Math.floor((1+Math.random())*0x10000).toString(16).substring(1);}
return s4()+s4()+'-'+s4()+'-'+s4()+'-'+s4()+'-'+s4()+s4()+s4();};MauticJS.dispatchEvent=function(name,detail){var event=new CustomEvent(name,{detail:detail});document.dispatchEvent(event);};function s4(){return Math.floor((1+Math.random())*0x10000).toString(16).substring(1);}
MauticJS.mtcSet=false;MauticJS.appendTrackedContact=function(data){if(window.localStorage){if(mtcId=localStorage.getItem('mtc_id')){data['mautic_device_id']=localStorage.getItem('mautic_device_id');}}
return data;};MauticJS.getTrackedContact=function(){if(MauticJS.mtcSet){return;}
MauticJS.makeCORSRequest('GET',MauticJS.contactIdUrl,{},function(response,xhr){MauticJS.setTrackedContact(response);});};MauticJS.setTrackedContact=function(response){if(response.id){MauticJS.setCookie('mtc_id',response.id);MauticJS.setCookie('mtc_sid',response.sid);MauticJS.setCookie('mautic_device_id',response.device_id);MauticJS.mtcSet=true;try{localStorage.setItem('mtc_id',response.id);localStorage.setItem('mtc_sid',response.sid);localStorage.setItem('mautic_device_id',response.device_id);}catch(e){console.warn('Browser does not allow storing in local storage');}}};MauticJS.postEventDeliveryQueue=[];MauticJS.firstDeliveryMade=false;MauticJS.onFirstEventDelivery=function(f){MauticJS.postEventDeliveryQueue.push(f);};MauticJS.preEventDeliveryQueue=[];MauticJS.beforeFirstDeliveryMade=false;MauticJS.beforeFirstEventDelivery=function(f){MauticJS.preEventDeliveryQueue.push(f);};document.addEventListener('mauticPageEventDelivered',function(e){var detail=e.detail;var isImage=detail.image;if(isImage&&!MauticJS.mtcSet){MauticJS.getTrackedContact();}else if(detail.response&&detail.response.id){MauticJS.setTrackedContact(detail.response);}
if(!isImage&&typeof detail.event[3]==='object'&&typeof detail.event[3].onload==='function'){detail.event[3].onload(detail)}
if(!MauticJS.firstDeliveryMade){MauticJS.firstDeliveryMade=true;for(var i=0;i<MauticJS.postEventDeliveryQueue.length;i++){if(typeof MauticJS.postEventDeliveryQueue[i]==='function'){MauticJS.postEventDeliveryQueue[i](detail);}
delete MauticJS.postEventDeliveryQueue[i];}}});MauticJS.checkForTrackingPixel=function(){if(document.readyState!=='complete'){setTimeout(function(){MauticJS.checkForTrackingPixel()},9)}else{var maxChecks=3000;var checkPixel=setInterval(function(){if(maxChecks>0&&!MauticJS.isPixelLoaded(true)){maxChecks--;return;}
clearInterval(checkPixel);if(maxChecks>0){var params={},hash;var hashes=MauticJS.trackingPixel.src.slice(MauticJS.trackingPixel.src.indexOf('?')+1).split('&');for(var i=0;i<hashes.length;i++){hash=hashes[i].split('=');params[hash[0]]=hash[1];}
MauticJS.dispatchEvent('mauticPageEventDelivered',{'event':['send','pageview',params],'params':params,'image':true});}},1);}}
MauticJS.checkForTrackingPixel();MauticJS.isPixelLoaded=function(domOnly){if(typeof domOnly=='undefined'){domOnly=false;}
if(typeof MauticJS.trackingPixel==='undefined'){MauticJS.trackingPixel=null;var imgs=Array.prototype.slice.apply(document.getElementsByTagName('img'));for(var i=0;i<imgs.length;i++){if(imgs[i].src.indexOf('mtracking.gif')!==-1){MauticJS.trackingPixel=imgs[i];break;}}}else if(domOnly){return false;}
if(MauticJS.trackingPixel&&MauticJS.trackingPixel.complete&&MauticJS.trackingPixel.naturalWidth!==0){return true;}
return false;};if(typeof window[window.MauticTrackingObject]!=='undefined'){MauticJS.input=window[window.MauticTrackingObject];if(typeof MauticJS.input.q==='undefined'){MauticJS.input.q=[];}
MauticJS.inputQueue=MauticJS.input.q;if(!MauticJS.inputQueue.hasOwnProperty('push')){Object.defineProperty(MauticJS.inputQueue,'push',{configurable:false,enumerable:false,writable:false,value:function(){for(var i=0,n=this.length,l=arguments.length;i<l;i++,n++){MauticJS.dispatchEvent('eventAddedToMauticQueue',arguments[i]);}
return n;}});}
MauticJS.getInput=function(task,type){var matches=[];if(typeof MauticJS.inputQueue!=='undefined'&&MauticJS.inputQueue.length){for(var i in MauticJS.inputQueue){if(MauticJS.inputQueue[i][0]===task&&MauticJS.inputQueue[i][1]===type){matches.push(MauticJS.inputQueue[i]);}}}
return matches;}}
MauticJS.ensureEventContext=function(event,context0,context1){return(typeof(event.detail)!=='undefined'&&event.detail[0]===context0&&event.detail[1]===context1);};MauticJS.mtcEventSet=false;document.addEventListener('mauticPageEventDelivered',function(e){var detail=e.detail;if(!MauticJS.mtcEventSet&&detail.response&&detail.response.events){MauticJS.setTrackedEvents(detail.response.events);}});MauticJS.setTrackedEvents=function(events){MauticJS.mtcEventSet=true;if(typeof fbq!=='undefined'&&typeof events.facebook_pixel!=='undefined'){var e=events.facebook_pixel;for(var i=0;i<e.length;i++){if(typeof e[i]['action']!=='undefined'&&typeof e[i]['label']!=='undefined')
fbq('trackCustom',e[i]['action'],{eventLabel:e[i]['label']});}}
if(typeof ga!=='undefined'&&typeof events.google_analytics!=='undefined'){var e=events.google_analytics;for(var i=0;i<e.length;i++){if(typeof e[i]['action']!=='undefined'&&typeof e[i]['label']!=='undefined')
ga('send',{hitType:'event',eventCategory:e[i]['category'],eventAction:e[i]['action'],eventLabel:e[i]['label'],});}}
if(typeof events.focus_item!=='undefined'){var e=events.focus_item;for(var i=0;i<e.length;i++){if(typeof e[i]['id']!=='undefined'&&typeof e[i]['js']!=='undefined'){MauticJS.insertScript(e[i]['js']);}}}};if(typeof MauticDomain=='undefined'){var MauticDomain='https://mautic.nucamp.co';}
if(typeof MauticLang=='undefined'){var MauticLang={'submittingMessage':"Please wait..."};}
MauticJS.replaceDynamicContent=function(params){params=params||{};var dynamicContentSlots=document.querySelectorAll('.mautic-slot, [data-slot="dwc"]');if(dynamicContentSlots.length){MauticJS.iterateCollection(dynamicContentSlots)(function(node,i){var slotName=node.dataset['slotName'];if('undefined'===typeof slotName){slotName=node.dataset['paramSlotName'];}
if('undefined'===typeof slotName){node.innerHTML='';return;}
var url='https://mautic.nucamp.co/dwc/slotNamePlaceholder'.replace('slotNamePlaceholder',slotName);MauticJS.makeCORSRequest('GET',url,params,function(response,xhr){if(response.content){var dwcContent=response.content;node.innerHTML=dwcContent;if(response.id&&response.sid){MauticJS.setTrackedContact(response);}
if(dwcContent.search("mauticform_wrapper")>0){if(typeof MauticSDK=='undefined'){MauticJS.insertScript('https://mautic.nucamp.co/media/js/mautic-form.js?ve71faab0');var fileInterval=setInterval(function(){if(typeof MauticSDK!='undefined'){MauticSDK.onLoad();clearInterval(fileInterval);}},100);}else{MauticSDK.onLoad();}}
var m;var regEx=/<script[^>]+src="?([^"\s]+)"?\s/g;while(m=regEx.exec(dwcContent)){if((m[1]).search("/focus/")>0){MauticJS.insertScript(m[1]);}}
if(dwcContent.search("fr-gatedvideo")>0){MauticJS.initGatedVideo();}}});});}};MauticJS.beforeFirstEventDelivery(MauticJS.replaceDynamicContent);(function(m,l,n,d){m.pageTrackingUrl=(l.protocol=='https:'?'https:':'https:')+'//mautic.nucamp.co/mtracking.gif';m.pageTrackingCORSUrl=(l.protocol=='https:'?'https:':'https:')+'//mautic.nucamp.co/mtc/event';m.contactIdUrl=(l.protocol=='https:'?'https:':'https:')+'//mautic.nucamp.co/mtc';m.getOs=function(){var OSName="Unknown OS";if(navigator.appVersion.indexOf("Win")!=-1)OSName="Windows";if(navigator.appVersion.indexOf("Mac")!=-1)OSName="MacOS";if(navigator.appVersion.indexOf("X11")!=-1)OSName="UNIX";if(navigator.appVersion.indexOf("Linux")!=-1)OSName="Linux";return OSName;}
m.deliverPageEvent=function(event,params){if(!m.firstDeliveryMade&&params['counter']>0){setTimeout(function(){m.deliverPageEvent(event,params);},5);return;}
if(m.preEventDeliveryQueue.length&&m.beforeFirstDeliveryMade===false){for(var i=0;i<m.preEventDeliveryQueue.length;i++){m.preEventDeliveryQueue[i](params);}
params=m.appendTrackedContact(params);m.beforeFirstDeliveryMade=true;}
MauticJS.makeCORSRequest('POST',m.pageTrackingCORSUrl,params,function(response){MauticJS.dispatchEvent('mauticPageEventDelivered',{'event':event,'params':params,'response':response});},function(){m.buildTrackingImage(event,params);m.firstDeliveryMade=true;});}
m.buildTrackingImage=function(pageview,params){delete m.trackingPixel;m.trackingPixel=new Image();if(typeof pageview[3]==='object'){var events=['onabort','onerror','onload'];for(var i=0;i<events.length;i++){var e=events[i];if(typeof pageview[3][e]==='function'){m.trackingPixel[e]=pageview[3][e];}}}
m.trackingPixel.onload=function(e){MauticJS.dispatchEvent('mauticPageEventDelivered',{'event':pageview,'params':params,'image':true});};m.trackingPixel.src=m.pageTrackingUrl+'?'+m.serialize(params);}
m.pageViewCounter=0;m.sendPageview=function(pageview){var queue=[];if(!pageview){if(typeof m.getInput==='function'){queue=m.getInput('send','pageview');}else{return false;}}else{queue.push(pageview);}
if(queue){for(var i=0;i<queue.length;i++){var event=queue[i];var params={page_title:d.title,page_language:n.language,preferred_locale:(n.language).replace('-','_'),page_referrer:(d.referrer)?d.referrer.split('/')[2]:'',page_url:l.href,counter:m.pageViewCounter,timezone_offset:new Date().getTimezoneOffset(),resolution:window.screen.width+'x'+window.screen.height,platform:m.getOs(),do_not_track:navigator.doNotTrack==1};if(window.Intl&&window.Intl.DateTimeFormat){params.timezone=new window.Intl.DateTimeFormat().resolvedOptions().timeZone;}
params=MauticJS.appendTrackedContact(params);if(typeof event[2]==='object'){for(var attr in event[2]){params[attr]=event[2][attr];}}
m.deliverPageEvent(event,params);m.pageViewCounter++;}}}
m.sendPageview();document.addEventListener('eventAddedToMauticQueue',function(e){if(MauticJS.ensureEventContext(e,'send','pageview')){m.sendPageview(e.detail);}});})(MauticJS,location,navigator,document);