1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,6154,(e,t,i)=>{"use strict";function r(e,t,i=!1){return t?Object.keys(e).filter(e=>i?!t.includes(e):t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}):{}}function s(e,t,i,r){let s=r&&Object.keys(r).length>0?new URL(Object.values(r)[0],e):new URL(e);return t&&i&&t.forEach(e=>{i[e]&&s.searchParams.set(e,i[e])}),s.toString()}function n(e,t,i,r,n){var a;if(!t)return`<${e}></${e}>`;let o=(null==(a=t.src)?void 0:a.url)?Object.assign(Object.assign({},t),{src:s(t.src.url,t.src.params,r,n)}):t,l=Object.keys(Object.assign(Object.assign({},o),i)).reduce((e,t)=>{let r=null==i?void 0:i[t],s=o[t],n=null!=r?r:s,a=!0===n?t:`${t}="${n}"`;return n?e+` ${a}`:e},"");return`<${e}${l}></${e}>`}Object.defineProperty(i,"__esModule",{value:!0}),i.formatData=i.createHtml=i.formatUrl=void 0,i.formatUrl=s,i.createHtml=n,i.formatData=function(e,t){var i,a,o,l,u;let c=r(t,null==(i=e.scripts)?void 0:i.reduce((e,t)=>[...e,...Array.isArray(t.params)?t.params:[]],[])),h=r(t,null==(o=null==(a=e.html)?void 0:a.attributes.src)?void 0:o.params),d=r(t,[null==(u=null==(l=e.html)?void 0:l.attributes.src)?void 0:u.slugParam]),p=r(t,[...Object.keys(c),...Object.keys(h),...Object.keys(d)],!0);return Object.assign(Object.assign({},e),{html:e.html?n(e.html.element,e.html.attributes,p,h,d):null,scripts:e.scripts?e.scripts.map(e=>Object.assign(Object.assign({},e),{url:s(e.url,e.params,c)})):null})}},80092,(e,t,i)=>{"use strict";var r=e.e&&e.e.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)0>t.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i},s=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.GoogleAnalytics=void 0;let n=s(e.r(55708)),a=e.r(6154);i.GoogleAnalytics=e=>{var t=r(e,[]);return(0,a.formatData)(n.default,t)}},90057,(e,t,i)=>{"use strict";var r=e.e&&e.e.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)0>t.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i},s=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.GoogleMapsEmbed=void 0;let n=s(e.r(81171)),a=e.r(6154);i.GoogleMapsEmbed=e=>{var t=r(e,[]);return(0,a.formatData)(n.default,t)}},61564,(e,t,i)=>{"use strict";var r=e.e&&e.e.__rest||function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)0>t.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i},s=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.YouTubeEmbed=void 0;let n=s(e.r(61002)),a=e.r(6154);i.YouTubeEmbed=e=>{var t=r(e,[]);return(0,a.formatData)(n.default,t)}},8751,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.YouTubeEmbed=i.GoogleMapsEmbed=i.GoogleAnalytics=void 0;var r=e.r(80092);Object.defineProperty(i,"GoogleAnalytics",{enumerable:!0,get:function(){return r.GoogleAnalytics}});var s=e.r(90057);Object.defineProperty(i,"GoogleMapsEmbed",{enumerable:!0,get:function(){return s.GoogleMapsEmbed}});var n=e.r(61564);Object.defineProperty(i,"YouTubeEmbed",{enumerable:!0,get:function(){return n.YouTubeEmbed}})},84627,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function({html:e,height:t=null,width:i=null,children:n,dataNtpc:a=""}){return(0,s.useEffect)(()=>{a&&performance.mark("mark_feature_usage",{detail:{feature:`next-third-parties-${a}`}}
1)},[a]),(0,r.jsxs)(r.Fragment,{children:[n,e?(0,r.jsx)("div",{style:{height:null!=t?`${t}px`:"auto",width:null!=i?`${i}px`:"auto"},"data-ntpc":a,dangerouslySetInnerHTML:{__html:e}}):null]})};let r=e.r(45410),s=e.r(47313)},68009,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){let{apiKey:t,...i}=e,r={...i,key:t},{html:o}=(0,n.GoogleMapsEmbed)(r);return(0,s.jsx)(a.default,{height:r.height||null,width:r.width||null,html:o,dataNtpc:"GoogleMapsEmbed"})};let s=e.r(45410),n=e.r(8751),a=r(e.r(84627))},16492,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={cancelIdleCallback:function(){return a},requestIdleCallback:function(){return n}};for(var s in r)Object.defineProperty(i,s,{enumerable:!0,get:r[s]});let n="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},a="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},95535,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={default:function(){return y},handleClientScriptLoad:function(){return v},initScriptLoader:function(){return _}};for(var s in r)Object.defineProperty(i,s,{enumerable:!0,get:r[s]});let n=e.r(81258),a=e.r(44066),o=e.r(45410),l=n._(e.r(88435)),u=a._(e.r(47313)),c=e.r(75652),h=e.r(50196),d=e.r(16492),p=new Map,g=new Set,f=e=>{let{src:t,id:i,onLoad:r=()=>{},onReady:s=null,dangerouslySetInnerHTML:n,children:a="",strategy:o="afterInteractive",onError:u,stylesheets:c}=e,d=i||t;if(d&&g.has(d))return;if(p.has(t)){g.add(d),p.get(t).then(r,u);return}let f=()=>{s&&s(),g.add(d)},v=document.createElement("script"),_=new Promise((e,t)=>{v.addEventListener("load",function(t){e(),r&&r.call(this,t),f()}),v.addEventListener("error",function(e){t(e)})}).catch(function(e){u&&u(e)});n?(v.innerHTML=n.__html||"",f()):a?(v.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"",f()):t&&(v.src=t,p.set(t,_)),(0,h.setAttributesFromProps)(v,e),"worker"===o&&v.setAttribute("type","text/partytown"),v.setAttribute("data-nscript",o),c&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let i=document.createElement("link");i.type="text/css",i.rel="stylesheet",i.href=e,t.appendChild(i)})}})(c),document.body.appendChild(v)};function v(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>f(e))}):f(e)}function _(e){e.forEach(v),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");g.add(t)})}function m(e){let{id:t,src:i="",onLoad:r=()=>{},onReady:s=null,strategy:n="afterInteractive",onError:a,stylesheets:h,...p}=e,{updateScripts:v,scripts:_,getIsSsr:m,appDir:y,nonce:b}=(0,u.useContext)(c.HeadManagerContext);b=p.nonce||b;let w=(0,u.useRef)(!1);(0,u.useEffect)(()=>{let e=t||i;w.current||(s&&e&&g.has(e)&&s(),w.current=!0)},[s,t,i]);let x=(0,u.useRef)(!1);if((0,u.useEffect)(()=>{if(!x.current){if("afterInteractive"===n)f(e);else"lazyOnload"===n&&("complete"===document.readyState?(0,d.requestIdleCallback)(()=>f(e)):window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>f(e))}));x.current=!0}},[e,n]),("beforeInteractive"===n||"worker"===n)&&(v?(_[n]=(_[n]||[]).concat([{id:t,src:i,onLoad:r,onReady:s,onError:a,...p,nonce:b}]),v(_)):m&&m()?g.add(t||i):m&&!m()&&f({...e,nonce:b})),y){if(h&&h.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===n)if(!i)return p.dangerouslySetInnerHTML&&(p.children=p.dangerouslySetInnerHTML.__html,delete p.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([0,{...p,id:t}])})`}});else return l.default.preload(i,p.integrity?{as:"script",integrity:p.integrity,nonce:b,crossOrigin:p.crossOrigin}:{as:"script",nonce:b,crossOrigin:p.crossOrigin}),(0,o.jsx)("script",{nonce:b,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([i,{...p,id:t}])})`}});"afterInteractive"===n&&i&&l.default.preload(i,p.integrity?{as:"script",integrity:p.integrity,nonce:b,crossOrigin:p.crossOrigin}:{as:"script",nonce:b,crossOrigin:p.crossOrigin})}return null}Object.defineProperty(m,"__nextScript",{value:!0});let y=m;("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esMo
1dule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},20921,(e,t,i)=>{t.exports=e.r(95535)},63792,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){let{html:t,scripts:i,stylesheets:r}=(0,a.YouTubeEmbed)(e);return(0,s.jsx)(o.default,{height:e.height||null,width:e.width||null,html:t,dataNtpc:"YouTubeEmbed",children:null==i?void 0:i.map(e=>(0,s.jsx)(n.default,{src:e.url,strategy:l[e.strategy],stylesheets:r},e.url))})};let s=e.r(45410),n=r(e.r(20921)),a=e.r(8751),o=r(e.r(84627)),l={server:"beforeInteractive",client:"afterInteractive",idle:"lazyOnload",worker:"worker"}},84876,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.sendGTMEvent=void 0,i.GoogleTagManager=function(e){let{gtmId:t,gtmScriptUrl:i,dataLayerName:r="dataLayer",auth:l,preview:u,dataLayer:c,nonce:h}=e;o=r;let d=new URL(i||"https://www.googletagmanager.com/gtm.js");return t&&d.searchParams.set("id",t),"dataLayer"!==r&&d.searchParams.set("l",r),l&&d.searchParams.set("gtm_auth",l),u&&(d.searchParams.set("gtm_preview",u),d.searchParams.set("gtm_cookies_win","x")),(0,n.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-gtm"}})},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.default,{id:"_next-gtm-init",dangerouslySetInnerHTML:{__html:` 2 (function(w,l){ 3 w[l]=w[l]||[]; 4 w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); 5 ${c?`w[l].push(${JSON.stringify(c)})`:""} 6 })(window,'${r}');`},nonce:h}),(0,s.jsx)(a.default,{id:"_next-gtm","data-ntpc":"GTM",src:d.href,nonce:h})]})};let s=e.r(45410),n=e.r(47313),a=r(e.r(20921)),o="dataLayer";i.sendGTMEvent=(e,t)=>{let i=t||o;window[i]=window[i]||[],window[i].push(e)}},65382,(e,t,i)=>{"use strict";let r;var s=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.GoogleAnalytics=function(e){let{gaId:t,debugMode:i,dataLayerName:s="dataLayer",nonce:l}=e;return void 0===r&&(r=s),(0,a.useEffect)(()=>{performance.mark("mark_feature_usage",{detail:{feature:"next-third-parties-ga"}})},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.default,{id:"_next-ga-init",dangerouslySetInnerHTML:{__html:` 7 window['${s}'] = window['${s}'] || []; 8 function gtag(){window['${s}'].push(arguments);} 9 gtag('js', new Date()); 10 11 gtag('config', '${t}' ${i?",{ 'debug_mode': true }":""});`},nonce:l}),(0,n.jsx)(o.default,{id:"_next-ga",src:`https://www.googletagmanager.com/gtag/js?id=${t}`,nonce:l})]})},i.sendGAEvent=function(){void 0===r?console.warn("@next/third-parties: GA has not been initialized"):window[r]?window[r].push(arguments):console.warn(`@next/third-parties: GA dataLayer ${r} does not exist`)};let n=e.r(45410),a=e.r(47313),o=s(e.r(20921))},97469,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.sendGAEvent=i.GoogleAnalytics=i.sendGTMEvent=i.GoogleTagManager=i.YouTubeEmbed=i.GoogleMapsEmbed=void 0;var s=e.r(68009);Object.defineProperty(i,"GoogleMapsEmbed",{enumerable:!0,get:function(){return r(s).default}});var n=e.r(63792);Object.defineProperty(i,"YouTubeEmbed",{enumerable:!0,get:function(){return r(n).default}});var a=e.r(84876);Object.defineProperty(i,"GoogleTagManager",{enumerable:!0,get:function(){return a.GoogleTagManager}}),Object.defineProperty(i,"sendGTMEvent",{enumerable:!0,get:function(){return a.sendGTMEvent}});var o=e.r(65382);Object.defineProperty(i,"GoogleAnalytics",{enumerable:!0,get:function(){return o.GoogleAnalytics}}),Object.defineProperty(i,"sendGAEvent",{enumerable:!0,get:function(){return o.sendGAEvent}})},82072,e=>{e.v({className:"inter_5972bc34-module__OU16Qa__className"})},60181,e=>{"use strict";var t=e.i(45410),i=e.i(74882),r=e.i(7316),s=e.i(47313),n=e.i(99965);function a(){return false}function o(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function l(e){(0,s.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let t=(0,s.useRef)(null);return(0,s.useEffect)(()=>
11{if(t.current)e.route&&t.current(e.route);else{let i=function(e={}){var t;if(!("u">typeof window)||null===e.route)return null;window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)});let i=e.scriptSrc?e.scriptSrc:a()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?`${e.basePath}/speed-insights/script.js`:"/_vercel/speed-insights/script.js";if(document.head.querySelector(`script[src*="${i}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let r=document.createElement("script");return r.src=i,r.defer=!0,r.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),r.dataset.sdkv="1.2.0",e.sampleRate&&(r.dataset.sampleRate=e.sampleRate.toString()),e.route&&(r.dataset.route=e.route),e.endpoint?r.dataset.endpoint=e.endpoint:e.basePath&&(r.dataset.endpoint=`${e.basePath}/speed-insights/vitals`),e.dsn&&(r.dataset.dsn=e.dsn),a()&&!1===e.debug&&(r.dataset.debug="false"),r.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${i}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(r),{setRoute:e=>{r.dataset.route=e??void 0}}}({framework:e.framework??"react",basePath:e.basePath??function(){if(void 0!==r.default&&void 0!==r.default.env)return r.default.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});i&&(t.current=i.setRoute)}},[e.route]),null}function u(e){let t=(()=>{let e=(0,n.useParams)(),t=(0,n.useSearchParams)()||new URLSearchParams,i=(0,n.usePathname)();if(!e)return null;let r=Object.keys(e).length?e:Object.fromEntries(t.entries());if(!i||!r)return i;let s=i;try{let e=Object.entries(r);for(let[t,i]of e)if(!Array.isArray(i)){let e=o(i);e.test(s)&&(s=s.replace(e,`/[${t}]`))}for(let[t,i]of e)if(Array.isArray(i)){let e=o(i.join("/"));e.test(s)&&(s=s.replace(e,`/[...${t}]`))}return s}catch(e){return i}})();return s.default.createElement(l,{route:t,...e,framework:"next",basePath:function(){if(void 0!==r.default&&void 0!==r.default.env)return r.default.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}()})}function c(e){return s.default.createElement(s.Suspense,{fallback:null},s.default.createElement(u,{...e}))}var h=e.i(97469),d=e.i(76141),p=e.i(53724),g=e.i(85791),f=e.i(78464);let v=[...[{_id:1,featured:!0,imageVariant:"salary",category:"Featured",readTime:"7min",author:{name:"LingoRep Language Learning Team",image:"/images/user/user-01.png"},publishedAt:"May 5, 2026",slug:"up-to-35-more-the-career-value-of-better-english",title:"Up to 35% More? The Career Value of Better English",seoTitle:"Up to 35% More? The Career Value of Better English",metadata:"English is not just a language skill. For many professionals, it is a career signal that shapes how clearly your expertise is understood.",seoDescription:"Learn how stronger professional English can improve salary conversations, promotion opportunities, interviews, and confidence in work meetings.",tags:["professional English","career growth","salary negotiation","English speaking confidence","business English"],mainImage:"/images/why-use/lr-sidebar-play.png"},{_id:4,imageVariant:"meeting",category:"Professional English",readTime:"5min",author:{name:"LingoRep Language Learning Team",image:"/images/user/user-02.png"},publishedAt:"May 5, 2026",slug:"your-meetings-are-the-best-english-lessons-youre-not-using",title:"Your Meetings Are the Best English Lessons You're Not Using",seoTitle:"Learn Professional English From Your Work Meetings",metadata:"Your real work meetings already contain the phrases, mistakes, and high-pressure moments that can make your English practice more useful.",seoDescription:"Use real meetings, call reports, personalized drills, and spaced repetition to practice the English you actually need at work.",tags:["professional English","English meetings","AI speaking coach","workplace English","spaced repetition"],mainImage:"/images/hero/hero-light.png"}].filter(e=>e.slug).map(e=>({href:`/blog/${e.slug}`,title:e.title}))],_=()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("footer",{className:"border-t border-stroke bg-white dark:border-strokedark dark:bg-blacksection",children:(0,t.jsx)("div",{className:"mx-auto max-w-c-1390 px-4 md:px-8 2xl:px-0",children:(0,t.jsx)("div",{className:"py-20 lg:py-25",children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-8 lg:justify-between lg:gap-0",children:[(0,t.jsxs)(d.motion.div,{variants:{hidden:{opacity:0,y:-20},visible:{opacity:1,y:0}}
11,initial:"hidden",whileInView:"visible",transition:{duration:1,delay:.5},viewport:{once:!0},className:"animate_top w-1/2 lg:w-1/4",children:[(0,t.jsxs)(g.default,{href:"/",className:"relative",children:[(0,t.jsx)(p.default,{width:110,height:80,src:"/images/logo/logo-light.svg",alt:"Logo",className:"dark:hidden"}),(0,t.jsx)(p.default,{width:110,height:80,src:"/images/logo/logo-dark.svg",alt:"Logo",className:"hidden dark:block"})]}),(0,t.jsx)("p",{className:"mb-10 mt-5",children:"Learn from the English you speak every day."})]}),(0,t.jsxs)("div",{className:"flex w-full flex-col gap-8 md:flex-row md:justify-between md:gap-0 lg:w-2/3 xl:w-7/12",children:[(0,t.jsxs)(d.motion.div,{variants:{hidden:{opacity:0,y:-20},visible:{opacity:1,y:0}},initial:"hidden",whileInView:"visible",transition:{duration:1,delay:.1},viewport:{once:!0},className:"animate_top",children:[(0,t.jsx)("h4",{className:"mb-9 text-itemtitle2 font-medium text-black dark:text-white",children:"Quick Links"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)(g.default,{href:"/",className:"mb-3 inline-block hover:text-primary",children:"Home"})}),(0,t.jsx)("li",{children:(0,t.jsx)(f.default,{href:"/#about",className:"mb-3 inline-block hover:text-primary",children:"Product"})}),(0,t.jsx)("li",{children:(0,t.jsx)(f.default,{href:"/#pricing",className:"mb-3 inline-block hover:text-primary",children:"Pricing"})})]})]}),(0,t.jsxs)(d.motion.div,{variants:{hidden:{opacity:0,y:-20},visible:{opacity:1,y:0}},initial:"hidden",whileInView:"visible",transition:{duration:1,delay:.1},viewport:{once:!0},className:"animate_top",children:[(0,t.jsx)("h4",{className:"mb-9 text-itemtitle2 font-medium text-black dark:text-white",children:"Support"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)(g.default,{href:"/docs",className:"mb-3 inline-block hover:text-primary",children:"Docs"})}),(0,t.jsx)("li",{children:(0,t.jsx)(g.default,{href:"/blog",className:"mb-3 inline-block hover:text-primary",children:"Blog"})}),(0,t.jsx)("li",{children:(0,t.jsx)(g.default,{href:"/support",className:"mb-3 inline-block hover:text-primary",children:"Support"})}),(0,t.jsx)("li",{children:(0,t.jsx)(g.default,{href:"/privacy",className:"mb-3 inline-block hover:text-primary",children:"Privacy Policy"})})]})]}),(0,t.jsxs)(d.motion.div,{variants:{hidden:{opacity:0,y:-20},visible:{opacity:1,y:0}},initial:"hidden",whileInView:"visible",transition:{duration:1,delay:.1},viewport:{once:!0},className:"animate_top",children:[(0,t.jsx)("h4",{className:"mb-9 text-itemtitle2 font-medium text-black dark:text-white",children:"Popular Pages"}),(0,t.jsx)("ul",{children:v.map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(g.default,{href:e.href,className:"max-w-70 mb-3 inline-block leading-snug hover:text-primary",children:e.title})},e.href))})]})]})]})})})})}),m=["light","dark"],y="(prefers-color-scheme: dark)",b="u"<typeof window,w=(0,s.createContext)(void 0),x={setTheme:e=>{},themes:[]},E=e=>(0,s.useContext)(w)?s.default.createElement(s.Fragment,null,e.children):s.default.createElement(S,e),k=["light","dark"],S=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:i=!0,enableColorScheme:r=!0,storageKey:n="theme",themes:a=k,defaultTheme:o=i?"system":"light",attribute:l="data-theme",value:u,children:c,nonce:h})=>
11{let[d,p]=(0,s.useState)(()=>O(n,o)),[g,f]=(0,s.useState)(()=>O(n)),v=u?Object.values(u):a,_=(0,s.useCallback)(e=>{let s=e;if(!s)return;"system"===e&&i&&(s=C());let n=u?u[s]:s,a=t?T():null,c=document.documentElement;if("class"===l?(c.classList.remove(...v),n&&c.classList.add(n)):n?c.setAttribute(l,n):c.removeAttribute(l),r){let e=m.includes(o)?o:null,t=m.includes(s)?s:e;c.style.colorScheme=t}null==a||a()},[]),b=(0,s.useCallback)(e=>{p(e);try{localStorage.setItem(n,e)}catch(e){}},[e]),x=(0,s.useCallback)(t=>{f(C(t)),"system"===d&&i&&!e&&_("system")},[d,e]);(0,s.useEffect)(()=>{let e=window.matchMedia(y);return e.addListener(x),x(e),()=>e.removeListener(x)},[x]),(0,s.useEffect)(()=>{let e=e=>{e.key===n&&b(e.newValue||o)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[b]),(0,s.useEffect)(()=>{_(null!=e?e:d)},[e,d]);let E=(0,s.useMemo)(()=>({theme:d,setTheme:b,forcedTheme:e,resolvedTheme:"system"===d?g:d,themes:i?[...a,"system"]:a,systemTheme:i?g:void 0}),[d,b,e,g,i,a]);return s.default.createElement(w.Provider,{value:E},s.default.createElement(P,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:i,enableColorScheme:r,storageKey:n,themes:a,defaultTheme:o,attribute:l,value:u,children:c,attrs:v,nonce:h}),c)},P=(0,s.memo)(({forcedTheme:e,storageKey:t,attribute:i,enableSystem:r,enableColorScheme:n,defaultTheme:a,value:o,attrs:l,nonce:u})=>{let c="system"===a,h="class"===i?`var d=document.documentElement,c=d.classList;c.remove(${l.map(e=>`'${e}'`).join(",")});`:`var d=document.documentElement,n='${i}',s='setAttribute';`,d=n?m.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(e,t=!1,r=!0)=>{let s=o?o[e]:e,a=t?e+"|| ''":`'${s}'`,l="";return n&&r&&!t&&m.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===i?l+=t||s?`c.add(${a})`:"null":s&&(l+=`d[s](n,${a})`),l},g=e?`!function(){${h}${p(e)}}()`:r?`!function(){try{${h}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${y}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}${c?"":"else{"+p(a,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${h}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${p(o?"x[e]":"e",!0)}}else{${p(a,!1,!1)};}${d}}catch(t){}}();`;return s.default.createElement("script",{nonce:u,dangerouslySetInnerHTML:{__html:g}})},()=>!0),O=(e,t)=>{let i;if(!b){try{i=localStorage.getItem(e)||void 0}catch(e){}return i||t}},T=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},C=e=>(e||(e=window.matchMedia(y)),e.matches?"dark":"light"),$=()=>{var e;let{theme:i,setTheme:r}=null!=(e=(0,s.useContext)(w))?e:x;return(0,t.jsxs)("button",{"aria-label":"theme toggler",onClick:()=>r("dark"===i?"light":"dark"),className:"bg-gray-2 dark:bg-dark-bg absolute right-17 mr-1.5 flex cursor-pointer items-center justify-center rounded-full text-black dark:text-white lg:static",children:[(0,t.jsx)(p.default,{src:"/images/icon/icon-moon.svg",alt:"logo",width:21,height:21,className:"dark:hidden"}),(0,t.jsx)(p.default,{src:"/images/icon/icon-sun.svg",alt:"logo",width:22,height:22,className:"hidden dark:block"})]})},j=[{id:1,title:"Home",newTab:!1,path:"/"},{id:2,title:"Features",newTab:!1,path:"/#features"},{id:2.1,title:"Pricing",newTab:!1,path:"/#pricing"},{id:2.3,title:"Docs",newTab:!1,path:"/docs"},{id:2.4,title:"Blog",newTab:!1,path:"/blog"},{id:4,title:"Support",newTab:!1,path:"/support"}];e.i(37215);var I=e.i(32756);let M=()=>{let{data:e}=(0,i.useSession)(),{userData:r}=(0,I.useUserData)(),[n,a]=(0,s.useState)(!1),o=r?.subscription?.status==="active";return(0,t.jsx)("div",{className:"relative mx-auto max-w-c-1390 items-center justify-between px-4 md:px-8 xl:flex 2xl:px-0",children:e?(0,t.jsx)("ul",{className:"flex flex-col gap-5 xl:flex-row xl:items-center xl:gap-10",children:(0,t.jsxs)("li",{className:"group relative",children:[(0,t.jsxs)("button",{onClick:()=>a(!n),className:"flex cursor-pointer items-center justify-between gap-3 hover:text-primary",children:[(0,t.jsx)(p.default,{src:e?.user?.image??"",alt:"user image",width:30,height:30,className:"rounded-full"}),(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:e?.user?.name}),(0,t.jsx)("span",{className:`rounded-full px-2 py-0.5 text-xs font-semibold ${o?"bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-200":"bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300"}`,children:o?"Pro":"Free"})]}),(0,t.jsx)("span",{children:(0,t.jsx)("svg",{className:"h-3 w-3 cursor-pointer fill-waterloo group-hover:fill-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,t.jsx)("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})})})]}),(0,t.jsxs)("ul",{className:`dropdown ${n?"flex":""}`,children:[(0,t.jsx)("li",{className:"cursor-pointer hover:text-primary",children:(0,t.jsx)(g.default,{href:"/auth/profile",children:"Profile"})}),(0,t.jsx)("li",{className:"cursor-pointer hover:text-primary",children:(0,t.jsx)(g.default,{href:"/coac
11h",children:"Review & Practice"})}),(0,t.jsx)("li",{className:"cursor-pointer hover:text-primary",onClick:()=>(0,i.signOut)(),children:"Sign Out"})]})]})}):(0,t.jsx)(g.default,{href:"/auth/signin",className:"flex items-center justify-center rounded-full bg-primary px-7.5 py-2.5 text-regular text-white duration-300 ease-in-out hover:bg-primaryho",children:"Sign in"})})},F=()=>{let{data:e}=(0,i.useSession)(),[r,a]=(0,s.useState)(!1),[o,l]=(0,s.useState)(!1),[u,c]=(0,s.useState)(!1),h=(0,n.usePathname)(),d=()=>{a(!1),l(!1)},v=()=>{window.scrollY>=80?c(!0):c(!1)};return(0,s.useEffect)(()=>{window.addEventListener("scroll",v)}),(0,t.jsx)("header",{className:`fixed left-0 top-0 z-99999 w-full py-7 ${u?"bg-white !py-4 shadow transition duration-100 dark:bg-black":""}`,children:(0,t.jsxs)("div",{className:"relative mx-auto max-w-c-1390 items-center justify-between px-4 md:px-8 xl:flex 2xl:px-0",children:[(0,t.jsxs)("div",{className:"flex w-full items-center justify-between xl:w-1/4",children:[(0,t.jsxs)(g.default,{href:"/",children:[(0,t.jsx)(p.default,{src:"/images/logo/logo-dark.svg",alt:"logo",width:80,height:20,style:{maxWidth:"200px",maxHeight:"70px"},className:"hidden w-full dark:block"}),(0,t.jsx)(p.default,{src:"/images/logo/logo-light.svg",alt:"logo",width:80,height:20,style:{maxWidth:"200px",maxHeight:"70px"},className:"w-full dark:hidden"})]}),(0,t.jsx)("button",{"aria-label":"hamburger Toggler",className:"block xl:hidden",onClick:()=>a(!r),children:(0,t.jsxs)("span",{className:"relative block h-5.5 w-5.5 cursor-pointer",children:[(0,t.jsxs)("span",{className:"absolute right-0 block h-full w-full",children:[(0,t.jsx)("span",{className:`relative left-0 top-0 my-1 block h-0.5 rounded-sm bg-black delay-[0] duration-200 ease-in-out dark:bg-white ${!r?"!w-full delay-300":"w-0"}`}),(0,t.jsx)("span",{className:`relative left-0 top-0 my-1 block h-0.5 rounded-sm bg-black delay-150 duration-200 ease-in-out dark:bg-white ${!r?"delay-400 !w-full":"w-0"}`}),(0,t.jsx)("span",{className:`relative left-0 top-0 my-1 block h-0.5 rounded-sm bg-black delay-200 duration-200 ease-in-out dark:bg-white ${!r?"!w-full delay-500":"w-0"}`})]}),(0,t.jsxs)("span",{className:"du-block absolute right-0 h-full w-full rotate-45",children:[(0,t.jsx)("span",{className:`absolute left-2.5 top-0 block h-full w-0.5 rounded-sm bg-black delay-300 duration-200 ease-in-out dark:bg-white ${!r?"!h-0 delay-[0]":"h-full"}`}),(0,t.jsx)("span",{className:`delay-400 absolute left-0 top-2.5 block h-0.5 w-full rounded-sm bg-black duration-200 ease-in-out dark:bg-white ${!r?"!h-0 delay-200":"h-0.5"}`})]})]})})]}),(0,t.jsxs)("div",{className:`invisible h-0 w-full items-center justify-between xl:visible xl:flex xl:h-auto xl:w-full ${r&&"navbar !visible mt-4 h-auto max-h-[400px] rounded-md bg-white p-7.5 shadow-solid-5 dark:bg-blacksection xl:h-auto xl:p-0 xl:shadow-none xl:dark:bg-transparent"}`,children:[(0,t.jsx)("nav",{children:(0,t.jsxs)("ul",{className:"flex flex-col gap-5 xl:flex-row xl:items-center xl:gap-10",children:[j.map((e,i)=>(0,t.jsx)("li",{className:e.submenu&&"group relative",children:e.submenu?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>l(!o),className:"flex cursor-pointer items-center justify-between gap-3 hover:text-primary",children:[e.title,(0,t.jsx)("span",{children:(0,t.jsx)("svg",{className:"h-3 w-3 cursor-pointer fill-waterloo group-hover:fill-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,t.jsx)("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})})})]}),(0,t.jsx)("ul",{className:`dropdown ${o?"flex":""}`,children:e.submenu.map((e,i)=>(0,t.jsx)("li",{className:"hover:text-primary",children:(0,t.jsx)(g.default,{href:e.path||"#",onClick:d,children:e.title})},i))})]}):e.path?.includes("#")?(0,t.jsx)(f.default,{href:e.path,onClick:d,className:h===e.path?"text-primary hover:text-primary":"hover:text-primary",children:e.title}):(0,t.jsx)(g.default,{href:`${e.path}`,onClick:d,className:h===e.path?"text-primary hover:text-primary":"hover:text-primary",children:e.title})},i)),e&&(0,t.jsx)("li",{children:(0,t.jsx)(g.default,{href:"/coac
11h",onClick:d,className:"inline-flex items-center rounded-lg border-2 border-blue-500 bg-blue-50 px-3 py-1.5 text-sm font-semibold text-blue-700 shadow-sm transition hover:bg-blue-100 dark:border-blue-400 dark:bg-blue-950/40 dark:text-blue-200",children:"Review"})})]})}),(0,t.jsxs)("div",{className:"mt-7 flex items-center gap-6 xl:mt-0",children:[(0,t.jsx)($,{}),(0,t.jsx)(M,{})]})]})]})})},R=()=>(0,t.jsxs)("div",{className:"fixed left-0 top-0 -z-20 flex h-full w-full items-center justify-around",children:[(0,t.jsx)("span",{className:"flex h-full w-[1px] animate-line1 bg-stroke dark:bg-strokedark"}),(0,t.jsx)("span",{className:"flex h-full w-[1px] animate-line2 bg-stroke dark:bg-strokedark"}),(0,t.jsx)("span",{className:"flex h-full w-[1px] animate-line3 bg-stroke dark:bg-strokedark"})]});function N(){let[e,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=()=>{window.scrollY>300?i(!0):i(!1)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,t.jsx)("div",{className:"fixed bottom-8 right-8 z-[99]",children:e&&(0,t.jsxs)("div",{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},"aria-label":"scroll to top",className:"hover:shadow-signUp flex h-10 w-10 cursor-pointer items-center justify-center rounded-sm bg-primary text-white shadow-md transition duration-300 ease-in-out hover:bg-opacity-80",children:[(0,t.jsx)("span",{className:"mt-[6px] h-3 w-3 rotate-45 border-l border-t border-white"}),(0,t.jsx)("span",{className:"sr-only",children:"scroll to top"})]})})}var A=e.i(82072);let L={className:A.default.className,style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"}};null!=A.default.variable&&(L.variable=A.default.variable);var D=e.i(24323);let q=(0,s.createContext)(null),U=({children:e})=>{let r=(0,i.useSession)();return(0,s.useEffect)(()=>{r?.status==="unauthenticated"&&(0,D.sendMsgToBgScript)({type:"UserSession",payload:{session:null}}),r?.status==="authenticated"&&(0,D.sendMsgToBgScript)({type:"UserSession",payload:{session:r?.data}})},[r]),(0,t.jsx)(q.Provider,{value:r?.data,children:e})};var H=e.i(35642),G="u">typeof window?window:void 0,B="u">typeof globalThis?globalThis:G;"u"<typeof self&&(B.self=B),"u"<typeof File&&(B.File=function(){});var z=Array.prototype,V=z.forEach,W=z.indexOf,K=null==B?void 0:B.navigator,Y=null==B?void 0:B.document,Q=null==B?void 0:B.location,X=null==B?void 0:B.fetch,J=null!=B&&B.XMLHttpRequest&&"withCredentials"in new B.XMLHttpRequest?B.XMLHttpRequest:void 0,Z=null==B?void 0:B.AbortController,ee=null==K?void 0:K.userAgent,et=null!=G?G:{},ei={DEBUG:!1,LIB_VERSION:"1.360.1"};function er(e,t,i,r,s,n,a){try{var o=e[n](a),l=o.value}catch(e){return void i(e)}o.done?t(l):Promise.resolve(l).then(r,s)}function es(e){return function(){var t=this,i=arguments;return new Promise(function(r,s){var n=e.apply(t,i);function a(e){er(n,r,s,a,o,"next",e)}function o(e){er(n,r,s,a,o,"throw",e)}a(void 0)})}}function en(){return(en=Object.assign.bind()).apply(null,arguments)}function ea(e,t){if(null==e)return{};var i={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;i[r]=e[r]}return i}var eo=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],el=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],eu=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var i=e.toLowerCase();return el.concat(t).some(e=>{var t=e.toLowerCase();return -1!==i.indexOf(t)})};function ec(e,t){return -1!==e.indexOf(t)}var eh=function(e){return e.trim()},ed=function(e){return e.replace(/^\$/,"")},ep=Array.isArray,eg=Object.prototype,ef=eg.hasOwnProperty,ev=eg.toString,e_=ep||function(e){return"[object Array]"===ev.call(e)},em=e=>"function"==typeof e,ey=e=>e===Object(e)&&!e_(e),eb=e=>{if(ey(e)){for(var t in e)if(ef.call(e,t))return!1;return!0}return!1},ew=e=>void 0===e,ex=e=>"[object String]"==ev.call(e),eE=e=>ex(e)&&0===e.trim().length,ek=e=>null===e,eS=e=>ew(e)||ek(e),eP=e=>"[object Number]"==ev.call(e)&&e==e,eO=e=>eP(e)&&e>0,eT=e=>"[object Boolean]"===ev.call(e),eC=e=>ec(eo,e);function e$(e){return null===e||"object"!=typeof e}function ej(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function eI(e){return!ew(Event)&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var eM=[!0,"true",1,"1","yes"],eF=[!1,"false",0,"0","no"];function eR(e,t,i,r,s){return t>i&&(r.warn("min cannot be greater than max."),t=i),eP(e)?e>i?(r.warn(" cannot be greater than max: "+i+". Using max value instead."),i):e<t?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+i+", fallback: "+s),eR(s||i,t,i,r))}class eN{constructor(e){this.t={},this.i=e.i,this.o=eR(e.bucketSize,0,100,e.h),this.m=eR(e.refillRate,0,this.o,e.h),this.S=eR(e.refillInterval,0,864e5,e.h)}$(e,t){var i=Math.floor((t-e.lastAccess)/this.S);if(i>0){var r=i*this.m;e.tokens=Math.min(e.tokens+r,this.o),e.lastAccess=e.lastAccess+i*this.S}}consumeRateLimit(e){var t,i=Date.now(),r=String(e),s=this.t[r];return s?this.$(s,i):(s={tokens:this.o,lastAccess:i},this.t[r]=s),0===s.tokens||(s.tokens--,0===s.tokens&&(null==(t=this.i)||t.call(this,e)),0===s.tokens)}stop(){this.t={}}}var eA,eL,eD,eq="Mobile",eU="Android",eH="Tablet",eG=eU+" "+eH,eB="iPad",ez="Apple",eV=ez+" Watch",eW="Safari",eK="BlackBerry",eY="Samsung",eQ=eY+"Browser",eX=eY+" Internet",eJ="Chrome",eZ=eJ+" OS",e0=eJ+" iOS",e1="Internet Explorer",e2=e1+" "+eq,e3="Opera",e5=e3+" Mini",e4="Edge",e8="Microsoft "+e4,e6="Firefox",e7=e6+" iOS",e9="Nintendo",te="PlayStation",tt="Xbox",ti=eU+" "+eq,tr=eq+" "+eW,ts="Windows",tn=ts+" Phone",ta="Nokia",to="Ouya",tl="Generic",tu=tl+" "+eq.toLowerCase(),tc=tl+" "+eH.toLowerCase(),th="Konqueror",td="(\\d+(\\.\\d+)?)",tp=RegExp("Version/"+td),tg=RegExp(tt,"
11i"),tf=RegExp(te+" \\w+","i"),tv=RegExp(e9+" \\w+","i"),t_=RegExp(eK+"|PlayBook|BB10","i"),tm={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},ty=function(e,t){var i;return t=t||"",ec(e," OPR/")&&ec(e,"Mini")?e5:ec(e," OPR/")?e3:t_.test(e)?eK:ec(e,"IE"+eq)||ec(e,"WPDesktop")?e2:ec(e,eQ)?eX:ec(e,e4)||ec(e,"Edg/")?e8:ec(e,"FBIOS")?"Facebook "+eq:ec(e,"UCWEB")||ec(e,"UCBrowser")?"UC Browser":ec(e,"CriOS")?e0:ec(e,"CrMo")||ec(e,eJ)?eJ:ec(e,eU)&&ec(e,eW)?ti:ec(e,"FxiOS")?e7:ec(e.toLowerCase(),th.toLowerCase())?th:(i=t)&&ec(i,ez)||ec(e,eW)&&!ec(e,eJ)&&!ec(e,eU)?ec(e,eq)?tr:eW:ec(e,e6)?e6:ec(e,"MSIE")||ec(e,"Trident/")?e1:ec(e,"Gecko")?e6:""},tb={[e2]:[RegExp("rv:"+td)],[e8]:[RegExp(e4+"?\\/"+td)],[eJ]:[RegExp("("+eJ+"|CrMo)\\/"+td)],[e0]:[RegExp("CriOS\\/"+td)],"UC Browser":[RegExp("(UCBrowser|UCWEB)\\/"+td)],[eW]:[tp],[tr]:[tp],[e3]:[RegExp("(Opera|OPR)\\/"+td)],[e6]:[RegExp(e6+"\\/"+td)],[e7]:[RegExp("FxiOS\\/"+td)],[th]:[RegExp("Konqueror[:/]?"+td,"i")],[eK]:[RegExp(eK+" "+td),tp],[ti]:[RegExp("android\\s"+td,"i")],[eX]:[RegExp(eQ+"\\/"+td)],[e1]:[RegExp("(rv:|MSIE )"+td)],Mozilla:[RegExp("rv:"+td)]},tw=function(e,t){var i=tb[ty(e,t)];if(ew(i))return null;for(var r=0;r<i.length;r++){var s=i[r],n=e.match(s);if(n)return parseFloat(n[n.length-2])}return null},tx=[[RegExp(tt+"; "+tt+" (.*?)[);]","i"),e=>[tt,e&&e[1]||""]],[RegExp(e9,"i"),[e9,""]],[RegExp(te,"i"),[te,""]],[t_,[eK,""]],[RegExp(ts,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[tn,""];if(new RegExp(eq).test(t)&&!/IEMobile\b/.test(t))return[ts+" "+eq,""];var i=/Windows NT ([0-9.]+)/i.exec(t);if(i&&i[1]){var r=tm[i[1]]||"";return/arm/i.test(t)&&(r="RT"),[ts,r]}return[ts,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=ew(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+eU+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+eU+")","i"),e=>e&&e[2]?[eU,[e[2],e[3],e[4]||"0"].join(".")]:[eU,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var i=[e[1],e[2],e[3]||"0"];t[1]=i.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[eZ,""]],[/Linux|debian/i,["Linux",""]]],tE=function(e){return tv.test(e)?e9:tf.test(e)?te:tg.test(e)?tt:RegExp(to,"i").test(e)?to:RegExp("("+tn+"|WPDesktop)","i").test(e)?tn:/iPad/.test(e)?eB:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?eV:t_.test(e)?eK:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(ta,"i").test(e)?ta:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(eq).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?eU:eG:RegExp("(pda|"+eq+")","i").test(e)?tu:RegExp(eH,"i").test(e)&&!RegExp(eH+" pc","i").test(e)?tc:""},tk=e=>e instanceof Error;class tS{constructor(e,t,i){void 0===i&&(i=[]),this.coercers=e,this.stackParser=t,this.modifiers=i}buildFromUnknown(e,t){void 0===t&&(t={});var i=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(i,t,0).apply(e),s=this.buildParsingContext(t),n=this.parseStacktrace(r,s);return{$exception_list:this.convertToExceptionList(n,i),$exception_level:"error"}}modifyFrames(e){var t=this;return es(function*(){for(var i of e)i.stacktrace&&i.stacktrace.frames&&e_(i.stacktrace.frames)&&(i.stacktrace.frames=yield t.applyModifiers(i.stacktrace.frames));return e})()}coerceFallback(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}}parseStacktrace(e,t){var i,r;return null!=e.cause&&(i=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),en({},e,{cause:i,stack:r})}applyChunkIds(e,t){return e.map(e=>(e.filename&&t&&(e.chunk_id=t[e.filename]),e))}applyCoercers(e,t){for(var i of this.coercers)if(i.match(e))return i.coerce(e,t);return this.coerceFallback(t)}applyModifiers(e){var t=this;return es(function*(){var i=e;for(var r of t.modifiers)i=yield r(i);return i})()}convertToExceptionList(e,t){var i,r,s,n={type:e.type,value:e.value,mechanism:{type:null!=(i=t.type)?i:"generic",handled:null==(r=t.handled)||r,synthetic:null!=(s=e.synthetic)&&s}};e.stack&&(n.stacktrace={type:"raw",frames:e.stack});var a=[n];return null!=e.cause&&a.push(...this.convertToExceptionList(e.cause,en({},t,{handled:!0}))),a}buildParsingContext(e){var t;return{chunkIdMap:function(e){var t=globalThis._posthogChunkIds;if(t){var i=Object.keys(t);return eD&&i.length===eL||(eL=i.length,eD=i.reduce((i,r)=>{eA||(eA={});var s=eA[r];if(s)i[s[0]]=s[1];else for(var n=e(r),a=n.length-1;a>=0;a--){var o=n[a],l=null==o?void 0:o.filename,u=t[r];if(l&&u){i[l]=u,eA[r]=[l,u];break}}return i},{})),eD}}(this.stackParser),skipFirstLines:null!=(t=e.skipFirstLines)?t:1}}buildCoercingContext(e,t,i){void 0===i&&(i=0);var r=(i,r)=>{if(r<=4){var s=this.buildCoercingContext(e,t,r);return this.applyCoercers(i,s)}};return en({},t,{syntheticException:0==i?t.syntheticException:void 0,mechanism:e,apply:e=>r(e,i),next:e=>r(e,i+1)})}}function tP(e,t,i,r,s){var n={platform:e,filename:t,function:"<anonymous>"===i?"?":i,in_app:!0};return ew(r)||(n.lineno=r),ew(s)||(n.colno=s),n}var tO=(e,t)=>{var i=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return i||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",i?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]}
vendor: 4,163 bytes, line 11
11,tT=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,tC=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,t$=/\((\S*)(?::(\d+))(?::(\d+))\)/,tj=(e,t)=>{var i=tT.exec(e);if(i){var[,r,s,n]=i;return tP(t,r,"?",+s,+n)}var a=tC.exec(e);if(a){if(a[2]&&0===a[2].indexOf("eval")){var o=t$.exec(a[2]);o&&(a[2]=o[1],a[3]=o[2],a[4]=o[3])}var[l,u]=tO(a[1]||"?",a[2]);return tP(t,u,l,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},tI=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,tM=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,tF=(e,t)=>{var i=tI.exec(e);if(i){if(i[3]&&i[3].indexOf(" > eval")>-1){var r=tM.exec(i[3]);r&&(i[1]=i[1]||"eval",i[3]=r[1],i[4]=r[2],i[5]="")}var s=i[3],n=i[1]||"?";return[n,s]=tO(n,s),tP(t,s,n,i[4]?+i[4]:void 0,i[5]?+i[5]:void 0)}},tR=/\(error: (.*)\)/;class tN{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,t){var i=ex(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:i?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t}isDOMException(e){return ej(e,"DOMException")}isDOMError(e){return ej(e,"DOMError")}}class tA{match(e){return e instanceof Error}coerce(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,t){var i=e.message;return i.error&&"string"==typeof i.error.message?String(i.error.message):String(i)}getStack(e){return e.stacktrace||e.stack||void 0}}class tL{match(e){return ej(e,"ErrorEvent")&&null!=e.error}coerce(e,t){var i;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}var tD=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class tq{match(e){return"string"==typeof e}coerce(e,t){var i,[r,s]=this.getInfos(e);return{type:null!=r?r:"Error",value:null!=s?s:e,stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}getInfos(e){var t="Error",i=e,r=e.match(tD);return r&&(t=r[1],i=r[2]),[t,i]}}var tU=["fatal","error","warning","log","info","debug"];function tH(e,t){void 0===t&&(t=40);var i=Object.keys(e);if(i.sort(),!i.length)return"[object has no keys]";for(var r=i.length;r>0;r--){var s=i.slice(0,r).join(", ");if(!(s.length>t))return r===i.length||s.length<=t?s:s.slice(0,t)+"..."}return""}class tG{match(e){return"object"==typeof e&&null!==e}coerce(e,t){var i,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(i=t.syntheticException)?void 0:i.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return eI(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var i=this.getObjectClassName(e);return(i&&"Object"!==i?"'"+i+"'":"Object")+" captured as exception with keys: "+tH(e)}isSeverityLevel(e){return ex(e)&&!eE(e)&&tU.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var i=e[t];if(tk(i))return i}}getObjectClassName(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}}}class tB{match(e){return eI(e)}coerce(e,t){var i,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+tH(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tz{match(e){return e$(e)}coerce(e,t){var i;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}}}class tV{match(e){return ej(e,"PromiseRejectionEvent")||this.isCu
11stomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!eI(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}}coerce(e,t){var i,r=this.getUnhandledRejectionReason(e);return e$(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(i=t.syntheticException)?void 0:i.stack,synthetic:!0}:t.apply(r)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}}var tW=function(e,t){var{debugEnabled:i}=void 0===t?{}:t,r={k:function(t){if(G&&(ei.DEBUG||et.POSTHOG_DEBUG||i)&&!ew(G.console)&&G.console){for(var r=("__rrweb_original__"in G.console[t])?G.console[t].__rrweb_original__:G.console[t],s=arguments.length,n=Array(s>1?s-1:0),a=1;a<s;a++)n[a-1]=arguments[a];r(e,...n)}},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("log",...t)},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("warn",...t)},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];r.k("error",...t)},critical:function(){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];console.error(e,...i)},uninitializedWarning:e=>{r.error("You must initialize PostHog before calling "+e)},createLogger:(t,i)=>tW(e+" "+t,i)};return r},tK=tW("[PostHog.js]"),tY=tK.createLogger,tQ=tY("[ExternalScriptsLoader]"),tX=(e,t,i)=>{if(e.config.disable_external_dependency_loading)return tQ.warn(t+" was requested but loading of external scripts is disabled."),i("Loading of external scripts is disabled");var r=null==Y?void 0:Y.querySelectorAll("script");if(r){for(var s,n=0;n<r.length;n++)if(s=function(){if(r[n].src===t){var e=r[n];return e.__posthog_loading_callback_fired?{v:i()}:(e.addEventListener("load",t=>{e.__posthog_loading_callback_fired=!0,i(void 0,t)}),e.onerror=e=>i(e),{v:void 0})}}())return s.v}var a=()=>{if(!Y)return i("document not found");var r=Y.createElement("script");if(r.type="text/javascript",r.crossOrigin="anonymous",r.src=t,r.onload=e=>{r.__posthog_loading_callback_fired=!0,i(void 0,e)},r.onerror=e=>i(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return i("prepare_external_dependency_script returned null");if("head"===e.config.external_scripts_inject_target)Y.head.appendChild(r);else{var s,n=Y.querySelectorAll("body > script");n.length>0?null==(s=n[0].parentNode)||s.insertBefore(r,n[0]):Y.body.appendChild(r)}};null!=Y&&Y.body?a():null==Y||Y.addEventListener("DOMContentLoaded",a)};et.__PosthogExtensions__=et.__PosthogExtensions__||{},et.__PosthogExtensions__.loadExternalDependency=(e,t,i)=>{var r="/static/"+t+".js?v="+e.version;"remote-config"===t&&(r="/array/"+e.config.token+"/config.js"),"toolbar"===t&&(r=r+"&t="+3e5*Math.floor(Date.now()/3e5));var s=e.requestRouter.endpointFor("assets",r);tX(e,s,i)},et.__PosthogExtensions__.loadSiteApp=(e,t,i)=>{var r=e.requestRouter.endpointFor("api",t);tX(e,r,i)};var tJ={};function tZ(e,t,i){if(e_(e)){if(V&&e.forEach===V)e.forEach(t,i);else if("length"in e&&e.length===+e.length){for(var r=0,s=e.length;r<s;r++)if(r in e&&t.call(i,e[r],r)===tJ)return}}}function t0(e,t,i){if(!eS(e)){if(e_(e))return tZ(e,t,i);if(e instanceof FormData){for(var r of e.entries())if(t.call(i,r[1],r[0])===tJ)return}else for(var s in e)if(ef.call(e,s)&&t.call(i,e[s],s)===tJ)return}}var t1=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return tZ(i,function(t){for(var i in t)void 0!==t[i]&&(e[i]=t[i])}),e},t2=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return tZ(i,function(t){tZ(t,function(t){e.push(t)})}),e};function t3(e){for(var t=Object.keys(e),i=t.length,r=Array(i);i--;)r[i]=[t[i],e[t[i]]];return r}var t5=function(e){try{return e()}catch(e){return}},t4=function(e){return function(){try{for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];return e.apply(this,i)}catch(e){tK.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),tK.critical(e)}}},t8=function(e){var t={};return t0(e,function(e,i){(ex(e)&&e.length>0||eP(e))&&(t[i]=e)}),t},t6=["herokuapp.com","vercel.app","netlify.app"];function t7(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return e[i]}function t9(e,t,i,r){var{capture:s=!1,passive:n=!0}=null!=r?r:{};null==e||e.addEventListener(t,i,{capture:s,passive:n})}function ie(e){return"ph_toolbar_internal"===e.name}var it="$people_distinct_id",ii="__alias",ir="__timers",is="$autocapture_disabled_server_side",ia="$heatmaps_enabled_server_side",io="$exception_capture_enabled_server_side",il="$error_tracking_suppression_rules",iu="$error_tracking_capture_extension_exceptions",ic="$web_vitals_enabled_server_side",ih="$dead_clicks_enabled_server_side",id="$product_tours_enabled_server_side",ip="$web_vitals_allowed_metrics",ig="$session_recording_remote_config",iv="$sesid",i_="$session_is_sampled",im="$enabled_feature_flags",iy="$early_access_features",ib="$feature_flag_details",iw="$stored_person_properties",ix="$stored_group_properties",iE="$surveys",ik="$flag_call_reported",iS="$feature_flag_errors",iP="$feature_flag_evaluated_at",iO="$user_state",iT="$client_session_props",iC="$capture_rate_limit",i$="$initial_campaign_params",ij="$initial_referrer_info",iI="$initial_person_info",iM="$epp",iF="__POSTHOG_TOOLBAR__",iR="$posthog_cookieless",iN=[it,ii,"__cmpns",ir,"$session_recording_enabled_server_side",ia,iv,im,il,iO,iy,ib,ix,iw,iE,ik,iS,iP,iT,iC,i$,ij,iM,iI];Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return eP(e)&&isFinite(e)&&Math.floor(e)===e});var iA="0123456789abcdef";class iL{constructor(e){if(this.bytes=e,16!==e.length)throw TypeError("not 128-bit length")}static fromFieldsV7(e,t,i,r){if(!Number.isInteger(e)||!Number.isInteger(t)||!Number.isInteger(i)||!Number.isInteger(r)||e<0||t<0||i<0||r<0||e>0xffffffffffff||t>4095||i>0x3fffffff||r>0xffffffff)throw RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=e/0x10000000000,s[1]=e/0x100000000,s[2]=e/0x1000000,s[3]=e/65536,s[4]=e/256,s[5]=e,s[6]=112|t>>>8,s[7]=t,s[8]=128|i>>>24,s[9]=i>>>16,s[10]=i>>>8,s[11]=i,s[12]=r>>>24,s[13]=r>>>16,s[14]=r>>>8,s[15]=r,new iL(s)}toString(){for(var e="",t=0;t<this.bytes.length;t++)e=e+iA.charAt(this.bytes[t]>>>4)+iA.charAt(15&this.bytes[t]),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw Error("Invalid UUIDv7 was generated");return e}clone(){return new iL(this.bytes.slice(0))}equals(e){return 0===this.compareTo(e)}compareTo(e){for(var t=0;t<16;t++){var i=this.bytes[t]-e.bytes[t];if(0!==i)return Math.sign(i)}return 0}}class iD{constructor(){this.P=0,this.T=0,this.R=new iH}generate(){var e=this.generateOrAbort();if(ew(e)){this.P=0;var t=this.generateOrAbort();if(ew(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}generateOrAbort(){var e=Date.now();if(e>this.P)this.P=e,this.I();else{if(!(e+1e4>this.P))return;this.T++,this.T>0x3ffffffffff&&(this.P++,this.I())}return iL.fromFieldsV7(this.P,Math.trunc(this.T/0x40000000),0x3fffffff&this.T,this.R.nextUint32())}I(){this.T=1024*this.R.nextUint32()+(1023&this.R.nextUint32())}}var iq,iU=e=>{if("u">typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};G&&!ew(G.crypto)&&crypto.getRandomValues&&(iU=e=>crypto.getRandomValues(e));class iH{constructor(){this.C=new Uint32Array(8),this.O=1/0}nextUint32(){return this.O>=this.C.length&&(iU(this.C),this.O=0),this.C[this.O++]}}var iG=()=>iB().toString(),iB=()=>(iq||(iq=new iD)).generate(),iz="",iV=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,iW={F:()=>!!Y,M:function(e){tK.error("cookieStore error: "+e)}
11,A:function(e){if(Y){try{for(var t=e+"=",i=Y.cookie.split(";").filter(e=>e.length),r=0;r<i.length;r++){for(var s=i[r];" "==s.charAt(0);)s=s.substring(1,s.length);if(0===s.indexOf(t))return decodeURIComponent(s.substring(t.length,s.length))}}catch(e){}return null}},D:function(e){var t;try{t=JSON.parse(iW.A(e))||{}}catch(e){}return t},j:function(e,t,i,r,s){if(Y)try{var n="",a="",o=function(e,t){if(t){var i=function(e,t){if(void 0===t&&(t=Y),iz)return iz;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var i=e.split("."),r=Math.min(i.length,8),s="dmn_chk_"+iG();!iz&&r--;){var n=i.slice(r).join("."),a=s+"=1;domain=."+n+";path=/";t.cookie=a+";max-age=3",t.cookie.includes(s)&&(t.cookie=a+";max-age=0",iz=n)}return iz}(e);if(!i){var r,s=(r=e.match(iV))?r[0]:"";s!==i&&tK.info("Warning: cookie subdomain discovery mismatch",s,i),i=s}return i?"; domain=."+i:""}return""}(Y.location.hostname,r);if(i){var l=new Date;l.setTime(l.getTime()+24*i*36e5),n="; expires="+l.toUTCString()}s&&(a="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+n+"; SameSite=Lax; path=/"+o+a;return u.length>3686.4&&tK.warn("cookieStore warning: large cookie, len="+u.length),Y.cookie=u,u}catch(e){return}},L:function(e,t){if(null!=Y&&Y.cookie)try{iW.j(e,"",-1,t)}catch(e){return}}},iK=null,iY={F:function(){if(!ek(iK))return iK;var e=!0;if(ew(G))e=!1;else try{var t="__mplssupport__";iY.j(t,"xyz"),'"xyz"'!==iY.A(t)&&(e=!1),iY.L(t)}catch(t){e=!1}return e||tK.error("localStorage unsupported; falling back to cookie store"),iK=e,e},M:function(e){tK.error("localStorage error: "+e)},A:function(e){try{return null==G?void 0:G.localStorage.getItem(e)}catch(e){iY.M(e)}return null},D:function(e){try{return JSON.parse(iY.A(e))||{}}catch(e){}return null},j:function(e,t){try{null==G||G.localStorage.setItem(e,JSON.stringify(t))}catch(e){iY.M(e)}},L:function(e){try{null==G||G.localStorage.removeItem(e)}catch(e){iY.M(e)}}},iQ=["$device_id","distinct_id",iv,i_,iM,iI,iO],iX={},iJ={F:function(){return!0},M:function(e){tK.error("memoryStorage error: "+e)},A:function(e){return iX[e]||null},D:function(e){return iX[e]||null},j:function(e,t){iX[e]=t},L:function(e){delete iX[e]}},iZ=null,i0={F:function(){if(!ek(iZ))return iZ;if(iZ=!0,ew(G))iZ=!1;else try{var e="__support__";i0.j(e,"xyz"),'"xyz"'!==i0.A(e)&&(iZ=!1),i0.L(e)}catch(e){iZ=!1}return iZ},M:function(e){tK.error("sessionStorage error: ",e)},A:function(e){try{return null==G?void 0:G.sessionStorage.getItem(e)}catch(e){i0.M(e)}return null},D:function(e){try{return JSON.parse(i0.A(e))||null}catch(e){}return null},j:function(e,t){try{null==G||G.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){i0.M(e)}},L:function(e){try{null==G||G.sessionStorage.removeItem(e)}catch(e){i0.M(e)}}},i1=((n0={})[n0.PENDING=-1]="PENDING",n0[n0.DENIED=0]="DENIED",n0[n0.GRANTED=1]="GRANTED",n0);class i2{constructor(e){this._instance=e}get N(){return this._instance.config}get consent(){return this.U()?i1.DENIED:this.H}isOptedOut(){return"always"===this.N.cookieless_mode||this.consent===i1.DENIED||this.consent===i1.PENDING&&(this.N.opt_out_capturing_by_default||"on_reject"===this.N.cookieless_mode)}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===i1.DENIED}optInOut(e){this.B.j(this.q,+!!e,this.N.cookie_expiration,this.N.cross_subdomain_cookie,this.N.secure_cookie)}reset(){this.B.L(this.q,this.N.cross_subdomain_cookie)}get q(){var{token:e,opt_out_capturing_cookie_prefix:t,consent_persistence_name:i}=this._instance.config;return i||(t?t+e:"__ph_opt_in_out_"+e)}get H(){var e=this.B.A(this.q);return ec(eM,e)?i1.GRANTED:ec(eF,e)?i1.DENIED:i1.PENDING}get B(){if(!this.V){var e=this.N.opt_out_capturing_persistence_type;this.V="localStorage"===e?iY:iW;var t="localStorage"===e?iW:iY;t.A(this.q)&&(this.V.A(this.q)||this.optInOut(ec(eM,t.A(this.q))),t.L(this.q,this.N.cross_subdomain_cookie))}return this.V}U(){return!!this.N.respect_dnt&&!!t7([null==K?void 0:K.doNotTrack,null==K?void 0:K.msDoNotTrack,et.doNotTrack],e=>ec(eM,e))}}var i3=tY("[Dead Clicks]"),i5=()=>!0,i4=e=>{var t,i=!(null==(t=e.instance.persistence)||!t.get_property(ih)),r=e.instance.config.capture_dead_clicks;return eT(r)?r:!!ey(r)||i};class i8{get lazyLoadedDeadClicksAutocapture(){return this.W}constructor(e,t,i){this.instance=e,this.isEnabled=t,this.onCapture=i,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[ih]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.G(()=>{this.Y()}):this.stop()}G(e){var t,i;null!=(t=et.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(i=et.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this.instance,"dead-clicks-autocapture",t=>{t?i3.error("failed to load script",t):e()})}Y(){var e;if(Y){if(!this.W&&null!=(e=et.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=ey(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this.W=et.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this.W.start(Y),i3.info("starting...")}}else i3.error("`document` not found. Cannot start.")}stop(){this.W&&(this.W.stop(),this.W=void 0,i3.info("stopping..."))}}var i6=tY("[SegmentIntegration]"),i7="posthog-js";function i9(e,t){var{organization:i,projectId:r,prefix:s,severityAllowList:n=["error"],sendExceptionsToPostHog:a=!0}=void 0===t?{}:t;return t=>{if(!("*"===n||n.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var o=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/pers
11on/"+e.get_distinct_id());t.tags["PostHog Person URL"]=o,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var l,u,c,h,d,p,g=(null==(l=t.exception)?void 0:l.values)||[],f=g.map(e=>en({},e,{stacktrace:e.stacktrace?en({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map(e=>en({},e,{platform:"web:javascript"}))}):void 0})),v={$exception_message:(null==(u=g[0])?void 0:u.value)||t.message,$exception_type:null==(c=g[0])?void 0:c.type,$exception_level:t.level,$exception_list:f,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(h=g[0])?void 0:h.value)||t.message,$sentry_exception_type:null==(d=g[0])?void 0:d.type,$sentry_tags:t.tags};return i&&r&&(v.$sentry_url=(s||"https://sentry.io/organizations/")+i+"/issues/?project="+r+"&query="+t.event_id),a&&(null==(p=e.exceptions)||p.sendExceptionEvent(v)),t}}class re{constructor(e,t,i,r,s,n){this.name=i7,this.setupOnce=function(a){a(i9(e,{organization:t,projectId:i,prefix:r,severityAllowList:s,sendExceptionsToPostHog:null==n||n}))}}}class rt{constructor(e){this.J=(e,t,i)=>{i&&(i.noSessionId||i.activityTimeout||i.sessionPastMaximumLength)&&(tK.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:i}),this.K=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.X()}X(){var e;this.Z=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this.J)}destroy(){var e;null==(e=this.Z)||e.call(this),this.Z=void 0}doPageView(e,t){var i,r=this.tt(e,t);return this.K={pathname:null!=(i=null==G?void 0:G.location.pathname)?i:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r}doPageLeave(e){var t;return this.tt(e,null==(t=this.K)?void 0:t.pageViewId)}doEvent(){var e;return{$pageview_id:null==(e=this.K)?void 0:e.pageViewId}}tt(e,t){var i=this.K;if(!i)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:i.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:n,lastScrollY:a,maxScrollY:o,maxContentHeight:l,lastContentY:u,maxContentY:c}=s;if(!(ew(n)||ew(a)||ew(o)||ew(l)||ew(u)||ew(c))){n=Math.ceil(n),a=Math.ceil(a),o=Math.ceil(o),l=Math.ceil(l),u=Math.ceil(u),c=Math.ceil(c);var h=n<=1?1:eR(a/n,0,1,tK),d=n<=1?1:eR(o/n,0,1,tK),p=l<=1?1:eR(u/l,0,1,tK),g=l<=1?1:eR(c/l,0,1,tK);r=t1(r,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:h,$prev_pageview_max_scroll:o,$prev_pageview_max_scroll_percentage:d,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:g})}}return i.pathname&&(r.$prev_pageview_pathname=i.pathname),i.timestamp&&(r.$prev_pageview_duration=(e.getTime()-i.timestamp.getTime())/1e3),r}}var ri=e=>{var t=null==Y?void 0:Y.createElement("a");return ew(t)?null:(t.href=e,t)},rr=function(e,t){void 0===t&&(t="&");var i,r,s=[];return t0(e,function(e,t){ew(e)||ew(t)||"undefined"===t||(i=encodeURIComponent(e instanceof File?e.name:e.toString()),r=encodeURIComponent(t),s[s.length]=r+"="+i)}),s.join(t)},rs=function(e,t){for(var i,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<r.length;s++){var n=r[s].split("=");if(n[0]===t){i=n;break}}if(!e_(i)||i.length<2)return"";var a=i[1];try{a=decodeURIComponent(a)}catch(e){tK.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},rn=function(e,t,i){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[0]||"",n=r[1],a=s.split("?"),o=a[1],l=a[0],u=(o||"").split("&"),c=[],h=0;h<u.length;h++){var d=u[h].split("=");e_(d)&&(t.includes(d[0])?c.push(d[0]+"="+i):c.push(u[h]))}var p=l;return null!=o&&(p+="?"+c.join("&")),null!=n&&(p+="#"+n),p},ra=function(e,t){var i=e.match(RegExp(t+"=([^&]*)"));return i?i[1]:null},ro="https?://(.*)",rl=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],ru=t2(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],rl),rc="<masked>",rh=["li_fat_id"];function rd(e,t,i){if(!Y)return{};var r,s=t?t2([],rl,i||[]):[],n=rp(rn(Y.URL,s,rc),e);return t1((r={},t0(rh,function(e){var t=iW.A(e);r[e]=t||null}),r),n)}function rp(e,t){var i=ru.concat(t||[]),r={};return t0(i,function(t){var i=rs(e,t);r[t]=i||null}),r}function rg(e){var t=e?0===e.search(ro+"google.([^/?]*)")?"google":0===e.search(ro+"bing.com")?"bing":0===e.search(ro+"yahoo.com")?"yahoo":0===e.search(ro+"duckduckgo.com")?"duckduckgo":null:null,i={};if(!ek(t)){i.$search_engine=t;var r=Y?rs(Y.referrer,"yahoo"!=t?"q":"p"):"";r.length&&(i.ph_keyword=r)}return i}function rf(){return navigator.language||navigator.userLanguage}function rv(){return(null==Y?void 0:Y.referrer)||"$direct"}function r_(e,t){var i=e?t2([],rl,t||[]):[],r=null==Q?void 0:Q.href.substring(0,1e3);return{r:rv().substring(0,1e3),u:r?rn(r,i,rc):void 0}}function rm(e){var t,{r:i,u:r}=e,s={$referrer:i,$referring_domain:null==i?void 0:"$direct"==i?"$direct":null==(t=ri(i))?void 0:t.host};
11if(r){s.$current_url=r;var n=ri(r);s.$host=null==n?void 0:n.host,s.$pathname=null==n?void 0:n.pathname,t1(s,rp(r))}return i&&t1(s,rg(i)),s}function ry(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}var rb=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class rw{constructor(e,t){this.N=e,this.props={},this.it=!1,this.et=(e=>{var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"})(e),this.B=this.rt(e),this.load(),e.debug&&tK.info("Persistence loaded",e.persistence,en({},this.props)),this.update_config(e,e,t),this.save()}isDisabled(){return!!this.st}rt(e){-1===rb.indexOf(e.persistence.toLowerCase())&&(tK.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t,i,r=(void 0===(t=e.cookie_persisted_properties||[])&&(t=[]),i=[...iQ,...t],en({},iY,{D:function(e){try{var t={};try{t=iW.D(e)||{}}catch(e){}var i=t1(t,JSON.parse(iY.A(e)||"{}"));return iY.j(e,i),i}catch(e){}return null},j:function(e,t,r,s,n,a){try{iY.j(e,t,void 0,void 0,a);var o={};i.forEach(e=>{t[e]&&(o[e]=t[e])}),Object.keys(o).length&&iW.j(e,o,r,s,n,a)}catch(e){iY.M(e)}},L:function(e,t){try{null==G||G.localStorage.removeItem(e),iW.L(e,t)}catch(e){iY.M(e)}}})),s=e.persistence.toLowerCase();return"localstorage"===s&&iY.F()?iY:"localstorage+cookie"===s&&r.F()?r:"sessionstorage"===s&&i0.F()?i0:"memory"===s?iJ:"cookie"===s?iW:r.F()?r:iW}nt(e){var t=null!=e?e:this.N.feature_flag_cache_ttl_ms;if(!t||t<=0)return!1;var i=this.props[iP];return!i||"number"!=typeof i||Date.now()-i>t}properties(){var e={};return t0(this.props,(t,i)=>{if(i===im&&ey(t)){if(!this.nt())for(var r,s=Object.keys(t),n=0;n<s.length;n++)e["$feature/"+s[n]]=t[s[n]]}else r=!1,(ek(iN)?r:W&&iN.indexOf===W?-1!=iN.indexOf(i):(t0(iN,function(e){if(r||(r=e===i))return tJ}),r))||(e[i]=t)}),e}load(){if(!this.st){var e=this.B.D(this.et);e&&(this.props=t1({},e))}}save(){this.st||this.B.j(this.et,this.props,this.ot,this.ut,this.ht,this.N.debug)}remove(){this.B.L(this.et,!1),this.B.L(this.et,!0)}clear(){this.remove(),this.props={}}register_once(e,t,i){if(ey(e)){ew(t)&&(t="None"),this.ot=ew(i)?this.dt:i;var r=!1;if(t0(e,(e,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==t||(this.props[i]=e,r=!0)}),r)return this.save(),!0}return!1}register(e,t){if(ey(e)){this.ot=ew(t)?this.dt:t;var i=!1;if(t0(e,(t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.props[r]=t,i=!0)}),i)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.it){var e=rd(this.N.custom_campaign_params,this.N.mask_personal_data_properties,this.N.custom_personal_data_properties);eb(t8(e))||this.register(e),this.it=!0}}update_search_keyword(){var e;this.register((e=null==Y?void 0:Y.referrer)?rg(e):{})}update_referrer_info(){var e;this.register_once({$referrer:rv(),$referring_domain:null!=Y&&Y.referrer&&(null==(e=ri(Y.referrer))?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[i$]||this.props[ij]||this.register_once({[iI]:r_(this.N.mask_personal_data_properties,this.N.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};t0([ij,i$],t=>{var i=this.props[t];i&&t0(i,function(t,i){e["$initial_"+ed(i)]=t})});var t,i,r=this.props[iI];return r&&t1(e,(t=rm(r),i={},t0(t,function(e,t){i["$initial_"+ed(t)]=e}),i)),e}safe_merge(e){return t0(this.props,function(t,i){i in e||(e[i]=t)}),e}update_config(e,t,i){if(this.dt=this.ot=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!i),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!((e,t)=>{if(e.length!==t.length)return!1;var i=[...e].sort(),r=[...t].sort();return i.every((e,t)=>e===r[t])})(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this.rt(e),s=this.props;this.clear(),this.B=r,this.props=s,this.save()}}set_disabled(e){this.st=e,this.st?this.remove():this.save()}set_cross_subdomain(e){e!==this.ut&&(this.ut=e,this.remove(),this.save())}set_secure(e){e!==this.ht&&(this.ht=e,this.remove(),this.save())}set_event_timer(e,t){var i=this.props[ir]||{};i[e]=t,this.props[ir]=i,this.save()}remove_event_timer(e){var t=(this.props[ir]||{})[e];return ew(t)||(delete this.props[ir][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}}var rx="events",rE="cancelEvents",rk="survey shown",rS="survey sent",rP="popover",rO=((n1={}
11).SHOWN="product tour shown",n1.DISMISSED="product tour dismissed",n1.COMPLETED="product tour completed",n1.STEP_SHOWN="product tour step shown",n1.STEP_COMPLETED="product tour step completed",n1.BUTTON_CLICKED="product tour button clicked",n1.STEP_SELECTOR_FAILED="product tour step selector failed",n1.BANNER_CONTAINER_SELECTOR_FAILED="product tour banner container selector failed",n1.BANNER_ACTION_CLICKED="product tour banner action clicked",n1),rT=((n2={}).TOUR_ID="$product_tour_id",n2.TOUR_NAME="$product_tour_name",n2.TOUR_ITERATION="$product_tour_iteration",n2.TOUR_RENDER_REASON="$product_tour_render_reason",n2.TOUR_STEP_ID="$product_tour_step_id",n2.TOUR_STEP_ORDER="$product_tour_step_order",n2.TOUR_STEP_TYPE="$product_tour_step_type",n2.TOUR_DISMISS_REASON="$product_tour_dismiss_reason",n2.TOUR_BUTTON_TEXT="$product_tour_button_text",n2.TOUR_BUTTON_ACTION="$product_tour_button_action",n2.TOUR_BUTTON_LINK="$product_tour_button_link",n2.TOUR_BUTTON_TOUR_ID="$product_tour_button_tour_id",n2.TOUR_STEPS_COUNT="$product_tour_steps_count",n2.TOUR_STEP_SELECTOR="$product_tour_step_selector",n2.TOUR_STEP_SELECTOR_FOUND="$product_tour_step_selector_found",n2.TOUR_STEP_ELEMENT_TAG="$product_tour_step_element_tag",n2.TOUR_STEP_ELEMENT_ID="$product_tour_step_element_id",n2.TOUR_STEP_ELEMENT_CLASSES="$product_tour_step_element_classes",n2.TOUR_STEP_ELEMENT_TEXT="$product_tour_step_element_text",n2.TOUR_ERROR="$product_tour_error",n2.TOUR_MATCHES_COUNT="$product_tour_matches_count",n2.TOUR_FAILURE_PHASE="$product_tour_failure_phase",n2.TOUR_WAITED_FOR_ELEMENT="$product_tour_waited_for_element",n2.TOUR_WAIT_DURATION_MS="$product_tour_wait_duration_ms",n2.TOUR_BANNER_SELECTOR="$product_tour_banner_selector",n2.TOUR_LINKED_SURVEY_ID="$product_tour_linked_survey_id",n2.USE_MANUAL_SELECTOR="$use_manual_selector",n2.INFERENCE_DATA_PRESENT="$inference_data_present",n2.TOUR_LAST_SEEN_DATE="$product_tour_last_seen_date",n2.TOUR_TYPE="$product_tour_type",n2),rC=tY("[RateLimiter]");class r${constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(e=>{rC.info((e||"events")+" is quota limited."),this.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void rC.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:t})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){void 0===e&&(e=!1);var t,i,r,{captureEventsBurstLimit:s,captureEventsPerSecond:n}=this,a=(new Date).getTime(),o=null!=(t=null==(i=this.instance.persistence)?void 0:i.get_property(iC))?t:{tokens:s,last:a};o.tokens+=(a-o.last)/1e3*n,o.last=a,o.tokens>s&&(o.tokens=s);var l=o.tokens<1;return l||e||(o.tokens=Math.max(0,o.tokens-1)),!l||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+n+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=l,null==(r=this.instance.persistence)||r.set_property(iC,o),{isRateLimited:l,remainingTokens:o.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}var rj=tY("[RemoteConfig]");class rI{constructor(e){this._instance=e}get remoteConfig(){var e;return null==(e=et._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}vt(e){var t,i;null!=(t=et.__PosthogExtensions__)&&t.loadExternalDependency?null==(i=et.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}ct(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:t=>{e(t.json)}})}load(){try{if(this.remoteConfig)return rj.info("Using preloaded remote config",this.remoteConfig),this.ft(this.remoteConfig),void this._t();if(this._instance.bt())return void rj.warn("Remote config is disabled. Falling back to local config.");this.vt(e=>{e?(this.ft(e),this._t()):(rj.info("No config found after loading remote JS config. Falling back to JSON."),this.ct(e=>{this.ft(e),this._t()}))})}catch(e){rj.error("Error loading remote config",e)}}stop(){this.yt&&(clearInterval(this.yt),this.yt=void 0)}refresh(){this._instance.bt()||"hidden"===(null==Y?void 0:Y.visibilityState)||this._instance.reloadFeatureFlags()}_t(){var e;if(!this.yt){var t=null!=(e=this._instance.config.remote_config_refresh_interval_ms)?e:3e5;0!==t&&(this.yt=setInterval(()=>{this.refresh()},t))}}ft(e){var t;e||rj.error("Failed to fetch remote config from PostHog."),this._instance.ft(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())}}var rM=((n3={}).GZipJS="gzip-js",n3.Base64="base64",n3),rF=Uint8Array,rR=Uint16Array,rN=Uint32Array,rA=new rF([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),r
vendor: 4,736 bytes, line 11
11L=new rF([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rD=new rF([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rq=function(e,t){for(var i=new rR(31),r=0;r<31;++r)i[r]=t+=1<<e[r-1];var s=new rN(i[30]);for(r=1;r<30;++r)for(var n=i[r];n<i[r+1];++n)s[n]=n-i[r]<<5|r;return[i,s]},rU=rq(rA,2),rH=rU[0],rG=rU[1];rH[28]=258,rG[258]=28;for(var rB=rq(rL,0)[1],rz=new rR(32768),rV=0;rV<32768;++rV){var rW=(43690&rV)>>>1|(21845&rV)<<1;rW=(61680&(rW=(52428&rW)>>>2|(13107&rW)<<2))>>>4|(3855&rW)<<4,rz[rV]=((65280&rW)>>>8|(255&rW)<<8)>>>1}var rK=function(e,t,i){for(var r=e.length,s=0,n=new rR(t);s<r;++s)++n[e[s]-1];var a,o=new rR(t);for(s=0;s<t;++s)o[s]=o[s-1]+n[s-1]<<1;if(i){a=new rR(1<<t);var l=15-t;for(s=0;s<r;++s)if(e[s])for(var u=s<<4|e[s],c=t-e[s],h=o[e[s]-1]++<<c,d=h|(1<<c)-1;h<=d;++h)a[rz[h]>>>l]=u}else for(a=new rR(r),s=0;s<r;++s)a[s]=rz[o[e[s]-1]++]>>>15-e[s];return a},rY=new rF(288);for(rV=0;rV<144;++rV)rY[rV]=8;for(rV=144;rV<256;++rV)rY[rV]=9;for(rV=256;rV<280;++rV)rY[rV]=7;for(rV=280;rV<288;++rV)rY[rV]=8;var rQ=new rF(32);for(rV=0;rV<32;++rV)rQ[rV]=5;var rX=rK(rY,9,0),rJ=rK(rQ,5,0),rZ=function(e){return(e/8|0)+(7&e&&1)},r0=function(e,t,i){(null==i||i>e.length)&&(i=e.length);var r=new(e instanceof rR?rR:e instanceof rN?rN:rF)(i-t);return r.set(e.subarray(t,i)),r},r1=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>>8},r2=function(e,t,i){i<<=7&t;var r=t/8|0;e[r]|=i,e[r+1]|=i>>>8,e[r+2]|=i>>>16},r3=function(e,t){for(var i=[],r=0;r<e.length;++r)e[r]&&i.push({s:r,f:e[r]});var s=i.length,n=i.slice();if(!s)return[new rF(0),0];if(1==s){var a=new rF(i[0].s+1);return a[i[0].s]=1,[a,1]}i.sort(function(e,t){return e.f-t.f}),i.push({s:-1,f:25001});var o=i[0],l=i[1],u=0,c=1,h=2;for(i[0]={s:-1,f:o.f+l.f,l:o,r:l};c!=s-1;)o=i[i[u].f<i[h].f?u++:h++],l=i[u!=c&&i[u].f<i[h].f?u++:h++],i[c++]={s:-1,f:o.f+l.f,l:o,r:l};var d=n[0].s;for(r=1;r<s;++r)n[r].s>d&&(d=n[r].s);var p=new rR(d+1),g=r5(i[c-1],p,0);if(g>t){r=0;var f=0,v=g-t,_=1<<v;for(n.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<s;++r){var m=n[r].s;if(!(p[m]>t))break;f+=_-(1<<g-p[m]),p[m]=t}for(f>>>=v;f>0;){var y=n[r].s;p[y]<t?f-=1<<t-p[y]++-1:++r}for(;r>=0&&f;--r){var b=n[r].s;p[b]==t&&(--p[b],++f)}g=t}return[new rF(p),g]},r5=function(e,t,i){return -1==e.s?Math.max(r5(e.l,t,i+1),r5(e.r,t,i+1)):t[e.s]=i},r4=function(e){for(var t=e.length;t&&!e[--t];);for(var i=new rR(++t),r=0,s=e[0],n=1,a=function(e){i[r++]=e},o=1;o<=t;++o)if(e[o]==s&&o!=t)++n;else{if(!s&&n>2){for(;n>138;n-=138)a(32754);n>2&&(a(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(a(s),--n;n>6;n-=6)a(8304);n>2&&(a(n-3<<5|8208),n=0)}for(;n--;)a(s);n=1,s=e[o]}return[i.subarray(0,r),t]},r8=function(e,t){for(var i=0,r=0;r<t.length;++r)i+=e[r]*t[r];return i},r6=function(e,t,i){var r=i.length,s=rZ(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var n=0;n<r;++n)e[s+n+4]=i[n];return 8*(s+4+r)},r7=function(e,t,i,r,s,n,a,o,l,u,c){r1(t,c++,i),++s[256];for(var h=r3(s,15),d=h[0],p=h[1],g=r3(n,15),f=g[0],v=g[1],_=r4(d),m=_[0],y=_[1],b=r4(f),w=b[0],x=b[1],E=new rR(19),k=0;k<m.length;++k)E[31&m[k]]++;for(k=0;k<w.length;++k)E[31&w[k]]++;for(var S=r3(E,7),P=S[0],O=S[1],T=19;T>4&&!P[rD[T-1]];--T);var C,$,j,I,M=u+5<<3,F=r8(s,rY)+r8(n,rQ)+a,R=r8(s,d)+r8(n,f)+a+14+3*T+r8(E,P)+(2*E[16]+3*E[17]+7*E[18]);if(M<=F&&M<=R)return r6(t,c,e.subarray(l,l+u));if(r1(t,c,1+(R<F)),c+=2,R<F){C=rK(d,p,0),$=d,j=rK(f,v,0),I=f;var N=rK(P,O,0);for(r1(t,c,y-257),r1(t,c+5,x-1),r1(t,c+10,T-4),c+=14,k=0;k<T;++k)r1(t,c+3*k,P[rD[k]]);c+=3*T;for(var A=[m,w],L=0;L<2;++L){var D=A[L];for(k=0;k<D.length;++k){var q=31&D[k];r1(t,c,N[q]),c+=P[q],q>15&&(r1(t,c,D[k]>>>5&127),c+=D[k]>>>12)}}}else C=rX,$=rY,j=rJ,I=rQ;for(k=0;k<o;++k)if(r[k]>255){r2(t,c,C[(q=r[k]>>>18&31)+257]),c+=$[q+257],q>7&&(r1(t,c,r[k]>>>23&31),c+=rA[q]);var U=31&r[k];r2(t,c,j[U]),c+=I[U],U>3&&(r2(t,c,r[k]>>>5&8191),c+=rL[U])}else r2(t,c,C[r[k]]),c+=$[r[k]];return r2(t,c,C[256]),c+$[256]},r9=new rN([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),se=function(){for(var e=new rN(256),t=0;t<256;++t){for(var i=t,r=9;--r;)i=(1&i&&0xedb88320)^i>>>1;e[t]=i}return e}(),st=function(e,t,i){for(;i;++t)e[t]=i,i>>>=8},si=function(e){var t,i,r,s,n="";for(t=i=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,s=0;s<r;s++){var a=e.charCodeAt(s),o=null;a<128?i++:o=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),ek(o)||(i>t&&(n+=e.substring(t,i)),n+=o,t=i=s+1)}return i>t&&(n+=e.substring(t,e.length)),n},sr=!!J||!!X,ss=function(e,t,i){void 0===i&&(i=!0);var r,[s,n]=e.split("?"),a=en({},t),o=null!=(r=null==n?void 0:n.split("&").map(e=>{var t,[r,s]=e.split("="),n=i&&null!=(t=a[r])?t:s;return delete a[r],r+"="+n}
11))?r:[],l=rr(a);return l&&o.push(l),s+"?"+o.join("&")},sn=(e,t)=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t,t),sa=e=>{var{data:t,compression:i}=e;if(t){if(i===rM.GZipJS){var r,s,n,a,o,l,u,c,h=(r=function(e,t){var i=e.length;if("u">typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new rF(e.length+(e.length>>>1)),s=0,n=function(e){r[s++]=e},a=0;a<i;++a){if(s+5>r.length){var o=new rF(s+8+(i-a<<1));o.set(r),r=o}var l=e.charCodeAt(a);l<128?n(l):(l<2048?n(192|l>>>6):(l>55295&&l<57344?(n(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++a))>>>18),n(128|l>>>12&63)):n(224|l>>>12),n(128|l>>>6&63)),n(128|63&l))}return r0(r,0,s)}(sn(t)),s={mtime:0},n=0xffffffff,a={p:function(e){for(var t=n,i=0;i<e.length;++i)t=se[255&t^e[i]]^t>>>8;n=t},d:function(){return 0xffffffff^n}},o=r.length,a.p(r),c=(l=10+(s.filename&&s.filename.length+1||0),u=function(e,t,i,r,s,n){var a=e.length,o=new rF(r+a+5*(1+Math.floor(a/7e3))+8),l=o.subarray(r,o.length-8),u=0;if(!t||a<8)for(var c=0;c<=a;c+=65535){var h=c+65535;h<a?u=r6(l,u,e.subarray(c,h)):(l[c]=n,u=r6(l,u,e.subarray(c,a)))}else{for(var d=r9[t-1],p=d>>>13,g=8191&d,f=(1<<i)-1,v=new rR(32768),_=new rR(f+1),m=Math.ceil(i/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&f},w=new rN(25e3),x=new rR(288),E=new rR(32),k=0,S=0,P=(c=0,0),O=0,T=0;c<a;++c){var C=b(c),$=32767&c,j=_[C];if(v[$]=j,_[C]=$,O<=c){var I=a-c;if((k>7e3||P>24576)&&I>423){u=r7(e,l,0,w,x,E,S,P,T,c-T,u),P=k=S=0,T=c;for(var M=0;M<286;++M)x[M]=0;for(M=0;M<30;++M)E[M]=0}var F=2,R=0,N=g,A=$-j&32767;if(I>2&&C==b(c-A))for(var L=Math.min(p,I)-1,D=Math.min(32767,c),q=Math.min(258,I);A<=D&&--N&&$!=j;){if(e[c+F]==e[c+F-A]){for(var U=0;U<q&&e[c+U]==e[c+U-A];++U);if(U>F){if(F=U,R=A,U>L)break;var H=Math.min(A,U-2),G=0;for(M=0;M<H;++M){var B=c-A+M+32768&32767,z=B-v[B]+32768&32767;z>G&&(G=z,j=B)}}}A+=($=j)-(j=v[$])+32768&32767}if(R){w[P++]=0x10000000|rG[F]<<18|rB[R];var V=31&rG[F],W=31&rB[R];S+=rA[V]+rL[W],++x[257+V],++E[W],O=c+F,++k}else w[P++]=e[c],++x[e[c]]}}u=r7(e,l,n,w,x,E,S,P,T,c-T,u)}return r0(o,0,r+rZ(u)+8)}(r,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+s.mem,l,8,!0)).length,function(e,t){var i=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:2*(9==t.level),e[9]=3,0!=t.mtime&&st(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),i){e[3]=8;for(var r=0;r<=i.length;++r)e[r+10]=i.charCodeAt(r)}}(u,s),st(u,c-8,a.d()),st(u,c-4,o),u);return{contentType:"text/plain",body:h.buffer.slice(h.byteOffset,h.byteOffset+h.byteLength),estimatedSize:h.byteLength}}if(i===rM.Base64){let e;var d="data="+encodeURIComponent("string"==typeof(e=function(e){var t,i,r,s,n,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=0,l=0,u="",c=[];if(!e)return e;e=si(e);do t=(n=e.charCodeAt(o++)<<16|e.charCodeAt(o++)<<8|e.charCodeAt(o++))>>18&63,i=n>>12&63,r=n>>6&63,s=63&n,c[l++]=a.charAt(t)+a.charAt(i)+a.charAt(r)+a.charAt(s);while(o<e.length)switch(u=c.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u}(sn(t)))?e:sn(e));return{contentType:"application/x-www-form-urlencoded",body:d,estimatedSize:new Blob([d]).size}}var p=sn(t);return{contentType:"application/json",body:p,estimatedSize:new Blob([p]).size}}},so=[];X&&so.push({transport:"fetch",method:e=>{var t,i,{contentType:r,body:s,estimatedSize:n}=null!=(t=sa(e))?t:{},a=new Headers;t0(e.headers,function(e,t){a.append(t,e)}),r&&a.append("Content-Type",r);var o=e.url,l=null;if(Z){var u=new Z;l={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}X(o,en({method:(null==e?void 0:e.method)||"GET",headers:a,keepalive:"POST"===e.method&&52428.8>(n||0),body:s,signal:null==(i=l)?void 0:i.signal},e.fetchOptions)).then(t=>t.text().then(i=>{var r={statusCode:t.status,text:i};if(200===t.status)try{r.json=JSON.parse(i)}catch(e){tK.error(e)}null==e.callback||e.callback(r)})).catch(t=>{tK.error(t),null==e.callback||e.callback({statusCode:0,error:t})}).finally(()=>l?clearTimeout(l.timeout):null)}}),J&&so.push({transport:"XHR",method:e=>{var t,i=new J;i.open(e.method||"GET",e.url,!0);var{contentType:r,body:s}=null!=(t=sa(e))?t:{};t0(e.headers,function(e,t){i.setRequestHeader(t,e)}),r&&i.setRequestHeader("Content-Type",r),e.timeout&&(i.timeout=e.timeout),e.disableXHRCredentials||(i.withCredentials=!0),i.onreadystatechange=()=>{if(4===i.readyState){var t={statusCode:i.status,text:i.responseText};
11if(200===i.status)try{t.json=JSON.parse(i.responseText)}catch(e){}null==e.callback||e.callback(t)}},i.send(s)}}),null!=K&&K.sendBeacon&&so.push({transport:"sendBeacon",method:e=>{var t=ss(e.url,{beacon:"1"});try{var i,{contentType:r,body:s}=null!=(i=sa(e))?i:{},n="string"==typeof s?new Blob([s],{type:r}):s;K.sendBeacon(t,n)}catch(e){}}});class sl{constructor(e,t){this.wt=!0,this.Et=[],this.xt=eR((null==t?void 0:t.flush_interval_ms)||3e3,250,5e3,tK.createLogger("flush interval"),3e3),this.St=e}enqueue(e){this.Et.push(e),this.$t||this.kt()}unload(){this.Pt();var e=Object.values(this.Et.length>0?this.Tt():{});[...e.filter(e=>0===e.url.indexOf("/e")),...e.filter(e=>0!==e.url.indexOf("/e"))].map(e=>{this.St(en({},e,{transport:"sendBeacon"}))})}enable(){this.wt=!1,this.kt()}kt(){var e=this;this.wt||(this.$t=setTimeout(()=>{if(this.Pt(),this.Et.length>0){var t=this.Tt();for(var i in t)!function(){var r=t[i],s=(new Date).getTime();r.data&&e_(r.data)&&t0(r.data,e=>{e.offset=Math.abs(e.timestamp-s),delete e.timestamp}),e.St(r)}()}},this.xt))}Pt(){clearTimeout(this.$t),this.$t=void 0}Tt(){var e={};return t0(this.Et,t=>{var i,r=(t?t.batchKey:null)||t.url;ew(e[r])&&(e[r]=en({},t,{data:[]})),null==(i=e[r].data)||i.push(t.data)}),this.Et=[],e}}var su=["retriesPerformedSoFar"];class sc{constructor(e){this.Rt=!1,this.It=3e3,this.Et=[],this._instance=e,this.Et=[],this.Ct=!0,!ew(G)&&"onLine"in G.navigator&&(this.Ct=G.navigator.onLine,this.Ot=()=>{this.Ct=!0,this.Ft()},this.Mt=()=>{this.Ct=!1},t9(G,"online",this.Ot),t9(G,"offline",this.Mt))}get length(){return this.Et.length}retriableRequest(e){var{retriesPerformedSoFar:t}=e,i=ea(e,su);eO(t)&&(i.url=ss(i.url,{retry_count:t})),this._instance._send_request(en({},i,{callback:e=>{200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=t?t:0)<10?this.At(en({retriesPerformedSoFar:t},i)):null==i.callback||i.callback(e)}}))}At(e){var t,i,r,s=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=s+1;var n=(r=(Math.random()-.5)*((i=Math.min(18e5,t=3e3*Math.pow(2,s)))-t/2),Math.ceil(i+r)),a=Date.now()+n;this.Et.push({retryAt:a,requestOptions:e});var o="Enqueued failed request for retry in "+n;navigator.onLine||(o+=" (Browser is offline)"),tK.warn(o),this.Rt||(this.Rt=!0,this.Dt())}Dt(){(this.jt&&clearTimeout(this.jt),0===this.Et.length)?(this.Rt=!1,this.jt=void 0):this.jt=setTimeout(()=>{this.Ct&&this.Et.length>0&&this.Ft(),this.Dt()},this.It)}Ft(){var e=Date.now(),t=[],i=this.Et.filter(i=>i.retryAt<e||(t.push(i),!1));if(this.Et=t,i.length>0)for(var{requestOptions:r}of i)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.jt&&(clearTimeout(this.jt),this.jt=void 0),this.Rt=!1,ew(G)||(this.Ot&&(G.removeEventListener("online",this.Ot),this.Ot=void 0),this.Mt&&(G.removeEventListener("offline",this.Mt),this.Mt=void 0)),this.Et))try{this._instance._send_request(en({},e,{transport:"sendBeacon"}))}catch(e){tK.error(e)}this.Et=[]}}class sh{constructor(e){this.Lt=()=>{this.Nt||(this.Nt={});var e,t,i,r,s=this.scrollElement(),n=this.scrollY(),a=s?Math.max(0,s.scrollHeight-s.clientHeight):0,o=n+((null==s?void 0:s.clientHeight)||0),l=(null==s?void 0:s.scrollHeight)||0;this.Nt.lastScrollY=Math.ceil(n),this.Nt.maxScrollY=Math.max(n,null!=(e=this.Nt.maxScrollY)?e:0),this.Nt.maxScrollHeight=Math.max(a,null!=(t=this.Nt.maxScrollHeight)?t:0),this.Nt.lastContentY=o,this.Nt.maxContentY=Math.max(o,null!=(i=this.Nt.maxContentY)?i:0),this.Nt.maxContentHeight=Math.max(l,null!=(r=this.Nt.maxContentHeight)?r:0)},this._instance=e}getContext(){return this.Nt}resetContext(){var e=this.Nt;return setTimeout(this.Lt,0),e}startMeasuringScrollPosition(){t9(G,"scroll",this.Lt,{capture:!0}),t9(G,"scrollend",this.Lt,{capture:!0}),t9(G,"resize",this.Lt)}scrollElement(){if(!this._instance.config.scroll_root_selector)return null==G?void 0:G.document.documentElement;for(var e of e_(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector]){var t=null==G?void 0:G.document.querySelector(e);if(t)return t}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return G&&(G.scrollY||G.pageYOffset||G.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return G&&(G.scrollX||G.pageXOffset||G.document.documentElement.scrollLeft)||0}}var sd=e=>r_(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties);class sp{constructor(e,t,i,r){this.Ut=e=>{var t=this.zt();if(!t||t.sessionId!==e){var i={sessionId:e,props:this.Ht(this._instance)};this.Bt.register({[iT]:i})}},this._instance=e,this.qt=t,this.Bt=i,this.Ht=r||sd,this.qt.onSessionId(this.Ut)}zt(){return this.Bt.props[iT]}
11getSetOnceProps(){var e,t=null==(e=this.zt())?void 0:e.props;return t?"r"in t?rm(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}}getSessionProps(){var e={};return t0(t8(this.getSetOnceProps()),(t,i)=>{"$current_url"===i&&(i="url"),e["$session_entry_"+ed(i)]=t}),e}}class sg{constructor(){this.Vt={},this.Vt={}}on(e,t){return this.Vt[e]||(this.Vt[e]=[]),this.Vt[e].push(t),()=>{this.Vt[e]=this.Vt[e].filter(e=>e!==t)}}emit(e,t){for(var i of this.Vt[e]||[])i(t);for(var r of this.Vt["*"]||[])r(e,t)}}var sf=tY("[SessionId]");class sv{on(e,t){return this.Wt.on(e,t)}constructor(e,t,i){if(this.Gt=[],this.Yt=void 0,this.Wt=new sg,this.Jt=(e,t)=>!(!eO(e)||!eO(t))&&Math.abs(e-t)>this.sessionTimeoutMs,!e.persistence)throw Error("SessionIdManager requires a PostHogPersistence instance");if("always"===e.config.cookieless_mode)throw Error('SessionIdManager cannot be used with cookieless_mode="always"');this.N=e.config,this.Bt=e.persistence,this.Kt=void 0,this.Xt=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Qt=t||iG,this.Zt=i||iG;var r,s=this.N.persistence_name||this.N.token,n=this.N.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*eR(n,60,36e3,sf.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ti(),this.ii="ph_"+s+"_window_id",this.ei="ph_"+s+"_primary_window_exists",this.ri()){var a=i0.D(this.ii),o=i0.D(this.ei);a&&!o?this.Kt=a:i0.L(this.ii),i0.j(this.ei,!0)}if(null!=(r=this.N.bootstrap)&&r.sessionID)try{var l=(e=>{var t=e.replace(/-/g,"");if(32!==t.length)throw Error("Not a valid UUID");if("7"!==t[12])throw Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)})(this.N.bootstrap.sessionID);this.si(this.N.bootstrap.sessionID,(new Date).getTime(),l)}catch(e){sf.error("Invalid sessionID in bootstrap",e)}this.ni()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return ew(this.Gt)&&(this.Gt=[]),this.Gt.push(e),this.Xt&&e(this.Xt,this.Kt),()=>{this.Gt=this.Gt.filter(t=>t!==e)}}ri(){return"memory"!==this.N.persistence&&!this.Bt.st&&i0.F()}oi(e){e!==this.Kt&&(this.Kt=e,this.ri()&&i0.j(this.ii,e))}ai(){return this.Kt?this.Kt:this.ri()?i0.D(this.ii):null}si(e,t,i){e===this.Xt&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this.Xt=e,this.Bt.register({[iv]:[t,e,i]}))}li(){var e=this.Bt.props[iv];return e_(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.si(null,null,null)}destroy(){clearTimeout(this.ui),this.ui=void 0,this.Yt&&G&&(G.removeEventListener("beforeunload",this.Yt,{capture:!1}),this.Yt=void 0),this.Gt=[]}ni(){this.Yt=()=>{this.ri()&&i0.L(this.ei)},t9(G,"beforeunload",this.Yt,{capture:!1})}checkAndGetSessionAndWindowId(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),"always"===this.N.cookieless_mode)throw Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var i=t||(new Date).getTime(),[r,s,n]=this.li(),a=this.ai(),o=eO(n)&&Math.abs(i-n)>864e5,l=!1,u=!s,c=!u&&!e&&this.Jt(i,r);u||c||o?(s=this.Qt(),a=this.Zt(),sf.info("new session ID generated",{sessionId:s,windowId:a,changeReason:{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:o}}),n=i,l=!0):a||(a=this.Zt(),l=!0);var h=eO(r)&&e&&!o?r:i,d=eO(n)?n:(new Date).getTime();return this.oi(a),this.si(s,h,d),e||this.ti(),l&&this.Gt.forEach(e=>e(s,a,l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:o}:void 0)),{sessionId:s,windowId:a,sessionStartTimestamp:d,changeReason:l?{noSessionId:u,activityTimeout:c,sessionPastMaximumLength:o}:void 0,lastActivityTimestamp:r}}ti(){clearTimeout(this.ui),this.ui=setTimeout(()=>{var[e]=this.li();if(this.Jt((new Date).getTime(),e)){var t=this.Xt;this.resetSessionId(),this.Wt.emit("forcedIdleReset",{idleSessionId:t})}},1.1*this.sessionTimeoutMs)}}var s_=function(e,t){if(!e)return!1;var i=e.userAgent;if(i&&eu(i,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some(e=>eu(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver},sm=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function sy(e,t,i){return sn({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:i})}var sb={exact:(e,t)=>
11t.some(t=>e.some(e=>t===e)),is_not:(e,t)=>t.every(t=>e.every(e=>t!==e)),regex:(e,t)=>t.some(t=>e.some(e=>sm(t,e))),not_regex:(e,t)=>t.every(t=>e.every(e=>!sm(t,e))),icontains:(e,t)=>t.map(sw).some(t=>e.map(sw).some(e=>t.includes(e))),not_icontains:(e,t)=>t.map(sw).every(t=>e.map(sw).every(e=>!t.includes(e))),gt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i>parseFloat(e))}),lt:(e,t)=>t.some(t=>{var i=parseFloat(t);return!isNaN(i)&&e.some(e=>i<parseFloat(e))})},sw=e=>e.toLowerCase();function sx(e,t){return!e||Object.entries(e).every(e=>{var[i,r]=e,s=null==t?void 0:t[i];if(ew(s)||ek(s))return!1;var n=[String(s)],a=sb[r.operator];return!!a&&a(r.values,n)})}var sE=((n5={}).US="us",n5.EU="eu",n5.CUSTOM="custom",n5),sk="i.posthog.com";class sS{constructor(e){this.hi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+sk,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}get region(){return this.hi[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.hi[this.apiHost]=sE.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.hi[this.apiHost]=sE.EU:this.hi[this.apiHost]=sE.CUSTOM),this.hi[this.apiHost]}endpointFor(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if(this.region===sE.CUSTOM)return this.apiHost+t;var i=sk+t;switch(e){case"assets":return"https://"+this.region+"-assets."+i;case"api":return"https://"+this.region+"."+i}}}var sP=tY("[Surveys]"),sO="seenSurvey_",sT=e=>{var t;return t=""+sO+e.id,e.current_iteration&&e.current_iteration>0&&(t=""+sO+e.id+"_"+e.current_iteration),t},sC=["popover","widget","api"],s$={ignoreConditions:!1,ignoreDelay:!1,displayType:rP},sj=tY("[PostHog ExternalIntegrations]"),sI={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class sM{constructor(e){this._instance=e}G(e,t){var i;null==(i=et.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,e,e=>{if(e)return sj.error("failed to load script",e);t()})}startIfEnabledOrStop(){var e,t=this,i=function(e){var i,r,n;!s||null!=(i=et.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[e]||t.G(sI[e],()=>{var i;null==(i=et.__PosthogExtensions__)||null==(i=i.integrations)||null==(i=i[e])||i.start(t._instance)}),!s&&null!=(r=et.__PosthogExtensions__)&&null!=(r=r.integrations)&&r[e]&&(null==(n=et.__PosthogExtensions__)||null==(n=n.integrations)||null==(n=n[e])||n.stop())};for(var[r,s]of Object.entries(null!=(e=this._instance.config.integrations)?e:{}))i(r)}}var sF={},sR=0,sN=()=>{},sA="posthog",sL=!sr&&-1===(null==ee?void 0:ee.indexOf("MSIE"))&&-1===(null==ee?void 0:ee.indexOf("Mozilla")),sD=e=>{var t;return en({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:function(e){var t=null==e?void 0:e.hostname;if(!ex(t))return!1;var i=t.split(".").slice(-2).join(".");for(var r of t6)if(i===r)return!1;return!0}(null==Y?void 0:Y.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:sN,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,debug:Q&&ex(null==Q?void 0:Q.search)&&-1!==Q.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==G||null==(t=G.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:e=>{var t="Bad HTTP status: "+e.statusCode+" "+e.text;tK.error(t)},get_device_id:e=>e,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:3e3},error_tracking:{},_onCapture:sN,__preview_eager_load_replay:!1},{rageclick:!(e&&e>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(e&&e>="2025-05-24")||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0})},sq=e=>{var t={};ew(e.process_person)||(t.person_profiles=e.process_person),ew(e.xhr_headers)||(t.request_headers=e.x
11hr_headers),ew(e.cookie_name)||(t.persistence_name=e.cookie_name),ew(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),ew(e.store_google)||(t.save_campaign_params=e.store_google),ew(e.verbose)||(t.debug=e.verbose);var i=t1({},t,e);return e_(e.property_blacklist)&&(ew(e.property_denylist)?i.property_denylist=e.property_blacklist:e_(e.property_denylist)?i.property_denylist=[...e.property_blacklist,...e.property_denylist]:tK.error("Invalid value for property_denylist config: "+e.property_denylist)),i};class sU{constructor(){this.__forceAllowLocalhost=!1}get di(){return this.__forceAllowLocalhost}set di(e){tK.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class sH{vi(e,t){if(e){var i=this.ci.indexOf(e);-1!==i&&this.ci.splice(i,1)}return this.ci.push(t),null==t.initialize||t.initialize(),t}get decideEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}get flagsEndpointWasHit(){var e,t;return null!=(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&e}constructor(){this.webPerformance=new sU,this.fi=!1,this.version=ei.LIB_VERSION,this.pi=new sg,this.ci=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=sD(),this.SentryIntegration=re,this.sentryIntegration=e=>{var t;return t=i9(this,e),{name:i7,processEvent:e=>t(e)}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.gi=!1,this.mi=null,this.bi=null,this.yi=null,this.scrollManager=new sh(this),this.pageViewManager=new rt(this),this.rateLimiter=new r$(this),this.requestRouter=new sS(this),this.consent=new i2(this),this.externalIntegrations=new sM(this);var e,t=null!=(e=sH.__defaultExtensionClasses)?e:{};this.featureFlags=t.featureFlags&&new t.featureFlags(this),this.toolbar=t.toolbar&&new t.toolbar(this),this.surveys=t.surveys&&new t.surveys(this),this.conversations=t.conversations&&new t.conversations(this),this.logs=t.logs&&new t.logs(this),this.experiments=t.experiments&&new t.experiments(this),this.exceptions=t.exceptions&&new t.exceptions(this),this.people={set:(e,t,i)=>{var r=ex(e)?{[e]:t}:e;this.setPersonProperties(r),null==i||i({})},set_once:(e,t,i)=>{var r=ex(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),null==i||i({})}},this.on("eventCaptured",e=>tK.info('send "'+(null==e?void 0:e.event)+'"',e))}init(e,t,i){if(i&&i!==sA){var r,s=null!=(r=sF[i])?r:new sH;return s._init(e,t,i),sF[i]=s,sF[sA][i]=s,s}return this._init(e,t,i)}_init(e,t,i){if(void 0===t&&(t={}),ew(e)||eE(e))return tK.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this.wi(t.debug),this.Ei=t,this.xi=[],t.person_profiles?this.bi=t.person_profiles:t.process_person&&(this.bi=t.process_person),this.set_config(t1({},sD(t.defaults),sq(t),{name:i,token:e})),this.config.on_xhr_error&&tK.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:rM.GZipJS;var r=this.Si();this.persistence=new rw(this.config,r),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new rw(en({},this.config,{persistence:"sessionStorage"}),r);var s=en({},this.persistence.props),n=en({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this.$i=new sl(e=>this.ki(e),this.config.request_queue_config),this.Pi=new sc(this),this.__request_queue=[];var a="always"===this.config.cookieless_mode||"on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut();if(a||(this.sessionManager=new sv(this),this.sessionPropsManager=new sp(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(tK.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Ti(a)},0)):(tK.info("Initializing extensions synchronously"),this.Ti(a)
11),ei.DEBUG=ei.DEBUG||this.config.debug,ei.DEBUG&&tK.info("Starting in debug mode",{this:this,config:t,thisC:en({},this.config),p:s,s:n}),void 0!==(null==(o=t.bootstrap)?void 0:o.distinctID)){var o,l,u,c=this.config.get_device_id(iG()),h=null!=(l=t.bootstrap)&&l.isIdentifiedID?c:t.bootstrap.distinctID;this.persistence.set_property(iO,null!=(u=t.bootstrap)&&u.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:t.bootstrap.distinctID,$device_id:h})}if(a)this.register_once({distinct_id:iR,$device_id:null},"");else if(!this.get_distinct_id()){var d=this.config.get_device_id(iG());this.register_once({distinct_id:d,$device_id:d},""),this.persistence.set_property(iO,"anonymous")}return t9(G,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.segment?function(e,t){var i=e.config.segment;if(!i)return t();!function(e,t){var i=e.config.segment;if(!i)return t();var r=i=>{var r=()=>i.anonymousId()||iG();e.config.get_device_id=r,i.id()&&(e.register({distinct_id:i.id(),$device_id:r()}),e.persistence.set_property(iO,"identified")),t()},s=i.user();"then"in s&&em(s.then)?s.then(r):r(s)}(e,()=>{var r;i.register((Promise&&Promise.resolve||i6.warn("This browser does not have Promise support, and can not use the segment integration"),r=(t,i)=>{if(!i)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(i6.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(i6.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(i,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>r(e,e.event.event),page:e=>r(e,"$pageview"),identify:e=>r(e,"$identify"),screen:e=>r(e,"$screen")})).then(()=>{t()})})}(this,()=>this.Ri()):this.Ri(),em(this.config._onCapture)&&this.config._onCapture!==sN&&(tK.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",e=>this.config._onCapture(e.event,e))),this.config.ip&&tK.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Ti(e){var t,i,r,s,n,a,o,l=performance.now(),u=en({},sH.__defaultExtensionClasses,this.config.__extensionClasses),c=[];u.featureFlags&&this.ci.push(this.featureFlags=null!=(t=this.featureFlags)?t:new u.featureFlags(this)),u.exceptions&&this.ci.push(this.exceptions=null!=(i=this.exceptions)?i:new u.exceptions(this)),u.historyAutocapture&&this.ci.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.ci.push(new u.tracingHeaders(this)),u.siteApps&&this.ci.push(this.siteApps=new u.siteApps(this)),u.sessionRecording&&!e&&this.ci.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||c.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.ci.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.ci.push(this.surveys=null!=(r=this.surveys)?r:new u.surveys(this)),u.logs&&this.ci.push(this.logs=null!=(s=this.logs)?s:new u.logs(this)),u.conversations&&this.ci.push(this.conversations=null!=(n=this.conversations)?n:new u.conversations(this)),u.productTours&&this.ci.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.ci.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.ci.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.ci.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.ci.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,i4)),u.toolbar&&this.ci.push(this.toolbar=null!=(a=this.toolbar)?a:new u.toolbar(this)),u.experiments&&this.ci.push(this.experiments=null!=(o=this.experiments)?o:new u.experiments(this)),this.ci.forEach(e=>{e.initialize&&c.push(()=>{null==e.initialize||e.initialize()})}),c.push(()=>
11{if(this.Ii){var e=this.Ii;this.Ii=void 0,this.ft(e)}}),this.Ci(c,l)}Ci(e,t){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout(()=>{this.Ci(e,t)},0);var i=e.shift();if(i)try{i()}catch(e){tK.error("Error initializing extension:",e)}}var r=Math.round(performance.now()-t);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:r}),this.config.__preview_deferred_init_extensions&&tK.info("PostHog extensions initialized ("+r+"ms)")}ft(e){var t;Y&&Y.body?(this.config.__preview_deferred_init_extensions&&(this.Ii=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=ec(e.supportedCompression,rM.GZipJS)?rM.GZipJS:ec(e.supportedCompression,rM.Base64)?rM.Base64:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.bi?this.bi:"identified_only"}),this.ci.forEach(t=>null==t.onRemoteConfig?void 0:t.onRemoteConfig(e))):(tK.info("document not ready yet, trying again in 500 milliseconds..."),setTimeout(()=>{this.ft(e)},500))}Ri(){try{this.config.loaded(this)}catch(e){tK.critical("`loaded` function failed",e)}if(this.Oi(),this.config.internal_or_test_user_hostname&&null!=Q&&Q.hostname){var e=Q.hostname,t=this.config.internal_or_test_user_hostname;("string"==typeof t?e===t:t.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||"always"===this.config.cookieless_mode)&&this.Fi()},1),this.Mi=new rI(this),this.Mi.load()}Oi(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this.$i)||e.enable())}_dom_loaded(){this.is_capturing()&&tZ(this.__request_queue,e=>this.ki(e)),this.__request_queue=[],this.Oi()}_handle_unload(){var e,t,i;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this.Ai()&&this.capture("$pageleave"),null==(t=this.$i)||t.unload(),null==(i=this.Pi)||i.unload()):this.Ai()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(sL?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=ss(e.url,{ip:+!!this.config.ip}),e.headers=en({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t,i,r,s=en({},e);s.timeout=s.timeout||6e4,s.url=ss(s.url,{_:(new Date).getTime().toString(),ver:ei.LIB_VERSION,compression:s.compression});var n=null!=(t=s.transport)?t:"fetch",a=so.filter(e=>!s.disableTransport||!e.transport||!s.disableTransport.includes(e.transport)),o=null!=(i=null==(r=t7(a,e=>e.transport===n))?void 0:r.method)?i:a[0].method;if(!o)throw Error("No available transport method");o(s)})(en({},e,{callback:t=>{var i,r;this.rateLimiter.checkForLimiting(t),t.statusCode>=400&&(null==(i=(r=this.config).on_request_error)||i.call(r,t)),null==e.callback||e.callback(t)}}))))}ki(e){this.Pi?this.Pi.retriableRequest(e):this._send_request(e)}_execute_array(e){sR++;try{var t,i=[],r=[],s=[];tZ(e,e=>{e&&(t=e[0],e_(t)?s.push(e):em(e)?e.call(this):e_(e)&&"alias"===t?i.push(e):e_(e)&&-1!==t.indexOf("capture")&&em(this[t])?s.push(e):r.push(e))});var n=function(e,t){tZ(e,function(e){if(e_(e[0])){var i=t;t0(e,function(e){i=i[e[0]].apply(i,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};n(i,this),n(r,this),n(s,this)}finally{sR--}}push(e){if(sR>0&&e_(e)&&ex(e[0])){var t=sH.prototype[e[0]];em(t)&&t.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,t,i){var r;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!ew(e)&&ex(e)){var s=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(s&&!this.config.__preview_capture_bot_pageviews)){var n=null!=i&&i.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==n||!n.isRateLimited){null!=t&&t.$current_url&&!ex(null==t?void 0:t.$current_url)&&(tK.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=i&&i.Di||tK.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var a=new Date,o=(null==i?void 0:i.timestamp)||a,l=iG(),u={uuid:l,event:e,properties:this.calculateEventProperties(e,t||{},o,l)};"$pageview"===e&&this.config.__preview_capture_bot_pageviews&&s&&(u.event="$bot_pageview",u.properties.$browser_type="bot"),n&&(u.properties.$lib_rate_limit_remaining_tokens=n.remainingTokens),(null==i?void 0:i.$set)&&(u.$set=null==i?void 0:i.$set);var c,h="$groupidentify"!==e,d=this.ji(null==i?void 0:i.$set_once,h);if(d&&(u.$set_once=d),(p=u,g=null!=i&&i._noTruncate?null:this.config.properties_string_max_length,f=e=>
11ex(e)&&!ek(g)?e.slice(0,g):e,v=new Set,u=function e(t,i){var r;return t!==Object(t)?f?f(t,i):t:v.has(t)?void 0:(v.add(t),e_(t)?(r=[],tZ(t,t=>{r.push(e(t))})):(r={},t0(t,(t,i)=>{v.has(t)||(r[i]=e(t,i))})),r)}(p)).timestamp=o,ew(null==i?void 0:i.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=a),"survey dismissed"===e||e===rS){var p,g,f,v,_,m,y,b=null==t?void 0:t.$survey_id,w=null==t?void 0:t.$survey_iteration;c={id:b,current_iteration:w},localStorage.getItem(sT(c))||localStorage.setItem(sT(c),"true"),u.$set=en({},u.$set,{[(_={id:b,current_iteration:w},y="$survey_"+(m=e===rS?"responded":"dismissed")+"/"+_.id,_.current_iteration&&_.current_iteration>0&&(y="$survey_"+m+"/"+_.id+"/"+_.current_iteration),y)]:!0})}else e===rk&&(u.$set=en({},u.$set,{$survey_last_seen_date:(new Date).toISOString()}));if(e===rO.SHOWN){var x=null==t?void 0:t[rT.TOUR_TYPE];x&&(u.$set=en({},u.$set,{[rT.TOUR_LAST_SEEN_DATE+"/"+x]:(new Date).toISOString()}))}var E=en({},u.properties.$set,u.$set);if(eb(E)||this.setPersonPropertiesForFlags(E),!eS(this.config.before_send)){var k=this.Li(u);if(!k)return;u=k}
11this.pi.emit("eventCaptured",u);var S={method:"POST",url:null!=(r=null==i?void 0:i._url)?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:null==i?void 0:i._batchKey};return!this.config.request_batching||i&&(null==i||!i._batchKey)||null!=i&&i.send_instantly?this.ki(S):this.$i.enqueue(S),u}tK.critical("This capture call is ignored due to client rate limiting.")}}else tK.error("No event name provided to posthog.capture")}else tK.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",t=>e(t.event,t))}calculateEventProperties(e,t,i,r,s){if(i=i||new Date,!this.persistence||!this.sessionPersistence)return t;var n,a=s?void 0:this.persistence.remove_event_timer(e),o=en({},t);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,("always"==this.config.cookieless_mode||"on_reject"==this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut())&&(o.$cookieless_mode=!0),"$snapshot"===e){var l=en({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=l.distinct_id,(!ex(o.distinct_id)&&!eP(o.distinct_id)||eE(o.distinct_id))&&tK.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var u,c=function(e,t){if(!ee)return{};var i,r,s,n,a,o,l,u,c,h,d,p=e?t2([],rl,t||[]):[],[g,f]=function(e){for(var t=0;t<tx.length;t++){var[i,r]=tx[t],s=i.exec(e),n=s&&(em(r)?r(s,e):r);if(n)return n}return["",""]}(ee);return t1(t8({$os:g,$os_version:f,$browser:ty(ee,navigator.vendor),$device:tE(ee),$device_type:(o={userAgentDataPlatform:null==(i=navigator)||null==(i=i.userAgentData)?void 0:i.platform,maxTouchPoints:null==(r=navigator)?void 0:r.maxTouchPoints,screenWidth:null==G||null==(s=G.screen)?void 0:s.width,screenHeight:null==G||null==(n=G.screen)?void 0:n.height,devicePixelRatio:null==G?void 0:G.devicePixelRatio},(d=tE(ee))===eB||d===eG||"Kobo"===d||"Kindle Fire"===d||d===tc?eH:d===e9||d===tt||d===te||d===to?"Console":d===eV?"Wearable":d?eq:"Android"===(null==o?void 0:o.userAgentDataPlatform)&&(null!=(l=null==o?void 0:o.maxTouchPoints)?l:0)>0?Math.min(null!=(u=null==o?void 0:o.screenWidth)?u:0,null!=(c=null==o?void 0:o.screenHeight)?c:0)/(null!=(h=null==o?void 0:o.devicePixelRatio)?h:1)>=600?eH:eq:"Desktop"),$timezone:ry(),$timezone_offset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}}()}),{$current_url:rn(null==Q?void 0:Q.href,p,rc),$host:null==Q?void 0:Q.host,$pathname:null==Q?void 0:Q.pathname,$raw_user_agent:ee.length>1e3?ee.substring(0,997)+"...":ee,$browser_version:tw(ee,navigator.vendor),$browser_language:rf(),$browser_language_prefix:"string"==typeof(a=rf())?a.split("-")[0]:void 0,$screen_height:null==G?void 0:G.screen.height,$screen_width:null==G?void 0:G.screen.width,$viewport_height:null==G?void 0:G.innerHeight,$viewport_width:null==G?void 0:G.innerWidth,$lib:"web",$lib_version:ei.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:h,windowId:d}=this.sessionManager.checkAndGetSessionAndWindowId(s,i.getTime());o.$session_id=h,o.$window_id=d}this.sessionPropsManager&&t1(o,this.sessionPropsManager.getSessionProps());try{this.sessionRecording&&t1(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=null==(n=this.Pi)?void 0:n.length}catch(e){o.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===sE.CUSTOM&&(o.$lib_custom_api_host=this.config.api_host),u="$pageview"!==e||s?"$pageleave"!==e||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(i):this.pageViewManager.doPageView(i,r),o=t1(o,u),"$pageview"===e&&Y&&(o.title=Y.title),!ew(a)){var p=i.getTime()-a;o.$duration=parseFloat((p/1e3).toFixed(3))}ee&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=t1({},c,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),e_(this.config.property_denylist)?t0(this.config.property_denylist,function(e){delete o[e]}):tK.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(tK.error("sanitize_properties is deprecated. Use before_send instead"),o=g(o,e));var f=this.Ni();return o.$process_person_profile=f,f&&!s&&this.Ui("_calculate_event_properties"),o}ji(e,t){if(void 0===t&&(t=!0),!this.persistence||!this.Ni()||this.fi)return e;var i,r=t1({},this.persistence.get_initial_props(),(null==(i=this.sessionPropsManager)?void 0:i.getSetOnceProps())||{},e||{}),s=this.config.sanitize_properties;return s&&(tK.error("sanitize_properties is deprecated. Use before_send instead"),r=s(r,"$set_once")),t&&(this.fi=!0),eb(r)?void 0:r}register(e,t){var i;null==(i=this.persistence)||i.register(e,t)}register_once(e,t,i){var r;null==(r=this.persistence)||r.register_once(e,t,i)}register_for_session(e){var t;null==(t=this.sessionPersistence)||t.register(e)}unregister(e){var t;null==(t=this.persistence)||t.unregister(e)}unregister_for_session(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)}zi(e,t){this.register({[e]:t})}getFeatureFlag(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)}getFeatureFlagResult(e,t){var i;return null==(i=this.featureFlags)?void 0:i.getFeatureFlagResult(e,t)}isFeatureEnabled(e,t){var i;return null==(i=this.featureFlags)?void 0:i.isFeatureEnabled(e,t)}reloadFeatureFlags(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()}updateFlags(e,t,i){var r;null==(r=this.featureFlags)||r.updateFlags(e,t,i)}updateEarlyAccessFeatureEnrollment(e,t,i){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(e,t,i)}getEarlyAccessFeatures(e,t,i){var r;return void 0===t&&(t=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(e,t,i)}on(e,t){return this.pi.on(e,t)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:"Surveys module not available"}),()=>{})}onSessionId(e){var t,i;return null!=(t=null==(i=this.sessionManager)?void 0:i.onSessionId(e))?t:()=>{}}getSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:"Surveys module not available"})}getActiveMatchingSurveys(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:"Surveys module not available"})}renderSurvey(e,t){var i;null==(i=this.surveys)||i.renderSurvey(e,t)}displaySurvey(e,t){var i;void 0===t&&(t=s$),null==(i=this.surveys)||i.displaySurvey(e,t)}cancelPendingSurvey(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)}canRenderSurvey(e){var t,i;return null!=(t=null==(i=this.surveys)?void 0:i.canRenderSurvey(e))?t:{visible:!1,disabledReason:"Surveys module not available"}}canRenderSurveyAsync(e,t){var i,r;return void 0===t&&(t=!1),null!=(i=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(e,t))?i:Promise.resolve({visible:!1,disabledReason:"Surveys module not available"})}identify(e,t,i){if(!this.__loaded||!this.persistence)return tK.uninitializedWarning("posthog.identify");
11if(eP(e)&&(e=e.toString(),tK.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))tK.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(e!==iR){if(this.Ui("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property("$device_id")||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(ii)&&(this.unregister(ii),this.register({distinct_id:e}));var s,n="anonymous"===(this.persistence.get_property(iO)||"anonymous");e!==r&&n?(this.persistence.set_property(iO,"identified"),this.setPersonPropertiesForFlags(en({},i||{},t||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:i||{}}),this.yi=sy(e,t,i),null==(s=this.featureFlags)||s.setAnonymousDistinctId(r)):(t||i)&&this.setPersonProperties(t,i),e!==r&&(this.reloadFeatureFlags(),this.unregister(ik))}}else tK.critical('The string "'+iR+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else tK.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,t){if((e||t)&&this.Ui("posthog.setPersonProperties")){var i=sy(this.get_distinct_id(),e,t);this.yi!==i?(this.setPersonPropertiesForFlags(en({},t||{},e||{})),this.capture("$set",{$set:e||{},$set_once:t||{}}),this.yi=i):tK.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,t,i){if(e&&t){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:en({},r,{[e]:t})}),i&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),this.setGroupPropertiesForFlags({[e]:i})),r[e]===t||i||this.reloadFeatureFlags()}else tK.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),null==(i=this.featureFlags)||i.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,t){var i;void 0===t&&(t=!0),this.Ui("posthog.setGroupPropertiesForFlags")&&(null==(i=this.featureFlags)||i.setGroupPropertiesForFlags(e,t))}resetGroupPropertiesForFlags(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)}reset(e){if(tK.info("reset"),!this.__loaded)return tK.uninitializedWarning("posthog.reset");var t,i,r,s,n,a,o,l=this.get_property("$device_id");if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(i=this.sessionPersistence)||i.clear(),null==(r=this.surveys)||r.reset(),null==(s=this.Mi)||s.stop(),null==(n=this.featureFlags)||n.reset(),null==(a=this.persistence)||a.set_property(iO,"anonymous"),null==(o=this.sessionManager)||o.resetSessionId(),this.yi=null,"always"===this.config.cookieless_mode)this.register_once({distinct_id:iR,$device_id:null},"");else{var u=this.config.get_device_id(iG());this.register_once({distinct_id:u,$device_id:e?u:l},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,t;return null!=(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:t,sessionStartTimestamp:i}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t);if(null!=e&&e.withTimestamp&&i){var s,n=null!=(s=e.timestampLookBack)?s:10;if(!i)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-i)/1e3)-n,0)}return r}alias(e,t){return e===this.get_property(it)?(tK.critical("Attempting to create alias for existing People user - aborting."),-2):this.Ui("posthog.alias")?(ew(t)&&(t=this.get_distinct_id()),e!==t?(this.zi(ii,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(tK.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var t=en({},this.config);if(ey(e)){t1(this.config,sq(e));var i,r,s,n,a,o,l,u,c,h=this.Si();null==(i=this.persistence)||i.update_config(this.config,t,h),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new rw(en({},this.config,{persistence:"sessionStorage"}),h);var d=this.wi(this.config.debug);eT(d)&&(this.config.debug=d),eT(this.config.debug)&&(this.config.debug?(ei.DEBUG=!0,iY.F()&&iY.j("ph_debug","true"),tK.info("set_config",{config:e,oldConfig:t,newConfig:en({},this.config)})):(ei.DEBUG=!1,iY.F()&&iY.L("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(s=this.sessionRecording)||s.startIfEnabledOrStop(),null==(n=this.autocapture)||n.startIfEnabled(),null==(a=this.heatmaps)||a.startIfEnabled(),null==(o=this.exceptionObserver)||o.startIfEnabledOrStop(),null==(l=this.deadClicksAutocapture)||l.startIfEnabledOrStop(),null==(u=this.surveys)||u.loadIfEnabled(),this.Hi(),null==(c=this.externalIntegrations)||c.startIfEnabledOrStop()}}startSessionRecording(e){var t,i,r,s,n,a=!0===e,o={sampling:a||!(null==e||!e.sampling),linked_flag:a||!(null==e||!e.linked_flag),url_trigger:a||!(null==e||!e.url_trigger),event_trigger:a||!(null==e||!e.event_trigger)};Object.values(o).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),o.sampling&&(null==(i=this.sessionRecording)||i.overrideSampling()),o.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),o.url_trigger&&(null==(s=this.sessionRecording)||s.overrideTrigger("url")),o.event_trigger&&(null==(n=this.sessionRecording)||n.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!(null==(e=this.sessionRecording)||!e.started)}captureException(e,t){if(this.exceptions){var i=Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:i});return this.exceptions.sendExceptionEvent(en({},r,t))}}startExceptionAutocapture(e){this.set_config({capture_exceptions:null==e||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var t,i;return null!=(t=null==(i=this.toolbar)?void 0:i.loadToolbar(e))&&t}get_property(e){var t;return null==(t=this.persistence)?void 0:t.props[e]}getSessionProperty(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]}toString(){var e,t=null!=(e=this.config.name)?e:sA;return t!==sA&&(t=sA+"."+t),t}_isIdentified(){var e,t;return"identified"===(null==(e=this.persistence)?void 0:e.get_property(iO))||"identified"===(null==(t=this.sessionPersistence)?void 0:t.get_property(iO))}Ni(){var e,t;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&
11!this._isIdentified()&&eb(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[ii])&&(null==(t=this.persistence)||null==(t=t.props)||!t[iM]))}Ai(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)}createPersonProfile(){this.Ni()||this.Ui("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Ui("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Ui(e){return"never"===this.config.person_profiles?(tK.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.zi(iM,!0),!0)}Si(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut(),t=this.config.opt_out_persistence_by_default||"on_reject"===this.config.cookieless_mode;return this.config.disable_persistence||e&&!!t}Hi(){var e,t,i,r,s=this.Si();return(null==(e=this.persistence)?void 0:e.st)!==s&&(null==(i=this.persistence)||i.set_disabled(s)),(null==(t=this.sessionPersistence)?void 0:t.st)!==s&&(null==(r=this.sessionPersistence)||r.set_disabled(s)),s}opt_in_capturing(e){var t;if("always"!==this.config.cookieless_mode){if("on_reject"===this.config.cookieless_mode&&this.consent.isExplicitlyOptedOut()){this.reset(!0),null==(s=this.sessionManager)||s.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=new sv(this),this.pageViewManager=new rt(this),this.persistence&&(this.sessionPropsManager=new sp(this,this.sessionManager,this.persistence));var i,r,s,n,a,o,l,u=null!=(a=null==(o=this.config.__extensionClasses)?void 0:o.sessionRecording)?a:null==(l=sH.__defaultExtensionClasses)?void 0:l.sessionRecording;u&&(this.sessionRecording=this.vi(this.sessionRecording,new u(this)))}this.consent.optInOut(!0),this.Hi(),this.Oi(),null==(t=this.sessionRecording)||t.startIfEnabledOrStop(),"on_reject"==this.config.cookieless_mode&&(null==(i=this.surveys)||i.loadIfEnabled()),(ew(null==e?void 0:e.captureEventName)||null!=e&&e.captureEventName)&&this.capture(null!=(r=null==e?void 0:e.captureEventName)?r:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Fi()}else tK.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,t,i;"always"!==this.config.cookieless_mode?("on_reject"===this.config.cookieless_mode&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Hi(),"on_reject"===this.config.cookieless_mode&&(this.register({distinct_id:iR,$device_id:null}),null==(e=this.sessionManager)||e.destroy(),null==(t=this.pageViewManager)||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,null==(i=this.sessionRecording)||i.stopRecording(),this.sessionRecording=void 0,this.Fi())):tK.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===i1.GRANTED?"granted":e===i1.DENIED?"denied":"pending"}is_capturing(){return"always"===this.config.cookieless_mode||("on_reject"===this.config.cookieless_mode?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Hi()}_is_bot(){return K?s_(K,this.config.custom_blocked_useragents):void 0}Fi(){Y&&("visible"===Y.visibilityState?this.gi||(this.gi=!0,this.capture("$pageview",{title:Y.title},{send_instantly:!0}),this.mi&&(Y.removeEventListener("visibilitychange",this.mi),this.mi=null)):this.mi||(this.mi=this.Fi.bind(this),t9(Y,"visibilitychange",this.mi)))}debug(e){!1===e?(null==G||G.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==G||G.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}bt(){var e,t,i,r,s=this.Ei||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(tK.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(t="advanced_disable_decide",i=(e="advanced_disable_flags")in s&&!eS(s[e]),r=t in s&&!eS(s[t]),i?s[e]:!!r&&(tK&&tK.warn("Config field '"+t+"' is deprecated. Please use '"+e+"' instead. The old field will be removed in a future major version."),s[t]))}Li(e){if(eS(this.config.before_send))return e;var t=e_(this.config.before_send)?this.config.before_send:[this.config.before_send],i=e;for(var r of t){if(eS(i=r(i))){var s="Event '"+e.event+"' was rejected in beforeSend function";return eC(e.event)?tK.warn(s+". This can cause unexpected behavior."):tK.info(s),null}i.properties&&!eb(i.properties)||tK.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return i}getPageViewId(){var e;
11return null==(e=this.pageViewManager.K)?void 0:e.pageViewId}captureTraceFeedback(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})}captureTraceMetric(e,t,i){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(i)})}wi(e){var t=eT(e)&&!e,i=iY.F()&&"true"===iY.A("ph_debug");return!t&&(!!i||e)}}function sG(e){return e instanceof Element&&(e.id===iF||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function sB(e){return!!e&&1===e.nodeType}function sz(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function sV(e){return!!e&&3===e.nodeType}function sW(e){return!!e&&11===e.nodeType}function sK(e){return e?eh(e).split(/\s+/):[]}function sY(e){var t=null==G?void 0:G.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}function sQ(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return sK(t)}function sX(e){return eS(e)?null:eh(e).split(/(\s+)/).filter(e=>nn(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function sJ(e){var t="";return s6(e)&&!s7(e)&&e.childNodes&&e.childNodes.length&&t0(e.childNodes,function(e){var i;sV(e)&&e.textContent&&(t+=null!=(i=sX(e.textContent))?i:"")}),eh(t)}function sZ(e){var t;return ew(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}sH.__defaultExtensionClasses={},function(e,t){for(var i=0;i<t.length;i++)e.prototype[t[i]]=t4(e.prototype[t[i]])}(sH,["identify"]);var s0=["a","button","form","input","select","textarea","label"];function s1(e,t){if(ew(t))return!0;var i,r=function(e){if(t.some(t=>e.matches(t)))return{v:!0}};for(var s of e)if(i=r(s))return i.v;return!1}function s2(e){var t=e.parentNode;return!(!t||!sB(t))&&t}var s3=["next","previous","prev",">","<"],s5=[".ph-no-rageclick",".ph-no-capture"],s4=e=>!e||sz(e,"html")||!sB(e),s8=(e,t)=>{if(!G||s4(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var i=!1,r=[e],s=e;s.parentNode&&!sz(s,"body");)if(sW(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var n=s2(s);if(!n)break;if(t||s0.indexOf(n.tagName.toLowerCase())>-1)i=!0;else{var a=G.getComputedStyle(n);a&&"pointer"===a.getPropertyValue("cursor")&&(i=!0)}r.push(n),s=n}return{parentIsUsefulElement:i,targetElementList:r}};function s6(e){for(var t=e;t.parentNode&&!sz(t,"body");t=t.parentNode){var i=sQ(t);if(ec(i,"ph-sensitive")||ec(i,"ph-no-capture"))return!1}if(ec(sQ(e),"ph-include"))return!0;var r=e.type||"";if(ex(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var s=e.name||e.id||"";return!(ex(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function s7(e){return!!(sz(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||sz(e,"select")||sz(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var s9="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",ne=RegExp("^(?:"+s9+")$"),nt=new RegExp(s9),ni="\\d{3}-?\\d{2}-?\\d{4}",nr=RegExp("^("+ni+")$"),ns=RegExp("("+ni+")");function nn(e,t){return void 0===t&&(t=!0),!(eS(e)||ex(e)&&(e=eh(e),(t?ne:nt).test((e||"").replace(/[- ]/g,""))||(t?nr:ns).test(e)))&&!0}function na(e){var t=sJ(e);return nn(t=(t+" "+function e(t){var i="";return t&&t.childNodes&&t.childNodes.length&&t0(t.childNodes,function(t){var r;if(t&&"span"===(null==(r=t.tagName)?void 0:r.toLowerCase()))try{var s=sJ(t);i=(i+" "+s).trim(),t.childNodes&&t.childNodes.length&&(i=(i+" "+e(t)).trim())}catch(e){tK.error("[AutoCapture]",e)}}),i}(e)).trim())?t:""}function no(e){return e.replace(/"|\\"/g,'\\"')}class nl{constructor(e){this.disabled=!1===e;var t=ey(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}isRageClick(e,t,i){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&i-r.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:t,timestamp:i}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:i}];return!1}}var nu="$copy_autocapture",nc=tY("[AutoCapture]");function nh(e,t){return t.length>e?t.slice(0,e)+"...":t}var nd=tY("[ExceptionAutocapture]");function np(e,t,i){try{if(!(t in e))return()=>{};var r=e[t],s=i(r);return em(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch(e){return()=>{}}}var ng=tY("[TracingHeaders]"),nf=tY("[Web Vitals]"),nv="disabled",n_="lazy_loading",nm="awaiting_config",ny="missing_config";tY("[SessionRecording]");var nb="[SessionRecording]",nw=tY(nb),nx=tY("[Heatmaps]");function nE(e){return ey(e)&&"clientX"in e&&"clientY"in e&&eP(e.clientX)&&eP(e.clientY)}var nk=tY("[Product Tours]"),nS="ph_product_tours",nP=["$set_once","$set"],nO=tY("[SiteApps]");function nT(e,t,i){if(eS(e))return!1;switch(i){case"exact":return e===t;case"contains":return RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*"),"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}class nC{constructor(e){this.Bi=new sg,this.qi=(e,t)=>this.Vi(e,t)&&this.Wi(e,t)&&this.Gi(e,t)&&this.Yi(e,t),this.Vi=(e,t)=>null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event),this._instance=e,this.Ji=new Set,this.Ki=new Set}init(){var e,t;ew(null==(e=this._instance)?void 0:e._addCaptureHook)||null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.on(e,t)})}register(e){var t,i;if(!ew(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach(e
11=>{var t,i;null==(t=this.Ki)||t.add(e),null==(i=e.steps)||i.forEach(e=>{var t;null==(t=this.Ji)||t.add((null==e?void 0:e.event)||"")})}),null!=(i=this._instance)&&i.autocapture)){var r,s=new Set;e.forEach(e=>{var t;null==(t=e.steps)||t.forEach(e=>{null!=e&&e.selector&&s.add(null==e?void 0:e.selector)})}),null==(r=this._instance)||r.autocapture.setElementSelectors(s)}}on(e,t){var i;null!=t&&0!=e.length&&(this.Ji.has(e)||this.Ji.has(null==t?void 0:t.event))&&this.Ki&&(null==(i=this.Ki)?void 0:i.size)>0&&this.Ki.forEach(e=>{this.Xi(t,e)&&this.Bi.emit("actionCaptured",e.name)})}Qi(e){this.onAction("actionCaptured",t=>e(t))}Xi(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var i of t.steps)if(this.qi(e,i))return!0;return!1}onAction(e,t){return this.Bi.on(e,t)}Wi(e,t){if(null!=t&&t.url){var i,r=null==e||null==(i=e.properties)?void 0:i.$current_url;if(!r||"string"!=typeof r||!nT(r,t.url,t.url_matching||"contains"))return!1}return!0}Gi(e,t){return!!this.Zi(e,t)&&!!this.te(e,t)&&!!this.ie(e,t)}Zi(e,t){if(null==t||!t.href)return!0;var i=this.ee(e);if(i.length>0)return i.some(e=>nT(e.href,t.href,t.href_matching||"exact"));var r,s,n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!n&&nT((s=n.match(/(?::|")href="(.*?)"/))?s[1]:"",t.href,t.href_matching||"exact")}te(e,t){if(null==t||!t.text)return!0;var i=this.ee(e);if(i.length>0)return i.some(e=>nT(e.text,t.text,t.text_matching||"exact")||nT(e.$el_text,t.text,t.text_matching||"exact"));var r,s,n,a,o=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";return!!o&&(s=function(e){for(var t,i=[],r=/(?::|")text="(.*?)"/g;!eS(t=r.exec(e));)i.includes(t[1])||i.push(t[1]);return i}(o),n=t.text,a=t.text_matching||"exact",s.some(e=>nT(e,n,a)))}ie(e,t){if(null==t||!t.selector)return!0;var i,r,s=null==e||null==(i=e.properties)?void 0:i.$element_selectors;if(null!=s&&s.includes(t.selector))return!0;var n=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&n)try{return new RegExp(t.selector_regex).test(n)}catch(e){}return!1}ee(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements}Yi(e,t){return null==t||!t.properties||0===t.properties.length||sx(t.properties.reduce((e,t)=>{var i=e_(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:i,operator:t.operator||"exact"},e},{}),null==e?void 0:e.properties)}}class n${constructor(e){this._instance=e,this.re=new Map,this.se=new Map,this.ne=new Map}oe(e,t){return!!e&&sx(e.propertyFilters,null==t?void 0:t.properties)}ae(e,t){var i=new Map;return e.forEach(e=>{var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach(t=>{if(null!=t&&t.name){var r=i.get(t.name)||[];r.push(e.id),i.set(t.name,r)}})}),i}le(e,t,i){var r=(i===rx?this.re:this.se).get(e),s=[];return this.ue(e=>{s=e.filter(e=>null==r?void 0:r.includes(e.id))}),s.filter(r=>{var s,n=null==(s=r.conditions)||null==(s=s[i])||null==(s=s.values)?void 0:s.find(t=>t.name===e);return this.oe(n,t)})}register(e){var t;ew(null==(t=this._instance)?void 0:t._addCaptureHook)||(this.he(e),this.de(e))}de(e){var t=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0});0!==t.length&&(null==this.ve&&(this.ve=new nC(this._instance),this.ve.init(),this.ve.Qi(e=>{this.onAction(e)})),t.forEach(e=>{var t,i,r,s,n;e.conditions&&null!=(t=e.conditions)&&t.actions&&null!=(i=e.conditions)&&null!=(i=i.actions)&&i.values&&(null==(r=e.conditions)||null==(r=r.actions)||null==(r=r.values)?void 0:r.length)>0&&(null==(s=this.ve)||s.register(e.conditions.actions.values),null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)||n.forEach(t=>{if(t&&t.name){var i=this.ne.get(t.name);i&&i.push(e.id),this.ne.set(t.name,i||[e.id])}}))}))}he(e){var t,i=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.events)&&(null==(i=e.conditions)||null==(i=i.events)||null==(i=i.values)?void 0:i.length)>0}),r=e.filter(e=>{var t,i;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(i=e.conditions)||null==(i=i.cancelEvents)||null==(i=i.values)?void 0:i.length)>0});(0!==i.length||0!==r.length)&&(null==(t=this._instance)||t._addCaptureHook((e,t)=>{this.onEvent(e,t)}),this.re=this.ae(e,rx),this.se=this.ae(e,rE))}onEvent(e,t){var i,r=this.ce(),s=this.fe(),n=this.pe(),a=(null==(i=this._instance)||null==(i=i.persistence)?void 0:i.props[s])||[];if(n===e&&t&&a.length>0){r.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:a});var o,l,u=(null==t||null==(o=t.properties)?void 0:o.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(u){var c=a.indexOf(u);c>=0&&(a.splice(c,1),this._e(a))}}else{if(this.se.has(e)){var h=this.le(e,t,rE);h.length>0&&(r.info("cancel event matched, cancelling items",{event:e,itemsToCancel:h.map(e=>e.id)}
11),h.forEach(e=>{var t=a.indexOf(e.id);t>=0&&a.splice(t,1),this.ge(e.id)}),this._e(a))}if(this.re.has(e)){r.info("event name matched",{event:e,eventPayload:t,items:this.re.get(e)});var d=this.le(e,t,rx);this._e(a.concat(d.map(e=>e.id)||[]))}}}onAction(e){var t,i=this.fe(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[i])||[];this.ne.has(e)&&this._e(r.concat(this.ne.get(e)||[]))}_e(e){var t,i=this.ce(),r=this.fe(),s=[...new Set(e)].filter(e=>!this.me(e));i.info("updating activated items",{activatedItems:s}),null==(t=this._instance)||null==(t=t.persistence)||t.register({[r]:s})}getActivatedIds(){var e,t=this.fe();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]}getEventToItemsMap(){return this.re}be(){return this.ve}}class nj extends n${constructor(e){super(e)}fe(){return"$surveys_activated"}pe(){return rk}ue(e){var t;null==(t=this._instance)||t.getSurveys(e)}ge(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)}ce(){return sP}me(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var nI=null!=G&&G.location?ra(G.location.hash,"__posthog")||ra(location.hash,"state"):null,nM="_postHogToolbarParams",nF=tY("[Toolbar]"),nR=((n4=nR||{})[n4.UNINITIALIZED=0]="UNINITIALIZED",n4[n4.LOADING=1]="LOADING",n4[n4.LOADED=2]="LOADED",n4),nN=tY("[FeatureFlags]"),nA=tY("[FeatureFlags]",{debugEnabled:!0}),nL="$active_feature_flags",nD="$override_feature_flags",nq="$feature_flag_payloads",nU="$override_feature_flag_payloads",nH="$feature_flag_request_id",nG=e=>{var t={};for(var[i,r]of t3(e||{}))r&&(t[i]=r);return t},nB=((n8={}).FeatureFlags="feature_flags",n8.Recordings="recordings",n8),nz=tY("[Error tracking]"),nV={icontains:(e,t)=>!!G&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!G&&-1===t.href.toLowerCase().indexOf(e.toLowerCase()),regex:(e,t)=>!!G&&sm(t.href,e),not_regex:(e,t)=>!!G&&!sm(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class nW{constructor(e){var t=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getWebExperiments(e=>{nW.ye("retrieved web experiments from the server"),t.we=new Map,e.forEach(e=>{if(e.feature_flag_key){t.we&&(nW.ye("setting flag key ",e.feature_flag_key," to web experiment ",e),null==(i=t.we)||i.set(e.feature_flag_key,e));var i,r=t._instance.getFeatureFlag(e.feature_flag_key);ex(r)&&e.variants[r]&&t.Ee(e.name,r,e.variants[r].transforms)}else if(e.variants)for(var s in e.variants){var n=e.variants[s];nW.xe(n)&&t.Ee(e.name,s,n.transforms)}})},e)},this._instance=e,this._instance.onFeatureFlags(e=>{this.onFeatureFlags(e)})}initialize(){}onFeatureFlags(e){if(this._is_bot())nW.ye("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(eS(this.we))return this.we=new Map,this.loadIfEnabled(),void this.previewWebExperiment();nW.ye("applying feature flags",e),e.forEach(e=>{var t;if(this.we&&null!=(t=this.we)&&t.has(e)){var i,r=this._instance.getFeatureFlag(e),s=null==(i=this.we)?void 0:i.get(e);r&&null!=s&&s.variants[r]&&this.Ee(s.name,r,s.variants[r].transforms)}})}}previewWebExperiment(){var e=nW.getWindowLocation();if(null!=e&&e.search){var t=rs(null==e?void 0:e.search,"__experiment_id"),i=rs(null==e?void 0:e.search,"__experiment_variant");t&&i&&(nW.ye("previewing web experiments "+t+" && "+i),this.getWebExperiments(e=>{this.Se(parseInt(t),i,e)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,i){if(this._instance.config.disable_web_experiments&&!i)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:t=>200===t.statusCode&&t.json?e(t.json.experiments||[]):e([])})}Se(e,t,i){var r=i.filter(t=>t.id===e);r&&r.length>0&&(nW.ye("Previewing web experiment ["+r[0].name+"] with variant ["+t+"]"),this.Ee(r[0].name,t,r[0].variants[t].transforms))}static xe(e){return!eS(e.conditions)&&nW.$e(e)&&nW.ke(e)}static $e(e){if(eS(e.conditions)||eS(null==(t=e.conditions)?void 0:t.url))return!0;var t,i,r,s,n=nW.getWindowLocation();return!!n&&(null==(i=e.conditions)||!i.url||nV[null!=(r=null==(s=e.conditions)?void 0:s.urlMatchType)?r:"icontains"](e.conditions.url,n))}
11static getWindowLocation(){return null==G?void 0:G.location}static ke(e){if(eS(e.conditions)||eS(null==(i=e.conditions)?void 0:i.utm))return!0;var t=rd();if(t.utm_source){var i,r,s,n,a,o,l,u,c,h=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_campaign)==t.utm_campaign,d=null==(n=e.conditions)||null==(n=n.utm)||!n.utm_source||(null==(a=e.conditions)||null==(a=a.utm)?void 0:a.utm_source)==t.utm_source,p=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_medium||(null==(l=e.conditions)||null==(l=l.utm)?void 0:l.utm_medium)==t.utm_medium,g=null==(u=e.conditions)||null==(u=u.utm)||!u.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==t.utm_term;return h&&p&&g&&d}return!1}static ye(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];tK.info("[WebExperiments] "+e,i)}Ee(e,t,i){this._is_bot()?nW.ye("Refusing to render web experiment since the viewer is a likely bot"):"control"!==t?i.forEach(i=>{if(i.selector){nW.ye("applying transform of variant "+t+" for experiment "+e+" ",i);var r,s=null==(r=document)?void 0:r.querySelectorAll(i.selector);null==s||s.forEach(e=>{i.html&&(e.innerHTML=i.html),i.css&&e.setAttribute("style",i.css)})}}):nW.ye("Control variants leave the page unmodified.")}_is_bot(){return K&&this._instance?s_(K,this._instance.config.custom_blocked_useragents):void 0}}var nK=tY("[Conversations]"),nY={featureFlags:class{constructor(e){this.Pe=!1,this.Te=!1,this.Re=!1,this.Ie=!1,this.Ce=!1,this.Oe=!1,this.Fe=!1,this.Me=!1,this._instance=e,this.featureFlagEventHandlers=[]}Ae(){var e,t;return null!=(e=null==(t=this._instance.persistence)?void 0:t.nt(this._instance.config.feature_flag_cache_ttl_ms))&&e}De(){return!!this.Ae()&&(this.Me||this.Re||(this.Me=!0,nN.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}je(){var e,t=null!=(e=this._instance.config.evaluation_contexts)?e:this._instance.config.evaluation_environments;return!this._instance.config.evaluation_environments||this._instance.config.evaluation_contexts||this.Fe||(nN.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Fe=!0),null!=t&&t.length?t.filter(e=>{var t=e&&"string"==typeof e&&e.trim().length>0;return t||nN.error("Invalid evaluation context found:",e,"Expected non-empty string"),t}):[]}Le(){return this.je().length>0}initialize(){var e,t,{config:i}=this._instance,r=null!=(e=null==(t=i.bootstrap)?void 0:t.featureFlags)?e:{};if(Object.keys(r).length){var s,n,a=null!=(s=null==(n=i.bootstrap)?void 0:n.featureFlagPayloads)?s:{},o=Object.keys(r).filter(e=>!!r[e]).reduce((e,t)=>(e[t]=r[t]||!1,e),{}),l=Object.keys(a).filter(e=>o[e]).reduce((e,t)=>(a[t]&&(e[t]=a[t]),e),{});this.receivedFeatureFlags({featureFlags:o,featureFlagPayloads:l})}}updateFlags(e,t,i){var r=null!=i&&i.merge?this.getFlagVariants():{},s=null!=i&&i.merge?this.getFlagPayloads():{},n=en({},r,e),a=en({},s,t),o={};for(var[l,u]of Object.entries(n)){var c="string"==typeof u;o[l]={key:l,enabled:!!c||!!u,variant:c?u:void 0,reason:void 0,metadata:ew(null==a?void 0:a[l])?void 0:{id:0,version:void 0,description:void 0,payload:a[l]}}}this.receivedFeatureFlags({flags:o})}get hasLoadedFlags(){return this.Te}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this._instance.get_property(ib),t=this._instance.get_property(nD),i=this._instance.get_property(nU);if(!i&&!t)return e||{};var r=t1({},e||{});for(var s of[...new Set([...Object.keys(i||{}),...Object.keys(t||{})])]){var n,a,o=r[s],l=null==t?void 0:t[s],u=ew(l)?null!=(n=null==o?void 0:o.enabled)&&n:!!l,c=ew(l)?o.variant:"string"==typeof l?l:void 0,h=null==i?void 0:i[s],d=en({},o,{enabled:u,variant:u?null!=c?c:null==o?void 0:o.variant:void 0});u!==(null==o?void 0:o.enabled)&&(d.original_enabled=null==o?void 0:o.enabled),c!==(null==o?void 0:o.variant)&&(d.original_variant=null==o?void 0:o.variant),h&&(d.metadata=en({},null==o?void 0:o.metadata,{payload:h,original_payload:null==o||null==(a=o.metadata)?void 0:a.payload})),r[s]=d}return this.Pe||(nN.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:i,finalDetails:r}),this.Pe=!0),r}getFlagVariants(){var e=this._instance.get_property(im),t=this._instance.get_property(nD);if(!t)return e||{};for(var i=t1({},e),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.Pe||(nN.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:i}),this.Pe=!0),i}getFlagPayloads(){var e=this._instance.get_property(nq),t=this._instance.get_property(nU);if(!t)return e||{};for(var i=t1({},e||{}),r=Object.keys(t),s=0;s<r.length;s++)i[r[s]]=t[r[s]];return this.Pe||(nN.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:i}),this.Pe=!0),i}reloadFeatureFlags(){this.Ie||this._instance.config.advanced_disable_feature_flags||this.Ne||(this._instance.pi.emit("featureFlagsReloading",!0),this.Ne=setTimeout(()=>{this.Ue()},5))}ze(){clearTimeout(this.Ne),this.Ne=void 0}ensureFlagsLoaded(){this.Te||this.Re||this.Ne||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.Ie=e}Ue(e){var t;if(this.ze(),!this._instance.bt())if(this.Re)this.Ce=!0;else{var i=this._instance.config.token,r=this._instance.get_property("$device_id"),s={token:i,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:en({},(null==(t=this._instance.persistence)?void 0:t.get_initial_props())||{},this._instance.get_property(iw)||{}),group_properties:this._instance.get_property(ix),timezone:ry()};ek(r)||ew(r)||(s.$device_id=r),(null!=e&&e.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(s.disable_flags=!0),this.Le()&&(s.evaluation_contexts=this.je());var n=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",a=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+n);this.Re=!0,this._instance._send_request({method:"POST",url:a,data:s,compression:this._instance.config.disable_compression?void 0:rM.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:e=>{var t,i,r,n=!0;if(200===e.statusCode&&(this.Ce||(this.$anon_distinct_id=void 0),n=!1),this.Re=!1,!s.disable_flags||this.Ce){this.Oe=!n;var a,o=[];e.error?e.error instanceof Error?o.push("AbortError"===e.error.name?"timeout":"connection_error"):o.push("unknown_error"):200!==e.statusCode&&o.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&o.push("errors_while_computing_flags");var l=!(null==(i=e.json)||null==(i=i.quotaLimited)||!i.includes(nB.FeatureFlags));(l&&o.push("quota_limited"),null==(r=this._instance.persistence)||r.register({[iS]:o}),l)?nN.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(s.disable_flags||this.receivedFeatureFlags(null!=(a=e.json)?a:{},n),this.Ce&&(this.Ce=!1,this.Ue()))}}})}}getFeatureFlag(e,t){var i;if(void 0===t&&(t={}),!t.fresh||this.Oe)if(this.Te||this.getFlags()&&this.getFlags().length>0){if(!this.De()){var r=this.getFeatureFlagResult(e,t);return null!=(i=null==r?void 0:r.variant)?i:null==r?void 0:r.enabled}}else nN.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload}getFeatureFlagResult(e,t){if(void 0===t&&(t={}),!t.fresh||this.Oe)if(this.Te||this.getFlags()&&this.getFlags().length>0){if(!this.De()){var i=this.getFlagVariants(),r=e in i,s=i[e],n=this.getFlagPayloads()[e],a=String(s),o=this._instance.get_property(nH)||void 0,l=this._instance.get_property(iP)||void 0,u=this._instance.get_property(ik)||{};if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(a))){e_(u[e])?u[e].push(a):u[e]=[a],null==(p=this._instance.persistence)||p.register({[ik]:u});var c=this.getFeatureFlagDetails(e),h=[...null!=(g=this._instance.get_property(iS))?g:[]];ew(s)&&h.push("flag_missing");var d={$feature_flag:e,$feature_flag_response:s,$feature_flag_payload:n||null,$feature_flag_request_id:o,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:(null==(f=this._instance.config.bootstrap)||null==(f=f.featureFlags)?void 0:f[e])||null,$feature_flag_bootstrapped_payload:(null==(v=this._instance.config.bootstrap)||null==(v=v.featureFlagPayloads)?void 0:v[e])||null,$used_bootstrap_value:!this.Oe};ew(null==c||null==(_=c.metadata)?void 0:_.version)||(d.$feature_flag_version=c.metadata.version);var p,g,f,v,_,m,y,b,w,x,E,k=null!=(m=null==c||null==(y=c.reason)?void 0:y.description)?m:null==c||null==(b=c.reason)?void 0:b.code;k&&(d.$feature_flag_reason=k),null!=c&&null!=(w=c.metadata)&&w.id&&(d.$feature_flag_id=c.metadata.id),ew(null==c?void 0:c.original_variant)&&ew(null==c?void 0:c.original_enabled)||(d.$feature_flag_original_response=ew(c.original_variant)?c.original_enabled:c.original_variant),null!=c&&null!=(x=c.metadata)&&x.original_payload&&(d.$feature_flag_original_payload=null==c||null==(E=c.metadata)?void 0:E.original_payload),h.length&&(d.$feature_flag_error=h.join(",")),this._instance.capture("$feature_flag_called",d)}if(r){var S=n;if(!ew(n))try{S=JSON.parse(n)}catch(e){}return{key:e,enabled:!!s,variant:"string"==typeof s?s:void 0,payload:S}}}}else nN.warn('getFeatureFlagResult for key "'+e+"\" failed. Feature flags didn't load in time.")}getRemoteConfigPayload(e,t){var i=this._instance.config.token,r={distinct_id:this._instance.get_distinct_id(),token:i};this.Le()&&(r.evaluation_contexts=this.je()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this._instance.config.disable_compression?void 0:rM.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:i=>{var r,s=null==(r=i.json)?void 0:r.featureFlagPayloads;t((null==s?void 0:s[e])||void 0)}})}isFeatureEnabled(e,t){if(void 0===t&&(t={}),!t.fresh||this.Oe){if(this.Te||this.getFlags()&&this.getFlags().length>0){var i=this.getFeatureFlag(e,t);return ew(i)?void 0:!!i}nN.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time.")}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}receivedFeatureFlags(e,t){if(this._instance.persistence){this.Te=!0;var i=this.getFlagVariants(),r=this.getFlagPayloads(),s=this.getFlagsWithDetails();!function(e,t,i,r,s){void 0===i&&(i={}),void 0===r&&(r={}),void 0===s&&(s={});var n,a=((n=e.flags)?(e.featureFlags=Object.fromEntries(Object.keys(n).map(e=>{var t;return[e,null!=(t=n[e].variant)?t:n[e].enabled]})),e.featureFlagPayloads=Object.fromEntries(Object.keys(n).filter(e=>n[e].enabled).filter(e=>{var t;return null==(t=n[e].metadata)?void 0:t.payload}).map(e=>{var t;return[e,null==(t=n[e].metadata)?void 0:t.payload]}))):nN.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e),o=a.flags,l=a.featureFlags,u=a.featureFlagPayloads;if(l){var c=e.requestId,h=e.evaluatedAt;if(e_(l)){nN.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var d={};if(l)for(var p=0;p<l.length;p++)d[l[p]]=!0;t&&t.register({[nL]:l,[im]:d})}else{var g=l,f=u,v=o;if(e.errorsWhileComputingFlags)if(o){var _=new Set(Object.keys(o).filter(e=>{var t;return!(null!=(t=o[e])&&t.failed)}));g=en({},i,Object.fromEntries(Object.entries(g).filter(e=>{var[t]=e;return _.has(t)}))),f=en({},r,Object.fromEntries(Object.entries(f||{}).filter(e=>{var[t]=e;return _.has(t)}))),v=en({},s,Object.fromEntries(Object.entries(v||{}).filter(e=>{var[t]=e;return _.has(t)})))}else g=en({},i,g),f=en({},r,f),v=en({},s,v);t&&t.register(en({[nL]:Object.keys(nG(g)),[im]:g||{},[nq]:f||{},[ib]:v||{}},c?{[nH]:c}:{},h?{[iP]:h}:{}))}}}(e,this._instance.persistence,i,r,s),t||(this.Me=!1),this.He(t)}}override(e,t){void 0===t&&(t=!1),nN.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this._instance.persistence)return nN.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._instance.persistence.unregister(nD),this._instance.persistence.unregister(nU),this.He(),nA.info("All overrides cleared");if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var t;if(this.Pe=!!(null!=(t=e.suppressWarning)&&t),"flags"in e){if(!1===e.flags)this._instance.persistence.unregister(nD),nA.info("Flag overrides cleared");else if(e.flags){if(e_(e.flags)){for(var i={},r=0;r<e.flags.length;r++)i[e.flags[r]]=!0;this._instance.persistence.register({[nD]:i})}else this._instance.persistence.register({[nD]:e.flags});nA.info("Flag overrides set",{flags:e.flags})}}return"payloads"in e&&(!1===e.payloads?(this._instance.persistence.unregister(nU),nA.info("Payload overrides cleared")):e.payloads&&(this._instance.persistence.register({[nU]:e.payloads}),nA.info("Payload overrides set",{payloads:e.payloads}))),void this.He()}this.He()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Te){var{flags:t,flagVariants:i}=this.Be();e(t,i)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,i){var r,s=(this._instance.get_property(iy)||[]).find(t=>t.flagKey===e),n={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:n};s&&(a.$early_access_feature_name=s.name),i&&(a.$feature_enrollment_stage=i),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(n,!1);var o=en({},this.getFlagVariants(),{[e]:t});null==(r=this._instance.persistence)||r.register({[nL]:Object.keys(nG(o)),[im]:o}),this.He()}getEarlyAccessFeatures(e,t,i){void 0===t&&(t=!1);var r=this._instance.get_property(iy),s=i?"&"+i.map(e=>"stage="+e).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:t=>{var i,r;if(t.json){var s=t.json.earlyAccessFeatures;return null==(i=this._instance.persistence)||i.unregister(iy),null==(r=this._instance.persistence)||r.register({[iy]:s}),e(s)}}})}Be(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(e=>t[e]),flagVariants:Object.keys(t).filter(e=>t[e]).reduce((e,i)=>(e[i]=t[i],e),{})}}He(e){var{flags:t,flagVariants:i}=this.Be();
11this.featureFlagEventHandlers.forEach(r=>r(t,i,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(iw)||{};this._instance.register({[iw]:en({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(iw)}setGroupPropertiesForFlags(e,t){void 0===t&&(t=!0);var i=this._instance.get_property(ix)||{};0!==Object.keys(i).length&&Object.keys(i).forEach(t=>{i[t]=en({},i[t],e[t]),delete e[t]}),this._instance.register({[ix]:en({},i,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this._instance.get_property(ix)||{};this._instance.register({[ix]:en({},t,{[e]:{}})})}else this._instance.unregister(ix)}reset(){this.Te=!1,this.Re=!1,this.Ie=!1,this.Ce=!1,this.Oe=!1,this.$anon_distinct_id=void 0,this.ze(),this.Pe=!1}}},nQ=en({productTours:class{constructor(e){this.Xr=null,this.Qr=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this._instance.persistence&&this._instance.persistence.register({[id]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Xr||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(id)||this.G(()=>this.Zr())}G(e){var t,i;null!=(t=et.__PosthogExtensions__)&&t.generateProductTours?e():null==(i=et.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"product-tours",t=>{t?nk.error("Could not load product tours script",t):e()})}Zr(){var e;!this.Xr&&null!=(e=et.__PosthogExtensions__)&&e.generateProductTours&&(this.Xr=et.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(void 0===t&&(t=!1),!e_(this.Qr)||t){var i=this._instance.persistence;if(i){var r=i.props[nS];if(e_(r)&&!t)return this.Qr=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:t=>{var r=t.statusCode;if(200!==r||!t.json){var s="Product Tours API could not be loaded, status: "+r;return nk.error(s),void e([],{isLoaded:!1,error:s})}var n=e_(t.json.product_tours)?t.json.product_tours:[];this.Qr=n,i&&i.register({[nS]:n}),e(n,{isLoaded:!0})}})}else e(this.Qr,{isLoaded:!0})}getActiveProductTours(e){eS(this.Xr)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Xr.getActiveProductTours(e)}showProductTour(e){var t;null==(t=this.Xr)||t.showTourById(e)}previewTour(e){this.Xr?this.Xr.previewTour(e):this.G(()=>{var t;this.Zr(),null==(t=this.Xr)||t.previewTour(e)})}dismissProductTour(){var e;null==(e=this.Xr)||e.dismissTour("user_clicked_skip")}nextStep(){var e;null==(e=this.Xr)||e.nextStep()}previousStep(){var e;null==(e=this.Xr)||e.previousStep()}clearCache(){var e;this.Qr=null,null==(e=this._instance.persistence)||e.unregister(nS)}resetTour(e){var t;null==(t=this.Xr)||t.resetTour(e)}resetAllTours(){var e;null==(e=this.Xr)||e.resetAllTours()}cancelPendingTour(e){var t;null==(t=this.Xr)||t.cancelPendingTour(e)}}},nY),nX=en({surveys:class{constructor(e){this.us=void 0,this._surveyManager=null,this.hs=!1,this.ds=[],this.vs=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_surveys){var t=e.surveys;if(eS(t))return sP.warn("Flags not loaded yet. Not loading surveys.");var i=e_(t);this.us=i?t.length>0:t,sP.info("flags response received, isSurveysEnabled: "+this.us),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var i=localStorage.key(t);(null!=i&&i.startsWith(sO)||null!=i&&i.startsWith("inProgressSurvey_"))&&e.push(i)}e.forEach(e=>localStorage.removeItem(e))}loadIfEnabled(){if(!this._surveyManager)if(this.hs)sP.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)sP.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())sP.info("Not loading surveys in cookieless mode without consent.");else{var e=null==et?void 0:et.__PosthogExtensions__;if(e){if(!ew(this.us)||this._instance.config.advanced_enable_surveys){var t=this.us||this._instance.config.advanced_enable_surveys;this.hs=!0;try{var i=e.generateSurveys;if(i)return void this.cs(i,t);var r=e.loadExternalDependency;if(!r)return void this.fs("PostHog loadExternalDependency extension not found.");r(this._instance,"surveys",i=>{i||!e.generateSurveys?this.fs("Could not load surveys script",i):this.cs(e.generateSurveys,t)})}catch(e){throw this.fs("Error initializing surveys",e),e}finally{this.hs=!1}}}else sP.error("PostHog Extensions not found.")}}cs(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new nj(this._instance),sP.info("Surveys loaded successfully"),this.ps({isLoaded:!0})}fs(e,t){sP.error(e,t),this.ps({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.ds.push(e),this._surveyManager&&this.ps({isLoaded:!0}),()=>{this.ds=this.ds.filter(t=>t!==e)}}getSurveys(e,t){if(void 0===t&&(t=!1),this._instance.config.disable_surveys)return sP.info("Disabled. Not loading surveys."),e([]);var i,r=this._instance.get_property(iE);if(r&&!t)return e(r,{isLoaded:!0});"u">typeof Promise&&this.vs?this.vs.then(t=>{var{surveys:i,context:r}=t;return e(i,r)}):("u">typeof Promise&&(this.vs=new Promise(e=>{i=e})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:t=>{this.vs=null;var r=t.statusCode;if(200!==r||!t.json){var s="Surveys API could not be loaded, status: "+r;sP.error(s);var n={isLoaded:!1,error:s};return e([],n),void(null==i||i({surveys:[],context:n}))}var a,o,l=t.json.surveys||[],u=l.filter(e=>{var t,i;return!(!e.start_date||e.end_date)&&(!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)||!(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)||!i.length))});u.length>0&&(null==(o=this._surveyEventReceiver)||o.register(u)),null==(a=this._instance.persistence)||a.register({[iE]:l});var c={isLoaded:!0};e(l,c),null==i||i({surveys:l,context:c})}}))}ps(e){for(var t of this.ds)try{if(!e.isLoaded)return t([],e);
11this.getSurveys(t)}catch(e){sP.error("Error in survey callback",e)}}getActiveMatchingSurveys(e,t){if(void 0===t&&(t=!1),!eS(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);sP.warn("init was not called")}_s(e){var t=null;return this.getSurveys(i=>{var r;t=null!=(r=i.find(t=>t.id===e))?r:null}),t}gs(e){if(eS(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var t="string"==typeof e?this._s(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(eS(this._surveyManager))return sP.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var t=this.gs(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return eS(this._surveyManager)?(sP.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(i=>{this.getSurveys(t=>{var r,s=null!=(r=t.find(t=>t.id===e))?r:null;if(s){var n=this.gs(s);i({visible:n.eligible,disabledReason:n.reason})}else i({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,i){var r;if(eS(this._surveyManager))sP.warn("init was not called");else{var s="string"==typeof e?this._s(e):e;if(null!=s&&s.id)if(sC.includes(s.type)){var n=null==Y?void 0:Y.querySelector(t);if(n)return null!=(r=s.appearance)&&r.surveyPopupDelaySeconds?(sP.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var e,t;sP.info("Rendering survey "+s.id+" with delay of "+(null==(e=s.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=this._surveyManager)||t.renderSurvey(s,n,i),sP.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,n,i);sP.warn("Survey element not found")}else sP.warn("Surveys of type "+s.type+" cannot be rendered in the app");else sP.warn("Survey not found")}}displaySurvey(e,t){var i;if(eS(this._surveyManager))sP.warn("init was not called");else{var r=this._s(e);if(r){var s=r;if(null!=(i=r.appearance)&&i.surveyPopupDelaySeconds&&t.ignoreDelay&&(s=en({},r,{appearance:en({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==rP&&t.initialResponses&&sP.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var n=this.canRenderSurvey(r);if(!n.visible)return void sP.warn("Survey is not eligible to be displayed: ",n.disabledReason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(s,t):this.renderSurvey(s,t.selector,t.properties)}else sP.warn("Survey not found")}}cancelPendingSurvey(e){eS(this._surveyManager)?sP.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;null==(e=this._surveyManager)||e.handlePageUnload()}}},nY),nJ=en({experiments:nW},nY),nZ=en({},nY,{sessionRecording:class{get started(){var e;return!(null==(e=this.qe)||!e.isStarted)}get status(){var e,t;return this.Ve===nm||this.Ve===ny?this.Ve:null!=(e=null==(t=this.qe)?void 0:t.status)?e:this.Ve}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.Ve=nv,this.We=void 0,this._instance=e,!this._instance.sessionManager)throw nw.error("started without valid sessionManager"),Error(nb+" started without valid sessionManager. This is a bug.");if("always"===this._instance.config.cookieless_mode)throw Error(nb+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Ge(){var e,t=!(null==(e=this._instance.get_property(ig))||!e.enabled),i=!this._instance.config.disable_session_recording,r=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return G&&t&&i&&!r}startIfEnabledOrStop(e){var t;if(!this.Ge||null==(t=this.qe)||!t.isStarted){var i=!ew(Object.assign)&&!ew(Array.from);this.Ge&&i?(this.Ye(e),nw.info("starting")):(this.Ve=nv,this.stopRecording())}}Ye(e){var t,i,r;this.Ge&&(this.Ve!==nm&&this.Ve!==ny&&(this.Ve=n_),null!=et&&null!=(t=et.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(i=et.__PosthogExtensions__)&&i.initSessionRecording?this.Je(e):null==(r=et.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this.Ke,t=>{if(t)return nw.error("could not load recorder",t);this.Je(e)}))}stopRecording(){var e,t;null==(e=this.We)||e.call(this),this.We=void 0,null==(t=this.qe)||t.stop()}Xe(){var e,t;null==(e=this.We)||e.call(this),this.We=void 0,null==(t=this.qe)||t.discard()}Qe(){var e;null==(e=this._instance.persistence)||e.unregister(i_)}Ze(e,t){if(eS(e))return null;var i=eP(e)?e:parseFloat(e);return"number"==typeof i&&Number.isFinite(i)&&i>=0&&i<=1?i:(nw.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null)}tr(e){if(this._instance.persistence){var t,i,r=this._instance.persistence,s=()=>{var t,i=!1===e.sessionRecording?void 0:e.sessionRecording,s=this.Ze(null==(t=this._instance.config.session_recording)?void 0:t.sampleRate,"session_recording.sampleRate"),n=this.Ze(null==i?void 0:i.sampleRate,"remote config sampleRate"),a=null!=s?s:n;eS(a)&&this.Qe();var o=null==i?void 0:i.minimumDurationMilliseconds;r.register({[ig]:en({cache_timestamp:Date.now(),enabled:!!i},i,{networkPayloadCapture:en({capturePerformance:e.capturePerformance},null==i?void 0:i.networkPayloadCapture),canvasRecording:{enabled:null==i?void 0:i.recordCanvas,fps:null==i?void 0:i.canvasFps,quality:null==i?void 0:i.canvasQuality},sampleRate:a,minimumDurationMilliseconds:ew(o)?null:o,endpoint:null==i?void 0:i.endpoint,triggerMatchType:null==i?void 0:i.triggerMatchType,masking:null==i?void 0:i.masking,urlTriggers:null==i?void 0:i.urlTriggers})})};s(),null==(t=this.We)||t.call(this),this.We=null==(i=this._instance.sessionManager)?void 0:i.onSessionId(s)}}onRemoteConfig(e){return"sessionRecording"in e?!1===e.sessionRecording?(this.tr(e),void this.Xe()):(this.tr(e),void this.startIfEnabledOrStop()):(this.Ve===nm&&(this.Ve=ny,nw.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var i;void 0===t&&(t="log"),null!=(i=this.qe)&&i.log?this.qe.log(e,t):nw.warn("log called before recorder was ready")}get Ke(){var e,t,i=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(ig);return(null==i||null==(t=i.scriptConfig)?void 0:t.script)||"lazy-recorder"}ir(){var e,t=this._instance.get_property(ig);if(!t)return!1;var i=null!=(e=("object"==typeof t?t:JSON.parse(t)).cache_timestamp)?e:Date.now();return Date.now()-i<=36e5}Je(e){var t,i;if(null==(t=et.__PosthogExtensions__)||!t.initSessionRecording)throw Error("Called on script loaded before session recording is available");if(this.qe||(this.qe=null==(i=et.__PosthogExtensions__)?void 0:i.initSessionRecording(this._instance),this.qe._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.ir()){if(this.Ve===ny||this.Ve===nm)return;return this.Ve=nm,nw.info("persisted remote config is stale, requesting fresh config before starting"),void new rI(this._instance).load()}this.Ve=n_,this.qe.start(e)}onRRwebEmit(e){var t;null==(t=this.qe)||null==t.onRRwebEmit||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.qe||null==(t=this._instance.persistence)||t.register({$replay_override_linked_flag:!0}),null==(e=this.qe)||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.qe||null==(t=this._instance.persistence)||t.register({$replay_override_sampling:!0}),null==(e=this.qe)||e.overrideSampling()}overrideTrigger(e){var t,i;this.qe||null==(i=this._instance.persistence)||i.register({["url"===e?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}
11),null==(t=this.qe)||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return(null==(e=this.qe)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var i;return!(null==(i=this.qe)||!i.tryAddCustomEvent(e,t))}}},{autocapture:class{constructor(e){this.er=!1,this.rr=null,this.sr=!1,this.instance=e,this.rageclicks=new nl(e.config.rageclick),this.nr=null}initialize(){this.startIfEnabled()}get N(){var e,t,i=ey(this.instance.config.autocapture)?this.instance.config.autocapture:{};return i.url_allowlist=null==(e=i.url_allowlist)?void 0:e.map(e=>new RegExp(e)),i.url_ignorelist=null==(t=i.url_ignorelist)?void 0:t.map(e=>new RegExp(e)),i}ar(){if(this.isBrowserSupported()){if(G&&Y){var e=e=>{e=e||(null==G?void 0:G.event);try{this.lr(e)}catch(e){nc.error("Failed to capture event",e)}};if(t9(Y,"submit",e,{capture:!0}),t9(Y,"change",e,{capture:!0}),t9(Y,"click",e,{capture:!0}),this.N.capture_copied_text){var t=e=>{e=e||(null==G?void 0:G.event),this.lr(e,nu)};t9(Y,"copy",t,{capture:!0}),t9(Y,"cut",t,{capture:!0})}}}else nc.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.er&&(this.ar(),this.er=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.sr=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[is]:!!e.autocapture_opt_out}),this.rr=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.nr=e}getElementSelectors(e){var t,i=[];return null==(t=this.nr)||t.forEach(t=>{var r=null==Y?void 0:Y.querySelectorAll(t);null==r||r.forEach(r=>{e===r&&i.push(t)})}),i}get isEnabled(){var e,t,i=null==(e=this.instance.persistence)?void 0:e.props[is];if(ek(this.rr)&&!eT(i)&&!this.instance.bt())return!1;var r=null!=(t=this.rr)?t:!!i;return!!this.instance.config.autocapture&&!r}lr(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var i,r=sZ(e);sV(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,t){if(!G||s4(e)||(eT(t)?(i=!!t&&s5,r=void 0):(i=null!=(s=null==t?void 0:t.css_selector_ignorelist)?s:s5,r=null==t?void 0:t.content_ignorelist),!1===i))return!1;var i,r,s,{targetElementList:n}=s8(e,!1);return!function(e,t){var i;if(!1===e||ew(e))return!1;if(!0===e)i=s3;else{if(!e_(e))return!1;if(e.length>10)return tK.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;i=e.map(e=>e.toLowerCase())}return t.some(e=>{var{safeText:t,ariaLabel:r}=e;return i.some(e=>t.includes(e)||r.includes(e))})}(r,n.map(e=>{var t;return{safeText:sJ(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}}))&&!s1(n,i)}(r,this.instance.config.rageclick)&&this.lr(e,"$rageclick");var s=t===nu;if(r&&function(e,t,i,r,s){if(void 0===i&&(i=void 0),!G||s4(e)||null!=(n=i)&&n.url_allowlist&&!sY(i.url_allowlist)||null!=(a=i)&&a.url_ignorelist&&sY(i.url_ignorelist))return!1;if(null!=(o=i)&&o.dom_event_allowlist){var n,a,o,l,u=i.dom_event_allowlist;if(u&&!u.some(e=>t.type===e))return!1}var{parentIsUsefulElement:c,targetElementList:h}=s8(e,r);if(!function(e,t){var i=null==t?void 0:t.element_allowlist;if(ew(i))return!0;var r,s=function(e){if(i.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var n of e)if(r=s(n))return r.v;return!1}(h,i)||!s1(h,null==(l=i)?void 0:l.css_selector_allowlist))return!1;var d=G.getComputedStyle(e);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===t.type)return!0;var p=e.tagName.toLowerCase();switch(p){case"html":return!1;case"form":return(s||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(t.type)>=0;default:return c?(s||["click"]).indexOf(t.type)>=0:(s||["click"]).indexOf(t.type)>=0&&(s0.indexOf(p)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this.N,s,s?["copy","cut"]:void 0)){var{props:n,explicitNoCapture:a}=function(e,t){for(var i,r,{e:s,maskAllElementAttributes:n,maskAllText:a,elementAttributeIgnoreList:o,elementsC
11hainAsString:l}=t,u=[e],c=e;c.parentNode&&!sz(c,"body");)sW(c.parentNode)?(u.push(c.parentNode.host),c=c.parentNode.host):(u.push(c.parentNode),c=c.parentNode);var h,d=[],p={},g=!1,f=!1;if(t0(u,e=>{var t=s6(e);"a"===e.tagName.toLowerCase()&&(g=e.getAttribute("href"),g=t&&g&&nn(g)&&g),ec(sQ(e),"ph-no-capture")&&(f=!0),d.push(function(e,t,i,r){var s=e.tagName.toLowerCase(),n={tag_name:s};s0.indexOf(s)>-1&&!i&&("a"===s.toLowerCase()||"button"===s.toLowerCase()?n.$el_text=nh(1024,na(e)):n.$el_text=nh(1024,sJ(e)));var a=sQ(e);a.length>0&&(n.classes=a.filter(function(e){return""!==e})),t0(e.attributes,function(i){var s;if((!s7(e)||-1!==["name","id","class","aria-label"].indexOf(i.name))&&(null==r||!r.includes(i.name))&&!t&&nn(i.value)&&(!ex(s=i.name)||"_ngcontent"!==s.substring(0,10)&&"_nghost"!==s.substring(0,7))){var a=i.value;"class"===i.name&&(a=sK(a).join(" ")),n["attr__"+i.name]=nh(1024,a)}});for(var o=1,l=1,u=e;u=function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!sB(t))return t}(u);)o++,u.tagName===e.tagName&&l++;return n.nth_child=o,n.nth_of_type=l,n}(e,n,a,o)),t1(p,function(e){if(!s6(e))return{};var t={};return t0(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var i=e.name.replace("data-ph-capture-attribute-",""),r=e.value;i&&r&&nn(r)&&(t[i]=r)}}),t}(e))}),f)return{props:{},explicitNoCapture:f};if(a||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?d[0].$el_text=na(e):d[0].$el_text=sJ(e)),g){d[0].attr__href=g;var v,_,m=null==(v=ri(g))?void 0:v.host,y=null==G||null==(_=G.location)?void 0:_.host;m&&y&&m!==y&&(h=g)}return{props:t1({$event_type:s.type,$ce_version:1},l?{}:{$elements:d},{$elements_chain:d.map(e=>{var t,i,r,s={text:null==(i=e.$el_text)?void 0:i.slice(0,400),tag_name:e.tag_name,href:null==(r=e.attr__href)?void 0:r.slice(0,2048),attr_class:(t=e.attr__class)?e_(t)?t:sK(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return t3(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,i]=e;return s.attributes[t]=i}),s}).map(e=>{var t,i,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class)for(var s of(e.attr_class.sort(),e.attr_class))r+="."+s.replace(/"/g,"");var n=en({},e.text?{text:e.text}:{},{"nth-child":null!=(t=e.nth_child)?t:0,"nth-of-type":null!=(i=e.nth_of_type)?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return t3(n).sort((e,t)=>{var[i]=e,[r]=t;return i.localeCompare(r)}).forEach(e=>{var[t,i]=e;return a[no(t.toString())]=no(i.toString())}),r+=":",r+=t3(a).map(e=>{var[t,i]=e;return t+'="'+i+'"'}).join("")}).join(";")},null!=(i=d[0])&&i.$el_text?{$el_text:null==(r=d[0])?void 0:r.$el_text}:{},h&&"click"===s.type?{$external_click_url:h}:{},p)}}(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.N.element_attribute_ignorelist,elementsChainAsString:this.sr});if(a)return!1;var o=this.getElementSelectors(r);if(o&&o.length>0&&(n.$element_selectors=o),t===nu){var l,u=sX(null==G||null==(l=G.getSelection())?void 0:l.toString()),c=e.type||"clipboard";if(!u)return!1;n.$selected_content=u,n.$copy_type=c}return this.instance.capture(t,n),!0}}}isBrowserSupported(){return em(null==Y?void 0:Y.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.ur=(null==G||null==(t=G.location)?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return"history_change"===this._instance.config.capture_pageview}startIfEnabled(){this.isEnabled&&(tK.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.hr&&this.hr(),this.hr=void 0,tK.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(G&&G.history){var i=this;null!=(e=G.history.pushState)&&e.__posthog_wrapped__||np(G.history,"pushState",e=>function(t,r,s){e.call(this,t,r,s),i.dr("pushState")}),null!=(t=G.history.replaceState)&&t.__posthog_wrapped__||np(G.history,"replaceState",e=>function(t,r,s){e.call(this,t,r,s),i.dr("replaceState")}),this.vr()}}dr(e){try{var t,i=null==G||null==(t=G.location)?void 0:t.pathname;if(!i)return;i!==this.ur&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:e}),this.ur=i}catch(t){tK.error("Error capturing "+e+" pageview",t)}}
11vr(){if(!this.hr){var e=()=>{this.dr("popstate")};t9(G,"popstate",e),this.hr=()=>{G&&G.removeEventListener("popstate",e)}}}},heatmaps:class{constructor(e){var t;this.cr=!1,this.er=!1,this.pr=null,this.instance=e,this.cr=!(null==(t=this.instance.persistence)||!t.props[ia]),this.rageclicks=new nl(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return ey(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return eS(this.instance.config.capture_heatmaps)?eS(this.instance.config.enable_heatmaps)?this.cr:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled)this.er||(nx.info("starting..."),this._r(),this.gr());else{var e;clearInterval(null!=(e=this.pr)?e:void 0),this.mr(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[ia]:t}),this.cr=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.C;return this.C=void 0,e}br(e){this.yr(e.originalEvent,"deadclick")}gr(){this.pr&&clearInterval(this.pr),this.pr="visible"===(null==Y?void 0:Y.visibilityState)?setInterval(this.Ft.bind(this),this.flushIntervalMilliseconds):null}_r(){G&&Y&&(this.wr=this.Ft.bind(this),t9(G,"beforeunload",this.wr),this.Er=e=>this.yr(e||(null==G?void 0:G.event)),t9(Y,"click",this.Er,{capture:!0}),this.Sr=e=>this.$r(e||(null==G?void 0:G.event)),t9(Y,"mousemove",this.Sr,{capture:!0}),this.kr=new i8(this.instance,i5,this.br.bind(this)),this.kr.startIfEnabledOrStop(),this.Pr=this.gr.bind(this),t9(Y,"visibilitychange",this.Pr),this.er=!0)}mr(){var e;G&&Y&&(this.wr&&G.removeEventListener("beforeunload",this.wr),this.Er&&Y.removeEventListener("click",this.Er,{capture:!0}),this.Sr&&Y.removeEventListener("mousemove",this.Sr,{capture:!0}),this.Pr&&Y.removeEventListener("visibilitychange",this.Pr),clearTimeout(this.Tr),null==(e=this.kr)||e.stop(),this.er=!1)}Rr(e,t){var i=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),n=function(e,t,i){for(var r=e;r&&sB(r)&&!sz(r,"body")&&r!==i;){if(ec(t,null==G?void 0:G.getComputedStyle(r).position))return!0;r=s2(r)}return!1}(sZ(e),["fixed","sticky"],s);return{x:e.clientX+(n?0:r),y:e.clientY+(n?0:i),target_fixed:n,type:t}}yr(e,t){var i;if(void 0===t&&(t="click"),!sG(e.target)&&nE(e)){var r=this.Rr(e,t);null!=(i=this.rageclicks)&&i.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this.Ir(en({},r,{type:"rageclick"})),this.Ir(r)}}$r(e){!sG(e.target)&&nE(e)&&(clearTimeout(this.Tr),this.Tr=setTimeout(()=>{this.Ir(this.Rr(e,"mousemove"))},500))}Ir(e){if(G){var t=G.location.href,i=this.instance.config.mask_personal_data_properties,r=this.instance.config.custom_personal_data_properties,s=rn(t,i?t2([],rl,r||[]):[],rc);this.C=this.C||{},this.C[s]||(this.C[s]=[]),this.C[s].push(e)}}Ft(){this.C&&!eb(this.C)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:i8,webVitalsAutocapture:class{constructor(e){var t;this.cr=!1,this.er=!1,this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Cr=()=>{clearTimeout(this.Or),0!==this.C.metrics.length&&(this._instance.capture("$web_vitals",this.C.metrics.reduce((e,t)=>en({},e,{["$web_vitals_"+t.name+"_event"]:en({},t),["$web_vitals_"+t.name+"_value"]:t.value}),{})),this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Fr=e=>{var t,i=null==(t=this._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0);if(ew(i))nf.error("Could not read session ID. Dropping metrics!");else{this.C=this.C||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=this.Mr();ew(r)||(eS(null==e?void 0:e.name)||eS(null==e?void 0:e.value)?nf.error("Invalid metric received",e):this.Ar&&e.value>=this.Ar?nf.error("Ignoring metric with value >= "+this.Ar,e):(this.C.url!==r&&(this.Cr(),this.Or=setTimeout(this.Cr,this.flushToCaptureTimeoutMs)),ew(this.C.url)&&(this.C.url=r),this.C.firstMetricTimestamp=ew(this.C.firstMetricTimestamp)?Date.now():this.C.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.C.metrics.push(en({},e,{$current_url:r,$session_id:i.sessionId,$window_id:i.windowId,timestamp:Date.now()})),this.C.metrics.length===this.allowedMetrics.length&&this.Cr()))}},this.Dr=()=>{if(!this.er){var e,t,i,r,s=et.__PosthogExtensions__;ew(s)||ew(s.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:i,onINP:r}=s.postHogWebVitalsCallbacks),e&&t&&i&&r?(this.allowedMetrics.indexOf("LCP")>-1&&e(this.Fr.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&t(this.Fr.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&i(this.Fr.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&r(this.Fr.bind(this)),this.er=!0):nf.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.cr=!(null==(t=this._instance.persistence)||!t.props[ic]),this.startIfEnabled()}get allowedMetrics(){var e,t,i=ey(this._instance.config.capture_performance)?null==(e=this._instance.config.capture_performance)?void 0:e.web_vitals_allowed_metrics:void 0;return eS(i)?(null==(t=this._instance.persistence)?void 0:t.props[ip])||["CLS","FCP","INP","LCP"]:i}get flushToCaptureTimeoutMs(){return(ey(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=ey(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return null!=e&&e}get Ar(){var e=ey(this._instance.config.capture_performance)&&eP(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:9e5;return 0<e&&e<=6e4?9e5:e}get isEnabled(){var e=null==Q?void 0:Q.protocol;if("http:"!==e&&"https:"!==e)return nf.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=ey(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:eT(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return eT(t)?t:this.cr}startIfEnabled(){this.isEnabled&&!this.er&&(nf.info("enabled, starting..."),this.G(this.Dr))}onRemoteConfig(e){if("capturePerformance"in e){var t=ey(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=ey(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ic]:t}),this._instance.persistence.register({[ip]:i})),this.cr=t,this.startIfEnabled()}}G(e){var t,i;if(null!=(t=et.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks)e();else{var r=this.useAttribution?"web-vitals-with-attribution":"web-vitals";null==(i=et.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,r,t=>{t?nf.error("failed to load script",t):e()})}}Mr(){var e=G?G.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties,i=this._instance.config.custom_personal_data_properties;return rn(e,t?t2([],rl,i||[]):[],rc)}nf.error("Could not determine current URL")}}},{exceptionObserver:class{constructor(e){var t,i,r;this.Dr=()=>{var e;if(G&&this.isEnabled&&null!=(e=et.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=et.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,i=et.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=et.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.jr&&this.N.capture_unhandled_errors&&(this.jr=t(this.captureException.bind(this))),!this.Lr&&this.N.capture_unhandled_rejections&&(this.Lr=i(this.captureException.bind(this))),!this.Nr&&this.N.capture_console_errors&&(this.Nr=r(this.captureException.bind(this)))}catch(e){nd.error("failed to start",e),this.Ur()}}},this._instance=e,this.zr=!(null==(t=this._instance.persistence)||!t.props[io]),this.Hr=new eN({refillRate:null!=(i=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)?i:1,bucketSize:null!=(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)?r:10,refillInterval:1e4,h:nd}),this.N=this.Br(),this.startIfEnabledOrStop()}Br(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return ey(e)?t=en({}
11,t,e):(ew(e)?this.zr:e)&&(t=en({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.N.capture_console_errors||this.N.capture_unhandled_errors||this.N.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(nd.info("enabled"),this.Ur(),this.G(this.Dr)):this.Ur()}G(e){var t,i;null!=(t=et.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(i=et.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"exception-autocapture",t=>{if(t)return nd.error("failed to load script",t);e()})}Ur(){var e,t,i;null==(e=this.jr)||e.call(this),this.jr=void 0,null==(t=this.Lr)||t.call(this),this.Lr=void 0,null==(i=this.Nr)||i.call(this),this.Nr=void 0}onRemoteConfig(e){if("autocaptureExceptions"in e){var t=e.autocaptureExceptions;this.zr=!!t,this._instance.persistence&&this._instance.persistence.register({[io]:this.zr}),this.N=this.Br(),this.startIfEnabledOrStop()}}onConfigChange(){this.N=this.Br()}captureException(e){var t,i,r,s=null!=(t=null==e||null==(i=e.$exception_list)||null==(i=i[0])?void 0:i.type)?t:"Exception";this.Hr.consumeRateLimit(s)?nd.info("Skipping exception capture because of client rate limiting.",{exception:s}):null==(r=this._instance.exceptions)||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,i;this.qr=[],this.Vr=new tS([new tN,new tV,new tL,new tA,new tB,new tG,new tq,new tz],function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var s=[],n=t.split("\n"),a=r;a<n.length;a++){var o=n[a];if(!(o.length>1024)){var l=tR.test(o)?o.replace(tR,"$1"):o;if(!l.match(/\S*Error: /)){for(var u of i){var c=u(l,e);if(c){s.push(c);break}}if(s.length>=50)break}}}if(!s.length)return[];var h=Array.from(s);return h.reverse(),h.slice(0,50).map(e=>en({},e,{filename:e.filename||(h[h.length-1]||{}).filename,function:e.function||"?"}))}}("web:javascript",tj,tF)),this._instance=e,this.qr=null!=(t=null==(i=this._instance.persistence)?void 0:i.get_property(il))?t:[]}onRemoteConfig(e){var t,i,r;if("errorTracking"in e){var s=null!=(t=null==(i=e.errorTracking)?void 0:i.suppressionRules)?t:[],n=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this.qr=s,this._instance.persistence&&this._instance.persistence.register({[il]:this.qr,[iu]:n})}}get Wr(){var e,t=!!this._instance.get_property(iu),i=this._instance.config.error_tracking.captureExtensionExceptions;return null!=(e=null!=i?i:t)&&e}buildProperties(e,t){return this.Vr.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})}sendExceptionEvent(e){var t=e.$exception_list;if(this.Gr(t)){if(this.Yr(t))return void nz.info("Skipping exception capture because a suppression rule matched");if(!this.Wr&&this.Jr(t))return void nz.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Kr(t))return void nz.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",e,{_noTruncate:!0,_batchKey:"exceptionEvent",Di:!0})}Yr(e){if(0===e.length)return!1;var t=e.reduce((e,t)=>{var{type:i,value:r}=t;return ex(i)&&i.length>0&&e.$exception_types.push(i),ex(r)&&r.length>0&&e.$exception_values.push(r),e},{$exception_types:[],$exception_values:[]});return this.qr.some(e=>{var i=e.values.map(e=>{var i,r=sb[e.operator],s=e_(e.value)?e.value:[e.value],n=null!=(i=t[e.key])?i:[];return s.length>0&&r(s,n)});return"OR"===e.type?i.some(Boolean):i.every(Boolean)})}Jr(e){return e.flatMap(e=>{var t,i;return null!=(t=null==(i=e.stacktrace)?void 0:i.frames)?t:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}Kr(e){if(e.length>0){var t,i,r,s,n=null!=(t=null==(i=e[0].stacktrace)?void 0:i.frames)?t:[],a=n[n.length-1];return null!=(r=null==a||null==(s=a.filename)?void 0:s.includes("posthog.com/static"))&&r}return!1}Gr(e){return!eS(e)&&e_(e)}}},nQ,{siteApps:class{constructor(e){this._instance=e,this.ts=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}es(e,t){if(t){var i=this.globalsForEvent(t);this.ts.push(i),this.ts.length>1e3&&(this.ts=this.ts.slice(10))}}get siteAppLoaders(){var e;
11return null==(e=et._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.es.bind(this));this.rs=()=>{e(),this.ts=[],this.rs=void 0}}}globalsForEvent(e){if(!e)throw Error("Event payload is required");var t,i,r,s,n,a,o,l={},u=this._instance.get_property("$groups")||[];for(var[c,h]of Object.entries(this._instance.get_property("$stored_group_properties")||{}))l[c]={id:u[c],type:c,properties:h};var{$set_once:d,$set:p}=e;return{event:en({},ea(e,nP),{properties:en({},e.properties,p?{$set:en({},null!=(t=null==(i=e.properties)?void 0:i.$set)?t:{},p)}:{},d?{$set_once:en({},null!=(r=null==(s=e.properties)?void 0:s.$set_once)?r:{},d)}:{}),elements_chain:null!=(n=null==(a=e.properties)?void 0:a.$elements_chain)?n:"",distinct_id:null==(o=e.properties)?void 0:o.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(e){var t=this.apps[e.id],i=()=>{var i;!t.errored&&this.ts.length&&(nO.info("Processing "+this.ts.length+" events for site app with id "+e.id),this.ts.forEach(e=>null==t.processEvent?void 0:t.processEvent(e)),t.processedBuffer=!0),Object.values(this.apps).every(e=>e.processedBuffer||e.errored)&&(null==(i=this.rs)||i.call(this))},r=!1,s=s=>{t.errored=!s,t.loaded=!0,nO.info("Site app with id "+e.id+" "+(s?"loaded":"errored")),r&&i()};try{var{processEvent:n}=e.init({posthog:this._instance,callback:e=>{s(e)}});n&&(t.processEvent=n),r=!0}catch(t){nO.error("Error while initializing PostHog app with config id "+e.id,t),s(!1)}if(r&&t.loaded)try{i()}catch(i){nO.error("Error while processing buffered events PostHog app with config id "+e.id,i),t.errored=!0}}ss(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var i of e)this.setupSiteApp(i)}ns(e){if(0!==Object.keys(this.apps).length){var t=this.globalsForEvent(e);for(var i of Object.values(this.apps))try{null==i.processEvent||i.processEvent(t)}catch(t){nO.error("Error while processing event "+e.event+" for site app "+i.id,t)}}}onRemoteConfig(e){var t,i,r,s=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this.ss(),void this._instance.on("eventCaptured",e=>this.ns(e))):void nO.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(i=this.rs)||i.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled){var n=function(e){var t;et["__$$ph_site_app_"+e]=s._instance,null==(t=et.__PosthogExtensions__)||null==t.loadSiteApp||t.loadSiteApp(s._instance,o,t=>{if(t)return nO.error("Error while initializing PostHog app with config id "+e,t)})};for(var{id:a,url:o}of e.siteApps)n(a)}else nO.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},nX,{tracingHeaders:class{constructor(e){this.os=void 0,this.ls=void 0,this.Dr=()=>{var e,t;ew(this.os)&&(null==(e=et.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),ew(this.ls)&&(null==(t=et.__PosthogExtensions__)||null==(t=t.tracingHeadersPatchFns)||t._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}G(e){var t,i;null!=(t=et.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(i=et.__PosthogExtensions__)||null==i.loadExternalDependency||i.loadExternalDependency(this._instance,"tracing-headers",t=>{if(t)return ng.error("failed to load script",t);e()})}startIfEnabledOrStop(){var e,t;this._instance.config.__add_tracing_headers?this.G(this.Dr):(null==(e=this.os)||e.call(this),null==(t=this.ls)||t.call(this),this.os=void 0,this.ls=void 0)}}},{toolbar:class{constructor(e){this.instance=e}bs(e){et.ph_toolbar_state=e}ys(){var e;return null!=(e=et.ph_toolbar_state)?e:nR.UNINITIALIZED}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,i){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),ie(this.instance.config)||!G||!Y)return!1;e=null!=e?e:G.location,i=null!=i?i:G.history;try{if(!t){try{G.localStorage.setItem("test","test"),G.localStorage.removeItem("test")}catch(e){return!1}t=null==G?void 0:G.localStorage}var r,s=nI||ra(e.hash,"__posthog")||ra(e.hash,"state"),n=s?t5(()=>JSON.parse(atob(decodeURIComponent(s))))||t5(()=>JSON.parse(decodeURIComponent(s))):null;return n&&"ph_authorize"===n.action?((r=n).source="url",r&&Object.keys(r).length>0&&(n.desiredHash?e.hash=n.desiredHash:i?i.replaceState(i.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(nM)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch(e){return!1}}ws(e){var t=et.ph_load_toolbar||et.ph_load_editor;!eS(t)&&em(t)?t(e,this.instance):nF.warn("No toolbar load function found")}loadToolbar(e){var t,i=!(null==Y||!Y.getElementById(iF));if(!G||i)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,s=en({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});return(G.localStorage.setItem(nM,JSON.stringify(en({},s,{source:void 0}))),this.ys()===nR.LOADED)?this.ws(s):this.ys()===nR.UNINITIALIZED&&(this.bs(nR.LOADING),null==(t=et.__PosthogExtensions__)||null==t.loadExternalDependency||t.loadExternalDependency(this.instance,"toolbar",e=>{e?(nF.error("[Toolbar] Failed to load",e),this.bs(nR.UNINITIALIZED)):(this.bs(nR.LOADED),this.ws(s))}),t9(G,"turbolinks:load",()=>{this.bs(nR.UNINITIALIZED),this.loadToolbar(s)})),!0}Es(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,i){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===i&&(i=void 0),this.maybeLoadToolbar(e,t,i)}}},nJ,{conversations:class{constructor(e){this.xs=void 0,this._conversationsManager=null,this.Ss=!1,this.$s=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;eS(t)||(eT(t)?this.xs=t:(this.xs=t.enabled,this.$s=t),this.loadIfEnabled())}}reset(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this.xs=void 0,this.$s=null}loadIfEnabled(){if(!(this._conversationsManager||this.Ss||this._instance.config.disable_conversations||ie(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=null==et?void 0:et.__PosthogExtensions__;if(e&&!ew(this.xs)&&this.xs)if(this.$s&&this.$s.token){this.Ss=!0;try{var t=e.initConversations;if(t)return this.ks(t),void(this.Ss=!1);var i=e.loadExternalDependency;if(!i)return void this.Ps("PostHog loadExternalDependency extension not found.");i(this._instance,"conversations",t=>{t||!e.initConversations?this.Ps("Could not load conversations script",t):this.ks(e.initConversations),this.Ss=!1})}catch(e){this.Ps("Error initializing conversations",e),this.Ss=!1}}else nK.error("Conversations enabled but missing token in remote config.")}}ks(e){if(this.$s)try{this._conversationsManager=e(this.$s,this._instance),nK.info("Conversations loaded successfully")}catch(e){this.Ps("Error completing conversations initialization",e)}else nK.error("Cannot complete initialization: remote config is null")}Ps(e,t){nK.error(e,t),this._conversationsManager=null,this.Ss=!1}show(){this._conversationsManager?this._conversationsManager.show():nK.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return!0===this.xs&&!ek(this._conversationsManager)}isVisible(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&e}sendMessage(e,t,i){var r=this;return es(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,i):(nK.warn("Conversations not available yet."),null)})()}getMessages(e,t){var i=this;return es(function*(){return i._conversationsManager?i._conversationsManager.getMessages(e,t):(nK.warn("Conversations not available yet."),null)})()}markAsRead(e){var t=this;return es(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(nK.warn("Conversations not available yet."),null)})()}getTickets(e){var t=this;return es(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(nK.warn("Conversations not available yet."),null)})()}requestRestoreLink(e){var t=this;return es(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(nK.warn("Conversations not available yet."),null)})()}restoreFromToken(e){var t=this;return es(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(nK.warn("Conversations not available yet."),null)})()}restoreFromUrlToken(){var e=this;return es(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(nK.warn("Conversations not available yet."),null)})()}getCurrentTicketId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())?e:null}getWidgetSessionId(){var e,t;return null!=(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())?e:null}}},{logs:class{constructor(e){var t;this.Ts=!1,this.Rs=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this.Ts=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,i=null==(t=e.logs)?void 0:t.captureConsoleLogs;!eS(i)&&i&&(this.Ts=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Ts&&!this.Rs){var e=tY("[logs]"),t=null==et?void 0:et.__PosthogExtensions__;if(t){var i=t.loadExternalDependency;i?i(this._instance,"logs",i=>{var r;i||null==(r=t.logs)||!r.initializeLogs?e.error("Could not load logs script",i):(t.logs.initializeLogs(this._instance),this.Rs=!0)}):e.error("PostHog loadExternalDependency extension not found.")}else e.error("PostHog Extensions not found.")}}}});sH.__defaultExtensionClasses=en({},nZ);var n0,n1,n2,n3,n5,n4,n8,n6,n7=(n6=sF[sA]=new sH,function(){function e(){e.done||(e.done=!0,sL=!1,t0(sF,function(e){e._dom_loaded()}))}null!=Y&&Y.addEventListener?"complete"===Y.readyState?e():t9(Y,"DOMContentLoaded",e,{capture:!1}):G&&tK.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),n6),n9=(0,s.createContext)({client:n7,bootstrap:void 0});function ae(e){var t,i,r=e.children,n=e.client,a=e.apiKey,o=e.options,l=(0,s.useRef)(null),u=(0,s.useMemo)(function(){return n?(a&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),o&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n):(a||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),n7)},[n,a,JSON.stringify(o)]);return(0,s.useEffect)(function(){if(!n){var e=l.current;e?(a!==e.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),o&&!function e(t,i,r){if(void 0===r&&(r=new WeakMap),t===i)return!0;
11if("object"!=typeof t||null===t||"object"!=typeof i||null===i)return!1;if(r.has(t)&&r.get(t)===i)return!0;r.set(t,i);var s=Object.keys(t),n=Object.keys(i);if(s.length!==n.length)return!1;for(var a=0;a<s.length;a++){var o=s[a];if(!n.includes(o)||!e(t[o],i[o],r))return!1}return!0}(o,e.options)&&n7.set_config(o)):(n7.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),n7.init(a,o)),l.current={apiKey:a,options:null!=o?o:{}}}},[n,a,JSON.stringify(o)]),s.default.createElement(n9.Provider,{value:{client:u,bootstrap:null!=(t=null==o?void 0:o.bootstrap)?t:null==(i=null==n?void 0:n.config)?void 0:i.bootstrap}},r)}var at=function(e){return"function"==typeof e},ai=function(e,t){return(ai=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)};"function"==typeof SuppressedError&&SuppressedError;var ar={componentStack:null,exceptionEvent:null,error:null},as=s.default.Component;if("function"!=typeof as&&null!==as)throw TypeError("Class extends value "+String(as)+" is not a constructor or null");function an(){this.constructor=aa}function aa(e){var t=as.call(this,e)||this;return t.state=ar,t}function ao({children:e}){return(0,s.useEffect)(()=>{n7.init(H.clientConfig.NEXT_PUBLIC_POSTHOG_KEY,{api_host:H.clientConfig.NEXT_PUBLIC_POSTHOG_HOST,capture_pageview:!0})},[]),(0,t.jsx)(ae,{client:n7,children:e})}ai(aa,as),aa.prototype=null===as?Object.create(as):(an.prototype=as.prototype,new an),aa.prototype.componentDidCatch=function(e,t){var i,r=this.props.additionalProperties;at(r)?i=r(e):"object"==typeof r&&(i=r);var s=this.context.client.captureException(e,i),n=t.componentStack;this.setState({error:e,componentStack:null!=n?n:null,exceptionEvent:s})},aa.prototype.render=function(){var e=this.props,t=e.children,i=e.fallback,r=this.state;if(null==r.componentStack)return at(t)?t():t;var n=at(i)?s.default.createElement(i,{error:r.error,componentStack:r.componentStack,exceptionEvent:r.exceptionEvent}):i;return s.default.isValidElement(n)?n:(console.warn("[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."),s.default.createElement(s.default.Fragment,null))},aa.contextType=n9;var al=e.i(45526);let au=()=>(0,t.jsx)("div",{children:(0,t.jsx)(al.Toaster,{position:"bottom-center",reverseOrder:!1})});var ac=e.i(30986),ah=e.i(3775),ad=e.i(46179),ap=e.i(97165),ag=class extends ap.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,i){let r=t.queryKey,s=t.queryHash??(0,ac.hashQueryKeyByOptions)(r,t),n=this.get(s);return n||(n=new ah.Query({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(t),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(n)),n}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ad.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,ac.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,ac.matchQuery)(e,t)):t}notify(e){ad.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ad.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ad.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},af=e.i(23231),av=ap,a_=class extends av.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#i=new Map,this.#r=0}#t;#i;#r;build(e,t,i){let r=new af.Mutation({mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(t),state:i});return this.add(r),r}add(e){this.#t.add(e);let t=am(e);if("string"==typeof t){let i=this.#i.get(t);i?i.push(e):this.#i.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=am(e);if("string"==typeof t){let i=this.#i.get(t);if(i)if(i.length>1){let t=i.indexOf(e);-1!==t&&i.splice(t,1)}else i[0]===e&&this.#i.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=am(e);if("string"!=typeof t)return!0;
11{let i=this.#i.get(t),r=i?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=am(e);if("string"!=typeof t)return Promise.resolve();{let i=this.#i.get(t)?.find(t=>t!==e&&t.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){ad.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#i.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,ac.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,ac.matchMutation)(e,t))}notify(e){ad.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ad.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(ac.noop))))}};function am(e){return e.options.scope?.id}var ay=e.i(13168),ab=e.i(37899);function aw(e){return{onFetch:(t,i)=>{let r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,n=t.state.data?.pages||[],a=t.state.data?.pageParams||[],o={pages:[],pageParams:[]},l=0,u=async()=>{let i=!1,u=(0,ac.ensureQueryFn)(t.options,t.fetchOptions),c=async(e,r,s)=>{let n;if(i)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);let a=(Object.defineProperty(n={client:t.client,queryKey:t.queryKey,pageParam:r,direction:s?"backward":"forward",meta:t.options.meta},"signal",{enumerable:!0,get:()=>(t.signal.aborted?i=!0:t.signal.addEventListener("abort",()=>{i=!0}),t.signal)}),n),o=await u(a),{maxPages:l}=t.options,c=s?ac.addToStart:ac.addToEnd;return{pages:c(e.pages,o,l),pageParams:c(e.pageParams,r,l)}};if(s&&n.length){let e="backward"===s,t={pages:n,pageParams:a},i=(e?function(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}:ax)(r,t);o=await c(t,i,e)}else{let t=e??n.length;do{let e=0===l?a[0]??r.initialPageParam:ax(r,o);if(l>0&&null==e)break;o=await c(o,e),l++}while(l<t)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i):t.fetchFn=u}}}function ax(e,{pages:t,pageParams:i}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,i[r],i):void 0}var aE=class{#s;#n;#a;#o;#l;#u;#c;#h;constructor(e={}){this.#s=e.queryCache||new ag,this.#n=e.mutationCache||new a_,this.#a=e.defaultOptions||{},this.#o=new Map,this.#l=new Map,this.#u=0}mount(){this.#u++,1===this.#u&&(this.#c=ay.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#s.onFocus())}),this.#h=ab.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#s.onOnline())}))}unmount(){this.#u--,0===this.#u&&(this.#c?.(),this.#c=void 0,this.#h?.(),this.#h=void 0)}isFetching(e){return this.#s.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#n.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#s.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),i=this.#s.build(this,t),r=i.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime((0,ac.resolveStaleTime)(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#s.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,i){let r=this.defaultQueryOptions({queryKey:e}),s=this.#s.get(r.queryHash),n=s?.state.data,a=(0,ac.functionalUpdate)(t,n);if(void 0!==a)return this.#s.build(this,r).setData(a,{...i,manual:!0})}setQueriesData(e,t,i){return ad.notifyManager.batch(()=>this.#s.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,i)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#s.get(t.queryHash)?.state}removeQueries(e){let t=this.#s;ad.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let i=this.#s;return ad.notifyManager.batch(()=>(i.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let i={revert:!0,...t};return Promise.all(ad.notifyManager.batch(()=>this.#s.findAll(e).map(e=>e.cancel(i)))).then(ac.noop).catch(ac.noop)}invalidateQueries(e,t={}){return ad.notifyManager.batch(()=>
11(this.#s.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let i={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(ad.notifyManager.batch(()=>this.#s.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,i);return i.throwOnError||(t=t.catch(ac.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(ac.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let i=this.#s.build(this,t);return i.isStaleByTime((0,ac.resolveStaleTime)(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ac.noop).catch(ac.noop)}fetchInfiniteQuery(e){return e.behavior=aw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ac.noop).catch(ac.noop)}ensureInfiniteQueryData(e){return e.behavior=aw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ab.onlineManager.isOnline()?this.#n.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#s}getMutationCache(){return this.#n}getDefaultOptions(){return this.#a}setDefaultOptions(e){this.#a=e}setQueryDefaults(e,t){this.#o.set((0,ac.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#o.values()],i={};return t.forEach(t=>{(0,ac.partialMatchKey)(e,t.queryKey)&&Object.assign(i,t.defaultOptions)}),i}setMutationDefaults(e,t){this.#l.set((0,ac.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],i={};return t.forEach(t=>{(0,ac.partialMatchKey)(e,t.mutationKey)&&Object.assign(i,t.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#a.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,ac.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ac.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#a.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#s.clear(),this.#n.clear()}},ak=e.i(80488),aS=function(){return null};function aP({children:e}){let[i]=(0,s.useState)(()=>new aE({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}}));return(0,t.jsxs)(ak.QueryClientProvider,{client:i,children:[e,(0,t.jsx)(aS,{initialIsOpen:!1})]})}function aO({children:e}){return(0,t.jsxs)("html",{lang:"en",suppressHydrationWarning:!0,children:[(0,t.jsx)(h.GoogleTagManager,{gtmId:H.clientConfig.NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID}),(0,t.jsx)("body",{className:`dark:bg-black ${L.className}`,children:(0,t.jsx)(aP,{children:(0,t.jsx)(ao,{children:(0,t.jsx)(i.SessionProvider,{children:(0,t.jsx)(U,{children:(0,t.jsxs)(E,{enableSystem:!1,attribute:"class",defaultTheme:"light",children:[(0,t.jsx)(R,{}),(0,t.jsx)(F,{}),(0,t.jsx)(au,{}),e,(0,t.jsx)(c,{}),(0,t.jsx)(_,{}),(0,t.jsx)(N,{})]})})})})})})]})}e.s(["default",()=>aO],60181)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.