!function(){"use strict";(t=>{const{screen:{width:e,height:a},navigator:{language:n,doNotTrack:r,msDoNotTrack:i},location:o,document:s,history:c,top:l,doNotTrack:u}=t,{currentScript:d,referrer:h}=s;if(!d)return;const{hostname:m,href:f,origin:p}=o,g=f.startsWith("data:")?void 0:t.localStorage,y="data-",b="false",$="true",v=d.getAttribute.bind(d),w=v(`${y}website-id`),S=v(`${y}host-url`),k=v(`${y}before-send`),T=v(`${y}tag`)||void 0,N=v(`${y}auto-track`)!==b,A=N&&v(`${y}umami-scroll`)!==b,j=v(`${y}do-not-track`)===$,E=v(`${y}exclude-search`)===$,L=v(`${y}exclude-hash`)===$,x=v(`${y}domains`)||"",K=v(`${y}fetch-credentials`)||"omit",O=x.split(",").map(t=>t.trim()),U=`${(S||""||d.src.split("/").slice(0,-1).join("/")).replace(/\/$/,"")}/ma`,_=`${e}x${a}`,D=/data-umami-event-([\w-_]+)/,H=`${y}umami-event`,M=300,P=[25,50,75,100],R=t=>{if(!t)return t;try{const e=new URL(t,o.href);return E&&(e.search=""),L&&(e.hash=""),e.toString()}catch{return t}},W=()=>({website:w,screen:_,language:n,title:s.title,hostname:m,url:X,referrer:Y,tag:T,id:V||void 0}),q=(t,e,a)=>{a&&(Y=X,X=R(new URL(a,o.href).toString()),X!==Y&&(B(),setTimeout(z,M)))},B=()=>{et={}},C=()=>{if(F()||!A)return;const t=(()=>{const t=s.documentElement,e=t.scrollTop,a=t.scrollHeight,n=t.clientHeight;return a<=n?100:Math.min(100,Math.round((e+n)/a*100))})();for(let e=0;e
=a&&!et[a]&&(et[a]=!0,z("scroll-depth",{depth:a}))}},F=()=>tt||!w||g?.getItem("umami.disabled")||x&&!O.includes(m)||j&&(()=>{const t=u||r||i;return 1===t||"1"===t||"yes"===t})(),I=async(e,a="event")=>{if(F())return;const n=t[k];if("function"==typeof n&&(e=await Promise.resolve(n(a,e))),e)try{const t=await fetch(U,{keepalive:!0,method:"POST",body:JSON.stringify({type:a,payload:e}),headers:{"Content-Type":"application/json",...void 0!==Q&&{"x-umami-cache":Q}},credentials:K}),n=await t.json();n&&(tt=!!n.disabled,Q=n.cache)}catch(t){}},J=()=>{Z||(Z=!0,z(),(()=>{const t=(t,e,a)=>{const n=t[e];return(...e)=>(a.apply(null,e),n.apply(t,e))};c.pushState=t(c,"pushState",q),c.replaceState=t(c,"replaceState",q)})(),(()=>{const t=async t=>{const e=t.getAttribute(H);if(e){const a={};return t.getAttributeNames().forEach(e=>{const n=e.match(D);n&&(a[n[1]]=t.getAttribute(e))}),z(e,a)}};s.addEventListener("click",async e=>{const a=e.target,n=a.closest("a,button");if(!n)return t(a);const{href:r,target:i}=n;if(n.getAttribute(H)){if("BUTTON"===n.tagName)return t(n);if("A"===n.tagName&&r){const a="_blank"===i||e.ctrlKey||e.shiftKey||e.metaKey||e.button&&1===e.button;return a||e.preventDefault(),t(n).then(()=>{a||(("_top"===i?l.location:o).href=r)})}}},!0)})(),A&&(()=>{let t=null;B(),s.addEventListener("scroll",()=>{null===t&&(t=requestAnimationFrame(()=>{t=null,C()}))},{passive:!0}),C()})())},z=(t,e)=>I("string"==typeof t?{...W(),name:t,data:e}:"object"==typeof t?{...t}:"function"==typeof t?t(W()):W()),G=(t,e)=>("string"==typeof t&&(V=t),Q="",I({...W(),data:"object"==typeof t?t:e},"identify"));t.umami||(t.umami={track:z,identify:G});let Q,V,X=R(f),Y=R(h.startsWith(p)?"":h),Z=!1,tt=!1,et={};N&&!F()&&("complete"===s.readyState?J():s.addEventListener("readystatechange",J,!0))})(window)}();