/*! * Piwik - free/libre analytics platform * * JavaScript tracking client * * @link http://piwik.org * @source https://github.com/piwik/piwik/blob/master/js/piwik.js * @license http://piwik.org/free-software/bsd/ BSD-3 Clause (also in js/LICENSE.txt) * @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause */ if(typeof JSON2!=="object"){JSON2=window.JSON||{}}(function(){function d(f){return f<10?"0"+f:f}function l(n,m){var f=Object.prototype.toString.apply(n);if(f==="[object Date]"){return isFinite(n.valueOf())?n.getUTCFullYear()+"-"+d(n.getUTCMonth()+1)+"-"+d(n.getUTCDate())+"T"+d(n.getUTCHours())+":"+d(n.getUTCMinutes())+":"+d(n.getUTCSeconds())+"Z":null}if(f==="[object String]"||f==="[object Number]"||f==="[object Boolean]"){return n.valueOf()}if(f!=="[object Array]"&&typeof n.toJSON==="function"){return n.toJSON(m)}return n}var c=new RegExp("[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]","g"),e='\\\\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]',i=new RegExp("["+e,"g"),j,b,k={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},h; function a(f){i.lastIndex=0;return i.test(f)?'"'+f.replace(i,function(m){var n=k[m];return typeof n==="string"?n:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function g(s,p){var n,m,t,f,q=j,o,r=p[s];if(r&&typeof r==="object"){r=l(r,s)}if(typeof h==="function"){r=h.call(p,s,r)}switch(typeof r){case"string":return a(r);case"number":return isFinite(r)?String(r):"null";case"boolean":case"null":return String(r);case"object":if(!r){return"null"}j+=b;o=[];if(Object.prototype.toString.apply(r)==="[object Array]"){f=r.length;for(n=0;n>>(32-W))},an=function(au){var ar="",at,W;for(at=7;at>=0;at--){W=(au>>>(at*4))&15;ar+=W.toString(16)}return ar},ac,ap,ao,Y=[],ag=1732584193,ae=4023233417,ad=2562383102,ab=271733878,aa=3285377520,al,ak,aj,ai,ah,aq,X,af=[];am=s(am);X=am.length;for(ap=0;ap>>29);af.push((X<<3)&4294967295);for(ac=0;acab.offsetWidth+ab.scrollLeft||ad+ag-ahab.offsetHeight+ab.scrollTop||ai+ae-ahae?-1:1});if(W.length<=1){return W}var X=0;var Z=0;var aa=[];var Y;Y=W[X++];while(Y){if(Y===W[X]){Z=aa.push(X)}Y=W[X++]||null}while(Z--){W.splice(aa[Z],1)}return W},getAttributeValueFromNode:function(aa,Y){if(!this.hasNodeAttribute(aa,Y)){return}if(aa&&aa.getAttribute){return aa.getAttribute(Y) }if(!aa||!aa.attributes){return}var Z=(typeof aa.attributes[Y]);if("undefined"===Z){return}if(aa.attributes[Y].value){return aa.attributes[Y].value}if(aa.attributes[Y].nodeValue){return aa.attributes[Y].nodeValue}var X;var W=aa.attributes;if(!W){return}for(X=0;X1000){break}W++}},findPieceNode:function(X){var W;W=Q.findFirstNodeHavingAttribute(X,this.CONTENT_PIECE_ATTR);if(!W){W=Q.findFirstNodeHavingClass(X,this.CONTENT_PIECE_CLASS)}if(W){return W}return X},findTargetNodeNoDefault:function(W){if(!W){return}var X=Q.findFirstNodeHavingAttributeWithValue(W,this.CONTENT_TARGET_ATTR);if(X){return X}X=Q.findFirstNodeHavingAttribute(W,this.CONTENT_TARGET_ATTR);if(X){return X}X=Q.findFirstNodeHavingClass(W,this.CONTENT_TARGET_CLASS);if(X){return X}},findTargetNode:function(W){var X=this.findTargetNodeNoDefault(W);if(X){return X}return W},findContentName:function(X){if(!X){return}var aa=Q.findFirstNodeHavingAttributeWithValue(X,this.CONTENT_NAME_ATTR);if(aa){return Q.getAttributeValueFromNode(aa,this.CONTENT_NAME_ATTR) }var W=this.findContentPiece(X);if(W){return this.removeDomainIfIsInLink(W)}if(Q.hasNodeAttributeWithValue(X,"title")){return Q.getAttributeValueFromNode(X,"title")}var Y=this.findPieceNode(X);if(Q.hasNodeAttributeWithValue(Y,"title")){return Q.getAttributeValueFromNode(Y,"title")}var Z=this.findTargetNode(X);if(Q.hasNodeAttributeWithValue(Z,"title")){return Q.getAttributeValueFromNode(Z,"title")}},findContentPiece:function(X){if(!X){return}var Z=Q.findFirstNodeHavingAttributeWithValue(X,this.CONTENT_PIECE_ATTR);if(Z){return Q.getAttributeValueFromNode(Z,this.CONTENT_PIECE_ATTR)}var W=this.findPieceNode(X);var Y=this.findMediaUrlInNode(W);if(Y){return this.toAbsoluteUrl(Y)}},findContentTarget:function(Y){if(!Y){return}var Z=this.findTargetNode(Y);if(Q.hasNodeAttributeWithValue(Z,this.CONTENT_TARGET_ATTR)){return Q.getAttributeValueFromNode(Z,this.CONTENT_TARGET_ATTR)}var X;if(Q.hasNodeAttributeWithValue(Z,"href")){X=Q.getAttributeValueFromNode(Z,"href");return this.toAbsoluteUrl(X)}var W=this.findPieceNode(Y); if(Q.hasNodeAttributeWithValue(W,"href")){X=Q.getAttributeValueFromNode(W,"href");return this.toAbsoluteUrl(X)}},isSameDomain:function(W){if(!W||!W.indexOf){return false}if(0===W.indexOf(this.getLocation().origin)){return true}var X=W.indexOf(this.getLocation().host);if(8>=X&&0<=X){return true}return false},removeDomainIfIsInLink:function(Y){var X="^https?://[^/]+";var W="^.*//[^/]+";if(Y&&Y.search&&-1!==Y.search(new RegExp(X))&&this.isSameDomain(Y)){Y=Y.replace(new RegExp(W),"");if(!Y){Y="/"}}return Y},findMediaUrlInNode:function(aa){if(!aa){return}var Y=["img","embed","video","audio"];var W=aa.nodeName.toLowerCase();if(-1!==z(Y,W)&&Q.findFirstNodeHavingAttributeWithValue(aa,"src")){var Z=Q.findFirstNodeHavingAttributeWithValue(aa,"src");return Q.getAttributeValueFromNode(Z,"src")}if(W==="object"&&Q.hasNodeAttributeWithValue(aa,"data")){return Q.getAttributeValueFromNode(aa,"data")}if(W==="object"){var ab=Q.findNodesByTagName(aa,"param");if(ab&&ab.length){var X;for(X=0;X0}var X=Z.clientWidth;if(G.innerWidth&&X>G.innerWidth){X=G.innerWidth}var W=Z.clientHeight;if(G.innerHeight&&W>G.innerHeight){W=G.innerHeight}return((aa.bottom>0||Y)&&aa.right>0&&aa.left=0){cg=cg.slice(0,cf)}cf=cg.lastIndexOf("/");if(cf!==cg.length-1){cg=cg.slice(0,cf+1)}return cg+ce}function bs(ch){var cf,ce,cg;for(cf=0;cf0)&&(ch.slice(cg)===ce)){return true}}}return false}function cd(ce,cg){var cf=new Image(1,1);cf.onload=function(){t=0;if(typeof cg==="function"){cg() }};cf.src=aa+(aa.indexOf("?")<0?"?":"&")+ce}function bJ(cf,ci,ce){if(!w(ce)||null===ce){ce=true}try{var ch=G.XMLHttpRequest?new G.XMLHttpRequest():G.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):null;ch.open("POST",aa,true);ch.onreadystatechange=function(){if(this.readyState===4&&!(this.status>=200&&this.status<300)&&ce){cd(cf,ci)}else{if(typeof ci==="function"){ci()}}};ch.setRequestHeader("Content-Type",aK);ch.send(cf)}catch(cg){if(ce){cd(cf,ci)}}}function b1(cf){var ce=new Date();var cg=ce.getTime()+cf;if(!j||cg>j){j=cg}}function aD(ci){var cf=new Date();var ce=cf.getTime();if(a9&&cecB){cs.visitCount++;cs.lastVisitTs=cs.currentVisitTs}if(!a5||!cl.length){for(cy in aY){if(Object.prototype.hasOwnProperty.call(aY,cy)){cl=I(cC,aY[cy]);if(cl.length){break}}}for(cy in aP){if(Object.prototype.hasOwnProperty.call(aP,cy)){ce=I(cC,aP[cy]);if(ce.length){break}}}}cE=b(bv);co=cx.length?b(cx):"";if(cE.length&&!bs(cE)&&(!a5||!co.length||bs(co))){cx=bv}if(cx.length||cl.length){ck=cn;cw=[cl,ce,ck,b0(cx.slice(0,ci))];bI(ct,JSON2.stringify(cw),ba,b6,aq)}}cg+="&idsite="+bU+"&rec=1&r="+String(Math.random()).slice(2,8)+"&h="+cf.getHours()+"&m="+cf.getMinutes()+"&s="+cf.getSeconds()+"&url="+l(b0(cC))+(bv.length?"&urlref="+l(b0(bv)):"")+((aJ&&aJ.length)?"&uid="+l(aJ):"")+"&_id="+cs.uuid+"&_idts="+cs.createTs+"&_idvc="+cs.visitCount+"&_idn="+cs.newVisitor+(cl.length?"&_rcn="+l(cl):"")+(ce.length?"&_rck="+l(ce):"")+"&_refts="+ck+"&_viewts="+cs.lastVisitTs+(String(cs.lastEcommerceOrderTs).length?"&_ects="+cs.lastEcommerceOrderTs:"")+(String(cx).length?"&_ref="+l(b0(cx.slice(0,ci))):"")+(cp?"&cs="+l(cp):"")+"&send_image=0"; for(cy in bV){if(Object.prototype.hasOwnProperty.call(bV,cy)){cg+="&"+cy+"="+bV[cy]}}if(cz){cg+="&data="+l(JSON2.stringify(cz))}else{if(an){cg+="&data="+l(JSON2.stringify(an))}}function cm(cF,cG){var cH=JSON2.stringify(cF);if(cH.length>2){return"&"+cG+"="+l(cH)}return""}var cD=bR(bh);var cu=bR(ab);cg+=cm(cD,"cvar");cg+=cm(cu,"e_cvar");if(ag){cg+=cm(ag,"_cvar");for(cy in cv){if(Object.prototype.hasOwnProperty.call(cv,cy)){if(ag[cy][0]===""||ag[cy][1]===""){delete ag[cy]}}}if(a6){bI(cq,JSON2.stringify(ag),az,b6,aq)}}if(a1){if(aI){cg+=">_ms="+aI}else{if(f&&f.timing&&f.timing.requestStart&&f.timing.responseEnd){cg+=">_ms="+(f.timing.responseEnd-f.timing.requestStart)}}}cs.lastEcommerceOrderTs=w(ch)&&String(ch).length?ch:cs.lastEcommerceOrderTs;am(cs);a4();cg+=O(cA);if(bp.length){cg+="&"+bp}if(q(au)){cg=au(cg)}return cg}function bL(ch,cg,cl,ci,ce,co){var cj="idgoal=0",ck,cf=new Date(),cm=[],cn;if(String(ch).length){cj+="&ec_id="+l(ch);ck=Math.round(cf.getTime()/1000)}cj+="&revenue="+cg;if(String(cl).length){cj+="&ec_st="+cl }if(String(ci).length){cj+="&ec_tx="+ci}if(String(ce).length){cj+="&ec_sh="+ce}if(String(co).length){cj+="&ec_dt="+co}if(bG){for(cn in bG){if(Object.prototype.hasOwnProperty.call(bG,cn)){if(!w(bG[cn][1])){bG[cn][1]=""}if(!w(bG[cn][2])){bG[cn][2]=""}if(!w(bG[cn][3])||String(bG[cn][3]).length===0){bG[cn][3]=0}if(!w(bG[cn][4])||String(bG[cn][4]).length===0){bG[cn][4]=1}cm.push(bG[cn])}}cj+="&ec_items="+l(JSON2.stringify(cm))}cj=aT(cj,an,"ecommerce",ck);aZ(cj,bo)}function bK(ce,ci,ch,cg,cf,cj){if(String(ce).length&&w(ci)){bL(ce,ci,ch,cg,cf,cj)}}function b4(ce){if(w(ce)){bL("",ce,"","","","")}}function be(ch,ci){var ce=new Date(),cg=aT("action_name="+l(V(ch||aS)),ci,"log");aZ(cg,bo);if(aj&&aG&&!bx){bx=true;U(u,"click",bS);U(u,"mouseup",bS);U(u,"mousedown",bS);U(u,"mousemove",bS);U(u,"mousewheel",bS);U(G,"DOMMouseScroll",bS);U(G,"scroll",bS);U(u,"keypress",bS);U(u,"keydown",bS);U(u,"keyup",bS);U(G,"resize",bS);U(G,"focus",bS);U(G,"blur",bS);bu=ce.getTime();setTimeout(function cf(){var cj;ce=new Date(); if((bu+aG)>ce.getTime()){if(aj0){ci=parseInt(ci,10);cl(ci)}})}function b2(){var cf,cg,ch={pdf:"application/pdf",qt:"video/quicktime",realp:"audio/x-pn-realaudio-plugin",wma:"application/x-mplayer2",dir:"application/x-director",fla:"application/x-shockwave-flash",java:"application/x-java-vm",gears:"application/x-googlegears",ag:"application/x-silverlight"},ce=(new RegExp("Mac OS X.*Safari/")).test(e.userAgent)?G.devicePixelRatio||1:1;if(!((new RegExp("MSIE")).test(e.userAgent))){if(e.mimeTypes&&e.mimeTypes.length){for(cf in ch){if(Object.prototype.hasOwnProperty.call(ch,cf)){cg=e.mimeTypes[ch[cf]];bV[cf]=(cg&&cg.enabledPlugin)?"1":"0"}}}if(typeof navigator.javaEnabled!=="unknown"&&w(e.javaEnabled)&&e.javaEnabled()){bV.java="1"}if(q(G.GearsFactory)){bV.gears="1"}bV.cookie=ae()}bV.res=K.width*ce+"x"+K.height*ce }b2();bl();am();return{getVisitorId:function(){return bC().uuid},getVisitorInfo:function(){return Y()},getAttributionInfo:function(){return X()},getAttributionCampaignName:function(){return X()[0]},getAttributionCampaignKeyword:function(){return X()[1]},getAttributionReferrerTimestamp:function(){return X()[2]},getAttributionReferrerUrl:function(){return X()[3]},setTrackerUrl:function(ce){aa=ce},getTrackerUrl:function(){return aa},getSiteId:function(){return bU},setSiteId:function(ce){ca(ce)},setUserId:function(ce){if(!w(ce)||!ce.length){return}aJ=ce;a2=aX(aJ).substr(0,16)},getUserId:function(){return aJ},setCustomData:function(ce,cf){if(J(ce)){an=ce}else{if(!an){an={}}an[ce]=cf}},getCustomData:function(){return an},setCustomRequestProcessing:function(ce){au=ce},appendToTrackingUrl:function(ce){bp=ce},getRequest:function(ce){return aT(ce)},addPlugin:function(ce,cf){a[ce]=cf},setCustomVariable:function(cf,ce,ci,cg){var ch;if(!w(cg)){cg="visit"}if(!w(ce)){return}if(!w(ci)){ci=""}if(cf>0){ce=!n(ce)?String(ce):ce; ci=!n(ci)?String(ci):ci;ch=[ce.slice(0,bZ),ci.slice(0,bZ)];if(cg==="visit"||cg===2){Z();ag[cf]=ch}else{if(cg==="page"||cg===3){bh[cf]=ch}else{if(cg==="event"){ab[cf]=ch}}}}},getCustomVariable:function(cf,cg){var ce;if(!w(cg)){cg="visit"}if(cg==="page"||cg===3){ce=bh[cf]}else{if(cg==="event"){ce=ab[cf]}else{if(cg==="visit"||cg===2){Z();ce=ag[cf]}}}if(!w(ce)||(ce&&ce[0]==="")){return false}return ce},deleteCustomVariable:function(ce,cf){if(this.getCustomVariable(ce,cf)){this.setCustomVariable(ce,"","",cf)}},storeCustomVariablesInCookie:function(){a6=true},setLinkTrackingTimer:function(ce){bo=ce},setDownloadExtensions:function(ce){if(n(ce)){ce=ce.split("|")}aU=ce},addDownloadExtensions:function(cf){var ce;if(n(cf)){cf=cf.split("|")}for(ce=0;ce1){if(console!==undefined&&console&&console.error){console.error("The method "+d+' is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation: http://developer.piwik.org/guides/tracking-javascript-guide#multiple-piwik-trackers') }}r[d]++}}for(t=0;t<_paq.length;t++){if(_paq[t]){R(_paq[t])}}_paq=new v();c={addPlugin:function(W,X){a[W]=X},getTracker:function(W,X){if(!w(X)){X=this.getAsyncTracker().getSiteId()}if(!w(W)){W=this.getAsyncTracker().getTrackerUrl()}return new D(W,X)},getAsyncTracker:function(){return L}};if(typeof define==="function"&&define.amd){define("piwik",[],function(){return c})}return c}())}if(window&&window.piwikAsyncInit){window.piwikAsyncInit()}(function(){var a=(typeof AnalyticsTracker);if(a==="undefined"){AnalyticsTracker=Piwik}}());if(typeof piwik_log!=="function"){piwik_log=function(b,f,d,g){function a(h){try{return eval("piwik_"+h)}catch(i){}return}var c,e=Piwik.getTracker(d,f);e.setDocumentTitle(b);e.setCustomData(g);c=a("tracker_pause");if(c){e.setLinkTrackingTimer(c)}c=a("download_extensions");if(c){e.setDownloadExtensions(c)}c=a("hosts_alias");if(c){e.setDomains(c)}c=a("ignore_classes");if(c){e.setIgnoreClasses(c)}e.trackPageView();if(a("install_tracker")){piwik_track=function(i,k,j,h){e.setSiteId(k); e.setTrackerUrl(j);e.trackLink(i,h)};e.enableLinkTracking()}}; /*! @license-end */ };