1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32],{1722:function(e,t,n){"use strict";var r=n(20055),i=n(23400);t.iV=r.default,i.default},59943:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1593),i=n(58496),s=n(92797),o=n(61533),a=n(72971),l=i&&i.__esModule?i:{default:i};let u=i.forwardRef(function(e,t){let{locale:n,localePrefix:i,...u}=e,c=s.default(),d=n||c,h=o.getLocalePrefix(d,i);return l.default.createElement(a.default,r.extends({ref:t,locale:d,localePrefixMode:i.mode,prefix:h},u))});u.displayName="ClientLink",t.default=u},23400:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1593),i=n(58496),s=n(92797),o=n(30804),a=n(97734),l=n(59943),u=n(17419),c=n(15787),d=n(72449),h=i&&i.__esModule?i:{default:i};t.default=function(e){let t=o.receiveLocalizedNavigationRoutingConfig(e);function n(){let e=s.default();if(!t.locales.includes(e))throw Error(void 0);return e}let f=i.forwardRef(function(e,i){let{href:s,locale:o,...u}=e,c=n(),d=o||c;return h.default.createElement(l.default,r.extends({ref:i,href:a.compileLocalizedPathname({locale:d,pathname:s,params:"object"==typeof s?s.params:void 0,pathnames:t.pathnames}),locale:o,localePrefix:t.localePrefix},u))});function p(e){let{href:n,locale:r}=e;return a.compileLocalizedPathname({...a.normalizeNameOrNameWithParams(n),locale:r,pathnames:t.pathnames})}return f.displayName="Link",{Link:f,redirect:function(e){let r=p({href:e,locale:n()});for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return u.clientRedirect({pathname:r,localePrefix:t.localePrefix},...s)},permanentRedirect:function(e){let r=p({href:e,locale:n()});for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return u.clientPermanentRedirect({pathname:r,localePrefix:t.localePrefix},...s)},usePathname:function(){let e=c.default(t.localePrefix),r=n();return e?a.getRoute({pathname:e,locale:r,pathnames:t.pathnames}):e},useRouter:function(){let e=d.default(t.localePrefix),r=n();return{...e,push(t){for(var n,i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];let a=p({href:t,locale:(null===(n=s[0])||void 0===n?void 0:n.locale)||r});return e.push(a,...s)},replace(t){for(var n,i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];let a=p({href:t,locale:(null===(n=s[0])||void 0===n?void 0:n.locale)||r});return e.replace(a,...s)},prefetch(t){for(var n,i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];let a=p({href:t,locale:(null===(n=s[0])||void 0===n?void 0:n.locale)||r});return e.prefetch(a,...s)}}},getPathname:p}}},20055:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1593),i=n(58496),s=n(30804),o=n(59943),a=n(17419),l=n(15787),u=n(72449),c=i&&i.__esModule?i:{default:i};t.default=function(e){let t=s.receiveSharedNavigationRoutingConfig(e),n=i.forwardRef(function(e,n){return c.default.createElement(o.default,r.extends({ref:n,localePrefix:t.localePrefix},e))});return n.displayName="Link",{Link:n,redirect:function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return a.clientRedirect({pathname:e,localePrefix:t.localePrefix},...r)},permanentRedirect:function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return a.clientPermanentRedirect({pathname:e,localePrefix:t.localePrefix},...r)},usePathname:function(){return l.default(t.localePrefix)},useRouter:function(){return u.default(t.localePrefix)}}}},17419:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(92797),i=n(6261);function s(e){return function(t){let n;try{n=r.default()}catch(e){throw e}for(var i=arguments.length,s=Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];return e({...t,locale:n},...s)}}let o=s(i.baseRedirect),a=s(i.basePermanentRedirect);t.clientPermanentRedirect=a,t.clientRedirect=o},15787:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88779),i=n(58496),s=n(92797),o=n(61533);t.default=function(e){let t=r.usePathname(),n=s.default();return i.useMemo(()=>
1{if(!t)return t;let r=o.getLocalePrefix(n,e);return o.hasPathnamePrefixed(r,t)?o.unprefixPathname(t,r):t},[n,e,t])}},72449:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88779),i=n(58496),s=n(92797),o=n(61533),a=n(15397),l=n(97734);t.default=function(e){let t=r.useRouter(),n=s.default(),u=r.usePathname();return i.useMemo(()=>{function r(t){return function(r,i){let{locale:s,...c}=i||{};a.default(u,n,s);let d=[function(t,r){let i=window.location.pathname,s=l.getBasePath(u);s&&(i=i.replace(s,""));let a=r||n,c=o.getLocalePrefix(a,e);return o.localizeHref(t,a,n,i,c)}(r,s)];return Object.keys(c).length>0&&d.push(c),t(...d)}}return{...t,push:r(t.push),replace:r(t.replace),prefetch:r(t.prefetch)}},[n,e,u,t])}},72971:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1593),i=n(56788),s=n(88779),o=n(58496),a=n(92797),l=n(61533),u=n(15397);function c(e){return e&&e.__esModule?e:{default:e}}var d=c(i),h=c(o);let f=o.forwardRef(function(e,t){let{href:n,locale:i,localePrefixMode:c,onClick:f,prefetch:p,prefix:v,...g}=e,m=s.usePathname(),_=a.default(),y=i!==_,[b,w]=o.useState(()=>l.isLocalizableHref(n)&&("never"!==c||y)?l.prefixHref(n,v):n);return o.useEffect(()=>{m&&w(l.localizeHref(n,i,_,m,v))},[_,n,i,m,v]),y&&(p=!1),h.default.createElement(d.default,r.extends({ref:t,href:b,hrefLang:y?i:void 0,onClick:function(e){u.default(m,_,i),f&&f(e)},prefetch:p},g))});f.displayName="ClientLink",t.default=f},30804:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5027);t.receiveLocalizedNavigationRoutingConfig=function(e){return{...e,localePrefix:r.re
1ceiveLocalePrefixConfig(null==e?void 0:e.localePrefix)}},t.receiveSharedNavigationRoutingConfig=function(e){return{...e,localePrefix:r.receiveLocalePrefixConfig(null==e?void 0:e.localePrefix)}}},6261:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(88779),i=n(61533);function s(e){return function(t){let n=i.getLocalePrefix(t.locale,t.localePrefix),r="never"!==t.localePrefix.mode&&i.isLocalHref(t.pathname)?i.prefixPathname(n,t.pathname):t.pathname;for(var s=arguments.length,o=Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];return e(r,...o)}}let o=s(r.redirect),a=s(r.permanentRedirect);t.basePermanentRedirect=a,t.baseRedirect=o},15397:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(26664),i=n(97734);t.default=function(e,t,n){if(!(n!==t&&null!=n)||!e)return;let s=i.getBasePath(e);document.cookie="".concat(r.COOKIE_LOCALE_NAME,"=").concat(n,"; path=").concat(""!==s?s:"/","; max-age=").concat(r.COOKIE_MAX_AGE,"; sameSite=").concat(r.COOKIE_SAME_SITE)}},97734:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(61533);function i(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.append(n,String(e))}):t.set(n,String(r));return"?"+t.toString()}t.compileLocalizedPathname=function(e){let{pathname:t,locale:n,params:r,pathnames:s,query:o}=e;function a(e){let t=s[e];return t||(t=e),t}function l(e){let t="string"==typeof e?e:e[n];return r&&Object.entries(r).forEach(e=>{let[n,r]=e;t=Array.isArray(r)?t.replace(RegExp("(\\[)?\\[...".concat(n,"\\](\\])?"),"g"),r.map(e=>String(e)).join("/")):t.replace("[".concat(n,"]"),String(r))}),o&&(t+=i(o)),t}if("string"==typeof t)return l(a(t));{let{pathname:e,...n}=t;return{...n,pathname:l(a(e))}}},t.getBasePath=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.pathname;return"/"===e?t:t.replace(e,"")},t.getRoute=function(e){var t;let{locale:n,pathname:i,pathnames:s}=e,o=decodeURI(i),a=null===(t=Object.entries(s).find(e=>{let[,t]=e,i="string"!=typeof t?t[n]:t;return r.matchesPathname(i,o)}))||void 0===t?void 0:t[0];return a||(a=i),a},t.normalizeNameOrNameWithParams=function(e){return"string"==typeof e?{pathname:e}:e},t.serializeSearchParams=i},5027:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.receiveLocalePrefixConfig=function(e){return"object"==typeof e?e:{mode:e||"always"}}},61533:function(e,t){"use strict";function n(e){let t="object"==typeof e?e.pathname:e;return null!=t&&!t.startsWith("/")}function r(e){return"object"==typeof e?null==e.host&&null==e.hostname:!/^[a-z]+:/i.test(e)}function i(e){return r(e)&&!n(e)}function s(e,t){let n;return"string"==typeof e?n=o(t,e):(n={...e},e.pathname&&(n.pathname=o(t,e.pathname))),n}function o(e,t){let n=e;return/^\/(\?.*)?$/.test(t)&&(t=t.slice(1)),n+=t}function a(e,t){return t===e||t.startsWith("".concat(e,"/"))}function l(e){let t=e.replace(/\[\[(\.\.\.[^\]]+)\]\]/g,"?(.*)").replace(/\[(\.\.\.[^\]]+)\]/g,"(.+)").replace(/\[([^\]]+)\]/g,"([^/]+)");return new RegExp("^".concat(t,"$"))}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalePrefix=function(e,t){var n;return"never"!==t.mode&&(null===(n=t.prefixes)||void 0===n?void 0:n[e])||"/"+e},t.hasPathnamePrefixed=a,t.isLocalHref=r,t.isLocalizableHref=i,t.isRelativeHref=n,t.localizeHref=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!i(e))return e;let l=a(o,r);return(t!==n||l)&&null!=o?s(e,o):e},t.matchesPathname=function(e,t){return l(e).test(t)},t.prefixHref=s,t.prefixPathname=o,t.templateToRegex=l,t.unprefixPathname=function(e,t){return e.replace(new RegExp("^".concat(t)),"")||"/"}},50373:function(e,t,n){"use strict";var r=Object.create,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>i(e,"name",{value:t,configurable:!0}),c=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of o(t))l.call(e,a)||a===n||i(e,a,{get:()=>t[a],enumerable:!(r=s(t,a))||r.enumerable});return e},d=(e,t,n)=>(n=null!=e?r(a(e)):{}
1,c(!t&&e&&e.__esModule?n:i(n,"default",{value:e,enumerable:!0}),e)),h={};((e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})})(h,{Next13ProgressBar:()=>b,default:()=>w,useRouter:()=>m}),e.exports=c(i({},"__esModule",{value:!0}),h);var f=d(n(58496)),p=d(n(96046)),v=n(88779),g=f.default.memo(({color:e="#0A2FFF",height:t="2px",options:n,showOnShallow:r=!1,delay:i=0,style:s})=>{let o=f.default.createElement("style",null,s||` 2 #nprogress { 3 pointer-events: none; 4 } 5 6 #nprogress .bar { 7 background: ${e}; 8 9 position: fixed; 10 z-index: 1031; 11 top: 0; 12 left: 0; 13 14 width: 100%; 15 height: ${t}; 16 } 17 18 /* Fancy blur effect */ 19 #nprogress .peg { 20 display: block; 21 position: absolute; 22 right: 0px; 23 width: 100px; 24 height: 100%; 25 box-shadow: 0 0 10px ${e}, 0 0 5px ${e}; 26 opacity: 1.0; 27 28 -webkit-transform: rotate(3deg) translate(0px, -4px); 29 -ms-transform: rotate(3deg) translate(0px, -4px); 30 transform: rotate(3deg) translate(0px, -4px); 31 } 32 33 /* Remove these to get rid of the spinner */ 34 #nprogress .spinner { 35 display: block; 36 position: fixed; 37 z-index: 1031; 38 top: 15px; 39 right: 15px; 40 } 41 42 #nprogress .spinner-icon { 43 width: 18px; 44 height: 18px; 45 box-sizing: border-box; 46 47 border: solid 2px transparent; 48 border-top-color: ${e}; 49 border-left-color: ${e}; 50 border-radius: 50%; 51 52 -webkit-animation: nprogress-spinner 400ms linear infinite; 53 animation: nprogress-spinner 400ms linear infinite; 54 } 55 56 .nprogress-custom-parent { 57 overflow: hidden; 58 position: relative; 59 } 60 61 .nprogress-custom-parent #nprogress .spinner, 62 .nprogress-custom-parent #nprogress .bar { 63 position: absolute; 64 } 65 66 @-webkit-keyframes nprogress-spinner { 67 0% { -webkit-transform: rotate(0deg); } 68 100% { -webkit-transform: rotate(360deg); } 69 } 70 @keyframes nprogress-spinner { 71 0% { transform: rotate(0deg); } 72 100% { transform: rotate(360deg); } 73 } 74 `);p.default.configure(n||{});let a=(0,v.usePathname)(),l=(0,v.useSearchParams)();return(0,f.useEffect)(()=>{p.default.done()},[a,l]),(0,f.useEffect)(()=>{let e,t=u(()=>{e=setTimeout(p.default.start,i)},"startProgress"),n=u(()=>{clearTimeout(e),p.default.done()},"stopProgress"),s=u(e=>{let n=e.currentTarget;if("_blank"===n.target||"_top"===n.target||"_parent"===n.target||n.hasAttribute("download"))return;let i=new URL(n.href),s=new URL(location.href),o=i?.searchParams?.toString()!==s?.searchParams?.toString()&&i?.search!==s?.search,a=i?.pathname===s?.pathname&&!o;e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||r&&a||a||t()},"handleAnchorClick");new MutationObserver(u(()=>{Array.from(document.querySelectorAll("a")).filter(e=>!(e.href.startsWith("tel:+")||e.href.startsWith("mailto:"))&&e.href&&"_blank"!==e.target).forEach(e=>e.addEventListener("click",s))},"handleMutation")).observe(document,{childList:!0,subtree:!0}),window.history.pushState=new Proxy(window.history.pushState,{apply:(e,t,r)=>(n(),e.apply(t,r))})},[]),o},()=>!0);function m(){let e=(0,v.useRouter)(),t=(0,v.usePathname)();function n(n,r){let i=new URL(n,location.href),s=new URL(location.href),o=i?.searchParams?.toString()!==s?.searchParams?.toString()&&i?.search!==s?.search;return i.pathname!==t||o?(p.default.start(),e.push(n,r)):Promise.resolve(!0)}function r(n,r){return new URL(n,location.href).pathname===t?Promise.resolve(!0):(p.default.start(),e.replace(n,r))}return u(n,"push"),u(r,"replace"),{...e,push:n,replace:r}}u(m,"useRouter");var _=d(n(58496));function y(e){return u(function(t){return _.default.createElement(_.default.Suspense,null,_.default.createElement(e,{...t}))},"WithSuspenseComponent")}u(y,"withSuspense");var b=y(g),w=b},62555:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(94518)},94518:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}
74catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l=[],u=!1,c=-1;function d(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||a(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}},o=!0;try{t[e](s,s.exports,r),o=!1}finally{o&&delete n[e]}return s.exports}r.ab="//";var i=r(229);e.exports=i}()},96046:function(e,t,n){var r,i;void 0!==(i="function"==typeof(r=function(){var e,t,n,r={};r.version="0.2.0";var i=r.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function s(e,t,n){return e<t?t:e>n?n:e}r.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(i[t]=n);return this},r.status=null,r.set=function(e){var t=r.isStarted();e=s(e,i.minimum,1),r.status=1===e?null:e;var n=r.render(!t),l=n.querySelector(i.barSelector),u=i.speed,c=i.easing;return n.offsetWidth,o(function(t){var s,o;""===i.positionUsing&&(i.positionUsing=r.getPositioningCSS()),a(l,(s=e,(o="translate3d"===i.positionUsing?{transform:"translate3d("+(-1+s)*100+"%,0,0)"}:"translate"===i.positionUsing?{transform:"translate("+(-1+s)*100+"%,0)"}:{"margin-left":(-1+s)*100+"%"}).transition="all "+u+"ms "+c,o)),1===e?(a(n,{transition:"none",opacity:1}),n.offsetWidth,setTimeout(function(){a(n,{transition:"all "+u+"ms linear",opacity:0}),setTimeout(function(){r.remove(),t()},u)},u)):setTimeout(t,u)}),this},r.isStarted=function(){return"number"==typeof r.status},r.start=function(){r.status||r.set(0);var e=function(){setTimeout(function(){r.status&&(r.trickle(),e())},i.trickleSpeed)};return i.trickle&&e(),this},r.done=function(e){return e||r.status?r.inc(.3+.5*Math.random()).set(1):this},r.inc=function(e){var t=r.status;return t?("number"!=typeof e&&(e=(1-t)*s(Math.random()*t,.1,.95)),t=s(t+e,0,.994),r.set(t)):r.start()},r.trickle=function(){return r.inc(Math.random()*i.trickleRate)},e=0,t=0,r.promise=function(n){return n&&"resolved"!==n.state()&&(0===t&&r.start(),e++,t++,n.always(function(){0==--t?(e=0,r.done()):r.set((e-t)/e)})),this},r.render=function(e){if(r.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=i.template;var n,s=t.querySelector(i.barSelector),o=e?"-100":(-1+(r.status||0))*100,l=document.querySelector(i.parent);return a(s,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"}),!i.showSpinner&&(n=t.querySelector(i.spinnerSelector))&&h(n),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(t),t},r.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(i.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&h(e)},r.isRendered=function(){return!!document.getElementById("nprogress")},r.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective" in e?"translate3d":t+"Transform" in e?"translate":"margin"};var o=(n=[],function(e){n.push(e),1==n.length&&function e(){var t=n.shift();t&&t(e)}()}),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n,r,i){var s;r=t[s=(s=r).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]||(t[s]=function(t){var n=document.body.style;if(t in n)return t;for(var r,i=e.length,s=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((r=e[i]+s)in n)return r;return t}(s)),n.style[r]=i}return function(e,t){var r,i,s=arguments;if(2==s.length)for(r in t)void 0!==(i=t[r])&&t.hasOwnProperty(r)&&n(e,r,i);else n(e,s[1],s[2])}}();function l(e,t){return("string"==typeof e?e:d(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=d(e),r=n+t;l(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=d(e);l(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function d(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function h(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return r})?r.call(t,n,t,e):r)&&(e.exports=i)},59634:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
74t%2?r(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,s=[],o=!0,a=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(s.push(r.value),!t||s.length!==t);o=!0);}catch(e){a=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(a)throw i}}return s}}(e,t)||h(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=h(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,s=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw s}}}}n.d(t,{ZP:function(){return r9}});var v={DEBUG:!1,LIB_VERSION:"1.139.3"},g=Array.isArray,m=Object.prototype,_=m.hasOwnProperty,y=m.toString,b=g||function(e){return"[object Array]"===y.call(e)},w=function(e){return"function"==typeof e},k=function(e){return e===Object(e)&&!b(e)},x=function(e){if(k(e)){for(var t in e)if(_.call(e,t))return!1;return!0}return!1},S=function(e){return void 0===e},P=function(e){return"[object String]"==y.call(e)},E=function(e){return null===e},R=function(e){return S(e)||E(e)},F=function(e){return"[object Number]"==y.call(e)},I=function(e){return"[object Boolean]"===y.call(e)},C="undefined"!=typeof window?window:void 0,T="undefined"!=typeof globalThis?globalThis:C,O=Array.prototype,A=O.forEach,M=O.indexOf,L=null==T?void 0:T.navigator,N=null==T?void 0:T.document,$=null==T?void 0:T.location,D=null==T?void 0:T.fetch,q=null!=T&&T.XMLHttpRequest&&"withCredentials"in new T.XMLHttpRequest?T.XMLHttpRequest:void 0,B=null==T?void 0:T.AbortController,H=null==L?void 0:L.userAgent,j=null!=C?C:{},z="[PostHog.js]",U={_log:function(e){if(C&&(v.DEBUG||j.POSTHOG_DEBUG)&&!S(C.console)&&C.console){for(var t=("__rrweb_original__"in C.console[e])?C.console[e].__rrweb_original__:C.console[e],n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.apply(void 0,[z].concat(r))}},info:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];U._log.apply(U,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];U._log.apply(U,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];U._log.apply(U,["error"].concat(t))},critical:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,[z].concat(n))},uninitializedWarning:function(e){U.error("You must initialize PostHog before calling ".concat(e))}},W={},V=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function G(e,t,n){if(b(e)){if(A&&e.forEach===A)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===W)return}}}function Y(e,t,n){if(!R(e)){if(b(e))return G(e,t,n);if(e instanceof FormData){var r,i=p(e.entries());try{for(i.s();!(r=i.n()).done;){var s=r.value;if(t.call(n,s[1],s[0])===W)return}}catch(e){i.e(e)}finally{i.f()}}else for(var o in e)if(_.call(e,o)&&t.call(n,e[o],o)===W)return}}var K=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return G(n,function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}),e};function Q(e,t){return -1!==e.indexOf(t)}function Z(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var X,J=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},ee=function(e){try{return e()}catch(e){return}},et=function(e){return function(){try{for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){U.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),U.critical(e)}}},en=function(e){var t={};return Y(e,function(e,n){P(e)&&e.length>0&&(t[n]=e)}),t},er=function(e){return e.replace(/^\$/,"")},ei=function(e){var t,n,r,i,s="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var o=e.charCodeAt(i),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),E(a)||(n>t&&(s+=e.substring(t,n)),s+=a,t=n=i+1)}return n>t&&(s+=e.substring(t,e.length)),s},es=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,s){if(t){if(t.addEventListener&&!i)t.addEventListener(n,r,!!s);else{var o="on"+n,a=t[o];t[o]=function(n){if(n=n||e(null==C?void 0:C.event)){var i,s=!0;w(a)&&(i=a(n));var o=r.call(t,n);return!1!==i&&!1!==o||(s=!1),s}}}}else U.error("No valid element provided to register_event")}}();function eo(e,t){var n=function(){if(!N)return t("document not found");var n=N.createElement("script");n.type="text/javascript",n.src=e,n.onload=function(e){return t(void 0,e)},n.onerror=function(e){return t(e)};var r,i=N.querySelectorAll("body > script");i.length>0?null===(r=i[0].parentNode)||void 0===r||r.insertBefore(n,i[0]):N.body.appendChild(n)};null!=N&&N.body?n():null==N||N.addEventListener("DOMContentLoaded",n)}function ea(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}(eV=X||(X={})).GZipJS="gzip-js",eV.Base64="base64";var el="$people_distinct_id",eu="__alias",ec="__timers",ed="$autocapture_disabled_server_side",eh="$heatmaps_enabled_server_side",ef="$session_recording_enabled_server_side",ep="$console_log_recording_enabled_server_side",ev="$session_recording_network_payload_capture",eg="$session_recording_canvas_recording",em="$replay_sample_rate",e_="$replay_minimum_duration",ey="$sesid",eb="$session_is_sampled",ew="$enabled_feature_flags",ek="$early_access_features",ex="$stored_person_properties",eS="$stored_group_properties",eP="$surveys",eE="$surveys_activated",eR="$flag_call_reported",eF="$user_state",eI="$client_session_props",eC="$capture_rate_limit",eT="$initial_campaign_params",eO="$initial_referrer_info",eA="$initial_person_info",eM="$epp",eL="__POSTHOG_TOOLBAR__",eN=[el,eu,"__cmpns",ec,ef,eh,ey,ew,eF,ek,eS,ex,eP,eR,eI,eC,eT,eO,eM],e$="$active_feature_flags",eD="$override_feature_flags",eq="$feature_flag_payloads",eB=function(e){var t,n={},r=p(Z(e||{}));try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),s=i[0],o=i[1];o&&(n[s]=o)}}catch(e){r.e(e)}finally{r.f()}return n},eH=function(){function e(t){o(this,e),this.instance=t,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return l(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var e=this.instance.get_property(ew),t=this.instance.get_property(eD);if(!t)return e||{};for(var n=K({},e),r=Object.keys(t),i=0;i<r.length;i++)n[r[i]]=t[r[i]];return this._override_warning||(U.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(eq)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var e=this;if(!this.instance.config.advanced_disable_feature_flags){this.setReloadingPaused(!0);var t=this.instance.config.token,n=this.instance.get_property(ex),r=this.instance.get_property(eS),i={token:t,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:n,group_properties:r,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:i,compression:this.instance.config.disable_compression?void 0:X.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(t){e.setReloadingPaused(!1);var n,r=!0;200===t.statusCode&&(e.$anon_distinct_id=void 0,r=!1),e.receivedFeatureFlags(null!==(n=t.json)&&void 0!==n?n:{},r),e._startReloadTimer()}})}}},{key:"getFeatureFlag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var n,r=this.getFlagVariants()[e],i="".concat(r),s=this.instance.get_property(eR)||{};return!t.send_event&&"send_event"in t||e in s&&s[e].includes(i)||(b(s[e])?s[e].push(i):s[e]=[i],null===(n=this.instance.persistence)||void 0===n||n.register(u({},eR,s)),this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:r})),r}U.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time.")}},{key:"getFeatureFlagPayload",value:function(e){return this.getFlagPayloads()[e]}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,t);U.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time.")}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"removeFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(t){return t!==e})}},{key:"receivedFeatureFlags",value:function(e,t){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads();(function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=e.featureFlags,a=e.featureFlagPayloads;if(o){if(b(o)){var l,c={};if(o)for(var d=0;d<o.length;d++)c[o[d]]=!0;t&&t.register((u(l={},e$,o),u(l,ew,c),l))}else{var h=o,f=a;e.errorsWhileComputingFlags&&(h=i(i({},r),h),f=i(i({},s),f)),t&&t.register((u(n={},e$,Object.keys(eB(h))),u(n,ew,h||{}),u(n,eq,f||{}),n))}}})(e,this.instance.persistence,n,r),this._fireFeatureFlagsCallbacks(t)}}},{key:"override",value:function(e){if(!this.instance.__loaded||!this.instance.persistence)return U.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,!1===e)this.instance.persistence.unregister(eD);else if(b(e)){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;this.instance.persistence.register(u({},eD,t))}else this.instance.persistence.register(u({},eD,e))}},{key:"onFeatureFlags",value:function(e){var t=this;if(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit){var n=this._prepareFeatureFlagsForCallbacks();e(n.flags,n.flagVariants)}return function(){return t.removeFeatureFlagsHandler(e)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,t){var n,r,s=u({},"$feature_enrollment/".concat(e),t);this.instance.capture("$feature_enrollment_update",{$feature_flag:e,$feature_enrollment:t,$set:s}),this.setPersonPropertiesForFlags(s,!1);var o=i(i({},this.getFlagVariants()),{},u({},e,t));null===(n=this.instance.persistence)||void 0===n||n.register((u(r={},e$,Object.keys(eB(o))),u(r,ew,o),r)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.instance.get_property(ek);if(r&&!n)return e(r);this.instance._send_request({transport:"XHR",url:this.instance.requestRouter.endpointFor("api","/api/early_access_features/?token=".concat(this.instance.config.token)),method:"GET",callback:function(n){var r;if(n.json){var i=n.json.earlyAccessFeatures;return null===(r=t.instance.persistence)||void 0===r||r.register(u({},ek,i)),e(i)}}})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(function(e){return t[e]}),flagVariants:Object.keys(t).filter(function(e){return t[e]}).reduce(function(e,n){return e[n]=t[n],e},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(e){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,r=t.flagVariants;
74this.featureFlagEventHandlers.forEach(function(t){return t(n,r,{errorsLoading:e})})}},{key:"setPersonPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.instance.get_property(ex)||{};this.instance.register(u({},ex,i(i({},n),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(ex)}},{key:"setGroupPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.instance.get_property(eS)||{};0!==Object.keys(n).length&&Object.keys(n).forEach(function(t){n[t]=i(i({},n[t]),e[t]),delete e[t]}),this.instance.register(u({},eS,i(i({},n),e))),t&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(e){if(e){var t=this.instance.get_property(eS)||{};this.instance.register(u({},eS,i(i({},t),{},u({},e,{}))))}else this.instance.unregister(eS)}}]),e}();Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return F(e)&&isFinite(e)&&Math.floor(e)===e});var ej="0123456789abcdef",ez=function(){function e(t){if(o(this,e),this.bytes=t,16!==t.length)throw TypeError("not 128-bit length")}return l(e,[{key:"toString",value:function(){for(var e="",t=0;t<this.bytes.length;t++)e=e+ej.charAt(this.bytes[t]>>>4)+ej.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}},{key:"clone",value:function(){return new e(this.bytes.slice(0))}},{key:"equals",value:function(e){return 0===this.compareTo(e)}},{key:"compareTo",value:function(e){for(var t=0;t<16;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0}}],[{key:"fromFieldsV7",value:function(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||n<0||r<0||i<0||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/1099511627776,s[1]=t/4294967296,s[2]=t/16777216,s[3]=t/65536,s[4]=t/256,s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new e(s)}}]),e}(),eU=function(){function e(){o(this,e),u(this,"timestamp",0),u(this,"counter",0),u(this,"random",new eK)}return l(e,[{key:"generate",value:function(){var e=this.generateOrAbort();if(S(e)){this.timestamp=0;var t=this.generateOrAbort();if(S(t))throw Error("Could not generate UUID after timestamp reset");return t}return e}},{key:"generateOrAbort",value:function(){var e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return ez.fromFieldsV7(this.timestamp,Math.trunc(this.counter/1073741824),1073741823&this.counter,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),e}(),eW=function(e){if("undefined"!=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};C&&!S(C.crypto)&&crypto.getRandomValues&&(eW=function(e){return crypto.getRandomValues(e)});var eV,eG,eY,eK=function(){function e(){o(this,e),u(this,"buffer",new Uint32Array(8)),u(this,"cursor",1/0)}return l(e,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(eW(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),e}(),eQ=function(){return eZ().toString()},eZ=function(){return(eG||(eG=new eU)).generate()},eX="",eJ=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,e0={is_supported:function(){return!!N},error:function(e){U.error("cookieStore error: "+e)},get:function(e){if(N){try{for(var t=e+"=",n=N.cookie.split(";").filter(function(e){return e.length}),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}}catch(e){}return null}},parse:function(e){var t;try{t=JSON.parse(e0.get(e))||{}}catch(e){}return t},set:function(e,t,n,r,i){if(N)try{var s="",o="",a=function(e,t){if(t){var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N;if(eX)return eX;if(!t||["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+eQ(),s=RegExp("(^|;)\\s*"+i+"=1");!eX&&r--;){var o=n.slice(r).join("."),a=i+"=1;domain=."+o;t.cookie=a,s.test(t.cookie)&&(t.cookie=a+";expires=Thu, 01 Jan 1970 00:00:00 GMT",eX=o)}return eX}(e);if(!n){var r,i=(r=e.match(eJ))?r[0]:"";i!==n&&U.info("Warning: cookie subdomain discovery mismatch",i,n),n=i}return n?"; domain=."+n:""}return""}(N.location.hostname,r);
74if(n){var l=new Date;l.setTime(l.getTime()+24*n*36e5),s="; expires="+l.toUTCString()}i&&(o="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+a+o;return u.length>3686.4&&U.warn("cookieStore warning: large cookie, len="+u.length),N.cookie=u,u}catch(e){return}},remove:function(e,t){try{e0.set(e,"",-1,t)}catch(e){return}}},e1=null,e2={is_supported:function(){if(!E(e1))return e1;var e=!0;if(S(C))e=!1;else try{var t="__mplssupport__";e2.set(t,"xyz"),'"xyz"'!==e2.get(t)&&(e=!1),e2.remove(t)}catch(t){e=!1}return e||U.error("localStorage unsupported; falling back to cookie store"),e1=e,e},error:function(e){U.error("localStorage error: "+e)},get:function(e){try{return null==C?void 0:C.localStorage.getItem(e)}catch(e){e2.error(e)}return null},parse:function(e){try{return JSON.parse(e2.get(e))||{}}catch(e){}return null},set:function(e,t){try{null==C||C.localStorage.setItem(e,JSON.stringify(t))}catch(e){e2.error(e)}},remove:function(e){try{null==C||C.localStorage.removeItem(e)}catch(e){e2.error(e)}}},e3=["distinct_id",ey,eb,eM],e5=i(i({},e2),{},{parse:function(e){try{var t={};try{t=e0.parse(e)||{}}catch(e){}var n=K(t,JSON.parse(e2.get(e)||"{}"));return e2.set(e,n),n}catch(e){}return null},set:function(e,t,n,r,i){try{e2.set(e,t);var s={};e3.forEach(function(e){t[e]&&(s[e]=t[e])}),Object.keys(s).length&&e0.set(e,s,n,r,i)}catch(e){e2.error(e)}},remove:function(e,t){try{null==C||C.localStorage.removeItem(e),e0.remove(e,t)}catch(e){e2.error(e)}}}),e4={},e6={is_supported:function(){return!0},error:function(e){U.error("memoryStorage error: "+e)},get:function(e){return e4[e]||null},parse:function(e){return e4[e]||null},set:function(e,t){e4[e]=t},remove:function(e){delete e4[e]}},e8=null,e7={is_supported:function(){if(!E(e8))return e8;if(e8=!0,S(C))e8=!1;else try{var e="__support__";e7.set(e,"xyz"),'"xyz"'!==e7.get(e)&&(e8=!1),e7.remove(e)}catch(e){e8=!1}return e8},error:function(e){U.error("sessionStorage error: ",e)},get:function(e){try{return null==C?void 0:C.sessionStorage.getItem(e)}catch(e){e7.error(e)}return null},parse:function(e){try{return JSON.parse(e7.get(e))||null}catch(e){}return null},set:function(e,t){try{null==C||C.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){e7.error(e)}},remove:function(e){try{null==C||C.sessionStorage.removeItem(e)}catch(e){e7.error(e)}}},e9=["localhost","127.0.0.1"],te=function(e){var t=null==N?void 0:N.createElement("a");return S(t)?null:(t.href=e,t)},tt=function(e,t){return!!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t)&&new RegExp(t).test(e)},tn=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&",i=[];return Y(e,function(e,r){S(e)||S(r)||"undefined"===r||(t=encodeURIComponent(e instanceof File?e.name:e.toString()),n=encodeURIComponent(r),i[i.length]=n+"="+t)}),i.join(r)},tr=function(e,t){for(var n,r=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<r.length;i++){var s=r[i].split("=");if(s[0]===t){n=s;break}}if(!b(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch(e){U.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},ti=function(e,t){var n=e.match(RegExp(t+"=([^&]*)"));return n?n[1]:null},ts="Mobile",to="Android",ta="Tablet",tl=to+" "+ta,tu="iPad",tc="Apple",td=tc+" Watch",th="Safari",tf="BlackBerry",tp="Samsung",tv=tp+"Browser",tg=tp+" Internet",tm="Chrome",t_=tm+" OS",ty=tm+" iOS",tb="Internet Explorer",tw=tb+" "+ts,tk="Opera",tx=tk+" Mini",tS="Edge",tP="Microsoft "+tS,tE="Firefox",tR=tE+" iOS",tF="Nintendo",tI="PlayStation",tC="Xbox",tT=to+" "+ts,tO=ts+" "+th,tA="Windows",tM=tA+" Phone",tL="Nokia",tN="Ouya",t$="Generic",tD=t$+" "+ts.toLowerCase(),tq=t$+" "+ta.toLowerCase(),tB="Konqueror",tH="(\\d+(\\.\\d+)?)",tj=RegExp("Version/"+tH),tz=RegExp(tC,"i"),tU=RegExp(tI+" \\w+","i"),tW=RegExp(tF+" \\w+","i"),tV=RegExp(tf+"|PlayBook|BB10","i"),tG={"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 n,r;return t=t||"",Q(e," OPR/")&&Q(e,"Mini")?tx:Q(e," OPR/")?tk:tV.test(e)?tf:Q(e,"IE"+ts)||Q(e,"WPDesktop")?tw:Q(e,tv)?tg:Q(e,tS)||Q(e,"Edg/")?tP:Q(e,"FBIOS")?"Facebook "+ts:Q(e,"UCWEB")||Q(e,"UCBrowser")?"UC Browser":Q(e,"CriOS")?ty:Q(e,"CrMo")?tm:Q(e,to)&&Q(e,th)?tT:Q(e,tm)?tm:Q(e,"FxiOS")?tR:Q(e.toLowerCase(),tB.toLowerCase())?tB:(n=e,(r=t)&&Q(r,tc)||Q(n,th)&&!Q(n,tm)&&!Q(n,to))?Q(e,ts)?tO:th:Q(e,tE)?tE:Q(e,"MSIE")||Q(e,"Trident/")?tb:Q(e,"Gecko")?tE:""},tK=(u(eY={},tw,[RegExp("rv:"+tH)]),u(eY,tP,[RegExp(tS+"?\\/"+tH)]),u(eY,tm,[RegExp("("+tm+"|CrMo)\\/"+tH)]),u(eY,ty,[RegExp("CriOS\\/"+tH)]),u(eY,"UC Browser",[RegExp("(UCBrowser|UCWEB)\\/"+tH)]),u(eY,th,[tj]),u(eY,tO,[tj]),u(eY,tk,[RegExp("(Opera|OPR)\\/"+tH)]),u(eY,tE,[RegExp(tE+"\\/"+tH)]),u(eY,tR,[RegExp("FxiOS\\/"+tH)]),u(eY,tB,[RegExp("Konqueror[:/]?"+tH,"i")]),u(eY,tf,[RegExp(tf+" "+tH),tj]),u(eY,tT,[RegExp("android\\s"+tH,"i")]),u(eY,tg,[RegExp(tv+"\\/"+tH)]),u(eY,tb,[RegExp("(rv:|MSIE )"+tH)]),u(eY,"Mozilla",[RegExp("rv:"+tH)]),eY),tQ=[[RegExp(tC+"; "+tC+" (.*?)[);]","i"),function(e){return[tC,e&&e[1]||""]}],[RegExp(tF,"i"),[tF,""]],[RegExp(tI,"i"),[tI,""]],[tV,[tf,""]],[RegExp(tA,"i"),function(e,t){if(/Phone/.test(t)||/WPDesktop/.test(t))return[tM,""];if(new RegExp(ts).test(t)&&!/IEMobile\b/.test(t))return[tA+" "+ts,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=tG[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[tA,r]}return[tA,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(e){return e&&e[3]?["iOS",[e[3],e[4],e[5]||"0"].join(".")]:["iOS",""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(e){var t="";return e&&e.length>=3&&(t=S(e[2])?e[3]:e[2]),["watchOS",t]}],[RegExp("("+to+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+to+")","i"),function(e){return e&&e[2]?[to,[e[2],e[3],e[4]||"0"].join(".")]:[to,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(e){var t=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];t[1]=n.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[t_,""]],[/Linux|debian/i,["Linux",""]]],tZ=function(e){return tW.test(e)?tF:tU.test(e)?tI:tz.test(e)?tC:RegExp(tN,"i").test(e)?tN:RegExp("("+tM+"|WPDesktop)","i").test(e)?tM:/iPad/.test(e)?tu:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?td:tV.test(e)?tf:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":RegExp(tL,"i").test(e)?tL:/(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(ts).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)?to:tl:to:RegExp("(pda|"+ts+")","i").test(e)?tD:RegExp(ta,"i").test(e)&&!RegExp(ta+" pc","i").test(e)?tq:""},tX="https?://(.*)",tJ=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid"],t0={campaignParams:function(e){return N?this._campaignParamsFromUrl(N.URL,e):{}},_campaignParamsFromUrl:function(e,t){var n=tJ.concat(t||[]),r={};return Y(n,function(t){var n=tr(e,t);n&&(r[t]=n)}),r},_searchEngine:function(e){return e?0===e.search(tX+"google.([^/?]*)")?"google":0===e.search(tX+"bing.com")?"bing":0===e.search(tX+"yahoo.com")?"yahoo":0===e.search(tX+"duckduckgo.com")?"duckduckgo":null:null}
74,_searchInfoFromReferrer:function(e){var t=t0._searchEngine(e),n={};if(!E(t)){n.$search_engine=t;var r=N?tr(N.referrer,"yahoo"!=t?"q":"p"):"";r.length&&(n.ph_keyword=r)}return n},searchInfo:function(){var e=null==N?void 0:N.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:tY,browserVersion:function(e,t){var n=tK[tY(e,t)];if(S(n))return null;for(var r=0;r<n.length;r++){var i=n[r],s=e.match(i);if(s)return parseFloat(s[s.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(e){for(var t=0;t<tQ.length;t++){var n=c(tQ[t],2),r=n[0],i=n[1],s=r.exec(e),o=s&&(w(i)?i(s,e):i);if(o)return o}return["",""]},device:tZ,deviceType:function(e){var t=tZ(e);return t===tu||t===tl||"Kobo"===t||"Kindle Fire"===t||t===tq?ta:t===tF||t===tC||t===tI||t===tN?"Console":t===td?"Wearable":t?ts:"Desktop"},referrer:function(){return(null==N?void 0:N.referrer)||"$direct"},referringDomain:function(){var e;return null!=N&&N.referrer&&(null===(e=te(N.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer(),u:null==$?void 0:$.href}},initialPersonPropsFromInfo:function(e){var t,n=e.r,r=e.u,i={$initial_referrer:n,$initial_referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(t=te(n))||void 0===t?void 0:t.host};if(r){i.$initial_current_url=r;var s=te(r);i.$initial_host=null==s?void 0:s.host,i.$initial_pathname=null==s?void 0:s.pathname,Y(this._campaignParamsFromUrl(r),function(e,t){i["$initial_"+er(t)]=e})}return n&&Y(this._searchInfoFromReferrer(n),function(e,t){i["$initial_"+er(t)]=e}),i},properties:function(){if(!H)return{};var e=c(t0.os(H),2);return K(en({$os:e[0],$os_version:e[1],$browser:t0.browser(H,navigator.vendor),$device:t0.device(H),$device_type:t0.deviceType(H)}),{$current_url:null==$?void 0:$.href,$host:null==$?void 0:$.host,$pathname:null==$?void 0:$.pathname,$raw_user_agent:H.length>1e3?H.substring(0,997)+"...":H,$browser_version:t0.browserVersion(H,navigator.vendor),$browser_language:t0.browserLanguage(),$screen_height:null==C?void 0:C.screen.height,$screen_width:null==C?void 0:C.screen.width,$viewport_height:null==C?void 0:C.innerHeight,$viewport_width:null==C?void 0:C.innerWidth,$lib:"web",$lib_version:v.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:J()/1e3})},people_properties:function(){if(!H)return{};var e=c(t0.os(H),2);return K(en({$os:e[0],$os_version:e[1],$browser:t0.browser(H,navigator.vendor)}),{$browser_version:t0.browserVersion(H,navigator.vendor)})}},t1=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],t2=function(){function e(t){var n;o(this,e),this.config=t,this.props={},this.campaign_params_saved=!1,this.name=(n="",t.token&&(n=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),t.persistence_name?"ph_"+t.persistence_name:"ph_"+n+"_posthog"),this.storage=this.buildStorage(t),this.load(),this.update_config(t,t),this.save()}return l(e,[{key:"buildStorage",value:function(e){-1===t1.indexOf(e.persistence.toLowerCase())&&(U.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=e.persistence.toLowerCase();return"localstorage"===t&&e2.is_supported()?e2:"localstorage+cookie"===t&&e5.is_supported()?e5:"sessionstorage"===t&&e7.is_supported()?e7:"memory"===t?e6:"cookie"===t?e0:e5.is_supported()?e5:e0}},{key:"properties",value:function(){var e={};return Y(this.props,function(t,n){if(n===ew&&k(t))for(var r,i=Object.keys(t),s=0;s<i.length;s++)e["$feature/".concat(i[s])]=t[i[s]];else r=!1,(E(eN)?r:M&&eN.indexOf===M?-1!=eN.indexOf(n):(Y(eN,function(e){if(r||(r=e===n))return W}),r))||(e[n]=t)}),e}},{key:"load",value:function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=K({},e))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}
74},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(e,t,n){var r=this;if(k(e)){S(t)&&(t="None"),this.expire_days=S(n)?this.default_expiry:n;var i=!1;if(Y(e,function(e,n){r.props.hasOwnProperty(n)&&r.props[n]!==t||(r.props[n]=e,i=!0)}),i)return this.save(),!0}return!1}},{key:"register",value:function(e,t){var n=this;if(k(e)){this.expire_days=S(t)?this.default_expiry:t;var r=!1;if(Y(e,function(t,i){e.hasOwnProperty(i)&&n.props[i]!==t&&(n.props[i]=t,r=!0)}),r)return this.save(),!0}return!1}},{key:"unregister",value:function(e){e in this.props&&(delete this.props[e],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(t0.campaignParams(this.config.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(t0.searchInfo())}},{key:"update_referrer_info",value:function(){this.register(t0.referrerInfo())}},{key:"set_initial_person_info",value:function(){this.props[eT]||this.props[eO]||this.register_once(u({},eA,t0.initialPersonInfo()),void 0)}},{key:"get_referrer_info",value:function(){return en({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"get_initial_props",value:function(){var e=this,t={};Y([eO,eT],function(n){var r=e.props[n];r&&Y(r,function(e,n){t["$initial_"+er(n)]=e})});var n=this.props[eA];return n&&K(t,t0.initialPersonPropsFromInfo(n)),t}},{key:"safe_merge",value:function(e){return Y(this.props,function(t,n){n in e||(e[n]=t)}),e}},{key:"update_config",value:function(e,t){if(this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var n=this.buildStorage(e),r=this.props;this.clear(),this.storage=n,this.props=r,this.save()}}},{key:"set_disabled",value:function(e){this.disabled=e,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}},{key:"set_event_timer",value:function(e,t){var n=this.props[ec]||{};n[e]=t,this.props[ec]=n,this.save()}},{key:"remove_event_timer",value:function(e){var t=(this.props[ec]||{})[e];return S(t)||(delete this.props[ec][e],this.save()),t}},{key:"get_property",value:function(e){return this.props[e]}},{key:"set_property",value:function(e,t){this.props[e]=t,this.save()}}]),e}(),t3=((nS=t3||{})[nS.DomContentLoaded=0]="DomContentLoaded",nS[nS.Load=1]="Load",nS[nS.FullSnapshot=2]="FullSnapshot",nS[nS.IncrementalSnapshot=3]="IncrementalSnapshot",nS[nS.Meta=4]="Meta",nS[nS.Custom=5]="Custom",nS[nS.Plugin=6]="Plugin",nS),t5=((nP=t5||{})[nP.Mutation=0]="Mutation",nP[nP.MouseMove=1]="MouseMove",nP[nP.MouseInteraction=2]="MouseInteraction",nP[nP.Scroll=3]="Scroll",nP[nP.ViewportResize=4]="ViewportResize",nP[nP.Input=5]="Input",nP[nP.TouchMove=6]="TouchMove",nP[nP.MediaInteraction=7]="MediaInteraction",nP[nP.StyleSheetRule=8]="StyleSheetRule",nP[nP.CanvasMutation=9]="CanvasMutation",nP[nP.Font=10]="Font",nP[nP.Log=11]="Log",nP[nP.Drag=12]="Drag",nP[nP.StyleDeclaration=13]="StyleDeclaration",nP[nP.Selection=14]="Selection",nP[nP.AdoptedStyleSheet=15]="AdoptedStyleSheet",nP[nP.CustomElement=16]="CustomElement",nP);function t4(e){return e?V(e).split(/\s+/):[]}function t6(e){var t="";switch(s(e.className)){case"string":t=e.className;break;case"object":t=("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return t4(t)}function t8(e){return R(e)?null:V(e).split(/(\s+)/).filter(function(e){return nf(e)}).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function t7(e){var t="";return ns(e)&&!no(e)&&e.childNodes&&e.childNodes.length&&Y(e.childNodes,function(e){var n;nt(e)&&e.textContent&&(t+=null!==(n=t8(e.textContent))&&void 0!==n?n:"")}),V(t)}function t9(e){return!!e&&1===e.nodeType}function ne(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}
74function nt(e){return!!e&&3===e.nodeType}function nn(e){return!!e&&11===e.nodeType}var nr=["a","button","form","input","select","textarea","label"];function ni(e){var t=e.parentNode;return!(!t||!t9(t))&&t}function ns(e){for(var t=e;t.parentNode&&!ne(t,"body");t=t.parentNode){var n=t6(t);if(Q(n,"ph-sensitive")||Q(n,"ph-no-capture"))return!1}if(Q(t6(e),"ph-include"))return!0;var r=e.type||"";if(P(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!(P(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function no(e){return!!(ne(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ne(e,"select")||ne(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var na="(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})",nl=new RegExp("^(?:".concat(na,")$")),nu=new RegExp(na),nc="\\d{3}-?\\d{2}-?\\d{4}",nd=new RegExp("^(".concat(nc,")$")),nh=new RegExp("(".concat(nc,")"));function nf(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!(R(e)||P(e)&&(e=V(e),(t?nl:nu).test((e||"").replace(/[- ]/g,""))||(t?nd:nh).test(e)))}function np(e){var t=t7(e);return nf(t="".concat(t," ").concat(function e(t){var n="";return t&&t.childNodes&&t.childNodes.length&&Y(t.childNodes,function(t){var r;if(t&&"span"===(null===(r=t.tagName)||void 0===r?void 0:r.toLowerCase()))try{var i=t7(t);n="".concat(n," ").concat(i).trim(),t.childNodes&&t.childNodes.length&&(n="".concat(n," ").concat(e(t)).trim())}catch(e){U.error(e)}}),n}(e)).trim())?t:""}function nv(e){return e.replace(/"|\\"/g,'\\"')}var ng="[SessionRecording]",nm="redacted",n_={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:function(e){return e},recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6},ny=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],nb=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],nw=["/s/","/e/","/i/"];function nk(e,t,n,r){if(R(e))return e;var i=(null==t?void 0:t["content-length"])||new Blob([e]).size;return P(i)&&(i=parseInt(i)),i>n?ng+" ".concat(r," body too large to record (").concat(i," bytes)"):e}function nx(e,t){if(R(e))return e;var n=e;return nf(n,!1)||(n=ng+" "+t+" body "+nm),Y(nb,function(e){var r,i;null!==(r=n)&&void 0!==r&&r.length&&-1!==(null===(i=n)||void 0===i?void 0:i.indexOf(e))&&(n=ng+" "+t+" body "+nm+" as might contain: "+e)}),n}var nS,nP,nE,nR=function(e,t){var n,r,s={payloadSizeLimitBytes:n_.payloadSizeLimitBytes,performanceEntryTypeToObserve:d(n_.performanceEntryTypeToObserve)},o=!1!==e.session_recording.recordHeaders&&t.recordHeaders,a=!1!==e.session_recording.recordBody&&t.recordBody,l=!1!==e.capture_performance&&t.recordPerformance,u=(r=Math.min(1e6,null!==(n=s.payloadSizeLimitBytes)&&void 0!==n?n:1e6),function(e){return null!=e&&e.requestBody&&(e.requestBody=nk(e.requestBody,e.requestHeaders,r,"Request")),null!=e&&e.responseBody&&(e.responseBody=nk(e.responseBody,e.responseHeaders,r,"Response")),e}),c=function(e){var t;return u(function(e){var t=te(e.name);if(!(t&&t.pathname&&nw.some(function(e){return 0===t.pathname.indexOf(e)})))return e}((R(t=e.requestHeaders)||Y(Object.keys(null!=t?t:{}),function(e){ny.includes(e.toLowerCase())&&(t[e]=nm)}),e)))},h=w(e.session_recording.maskNetworkRequestFn);return h&&w(e.session_recording.maskCapturedNetworkRequestFn)&&U.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),h&&(e.session_recording.maskCapturedNetwork
74RequestFn=function(t){var n=e.session_recording.maskNetworkRequestFn({url:t.name});return i(i({},t),{},{name:null==n?void 0:n.url})}),s.maskRequestFn=w(e.session_recording.maskCapturedNetworkRequestFn)?function(t){var n,r,i,s=c(t);return s&&null!==(n=null===(r=(i=e.session_recording).maskCapturedNetworkRequestFn)||void 0===r?void 0:r.call(i,s))&&void 0!==n?n:void 0}:function(e){return function(e){if(!S(e))return e.requestBody=nx(e.requestBody,"Request"),e.responseBody=nx(e.responseBody,"Response"),e}(c(e))},i(i(i({},n_),s),{},{recordHeaders:o,recordBody:a,recordPerformance:l,recordInitialRequests:l})},nF=l(function e(t){var n,r,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,e),u(this,"bucketSize",100),u(this,"refillRate",10),u(this,"mutationBuckets",{}),u(this,"loggedTracker",{}),u(this,"refillBuckets",function(){Object.keys(i.mutationBuckets).forEach(function(e){i.mutationBuckets[e]=i.mutationBuckets[e]+i.refillRate,i.mutationBuckets[e]>=i.bucketSize&&delete i.mutationBuckets[e]})}),u(this,"getNodeOrRelevantParent",function(e){var t=i.rrweb.mirror.getNode(e);if("svg"!==(null==t?void 0:t.nodeName)&&t instanceof Element){var n=t.closest("svg");if(n)return[i.rrweb.mirror.getId(n),n]}return[e,t]}),u(this,"numberOfChanges",function(e){var t,n,r,i,s,o,a,l;return(null!==(t=null===(n=e.removes)||void 0===n?void 0:n.length)&&void 0!==t?t:0)+(null!==(r=null===(i=e.attributes)||void 0===i?void 0:i.length)&&void 0!==r?r:0)+(null!==(s=null===(o=e.texts)||void 0===o?void 0:o.length)&&void 0!==s?s:0)+(null!==(a=null===(l=e.adds)||void 0===l?void 0:l.length)&&void 0!==a?a:0)}),u(this,"throttleMutations",function(e){if(3!==e.type||0!==e.data.source)return e;var t=e.data,n=i.numberOfChanges(t);t.attributes&&(t.attributes=t.attributes.filter(function(e){var t,n,r,s=c(i.getNodeOrRelevantParent(e.id),2),o=s[0],a=s[1];return 0!==i.mutationBuckets[o]&&(i.mutationBuckets[o]=null!==(t=i.mutationBuckets[o])&&void 0!==t?t:i.bucketSize,i.mutationBuckets[o]=Math.max(i.mutationBuckets[o]-1,0),0===i.mutationBuckets[o]&&(i.loggedTracker[o]||(i.loggedTracker[o]=!0,null===(n=(r=i.options).onBlockedNode)||void 0===n||n.call(r,o,a))),e)}));var r=i.numberOfChanges(t);return 0!==r||n===r?e:void 0}),this.rrweb=t,this.options=s,this.refillRate=null!==(n=this.options.refillRate)&&void 0!==n?n:this.refillRate,this.bucketSize=null!==(r=this.options.bucketSize)&&void 0!==r?r:this.bucketSize,setInterval(function(){i.refillBuckets()},1e3)}),nI=[t5.MouseMove,t5.MouseInteraction,t5.Scroll,t5.ViewportResize,t5.Input,t5.TouchMove,t5.MediaInteraction,t5.Drag],nC=[t5.StyleSheetRule,t5.StyleDeclaration,t5.AdoptedStyleSheet,t5.Font],nT=[t3.Custom,t3.Meta,t3.FullSnapshot],nO=function(){function e(t,n){o(this,e),this.size=0,this.data=[],this.sessionId=t,this.windowId=n}return l(e,[{key:"mostRecentSnapshotTimestamp",get:function(){return this.data.length?this.data[this.data.length-1].timestamp:null}},{key:"add",value:function(e){this.size+=e.$snapshot_bytes,this.data.push(e.$snapshot_data)}}]),e}(),nA=function(e){return{rrwebMethod:e,enqueuedAt:Date.now(),attempt:1}},nM="[SessionRecording]",nL=function(){function e(t){var n=this;if(o(this,e),u(this,"queuedRRWebEvents",[]),u(this,"isIdle",!1),u(this,"_linkedFlagSeen",!1),u(this,"_lastActivityTimestamp",Date.now()),u(this,"_linkedFlag",null),u(this,"_forceAllowLocalhostNetworkCapture",!1),u(this,"_samplingSessionListener",null),this.instance=t,this._captureStarted=!1,this._endpoint="/s/",this.stopRrweb=void 0,this.receivedDecide=!1,null==C||C.addEventListener("beforeunload",function(){n._flushBuffer()}),null==C||C.addEventListener("offline",function(){n._tryAddCustomEvent("browser offline",{})}),null==C||C.addEventListener("online",function(){n._tryAddCustomEvent("browser online",{})}),null==C||C.addEventListener("visibilitychange",function(){if(null!=N&&N.visibilityState){var e="window "+N.visibilityState;n._tryAddCustomEvent(e,{})}}),!this.instance.sessionManager)throw U.error(nM+" started without valid sessionManager"),Error(nM+" started without valid sessionManager. This is a bug.");var r=this.sessionManager.checkAndGetSessionAndWindowId(),i=r.sessionId,s=r.windowId;this.sessionId=i,this.windowId=s,this.buffer=new nO(this.sessionId,this.windowId),this._setupSampling()}return l(e,[{key:"rrwebRecord",get:function(){var e;return null==j||null===(e=j.rrweb)||void 0===e?void 0:e.record}},{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw Error(nM+" started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){var e=this.instance.get_property(eb);return I(e)?e:null}},{key:"sessionDuration",get:function(){var e=this.buffer.mostRecentSnapshotTimestamp,t=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return e?e-t:null}},{key:"isRecordingEnabled",get:function(){var e=!!this.instance.get_property(ef),t=!this.instance.config.disable_session_recording;return C&&e&&t}},{key:"isConsoleLogCaptureEnabled",get:function(){var e=!!this.instance.get_property(ep),t=this.instance.config.enable_recording_console_log;return null!=t?t:e}},{key:"canvasRecording",get:function(){var e=this.instance.get_property(eg);return e&&e.fps&&e.quality?{enabled:e.enabled,fps:e.fps,quality:e.quality}:void 0}},{key:"networkPayloadCapture",get:function(){var e,t,n=this.instance.get_property(ev),r={recordHeaders:null===(e=this.instance.config.session_recording)||void 0===e?void 0:e.recordHeaders,recordBody:null===(t=this.instance.config.session_recording)||void 0===t?void 0:t.recordBody},i=(null==r?void 0:r.recordHeaders)||(null==n?void 0:n.recordHeaders),s=(null==r?void 0:r.recordBody)||(null==n?void 0:n.recordBody),o=this.instance.config.capture_performance||(null==n?void 0:n.capturePerformance);return i||s||o?{recordHeaders:i,recordBody:s,recordPerformance:o}:void 0}},{key:"sampleRate",get:function(){var e=this.instance.get_property(em);return F(e)?e:null}},{key:"minimumDuration",get:function(){var e=this.instance.get_property(e_);return F(e)?e:null}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?R(this._linkedFlag)||this._linkedFlagSeen?I(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"buffering":"disabled":"buffering"}},{key:"startIfEnabledOrStop",value:function(){this.isRecordingEnabled?(this._startCapture(),U.info(nM+" started")):(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,U.info(nM+" stopped"))}},{key:"makeSamplingDecision",value:function(e){var t,n,r=this.sessionId!==e,i=this.sampleRate;if(F(i)){var s,o=this.isSampled,a=r||!I(o);(s=a?Math.random()<i:o)||!a||U.warn(nM+" Sample rate (".concat(i,") has determined that this sessionId (").concat(e,") will not be sent to the server.")),this._tryAddCustomEvent("samplingDecisionMade",{sampleRate:i}),null===(n=this.instance.persistence)||void 0===n||n.register(u({},eb,s))}else null===(t=this.instance.persistence)||void 0===t||t.register(u({},eb,null))}},{key:"afterDecideResponse",value:function(e){var t,n,r,i=this;if(this._persistDecideResponse(e),this._linkedFlag=(null===(t=e.sessionRecording)||void 0===t?void 0:t.linkedFlag)||null,
74null!==(n=e.sessionRecording)&&void 0!==n&&n.endpoint&&(this._endpoint=null===(r=e.sessionRecording)||void 0===r?void 0:r.endpoint),this._setupSampling(),!R(this._linkedFlag)){var s=P(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,o=P(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags(function(e,t){var n=k(t)&&s in t,r=o?t[s]===o:n;if(r){var a={linkedFlag:s,linkedVariant:o},l="linked flag matched";U.info(nM+" "+l,a),i._tryAddCustomEvent(l,a)}i._linkedFlagSeen=r})}this.receivedDecide=!0,this.startIfEnabledOrStop()}},{key:"_setupSampling",value:function(){var e=this;F(this.sampleRate)&&E(this._samplingSessionListener)&&(this._samplingSessionListener=this.sessionManager.onSessionId(function(t){e.makeSamplingDecision(t)}))}},{key:"_persistDecideResponse",value:function(e){if(this.instance.persistence){var t=this.instance.persistence,n=function(){var n,r,s,o,a,l,c,d,h=null===(n=e.sessionRecording)||void 0===n?void 0:n.sampleRate,f=R(h)?null:parseFloat(h),p=null===(r=e.sessionRecording)||void 0===r?void 0:r.minimumDurationMilliseconds;t.register((u(d={},ef,!!e.sessionRecording),u(d,ep,null===(s=e.sessionRecording)||void 0===s?void 0:s.consoleLogRecordingEnabled),u(d,ev,i({capturePerformance:e.capturePerformance},null===(o=e.sessionRecording)||void 0===o?void 0:o.networkPayloadCapture)),u(d,eg,{enabled:null===(a=e.sessionRecording)||void 0===a?void 0:a.recordCanvas,fps:null===(l=e.sessionRecording)||void 0===l?void 0:l.canvasFps,quality:null===(c=e.sessionRecording)||void 0===c?void 0:c.canvasQuality}),u(d,em,f),u(d,e_,S(p)?null:p),d))};n(),this.sessionManager.onSessionId(n)}}},{key:"log",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log";null===(t=this.instance.sessionRecording)||void 0===t||t.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:J()})}},{key:"_startCapture",value:function(){var e=this;S(Object.assign)||this._captureStarted||this.instance.config.disable_session_recording||this.instance.consent.isOptedOut()||(this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():eo(this.instance.requestRouter.endpointFor("assets","/static/recorder.js?v=".concat(v.LIB_VERSION)),function(t){if(t)return U.error(nM+" could not load recorder.js",t);e._onScriptLoaded()}))}},{key:"isInteractiveEvent",value:function(e){var t;return 3===e.type&&-1!==nI.indexOf(null===(t=e.data)||void 0===t?void 0:t.source)}},{key:"_updateWindowAndSessionIds",value:function(e){var t=this.isInteractiveEvent(e);t||this.isIdle||e.timestamp-this._lastActivityTimestamp>3e5&&(this.isIdle=!0,this._tryAddCustomEvent("sessionIdle",{reason:"user inactivity",timeSinceLastActive:e.timestamp-this._lastActivityTimestamp,threshold:3e5}),clearTimeout(this._fullSnapshotTimer),this._flushBuffer());var n=!1;if(t&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),n=!0)),!this.isIdle){var r=this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp),i=r.windowId,s=r.sessionId,o=this.sessionId!==s,a=this.windowId!==i;this.windowId=i,this.sessionId=s,(n||-1===[2,4].indexOf(e.type)&&(a||o||S(this._fullSnapshotTimer)))&&this._tryTakeFullSnapshot()}}},{key:"_tryRRWebMethod",value:function(e){try{return e.rrwebMethod(),!0}catch(t){return this.queuedRRWebEvents.length<10?this.queuedRRWebEvents.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):U.warn(nM+" could not emit queued rrweb event.",t,e),!1}}},{key:"_tryAddCustomEvent",value:function(e,t){var n=this;return this._tryRRWebMethod(nA(function(){return n.rrwebRecord.addCustomEvent(e,t)}))}},{key:"_tryTakeFullSnapshot",value:function(){var e=this;return this._tryRRWebMethod(nA(function(){return e.rrwebRecord.takeFullSnapshot()}))}},{key:"_onScriptLoaded",value:function(){for(var e,t=this,n={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{}
74,collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},r=this.instance.config.session_recording,s=0,o=Object.entries(r||{});s<o.length;s++){var a=c(o[s],2),l=a[0],u=a[1];l in n&&(n[l]=u)}if(this.canvasRecording&&this.canvasRecording.enabled&&(n.recordCanvas=!0,n.sampling={canvas:this.canvasRecording.fps},n.dataURLOptions={type:"image/webp",quality:this.canvasRecording.quality}),this.rrwebRecord){this.mutationRateLimiter=null!==(e=this.mutationRateLimiter)&&void 0!==e?e:new nF(this.rrwebRecord,{onBlockedNode:function(e,n){var r="Too many mutations on node '".concat(e,"'. Rate limiting. This could be due to SVG animations or something similar");U.info(r,{node:n}),t.log(nM+" "+r,"warn")}});var d=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord(i({emit:function(e){t.onRRwebEmit(e)},plugins:d},n)),this.instance._addCaptureHook(function(e){try{if("$pageview"===e){var n=C?t._maskUrl(C.location.href):"";if(!n)return;t._tryAddCustomEvent("$pageview",{href:n}),t._tryTakeFullSnapshot()}}catch(e){U.error("Could not add $pageview to rrweb session",e)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:n,activePlugins:d.map(function(e){return null==e?void 0:e.name})}),this._tryAddCustomEvent("$posthog_config",{config:this.instance.config})}else U.error(nM+"onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"_scheduleFullSnapshot",value:function(){var e=this;this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),this._fullSnapshotTimer=setInterval(function(){e._tryTakeFullSnapshot()},3e5)}},{key:"_gatherRRWebPlugins",value:function(){var e=[];return j.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled&&e.push(j.rrwebConsoleRecord.getRecordConsolePlugin()),this.networkPayloadCapture&&w(j.getRecordNetworkPlugin)&&(!e9.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?e.push(j.getRecordNetworkPlugin(nR(this.instance.config,this.networkPayloadCapture))):U.info(nM+" NetworkCapture not started because we are on localhost.")),e}},{key:"onRRwebEmit",value:function(e){if(this._processQueuedEvents(),e&&k(e)){if(e.type===t3.Meta){var t=this._maskUrl(e.data.href);if(this._lastHref=t,!t)return;e.data.href=t}else this._pageViewFallBack();e.type===t3.FullSnapshot&&this._scheduleFullSnapshot();var n=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(n){var r,i,s=function(e){if(e&&k(e)&&6===e.type&&k(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var t=[],n=0;n<e.data.payload.payload.length;n++)e.data.payload.payload[n]&&e.data.payload.payload[n].length>2e3?t.push(e.data.payload.payload[n].slice(0,2e3)+"...[truncated]"):t.push(e.data.payload.payload[n]);return e.data.payload.payload=t,e}return e}(n),o=JSON.stringify(s,(r=[],function(e,t){if(k(t)){for(;r.length>0&&r.at(-1)!==this;)r.pop();return r.includes(t)?"[Circular]":(r.push(t),t)}return t})).length;if(this._updateWindowAndSessionIds(s),!this.isIdle||(i=s.type===t3.IncrementalSnapshot&&!R(s.data.source)&&nC.includes(s.data.source),nT.includes(s.type)||i)){var a={$snapshot_bytes:o,$snapshot_data:s,$session_id:this.sessionId,$window_id:this.windowId};"disabled"!==this.status?this._captureSnapshotBuffered(a):this.clearBuffer()}}}}},{key:"_pageViewFallBack",value:function(){if(!this.instance.config.capture_pageview&&C){var e=this._maskUrl(C.location.href);this._lastHref!==e&&(this._tryAddCustomEvent("$url_changed",{href:e}),this._lastHref=e)}}},{key:"_processQueuedEvents",value:function(){var e=this;if(this.queuedRRWebEvents.length){var t=d(this.queuedRRWebEvents);this.queuedRRWebEvents=[],t.forEach(function(n){Date.now()-n.enqueuedAt>2e3?e._tryAddCustomEvent("rrwebQueueTimeout",{enqueuedAt:n.enqueuedAt,attempt:n.attempt,queueLength:t.length}):e._tryRRWebMethod(n)&&e._tryAddCustomEvent("rrwebQueueSuccess",{enqueuedAt:n.enqueuedAt,attempt:n.attempt,queueLength:t.length})})}}},{key:"_maskUrl",value:function(e){var t=this.instance.config.session_recording;
74if(t.maskNetworkRequestFn){var n,r={url:e};return null===(n=r=t.maskNetworkRequestFn(r))||void 0===n?void 0:n.url}return e}},{key:"clearBuffer",value:function(){this.buffer=new nO(this.sessionId,this.windowId)}},{key:"_flushBuffer",value:function(){var e=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var t=this.minimumDuration,n=this.sessionDuration,r=F(n)&&n>=0,i=F(t)&&r&&n<t;"buffering"===this.status||i?this.flushBufferTimer=setTimeout(function(){e._flushBuffer()},2e3):(this.buffer.data.length>0&&this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.clearBuffer())}},{key:"_captureSnapshotBuffered",value:function(e){var t,n=this,r=2+((null===(t=this.buffer)||void 0===t?void 0:t.data.length)||0);(this.buffer.size+e.$snapshot_bytes+r>943718.4||this.buffer.sessionId!==this.sessionId)&&this._flushBuffer(),this.buffer.add(e),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){n._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(e){this.instance.capture("$snapshot",e,{_url:this.instance.requestRouter.endpointFor("api",this._endpoint),_noTruncate:!0,_batchKey:"recordings",_noHeatmaps:!0})}}]),e}(),nN=function(){function e(t){o(this,e),this.instance=t,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return l(e,[{key:"call",value:function(){var e=this,t={token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(ex),group_properties:this.instance.get_property(eS),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0};this.instance._send_request({method:"POST",url:this.instance.requestRouter.endpointFor("api","/decide/?v=3"),data:t,compression:this.instance.config.disable_compression?void 0:X.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:function(t){return e.parseDecideResponse(t.json)}})}},{key:"parseDecideResponse",value:function(e){var t=this;this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer();var n=!e;if(this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.config.advanced_disable_feature_flags||this.instance.featureFlags.receivedFeatureFlags(null!=e?e:{},n),n)U.error("Failed to fetch feature flags from PostHog.");else{if(!N||!N.body)return U.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){t.parseDecideResponse(e)},500);this.instance._afterDecideResponse(e);var r=null==C?void 0:C.extendPostHogWithExceptionAutoCapture;if(e.autocaptureExceptions&&e.autocaptureExceptions&&S(r)&&eo(this.instance.requestRouter.endpointFor("assets","/static/exception-autocapture.
74js"),function(n){if(n)return U.error("Could not load exception autocapture script",n);C.extendPostHogWithExceptionAutocapture(t.instance,e)}),e.siteApps){if(this.instance.config.opt_in_site_apps){var i,s=p(e.siteApps);try{for(s.s();!(i=s.n()).done;)(function(){var e=i.value,n=e.id,r=e.url,s=t.instance.requestRouter.endpointFor("api",r);j["__$$ph_site_app_".concat(n)]=t.instance,eo(s,function(e){e&&U.error("Error while initializing PostHog app with config id ".concat(n),e)})})()}catch(e){s.e(e)}finally{s.f()}}else e.siteApps.length>0&&U.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}}}]),e}(),n$=null!=C&&C.location?ti(C.location.hash,"__posthog")||ti(location.hash,"state"):null,nD="_postHogToolbarParams";(rv=nE||(nE={}))[rv.UNINITIALIZED=0]="UNINITIALIZED",rv[rv.LOADING=1]="LOADING",rv[rv.LOADED=2]="LOADED";var nq=function(){function e(t){o(this,e),this.instance=t}return l(e,[{key:"setToolbarState",value:function(e){j.ph_toolbar_state=e}},{key:"getToolbarState",value:function(){var e;return null!==(e=j.ph_toolbar_state)&&void 0!==e?e:nE.UNINITIALIZED}},{key:"maybeLoadToolbar",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(!C||!N)return!1;n=null!==(e=n)&&void 0!==e?e:C.location,i=null!==(t=i)&&void 0!==t?t:C.history;try{if(!r){try{C.localStorage.setItem("test","test"),C.localStorage.removeItem("test")}catch(e){return!1}r=null==C?void 0:C.localStorage}var s,o=n$||ti(n.hash,"__posthog")||ti(n.hash,"state"),a=o?ee(function(){return JSON.parse(atob(decodeURIComponent(o)))})||ee(function(){return JSON.parse(decodeURIComponent(o))}):null;return a&&"ph_authorize"===a.action?((s=a).source="url",s&&Object.keys(s).length>0&&(a.desiredHash?n.hash=a.desiredHash:i?i.replaceState(i.state,"",n.pathname+n.search):n.hash="")):((s=JSON.parse(r.getItem(nD)||"{}")).source="localstorage",delete s.userIntent),!(!s.token||this.instance.config.token!==s.token)&&(this.loadToolbar(s),!0)}catch(e){return!1}}},{key:"_callLoadToolbar",value:function(e){(j.ph_load_toolbar||j.ph_load_editor)(e,this.instance)}},{key:"loadToolbar",value:function(e){var t=this,n=!(null==N||!N.getElementById(eL));if(!C||n)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,s=i(i({token:this.instance.config.token},e),{},{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(C.localStorage.setItem(nD,JSON.stringify(i(i({},s),{},{source:void 0}))),this.getToolbarState()===nE.LOADED)this._callLoadToolbar(s);else if(this.getToolbarState()===nE.UNINITIALIZED){this.setToolbarState(nE.LOADING);var o=3e5*Math.floor(Date.now()/3e5);eo(this.instance.requestRouter.endpointFor("assets","/static/toolbar.js?t=".concat(o)),function(e){if(e)return U.error("Failed to load toolbar",e),void t.setToolbarState(nE.UNINITIALIZED);t.setToolbarState(nE.LOADED),t._callLoadToolbar(s)}),es(C,"turbolinks:load",function(){t.setToolbarState(nE.UNINITIALIZED),t.loadToolbar(s)})}return!0}},{key:"_loadEditor",value:function(e){return this.loadToolbar(e)}},{key:"maybeLoadEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return this.maybeLoadToolbar(e,t,n)}}]),e}(),nB=function(){function e(t){o(this,e),u(this,"isPaused",!0),u(this,"queue",[]),u(this,"flushTimeoutMs",3e3),this.sendRequest=t}return l(e,[{key:"enqueue",value:function(e){this.queue.push(e),this.flushTimeout||this.setFlushTimeout()}},{key:"unload",value:function(){var e=this;this.clearFlushTimeout();var t=Object.values(this.queue.length>0?this.formatQueue():{});[].concat(d(t.filter(function(e){return 0===e.url.indexOf("/e")})),d(t.filter(function(e){return 0!==e.url.indexOf("/e")}))).map(function(t){e.sendRequest(i(i({},t),{},{transport:"sendBeacon"}))})}},{key:"enable",value:function(){this.isPaused=!1,this.setFlushTimeout()}},{key:"setFlushTimeout",value:function(){var e=this;this.isPaused||(this.flushTimeout=setTimeout(function(){if(e.clearFlushTimeout(),e.queue.length>0){var t=e.formatQueue();for(var n in t)(function(n){var r=t[n],i=(new Date).getTime();r.data&&b(r.data)&&Y(r.data,function(e){e.offset=Math.abs(e.timestamp-i),delete e.timestamp}),e.sendRequest(r)})(n)}},this.flushTimeoutMs))}},{key:"clearFlushTimeout",value:function(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}},{key:"formatQueue",value:function(){var e={};return Y(this.queue,function(t){var n,r=(t?t.batchKey:null)||t.url;S(e[r])&&(e[r]=i(i({},t),{},{data:[]})),null===(n=e[r].data)||void 0===n||n.push(t.data)}),this.queue=[],e}}]),e}(),nH=Uint8Array,nj=Uint16Array,nz=Uint32Array,nU=new nH([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]),nW=new nH([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]),nV=new nH([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nG=function(e,t){for(var n=new nj(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new nz(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},nY=nG(nU,2),nK=nY[0],nQ=nY[1];nK[28]=258,nQ[258]=28;for(var nZ=nG(nW,0)[1],nX=new nj(32768),nJ=0;nJ<32768;++nJ){var n0=(43690&nJ)>>>1|(21845&nJ)<<1;n0=(61680&(n0=(52428&n0)>>>2|(13107&n0)<<2))>>>4|(3855&n0)<<4,nX[nJ]=((65280&n0)>>>8|(255&n0)<<8)>>>1}var n1=function(e,t,n){for(var r=e.length,i=0,s=new nj(t);
74i<r;++i)++s[e[i]-1];var o,a=new nj(t);for(i=0;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;if(n){o=new nj(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],d=a[e[i]-1]++<<c,h=d|(1<<c)-1;d<=h;++d)o[nX[d]>>>l]=u}else for(o=new nj(r),i=0;i<r;++i)o[i]=nX[a[e[i]-1]++]>>>15-e[i];return o},n2=new nH(288);for(nJ=0;nJ<144;++nJ)n2[nJ]=8;for(nJ=144;nJ<256;++nJ)n2[nJ]=9;for(nJ=256;nJ<280;++nJ)n2[nJ]=7;for(nJ=280;nJ<288;++nJ)n2[nJ]=8;var n3=new nH(32);for(nJ=0;nJ<32;++nJ)n3[nJ]=5;var n5=n1(n2,9,0),n4=n1(n3,5,0),n6=function(e){return(e/8>>0)+(7&e&&1)},n8=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof nj?nj:e instanceof nz?nz:nH)(n-t);return r.set(e.subarray(t,n)),r},n7=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},n9=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},re=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new nH(0),0];if(1==i){var o=new nH(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,d=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[d].f?u++:d++],l=n[u!=c&&n[u].f<n[d].f?u++:d++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var h=s[0].s;for(r=1;r<i;++r)s[r].s>h&&(h=s[r].s);var f=new nj(h+1),p=rt(n[c-1],f,0);if(p>t){r=0;var v=0,g=p-t,m=1<<g;for(s.sort(function(e,t){return f[t.s]-f[e.s]||e.f-t.f});r<i;++r){var _=s[r].s;if(!(f[_]>t))break;v+=m-(1<<p-f[_]),f[_]=t}for(v>>>=g;v>0;){var y=s[r].s;f[y]<t?v-=1<<t-f[y]++-1:++r}for(;r>=0&&v;--r){var b=s[r].s;f[b]==t&&(--f[b],++v)}p=t}return[new nH(f),p]},rt=function e(t,n,r){return -1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},rn=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new nj(++t),r=0,i=e[0],s=1,o=function(e){n[r++]=e},a=1;a<=t;++a)if(e[a]==i&&a!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[a]}return[n.subarray(0,r),t]},rr=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},ri=function(e,t,n){var r=n.length,i=n6(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;s<r;++s)e[i+s+4]=n[s];return 8*(i+4+r)},rs=function(e,t,n,r,i,s,o,a,l,u,c){n7(t,c++,n),++i[256];for(var d=re(i,15),h=d[0],f=d[1],p=re(s,15),v=p[0],g=p[1],m=rn(h),_=m[0],y=m[1],b=rn(v),w=b[0],k=b[1],x=new nj(19),S=0;S<_.length;++S)x[31&_[S]]++;for(S=0;S<w.length;++S)x[31&w[S]]++;for(var P=re(x,7),E=P[0],R=P[1],F=19;F>4&&!E[nV[F-1]];--F);var I,C,T,O,A=u+5<<3,M=rr(i,n2)+rr(s,n3)+o,L=rr(i,h)+rr(s,v)+o+14+3*F+rr(x,E)+(2*x[16]+3*x[17]+7*x[18]);if(A<=M&&A<=L)return ri(t,c,e.subarray(l,l+u));if(n7(t,c,1+(L<M)),c+=2,L<M){I=n1(h,f,0),C=h,T=n1(v,g,0),O=v;var N=n1(E,R,0);for(n7(t,c,y-257),n7(t,c+5,k-1),n7(t,c+10,F-4),c+=14,S=0;S<F;++S)n7(t,c+3*S,E[nV[S]]);c+=3*F;for(var $=[_,w],D=0;D<2;++D){var q=$[D];for(S=0;S<q.length;++S){var B=31&q[S];n7(t,c,N[B]),c+=E[B],B>15&&(n7(t,c,q[S]>>>5&127),c+=q[S]>>>12)}}}else I=n5,C=n2,T=n4,O=n3;for(S=0;S<a;++S)if(r[S]>255){n9(t,c,I[(B=r[S]>>>18&31)+257]),c+=C[B+257],B>7&&(n7(t,c,r[S]>>>23&31),c+=nU[B]);var H=31&r[S];n9(t,c,T[H]),c+=O[H],H>3&&(n9(t,c,r[S]>>>5&8191),c+=nW[H])}else n9(t,c,I[r[S]]),c+=C[r[S]];return n9(t,c,I[256]),c+C[256]},ro=new nz([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ra=new nH(0),rl=function(){for(var e=new nz(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),ru=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},rc=!!q||!!D,rd="text/plain",rh=function(e,t){var n=c(e.split("?"),2),r=n[0],s=n[1],o=i({},t);null==s||s.split("&").forEach(function(e){var t=c(e.split("="),1)[0];delete o[t]});var a=tn(o);return a=a?(s?s+"&":"")+a:s,"".concat(r,"?").concat(a)},rf=function(e){var t,n,r,i,s,o,a,l,u,c=e.data,d=e.compression;if(c)return d===X.GZipJS?{contentType:rd,body:new Blob([(t=function(e,t){var n=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new nH(e.length+(e.length>>>1)),i=0,s=function(e){r[i++]=e},o=0;o<n;++o){if(i+5>r.length){var a=new nH(i+8+(n-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);l<128?s(l):(l<2048?s(192|l>>>6):(l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),s(128|l>>>12&63)):s(224|l>>>12),s(128|l>>>6&63)),s(128|63&l))}return n8(r,0,i)}(JSON.stringify(c)),n={mtime:0},r=4294967295,i={p:function(e){for(var t=r,n=0;n<e.length;++n)t=rl[255&t^e[n]]^t>>>8;r=t},d:function(){return 4294967295^r}},s=t.length,i.p(t),l=(o=10+(n.filename&&n.filename.length+1||0),a=function(e,t,n,r,i,s){var o=e.length,a=new nH(r+o+5*(1+Math.floor(o/7e3))+8),l=a.subarray(r,a.length-8),u=0;if(!t||o<8)for(var c=0;c<=o;c+=65535){var d=c+65535;d<o?u=ri(l,u,e.subarray(c,d)):(l[c]=s,u=ri(l,u,e.subarray(c,o)))}else{for(var h=ro[t-1],f=h>>>13,p=8191&h,v=(1<<n)-1,g=new nj(32768),m=new nj(v+1),_=Math.ceil(n/3),y=2*_,b=function(t){return(e[t]^e[t+1]<<_^e[t+2]<<y)&v},w=new nz(25e3),k=new nj(288),x=new nj(32),S=0,P=0,E=(c=0,0),R=0,F=0;c<o;++c){var I=b(c),C=32767&c,T=m[I];if(g[C]=T,m[I]=C,R<=c){var O=o-c;if((S>7e3||E>24576)&&O>423){u=rs(e,l,0,w,k,x,P,E,F,c-F,u),E=S=P=0,F=c;for(var A=0;A<286;++A)k[A]=0;for(A=0;A<30;++A)x[A]=0}var M=2,L=0,N=p,$=C-T&32767;if(O>2&&I==b(c-$))for(var D=Math.min(f,O)-1,q=Math.min(32767,c),B=Math.min(258,O);$<=q&&--N&&C!=T;){if(e[c+M]==e[c+M-$]){for(var H=0;H<B&&e[c+H]==e[c+H-$];++H);if(H>M){if(M=H,L=$,H>D)break;var j=Math.min($,H-2),z=0;for(A=0;A<j;++A){var U=c-$+A+32768&32767,W=U-g[U]+32768&32767;W>z&&(z=W,T=U)}}}
74$+=(C=T)-(T=g[C])+32768&32767}if(L){w[E++]=268435456|nQ[M]<<18|nZ[L];var V=31&nQ[M],G=31&nZ[L];P+=nU[V]+nW[G],++k[257+V],++x[G],R=c+M,++S}else w[E++]=e[c],++k[e[c]]}}u=rs(e,l,s,w,k,x,P,E,F,c-F,u),s||(u=ri(l,u,ra))}return n8(a,0,r+n6(u)+i)}(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,o,8,!0)).length,function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&ru(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(a,n),ru(a,l-8,i.d()),ru(a,l-4,s),a)],{type:rd})}:d===X.Base64?{contentType:"application/x-www-form-urlencoded",body:"data="+encodeURIComponent("string"==typeof(u=function(e){var t,n,r,i,s,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,u="",c=[];if(!e)return e;e=ei(e);do t=(s=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=s>>12&63,r=s>>6&63,i=63&s,c[l++]=o.charAt(t)+o.charAt(n)+o.charAt(r)+o.charAt(i);while(a<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}(JSON.stringify(c)))?u:JSON.stringify(u))}:{contentType:"application/json",body:JSON.stringify(c)}},rp=[];q&&rp.push({transport:"XHR",method:function(e){var t,n=new q;n.open(e.method||"GET",e.url,!0);var r=null!==(t=rf(e))&&void 0!==t?t:{},i=r.contentType,s=r.body;Y(e.headers,function(e,t){n.setRequestHeader(t,e)}),i&&n.setRequestHeader("Content-Type",i),e.timeout&&(n.timeout=e.timeout),n.withCredentials=!0,n.onreadystatechange=function(){if(4===n.readyState){var t,r={statusCode:n.status,text:n.responseText};if(200===n.status)try{r.json=JSON.parse(n.responseText)}catch(e){}null===(t=e.callback)||void 0===t||t.call(e,r)}},n.send(s)}}),D&&rp.push({transport:"fetch",method:function(e){var t,n,r=null!==(t=rf(e))&&void 0!==t?t:{},i=r.contentType,s=r.body,o=new Headers;Y(o,function(e,t){o.append(t,e)}),i&&o.append("Content-Type",i);var a=e.url,l=null;if(B){var u=new B;l={signal:u.signal,timeout:setTimeout(function(){return u.abort()},e.timeout)}}D(a,{method:(null==e?void 0:e.method)||"GET",headers:o,keepalive:"POST"===e.method,body:s,signal:null===(n=l)||void 0===n?void 0:n.signal}).then(function(t){return t.text().then(function(n){var r,i={statusCode:t.status,text:n};if(200===t.status)try{i.json=JSON.parse(n)}catch(e){U.error(e)}null===(r=e.callback)||void 0===r||r.call(e,i)})}).catch(function(t){var n;U.error(t),null===(n=e.callback)||void 0===n||n.call(e,{statusCode:0,text:t})}).finally(function(){return l?clearTimeout(l.timeout):null})}}),null!=L&&L.sendBeacon&&rp.push({transport:"sendBeacon",method:function(e){var t=rh(e.url,{beacon:"1"});try{var n,r=null!==(n=rf(e))&&void 0!==n?n:{},i=r.contentType,s=r.body,o="string"==typeof s?new Blob([s],{type:i}):s;L.sendBeacon(t,o)}catch(e){}}});var rv,rg,rm=["retriesPerformedSoFar"],r_=function(){function e(t){var n=this;o(this,e),u(this,"isPolling",!1),u(this,"pollIntervalMs",3e3),u(this,"queue",[]),this.instance=t,this.queue=[],this.areWeOnline=!0,!S(C)&&"onLine"in C.navigator&&(this.areWeOnline=C.navigator.onLine,C.addEventListener("online",function(){n.areWeOnline=!0,n.flush()}),C.addEventListener("offline",function(){n.areWeOnline=!1}))}return l(e,[{key:"retriableRequest",value:function(e){var t=this,n=e.retriesPerformedSoFar,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,rm);F(n)&&n>0&&(r.url=rh(r.url,{retry_count:n})),this.instance._send_request(i(i({},r),{},{callback:function(e){var s;200!==e.statusCode&&(e.statusCode<400||e.statusCode>=500)&&(null!=n?n:0)<10?t.enqueue(i({retriesPerformedSoFar:n},r)):null===(s=r.callback)||void 0===s||s.call(r,e)}}))}},{key:"enqueue",value:function(e){var t,n,r,i=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=i+1;var s=(r=(Math.random()-.5)*((n=Math.min(18e5,t=3e3*Math.pow(2,i)))-t/2),Math.ceil(n+r)),o=Date.now()+s;this.queue.push({retryAt:o,requestOptions:e});var a="Enqueued failed request for retry in ".concat(s);navigator.onLine||(a+=" (Browser is offline)"),U.warn(a),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var e=this;this.poller&&clearTimeout(this.poller),this.poller=setTimeout(function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()},this.pollIntervalMs)}},{key:"flush",value:function(){var e=Date.now(),t=[],n=this.queue.filter(function(n){return n.retryAt<e||(t.push(n),!1)});if(this.queue=t,n.length>0){var r,i=p(n);try{for(i.s();!(r=i.n()).done;){var s=r.value.requestOptions;this.retriableRequest(s)}}catch(e){i.e(e)}finally{i.f()}}}},{key:"unload",value:function(){this.poller&&(clearTimeout(this.poller),this.poller=void 0);var e,t=p(this.queue);try{for(t.s();!(e=t.n()).done;){var n=e.value.requestOptions;try{this.instance._send_request(i(i({},n),{},{transport:"sendBeacon"}))}catch(e){U.error(e)}}}catch(e){t.e(e)}finally{t.f()}this.queue=[]}}]),e}(),ry=function(){function e(t,n,r,i){o(this,e),u(this,"_sessionIdChangedH
74andlers",[]),this.config=t,this.persistence=n,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=r||eQ,this._windowIdGenerator=i||eQ;var s=t.persistence_name||t.token,a=t.session_idle_timeout_seconds||1800;if(F(a)?a>1800?U.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):a<60&&U.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(U.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),a=1800),this._sessionTimeoutMs=1e3*Math.min(Math.max(a,60),1800),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var l=e7.parse(this._window_id_storage_key),c=e7.parse(this._primary_window_exists_storage_key);l&&!c?this._windowId=l:e7.remove(this._window_id_storage_key),e7.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return l(e,[{key:"onSessionId",value:function(e){var t=this;return S(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),function(){t._sessionIdChangedHandlers=t._sessionIdChangedHandlers.filter(function(t){return t!==e})}}},{key:"_canUseSessionStorage",value:function(){return"memory"!==this.config.persistence&&!this.persistence.disabled&&e7.is_supported()}},{key:"_setWindowId",value:function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&e7.set(this._window_id_storage_key,e))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?e7.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(e,t,n){e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(u({},ey,[t,e,n])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[ey];return b(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var e=this;null==C||C.addEventListener("beforeunload",function(){e._canUseSessionStorage()&&e7.remove(e._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||(new Date).getTime(),n=c(this._getSessionId(),3),r=n[0],i=n[1],s=n[2],o=this._getWindowId(),a=s&&s>0&&Math.abs(t-s)>864e5,l=!1,u=!i,d=!e&&Math.abs(t-r)>this._sessionTimeoutMs;u||d||a?(i=this._sessionIdGenerator(),o=this._windowIdGenerator(),U.info("[SessionId] new session ID generated",{sessionId:i,windowId:o,changeReason:{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:a}}),s=t,l=!0):o||(o=this._windowIdGenerator(),l=!0);var h=0===r||!e||a?t:r,f=0===s?(new Date).getTime():s;return this._setWindowId(o),this._setSessionId(i,h,f),l&&this._sessionIdChangedHandlers.forEach(function(e){return e(i,o)}),{sessionId:i,windowId:o,sessionStartTimestamp:f}}}]),e}();(rS=rg||(rg={})).US="us",rS.EU="eu",rS.CUSTOM="custom";var rb="i.posthog.com",rw=function(){function e(t){o(this,e),u(this,"_regionCache",{}),this.instance=t}return l(e,[{key:"apiHost",get:function(){return this.instance.config.api_host.trim().replace(/\/$/,"")}},{key:"uiHost",get:function(){var e,t=null===(e=this.instance.config.ui_host)||void 0===e?void 0:e.replace(/\/$/,"");return"https://app.posthog.com"===t?"https://us.posthog.com":t}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=rg.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=rg.EU:this._regionCache[this.apiHost]=rg.CUSTOM),this._regionCache[this.apiHost]}},{key:"endpointFor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t&&(t="/"===t[0]?t:"/".concat(t)),"ui"===e)return(this.uiHost||this.apiHost.replace(".".concat(rb),".posthog.com"))+t;if(this.region===rg.CUSTOM)return this.apiHost+t;var n=rb+t;switch(e){case"assets":return"https://".concat(this.region,"-assets.").concat(n);case"api":return"https://".concat(this.region,".").concat(n)}}}]),e}(),rk="posthog-js";function rx(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.organization,r=t.projectId,i=t.prefix,s=t.severityAllowList,o=void 0===s?["error"]:s;return function(t){if(!("*"===o||o.includes(t.level))||!e.__loaded)return t;t.tags||(t.tags={});var s,a,l,u,c,d=e.requestRouter.endpointFor("ui","/project/".concat(e.config.token,"/person/").concat(e.get_distinct_id()));t.tags["PostHog Person URL"]=d,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var h=(null===(s=t.exception)||void 0===s?void 0:s.values)||[],f={$exception_message:(null===(a=h[0])||void 0===a?void 0:a.value)||t.message,$exception_type:null===(l=h[0])||void 0===l?void 0:l.type,$exception_personURL:d,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null===(u=h[0])||void 0===u?void 0:u.value)||t.message,$sentry_exception_type:null===(c=h[0])||void 0===c?void 0:c.type,$sentry_tags:t.tags,$level:t.level};return n&&r&&(f.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+t.event_id),e.capture("$exception",f),t}}var rS,rP,rE,rR,rF=l(function e(t,n,r,i,s){o(this,e),this.name=rk,this.setupOnce=function(e){e(rx(t,{organization:n,projectId:r,prefix:i,severityAllowList:s}))}}),rI=function(){function e(t){o(this,e),this._instance=t}return l(e,[{key:"doPageView",value:function(){var e,t=this._previousScrollProperties();return this._currentPath=null!==(e=null==C?void 0:C.location.pathname)&&void 0!==e?e:"",this._instance.scrollManager.resetContext(),t}},{key:"doPageLeave",value:function(){return this._previousScrollProperties()}},{key:"_previousScrollProperties",value:function(){var e=this._currentPath,t=this._instance.scrollManager.getContext();if(!e||!t)return{};var n=t.maxScrollHeight,r=t.lastScrollY,i=t.maxScrollY,s=t.maxContentHeight,o=t.lastContentY,a=t.maxContentY;return S(n)||S(r)||S(i)||S(s)||S(o)||S(a)?{}
74:(n=Math.ceil(n),r=Math.ceil(r),i=Math.ceil(i),s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),{$prev_pageview_pathname:e,$prev_pageview_last_scroll:r,$prev_pageview_last_scroll_percentage:n<=1?1:rC(r/n,0,1),$prev_pageview_max_scroll:i,$prev_pageview_max_scroll_percentage:n<=1?1:rC(i/n,0,1),$prev_pageview_last_content:o,$prev_pageview_last_content_percentage:s<=1?1:rC(o/s,0,1),$prev_pageview_max_content:a,$prev_pageview_max_content_percentage:s<=1?1:rC(a/s,0,1)})}}]),e}();function rC(e,t,n){return Math.max(t,Math.min(e,n))}(rV=rP||(rP={})).Popover="popover",rV.API="api",rV.Widget="widget",(rG=rE||(rE={})).Open="open",rG.MultipleChoice="multiple_choice",rG.SingleChoice="single_choice",rG.Rating="rating",rG.Link="link",(rY=rR||(rR={})).NextQuestion="next_question",rY.ConfirmationMessage="confirmation_message",rY.ResponseBased="response_based",rY.SpecificQuestion="specific_question";var rT=function(){function e(t){o(this,e),this.persistence=t,this.eventRegistry=new Map}return l(e,[{key:"register",value:function(e){var t=this;e.forEach(function(e){var n,r,i,s,o;null!==(n=e.conditions)&&void 0!==n&&n.events&&null!==(r=e.conditions)&&void 0!==r&&null!==(i=r.events)&&void 0!==i&&i.values&&(null===(s=e.conditions)||void 0===s?void 0:s.events.values.length)>0&&t.eventRegistry.set(e.id,null===(o=e.conditions)||void 0===o?void 0:o.events.values.map(function(e){return e.name}))})}},{key:"on",value:function(e){var t,n=[];this.eventRegistry.forEach(function(t,r){t.includes(e)&&n.push(r)});var r=((null===(t=this.persistence)||void 0===t?void 0:t.props[eE])||[]).concat(n);this._saveSurveysToStorage(r)}},{key:"getSurveys",value:function(){var e;return(null===(e=this.persistence)||void 0===e?void 0:e.props[eE])||[]}},{key:"getEventRegistry",value:function(){return this.eventRegistry}},{key:"_saveSurveysToStorage",value:function(e){var t;null===(t=this.persistence)||void 0===t||t.register(u({},eE,d(new Set(e))))}}]),e}(),rO={icontains:function(e){return!!C&&C.location.href.toLowerCase().indexOf(e.toLowerCase())>-1},not_icontains:function(e){return!!C&&-1===C.location.href.toLowerCase().indexOf(e.toLowerCase())},regex:function(e){return!!C&&tt(C.location.href,e)},not_regex:function(e){return!!C&&!tt(C.location.href,e)},exact:function(e){return(null==C?void 0:C.location.href)===e},is_not:function(e){return(null==C?void 0:C.location.href)!==e}},rA=function(){function e(t){o(this,e),this.instance=t,this._surveyEventReceiver=null}return l(e,[{key:"afterDecideResponse",value:function(e){this._decideServerResponse=!!e.surveys,this.loadIfEnabled()}},{key:"loadIfEnabled",value:function(){var e=this,t=null==j?void 0:j.extendPostHogWithSurveys;this.instance.config.disable_surveys||!this._decideServerResponse||t||(null==this._surveyEventReceiver&&(this._surveyEventReceiver=new rT(this.instance.persistence)),eo(this.instance.requestRouter.endpointFor("assets","/static/surveys.js"),function(t){if(t)return U.error("Could not load surveys script",t);j.extendPostHogWithSurveys(e.instance)}))}},{key:"getSurveys",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.instance.config.disable_surveys)return e([]);null==this._surveyEventReceiver&&(this._surveyEventReceiver=new rT(this.instance.persistence));var r=this.instance.get_property(eP);if(r&&!n)return e(r);this.instance._send_request({url:this.instance.requestRouter.endpointFor("api","/api/surveys/?token=".concat(this.instance.config.token)),method:"GET",transport:"XHR",callback:function(n){if(200!==n.statusCode||!n.json)return e([]);var r,i,s=n.json.surveys||[],o=s.filter(function(e){var t,n,r,i,s,o;return(null===(t=e.conditions)||void 0===t?void 0:t.events)&&(null===(n=e.conditions)||void 0===n||null===(r=n.events)||void 0===r?void 0:r.values)&&(null===(i=e.conditions)||void 0===i||null===(s=i.events)||void 0===s||null===(o=s.values)||void 0===o?void 0:o.length)>0});return o.length>0&&!S(t.instance._addCaptureHook)&&(null===(i=t._surveyEventReceiver)||void 0===i||i.register(o),t.instance._addCaptureHook(function(e){var n;null===(n=t._surveyEventReceiver)||void 0===n||n.on(e)})),null===(r=t.instance.persistence)||void 0===r||r.register(u({},eP,s)),e(s)}})}},{key:"getActiveMatchingSurveys",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];
74this.getSurveys(function(n){var r,i=n.filter(function(e){return!(!e.start_date||e.end_date)}).filter(function(e){if(!e.conditions)return!0;var t,n,r,i,s=null===(t=e.conditions)||void 0===t||!t.url||rO[null!==(n=null===(r=e.conditions)||void 0===r?void 0:r.urlMatchType)&&void 0!==n?n:"icontains"](e.conditions.url),o=null===(i=e.conditions)||void 0===i||!i.selector||(null==N?void 0:N.querySelector(e.conditions.selector));return s&&o}),s=null===(r=t._surveyEventReceiver)||void 0===r?void 0:r.getSurveys();return e(i.filter(function(e){if(!e.linked_flag_key&&!e.targeting_flag_key&&!e.internal_targeting_flag_key)return!0;var n,r,i,o,a,l=!e.linked_flag_key||t.instance.featureFlags.isFeatureEnabled(e.linked_flag_key),u=!e.targeting_flag_key||t.instance.featureFlags.isFeatureEnabled(e.targeting_flag_key),c=!e.internal_targeting_flag_key||t.instance.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key),d=!((null===(n=e.conditions)||void 0===n?void 0:n.events)&&(null===(r=e.conditions)||void 0===r||null===(i=r.events)||void 0===i?void 0:i.values)&&(null===(o=e.conditions)||void 0===o||null===(a=o.events)||void 0===a?void 0:a.values.length)>0)||(null==s?void 0:s.includes(e.id));return l&&u&&c&&d}))},n)}},{key:"getNextSurveyStep",value:function(e,t,n){var r,i=e.questions[t],s=t+1;if(null===(r=i.branching)||void 0===r||!r.type)return t===e.questions.length-1?rR.ConfirmationMessage:s;if(i.branching.type===rR.ConfirmationMessage)return rR.ConfirmationMessage;if(i.branching.type===rR.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===rR.ResponseBased){if(i.type===rE.SingleChoice){var o,a,l=i.choices.indexOf("".concat(n));if(null!==(o=i.branching)&&void 0!==o&&null!==(a=o.responseValues)&&void 0!==a&&a.hasOwnProperty(l)){var u=i.branching.responseValues[l];return Number.isInteger(u)?u:u===rR.ConfirmationMessage?rR.ConfirmationMessage:s}}else if(i.type===rE.Rating){if("number"!=typeof n||!Number.isInteger(n))throw Error("The response type must be an integer");var c,d,h=function(e,t){if(3===t){if(e<1||e>3)throw Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(e<1||e>5)throw Error("The response must be in range 1-5");return e<=2?"negative":3===e?"neutral":"positive"}if(10===t){if(e<0||e>10)throw Error("The response must be in range 0-10");return e<=6?"detractors":e<=8?"passives":"promoters"}throw Error("The scale must be one of: 3, 5, 10")}(n,i.scale);if(null!==(c=i.branching)&&void 0!==c&&null!==(d=c.responseValues)&&void 0!==d&&d.hasOwnProperty(h)){var f=i.branching.responseValues[h];return Number.isInteger(f)?f:f===rR.ConfirmationMessage?rR.ConfirmationMessage:s}}return s}return console.warn("Falling back to next question index due to unexpected branching type"),s}}]),e}(),rM=function(){function e(t){var n,r,i=this;o(this,e),u(this,"serverLimits",{}),u(this,"lastEventRateLimited",!1),u(this,"checkForLimiting",function(e){var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach(function(e){U.info("[RateLimiter] ".concat(e||"events"," is quota limited.")),i.serverLimits[e]=(new Date).getTime()+6e4})}catch(e){return void U.warn('[RateLimiter] could not rate limit - continuing. Error: "'.concat(null==e?void 0:e.message,'"'),{text:t})}}),this.instance=t,this.captureEventsPerSecond=(null===(n=t.config.rate_limiting)||void 0===n?void 0:n.events_per_second)||10,this.captureEventsBurstLimit=Math.max((null===(r=t.config.rate_limiting)||void 0===r?void 0:r.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}return l(e,[{key:"clientRateLimitContext",value:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=(new Date).getTime(),s=null!==(e=null===(t=this.instance.persistence)||void 0===t?void 0:t.get_property(eC))&&void 0!==e?e:{tokens:this.captureEventsBurstLimit,last:i};s.tokens+=(i-s.last)/1e3*this.captureEventsPerSecond,s.last=i,s.tokens>this.captureEventsBurstLimit&&(s.tokens=this.captureEventsBurstLimit);var o=s.tokens<1;return o||r||(s.tokens=Math.max(0,s.tokens-1)),!o||this.lastEventRateLimited||r||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to ".concat(this.captureEventsPerSecond," events per second and ").concat(this.captureEventsBurstLimit," events burst limit.")},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=o,null===(n=this.instance.persistence)||void 0===n||n.set_property(eC,s),{isRateLimited:o,remainingTokens:s.tokens}}},{key:"isServerRateLimited",value:function(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t}}]),e}(),rL=function(){return i({initialPathName:(null==$?void 0:$.pathname)||"",referringDomain:t0.referringDomain()},t0.campaignParams())},rN=function(){function e(t,n,r){var i=this;o(this,e),u(this,"_onSessionIdCallback",function(e){var t=i._getStoredProps();if(!t||t.sessionId!==e){var n={sessionId:e,props:i._sessionSourceParamGenerator()};i._persistence.register(u({},eI,n))}}),this._sessionIdManager=t,this._persistence=n,this._sessionSourceParamGenerator=r||rL,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}return l(e,[{key:"_getStoredProps",value:function(){return this._persistence.props[eI]}},{key:"getSessionProps",value:function(){var e,t=null===(e=this._getStoredProps())||void 0===e?void 0:e.props;return t?{$client_session_initial_referring_host:t.referringDomain,$client_session_initial_pathname:t.initialPathName,$client_session_initial_utm_source:t.utm_source,$client_session_initial_utm_campaign:t.utm_campaign,$client_session_initial_utm_medium:t.utm_medium,$client_session_initial_utm_content:t.utm_content,$client_session_initial_utm_term:t.utm_term}:{}}}]),e}(),r$=["ahrefsbot","ahrefssiteaudit","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","deepscan","duckduckbot","facebookexternal","facebookcatalog","gptbot","http://yandex.com/bots","hub
74spot","ia_archiver","linkedinbot","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","slurp","turnitin","twitterbot","vercelbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google","Bytespider;"],rD=function(e,t){if(!e)return!1;var n=e.toLowerCase();return r$.concat(t||[]).some(function(e){var t=e.toLowerCase();return -1!==n.indexOf(t)})},rq=function(){function e(){o(this,e),this.clicks=[]}return l(e,[{key:"isRageClick",value:function(e,t,n){var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&n-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:n}),3===this.clicks.length)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}}]),e}();function rB(e){var t;return e.id===eL||!(null===(t=e.closest)||void 0===t||!t.call(e,"#"+eL))}var rH=function(){function e(t){var n;o(this,e),u(this,"rageclicks",new rq),u(this,"_enabledServerSide",!1),u(this,"_initialized",!1),this.instance=t,this._enabledServerSide=!(null===(n=this.instance.persistence)||void 0===n||!n.props[eh])}return l(e,[{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(U.info("[heatmaps] Heatmaps enabled, starting..."),this._setupListeners())}},{key:"isEnabled",get:function(){return S(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps}},{key:"afterDecideResponse",value:function(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register(u({},eh,t)),this._enabledServerSide=t,this.startIfEnabled()}},{key:"getAndClearBuffer",value:function(){var e=this.buffer;return this.buffer=void 0,e}},{key:"_setupListeners",value:function(){var e=this;C&&N&&(es(N,"click",function(t){return e._onClick(t||(null==C?void 0:C.event))},!1,!0),es(N,"mousemove",function(t){return e._onMouseMove(t||(null==C?void 0:C.event))},!1,!0),this._initialized=!0)}},{key:"_getProperties",value:function(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),s=function(e,t,n){for(var r=e;r&&!ne(r,"body")&&r!==n;){if(Q(t,null==C?void 0:C.getComputedStyle(r).position))return!0;r=ni(r)}return!1}(e.target,["fixed","sticky"],i);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:n),target_fixed:s,type:t}}},{key:"_onClick",value:function(e){var t;if(!rB(e.target)){var n=this._getProperties(e,"click");null!==(t=this.rageclicks)&&void 0!==t&&t.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._capture(i(i({},n),{},{type:"rageclick"})),this._capture(n)}}},{key:"_onMouseMove",value:function(e){var t=this;rB(e.target)||(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout(function(){t._capture(t._getProperties(e,"mousemove"))},500))}},{key:"_capture",value:function(e){if(C){var t=C.location.href;this.buffer=this.buffer||{},this.buffer[t]||(this.buffer[t]=[]),this.buffer[t].push(e)}}}]),e}(),rj=function(){function e(t){var n=this;o(this,e),u(this,"_updateScrollData",function(){n.context||(n.context={});var e,t,r,i,s=n.scrollElement(),o=n.scrollY(),a=s?Math.max(0,s.scrollHeight-s.clientHeight):0,l=o+((null==s?void 0:s.clientHeight)||0),u=(null==s?void 0:s.scrollHeight)||0;n.context.lastScrollY=Math.ceil(o),n.context.maxScrollY=Math.max(o,null!==(e=n.context.maxScrollY)&&void 0!==e?e:0),n.context.maxScrollHeight=Math.max(a,null!==(t=n.context.maxScrollHeight)&&void 0!==t?t:0),n.context.lastContentY=l,n.context.maxContentY=Math.max(l,null!==(r=n.context.maxContentY)&&void 0!==r?r:0),n.context.maxContentHeight=Math.max(u,null!==(i=n.context.maxContentHeight)&&void 0!==i?i:0)}),this.instance=t}return l(e,[{key:"getContext",value:function(){return this.context}},{key:"resetContext",value:function(){var e=this.context;return setTimeout(this._updateScrollData,0),e}},{key:"startMeasuringScrollPosition",value:function(){null==C||C.addEventListener("scroll",this._updateScrollData,!0),null==C||C.addEventListener("scrollend",this._updateScrollData,!0),null==C||C.addEventListener("resize",this._updateScrollData)}},{key:"scrollElement",value:function(){if(!this.instance.config.scroll_root_selector)return null==C?void 0:C.document.documentElement;var e,t=p(b(this.instance.config.scroll_root_selector)?this.instance.config.scroll_root_selector:[this.instance.config.scroll_root_selector]);try{for(t.s();!(e=t.n()).done;){var n=e.value,r=null==C?void 0:C.document.querySelector(n);if(r)return r}}catch(e){t.e(e)}finally{t.f()}}},{key:"scrollY",value:function(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return C&&(C.scrollY||C.pageYOffset||C.document.documentElement.scrollTop)||0}},{key:"scrollX",value:function(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return C&&(C.scrollX||C.pageXOffset||C.document.documentElement.scrollLeft)||0}}]),e}(),rz=function(){function e(){o(this,e),u(this,"events",{}),this.events={}}return l(e,[{key:"on",value:function(e,t){var n=this;return this.events[e]||(this.events[e]=[]),this.events[e].push(t),function(){n.events[e]=n.events[e].filter(function(e){return e!==t})}}},{key:"emit",value:function(e,t){var n,r=p(this.events[e]||[]);try{for(r.s();!(n=r.n()).done;)(0,n.value)(t)}catch(e){r.e(e)}finally{r.f()}var i,s=p(this.events["*"]||[]);try{for(s.s();!(i=s.n()).done;)(0,i.value)(e,t)}catch(e){s.e(e)}finally{s.f()}}}]),e}(),rU="$copy_autocapture";function rW(e,t){return t.length>e?t.slice(0,e)+"...":t}var rV,rG,rY,rK,rQ=function(){function e(t){o(this,e),u(this,"_initialized",!1),u(this,"_isDisabledServerSide",null),u(this,"rageclicks",new rq),u(this,"_elementsC
74hainAsString",!1),this.instance=t}return l(e,[{key:"config",get:function(){var e,t=k(this.instance.config.autocapture)?this.instance.config.autocapture:{};return t.url_allowlist=null===(e=t.url_allowlist)||void 0===e?void 0:e.map(function(e){return new RegExp(e)}),t}},{key:"_addDomEventHandlers",value:function(){var e=this;if(this.isBrowserSupported()){if(C&&N){var t=function(t){t=t||(null==C?void 0:C.event);try{e._captureEvent(t)}catch(e){U.error("Failed to capture event",e)}},n=function(t){t=t||(null==C?void 0:C.event),e._captureEvent(t,rU)};es(N,"submit",t,!1,!0),es(N,"change",t,!1,!0),es(N,"click",t,!1,!0),this.config.capture_copied_text&&(es(N,"copy",n,!1,!0),es(N,"cut",n,!1,!0))}}else U.info("Disabling Automatic Event Collection because this browser is not supported")}},{key:"startIfEnabled",value:function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)}},{key:"afterDecideResponse",value:function(e){e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register(u({},ed,!!e.autocapture_opt_out)),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()}},{key:"isEnabled",get:function(){var e,t,n=null===(e=this.instance.persistence)||void 0===e?void 0:e.props[ed];if(E(this._isDisabledServerSide)&&!I(n)&&!this.instance.config.advanced_disable_decide)return!1;var r=null!==(t=this._isDisabledServerSide)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!r}},{key:"_previousElementSibling",value:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!t9(t));return t}},{key:"_getAugmentPropertiesFromElement",value:function(e){if(!ns(e))return{};var t={};return Y(e.attributes,function(e){if(e.name&&0===e.name.indexOf("data-ph-capture-attribute")){var n=e.name.replace("data-ph-capture-attribute-",""),r=e.value;n&&r&&nf(r)&&(t[n]=r)}}),t}},{key:"_getPropertiesFromElement",value:function(e,t,n){var r,i=e.tagName.toLowerCase(),s={tag_name:i};nr.indexOf(i)>-1&&!n&&("a"===i.toLowerCase()||"button"===i.toLowerCase()?s.$el_text=rW(1024,np(e)):s.$el_text=rW(1024,t7(e)));var o=t6(e);o.length>0&&(s.classes=o.filter(function(e){return""!==e}));var a=null===(r=this.config)||void 0===r?void 0:r.element_attribute_ignorelist;Y(e.attributes,function(n){var r;if((!no(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&(null==a||!a.includes(n.name))&&!t&&nf(n.value)&&(!P(r=n.name)||"_ngcontent"!==r.substring(0,10)&&"_nghost"!==r.substring(0,7))){var i=n.value;"class"===n.name&&(i=t4(i).join(" ")),s["attr__"+n.name]=rW(1024,i)}});for(var l=1,u=1,c=e;c=this._previousElementSibling(c);)l++,c.tagName===e.tagName&&u++;return s.nth_child=l,s.nth_of_type=u,s}},{key:"_getDefaultProperties",value:function(e){return{$event_type:e,$ce_version:1}}},{key:"_getEventTarget",value:function(e){var t;return S(e.target)?e.srcElement||null:null!==(t=e.target)&&void 0!==t&&t.shadowRoot?e.composedPath()[0]||null:e.target||null}},{key:"_captureEvent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$autocapture";if(this.isEnabled){var r,o=this._getEventTarget(e);nt(o)&&(o=o.parentNode||null),"$autocapture"===n&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!==(r=this.rageclicks)&&void 0!==r&&r.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._captureEvent(e,"$rageclick");var a=n===rU;if(o&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(!C||!e||ne(e,"html")||!t9(e))return!1;if(null!=n&&n.url_allowlist){var o=C.location.href,a=n.url_allowlist;if(a&&!a.some(function(e){return o.match(e)}))return!1}if(null!=n&&n.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some(function(e){return t.type===e}))return!1}for(var u=!1,c=[e],d=!0,h=e;h.parentNode&&!ne(h,"body");)if(nn(h.parentNode))c.push(h.parentNode.host),h=h.parentNode.host;else{if(!(d=ni(h)))break;if(r||nr.indexOf(d.tagName.toLowerCase())>-1)u=!0;else{var f=C.getComputedStyle(d);f&&"pointer"===f.getPropertyValue("cursor")&&(u=!0)}c.push(d),h=d}if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(S(n))return!0;var r,i=p(e);try{for(i.s();!(r=i.n()).done;){var o=function(){var e=r.value;if(n.some(function(t){return e.tagName.toLowerCase()===t}))return{v:!0}}();if("object"===s(o))return o.v}}catch(e){i.e(e)}finally{i.f()}return!1}(c,n)||!function(e,t){var n=null==t?void 0:t.css_selector_allowlist;if(S(n))return!0;var r,i=p(e);try{for(i.s();!(r=i.n()).done;){var o=function(){var e=r.value;if(n.some(function(t){return e.matches(t)}))return{v:!0}}();if("object"===s(o))return o.v}}catch(e){i.e(e)}finally{i.f()}return!1}(c,n))return!1;var v=C.getComputedStyle(e);
74if(v&&"pointer"===v.getPropertyValue("cursor")&&"click"===t.type)return!0;var g=e.tagName.toLowerCase();switch(g){case"html":return!1;case"form":return(i||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(i||["change","click"]).indexOf(t.type)>=0;default:return u?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(nr.indexOf(g)>-1||"true"===e.getAttribute("contenteditable"))}}(o,e,this.config,a,a?["copy","cut"]:void 0)){for(var l,u,d=[o],h=o;h.parentNode&&!ne(h,"body");)nn(h.parentNode)?(d.push(h.parentNode.host),h=h.parentNode.host):(d.push(h.parentNode),h=h.parentNode);var f,v=[],g={},m=!1;if(Y(d,function(e){var n=ns(e);"a"===e.tagName.toLowerCase()&&(f=e.getAttribute("href"),f=n&&nf(f)&&f),Q(t6(e),"ph-no-capture")&&(m=!0),v.push(t._getPropertiesFromElement(e,t.instance.config.mask_all_element_attributes,t.instance.config.mask_all_text)),K(g,t._getAugmentPropertiesFromElement(e))}),this.instance.config.mask_all_text||("a"===o.tagName.toLowerCase()||"button"===o.tagName.toLowerCase()?v[0].$el_text=np(o):v[0].$el_text=t7(o)),f&&(v[0].attr__href=f),m)return!1;
74var _=K(this._getDefaultProperties(e.type),this._elementsChainAsString?{$elements_chain:v.map(function(e){var t,n,r,i={text:null===(n=e.$el_text)||void 0===n?void 0:n.slice(0,400),tag_name:e.tag_name,href:null===(r=e.attr__href)||void 0===r?void 0:r.slice(0,2048),attr_class:(t=e.attr__class)?b(t)?t:t4(t):void 0,attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Z(e).filter(function(e){return 0===c(e,1)[0].indexOf("attr__")}).forEach(function(e){var t=c(e,2),n=t[0],r=t[1];return i.attributes[n]=r}),i}).map(function(e){var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class){e.attr_class.sort();var s,o=p(e.attr_class);try{for(o.s();!(s=o.n()).done;){var a=s.value;r+=".".concat(a.replace(/"/g,""))}}catch(e){o.e(e)}finally{o.f()}}var l=i(i(i(i({},e.text?{text:e.text}:{}),{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(n=e.nth_of_type)&&void 0!==n?n:0},e.href?{href:e.href}:{}),e.attr_id?{attr_id:e.attr_id}:{}),e.attributes),u={};return Z(l).sort(function(e,t){var n=c(e,1)[0],r=c(t,1)[0];return n.localeCompare(r)}).forEach(function(e){var t=c(e,2),n=t[0],r=t[1];return u[nv(n.toString())]=nv(r.toString())}),r+=":"+Z(l).map(function(e){var t=c(e,2),n=t[0],r=t[1];return"".concat(n,'="').concat(r,'"')}).join("")}).join(";")}:{$elements:v},null!==(l=v[0])&&void 0!==l&&l.$el_text?{$el_text:null===(u=v[0])||void 0===u?void 0:u.$el_text}:{},g);if(n===rU){var y,w=t8(null==C||null===(y=C.getSelection())||void 0===y?void 0:y.toString()),k=e.type||"clipboard";if(!w)return!1;_.$selected_content=w,_.$copy_type=k}return this.instance.capture(n,_),!0}}}},{key:"isBrowserSupported",value:function(){return w(null==N?void 0:N.querySelectorAll)}}]),e}(),rZ=function(){function e(t){var n=this;o(this,e),u(this,"_restoreXHRPatch",void 0),u(this,"_restoreFetchPatch",void 0),u(this,"_startCapturing",function(){S(n._restoreXHRPatch)&&j.postHogTracingHeadersPatchFns._patchXHR(n.instance.sessionManager),S(n._restoreFetchPatch)&&j.postHogTracingHeadersPatchFns._patchFetch(n.instance.sessionManager)}),this.instance=t}return l(e,[{key:"_loadScript",value:function(e){j.postHogTracingHeadersPatchFns&&e(),eo(this.instance.requestRouter.endpointFor("assets","/static/tracing-headers.js?v=".concat(v.LIB_VERSION)),function(t){t&&U.error("[TRACING-HEADERS] failed to load script",t),e()})}},{key:"startIfEnabledOrStop",value:function(){var e,t;this.instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):(null===(e=this._restoreXHRPatch)||void 0===e||e.call(this),null===(t=this._restoreFetchPatch)||void 0===t||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)}}]),e}();(r8=rK||(rK={}))[r8.PENDING=-1]="PENDING",r8[r8.DENIED=0]="DENIED",r8[r8.GRANTED=1]="GRANTED";var rX=function(){function e(t){o(this,e),this.instance=t}return l(e,[{key:"config",get:function(){return this.instance.config}},{key:"consent",get:function(){return this.getDnt()?rK.DENIED:this.storedConsent}},{key:"isOptedOut",value:function(){return this.consent===rK.DENIED||this.consent===rK.PENDING&&this.config.opt_out_capturing_by_default}},{key:"isOptedIn",value:function(){return!this.isOptedOut()}},{key:"optInOut",value:function(e){this.storage.set(this.storageKey,e?1:0,this.config.cookie_expiration,this.config.cross_subdomain_cookie,this.config.secure_cookie)}},{key:"reset",value:function(){this.storage.remove(this.storageKey,this.config.cross_subdomain_cookie)}},{key:"storageKey",get:function(){var e=this.instance.config,t=e.token;return(e.opt_out_capturing_cookie_prefix||"__ph_opt_in_out_")+t}},{key:"storedConsent",get:function(){var e=this.storage.get(this.storageKey);return"1"===e?rK.GRANTED:"0"===e?rK.DENIED:rK.PENDING}},{key:"storage",get:function(){if(!this._storage){var e=this.config.opt_out_capturing_persistence_type;this._storage="localStorage"===e?e2:e0;var t="localStorage"===e?e0:e2;t.get(this.storageKey)&&(this._storage.get(this.storageKey)||this.optInOut("1"===t.get(this.storageKey)),t.remove(this.storageKey,this.config.cross_subdomain_cookie))}return this._storage}},{key:"getDnt",value:function(){return!!this.config.respect_dnt&&!!ea([null==L?void 0:L.doNotTrack,null==L?void 0:L.msDoNotTrack,j.doNotTrack],function(e){return Q([!0,1,"1","yes"],e)})}}]),e}(),rJ={},r0=function(){},r1="posthog",r2=!rc&&-1===(null==H?void 0:H.indexOf("MSIE"))&&-1===(null==H?void 0:H.indexOf("Mozilla")),r3=function(){var e,t,n;return{api_host:"https://us.i.posthog.com",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:!!P(n=null==(t=null==N?void 0:N.location)?void 0:t.hostname)&&"herokuapp.com"!==n.split(".").slice(-2).join("."),persistence:"localStorage+cookie",persistence_name:"",loaded:r0,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:"if_capture_pageview",debug:$&&P(null==$?void 0:$.search)&&-1!==$.search.indexOf("__posthog_debug=true")||!1,verbose
74:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_surveys:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==C||null===(e=C.location)||void 0===e?void 0:e.protocol),ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,on_request_error:function(e){var t="Bad HTTP status: "+e.statusCode+" "+e.text;U.error(t)},get_device_id:function(e){return e},_onCapture:r0,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"always",__add_tracing_headers:!1}},r5=function(e){var t={};S(e.process_person)||(t.person_profiles=e.process_person),S(e.xhr_headers)||(t.request_headers=e.xhr_headers),S(e.cookie_name)||(t.persistence_name=e.cookie_name),S(e.disable_cookie)||(t.disable_persistence=e.disable_cookie);var n=K({},t,e);return b(e.property_blacklist)&&(S(e.property_denylist)?n.property_denylist=e.property_blacklist:b(e.property_denylist)?n.property_denylist=[].concat(d(e.property_blacklist),d(e.property_denylist)):U.error("Invalid value for property_denylist config: "+e.property_denylist)),n},r4=function(){function e(){o(this,e),u(this,"__forceAllowLocalhost",!1)}return l(e,[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(e){U.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}]),e}(),r6=function(){function e(){var t=this;o(this,e),u(this,"webPerformance",new r4),u(this,"_debugEventEmitter",new rz),this.config=r3(),this.decideEndpointWasHit=!1,this.SentryIntegration=rF,this.sentryIntegration=function(e){var n;return n=rx(t,e),{name:rk,processEvent:function(e){return n(e)}}},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.featureFlags=new eH(this),this.toolbar=new nq(this),this.scrollManager=new rj(this),this.pageViewManager=new rI(this),this.surveys=new rA(this),this.rateLimiter=new rM(this),this.requestRouter=new rw(this),this.consent=new rX(this),this.people={set:function(e,n,r){var i=P(e)?u({},e,n):e;t.setPersonProperties(i),null==r||r({})},set_once:function(e,n,r){var i=P(e)?u({},e,n):e;t.setPersonProperties(void 0,i),null==r||r({})}},this.on("eventCaptured",function(e){return U.info("send",e)})}return l(e,[{key:"init",value:function(t,n,r){if(r&&r!==r1){var i,s=null!==(i=rJ[r])&&void 0!==i?i:new e;return s._init(t,n,r),rJ[r]=s,rJ[r1][r]=s,s}return this._init(t,n,r)}},{key:"_init",value:function(e){var t,n,r=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;if(S(e)||P(e)&&0===e.trim().length)return U.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 U.warn("You have already initialized PostHog! Re-initializing is a no-op"),this;if(this.__loaded=!0,this.config={},this._triggered_notifs=[],this.set_config(K({},r3(),r5(s),{name:o,token:e})),this.compression=s.disable_compression?void 0:X.Base64,this.persistence=new t2(this.config),this.sessionPersistence="sessionStorage"===this.config.persistence?this.persistence:new t2(i(i({},this.config),{},{persistence:"sessionStorage"})),this._requestQueue=new nB(function(e){return r._send_retriable_request(e)}),this._retryQueue=new r_(this),this.__request_queue=[],this.sessionManager=new ry(this.config,this.persistence),this.sessionPropsManager=new rN(this.sessionManager,this.persistence),new rZ(this).startIfEnabledOrStop(),this.sessionRecording=new nL(this),this.sessionRecording.startIfEnabledOrStop(),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new rQ(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new rH(this),this.heatmaps.startIfEnabled(),v.DEBUG=v.DEBUG||this.config.debug,this._sync_opt_out_with_persistence(),void 0!==(null===(t=s.bootstrap)||void 0===t?void 0:t.distinctID)
74){var a,l,u=this.config.get_device_id(eQ()),c=null!==(a=s.bootstrap)&&void 0!==a&&a.isIdentifiedID?u:s.bootstrap.distinctID;this.persistence.set_property(eF,null!==(l=s.bootstrap)&&void 0!==l&&l.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:c})}if(this._hasBootstrappedFeatureFlags()){var d,h,f=Object.keys((null===(d=s.bootstrap)||void 0===d?void 0:d.featureFlags)||{}).filter(function(e){var t,n;return!(null===(t=s.bootstrap)||void 0===t||null===(n=t.featureFlags)||void 0===n||!n[e])}).reduce(function(e,t){var n,r;return e[t]=(null===(n=s.bootstrap)||void 0===n||null===(r=n.featureFlags)||void 0===r?void 0:r[t])||!1,e},{}),p=Object.keys((null===(h=s.bootstrap)||void 0===h?void 0:h.featureFlagPayloads)||{}).filter(function(e){return f[e]}).reduce(function(e,t){var n,r,i,o;return null!==(n=s.bootstrap)&&void 0!==n&&null!==(r=n.featureFlagPayloads)&&void 0!==r&&r[t]&&(e[t]=null===(i=s.bootstrap)||void 0===i||null===(o=i.featureFlagPayloads)||void 0===o?void 0:o[t]),e},{});this.featureFlags.receivedFeatureFlags({featureFlags:f,featureFlagPayloads:p})}if(!this.get_distinct_id()){var g=this.config.get_device_id(eQ());this.register_once({distinct_id:g,$device_id:g},""),this.persistence.set_property(eF,"anonymous")}return null==C||null===(n=C.addEventListener)||void 0===n||n.call(C,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),this.toolbar.maybeLoadToolbar(),s.segment?function(e,t){var n=e.config.segment;if(!n)return t();!function(e,t){var n=e.config.segment;if(!n)return t();var r=function(n){var r=function(){return n.anonymousId()||eQ()};e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(eF,"identified")),t()},i=n.user();"then"in i&&w(i.then)?i.then(function(e){return r(e)}):r(i)}(e,function(){var r;n.register((Promise&&Promise.resolve||U.warn("This browser does not have Promise support, and can not use the segment integration"),r=function(t,n){if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||e.reset(),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(e.register({distinct_id:t.event.userId}),e.reloadFeatureFlags());var r,i=e._calculate_event_properties(n,null!==(r=t.event.properties)&&void 0!==r?r:{});return t.event.properties=Object.assign({},i,t.event.properties),t},{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return r(e,e.event.event)},page:function(e){return r(e,"$pageview")},identify:function(e){return r(e,"$identify")},screen:function(e){return r(e,"$screen")}})).then(function(){t()})})}(this,function(){return r._loaded()}):this._loaded(),w(this.config._onCapture)&&this.on("eventCaptured",function(e){return r.config._onCapture(e.event,e)}),this}},{key:"_afterDecideResponse",value:function(e){var t,n,r,i,s;this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Q(e.supportedCompression,X.GZipJS)?X.GZipJS:Q(e.supportedCompression,X.Base64)?X.Base64:void 0),null!==(t=e.analytics)&&void 0!==t&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),null===(n=this.sessionRecording)||void 0===n||n.afterDecideResponse(e),null===(r=this.autocapture)||void 0===r||r.afterDecideResponse(e),null===(i=this.heatmaps)||void 0===i||i.afterDecideResponse(e),null===(s=this.surveys)||void 0===s||s.afterDecideResponse(e)}},{key:"_loaded",value:function(){var e=this,t=this.config.advanced_disable_decide;t||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(e){U.critical("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout(function(){N&&e.capture("$pageview",{title:N.title},{send_instantly:!0})},1),t||(new nN(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var e;this.has_opted_out_capturing()||this.config.request_batching&&(null===(e=this._requestQueue)||void 0===e||e.enable())}},{key:"_dom_loaded",value:function(){var e=this;this.has_opted_out_capturing()||G(this.__request_queue,function(t){return e._send_retriable_request(t)}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_handle_unload",value:function(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture("$pageleave"),null===(e=this._requestQueue)||void 0===e||e.unload(),null===(t=this._retryQueue)||void 0===t||t.unload()):this._shouldCapturePageleave()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_send_request",value:function(e){var t=this;this.__loaded&&(r2?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=rh(e.url,{ip:this.config.ip?1:0}),e.headers=this.config.request_headers,e.compression="best-available"===e.compression?this.compression:e.compression,function(e){var t,n,r,s=i({},e);s.timeout=s.timeout||6e4,s.url=rh(s.url,{_:(new Date).getTime().toString(),ver:v.LIB_VERSION,compression:s.compression});var o=null!==(t=s.transport)&&void 0!==t?t:"XHR",a=null!==(n=null===(r=ea(rp,function(e){return e.transport===o}))||void 0===r?void 0:r.method)&&void 0!==n?n:rp[0].method;if(!a)throw Error("No available transport method");a(s)}(i(i({},e),{},{callback:function(n){var r,i,s;t.rateLimiter.checkForLimiting(n),n.statusCode>=400&&(null===(i=(s=t.config).on_request_error)||void 0===i||i.call(s,n)),null===(r=e.callback)||void 0===r||r.call(e,n)}}))))}},{key:"_send_retriable_request",value:function(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)}},{key:"_execute_array",value:function(e){var t,n=this,r=[],i=[],s=[];G(e,function(e){e&&(b(t=e[0])?s.push(e):w(e)?e.call(n):b(e)&&"alias"===t?r.push(e):b(e)&&-1!==t.indexOf("capture")&&w(n[t])?s.push(e):i.push(e))});var o=function(e,t){G(e,function(e){if(b(e[0])){var n=t;Y(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};o(r,this),o(i,this),o(s,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var e,t;return(null===(e=this.config.bootstrap)||void 0===e?void 0:e.featureFlags)&&Object.keys(null===(t=this.config.bootstrap)||void 0===t?void 0:t.featureFlags).length>0||!1}},{key:"push",value:function(e){this._execute_array([e])}},{key:"capture",value:function(e,t,n){var r;if(!(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue))return U.uninitializedWarning("posthog.capture");
74if(!this.consent.isOptedOut()){if(!S(e)&&P(e)){if(!H||this.config.opt_out_useragent_filter||!rD(H,this.config.custom_blocked_useragents)){var s=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==s||!s.isRateLimited){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.store_google||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o,a,l,u,c={uuid:eQ(),event:e,properties:this._calculate_event_properties(e,t||{},n)};s&&(c.properties.$lib_rate_limit_remaining_tokens=s.remainingTokens),(null==n?void 0:n.$set)&&(c.$set=null==n?void 0:n.$set);var d=this._calculate_set_once_properties(null==n?void 0:n.$set_once);d&&(c.$set_once=d),(o=c,a=null!=n&&n._noTruncate?null:this.config.properties_string_max_length,l=function(e){return P(e)&&!E(a)?e.slice(0,a):e},u=new Set,c=function e(t,n){var r;return t!==Object(t)?l?l(t,n):t:u.has(t)?void 0:(u.add(t),b(t)?(r=[],G(t,function(t){r.push(e(t))})):(r={},Y(t,function(t,n){u.has(t)||(r[n]=e(t,n))})),r)}(o)).timestamp=(null==n?void 0:n.timestamp)||new Date,S(null==n?void 0:n.timestamp)||(c.properties.$event_time_override_provided=!0,c.properties.$event_time_override_system_time=new Date);var h=i(i({},c.properties.$set),c.$set);x(h)||this.setPersonPropertiesForFlags(h),this._debugEventEmitter.emit("eventCaptured",c);var f={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:c,compression:"best-available",batchKey:null==n?void 0:n._batchKey};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this._send_retriable_request(f):this._requestQueue.enqueue(f),c}U.critical("This capture call is ignored due to client rate limiting.")}}else U.error("No event name provided to posthog.capture")}}},{key:"_addCaptureHook",value:function(e){this.on("eventCaptured",function(t){return e(t.event)})}},{key:"_calculate_event_properties",value:function(e,t,n){if(!this.persistence||!this.sessionPersistence)return t;var r=this.persistence.remove_event_timer(e),s=i({},t);if(s.token=this.config.token,"$snapshot"===e){var o=i(i({},this.persistence.properties()),this.sessionPersistence.properties());return s.distinct_id=o.distinct_id,s}var a=t0.properties();if(this.sessionManager){var l=this.sessionManager.checkAndGetSessionAndWindowId(),u=l.sessionId,c=l.windowId;s.$session_id=u,s.$window_id=c}if(this.requestRouter.region===rg.CUSTOM&&(s.$lib_custom_api_host=this.config.api_host),this.sessionPropsManager&&this.config.__preview_send_client_session_params&&("$pageview"===e||"$pageleave"===e||"$autocapture"===e)){var d=this.sessionPropsManager.getSessionProps();s=K(s,d)}if(!this.config.disable_scroll_properties){var h={};"$pageview"===e?h=this.pageViewManager.doPageView():"$pageleave"===e&&(h=this.pageViewManager.doPageLeave()),s=K(s,h)}if("$pageview"===e&&N&&(s.title=N.title),!S(r)){var f=(new Date).getTime()-r;s.$duration=parseFloat((f/1e3).toFixed(3))}if(H&&this.config.opt_out_useragent_filter&&(s.$browser_type=rD(H,this.config.custom_blocked_useragents)?"bot":"browser"),(s=K({},a,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),null==n||!n._noHeatmaps){var p,v=null===(p=this.heatmaps)||void 0===p?void 0:p.getAndClearBuffer();v&&(s.$heatmap_data=v)}b(this.config.property_denylist)?Y(this.config.property_denylist,function(e){delete s[e]}):U.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;return g&&(s=g(s,e)),s.$process_person_profile=this._hasPersonProcessing(),s}},{key:"_calculate_set_once_properties",value:function(e){if(!this.persistence||!this._hasPersonProcessing())return e;var t=K({},this.persistence.get_initial_props(),e||{});return x(t)?void 0:t}},{key:"register",value:function(e,t){var n;null===(n=this.persistence)||void 0===n||n.register(e,t)}},{key:"register_once",value:function(e,t,n){var r;null===(r=this.persistence)||void 0===r||r.register_once(e,t,n)}},{key:"register_for_session",value:function(e){var t;null===(t=this.sessionPersistence)||void 0===t||t.register(e)}},{key:"unregister",value:function(e){var t;null===(t=this.persistence)||void 0===t||t.unregister(e)}},{key:"unregister_for_session",value:function(e){var t;null===(t=this.sessionPersistence)||void 0===t||t.unregister(e)}},{key:"_register_single",value:function(e,t){this.register(u({},e,t))}},{key:"getFeatureFlag",value:function(e,t){return this.featureFlags.getFeatureFlag(e,t)}},{key:"getFeatureFlagPayload",value:function(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch(e){return t}}},{key:"isFeatureEnabled",value:function(e,t){return this.featureFlags.isFeatureEnabled(e,t)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(e,t){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t)}},{key:"getEarlyAccessFeatures",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,t)}},{key:"on",value:function(e,t){return this._debugEventEmitter.on(e,t)}},{key:"onFeatureFlags",value:function(e){return this.featureFlags.onFeatureFlags(e)}},{key:"onSessionId",value:function(e){var t,n;return null!==(t=null===(n=this.sessionManager)||void 0===n?void 0:n.onSessionId(e))&&void 0!==t?t:function(){}}},{key:"getSurveys",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.surveys.getSurveys(e,t)}},{key:"getActiveMatchingSurveys",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.surveys.getActiveMatchingSurveys(e,t)}},{key:"getNextSurveyStep",value:function(e,t,n){return this.surveys.getNextSurveyStep(e,t,n)}},{key:"identify",value:function(e,t,n){if(!this.__loaded||!this.persistence)return U.uninitializedWarning("posthog.identify");if(F(e)&&(e=e.toString(),U.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()))U.critical('The string "'.concat(e,'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
74ot a hardcoded string.'));else if(this._requirePersonProcessing("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(eu)&&(this.unregister(eu),this.register({distinct_id:e}));var i="anonymous"===(this.persistence.get_property(eF)||"anonymous");e!==r&&i?(this.persistence.set_property(eF,"identified"),this.setPersonPropertiesForFlags(t||{},!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(eR))}}else U.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(e,t){(e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")&&(this.setPersonPropertiesForFlags(e||{}),this.capture("$set",{$set:e||{},$set_once:t||{}}))}},{key:"group",value:function(e,t,n){if(e&&t){if(this._requirePersonProcessing("posthog.group")){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:i(i({},r),{},u({},e,t))}),n&&(this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:n}),this.setGroupPropertiesForFlags(u({},e,n))),r[e]===t||n||this.reloadFeatureFlags()}}else U.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._requirePersonProcessing("posthog.setPersonPropertiesForFlags")&&this.featureFlags.setPersonPropertiesForFlags(e,t)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(e,t)}},{key:"resetGroupPropertiesForFlags",value:function(e){this.featureFlags.resetGroupPropertiesForFlags(e)}},{key:"reset",value:function(e){if(!this.__loaded)return U.uninitializedWarning("posthog.reset");var t,n,r,i,s=this.get_property("$device_id");this.consent.reset(),null===(t=this.persistence)||void 0===t||t.clear(),null===(n=this.sessionPersistence)||void 0===n||n.clear(),null===(r=this.persistence)||void 0===r||r.set_property(eF,"anonymous"),null===(i=this.sessionManager)||void 0===i||i.resetSessionId();var o=this.config.get_device_id(eQ());this.register_once({distinct_id:o,$device_id:e?o:s},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var e,t;return null!==(e=null===(t=this.sessionManager)||void 0===t?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""}},{key:"get_session_replay_url",value:function(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.sessionId,r=t.sessionStartTimestamp,i=this.requestRouter.endpointFor("ui","/project/".concat(this.config.token,"/replay/").concat(n));if(null!=e&&e.withTimestamp&&r){var s,o=null!==(s=e.timestampLookBack)&&void 0!==s?s:10;if(!r)return i;var a=Math.max(Math.floor(((new Date).getTime()-r)/1e3)-o,0);i+="?t=".concat(a)}return i}},{key:"alias",value:function(e,t){return e===this.get_property(el)?(U.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(S(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(eu,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(U.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}},{key:"set_config",value:function(e){var t,n,r,s,o=i({},this.config);k(e)&&(K(this.config,r5(e)),null===(t=this.persistence)||void 0===t||t.update_config(this.config,o),this.sessionPersistence="sessionStorage"===this.config.persistence?this.persistence:new t2(i(i({},this.config),{},{persistence:"sessionStorage"})),e2.is_supported()&&"true"===e2.get("ph_debug")&&(this.config.debug=!0),this.config.debug&&(v.DEBUG=!0),null===(n=this.sessionRecording)||void 0===n||n.startIfEnabledOrStop(),null===(r=this.autocapture)||void 0===r||r.startIfEnabled(),null===(s=this.heatmaps)||void 0===s||s.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence())}},{key:"startSessionRecording",value:function(e){if(null!=e&&e.sampling){var t,n,r=null===(t=this.sessionManager)||void 0===t?void 0:t.checkAndGetSessionAndWindowId();null===(n=this.persistence)||void 0===n||n.register(u({},eb,!0)),U.info("Session recording started with sampling override for session: ",null==r?void 0:r.sessionId)}this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var e;return!(null===(e=this.sessionRecording)||void 0===e||!e.started)}},{key:"loadToolbar",value:function(e){return this.toolbar.loadToolbar(e)}},{key:"get_property",value:function(e){var t;return null===(t=this.persistence)||void 0===t?void 0:t.props[e]}},{key:"getSessionProperty",value:function(e){var t;return null===(t=this.sessionPersistence)||void 0===t?void 0:t.props[e]}},{key:"toString",value:function(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:r1;
74return t!==r1&&(t=r1+"."+t),t}},{key:"_isIdentified",value:function(){var e,t;return"identified"===(null===(e=this.persistence)||void 0===e?void 0:e.get_property(eF))||"identified"===(null===(t=this.sessionPersistence)||void 0===t?void 0:t.get_property(eF))}},{key:"_hasPersonProcessing",value:function(){var e,t,n,r;return!("never"===this.config.person_profiles||"identified_only"===this.config.person_profiles&&!this._isIdentified()&&x(this.getGroups())&&(null===(e=this.persistence)||void 0===e||null===(t=e.props)||void 0===t||!t[eu])&&(null===(n=this.persistence)||void 0===n||null===(r=n.props)||void 0===r||!r[eM]))}},{key:"_shouldCapturePageleave",value:function(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&this.config.capture_pageview}},{key:"createPersonProfile",value:function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})}},{key:"_requirePersonProcessing",value:function(e){return"never"===this.config.person_profiles?(U.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(eM,!0),!0)}},{key:"_sync_opt_out_with_persistence",value:function(){var e,t,n,r,i=this.consent.isOptedOut(),s=this.config.opt_out_persistence_by_default,o=this.config.disable_persistence||i&&!!s;(null===(e=this.persistence)||void 0===e?void 0:e.disabled)!==o&&(null===(n=this.persistence)||void 0===n||n.set_disabled(o)),(null===(t=this.sessionPersistence)||void 0===t?void 0:t.disabled)!==o&&(null===(r=this.sessionPersistence)||void 0===r||r.set_disabled(o))}},{key:"opt_in_capturing",value:function(e){var t;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),this.capture(null!==(t=null==e?void 0:e.captureEventName)&&void 0!==t?t:"$opt_in",null==e?void 0:e.captureProperties,{send_instantly:!0})}},{key:"opt_out_capturing",value:function(){this.consent.optInOut(!1),this._sync_opt_out_with_persistence()}},{key:"has_opted_in_capturing",value:function(){return this.consent.isOptedIn()}},{key:"has_opted_out_capturing",value:function(){return this.consent.isOptedOut()}},{key:"clear_opt_in_out_capturing",value:function(){this.consent.reset(),this._sync_opt_out_with_persistence()}},{key:"debug",value:function(e){!1===e?(null==C||C.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(null==C||C.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)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),e}();!function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=et(e.prototype[t[n]])}(r6,["identify"]);var r8,r7,r9=(r7=rJ[r1]=new r6,function(){function e(){e.done||(e.done=!0,r2=!1,Y(rJ,function(e){e._dom_loaded()}))}null!=N&&N.addEventListener&&("complete"===N.readyState?e():N.addEventListener("DOMContentLoaded",e,!1)),C&&es(C,"load",e,!0)}(),r7)},4194:function(e,t,n){"use strict";n.d(t,{zf:function(){return o}});var r=n(59634),i=n(58496),s=(0,i.createContext)({client:r.ZP});function o(e){var t=e.children,n=e.client,o=e.apiKey,a=e.options,l=(0,i.useMemo)(function(){return(n&&o&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&a&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),n)?n:(o&&(r.ZP.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),r.ZP.init(o,a)),r.ZP)},[n,o]);return i.createElement(s.Provider,{value:{client:l}},t)}},7418:function(e){e.exports={style:{fontFamily:"'__Darker_Grotesque_623bd6', '__Darker_Grotesque_Fallback_623bd6'",fontStyle:"normal"},className:"__className_623bd6",variable:"__variable_623bd6"}},13901:function(e){e.exports={style:{fontFamily:"'__Montserrat_337041', '__Montserrat_Fallback_337041'",fontStyle:"normal"},className:"__className_337041",variable:"__variable_337041"}},1066:function(e,t,n){"use strict";n.d(t,{VY:function(){return q},aV:function(){return D},fC:function(){return $},x8:function(){return B}});var r=n(77363),i=n(58496),s=n(67326),o=n(16612),a=n(41017),l=n(37677),u=n(53435),c=n(93996),d=n(86719),h=(n(30673),n(69388)),f=n(21547),p=n(71604),v=n(26075),g=n(2605),m=n(93260);let _="Dialog",[y,b]=(0,a.b)(_),[w,k]=y(_),[x,S]=y("DialogPortal",{forceMount:void 0}),P="DialogOverlay",E=(0,i.forwardRef)((e,t)=>{let n=S(P,e.__scopeDialog),{forceMount:s=n.forceMount,...o}=e,a=k(P,e.__scopeDialog);return a.modal?(0,i.createElement)(h.z,{present:s||a.open},(0,i.createElement)(R,(0,r.Z)({},o,{ref:t}))):null}),R=(0,i.forwardRef)((e,t)=>{let{__scopeDialog:n,...s}=e,o=k(P,n);return(0,i.createElement)(v.Z,{as:m.g7,allowPinchZoom:!0,shards:[o.contentRef]},(0,i.createElement)(f.WV.div,(0,r.Z)({"data-state":M(o.open)},s,{ref:t,style:{pointerEvents:"auto",...s.style}})))}),F="DialogContent",I=(0,i.forwardRef)((e,t)=>{let n=S(F,e.__scopeDialog),{forceMount:s=n.forceMount,...o}=e,a=k(F,e.__scopeDialog);return(0,i.createElement)(h.z,{present:s||a.open},a.modal?(0,i.createElement)(C,(0,r.Z)({},o,{ref:t})):(0,i.createElement)(T,(0,r.Z)({},o,{ref:t})))}),C=(0,i.forwardRef)((e,t)=>{let n=k(F,e.__scopeDialog),a=(0,i.useRef)(null),l=(0,o.e)(t,n.contentRef,a);return(0,i.useEffect)(()=>{let e=a.current;if(e)return(0,g.Ry)(e)},[]),(0,i.createElement)(O,(0,r.Z)({},e,{ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,s.M)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,s.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,s.M)(e.onFocusOutside,e=>e.preventDefault())}))}),T=(0,i.forwardRef)((e,t)=>{let n=k(F,e.__scopeDialog),s=(0,i.useRef)(!1),o=(0,i.useRef)(!1);return(0,i.createElement)(O,(0,r.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,i;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented||(s.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault()),s.current=!1,o.current=!1},onInteractOutside:t=>{var r,i;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(s.current=!0,"pointerdown"!==t.detail.originalEvent.type||(o.current=!0));let a=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(a))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}}))}),O=(0,i.forwardRef)((e,t)=>{let{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,...u}
74=e,h=k(F,n),f=(0,i.useRef)(null),v=(0,o.e)(t,f);return(0,p.EW)(),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(d.M,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l},(0,i.createElement)(c.XB,(0,r.Z)({role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":M(h.open)},u,{ref:v,onDismiss:()=>h.onOpenChange(!1)}))),!1)}),A=(0,i.forwardRef)((e,t)=>{let{__scopeDialog:n,...o}=e,a=k("DialogClose",n);return(0,i.createElement)(f.WV.button,(0,r.Z)({type:"button"},o,{ref:t,onClick:(0,s.M)(e.onClick,()=>a.onOpenChange(!1))}))});function M(e){return e?"open":"closed"}let[L,N]=(0,a.k)("DialogTitleWarning",{contentName:F,titleName:"DialogTitle",docsSlug:"dialog"}),$=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:a=!0}=e,c=(0,i.useRef)(null),d=(0,i.useRef)(null),[h=!1,f]=(0,u.T)({prop:r,defaultProp:s,onChange:o});return(0,i.createElement)(w,{scope:t,triggerRef:c,contentRef:d,contentId:(0,l.M)(),titleId:(0,l.M)(),descriptionId:(0,l.M)(),open:h,onOpenChange:f,onOpenToggle:(0,i.useCallback)(()=>f(e=>!e),[f]),modal:a},n)},D=E,q=I,B=A},9629:function(e,t,n){"use strict";n.d(t,{D:function(){return s}});var r=n(50241),i=n(62555);function s(e){let t=e.runtimeEnvStrict??e.runtimeEnv??i.env;if(e.emptyStringAsUndefined)for(let[e,n]of Object.entries(t))""===n&&delete t[e];if(e.skipValidation)return t;let n="object"==typeof e.client?e.client:{},s="object"==typeof e.server?e.server:{},o="object"==typeof e.shared?e.shared:{},a=(0,r.Ry)(n),l=(0,r.Ry)(s),u=(0,r.Ry)(o),c=e.isServer??("undefined"==typeof window||"Deno"in window),d=a.merge(u),h=l.merge(u).merge(a),f=c?h.safeParse(t):d.safeParse(t),p=e.onValidationError??(e=>{throw console.error("â Invalid environment variables:",e.flatten().fieldErrors),Error("Invalid environment variables")}),v=e.onInvalidAccess??(e=>{throw Error("â Attempted to access a server-side environment variable on the client")});if(!1===f.success)return p(f.error);let g=t=>!e.clientPrefix||!t.startsWith(e.clientPrefix)&&!(t in u.shape),m=e=>c||!g(e),_=e=>"__esModule"===e||"$$typeof"===e,y=(e.extends??[]).reduce((e,t)=>Object.assign(e,t),{});return new Proxy(Object.assign(f.data,y),{get(e,t){if("string"==typeof t&&!_(t))return m(t)?Reflect.get(e,t):v(t)}})}},44797:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var r=n(83890),i=n(58496),s=n(47663),o=n(7037);function a({children:e,features:t,strict:n=!1}){let[,a]=(0,i.useState)(!l(t)),u=(0,i.useRef)(void 0);if(!l(t)){let{renderer:e,...n}=t;u.current=e,(0,o.K)(n)}return(0,i.useEffect)(()=>
74{l(t)&&t().then(({renderer:e,...t})=>{(0,o.K)(t),u.current=e,a(!0)})},[]),(0,r.jsx)(s.u.Provider,{value:{renderer:u.current,strict:n},children:e})}function l(e){return"function"==typeof e}},63250:function(e,t,n){"use strict";n.d(t,{H:function(){return G}});var r=n(8182),i=n(80559);function s(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var o=n(85705),a=n(38623),l=n(57324),u=n(73612);function c(e,t,n={}){var r;let i=(0,a.x)(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0),{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);let o=i?()=>Promise.all((0,u.w)(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:i=0,staggerChildren:o,staggerDirection:a}=s;return function(e,t,n=0,r=0,i=1,s){let o=[],a=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort(d).forEach((e,r)=>{e.notify("AnimationStart",t),o.push(c(e,t,{...s,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(o)}(e,t,i+r,o,a,n)}:()=>Promise.resolve(),{when:h}=s;if(!h)return Promise.all([o(),l(n.delay)]);{let[e,t]="beforeChildren"===h?[o,l]:[l,o];return e().then(()=>t())}}function d(e,t){return e.sortNodePosition(t)}var h=n(43328);let f=[...l.e].reverse(),p=l.e.length;function v(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function g(){return{animate:v(!0),whileInView:v(),whileHover:v(),whileTap:v(),whileDrag:v(),whileFocus:v(),exit:v()}}class m{constructor(e){this.isMounted=!1,this.node=e}update(){}}class _ extends m{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t))r=Promise.all(t.map(t=>c(e,t,n)));else if("string"==typeof t)r=c(e,t,n);else{let i="function"==typeof t?(0,a.x)(e,t,n.custom):t;r=Promise.all((0,u.w)(e,i,n))}return r.then(()=>{h.Wi.postRender(()=>{e.notify("AnimationComplete",t)})})})(e,t,n))),n=g(),l=!0,d=t=>(n,r)=>{var i;let s=(0,a.x)(e,r,"exit"===t?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);if(s){let{transition:e,transitionEnd:t,...r}=s;n={...n,...r,...t}}return n};function v(a){let u=e.getProps(),c=e.getVariantContext(!0)||{},h=[],v=new Set,g={},m=1/0;for(let t=0;t<p;t++){var _;let p=f[t],y=n[p],b=void 0!==u[p]?u[p]:c[p],w=(0,o.$)(b),k=p===a?y.isActive:null;!1===k&&(m=t);let x=b===c[p]&&b!==u[p]&&w;if(x&&l&&e.manuallyAnimateOnMount&&(x=!1),y.protectedKeys={...g},!y.isActive&&null===k||!b&&!y.prevProp||(0,r.H)(b)||"boolean"==typeof b)continue;let S=(_=y.prevProp,("string"==typeof b?b!==_:!!Array.isArray(b)&&!s(b,_))||p===a&&y.isActive&&!x&&w||t>m&&w),P=!1,E=Array.isArray(b)?b:[b],R=E.reduce(d(p),{});!1===k&&(R={});let{prevResolvedValues:F={}}=y,I={...F,...R},C=t=>{S=!0,v.has(t)&&(P=!0,v.delete(t)),y.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in I){let t=R[e],n=F[e];if(!g.hasOwnProperty(e))((0,i.C)(t)&&(0,i.C)(n)?s(t,n):t===n)?void 0!==t&&v.has(e)?C(e):y.protectedKeys[e]=!0:null!=t?C(e):v.add(e)}y.prevProp=b,y.prevResolvedValues=R,y.isActive&&(g={...g,...R}),l&&e.blockInitialAnimation&&(S=!1),S&&(!x||P)&&h.push(...E.map(e=>({animation:e,options:{type:p}})))}if(v.size){let t={};v.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null}),h.push({animation:t})}let y=!!h.length;return l&&(!1===u.initial||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),l=!1,y?t(h):Promise.resolve()}return{animateChanges:v,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;let s=v(t);for(let e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=g(),l=!0}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();(0,r.H)(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}let y=0;class b extends m{constructor(){super(...arguments),this.id=y++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>
74t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}function w(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}let k=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function x(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}let S=e=>t=>k(t)&&e(t,x(t));var P=n(62491);function E(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let R=E("dragHorizontal"),F=E("dragVertical");function I(){let e=function(e){let t=!1;if("y"===e)t=F();else if("x"===e)t=R();else{let e=R(),n=F();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}(!0);return!e||(e(),!1)}function C(e,t){var n,r,i;let s=t?"pointerenter":"pointerleave",o=t?"onHoverStart":"onHoverEnd";return n=e.current,r=(n,r)=>{if("touch"===n.pointerType||I())return;let i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);let s=i[o];s&&h.Wi.postRender(()=>s(n,r))},i={passive:!e.getProps()[o]},w(n,s,S(r),i)}class T extends m{mount(){this.unmount=(0,P.z)(C(this.node,!0),C(this.node,!1))}unmount(){}}class O extends m{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=(0,P.z)(w(this.node.current,"focus",()=>this.onFocus()),w(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}let A=(e,t)=>!!t&&(e===t||A(e,t.parentElement));var M=n(17404);function L(e,t){if(!t)return;let n=new PointerEvent("pointer"+e);t(n,x(n))}class N extends m{constructor(){super(...arguments),this.removeStartListeners=M.Z,this.removeEndListeners=M.Z,this.removeAccessibleListeners=M.Z,this.startPointerPress=(e,t)=>{var n,r,i,s,o,a,l,u;if(this.isPressing)return;this.removeEndListeners();let c=this.node.getProps(),d=(n=window,r="pointerup",i=(e,t)=>{if(!this.checkPressEnd())return;let{onTap:n,onTapCancel:r,globalTapTarget:i}=this.node.getProps(),s=i||A(this.node.current,e.target)?n:r;s&&h.Wi.update(()=>s(e,t))},s={passive:!(c.onTap||c.onPointerUp)},w(n,r,S(i),s)),f=(o=window,a="pointercancel",l=(e,t)=>this.cancelPress(e,t),u={passive:!(c.onTapCancel||c.onPointerCancel)},w(o,a,S(l),u));this.removeEndListeners=(0,P.z)(d,f),this.startPress(e,t)},this.startAccessiblePress=()=>{let e=w(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=w(this.node.current,"keyup",e=>{"Enter"===e.key&&this.checkPressEnd()&&L("up",(e,t)=>{let{onTap:n}=this.node.getProps();n&&h.Wi.postRender(()=>n(e,t))})}),L("down",(e,t)=>{this.startPress(e,t)}))}),t=w(this.node.current,"blur",()=>{this.isPressing&&L("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=(0,P.z)(e,t)}}startPress(e,t){this.isPressing=!0;let{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&h.Wi.postRender(()=>n(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!I()}cancelPress(e,t){if(!this.checkPressEnd())return;let{onTapCancel:n}=this.node.getProps();n&&h.Wi.postRender(()=>n(e,t))}mount(){var e,t,n,r;let i=this.node.getProps(),s=(e=i.globalTapTarget?window:this.node.current,t="pointerdown",n=this.startPointerPress,r={passive:!(i.onTapStart||i.onPointerStart)},w(e,t,S(n),r)),o=w(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=(0,P.z)(s,o)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}let $=new WeakMap,D=new WeakMap,q=e=>{let t=$.get(e.target);t&&t(e)},B=e=>{e.forEach(q)},H={some:0,all:1};class j extends m{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,s={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:H[r]};return function(e,t,n){let r=function({root:e,...t}){let n=e||document;D.has(n)||D.set(n,{});let r=D.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(B,{root:e,...t})),r[i]}(t);return $.set(e,n),r.observe(e),()=>{$.delete(e),r.unobserve(e)}}(this.node.current,s,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),s=t?n:r;s&&s(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}var z=n(58496),U=n(88921),W=n(65781),V=n(71601);let G={renderer:(e,t)=>(0,V.q)(e)?new W.e(t,{enableHardwareAcceleration:!1}):new U.W(t,{allowProjection:e!==z.Fragment,enableHardwareAcceleration:!0}),animation:{Feature:_},exit:{Feature:b},inView:{Feature:j},tap:{Feature:N},focus:{Feature:O},hover:{Feature:T}}},58075:function(e,t,n){"use strict";n.d(t,{NuqsAdapter:function(){return o}});var r=n(42350),i=n(88779),s=n(58496),o=(0,r.Z0)(function(){let e=(0,i.useRouter)(),t=(0,i.useSearchParams)(),[n,o]=(0,s.useOptimistic)(t);return{searchParams:n,updateUrl:(0,s.useCallback)((t,n)=>{(0,s.startTransition)(()=>{var i,s;n.shallow||o(t);let a=(i=location.origin+location.pathname,s=t,(i.split("#")[0]??"")+(0,r.R)(s)+location.hash);(0,r.fF)("[nuqs queue (app)] Updating url: %s",a),("push"===n.history?history.pushState:history.replaceState).call(history,null,"",a),n.scroll&&window.scrollTo(0,0),n.shallow||e.replace(a,{scroll:!1})})},[]),rateLimitFactor:2}})},1215:function(e,t,n){"use strict";n.d(t,{x7:function(){return b}});var r=n(58496),i=n(81720),s=e=>{switch(e){case"success":return l;case"info":return c;case"warning":return u;case"error":return d;default:return null}},o=Array(12).fill(0),a=e=>{let{visible:t}=e;return r.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},r.createElement("div",{className:"sonner-spinner"},o.map((e,t)=>r.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(t)}))))},l=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),u=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
74currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),c=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),d=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),h=()=>{let[e,t]=r.useState(document.hidden);return r.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e},f=1,p=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:f++,s=this.toasts.find(e=>e.id===i),o=void 0===e.dismissible||e.dismissible;return s?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:o,title:n}):t):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
74this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let n;if(!t)return;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let r=e instanceof Promise?e:e(),i=void 0!==n;return r.then(async e=>{if(v(e)&&!e.ok){i=!1;let r="function"==typeof t.error?await t.error("HTTP error! status: ".concat(e.status)):t.error,s="function"==typeof t.description?await t.description("HTTP error! status: ".concat(e.status)):t.description;this.create({id:n,type:"error",message:r,description:s})}else if(void 0!==t.success){i=!1;let r="function"==typeof t.success?await t.success(e):t.success,s="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"success",message:r,description:s})}}).catch(async e=>{if(void 0!==t.error){i=!1;let r="function"==typeof t.error?await t.error(e):t.error,s="function"==typeof t.description?await t.description(e):t.description;this.create({id:n,type:"error",message:r,description:s})}}).finally(()=>{var e;i&&(this.dismiss(n),n=void 0),null==(e=t.finally)||e.call(t)}),n},this.custom=(e,t)=>{let n=(null==t?void 0:t.id)||f++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},v=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status;function g(e){return void 0!==e.label}function m(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}Object.assign((e,t)=>{let n=(null==t?void 0:t.id)||f++;return p.addToast({title:e,...t,id:n}),n},{success:p.success,info:p.info,warning:p.warning,error:p.error,custom:p.custom,message:p.message,promise:p.promise,dismiss:p.dismiss,loading:p.loading},{getHistory:()=>p.toasts}),function(e){let{insertAt:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"undefined"==typeof document)return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===t&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}(':where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
74left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
74:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}\n');var _=e=>{var t,n,i,o,l,u,c,d,f,p;let{invert:v,toast:m,unstyled:_,interacting:y,setHeights:b,visibleToasts:w,heights:k,index:x,toasts:S,exp
74anded:P,removeToast:E,defaultRichColors:R,closeButton:F,style:I,cancelButtonStyle:C,actionButtonStyle:T,className:O="",descriptionClassName:A="",duration:M,position:L,gap:N,loadingIcon:$,expandByDefault:D,classNames:q,icons:B,closeButtonAriaLabel:H="Close toast",pauseWhenPageIsHidden:j,cn:z}=e,[U,W]=r.useState(!1),[V,G]=r.useState(!1),[Y,K]=r.useState(!1),[Q,Z]=r.useState(!1),[X,J]=r.useState(0),[ee,et]=r.useState(0),en=r.useRef(null),er=r.useRef(null),ei=0===x,es=x+1<=w,eo=m.type,ea=!1!==m.dismissible,el=m.className||"",eu=m.descriptionClassName||"",ec=r.useMemo(()=>k.findIndex(e=>e.toastId===m.id)||0,[k,m.id]),ed=r.useMemo(()=>{var e;return null!=(e=m.closeButton)?e:F},[m.closeButton,F]),eh=r.useMemo(()=>m.duration||M||4e3,[m.duration,M]),ef=r.useRef(0),ep=r.useRef(0),ev=r.useRef(0),eg=r.useRef(null),[em,e_]=L.split("-"),ey=r.useMemo(()=>k.reduce((e,t,n)=>n>=ec?e:e+t.height,0),[k,ec]),eb=h(),ew=m.invert||v,ek="loading"===eo;ep.current=r.useMemo(()=>ec*N+ey,[ec,ey]),r.useEffect(()=>{W(!0)},[]),r.useLayoutEffect(()=>{if(!U)return;let e=er.current,t=e.style.height;e.style.height="auto";let n=e.getBoundingClientRect().height;e.style.height=t,et(n),b(e=>e.find(e=>e.toastId===m.id)?e.map(e=>e.toastId===m.id?{...e,height:n}:e):[{toastId:m.id,height:n,position:m.position},...e])},[U,m.title,m.description,b,m.id]);let ex=r.useCallback(()=>{G(!0),J(ep.current),b(e=>e.filter(e=>e.toastId!==m.id)),setTimeout(()=>{E(m)},200)},[m,E,b,ep]);return r.useEffect(()=>{if(m.promise&&"loading"===eo||m.duration===1/0||"loading"===m.type)return;let e,t=eh;return P||y||j&&eb?(()=>{if(ev.current<ef.current){let e=new Date().getTime()-ef.current;t-=e}ev.current=new Date().getTime()})():t!==1/0&&(ef.current=new Date().getTime(),e=setTimeout(()=>{var e;null==(e=m.onAutoClose)||e.call(m,m),ex()},t)),()=>clearTimeout(e)},[P,y,D,m,eh,ex,m.promise,eo,j,eb]),r.useEffect(()=>{let e=er.current;if(e){let t=e.getBoundingClientRect().height;return et(t),b(e=>[{toastId:m.id,height:t,position:m.position},...e]),()=>b(e=>e.filter(e=>e.toastId!==m.id))}},[b,m.id]),r.useEffect(()=>{m.delete&&ex()},[ex,m.delete]),r.createElement("li",{"aria-live":m.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:er,className:z(O,el,null==q?void 0:q.toast,null==(t=null==m?void 0:m.classNames)?void 0:t.toast,null==q?void 0:q.default,null==q?void 0:q[eo],null==(n=null==m?void 0:m.classNames)?void 0:n[eo]),"data-sonner-toast":"","data-rich-colors":null!=(i=m.richColors)?i:R,"data-styled":!(m.jsx||m.unstyled||_),"data-mounted":U,"data-promise":!!m.promise,"data-removed":V,"data-visible":es,"data-y-position":em,"data-x-position":e_,"data-index":x,"data-front":ei,"data-swiping":Y,"data-dismissible":ea,"data-type":eo,"data-invert":ew,"data-swipe-out":Q,"data-expanded":!!(P||D&&U),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":"".concat(V?X:ep.current,"px"),"--initial-height":D?"auto":"".concat(ee,"px"),...I,...m.style},onPointerDown:e=>{ek||!ea||(en.current=new Date,J(ep.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(K(!0),eg.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n,r;if(Q||!ea)return;eg.current=null;let i=Number((null==(e=er.current)?void 0:e.style.getPropertyValue("--swipe-amount").replace("px",""))||0),s=Math.abs(i)/(new Date().getTime()-(null==(t=en.current)?void 0:t.getTime()));if(Math.abs(i)>=20||s>.11){J(ep.current),null==(n=m.onDismiss)||n.call(m,m),ex(),Z(!0);return}null==(r=er.current)||r.style.setProperty("--swipe-amount","0px"),K(!1)},onPointerMove:e=>{var t;if(!eg.current||!ea)return;let n=e.clientY-eg.current.y,r=e.clientX-eg.current.x,i=("top"===em?Math.min:Math.max)(0,n),s="touch"===e.pointerType?10:2;Math.abs(i)>s?null==(t=er.current)||t.style.setProperty("--swipe-amount","".concat(n,"px")):Math.abs(r)>s&&(eg.current=null)}},ed&&!m.jsx?r.createElement("button",{"aria-label":H,"data-disabled":ek,"data-close-button":!0,onClick:ek||!ea?()=>{}:()=>{var e;ex(),null==(e=m.onDismiss)||e.call(m,m)},className:z(null==q?void 0:q.closeButton,null==(o=null==m?void 0:m.classNames)?void 0:o.closeButton)},r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,m.jsx||r.isValidElement(m.title)?m.jsx||m.title:r.createElement(r.Fragment,null,eo||m.icon||m.promise?r.createElement("div",{"data-icon":"",className:z(null==q?void 0:q.icon,null==(l=null==m?void 0:m.classNames)?void 0:l.icon)},m.promise||"loading"===m.type&&!m.icon?m.icon||(null!=B&&B.loading?r.createElement("div",{className:"sonner-loader","data-visible":"loading"===eo},B.loading):$?r.createElement("div",{className:"sonner-loader","data-visible":"loading"===eo},$):r.createElement(a,{visible:"loading"===eo})):null,"loading"!==m.type?m.icon||(null==B?void 0:B[eo])||s(eo):null):null,r.createElement("div",{"data-content":"",className:z(null==q?void 0:q.content,null==(u=null==m?void 0:m.classNames)?void 0:u.content)},r.createElement("div",{"data-title":"",className:z(null==q?void 0:q.title,null==(c=null==m?void 0:m.classNames)?void 0:c.title)},m.title),m.description?r.createElement("div",{"data-description":"",className:z(A,eu,null==q?void 0:q.description,null==(d=null==m?void 0:m.classNames)?void 0:d.description)},m.description):null),r.isValidElement(m.cancel)?m.cancel:m.cancel&&g(m.cancel)?r.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||C,onClick:e=>{var t,n;g(m.cancel)&&ea&&(null==(n=(t=m.cancel).onClick)||n.call(t,e),ex())},className:z(null==q?void 0:q.cancelButton,null==(f=null==m?void 0:m.classNames)?void 0:f.cancelButton)},m.cancel.label):null,r.isValidElement(m.action)?m.action:m.action&&g(m.action)?r.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||T,onClick:e=>{var t,n;g(m.action)&&(e.defaultPrevented||(null==(n=(t=m.action).onClick)||n.call(t,e),ex()))},className:z(null==q?void 0:q.actionButton,null==(p=null==m?void 0:m.classNames)?void 0:p.actionButton)},m.action.label):null))};function y(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var b=e=>{let{invert:t,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:a,className:l,offset:u,theme:c="light",richColors:d,duration:h,style:f,visibleToasts:v=3,toastOptions:g,dir:b=y(),gap:w=14,loadingIcon:k,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:P,cn:E=m}=e,[R,F]=r.useState([]),I=r.useMemo(()=>Array.from(new Set([n].concat(R.filter(e=>e.position).map(e=>e.position)))),[R,n]),[C,T]=r.useState([]),[O,A]=r.useState(!1),[M,L]=r.useState(!1),[N,$]=r.useState("system"!==c?c:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
74k":"light"),D=r.useRef(null),q=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=r.useRef(null),H=r.useRef(!1),j=r.useCallback(e=>{var t;null!=(t=R.find(t=>t.id===e.id))&&t.delete||p.dismiss(e.id),F(t=>t.filter(t=>{let{id:n}=t;return n!==e.id}))},[R]);return r.useEffect(()=>p.subscribe(e=>{if(e.dismiss){F(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}setTimeout(()=>{i.flushSync(()=>{F(t=>{let n=t.findIndex(t=>t.id===e.id);return -1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[]),r.useEffect(()=>{if("system"!==c){$(c);return}"system"===c&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),"undefined"!=typeof window&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{let{matches:t}=e;$(t?"dark":"light")})},[c]),r.useEffect(()=>{R.length<=1&&A(!1)},[R]),r.useEffect(()=>{let e=e=>{var t,n;s.every(t=>e[t]||e.code===t)&&(A(!0),null==(t=D.current)||t.focus()),"Escape"===e.code&&(document.activeElement===D.current||null!=(n=D.current)&&n.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]),r.useEffect(()=>{if(D.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,H.current=!1)}},[D.current]),R.length?r.createElement("section",{"aria-label":"".concat(S," ").concat(q),tabIndex:-1},I.map((e,n)=>{var i;let[s,c]=e.split("-");return r.createElement("ol",{key:e,dir:"auto"===b?y():b,tabIndex:-1,ref:D,className:l,"data-sonner-toaster":!0,"data-theme":N,"data-y-position":s,"data-x-position":c,style:{"--front-toast-height":"".concat((null==(i=C[0])?void 0:i.height)||0,"px"),"--offset":"number"==typeof u?"".concat(u,"px"):u||"32px","--width":"".concat(356,"px"),"--gap":"".concat(w,"px"),...f},onBlur:e=>{H.current&&!e.currentTarget.contains(e.relatedTarget)&&(H.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||H.current||(H.current=!0,B.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{M||A(!1)},onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L(!0)},onPointerUp:()=>L(!1)},R.filter(t=>!t.position&&0===n||t.position===e).map((n,i)=>{var s,l;return r.createElement(_,{key:n.id,icons:x,index:i,toast:n,defaultRichColors:d,duration:null!=(s=null==g?void 0:g.duration)?s:h,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:t,visibleToasts:v,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:a,interacting:M,position:e,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,removeToast:j,toasts:R.filter(e=>e.position==n.position),heights:C.filter(e=>e.position==n.position),setHeights:T,expandByDefault:o,gap:w,loadingIcon:k,expanded:O,pauseWhenPageIsHidden:P,cn:E})}))})):null}}}]);
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.