"object"!=typeof _paq&&(_paq=[]),"object"!=typeof window.Matomo&&(window.Matomo=window.Piwik=function(){var e,t,i,n={},r={},a=document,o=navigator,s=screen,c=window,u=c.performance||c.mozPerformance||c.msPerformance||c.webkitPerformance,l=c.encodeURIComponent,d=c.decodeURIComponent,h=[],f=[],g=0,m=0,p=0,v=!1;function y(e){try{return d(e)}catch(t){return unescape(e)}}function b(e){return void 0!==e}function T(e){return"function"==typeof e}function k(e){return"object"==typeof e}function w(e){return"string"==typeof e||e instanceof String}function C(e){var t;return b(e)&&("number"==typeof(t=e)||t instanceof Number||w(e)&&e.length)}function S(e){"undefined"!=typeof console&&console&&console.error&&console.error(e)}function E(){for(e=0;e0)s=(o=n.split("::"))[0],n=o[1],"object"==typeof i[s]&&"function"==typeof i[s][n]?i[s][n].apply(i[s],r):a&&f.push(a);else for(t=0;t0;if(c)if(o=n.split("."),s&&"object"==typeof s[o[0]])s=s[o[0]],n=o[1];else if(a){f.push(a);break}if(s[n])s[n].apply(s,r);else{var u="The method '"+n+'\' was not found in "_paq" variable. Please have a look at the Matomo tracker documentation: https://developer.matomo.org/api-reference/tracking-javascript';if(S(u),!c)throw TypeError(u)}if("addTracker"===n||"setTrackerUrl"===n||"setSiteId"===n)break}else n.apply(h[t],r)}function A(e,t,i,n){return e.addEventListener?(e.addEventListener(t,i,n),!0):e.attachEvent?e.attachEvent("on"+t,i):void(e["on"+t]=i)}function N(e){"complete"===a.readyState?e():c.addEventListener?c.addEventListener("load",e,!1):c.attachEvent&&c.attachEvent("onload",e)}function I(e){var t=!1;(t=a.attachEvent?"complete"===a.readyState:"loading"!==a.readyState)?e():(a.addEventListener?A(a,"DOMContentLoaded",function i(){a.removeEventListener("DOMContentLoaded",i,!1),t||(t=!0,e())}):a.attachEvent&&(a.attachEvent("onreadystatechange",function i(){"complete"!==a.readyState||(a.detachEvent("onreadystatechange",i),t||(t=!0,e()))}),a.documentElement.doScroll&&c===c.top&&function i(){if(!t){try{a.documentElement.doScroll("left")}catch(e){return void setTimeout(i,0)}t=!0,e()}}()),A(c,"load",function(){t||(t=!0,e())},!1))}function P(e,t,i){if(!e)return"";var r,a,o="";for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]&&"function"==typeof n[r][e])&&(a=(0,n[r][e])(t||{},i))&&(o+=a);return o}function R(e){var t=RegExp("^([a-z]+):").exec(e);return t?t[1]:null}function _(e){var t=RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)").exec(e);return t?t[1]:e}function M(e){return/^[0-9][0-9]*(\.[0-9]+)?$/.test(e)}function O(e,t){return 0===(e=String(e)).lastIndexOf(t,0)}function D(e,t){return-1!==(e=String(e)).indexOf(t,e.length-t.length)}function L(e,t){return(e=String(e)).substr(0,e.length-t)}function F(e,t){if(-1===(e=String(e)).indexOf("?"+t+"=")&&-1===e.indexOf("&"+t+"="))return e;var i=e.indexOf("?");if(-1===i)return e;var n=e.substr(i+1),r=e.substr(0,i);if(n){var a="",o=n.indexOf("#");-1!==o&&(a=n.substr(o+1),n=n.substr(0,o));for(var s=n.split("&"),c=s.length-1;c>=0;c--)s[c].split("=")[0]===t&&s.splice(c,1);var u=s.join("&");u&&(r=r+"?"+u),a&&(r+="#"+a)}return r}function x(e,t){var i=RegExp("[\\?&#]"+t+"=([^&#]*)").exec(e);return i?y(i[1]):""}function q(e){return e&&String(e)===e?e.replace(/^\s+|\s+$/g,""):e}function U(e){var t,i,n,r,a,o,s,c,u,d,h=function(e,t){return e<>>32-t},f=function(e){var t,i="";for(t=7;t>=0;t--)i+=(e>>>4*t&15).toString(16);return i},g=[],m=1732584193,p=4023233417,v=2562383102,y=271733878,b=3285377520,T=[];for(i=0,d=(e=unescape(l(e))).length;i>>29),T.push(d<<3&4294967295),t=0;td.offsetWidth+d.scrollLeft)&&!(c+u-1d.offsetHeight+d.scrollTop)&&!(r+l-1r?-1:1}),e.length<=1)return e;var n=0,r=0,a=[];for(t=e[n++];t;)t===e[n]&&(r=a.push(n)),t=e[n++]||null;for(;r--;)e.splice(a[r],1);return e},getAttributeValueFromNode:function(e,t){if(this.hasNodeAttribute(e,t)){if(e&&e.getAttribute)return e.getAttribute(t);if(e&&e.attributes&&void 0!==e.attributes[t]){if(e.attributes[t].value)return e.attributes[t].value;if(e.attributes[t].nodeValue)return e.attributes[t].nodeValue;var i,n=e.attributes;if(n){for(i=0;i1e3)break;i++}},findPieceNode:function(e){var t;return(t=z.findFirstNodeHavingAttribute(e,this.CONTENT_PIECE_ATTR))||(t=z.findFirstNodeHavingClass(e,this.CONTENT_PIECE_CLASS)),t||(t=z.findFirstNodeHavingClass(e,this.LEGACY_CONTENT_PIECE_CLASS)),t||e},findTargetNodeNoDefault:function(e){if(e){var t=z.findFirstNodeHavingAttributeWithValue(e,this.CONTENT_TARGET_ATTR);if(t||(t=z.findFirstNodeHavingAttribute(e,this.CONTENT_TARGET_ATTR))||(t=z.findFirstNodeHavingClass(e,this.CONTENT_TARGET_CLASS))||(t=z.findFirstNodeHavingClass(e,this.LEGACY_CONTENT_TARGET_CLASS)))return t}},findTargetNode:function(e){return this.findTargetNodeNoDefault(e)||e},findContentName:function(e){if(e){var t=z.findFirstNodeHavingAttributeWithValue(e,this.CONTENT_NAME_ATTR);if(t)return z.getAttributeValueFromNode(t,this.CONTENT_NAME_ATTR);var i=this.findContentPiece(e);if(i)return this.removeDomainIfIsInLink(i);if(z.hasNodeAttributeWithValue(e,"title"))return z.getAttributeValueFromNode(e,"title");var n=this.findPieceNode(e);if(z.hasNodeAttributeWithValue(n,"title"))return z.getAttributeValueFromNode(n,"title");var r=this.findTargetNode(e);if(z.hasNodeAttributeWithValue(r,"title"))return z.getAttributeValueFromNode(r,"title")}},findContentPiece:function(e){if(e){var t=z.findFirstNodeHavingAttributeWithValue(e,this.CONTENT_PIECE_ATTR);if(t)return z.getAttributeValueFromNode(t,this.CONTENT_PIECE_ATTR);var i=this.findPieceNode(e),n=this.findMediaUrlInNode(i);if(n)return this.toAbsoluteUrl(n)}},findContentTarget:function(e){if(e){var t,i=this.findTargetNode(e);if(z.hasNodeAttributeWithValue(i,this.CONTENT_TARGET_ATTR))return z.getAttributeValueFromNode(i,this.CONTENT_TARGET_ATTR);if(z.hasNodeAttributeWithValue(i,"href"))return t=z.getAttributeValueFromNode(i,"href"),this.toAbsoluteUrl(t);var n=this.findPieceNode(e);if(z.hasNodeAttributeWithValue(n,"href"))return t=z.getAttributeValueFromNode(n,"href"),this.toAbsoluteUrl(t)}},isSameDomain:function(e){if(!e||!e.indexOf)return!1;if(0===e.indexOf(this.getLocation().origin))return!0;var t=e.indexOf(this.getLocation().host);return!!(8>=t)&&!!(0<=t)},removeDomainIfIsInLink:function(e){return e&&e.search&&-1!==e.search(RegExp("^https?://[^/]+"))&&this.isSameDomain(e)&&!(e=e.replace(RegExp("^.*//[^/]+"),""))&&(e="/"),e},findMediaUrlInNode:function(e){if(e){var t=e.nodeName.toLowerCase();if(-1!==j(["img","embed","video","audio"],t)&&z.findFirstNodeHavingAttributeWithValue(e,"src")){var i=z.findFirstNodeHavingAttributeWithValue(e,"src");return z.getAttributeValueFromNode(i,"src")}if("object"===t&&z.hasNodeAttributeWithValue(e,"data"))return z.getAttributeValueFromNode(e,"data");if("object"===t){var n,r=z.findNodesByTagName(e,"param");if(r&&r.length)for(n=0;n0);var r=i.clientWidth;c.innerWidth&&r>c.innerWidth&&(r=c.innerWidth);var o=i.clientHeight;return c.innerHeight&&o>c.innerHeight&&(o=c.innerHeight),(t.bottom>0||n)&&t.right>0&&t.left=0)||It(e)===String(t))||S("There was an error setting cookie `"+e+"`. Please check domain and path.")}function Rt(e){var t,i;for(i=0,e=F(e,He),e=F(e,"ignore_referrer"),e=F(e,"ignore_referer");i0)&&e.slice(i)===t)}function Mt(e){var t=document.createElement("a");return 0!==e.indexOf("//")&&0!==e.indexOf("http")&&(0===e.indexOf("*")&&(e=e.substr(1)),0===e.indexOf(".")&&(e=e.substr(1)),e="http://"+e),t.href=B.toAbsoluteUrl(e),t.pathname?t.pathname:""}function Ot(e,t){O(t,"/")||(t="/"+t),O(e,"/")||(e="/"+e);var i="/"===t||"/*"===t;return!!i||e===t||(t=String(t).toLowerCase(),e=String(e).toLowerCase(),D(t,"*")?!!(i=!(t=t.slice(0,-1))||"/"===t)||e===t||0===e.indexOf(t):(D(e,"/")||(e+="/"),D(t,"/")||(t+="/"),0===e.indexOf(t)))}function Dt(e,t){var i,n,r;for(i=0;i0&&e.slice(n)===i))return!0;return!1}function Ft(e){var t,i,n,r,a;if(!e.length||!Me.length)return!1;for(i=_(e),n=Mt(e),0===i.indexOf("www.")&&(i=i.substr(4)),t=0;tke.indexOf("?")?"?":"&")+e}function qt(e){return"POST"===ye||e&&(e.length>2e3||0===e.indexOf('{"requests"'))}function Ut(e,t,i){if("object"!=typeof o||"function"!=typeof o.sendBeacon||"function"!=typeof Blob)return!1;var n={type:"application/x-www-form-urlencoded; charset=UTF-8"},r=!1,a=ke;try{var s=new Blob([e],n);i&&!qt(e)&&(s=new Blob([],n),a=a+(0>a.indexOf("?")?"?":"&")+e),r=o.sendBeacon(a,s)}catch(e){return!1}return r&&"function"==typeof t&&t({request:e,trackerUrl:ke,success:!0,isSendBeacon:!0}),r}function Vt(e,t,i){b(i)&&null!==i||(i=!0),(!v||!Ut(e,t,i))&&setTimeout(function(){if(!v||!Ut(e,t,i))try{var n=c.XMLHttpRequest?new c.XMLHttpRequest:c.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;n.open("POST",ke,!0),n.onreadystatechange=function(){4!==this.readyState||this.status>=200&&this.status<300?4===this.readyState&&"function"==typeof t&&t({request:e,trackerUrl:ke,success:!0,xhr:this}):v&&Ut(e,t,i)||!i?"function"==typeof t&&t({request:e,trackerUrl:ke,success:!1,xhr:this}):xt(e,t)},n.setRequestHeader("Content-Type",Te),n.withCredentials=!0,n.send(e)}catch(n){v&&Ut(e,t,i)||!i?"function"==typeof t&&t({request:e,trackerUrl:ke,success:!1}):xt(e,t)}},50)}function Ht(t){var i=(new Date).getTime()+t;(!e||i>e)&&(e=i)}function jt(){mt=(new Date).getTime()}function Wt(){var e=(new Date).getTime();return!mt||e-mt>Q}function zt(){Wt()&&X()}function Bt(){"hidden"===a.visibilityState&&Wt()?X():"visible"===a.visibilityState&&(mt=(new Date).getTime())}function Gt(){!gt&&Q&&(gt=!0,A(c,"focus",jt),A(c,"blur",zt),A(c,"visibilitychange",Bt),m++,i.addPlugin("HeartBeat"+m,{unload:function(){gt&&Wt()&&X()}}))}function Yt(e){var t=(new Date).getTime();if(pt=t,dt&&t=e.length)return[e];for(var i=0,n=e.length,r=[];i=r&&a<=r+je)return!0}return!1}(t.substr(16,32))?t.substr(0,16):""}(me));var e,t,i=Math.round((new Date).getTime()/1e3),n=It(Kt("id"));return n?((t=n.split(".")).unshift("0"),Ne.length&&(t[1]=Ne),t):["1",Ne.length?Ne:"0"===Zt()?"":(e=ti(),vt((o.userAgent||"")+(o.platform||"")+c.JSON.stringify(e)+(new Date).getTime()+Math.random()).slice(0,16)),i]}function si(){var e=oi();return{newVisitor:e[0],uuid:e[1],createTs:e[2]}}function ci(e){if(Ee){(new Date).getTime(),b(e)||(e=si());var t,i,n=e.uuid+"."+e.createTs+".";Pt(Kt("id"),n,(t=(new Date).getTime(),i=si().createTs,1e3*parseInt(i,10)+Ge-t),ee,Z,We,ze)}}function ui(){var e=It(Kt("ref"));if(e.length)try{if(k(e=c.JSON.parse(e)))return e}catch(e){}return["","",0,""]}function li(){var e,t,i=Be;for(e=0,Be=!1;e0&&(b(t)||(t=""),w(t)||(t=String(t)),it[e]=t)},this.getCustomDimension=function(e){if((e=parseInt(e,10))>0&&Object.prototype.hasOwnProperty.call(it,e))return it[e]},this.deleteCustomDimension=function(e){(e=parseInt(e,10))>0&&delete it[e]},this.setCustomVariable=function(e,t,i,n){var r;b(n)||(n="visit"),b(t)&&(b(i)||(i=""),e>0&&(t=w(t)?t:String(t),i=w(i)?i:String(i),r=[t.slice(0,200),i.slice(0,200)],"visit"===n||2===n?(ni(),Ze[e]=r):"page"===n||3===n?et[e]=r:"event"===n&&(tt[e]=r)))},this.getCustomVariable=function(e,t){var i;return b(t)||(t="visit"),"page"===t||3===t?i=et[e]:"event"===t?i=tt[e]:("visit"===t||2===t)&&(ni(),i=Ze[e]),!!b(i)&&(!i||""!==i[0])&&i},this.deleteCustomVariable=function(e,t){this.getCustomVariable(e,t)&&this.setCustomVariable(e,"","",t)},this.deleteCustomVariables=function(e){"page"===e||3===e?et={}:"event"===e?tt={}:("visit"===e||2===e)&&(Ze={})},this.storeCustomVariablesInCookie=function(){$e=!0},this.setLinkTrackingTimer=function(e){Fe=e},this.getLinkTrackingTimer=function(){return Fe},this.setDownloadExtensions=function(e){w(e)&&(e=e.split("|")),Pe=e},this.addDownloadExtensions=function(e){var t;for(w(e)&&(e=e.split("|")),t=0;t=0&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),t+i)},this.getCurrentUrl=function(){return W||me},this.setDocumentTitle=function(e){Ie=e},this.setPageViewId=function(e){ce=e,yt=!0},this.setAPIUrl=function(e){we=e},this.setDownloadClasses=function(e){De=w(e)?[e]:e},this.setLinkClasses=function(e){Le=w(e)?[e]:e},this.setCampaignNameKey=function(e){qe=w(e)?[e]:e},this.setCampaignKeywordKey=function(e){Ue=w(e)?[e]:e},this.discardHashTag=function(e){K=e},this.setCookieNamePrefix=function(e){Ve=e,Ze&&(Ze=ii())},this.setCookieDomain=function(e){var t,i,n,r=V(e);Be||(Pt(i=Ve+"testcookie_domain",n="testvalue",1e4,null,t=r,We,ze),It(i)===n&&($t(i,null,t),1))?(Z=r,ei()):S("Can't write cookie on domain "+e)},this.setExcludedQueryParams=function(e){Oe=w(e)?[e]:e},this.getCookieDomain=function(){return Z},this.hasCookies=function(){return"1"===Zt()},this.setSessionCookie=function(e,t,i){if(!e)throw Error("Missing cookie name");b(i)||(i=Ye),Tt.push(e),Pt(Kt(e),t,i,ee,Z,We,ze)},this.getCookie=function(e){var t=It(Kt(e));return 0===t?null:t},this.setCookiePath=function(e){ee=e,ei()},this.getCookiePath=function(e){return ee},this.setVisitorCookieTimeout=function(e){Ge=1e3*e},this.setSessionCookieTimeout=function(e){Ye=1e3*e},this.getSessionCookieTimeout=function(){return Ye},this.setReferralCookieTimeout=function(e){Je=1e3*e},this.setConversionAttributionFirstReferrer=function(e){ne=e},this.setSecureCookie=function(e){e&&"https:"!==location.protocol?S("Error in setSecureCookie: You cannot use `Secure` on http."):We=e},this.setCookieSameSite=function(e){"None"===(e=(e=String(e)).charAt(0).toUpperCase()+e.toLowerCase().slice(1))||"Lax"===e||"Strict"===e?("None"===e&&("https:"===location.protocol?this.setSecureCookie(!0):(S("sameSite=None cannot be used on http, reverted to sameSite=Lax."),e="Lax")),ze=e):S("Ignored value for sameSite. Please use either Lax, None, or Strict.")},this.disableCookies=function(){Be=!0,Ee&&li()},this.areCookiesEnabled=function(){return!Be},this.setCookieConsentGiven=function(){Be&&!te&&(Be=!1,Nt=!0,Ee&&At)&&(ci(),Qt(mi("ping=1",null,"ping"),Fe))},this.requireCookieConsent=function(){return!this.getRememberedCookieConsent()&&(this.disableCookies(),!0)},this.getRememberedCookieConsent=function(){return It(de)},this.forgetCookieConsentGiven=function(){$t(de,ee,Z),this.disableCookies()},this.rememberCookieConsentGiven=function(e){e?e*=36e5:e=94608e7,this.setCookieConsentGiven();var t=(new Date).getTime();Pt(de,t,e,ee,Z,We,ze)},this.deleteCookies=function(){li()},this.setDoNotTrack=function(e){var t=o.doNotTrack||o.msDoNotTrack;(te=e&&("yes"===t||"1"===t))&&this.disableCookies()},this.alwaysUseSendBeacon=function(){xe=!0},this.disableAlwaysUseSendBeacon=function(){xe=!1},this.addListener=function(e,t){Li(e,t,!1)},this.enableLinkTracking=function(e){!ht&&(ht=!0,I(function(){Li(a.body,e,!0)}))},this.enableJSErrorTracking=function(){if(!ve){ve=!0;var e=c.onerror;c.onerror=function(t,i,n,r,a){return Ri(function(){var e="JavaScript Errors",a=i+":"+n;r&&(a+=":"+r),-1===j(St,e+a+t)&&(St.push(e+a+t),Ni(e,a,t))}),!!e&&e(t,i,n,r,a)}}},this.disablePerformanceTracking=function(){Qe=!1},this.enableHeartBeatTimer=function(e){Q=1e3*(e=Math.max(e||15,5)),null!==pt&&Gt()},this.disableHeartBeatTimer=function(){(Q||gt)&&(c.removeEventListener?(c.removeEventListener("focus",jt),c.removeEventListener("blur",zt),c.removeEventListener("visibilitychange",Bt)):c.detachEvent&&(c.detachEvent("onfocus",jt),c.detachEvent("onblur",zt),c.detachEvent("visibilitychange",Bt))),Q=null,gt=!1},this.killFrame=function(){c.location!==c.top.location&&(c.top.location=c.location)},this.redirectFile=function(e){"file:"===c.location.protocol&&(c.location=e)},this.setCountPreRendered=function(e){ie=e},this.trackGoal=function(e,t,i,n){Ri(function(){var r,a;a=n,Qt(mi("idgoal="+e+((r=t)?"&revenue="+r:""),i,"goal"),Fe,a)})},this.trackLink=function(e,t,i,n){Ri(function(){Ii(e,t,i,n)})},this.getNumTrackedPageViews=function(){return bt},this.trackPageView=function(e,t,i){ut=[],Ct=[],St=[],Y(Ee)?Ri(function(){var e,t,i,n,r,o,s,u,l,d,h;e=ke,t=we,i=Ee,r=(n=c.name.split("###"))[1],o=n[2],s=n[3],l=(u=G(e,t))+"plugins/Overlay/client/client.js?v=1",d=function(){Matomo_Overlay_Client.initialize(u,i,r,o,s)},(h=a.createElement("script")).type="text/javascript",h.src=l,h.readyState?h.onreadystatechange=function(){var e=this.readyState;("loaded"===e||"complete"===e)&&(h.onreadystatechange=null,d())}:h.onload=d,a.getElementsByTagName("head")[0].appendChild(h)}):Ri(function(){var n,r,o,s;bt++,n=e,r=t,o=i,yt||(ce=function(){var e,t="",i="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(e=0;e<6;e++)t+=i.charAt(Math.floor(62*Math.random()));return t}()),s=mi("action_name="+l(function(e){if(!w(e=e&&e.text?e.text:e)){var t=a.getElementsByTagName("title");t&&b(t[0])&&(e=t[0].text)}return e}(n||Ie)),r,"log"),Qe&&!Ke&&(s=hi(s)),Qt(s,Fe,o)})},this.disableBrowserFeatureDetection=function(){Nt=!1},this.enableBrowserFeatureDetection=function(){Nt=!0},this.trackAllContentImpressions=function(){!Y(Ee)&&Ri(function(){I(function(){var e=Ei(B.findContentNodes());Fi.pushMultiple(e)})})},this.trackVisibleContentImpressions=function(e,t){!Y(Ee)&&(b(e)||(e=!0),b(t)||(t=750),function(e,t,i){if(lt)return!0;lt=!0;var n,r,o=!1;function s(){o=!0}N(function(){if(e){for(r=0,n=["scroll","resize"];r0&&function e(t){setTimeout(function(){lt&&(o=!1,i.trackVisibleContentImpressions(),e(t))},t)}(t=parseInt(t,10))})}(e,t,this),Ri(function(){N(function(){var e=Ai(B.findContentNodes());Fi.pushMultiple(e)})}))},this.trackContentImpression=function(e,t,i){Y(Ee)||(e=q(e),t=q(t),i=q(i),e&&(t=t||"Unknown",Ri(function(){var n,r,a,o=(n=e,r=t,a=i,mi(B.buildImpressionRequestParams(n,r,a),null,"contentImpression"));Fi.push(o)})))},this.trackContentImpressionsWithinNode=function(e){!Y(Ee)&&e&&Ri(function(){lt?N(function(){var t=Ai(B.findContentNodesWithinNode(e));Fi.pushMultiple(t)}):I(function(){var t=Ei(B.findContentNodesWithinNode(e));Fi.pushMultiple(t)})})},this.trackContentInteraction=function(e,t,i,n){Y(Ee)||(e=q(e),t=q(t),i=q(i),n=q(n),e&&t&&(i=i||"Unknown",Ri(function(){var r=ki(e,t,i,n);r&&Fi.push(r)})))},this.trackContentInteractionNode=function(e,t){if(!Y(Ee)&&e){var i=null;return Ri(function(){(i=function(e,t){if(e){var i=B.findParentContentNode(e),n=B.buildContentBlock(i);if(n)return t||(t="Unknown"),ki(t,n.name,n.piece,n.target)}}(e,t))&&Fi.push(i)}),i}},this.logAllContentBlocksOnPage=function(){var e=B.findContentNodes(),t=B.collectContent(e);"undefined"!=typeof console&&console&&console.log&&console.log(t)},this.trackEvent=function(e,t,i,n,r,a){Ri(function(){Ni(e,t,i,n,r,a)})},this.trackSiteSearch=function(e,t,i,n){ut=[],Ri(function(){var r,a,o;r=t,a=i,o=n,Qt(mi("search="+l(e)+(r?"&search_cat="+l(r):"")+(b(a)?"&search_count="+a:""),o,"sitesearch"),Fe)})},this.setEcommerceView=function(e,t,i,n){nt={},C(i)&&(i=String(i)),b(i)&&null!==i&&!1!==i&&i.length?i instanceof Array&&(i=c.JSON.stringify(i)):i="";var r="_pkc";nt[r]=i,b(n)&&null!==n&&!1!==n&&String(n).length&&(nt[r="_pkp"]=n),(C(e)||C(t))&&(C(e)&&(nt[r="_pks"]=e),C(t)||(t=""),nt[r="_pkn"]=t)},this.getEcommerceItems=function(){return JSON.parse(JSON.stringify(rt))},this.addEcommerceItem=function(e,t,i,n,r){C(e)&&(rt[e]=[String(e),t,i,n,r])},this.removeEcommerceItem=function(e){C(e)&&delete rt[e=String(e)]},this.clearEcommerceCart=function(){rt={}},this.trackEcommerceOrder=function(e,t,i,n,r,a){var o,s,c,u,l,d;o=e,s=t,c=i,u=n,l=r,d=a,String(o).length&&b(s)&&pi(o,s,c,u,l,d)},this.trackEcommerceCartUpdate=function(e){var t;b(t=e)&&pi("",t,"","","","")},this.trackRequest=function(e,t,i,n){Ri(function(){Qt(mi(e,t,n),Fe,i)})},this.ping=function(){this.trackRequest("ping=1",null,null,"ping")},this.disableQueueRequest=function(){Fi.enabled=!1},this.setRequestQueueInterval=function(e){if(e<1e3)throw Error("Request queue interval needs to be at least 1000ms");Fi.interval=e},this.queueRequest=function(e){Ri(function(){var t=mi(e);Fi.push(t)})},this.isConsentRequired=function(){return kt},this.getRememberedConsent=function(){var e=It(le);return It(he)?(e&&$t(le,ee,Z),null):e&&0!==e?e:null},this.hasRememberedConsent=function(){return!!this.getRememberedConsent()},this.requireConsent=function(){kt=!0,(wt=this.hasRememberedConsent())||(Be=!0),n["CoreConsent"+ ++g]={unload:function(){wt||li()}}},this.setConsentGiven=function(e){var t,i;for(wt=!0,Nt=!0,$t(he,ee,Z),t=0;t1&&"addTracker"!==o&&"enableLinkTracking"!==o&&S("The method "+o+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Matomo trackers documentation: https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers'),r[o]++)}}return e}(_paq,X),t=0;t<_paq.length;t++)_paq[t]&&E(_paq[t]);return _paq=new Q,i.trigger("TrackerAdded",[r]),r}return A(c,"beforeunload",function(t){v=!0,P("unload");var i,n=(i=new Date).getTimeAlias();if(e-n>3e3&&(e=n+3e3),e)do{i=new Date}while(i.getTimeAlias()s)return void this.disable()}else t=N.getCurrentTime();var i=P(),n="Media"+this.type,r=this.mediaTitle||this.resource,a=this.makeRequestUrlFromParams({e_c:n,e_a:e,e_n:r,e_v:parseInt(Math.round(this.mediaProgressInSeconds),10),ca:"1"});if(i&&i.length){for(var o,c=0;cs)return void this.disable()}else t=N.getCurrentTime();this.isPlaying&&!c&&(c=1);var v={ma_id:e,ma_ti:null!==n?n:"",ma_pn:r,ma_mt:a,ma_re:o,ma_st:parseInt(Math.floor(c),10),ma_ps:parseInt(l,10),ma_le:d,ma_ttp:null!==h?h:"",ma_w:f||"",ma_h:g||"",ma_fs:m?"1":"0",ma_se:p.join(","),ca:"1"},b=this.makeRequestUrlFromParams(v);if(b!==this.lastSentProgressRequestUrl){this.lastSentProgressRequestUrl=b;var k=P();if(k&&k.length)for(var w,C=0;C25||l>50||this.numPlaysSameMediaOffScreen>10||d>15)&&this.disable()}this.trackUpdate()}},R.prototype.startWatchedTime=function(){this.lastTimeCheck=N.getCurrentTime()},R.prototype.stopWatchedTime=function(){this.lastTimeCheck&&(this.watchedTime+=N.getCurrentTime()-this.lastTimeCheck,this.lastTimeCheck=null)},R.prototype.seekStart=function(){this.isPlaying&&this.stopWatchedTime()},R.prototype.seekFinish=function(){this.isPlaying&&this.startWatchedTime()},R.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this.isPlaying=!1,this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.stopWatchedTime(),this.trackUpdate(),this.trackEvent("pause"))},R.prototype.finish=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.stopWatchedTime(),this.trackUpdate(),this.trackEvent("finish"),this.id=N.generateUniqueId(),this.timeToInitialPlay=null,this.lastTimeCheck=null,this.isPlaying=!1,this.isPaused=!1,this.watchedTime=0,this.mediaProgressInSeconds=0},R.prototype.trackUpdate=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null);var e,t,i=N.getCurrentTime();this.lastTimeCheck&&(this.watchedTime+=i-this.lastTimeCheck,this.lastTimeCheck=i);var n=this.mediaLengthInSeconds;n=n&&N.isNumber(n)?parseInt(this.mediaLengthInSeconds,10):"";var r=N.roundTimeToSeconds(this.watchedTime),a=this.mediaProgressInSeconds;a>n&&n&&(a=n);var o=[];for(e=0;e=0&&t<=n&&((t=t<=300?N.roundUp(t,15):N.roundUp(t,30))>=0&&t<1&&(t=15),-1===N.indexOfArray(o,t)&&-1===N.indexOfArray(this.trackedSegments,t)&&(o.push(t),this.trackedSegments.push(t)));this.viewedSegments=[],this.trackProgress(this.id,this.mediaTitle,this.playerName,this.type,this.resource,r,a,n,this.timeToInitialPlay,this.width,this.height,this.fullscreen,o)},R.prototype.update=function(){if(!this.timeout){var e=N.roundTimeToSeconds(this.watchedTime),t=n;!r&&(e>=1800||l>10)?t=300:!r&&(e>=600||l>4)?t=240:!r&&(e>=300||l>2)?t=120:!r&&e>=60&&(t=60),t*=1e3;var i=this;this.timeout=setTimeout(function(){i.trackUpdate(),i.timeout=null},t)}};var _={isEventsLimitReached:function(e,t,i,n){return!!m&&(_.getTotalEventsOnTracker(e,i)>=_.getTotalAllowedEventsPerTracker(i)?(T("blocked due to max tracker limit reached for action: "+i),!0):(_.initializeLimitPerTrackerPerMediaResource(e,t,i),e.MediaAnalytics.quotaEventRequests[t][i]>f[i]*(n&&n>900&&("pause"===i||"resume"===i)?2:1)))},getTotalEventsOnTracker:function(e,t){var i=0;if(void 0===e.MediaAnalytics.quotaEventRequests)return e.MediaAnalytics.quotaEventRequests={},i;if(Object.keys(e.MediaAnalytics.quotaEventRequests).length)for(var n in e.MediaAnalytics.quotaEventRequests)i+=e.MediaAnalytics.quotaEventRequests[n][t]||0;return i},getTotalAllowedEventsPerTracker:function(e){return g[e]||25},initializeLimitPerTrackerPerMediaResource:function(e,t,i){void 0===e.MediaAnalytics.quotaEventRequests&&(e.MediaAnalytics.quotaEventRequests={}),void 0===e.MediaAnalytics.quotaEventRequests[t]&&(e.MediaAnalytics.quotaEventRequests[t]={play:0,pause:0,resume:0,finish:0,seek:0}),void 0===e.MediaAnalytics.quotaEventRequests[t][i]&&(e.MediaAnalytics.quotaEventRequests[t][i]=0)},incrLimitPerTrackerPerMediaResource:function(e,t,i){m&&(_.initializeLimitPerTrackerPerMediaResource(e,t,i),e.MediaAnalytics.quotaEventRequests[t][i]++)}},M={players:{},registerPlayer:function(e,t){if(!t||!t.scanForMedia||"function"!=typeof t.scanForMedia)throw Error("A registered player does not implement the scanForMedia function");e=e.toLowerCase(),this.players[e]=t},removePlayer:function(e){e=e.toLowerCase(),delete this.players[e]},getPlayer:function(e){return(e=e.toLowerCase())in this.players?this.players[e]:null},getPlayers:function(){return this.players},scanForMedia:function(e){var t;if(a)for(t in void 0!==e&&e||(e=document),this.players)Object.prototype.hasOwnProperty.call(this.players,t)&&this.players[t].scanForMedia(e)}},O=function(e,t){if(e&&u.addEventListener&&!e.hasPlayerInstance){e.hasPlayerInstance=!0;var i=E.VIDEO===t,n=A.makeUrlAbsolute(e.currentSrc),r=I.getMediaResource(e,n),a="html5"+t.toLowerCase();"object"==typeof paella&&"object"==typeof paella.opencast?a="paella-opencast":I.getFirstParentWithClass(e,"video-js",1)?a="video.js":I.hasCssClass(e,"jw-video")?a="jwplayer":I.getFirstParentWithClass(e,"flowplayer",3)&&(a="flowplayer");var o=new R(a,t,r);v.push(o),k(e,o),m(),y(),g(),p();var s=!1,l=!1,d=null;e.currentSrc&&(d=e.currentSrc);var h=null;e.loop&&(h=0);var f=!1;e.loop&&e.autoplay&&e.muted&&(f=!0),e.addEventListener("playing",function(){P(),(void 0===e.paused||!e.paused)&&(void 0===e.ended||!e.ended)&&(s||(p(),s=!0,o.play()))},!0),e.addEventListener("durationchange",g,!0),e.addEventListener("loadedmetadata",_,!0),e.addEventListener("loadeddata",_,!0),e.addEventListener("pause",function(){(!e.currentTime||!e.duration||e.currentTime!==e.duration)&&!e.seeking&&(p(),s=!1,o.pause())},!0),e.addEventListener("seeking",function(){if(e.seeking){p();var t=parseInt(o.getMediaProgressInSeconds(),10);(null===h||h!==t)&&(h=t,o.trackEvent("seek"))}},!0),e.addEventListener("ended",function(){s=!1,o.finish()},!0),e.addEventListener("timeupdate",function(){if(p(),g(),i&&!o.width&&m(),!(void 0!==e.paused&&e.paused||void 0!==e.ended&&e.ended)){if(f){var t=N.roundTimeToSeconds(o.watchedTime),n=o.getMediaTotalLengthInSeconds();t>=30&&n>=1&&n<30&&t/n>=3&&o.disable()}l=!0,s?o.update():(s=!0,o.play())}},!0),e.addEventListener("seeking",function(){o.seekStart()},!0),e.addEventListener("seeked",function(){p(),g(),o.seekFinish()},!0),i&&(e.addEventListener("resize",_,!0),u.addEventListener("resize",function(){m()},!1)),o.timeout=setTimeout(function(){_(),o.timeout=null},1500)}function g(){e.duration&&o.setMediaTotalLengthInSeconds(e.duration)}function m(){if(i){var t=e;if("jwplayer"===a){var n=I.getFirstParentWithClass(t,"jwplayer");n&&(t=n)}void 0!==t.videoWidth&&t.videoWidth?o.setWidth(t.videoWidth):void 0!==t.clientWidth&&t.clientWidth&&o.setWidth(t.clientWidth),void 0!==t.videoHeight&&t.videoHeight?o.setHeight(t.videoHeight):void 0!==t.clientHeight&&t.clientHeight&&o.setHeight(t.clientHeight),o.setFullscreen(I.isFullscreen(t))}}function p(){o.setMediaProgressInSeconds(e.currentTime)}function y(){var t=I.getMediaTitle(e);t?o.setMediaTitle(t):b(e,o)}function b(e,t){if(w()&&!t.getMediaTitle()){var i=I.getFirstParentWithClass(e,"jwplayer",3);if(!i&&(i=I.getFirstParentWithClass(e,"jwplayer-video",3))&&void 0!==i.children&&i.children&&i.children.length&&i.children[0]&&(i=i.children[0]),i)try{if((r=jwplayer(i))&&r.getPlaylistItem){var n=r.getPlaylistItem();n&&n.matomoTitle?t.setMediaTitle(n.matomoTitle):n&&n.piwikTitle?t.setMediaTitle(n.piwikTitle):n&&n.title&&t.setMediaTitle(n.title)}}catch(e){T(e)}}if(C()&&!t.getMediaTitle()){var r,a=I.getFirstParentWithClass(e,"flowplayer",4);if(a)(r=flowplayer(a))&&r.video&&r.video.matomoTitle?t.setMediaTitle(r.video.matomoTitle):r&&r.video&&r.video.piwikTitle?t.setMediaTitle(r.video.piwikTitle):r&&r.video&&r.video.title?t.setMediaTitle(r.video.title):r&&r.video&&r.video.fv_title&&t.setMediaTitle(r.video.fv_title)}if(!t.getMediaTitle()){var o=c.getElementById("engage_basic_description_title");if(o&&o.innerText)(s=N.trim(o.innerText))&&t.setMediaTitle(s);else if("object"==typeof paella&&"object"==typeof paella.opencast&&"object"==typeof paella.opencast._episode&&paella.opencast._episode.dcTitle){var s;(s=N.trim(paella.opencast._episode.dcTitle))&&t.setMediaTitle(s)}}S(e,t)}function k(e,t){if(w()){var i=I.getFirstParentWithClass(e,"jwplayer",3);if(!i&&(i=I.getFirstParentWithClass(e,"jwplayer-video",3))&&void 0!==i.children&&i.children&&i.children.length&&i.children[0]&&(i=i.children[0]),i)try{if((r=jwplayer(i))&&r.getPlaylistItem){var n=r.getPlaylistItem();n&&void 0!==n.matomoResource&&n.matomoResource?t.setResource(n.matomoResource):n&&void 0!==n.piwikResource&&n.piwikResource&&t.setResource(n.piwikResource)}}catch(e){T(e)}}if(C()){var r,a=I.getFirstParentWithClass(e,"flowplayer",4);if(a)(r=flowplayer(a))&&r.video&&void 0!==r.video.matomoResource&&r.video.matomoResource?t.setResource(r.video.matomoResource):r&&r.video&&void 0!==r.video.piwikResource&&r.video.piwikResource&&t.setResource(r.video.piwikResource)}}function P(){if(!d&&e.currentSrc)d=e.currentSrc;else if(d&&e.currentSrc&&d!=e.currentSrc){d=e.currentSrc;var t=A.makeUrlAbsolute(d),i=o.getMediaTitle();s=!1,o.reset(),o.setResource(t),o.setMediaTitle("");var n=I.getMediaTitle(e);n&&n!==i?o.setMediaTitle(n):b(e,o),k(e,o),g()}}function _(){P(),m(),g(),p(),!l&&(o.getResource()||o.getMediaTitle())&&(l=!0,y(),k(e,o),o.trackUpdate())}};O.scanForMedia=function(e){if(u.addEventListener){for(var t,i=c.getElementById("engage_video")&&c.getElementById("videoDisplay1_wrapper"),n=e.getElementsByTagName("video"),r=0;r=8&&r<10&&(n=y().stringify(n))}e.contentWindow.postMessage(n,a)}}};L.scanForMedia=function(e){if(u.addEventListener){for(var t=e.getElementsByTagName("iframe"),i=0;i0||n.indexOf("vimeo.com")>0&&n.indexOf("embed")>0)&&new L(t[i],E.VIDEO)}t=null}};var F=function(e,t){if(e&&u.addEventListener&&!e.playerInstance&&("function"!=typeof Plyr||!I.getFirstParentWithClass(e,"plyr",2))){var i=new R("youtube",t,I.getMediaResource(e,null));i.setWidth(e.clientWidth),i.setHeight(e.clientHeight),i.setFullscreen(I.isFullscreen(e)),v.push(i),u.addEventListener("resize",function(){i.setWidth(e.clientWidth),i.setHeight(e.clientHeight),i.setFullscreen(I.isFullscreen(e))},!1);var n=I.getMediaTitle(e);n&&i.setMediaTitle(n);var r=!1,a=null,o=!I.getAttribute(e,"data-piwik-title")&&!I.getAttribute(e,"data-matomo-title"),s=!1,c=!1,l=null;e.playerInstance=new YT.Player(e,{events:{onReady:function(t){if(t&&t.target){if(o&&t.target&&t.target.getVideoData){var n=t.target.getVideoData();n&&n.title?i.setMediaTitle(n.title):S(e,i)}i.trackUpdate(),t.target.getPlayerState&&t.target.getPlayerState()==YT.PlayerState.PLAYING&&d(t)}},onError:function(e){e&&e.data&&(i.isPlaying&&(c=!0,i.pause()),T("YT onError event happened"))},onStateChange:d}})}function d(e){if(e&&e.target){var t,n=e.target;if(e&&void 0!==e.data&&null!==e.data)t=e.data;else{if(!n.getPlayerState)return void T("youtubeMissingPlayerState");t=n.getPlayerState()}switch(T("youtubeStateChange",t),t){case YT.PlayerState.ENDED:n.getCurrentTime&&i.setMediaProgressInSeconds(n.getCurrentTime()),n.getDuration&&i.setMediaTotalLengthInSeconds(n.getDuration()),i.finish(),a&&(clearInterval(a),a=null);break;case YT.PlayerState.PLAYING:var u=null;if(n.getVideoData&&(u=n.getVideoData()),!l&&u&&u.video_id?l=u.video_id:l&&u&&u.video_id&&l!=u.video_id&&(l=u.video_id,i.reset(),n.getVideoUrl&&i.setResource(n.getVideoUrl()),o=!0,s=!1,r=!1,T("currentVideoId has changed to "+l)),n.getCurrentTime&&i.setMediaProgressInSeconds(n.getCurrentTime()),n.getDuration&&i.setMediaTotalLengthInSeconds(n.getDuration()),o&&(u&&u.title&&i.setMediaTitle(u.title),o=!1),!s||c?(s=!0,c=!1,r=!1,i.play()):r&&(r=!1,i.seekFinish()),i.update(),!a){var d=[];a=setInterval(function(){if(i.isPlaying){if(n&&n.getCurrentTime){var e=n.getCurrentTime();if(i.setMediaProgressInSeconds(e),d.push(e),d.length>60){d.shift();var t=0,r=!0;for(t=0;t0||r.indexOf("youtube-nocookie.com")>0)&&(I.setAttribute(i[n],"enablejsapi","true"),t.push(i[n]))}i=null,t&&t.length&&(o()?s():u.onYouTubeIframeAPIReady?(a("onYouTubeIframeAPIReady",s),l(!1)):u.onYouTubePlayerAPIReady?(a("onYouTubePlayerAPIReady",s),l(!1)):(u.onYouTubeIframeAPIReady=s,l(!0))),t=null}function a(e,t){if(e in window){var i=window[e];if("function"==typeof i){try{if(i.toString&&0===i.toString().indexOf("function replaceMe"))return}catch(e){}window[e]=function(){try{i.apply(window,[].slice.call(arguments,0)),t()}catch(e){throw t(),e}}}}}function o(){return"object"==typeof YT&&YT&&YT.Player}function s(){if(o())for(var t=e.getElementsByTagName("iframe"),i=0;i0||n.indexOf("youtube-nocookie.com")>0)&&(t[i].setAttribute&&t[i].setAttribute("enablejsapi","true"),new F(t[i],E.VIDEO))}}function l(e){if(e||"object"!=typeof u.YT&&!(c.querySelectorAll('script[src="proxy.php?url=https%3A%2F%2Fwww.youtube.com%2Fiframe_api"]').length>0)){var t=c.createElement("script");t.src="proxy.php?url=https%3A%2F%2Fwww.youtube.com%2Fiframe_api";var i=c.getElementsByTagName("script");if(i&&i.length){var n=i[0];n.parentNode.insertBefore(t,n)}else c.body&&c.body.appendChild(t)}}};var x=function(e,t){if(e&&!e.playerInstance){var i=new SC.Widget(e);e.playerInstance=i;var n=I.getAttribute(e,"data-matomo-resource");n||(n=I.getAttribute(e,"data-piwik-resource"));var r=new R("soundcloud",t,n);v.push(r);var a=I.getMediaTitle(e);a&&r.setMediaTitle(a);var o=!1,s=!I.getAttribute(e,"data-piwik-title")&&!I.getAttribute(e,"data-matomo-title"),c=null,u=!1;i.bind(SC.Widget.Events.READY,function(e){d(h),i.bind(SC.Widget.Events.PLAY,function(e){l()&&!f(e)&&(g(),m(e),r.play())}),i.bind(SC.Widget.Events.PLAY_PROGRESS,function(e){if(l()&&!f(e)&&(g(),m(e),!u)){if(r.isPaused)return void r.play();r.isPlaying&&(o&&(o=!1,r.seekFinish()),r.update())}}),i.bind(SC.Widget.Events.PAUSE,function(e){if(l()&&!f(e)){if(g(),m(e),r.getMediaProgressInSeconds()&&r.getMediaTotalLengthInSeconds()===r.getMediaProgressInSeconds())return void T("ignoring pause event because video is finished");r.pause(),u=!0,setTimeout(function(){u=!1},1e3)}}),i.bind(SC.Widget.Events.FINISH,function(e){l()&&!f(e)&&(g(),m(e),r.finish())}),i.bind(SC.Widget.Events.SEEK,function(e){l()&&!f(e)&&(g(),m(e),r.seekStart(),o=!0)})})}function l(){return r.getMediaTitle()&&r.getResource()}function d(e){i.getCurrentSound(function(t){null===t?i.getCurrentSoundIndex(function(t){t>=0&&i.getSounds(function(i){t in i&&i[t]&&e(i[t])})}):e(t)})}function h(e){e&&(c=e.id,s&&!r.getMediaTitle()&&e.title&&r.setMediaTitle(e.title),e.uri&&!r.getResource()&&r.setResource(e.uri),e.duration&&r.setMediaTotalLengthInSeconds(parseInt(Math.floor(e.duration/1e3))),r.trackUpdate())}function f(e){return!!e&&!!e.soundId&&c!==e.soundId&&(c=e.soundId,r.reset(),r.setResource(""),r.setMediaTitle(""),s=!0,o=!1,d(h),T("currentId has changed to "+c),!0)}function g(){i.getDuration(function(e){r.setMediaTotalLengthInSeconds(parseInt(Math.floor(e/1e3)))})}function m(e){"object"==typeof e&&void 0!==e.currentPosition&&r.setMediaProgressInSeconds(parseInt(Math.floor(e.currentPosition/1e3)))}};function q(e){void 0===e.MediaAnalytics&&(e.MediaAnalytics={enableEvents:!0,enableProgress:!0,quotaEventRequests:{},disableTrackEvents:function(){this.enableEvents=!1},enableTrackEvents:function(){this.enableEvents=!0},isTrackEventsEnabled:function(){return a&&this.enableEvents},disableTrackProgress:function(){this.enableProgress=!1},enableTrackProgress:function(){this.enableProgress=!0},isTrackProgressEnabled:function(){return a&&this.enableProgress}},Piwik.trigger("MediaAnalytics.TrackerInitialized",[e]))}function U(){"object"==typeof window&&"function"==typeof u.piwikMediaAnalyticsAsyncInit&&u.piwikMediaAnalyticsAsyncInit(),"object"==typeof window&&"function"==typeof u.matomoMediaAnalyticsAsyncInit&&u.matomoMediaAnalyticsAsyncInit(),h=!0}x.scanForMedia=function(e){function t(){for(var t=[],i=e.getElementsByTagName("iframe"),n=0;n0&&t.push(i[n])}return t}function i(){return"object"==typeof SC&&SC&&SC.Widget}function n(){if(i())for(var e=t(),n=0;n0&&new x(e[n],E.AUDIO)}}var r=t();if(r&&r.length)if(i())n();else{var a=c.createElement("script");a.src="proxy.php?url=https%3A%2F%2Fw.soundcloud.com%2Fplayer%2Fapi.js",a.onload=n;var o=c.getElementsByTagName("script");if(o&&o.length){var s=o[0];s.parentNode.insertBefore(a,s)}else c.body&&c.body.appendChild(a)}r=null},M.registerPlayer("html5",O),M.registerPlayer("vimeo",L),M.registerPlayer("youtube",F),M.registerPlayer("jwplayer",D),M.registerPlayer("soundcloud",x);var V=!1,H=!1;function j(){if(!V&&w()){V=!0;var e=jwplayer();"object"==typeof e&&"function"==typeof e.on&&e.on("ready",function(e){M.scanForMedia(document)})}if(!H&&C()){H=!0,flowplayer(function(e,t){e&&(e.on("ready",function(){M.scanForMedia(document)}),e.on("load",function(){M.scanForMedia(document)}))});var t=flowplayer();"object"==typeof t&&"function"==typeof t.on&&(t.on("ready",function(){M.scanForMedia(document)}),t.on("load",function(){M.scanForMedia(document)}))}}function W(){Piwik.DOM.onReady(function(){var e=P();e&&k(e)&&e.length&&(M.scanForMedia(document),j())}),Piwik.DOM.onLoad(function(){var e=P();e&&k(e)&&e.length&&(M.scanForMedia(document),j())})}function z(){if(("object"!=typeof u||"object"!=typeof u.Piwik||"object"!=typeof u.Piwik.MediaAnalytics)&&("object"!=typeof u||u.Piwik))if(Piwik.MediaAnalytics={utils:N,url:A,element:I,players:M,rateLimit:_,MediaTracker:R,mediaType:E,scanForMedia:function(e){M.scanForMedia(e||document)},setPingInterval:function(e){if(10>e)throw Error("Ping interval needs to be at least ten seconds");r=!0,n=parseInt(e,10)},removePlayer:function(e){M.removePlayer(e)},addPlayer:function(e,t){M.registerPlayer(e,t)},disableMediaAnalytics:function(){a=!1},enableMediaAnalytics:function(){a=!0},setMatomoTrackers:function(e){this.setPiwikTrackers(e)},setPiwikTrackers:function(e){null!==e?(k(e)||(e=[e]),o=e,h&&W()):o=null},setMediaTitleFallback:function(e){if("function"!=typeof e)throw Error("The mediaTitleFallback needs to be callback function");p=e},getMatomoTrackers:function(){return P()},getPiwikTrackers:function(){return P()},isMediaAnalyticsEnabled:function(){return a},setMaxTrackingTime:function(e){s=1e3*parseInt(e,10)},enableDebugMode:function(){i=!0},enableRateLimit:function(){m=!0},disableRateLimit:function(){m=!1}},Piwik.addPlugin("MediaAnalytics",{unload:function(){var e;T("tracker intances mediaTrackerInstances");for(var t=0;t0&&(t[i].MediaAnalytics.quotaEventRequests={});return""}}),u.Piwik.initialized){for(var e=Piwik.getAsyncTrackers(),t=0;t ")},_cssPathStep:function(e,i,n){if(1!==e.nodeType)return null;var r=e.getAttribute("id");if(i){if(r)return new t.DOMNodePathStep(u(r),!0);var a=e.nodeName.toLowerCase();if("body"===a||"head"===a||"html"===a)return new t.DOMNodePathStep(e.nodeName.toLowerCase(),!0)}var o=e.nodeName.toLowerCase();if(r)return new t.DOMNodePathStep(o.toLowerCase()+u(r),!0);var s=e.parentNode;if(!s||9===s.nodeType)return new t.DOMNodePathStep(o.toLowerCase(),!0);function c(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]}function u(e){return"#"+l(e)}function l(e){if(/^-?[a-zA-Z_][a-zA-Z0-9_\-]*$/.test(e))return e;var t=/^(?:[0-9]|-[0-9-]?)/.test(e),i=e.length-1;return e.replace(/./g,function(e,n){var r,a,o;return t&&0===n||!(/[a-zA-Z0-9_\-]/.test(r=e)||r.charCodeAt(0)>=160)?(a=n===i,"\\"+(1===(o=e.charCodeAt(0).toString(16)).length&&(o="0"+o),o)+(a?"":" ")):e})}function d(e){var t,i={};for(t=0;t>>0},e.prototype.nodeId=function(t){var i=t[e.ID_PROP];return i||(i=t[e.ID_PROP]=e.nextId_++),i},e.prototype.set=function(e,t){var i=this.nodeId(e);this.nodes[i]=e,this.values[i]=t},e.prototype.get=function(e){var t=this.nodeId(e);return this.values[t]},e.prototype.has=function(e){return this.nodeId(e)in this.nodes},e.prototype.delete=function(e){var t=this.nodeId(e);delete this.nodes[t],this.values[t]=void 0},e.prototype.keys=function(){var e=[];for(var t in this.nodes)this.isIndex(t)&&e.push(this.nodes[t]);return e},e.ID_PROP="__mutation_summary_node_map_id__",e.nextId_=1,e}();(r=n||(n={}))[r.STAYED_OUT=0]="STAYED_OUT",r[r.ENTERED=1]="ENTERED",r[r.STAYED_IN=2]="STAYED_IN",r[r.REPARENTED=3]="REPARENTED",r[r.REORDERED=4]="REORDERED",r[r.EXITED=5]="EXITED";var o=function(){function e(e,t,i,n,r,a,o,s){void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===a&&(a=!1),void 0===o&&(o=null),void 0===s&&(s=null),this.node=e,this.childList=t,this.attributes=i,this.characterData=n,this.oldParentNode=r,this.added=a,this.attributeOldValues=o,this.characterDataOldValue=s,this.isCaseInsensitive=1===this.node.nodeType&&this.node instanceof HTMLElement&&this.node.ownerDocument instanceof HTMLDocument}return e.prototype.getAttributeOldValue=function(e){if(this.attributeOldValues)return this.isCaseInsensitive&&(e=e.toLowerCase()),this.attributeOldValues[e]},e.prototype.getAttributeNamesMutated=function(){var e=[];if(!this.attributeOldValues)return e;for(var t in this.attributeOldValues)e.push(t);return e},e.prototype.attributeMutated=function(e,t){this.attributes=!0,this.attributeOldValues=this.attributeOldValues||{},!(e in this.attributeOldValues)&&(this.attributeOldValues[e]=t)},e.prototype.characterDataMutated=function(e){!this.characterData&&(this.characterData=!0,this.characterDataOldValue=e)},e.prototype.removedFromParent=function(e){this.childList=!0,this.added||this.oldParentNode?this.added=!1:this.oldParentNode=e},e.prototype.insertedIntoParent=function(){this.childList=!0,this.added=!0},e.prototype.getOldParent=function(){if(this.childList){if(this.oldParentNode)return this.oldParentNode;if(this.added)return null}return this.node.parentNode},e}(),s=function(){this.added=new a,this.removed=new a,this.maybeMoved=new a,this.oldPrevious=new a,this.moved=void 0},c=function(e){function t(t,i){e.call(this),this.rootNode=t,this.reachableCache=void 0,this.wasReachableCache=void 0,this.anyParentsChanged=!1,this.anyAttributesChanged=!1,this.anyCharacterDataChanged=!1;for(var n=0;n1)throw Error("Invalid request option. all has no options.");n.queries.push({all:!0})}else if("attribute"in a){if((s={attribute:v(a.attribute)}).elementFilter=m.parseSelectors("*["+s.attribute+"]"),Object.keys(a).length>1)throw Error("Invalid request option. attribute has no options.");n.queries.push(s)}else if("element"in a){var o=Object.keys(a).length,s={element:a.element,elementFilter:m.parseSelectors(a.element)};if(a.hasOwnProperty("elementAttributes")&&(s.attributeList=y(a.elementAttributes),o--),o>1)throw Error("Invalid request option. element only allows elementAttributes option.");n.queries.push(s)}else{if(!a.characterData)throw Error("Invalid request option. Unknown query request.");if(Object.keys(a).length>1)throw Error("Invalid request option. characterData has no options.");n.queries.push({characterData:!0})}}return n},e.prototype.createSummaries=function(e){if(!e||!e.length)return[];for(var t=new u(this.root,e,this.elementFilter,this.calcReordered,this.options.oldPreviousSibling),i=[],n=0;n=0)r={};else if(e.attributes.name){var c=String(e.attributes.name.value).toLowerCase();(c.indexOf("twitter:")>=0||c.indexOf("description")>=0||c.indexOf("keywords")>=0)&&(r={})}}else if("LINK"===e.tagName){if(e.attributes.rel&&["icon","preload","preconnect","dns-prefetch","next","prev","alternate","search"].indexOf(String(e.attributes.rel.value).toLowerCase())>=0&&(r={}),e.attributes.href){var u=String(e.attributes.href.value).toLowerCase().indexOf(".scr.kaspersky-labs.com");u>5&&u<=20&&(r={})}if(e.href){if("function"==typeof w.URL){var l=ae.onCssLoaded(e.href),d=3;l||function t(i){d>0&&setTimeout(function(){d--,(l=ae.onCssLoaded(e.href))||t(e.href)},300)}(e.href)}r.url=e.href}}return r},e.prototype.serializeAddedAndMoved=function(e,t,i){var n=this,r=e.concat(t).concat(i),a=new b.NodeMap;r.forEach(function(e){var t=e.parentNode,i=a.get(t);i||(i=new b.NodeMap,a.set(t,i)),i.set(e,!0)});var o=[];return a.keys().forEach(function(e){for(var t=a.get(e),i=t.keys();i.length;){for(var r=i[0];r.previousSibling&&t.has(r.previousSibling);)r=r.previousSibling;for(;r&&t.has(r);){var s=n.serializeNode(r);s.previousSibling=n.serializeNode(r.previousSibling),s.parentNode=n.serializeNode(r.parentNode),o.push(s),t.delete(r),r=r.nextSibling}i=t.keys()}}),o},e.prototype.serializeAttributeChanges=function(e){var t=this,i=new b.NodeMap;return Object.keys(e).forEach(function(n){e[n].forEach(function(e){var r=i.get(e);r||((r=t.serializeNode(e)).attributes={},i.set(e,r));var a=Q.shouldMaskElementRecursive(e),o=t.getAttributesFromNode(e,a.isIgnoredField,a.isIgnoredContent);r.attributes[n]=n in o?o[n]:null})}),i.keys().map(function(e){return i.get(e)})},e.prototype.applyChanged=function(e){var t=this,i=e[0],n=i.removed.map(function(e){return t.serializeNode(e)}),r=this.serializeAddedAndMoved(i.added,i.reparented,i.reordered),a=this.serializeAttributeChanges(i.attributeChanged),o=i.characterDataChanged.map(function(e){var i=t.serializeNode(e);3===e.nodeType&&e.parentNode&&(e=e.parentNode);var n=Q.shouldMaskElementRecursive(e,!1,!1);return i.textContent=Q.getMaskedTextContent(e,n.isIgnoredField,n.isIgnoredContent),i});this.mirror.applyChanged(n,r,a,o),i.removed.forEach(function(e){t.forgetNode(e)})},e}()}var k=document,w=window,C=0,S=!1,E=!D(),A=!0,N=null,I=!1,P="",R=!1,_=9e5,M=500,O=!1;function D(){if("object"!=typeof JSON||"function"!=typeof Array.prototype.map||"function"!=typeof Array.prototype.filter||"function"!=typeof Array.prototype.indexOf||"function"!=typeof Element.prototype.getBoundingClientRect||-1!==["cc.bingj.com"].indexOf(k.domain)||-1!==String(k.domain).indexOf(".googleusercontent.com")||/alexa|baidu|bing|bot|crawler|curl|crawling|duckduckgo|facebookexternalhit|feedburner|googlebot|google web preview|linkdex|nagios|postrank|pingdom|robot|slurp|spider|yahoo!|yandex|wget/i.test(navigator.userAgent))return!0;var e=String(k.referrer);return!!(e&&e.indexOf("module=Overlay&action=startOverlaySession")>=0)}function L(){S&&"object"==typeof console&&("function"==typeof console.debug?console.debug.apply(console,arguments):"function"==typeof console.log&&console.log.apply(console,arguments))}var F=function(){return!0},x=!0,q=!1,U=!1,V=!0,H=null,j=!1,W={};"object"==typeof JSON&&(W=JSON);var z=!1,B=[],G="undefined"!=typeof WebKitMutationObserver||"undefined"!=typeof MutationObserver,Y={getScrollLeft:function(){return w.document.body.scrollLeft||w.document.documentElement.scrollLeft},getScrollTop:function(){return w.document.body.scrollTop||w.document.documentElement.scrollTop},getDocumentHeight:function(){return X.safeMathMax([k.body.offsetHeight,k.body.scrollHeight,k.documentElement.offsetHeight,k.documentElement.clientHeight,k.documentElement.scrollHeight,1])},getDocumentWidth:function(){return X.safeMathMax([k.body.offsetWidth,k.body.scrollWidth,k.documentElement.offsetWidth,k.documentElement.clientWidth,k.documentElement.scrollWidth,1])},getWindowSize:function(){var e=w.innerHeight||k.documentElement.clientHeight||k.body.clientHeight;return{width:w.innerWidth||k.documentElement.clientWidth||k.body.clientWidth,height:e}}},J={namespace:"hsr",set:function(e,t,i){t=parseInt(t,10),i=parseInt(i,10);for(var n="",r=J.getHsrConfigs(e),a=!1,o=0;o2))return!0;if(t){for(var c=e.parentNode?e.parentNode:null,u=!1;c;){if(Q.hasAttribute(c,"data-piwik-mask")||Q.hasAttribute(c,"data-matomo-mask"))return!0;!u&&c&&Q.hasAttribute(c,"data-matomo-unmask")&&(u=!0),c=c.parentNode?c.parentNode:null}if(u)return!1}return!Q.hasAttribute(e,"data-matomo-unmask")&&!n},shouldMaskContent:function(e,t){if(!e)return!1;if(e.tagName&&"FORM"!==e.tagName&&Q.hasAttribute(e,"data-matomo-mask"))return!0;if(e.tagName&&"FORM"!==e.tagName&&Q.hasAttribute(e,"data-matomo-unmask"))return!1;if(t)for(var i=e.parentNode?e.parentNode:null;i&&("#text"!==e.nodeName||!Q.hasAttribute(i,"data-matomo-unmask"));){if("FORM"!==i.tagName&&Q.hasAttribute(i,"data-matomo-mask"))return!0;i=i.parentNode?i.parentNode:null}return!1},isAllowedInputType:function(t){return t.type&&-1!==e.indexOf(t.type)&&!Q.hasAttribute(t,"data-piwik-mask")&&!Q.hasAttribute(t,"data-matomo-mask")}},X={safeMathMax:function(e){var t,i=[];for(t=0;t0}function $(){return K("pk_hsr_forcesample=1")||K("pk_hsr_capturescreen=1")}function Z(){return K("pk_hsr_forcesample=0")}function ee(e){return!!$()||!Z()&&(e>=100||!(e<=0)&&(e>=1?e>=X.getRandomInt(1,100):10*e>=X.getRandomInt(1,1e3)))}function te(e){void 0===e.HeatmapSessionRecording&&(e.HeatmapSessionRecording={myId:X.generateUniqueId(),hasReceivedConfig:!1,hasRequestedConfig:!1,hasTrackedData:!1,hasSentStopTrackingEvent:!1,enabled:!0,hsrIdsToGetDOM:[],disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},isEnabled:function(){return E&&this.enabled},numSentTrackingRequests:0,Heatmap:{data:[],hsrids:[],configs:[],addConfig:function(t){"object"==typeof t&&t.id&&(t.id=parseInt(t.id,10),this.configs.push(t),void 0===t.sample_rate?t.sample_rate=100:t.sample_rate=Math.min(parseFloat(t.sample_rate),100),t.id&&ee(t.sample_rate)&&F(t)&&(this.addHsrId(t.id),(t.getdom||K("pk_hsr_capturescreen=1"))&&e.HeatmapSessionRecording.hsrIdsToGetDOM.push(t.id)))},addHsrId:function(t){this.hsrids.push(t),e.HeatmapSessionRecording.hasTrackedData&&ne.recordData(1,{ty:7,id:t})}},Both:{data:[]},Session:{data:[],hsrids:[],configs:[],addConfig:function(t){if("object"==typeof t&&t.id){t.id=parseInt(t.id,10),void 0===t.sample_rate?t.sample_rate=100:t.sample_rate=Math.min(parseFloat(t.sample_rate),100),t.conditionsMet=!1,this.configs.push(t),parseInt(e.getSiteId(),10);var i=J.get(e,t.id);if(1!==i||Z()){if($());else if(0===i||!ee(t.sample_rate))return void J.set(e,t.id,0)}else t.sample_rate=100,t.activity=!1,t.min_time=0;if(this.checkConditionsMet(),t.min_time){var n=this;Piwik.DOM.onReady(function(){var e=1e3*t.min_time-X.getTimeSincePageReady()+120;e>=0?setTimeout(function(){n.checkConditionsMet()},e):n.checkConditionsMet()})}}},checkConditionsMet:function(){for(var e,t=0;t=X.roundTimeToSeconds(X.getTimeSincePageReady())&&(i=!1),e.activity&&!U&&(U=Y.getDocumentHeight()<=Y.getWindowSize().height),!e.activity||q&&U||(i=!1),i&&(e.conditionsMet=!0,F(e)&&(void 0!==e.keystrokes&&e.keystrokes&&"0"!==e.keystrokes||(x=!1),this.addHsrId(e.id)))}},addHsrId:function(t){this.hsrids.push(t),e.HeatmapSessionRecording.hasTrackedData&&ne.recordData(2,{ty:7,id:t}),parseInt(e.getSiteId(),10),J.set(e,t,1)}},addConfig:function(e){var t;if(this.hasRequestedConfig=!0,this.hasReceivedConfig=!0,void 0!==e&&e){if("object"==typeof e.heatmap&&this.Heatmap.addConfig(e.heatmap),e.heatmaps&&X.isArray(e.heatmaps)&&e.heatmaps.length)for(t=0;t=0;o--)r[o]&&r[o].ty&&9===r[o].ty&&r.splice(o,1);if(n.length&&i.Both.data.length&&(r=r.concat(i.Both.data),i.Both.data=[]),void 0===t&&(t=this.shouldEndRecording(e)),t&&i.hasTrackedData&&!i.hasSentStopTrackingEvent&&a&&(r.push({ty:11}),i.hasSentStopTrackingEvent=!0),n&&n.length&&r&&r.length){if(e.HeatmapSessionRecording.hsrIdsToGetDOM&&e.HeatmapSessionRecording.hsrIdsToGetDOM.length&&(!ae.initialDOM&&G&&new T(k,{initialize:function(e,t){ae.initialDOM=W.stringify({rootId:e,children:t})}}).disconnect(),ae.initialDOM&&G)){for(var s=0;sH)&&t.ty&&6!==t.ty&&(H=t.ti),0===e?i.HeatmapSessionRecording.Both.data.push(t):1===e?i.HeatmapSessionRecording.Heatmap.data.push(t):2===e&&i.HeatmapSessionRecording.Session.data.push(t))}),S&&L("recorddata",W.stringify(t))):B.push({type:e,data:t})},stopSendingData:function(){ne.getPiwikTrackers().forEach(function(e){if(e.HeatmapSessionRecording){var t=e.HeatmapSessionRecording;void 0!==t.trackingInterval&&(clearInterval(t.trackingInterval),delete t.trackingInterval)}})},startSendingData:function(){ne.getPiwikTrackers().forEach(function(e){if(e.HeatmapSessionRecording&&void 0===e.HeatmapSessionRecording.trackingInterval){var t=X.getRandomInt(10250,11250);e.HeatmapSessionRecording.trackingInterval=setInterval(function(){ne.sendQueuedData(e)},t),ne.sendQueuedData(e)}})}};function re(){"object"==typeof window&&"function"==typeof w.piwikHeatmapSessionRecordingAsyncInit&&w.piwikHeatmapSessionRecordingAsyncInit(),"object"==typeof window&&"function"==typeof w.matomoHeatmapSessionRecordingAsyncInit&&w.matomoHeatmapSessionRecordingAsyncInit();var e=B;B=[],z=!0;for(var t=0;tM&&(c=c.substr(0,M)),Q.shouldMaskField(t,!0)&&(c=Q.maskFormField(c,"password"===Q.getAttribute(t,"type")))):10===r&&void 0!==t.value&&(c=String(t.value));var u={ti:n,ty:r,s:s,te:c};s?ne.recordData(2,u):L("No selector found for text input ",e)}}}},onScroll:function(e){U||(U=!0,ae.checkTrackersIfConditionsMet());var t=X.getTimeSincePageReady();if(e&&e.type&&"scroll"===e.type&&e.target&&e.target!==k){var i=e.target;if(void 0===i.scrollTop)return;var n=i.scrollTop,r=i.scrollLeft,a=Q.getWidth(i),o=Q.getHeight(i);if(a<=0||o<=0||!a||!o)return;var s=Q.getSelector(i);ae.lastElementScroll={time:t,selector:s,scrollY:parseInt(1e3*n/o,10),scrollX:parseInt(1e3*r/a,10)}}else{var c=parseInt(Y.getScrollTop(),10),u=parseInt(Y.getScrollLeft(),10),l=Y.getDocumentHeight(),d=Y.getDocumentWidth();ae.lastScroll={time:t,scrollY:parseInt(1e3*c/l,10),scrollX:parseInt(1e3*u/d,10)};var h=parseInt(1e3*(c+Y.getWindowSize().height)/l,10);h>ae.scrollMaxPercentage&&(ae.scrollMaxPercentage=h)}},checkTrackersIfConditionsMet:function(){for(var e=ne.getPiwikTrackers(),t=0;t18e5&&(_=18e5)},setMaxTextInputLength:function(e){M=e},disableCaptureKeystrokes:function(){x=!1},enableCaptureKeystrokes:function(){x=!0},setMatomoTrackers:function(e){this.setPiwikTrackers(e)},setPiwikTrackers:function(e){null!==e?(X.isArray(e)||(e=[e]),(N=e).forEach(te),z&&(j?this.enable():E&&oe.fetch())):N=null},enableDebugMode:function(){S=!0}},Piwik.DOM.onReady(function(){C=(new Date).getTime()}),Piwik.addPlugin("HeatmapSessionRecording",{log:function(e){return V&&e.tracker&&e.tracker.getNumTrackedPageViews&&e.tracker.getNumTrackedPageViews()>1&&setTimeout(function(){Piwik.HeatmapSessionRecording.setNewPageView(!0)},10),""},unload:function(){if(!D()){var e=ne.getPiwikTrackers();ne.stopSendingData(),e.forEach(function(e){ne.sendQueuedData(e,!1)})}}}),w.Piwik.initialized?(Piwik.getAsyncTrackers().forEach(te),Piwik.on("TrackerSetup",te),Piwik.retryMissedPluginCalls(),re(),oe.fetch(),Piwik.on("TrackerAdded",function(){j?Piwik.HeatmapSessionRecording.enable():oe.fetch()})):(Piwik.on("TrackerSetup",te),Piwik.on("MatomoInitialized",function(){re(),(E||j)&&oe.fetch(),Piwik.on("TrackerAdded",function(){E?oe.fetch():j&&Piwik.HeatmapSessionRecording.enable()})})))}P=X.generateUniqueId(),"object"==typeof w.Piwik?se():("object"!=typeof w.matomoPluginAsyncInit&&(w.matomoPluginAsyncInit=[]),w.matomoPluginAsyncInit.push(se))}(),function(){var e=!1,t=!0,i=null,n=!1,r="FIELD_CHECKABLE",a="FIELD_SELECTABLE",o="FIELD_TEXT",s=["color","date","datetime","datetime-local","month","number","range","time","week"],c=["radio","checkbox"],u=["button","submit","hidden","reset"],l=3e4,d=[],h=500;function f(){e&&"undefined"!=typeof console&&console&&console.debug&&console.debug.apply(console,arguments)}var g={getAttribute:function(e,t){return e&&e.getAttribute&&t?e.getAttribute(t):null},hasClass:function(e,t){return!!e&&!!e.className&&(" "+e.className+" ").indexOf(" "+t+" ")>-1},hasNodeAttribute:function(e,t){return e&&e.hasAttribute?e.hasAttribute(t):!!e&&!!e.attributes&&void 0!==e.attributes[t]},isIgnored:function(e){return!(!this.hasNodeAttribute(e,"data-matomo-ignore")&&!this.hasNodeAttribute(e,"data-piwik-ignore"))},getTagName:function(e){return e&&e.tagName?(""+e.tagName).toLowerCase():null},findAllFormElements:function(e){return e&&e.querySelectorAll?e.querySelectorAll("form, [data-piwik-form], [data-matomo-form]"):[]},findAllFieldElements:function(e){return e&&e.querySelectorAll?e.querySelectorAll("input,select,textarea,button,textarea"):[]},findFormTrackerInstance:function(e,t){return void 0===t&&(t=100),t<=0||!e?null:e.formTrackerInstance?e.formTrackerInstance:e.parentNode?this.findFormTrackerInstance(e.parentNode,--t):void 0}},m={isArray:function(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length},indexOfArray:function(e,t){if(!e)return-1;if(e.indexOf)return e.indexOf(t);if(!this.isArray(e))return-1;for(var i=0;ih?f("maximum number of form request allowed for a tracker reached"):(n&&500===o.getLinkTrackingTimer()&&o.setLinkTrackingTimer&&o.setLinkTrackingTimer(650),o&&(!o.FormAnalytics||o.FormAnalytics.isEnabled())&&(o.queueRequest(r),o.noOfFormRequestsSent++));e&&f("trackProgress: "+Piwik.JSON.stringify(i))}}}};function v(){Matomo.FormAnalytics.setMaxNoOfFormRequestsAllowed(500),"object"==typeof window&&"function"==typeof window.piwikFormAnalyticsAsyncInit&&window.piwikFormAnalyticsAsyncInit(),"object"==typeof window&&"function"==typeof window.matomoFormAnalyticsAsyncInit&&window.matomoFormAnalyticsAsyncInit(),n=!0}function y(e){var t,i,n;this.reset(),this.fields=[],this.firstFieldEngagementDate=null,this.lastFieldEngagementDate=null,this.hesitationTimeTracked=!1,this.formStartTracked=!1,this.node=e,this.formId=g.getAttribute(e,"id"),this.formName=g.getAttribute(e,"data-matomo-name"),this.formName||(this.formName=g.getAttribute(e,"data-piwik-name")),this.formName||(this.formName=g.getAttribute(e,"name")),this.entryFieldName="",this.exitFieldName="",this.lastFocusedFieldName="",this.fieldsWithUpdates=[],this.fieldNodes=[],this.initialFormViewLoggedWithTrackers=[],this.trackingTimeout=null,this.timeLastTrackingRequest=0,this.timeOffWindowBeforeEngagement=0,this.timeOffWindowSinceEngagement=0,Piwik.DOM.addEventListener(window,"focus",(t=this,function(){if(t.timeWindowBlur){var e=m.getCurrentTime()-t.timeWindowBlur;t.timeWindowBlur=null,e<0&&(e=0),t.timeLastTrackingRequest&&(t.timeLastTrackingRequest=t.timeLastTrackingRequest+e),t.firstFieldEngagementDate?(t.timeOffWindowSinceEngagement+=e,f("time off engaged "+t.timeOffWindowSinceEngagement)):(t.timeOffWindowBeforeEngagement+=e,f("time off not engaged "+t.timeOffWindowBeforeEngagement))}})),Piwik.DOM.addEventListener(window,"blur",(i=this,function(){i.timeWindowBlur=m.getCurrentTime(),f("window blur")})),Piwik.DOM.addEventListener(e,"submit",(n=this,function(){f("form submit"),n.trackFormSubmit()}))}function b(e,t,i,n,u){this.discoveredDate=m.getCurrentTime(),this.tracker=e,this.timespent=0,this.hesitationtime=0,this.nodes=[],this.tagName=i,this.fieldName=u,this.fieldType=n,this.startFocus=null,this.timeLastChange=null,this.numChanges=0,this.numFocus=0,this.numDeletes=0,this.numCursor=0,this.canCountChange=!0,this.isFocusedCausedAuto=g.hasNodeAttribute(t,"autofocus"),"select"===this.tagName?this.category=a:"textarea"===this.tagName?this.category=o:-1!==m.indexOfArray(c,this.fieldType)?this.category=r:-1!==m.indexOfArray(s,this.fieldType)?this.category=a:this.category=o,this.addNode(t),t===document.activeElement&&this.onFocus()}function T(e,i){var n;if(t&&document.querySelectorAll)return e&&e.formTrackerInstance?(n=e.formTrackerInstance).scanForFields():g.isIgnored(e)||((n=new y(e)).scanForFields(),d.push(n),e.formTrackerInstance=n),i&&n&&n.shouldBeTracked()&&n.trackInitialFormView(),n}function k(e){void 0===e&&(e=document);for(var t=g.findAllFormElements(e),i=0;i2500||(n=i[e],g.isIgnored(n)||m.indexOfArray(this.fieldNodes,n)>-1))){var a=g.getTagName(n),o=g.getAttribute(n,"type");if(-1===m.indexOfArray(u,o)&&"button"!==a){"input"!==a||o||(o="text");var s=g.getAttribute(n,"data-matomo-name");if(s||(s=g.getAttribute(n,"data-piwik-name"))||(s=g.getAttribute(n,"name"))||(s=g.getAttribute(n,"id"))){this.fieldNodes.push(n);var c=!1;for(r=0;r=37&&t<=40)return void(n.isBlank()||(n.numCursor++,n.tracker.trackFieldUpdate(n)));if(8==t||46==t)return void(n.isBlank()||(n.numDeletes++,n.tracker.trackFieldUpdate(n)));f("field text keyup "+n.fieldName),n.onChange()}})),s(e,"paste",(r=this,function(){f("field text paste "+r.fieldName),r.onChange()}))):s(e,"change",(a=this,function(){f("field change "+a.fieldName),a.onChange()}))},b.prototype.resetOnFormSubmit=function(){this.hesitationtime=0,this.timespent=0,this.numFocus=0,this.numDeletes=0,this.numCursor=0,this.numChanges=0,this.startFocus=null,this.timeLastChange=null,this.canCountChange=!0,this.hasChangedValueSinceFocus=!1,this.isFocusedCausedAuto=!1},b.prototype.isAutoFocus=function(){return!!this.isFocusedCausedAuto&&(this.tracker.entryFieldName&&this.tracker.entryFieldName!==this.fieldName&&(this.isFocusedCausedAuto=!1),this.tracker.exitFieldName&&this.tracker.exitFieldName!==this.fieldName&&(this.isFocusedCausedAuto=!1),this.isFocusedCausedAuto)},b.prototype.getTrackingParams=function(){return{fa_fts:this.getTimeSpent(),fa_fht:this.getHesitationTime(),fa_fb:this.isBlank(),fa_fn:this.fieldName,fa_fch:this.numChanges,fa_ff:this.numFocus,fa_fd:this.numDeletes,fa_fcu:this.numCursor,fa_ft:this.fieldType||this.tagName,fa_fs:this.getFieldSize()}},b.prototype.isBlank=function(){if(this.category===r){for(var e=0;e-1&&navigator.userAgent&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS")},getRandomNumber:function(e,t){return parseInt(Math.round(Math.random()*(t-e)+e,10))},hasLocalStorage:function(){if("undefined"==typeof localStorage)return!1;var e,t=new Date;try{return localStorage.setItem(t,t),e=localStorage.getItem(t)==t,localStorage.removeItem(t),e&&localStorage&&"object"==typeof JSON&&"function"==typeof JSON.parse}catch(e){return!1}},decodeSafe:function(e){try{return window.decodeURIComponent(e)}catch(t){return window.unescape(e)}},getQueryParameter:function(e,t){e=(""+e).toLowerCase();var i=RegExp("[?&]"+(t=(""+t).toLowerCase())+"(=([^&#]*)|&|#|$)","i").exec(e);if(!i)return null;if(!i[2])return"";var n=i[2].replace(/\+/g," ");return this.decodeSafe(n)},removeQueryAndHashFromUrl:function(e){var t=e.indexOf("#");-1!==t&&(e=e.substr(0,t));var i=e.indexOf("?");return-1!==i&&(e=e.substr(0,i)),e},removeProtocol:function(e){var t=(""+e).indexOf("://");return-1!==t&&t<9?e.substr(t):e},removeWwwSubdomain:function(e){return(""+e).replace("://www.","://")},getVariationTest:function(e){if(e&&e.search){var t=o.getQueryParameter(e.search,"pk_ab_test");if(t)return r("requested variation test "+t),String(t).split(",")}return[]}},s={local:function(){var e=localStorage.getItem(n)||"{}";e&&"{}"!==e&&localStorage.setItem(n,e);var t=JSON.parse(e)||{};this.set=function(e,i,r){t[i=e+":"+i]=r,localStorage.setItem(n,JSON.stringify(t))},this.get=function(e,i){if(i=e+":"+i,t&&i in t)return t[i]},this.clearAll=function(){t={},localStorage.setItem(n,JSON.stringify({}))}},cookies:function(){this.set=function(e,t,i){t=n+":"+e+":"+t;var r=new Date;r.setTime(r.getTime()+31536e6);var a="; expires="+r.toGMTString();document.cookie=t+"="+encodeURIComponent(i)+"; expires="+a+"; path=/;SameSite=Lax"},this.get=function(e,t){for(var i=(t=n+":"+e+":"+t)+"=",r=document.cookie.split(";"),a=0;ao.getTime()+6e4*o.getTimezoneOffset())},_getValueForAttribute:function(e){switch((""+e.attribute).toLowerCase()){case u.TARGET_ATTRIBUTE_URL:return o.decodeSafe(this.location.href);case u.TARGET_ATTRIBUTE_PATH:return o.decodeSafe(this.location.pathname);case u.TARGET_ATTRIBUTE_URLPARAM:return o.getQueryParameter(this.location.search,e.value)}},_matchesAttribute:function(e,t){switch((""+e.attribute).toLowerCase()){case u.TARGET_ATTRIBUTE_URL:case u.TARGET_ATTRIBUTE_PATH:return this._matchesTargetValue(t,e.type,e.inverted,e.value);case u.TARGET_ATTRIBUTE_URLPARAM:return this._matchesTargetValue(t,e.type,e.inverted,e.value2);default:a("Invalid target attribute")}return!1},_matchesTargetValue:function(e,t,i,n){var r=!1;i=!!i&&"0"!==i;switch("string"==typeof e&&(e=e.toLowerCase()),"string"==typeof n&&"regexp"!==t&&(n=n.toLowerCase()),t){case u.TARGET_TYPE_ANY:r=!0;break;case u.TARGET_TYPE_EXISTS:null!=e&&(r=!0);break;case u.TARGET_TYPE_EQUALS_SIMPLE:e&&e===String(n)&&(r=!0),e=o.removeQueryAndHashFromUrl(e),e=o.removeProtocol(e),n=o.removeProtocol(n),e=o.removeWwwSubdomain(e),n=o.removeWwwSubdomain(n),e&&(e===String(n)||e+"/"===String(n)||e==="/"+n||e===n+"/"||e==="/"+n+"/")&&(r=!0);break;case u.TARGET_TYPE_EQUALS_EXACTLY:e&&e===String(n)&&(r=!0),e&&e.indexOf("://")>0&&"/"===e.charAt(e.length-1)&&3==e.split("/").length-1&&e===n+"/"&&(r=!0),n&&n.indexOf("://")>0&&"/"===n.charAt(n.length-1)&&3==n.split("/").length-1&&n===e+"/"&&(r=!0);break;case u.TARGET_TYPE_CONTAINS:e&&-1!==e.indexOf(String(n))&&(r=!0);break;case u.TARGET_TYPE_STARTS_WITH:e&&0===e.indexOf(String(n))&&(r=!0);break;case u.TARGET_TYPE_REGEXP:RegExp(n).test(e)&&(r=!0);break;default:a("Invalid target type given")}return i?!r:r}},u=function(t){for(this.options=t||{},r("creating experiment with options",t),this.options.name||a('Missing experiment name in options. Use eg: new PiwikAbTesting.Experiment({name: "MyName"})'),this.options.variations||a('Missing "variations" option. Use eg: new PiwikAbTesting.Experiment({variations: [{...}, {...}]})'),"object"==typeof this.options.variations&&this.options.variations.length||a('"variations" has to be an array'),l=0;l100)&&a("percentage has to be between 0 and 100"),this.name=null,this.variations=null,this.includedTargets=null,this.excludedTargets=null,this.startDateTime=null,this.endDateTime=null,this.percentage=100,this.piwikTracker=null,this.trigger=function(){return!0},this._cacheForcedVariationName=null,o.hasLocalStorage()?(r("using local storage"),this.storage=new s.local):(r("using cookies storage"),this.storage=new s.cookies),this.options)Object.prototype.hasOwnProperty.call(this.options,n)&&(this[n]=this.options[n]);this._track=function(e,t){this.piwikTracker?this.piwikTracker[e].apply(this.piwikTracker,t):(void 0===window._paq&&(window._paq=[]),t.unshift(e),window._paq.push(t)),r("sent tracking request",e,t)},this.trackUsedVariation=function(e){this._track("trackEvent",["abtesting",this.name,e])},this.trackGoal=function(e){e&&this._track("trackGoal",[e])},this._getVariationByName=function(e){e=(""+e).toLowerCase();for(var t=0;t100&&(r=100),r<0&&(r=0),r},this.getRandomVariationName=function(){for(var e=this._getVariationDefaultPercentage(),t=[],i=0;i