"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_github_catalyst_lib_index_js-node_modules_github_hydro-analytics-client_-4da1df"],{76006:(e,t,n)=>{let o;n.d(t,{Lj:()=>m,Ih:()=>$,P4:()=>u,nW:()=>O,fA:()=>v,GO:()=>A});let r=new WeakSet,a=new WeakMap;function i(e=document){if(a.has(e))return a.get(e);let t=!1,n=new MutationObserver(e=>{for(let t of e)if("attributes"===t.type&&t.target instanceof Element)d(t.target);else if("childList"===t.type&&t.addedNodes.length)for(let e of t.addedNodes)e instanceof Element&&l(e)});n.observe(e,{childList:!0,subtree:!0,attributeFilter:["data-action"]});let o={get closed(){return t},unsubscribe(){t=!0,a.delete(e),n.disconnect()}};return a.set(e,o),o}function l(e){for(let t of e.querySelectorAll("[data-action]"))d(t);e instanceof Element&&e.hasAttribute("data-action")&&d(e)}function c(e){let t=e.currentTarget;for(let n of s(t))if(e.type===n.type){let o=t.closest(n.tag);r.has(o)&&"function"==typeof o[n.method]&&o[n.method](e);let a=t.getRootNode();if(a instanceof ShadowRoot&&r.has(a.host)&&a.host.matches(n.tag)){let t=a.host;"function"==typeof t[n.method]&&t[n.method](e)}}}function*s(e){for(let t of(e.getAttribute("data-action")||"").trim().split(/\s+/)){let e=t.lastIndexOf(":"),n=Math.max(0,t.lastIndexOf("#"))||t.length;yield{type:t.slice(0,e),tag:t.slice(e+1,n),method:t.slice(n+1)||"handleEvent"}}}function d(e){for(let t of s(e))e.addEventListener(t.type,c)}function u(e,t){let n=e.tagName.toLowerCase();if(e.shadowRoot){for(let o of e.shadowRoot.querySelectorAll(`[data-target~="${n}.${t}"]`))if(!o.closest(n))return o}for(let o of e.querySelectorAll(`[data-target~="${n}.${t}"]`))if(o.closest(n)===e)return o}let f=e=>String("symbol"==typeof e?e.description:e).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),h=(e,t="property")=>{let n=f(e);if(!n.includes("-"))throw new DOMException(`${t}: ${String(e)} is not a valid ${t} name`,"SyntaxError");return n},g="attr";function m(e,t){w(e,g).add(t)}let b=new WeakSet;function p(e,t){if(b.has(e))return;b.add(e);let n=Object.getPrototypeOf(e),o=n?.constructor?.attrPrefix??"data-";for(let r of(t||(t=w(n,g)),t)){let t=e[r],n=h(`${o}${r}`),a={configurable:!0,get(){return this.getAttribute(n)||""},set(e){this.setAttribute(n,e||"")}};"number"==typeof t?a={configurable:!0,get(){return Number(this.getAttribute(n)||0)},set(e){this.setAttribute(n,e)}}:"boolean"==typeof t&&(a={configurable:!0,get(){return this.hasAttribute(n)},set(e){this.toggleAttribute(n,e)}}),Object.defineProperty(e,r,a),r in e&&!e.hasAttribute(n)&&a.set.call(e,t)}}let y=Symbol.for("catalyst");let CatalystDelegate=class CatalystDelegate{constructor(e){let t=this,n=e.prototype.connectedCallback;e.prototype.connectedCallback=function(){t.connectedCallback(this,n)};let o=e.prototype.disconnectedCallback;e.prototype.disconnectedCallback=function(){t.disconnectedCallback(this,o)};let r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(e,n,o){t.attributeChangedCallback(this,e,n,o,r)};let a=e.observedAttributes||[];Object.defineProperty(e,"observedAttributes",{configurable:!0,get(){return t.observedAttributes(this,a)},set(e){a=e}}),function(e){let t=e.observedAttributes||[],n=e.attrPrefix??"data-",o=e=>h(`${n}${e}`);Object.defineProperty(e,"observedAttributes",{configurable:!0,get:()=>[...w(e.prototype,g)].map(o).concat(t),set(e){t=e}})}(e),function(e){let t=f(e.name).replace(/-element$/,"");try{window.customElements.define(t,e),window[e.name]=customElements.get(t)}catch(e){if(!(e instanceof DOMException&&"NotSupportedError"===e.name))throw e}}(e)}observedAttributes(e,t){return t}connectedCallback(e,t){var n,o;e.toggleAttribute("data-catalyst",!0),customElements.upgrade(e),!function(e){for(let t of e.querySelectorAll("template[data-shadowroot]"))t.parentElement===e&&e.attachShadow({mode:"closed"===t.getAttribute("data-shadowroot")?"closed":"open"}).append(t.content.cloneNode(!0))}(e),p(e),r.add(e),e.shadowRoot&&(l(o=e.shadowRoot),i(o)),l(e),i(e.ownerDocument),t?.call(e),e.shadowRoot&&(l(n=e.shadowRoot),i(n))}disconnectedCallback(e,t){t?.call(e)}attributeChangedCallback(e,t,n,o,r){p(e),"data-catalyst"!==t&&r&&r.call(e,t,n,o)}};function w(e,t){if(!Object.prototype.hasOwnProperty.call(e,y)){let t=e[y],n=e[y]=new Map;if(t)for(let[e,o]of t)n.set(e,new Set(o))}let n=e[y];return n.has(t)||n.set(t,new Set),n.get(t)}function v(e,t){w(e,"target").add(t),Object.defineProperty(e,t,{configurable:!0,get(){return u(this,t)}})}function A(e,t){w(e,"targets").add(t),Object.defineProperty(e,t,{configurable:!0,get(){return function(e,t){let n=e.tagName.toLowerCase(),o=[];if(e.shadowRoot)for(let r of e.shadowRoot.querySelectorAll(`[data-targets~="${n}.${t}"]`))r.closest(n)||o.push(r);for(let r of e.querySelectorAll(`[data-targets~="${n}.${t}"]`))r.closest(n)===e&&o.push(r);return o}(this,t)}})}function $(e){new CatalystDelegate(e)}let C=new Map,E=new Promise(e=>{"loading"!==document.readyState?e():document.addEventListener("readystatechange",()=>e(),{once:!0})}),k=new Promise(e=>{let t=new AbortController;t.signal.addEventListener("abort",()=>e());let n={once:!0,passive:!0,signal:t.signal},o=()=>t.abort();document.addEventListener("mousedown",o,n),document.addEventListener("touchstart",o,n),document.addEventListener("keydown",o,n),document.addEventListener("pointerdown",o,n)}),S={ready:()=>E,firstInteraction:()=>k,visible:e=>new Promise(t=>{let n=new IntersectionObserver(e=>{for(let o of e)if(o.isIntersecting){t(),n.disconnect();return}},{rootMargin:"0px 0px 256px 0px",threshold:.01});for(let t of document.querySelectorAll(e))n.observe(t)})},x=new WeakMap;function _(e){cancelAnimationFrame(x.get(e)||0),x.set(e,requestAnimationFrame(()=>{for(let t of C.keys()){let n=e.matches(t)?e:e.querySelector(t);if(customElements.get(t)||n){let o=n?.getAttribute("data-load-on")||"ready",r=o in S?S[o]:S.ready;for(let e of C.get(t)||[])r(t).then(e);C.delete(t),x.delete(e)}}}))}function O(e,t){C.has(e)||C.set(e,new Set),C.get(e).add(t),_(document.body),o||(o=new MutationObserver(e=>{if(C.size)for(let t of e)for(let e of t.addedNodes)e instanceof Element&&_(e)})).observe(document,{subtree:!0,childList:!0})}},86058:(e,t,n)=>{n.d(t,{R:()=>AnalyticsClient});var o=n(82918);let AnalyticsClient=class AnalyticsClient{constructor(e){this.options=e}get collectorUrl(){return this.options.collectorUrl}get clientId(){return this.options.clientId?this.options.clientId:(0,o.b)()}createEvent(e){return{page:location.href,title:document.title,context:{...this.options.baseContext,...e}}}sendPageView(e){let t=this.createEvent(e);this.send({page_views:[t]})}sendEvent(e,t){let n={...this.createEvent(t),type:e};this.send({events:[n]})}send({page_views:e,events:t}){let n={client_id:this.clientId,page_views:e,events:t,request_context:{referrer:function(){let e;try{e=window.top.document.referrer}catch(t){if(window.parent)try{e=window.parent.document.referrer}catch(e){}}return""===e&&(e=document.referrer),e}(),user_agent:navigator.userAgent,screen_resolution:function(){try{return`${screen.width}x${screen.height}`}catch(e){return"unknown"}}(),browser_resolution:function(){let e=0,t=0;try{return"number"==typeof window.innerWidth?(t=window.innerWidth,e=window.innerHeight):null!=document.documentElement&&null!=document.documentElement.clientWidth?(t=document.documentElement.clientWidth,e=document.documentElement.clientHeight):null!=document.body&&null!=document.body.clientWidth&&(t=document.body.clientWidth,e=document.body.clientHeight),`${t}x${e}`}catch(e){return"unknown"}}(),browser_languages:navigator.languages?navigator.languages.join(","):navigator.language||"",pixel_ratio:window.devicePixelRatio,timestamp:Date.now(),tz_seconds:-60*new Date().getTimezoneOffset()}},o=JSON.stringify(n);try{if(navigator.sendBeacon){navigator.sendBeacon(this.collectorUrl,o);return}}catch{}fetch(this.collectorUrl,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:o,keepalive:!1})}}},82918:(e,t,n)=>{let o;function r(){return`${Math.round(2147483647*Math.random())}.${Math.round(Date.now()/1e3)}`}function a(){try{let e=function(){let e;let t=document.cookie,n=t.match(/_octo=([^;]+)/g);if(!n)return;let o=[0,0];for(let t of n){let[,n]=t.split("="),[,r,...a]=n.split("."),i=r.split("-").map(Number);i>o&&(o=i,e=a.join("."))}return e}();if(e)return e;let t=r();return!function(e){let t=`GH1.1.${e}`,n=Date.now(),o=new Date(n+31536e6).toUTCString(),{domain:r}=document;r.endsWith(".github.com")&&(r="github.com"),document.cookie=`_octo=${t}; expires=${o}; path=/; domain=${r}; secure; samesite=lax`}(t),t}catch(e){return o||(o=r()),o}}n.d(t,{b:()=>a})},88149:(e,t,n)=>{n.d(t,{n:()=>o});function o(e="ha"){let t;let n={},o=document.head.querySelectorAll(`meta[name^="${e}-"]`);for(let r of Array.from(o)){let{name:o,content:a}=r,i=o.replace(`${e}-`,"").replace(/-/g,"_");"url"===i?t=a:n[i]=a}if(!t)throw Error(`AnalyticsClient ${e}-url meta tag not found`);return{collectorUrl:t,...Object.keys(n).length>0?{baseContext:n}:{}}}}}]); //# sourceMappingURL=vendors-node_modules_github_catalyst_lib_index_js-node_modules_github_hydro-analytics-client_-4da1df-ccc4be9bcc11.js.map