/** Copyright 2020-2022 - Offen Authors SPDX-License-Identifier: Apache-2.0 /////////////////////////////////////////////////////////////////////// License information about 3rd party JavaScript included in this bundle can found at /NOTICE.txt under the same domain as this file. /////////////////////////////////////////////////////////////////////// Offen is a fair alternative to common web analytics tools. Find out more about why we are building Offen at https://www.offen.dev. All source code is available at https://github.com/offen/offen. /////////////////////////////////////////////////////////////////////// */ !function(){var e,t,n=(e=function(e,t){(function(e,n){var r=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],n=0;n=c)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(t){return"[Circular]"}default:return e}}),u=i[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(n)?r.showHidden=n:n&&t._extend(r,n),h(r.showHidden)&&(r.showHidden=!1),h(r.depth)&&(r.depth=2),h(r.colors)&&(r.colors=!1),h(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=i),a(r,e,r.depth)}function i(e,t){var n=o.styles[t];return n?"\x1b["+o.colors[n][0]+"m"+e+"\x1b["+o.colors[n][1]+"m":e}function c(e,t){return e}function a(e,n,r){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return w(o)||(o=a(e,o,r)),o}var i=function(e,t){if(h(t))return e.stylize("undefined","undefined");if(w(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}(e,n);if(i)return i;var c,m=Object.keys(n),b=(c={},m.forEach(function(e,t){c[e]=!0}),c);if(e.showHidden&&(m=Object.getOwnPropertyNames(n)),g(n)&&(m.indexOf("message")>=0||m.indexOf("description")>=0))return u(n);if(0===m.length){if(E(n)){var S=n.name?": "+n.name:"";return e.stylize("[Function"+S+"]","special")}if(v(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(y(n))return e.stylize(Date.prototype.toString.call(n),"date");if(g(n))return u(n)}var O,T="",L=!1,j=["{","}"];return l(n)&&(L=!0,j=["[","]"]),E(n)&&(T=" [Function"+(n.name?": "+n.name:"")+"]"),v(n)&&(T=" "+RegExp.prototype.toString.call(n)),y(n)&&(T=" "+Date.prototype.toUTCString.call(n)),g(n)&&(T=" "+u(n)),0!==m.length||L&&0!=n.length?r<0?v(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),O=L?function(e,t,n,r,o){for(var i=[],c=0,a=t.length;c60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(O,T,j)):j[0]+T+j[1]}function u(e){return"["+Error.prototype.toString.call(e)+"]"}function s(e,t,n,r,o,i){var c,u,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),_(r,o)||(c="["+o+"]"),u||(e.seen.indexOf(s.value)<0?(u=f(n)?a(e,s.value,null):a(e,s.value,n-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),h(c)){if(i&&o.match(/^\d+$/))return u;(c=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(c=c.substr(1,c.length-2),c=e.stylize(c,"name")):(c=c.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),c=e.stylize(c,"string"))}return c+": "+u}function l(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function f(e){return null===e}function p(e){return"number"==typeof e}function w(e){return"string"==typeof e}function h(e){return void 0===e}function v(e){return m(e)&&"[object RegExp]"===b(e)}function m(e){return"object"==typeof e&&null!==e}function y(e){return m(e)&&"[object Date]"===b(e)}function g(e){return m(e)&&("[object Error]"===b(e)||e instanceof Error)}function E(e){return"function"==typeof e}function b(e){return Object.prototype.toString.call(e)}t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t._extend=function(e,t){if(!t||!m(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,p,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},function(n){return t||e(t={exports:{},parent:n},t.exports),t.exports}),r={exports:{}};!function(){function e(e,t,n){var r;document.createEvent?(r=document.createEvent("HTMLEvents")).initEvent(t,!0,!0):document.createEventObject&&((r=document.createEventObject()).eventType=t),r.state=n,r.eventName=t,e.dispatchEvent?e.dispatchEvent(r):e.fireEvent&&htmlEvents["on"+t]?e.fireEvent("on"+r.eventType,r):e[t]?e[t]():e["on"+t]&&e["on"+t]()}function t(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&htmlEvents["on"+t]?e.attachEvent("on"+t,n):e["on"+t]=n}function n(){return"undefined"!=typeof window&&window.history&&"pushState"in window.history}if(n()){var o=window.history,i=o.pushState;o.pushState=function(t){var n=i.apply(o,arguments);return e(window,"pushstate",t),e(window,"changestate",t),n};var c=o.replaceState;o.replaceState=function(t){var n=c.apply(o,arguments);return e(window,"replacestate",t),e(window,"changestate",t),n},t(window,"popstate",function(t){e(window,"changestate",t.state)})}var a={isHistorySupported:n,addEventListener:t,removeEventListener:function(e,t,n){e.removeventListener?e.removeEventListener(t,n,!1):e.detachEvent&&htmlEvents["on"+t]?e.detachEvent("on"+t,n):e["on"+t]=null},triggerEvent:e};n()&&(window.HistoryEvents=a),r.exports=a}(),r=r.exports;var o,i=function(e){var t=null;"object"!=typeof window.indexedDB&&(t=new Error("Browser does not support IndexedDB which is required.")),setTimeout(function(){e(t)},0)},c={},a="undefined"!=typeof window,u=a&&window.requestIdleCallback;o=function(e){if(window.__offen__cache__[e])return window.__offen__cache__[e];var t=document.createElement("iframe");t.src=e,t.style.display="none",t.setAttribute("frameBorder","0"),t.setAttribute("scrolling","no"),t.setAttribute("title","Offen Vault");var n="offen-vault-"+Math.random().toString(36).slice(2);switch(t.setAttribute("id",n),window.__offen__cache__[e]=new Promise(function(e,r){t.addEventListener("load",function(r){e(function(e){return new Promise(function(r,o){var i=new window.URL(t.src).origin,c=document.createElement("style");c.setAttribute("id","offen-vault-styles"),e.host=e.host||"#"+n;var a=new window.MessageChannel;a.port1.onmessage=function(e){var n=e.data||{};switch(n.type){case"STYLES":document.head.contains(c)||document.head.appendChild(c);var i=n.payload;i.styles&&(c.innerHTML=i.styles),Object.keys(i.attributes||{}).forEach(function(e){t.setAttribute(e,i.attributes[e])});break;case"ERROR":var a=new Error(n.payload.error);a.originalStack=n.payload.stack,a.status=n.payload.status,o(a);break;default:r(n)}},a.port1.onmessageerror=function(e){o(e)},t.contentWindow.postMessage(e,i,[a.port2])})})}),t.addEventListener("error",function(e){r(e)})}),document.readyState){case"complete":case"loaded":case"interactive":document.body.appendChild(t);break;default:document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(t)})}return window.__offen__cache__[e]},window.__offen__cache__=window.__offen__cache__||{};var s=function(e){var t={},n={},r=new window.MessageChannel;return r.port2.onmessage=function(r){var i=JSON.parse(JSON.stringify(r.data.context)),s=(t[r.data.type]||[]).slice();!function t(){function l(e){e||t()}var d,f=s.shift()||function(e,t,n){n(new Error('Event of type "'+r.data.type+'" not handled.'))};try{f(i,(d=r.data.callbackId,function(t){var r=o(e).then(function(e){return new Promise(function(n){!function e(t,n){var r;return n=n||c,u?(r=window.requestIdleCallback(function(r){if(r.timeRemaining()<=1&&!r.didTimeout)return e(t,n);t(r)},n),window.cancelIdleCallback.bind(window,r)):a?(r=setTimeout(t,0),clearTimeout.bind(window,r)):void 0}(function(){n(e(t))})})});if(d){var i=n[d];delete n[d],r.then(function(e){i(null,e)},function(e){i(e)})}return r}),l)}catch(p){l(p)}}()},{on:function(e){var n=[].slice.call(arguments,1);t[e]=n},dispatch:function(e,t,o){var i;t=t||{},o&&(i=Math.random().toString(36).slice(2),n[i]=o),r.port1.postMessage({type:e,context:t,callbackId:i})}}},l={pageview:function(e){var t=document.head.querySelector('link[rel="canonical"]'),n=t&&new window.URL(t.getAttribute("href"),window.location.href).toString(),r={type:"PAGEVIEW",href:n||window.location.href,referrer:document.referrer,pageload:!e&&window.performance&&window.performance.timing?Math.round(window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart):null,isMobile:void 0!==window.onorientationchange};return n&&n!==window.location.href&&(r.rawHref=window.location.href),r}};Object.create;var d,f,p={},w=p={};function h(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}function m(e){if(d===setTimeout)return setTimeout(e,0);if((d===h||!d)&&setTimeout)return d=setTimeout,setTimeout(e,0);try{return d(e,0)}catch(t){try{return d.call(null,e,0)}catch(t){return d.call(this,e,0)}}}!function(){try{d="function"==typeof setTimeout?setTimeout:h}catch(t){d=h}try{f="function"==typeof clearTimeout?clearTimeout:v}catch(t){f=v}}();var y,g=[],E=!1,b=-1;function _(){E&&y&&(E=!1,y.length?g=y.concat(g):b=-1,g.length&&S())}function S(){if(!E){var e=m(_);E=!0;for(var n=g.length;n;){for(y=g,g=[];++b1)for(var n=1;n