(()=>{"use strict";function e(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(e,r)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e){return e.pathname.split("/").filter(Boolean)}function n(e){return(e||"").toLowerCase()}const o=[{type:"phone",schemes:["tel:"]},{type:"email",schemes:["mailto:"]},{type:"sms",schemes:["sms:","smsto:"]},{type:"whatsapp",schemes:["whatsapp:"],hosts:["wa.me","api.whatsapp.com","web.whatsapp.com"],hasRecipient:t=>{if("wa.me"===t.hostname){const o=e(r(t),2),i=o[0],a=o[1];return/^\d+$/.test(i||"")||["message","qr"].includes(n(i))&&!!a}return!!t.searchParams.get("phone")}},{type:"messenger",schemes:["fb-messenger:"],hosts:["m.me","messenger.com"],hasRecipient:t=>{if("m.me"===t.hostname)return r(t).length>0;if("messenger.com"===t.hostname){const o=e(r(t),2),i=o[0],a=o[1];return"t"===n(i)&&!!a}return["user-thread","user"].includes(t.hostname)}},{type:"telegram",schemes:["tg:"],hosts:["t.me","telegram.me"],hasRecipient:t=>{if("tg:"===t.protocol)return"resolve"===t.hostname&&!!t.searchParams.get("domain");const o=e(r(t),1)[0];return!!o&&!o.startsWith("+")&&!["share","joinchat","addstickers","proxy"].includes(n(o))}},{type:"viber",schemes:["viber:"],hasRecipient:e=>["chat","add","pa"].includes(e.hostname)},{type:"signal",schemes:["sgnl:"],hosts:["signal.me"],hasRecipient:e=>"sgnl:"===e.protocol||e.hash.startsWith("#p/")&&e.hash.length>3},{type:"line",schemes:["line:"],hosts:["line.me","page.line.me"],hasRecipient:t=>{if("page.line.me"===t.hostname)return r(t).length>0;const o="line:"===t.protocol?[t.hostname,...r(t)]:r(t),i=e("r"===n(o[0])?o.slice(1):o,4),a=i[0],c=i[1],l=i[2],s=i[3];return"ti"===n(a)&&"p"===n(c)&&!!l&&!s}}],i=Object.create(null),a=Object.create(null);o.forEach(e=>{var t,r;null===(t=e.schemes)||void 0===t||t.forEach(t=>{i[t]=e}),null===(r=e.hosts)||void 0===r||r.forEach(t=>{a[t]=e})});const c=["sponsored","ugc","nofollow"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return"http:"===e.protocol||"https:"===e.protocol?{transport_type:"beacon"}:{}}const f="a.post-page-numbers";function h(e){var t;try{const t=new URL(e.href);for(const e of["page","paged"]){const r=parseInt(t.searchParams.get(e)||"",10);if(r>0)return r}const r=t.pathname.split("/").filter(Boolean).pop()||"";if(/^\d+$/.test(r)){const e=parseInt(r,10);if(e>0)return e}}catch(e){}const r=parseInt((null===(t=e.textContent)||void 0===t?void 0:t.trim())||"",10);return r>0?r:1}const m="https://player.vimeo.com/api/player.js",y="data-googlesitekit-vimeo-sdk";function g(){return globalThis.Vimeo}function d(e,t){return new Promise((r,n)=>{let o;function i(e){return function(){clearTimeout(o),e(...arguments)}}e.addEventListener("load",i(()=>r()),{once:!0}),e.addEventListener("error",i(()=>n(new Error("Site Kit: failed to load the Vimeo Player SDK script."))),{once:!0}),void 0!==t&&(o=setTimeout(i(()=>n(new Error("Site Kit: timed out waiting for the Vimeo Player SDK script to load."))),t))})}let b=null;function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach(function(t){O(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function O(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}const P=[10,25,50,75];function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function k(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(){var e;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({postID:0,isSinglePost:!1,hasVimeoEmbed:!1},(null===(e=globalThis._googlesitekit)||void 0===e?void 0:e.contentEvents)||{})}!async function(e){if(!e.hasVimeoEmbed)return;const t=globalThis.document.querySelectorAll('iframe[src*="player.vimeo.com"]');if(t.length)try{const e=await function(){const e=g();return"function"==typeof(null==e?void 0:e.Player)?Promise.resolve(e.Player):(b||(b=async function(){const e=globalThis.document.querySelector('script[src^="'.concat(m,'"]'));if(e&&!e.hasAttribute(y))return void await d(e,1e4);null==e||e.remove();const t=globalThis.document.createElement("script");t.src=m,t.setAttribute(y,"");const r=d(t);globalThis.document.head.appendChild(t),await r}().then(()=>{var e;const t=null===(e=g())||void 0===e?void 0:e.Player;if("function"!=typeof t)throw new Error("Site Kit: the Vimeo Player SDK script did not expose Vimeo.Player.");return t}).catch(e=>{throw b=null,e})),b)}();await Promise.allSettled(Array.from(t).map(async(t,r)=>{await async function(e,t){const r=Promise.all([e.getVideoTitle(),e.getVideoUrl()]).then(e=>{let r=(o=2,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(n,o)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var n,o;return{video_provider:"vimeo",video_title:r[0],video_url:r[1],video_instance_index:t}});function n(e,t){r.then(r=>{var n,o;null===(n=globalThis._googlesitekit)||void 0===n||null===(o=n.gtagEvent)||void 0===o||o.call(n,e,w(w({},r),{},{video_percent:t}))}).catch(()=>{})}r.catch(e=>{console.error("Site Kit: failed to fetch this Vimeo video’s title/URL; its engagement events will not be tracked.",e)});let o=!1,i=!1;const a=new Set;e.on("play",()=>{o||(o=!0,n("video_start",0))}),e.on("timeupdate",e=>{if(a.size===P.length)return;const t=Math.floor(100*e.percent);P.forEach(e=>{t>=e&&!a.has(e)&&(a.add(e),n("video_progress",e))})}),e.on("ended",()=>{i||(i=!0,n("video_complete",100))}),await r}(new e(t),r)}))}catch(e){console.error("Site Kit: failed to load the Vimeo Player SDK; video engagement events will not be tracked on this page.",e)}}(E());try{_=E(),globalThis.document.addEventListener("click",e=>{try{var t,r;if(!(e.target instanceof Element))return;const n=e.target.closest("".concat(f,", ").concat("body.single-topic .bbp-pagination-links a.page-numbers"));if(!n)return;const o=n.matches(f)?"post":"bbpress";null===(t=globalThis._googlesitekit)||void 0===t||null===(r=t.gtagEvent)||void 0===r||r.call(t,"pagination_click",{pagination_type:o,page_number:h(n),post_id:_.postID,transport_type:"beacon"})}catch(e){console.error("Site Kit: failed to track this pagination click.",e)}})}catch(e){console.error("Site Kit: failed to initialize pagination click tracking.",e)}var _;try{globalThis.document.addEventListener("click",e=>{try{if(!(e.target instanceof Element))return;const l=e.target.closest("a[href]");if(!l)return;let u;try{u=new URL(l.href)}catch(e){return}const f=function(e){const t=new URL(e),r="http:"===t.protocol||"https:"===t.protocol;t.hostname=r?t.hostname.replace(/^www\./,""):t.hostname.toLowerCase();const n=r?a[t.hostname]:i[t.protocol];return n?n.hasRecipient?n.hasRecipient(t)?n.type:null:n.type:null}(u);if(f){var t,r;null===(t=globalThis._googlesitekit)||void 0===t||null===(r=t.gtagEvent)||void 0===r||r.call(t,"contact_link_click",s({link_type:f},p(u)))}else{const e=function(e,t){if("http:"!==t.protocol&&"https:"!==t.protocol||t.hostname===globalThis.location.hostname)return null;const r=new Set((e.getAttribute("rel")||"").toLowerCase().split(/[\s,]+/).filter(Boolean));return c.filter(e=>r.has(e)).join(" ")||null}(l,u);var n,o;e&&(null===(n=globalThis._googlesitekit)||void 0===n||null===(o=n.gtagEvent)||void 0===o||o.call(n,"outbound_link_click",s({link_rel:e,link_url:u.href,link_domain:u.hostname},p(u))))}}catch(e){console.error("Site Kit: failed to track this link click.",e)}})}catch(e){console.error("Site Kit: failed to initialize link click tracking.",e)}})();