posthog-js 1.376.0 → 1.376.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.js +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/lib/package.json +1 -1
- package/package.json +7 -7
package/dist/array.full.es5.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(){"use strict";var e,t,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={};function i(){if(t)return e;t=1;var r=function(e){return e&&e.Math===Math&&e};return e=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}var o,s,a,u,l,c,d,f,p={};function h(){return s?o:(s=1,o=function(e){try{return!!e()}catch(e){return!0}})}function _(){if(u)return a;u=1;var e=h();return a=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function v(){if(c)return l;c=1;var e=h();return l=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function g(){if(f)return d;f=1;var e=v(),t=function(){}.call;return d=e?t.bind(t):function(){return t.apply(t,arguments)},d}var m,y,b,w,S,x,k,E,C,P,T,I,F,L,R,M,O,A,q,D,N,H,j,U,B,V,z,W,G,Y,Q,Z,K,X,J,ee,te,ne,re,ie,oe,se={};function ae(){if(m)return se;m=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return se.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,se}function ue(){return b?y:(b=1,y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function le(){if(S)return w;S=1;var e=v(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return w=e?r:function(e){return function(){return n.apply(e,arguments)}},w}function ce(){if(k)return x;k=1;var e=le(),t=e({}.toString),n=e("".slice);return x=function(e){return n(t(e),8,-1)}}function de(){return T?P:(T=1,P=function(e){return null==e})}function fe(){if(F)return I;F=1;var e=de(),t=TypeError;return I=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function pe(){if(R)return L;R=1;var e=function(){if(C)return E;C=1;var e=le(),t=h(),n=ce(),r=Object,i=e("".split);return E=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?i(e,""):r(e)}:r}(),t=fe();return L=function(n){return e(t(n))}}function he(){if(O)return M;O=1;var e="object"==typeof document&&document.all;return M=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function _e(){if(q)return A;q=1;var e=he();return A=function(t){return"object"==typeof t?null!==t:e(t)}}function ve(){if(N)return D;N=1;var e=i(),t=he();return D=function(n,r){return 2>arguments.length?t(i=e[n])?i:void 0:e[n]&&e[n][r];var i},D}function ge(){if(j)return H;j=1;var e=le();return H=e({}.isPrototypeOf)}function me(){if(G)return W;G=1;var e=function(){if(z)return V;z=1;var e,t,n=i(),r=function(){if(B)return U;B=1;var e=i().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,s=n.Deno,a=o&&o.versions||s&&s.version,u=a&&a.v8;return u&&(t=(e=u.split("."))[0]>0&&4>e[0]?1:+(e[0]+e[1])),!t&&r&&((e=r.match(/Edge\/(\d+)/))&&74>e[1]||(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1])),V=t}(),t=h(),n=i().String;return W=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&41>e}))}function ye(){if(Q)return Y;Q=1;var e=me();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function be(){if(K)return Z;K=1;var e=ve(),t=he(),n=ge(),r=ye(),i=Object;return Z=r?function(e){return"symbol"==typeof e}:function(r){var o=e("Symbol");return t(o)&&n(o.prototype,i(r))}}function we(){if(J)return X;J=1;var e=String;return X=function(t){try{return e(t)}catch(e){return"Object"}}}function Se(){if(te)return ee;te=1;var e=he(),t=we(),n=TypeError;return ee=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function xe(){if(re)return ne;re=1;var e=Se(),t=de();return ne=function(n,r){var i=n[r];return t(i)?void 0:e(i)},ne}function ke(){if(oe)return ie;oe=1;var e=g(),t=he(),n=_e(),r=TypeError;return ie=function(i,o){var s,a;if("string"===o&&t(s=i.toString)&&!n(a=e(s,i)))return a;if(t(s=i.valueOf)&&!n(a=e(s,i)))return a;if("string"!==o&&t(s=i.toString)&&!n(a=e(s,i)))return a;throw new r("Can't convert object to primitive value")}}var Ee,Ce,Pe,Te,Ie,Fe,Le,Re,Me,Oe,Ae,qe,$e,De,Ne,He,je,Ue,Be,Ve,ze,We,Ge,Ye,Qe={exports:{}};function Ze(){return Ce?Ee:(Ce=1,Ee=!1)}function Ke(){if(Te)return Pe;Te=1;var e=i(),t=Object.defineProperty;return Pe=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Xe(){if(Ie)return Qe.exports;Ie=1;var e=Ze(),t=i(),n=Ke(),r="__core-js_shared__",o=Qe.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Qe.exports}function Je(){if(Le)return Fe;Le=1;var e=Xe();return Fe=function(t,n){return e[t]||(e[t]=n||{})}}function et(){if(Me)return Re;Me=1;var e=fe(),t=Object;return Re=function(n){return t(e(n))}}function tt(){if(Ae)return Oe;Ae=1;var e=le(),t=et(),n=e({}.hasOwnProperty);return Oe=Object.hasOwn||function(e,r){return n(t(e),r)}}function nt(){if($e)return qe;$e=1;var e=le(),t=0,n=Math.random(),r=e(1..toString);return qe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function rt(){if(Ne)return De;Ne=1;var e=i(),t=Je(),n=tt(),r=nt(),o=me(),s=ye(),a=e.Symbol,u=t("wks"),l=s?a.for||a:a&&a.withoutSetter||r;return De=function(e){return n(u,e)||(u[e]=o&&n(a,e)?a[e]:l("Symbol."+e)),u[e]}}function it(){if(je)return He;je=1;var e=g(),t=_e(),n=be(),r=xe(),i=ke(),o=rt(),s=TypeError,a=o("toPrimitive");return He=function(o,u){if(!t(o)||n(o))return o;var l,c=r(o,a);if(c){if(void 0===u&&(u="default"),l=e(c,o,u),!t(l)||n(l))return l;throw new s("Can't convert object to primitive value")}return void 0===u&&(u="number"),i(o,u)}}function ot(){if(Be)return Ue;Be=1;var e=it(),t=be();return Ue=function(n){var r=e(n,"string");return t(r)?r:r+""}}function st(){if(ze)return Ve;ze=1;var e=i(),t=_e(),n=e.document,r=t(n)&&t(n.createElement);return Ve=function(e){return r?n.createElement(e):{}}}function at(){if(Ge)return We;Ge=1;var e=_(),t=h(),n=st();return We=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function ut(){if(Ye)return p;Ye=1;var e=_(),t=g(),n=ae(),r=ue(),i=pe(),o=ot(),s=tt(),a=at(),u=Object.getOwnPropertyDescriptor;return p.f=e?u:function(e,l){if(e=i(e),l=o(l),a)try{return u(e,l)}catch(e){}if(s(e,l))return r(!t(n.f,e,l),e[l])},p}var lt,ct,dt,ft,pt,ht,_t,vt={};function gt(){if(ct)return lt;ct=1;var e=_(),t=h();return lt=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function mt(){if(ft)return dt;ft=1;var e=_e(),t=String,n=TypeError;return dt=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function yt(){if(pt)return vt;pt=1;var e=_(),t=at(),n=gt(),r=mt(),i=ot(),o=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return vt.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var o=a(e,t);o&&o[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:o[l],enumerable:u in n?n[u]:o[u],writable:!1})}return s(e,t,n)}:s:function(e,n,a){if(r(e),n=i(n),r(a),t)try{return s(e,n,a)}catch(e){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(e[n]=a.value),e},vt}function bt(){if(_t)return ht;_t=1;var e=_(),t=yt(),n=ue();return ht=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e}}var wt,St,xt,kt,Et,Ct,Pt,Tt,It,Ft,Lt,Rt,Mt,Ot,At,qt={exports:{}};function $t(){if(St)return wt;St=1;var e=_(),t=tt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,"name"),o=i&&"something"===function(){}.name,s=i&&(!e||e&&r(n,"name").configurable);return wt={EXISTS:i,PROPER:o,CONFIGURABLE:s}}function Dt(){if(kt)return xt;kt=1;var e=le(),t=he(),n=Xe(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),xt=n.inspectSource}function Nt(){if(Tt)return Pt;Tt=1;var e=Je(),t=nt(),n=e("keys");return Pt=function(e){return n[e]||(n[e]=t(e))}}function Ht(){return Ft?It:(Ft=1,It={})}function jt(){if(Rt)return Lt;Rt=1;var e,t,n,r=function(){if(Ct)return Et;Ct=1;var e=i(),t=he(),n=e.WeakMap;return Et=t(n)&&/native code/.test(String(n))}(),o=i(),s=_e(),a=bt(),u=tt(),l=Xe(),c=Nt(),d=Ht(),f="Object already initialized",p=o.TypeError;if(r||l.state){var h=l.state||(l.state=new(0,o.WeakMap));h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new p(f);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var _=c("state");d[_]=!0,e=function(e,t){if(u(e,_))throw new p(f);return t.facade=e,a(e,_,t),t},t=function(e){return u(e,_)?e[_]:{}},n=function(e){return u(e,_)}}return Lt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!s(n)||(r=t(n)).type!==e)throw new p("Incompatible receiver, "+e+" required");return r}}}}function Ut(){if(Mt)return qt.exports;Mt=1;var e=le(),t=h(),n=he(),r=tt(),i=_(),o=$t().CONFIGURABLE,s=Dt(),a=jt(),u=a.enforce,l=a.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),v=e([].join),g=i&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),y=qt.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||o&&e.name!==t)&&(i?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?i&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=u(e);return r(s,"source")||(s.source=v(m,"string"==typeof t?t:"")),e};return Function.prototype.toString=y((function(){return n(this)&&l(this).source||s(this)}),"toString"),qt.exports}function Bt(){if(At)return Ot;At=1;var e=he(),t=yt(),n=Ut(),r=Ke();return Ot=function(i,o,s,a){a||(a={});var u=a.enumerable,l=void 0!==a.name?a.name:o;if(e(s)&&n(s,l,a),a.global)u?i[o]=s:r(o,s);else{try{a.unsafe?i[o]&&(u=!0):delete i[o]}catch(e){}u?i[o]=s:t.f(i,o,{value:s,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i},Ot}var Vt,zt,Wt,Gt,Yt,Qt,Zt,Kt,Xt,Jt,en,tn,nn,rn,on,sn,an,un={};function ln(){if(Gt)return Wt;Gt=1;var e=function(){if(zt)return Vt;zt=1;var e=Math.ceil,t=Math.floor;return Vt=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Vt}();return Wt=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function cn(){if(Qt)return Yt;Qt=1;var e=ln(),t=Math.max,n=Math.min;return Yt=function(r,i){var o=e(r);return 0>o?t(o+i,0):n(o,i)}}function dn(){if(Kt)return Zt;Kt=1;var e=ln(),t=Math.min;return Zt=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function fn(){if(Jt)return Xt;Jt=1;var e=dn();return Xt=function(t){return e(t.length)}}function pn(){if(rn)return nn;rn=1;var e=le(),t=tt(),n=pe(),r=function(){if(tn)return en;tn=1;var e=pe(),t=cn(),n=fn(),r=function(r){return function(i,o,s){var a=e(i),u=n(a);if(0===u)return!r&&-1;var l,c=t(s,u);if(r&&o!=o){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((r||c in a)&&a[c]===o)return r||c||0;return!r&&-1}};return en={includes:r(!0),indexOf:r(!1)}}().indexOf,i=Ht(),o=e([].push);return nn=function(e,s){var a,u=n(e),l=0,c=[];for(a in u)!t(i,a)&&t(u,a)&&o(c,a);for(;s.length>l;)t(u,a=s[l++])&&(~r(c,a)||o(c,a));return c},nn}function hn(){return sn?on:(sn=1,on=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}var _n,vn,gn,mn,yn,bn,wn,Sn,xn,kn,En,Cn,Pn,Tn,In,Fn,Ln,Rn,Mn,On,An,qn,$n,Dn,Nn,Hn,jn,Un,Bn,Vn={};function zn(){if(gn)return vn;gn=1;var e=ve(),t=le(),n=function(){if(an)return un;an=1;var e=pn(),t=hn().concat("length","prototype");return un.f=Object.getOwnPropertyNames||function(n){return e(n,t)},un}(),r=(_n||(_n=1,Vn.f=Object.getOwnPropertySymbols),Vn),i=mt(),o=t([].concat);return vn=e("Reflect","ownKeys")||function(e){var t=n.f(i(e)),s=r.f;return s?o(t,s(e)):t}}function Wn(){if(yn)return mn;yn=1;var e=tt(),t=zn(),n=ut(),r=yt();return mn=function(i,o,s){for(var a=t(o),u=r.f,l=n.f,c=0;a.length>c;c++){var d=a[c];e(i,d)||s&&e(s,d)||u(i,d,l(o,d))}},mn}function Gn(){if(xn)return Sn;xn=1;var e=i(),t=ut().f,n=bt(),r=Bt(),o=Ke(),s=Wn(),a=function(){if(wn)return bn;wn=1;var e=h(),t=he(),n=/#|\.prototype\./,r=function(n,r){var u=o[i(n)];return u===a||u!==s&&(t(r)?e(r):!!r)},i=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},o=r.data={},s=r.NATIVE="N",a=r.POLYFILL="P";return bn=r}();return Sn=function(i,u){var l,c,d,f,p,h=i.target,_=i.global,v=i.stat;if(l=_?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in u){if(f=u[c],d=i.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(_?c:h+(v?".":"#")+c,i.forced)&&void 0!==d){if(typeof f==typeof d)continue;s(f,d)}(i.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,i)}}}function Yn(){if(Pn)return Cn;Pn=1;var e=tt(),t=he(),n=et(),r=Nt(),i=function(){if(En)return kn;En=1;var e=h();return kn=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),kn}(),o=r("IE_PROTO"),s=Object,a=s.prototype;return Cn=i?s.getPrototypeOf:function(r){var i=n(r);if(e(i,o))return i[o];var u=i.constructor;return t(u)&&i instanceof u?u.prototype:i instanceof s?a:null},Cn}function Qn(){if(In)return Tn;In=1;var e=pn(),t=hn();return Tn=Object.keys||function(n){return e(n,t)},Tn}function Zn(){if(On)return Mn;On=1;var e=i();return Mn=e}function Kn(){if(Dn)return $n;Dn=1;var e=function(){if(qn)return An;qn=1,function(){if(Rn)return r;Rn=1;var $=Gn(),e=function(){if(Ln)return Fn;Ln=1;var e=_(),t=h(),n=le(),r=Yn(),i=Qn(),o=pe(),s=n(ae().f),a=n([].push),u=e&&t((function(){var e=Object.create(null);return e[2]=2,!s(e,2)})),l=function(t){return function(n){for(var l,c=o(n),d=i(c),f=u&&null===r(c),p=d.length,h=0,_=[];p>h;)l=d[h++],e&&!(f?l in c:s(c,l))||a(_,t?[l,c[l]]:c[l]);return _}};return Fn={entries:l(!0),values:l(!1)}}().entries;$({target:"Object",stat:!0},{entries:function(t){return e(t)}})}();var e=Zn();return An=e.Object.entries}();return $n=e}Bn||(Bn=1,function(){if(Un)return jn;Un=1;var e=function(){if(Hn)return Nn;Hn=1;var e=Kn();return Nn=e}();jn=e}());var Xn,Jn,er,tr,nr,rr,ir,or,sr,ar,ur,lr,cr,dr,fr,pr,hr,_r,vr,gr,mr,yr,br,wr,Sr,xr,kr,Er,Cr,Pr={};function Tr(){if(er)return Jn;er=1;var e=ve();return Jn=e("document","documentElement")}function Ir(){if(nr)return tr;nr=1;var e,t=mt(),n=function(){if(Xn)return Pr;Xn=1;var e=_(),t=gt(),n=yt(),r=mt(),i=pe(),o=Qn();return Pr.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var s,a=i(t),u=o(t),l=u.length,c=0;l>c;)n.f(e,s=u[c++],a[s]);return e},Pr}(),r=hn(),i=Ht(),o=Tr(),s=st(),a=Nt(),u="prototype",l="script",c=a("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,i;h="undefined"!=typeof document?document.domain&&e?p(e):(n=s("iframe"),i="java"+l+":",n.style.display="none",o.appendChild(n),n.src=String(i),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var a=r.length;a--;)delete h[u][r[a]];return h()};return i[c]=!0,tr=Object.create||function(e,r){var i;return null!==e?(d[u]=t(e),i=new d,d[u]=null,i[c]=e):i=h(),void 0===r?i:n.f(i,r)},tr}function Fr(){if(ir)return rr;ir=1;var e=rt(),t=Ir(),n=yt().f,r=e("unscopables"),i=Array.prototype;return void 0===i[r]&&n(i,r,{configurable:!0,value:t(null)}),rr=function(e){i[r][e]=!0}}function Lr(){return sr?or:(sr=1,or={})}function Rr(){if(ur)return ar;ur=1;var e,t,n,r=h(),i=he(),o=_e(),s=Ir(),a=Yn(),u=Bt(),l=rt(),c=Ze(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=a(a(n)))!==Object.prototype&&(e=t):f=!0),!o(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=s(e)),i(e[d])||u(e,d,(function(){return this})),ar={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Mr(){if(cr)return lr;cr=1;var e=yt().f,t=tt(),n=rt()("toStringTag");return lr=function(r,i,o){r&&!o&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:i})}}function Or(){if(vr)return _r;vr=1;var e=_e();return _r=function(t){return e(t)||null===t}}function Ar(){if(mr)return gr;mr=1;var e=Or(),t=String,n=TypeError;return gr=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function qr(){if(Sr)return wr;Sr=1;var $=Gn(),e=g(),t=Ze(),n=$t(),r=he(),i=function(){if(fr)return dr;fr=1;var e=Rr().IteratorPrototype,t=Ir(),n=ue(),r=Mr(),i=Lr(),o=function(){return this};return dr=function(s,a,u,l){var c=a+" Iterator";return s.prototype=t(e,{next:n(+!l,u)}),r(s,c,!1,!0),i[c]=o,s},dr}(),o=Yn(),s=function(){if(br)return yr;br=1;var e=function(){if(hr)return pr;hr=1;var e=le(),t=Se();return pr=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch(e){}}}(),t=_e(),n=fe(),r=Ar();return yr=Object.setPrototypeOf||("__proto__"in{}?function(){var i,o=!1,s={};try{(i=e(Object.prototype,"__proto__","set"))(s,[]),o=s instanceof Array}catch(e){}return function(e,s){return n(e),r(s),t(e)?(o?i(e,s):e.__proto__=s,e):e}}():void 0),yr}(),a=Mr(),u=bt(),l=Bt(),c=rt(),d=Lr(),f=Rr(),p=n.PROPER,h=n.CONFIGURABLE,_=f.IteratorPrototype,v=f.BUGGY_SAFARI_ITERATORS,m=c("iterator"),y="keys",b="values",w="entries",S=function(){return this};return wr=function(n,c,f,g,x,k,E){i(f,c,g);var C,P,T,I=function(e){if(e===x&&O)return O;if(!v&&e&&e in R)return R[e];switch(e){case y:case b:case w:return function(){return new f(this,e)}}return function(){return new f(this)}},F=c+" Iterator",L=!1,R=n.prototype,M=R[m]||R["@@iterator"]||x&&R[x],O=!v&&M||I(x),A="Array"===c&&R.entries||M;if(A&&(C=o(A.call(new n)))!==Object.prototype&&C.next&&(t||o(C)===_||(s?s(C,_):r(C[m])||l(C,m,S)),a(C,F,!0,!0),t&&(d[F]=S)),p&&x===b&&M&&M.name!==b&&(!t&&h?u(R,"name",b):(L=!0,O=function(){return e(M,this)})),x)if(P={values:I(b),keys:k?O:I(y),entries:I(w)},E)for(T in P)(v||L||!(T in R))&&l(R,T,P[T]);else $({target:c,proto:!0,forced:v||L},P);return t&&!E||R[m]===O||l(R,m,O,{name:x}),d[c]=O,P},wr}function $r(){return kr?xr:(kr=1,xr=function(e,t){return{value:e,done:t}})}function Dr(){if(Cr)return Er;Cr=1;var e=pe(),t=Fr(),n=Lr(),r=jt(),i=yt().f,o=qr(),s=$r(),a=Ze(),u=_(),l="Array Iterator",c=r.set,d=r.getterFor(l);Er=o(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,s(void 0,!0);switch(e.kind){case"keys":return s(n,!1);case"values":return s(t[n],!1)}return s([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!a&&u&&"values"!==f.name)try{i(f,"name",{value:"values"})}catch(e){}return Er}var Nr,Hr,jr,Ur,Br,Vr,zr,Wr,Gr,Yr,Qr,Zr,Kr,Xr,Jr,ei,ti,ni,ri,ii,oi,si,ai,ui={};function li(){if(Vr)return Br;Vr=1;var e=rt(),t=Lr(),n=e("iterator"),r=Array.prototype;return Br=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function ci(){if(Yr)return Gr;Yr=1;var e=function(){if(Wr)return zr;Wr=1;var e={};return e[rt()("toStringTag")]="z",zr="[object z]"===String(e)}(),t=he(),n=ce(),r=rt()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return Gr=e?n:function(e){var s,a,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(s=i(e),r))?a:o?n(s):"Object"===(u=n(s))&&t(s.callee)?"Arguments":u},Gr}function di(){if(Zr)return Qr;Zr=1;var e=ci(),t=xe(),n=de(),r=Lr(),i=rt()("iterator");return Qr=function(o){if(!n(o))return t(o,i)||t(o,"@@iterator")||r[e(o)]}}function fi(){if(Xr)return Kr;Xr=1;var e=g(),t=Se(),n=mt(),r=we(),i=di(),o=TypeError;return Kr=function(s,a){var u=2>arguments.length?i(s):a;if(t(u))return n(e(u,s));throw new o(r(s)+" is not iterable")},Kr}function pi(){if(ei)return Jr;ei=1;var e=g(),t=mt(),n=xe();return Jr=function(r,i,o){var s,a;t(r);try{if(!(s=n(r,"return"))){if("throw"===i)throw o;return o}s=e(s,r)}catch(e){a=!0,s=e}if("throw"===i)throw o;if(a)throw s;return t(s),o}}function hi(){if(ni)return ti;ni=1;var e=function(){if(Ur)return jr;Ur=1;var e=function(){if(Hr)return Nr;Hr=1;var e=ce(),t=le();return Nr=function(n){if("Function"===e(n))return t(n)}}(),t=Se(),n=v(),r=e(e.bind);return jr=function(e,i){return t(e),void 0===i?e:n?r(e,i):function(){return e.apply(i,arguments)}},jr}(),t=g(),n=mt(),r=we(),i=li(),o=fn(),s=ge(),a=fi(),u=di(),l=pi(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return ti=function(p,h,_){var v,g,m,y,b,w,S,x=!(!_||!_.AS_ENTRIES),k=!(!_||!_.IS_RECORD),E=!(!_||!_.IS_ITERATOR),C=!(!_||!_.INTERRUPTED),P=e(h,_&&_.that),T=function(e){return v&&l(v,"normal",e),new d(!0,e)},I=function(e){return x?(n(e),C?P(e[0],e[1],T):P(e[0],e[1])):C?P(e,T):P(e)};if(k)v=p.iterator;else if(E)v=p;else{if(!(g=u(p)))throw new c(r(p)+" is not iterable");if(i(g)){for(m=0,y=o(p);y>m;m++)if((b=I(p[m]))&&s(f,b))return b;return new d(!1)}v=a(p,g)}for(w=k?p.next:v.next;!(S=t(w,v)).done;){try{b=I(S.value)}catch(e){l(v,"throw",e)}if("object"==typeof b&&b&&s(f,b))return b}return new d(!1)}}function _i(){if(ii)return ri;ii=1;var e=_(),t=yt(),n=ue();return ri=function(r,i,o){e?t.f(r,i,n(0,o)):r[i]=o}}var vi,gi,mi,yi,bi,wi,Si,xi,ki,Ei,Ci,Pi,Ti={};function Ii(){if(ki)return xi;ki=1;var e=function(){if(Si)return wi;Si=1;var e=function(){if(ai)return si;ai=1,Dr(),function(){if(oi)return ui;oi=1;var $=Gn(),e=hi(),t=_i();$({target:"Object",stat:!0},{fromEntries:function(n){var r={};return e(n,(function(e,n){t(r,e,n)}),{AS_ENTRIES:!0}),r}})}();var e=Zn();return si=e.Object.fromEntries}();return function(){if(bi)return Ti;bi=1;var e=i(),t=gi?vi:(gi=1,vi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),n=function(){if(yi)return mi;yi=1;var e=st()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return mi=t===Object.prototype?void 0:t}(),r=Dr(),o=bt(),s=Mr(),a=rt()("iterator"),u=r.values,l=function(e,n){if(e){if(e[a]!==u)try{o(e,a,u)}catch(t){e[a]=u}if(s(e,n,!0),t[n])for(var i in r)if(e[i]!==r[i])try{o(e,i,r[i])}catch(t){e[i]=r[i]}}};for(var c in t)l(e[c]&&e[c].prototype,c);l(n,"DOMTokenList")}(),wi=e}();return xi=e}function Fi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function Li(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function Ri(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Li(o,r,i,s,a,"next",e)}function a(e){Li(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Mi(e,t,n){return t&&function(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hi(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Fi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fi(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return e.length>r?{done:!1,value:e[r++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ai(){return Ai=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ai.apply(null,arguments)}function qi(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function $i(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=Object.create((r&&r.prototype instanceof a?r:a).prototype);return Di(u,"_invoke",function(n,r,i){var o,a,u,l=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,a=0,u=e,f.n=n,s}};function p(n,r){for(a=n,u=r,t=0;!d&&l&&!i&&c.length>t;t++){var i,o=c[t],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):p>=o[0]&&((i=2>n&&o[1]>p)?(a=0,f.v=r,f.n=o[1]):h>p&&(i=3>n||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,h),a=c,u=h;(t=2>a?e:u)||!d;){o||(a?3>a?(a>1&&(f.n=-1),p(a,u)):f.n=u:f.v=u);try{if(l=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,2>a&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),2>a&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=0>f.n)?u:n.call(r,f))!==s)break}catch(t){o=e,a=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,i,o),!0),u}var s={};function a(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Di(t={},r,(function(){return this})),t),d=l.prototype=a.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Di(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Di(d,"constructor",l),Di(l,"constructor",u),u.displayName="GeneratorFunction",Di(l,i,"GeneratorFunction"),Di(d),Di(d,i,"Generator"),Di(d,r,(function(){return this})),Di(d,"toString",(function(){return"[object Generator]"})),($i=function(){return{w:o,m:f}})()}function Di(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Di=function(e,t,n,r){function o(t,n){Di(e,t,(function(e){return this._invoke(t,n,e)}))}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Di(e,t,n,r)}function Ni(e,t){return Ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ni(e,t)}function Hi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}Pi||(Pi=1,function(){if(Ci)return Ei;Ci=1;var e=Ii();Ei=e}());var ji,Ui,Bi,Vi,zi,Wi,Gi,Yi,Qi,Zi,Ki,Xi,Ji={},eo=[],to=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,no=Array.isArray;function ro(e,t){for(var n in t)e[n]=t[n];return e}function io(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function oo(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ji.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return so(e,s,r,i,null)}function so(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++Bi:i,__i:-1,__u:0};return null==i&&null!=Ui.vnode&&Ui.vnode(o),o}function ao(e){return e.children}function uo(e,t){this.props=e,this.context=t}function lo(e,t){if(null==t)return e.__?lo(e.__,e.__i+1):null;for(var n;e.__k.length>t;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?lo(e):null}function co(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;e.__k.length>t;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return co(e)}}function fo(e){(!e.__d&&(e.__d=!0)&&Vi.push(e)&&!$.__r++||zi!=Ui.debounceRendering)&&((zi=Ui.debounceRendering)||Wi)($)}function $(){for(var e,t,n,r,i,o,s,a=1;Vi.length;)Vi.length>a&&Vi.sort(Gi),e=Vi.shift(),a=Vi.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],s=[],t.__P&&((n=ro({},r)).__v=r.__v+1,Ui.vnode&&Ui.vnode(n),yo(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,null==i?lo(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,wo(o,n,s),r.__e=r.__=null,n.__e!=i&&co(n)));$.__r=0}function po(e,t,n,r,i,o,s,a,u,l,c){var d,f,p,h,_,v,g,m=r&&r.__k||eo,y=t.length;for(u=function(e,t,n,r,i){var o,s,a,u,l,c=n.length,d=c,f=0;for(e.__k=new Array(i),o=0;i>o;o++)null!=(s=t[o])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=e.__k[o]=so(null,s,null,null,null):no(s)?s=e.__k[o]=so(ao,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[o]=so(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,u=o+f,s.__=e,s.__b=e.__b+1,a=null,-1!=(l=s.__i=_o(s,n,u,d))&&(d--,(a=n[l])&&(a.__u|=2)),null==a||null==a.__v?(-1==l&&(i>c?f--:c>i&&f++),"function"!=typeof s.type&&(s.__u|=4)):l!=u&&(l==u-1?f--:l==u+1?f++:(l>u?f--:f++,s.__u|=4))):e.__k[o]=null;if(d)for(o=0;c>o;o++)null!=(a=n[o])&&0==(2&a.__u)&&(a.__e==r&&(r=lo(a)),Eo(a,a));return r}(n,t,m,u,y),d=0;y>d;d++)null!=(p=n.__k[d])&&(f=-1==p.__i?Ji:m[p.__i]||Ji,p.__i=d,v=yo(e,p,f,i,o,s,a,u,l,c),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&ko(f.ref,null,p),c.push(p.ref,p.__c||h,p)),null==_&&null!=h&&(_=h),(g=!!(4&p.__u))||f.__k===p.__k?u=ho(p,u,e,g):"function"==typeof p.type&&void 0!==v?u=v:h&&(u=h.nextSibling),p.__u&=-7);return n.__e=_,u}function ho(e,t,n,r){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&i.length>o;o++)i[o]&&(i[o].__=e,t=ho(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=lo(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function _o(e,t,n,r){var i,o,s,a=e.key,u=e.type,l=t[n],c=null!=l&&0==(2&l.__u);if(null===l&&null==a||c&&a==l.key&&u==l.type)return n;if(r>(c?1:0))for(i=n-1,o=n+1;i>=0||t.length>o;)if(null!=(l=t[s=0>i?o++:i--])&&0==(2&l.__u)&&a==l.key&&u==l.type)return s;return-1}function vo(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||to.test(t)?n:n+"px"}function go(e,t,n,r,i){var o,s;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||vo(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||vo(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(Yi,"$1")),s=t.toLowerCase(),t=s in e||"onFocusOut"==t||"onFocusIn"==t?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Qi,e.addEventListener(t,o?Ki:Zi,o)):e.removeEventListener(t,o?Ki:Zi,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function mo(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Qi++;else if(n.u>t.t)return;return n(Ui.event?Ui.event(t):t)}}}function yo(e,t,n,r,i,o,s,a,u,l){var c,d,f,p,h,_,v,g,m,y,b,$,w,S,x,k,E,C=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=Ui.__b)&&c(t);e:if("function"==typeof C)try{if(g=t.props,m="prototype"in C&&C.prototype.render,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:(m?t.__c=d=new C(g,b):(t.__c=d=new uo(g,b),d.constructor=C,d.render=Co),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),m&&null==d.__s&&(d.__s=d.state),m&&null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=ro({},d.__s)),ro(d.__s,C.getDerivedStateFromProps(g,d.__s))),p=d.props,h=d.state,d.__v=t,f)m&&null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),m&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(m&&null==C.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,b),t.__v==n.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,b)){for(t.__v!=n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),$=0;d._sb.length>$;$++)d.__h.push(d._sb[$]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,b),m&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,h,_)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,w=Ui.__r,S=0,m){for(d.state=d.__s,d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),x=0;d._sb.length>x;x++)d.__h.push(d._sb[x]);d._sb=[]}else do{d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&25>++S);d.state=d.__s,null!=d.getChildContext&&(r=ro(ro({},r),d.getChildContext())),m&&!f&&null!=d.getSnapshotBeforeUpdate&&(_=d.getSnapshotBeforeUpdate(p,h)),k=c,null!=c&&c.type===ao&&null==c.key&&(k=So(c.props.children)),a=po(e,no(k)?k:[k],t,n,r,i,o,s,a,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(e){if(t.__v=null,u||null!=o)if(e.then){for(t.__u|=u?160:128;a&&8==a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else{for(E=o.length;E--;)io(o[E]);bo(t)}else t.__e=n.__e,t.__k=n.__k,e.then||bo(t);Ui.__e(e,t,n)}else null==o&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=xo(n.__e,t,n,r,i,o,s,u,l);return(c=Ui.diffed)&&c(t),128&t.__u?void 0:a}function bo(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(bo)}function wo(e,t,n){for(var r=0;n.length>r;r++)ko(n[r],n[++r],n[++r]);Ui.__c&&Ui.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Ui.__e(e,t.__v)}}))}function So(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:no(e)?e.map(So):ro({},e)}function xo(e,t,n,r,i,o,s,a,u){var l,c,d,f,p,h,_,v=n.props||Ji,g=t.props,m=t.type;if("svg"==m?i="http://www.w3.org/2000/svg":"math"==m?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(l=0;o.length>l;l++)if((p=o[l])&&"setAttribute"in p==!!m&&(m?p.localName==m:3==p.nodeType)){e=p,o[l]=null;break}if(null==e){if(null==m)return document.createTextNode(g);e=document.createElementNS(i,m,g.is&&g),a&&(Ui.__m&&Ui.__m(t,o),a=!1),o=null}if(null==m)v===g||a&&e.data==g||(e.data=g);else{if(o=o&&ji.call(e.childNodes),!a&&null!=o)for(v={},l=0;e.attributes.length>l;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],"children"==l);else if("dangerouslySetInnerHTML"==l)d=p;else if(!(l in g)){if("value"==l&&"defaultValue"in g||"checked"==l&&"defaultChecked"in g)continue;go(e,l,null,p,i)}for(l in g)p=g[l],"children"==l?f=p:"dangerouslySetInnerHTML"==l?c=p:"value"==l?h=p:"checked"==l?_=p:a&&"function"!=typeof p||v[l]===p||go(e,l,p,v[l],i);if(c)a||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),po("template"==t.type?e.content:e,no(f)?f:[f],t,n,r,"foreignObject"==m?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&lo(n,0),a,u),null!=o)for(l=o.length;l--;)io(o[l]);a||(l="value","progress"==m&&null==h?e.removeAttribute("value"):null!=h&&(h!==e[l]||"progress"==m&&!h||"option"==m&&h!=v[l])&&go(e,l,h,v[l],i),l="checked",null!=_&&_!=e[l]&&go(e,l,_,v[l],i))}return e}function ko(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Ui.__e(e,n)}}function Eo(e,t,n){var r,i;if(Ui.unmount&&Ui.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ko(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Ui.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;r.length>i;i++)r[i]&&Eo(r[i],t,n||"function"!=typeof e.type);n||io(e.__e),e.__c=e.__=e.__e=void 0}function Co(e,t,n){return this.constructor(e,n)}function Po(e,t,n){var r,i,o;t==document&&(t=document.documentElement),Ui.__&&Ui.__(e,t),r=t.__k,i=[],o=[],yo(t,e=t.__k=oo(ao,null,[e]),r||Ji,Ji,t.namespaceURI,r?null:t.firstChild?ji.call(t.childNodes):null,i,r?r.__e:t.firstChild,!1,o),wo(i,e,o)}ji=eo.slice,Ui={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},Bi=0,uo.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=ro({},this.state),"function"==typeof e&&(e=e(ro({},n),this.props)),e&&ro(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),fo(this))},uo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),fo(this))},uo.prototype.render=ao,Vi=[],Wi="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gi=function(e,t){return e.__v.__b-t.__v.__b},$.__r=0,Yi=/(PointerCapture)$|Capture$/i,Qi=0,Zi=mo(!1),Ki=mo(!0),Xi=0;var To,Io,Fo,Lo,Ro=0,Mo=[],Oo=Ui,Ao=Oo.__b,qo=Oo.__r,$o=Oo.diffed,Do=Oo.__c,No=Oo.unmount,Ho=Oo.__;function jo(e,t){Oo.__h&&Oo.__h(Io,e,Ro||t),Ro=0;var n=Io.__H||(Io.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Uo(e){return Ro=1,function(e,t,n){var r=jo(To++,2);if(r.t=e,!r.__c&&(r.__=[Jo(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Io,!Io.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=r.__c.props!==e;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),o&&o.call(this,e,t,n)||s};Io.__f=!0;var o=Io.shouldComponentUpdate,s=Io.componentWillUpdate;Io.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},Io.shouldComponentUpdate=i}return r.__N||r.__}(Jo,e)}function Bo(e,t){var n=jo(To++,3);!Oo.__s&&Xo(n.__H,t)&&(n.__=e,n.u=t,Io.__H.__h.push(n))}function Vo(e){return Ro=5,zo((function(){return{current:e}}),[])}function zo(e,t){var n=jo(To++,7);return Xo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Wo(e){var t=Io.context[e.__c],n=jo(To++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Io)),t.props.value):e.__}function Go(){for(var e;e=Mo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zo),e.__H.__h.forEach(Ko),e.__H.__h=[]}catch(t){e.__H.__h=[],Oo.__e(t,e.__v)}}Oo.__b=function(e){Io=null,Ao&&Ao(e)},Oo.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ho&&Ho(e,t)},Oo.__r=function(e){qo&&qo(e),To=0;var t=(Io=e.__c).__H;t&&(Fo===Io?(t.__h=[],Io.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(Zo),t.__h.forEach(Ko),t.__h=[],To=0)),Fo=Io},Oo.diffed=function(e){$o&&$o(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Mo.push(t)&&Lo===Oo.requestAnimationFrame||((Lo=Oo.requestAnimationFrame)||Qo)(Go)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),Fo=Io=null},Oo.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Zo),e.__h=e.__h.filter((function(e){return!e.__||Ko(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Oo.__e(n,e.__v)}})),Do&&Do(e,t)},Oo.unmount=function(e){No&&No(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Zo(e)}catch(e){t=e}})),n.__H=void 0,t&&Oo.__e(t,n.__v))};var Yo="function"==typeof requestAnimationFrame;function Qo(e){var t,n=function(){clearTimeout(r),Yo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Yo&&(t=requestAnimationFrame(n))}function Zo(e){var t=Io,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Io=t}function Ko(e){var t=Io;e.__c=e.__(),Io=t}function Xo(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Jo(e,t){return"function"==typeof t?t(e):t}var es,ts="events",ns="cancelEvents",rs={Tab:"tab",Selector:"selector"},is={TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},os={Top:"top",Left:"left",Right:"right",Bottom:"bottom"},ss={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},as={Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},us={End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},ls="always",cs={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},ds={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_COMPLETED:"$survey_completed",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date",SURVEY_LANGUAGE:"$survey_language"},fs="popover",ps="1.376.0",hs={DEBUG:!1,LIB_VERSION:ps,LIB_NAME:"web",JS_SDK_VERSION:ps},_s=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),vs=function(e){return e.MinLength="min_length",e.MaxLength="max_length",e}({}),gs=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],ms="NativeGzipValidationError",ys=function(e){return e.length>=2&&31===e[0]&&139===e[1]},bs=function(e){return!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):"")},ws=function(e){for(var t=function(){if(es)return es;es=[];for(var e=0;256>e;e++){for(var t=e,n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;es[e]=t>>>0}return es}(),n=4294967295,r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0},Ss=function(e){var t=new Error("Native gzip produced invalid output: "+e);throw t.name=ms,t},xs=function(){var e=Ri($i().m((function e(t,n){var r,i,o,s,a;return $i().w((function(e){for(;;)switch(e.n){case 0:return 18>t.size&&Ss("too-short"),s=Uint8Array,e.n=1,t.slice(0,10).arrayBuffer();case 1:return r=new s(e.v),ys(r)&&8===r[2]||Ss("invalid-header"),a=DataView,e.n=2,t.slice(t.size-8).arrayBuffer();case 2:(i=new a(e.v)).getUint32(0,!0)!==ws(n)&&Ss("invalid-crc"),o=n.length>>>0,i.getUint32(4,!0)!==o&&Ss("invalid-size");case 3:return e.a(2)}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function ks(e,t,n){return Es.apply(this,arguments)}function Es(){return Es=Ri($i().m((function e(t,n,r){var i,o,s,a,u,l,c;return $i().w((function(e){for(;;)switch(e.p=e.n){case 0:return void 0===n&&(n=!0),e.p=1,i=(new TextEncoder).encode(t),o=new CompressionStream("gzip"),s=o.writable.getWriter(),a=s.write(i).then((function(){return s.close()})).catch(function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,s.abort(t);case 1:e.n=3;break;case 2:e.p=2;case 3:throw t;case 4:return e.a(2)}}),e,null,[[0,2]])})));return function(t){return e.apply(this,arguments)}}()),u=new Response(o.readable).blob(),e.n=2,Promise.all([u,a]);case 2:return l=e.v[0],e.n=3,xs(l,i);case 3:return e.a(2,l);case 4:if(e.p=4,c=e.v,null==r||!r.rethrow){e.n=5;break}throw c;case 5:return n&&console.error("Failed to gzip compress data",c),e.a(2,null)}}),e,null,[[1,4]])}))),Es.apply(this,arguments)}var Cs=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Ps=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var n=e.toLowerCase();return Cs.concat(t).some((function(e){var t=e.toLowerCase();return-1!==n.indexOf(t)}))};function Ts(e,t){return-1!==e.indexOf(t)}var Is=function(e){return e.trim()},Fs=function(e){return e.replace(/^\$/,"")},Ls=Object.prototype,Rs=Ls.hasOwnProperty,Ms=Ls.toString,Os=Array.isArray||function(e){return"[object Array]"===Ms.call(e)},As=function(e){return"function"==typeof e},qs=function(e){return e===Object(e)&&!Os(e)},$s=function(e){if(qs(e)){for(var t in e)if(Rs.call(e,t))return!1;return!0}return!1},Ds=function(e){return void 0===e},Ns=function(e){return"[object String]"==Ms.call(e)},Hs=function(e){return Ns(e)&&0===e.trim().length},js=function(e){return null===e},Us=function(e){return Ds(e)||js(e)},Bs=function(e){return"[object Number]"==Ms.call(e)&&e==e},Vs=function(e){return Bs(e)&&e>0},zs=function(e){return"[object Boolean]"===Ms.call(e)},Ws=function(e){return e instanceof FormData},Gs=function(e){return Ts(gs,e)};function Ys(e){return null===e||"object"!=typeof e}function Qs(e,t){return{}.toString.call(e)==="[object "+t+"]"}function Zs(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var Ks=[!0,"true",1,"1","yes"],Xs=function(e){return Ts(Ks,e)},Js=[!1,"false",0,"0","no"];function ea(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),Bs(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),ea(i||n,t,n,r))}var ta,na,ra,ia,oa=function(){function e(e){this._buckets={},this._onBucketRateLimited=e._onBucketRateLimited,this._bucketSize=ea(e.bucketSize,0,100,e._logger),this._refillRate=ea(e.refillRate,0,this._bucketSize,e._logger),this._refillInterval=ea(e.refillInterval,0,864e5,e._logger)}var t=e.prototype;return t._applyRefill=function(e,t){var n=Math.floor((t-e.lastAccess)/this._refillInterval);n>0&&(e.tokens=Math.min(e.tokens+n*this._refillRate,this._bucketSize),e.lastAccess=e.lastAccess+n*this._refillInterval)},t.consumeRateLimit=function(e){var t,n=Date.now(),r=String(e),i=this._buckets[r];return i?this._applyRefill(i,n):this._buckets[r]=i={tokens:this._bucketSize,lastAccess:n},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this._onBucketRateLimited)||t.call(this,e)),0===i.tokens)},t.stop=function(){this._buckets={}},e}(),sa="Mobile",aa="iOS",ua="Android",la="Tablet",ca=ua+" "+la,da="iPad",fa="Apple",pa=fa+" Watch",ha="Safari",_a="BlackBerry",va="Samsung",ga=va+"Browser",ma=va+" Internet",ya="Chrome",ba=ya+" OS",wa=ya+" "+aa,Sa="Internet Explorer",xa=Sa+" "+sa,ka="Opera",Ea=ka+" Mini",Ca="Edge",Pa="Microsoft "+Ca,Ta="Firefox",Ia=Ta+" "+aa,Fa="Nintendo",La="PlayStation",Ra="Xbox",Ma=ua+" "+sa,Oa=sa+" "+ha,Aa="Windows",qa=Aa+" Phone",$a="Nokia",Da="Ouya",Na="Generic",Ha=Na+" "+sa.toLowerCase(),ja=Na+" "+la.toLowerCase(),Ua="Konqueror",Ba="Oculus Browser",Va="(\\d+(\\.\\d+)?)",za=new RegExp("Version/"+Va),Wa=new RegExp(Ra,"i"),Ga=new RegExp(La+" \\w+","i"),Ya=new RegExp(Fa+" \\w+","i"),Qa=new RegExp(_a+"|PlayBook|BB10","i"),Za={"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"},Ka=function(e,t){return t=t||"",Ts(e," OPR/")&&Ts(e,"Mini")?Ea:Ts(e," OPR/")?ka:Qa.test(e)?_a:Ts(e,"IE"+sa)||Ts(e,"WPDesktop")?xa:Ts(e,"OculusBrowser")?Ba:Ts(e,ga)?ma:Ts(e,Ca)||Ts(e,"Edg/")?Pa:Ts(e,"FBIOS")?"Facebook "+sa:Ts(e,"UCWEB")||Ts(e,"UCBrowser")?"UC Browser":Ts(e,"CriOS")?wa:Ts(e,"CrMo")||Ts(e,ya)?ya:Ts(e,ua)&&Ts(e,ha)?Ma:Ts(e,"FxiOS")?Ia:Ts(e.toLowerCase(),Ua.toLowerCase())?Ua:function(e,t){return t&&Ts(t,fa)||function(e){return Ts(e,ha)&&!Ts(e,ya)&&!Ts(e,ua)}(e)}(e,t)?Ts(e,sa)?Oa:ha:Ts(e,Ta)?Ta:Ts(e,"MSIE")||Ts(e,"Trident/")?Sa:Ts(e,"Gecko")?Ta:""},Xa=((ta={})[xa]=[new RegExp("rv:"+Va)],ta[Pa]=[new RegExp(Ca+"?\\/"+Va)],ta[ya]=[new RegExp("("+ya+"|CrMo)\\/"+Va)],ta[wa]=[new RegExp("CriOS\\/"+Va)],ta["UC Browser"]=[new RegExp("(UCBrowser|UCWEB)\\/"+Va)],ta[ha]=[za],ta[Oa]=[za],ta[ka]=[new RegExp("(Opera|OPR)\\/"+Va)],ta[Ta]=[new RegExp(Ta+"\\/"+Va)],ta[Ia]=[new RegExp("FxiOS\\/"+Va)],ta[Ua]=[new RegExp("Konqueror[:/]?"+Va,"i")],ta[_a]=[new RegExp(_a+" "+Va),za],ta[Ma]=[new RegExp("android\\s"+Va,"i")],ta[ma]=[new RegExp(ga+"\\/"+Va)],ta[Ba]=[new RegExp("OculusBrowser\\/"+Va)],ta[Sa]=[new RegExp("(rv:|MSIE )"+Va)],ta.Mozilla=[new RegExp("rv:"+Va)],ta),Ja=function(e,t){var n=Ka(e,t),r=Xa[n];if(Ds(r))return null;for(var i=0;r.length>i;i++){var o=e.match(r[i]);if(o)return parseFloat(o[o.length-2])}return null},eu=[[new RegExp(Ra+"; "+Ra+" (.*?)[);]","i"),function(e){return[Ra,e&&e[1]||""]}],[new RegExp(Fa,"i"),[Fa,""]],[new RegExp(La,"i"),[La,""]],[Qa,[_a,""]],[new RegExp(Aa,"i"),function(e,t){if(/Phone/.test(t)||/WPDesktop/.test(t))return[qa,""];if(new RegExp(sa).test(t)&&!/IEMobile\b/.test(t))return[Aa+" "+sa,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=Za[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[Aa,r]}return[Aa,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(e){return e&&e[3]?[aa,[e[3],e[4],e[5]||"0"].join(".")]:[aa,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(e){var t="";return e&&e.length>=3&&(t=Ds(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+ua+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+ua+")","i"),function(e){return e&&e[2]?[ua,[e[2],e[3],e[4]||"0"].join(".")]:[ua,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(e){var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ba,""]],[/Linux|debian/i,["Linux",""]]],tu=function(e){return Ya.test(e)?Fa:Ga.test(e)?La:Wa.test(e)?Ra:new RegExp(Da,"i").test(e)?Da:new RegExp("("+qa+"|WPDesktop)","i").test(e)?qa:/iPad/.test(e)?da:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?pa:Qa.test(e)?_a:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp($a,"i").test(e)?$a:/(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(sa).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)?ua:ca:new RegExp("(pda|"+sa+")","i").test(e)?Ha:new RegExp(la,"i").test(e)&&!new RegExp(la+" pc","i").test(e)?ja:""},nu=function(e,t){var n,r,i,o,s=tu(e);return s===da||s===ca||"Kobo"===s||"Kindle Fire"===s||s===ja?la:s===Fa||s===Ra||s===La||s===Da?"Console":s===pa?"Wearable":s?sa:"Android"===(null==t?void 0:t.userAgentDataPlatform)&&(null!==(n=null==t?void 0:t.maxTouchPoints)&&void 0!==n?n:0)>0?600>Math.min(null!==(r=null==t?void 0:t.screenWidth)&&void 0!==r?r:0,null!==(i=null==t?void 0:t.screenHeight)&&void 0!==i?i:0)/(null!==(o=null==t?void 0:t.devicePixelRatio)&&void 0!==o?o:1)?sa:la:"Desktop"},ru=function(e){return e instanceof Error},iu={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},ou=iu.info;function su(e){if(zs(e))return{boolValue:e};if("number"==typeof e)return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if("string"==typeof e)return{stringValue:e};if(Os(e))return{arrayValue:{values:e.map((function(e){return su(e)}))}};try{return{stringValue:JSON.stringify(e)}}catch(t){return{stringValue:String(e)}}}function au(e){var t=[];for(var n in e){var r=e[n];js(r)||Ds(r)||t.push({key:n,value:su(r)})}return t}function uu(e,t){if(e){var n=e.find((function(e){return e.type===t}));return null==n?void 0:n.value}}function lu(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return ia&&n.length===ra||(ra=n.length,ia=n.reduce((function(n,r){na||(na={});var i=na[r];if(i)n[i[0]]=i[1];else for(var o=e(r),s=o.length-1;s>=0;s--){var a=o[s],u=null==a?void 0:a.filename,l=t[r];if(u&&l){n[u]=l,na[r]=[u,l];break}}return n}),{})),ia}}var cu=function(){function e(e,t,n){void 0===n&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}var t=e.prototype;return t.buildFromUnknown=function(e,t){void 0===t&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),o=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}},t.modifyFrames=function(){var e=Ri($i().m((function e(t){var n,r,i;return $i().w((function(e){for(;;)switch(e.n){case 0:n=Oi(t);case 1:if((r=n()).done){e.n=4;break}if(!((i=r.value).stacktrace&&i.stacktrace.frames&&Os(i.stacktrace.frames))){e.n=3;break}return e.n=2,this.applyModifiers(i.stacktrace.frames);case 2:i.stacktrace.frames=e.v;case 3:e.n=1;break;case 4:return e.a(2,t)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.coerceFallback=function(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}},t.parseStacktrace=function(e,t){var n,r;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),Ai({},e,{cause:n,stack:r})},t.applyChunkIds=function(e,t){return e.map((function(e){return e.filename&&t&&(e.chunk_id=t[e.filename]),e}))},t.applyCoercers=function(e,t){for(var n,r=Oi(this.coercers);!(n=r()).done;){var i=n.value;if(i.match(e))return i.coerce(e,t)}return this.coerceFallback(t)},t.applyModifiers=function(){var e=Ri($i().m((function e(t){var n,r,i,o;return $i().w((function(e){for(;;)switch(e.n){case 0:n=t,r=Oi(this.modifiers);case 1:if((i=r()).done){e.n=4;break}return o=i.value,e.n=2,o(n);case 2:n=e.v;case 3:e.n=1;break;case 4:return e.a(2,n)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.convertToExceptionList=function(e,t){var n,r,i,o={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(i=e.synthetic)&&void 0!==i&&i}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var s=[o];return null!=e.cause&&s.push.apply(s,this.convertToExceptionList(e.cause,Ai({},t,{handled:!0}))),s},t.buildParsingContext=function(e){var t;return{chunkIdMap:lu(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}},t.buildCoercingContext=function(e,t,n){var r=this;void 0===n&&(n=0);var i=function(n,i){if(4>=i){var o=r.buildCoercingContext(e,t,i);return r.applyCoercers(n,o)}};return Ai({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:function(e){return i(e,n)},next:function(e){return i(e,n+1)}})},e}(),du="?";function fu(e,t,n,r,i){var o={platform:e,filename:t,function:"<anonymous>"===n?du:n,in_app:!0};return Ds(r)||(o.lineno=r),Ds(i)||(o.colno=i),o}var pu=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:du,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},hu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_u=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vu=/\((\S*)(?::(\d+))(?::(\d+))\)/,gu=function(e,t){var n=hu.exec(e);if(n)return fu(t,n[1],du,+n[2],+n[3]);var r=_u.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){var i=vu.exec(r[2]);i&&(r[2]=i[1],r[3]=i[2],r[4]=i[3])}var o=pu(r[1]||du,r[2]);return fu(t,o[1],o[0],r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},mu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bu=function(e,t){var n=mu.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=yu.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],o=n[1]||du,s=pu(o,i);return fu(t,i=s[1],o=s[0],n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},wu=/\(error: (.*)\)/,Su=50;var xu=function(){function e(){}var t=e.prototype;return t.match=function(e){return this.isDOMException(e)||this.isDOMError(e)},t.coerce=function(e,t){var n=Ns(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}},t.getType=function(e){return this.isDOMError(e)?"DOMError":"DOMException"},t.getValue=function(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t},t.isDOMException=function(e){return Qs(e,"DOMException")},t.isDOMError=function(e){return Qs(e,"DOMError")},e}(),ku=function(){function e(){}var t=e.prototype;return t.match=function(e){return function(e){return e instanceof Error}(e)},t.coerce=function(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}},t.getType=function(e){return e.name||e.constructor.name},t.getMessage=function(e,t){var n=e.message;return String(n.error&&"string"==typeof n.error.message?n.error.message:n)},t.getStack=function(e){return e.stacktrace||e.stack||void 0},e}(),Eu=function(){function e(){}var t=e.prototype;return t.match=function(e){return Qs(e,"ErrorEvent")&&null!=e.error},t.coerce=function(e,t){var n;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Cu=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Pu=function(){function e(){}var t=e.prototype;return t.match=function(e){return"string"==typeof e},t.coerce=function(e,t){var n,r=this.getInfos(e),i=r[0],o=r[1];return{type:null!=i?i:"Error",value:null!=o?o:e,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},t.getInfos=function(e){var t="Error",n=e,r=e.match(Cu);return r&&(t=r[1],n=r[2]),[t,n]},e}(),Tu=["fatal","error","warning","log","info","debug"];function Iu(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+"...":i}return""}var Fu=function(){function e(){}var t=e.prototype;return t.match=function(e){return"object"==typeof e&&null!==e},t.coerce=function(e,t){var n,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(n=t.syntheticException)?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}},t.getType=function(e){return Zs(e)?e.constructor.name:"Error"},t.getValue=function(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var n=this.getObjectClassName(e);return(n&&"Object"!==n?"'"+n+"'":"Object")+" captured as exception with keys: "+Iu(e)},t.isSeverityLevel=function(e){return Ns(e)&&!Hs(e)&&Tu.indexOf(e)>=0},t.getErrorPropertyFromObject=function(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(ru(n))return n}},t.getObjectClassName=function(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}},e}(),Lu=function(){function e(){}var t=e.prototype;return t.match=function(e){return Zs(e)},t.coerce=function(e,t){var n,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Iu(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Ru=function(){function e(){}var t=e.prototype;return t.match=function(e){return Ys(e)},t.coerce=function(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Mu=function(){function e(){}var t=e.prototype;return t.match=function(e){return Qs(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)},t.isCustomEventWrappingRejection=function(e){if(!Zs(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}},t.coerce=function(e,t){var n,r=this.getUnhandledRejectionReason(e);return Ys(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}:t.apply(r)},t.getUnhandledRejectionReason=function(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e},e}(),Ou="$message",Au="$timestamp",qu=new Set([Ou,Au]),$u={enabled:!0,max_bytes:32768};function Du(e){var t;return e?{enabled:null!==(t=e.enabled)&&void 0!==t?t:$u.enabled,max_bytes:Hu(e.max_bytes,$u.max_bytes)}:Ai({},$u)}var Nu=function(){function e(e){this._entries=[],this._totalBytes=0,this._config=Du(e)}var t=e.prototype;return t.setConfig=function(e){this._config=Du(e),this._trimToMaxBytes()},t.add=function(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(function(e,n){if("bigint"==typeof n)return n.toString();if("function"!=typeof n&&"symbol"!=typeof n){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&"object"==typeof n){if(t.has(n))return"[Circular]";t.add(n)}return n}}))}catch(e){return}}(e);if(t)try{var n=JSON.parse(t);if(!qs(n))return;var r=n,i=r[Ou],o=r[Au];if(!Ns(i)||0===i.trim().length)return;if(!Ns(o)&&!Bs(o))return;return{step:r,json:t}}catch(e){return}}(e);if(t){var n=function(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),n=0,r=0;t.length>r;r++)"%"===t[r]?(n+=1,r+=2):n+=1;return n}(t.json);n>this._config.max_bytes||(this._entries.push({step:t.step,bytes:n}),this._totalBytes+=n,this._trimToMaxBytes())}},t.getAttachable=function(){return this._entries.map((function(e){return e.step}))},t.clear=function(){this._entries=[],this._totalBytes=0},t.size=function(){return this._entries.length},t._trimToMaxBytes=function(){for(;this._totalBytes>this._config.max_bytes&&this._entries.length>0;){var e=this._entries.shift();e&&(this._totalBytes-=e.bytes)}},e}();function Hu(e,t){if(!Bs(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var ju="undefined"!=typeof window?window:void 0,Uu="undefined"!=typeof globalThis?globalThis:ju;"undefined"==typeof self&&(Uu.self=Uu),"undefined"==typeof File&&(Uu.File=function(){});var Bu=null==Uu?void 0:Uu.navigator,Vu=null==Uu?void 0:Uu.document,zu=null==Uu?void 0:Uu.location,Wu=null==Uu?void 0:Uu.fetch,Gu=null!=Uu&&Uu.XMLHttpRequest&&"withCredentials"in new Uu.XMLHttpRequest?Uu.XMLHttpRequest:void 0,Yu=null==Uu?void 0:Uu.AbortController,Qu=null==Uu?void 0:Uu.CompressionStream,Zu=null==Bu?void 0:Bu.userAgent,Ku=null!=ju?ju:{},Xu=function(e,t){var n=(void 0===t?{}:t).debugEnabled,r={_log:function(t){if(ju&&(hs.DEBUG||Ku.POSTHOG_DEBUG||n)&&!Ds(ju.console)&&ju.console){for(var r=("__rrweb_original__"in ju.console[t]?ju.console[t].__rrweb_original__:ju.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),s=1;i>s;s++)o[s-1]=arguments[s];r.apply(void 0,[e].concat(o))}},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["debug"].concat(t))},info:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["error"].concat(t))},critical:function(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];(t=console).error.apply(t,[e].concat(r))},uninitializedWarning:function(e){r.error("You must initialize PostHog before calling "+e)},createLogger:function(t,n){return Xu(e+" "+t,n)}};return r},Ju=Xu("[PostHog.js]"),el=Ju.createLogger;function tl(e,t){Os(e)&&e.forEach(t)}function nl(e,t){if(!Us(e))if(Os(e))e.forEach(t);else if(Ws(e))e.forEach((function(e,n){return t(e,n)}));else for(var n in e)Rs.call(e,n)&&t(e[n],n)}var rl=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i=0,o=n;o.length>i;i++){var s=o[i];for(var a in s)void 0!==s[a]&&(e[a]=s[a])}return e};function il(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var ol=function(e){try{return e()}catch(e){return}},sl=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){Ju.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Ju.critical(e)}}},al=function(e){var t={};return nl(e,(function(e,n){(Ns(e)&&e.length>0||Bs(e))&&(t[n]=e)})),t};var ul=["herokuapp.com","vercel.app","netlify.app"];function ll(e){var t=null==e?void 0:e.hostname;if(!Ns(t))return!1;for(var n,r=t.split(".").slice(-2).join("."),i=Oi(ul);!(n=i()).done;)if(r===n.value)return!1;return!0}function cl(e,t,n,r){var i=null!=r?r:{},o=i.capture,s=i.passive;null==e||e.addEventListener(t,n,{capture:void 0!==o&&o,passive:void 0===s||s})}function dl(e){return"ph_toolbar_internal"===e.name}function fl(e){return"$survey_response_"+e}function pl(e,t){if(!t)return null;var n=e[fl(t)];return Os(n)?[].concat(n):n}function hl(e,t){void 0===e&&(e={});var n={};return t.questions.forEach((function(t){if(!Ds(t.originalQuestionIndex)){var r,i=0===(r=t.originalQuestionIndex)?"$survey_response":"$survey_response_"+r,o=pl(e,t.id);Ds(o)||(n[i]=o)}})),Ai({$survey_questions:t.questions.map((function(t){return{id:t.id,question:t.question,response:pl(e,t.id)}}))},e,n)}function _l(e,t){var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n}function vl(e){return"string"==typeof e&&e.trim()?e.trim():null}function gl(e){return e.toLowerCase()}function ml(e,t,n){if(!e||!t)return null;var r=gl(t),i=Object.keys(e).find((function(e){return gl(e)===r}));if(i)return null==n||n.debug("Found exact translation match: "+i),i;if(r.includes("-")){var o=r.split("-")[0],s=Object.keys(e).find((function(e){return gl(e)===o}));if(s)return null==n||n.debug("Found base language translation match: "+s+" (from "+t+")"),s}return null}function yl(e,t,n){var r,i=ml(e.translations,t,n),o=Ai({},e),s=!1;if(i){var a,u=null==(a=e.translations)?void 0:a[i];u&&(null==n||n.info("Applying survey-level translation for language: "+i),Ds(u.name)||(o.name=u.name,s=!0),o.appearance?(o.appearance=Ai({},o.appearance),Ds(u.thankYouMessageHeader)||(o.appearance.thankYouMessageHeader=u.thankYouMessageHeader,s=!0),Ds(u.thankYouMessageDescription)||(o.appearance.thankYouMessageDescription=u.thankYouMessageDescription,s=!0),Ds(u.thankYouMessageCloseButtonText)||(o.appearance.thankYouMessageCloseButtonText=u.thankYouMessageCloseButtonText,s=!0)):function(e){return!Ds(e.thankYouMessageHeader)||!Ds(e.thankYouMessageDescription)||!Ds(e.thankYouMessageCloseButtonText)}(u)&&(s=!0))}var l=e.questions.map((function(e){return function(e,t,n){var r,i=ml(e.translations,t,n);if(!i)return{question:e,matchedKey:null,hasChanges:!1};var o=null==(r=e.translations)?void 0:r[i];if(!o)return{question:e,matchedKey:null,hasChanges:!1};var s=Ai({},e),a=!1;return Ds(o.question)||(s.question=o.question,a=!0),Ds(o.description)||(s.description=o.description,a=!0),Ds(o.buttonText)||(s.buttonText=o.buttonText,a=!0),"link"in s&&!Ds(o.link)&&(s.link=o.link,a=!0),"lowerBoundLabel"in s&&!Ds(o.lowerBoundLabel)&&(s.lowerBoundLabel=o.lowerBoundLabel,a=!0),"upperBoundLabel"in s&&!Ds(o.upperBoundLabel)&&(s.upperBoundLabel=o.upperBoundLabel,a=!0),"choices"in s&&function(e){return Os(e.choices)}(o)&&(s.choices=o.choices,a=!0),{question:a?s:e,matchedKey:a?i:null,hasChanges:a}}(e,t,n)})),c=l.map((function(e){return e.question})),d=l.some((function(e){return e.hasChanges})),f=null;return i||(f=(null==(r=l.find((function(e){return e.matchedKey})))?void 0:r.matchedKey)||null),d&&(o.questions=c,s=!0,null==n||n.info("Applied question-level translations for language: "+t)),{survey:o,matchedKey:s?i||f:null}}var bl=el("[Surveys]");function wl(e){return!(!e.start_date||e.end_date)}function Sl(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}function xl(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}var kl="seenSurvey_",El="inProgressSurvey_",Cl=function(e,t){var n=""+e+t.id;return t.current_iteration&&t.current_iteration>0&&(n=""+e+t.id+"_"+t.current_iteration),n},Pl=function(e){return Cl(kl,e)},Tl=function(e){try{var t=Pl(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){bl.error("Failed to persist survey seen state",e)}},Il=[ss.Popover,ss.Widget,ss.API],Fl={ignoreConditions:!1,ignoreDelay:!1,displayType:fs},Ll="$people_distinct_id",Rl="$device_id",Ml="__alias",Ol="__timers",Al="$autocapture_disabled_server_side",ql="$heatmaps_enabled_server_side",$l="$exception_capture_enabled_server_side",Dl="$error_tracking_suppression_rules",Nl="$error_tracking_capture_extension_exceptions",Hl="$web_vitals_enabled_server_side",jl="$dead_clicks_enabled_server_side",Ul="$product_tours_enabled_server_side",Bl="$web_vitals_allowed_metrics",Vl="$session_recording_remote_config",zl="$replay_override_sampling",Wl="$replay_override_linked_flag",Gl="$replay_override_url_trigger",Yl="$replay_override_event_trigger",Ql="$sesid",Zl="$session_is_sampled",Kl="$enabled_feature_flags",Xl="$active_feature_flags",Jl="$early_access_features",ec="$feature_flag_details",tc="$feature_flag_payloads",nc="$feature_flag_request_id",rc="$override_feature_flags",ic="$override_feature_flag_payloads",oc="$stored_person_properties",sc="$stored_group_properties",ac="$surveys",uc="$surveys_activated",lc="ph_product_tours",cc="$flag_call_reported",dc="$flag_call_reported_session_id",fc="$feature_flag_errors",pc="$feature_flag_evaluated_at",hc="$user_state",_c="$client_session_props",vc="$capture_rate_limit",gc="$initial_campaign_params",mc="$initial_referrer_info",yc="$initial_person_info",bc="$epp",wc="__POSTHOG_TOOLBAR__",Sc="$posthog_cookieless",xc="$sdk_debug_extensions_init_method",kc="$sdk_debug_extensions_init_time_ms",Ec="$sdk_debug_recording_script_not_loaded",Cc="PostHog loadExternalDependency extension not found.",Pc="on_reject",Tc="always",Ic="anonymous",Fc="identified",Lc="identified_only",Rc="visibilitychange",Mc="beforeunload",Oc="$pageview",Ac="$pageleave",qc="$identify",$c="$groupidentify";Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Bs(e)&&isFinite(e)&&Math.floor(e)===e});var Dc=function(){function e(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}e.fromFieldsV7=function(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||0>t||0>n||0>r||0>i||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=t/Math.pow(2,40),o[1]=t/Math.pow(2,32),o[2]=t/Math.pow(2,24),o[3]=t/Math.pow(2,16),o[4]=t/Math.pow(2,8),o[5]=t,o[6]=112|n>>>8,o[7]=n,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)};var t=e.prototype;return t.toString=function(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e},t.clone=function(){return new e(this.bytes.slice(0))},t.equals=function(e){return 0===this.compareTo(e)},t.compareTo=function(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0},e}(),Nc=function(){function e(){this._timestamp=0,this._counter=0,this._random=new Uc}var t=e.prototype;return t.generate=function(){var e=this.generateOrAbort();if(Ds(e)){this._timestamp=0;var t=this.generateOrAbort();if(Ds(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e},t.generateOrAbort=function(){var e=Date.now();if(e>this._timestamp)this._timestamp=e,this._resetCounter();else{if(this._timestamp>=e+1e4)return;this._counter++,this._counter>4398046511103&&(this._timestamp++,this._resetCounter())}return Dc.fromFieldsV7(this._timestamp,Math.trunc(this._counter/Math.pow(2,30)),this._counter&Math.pow(2,30)-1,this._random.nextUint32())},t._resetCounter=function(){this._counter=1024*this._random.nextUint32()+(1023&this._random.nextUint32())},e}(),Hc=function(e){if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ju&&!Ds(ju.crypto)&&crypto.getRandomValues&&(Hc=function(e){return crypto.getRandomValues(e)});var jc,Uc=function(){function e(){this._buffer=new Uint32Array(8),this._cursor=1/0}return e.prototype.nextUint32=function(){return this._buffer.length>this._cursor||(Hc(this._buffer),this._cursor=0),this._buffer[this._cursor++]},e}(),Bc=function(){return Vc().toString()},Vc=function(){return(jc||(jc=new Nc)).generate()},zc="gzip-js",Wc="base64",Gc=function(e){var t=null==Vu?void 0:Vu.createElement("a");return Ds(t)?null:(t.href=e,t)},Yc=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;r.length>i;i++){var o=r[i].split("=");if(o[0]===t){n=o;break}}if(!Os(n)||2>n.length)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){Ju.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},Qc=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[1],o=(r[0]||"").split("?"),s=o[1],a=o[0],u=(s||"").split("&"),l=[],c=0;u.length>c;c++){var d=u[c].split("=");Os(d)&&(t.includes(d[0])?l.push(d[0]+"="+n):l.push(u[c]))}var f=a;return null!=s&&(f+="?"+l.join("&")),null!=i&&(f+="#"+i),f},Zc=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},Kc=Uint8Array,Xc=Uint16Array,Jc=Uint32Array,ed=new Kc([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]),td=new Kc([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]),nd=new Kc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rd=function(e,t){for(var n=new Xc(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new Jc(n[30]);for(r=1;30>r;++r)for(var o=n[r];n[r+1]>o;++o)i[o]=o-n[r]<<5|r;return[n,i]},id=rd(ed,2),od=id[1];id[0][28]=258,od[258]=28;for(var sd=rd(td,0)[1],ad=new Xc(32768),ud=0;32768>ud;++ud){var ld=(43690&ud)>>>1|(21845&ud)<<1;ad[ud]=((65280&(ld=(61680&(ld=(52428&ld)>>>2|(13107&ld)<<2))>>>4|(3855&ld)<<4))>>>8|(255&ld)<<8)>>>1}var cd=function(e,t,n){for(var r=e.length,i=0,o=new Xc(t);r>i;++i)++o[e[i]-1];var s,a=new Xc(t);for(i=0;t>i;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new Xc(1<<t);var u=15-t;for(i=0;r>i;++i)if(e[i])for(var l=i<<4|e[i],c=t-e[i],d=a[e[i]-1]++<<c,f=d|(1<<c)-1;f>=d;++d)s[ad[d]>>>u]=l}else for(s=new Xc(r),i=0;r>i;++i)s[i]=ad[a[e[i]-1]++]>>>15-e[i];return s},dd=new Kc(288);for(ud=0;144>ud;++ud)dd[ud]=8;for(ud=144;256>ud;++ud)dd[ud]=9;for(ud=256;280>ud;++ud)dd[ud]=7;for(ud=280;288>ud;++ud)dd[ud]=8;var fd=new Kc(32);for(ud=0;32>ud;++ud)fd[ud]=5;var pd=cd(dd,9,0),hd=cd(fd,5,0),_d=function(e){return(e/8>>0)+(7&e&&1)},vd=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Xc?Xc:e instanceof Jc?Jc:Kc)(n-t);return r.set(e.subarray(t,n)),r},gd=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},md=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},yd=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new Kc(0),0];if(1==i){var s=new Kc(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],u=n[1],l=0,c=1,d=2;for(n[0]={s:-1,f:a.f+u.f,l:a,r:u};c!=i-1;)a=n[n[d].f>n[l].f?l++:d++],u=n[l!=c&&n[d].f>n[l].f?l++:d++],n[c++]={s:-1,f:a.f+u.f,l:a,r:u};var f=o[0].s;for(r=1;i>r;++r)o[r].s>f&&(f=o[r].s);var p=new Xc(f+1),h=bd(n[c-1],p,0);if(h>t){r=0;var _=0,v=h-t,g=1<<v;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));i>r;++r){var m=o[r].s;if(t>=p[m])break;_+=g-(1<<h-p[m]),p[m]=t}for(_>>>=v;_>0;){var y=o[r].s;t>p[y]?_-=1<<t-p[y]++-1:++r}for(;r>=0&&_;--r){var b=o[r].s;p[b]==t&&(--p[b],++_)}h=t}return[new Kc(p),h]},bd=function(e,t,n){return-1==e.s?Math.max(bd(e.l,t,n+1),bd(e.r,t,n+1)):t[e.s]=n},wd=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Xc(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;t>=a;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},Sd=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},xd=function(e,t,n){var r=n.length,i=_d(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 o=0;r>o;++o)e[i+o+4]=n[o];return 8*(i+4+r)},kd=function(e,t,n,r,i,o,s,a,u,l,c){gd(t,c++,n),++i[256];for(var d=yd(i,15),f=d[0],p=d[1],h=yd(o,15),_=h[0],v=h[1],g=wd(f),m=g[0],y=g[1],b=wd(_),w=b[0],S=b[1],x=new Xc(19),k=0;m.length>k;++k)x[31&m[k]]++;for(k=0;w.length>k;++k)x[31&w[k]]++;for(var E=yd(x,7),C=E[0],P=E[1],T=19;T>4&&!C[nd[T-1]];--T);var I,F,L,R,M=l+5<<3,O=Sd(i,dd)+Sd(o,fd)+s,A=Sd(i,f)+Sd(o,_)+s+14+3*T+Sd(x,C)+(2*x[16]+3*x[17]+7*x[18]);if(O>=M&&A>=M)return xd(t,c,e.subarray(u,u+l));if(gd(t,c,1+(O>A)),c+=2,O>A){I=cd(f,p,0),F=f,L=cd(_,v,0),R=_;var q=cd(C,P,0);for(gd(t,c,y-257),gd(t,c+5,S-1),gd(t,c+10,T-4),c+=14,k=0;T>k;++k)gd(t,c+3*k,C[nd[k]]);c+=3*T;for(var D=[m,w],N=0;2>N;++N){var H=D[N];for(k=0;H.length>k;++k)gd(t,c,q[j=31&H[k]]),c+=C[j],j>15&&(gd(t,c,H[k]>>>5&127),c+=H[k]>>>12)}}else I=pd,F=dd,L=hd,R=fd;for(k=0;a>k;++k)if(r[k]>255){var j;md(t,c,I[257+(j=r[k]>>>18&31)]),c+=F[j+257],j>7&&(gd(t,c,r[k]>>>23&31),c+=ed[j]);var U=31&r[k];md(t,c,L[U]),c+=R[U],U>3&&(md(t,c,r[k]>>>5&8191),c+=td[U])}else md(t,c,I[r[k]]),c+=F[r[k]];return md(t,c,I[256]),c+F[256]},Ed=new Jc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Cd=function(){for(var e=new Jc(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Pd=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Td(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;t.length>r;++r)n=Cd[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}}(),r=e.length;n.p(e);var i,o,s,a,u=(i=e,o=t,s=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),a=8,function(e,t,n,r,i,o){var s=e.length,a=new Kc(r+s+5*(1+Math.floor(s/7e3))+i),u=a.subarray(r,a.length-i),l=0;if(!t||8>s)for(var c=0;s>=c;c+=65535){var d=c+65535;s>d?l=xd(u,l,e.subarray(c,d)):(u[c]=!0,l=xd(u,l,e.subarray(c,s)))}else{for(var f=Ed[t-1],p=f>>>13,h=8191&f,_=(1<<n)-1,v=new Xc(32768),g=new Xc(_+1),m=Math.ceil(n/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&_},w=new Jc(25e3),S=new Xc(288),x=new Xc(32),k=0,E=0,C=(c=0,0),P=0,T=0;s>c;++c){var I=b(c),F=32767&c,L=g[I];if(v[F]=L,g[I]=F,c>=P){var R=s-c;if((k>7e3||C>24576)&&R>423){l=kd(e,u,0,w,S,x,E,C,T,c-T,l),C=k=E=0,T=c;for(var M=0;286>M;++M)S[M]=0;for(M=0;30>M;++M)x[M]=0}var O=2,A=0,q=h,D=F-L&32767;if(R>2&&I==b(c-D))for(var N=Math.min(p,R)-1,H=Math.min(32767,c),j=Math.min(258,R);H>=D&&--q&&F!=L;){if(e[c+O]==e[c+O-D]){for(var U=0;j>U&&e[c+U]==e[c+U-D];++U);if(U>O){if(O=U,A=D,U>N)break;var B=Math.min(D,U-2),V=0;for(M=0;B>M;++M){var z=c-D+M+32768&32767,W=z-v[z]+32768&32767;W>V&&(V=W,L=z)}}}D+=(F=L)-(L=v[F])+32768&32767}if(A){w[C++]=268435456|od[O]<<18|sd[A];var G=31&od[O],Y=31&sd[A];E+=ed[G]+td[Y],++S[257+G],++x[Y],P=c+O,++k}else w[C++]=e[c],++S[e[c]]}}l=kd(e,u,!0,w,S,x,E,C,T,c-T,l)}return vd(a,0,r+_d(l)+i)}(i,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+o.mem,s,a)),l=u.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Pd(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(u,t),Pd(u,l-8,n.d()),Pd(u,l-4,r),u}var Id=!!Gu||!!Wu,Fd="text/plain",Ld=!1,Rd=function(e,t){var n=e.split("#"),r=n[1],i=n[0].split("?"),o=i[0],s=i[1];if(!s)return e;var a=s.split("&").filter((function(e){return e.split("=")[0]!==t})).join("&");return o+(a?"?"+a:"")+(r?"#"+r:"")},Md=function(e,t,n){var r;void 0===n&&(n=!0);var i=e.split("?"),o=i[0],s=i[1],a=Ai({},t),u=null!==(r=null==s?void 0:s.split("&").map((function(e){var t,r=e.split("="),i=r[0],o=n&&null!==(t=a[i])&&void 0!==t?t:r[1];return delete a[i],i+"="+o})))&&void 0!==r?r:[],l=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return nl(e,(function(e,t){Ds(e)||Ds(t)||"undefined"===t||(n=encodeURIComponent(function(e){return e instanceof File}(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)})),i.join(t)}(a);return l&&u.push(l),o+"?"+u.join("&")},Od=function(e,t){return JSON.stringify(e,(function(e,t){return"bigint"==typeof t?t.toString():t}),t)},Ad=function(e){if(e._encodedBody)return e._encodedBody;var t=e.data,n=e.compression;if(t){if(n===zc){var r=Td(function(e,t){var n=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new Kc(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},s=0;n>s;++s){if(i+5>r.length){var a=new Kc(i+8+(n-s<<1));a.set(r),r=a}var u=e.charCodeAt(s);128>u?o(u):2048>u?(o(192|u>>>6),o(128|63&u)):u>55295&&57344>u?(o(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return vd(r,0,i)}(Od(t)),{mtime:0});return{contentType:Fd,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===Wc){var i=function(e){return e?btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))}))):e}(Od(t)),o=function(e){return"data="+encodeURIComponent("string"==typeof e?e:Od(e))}(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var s=Od(t);return{contentType:"application/json",body:s,estimatedSize:new Blob([s]).size}}},qd=function(e){var t,n,r,i=Ad(e);return!i||(n=e.compression,r=Yc(e.url,"compression"),n!==_s.GZipJS&&r!==_s.GZipJS&&"gzip"!==r)||((t=i.body)instanceof ArrayBuffer?ys(new Uint8Array(t)):ArrayBuffer.isView(t)&&ys(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:i}:(Ld=!0,{url:Rd(e.url,"compression"),encodedBody:Ad(Ai({},e,{compression:void 0,_encodedBody:void 0}))})},$d=function(){var e=Ri($i().m((function e(t){var n,r,i;return $i().w((function(e){for(;;)switch(e.n){case 0:return n=Od(t.data),e.n=1,ks(n,hs.DEBUG,{rethrow:!0});case 1:if(r=e.v){e.n=2;break}return e.a(2,t);case 2:return e.n=3,r.arrayBuffer();case 3:return e.a(2,Ai({},t,{_encodedBody:{contentType:Fd,body:i=e.v,estimatedSize:i.byteLength}}))}}),e)})));return function(t){return e.apply(this,arguments)}}(),Dd=function(e,t){return Md(e,{_:(new Date).getTime().toString(),ver:hs.JS_SDK_VERSION,compression:t})},Nd=[];Wu&&Nd.push({transport:"fetch",method:function(e){var t,n=qd(e),r=n.url,i=n.encodedBody,o=null!=i?i:{},s=o.contentType,a=o.body,u=o.estimatedSize,l=new Headers;nl(e.headers,(function(e,t){l.append(t,e)})),s&&l.append("Content-Type",s);var c=null;if(Yu){var d=new Yu;c={signal:d.signal,timeout:setTimeout((function(){return d.abort()}),e.timeout)}}Wu(r,Ai({method:(null==e?void 0:e.method)||"GET",headers:l,keepalive:"POST"===e.method&&52428.8>(u||0),body:a,signal:null==(t=c)?void 0:t.signal},e.fetchOptions)).then((function(t){return t.text().then((function(n){var r={statusCode:t.status,text:n};if(200===t.status)try{r.json=JSON.parse(n)}catch(e){Ju.error(e)}null==e.callback||e.callback(r)}))})).catch((function(t){Ju.error(t),null==e.callback||e.callback({statusCode:0,error:t})})).finally((function(){return c?clearTimeout(c.timeout):null}))}}),Gu&&Nd.push({transport:"XHR",method:function(e){var t=new Gu,n=qd(e),r=n.encodedBody;t.open(e.method||"GET",n.url,!0);var i=null!=r?r:{},o=i.contentType,s=i.body;nl(e.headers,(function(e,n){t.setRequestHeader(n,e)})),o&&t.setRequestHeader("Content-Type",o),e.timeout&&(t.timeout=e.timeout),e.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=function(){if(4===t.readyState){var n={statusCode:t.status,text:t.responseText};if(200===t.status)try{n.json=JSON.parse(t.responseText)}catch(e){}null==e.callback||e.callback(n)}},t.send(s)}}),null!=Bu&&Bu.sendBeacon&&Nd.push({transport:"sendBeacon",method:function(e){try{var t=qd(e),n=t.encodedBody,r=Md(t.url,{beacon:"1"}),i=null!=n?n:{},o=i.body;if(!o)return;var s=o instanceof Blob?o:new Blob([o],{type:i.contentType});Bu.sendBeacon(r,s)}catch(e){}}});var Hd=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function jd(e,t,n){return Od({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var Ud={exact:function(e,t){return t.some((function(t){return e.some((function(e){return t===e}))}))},is_not:function(e,t){return t.every((function(t){return e.every((function(e){return t!==e}))}))},regex:function(e,t){return t.some((function(t){return e.some((function(e){return Hd(t,e)}))}))},not_regex:function(e,t){return t.every((function(t){return e.every((function(e){return!Hd(t,e)}))}))},icontains:function(e,t){return t.map(Bd).some((function(t){return e.map(Bd).some((function(e){return t.includes(e)}))}))},not_icontains:function(e,t){return t.map(Bd).every((function(t){return e.map(Bd).every((function(e){return!t.includes(e)}))}))},gt:function(e,t){return t.some((function(t){var n=parseFloat(t);return!isNaN(n)&&e.some((function(e){return n>parseFloat(e)}))}))},lt:function(e,t){return t.some((function(t){var n=parseFloat(t);return!isNaN(n)&&e.some((function(e){return n<parseFloat(e)}))}))}},Bd=function(e){return e.toLowerCase()};function Vd(e,t){return!e||Object.entries(e).every((function(e){var n=e[1],r=null==t?void 0:t[e[0]];if(Ds(r)||js(r))return!1;var i=[String(r)],o=Ud[n.operator];return!!o&&o(n.values,i)}))}var zd="",Wd=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;var Gd={_is_supported:function(){return!!Vu},_error:function(e){Ju.error("cookieStore error: "+e)},_get:function(e){if(Vu){try{for(var t=e+"=",n=Vu.cookie.split(";").filter((function(e){return e.length})),r=0;n.length>r;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(Gd._get(e))||{}}catch(e){}return t},_set:function(e,t,n,r,i){if(Vu)try{var o="",s="",a=function(e,t){if(t){var n=function(e,t){if(void 0===t&&(t=Vu),zd)return zd;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+Bc();!zd&&r--;){var o=n.slice(r).join("."),s=i+"=1;domain=."+o+";path=/";t.cookie=s+";max-age=3",t.cookie.includes(i)&&(t.cookie=s+";max-age=0",zd=o)}return zd}(e);if(!n){var r=function(e){var t=e.match(Wd);return t?t[0]:""}(e);r!==n&&Ju.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}(Vu.location.hostname,r);if(n){var u=new Date;u.setTime(u.getTime()+864e5*n),o="; expires="+u.toUTCString()}i&&(s="; secure");var l=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+a+s;return l.length>3686.4&&Ju.warn("cookieStore warning: large cookie, len="+l.length),Vu.cookie=l,l}catch(e){return}},_remove:function(e,t){if(null!=Vu&&Vu.cookie)try{Gd._set(e,"",-1,t)}catch(e){return}}},Yd=null,Qd={_is_supported:function(){if(!js(Yd))return Yd;var e=!0;if(Ds(ju))e=!1;else try{var t="__mplssupport__";Qd._set(t,"xyz"),'"xyz"'!==Qd._get(t)&&(e=!1),Qd._remove(t)}catch(t){e=!1}return e||Ju.error("localStorage unsupported; falling back to cookie store"),Yd=e,e},_error:function(e){Ju.error("localStorage error: "+e)},_get:function(e){try{return null==ju?void 0:ju.localStorage.getItem(e)}catch(e){Qd._error(e)}return null},_parse:function(e){try{return JSON.parse(Qd._get(e))||{}}catch(e){}return null},_set:function(e,t){try{null==ju||ju.localStorage.setItem(e,JSON.stringify(t))}catch(e){Qd._error(e)}},_remove:function(e){try{null==ju||ju.localStorage.removeItem(e)}catch(e){Qd._error(e)}}},Zd=[Rl,"distinct_id",Ql,Zl,bc,yc,hc],Kd={},Xd={_is_supported:function(){return!0},_error:function(e){Ju.error("memoryStorage error: "+e)},_get:function(e){return Kd[e]||null},_parse:function(e){return Kd[e]||null},_set:function(e,t){Kd[e]=t},_remove:function(e){delete Kd[e]}},Jd=null,ef={_is_supported:function(){if(!js(Jd))return Jd;if(Jd=!0,Ds(ju))Jd=!1;else try{var e="__support__";ef._set(e,"xyz"),'"xyz"'!==ef._get(e)&&(Jd=!1),ef._remove(e)}catch(e){Jd=!1}return Jd},_error:function(e){Ju.error("sessionStorage error: ",e)},_get:function(e){try{return null==ju?void 0:ju.sessionStorage.getItem(e)}catch(e){ef._error(e)}return null},_parse:function(e){try{return JSON.parse(ef._get(e))||null}catch(e){}return null},_set:function(e,t){try{null==ju||ju.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){ef._error(e)}},_remove:function(e){try{null==ju||ju.sessionStorage.removeItem(e)}catch(e){ef._error(e)}}},tf=el("[Stylesheet Loader]"),nf=ju,rf=Vu,of="#020617",sf={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:is.Right,widgetType:rs.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:of,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},af=[is.Center,is.Left,is.Right];function uf(e){if(e.startsWith("#")){var t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function lf(e){var t;void 0===e&&(e=sf.backgroundColor),"#"===e[0]&&(t=uf(e)),e.startsWith("rgb")&&(t=e);var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(n&&(t=uf(n)),!t)return of;var r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),s=parseInt(r[3]);return Math.sqrt(i*i*.299+o*o*.587+s*s*.114)>127.5?of:"white"}return of}var cf=function(e,t,n){var r=Tf(e),i=rf.querySelector("."+r);if(i&&i.shadowRoot)return{shadow:i.shadowRoot,isNewlyCreated:!1};var o=rf.createElement("div");!function(e,t,n){var r=Ai({},sf,n),i=e.style,o=!af.includes(r.position)||t===ss.Widget&&(null==n?void 0:n.widgetType)===rs.Tab;i.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(r.fontFamily)),i.setProperty("--ph-survey-box-padding",r.boxPadding),i.setProperty("--ph-survey-max-width",r.maxWidth),i.setProperty("--ph-survey-z-index",r.zIndex),i.setProperty("--ph-survey-border-color",r.borderColor),o?(i.setProperty("--ph-survey-border-radius",r.borderRadius),i.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(i.setProperty("--ph-survey-border-bottom","none"),i.setProperty("--ph-survey-border-radius",r.borderRadius+" "+r.borderRadius+" 0 0")),i.setProperty("--ph-survey-background-color",r.backgroundColor),i.setProperty("--ph-survey-box-shadow",r.boxShadow),i.setProperty("--ph-survey-disabled-button-opacity",r.disabledButtonOpacity),i.setProperty("--ph-survey-submit-button-color",r.submitButtonColor),i.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||lf(r.submitButtonColor)),i.setProperty("--ph-survey-rating-bg-color",r.ratingButtonColor),i.setProperty("--ph-survey-rating-active-bg-color",r.ratingButtonActiveColor),i.setProperty("--ph-survey-rating-active-text-color",lf(r.ratingButtonActiveColor)),i.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||lf(r.backgroundColor)),i.setProperty("--ph-survey-text-subtle-color",r.textSubtleColor),i.setProperty("--ph-widget-color",r.widgetColor),i.setProperty("--ph-widget-text-color",lf(r.widgetColor)),i.setProperty("--ph-widget-z-index",r.zIndex);var s=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),a=s||r.inputBackground;s||"white"!==r.backgroundColor||(a="#f8f8f8"),i.setProperty("--ph-survey-input-background",a);var u=(null==n?void 0:n.inputTextColor)||lf(a);i.setProperty("--ph-survey-input-text-color",u),i.setProperty("--ph-survey-rating-text-color",u),i.setProperty("--ph-survey-scrollbar-thumb-color",r.scrollbarThumbColor),i.setProperty("--ph-survey-scrollbar-track-color",r.scrollbarTrackColor),i.setProperty("--ph-survey-outline-color",r.outlineColor)}(o,e.type,e.appearance),o.className=r;var s=o.attachShadow({mode:"open"}),a=function(e){var t=function(e,t,n){var r,i=e.createElement("style");return i.innerText=':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483645;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb,var(--ph-survey-rating-active-bg-color) 14%,var(--ph-survey-rating-bg-color))}}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.validation-hint{font-size:12px;margin-top:4px;opacity:.7}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',null!=n&&null!=(r=n.config)&&r.prepare_external_dependency_stylesheet&&(i=n.config.prepare_external_dependency_stylesheet(i)),i||(tf.error("prepare_external_dependency_stylesheet returned null"),null)}(rf,0,e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}(t);if(a){var u=s.querySelector("style");u&&s.removeChild(u),s.appendChild(a)}return rf.body.appendChild(o),{shadow:s,isNewlyCreated:!0}},df=function(e){var t,n,r,i=e.responses,o=e.survey,s=e.surveySubmissionId,a=e.posthog,u=e.isSurveyCompleted,l=e.properties,c=e.surveyLanguage;a?(Tl(o),a.capture(cs.SENT,Ai(((t={})[ds.SURVEY_NAME]=o.name,t[ds.SURVEY_ID]=o.id,t[ds.SURVEY_ITERATION]=o.current_iteration,t[ds.SURVEY_ITERATION_START_DATE]=o.current_iteration_start_date,t[ds.SURVEY_SUBMISSION_ID]=s,t[ds.SURVEY_COMPLETED]=u,t),c&&((n={})[ds.SURVEY_LANGUAGE]=c,n),{sessionRecordingUrl:null==a.get_session_replay_url?void 0:a.get_session_replay_url()},hl(i,o),l,{$set:(r={},r[_l(o,"responded")]=!0,r)})),u&&(nf.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:o.id}})),Pf(o))):bl.error("[survey sent] event not captured, PostHog instance not found.")},ff=function(e,t,n){var r,i,o,s;return Ai(((r={})[ds.SURVEY_NAME]=e.name,r[ds.SURVEY_ID]=e.id,r[ds.SURVEY_ITERATION]=e.current_iteration,r[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,r[ds.SURVEY_PARTIALLY_COMPLETED]=(void 0===(s=null==t?void 0:t.responses)&&(s={}),Object.values(s).some((function(e){return!Us(e)}))),r),(null==t?void 0:t.surveyLanguage)&&((i={})[ds.SURVEY_LANGUAGE]=t.surveyLanguage,i),((o={sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url()})[ds.SURVEY_SUBMISSION_ID]=null==t?void 0:t.surveySubmissionId,o),hl(null==t?void 0:t.responses,e))},pf=function(e,t,n,r){var i,o;if(t){if(!n){var s=Ef(e);t.capture(cs.DISMISSED,Ai({},ff(e,s,t),r&&((i={})[ds.SURVEY_LANGUAGE]=r,i),{$set:(o={},o[_l(e,"dismissed")]=!0,o)})),Pf(e),Tl(e),nf.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else bl.error("[survey dismissed] event not captured, PostHog instance not found.")},hf=function(e,t){if(t){var n=function(e){return Cl("abandonedSurvey_",e)}(e);try{if("true"===localStorage.getItem(n))return}catch(e){return}var r=Ef(e);if(r){try{localStorage.setItem(n,"true")}catch(e){}t.capture(cs.ABANDONED,ff(e,r,t),{transport:"sendBeacon"})}}else bl.error("[survey abandoned] event not captured, PostHog instance not found.")},_f=function(e){return e.map((function(e){return{sort:Math.floor(10*Math.random()),value:e}})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.value}))},vf=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))?t.reverse():t},gf=function(e){return e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?vf(e.questions,_f(e.questions)):e.questions},mf=function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!function(e){var t,n;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0}(e))||e.schedule===ls||Cf(e)},yf=function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach((function(e){e.__e=!0,fo(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+Xi++,t.__={isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:function(){},isPopup:!0,onPreviewSubmit:function(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null},t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}(),bf=function(){return Wo(yf)},wf=function(e){var t=e.children,n=e.style;return function(e,t,n){var r,i,o,s,a=ro({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&null!=s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?ji.call(arguments,2):n),so(e.type,a,r||e.key,i||e.ref,null)}(e.component,e.renderAsHtml?{dangerouslySetInnerHTML:{__html:t},style:n}:{children:t,style:n})};function Sf(e){var t,n,r;if(null==(t=e.conditions)||!t.url)return!0;var i=null==nf||null==(n=nf.location)?void 0:n.href;if(!i)return!1;var o=[e.conditions.url],s=function(e){return null!=e?e:"icontains"}(null==(r=e.conditions)?void 0:r.urlMatchType);return Ud[s](o,[i])}var xf=function(e){var t=""+El+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+El+e.id+"_"+e.current_iteration),t},kf=function(e,t){try{localStorage.setItem(xf(e),JSON.stringify(t))}catch(e){bl.error("Error setting in-progress survey state in localStorage",e)}},Ef=function(e){try{var t=localStorage.getItem(xf(e));if(t)return JSON.parse(t)}catch(e){bl.error("Error getting in-progress survey state from localStorage",e)}return null},Cf=function(e){var t=Ef(e);return!Us(null==t?void 0:t.surveySubmissionId)},Pf=function(e){try{localStorage.removeItem(xf(e))}catch(e){bl.error("Error clearing in-progress survey state from localStorage",e)}};function Tf(e,t){void 0===t&&(t=!1);var n="PostHogSurvey-"+e.id;return t?"."+n:n}function If(e,t,n){if(void 0===t&&(t=is.Right),e===ss.ExternalSurvey)return{};switch(t){case is.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case is.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case is.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case is.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case is.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case is.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case is.Left:return{left:"30px"};case is.Center:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===ss.Widget&&n===rs.Tab?"60px":"30px"}}}var Ff=0;function Lf(e,t,n,r,i,o){t||(t={});var s,a,u=t;if("ref"in u)for(a in u={},t)"ref"==a?s=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ff,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===u[a]&&(u[a]=s[a]);return Ui.vnode&&Ui.vnode(l),l}var Rf=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Mf=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Of=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Af=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),qf=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),$f=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Lf("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Df=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Lf("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Nf=function(e){var t=(void 0===e?{}:e).fill,n=void 0===t?"currentColor":t;return Lf("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:n,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Lf("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Lf("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:n})]})},Hf=Lf("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Lf("g",{"clip-path":"url(#clip0_2415_6911)",children:[Lf("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Lf("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Lf("g",{mask:"url(#mask0_2415_6911)",children:[Lf("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Lf("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Lf("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Lf("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Lf("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Lf("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Lf("defs",{children:Lf("clipPath",{id:"clip0_2415_6911",children:Lf("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function jf(e){var t=e.urlParams,n=t?Object.entries(t).map((function(e){var t=e[1];return encodeURIComponent(e[0])+"="+encodeURIComponent(t)})).join("&"):"";return Lf("a",{href:"https://posthog.com/surveys"+(n?"?"+n:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Hf]})}function Uf(e){var t=e.text,n=e.submitDisabled,r=e.appearance,i=e.onSubmit,o=e.link,s=e.onPreviewSubmit,a=e.skipSubmitButton,u=Wo(yf).isPreviewMode;return Lf("div",{className:"bottom-section",children:[!a&&Lf("button",{className:"form-submit",disabled:n,"aria-label":"Submit survey",type:"button",onClick:function(){o&&(null==ju||ju.open(o)),u?null==s||s():i()},children:t}),!r.whiteLabel&&Lf(jf,{urlParams:{utm_source:"survey-footer"}})]})}function Bf(e){var t=e.question,n=e.forceDisableHtml;return Lf("div",{class:"question-header",children:[Lf(t.type===as.Open?"label":"h3",{className:"survey-question",htmlFor:e.htmlFor,children:t.question}),t.description&&wf({component:oo("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!n&&"text"!==t.descriptionContentType})]})}function Vf(e){return Lf("button",{className:"form-cancel",onClick:e.onClick,disabled:Wo(yf).isPreviewMode,"aria-label":"Close survey",type:"button",children:Nf({fill:"black"})})}Lf("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Lf("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var zf=ju;function Wf(e){var t=e.header,n=e.description,r=e.contentType,i=e.forceDisableHtml,o=e.appearance,s=e.onClose,a=Wo(yf).isPopup;return Bo((function(){var e=function(e){"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),s())};return cl(zf,"keydown",e),function(){zf.removeEventListener("keydown",e)}}),[s]),Lf("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[a&&!0!==o.hideCancelButton&&Lf(Vf,{onClick:function(){return s()}}),Lf("h3",{className:"thank-you-message-header",children:t}),n&&wf({component:oo("p",{className:"thank-you-message-body"}),children:n,renderAsHtml:!i&&"text"!==r}),a&&Lf(Uf,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:function(){return s()}})]})}var Gf=function(e){return Os(e)&&e.every((function(e){return Ns(e)}))};function Yf(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit,s=e.displayQuestionIndex,a=e.initialValue,u=bf().isPreviewMode,l=Vo(null),c=Uo((function(){return Ns(a)?a:""})),d=c[0],f=c[1];Bo((function(){setTimeout((function(){var e;u||null==(e=l.current)||e.focus()}),100)}),[u]);var p="surveyQuestion"+s,h=zo((function(){return function(e,t,n){var r,i,o=e.trim();if(!n&&""===o)return"This field is required";if(""===o)return!1;if(t&&t.length>0)for(var s,a=Oi(t);!(s=a()).done;){var u=s.value;switch(u.type){case vs.MinLength:if(void 0!==u.value&&u.value>o.length)return null!==(r=u.errorMessage)&&void 0!==r?r:"Please enter at least "+u.value+" characters";break;case vs.MaxLength:if(void 0!==u.value&&o.length>u.value)return null!==(i=u.errorMessage)&&void 0!==i?i:"Please enter no more than "+u.value+" characters"}}return!1}(d,t.validation,t.optional)}),[d,t.validation,t.optional]),_=uu(t.validation,vs.MinLength),v=uu(t.validation,vs.MaxLength),g=zo((function(){return function(e,t){var n=1===e?void 0:e;return n&&t?"Enter "+n+"-"+t+" characters":n?"Enter at least "+n+" "+(1===n?"character":"characters"):t?"Maximum "+t+" "+(1===t?"character":"characters"):void 0}(_,v)}),[_,v]),m=function(){h||i(d.trim())},y=function(){h||o(d.trim())};return Lf(ao,{children:[Lf("div",{className:"question-container",children:[Lf(Bf,{question:t,forceDisableHtml:n,htmlFor:p}),Lf("textarea",{ref:l,id:p,rows:4,placeholder:null==r?void 0:r.placeholder,minLength:_,maxLength:v,onInput:function(e){f(e.currentTarget.value),e.stopPropagation()},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||h||(e.preventDefault(),u?y():m())},value:d}),g&&Lf("div",{className:"validation-hint",children:g})]}),Lf(Uf,{text:t.buttonText||"Submit",submitDisabled:!!h,appearance:r,onSubmit:m,onPreviewSubmit:y})]})}function Qf(e){var t=e.question,n=e.appearance,r=e.onSubmit,i=e.onPreviewSubmit;return Lf(ao,{children:[Lf("div",{className:"question-container",children:Lf(Bf,{question:t,forceDisableHtml:e.forceDisableHtml})}),Lf(Uf,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:n,onSubmit:function(){return r("link clicked")},onPreviewSubmit:function(){return i("link clicked")}})]})}function Zf(e){var t,n=e.question,r=e.forceDisableHtml,i=e.displayQuestionIndex,o=e.appearance,s=e.onSubmit,a=e.onPreviewSubmit,u=e.initialValue,l=n.scale,c=10===n.scale?0:1,d=Uo((function(){return Bs(u)?u:Os(u)&&u.length>0&&Bs(parseInt(u[0]))?parseInt(u[0]):Ns(u)&&Bs(parseInt(u))?parseInt(u):null})),f=d[0],p=d[1],h="emoji"===n.display&&2===n.scale,_=bf().isPreviewMode,v=function(e){return _?a(e):s(e)};return Lf(ao,{children:[Lf("div",{className:"question-container",children:[Lf(Bf,{question:n,forceDisableHtml:r}),Lf("div",{className:"rating-section",children:[Lf("div",{className:"rating-options",children:["emoji"===n.display&&Lf("div",{className:"rating-options-emoji"+(h?" rating-options-emoji-2":""),children:null==(t=np[n.scale])?void 0:t.map((function(e,t){return Lf("button",{"aria-label":"Rate "+(t+1),className:"ratings-emoji question-"+i+"-rating-"+t+" "+(t+1===f?"rating-active":""),value:t+1,type:"button",onClick:function(){var e=t+1;p(e),n.skipSubmitButton&&v(e)},children:e},t)}))}),"number"===n.display&&Lf("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(l-c+1)+", minmax(0, 1fr))"},children:rp(n.scale).map((function(e,t){return Lf(Kf,{displayQuestionIndex:i,active:f===e,appearance:o,num:e,setActiveNumber:function(e){p(e),n.skipSubmitButton&&v(e)}},t)}))})]}),!h&&Lf("div",{className:"rating-text",children:[Lf("div",{children:n.lowerBoundLabel}),Lf("div",{children:n.upperBoundLabel})]})]})]}),Lf(Uf,{text:n.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:js(f)&&!n.optional,appearance:o,onSubmit:function(){return s(f)},onPreviewSubmit:function(){return a(f)},skipSubmitButton:n.skipSubmitButton})]})}function Kf(e){var t=e.num,n=e.setActiveNumber;return Lf("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+e.displayQuestionIndex+"-rating-"+t+" "+(e.active?"rating-active":""),type:"button",onClick:function(){n(t)},children:t})}function Xf(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a=e.initialValue,u=Vo(null),l=zo((function(){return function(e){if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=vf(t,_f(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r}(t)}),[t]),c=Uo((function(){return function(e,t){return Ns(e)||Gf(e)?e:t===as.SingleChoice?null:[]}(a,t.type)})),d=c[0],f=c[1],p=Uo((function(){return function(e,t){if(Ns(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Gf(e)){var n=e.find((function(e){return!t.includes(e)}));if(n)return{isSelected:!0,inputValue:n}}return{isSelected:!1,inputValue:""}}(a,l)})),h=p[0],_=p[1],v=bf().isPreviewMode,g=t.type===as.SingleChoice,m=t.type===as.MultipleChoice,y=t.skipSubmitButton&&g&&!t.hasOpenChoice,b=function(e,t){if(t){var n=!h.isSelected;return _((function(e){return Ai({},e,{isSelected:n,inputValue:n?e.inputValue:""})})),g&&f(""),void(n&&setTimeout((function(){var e;return null==(e=u.current)?void 0:e.focus()}),75))}if(g)return f(e),_((function(e){return Ai({},e,{isSelected:!1,inputValue:""})})),void(y&&(o(e),v&&s(e)));m&&Os(d)&&(d.includes(e)?f(d.filter((function(t){return t!==e}))):f([].concat(d,[e])))},w=function(e){e.stopPropagation();var t=e.currentTarget.value;_((function(e){return Ai({},e,{inputValue:t})})),g&&f(t)},S=function(e){e.stopPropagation(),"Enter"!==e.key||x()||(e.preventDefault(),k()),"Escape"===e.key&&(e.preventDefault(),_((function(e){return Ai({},e,{isSelected:!1,inputValue:""})})),g&&f(null))},x=function(){return!(t.optional||!js(d)&&(!Os(d)||h.isSelected||0!==d.length)&&(!h.isSelected||""!==h.inputValue.trim()))},k=function(){h.isSelected&&m?Os(d)&&(v?s([].concat(d,[h.inputValue])):o([].concat(d,[h.inputValue]))):v?s(d):o(d)};return Lf(ao,{children:[Lf("div",{className:"question-container",children:[Lf(Bf,{question:t,forceDisableHtml:n}),Lf("fieldset",{className:"multiple-choice-options limit-height",children:[Lf("legend",{className:"sr-only",children:m?" Select all that apply":" Select one"}),l.map((function(e,n){var i=!!t.hasOpenChoice&&n===t.choices.length-1,o="surveyQuestion"+r+"Choice"+n,s=o+"Open",a=i?h.isSelected:g?d===e:Os(d)&&d.includes(e);return Lf("label",{className:i?"choice-option-open":"",children:[Lf("div",{className:"response-choice",children:[Lf("input",{type:g?"radio":"checkbox",name:o,checked:a,onChange:function(){return b(e,i)},id:o,"aria-controls":s}),Lf("span",{children:i?e+":":e})]}),i&&Lf("input",{type:"text",ref:u,id:s,name:"question"+r+"Open",value:h.inputValue,onKeyDown:S,onInput:w,onClick:function(t){h.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},n)}))]})]}),Lf(Uf,{text:t.buttonText||"Submit",submitDisabled:x(),appearance:i,onSubmit:k,onPreviewSubmit:k,skipSubmitButton:y})]})}var Jf=[1,2,3,4,5],ep=[1,2,3,4,5,6,7],tp=[0,1,2,3,4,5,6,7,8,9,10],np={2:[$f,Df],3:[Of,Mf,Rf],5:[Af,Of,Mf,Rf,qf]};function rp(e){switch(e){case 5:default:return Jf;case 7:return ep;case 10:return tp}}var ip=el("[Surveys]");function op(e,t,n){var r,i=e.questions[t],o=t+1;if(null==(r=i.branching)||!r.type)return t===e.questions.length-1?us.End:o;if(i.branching.type===us.End)return us.End;if(i.branching.type===us.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===us.ResponseBased){if(i.type===as.SingleChoice){var s,a=i.choices.indexOf(""+n);if(-1===a&&i.hasOpenChoice&&(a=i.choices.length-1),null!=(s=i.branching)&&null!=(s=s.responseValues)&&s.hasOwnProperty(a)){var u=i.branching.responseValues[a];return Number.isInteger(u)?u:u===us.End?us.End:o}}else if(i.type===as.Rating){var l;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");var c=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(n,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===us.End?us.End:o}}return o}return ip.warn("Falling back to next question index due to unexpected branching type"),o}var sp="https?://(.*)",ap=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],up=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"].concat(ap),lp="<masked>",cp=["li_fat_id"];function dp(e,t,n){if(!Vu)return{};var r,i=t?[].concat(ap,n||[]):[],o=fp(Qc(Vu.URL,i,lp),e),s=(r={},nl(cp,(function(e){var t=Gd._get(e);r[e]=t||null})),r);return rl(s,o)}function fp(e,t){var n=up.concat(t||[]),r={};return nl(n,(function(t){var n=Yc(e,t);r[t]=n||null})),r}function pp(e){var t=function(e){return e?0===e.search(sp+"google.([^/?]*)")?"google":0===e.search(sp+"bing.com")?"bing":0===e.search(sp+"yahoo.com")?"yahoo":0===e.search(sp+"duckduckgo.com")?"duckduckgo":null:null}(e),n="yahoo"!=t?"q":"p",r={};if(!js(t)){r.$search_engine=t;var i=Vu?Yc(Vu.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function hp(){return navigator.language||navigator.userLanguage}var _p="$direct";function vp(){return(null==Vu?void 0:Vu.referrer)||_p}function gp(e,t){var n=e?[].concat(ap,t||[]):[],r=null==zu?void 0:zu.href.substring(0,1e3);return{r:vp().substring(0,1e3),u:r?Qc(r,n,lp):void 0}}function mp(e){var t,n=e.r,r=e.u,i={$referrer:n,$referring_domain:null==n?void 0:n==_p?_p:null==(t=Gc(n))?void 0:t.host};if(r){i.$current_url=r;var o=Gc(r);i.$host=null==o?void 0:o.host,i.$pathname=null==o?void 0:o.pathname;var s=fp(r);rl(i,s)}if(n){var a=pp(n);rl(i,a)}return i}function yp(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function bp(){try{return(new Date).getTimezoneOffset()}catch(e){return}}var wp=el("[SurveyTranslations]");function Sp(e,t){var n=function(e){return function(e,t){var n=e.storedPersonProperties,r=e.locale,i=vl(e.overrideLanguage);if(i)return null==t||t.info("Using override display language: "+i),i;var o=function(e){return e&&"object"==typeof e&&"language"in e?vl(e.language):null}(n);if(o)return null==t||t.info("Using person property language: "+o),o;var s=vl(r);return s?(null==t||t.info("Using detected locale: "+s),s):(null==t||t.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:As(e.get_property)?e.get_property(oc):void 0,locale:hp()},wp)}(t);if(!n)return wp.info("No user language detected"),{survey:e,language:null};var r=yl(e,n,wp);return{survey:r.survey,language:r.matchedKey}}var xp=ju,kp=Vu,Ep="ph:show_survey_widget",Cp="PHWidgetSurveyClickListener";function Pp(e,t){try{var n=e.getBoundingClientRect(),r=xp.innerHeight,i=xp.innerWidth,o=n.left+n.width/2-t/2;o+t>i-20&&(o=i-t-20),20>o&&(o=20);var s=r-n.bottom,a=250>s&&n.top>s;return{position:"fixed",top:a?"auto":n.bottom+12+"px",left:o+"px",right:"auto",bottom:a?r-n.top+12+"px":"auto",zIndex:sf.zIndex}}catch(e){return bl.warn("Failed to calculate trigger position:",e),null}}var Tp=function(){function e(e){var t=this;this._surveyTimeouts=new Map,this._widgetSelectorListeners=new Map,this._prefillHandledSurveys=new Set,this.handlePageUnload=function(){var e=t._posthog.get_property(ac);if(e)for(var n,r=Oi(e);!(n=r()).done;){var i=n.value;Cf(i)&&hf(i,t._posthog)}},this.handlePopoverSurvey=function(e,n){var r,i,o,s,a=t._translateSurveyForRendering(e),u=a.survey,l=a.language,c=null!=n&&n.position||null!=n&&n.selector?Ai({},u,{appearance:Ai({},u.appearance,n.position&&{position:n.position},n.selector&&{widgetSelector:n.selector})}):u;t._clearSurveyTimeout(c.id);var d=null!=n?n:{},f=d.properties,p=d.initialResponses,h=!(!p||0>=Object.keys(p).length)&&t._handleInitialResponses(c,p,f,l);if(!h||null!=(r=c.appearance)&&r.displayThankYouMessage){t._addSurveyToFocus(c);var _={};if((null==(i=c.appearance)?void 0:i.position)===is.NextToTrigger&&null!=(o=c.appearance)&&o.widgetSelector){var v,g=kp.querySelector(c.appearance.widgetSelector);g&&(_=Pp(g,parseInt((null==(v=c.appearance)?void 0:v.maxWidth)||sf.maxWidth))||{})}var m=(null==(s=c.appearance)?void 0:s.surveyPopupDelaySeconds)||0,y=cf(c,t._posthog).shadow,b={posthog:t._posthog,survey:c,removeSurveyFromFocus:t._removeSurveyFromFocus,properties:f,style:_,isSurveyCompleted:h,skipShownEvent:null==n?void 0:n.skipShownEvent,surveyLanguage:l};if(0>=m)return Po(Lf(Rp,Ai({},b)),y);var w=setTimeout((function(){if(t._surveyTimeouts.delete(c.id),!Sf(c))return t._removeSurveyFromFocus(c);Po(Lf(Rp,Ai({},b,{survey:Ai({},c,{appearance:Ai({},c.appearance,{surveyPopupDelaySeconds:0})})})),y)}),1e3*m);t._surveyTimeouts.set(c.id,w)}},this._handleWidget=function(e){var n=t._translateSurveyForRendering(e),r=n.survey,i=n.language,o=cf(r,t._posthog),s=o.shadow;o.isNewlyCreated&&Po(Lf(Op,{posthog:t._posthog,survey:r,surveyLanguage:i},e.id),s)},this._removeWidgetSelectorListener=function(e){t._removeSurveyFromDom(e);var n=t._widgetSelectorListeners.get(e.id);n&&(n.element.removeEventListener("click",n.listener),n.element.removeAttribute(Cp),t._widgetSelectorListeners.delete(e.id),bl.info("Removed click listener for survey "+e.id))},this._manageWidgetSelectorListener=function(e,n){var r=kp.querySelector(n),i=t._widgetSelectorListeners.get(e.id);if(r){if(t._handleWidget(e),i){if(r===i.element)return;bl.info("Selector element changed for survey "+e.id+". Re-attaching listener."),t._removeWidgetSelectorListener(e)}if(!r.hasAttribute(Cp)){var o=function(t){var n,r;t.stopPropagation();var i=(null==(n=e.appearance)?void 0:n.position)===is.NextToTrigger?Pp(t.currentTarget,parseInt((null==(r=e.appearance)?void 0:r.maxWidth)||sf.maxWidth)):{};xp.dispatchEvent(new CustomEvent(Ep,{detail:{surveyId:e.id,position:i}}))};cl(r,"click",o),r.setAttribute(Cp,"true"),t._widgetSelectorListeners.set(e.id,{element:r,listener:o,survey:e}),bl.info("Attached click listener for feedback button survey "+e.id)}}else i&&t._removeWidgetSelectorListener(e)},this.renderPopover=function(e){var n=t._translateSurveyForRendering(e),r=n.survey,i=n.language,o=cf(r,t._posthog).shadow;Po(Lf(Rp,{posthog:t._posthog,survey:r,removeSurveyFromFocus:t._removeSurveyFromFocus,surveyLanguage:i}),o)},this.renderSurvey=function(e,n,r){var i,o=t._translateSurveyForRendering(e),s=o.survey,a=o.language,u=!1;null!=(i=t._posthog.config)&&null!=(i=i.surveys)&&i.prefillFromUrl&&(u=t._handleUrlPrefill(s,a)),Po(Lf(Rp,{posthog:t._posthog,survey:s,removeSurveyFromFocus:t._removeSurveyFromFocus,isPopup:!1,properties:r,isSurveyCompleted:u,surveyLanguage:a}),n)},this.getActiveMatchingSurveys=function(e,n){var r;void 0===n&&(n=!1),null==(r=t._posthog)||null==(r=r.surveys)||r.getSurveys((function(n){var r=n.filter((function(e){return t.checkSurveyEligibility(e).eligible&&t._isSurveyConditionMatched(e)&&t._hasActionOrEventTriggeredSurvey(e)&&t._checkFlags(e)}));e(r)}),n)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((function(e){var n=e.filter((function(e){return e.type===ss.Popover||e.type===ss.Widget})),r=t._sortSurveysByAppearanceDelay(n),i=new Set;r.forEach((function(e){if(e.type===ss.Widget){var n,r,o,s;if((null==(n=e.appearance)?void 0:n.widgetType)===rs.Tab)return void t._handleWidget(e);(null==(r=e.appearance)?void 0:r.widgetType)===rs.Selector&&null!=(o=e.appearance)&&o.widgetSelector&&(i.add(e.id),t._manageWidgetSelectorListener(e,null==(s=e.appearance)?void 0:s.widgetSelector))}js(t._surveyInFocus)&&e.type===ss.Popover&&t.handlePopoverSurvey(e)})),t._widgetSelectorListeners.forEach((function(e){var n=e.survey;i.has(n.id)||t._removeWidgetSelectorListener(n)}))}),e)},this._addSurveyToFocus=function(e){js(t._surveyInFocus)||bl.error("Survey "+t._surveyInFocus+" already in focus. Cannot add survey "+e.id+"."),t._surveyInFocus=e.id},this._removeSurveyFromFocus=function(e){t._surveyInFocus!==e.id&&bl.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),t._clearSurveyTimeout(e.id),t._surveyInFocus=null,t._removeSurveyFromDom(e)},this._posthog=e,this._surveyInFocus=null}var t=e.prototype;return t._clearSurveyTimeout=function(e){var t=this._surveyTimeouts.get(e);t&&(clearTimeout(t),this._surveyTimeouts.delete(e))},t.cancelSurvey=function(e){this._surveyTimeouts.has(e)&&(bl.info("Cancelled pending survey "+e),this._clearSurveyTimeout(e),this._surveyInFocus===e&&(this._surveyInFocus=null))},t._sortSurveysByAppearanceDelay=function(e){return e.sort((function(e,t){var n,r,i=Cf(e),o=Cf(t);if(i&&!o)return-1;if(!i&&o)return 1;var s=e.schedule===ls,a=t.schedule===ls;return s&&!a?1:!s&&a?-1:((null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0)-((null==(r=t.appearance)?void 0:r.surveyPopupDelaySeconds)||0)}))},t._translateSurveyForRendering=function(e){return Sp(e,this._posthog)},t._handleUrlPrefill=function(e,t){if(this._prefillHandledSurveys.has(e.id))return!1;var n=function(e){var t={},n=!1,r=e.replace(/^\?/,"");if(!r)return{params:t,autoSubmit:n};for(var i,o=Oi(r.split("&"));!(i=o()).done;){var s=i.value.split("="),a=s[0],u=s[1];if(a&&!Ds(u)){var l=decodeURIComponent(a),c=decodeURIComponent(u);if("auto_submit"!==l||"true"!==c){var d=l.match(/^q(\d+)$/);if(d){var f=parseInt(d[1],10);t[f]||(t[f]=[]),t[f].push(c)}}else n=!0}}return{params:t,autoSubmit:n}}(xp.location.search),r=n.params;if(0===Object.keys(r).length)return!1;bl.info("[Survey Prefill] Detected URL prefill parameters");var i=this._processPrefillData(e,r,t);if(!i)return!1;var o=i.responses,s=i.submissionId,a=i.isSurveyCompleted,u=i.skippedResponses;return(Object.keys(u).length>0&&e.enable_partial_responses||a)&&df({responses:a?o:u,survey:e,surveySubmissionId:s,posthog:this._posthog,isSurveyCompleted:a,surveyLanguage:t}),this._prefillHandledSurveys.add(e.id),a},t._handleInitialResponses=function(e,t,n,r){for(var i={},o=0,s=Object.entries(t);s.length>o;o++){var a=s[o],u=a[1];i[parseInt(a[0])]=Os(u)?u.map(String):[String(u)]}bl.info("[Survey] Processing initial responses");var l=this._processPrefillData(e,i,r);if(!l)return!1;var c=l.isSurveyCompleted;return df({responses:l.responses,survey:e,surveySubmissionId:l.submissionId,posthog:this._posthog,isSurveyCompleted:c,properties:n,surveyLanguage:r}),c},t._processPrefillData=function(e,t,n){try{var r=function(e,t){var n={};return e.questions.forEach((function(e,r){if(t[r]&&e.id){var i=t[r],o=fl(e.id);try{switch(e.type){case as.SingleChoice:if(!e.choices||0===e.choices.length)return void Ju.warn("[Survey Prefill] Question "+r+" has no choices");var s=parseInt(i[0],10);if(isNaN(s)||0>s||s>=e.choices.length)return void Ju.warn("[Survey Prefill] Invalid choice index for q"+r+": "+i[0]);n[o]=e.choices[s];break;case as.MultipleChoice:if(!e.choices||0===e.choices.length)return void Ju.warn("[Survey Prefill] Question "+r+" has no choices");var a=i.map((function(e){return parseInt(e,10)})).filter((function(t){return!isNaN(t)&&t>=0&&e.choices.length>t}));if(0===a.length)return void Ju.warn("[Survey Prefill] No valid choices for q"+r);var u=[].concat(new Set(a.map((function(t){return e.choices[t]}))));a.length>u.length&&Ju.warn("[Survey Prefill] Removed duplicate choices for q"+r),n[o]=u;break;case as.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||0>l||l>c)return void Ju.warn("[Survey Prefill] Invalid rating for q"+r+": "+i[0]+" (scale: 0-"+c+")");n[o]=l;break;default:Ju.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){Ju.error("[Survey Prefill] Error converting q"+r+":",e)}}})),n}(e,t);if(0===Object.keys(r).length)return bl.warn("[Survey Prefill] No valid responses after conversion"),null;var i=Bc(),o=Object.keys(t).map((function(e){return parseInt(e,10)})),s=function(e,t,n){for(var r=0,i={},o=e.questions.length+1;e.questions.length>r&&o>0&&t.includes(r);){var s=e.questions[r];if(!s||!("skipSubmitButton"in s)||!s.skipSubmitButton)break;if(s.id){var a=fl(s.id);Ds(n[a])||(i[a]=n[a])}var u=op(e,r,s.id?n[fl(s.id)]:null);if(u===us.End)return{startQuestionIndex:e.questions.length,skippedResponses:i};r=u}return{startQuestionIndex:r,skippedResponses:i}}(e,o,r),a=s.startQuestionIndex,u=s.skippedResponses,l=a>=e.questions.length;return kf(e,{surveySubmissionId:i,responses:r,lastQuestionIndex:a,surveyLanguage:n}),bl.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:r,submissionId:i,startQuestionIndex:a,isSurveyCompleted:l,skippedResponses:u}}catch(e){return bl.error("[Survey Prefill] Error handling prefill:",e),null}},t._isSurveyFeatureFlagEnabled=function(e,t){var n;if(void 0===t&&(t=void 0),!e)return!0;var r,i=!(null==(n=this._posthog.featureFlags)||!n.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),o=!0;return t&&(o=(null==(r=this._posthog.featureFlags)?void 0:r.getFeatureFlag(e,{send_event:!1}))===t||"any"===t),i&&o},t._isSurveyConditionMatched=function(e){return!e.conditions||Sf(e)&&function(e){var t,n;return function(e,t){var n,r,i;if(!e||0===e.length)return!0;if(!Zu)return!1;var o=nu(Zu,{userAgentDataPlatform:null==Bu||null==(n=Bu.userAgentData)?void 0:n.platform,maxTouchPoints:null==Bu?void 0:Bu.maxTouchPoints,screenWidth:null==ju||null==(r=ju.screen)?void 0:r.width,screenHeight:null==ju||null==(i=ju.screen)?void 0:i.height,devicePixelRatio:null==ju?void 0:ju.devicePixelRatio});return Ud[null!=t?t:"icontains"](e,[o])}(null==(t=e.conditions)?void 0:t.deviceTypes,null==(n=e.conditions)?void 0:n.deviceTypesMatchType)}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==rf||!rf.querySelector(e.conditions.selector))}(e)},t._internalFlagCheckSatisfied=function(e){return mf(e)||this._isSurveyFeatureFlagEnabled(e.internal_targeting_flag_key)||Cf(e)},t.checkSurveyEligibility=function(e){var t,n,r={eligible:!0,reason:void 0};if(!wl(e))return r.eligible=!1,r.reason="Survey is not running. It was completed on "+e.end_date,r;if(!Il.includes(e.type))return r.eligible=!1,r.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",r;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this._isSurveyFeatureFlagEnabled(e.linked_flag_key,i)?this._isSurveyFeatureFlagEnabled(e.targeting_flag_key)?this._internalFlagCheckSatisfied(e)?function(e,t){if(!e||!t)return!0;var n="string"==typeof t?new Date(t):t,r=new Date,i=Math.abs(r.getTime()-n.getTime());return Math.ceil(i/864e5)>e}(null==(n=e.conditions)?void 0:n.seenSurveyWaitPeriodInDays,Qd._get("lastSeenSurveyDate"))?function(e){return!!Qd._get(Pl(e))&&!mf(e)}(e)?(r.eligible=!1,r.reason="Survey has already been seen and it can't be activated again",r):r:(r.eligible=!1,r.reason="Survey wait period has not passed",r):(r.eligible=!1,r.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",r):(r.eligible=!1,r.reason="Survey targeting feature flag is not enabled",r):(r.eligible=!1,r.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",r)},t._hasActionOrEventTriggeredSurvey=function(e){var t;if(!Sl(e)&&!xl(e))return!0;var n=null==(t=this._posthog.surveys)||null==(t=t._surveyEventReceiver)?void 0:t.getSurveys();return!(null==n||!n.includes(e.id))},t._checkFlags=function(e){var t,n=this;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((function(e){var t=e.value;return!e.key||!t||n._isSurveyFeatureFlagEnabled(t)}))},t._removeSurveyFromDom=function(e){try{var t=kp.querySelector(Tf(e,!0));null!=t&&t.shadowRoot&&Po(null,t.shadowRoot),null==t||t.remove()}catch(t){bl.warn("Failed to remove survey "+e.id+" from DOM:",t)}},t.getTestAPI=function(){return{addSurveyToFocus:this._addSurveyToFocus,removeSurveyFromFocus:this._removeSurveyFromFocus,surveyInFocus:this._surveyInFocus,surveyTimeouts:this._surveyTimeouts,handleWidget:this._handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this._manageWidgetSelectorListener,sortSurveysByAppearanceDelay:this._sortSurveysByAppearanceDelay,checkFlags:this._checkFlags.bind(this),isSurveyFeatureFlagEnabled:this._isSurveyFeatureFlagEnabled.bind(this)}},e}();function Ip(e,t){if(kp&&xp){var n,r=new Tp(e);if(e.config.disable_surveys_automatic_display)return bl.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),r;if(!1===t)return bl.info("There are no surveys to load or Surveys is disabled in the project settings."),r;r.callSurveysAndEvaluateDisplayLogic(!0);var i=function(){Ds(n)&&(n=setInterval((function(){r.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),cl(kp,"visibilitychange",(function(){kp.hidden?Ds(n)||(clearInterval(n),n=void 0):(r.callSurveysAndEvaluateDisplayLogic(!1),i())})),r}}function Fp(e){var t=e.survey,n=e.removeSurveyFromFocus,r=void 0===n?function(){}:n,i=e.setSurveyVisible,o=e.isPreviewMode,s=void 0!==o&&o;Bo((function(){var e;if(!s&&null!=(e=t.conditions)&&e.url){var n=function(){var e,n=t.type===ss.Widget,o=Sf(t),s=(null==(e=t.appearance)?void 0:e.widgetType)===rs.Tab&&n;if(!o)return bl.info("Hiding survey "+t.id+" because URL does not match"),i(!1),r(t);s&&(bl.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),i(!0))};cl(xp,"popstate",n),cl(xp,"hashchange",n);var o=xp.history.pushState,a=xp.history.replaceState;return xp.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];o.apply(this,t),n()},xp.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];a.apply(this,t),n()},function(){xp.removeEventListener("popstate",n),xp.removeEventListener("hashchange",n),xp.history.pushState=o,xp.history.replaceState=a}}}),[s,t,r,i])}function Lp(e){switch(void 0===e&&(e=os.Right),e){case os.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case os.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case os.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function Rp(e){var t,n,r,i,o,s,a=e.survey,u=e.forceDisableHtml,l=e.posthog,c=e.style,d=void 0===c?{}:c,f=e.previewPageIndex,p=e.removeSurveyFromFocus,h=void 0===p?function(){}:p,_=e.isPopup,v=void 0===_||_,g=e.onPreviewSubmit,m=void 0===g?function(){}:g,y=e.onPopupSurveyDismissed,b=void 0===y?function(){}:y,w=e.onCloseConfirmationMessage,S=void 0===w?function(){}:w,x=e.properties,k=e.isSurveyCompleted,E=e.skipShownEvent,C=e.surveyLanguage,P=Vo(null),T=Number.isInteger(f),I=null!=(t=a.appearance)&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,F=function(e,t,n,r,i,o,s,a,u){var l=Uo(r||0===n||e.type===ss.ExternalSurvey),c=l[0],d=l[1],f=Uo(!1),p=f[0],h=f[1],_=function(){var t=function(){o&&i(e),d(!1)};kp.startViewTransition?kp.startViewTransition((function(){var e;null==s||null==(e=s.current)||e.remove()})).finished.then((function(){setTimeout((function(){t()}),100)})):t()},v=function(t){t.detail.surveyId===e.id&&_()};return Bo((function(){if(t){if(!r){var i=function(t){var n,r;if(t.detail.surveyId===e.id){if(null==(n=e.appearance)||!n.displayThankYouMessage)return _();h(!0),null!=(r=e.appearance)&&r.autoDisappear&&setTimeout((function(){_()}),5e3)}},o=function(){var n,r;Sf(e)&&(d(!0),xp.dispatchEvent(new Event("PHSurveyShown")),a||t.capture(cs.SHOWN,Ai(((n={})[ds.SURVEY_NAME]=e.name,n[ds.SURVEY_ID]=e.id,n[ds.SURVEY_ITERATION]=e.current_iteration,n[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,n),u&&((r={})[ds.SURVEY_LANGUAGE]=u,r),{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()})),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(cl(xp,"PHSurveyClosed",v),cl(xp,"PHSurveySent",i),n>0){var s=setTimeout(o,n);return function(){clearTimeout(s),xp.removeEventListener("PHSurveyClosed",v),xp.removeEventListener("PHSurveySent",i)}}return o(),function(){xp.removeEventListener("PHSurveyClosed",v),xp.removeEventListener("PHSurveySent",i)}}}else bl.error("usePopupVisibility hook called without a PostHog instance.")}),[]),Fp({survey:e,removeSurveyFromFocus:i,setSurveyVisible:d,isPreviewMode:r}),{isPopupVisible:c,isSurveySent:p,setIsPopupVisible:d,hidePopupWithViewTransition:_}}(a,l,I,T,h,v,P,E,C),L=F.isPopupVisible,R=F.hidePopupWithViewTransition,M=F.isSurveySent||f===a.questions.length||!0===k,O=zo((function(){var e=Ef(a),t=(null==e?void 0:e.surveySubmissionId)||Bc();return{isPreviewMode:T,previewPageIndex:f,onPopupSurveyDismissed:function(){C?pf(a,l,T,C):pf(a,l,T),b()},isPopup:v||!1,surveySubmissionId:t,onPreviewSubmit:m,posthog:l,properties:x,surveyLanguage:C}}),[T,f,v,l,a,b,m,x,C]);return L?Lf(yf.Provider,{value:O,children:Lf("div",{className:"ph-survey",style:Ai({},If(a.type,null==(n=a.appearance)?void 0:n.position,null==(r=a.appearance)?void 0:r.widgetType),d),ref:P,children:M?Lf(Wf,{header:(null==(i=a.appearance)?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null==(o=a.appearance)?void 0:o.thankYouMessageDescription)||"",forceDisableHtml:!!u,contentType:null==(s=a.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:a.appearance||sf,onClose:function(){R(),S()}}):Lf(Mp,{survey:a,forceDisableHtml:!!u,posthog:l})})}):null}function Mp(e){var t,n=e.survey,r=e.forceDisableHtml,i=e.posthog,o=Uo((function(){var e=Ef(n);return null!=e&&e.responses&&bl.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),s=o[0],a=o[1],u=Wo(yf),l=u.previewPageIndex,c=u.onPopupSurveyDismissed,d=u.isPopup,f=u.onPreviewSubmit,p=u.surveySubmissionId,h=u.isPreviewMode,_=u.properties,v=u.surveyLanguage,g=Uo((function(){var e=Ef(n);return l||(null==e?void 0:e.lastQuestionIndex)||0})),m=g[0],y=g[1],b=zo((function(){return gf(n)}),[n]);Bo((function(){h&&!Ds(l)&&y(l)}),[l,h]);var w=b.at(m);return w?Lf("form",{className:"survey-form",name:"surveyForm",children:[d&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Lf(Vf,{onClick:function(){c()}}),Lf("div",{className:"survey-box","data-question-index":m,children:Ap({question:w,forceDisableHtml:r,displayQuestionIndex:m,appearance:n.appearance||sf,onSubmit:function(e){return function(e){var t,r=e.res,o=e.displayQuestionIndex,u=e.questionId;if(i)if(u){var l=fl(u),c=Ai({},s,((t={})[l]=r,t));a(c);var d=op(n,o,r),f=d===us.End;f||(y(d),kf(n,{surveySubmissionId:p,responses:c,lastQuestionIndex:d,surveyLanguage:v})),(n.enable_partial_responses||f)&&df({responses:c,survey:n,surveySubmissionId:p,isSurveyCompleted:f,posthog:i,properties:_,surveyLanguage:v})}else bl.error("onNextButtonClick called without a questionId.");else bl.error("onNextButtonClick called without a PostHog instance.")}({res:e,displayQuestionIndex:m,questionId:w.id})},onPreviewSubmit:f,initialValue:w.id?s[fl(w.id)]:void 0})})]}):null}function Op(e){var t,n,r,i,o,s,a,u=e.survey,l=e.forceDisableHtml,c=e.posthog,d=e.readOnly,f=e.surveyLanguage,p=Uo(!0),h=p[0],_=p[1],v=Uo(!1),g=v[0],m=v[1],y=Uo({}),b=y[0],w=y[1],S=function(){m(!g)};if(Bo((function(){var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&w({top:"50%",bottom:"auto"});var t=function(e){var t,n=e;(null==(t=n.detail)?void 0:t.surveyId)===u.id&&(bl.info("Received show event for feedback button survey "+u.id),w(n.detail.position||{}),S())};return cl(xp,Ep,t),function(){xp.removeEventListener(Ep,t)}}}else bl.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(n=u.appearance)?void 0:n.widgetSelector,null==(r=u.appearance)?void 0:r.borderColor]),Fp({survey:u,setSurveyVisible:_}),!h)return null;var x=function(){u.schedule!==ls&&_(!1),setTimeout((function(){m(!1)}),200)};return Lf(ao,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Lf("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===os.Top?"widget-tab-top":""),onClick:S,disabled:d,style:Lp(null==(s=u.appearance)?void 0:s.tabPosition),children:(null==(a=u.appearance)?void 0:a.widgetLabel)||""}),g&&Lf(Rp,{posthog:c,survey:u,forceDisableHtml:l,style:b,onPopupSurveyDismissed:x,onCloseConfirmationMessage:x,surveyLanguage:f})]})}var Ap=function(e){var t=e.question,n=e.onSubmit,r=e.onPreviewSubmit,i={forceDisableHtml:e.forceDisableHtml,appearance:e.appearance,onPreviewSubmit:function(e){r(e)},onSubmit:function(e){n(e)},initialValue:e.initialValue,displayQuestionIndex:e.displayQuestionIndex};switch(t.type){case as.Open:return oo(Yf,Ai({},i,{question:t,key:t.id}));case as.Link:return oo(Qf,Ai({},i,{question:t,key:t.id}));case as.Rating:return oo(Zf,Ai({},i,{question:t,key:t.id}));case as.SingleChoice:case as.MultipleChoice:return oo(Xf,Ai({},i,{question:t,key:t.id}));default:return bl.error("Unsupported question type: "+t.type),null}};Ku.__PosthogExtensions__=Ku.__PosthogExtensions__||{},Ku.__PosthogExtensions__.generateSurveys=Ip,Ku.extendPostHogWithSurveys=Ip;var qp=el("[Error tracking]");function $p(){return new cu([new xu,new Mu,new Eu,new ku,new Lu,new Fu,new Pu,new Ru],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var i=[],o=t.split("\n"),s=r;o.length>s;s++){var a=o[s];if(1024>=a.length){var u=wu.test(a)?a.replace(wu,"$1"):a;if(!u.match(/\S*Error: /)){for(var l=0,c=n;c.length>l;l++){var d=(0,c[l])(u,e);if(d){i.push(d);break}}if(i.length>=Su)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,Su).map((function(e){return Ai({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||du});var n}))}(i)}}("web:javascript",gu,bu))}var Dp=function(){function e(e){var t,n;this._suppressionRules=[],this._errorPropertiesBuilder=$p(),this._instance=e,this._suppressionRules=null!==(t=null==(n=this._instance.persistence)?void 0:n.get_property(Dl))&&void 0!==t?t:[],this._exceptionStepsConfig=Du(this._getExceptionStepsConfig()),this._exceptionStepsBuffer=new Nu(this._exceptionStepsConfig)}var t=e.prototype;return t.onConfigChange=function(){this._exceptionStepsConfig=Du(this._getExceptionStepsConfig()),this._exceptionStepsBuffer.setConfig(this._exceptionStepsConfig)},t.onRemoteConfig=function(e){var t,n,r;if("errorTracking"in e){var i,o=null!==(t=null==(n=e.errorTracking)?void 0:n.suppressionRules)&&void 0!==t?t:[],s=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this._suppressionRules=o,this._instance.persistence&&this._instance.persistence.register(((i={})[Dl]=this._suppressionRules,i[Nl]=s,i))}},t.buildProperties=function(e,t){return this._errorPropertiesBuilder.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})},t.addExceptionStep=function(e,t){if(this._exceptionStepsConfig.enabled)try{var n;if(!Ns(e)||0===e.trim().length)return void qp.warn("Ignoring exception step because message must be a non-empty string");var r=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((function(n,r){return qu.has(r)?(t.push(r),n):(n[r]=e[r],n)}),{}),droppedKeys:t}}(this._coerceExceptionStepProperties(t)),i=r.sanitizedProperties,o=r.droppedKeys;o.length>0&&qp.warn("Ignoring reserved exception step fields",{droppedKeys:o}),this._exceptionStepsBuffer.add(Ai(((n={})[Ou]=e,n[Au]=(new Date).toISOString(),n),i))}catch(e){qp.error("Failed to add exception step. Ignoring breadcrumb.",e)}},t.sendExceptionEvent=function(e){try{var t=e.$exception_list;if(this._isExceptionList(t)){if(this._matchesSuppressionRule(t))return this._addDroppedExceptionStep("Exception dropped: matched a suppression rule"),void qp.info("Skipping exception capture because a suppression rule matched");if(!this._captureExtensionExceptions&&this._isExtensionException(t))return this._addDroppedExceptionStep("Exception dropped: thrown by a browser extension"),void qp.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this._isPostHogException(t))return this._addDroppedExceptionStep("Exception dropped: thrown by the PostHog SDK"),void qp.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this._exceptionStepsConfig.enabled&&Us(e.$exception_steps)?this._addBufferedExceptionSteps(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",_originatedFromCaptureException:!0});return r&&this._exceptionStepsBuffer.clear(),r}catch(e){return qp.error("Failed to capture exception event. Dropping this exception.",e),void this._exceptionStepsBuffer.clear()}}catch(e){return void qp.error("Failed to process exception event. Ignoring this exception.",e)}},t._addBufferedExceptionSteps=function(e){try{var t=this._exceptionStepsBuffer.getAttachable();return 0===t.length?e:Ai({},e,{$exception_steps:t})}catch(t){return qp.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}},t._addDroppedExceptionStep=function(e){var t;this._exceptionStepsConfig.enabled&&this._exceptionStepsBuffer.add(((t={})[Ou]=e,t[Au]=(new Date).toISOString(),t))},t._coerceExceptionStepProperties=function(e){return qs(e)?Ai({},e):{}},t._getExceptionStepsConfig=function(){var e,t;return null!==(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)&&void 0!==e?e:{}},t._matchesSuppressionRule=function(e){if(0===e.length)return!1;var t=e.reduce((function(e,t){var n=t.type,r=t.value;return Ns(n)&&n.length>0&&e.$exception_types.push(n),Ns(r)&&r.length>0&&e.$exception_values.push(r),e}),{$exception_types:[],$exception_values:[]});return this._suppressionRules.some((function(e){var n=e.values.map((function(e){var n,r=Ud[e.operator],i=Os(e.value)?e.value:[e.value],o=null!==(n=t[e.key])&&void 0!==n?n:[];return i.length>0&&r(i,o)}));return"OR"===e.type?n.some(Boolean):n.every(Boolean)}))},t._isExtensionException=function(e){var t=e.flatMap((function(e){var t,n;return null!==(t=null==(n=e.stacktrace)?void 0:n.frames)&&void 0!==t?t:[]}));return t.some((function(e){return e.filename&&e.filename.startsWith("chrome-extension://")}))},t._isPostHogException=function(e){if(e.length>0){var t,n,r,i,o=null!==(t=null==(n=e[0].stacktrace)?void 0:n.frames)&&void 0!==t?t:[],s=o[o.length-1];return null!==(r=null==s||null==(i=s.filename)?void 0:i.includes("posthog.com/static"))&&void 0!==r&&r}return!1},t._isExceptionList=function(e){return!Us(e)&&Os(e)},Mi(e,[{key:"_captureExtensionExceptions",get:function(){var e,t=!!this._instance.get_property(Nl),n=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=n?n:t)&&void 0!==e&&e}}])}(),Np=el("[ExceptionAutocapture]"),Hp=$p(),jp={wrapOnError:function(e){var t=ju;t||Np.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];var s=Hp.buildFromUnknown(i[4]||i[0],{mechanism:{handled:!1}});return e(s),null!==(t=null==n?void 0:n.apply(void 0,i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:function(e){var t=ju;t||Np.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(t){var r,i=Hp.buildFromUnknown(t,{mechanism:{handled:!1}});return e(i),null!==(r=null==n?void 0:n(t))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}},wrapConsoleError:function(e){var t=console;t||Np.info("console not available, cannot wrap console.error");var n=t.error;return t.error=function(){for(var t,r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];t=1==i.length?i[0]:i.join(" ");var s=i.find((function(e){return e instanceof Error})),a=Hp.buildFromUnknown(s||t,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException"),skipFirstLines:2});return e(a),null==n?void 0:n.apply(void 0,i)},t.error.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=n}}};function Up(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return As(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}}Ku.__PosthogExtensions__=Ku.__PosthogExtensions__||{},Ku.__PosthogExtensions__.errorWrappingFunctions=jp,Ku.posthogErrorWrappingFunctions=jp;var Bp="X-POSTHOG-SESSION-ID",Vp="X-POSTHOG-WINDOW-ID",zp="X-POSTHOG-DISTINCT-ID",Wp=[Bp,Vp,zp],Gp=function(e,t,n,r){var i;try{i=new URL(r.url).hostname}catch(e){return}if(!Os(e)||e.includes(i)){if(n){var o=n.checkAndGetSessionAndWindowId(!0),s=o.windowId;r.headers.set(Bp,o.sessionId),r.headers.set(Vp,s)}t!==Sc&&r.headers.set(zp,t)}};Ku.__PosthogExtensions__=Ku.__PosthogExtensions__||{};var Yp={_patchFetch:function(e,t,n){return Up(ju,"fetch",(function(r){return function(){var i=Ri($i().m((function i(o,s){var a;return $i().w((function(i){for(;;)if(0===i.n)return a=new Request(o,s),Gp(e,t,n,a),i.a(2,r(a))}),i)})));return function(e,t){return i.apply(this,arguments)}}()}))},_patchXHR:function(e,t,n){return Up(ju.XMLHttpRequest.prototype,"open",(function(r){return function(i,o,s,a,u){void 0===s&&(s=!0);var l=this,c=new Request(o);Gp(e,t,n,c);var d=r.call(l,i,c.url,s,a,u);return Wp.forEach((function(e){var t=c.headers.get(e);t&&l.setRequestHeader(e,t)})),d}}))}};Ku.__PosthogExtensions__.tracingHeadersPatchFns=Yp,Ku.postHogTracingHeadersPatchFns=Yp;var Qp=function(){function e(e){this._instance=e}var t=e.prototype;return t.isOptedOut=function(){return this._config.cookieless_mode===Tc||this.isRejected()||-1===this.consent&&this._config.cookieless_mode===Pc},t.isOptedIn=function(){return!this.isOptedOut()},t.isExplicitlyOptedOut=function(){return 0===this.consent},t.isRejected=function(){return 0===this.consent||-1===this.consent&&this._config.opt_out_capturing_by_default},t.optInOut=function(e){this._storage._set(this._storageKey,e?1:0,this._config.cookie_expiration,this._config.cross_subdomain_cookie,this._config.secure_cookie)},t.reset=function(){this._storage._remove(this._storageKey,this._config.cross_subdomain_cookie)},t._getDnt=function(){return!!this._config.respect_dnt&&[null==Bu?void 0:Bu.doNotTrack,null==Bu?void 0:Bu.msDoNotTrack,Ku.doNotTrack].some((function(e){return Xs(e)}))},Mi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"consent",get:function(){return this._getDnt()?0:this._storedConsent}},{key:"_storageKey",get:function(){var e=this._instance.config,t=e.token,n=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(n?n+t:"__ph_opt_in_out_"+t)}},{key:"_storedConsent",get:function(){var e=this._storage._get(this._storageKey);return Xs(e)?1:Ts(Js,e)?0:-1}},{key:"_storage",get:function(){var e=this._config.opt_out_capturing_persistence_type,t="localStorage"===e?Qd:Gd;if(!this._persistentStore||this._persistentStore!==t){this._persistentStore=t;var n="localStorage"===e?Gd:Qd;n._get(this._storageKey)&&(this._persistentStore._get(this._storageKey)||this.optInOut(Xs(n._get(this._storageKey))),n._remove(this._storageKey,this._config.cross_subdomain_cookie))}return this._persistentStore}}])}(),Zp=el("[Dead Clicks]"),Kp=function(){return!0},Xp=function(e){var t,n=!(null==(t=e.instance.persistence)||!t.get_property(jl)),r=e.instance.config.capture_dead_clicks;return zs(r)?r:!!qs(r)||n},Jp=function(){function e(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}var t=e.prototype;return t.onRemoteConfig=function(e){var t;"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register(((t={})[jl]=e.captureDeadClicks,t)),this.startIfEnabledOrStop())},t.startIfEnabledOrStop=function(){var e=this;this.isEnabled(this)?this._loadScript((function(){e._start()})):this.stop()},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(function(t){t?Zp.error("failed to load script",t):e()}))},t._start=function(){var e;if(Vu){if(!this._lazyLoadedDeadClicksAutocapture&&null!=(e=Ku.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=qs(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this._lazyLoadedDeadClicksAutocapture=Ku.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this._lazyLoadedDeadClicksAutocapture.start(Vu),Zp.info("starting...")}}else Zp.error("`document` not found. Cannot start.")},t.stop=function(){this._lazyLoadedDeadClicksAutocapture&&(this._lazyLoadedDeadClicksAutocapture.stop(),this._lazyLoadedDeadClicksAutocapture=void 0,Zp.info("stopping..."))},Mi(e,[{key:"lazyLoadedDeadClicksAutocapture",get:function(){return this._lazyLoadedDeadClicksAutocapture}}])}(),eh=el("[SegmentIntegration]");var th="posthog-js";function nh(e,t){var n=void 0===t?{}:t,r=n.organization,i=n.projectId,o=n.prefix,s=n.severityAllowList,a=void 0===s?["error"]:s,u=n.sendExceptionsToPostHog,l=void 0===u||u;return function(t){var n,s,u,c,d;if("*"!==a&&!a.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var f=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=f,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p,h=(null==(n=t.exception)?void 0:n.values)||[],_=h.map((function(e){return Ai({},e,{stacktrace:e.stacktrace?Ai({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map((function(e){return Ai({},e,{platform:"web:javascript"})}))}):void 0})})),v={$exception_message:(null==(s=h[0])?void 0:s.value)||t.message,$exception_type:null==(u=h[0])?void 0:u.type,$exception_level:t.level,$exception_list:_,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=h[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=h[0])?void 0:d.type,$sentry_tags:t.tags};return r&&i&&(v.$sentry_url=(o||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+t.event_id),l&&(null==(p=e.exceptions)||p.sendExceptionEvent(v)),t}}var rh,ih,oh=function(e,t,n,r,i,o){this.name=th,this.setupOnce=function(s){s(nh(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:null==o||o}))}},sh=function(){function e(e){var t=this;this._onSessionIdChange=function(e,n,r){r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength)&&(Ju.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:r}),t._currentPageview=void 0,t._instance.scrollManager.resetContext())},this._instance=e,this._setupSessionRotationHandler()}var t=e.prototype;return t._setupSessionRotationHandler=function(){var e;this._unsubscribeSessionId=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this._onSessionIdChange)},t.destroy=function(){var e;null==(e=this._unsubscribeSessionId)||e.call(this),this._unsubscribeSessionId=void 0},t.doPageView=function(e,t){var n,r=this._previousPageViewProperties(e,t);return this._currentPageview={pathname:null!==(n=null==ju?void 0:ju.location.pathname)&&void 0!==n?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r},t.doPageLeave=function(e){var t;return this._previousPageViewProperties(e,null==(t=this._currentPageview)?void 0:t.pageViewId)},t.doEvent=function(){var e;return{$pageview_id:null==(e=this._currentPageview)?void 0:e.pageViewId}},t._previousPageViewProperties=function(e,t){var n=this._currentPageview;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var o=i.maxScrollHeight,s=i.lastScrollY,a=i.maxScrollY,u=i.maxContentHeight,l=i.lastContentY,c=i.maxContentY;if(!(Ds(o)||Ds(s)||Ds(a)||Ds(u)||Ds(l)||Ds(c))){o=Math.ceil(o),s=Math.ceil(s),a=Math.ceil(a),u=Math.ceil(u),l=Math.ceil(l),c=Math.ceil(c);var d=o>1?ea(s/o,0,1,Ju):1,f=o>1?ea(a/o,0,1,Ju):1,p=u>1?ea(l/u,0,1,Ju):1,h=u>1?ea(c/u,0,1,Ju):1;r=rl(r,{$prev_pageview_last_scroll:s,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:h})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r},e}(),ah=((rh={})[Ll]={exposure:"hidden"},rh[Ml]={exposure:"hidden"},rh.__cmpns={exposure:"hidden"},rh[Ol]={exposure:"hidden"},rh[Al]={exposure:"event"},rh[ql]={exposure:"hidden"},rh[$l]={exposure:"event"},rh[Dl]={exposure:"hidden"},rh[Nl]={exposure:"event"},rh[Hl]={exposure:"event"},rh[jl]={exposure:"event"},rh[Ul]={exposure:"hidden"},rh[Bl]={exposure:"event"},rh[Vl]={exposure:"hidden"},rh.$session_recording_enabled_server_side={exposure:"hidden"},rh[Ql]={exposure:"hidden"},rh[Zl]={exposure:"event"},rh.$session_past_minimum_duration={exposure:"event"},rh.$session_recording_url_trigger_activated_session={exposure:"event"},rh.$session_recording_event_trigger_activated_session={exposure:"event"},rh.$debug_first_full_snapshot_timestamp={exposure:"event"},rh[Kl]={exposure:"derived",shouldSkipFromEventProperties:function(e,t){return t()},transformToEventProperties:function(e){if(!qs(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},rh[Xl]={exposure:"event"},rh[Jl]={exposure:"hidden"},rh[ec]={exposure:"hidden"},rh[tc]={exposure:"event"},rh[nc]={exposure:"event"},rh[rc]={exposure:"event"},rh[ic]={exposure:"hidden"},rh[oc]={exposure:"hidden"},rh[sc]={exposure:"hidden"},rh[ac]={exposure:"hidden"},rh[uc]={exposure:"event"},rh[lc]={exposure:"hidden"},rh.$product_tours_activated={exposure:"hidden"},rh.$conversations_widget_session_id={exposure:"event"},rh.$conversations_ticket_id={exposure:"event"},rh.$conversations_widget_state={exposure:"event"},rh.$conversations_user_traits={exposure:"event"},rh[cc]={exposure:"hidden"},rh[dc]={exposure:"hidden"},rh[fc]={exposure:"hidden"},rh[pc]={exposure:"hidden"},rh[hc]={exposure:"hidden"},rh[_c]={exposure:"hidden"},rh[vc]={exposure:"hidden"},rh[gc]={exposure:"hidden"},rh[mc]={exposure:"hidden"},rh[yc]={exposure:"hidden"},rh[bc]={exposure:"hidden"},rh[zl]={exposure:"event"},rh[Wl]={exposure:"event"},rh[Gl]={exposure:"event"},rh[Yl]={exposure:"event"},rh[xc]={exposure:"event"},rh[kc]={exposure:"event"},rh[Ec]={exposure:"event"},rh.$sdk_debug_replay_event_trigger_status={exposure:"event"},rh.$sdk_debug_replay_linked_flag_trigger_status={exposure:"event"},rh.$sdk_debug_replay_matched_recording_trigger_groups={exposure:"event"},rh.$sdk_debug_replay_remote_trigger_matching_config={exposure:"event"},rh.$sdk_debug_replay_trigger_groups_count={exposure:"event"},rh.$sdk_debug_replay_url_trigger_status={exposure:"event"},rh.$session_recording_start_reason={exposure:"event"},rh),uh=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],lh=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],ch=function(){function e(e,t){this._config=e,this.props={},this._campaign_params_saved=!1,this._name=function(e){var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"}(e),this._storage=this._buildStorage(e),this.load(),e.debug&&Ju.info("Persistence loaded",e.persistence,Ai({},this.props)),this.update_config(e,e,t),this.save()}var t=e.prototype;return t.isDisabled=function(){return!!this._disabled},t._buildStorage=function(e){-1===lh.indexOf(e.persistence.toLowerCase())&&(Ju.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=function(e){void 0===e&&(e=[]);var t=[].concat(Zd,e);return Ai({},Qd,{_parse:function(e){try{var t={};try{t=Gd._parse(e)||{}}catch(e){}var n=rl(t,JSON.parse(Qd._get(e)||"{}"));return Qd._set(e,n),n}catch(e){}return null},_set:function(e,n,r,i,o,s){try{Qd._set(e,n,void 0,void 0,s);var a={};t.forEach((function(e){n[e]&&(a[e]=n[e])})),Object.keys(a).length&&Gd._set(e,a,r,i,o,s)}catch(e){Qd._error(e)}},_remove:function(e,t){try{null==ju||ju.localStorage.removeItem(e),Gd._remove(e,t)}catch(e){Qd._error(e)}}})}(e.cookie_persisted_properties||[]),n=e.persistence.toLowerCase();return"localstorage"===n&&Qd._is_supported()?Qd:"localstorage+cookie"===n&&t._is_supported()?t:"sessionstorage"===n&&ef._is_supported()?ef:"memory"===n?Xd:"cookie"===n?Gd:t._is_supported()?t:Gd},t._isFeatureFlagCacheStale=function(e){var t=null!=e?e:this._config.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var n=this.props[pc];return!n||"number"!=typeof n||Date.now()-n>t},t.properties=function(){var e=this,t={};return nl(this.props,(function(n,r){var i=function(e){var t=ah[e];if(t)return t;for(var n=0,r=uh;r.length>n;n++){var i=r[n],o=i[1];if(0===e.indexOf(i[0]))return o}}(r);if("derived"===(null==i?void 0:i.exposure)){if(null!=i.shouldSkipFromEventProperties&&i.shouldSkipFromEventProperties(n,r===Kl?function(){return e._isFeatureFlagCacheStale()}:function(){return!1}))return;i.transformToEventProperties&&rl(t,i.transformToEventProperties(n))}else i&&"event"!==i.exposure||(t[r]=n)})),t},t.load=function(){if(!this._disabled){var e=this._storage._parse(this._name);e&&(this.props=rl({},e))}},t.save=function(){this._disabled||this._storage._set(this._name,this.props,this._expire_days,this._cross_subdomain,this._secure,this._config.debug)},t.remove=function(){this._storage._remove(this._name,!1),this._storage._remove(this._name,!0)},t.clear=function(){this.remove(),this.props={}},t.register_once=function(e,t,n){var r=this;if(qs(e)){Ds(t)&&(t="None"),this._expire_days=Ds(n)?this._default_expiry:n;var i=!1;if(nl(e,(function(e,n){r.props.hasOwnProperty(n)&&r.props[n]!==t||(r._setProp(n,e),i=!0)})),i)return this.save(),!0}return!1},t.register=function(e,t){var n=this;if(qs(e)){this._expire_days=Ds(t)?this._default_expiry:t;var r=!1;if(nl(e,(function(t,i){e.hasOwnProperty(i)&&n.props[i]!==t&&(n._setProp(i,t),r=!0)})),r)return this.save(),!0}return!1},t.unregister=function(e){e in this.props&&(this._deleteProp(e),this.save())},t.update_campaign_params=function(){if(!this._campaign_params_saved){var e=dp(this._config.custom_campaign_params,this._config.mask_personal_data_properties,this._config.custom_personal_data_properties);$s(al(e))||this.register(e),this._campaign_params_saved=!0}},t.update_search_keyword=function(){var e;this.register((e=null==Vu?void 0:Vu.referrer)?pp(e):{})},t.update_referrer_info=function(){var e;this.register_once({$referrer:vp(),$referring_domain:null!=Vu&&Vu.referrer&&(null==(e=Gc(Vu.referrer))?void 0:e.host)||_p},void 0)},t.set_initial_person_info=function(){var e;this.props[gc]||this.props[mc]||this.register_once(((e={})[yc]=gp(this._config.mask_personal_data_properties,this._config.custom_personal_data_properties),e),void 0)},t.get_initial_props=function(){var e=this,t={};nl([mc,gc],(function(n){var r=e.props[n];r&&nl(r,(function(e,n){t["$initial_"+Fs(n)]=e}))}));var n,r,i=this.props[yc];if(i){var o=(n=mp(i),r={},nl(n,(function(e,t){r["$initial_"+Fs(t)]=e})),r);rl(t,o)}return t},t.safe_merge=function(e){return nl(this.props,(function(t,n){n in e||(e[n]=t)})),e},t.update_config=function(e,t,n){if(this._default_expiry=this._expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!function(e,t){if(e.length!==t.length)return!1;var n=[].concat(e).sort(),r=[].concat(t).sort();return n.every((function(e,t){return e===r[t]}))}(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this._buildStorage(e),i=this.props;this.clear(),this._storage=r,this.props=i,this.save()}},t.set_disabled=function(e){this._disabled=e,this._disabled?this.remove():this.save()},t.set_cross_subdomain=function(e){e!==this._cross_subdomain&&(this._cross_subdomain=e,this.remove(),this.save())},t.set_secure=function(e){e!==this._secure&&(this._secure=e,this.remove(),this.save())},t.set_event_timer=function(e,t){var n=this.props[Ol]||{};n[e]=t,this._setProp(Ol,n),this.save()},t.remove_event_timer=function(e){var t=this.props[Ol]||{},n=t[e];return Ds(n)||(delete t[e],this._setProp(Ol,t),this.save()),n},t.get_property=function(e){return this.props[e]},t.set_property=function(e,t){this._setProp(e,t),this.save()},t._setProp=function(e,t){this.props[e]=t},t._deleteProp=function(e){delete this.props[e]},e}(),dh=el("[RateLimiter]"),fh=function(){function e(e){var t=this;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=function(e){var n=e.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach((function(e){dh.info((e||"events")+" is quota limited."),t.serverLimits[e]=(new Date).getTime()+6e4}))}catch(e){return void dh.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:n})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}var t=e.prototype;return t.clientRateLimitContext=function(e){var t,n,r;void 0===e&&(e=!1);var i=this.captureEventsBurstLimit,o=this.captureEventsPerSecond,s=(new Date).getTime(),a=null!==(t=null==(n=this.instance.persistence)?void 0:n.get_property(vc))&&void 0!==t?t:{tokens:i,last:s};a.tokens+=(s-a.last)/1e3*o,a.last=s,a.tokens>i&&(a.tokens=i);var u=1>a.tokens;return u||e||(a.tokens=Math.max(0,a.tokens-1)),!u||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+o+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,null==(r=this.instance.persistence)||r.set_property(vc,a),{isRateLimited:u,remainingTokens:a.tokens}},t.isServerRateLimited=function(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t},Mi(e,[{key:"captureEventsPerSecond",get:function(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}},{key:"captureEventsBurstLimit",get:function(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}}])}(),ph=el("[RemoteConfig]"),hh=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadRemoteConfigJs=function(e){var t,n,r=this;null!=(t=Ku.__PosthogExtensions__)&&t.loadExternalDependency?null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"remote-config",(function(){return e(r.remoteConfig)})):e()},t._loadRemoteConfigJSON=function(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:function(t){e(t.json)}})},t.load=function(){var e=this;try{if(this.remoteConfig)return ph.info("Using preloaded remote config",this.remoteConfig),this._onRemoteConfig(this.remoteConfig),void this._startRefreshInterval();if(this._instance._shouldDisableFlags())return void ph.warn("Remote config is disabled. Falling back to local config.");this._loadRemoteConfigJs((function(t){if(!t)return ph.info("No config found after loading remote JS config. Falling back to JSON."),void e._loadRemoteConfigJSON((function(t){e._onRemoteConfig(t),e._startRefreshInterval()}));e._onRemoteConfig(t),e._startRefreshInterval()}))}catch(e){ph.error("Error loading remote config",e)}},t.stop=function(){this._refreshInterval&&(clearInterval(this._refreshInterval),this._refreshInterval=void 0)},t.refresh=function(){!this._instance._shouldDisableFlags()&&Vu&&"hidden"!==Vu.visibilityState&&this._instance.reloadFeatureFlags()},t._startRefreshInterval=function(){var e,t=this;if(!this._refreshInterval){var n=null!==(e=this._instance.config.remote_config_refresh_interval_ms)&&void 0!==e?e:3e5;0!==n&&(this._refreshInterval=setInterval((function(){t.refresh()}),n))}},t._onRemoteConfig=function(e){var t;e||ph.error("Failed to fetch remote config from PostHog."),this._instance._onRemoteConfig(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())},Mi(e,[{key:"remoteConfig",get:function(){var e;return null==(e=Ku._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}}])}(),_h=3e3,vh=function(){function e(e,t){this._isPaused=!0,this._queue=[],this._flushTimeoutMs=ea((null==t?void 0:t.flush_interval_ms)||_h,250,5e3,Ju.createLogger("flush interval"),_h),this._sendRequest=e}var t=e.prototype;return t.enqueue=function(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()},t.unload=function(){var e=this;this._clearFlushTimeout();var t=this._queue.length>0?this._formatQueue():{},n=Object.values(t),r=[].concat(n.filter((function(e){return 0===e.url.indexOf("/e")})),n.filter((function(e){return 0!==e.url.indexOf("/e")})));r.map((function(t){e._sendRequest(Ai({},t,{transport:"sendBeacon"}))}))},t.enable=function(){this._isPaused=!1,this._setFlushTimeout()},t._setFlushTimeout=function(){var e=this;this._isPaused||(this._flushTimeout=setTimeout((function(){if(e._clearFlushTimeout(),e._queue.length>0){var t=e._formatQueue(),n=function(){var n=t[r],i=(new Date).getTime();n.data&&Os(n.data)&&nl(n.data,(function(e){e.offset=Math.abs(e.timestamp-i),delete e.timestamp})),e._sendRequest(n)};for(var r in t)n()}}),this._flushTimeoutMs))},t._clearFlushTimeout=function(){clearTimeout(this._flushTimeout),this._flushTimeout=void 0},t._formatQueue=function(){var e={};return nl(this._queue,(function(t){var n,r=t,i=(r?r.batchKey:null)||r.url;Ds(e[i])&&(e[i]=Ai({},r,{data:[]})),null==(n=e[i].data)||n.push(r.data)})),this._queue=[],e},e}(),gh=["retriesPerformedSoFar"],mh=function(){function e(e){var t=this;this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._instance=e,this._queue=[],this._areWeOnline=!0,!Ds(ju)&&"onLine"in ju.navigator&&(this._areWeOnline=ju.navigator.onLine,this._onlineListener=function(){t._areWeOnline=!0,t._flush()},this._offlineListener=function(){t._areWeOnline=!1},cl(ju,"online",this._onlineListener),cl(ju,"offline",this._offlineListener))}var t=e.prototype;return t.retriableRequest=function(e){var t=this,n=e.retriesPerformedSoFar,r=qi(e,gh);Vs(n)&&(r.url=Md(r.url,{retry_count:n})),this._instance._send_request(Ai({},r,{callback:function(e){200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=n?n:0)>=10?null==r.callback||r.callback(e):t._enqueue(Ai({retriesPerformedSoFar:n},r))}}))},t._enqueue=function(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*Math.pow(2,e),n=t/2,r=Math.min(18e5,t),i=Math.random()-.5;return Math.ceil(r+i*(r-n))}(t),r=Date.now()+n;this._queue.push({retryAt:r,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),Ju.warn(i),this._isPolling||(this._isPolling=!0,this._poll())},t._poll=function(){var e=this;if(this._poller&&clearTimeout(this._poller),0===this._queue.length)return this._isPolling=!1,void(this._poller=void 0);this._poller=setTimeout((function(){e._areWeOnline&&e._queue.length>0&&e._flush(),e._poll()}),this._pollIntervalMs)},t._flush=function(){var e=Date.now(),t=[],n=this._queue.filter((function(n){return e>n.retryAt||(t.push(n),!1)}));if(this._queue=t,n.length>0)for(var r,i=Oi(n);!(r=i()).done;)this.retriableRequest(r.value.requestOptions)},t.unload=function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._isPolling=!1,Ds(ju)||(this._onlineListener&&(ju.removeEventListener("online",this._onlineListener),this._onlineListener=void 0),this._offlineListener&&(ju.removeEventListener("offline",this._offlineListener),this._offlineListener=void 0));for(var e,t=Oi(this._queue);!(e=t()).done;){var n=e.value.requestOptions;try{this._instance._send_request(Ai({},n,{transport:"sendBeacon"}))}catch(e){Ju.error(e)}}this._queue=[]},Mi(e,[{key:"length",get:function(){return this._queue.length}}])}(),yh=function(){function e(e){var t=this;this._updateScrollData=function(){var e,n,r,i;t._context||(t._context={});var o=t.scrollElement(),s=t.scrollY(),a=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=s+((null==o?void 0:o.clientHeight)||0),l=(null==o?void 0:o.scrollHeight)||0;t._context.lastScrollY=Math.ceil(s),t._context.maxScrollY=Math.max(s,null!==(e=t._context.maxScrollY)&&void 0!==e?e:0),t._context.maxScrollHeight=Math.max(a,null!==(n=t._context.maxScrollHeight)&&void 0!==n?n:0),t._context.lastContentY=u,t._context.maxContentY=Math.max(u,null!==(r=t._context.maxContentY)&&void 0!==r?r:0),t._context.maxContentHeight=Math.max(l,null!==(i=t._context.maxContentHeight)&&void 0!==i?i:0)},this._instance=e}var t=e.prototype;return t.getContext=function(){return this._context},t.resetContext=function(){var e=this._context;return setTimeout(this._updateScrollData,0),e},t.startMeasuringScrollPosition=function(){cl(ju,"scroll",this._updateScrollData,{capture:!0}),cl(ju,"scrollend",this._updateScrollData,{capture:!0}),cl(ju,"resize",this._updateScrollData)},t.scrollElement=function(){if(!this._scrollRoot)return null==ju?void 0:ju.document.documentElement;for(var e,t=Oi(Os(this._scrollRoot)?this._scrollRoot:[this._scrollRoot]);!(e=t()).done;){var n=null==ju?void 0:ju.document.querySelector(e.value);if(n)return n}},t.scrollY=function(){if(this._scrollRoot){var e=this.scrollElement();return e&&e.scrollTop||0}return ju&&(ju.scrollY||ju.pageYOffset||ju.document.documentElement.scrollTop)||0},t.scrollX=function(){if(this._scrollRoot){var e=this.scrollElement();return e&&e.scrollLeft||0}return ju&&(ju.scrollX||ju.pageXOffset||ju.document.documentElement.scrollLeft)||0},Mi(e,[{key:"_scrollRoot",get:function(){return this._instance.config.scroll_root_selector}}])}(),bh=function(e){return gp(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties)},wh=function(){function e(e,t,n,r){var i=this;this._onSessionIdCallback=function(e){var t,n=i._getStored();if(!n||n.sessionId!==e){var r={sessionId:e,props:i._sessionSourceParamGenerator(i._instance)};i._persistence.register(((t={})[_c]=r,t))}},this._instance=e,this._sessionIdManager=t,this._persistence=n,this._sessionSourceParamGenerator=r||bh,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}var t=e.prototype;return t._getStored=function(){return this._persistence.props[_c]},t.getSetOnceProps=function(){var e,t=null==(e=this._getStored())?void 0:e.props;return t?"r"in t?mp(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}},t.getSessionProps=function(){var e={};return nl(al(this.getSetOnceProps()),(function(t,n){"$current_url"===n&&(n="url"),e["$session_entry_"+Fs(n)]=t})),e},e}(),Sh=function(){function e(){this._events={}}var t=e.prototype;return t.on=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}))}},t.emit=function(e,t){for(var n,r=Oi(this._events[e]||[]);!(n=r()).done;)(0,n.value)(t);for(var i,o=Oi(this._events["*"]||[]);!(i=o()).done;)(0,i.value)(e,t)},e}(),xh=el("[SessionId]"),kh=function(){function e(e,t,n){var r,i=this;if(this._sessionIdChangedHandlers=[],this._beforeUnloadListener=void 0,this._eventEmitter=new Sh,this._sessionHasBeenIdleTooLong=function(e,t){return!(!Vs(e)||!Vs(t))&&Math.abs(e-t)>i.sessionTimeoutMs},!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===Tc)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this._config=e.config,this._persistence=e.persistence,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=t||Bc,this._windowIdGenerator=n||Bc;var o=this._config.persistence_name||this._config.token;if(this._sessionTimeoutMs=1e3*ea(this._config.session_idle_timeout_seconds||1800,60,36e3,xh.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this._resetIdleTimer(),this._window_id_storage_key="ph_"+o+"_window_id",this._primary_window_exists_storage_key="ph_"+o+"_primary_window_exists",this._canUseSessionStorage()){var s=ef._parse(this._window_id_storage_key),a=ef._parse(this._primary_window_exists_storage_key);s&&!a?this._windowId=s:ef._remove(this._window_id_storage_key),ef._set(this._primary_window_exists_storage_key,!0)}if(null!=(r=this._config.bootstrap)&&r.sessionID)try{var u=function(e){var t=e.replace(/-/g,"");if(32!==t.length)throw new Error("Not a valid UUID");if("7"!==t[12])throw new Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)}(this._config.bootstrap.sessionID);this._setSessionId(this._config.bootstrap.sessionID,(new Date).getTime(),u)}catch(e){xh.error("Invalid sessionID in bootstrap",e)}this._listenToReloadWindow()}var t=e.prototype;return t.on=function(e,t){return this._eventEmitter.on(e,t)},t.onSessionId=function(e){var t=this;return Ds(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}))}},t._canUseSessionStorage=function(){return"memory"!==this._config.persistence&&!this._persistence._disabled&&ef._is_supported()},t._setWindowId=function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&ef._set(this._window_id_storage_key,e))},t._getWindowId=function(){return this._windowId?this._windowId:this._canUseSessionStorage()?ef._parse(this._window_id_storage_key):null},t._setSessionId=function(e,t,n){var r;e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this._persistence.register(((r={})[Ql]=[t,e,n],r)))},t._getSessionId=function(){var e=this._persistence.props[Ql];return Os(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]},t.resetSessionId=function(){this._setSessionId(null,null,null)},t.destroy=function(){clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=void 0,this._beforeUnloadListener&&ju&&(ju.removeEventListener(Mc,this._beforeUnloadListener,{capture:!1}),this._beforeUnloadListener=void 0),this._sessionIdChangedHandlers=[]},t._listenToReloadWindow=function(){var e=this;this._beforeUnloadListener=function(){e._canUseSessionStorage()&&ef._remove(e._primary_window_exists_storage_key)},cl(ju,Mc,this._beforeUnloadListener,{capture:!1})},t.checkAndGetSessionAndWindowId=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this._config.cookieless_mode===Tc)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||(new Date).getTime(),r=this._getSessionId(),i=r[0],o=r[1],s=r[2],a=this._getWindowId(),u=Vs(s)&&Math.abs(n-s)>864e5,l=!1,c=!o,d=!c&&!e&&this._sessionHasBeenIdleTooLong(n,i);c||d||u?(o=this._sessionIdGenerator(),a=this._windowIdGenerator(),xh.info("new session ID generated",{sessionId:o,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}}),s=n,l=!0):a||(a=this._windowIdGenerator(),l=!0);var f=Vs(i)&&e&&!u?i:n,p=Vs(s)?s:(new Date).getTime();return this._setWindowId(a),this._setSessionId(o,f,p),e||this._resetIdleTimer(),l&&this._sessionIdChangedHandlers.forEach((function(e){return e(o,a,l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0)})),{sessionId:o,windowId:a,sessionStartTimestamp:p,changeReason:l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:i}},t._resetIdleTimer=function(){var e=this;clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=setTimeout((function(){var t=e._getSessionId()[0];if(e._sessionHasBeenIdleTooLong((new Date).getTime(),t)){var n=e._sessionId;e.resetSessionId(),e._eventEmitter.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)},Mi(e,[{key:"sessionTimeoutMs",get:function(){return this._sessionTimeoutMs}}])}(),Eh=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&Ps(n,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some((function(e){return Ps(null==e?void 0:e.brand,t)})))return!0}catch(e){}return!!e.webdriver},Ch="custom",Ph="i.posthog.com",Th=/^\/static\//,Ih=function(){function e(e){this._regionCache={},this.instance=e}var t=e.prototype;return t._staticAssetHostOverride=function(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if("string"==typeof t&&Th.test(e))return t.trim().replace(/\/$/,"")||void 0},t.endpointFor=function(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var n=this._staticAssetHostOverride(t);if(n)return""+n+t}if(this.region===Ch)return this.apiHost+t;var r=Ph+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}},Mi(e,[{key:"apiHost",get:function(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}},{key:"flagsApiHost",get:function(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}},{key:"uiHost",get:function(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Ph,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(this._regionCache[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Ch),this._regionCache[this.apiHost]}}])}(),Fh=el("[PostHog ExternalIntegrations]"),Lh={intercom:"intercom-integration",crispChat:"crisp-chat-integration"},Rh=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadScript=function(e,t){var n;null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,e,(function(e){if(e)return Fh.error("failed to load script",e);t()}))},t.startIfEnabledOrStop=function(){for(var e=this,t=function(){var t,i,o,s=r[n],a=s[0],u=s[1];!u||null!=(t=Ku.__PosthogExtensions__)&&null!=(t=t.integrations)&&t[a]||e._loadScript(Lh[a],(function(){var t;null==(t=Ku.__PosthogExtensions__)||null==(t=t.integrations)||null==(t=t[a])||t.start(e._instance)})),!u&&null!=(i=Ku.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[a]&&(null==(o=Ku.__PosthogExtensions__)||null==(o=o.integrations)||null==(o=o[a])||o.stop())},n=0,r=Object.entries(null!==(i=this._instance.config.integrations)&&void 0!==i?i:{});r.length>n;n++){var i;t()}},e}(),Mh={},Oh=0,Ah=function(){},qh='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',$h="Surveys module not available",Dh="sanitize_properties is deprecated. Use before_send instead",Nh="Invalid value for property_denylist config: ",Hh="posthog",jh=!Id&&-1===(null==Zu?void 0:Zu.indexOf("MSIE"))&&-1===(null==Zu?void 0:Zu.indexOf("Mozilla")),Uh=function(e){var t;return Ai({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ll(null==Vu?void 0:Vu.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Ah,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:zu&&Ns(null==zu?void 0:zu.search)&&-1!==zu.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==ju||null==(t=ju.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:function(e){Ju.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:function(e){return e},capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Lc,before_send:void 0,request_queue_config:{flush_interval_ms:_h},error_tracking:{},_onCapture:Ah,__preview_eager_load_replay:!1},function(e){return{rageclick:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}}(e))},Bh=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],Vh=function(e){for(var t={},n=0,r=Bh;r.length>n;n++){var i=r[n],o=i[0],s=i[1];Ds(e[o])||(t[s]=e[o])}var a=rl({},t,e);return Os(e.property_blacklist)&&(Ds(e.property_denylist)?a.property_denylist=e.property_blacklist:Os(e.property_denylist)?a.property_denylist=[].concat(e.property_blacklist,e.property_denylist):Ju.error(Nh+e.property_denylist)),a},zh=function(){return Mi((function(){this.__forceAllowLocalhost=!1}),[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(e){Ju.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}])}(),Wh=function(){function e(){var t,n=this;this.webPerformance=new zh,this._personProcessingSetOncePropertiesSent=!1,this.version=hs.LIB_VERSION,this._internalEventEmitter=new Sh,this._extensions=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Uh(),this.SentryIntegration=oh,this.sentryIntegration=function(e){return function(e,t){var n=nh(e,t);return{name:th,processEvent:function(e){return n(e)}}}(n,e)},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this._initialPageviewCaptured=!1,this._visibilityStateListener=null,this._initialPersonProfilesConfig=null,this._cachedPersonProperties=null,this.scrollManager=new yh(this),this.pageViewManager=new sh(this),this.rateLimiter=new fh(this),this.requestRouter=new Ih(this),this.consent=new Qp(this),this.externalIntegrations=new Rh(this);var r=null!==(t=e.__defaultExtensionClasses)&&void 0!==t?t:{};this.featureFlags=r.featureFlags&&new r.featureFlags(this),this.toolbar=r.toolbar&&new r.toolbar(this),this.surveys=r.surveys&&new r.surveys(this),this.conversations=r.conversations&&new r.conversations(this),this.logs=r.logs&&new r.logs(this),this.experiments=r.experiments&&new r.experiments(this),this.exceptions=r.exceptions&&new r.exceptions(this),this.people={set:function(e,t,r){var i,o=Ns(e)?((i={})[e]=t,i):e;n.setPersonProperties(o),null==r||r({})},set_once:function(e,t,r){var i,o=Ns(e)?((i={})[e]=t,i):e;n.setPersonProperties(void 0,o),null==r||r({})}},this.on("eventCaptured",(function(e){return Ju.info('send "'+(null==e?void 0:e.event)+'"',e)}))}var t=e.prototype;return t._replaceExtension=function(e,t){if(e){var n=this._extensions.indexOf(e);-1!==n&&this._extensions.splice(n,1)}return this._extensions.push(t),null==t.initialize||t.initialize(),t},t._inCookielessMode=function(){return this.config.cookieless_mode===Tc||this.config.cookieless_mode===Pc&&this.consent.isRejected()},t.init=function(t,n,r){if(r&&r!==Hh){var i,o=null!==(i=Mh[r])&&void 0!==i?i:new e;return o._init(t,n,r),Mh[r]=o,Mh[Hh][r]=o,o}return this._init(t,n,r)},t._init=function(e,t,n){var r,i,o=this;if(void 0===t&&(t={}),Ds(e)||Hs(e))return Ju.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this._checkLocalStorageForDebug(t.debug),this._originalUserConfig=t,this._triggered_notifs=[],t.person_profiles?this._initialPersonProfilesConfig=t.person_profiles:t.process_person&&(this._initialPersonProfilesConfig=t.process_person),this.set_config(rl({},Uh(t.defaults),Vh(t),{name:n,token:e})),this.config.on_xhr_error&&Ju.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:zc;var s=this._is_persistence_disabled();this.persistence=new ch(this.config,s),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ch(Ai({},this.config,{persistence:"sessionStorage"}),s);var a=Ai({},this.persistence.props),u=Ai({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this._requestQueue=new vh((function(e){return o._send_retriable_request(e)}),this.config.request_queue_config),this._retryQueue=new mh(this),this.__request_queue=[];var l=this._inCookielessMode();if(l||(this.sessionManager=new kh(this),this.sessionPropsManager=new wh(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Ju.info("Deferring extension initialization to improve startup performance"),setTimeout((function(){o._initExtensions(l)}),0)):(Ju.info("Initializing extensions synchronously"),this._initExtensions(l)),hs.DEBUG=hs.DEBUG||this.config.debug,hs.DEBUG&&Ju.info("Starting in debug mode",{this:this,config:t,thisC:Ai({},this.config),p:a,s:u}),!this.config.identity_distinct_id||null!=(r=t.bootstrap)&&r.distinctID||(t.bootstrap=Ai({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),void 0!==(null==(i=t.bootstrap)?void 0:i.distinctID)){var c=t.bootstrap.distinctID,d=this.get_distinct_id(),f=this.persistence.get_property(hc);if(t.bootstrap.isIdentifiedID&&null!=d&&d!==c&&f===Ic)this.identify(c);else if(t.bootstrap.isIdentifiedID&&null!=d&&d!==c&&f===Fc)Ju.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var p=this.config.get_device_id(Bc()),h=t.bootstrap.isIdentifiedID?p:c;this.persistence.set_property(hc,t.bootstrap.isIdentifiedID?Fc:Ic),this.register({distinct_id:c,$device_id:h})}}if(l)this.register_once({distinct_id:Sc,$device_id:null},"");else if(!this.get_distinct_id()){var _=this.config.get_device_id(Bc());this.register_once({distinct_id:_,$device_id:_},""),this.persistence.set_property(hc,Ic)}return cl(ju,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.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()||Bc()};e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(hc,Fc)),t()},i=n.user();"then"in i&&As(i.then)?i.then(r):r(i)}(e,(function(){n.register(function(e){Promise&&Promise.resolve||eh.warn("This browser does not have Promise support, and can not use the segment integration");var t=function(t,n){if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(eh.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(eh.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return t(e,e.event.event)},page:function(e){return t(e,Oc)},identify:function(e){return t(e,qc)},screen:function(e){return t(e,"$screen")}}}(e)).then((function(){t()}))}))}(this,(function(){return o._loaded()})):this._loaded(),As(this.config._onCapture)&&this.config._onCapture!==Ah&&(Ju.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(function(e){return o.config._onCapture(e.event,e)}))),this.config.ip&&Ju.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this},t._initExtensions=function(t){var n,r,i,o,s,a,u,l=this,c=performance.now(),d=Ai({},e.__defaultExtensionClasses,this.config.__extensionClasses),f=[];d.featureFlags&&this._extensions.push(this.featureFlags=null!==(n=this.featureFlags)&&void 0!==n?n:new d.featureFlags(this)),d.exceptions&&this._extensions.push(this.exceptions=null!==(r=this.exceptions)&&void 0!==r?r:new d.exceptions(this)),d.historyAutocapture&&this._extensions.push(this.historyAutocapture=new d.historyAutocapture(this)),d.tracingHeaders&&this._extensions.push(new d.tracingHeaders(this)),d.siteApps&&this._extensions.push(this.siteApps=new d.siteApps(this)),d.sessionRecording&&!t&&this._extensions.push(this.sessionRecording=new d.sessionRecording(this)),this.config.disable_scroll_properties||f.push((function(){l.scrollManager.startMeasuringScrollPosition()})),d.autocapture&&this._extensions.push(this.autocapture=new d.autocapture(this)),d.surveys&&this._extensions.push(this.surveys=null!==(i=this.surveys)&&void 0!==i?i:new d.surveys(this)),d.logs&&this._extensions.push(this.logs=null!==(o=this.logs)&&void 0!==o?o:new d.logs(this)),d.conversations&&this._extensions.push(this.conversations=null!==(s=this.conversations)&&void 0!==s?s:new d.conversations(this)),d.productTours&&this._extensions.push(this.productTours=new d.productTours(this)),d.heatmaps&&this._extensions.push(this.heatmaps=new d.heatmaps(this)),d.webVitalsAutocapture&&this._extensions.push(this.webVitalsAutocapture=new d.webVitalsAutocapture(this)),d.exceptionObserver&&this._extensions.push(this.exceptionObserver=new d.exceptionObserver(this)),d.deadClicksAutocapture&&this._extensions.push(this.deadClicksAutocapture=new d.deadClicksAutocapture(this,Xp)),d.toolbar&&this._extensions.push(this.toolbar=null!==(a=this.toolbar)&&void 0!==a?a:new d.toolbar(this)),d.experiments&&this._extensions.push(this.experiments=null!==(u=this.experiments)&&void 0!==u?u:new d.experiments(this)),this._extensions.forEach((function(e){e.initialize&&f.push((function(){null==e.initialize||e.initialize()}))})),f.push((function(){if(l._pendingRemoteConfig){var e=l._pendingRemoteConfig;l._pendingRemoteConfig=void 0,l._onRemoteConfig(e)}})),this._processInitTaskQueue(f,c)},t._processInitTaskQueue=function(e,t){for(var n,r=this;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((function(){r._processInitTaskQueue(e,t)}),0);var i=e.shift();if(i)try{i()}catch(e){Ju.error("Error initializing extension:",e)}}var o=Math.round(performance.now()-t);this.register_for_session(((n={})[xc]=this.config.__preview_deferred_init_extensions?"deferred":"synchronous",n[kc]=o,n)),this.config.__preview_deferred_init_extensions&&Ju.info("PostHog extensions initialized ("+o+"ms)")},t._onRemoteConfig=function(e){var t,n=this;if(!Vu||!Vu.body)return Ju.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){n._onRemoteConfig(e)}),500);this.config.__preview_deferred_init_extensions&&(this._pendingRemoteConfig=e),this._lastRemoteConfig=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Ts(e.supportedCompression,zc)?zc:Ts(e.supportedCompression,Wc)?Wc:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this._initialPersonProfilesConfig?this._initialPersonProfilesConfig:Lc}),this._extensions.forEach((function(t){return null==t.onRemoteConfig?void 0:t.onRemoteConfig(e)}))},t._loaded=function(){var e=this;try{this.config.loaded(this)}catch(e){Ju.critical("`loaded` function failed",e)}if(this._start_queue_if_opted_in(),this.config.internal_or_test_user_hostname&&null!=zu&&zu.hostname){var t=zu.hostname,n=this.config.internal_or_test_user_hostname;("string"==typeof n?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((function(){(e.consent.isOptedIn()||e._inCookielessMode())&&e._captureInitialPageview()}),1),this._remoteConfigLoader=new hh(this),this._remoteConfigLoader.load()},t._start_queue_if_opted_in=function(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this._requestQueue)||e.enable())},t._dom_loaded=function(){var e=this;this.is_capturing()&&tl(this.__request_queue,(function(t){return e._send_retriable_request(t)})),this.__request_queue=[],this._start_queue_if_opted_in()},t._handle_unload=function(){var e,t,n,r;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this._shouldCapturePageleave()&&this.capture(Ac),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(n=this._requestQueue)||n.unload(),null==(r=this._retryQueue)||r.unload()):this._shouldCapturePageleave()&&this.capture(Ac,null,{transport:"sendBeacon"})},t._send_request=function(e){var t=this;this.__loaded&&(jh?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Md(e.url,{ip:this.config.ip?1:0}),e.headers=Ai({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,function(e){var t,n,r,i=Ai({},e);i.timeout=i.timeout||6e4,i.url=Dd(i.url,i.compression);var o=null!==(t=i.transport)&&void 0!==t?t:"fetch",s=Nd.filter((function(e){return!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)})),a=null!==(n=null==(r=function(e,t){for(var n=0;e.length>n;n++)if(t(e[n]))return e[n]}(s,(function(e){return e.transport===o})))?void 0:r.method)&&void 0!==n?n:s[0].method;if(!a)throw new Error("No available transport method");"sendBeacon"!==o&&i.data&&i.compression===zc&&Qu&&!Ld?$d(i).then((function(e){a(e)})).catch((function(t){if(bs(t))return Ld=!0,void a(Ai({},i,{compression:void 0,url:Dd(e.url,void 0)}));(function(e){if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return bs(e)||t===ms})(t)&&(Ld=!0),a(i)})):a(i)}(Ai({},e,{callback:function(n){t.rateLimiter.checkForLimiting(n),400>n.statusCode||null==t.config.on_request_error||t.config.on_request_error(n),null==e.callback||e.callback(n)}}))))},t._send_retriable_request=function(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)},t._execute_array=function(e){var t=this;Oh++;try{var n,r=[],i=[],o=[];tl(e,(function(e){if(e)if(Os(n=e[0]))o.push(e);else if(As(e))try{e.call(t)}catch(t){Ju.error("Error executing queued PostHog call",e,t)}else Os(e)&&"alias"===n?r.push(e):Os(e)&&-1!==n.indexOf("capture")&&As(t[n])?o.push(e):i.push(e)}));var s=function(e,t){tl(e,(function(e){try{if(Os(e[0])){var n=t;nl(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else t[e[0]].apply(t,e.slice(1))}catch(t){Ju.error("Error executing queued PostHog call",e,t)}}))};s(r,this),s(i,this),s(o,this)}finally{Oh--}},t.push=function(t){if(Oh>0&&Os(t)&&Ns(t[0])){var n=e.prototype[t[0]];As(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])},t.capture=function(e,t,n){var r,i,o,s,a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue){if(this.is_capturing())if(!Ds(e)&&Ns(e)){var u=!this.config.opt_out_useragent_filter&&this._is_bot();if(!u||this.config.__preview_capture_bot_pageviews){var l=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==l||!l.isRateLimited){null!=t&&t.$current_url&&!Ns(null==t?void 0:t.$current_url)&&(Ju.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=n&&n._originatedFromCaptureException||Ju.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var c=new Date,d=(null==n?void 0:n.timestamp)||c,f=(null==n?void 0:n.uuid)||Bc(),p={uuid:f,event:e,properties:this.calculateEventProperties(e,t||{},d,f)};e===Oc&&this.config.__preview_capture_bot_pageviews&&u&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),l&&(p.properties.$lib_rate_limit_remaining_tokens=l.remainingTokens),(null==n?void 0:n.$set)&&(p.$set=null==n?void 0:n.$set);var h=this._calculate_set_once_properties(null==n?void 0:n.$set_once,e!==$c,e===qc);if(h&&(p.$set_once=h),null!=n&&n._noTruncate||(i=this.config.properties_string_max_length,o=p,s=function(e){return Ns(e)?e.slice(0,i):e},a=new Set,p=function e(t,n){return t!==Object(t)?s?s(t):t:a.has(t)?void 0:(a.add(t),Os(t)?(r=[],tl(t,(function(t){r.push(e(t))}))):(r={},nl(t,(function(t,n){a.has(t)||(r[n]=e(t,n))}))),r);var r}(o)),p.timestamp=d,Ds(null==n?void 0:n.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),e===cs.DISMISSED||e===cs.SENT){var _,v=null==t?void 0:t[ds.SURVEY_ID],g=null==t?void 0:t[ds.SURVEY_ITERATION];Tl({id:v,current_iteration:g}),p.$set=Ai({},p.$set,((_={})[_l({id:v,current_iteration:g},e===cs.SENT?"responded":"dismissed")]=!0,_))}else if(e===cs.SHOWN){var m;p.$set=Ai({},p.$set,((m={})[ds.SURVEY_LAST_SEEN_DATE]=(new Date).toISOString(),m))}if("product tour shown"===e){var y,b=null==t?void 0:t.$product_tour_type;b&&(p.$set=Ai({},p.$set,((y={})["$product_tour_last_seen_date/"+b]=(new Date).toISOString(),y)))}var w=Ai({},p.properties.$set,p.$set);if($s(w)||this.setPersonPropertiesForFlags(w),!Us(this.config.before_send)){var S=this._runBeforeSend(p);if(!S)return;p=S}this._internalEventEmitter.emit("eventCaptured",p);var x={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==n?void 0:n._batchKey,transport:null==n?void 0:n.transport};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this._send_retriable_request(x):this._requestQueue.enqueue(x),p}Ju.critical("This capture call is ignored due to client rate limiting.")}}else Ju.error("No event name provided to posthog.capture")}else Ju.uninitializedWarning("posthog.capture")},t._addCaptureHook=function(e){return this.on("eventCaptured",(function(t){return e(t.event,t)}))},t.calculateEventProperties=function(e,t,n,r,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var o=i?void 0:this.persistence.remove_event_timer(e),s=Ai({},t);if(s.token=this.config.token,s.$config_defaults=this.config.defaults,this._inCookielessMode()&&(s.$cookieless_mode=!0),"$snapshot"===e){var a=Ai({},this.persistence.properties(),this.sessionPersistence.properties());return s.distinct_id=a.distinct_id,(!Ns(s.distinct_id)&&!Bs(s.distinct_id)||Hs(s.distinct_id))&&Ju.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),s}var u,l=function(e,t){var n,r,i,o;if(!Zu)return{};var s,a=e?[].concat(ap,t||[]):[],u=function(e){for(var t=0;eu.length>t;t++){var n=eu[t],r=n[1],i=n[0].exec(e),o=i&&(As(r)?r(i,e):r);if(o)return o}return["",""]}(Zu);return rl(al({$os:u[0],$os_version:u[1],$browser:Ka(Zu,navigator.vendor),$device:tu(Zu),$device_type:nu(Zu,{userAgentDataPlatform:null==(n=navigator)||null==(n=n.userAgentData)?void 0:n.platform,maxTouchPoints:null==(r=navigator)?void 0:r.maxTouchPoints,screenWidth:null==ju||null==(i=ju.screen)?void 0:i.width,screenHeight:null==ju||null==(o=ju.screen)?void 0:o.height,devicePixelRatio:null==ju?void 0:ju.devicePixelRatio}),$timezone:yp(),$timezone_offset:bp()}),{$current_url:Qc(null==zu?void 0:zu.href,a,lp),$host:null==zu?void 0:zu.host,$pathname:null==zu?void 0:zu.pathname,$raw_user_agent:Zu.length>1e3?Zu.substring(0,997)+"...":Zu,$browser_version:Ja(Zu,navigator.vendor),$browser_language:hp(),$browser_language_prefix:(s=hp(),"string"==typeof s?s.split("-")[0]:void 0),$screen_height:null==ju?void 0:ju.screen.height,$screen_width:null==ju?void 0:ju.screen.width,$viewport_height:null==ju?void 0:ju.innerHeight,$viewport_width:null==ju?void 0:ju.innerWidth,$lib:hs.LIB_NAME,$lib_version:hs.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var c=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime()),d=c.windowId;s.$session_id=c.sessionId,s.$window_id=d}this.sessionPropsManager&&rl(s,this.sessionPropsManager.getSessionProps());try{var f;this.sessionRecording&&rl(s,this.sessionRecording.sdkDebugProperties),s.$sdk_debug_retry_queue_size=null==(f=this._retryQueue)?void 0:f.length}catch(e){s.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===Ch&&(s.$lib_custom_api_host=this.config.api_host),u=e!==Oc||i?e!==Ac||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),s=rl(s,u),e===Oc&&Vu&&(s.title=Vu.title),!Ds(o)){var p=n.getTime()-o;s.$duration=parseFloat((p/1e3).toFixed(3))}Zu&&this.config.opt_out_useragent_filter&&(s.$browser_type=this._is_bot()?"bot":"browser"),(s=rl({},l,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),Os(this.config.property_denylist)?nl(this.config.property_denylist,(function(e){delete s[e]})):Ju.error(Nh+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var h=this.config.sanitize_properties;h&&(Ju.error(Dh),s=h(s,e));var _=this._hasPersonProcessing();return s.$process_person_profile=_,_&&!i&&this._requirePersonProcessing("_calculate_event_properties"),s},t._calculate_set_once_properties=function(e,t,n){var r;if(void 0===t&&(t=!0),void 0===n&&(n=!1),!this.persistence||!this._hasPersonProcessing())return e;if(this._personProcessingSetOncePropertiesSent&&!n)return e;var i=this.persistence.get_initial_props(),o=null==(r=this.sessionPropsManager)?void 0:r.getSetOnceProps(),s=rl({},i,o||{},e||{}),a=this.config.sanitize_properties;return a&&(Ju.error(Dh),s=a(s,"$set_once")),t&&(this._personProcessingSetOncePropertiesSent=!0),$s(s)?void 0:s},t.register=function(e,t){var n;null==(n=this.persistence)||n.register(e,t)},t.register_once=function(e,t,n){var r;null==(r=this.persistence)||r.register_once(e,t,n)},t.register_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.register(e)},t.unregister=function(e){var t;null==(t=this.persistence)||t.unregister(e)},t.unregister_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)},t._register_single=function(e,t){var n;this.register(((n={})[e]=t,n))},t.getFeatureFlag=function(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlag(e,t)},t.getFeatureFlagPayload=function(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)},t.getFeatureFlagResult=function(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlagResult(e,t)},t.isFeatureEnabled=function(e,t){var n;return null==(n=this.featureFlags)?void 0:n.isFeatureEnabled(e,t)},t.reloadFeatureFlags=function(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()},t.updateFlags=function(e,t,n){var r;null==(r=this.featureFlags)||r.updateFlags(e,t,n)},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(e,t,n)},t.getEarlyAccessFeatures=function(e,t,n){var r;return void 0===t&&(t=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(e,t,n)},t.on=function(e,t){return this._internalEventEmitter.on(e,t)},t.onFeatureFlags=function(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),function(){})},t.onSurveysLoaded=function(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:$h}),function(){})},t.onSessionId=function(e){var t,n;return null!==(t=null==(n=this.sessionManager)?void 0:n.onSessionId(e))&&void 0!==t?t:function(){}},t.getSurveys=function(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:$h})},t.getActiveMatchingSurveys=function(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:$h})},t.renderSurvey=function(e,t){var n;null==(n=this.surveys)||n.renderSurvey(e,t)},t.displaySurvey=function(e,t){var n;void 0===t&&(t=Fl),null==(n=this.surveys)||n.displaySurvey(e,t)},t.cancelPendingSurvey=function(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)},t.canRenderSurvey=function(e){var t,n;return null!==(t=null==(n=this.surveys)?void 0:n.canRenderSurvey(e))&&void 0!==t?t:{visible:!1,disabledReason:$h}},t.canRenderSurveyAsync=function(e,t){var n,r;return void 0===t&&(t=!1),null!==(n=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(e,t))&&void 0!==n?n:Promise.resolve({visible:!1,disabledReason:$h})},t._validateIdentifyId=function(e){return!e||Hs(e)?(Ju.critical("Unique user id has not been set in posthog.identify"),!1):e===Sc?(Ju.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(Ju.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)},t.identify=function(e,t,n){if(!this.__loaded||!this.persistence)return Ju.uninitializedWarning("posthog.identify");if(Bs(e)&&(e=e.toString(),Ju.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this._validateIdentifyId(e)&&this._requirePersonProcessing("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(Rl)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(Ml)&&(this.unregister(Ml),this.register({distinct_id:e}));var i,o=(this.persistence.get_property(hc)||Ic)===Ic;e!==r&&o?(this.persistence.set_property(hc,Fc),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(qc,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this._cachedPersonProperties=jd(e,t,n),null==(i=this.featureFlags)||i.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(cc))}},t.setPersonProperties=function(e,t){if((e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")){var n=jd(this.get_distinct_id(),e,t);this._cachedPersonProperties!==n?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this._cachedPersonProperties=n):Ju.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}},t.group=function(e,t,n){var r;if(e&&t){var i,o=this.getGroups(),s=o[e]!==t;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Ai({},o,(r={},r[e]=t,r))}),s||n){var a={$group_type:e,$group_key:t};n&&(a.$group_set=n),this.capture($c,a)}n&&this.setGroupPropertiesForFlags(((i={})[e]=n,i)),s&&!n&&this.reloadFeatureFlags()}else Ju.error("posthog.group requires a group type and group key")},t.resetGroups=function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()},t.setPersonPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0),null==(n=this.featureFlags)||n.setPersonPropertiesForFlags(e,t)},t.resetPersonPropertiesForFlags=function(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()},t.setGroupPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0),this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&(null==(n=this.featureFlags)||n.setGroupPropertiesForFlags(e,t))},t.resetGroupPropertiesForFlags=function(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)},t.reset=function(e){var t,n,r,i,o,s,a,u;if(Ju.info("reset"),!this.__loaded)return Ju.uninitializedWarning("posthog.reset");var l,c,d=this.get_property(Rl),f=this.get_property(Vl);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(n=this.sessionPersistence)||n.clear(),Ds(f)||null==(l=this.persistence)||l.register(((c={})[Vl]=f,c)),null==(r=this.surveys)||r.reset(),null==(i=this._remoteConfigLoader)||i.stop(),null==(o=this.featureFlags)||o.reset(),null==(s=this.conversations)||s.reset(),null==(a=this.persistence)||a.set_property(hc,Ic),null==(u=this.sessionManager)||u.resetSessionId(),this._cachedPersonProperties=null,this.config.cookieless_mode===Tc)this.register_once({distinct_id:Sc,$device_id:null},"");else{var p=this.config.get_device_id(Bc());this.register_once({distinct_id:p,$device_id:e?p:d},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()},t.setIdentity=function(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(n=this.conversations)||n._onIdentityChanged()},t.clearIdentity=function(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e._onIdentityCleared()},t.get_distinct_id=function(){return this.get_property("distinct_id")},t.getGroups=function(){return this.get_property("$groups")||{}},t.get_session_id=function(){var e,t;return null!==(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""},t.get_session_replay_url=function(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.sessionStartTimestamp,r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t.sessionId);if(null!=e&&e.withTimestamp&&n){var i,o=null!==(i=e.timestampLookBack)&&void 0!==i?i:10;if(!n)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-n)/1e3)-o,0)}return r},t.alias=function(e,t){return e===this.get_property(Ll)?(Ju.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(Ds(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Ml,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(Ju.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0},t.set_config=function(e){var t=Ai({},this.config);if(qs(e)){var n,r,i,o,s,a,u,l,c,d;rl(this.config,Vh(e));var f=this._is_persistence_disabled();null==(n=this.persistence)||n.update_config(this.config,t,f),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ch(Ai({},this.config,{persistence:"sessionStorage"}),f);var p=this._checkLocalStorageForDebug(this.config.debug);zs(p)&&(this.config.debug=p),zs(this.config.debug)&&(this.config.debug?(hs.DEBUG=!0,Qd._is_supported()&&Qd._set("ph_debug",!0),Ju.info("set_config",{config:e,oldConfig:t,newConfig:Ai({},this.config)})):(hs.DEBUG=!1,Qd._is_supported()&&Qd._remove("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(i=this.exceptions)||i.onConfigChange(),null==(o=this.sessionRecording)||o.startIfEnabledOrStop(),null==(s=this.autocapture)||s.startIfEnabled(),null==(a=this.heatmaps)||a.startIfEnabled(),null==(u=this.exceptionObserver)||u.startIfEnabledOrStop(),null==(l=this.deadClicksAutocapture)||l.startIfEnabledOrStop(),null==(c=this.surveys)||c.loadIfEnabled(),this._sync_opt_out_with_persistence(),null==(d=this.externalIntegrations)||d.startIfEnabledOrStop()}},t._overrideSDKInfo=function(e,t){hs.LIB_NAME=e,hs.LIB_VERSION=t},t.startSessionRecording=function(e){var t,n,r,i,o,s=!0===e,a={sampling:s||!(null==e||!e.sampling),linked_flag:s||!(null==e||!e.linked_flag),url_trigger:s||!(null==e||!e.url_trigger),event_trigger:s||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(n=this.sessionRecording)||n.overrideSampling()),a.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),a.url_trigger&&(null==(i=this.sessionRecording)||i.overrideTrigger("url")),a.event_trigger&&(null==(o=this.sessionRecording)||o.overrideTrigger("event")));this.set_config({disable_session_recording:!1})},t.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},t.sessionRecordingStarted=function(){var e;return!(null==(e=this.sessionRecording)||!e.started)},t.captureException=function(e,t){if(this.exceptions){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Ai({},r,t))}},t.addExceptionStep=function(e,t){var n;null==(n=this.exceptions)||n.addExceptionStep(e,t)},t.captureLog=function(e){var t;null==(t=this.logs)||t.captureLog(e)},t.startExceptionAutocapture=function(e){this.set_config({capture_exceptions:null==e||e})},t.stopExceptionAutocapture=function(){this.set_config({capture_exceptions:!1})},t.loadToolbar=function(e){var t,n;return null!==(t=null==(n=this.toolbar)?void 0:n.loadToolbar(e))&&void 0!==t&&t},t.get_property=function(e){var t;return null==(t=this.persistence)?void 0:t.props[e]},t.getSessionProperty=function(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]},t.toString=function(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:Hh;return t!==Hh&&(t=Hh+"."+t),t},t._isIdentified=function(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(hc))===Fc||(null==(t=this.sessionPersistence)?void 0:t.get_property(hc))===Fc},t._hasPersonProcessing=function(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===Lc&&!this._isIdentified()&&$s(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[Ml])&&(null==(t=this.persistence)||null==(t=t.props)||!t[bc]))},t._shouldCapturePageleave=function(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)},t.createPersonProfile=function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})},t.setInternalOrTestUser=function(){this._requirePersonProcessing("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})},t._requirePersonProcessing=function(e){return"never"===this.config.person_profiles?(Ju.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(bc,!0),!0)},t._is_persistence_disabled=function(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Pc)},t._sync_opt_out_with_persistence=function(){var e,t,n,r,i=this._is_persistence_disabled();return(null==(e=this.persistence)?void 0:e._disabled)!==i&&(null==(n=this.persistence)||n.set_disabled(i)),(null==(t=this.sessionPersistence)?void 0:t._disabled)!==i&&(null==(r=this.sessionPersistence)||r.set_disabled(i)),i},t.opt_in_capturing=function(t){var n;if(this.config.cookieless_mode!==Tc){if(this._inCookielessMode()){var r,i,o,s,a;this.reset(!0),null==(r=this.sessionManager)||r.destroy(),null==(i=this.pageViewManager)||i.destroy(),this.sessionManager=new kh(this),this.pageViewManager=new sh(this),this.persistence&&(this.sessionPropsManager=new wh(this,this.sessionManager,this.persistence));var u,l=null!==(o=null==(s=this.config.__extensionClasses)?void 0:s.sessionRecording)&&void 0!==o?o:null==(a=e.__defaultExtensionClasses)?void 0:a.sessionRecording;l&&(this.sessionRecording=this._replaceExtension(this.sessionRecording,new l(this)),this._lastRemoteConfig&&(null==(u=this.sessionRecording)||null==u.onRemoteConfig||u.onRemoteConfig(this._lastRemoteConfig)))}var c,d;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),this._start_queue_if_opted_in(),null==(n=this.sessionRecording)||n.startIfEnabledOrStop(),this.config.cookieless_mode==Pc&&(null==(c=this.surveys)||c.loadIfEnabled()),(Ds(null==t?void 0:t.captureEventName)||null!=t&&t.captureEventName)&&this.capture(null!==(d=null==t?void 0:t.captureEventName)&&void 0!==d?d:"$opt_in",null==t?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._captureInitialPageview()}else Ju.warn(qh)},t.opt_out_capturing=function(){var e,t,n;this.config.cookieless_mode!==Tc?(this.config.cookieless_mode===Pc&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this._sync_opt_out_with_persistence(),this.config.cookieless_mode===Pc&&(this.register({distinct_id:Sc,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this._captureInitialPageview())):Ju.warn(qh)},t.has_opted_in_capturing=function(){return this.consent.isOptedIn()},t.has_opted_out_capturing=function(){return this.consent.isOptedOut()},t.get_explicit_consent_status=function(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"},t.is_capturing=function(){return this.config.cookieless_mode===Tc||(this.config.cookieless_mode===Pc?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())},t.clear_opt_in_out_capturing=function(){this.consent.reset(),this._sync_opt_out_with_persistence()},t._is_bot=function(){return Bu?Eh(Bu,this.config.custom_blocked_useragents):void 0},t._captureInitialPageview=function(){Vu&&("visible"===Vu.visibilityState?this._initialPageviewCaptured||(this._initialPageviewCaptured=!0,this.capture(Oc,{title:Vu.title},{send_instantly:!0}),this._visibilityStateListener&&(Vu.removeEventListener(Rc,this._visibilityStateListener),this._visibilityStateListener=null)):this._visibilityStateListener||(this._visibilityStateListener=this._captureInitialPageview.bind(this),cl(Vu,Rc,this._visibilityStateListener)))},t.debug=function(e){!1===e?(null==ju||ju.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==ju||ju.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))},t._shouldDisableFlags=function(){var e,t,n,r,i,o,s=this._originalUserConfig||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(Ju.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",!1,r=Ju,i=(t="advanced_disable_flags")in(e=s)&&!Us(e[t]),o=n in e&&!Us(e[n]),i?e[t]:!!o&&(r&&r.warn("Config field '"+n+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[n]))},t._runBeforeSend=function(e){if(Us(this.config.before_send))return e;for(var t,n=e,r=Oi(Os(this.config.before_send)?this.config.before_send:[this.config.before_send]);!(t=r()).done;){if(n=(0,t.value)(n),Us(n)){var i="Event '"+e.event+"' was rejected in beforeSend function";return Gs(e.event)?Ju.warn(i+". This can cause unexpected behavior."):Ju.info(i),null}n.properties&&!$s(n.properties)||Ju.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return n},t.getPageViewId=function(){var e;return null==(e=this.pageViewManager._currentPageview)?void 0:e.pageViewId},t.captureTraceFeedback=function(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})},t.captureTraceMetric=function(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})},t._checkLocalStorageForDebug=function(e){var t=zs(e)&&!e,n=Qd._is_supported()&&"true"===Qd._get("ph_debug");return!t&&(!!n||e)},Mi(e,[{key:"decideEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}},{key:"flagsEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}},{key:"logger",get:function(){var t,n;return null!==(t=null==(n=this.logs)?void 0:n.logger)&&void 0!==t?t:e._noopLogger}}])}();Wh.__defaultExtensionClasses={},Wh._noopLogger={trace:ih=function(){},debug:ih,info:ih,warn:ih,error:ih,fatal:ih},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=sl(e.prototype[t[n]])}(Wh,["identify"]);var Gh=1,Yh=3,Qh=11;function Zh(e){return e instanceof Element&&(e.id===wc||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function Kh(e){return!!e&&e.nodeType===Gh}function Xh(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Jh(e){return!!e&&e.nodeType===Yh}function e_(e){return!!e&&e.nodeType===Qh&&Kh(e.host)}function t_(e){return e?Is(e).split(/\s+/):[]}function n_(e){var t=null==ju?void 0:ju.location.href;return!!(t&&e&&e.some((function(e){return t.match(e)})))}function r_(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return t_(t)}function i_(e){return Us(e)?null:Is(e).split(/(\s+)/).filter((function(e){return S_(e)})).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function o_(e){var t="";return h_(e)&&!__(e)&&e.childNodes&&e.childNodes.length&&nl(e.childNodes,(function(e){var n;Jh(e)&&e.textContent&&(t+=null!==(n=i_(e.textContent))&&void 0!==n?n:"")})),Is(t)}function s_(e){return Ds(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var a_=["a","button","form","input","select","textarea","label"];function u_(e,t){if(Ds(t))return!0;for(var n,r,i=function(){var e=r.value;if(t.some((function(t){return e.matches(t)})))return{v:!0}},o=Oi(e);!(r=o()).done;)if(n=i())return n.v;return!1}function l_(e){var t=e.parentNode;return!(!t||!Kh(t))&&t}var c_=["next","previous","prev",">","<"],d_=[".ph-no-rageclick",".ph-no-capture"];var f_=function(e){return!e||Xh(e,"html")||!Kh(e)},p_=function(e,t){if(!ju||f_(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!Xh(i,"body");)if(e_(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var o=l_(i);if(!o)break;if(t||a_.indexOf(o.tagName.toLowerCase())>-1)n=!0;else{var s=ju.getComputedStyle(o);s&&"pointer"===s.getPropertyValue("cursor")&&(n=!0)}r.push(o),i=o}return{parentIsUsefulElement:n,targetElementList:r}};function h_(e){for(var t=e;t.parentNode&&!Xh(t,"body");t=t.parentNode){var n=r_(t);if(Ts(n,"ph-sensitive")||Ts(n,"ph-no-capture"))return!1}if(Ts(r_(e),"ph-include"))return!0;var r=e.type||"";if(Ns(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!Ns(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 __(e){return!!(Xh(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Xh(e,"select")||Xh(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var v_="(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})",g_=new RegExp("^(?:"+v_+")$"),m_=new RegExp(v_),y_="\\d{3}-?\\d{2}-?\\d{4}",b_=new RegExp("^("+y_+")$"),w_=new RegExp("("+y_+")");function S_(e,t){if(void 0===t&&(t=!0),Us(e))return!1;if(Ns(e)){if(e=Is(e),(t?g_:m_).test((e||"").replace(/[- ]/g,"")))return!1;if((t?b_:w_).test(e))return!1}return!0}function x_(e){var t=o_(e);return S_(t=(t+" "+k_(e)).trim())?t:""}function k_(e){var t="";return e&&e.childNodes&&e.childNodes.length&&nl(e.childNodes,(function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=o_(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+k_(e)).trim())}catch(e){Ju.error("[AutoCapture]",e)}})),t}function E_(e){return e.replace(/"|\\"/g,'\\"')}function C_(e){var t=e.attr__class;return t?Os(t)?t:t_(t):void 0}var P_=function(){function e(e){this.disabled=!1===e;var t=qs(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}return e.prototype.isRageClick=function(e,t,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1},e}(),T_="$copy_autocapture",I_=el("[AutoCapture]");function F_(e,t){return t.length>e?t.slice(0,e)+"...":t}function L_(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Kh(t));return t}function R_(e,t){var n,r,i=t.e,o=t.maskAllElementAttributes,s=t.maskAllText,a=t.elementAttributeIgnoreList,u=t.elementsChainAsString;if(!Kh(e))return{props:{}};for(var l=[e],c=e;c.parentNode&&!Xh(c,"body");)if(e_(c.parentNode))l.push(c.parentNode.host),c=c.parentNode.host;else{if(!Kh(c.parentNode))break;l.push(c.parentNode),c=c.parentNode}var d,f,p=[],h={},_=!1,v=!1;if(nl(l,(function(e){var t=h_(e);if(Xh(e,"a")){var n=e.getAttribute("href");_=t&&!!n&&S_(n)&&n}Ts(r_(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,n,r){var i=e.tagName.toLowerCase(),o={tag_name:i};a_.indexOf(i)>-1&&!n&&(o.$el_text="a"===i.toLowerCase()||"button"===i.toLowerCase()?F_(1024,x_(e)):F_(1024,o_(e)));var s=r_(e);s.length>0&&(o.classes=s.filter((function(e){return""!==e}))),nl(e.attributes,(function(n){var i;if((!__(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&(null==r||!r.includes(n.name))&&!t&&S_(n.value)&&(!Ns(i=n.name)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7))){var s=n.value;"class"===n.name&&(s=t_(s).join(" ")),o["attr__"+n.name]=F_(1024,s)}}));for(var a=1,u=1,l=e;l=L_(l);)a++,l.tagName===e.tagName&&u++;return o.nth_child=a,o.nth_of_type=u,o}(e,o,s,a));var r=function(e){if(!h_(e))return{};var t={};return nl(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&&S_(r)&&(t[n]=r)}})),t}(e);rl(h,r)})),v)return{props:{},explicitNoCapture:v};if(s||(p[0].$el_text=Xh(e,"a")||Xh(e,"button")?x_(e):o_(e)),_){var g,m;p[0].attr__href=_;var y=null==(g=Gc(_))?void 0:g.host,b=null==ju||null==(m=ju.location)?void 0:m.host;y&&b&&y!==b&&(d=_)}return{props:rl({$event_type:i.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:(f=p,function(e){return e.map((function(e){var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class){e.attr_class.sort();for(var i,o=Oi(e.attr_class);!(i=o()).done;)r+="."+i.value.replace(/"/g,"")}var s=Ai({},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),a={};return il(s).sort((function(e,t){return e[0].localeCompare(t[0])})).forEach((function(e){var t=e[1];return a[E_(e[0].toString())]=E_(t.toString())})),(r+=":")+il(a).map((function(e){return e[0]+'="'+e[1]+'"'})).join("")})).join(";")}(function(e){return e.map((function(e){var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:C_(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return il(e).filter((function(e){return 0===e[0].indexOf("attr__")})).forEach((function(e){return r.attributes[e[0]]=e[1]})),r}))}(f)))},null!=(n=p[0])&&n.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===i.type?{$external_click_url:d}:{},h)}}var M_=function(){function e(e){this._initialized=!1,this._isDisabledServerSide=null,this._elementsChainAsString=!1,this.instance=e,this.rageclicks=new P_(e.config.rageclick),this._elementSelectors=null}var t=e.prototype;return t.initialize=function(){this.startIfEnabled()},t._addDomEventHandlers=function(){var e=this;if(this.isBrowserSupported()){if(ju&&Vu){var t=function(t){t=t||(null==ju?void 0:ju.event);try{e._captureEvent(t)}catch(e){I_.error("Failed to capture event",e)}};if(cl(Vu,"submit",t,{capture:!0}),cl(Vu,"change",t,{capture:!0}),cl(Vu,"click",t,{capture:!0}),this._config.capture_copied_text){var n=function(t){t=t||(null==ju?void 0:ju.event);try{e._captureEvent(t,T_)}catch(e){I_.error("Failed to capture copy/cut event",e)}};cl(Vu,"copy",n,{capture:!0}),cl(Vu,"cut",n,{capture:!0})}}}else I_.info("Disabling Automatic Event Collection because this browser is not supported")},t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)},t.onRemoteConfig=function(e){var t;e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register(((t={})[Al]=!!e.autocapture_opt_out,t)),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()},t.setElementSelectors=function(e){this._elementSelectors=e},t.getElementSelectors=function(e){var t,n=[];return null==(t=this._elementSelectors)||t.forEach((function(t){var r=null==Vu?void 0:Vu.querySelectorAll(t);null==r||r.forEach((function(r){e===r&&n.push(t)}))})),n},t._captureEvent=function(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var n,r=s_(e);Jh(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,t){if(!ju||f_(e))return!1;var n,r,i;if(zs(t)?(n=!!t&&d_,r=void 0):(n=null!==(i=null==t?void 0:t.css_selector_ignorelist)&&void 0!==i?i:d_,r=null==t?void 0:t.content_ignorelist),!1===n)return!1;var o=p_(e,!1).targetElementList;return!function(e,t){if(!1===e||Ds(e))return!1;var n;if(!0===e)n=c_;else{if(!Os(e))return!1;if(e.length>10)return Ju.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;n=e.map((function(e){return e.toLowerCase()}))}return t.some((function(e){var t=e.safeText,r=e.ariaLabel;return n.some((function(e){return t.includes(e)||r.includes(e)}))}))}(r,o.map((function(e){var t;return{safeText:o_(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}})))&&!u_(o,n)}(r,this.instance.config.rageclick)&&this._captureEvent(e,"$rageclick");var i=t===T_;if(r&&function(e,t,n,r,i){var o,s,a,u;if(void 0===n&&(n=void 0),!ju||f_(e))return!1;if(null!=(o=n)&&o.url_allowlist&&!n_(n.url_allowlist))return!1;if(null!=(s=n)&&s.url_ignorelist&&n_(n.url_ignorelist))return!1;if(null!=(a=n)&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some((function(e){return t.type===e})))return!1}var c=p_(e,r),d=c.parentIsUsefulElement,f=c.targetElementList;if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(Ds(n))return!0;for(var r,i,o=function(){var e=i.value;if(n.some((function(t){return e.tagName.toLowerCase()===t})))return{v:!0}},s=Oi(e);!(i=s()).done;)if(r=o())return r.v;return!1}(f,n))return!1;if(!u_(f,null==(u=n)?void 0:u.css_selector_allowlist))return!1;var p=ju.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var h=e.tagName.toLowerCase();switch(h){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 d?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(a_.indexOf(h)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this._config,i,i?["copy","cut"]:void 0)){var o=R_(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:this._elementsChainAsString}),s=o.props;if(o.explicitNoCapture)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(s.$element_selectors=a),t===T_){var u,l=i_(null==ju||null==(u=ju.getSelection())?void 0:u.toString()),c=e.type||"clipboard";if(!l)return!1;s.$selected_content=l,s.$copy_type=c}return this.instance.capture(t,s),!0}}},t.isBrowserSupported=function(){return As(null==Vu?void 0:Vu.querySelectorAll)},Mi(e,[{key:"_config",get:function(){var e,t,n=qs(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=null==(e=n.url_allowlist)?void 0:e.map((function(e){return new RegExp(e)})),n.url_ignorelist=null==(t=n.url_ignorelist)?void 0:t.map((function(e){return new RegExp(e)})),n}},{key:"isEnabled",get:function(){var e,t,n=null==(e=this.instance.persistence)?void 0:e.props[Al];if(js(this._isDisabledServerSide)&&!zs(n)&&!this.instance._shouldDisableFlags())return!1;var r=null!==(t=this._isDisabledServerSide)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!r}}])}(),O_=el("[ExceptionAutocapture]"),A_=function(){function e(e){var t,n,r,i=this;this._startCapturing=function(){var e;if(ju&&i.isEnabled&&null!=(e=Ku.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=Ku.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=Ku.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=Ku.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!i._unwrapOnError&&i._config.capture_unhandled_errors&&(i._unwrapOnError=t(i.captureException.bind(i))),!i._unwrapUnhandledRejection&&i._config.capture_unhandled_rejections&&(i._unwrapUnhandledRejection=n(i.captureException.bind(i))),!i._unwrapConsoleError&&i._config.capture_console_errors&&(i._unwrapConsoleError=r(i.captureException.bind(i)))}catch(e){O_.error("failed to start",e),i._stopCapturing()}}},this._instance=e,this._remoteEnabled=!(null==(t=this._instance.persistence)||!t.props[$l]),this._rateLimiter=new oa({refillRate:null!==(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==n?n:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,_logger:O_}),this._config=this._requiredConfig(),this.startIfEnabledOrStop()}var t=e.prototype;return t._requiredConfig=function(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qs(e)?t=Ai({},t,e):(Ds(e)?this._remoteEnabled:e)&&(t=Ai({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t},t.startIfEnabledOrStop=function(){this.isEnabled?(O_.info("enabled"),this._stopCapturing(),this._loadScript(this._startCapturing)):this._stopCapturing()},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"exception-autocapture",(function(t){if(t)return O_.error("failed to load script",t);e()}))},t._stopCapturing=function(){var e,t,n;null==(e=this._unwrapOnError)||e.call(this),this._unwrapOnError=void 0,null==(t=this._unwrapUnhandledRejection)||t.call(this),this._unwrapUnhandledRejection=void 0,null==(n=this._unwrapConsoleError)||n.call(this),this._unwrapConsoleError=void 0},t.onRemoteConfig=function(e){var t;"autocaptureExceptions"in e&&(this._remoteEnabled=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register(((t={})[$l]=this._remoteEnabled,t)),this._config=this._requiredConfig(),this.startIfEnabledOrStop())},t.onConfigChange=function(){this._config=this._requiredConfig()},t.captureException=function(e){var t,n,r,i=null!==(t=null==e||null==(n=e.$exception_list)||null==(n=n[0])?void 0:n.type)&&void 0!==t?t:"Exception";this._rateLimiter.consumeRateLimit(i)?O_.info("Skipping exception capture because of client rate limiting.",{exception:i}):null==(r=this._instance.exceptions)||r.sendExceptionEvent(e)},Mi(e,[{key:"isEnabled",get:function(){return this._config.capture_console_errors||this._config.capture_unhandled_errors||this._config.capture_unhandled_rejections}}])}(),q_=function(){function e(e){var t;this._instance=e,this._lastPathname=(null==ju||null==(t=ju.location)?void 0:t.pathname)||""}var t=e.prototype;return t.initialize=function(){this.startIfEnabled()},t.startIfEnabled=function(){this.isEnabled&&(Ju.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())},t.stop=function(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0,Ju.info("History API monitoring stopped")},t.monitorHistoryChanges=function(){var e,t;if(ju&&ju.history){var n=this;null!=(e=ju.history.pushState)&&e.__posthog_wrapped__||Up(ju.history,"pushState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("pushState")}})),null!=(t=ju.history.replaceState)&&t.__posthog_wrapped__||Up(ju.history,"replaceState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("replaceState")}})),this._setupPopstateListener()}},t._capturePageview=function(e){try{var t,n=null==ju||null==(t=ju.location)?void 0:t.pathname;if(!n)return;n!==this._lastPathname&&this.isEnabled&&this._instance.capture(Oc,{navigation_type:e}),this._lastPathname=n}catch(t){Ju.error("Error capturing "+e+" pageview",t)}},t._setupPopstateListener=function(){var e=this;if(!this._popstateListener){var t=function(){e._capturePageview("popstate")};cl(ju,"popstate",t),this._popstateListener=function(){ju&&ju.removeEventListener("popstate",t)}}},Mi(e,[{key:"isEnabled",get:function(){return"history_change"===this._instance.config.capture_pageview}}])}(),$_=el("[TracingHeaders]"),D_=function(){function e(e){var t=this;this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0,this._startCapturing=function(){var e,n,r=t._getConfiguredHostnames()||[];Ds(t._restoreXHRPatch)&&(null==(e=Ku.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(r,t._instance.get_distinct_id(),t._instance.sessionManager)),Ds(t._restoreFetchPatch)&&(null==(n=Ku.__PosthogExtensions__)||null==(n=n.tracingHeadersPatchFns)||n._patchFetch(r,t._instance.get_distinct_id(),t._instance.sessionManager))},this._instance=e}var t=e.prototype;return t.initialize=function(){this.startIfEnabledOrStop()},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"tracing-headers",(function(t){if(t)return $_.error("failed to load script",t);e()}))},t._getConfiguredHostnames=function(){var e;return null!==(e=this._instance.config.addTracingHeaders)&&void 0!==e?e:this._instance.config.__add_tracing_headers},t.startIfEnabledOrStop=function(){var e,t;this._getConfiguredHostnames()?this._loadScript(this._startCapturing):(null==(e=this._restoreXHRPatch)||e.call(this),null==(t=this._restoreFetchPatch)||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)},e}(),N_=el("[Web Vitals]"),H_=9e5,j_=function(){function e(e){var t,n=this;this._enabledServerSide=!1,this._initialized=!1,this._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0},this._flushToCapture=function(){clearTimeout(n._delayedFlushTimer),0!==n._buffer.metrics.length&&(n._instance.capture("$web_vitals",n._buffer.metrics.reduce((function(e,t){var n;return Ai({},e,((n={})["$web_vitals_"+t.name+"_event"]=Ai({},t),n["$web_vitals_"+t.name+"_value"]=t.value,n))}),{})),n._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this._addToBuffer=function(e){var t;n._buffer=n._buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=n._currentURL();if(!Ds(r))if(Us(null==e?void 0:e.name)||Us(null==e?void 0:e.value))N_.error("Invalid metric received",e);else if(!n._maxAllowedValue||n._maxAllowedValue>e.value){n._buffer.url!==r&&(n._flushToCapture(),n._delayedFlushTimer=setTimeout(n._flushToCapture,n.flushToCaptureTimeoutMs)),Ds(n._buffer.url)&&(n._buffer.url=r),n._buffer.firstMetricTimestamp=Ds(n._buffer.firstMetricTimestamp)?Date.now():n._buffer.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var i=null==(t=n._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),o=Ai({},e,{$current_url:r,timestamp:Date.now()});Ds(i)||(o.$session_id=i.sessionId,o.$window_id=i.windowId),n._buffer.metrics.push(o),n._buffer.metrics.length===n.allowedMetrics.length&&n._flushToCapture()}else N_.error("Ignoring metric with value >= "+n._maxAllowedValue,e)},this._startCapturing=function(){if(!n._initialized){var e,t,r,i,o=Ku.__PosthogExtensions__;if(!Ds(o)&&!Ds(o.postHogWebVitalsCallbacks)){var s=o.postHogWebVitalsCallbacks;e=s.onLCP,t=s.onCLS,r=s.onFCP,i=s.onINP}e&&t&&r&&i?(n.allowedMetrics.indexOf("LCP")>-1&&e(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("CLS")>-1&&t(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("FCP")>-1&&r(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("INP")>-1&&i(n._addToBuffer.bind(n)),n._initialized=!0):N_.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this._enabledServerSide=!(null==(t=this._instance.persistence)||!t.props[Hl]),this.startIfEnabled()}var t=e.prototype;return t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(N_.info("enabled, starting..."),this._loadScript(this._startCapturing))},t.onRemoteConfig=function(e){if("capturePerformance"in e){var t,n,r=qs(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=qs(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register(((t={})[Hl]=r,t)),this._instance.persistence.register(((n={})[Bl]=i,n))),this._enabledServerSide=r,this.startIfEnabled()}},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(function(t){t?N_.error("failed to load script",t):e()}))},t._currentURL=function(){var e=ju?ju.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties?[].concat(ap,this._instance.config.custom_personal_data_properties||[]):[];return Qc(e,t,lp)}N_.error("Could not determine current URL")},Mi(e,[{key:"_perfConfig",get:function(){return this._instance.config.capture_performance}},{key:"allowedMetrics",get:function(){var e,t,n=qs(this._perfConfig)?null==(e=this._perfConfig)?void 0:e.web_vitals_allowed_metrics:void 0;return Us(n)?(null==(t=this._instance.persistence)?void 0:t.props[Bl])||["CLS","FCP","INP","LCP"]:n}},{key:"flushToCaptureTimeoutMs",get:function(){return(qs(this._perfConfig)?this._perfConfig.web_vitals_delayed_flush_ms:void 0)||5e3}},{key:"useAttribution",get:function(){var e=qs(this._perfConfig)?this._perfConfig.web_vitals_attribution:void 0;return null!=e&&e}},{key:"_maxAllowedValue",get:function(){var e=qs(this._perfConfig)&&Bs(this._perfConfig.__web_vitals_max_value)?this._perfConfig.__web_vitals_max_value:H_;return e>0&&6e4>=e?H_:e}},{key:"isEnabled",get:function(){var e=null==zu?void 0:zu.protocol;if("http:"!==e&&"https:"!==e)return N_.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=qs(this._perfConfig)?this._perfConfig.web_vitals:zs(this._perfConfig)?this._perfConfig:void 0;return zs(t)?t:this._enabledServerSide}}])}(),U_="disabled",B_="lazy_loading",V_="awaiting_config",z_="missing_config";el("[SessionRecording]"),el("[SessionRecording]");var W_="[SessionRecording]",G_=el(W_),Y_=function(){function e(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._recordingStatus=U_,this._persistFlagsOnSessionListener=void 0,this._instance=e,!this._instance.sessionManager)throw G_.error("started without valid sessionManager"),new Error(W_+" started without valid sessionManager. This is a bug.");if(this._config.cookieless_mode===Tc)throw new Error(W_+' cannot be used with cookieless_mode="always"')}var t=e.prototype;return t.initialize=function(){this.startIfEnabledOrStop()},t.startIfEnabledOrStop=function(e){var t;if(!this._isRecordingEnabled||null==(t=this._lazyLoadedSessionRecording)||!t.isStarted){var n=!Ds(Object.assign)&&!Ds(Array.from);this._isRecordingEnabled&&n?(this._lazyLoadAndStart(e),G_.info("starting")):(this._recordingStatus=U_,this.stopRecording())}},t._lazyLoadAndStart=function(e){var t,n,r,i=this;this._isRecordingEnabled&&(this._recordingStatus!==V_&&this._recordingStatus!==z_&&(this._recordingStatus=B_),null!=Ku&&null!=(t=Ku.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(n=Ku.__PosthogExtensions__)&&n.initSessionRecording?this._onScriptLoaded(e):null==(r=Ku.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this._scriptName,(function(t){if(t)return G_.error("could not load recorder",t);i._onScriptLoaded(e)})))},t.stopRecording=function(){var e,t;null==(e=this._persistFlagsOnSessionListener)||e.call(this),this._persistFlagsOnSessionListener=void 0,null==(t=this._lazyLoadedSessionRecording)||t.stop()},t._discardRecording=function(){var e,t;null==(e=this._persistFlagsOnSessionListener)||e.call(this),this._persistFlagsOnSessionListener=void 0,null==(t=this._lazyLoadedSessionRecording)||t.discard()},t._resetSampling=function(){var e;null==(e=this._persistence)||e.unregister(Zl)},t._validateSampleRate=function(e,t){if(Us(e))return null;var n,r=Bs(e)?e:parseFloat(e);return"number"!=typeof(n=r)||!Number.isFinite(n)||0>n||n>1?(G_.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r},t._persistRemoteConfig=function(e){var t=this;if(this._persistence){var n,r,i=this._persistence,o=function(){var n,r,o=!1===e.sessionRecording?void 0:e.sessionRecording,s=t._validateSampleRate(null==(n=t._config.session_recording)?void 0:n.sampleRate,"session_recording.sampleRate"),a=t._validateSampleRate(null==o?void 0:o.sampleRate,"remote config sampleRate"),u=null!=s?s:a;Us(u)&&t._resetSampling();var l=null==o?void 0:o.minimumDurationMilliseconds;i.register(((r={})[Vl]=Ai({cache_timestamp:Date.now(),enabled:!!o},o,{networkPayloadCapture:Ai({capturePerformance:e.capturePerformance},null==o?void 0:o.networkPayloadCapture),canvasRecording:{enabled:null==o?void 0:o.recordCanvas,fps:null==o?void 0:o.canvasFps,quality:null==o?void 0:o.canvasQuality},sampleRate:u,minimumDurationMilliseconds:Ds(l)?null:l,endpoint:null==o?void 0:o.endpoint,triggerMatchType:null==o?void 0:o.triggerMatchType,masking:null==o?void 0:o.masking,urlTriggers:null==o?void 0:o.urlTriggers,version:null==o?void 0:o.version,triggerGroups:null==o?void 0:o.triggerGroups}),r))};o(),null==(n=this._persistFlagsOnSessionListener)||n.call(this),this._persistFlagsOnSessionListener=null==(r=this._instance.sessionManager)?void 0:r.onSessionId(o)}},t.onRemoteConfig=function(e){return"sessionRecording"in e?!1===e.sessionRecording?(this._persistRemoteConfig(e),void this._discardRecording()):(this._persistRemoteConfig(e),void this.startIfEnabledOrStop()):(this._recordingStatus===V_&&(this._recordingStatus=z_,G_.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())},t.log=function(e,t){var n;void 0===t&&(t="log"),null!=(n=this._lazyLoadedSessionRecording)&&n.log?this._lazyLoadedSessionRecording.log(e,t):G_.warn("log called before recorder was ready")},t._isRemoteConfigFresh=function(){var e,t,n=this._instance.get_property(Vl);if(!n)return!1;try{t="object"==typeof n?n:JSON.parse(n)}catch(e){return G_.warn("persisted remote config for session recording is invalid and will be ignored",e),!1}var r=null!==(e=t.cache_timestamp)&&void 0!==e?e:Date.now();return 36e5>=Date.now()-r},t._onScriptLoaded=function(e){var t,n,r;if(null==(t=Ku.__PosthogExtensions__)||!t.initSessionRecording)return G_.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session((n={},n[Ec]=!0,n));if(this._lazyLoadedSessionRecording||(this._lazyLoadedSessionRecording=null==(r=Ku.__PosthogExtensions__)?void 0:r.initSessionRecording(this._instance),this._lazyLoadedSessionRecording._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this._isRemoteConfigFresh()){if(this._recordingStatus===z_||this._recordingStatus===V_)return;return this._recordingStatus=V_,G_.info("persisted remote config is stale, requesting fresh config before starting"),void new hh(this._instance).load()}this._recordingStatus=B_,this._lazyLoadedSessionRecording.start(e)},t.onRRwebEmit=function(e){var t;null==(t=this._lazyLoadedSessionRecording)||null==t.onRRwebEmit||t.onRRwebEmit(e)},t.overrideLinkedFlag=function(){var e,t,n;this._lazyLoadedSessionRecording||null==(t=this._persistence)||t.register(((n={})[Wl]=!0,n)),null==(e=this._lazyLoadedSessionRecording)||e.overrideLinkedFlag()},t.overrideSampling=function(){var e,t,n;this._lazyLoadedSessionRecording||null==(t=this._persistence)||t.register(((n={})[zl]=!0,n)),null==(e=this._lazyLoadedSessionRecording)||e.overrideSampling()},t.overrideTrigger=function(e){var t,n,r;this._lazyLoadedSessionRecording||null==(n=this._persistence)||n.register(((r={})["url"===e?Gl:Yl]=!0,r)),null==(t=this._lazyLoadedSessionRecording)||t.overrideTrigger(e)},t.tryAddCustomEvent=function(e,t){var n;return!(null==(n=this._lazyLoadedSessionRecording)||!n.tryAddCustomEvent(e,t))},Mi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"_persistence",get:function(){return this._instance.persistence}},{key:"started",get:function(){var e;return!(null==(e=this._lazyLoadedSessionRecording)||!e.isStarted)}},{key:"status",get:function(){var e,t;return this._recordingStatus===V_||this._recordingStatus===z_?this._recordingStatus:null!==(e=null==(t=this._lazyLoadedSessionRecording)?void 0:t.status)&&void 0!==e?e:this._recordingStatus}},{key:"_isRecordingEnabled",get:function(){var e,t=!(null==(e=this._instance.get_property(Vl))||!e.enabled),n=!this._config.disable_session_recording,r=this._config.disable_session_recording||this._instance.consent.isOptedOut();return ju&&t&&n&&!r}},{key:"_scriptName",get:function(){var e,t,n=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(Vl);return(null==n||null==(t=n.scriptConfig)?void 0:t.script)||"lazy-recorder"}},{key:"sdkDebugProperties",get:function(){var e;return(null==(e=this._lazyLoadedSessionRecording)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}}])}(),Q_=el("[Heatmaps]");function Z_(e){return qs(e)&&"clientX"in e&&"clientY"in e&&Bs(e.clientX)&&Bs(e.clientY)}var K_=function(){function e(e){var t;this._enabledServerSide=!1,this._initialized=!1,this._flushInterval=null,this.instance=e,this._enabledServerSide=!(null==(t=this.instance.persistence)||!t.props[ql]),this.rageclicks=new P_(e.config.rageclick)}var t=e.prototype;return t.initialize=function(){this.startIfEnabled()},t.startIfEnabled=function(){if(this.isEnabled){if(this._initialized)return;Q_.info("starting..."),this._setupListeners(),this._onVisibilityChange()}else{var e;clearInterval(null!==(e=this._flushInterval)&&void 0!==e?e:void 0),this._removeListeners(),this.getAndClearBuffer()}},t.onRemoteConfig=function(e){if("heatmaps"in e){var t,n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register(((t={})[ql]=n,t)),this._enabledServerSide=n,this.startIfEnabled()}},t.getAndClearBuffer=function(){var e=this._buffer;return this._buffer=void 0,e},t._onDeadClick=function(e){this._onClick(e.originalEvent,"deadclick")},t._onVisibilityChange=function(){this._flushInterval&&clearInterval(this._flushInterval),this._flushInterval=function(e){return"visible"===(null==e?void 0:e.visibilityState)}(Vu)?setInterval(this._flush.bind(this),this.flushIntervalMilliseconds):null},t._setupListeners=function(){var e=this;ju&&Vu&&(this._flushHandler=this._flush.bind(this),cl(ju,Mc,this._flushHandler),this._onClickHandler=function(t){return e._onClick(t||(null==ju?void 0:ju.event))},cl(Vu,"click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler=function(t){return e._onMouseMove(t||(null==ju?void 0:ju.event))},cl(Vu,"mousemove",this._onMouseMoveHandler,{capture:!0}),this._deadClicksCapture=new Jp(this.instance,Kp,this._onDeadClick.bind(this)),this._deadClicksCapture.startIfEnabledOrStop(),this._onVisibilityChange_handler=this._onVisibilityChange.bind(this),cl(Vu,Rc,this._onVisibilityChange_handler),this._initialized=!0)},t._removeListeners=function(){var e;ju&&Vu&&(this._flushHandler&&ju.removeEventListener(Mc,this._flushHandler),this._onClickHandler&&Vu.removeEventListener("click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler&&Vu.removeEventListener("mousemove",this._onMouseMoveHandler,{capture:!0}),this._onVisibilityChange_handler&&Vu.removeEventListener(Rc,this._onVisibilityChange_handler),clearTimeout(this._mouseMoveTimeout),null==(e=this._deadClicksCapture)||e.stop(),this._initialized=!1)},t._getProperties=function(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),o=function(e,t,n){for(var r=e;r&&Kh(r)&&!Xh(r,"body");){if(r===n)return!1;if(Ts(t,null==ju?void 0:ju.getComputedStyle(r).position))return!0;r=l_(r)}return!1}(s_(e),["fixed","sticky"],i);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:n),target_fixed:o,type:t}},t._onClick=function(e,t){var n;if(void 0===t&&(t="click"),!Zh(e.target)&&Z_(e)){var r=this._getProperties(e,t);null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._capture(Ai({},r,{type:"rageclick"})),this._capture(r)}},t._onMouseMove=function(e){var t=this;!Zh(e.target)&&Z_(e)&&(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout((function(){t._capture(t._getProperties(e,"mousemove"))}),500))},t._capture=function(e){if(ju){var t=ju.location.href,n=this._config.mask_personal_data_properties?[].concat(ap,this._config.custom_personal_data_properties||[]):[],r=Qc(t,n,lp);this._buffer=this._buffer||{},this._buffer[r]||(this._buffer[r]=[]),this._buffer[r].push(e)}},t._flush=function(){this._buffer&&!$s(this._buffer)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})},Mi(e,[{key:"_config",get:function(){return this.instance.config}},{key:"flushIntervalMilliseconds",get:function(){var e=5e3;return qs(this._config.capture_heatmaps)&&this._config.capture_heatmaps.flush_interval_milliseconds&&(e=this._config.capture_heatmaps.flush_interval_milliseconds),e}},{key:"isEnabled",get:function(){return Us(this._config.capture_heatmaps)?Us(this._config.enable_heatmaps)?this._enabledServerSide:this._config.enable_heatmaps:!1!==this._config.capture_heatmaps}}])}(),X_=el("[Product Tours]"),J_=function(){function e(e){this._productTourManager=null,this._cachedTours=null,this._instance=e}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){var t;"productTours"in e&&(this._persistence&&this._persistence.register(((t={})[Ul]=!!e.productTours,t)),this.loadIfEnabled())},t.loadIfEnabled=function(){var e,t,n=this;this._productTourManager||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(Ul)||this._loadScript((function(){return n._startProductTours()}))},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.generateProductTours?e():null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"product-tours",(function(t){t?X_.error("Could not load product tours script",t):e()}))},t._startProductTours=function(){var e;!this._productTourManager&&null!=(e=Ku.__PosthogExtensions__)&&e.generateProductTours&&(this._productTourManager=Ku.__PosthogExtensions__.generateProductTours(this._instance,!0))},t.getProductTours=function(e,t){var n=this;if(void 0===t&&(t=!1),!Os(this._cachedTours)||t){var r=this._persistence;if(r){var i=r.props[lc];if(Os(i)&&!t)return this._cachedTours=i,void e(i,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:function(t){var i=t.statusCode;if(200!==i||!t.json){var o="Product Tours API could not be loaded, status: "+i;return X_.error(o),void e([],{isLoaded:!1,error:o})}var s,a=Os(t.json.product_tours)?t.json.product_tours:[];n._cachedTours=a,r&&r.register(((s={})[lc]=a,s)),e(a,{isLoaded:!0})}})}else e(this._cachedTours,{isLoaded:!0})},t.getActiveProductTours=function(e){Us(this._productTourManager)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this._productTourManager.getActiveProductTours(e)},t.showProductTour=function(e){var t;null==(t=this._productTourManager)||t.showTourById(e)},t.previewTour=function(e){var t=this;this._productTourManager?this._productTourManager.previewTour(e):this._loadScript((function(){var n;t._startProductTours(),null==(n=t._productTourManager)||n.previewTour(e)}))},t.dismissProductTour=function(){var e;null==(e=this._productTourManager)||e.dismissTour("user_clicked_skip")},t.nextStep=function(){var e;null==(e=this._productTourManager)||e.nextStep()},t.previousStep=function(){var e;null==(e=this._productTourManager)||e.previousStep()},t.clearCache=function(){var e;this._cachedTours=null,null==(e=this._persistence)||e.unregister(lc)},t.resetTour=function(e){var t;null==(t=this._productTourManager)||t.resetTour(e)},t.resetAllTours=function(){var e;null==(e=this._productTourManager)||e.resetAllTours()},t.cancelPendingTour=function(e){var t;null==(t=this._productTourManager)||t.cancelPendingTour(e)},Mi(e,[{key:"_persistence",get:function(){return this._instance.persistence}}])}(),ev=["$set_once","$set"],tv=el("[SiteApps]"),nv="Error while initializing PostHog app with config id ",rv=function(){function e(e){this._instance=e,this._bufferedInvocations=[],this.apps={}}var t=e.prototype;return t._eventCollector=function(e,t){if(t){var n=this.globalsForEvent(t);this._bufferedInvocations.push(n),this._bufferedInvocations.length>1e3&&(this._bufferedInvocations=this._bufferedInvocations.slice(10))}},t.initialize=function(){var e=this;if(this.isEnabled){var t=this._instance._addCaptureHook(this._eventCollector.bind(this));this._stopBuffering=function(){t(),e._bufferedInvocations=[],e._stopBuffering=void 0}}},t.globalsForEvent=function(e){var t,n,r,i,o,s,a;if(!e)throw new Error("Event payload is required");for(var u={},l=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{},d=0,f=Object.entries(c);f.length>d;d++){var p=f[d],h=p[0];u[h]={id:l[h],type:h,properties:p[1]}}var _=e.$set_once,v=e.$set;return{event:Ai({},qi(e,ev),{properties:Ai({},e.properties,v?{$set:Ai({},null!==(t=null==(n=e.properties)?void 0:n.$set)&&void 0!==t?t:{},v)}:{},_?{$set_once:Ai({},null!==(r=null==(i=e.properties)?void 0:i.$set_once)&&void 0!==r?r:{},_)}:{}),elements_chain:null!==(o=null==(s=e.properties)?void 0:s.$elements_chain)&&void 0!==o?o:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}},t.setupSiteApp=function(e){var t=this,n=this.apps[e.id],r=function(){!n.errored&&t._bufferedInvocations.length&&(tv.info("Processing "+t._bufferedInvocations.length+" events for site app with id "+e.id),t._bufferedInvocations.forEach((function(e){return null==n.processEvent?void 0:n.processEvent(e)})),n.processedBuffer=!0),Object.values(t.apps).every((function(e){return e.processedBuffer||e.errored}))&&(null==t._stopBuffering||t._stopBuffering())},i=!1,o=function(t){n.errored=!t,n.loaded=!0,tv.info("Site app with id "+e.id+" "+(t?"loaded":"errored")),i&&r()};try{var s=e.init({posthog:this._instance,callback:function(e){o(e)}}).processEvent;s&&(n.processEvent=s),i=!0}catch(t){tv.error(nv+e.id,t),o(!1)}if(i&&n.loaded)try{r()}catch(t){tv.error("Error while processing buffered events PostHog app with config id "+e.id,t),n.errored=!0}},t._setupSiteApps=function(){for(var e,t=this.siteAppLoaders||[],n=Oi(t);!(e=n()).done;){var r=e.value;this.apps[r.id]={id:r.id,loaded:!1,errored:!1,processedBuffer:!1}}for(var i,o=Oi(t);!(i=o()).done;)this.setupSiteApp(i.value)},t._onCapturedEvent=function(e){if(0!==Object.keys(this.apps).length)for(var t=this.globalsForEvent(e),n=0,r=Object.values(this.apps);r.length>n;n++){var i=r[n];try{null==i.processEvent||i.processEvent(t)}catch(t){tv.error("Error while processing event "+e.event+" for site app "+i.id,t)}}},t.onRemoteConfig=function(e){var t,n,r,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this._setupSiteApps(),void this._instance.on("eventCaptured",(function(e){return i._onCapturedEvent(e)}))):void tv.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(n=this._stopBuffering)||n.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled)for(var o,s=function(){var e,t=o.value,n=t.id,r=t.url;Ku["__$$ph_site_app_"+n]=i._instance,null==(e=Ku.__PosthogExtensions__)||null==e.loadSiteApp||e.loadSiteApp(i._instance,r,(function(e){if(e)return tv.error(nv+n,e)}))},a=Oi(e.siteApps);!(o=a()).done;)s();else tv.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')},Mi(e,[{key:"isEnabled",get:function(){return!!this._instance.config.opt_in_site_apps}},{key:"siteAppLoaders",get:function(){var e;return null==(e=Ku._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}}])}();function iv(e,t,n){if(Us(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}var ov,sv,av=function(){function e(e){var t=this;this._debugEventEmitter=new Sh,this._checkStep=function(e,n){return t._checkStepEvent(e,n)&&t._checkStepUrl(e,n)&&t._checkStepElement(e,n)&&t._checkStepProperties(e,n)},this._checkStepEvent=function(e,t){return null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event)},this._instance=e,this._actionEvents=new Set,this._actionRegistry=new Set}var t=e.prototype;return t.init=function(){var e,t,n=this;Ds(null==(e=this._instance)?void 0:e._addCaptureHook)||(null==(t=this._instance)||t._addCaptureHook((function(e,t){n.on(e,t)})))},t.register=function(e){var t,n,r=this;if(!Ds(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach((function(e){var t,n;null==(t=r._actionRegistry)||t.add(e),null==(n=e.steps)||n.forEach((function(e){var t;null==(t=r._actionEvents)||t.add((null==e?void 0:e.event)||"")}))})),null!=(n=this._instance)&&n.autocapture)){var i,o=new Set;e.forEach((function(e){var t;null==(t=e.steps)||t.forEach((function(e){null!=e&&e.selector&&o.add(null==e?void 0:e.selector)}))})),null==(i=this._instance)||i.autocapture.setElementSelectors(o)}},t.on=function(e,t){var n,r=this;null!=t&&0!=e.length&&(this._actionEvents.has(e)||this._actionEvents.has(null==t?void 0:t.event))&&this._actionRegistry&&(null==(n=this._actionRegistry)?void 0:n.size)>0&&this._actionRegistry.forEach((function(e){r._checkAction(t,e)&&r._debugEventEmitter.emit("actionCaptured",e.name)}))},t._addActionHook=function(e){this.onAction("actionCaptured",(function(t){return e(t)}))},t._checkAction=function(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n,r=Oi(t.steps);!(n=r()).done;)if(this._checkStep(e,n.value))return!0;return!1},t.onAction=function(e,t){return this._debugEventEmitter.on(e,t)},t._checkStepUrl=function(e,t){if(null!=t&&t.url){var n,r=null==e||null==(n=e.properties)?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!iv(r,t.url,t.url_matching||"contains"))return!1}return!0},t._checkStepElement=function(e,t){return!!this._checkStepHref(e,t)&&!!this._checkStepText(e,t)&&!!this._checkStepSelector(e,t)},t._checkStepHref=function(e,t){var n;if(null==t||!t.href)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return iv(e.href,t.href,t.href_matching||"exact")}));var i,o=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!o&&iv((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")},t._checkStepText=function(e,t){var n;if(null==t||!t.text)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return iv(e.text,t.text,t.text_matching||"exact")||iv(e.$el_text,t.text,t.text_matching||"exact")}));var i,o,s,a=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!a&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!Us(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(a),o=t.text,s=t.text_matching||"exact",i.some((function(e){return iv(e,o,s)})))},t._checkStepSelector=function(e,t){var n,r;if(null==t||!t.selector)return!0;var i=null==e||null==(n=e.properties)?void 0:n.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var o=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&o)try{return new RegExp(t.selector_regex).test(o)}catch(e){return!1}return!1},t._getElementsList=function(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements},t._checkStepProperties=function(e,t){return null==t||!t.properties||0===t.properties.length||Vd(t.properties.reduce((function(e,t){var n=Os(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:n,operator:t.operator||"exact"},e}),{}),null==e?void 0:e.properties)},e}(),uv=function(){function e(e){this._instance=e,this._eventToItems=new Map,this._cancelEventToItems=new Map,this._actionToItems=new Map}var t=e.prototype;return t._doesEventMatchFilter=function(e,t){return!!e&&Vd(e.propertyFilters,null==t?void 0:t.properties)},t._buildEventToItemMap=function(e,t){var n=new Map;return e.forEach((function(e){var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach((function(t){if(null!=t&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}}))})),n},t._getMatchingItems=function(e,t,n){var r=this,i=(n===ts?this._eventToItems:this._cancelEventToItems).get(e),o=[];return this._getItems((function(e){o=e.filter((function(e){return null==i?void 0:i.includes(e.id)}))})),o.filter((function(i){var o,s=null==(o=i.conditions)||null==(o=o[n])||null==(o=o.values)?void 0:o.find((function(t){return t.name===e}));return r._doesEventMatchFilter(s,t)}))},t.register=function(e){var t;Ds(null==(t=this._instance)?void 0:t._addCaptureHook)||(this._setupEventBasedItems(e),this._setupActionBasedItems(e))},t._setupActionBasedItems=function(e){var t=this,n=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0}));0!==n.length&&(null==this._actionMatcher&&(this._actionMatcher=new av(this._instance),this._actionMatcher.init(),this._actionMatcher._addActionHook((function(e){t.onAction(e)}))),n.forEach((function(e){var n,r,i,o,s;e.conditions&&null!=(n=e.conditions)&&n.actions&&null!=(r=e.conditions)&&null!=(r=r.actions)&&r.values&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0&&(null==(o=t._actionMatcher)||o.register(e.conditions.actions.values),null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)||s.forEach((function(n){if(n&&n.name){var r=t._actionToItems.get(n.name);r&&r.push(e.id),t._actionToItems.set(n.name,r||[e.id])}})))})))},t._setupEventBasedItems=function(e){var t,n=this,r=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.events)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0})),i=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(n=e.conditions)||null==(n=n.cancelEvents)||null==(n=n.values)?void 0:n.length)>0}));0===r.length&&0===i.length||(null==(t=this._instance)||t._addCaptureHook((function(e,t){n.onEvent(e,t)})),this._eventToItems=this._buildEventToItemMap(e,ts),this._cancelEventToItems=this._buildEventToItemMap(e,ns))},t.onEvent=function(e,t){var n,r=this,i=this._getLogger(),o=this._getActivatedKey(),s=this._getShownEventName(),a=(null==(n=this._instance)||null==(n=n.persistence)?void 0:n.props[o])||[];if(s===e&&t&&a.length>0){var u,l;i.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:a});var c=(null==t||null==(u=t.properties)?void 0:u.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(c){var d=a.indexOf(c);0>d||(a.splice(d,1),this._updateActivatedItems(a))}}else{if(this._cancelEventToItems.has(e)){var f=this._getMatchingItems(e,t,ns);f.length>0&&(i.info("cancel event matched, cancelling items",{event:e,itemsToCancel:f.map((function(e){return e.id}))}),f.forEach((function(e){var t=a.indexOf(e.id);0>t||a.splice(t,1),r._cancelPendingItem(e.id)})),this._updateActivatedItems(a))}if(this._eventToItems.has(e)){i.info("event name matched",{event:e,eventPayload:t,items:this._eventToItems.get(e)});var p=this._getMatchingItems(e,t,ts);this._updateActivatedItems(a.concat(p.map((function(e){return e.id}))||[]))}}},t.onAction=function(e){var t,n=this._getActivatedKey(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[n])||[];this._actionToItems.has(e)&&this._updateActivatedItems(r.concat(this._actionToItems.get(e)||[]))},t._updateActivatedItems=function(e){var t=this,n=this._getLogger(),r=[].concat(new Set(e)).filter((function(e){return!t._isItemPermanentlyIneligible(e)}));n.info("updating activated items",{activatedItems:r}),this._setActivatedItems(r)},t.getActivatedIds=function(){var e,t=this._getActivatedKey();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]},t.getEventToItemsMap=function(){return this._eventToItems},t._getActionMatcher=function(){return this._actionMatcher},e}(),lv=function(e){function t(t){return e.call(this,t)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ni(e,t)}(t,e);var n=t.prototype;return n._getActivatedKey=function(){return uc},n._getShownEventName=function(){return cs.SHOWN},n._getItems=function(e){var t;null==(t=this._instance)||t.getSurveys(e)},n._cancelPendingItem=function(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)},n._getLogger=function(){return bl},n._setActivatedItems=function(e){var t,n;null==(t=this._instance)||null==(t=t.persistence)||t.register(((n={})[uc]=e,n))},n._isItemPermanentlyIneligible=function(){return!1},n.getSurveys=function(){return this.getActivatedIds()},n.getEventToSurveys=function(){return this.getEventToItemsMap()},t}(uv),cv="SDK is not enabled or survey functionality is not yet loaded",dv="Disabled. Not loading surveys.",fv=function(){function e(e){this._isSurveysEnabled=void 0,this._surveyManager=null,this._isInitializingSurveys=!1,this._surveyCallbacks=[],this._getSurveysInFlightPromise=null,this._instance=e,this._surveyEventReceiver=null}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){if(!this._config.disable_surveys){var t=e.surveys;if(Us(t))return bl.warn("Flags not loaded yet. Not loading surveys.");var n=Os(t);this._isSurveysEnabled=n?t.length>0:t,bl.info("flags response received, isSurveysEnabled: "+this._isSurveysEnabled),this.loadIfEnabled()}},t.reset=function(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(null!=n&&n.startsWith(kl)||null!=n&&n.startsWith(El))&&e.push(n)}e.forEach((function(e){return localStorage.removeItem(e)}))},t.loadIfEnabled=function(){var e=this;if(!this._surveyManager)if(this._isInitializingSurveys)bl.info("Already initializing surveys, skipping...");else if(this._config.disable_surveys)bl.info(dv);else if(this._config.cookieless_mode&&this._instance.consent.isOptedOut())bl.info("Not loading surveys in cookieless mode without consent.");else{var t=null==Ku?void 0:Ku.__PosthogExtensions__;if(t){if(!Ds(this._isSurveysEnabled)||this._config.advanced_enable_surveys){var n=this._isSurveysEnabled||this._config.advanced_enable_surveys;this._isInitializingSurveys=!0;try{var r=t.generateSurveys;if(r)return void this._completeSurveyInitialization(r,n);var i=t.loadExternalDependency;if(!i)return void this._handleSurveyLoadError(Cc);i(this._instance,"surveys",(function(r){r||!t.generateSurveys?e._handleSurveyLoadError("Could not load surveys script",r):e._completeSurveyInitialization(t.generateSurveys,n)}))}catch(e){throw this._handleSurveyLoadError("Error initializing surveys",e),e}finally{this._isInitializingSurveys=!1}}}else bl.error("PostHog Extensions not found.")}},t._completeSurveyInitialization=function(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new lv(this._instance),bl.info("Surveys loaded successfully"),this._notifySurveyCallbacks({isLoaded:!0})},t._handleSurveyLoadError=function(e,t){bl.error(e,t),this._notifySurveyCallbacks({isLoaded:!1,error:e})},t.onSurveysLoaded=function(e){var t=this;return this._surveyCallbacks.push(e),this._surveyManager&&this._notifySurveyCallbacks({isLoaded:!0}),function(){t._surveyCallbacks=t._surveyCallbacks.filter((function(t){return t!==e}))}},t.getSurveys=function(e,t){var n=this;if(void 0===t&&(t=!1),this._config.disable_surveys)return bl.info(dv),e([]);var r,i=this._instance.get_property(ac);if(i&&!t)return e(i,{isLoaded:!0});"undefined"!=typeof Promise&&this._getSurveysInFlightPromise?this._getSurveysInFlightPromise.then((function(t){return e(t.surveys,t.context)})):("undefined"!=typeof Promise&&(this._getSurveysInFlightPromise=new Promise((function(e){r=e}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._config.token),method:"GET",timeout:this._config.surveys_request_timeout_ms,callback:function(t){var i,o;n._getSurveysInFlightPromise=null;var s=t.statusCode;if(200!==s||!t.json){var a="Surveys API could not be loaded, status: "+s;bl.error(a);var u={isLoaded:!1,error:a};return e([],u),void(null==r||r({surveys:[],context:u}))}var l,c=t.json.surveys||[],d=c.filter((function(e){return wl(e)&&(Sl(e)||xl(e))}));d.length>0&&(null==(l=n._surveyEventReceiver)||l.register(d)),null==(i=n._instance.persistence)||i.register(((o={})[ac]=c,o));var f={isLoaded:!0};e(c,f),null==r||r({surveys:c,context:f})}}))},t._notifySurveyCallbacks=function(e){for(var t,n=Oi(this._surveyCallbacks);!(t=n()).done;){var r=t.value;try{if(!e.isLoaded)return r([],e);this.getSurveys(r)}catch(e){bl.error("Error in survey callback",e)}}},t.getActiveMatchingSurveys=function(e,t){if(void 0===t&&(t=!1),!Us(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);bl.warn("init was not called")},t._getSurveyById=function(e){var t=null;return this.getSurveys((function(n){var r;t=null!==(r=n.find((function(t){return t.id===e})))&&void 0!==r?r:null})),t},t._checkSurveyEligibility=function(e){if(Us(this._surveyManager))return{eligible:!1,reason:cv};var t="string"==typeof e?this._getSurveyById(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}},t.canRenderSurvey=function(e){if(Us(this._surveyManager))return bl.warn("init was not called"),{visible:!1,disabledReason:cv};var t=this._checkSurveyEligibility(e);return{visible:t.eligible,disabledReason:t.reason}},t.canRenderSurveyAsync=function(e,t){var n=this;return Us(this._surveyManager)?(bl.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:cv})):new Promise((function(r){n.getSurveys((function(t){var i,o=null!==(i=t.find((function(t){return t.id===e})))&&void 0!==i?i:null;if(o){var s=n._checkSurveyEligibility(o);r({visible:s.eligible,disabledReason:s.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),t)}))},t.renderSurvey=function(e,t,n){var r,i=this;if(Us(this._surveyManager))bl.warn("init was not called");else{var o="string"==typeof e?this._getSurveyById(e):e;if(null!=o&&o.id)if(Il.includes(o.type)){var s=null==Vu?void 0:Vu.querySelector(t);if(s)return null!=(r=o.appearance)&&r.surveyPopupDelaySeconds?(bl.info("Rendering survey "+o.id+" with delay of "+o.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((function(){var e,t;bl.info("Rendering survey "+o.id+" with delay of "+(null==(e=o.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=i._surveyManager)||t.renderSurvey(o,s,n),bl.info("Survey "+o.id+" rendered")}),1e3*o.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(o,s,n);bl.warn("Survey element not found")}else bl.warn("Surveys of type "+o.type+" cannot be rendered in the app");else bl.warn("Survey not found")}},t.displaySurvey=function(e,t){var n;if(Us(this._surveyManager))bl.warn("init was not called");else{var r=this._getSurveyById(e);if(r){var i=r;if(null!=(n=r.appearance)&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=Ai({},r,{appearance:Ai({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==fs&&t.initialResponses&&bl.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var o=this.canRenderSurvey(r);if(!o.visible)return void bl.warn("Survey is not eligible to be displayed: ",o.disabledReason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(i,t):this.renderSurvey(i,t.selector,t.properties)}else bl.warn("Survey not found")}},t.cancelPendingSurvey=function(e){Us(this._surveyManager)?bl.warn("init was not called"):this._surveyManager.cancelSurvey(e)},t.handlePageUnload=function(){var e;null==(e=this._surveyManager)||e.handlePageUnload()},Mi(e,[{key:"_config",get:function(){return this._instance.config}}])}(),pv=null!=ju&&ju.location?Zc(ju.location.hash,"__posthog")||Zc(location.hash,"state"):null,hv="_postHogToolbarParams",_v=el("[Toolbar]"),vv=function(){function e(e){this.instance=e}var t=e.prototype;return t._setToolbarState=function(e){Ku.ph_toolbar_state=e},t._getToolbarState=function(){var e;return null!==(e=Ku.ph_toolbar_state)&&void 0!==e?e:0},t.initialize=function(){return this.maybeLoadToolbar()},t.maybeLoadToolbar=function(e,t,n){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),dl(this.instance.config))return!1;if(!ju||!Vu)return!1;e=null!=e?e:ju.location,n=null!=n?n:ju.history;try{if(!t){try{ju.localStorage.setItem("test","test"),ju.localStorage.removeItem("test")}catch(e){return!1}t=null==ju?void 0:ju.localStorage}var r,i=pv||Zc(e.hash,"__posthog")||Zc(e.hash,"state"),o=i?ol((function(){return JSON.parse(atob(decodeURIComponent(i)))}))||ol((function(){return JSON.parse(decodeURIComponent(i))})):null;return o&&"ph_authorize"===o.action?((r=o).source="url",r&&Object.keys(r).length>0&&(o.desiredHash?e.hash=o.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(hv)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch(e){return!1}},t._callLoadToolbar=function(e){var t=Ku.ph_load_toolbar||Ku.ph_load_editor;!Us(t)&&As(t)?t(e,this.instance):_v.warn("No toolbar load function found")},t.loadToolbar=function(e){var t=this,n=!(null==Vu||!Vu.getElementById(wc));if(!ju||n)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,i=Ai({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(ju.localStorage.setItem(hv,JSON.stringify(Ai({},i,{source:void 0}))),2===this._getToolbarState())this._callLoadToolbar(i);else if(0===this._getToolbarState()){var o;this._setToolbarState(1),null==(o=Ku.__PosthogExtensions__)||null==o.loadExternalDependency||o.loadExternalDependency(this.instance,"toolbar",(function(e){if(e)return _v.error("[Toolbar] Failed to load",e),void t._setToolbarState(0);t._setToolbarState(2),t._callLoadToolbar(i)})),cl(ju,"turbolinks:load",(function(){t._setToolbarState(0),t.loadToolbar(i)}))}return!0},t._loadEditor=function(e){return this.loadToolbar(e)},t.maybeLoadEditor=function(e,t,n){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.maybeLoadToolbar(e,t,n)},e}(),gv=el("[FeatureFlags]"),mv=el("[FeatureFlags]",{debugEnabled:!0}),yv="\" failed. Feature flags didn't load in time.",bv=function(e){for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},wv=function(e){for(var t,n={},r=Oi(il(e||{}));!(t=r()).done;){var i=t.value,o=i[1];o&&(n[i[0]]=o)}return n},Sv=function(){function e(e){this._override_warning=!1,this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsLoadedFromRemote=!1,this._hasLoggedDeprecationWarning=!1,this._staleCacheRefreshTriggered=!1,this._instance=e,this.featureFlagEventHandlers=[]}var t=e.prototype;return t._prop=function(e){return this._instance.get_property(e)},t._isCacheStale=function(){var e,t;return null!==(e=null==(t=this._persistence)?void 0:t._isFeatureFlagCacheStale(this._config.feature_flag_cache_ttl_ms))&&void 0!==e&&e},t._checkAndTriggerStaleRefresh=function(){return!!this._isCacheStale()&&(this._staleCacheRefreshTriggered||this._requestInFlight||(this._staleCacheRefreshTriggered=!0,gv.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)},t._getValidEvaluationEnvironments=function(){var e,t=null!==(e=this._config.evaluation_contexts)&&void 0!==e?e:this._config.evaluation_environments;return!this._config.evaluation_environments||this._config.evaluation_contexts||this._hasLoggedDeprecationWarning||(gv.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this._hasLoggedDeprecationWarning=!0),null!=t&&t.length?t.filter((function(e){var t=e&&"string"==typeof e&&e.trim().length>0;return t||gv.error("Invalid evaluation context found:",e,"Expected non-empty string"),t})):[]},t._shouldIncludeEvaluationEnvironments=function(){return this._getValidEvaluationEnvironments().length>0},t._getValidFlagKeys=function(){var e=this._config.flag_keys;if(!Ds(e)){if(Os(e))return e.filter((function(e){var t=e&&"string"==typeof e&&e.trim().length>0;return t||gv.error("Invalid flag key found:",e,"Expected non-empty string"),t}));gv.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}},t.initialize=function(){var e,t,n=this._instance.config,r=null!==(e=null==(t=n.bootstrap)?void 0:t.featureFlags)&&void 0!==e?e:{};if(Object.keys(r).length){var i,o,s=null!==(i=null==(o=n.bootstrap)?void 0:o.featureFlagPayloads)&&void 0!==i?i:{},a=Object.keys(r).filter((function(e){return!!r[e]})).reduce((function(e,t){return e[t]=r[t]||!1,e}),{}),u=Object.keys(s).filter((function(e){return a[e]})).reduce((function(e,t){return s[t]&&(e[t]=s[t]),e}),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:u})}},t.updateFlags=function(e,t,n){for(var r=null!=n&&n.merge?this.getFlagVariants():{},i=null!=n&&n.merge?this.getFlagPayloads():{},o=Ai({},r,e),s=Ai({},i,t),a={},u=0,l=Object.entries(o);l.length>u;u++){var c=l[u],d=c[0],f=c[1],p="string"==typeof f;a[d]={key:d,enabled:!!p||Boolean(f),variant:p?f:void 0,reason:void 0,metadata:Ds(null==s?void 0:s[d])?void 0:{id:0,version:void 0,description:void 0,payload:s[d]}}}this.receivedFeatureFlags({flags:a})},t.getFlags=function(){return Object.keys(this.getFlagVariants())},t.getFlagsWithDetails=function(){var e=this._prop(ec),t=this._prop(rc),n=this._prop(ic);if(!n&&!t)return e||{};for(var r,i=rl({},e||{}),o=Oi([].concat(new Set([].concat(Object.keys(n||{}),Object.keys(t||{})))));!(r=o()).done;){var s,a,u=r.value,l=i[u],c=null==t?void 0:t[u],d=Ds(c)?null!==(s=null==l?void 0:l.enabled)&&void 0!==s&&s:!!c,f=Ds(c)?l.variant:"string"==typeof c?c:void 0,p=null==n?void 0:n[u],h=Ai({},l,{enabled:d,variant:d?null!=f?f:null==l?void 0:l.variant:void 0});d!==(null==l?void 0:l.enabled)&&(h.original_enabled=null==l?void 0:l.enabled),f!==(null==l?void 0:l.variant)&&(h.original_variant=null==l?void 0:l.variant),p&&(h.metadata=Ai({},null==l?void 0:l.metadata,{payload:p,original_payload:null==l||null==(a=l.metadata)?void 0:a.payload})),i[u]=h}return this._override_warning||(gv.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:i}),this._override_warning=!0),i},t.getFlagVariants=function(){var e=this._prop(Kl),t=this._prop(rc);if(!t)return e||{};for(var n=rl({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this._override_warning||(gv.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n},t.getFlagPayloads=function(){var e=this._prop(tc),t=this._prop(ic);if(!t)return e||{};for(var n=rl({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this._override_warning||(gv.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this._override_warning=!0),n},t.reloadFeatureFlags=function(){var e=this;this._reloadingDisabled||this._config.advanced_disable_feature_flags||this._reloadDebouncer||(this._instance._internalEventEmitter.emit("featureFlagsReloading",!0),this._reloadDebouncer=setTimeout((function(){e._callFlagsEndpoint()}),5))},t._clearDebouncer=function(){clearTimeout(this._reloadDebouncer),this._reloadDebouncer=void 0},t.ensureFlagsLoaded=function(){this._hasLoadedFlags||this._requestInFlight||this._reloadDebouncer||this.reloadFeatureFlags()},t.setAnonymousDistinctId=function(e){this.$anon_distinct_id=e},t.setReloadingPaused=function(e){this._reloadingDisabled=e},t._callFlagsEndpoint=function(e){var t,n=this;if(this._clearDebouncer(),!this._instance._shouldDisableFlags())if(this._requestInFlight)this._additionalReloadRequested=!0;else{var r=this._config.token,i=this._prop(Rl),o={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Ai({},(null==(t=this._persistence)?void 0:t.get_initial_props())||{},this._prop(oc)||{}),group_properties:this._prop(sc),timezone:yp()};js(i)||Ds(i)||(o.$device_id=i),(null!=e&&e.disableFlags||this._config.advanced_disable_feature_flags)&&(o.disable_flags=!0),this._shouldIncludeEvaluationEnvironments()&&(o.evaluation_contexts=this._getValidEvaluationEnvironments());var s=this._getValidFlagKeys();Ds(s)||(o.flag_keys=s);var a=!!this._config.advanced_only_evaluate_survey_feature_flags,u=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this._config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this._requestInFlight=!0,this._instance._send_request({method:"POST",url:u,data:o,compression:this._config.disable_compression?void 0:Wc,timeout:this._config.feature_flag_request_timeout_ms,callback:function(e){var t,r,i,s,u=!0;if(200===e.statusCode&&(n._additionalReloadRequested||(n.$anon_distinct_id=void 0),u=!1),n._requestInFlight=!1,!o.disable_flags||n._additionalReloadRequested){n._flagsLoadedFromRemote=!u;var l=[];e.error?e.error instanceof Error?l.push("AbortError"===e.error.name?"timeout":"connection_error"):l.push("unknown_error"):200!==e.statusCode&&l.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&l.push("errors_while_computing_flags");var c,d=!(null==(r=e.json)||null==(r=r.quotaLimited)||!r.includes("feature_flags"));if(d&&l.push("quota_limited"),null==(i=n._persistence)||i.register(((s={})[fc]=l,s)),d)gv.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else o.disable_flags||n.receivedFeatureFlags(null!==(c=e.json)&&void 0!==c?c:{},u,{partialResponse:a}),n._additionalReloadRequested&&(n._additionalReloadRequested=!1,n._callFlagsEndpoint())}}})}},t.getFeatureFlag=function(e,t){var n;if(void 0===t&&(t={}),!t.fresh||this._flagsLoadedFromRemote)if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){if(!this._checkAndTriggerStaleRefresh()){var r=this.getFeatureFlagResult(e,t);return null!==(n=null==r?void 0:r.variant)&&void 0!==n?n:null==r?void 0:r.enabled}}else gv.warn('getFeatureFlag for key "'+e+yv)},t.getFeatureFlagDetails=function(e){return this.getFlagsWithDetails()[e]},t.getFeatureFlagPayload=function(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload},t.getFeatureFlagResult=function(e,t){if(void 0===t&&(t={}),!t.fresh||this._flagsLoadedFromRemote)if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){if(!this._checkAndTriggerStaleRefresh()){var n=this.getFlagVariants(),r=e in n,i=n[e],o=this.getFlagPayloads()[e],s=String(i),a=this._prop(nc)||void 0,u=this._prop(pc)||void 0,l=this._prop(cc)||{};if(this._config.advanced_feature_flags_dedup_per_session){var c,d,f=this._instance.get_session_id(),p=this._prop(dc);f&&f!==p&&(l={},null==(c=this._persistence)||c.register(((d={})[cc]=l,d[dc]=f,d)))}if((t.send_event||!("send_event"in t))&&(!(e in l)||!l[e].includes(s))){var h,_,v,g,m,y,b,w,S,x,k;Os(l[e])?l[e].push(s):l[e]=[s],null==(h=this._persistence)||h.register(((_={})[cc]=l,_));var E=this.getFeatureFlagDetails(e),C=[].concat(null!==(v=this._prop(fc))&&void 0!==v?v:[]);Ds(i)&&C.push("flag_missing");var P={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:o||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:(null==(g=this._config.bootstrap)||null==(g=g.featureFlags)?void 0:g[e])||null,$feature_flag_bootstrapped_payload:(null==(m=this._config.bootstrap)||null==(m=m.featureFlagPayloads)?void 0:m[e])||null,$used_bootstrap_value:!this._flagsLoadedFromRemote};Ds(null==E||null==(y=E.metadata)?void 0:y.version)||(P.$feature_flag_version=E.metadata.version);var T,I=null!==(b=null==E||null==(w=E.reason)?void 0:w.description)&&void 0!==b?b:null==E||null==(S=E.reason)?void 0:S.code;I&&(P.$feature_flag_reason=I),null!=E&&null!=(x=E.metadata)&&x.id&&(P.$feature_flag_id=E.metadata.id),Ds(null==E?void 0:E.original_variant)&&Ds(null==E?void 0:E.original_enabled)||(P.$feature_flag_original_response=Ds(E.original_variant)?E.original_enabled:E.original_variant),null!=E&&null!=(k=E.metadata)&&k.original_payload&&(P.$feature_flag_original_payload=null==E||null==(T=E.metadata)?void 0:T.original_payload),C.length&&(P.$feature_flag_error=C.join(",")),this._instance.capture("$feature_flag_called",P)}if(r){var F=o;if(!Ds(o))try{F=JSON.parse(o)}catch(e){}return{key:e,enabled:!!i,variant:"string"==typeof i?i:void 0,payload:F}}}}else gv.warn('getFeatureFlagResult for key "'+e+yv)},t.getRemoteConfigPayload=function(e,t){var n=this._config.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this._shouldIncludeEvaluationEnvironments()&&(r.evaluation_contexts=this._getValidEvaluationEnvironments());var i=this._getValidFlagKeys();Ds(i)||(r.flag_keys=i),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this._config.disable_compression?void 0:Wc,timeout:this._config.feature_flag_request_timeout_ms,callback:function(n){var r,i=null==(r=n.json)?void 0:r.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})},t.isFeatureEnabled=function(e,t){if(void 0===t&&(t={}),!t.fresh||this._flagsLoadedFromRemote){if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return Ds(n)?void 0:!!n}gv.warn('isFeatureEnabled for key "'+e+yv)}},t.addFeatureFlagsHandler=function(e){this.featureFlagEventHandlers.push(e)},t.removeFeatureFlagsHandler=function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((function(t){return t!==e}))},t.receivedFeatureFlags=function(e,t,n){if(this._persistence){this._hasLoadedFlags=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),o=this.getFlagsWithDetails();!function(e,t,n,r,i,o){var s,a,u;void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={});var l=function(e){var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((function(e){var n;return[e,null!==(n=t[e].variant)&&void 0!==n?n:t[e].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((function(e){return t[e].enabled})).filter((function(e){var n;return null==(n=t[e].metadata)?void 0:n.payload})).map((function(e){var n;return[e,null==(n=t[e].metadata)?void 0:n.payload]})))):gv.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e}(e),c=l.flags,d=l.featureFlags,f=l.featureFlagPayloads;if(d){var p=e.requestId,h=e.evaluatedAt;if(Os(d)){var _;gv.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var v={};if(d)for(var g=0;d.length>g;g++)v[d[g]]=!0;t&&t.register(((_={})[Xl]=d,_[Kl]=v,_))}else{var m=d,y=f,b=c;if(null!=o&&o.partialResponse)m=Ai({},n,m),y=Ai({},r,y),b=Ai({},i,b);else if(e.errorsWhileComputingFlags)if(c){var w=new Set(Object.keys(c).filter((function(e){var t;return!(null!=(t=c[e])&&t.failed)})));m=Ai({},n,Object.fromEntries(Object.entries(m).filter((function(e){return w.has(e[0])})))),y=Ai({},r,Object.fromEntries(Object.entries(y||{}).filter((function(e){return w.has(e[0])})))),b=Ai({},i,Object.fromEntries(Object.entries(b||{}).filter((function(e){return w.has(e[0])}))))}else m=Ai({},n,m),y=Ai({},r,y),b=Ai({},i,b);t&&t.register(Ai(((s={})[Xl]=Object.keys(wv(m)),s[Kl]=m||{},s[tc]=y||{},s[ec]=b||{},s),p?((a={})[nc]=p,a):{},h?((u={})[pc]=h,u):{}))}}}(e,this._persistence,r,i,o,n),t||(this._staleCacheRefreshTriggered=!1),this._fireFeatureFlagsCallbacks(t)}},t.override=function(e,t){void 0===t&&(t=!1),gv.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})},t.overrideFeatureFlags=function(e){if(!this._instance.__loaded||!this._persistence)return gv.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._persistence.unregister(rc),this._persistence.unregister(ic),this._fireFeatureFlagsCallbacks(),mv.info("All overrides cleared");if(Os(e)){var t,n=bv(e);return this._persistence.register(((t={})[rc]=n,t)),this._fireFeatureFlagsCallbacks(),mv.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var r,i=e;if(this._override_warning=Boolean(null!==(r=i.suppressWarning)&&void 0!==r&&r),"flags"in i)if(!1===i.flags)this._persistence.unregister(rc),mv.info("Flag overrides cleared");else if(i.flags){if(Os(i.flags)){var o,s=bv(i.flags);this._persistence.register(((o={})[rc]=s,o))}else{var a;this._persistence.register(((a={})[rc]=i.flags,a))}mv.info("Flag overrides set",{flags:i.flags})}if("payloads"in i)if(!1===i.payloads)this._persistence.unregister(ic),mv.info("Payload overrides cleared");else if(i.payloads){var u;this._persistence.register(((u={})[ic]=i.payloads,u)),mv.info("Payload overrides set",{payloads:i.payloads})}this._fireFeatureFlagsCallbacks()}else{var l;if(e&&"object"==typeof e)return this._persistence.register(((l={})[rc]=e,l)),this._fireFeatureFlagsCallbacks(),mv.info("Flag overrides set",{flags:e});gv.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}},t.onFeatureFlags=function(e){var t=this;if(this.addFeatureFlagsHandler(e),this._hasLoadedFlags){var n=this._prepareFeatureFlagsForCallbacks();e(n.flags,n.flagVariants)}return function(){return t.removeFeatureFlagsHandler(e)}},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){var r,i,o,s,a=(this._prop(Jl)||[]).find((function(t){return t.flagKey===e})),u=((r={})["$feature_enrollment/"+e]=t,r),l={$feature_flag:e,$feature_enrollment:t,$set:u};a&&(l.$early_access_feature_name=a.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(u,!1);var c=Ai({},this.getFlagVariants(),((i={})[e]=t,i));null==(o=this._persistence)||o.register(((s={})[Xl]=Object.keys(wv(c)),s[Kl]=c,s)),this._fireFeatureFlagsCallbacks()},t.getEarlyAccessFeatures=function(e,t,n){var r=this;void 0===t&&(t=!1);var i=this._prop(Jl),o=n?"&"+n.map((function(e){return"stage="+e})).join("&"):"";if(i&&!t)return e(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._config.token+o),method:"GET",callback:function(t){var n,i,o;if(t.json){var s=t.json.earlyAccessFeatures;return null==(n=r._persistence)||n.unregister(Jl),null==(i=r._persistence)||i.register(((o={})[Jl]=s,o)),e(s)}}})},t._prepareFeatureFlagsForCallbacks=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}),{})}},t._fireFeatureFlagsCallbacks=function(e){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach((function(t){return t(n,r,{errorsLoading:e})}))},t.setPersonPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._prop(oc)||{},i=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),o=null==e?void 0:e.$set_once,s={};if(o)for(var a in o)({}).hasOwnProperty.call(o,a)&&(a in r||(s[a]=o[a]));this._instance.register(((n={})[oc]=Ai({},r,s,i),n)),t&&this._instance.reloadFeatureFlags()},t.resetPersonPropertiesForFlags=function(){this._instance.unregister(oc)},t.setGroupPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._prop(sc)||{};0!==Object.keys(r).length&&Object.keys(r).forEach((function(t){r[t]=Ai({},r[t],e[t]),delete e[t]})),this._instance.register(((n={})[sc]=Ai({},r,e),n)),t&&this._instance.reloadFeatureFlags()},t.resetGroupPropertiesForFlags=function(e){if(e){var t,n,r=this._prop(sc)||{};this._instance.register(((n={})[sc]=Ai({},r,((t={})[e]={},t)),n))}else this._instance.unregister(sc)},t.reset=function(){this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsLoadedFromRemote=!1,this.$anon_distinct_id=void 0,this._clearDebouncer(),this._override_warning=!1},Mi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"_persistence",get:function(){return this._instance.persistence}},{key:"hasLoadedFlags",get:function(){return this._hasLoadedFlags}}])}(),xv="Refusing to render web experiment since the viewer is a likely bot",kv={icontains:function(e,t){return!!ju&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1},not_icontains:function(e,t){return!!ju&&-1===t.href.toLowerCase().indexOf(e.toLowerCase())},regex:function(e,t){return!!ju&&Hd(t.href,e)},not_regex:function(e,t){return!!ju&&!Hd(t.href,e)},exact:function(e,t){return t.href===e},is_not:function(e,t){return t.href!==e}},Ev=function(){function e(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(t){void 0===t&&(t=!1),n.getWebExperiments((function(t){e._logInfo("retrieved web experiments from the server"),n._flagToExperiments=new Map,t.forEach((function(t){if(t.feature_flag_key){var r;n._flagToExperiments&&(e._logInfo("setting flag key ",t.feature_flag_key," to web experiment ",t),null==(r=n._flagToExperiments)||r.set(t.feature_flag_key,t));var i=n._instance.getFeatureFlag(t.feature_flag_key);Ns(i)&&t.variants[i]&&n._applyTransforms(t.name,i,t.variants[i].transforms)}else if(t.variants)for(var o in t.variants){var s=t.variants[o];e._matchesTestVariant(s)&&n._applyTransforms(t.name,o,s.transforms)}}))}),t)},this._instance=t,this._instance.onFeatureFlags((function(e){n.onFeatureFlags(e)}))}var t=e.prototype;return t.initialize=function(){},t.onFeatureFlags=function(t){var n=this;if(this._is_bot())e._logInfo(xv);else if(!this._config.disable_web_experiments){if(Us(this._flagToExperiments))return this._flagToExperiments=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e._logInfo("applying feature flags",t),t.forEach((function(e){var t;if(n._flagToExperiments&&null!=(t=n._flagToExperiments)&&t.has(e)){var r,i=n._instance.getFeatureFlag(e),o=null==(r=n._flagToExperiments)?void 0:r.get(e);i&&null!=o&&o.variants[i]&&n._applyTransforms(o.name,i,o.variants[i].transforms)}}))}},t.previewWebExperiment=function(){var t=this,n=e.getWindowLocation();if(null!=n&&n.search){var r=Yc(null==n?void 0:n.search,"__experiment_id"),i=Yc(null==n?void 0:n.search,"__experiment_variant");r&&i&&(e._logInfo("previewing web experiments "+r+" && "+i),this.getWebExperiments((function(e){t._showPreviewWebExperiment(parseInt(r),i,e)}),!1,!0))}},t.loadIfEnabled=function(){this._config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()},t.getWebExperiments=function(e,t,n){if(this._config.disable_web_experiments&&!n)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._config.token),method:"GET",callback:function(t){return e(200===t.statusCode&&t.json&&t.json.experiments||[])}})},t._showPreviewWebExperiment=function(t,n,r){var i=r.filter((function(e){return e.id===t}));i&&i.length>0&&(e._logInfo("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this._applyTransforms(i[0].name,n,i[0].variants[n].transforms))},e._matchesTestVariant=function(t){return!Us(t.conditions)&&e._matchUrlConditions(t)&&e._matchUTMConditions(t)},e._matchUrlConditions=function(t){var n;if(Us(t.conditions)||Us(null==(n=t.conditions)?void 0:n.url))return!0;var r,i,o,s=e.getWindowLocation();return!!s&&(null==(r=t.conditions)||!r.url||kv[null!==(i=null==(o=t.conditions)?void 0:o.urlMatchType)&&void 0!==i?i:"icontains"](t.conditions.url,s))},e.getWindowLocation=function(){return null==ju?void 0:ju.location},e._matchUTMConditions=function(e){var t;if(Us(e.conditions)||Us(null==(t=e.conditions)?void 0:t.utm))return!0;var n=dp();if(n.utm_source){var r,i,o,s,a,u,l,c,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==n.utm_campaign,f=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_source||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_source)==n.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_medium)==n.utm_medium,h=null==(l=e.conditions)||null==(l=l.utm)||!l.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==n.utm_term;return d&&p&&h&&f}return!1},e._logInfo=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];Ju.info("[WebExperiments] "+e,n)},t._applyTransforms=function(t,n,r){this._is_bot()?e._logInfo(xv):"control"!==n?r.forEach((function(r){if(r.selector){var i;e._logInfo("applying transform of variant "+n+" for experiment "+t+" ",r);var o=null==(i=document)?void 0:i.querySelectorAll(r.selector);null==o||o.forEach((function(e){var t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute("style",r.css)}))}})):e._logInfo("Control variants leave the page unmodified.")},t._is_bot=function(){return Bu&&this._instance?Eh(Bu,this._config.custom_blocked_useragents):void 0},Mi(e,[{key:"_config",get:function(){return this._instance.config}}])}(),Cv=el("[Conversations]"),Pv="Conversations not available yet.",Tv=function(){function e(e){this._isConversationsEnabled=void 0,this._conversationsManager=null,this._isInitializing=!1,this._remoteConfig=null,this._instance=e}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Us(t)||(zs(t)?this._isConversationsEnabled=t:(this._isConversationsEnabled=t.enabled,this._remoteConfig=t),this.loadIfEnabled())}},t.reset=function(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this._isConversationsEnabled=void 0,this._remoteConfig=null},t.loadIfEnabled=function(){var e=this;if(!(this._conversationsManager||this._isInitializing||this._instance.config.disable_conversations||dl(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=null==Ku?void 0:Ku.__PosthogExtensions__;if(t&&!Ds(this._isConversationsEnabled)&&this._isConversationsEnabled)if(this._remoteConfig&&this._remoteConfig.token){this._isInitializing=!0;try{var n=t.initConversations;if(n)return this._completeInitialization(n),void(this._isInitializing=!1);var r=t.loadExternalDependency;if(!r)return void this._handleLoadError(Cc);r(this._instance,"conversations",(function(n){n||!t.initConversations?e._handleLoadError("Could not load conversations script",n):e._completeInitialization(t.initConversations),e._isInitializing=!1}))}catch(e){this._handleLoadError("Error initializing conversations",e),this._isInitializing=!1}}else Cv.error("Conversations enabled but missing token in remote config.")}},t._completeInitialization=function(e){if(this._remoteConfig)try{this._conversationsManager=e(this._remoteConfig,this._instance),Cv.info("Conversations loaded successfully")}catch(e){this._handleLoadError("Error completing conversations initialization",e)}else Cv.error("Cannot complete initialization: remote config is null")},t._handleLoadError=function(e,t){Cv.error(e,t),this._conversationsManager=null,this._isInitializing=!1},t.show=function(){this._conversationsManager?this._conversationsManager.show():Cv.warn("Conversations not loaded yet.")},t.hide=function(){this._conversationsManager&&this._conversationsManager.hide()},t.isAvailable=function(){return!0===this._isConversationsEnabled&&!js(this._conversationsManager)},t.isVisible=function(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&void 0!==e&&e},t.sendMessage=function(){var e=Ri($i().m((function e(t,n,r){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.sendMessage(t,n,r))}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),t.getMessages=function(){var e=Ri($i().m((function e(t,n){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.getMessages(t,n))}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.markAsRead=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.markAsRead(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.getTickets=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.getTickets(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.requestRestoreLink=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.requestRestoreLink(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.restoreFromToken=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.restoreFromToken(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.restoreFromUrlToken=function(){var e=Ri($i().m((function e(){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.restoreFromUrlToken())}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.getCurrentTicketId=function(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())&&void 0!==e?e:null},t.getWidgetSessionId=function(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())&&void 0!==e?e:null},t._onIdentityChanged=function(){var e;null==(e=this._conversationsManager)||e.setIdentity()},t._onIdentityCleared=function(){var e;null==(e=this._conversationsManager)||e.clearIdentity()},e}(),Iv=function(){function e(e){var t;this._isLogsEnabled=!1,this._isLoaded=!1,this._logger=el("[logs]"),this._logBuffer=[],this._intervalLogCount=0,this._intervalWindowStart=0,this._droppedWarned=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this._isLogsEnabled=!0)}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){var t,n=null==(t=e.logs)?void 0:t.captureConsoleLogs;!Us(n)&&n&&(this._isLogsEnabled=!0,this.loadIfEnabled())},t.reset=function(){this._logBuffer=[],this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0),this._intervalLogCount=0,this._intervalWindowStart=0,this._droppedWarned=!1},t.loadIfEnabled=function(){var e=this;if(this._isLogsEnabled&&!this._isLoaded){var t=null==Ku?void 0:Ku.__PosthogExtensions__;if(t){var n=t.loadExternalDependency;n?n(this._instance,"logs",(function(n){var r;n||null==(r=t.logs)||!r.initializeLogs?e._logger.error("Could not load logs script",n):(t.logs.initializeLogs(e._instance),e._isLoaded=!0)})):this._logger.error(Cc)}else this._logger.error("PostHog Extensions not found.")}},t.captureLog=function(e){var t,n,r,i,o,s;if(this._instance.is_capturing())if(e&&e.body){var a=null!==(t=null==(n=this._instance.config.logs)?void 0:n.flushIntervalMs)&&void 0!==t?t:3e3,u=null!==(r=null==(i=this._instance.config.logs)?void 0:i.maxLogsPerInterval)&&void 0!==r?r:1e3,l=Date.now();if(a>l-this._intervalWindowStart||(this._intervalWindowStart=l,this._intervalLogCount=0,this._droppedWarned=!1),u>this._intervalLogCount){this._intervalLogCount++;var c=function(e,t){var n=iu[e.level||"info"]||ou,r=n.text,i=n.number,o=String(Date.now())+"000000",s={};t.distinctId&&(s.posthogDistinctId=t.distinctId),t.sessionId&&(s.sessionId=t.sessionId),t.currentUrl&&(s["url.full"]=t.currentUrl),t.screenName&&(s["screen.name"]=t.screenName),t.appState&&(s["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(s.feature_flags=t.activeFeatureFlags);var a=Ai({},s,e.attributes||{}),u={timeUnixNano:o,observedTimeUnixNano:o,severityNumber:i,severityText:r,body:{stringValue:e.body},attributes:au(a)};return e.trace_id&&(u.traceId=e.trace_id),e.span_id&&(u.spanId=e.span_id),Ds(e.trace_flags)||(u.flags=e.trace_flags),u}(e,this._getSdkContext());this._logBuffer.push({record:c}),(null!==(o=null==(s=this._instance.config.logs)?void 0:s.maxBufferSize)&&void 0!==o?o:100)>this._logBuffer.length?this._scheduleFlush():this.flushLogs()}else this._droppedWarned||(this._logger.warn("captureLog dropping logs: exceeded "+u+" logs per "+a+"ms"),this._droppedWarned=!0)}else this._logger.warn("captureLog requires a body")},t.flushLogs=function(e){if(this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0),0!==this._logBuffer.length){var t=this._logBuffer;this._logBuffer=[];var n=this._instance.config.logs,r=Ai({"service.name":(null==n?void 0:n.serviceName)||"unknown_service"},(null==n?void 0:n.environment)&&{"deployment.environment":n.environment},(null==n?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},null==n?void 0:n.resourceAttributes),i=function(e,t,n,r){return{resourceLogs:[{resource:{attributes:au(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}(t.map((function(e){return e.record})),r,hs.LIB_NAME,hs.LIB_VERSION),o=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance._send_retriable_request({method:"POST",url:o,data:i,compression:"best-available",batchKey:"logs",transport:e})}},t._scheduleFlush=function(){var e,t,n=this;this._flushTimeout||(this._flushTimeout=setTimeout((function(){n._flushTimeout=void 0,n.flushLogs()}),null!==(e=null==(t=this._instance.config.logs)?void 0:t.flushIntervalMs)&&void 0!==e?e:3e3))},t._getSdkContext=function(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var n=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n.sessionId}if(null!=Ku&&null!=(e=Ku.location)&&e.href&&(t.currentUrl=Ku.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t},Mi(e,[{key:"logger",get:function(){var e=this;return this._logger_instance||(this._logger_instance={trace:function(t,n){return e.captureLog({body:t,level:"trace",attributes:n})},debug:function(t,n){return e.captureLog({body:t,level:"debug",attributes:n})},info:function(t,n){return e.captureLog({body:t,level:"info",attributes:n})},warn:function(t,n){return e.captureLog({body:t,level:"warn",attributes:n})},error:function(t,n){return e.captureLog({body:t,level:"error",attributes:n})},fatal:function(t,n){return e.captureLog({body:t,level:"fatal",attributes:n})}}),this._logger_instance}}])}(),Fv={featureFlags:Sv},Lv={sessionRecording:Y_},Rv={autocapture:M_,historyAutocapture:q_,heatmaps:K_,deadClicksAutocapture:Jp,webVitalsAutocapture:j_},Mv={exceptionObserver:A_,exceptions:Dp},Ov=Ai({productTours:J_},Fv),Av={siteApps:rv},qv={tracingHeaders:D_},$v=Ai({surveys:fv},Fv),Dv={toolbar:vv},Nv=Ai({experiments:Ev},Fv),Hv=Ai({},Fv,Lv,Rv,Mv,Ov,Av,$v,qv,Dv,Nv,{conversations:Tv},{logs:Iv});if(Wh.__defaultExtensionClasses=Ai({},Hv),ov=Mh[Hh]=new Wh,(sv=Ku.posthog)&&nl(sv._i,(function(e){if(e&&Os(e)){var t=ov.init(e[0],e[1],e[2]),n=sv[e[2]]||sv;t&&(t._execute_array.call(t.people,n.people),t._execute_array(n))}})),Ku.posthog=ov,function(){function e(){e.done||(e.done=!0,jh=!1,nl(Mh,(function(e){e._dom_loaded()})))}null!=Vu&&Vu.addEventListener?"complete"===Vu.readyState?e():cl(Vu,"DOMContentLoaded",e,{capture:!1}):ju&&Ju.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),"undefined"==typeof performance||"function"!=typeof performance.now){var jv="undefined"!=typeof performance?performance:{};jv.now=jv.now||function(){return Date.now()},"undefined"==typeof performance&&(window.performance=jv)}}();
|
|
1
|
+
!function(){"use strict";var e,t,n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r={};function i(){if(t)return e;t=1;var r=function(e){return e&&e.Math===Math&&e};return e=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}var o,s,a,u,l,c,d,f,p={};function h(){return s?o:(s=1,o=function(e){try{return!!e()}catch(e){return!0}})}function _(){if(u)return a;u=1;var e=h();return a=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function v(){if(c)return l;c=1;var e=h();return l=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function g(){if(f)return d;f=1;var e=v(),t=function(){}.call;return d=e?t.bind(t):function(){return t.apply(t,arguments)},d}var m,y,b,w,S,x,k,E,C,P,T,I,F,L,R,M,O,A,q,D,N,H,j,U,B,V,z,W,G,Y,Q,Z,K,X,J,ee,te,ne,re,ie,oe,se={};function ae(){if(m)return se;m=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return se.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,se}function ue(){return b?y:(b=1,y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function le(){if(S)return w;S=1;var e=v(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return w=e?r:function(e){return function(){return n.apply(e,arguments)}},w}function ce(){if(k)return x;k=1;var e=le(),t=e({}.toString),n=e("".slice);return x=function(e){return n(t(e),8,-1)}}function de(){return T?P:(T=1,P=function(e){return null==e})}function fe(){if(F)return I;F=1;var e=de(),t=TypeError;return I=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function pe(){if(R)return L;R=1;var e=function(){if(C)return E;C=1;var e=le(),t=h(),n=ce(),r=Object,i=e("".split);return E=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?i(e,""):r(e)}:r}(),t=fe();return L=function(n){return e(t(n))}}function he(){if(O)return M;O=1;var e="object"==typeof document&&document.all;return M=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function _e(){if(q)return A;q=1;var e=he();return A=function(t){return"object"==typeof t?null!==t:e(t)}}function ve(){if(N)return D;N=1;var e=i(),t=he();return D=function(n,r){return 2>arguments.length?t(i=e[n])?i:void 0:e[n]&&e[n][r];var i},D}function ge(){if(j)return H;j=1;var e=le();return H=e({}.isPrototypeOf)}function me(){if(G)return W;G=1;var e=function(){if(z)return V;z=1;var e,t,n=i(),r=function(){if(B)return U;B=1;var e=i().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,s=n.Deno,a=o&&o.versions||s&&s.version,u=a&&a.v8;return u&&(t=(e=u.split("."))[0]>0&&4>e[0]?1:+(e[0]+e[1])),!t&&r&&((e=r.match(/Edge\/(\d+)/))&&74>e[1]||(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1])),V=t}(),t=h(),n=i().String;return W=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&41>e}))}function ye(){if(Q)return Y;Q=1;var e=me();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function be(){if(K)return Z;K=1;var e=ve(),t=he(),n=ge(),r=ye(),i=Object;return Z=r?function(e){return"symbol"==typeof e}:function(r){var o=e("Symbol");return t(o)&&n(o.prototype,i(r))}}function we(){if(J)return X;J=1;var e=String;return X=function(t){try{return e(t)}catch(e){return"Object"}}}function Se(){if(te)return ee;te=1;var e=he(),t=we(),n=TypeError;return ee=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function xe(){if(re)return ne;re=1;var e=Se(),t=de();return ne=function(n,r){var i=n[r];return t(i)?void 0:e(i)},ne}function ke(){if(oe)return ie;oe=1;var e=g(),t=he(),n=_e(),r=TypeError;return ie=function(i,o){var s,a;if("string"===o&&t(s=i.toString)&&!n(a=e(s,i)))return a;if(t(s=i.valueOf)&&!n(a=e(s,i)))return a;if("string"!==o&&t(s=i.toString)&&!n(a=e(s,i)))return a;throw new r("Can't convert object to primitive value")}}var Ee,Ce,Pe,Te,Ie,Fe,Le,Re,Me,Oe,Ae,qe,$e,De,Ne,He,je,Ue,Be,Ve,ze,We,Ge,Ye,Qe={exports:{}};function Ze(){return Ce?Ee:(Ce=1,Ee=!1)}function Ke(){if(Te)return Pe;Te=1;var e=i(),t=Object.defineProperty;return Pe=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Xe(){if(Ie)return Qe.exports;Ie=1;var e=Ze(),t=i(),n=Ke(),r="__core-js_shared__",o=Qe.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"}),Qe.exports}function Je(){if(Le)return Fe;Le=1;var e=Xe();return Fe=function(t,n){return e[t]||(e[t]=n||{})}}function et(){if(Me)return Re;Me=1;var e=fe(),t=Object;return Re=function(n){return t(e(n))}}function tt(){if(Ae)return Oe;Ae=1;var e=le(),t=et(),n=e({}.hasOwnProperty);return Oe=Object.hasOwn||function(e,r){return n(t(e),r)}}function nt(){if($e)return qe;$e=1;var e=le(),t=0,n=Math.random(),r=e(1..toString);return qe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function rt(){if(Ne)return De;Ne=1;var e=i(),t=Je(),n=tt(),r=nt(),o=me(),s=ye(),a=e.Symbol,u=t("wks"),l=s?a.for||a:a&&a.withoutSetter||r;return De=function(e){return n(u,e)||(u[e]=o&&n(a,e)?a[e]:l("Symbol."+e)),u[e]}}function it(){if(je)return He;je=1;var e=g(),t=_e(),n=be(),r=xe(),i=ke(),o=rt(),s=TypeError,a=o("toPrimitive");return He=function(o,u){if(!t(o)||n(o))return o;var l,c=r(o,a);if(c){if(void 0===u&&(u="default"),l=e(c,o,u),!t(l)||n(l))return l;throw new s("Can't convert object to primitive value")}return void 0===u&&(u="number"),i(o,u)}}function ot(){if(Be)return Ue;Be=1;var e=it(),t=be();return Ue=function(n){var r=e(n,"string");return t(r)?r:r+""}}function st(){if(ze)return Ve;ze=1;var e=i(),t=_e(),n=e.document,r=t(n)&&t(n.createElement);return Ve=function(e){return r?n.createElement(e):{}}}function at(){if(Ge)return We;Ge=1;var e=_(),t=h(),n=st();return We=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function ut(){if(Ye)return p;Ye=1;var e=_(),t=g(),n=ae(),r=ue(),i=pe(),o=ot(),s=tt(),a=at(),u=Object.getOwnPropertyDescriptor;return p.f=e?u:function(e,l){if(e=i(e),l=o(l),a)try{return u(e,l)}catch(e){}if(s(e,l))return r(!t(n.f,e,l),e[l])},p}var lt,ct,dt,ft,pt,ht,_t,vt={};function gt(){if(ct)return lt;ct=1;var e=_(),t=h();return lt=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}function mt(){if(ft)return dt;ft=1;var e=_e(),t=String,n=TypeError;return dt=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function yt(){if(pt)return vt;pt=1;var e=_(),t=at(),n=gt(),r=mt(),i=ot(),o=TypeError,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return vt.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var o=a(e,t);o&&o[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:o[l],enumerable:u in n?n[u]:o[u],writable:!1})}return s(e,t,n)}:s:function(e,n,a){if(r(e),n=i(n),r(a),t)try{return s(e,n,a)}catch(e){}if("get"in a||"set"in a)throw new o("Accessors not supported");return"value"in a&&(e[n]=a.value),e},vt}function bt(){if(_t)return ht;_t=1;var e=_(),t=yt(),n=ue();return ht=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e}}var wt,St,xt,kt,Et,Ct,Pt,Tt,It,Ft,Lt,Rt,Mt,Ot,At,qt={exports:{}};function $t(){if(St)return wt;St=1;var e=_(),t=tt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,"name"),o=i&&"something"===function(){}.name,s=i&&(!e||e&&r(n,"name").configurable);return wt={EXISTS:i,PROPER:o,CONFIGURABLE:s}}function Dt(){if(kt)return xt;kt=1;var e=le(),t=he(),n=Xe(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),xt=n.inspectSource}function Nt(){if(Tt)return Pt;Tt=1;var e=Je(),t=nt(),n=e("keys");return Pt=function(e){return n[e]||(n[e]=t(e))}}function Ht(){return Ft?It:(Ft=1,It={})}function jt(){if(Rt)return Lt;Rt=1;var e,t,n,r=function(){if(Ct)return Et;Ct=1;var e=i(),t=he(),n=e.WeakMap;return Et=t(n)&&/native code/.test(String(n))}(),o=i(),s=_e(),a=bt(),u=tt(),l=Xe(),c=Nt(),d=Ht(),f="Object already initialized",p=o.TypeError;if(r||l.state){var h=l.state||(l.state=new(0,o.WeakMap));h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new p(f);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var _=c("state");d[_]=!0,e=function(e,t){if(u(e,_))throw new p(f);return t.facade=e,a(e,_,t),t},t=function(e){return u(e,_)?e[_]:{}},n=function(e){return u(e,_)}}return Lt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!s(n)||(r=t(n)).type!==e)throw new p("Incompatible receiver, "+e+" required");return r}}}}function Ut(){if(Mt)return qt.exports;Mt=1;var e=le(),t=h(),n=he(),r=tt(),i=_(),o=$t().CONFIGURABLE,s=Dt(),a=jt(),u=a.enforce,l=a.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),v=e([].join),g=i&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),y=qt.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||o&&e.name!==t)&&(i?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?i&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=u(e);return r(s,"source")||(s.source=v(m,"string"==typeof t?t:"")),e};return Function.prototype.toString=y((function(){return n(this)&&l(this).source||s(this)}),"toString"),qt.exports}function Bt(){if(At)return Ot;At=1;var e=he(),t=yt(),n=Ut(),r=Ke();return Ot=function(i,o,s,a){a||(a={});var u=a.enumerable,l=void 0!==a.name?a.name:o;if(e(s)&&n(s,l,a),a.global)u?i[o]=s:r(o,s);else{try{a.unsafe?i[o]&&(u=!0):delete i[o]}catch(e){}u?i[o]=s:t.f(i,o,{value:s,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return i},Ot}var Vt,zt,Wt,Gt,Yt,Qt,Zt,Kt,Xt,Jt,en,tn,nn,rn,on,sn,an,un={};function ln(){if(Gt)return Wt;Gt=1;var e=function(){if(zt)return Vt;zt=1;var e=Math.ceil,t=Math.floor;return Vt=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Vt}();return Wt=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function cn(){if(Qt)return Yt;Qt=1;var e=ln(),t=Math.max,n=Math.min;return Yt=function(r,i){var o=e(r);return 0>o?t(o+i,0):n(o,i)}}function dn(){if(Kt)return Zt;Kt=1;var e=ln(),t=Math.min;return Zt=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function fn(){if(Jt)return Xt;Jt=1;var e=dn();return Xt=function(t){return e(t.length)}}function pn(){if(rn)return nn;rn=1;var e=le(),t=tt(),n=pe(),r=function(){if(tn)return en;tn=1;var e=pe(),t=cn(),n=fn(),r=function(r){return function(i,o,s){var a=e(i),u=n(a);if(0===u)return!r&&-1;var l,c=t(s,u);if(r&&o!=o){for(;u>c;)if((l=a[c++])!=l)return!0}else for(;u>c;c++)if((r||c in a)&&a[c]===o)return r||c||0;return!r&&-1}};return en={includes:r(!0),indexOf:r(!1)}}().indexOf,i=Ht(),o=e([].push);return nn=function(e,s){var a,u=n(e),l=0,c=[];for(a in u)!t(i,a)&&t(u,a)&&o(c,a);for(;s.length>l;)t(u,a=s[l++])&&(~r(c,a)||o(c,a));return c},nn}function hn(){return sn?on:(sn=1,on=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}var _n,vn,gn,mn,yn,bn,wn,Sn,xn,kn,En,Cn,Pn,Tn,In,Fn,Ln,Rn,Mn,On,An,qn,$n,Dn,Nn,Hn,jn,Un,Bn,Vn={};function zn(){if(gn)return vn;gn=1;var e=ve(),t=le(),n=function(){if(an)return un;an=1;var e=pn(),t=hn().concat("length","prototype");return un.f=Object.getOwnPropertyNames||function(n){return e(n,t)},un}(),r=(_n||(_n=1,Vn.f=Object.getOwnPropertySymbols),Vn),i=mt(),o=t([].concat);return vn=e("Reflect","ownKeys")||function(e){var t=n.f(i(e)),s=r.f;return s?o(t,s(e)):t}}function Wn(){if(yn)return mn;yn=1;var e=tt(),t=zn(),n=ut(),r=yt();return mn=function(i,o,s){for(var a=t(o),u=r.f,l=n.f,c=0;a.length>c;c++){var d=a[c];e(i,d)||s&&e(s,d)||u(i,d,l(o,d))}},mn}function Gn(){if(xn)return Sn;xn=1;var e=i(),t=ut().f,n=bt(),r=Bt(),o=Ke(),s=Wn(),a=function(){if(wn)return bn;wn=1;var e=h(),t=he(),n=/#|\.prototype\./,r=function(n,r){var u=o[i(n)];return u===a||u!==s&&(t(r)?e(r):!!r)},i=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},o=r.data={},s=r.NATIVE="N",a=r.POLYFILL="P";return bn=r}();return Sn=function(i,u){var l,c,d,f,p,h=i.target,_=i.global,v=i.stat;if(l=_?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in u){if(f=u[c],d=i.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(_?c:h+(v?".":"#")+c,i.forced)&&void 0!==d){if(typeof f==typeof d)continue;s(f,d)}(i.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,i)}}}function Yn(){if(Pn)return Cn;Pn=1;var e=tt(),t=he(),n=et(),r=Nt(),i=function(){if(En)return kn;En=1;var e=h();return kn=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),kn}(),o=r("IE_PROTO"),s=Object,a=s.prototype;return Cn=i?s.getPrototypeOf:function(r){var i=n(r);if(e(i,o))return i[o];var u=i.constructor;return t(u)&&i instanceof u?u.prototype:i instanceof s?a:null},Cn}function Qn(){if(In)return Tn;In=1;var e=pn(),t=hn();return Tn=Object.keys||function(n){return e(n,t)},Tn}function Zn(){if(On)return Mn;On=1;var e=i();return Mn=e}function Kn(){if(Dn)return $n;Dn=1;var e=function(){if(qn)return An;qn=1,function(){if(Rn)return r;Rn=1;var $=Gn(),e=function(){if(Ln)return Fn;Ln=1;var e=_(),t=h(),n=le(),r=Yn(),i=Qn(),o=pe(),s=n(ae().f),a=n([].push),u=e&&t((function(){var e=Object.create(null);return e[2]=2,!s(e,2)})),l=function(t){return function(n){for(var l,c=o(n),d=i(c),f=u&&null===r(c),p=d.length,h=0,_=[];p>h;)l=d[h++],e&&!(f?l in c:s(c,l))||a(_,t?[l,c[l]]:c[l]);return _}};return Fn={entries:l(!0),values:l(!1)}}().entries;$({target:"Object",stat:!0},{entries:function(t){return e(t)}})}();var e=Zn();return An=e.Object.entries}();return $n=e}Bn||(Bn=1,function(){if(Un)return jn;Un=1;var e=function(){if(Hn)return Nn;Hn=1;var e=Kn();return Nn=e}();jn=e}());var Xn,Jn,er,tr,nr,rr,ir,or,sr,ar,ur,lr,cr,dr,fr,pr,hr,_r,vr,gr,mr,yr,br,wr,Sr,xr,kr,Er,Cr,Pr={};function Tr(){if(er)return Jn;er=1;var e=ve();return Jn=e("document","documentElement")}function Ir(){if(nr)return tr;nr=1;var e,t=mt(),n=function(){if(Xn)return Pr;Xn=1;var e=_(),t=gt(),n=yt(),r=mt(),i=pe(),o=Qn();return Pr.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var s,a=i(t),u=o(t),l=u.length,c=0;l>c;)n.f(e,s=u[c++],a[s]);return e},Pr}(),r=hn(),i=Ht(),o=Tr(),s=st(),a=Nt(),u="prototype",l="script",c=a("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,i;h="undefined"!=typeof document?document.domain&&e?p(e):(n=s("iframe"),i="java"+l+":",n.style.display="none",o.appendChild(n),n.src=String(i),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var a=r.length;a--;)delete h[u][r[a]];return h()};return i[c]=!0,tr=Object.create||function(e,r){var i;return null!==e?(d[u]=t(e),i=new d,d[u]=null,i[c]=e):i=h(),void 0===r?i:n.f(i,r)},tr}function Fr(){if(ir)return rr;ir=1;var e=rt(),t=Ir(),n=yt().f,r=e("unscopables"),i=Array.prototype;return void 0===i[r]&&n(i,r,{configurable:!0,value:t(null)}),rr=function(e){i[r][e]=!0}}function Lr(){return sr?or:(sr=1,or={})}function Rr(){if(ur)return ar;ur=1;var e,t,n,r=h(),i=he(),o=_e(),s=Ir(),a=Yn(),u=Bt(),l=rt(),c=Ze(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=a(a(n)))!==Object.prototype&&(e=t):f=!0),!o(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=s(e)),i(e[d])||u(e,d,(function(){return this})),ar={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Mr(){if(cr)return lr;cr=1;var e=yt().f,t=tt(),n=rt()("toStringTag");return lr=function(r,i,o){r&&!o&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:i})}}function Or(){if(vr)return _r;vr=1;var e=_e();return _r=function(t){return e(t)||null===t}}function Ar(){if(mr)return gr;mr=1;var e=Or(),t=String,n=TypeError;return gr=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function qr(){if(Sr)return wr;Sr=1;var $=Gn(),e=g(),t=Ze(),n=$t(),r=he(),i=function(){if(fr)return dr;fr=1;var e=Rr().IteratorPrototype,t=Ir(),n=ue(),r=Mr(),i=Lr(),o=function(){return this};return dr=function(s,a,u,l){var c=a+" Iterator";return s.prototype=t(e,{next:n(+!l,u)}),r(s,c,!1,!0),i[c]=o,s},dr}(),o=Yn(),s=function(){if(br)return yr;br=1;var e=function(){if(hr)return pr;hr=1;var e=le(),t=Se();return pr=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch(e){}}}(),t=_e(),n=fe(),r=Ar();return yr=Object.setPrototypeOf||("__proto__"in{}?function(){var i,o=!1,s={};try{(i=e(Object.prototype,"__proto__","set"))(s,[]),o=s instanceof Array}catch(e){}return function(e,s){return n(e),r(s),t(e)?(o?i(e,s):e.__proto__=s,e):e}}():void 0),yr}(),a=Mr(),u=bt(),l=Bt(),c=rt(),d=Lr(),f=Rr(),p=n.PROPER,h=n.CONFIGURABLE,_=f.IteratorPrototype,v=f.BUGGY_SAFARI_ITERATORS,m=c("iterator"),y="keys",b="values",w="entries",S=function(){return this};return wr=function(n,c,f,g,x,k,E){i(f,c,g);var C,P,T,I=function(e){if(e===x&&O)return O;if(!v&&e&&e in R)return R[e];switch(e){case y:case b:case w:return function(){return new f(this,e)}}return function(){return new f(this)}},F=c+" Iterator",L=!1,R=n.prototype,M=R[m]||R["@@iterator"]||x&&R[x],O=!v&&M||I(x),A="Array"===c&&R.entries||M;if(A&&(C=o(A.call(new n)))!==Object.prototype&&C.next&&(t||o(C)===_||(s?s(C,_):r(C[m])||l(C,m,S)),a(C,F,!0,!0),t&&(d[F]=S)),p&&x===b&&M&&M.name!==b&&(!t&&h?u(R,"name",b):(L=!0,O=function(){return e(M,this)})),x)if(P={values:I(b),keys:k?O:I(y),entries:I(w)},E)for(T in P)(v||L||!(T in R))&&l(R,T,P[T]);else $({target:c,proto:!0,forced:v||L},P);return t&&!E||R[m]===O||l(R,m,O,{name:x}),d[c]=O,P},wr}function $r(){return kr?xr:(kr=1,xr=function(e,t){return{value:e,done:t}})}function Dr(){if(Cr)return Er;Cr=1;var e=pe(),t=Fr(),n=Lr(),r=jt(),i=yt().f,o=qr(),s=$r(),a=Ze(),u=_(),l="Array Iterator",c=r.set,d=r.getterFor(l);Er=o(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,s(void 0,!0);switch(e.kind){case"keys":return s(n,!1);case"values":return s(t[n],!1)}return s([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!a&&u&&"values"!==f.name)try{i(f,"name",{value:"values"})}catch(e){}return Er}var Nr,Hr,jr,Ur,Br,Vr,zr,Wr,Gr,Yr,Qr,Zr,Kr,Xr,Jr,ei,ti,ni,ri,ii,oi,si,ai,ui={};function li(){if(Vr)return Br;Vr=1;var e=rt(),t=Lr(),n=e("iterator"),r=Array.prototype;return Br=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function ci(){if(Yr)return Gr;Yr=1;var e=function(){if(Wr)return zr;Wr=1;var e={};return e[rt()("toStringTag")]="z",zr="[object z]"===String(e)}(),t=he(),n=ce(),r=rt()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return Gr=e?n:function(e){var s,a,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(s=i(e),r))?a:o?n(s):"Object"===(u=n(s))&&t(s.callee)?"Arguments":u},Gr}function di(){if(Zr)return Qr;Zr=1;var e=ci(),t=xe(),n=de(),r=Lr(),i=rt()("iterator");return Qr=function(o){if(!n(o))return t(o,i)||t(o,"@@iterator")||r[e(o)]}}function fi(){if(Xr)return Kr;Xr=1;var e=g(),t=Se(),n=mt(),r=we(),i=di(),o=TypeError;return Kr=function(s,a){var u=2>arguments.length?i(s):a;if(t(u))return n(e(u,s));throw new o(r(s)+" is not iterable")},Kr}function pi(){if(ei)return Jr;ei=1;var e=g(),t=mt(),n=xe();return Jr=function(r,i,o){var s,a;t(r);try{if(!(s=n(r,"return"))){if("throw"===i)throw o;return o}s=e(s,r)}catch(e){a=!0,s=e}if("throw"===i)throw o;if(a)throw s;return t(s),o}}function hi(){if(ni)return ti;ni=1;var e=function(){if(Ur)return jr;Ur=1;var e=function(){if(Hr)return Nr;Hr=1;var e=ce(),t=le();return Nr=function(n){if("Function"===e(n))return t(n)}}(),t=Se(),n=v(),r=e(e.bind);return jr=function(e,i){return t(e),void 0===i?e:n?r(e,i):function(){return e.apply(i,arguments)}},jr}(),t=g(),n=mt(),r=we(),i=li(),o=fn(),s=ge(),a=fi(),u=di(),l=pi(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return ti=function(p,h,_){var v,g,m,y,b,w,S,x=!(!_||!_.AS_ENTRIES),k=!(!_||!_.IS_RECORD),E=!(!_||!_.IS_ITERATOR),C=!(!_||!_.INTERRUPTED),P=e(h,_&&_.that),T=function(e){return v&&l(v,"normal",e),new d(!0,e)},I=function(e){return x?(n(e),C?P(e[0],e[1],T):P(e[0],e[1])):C?P(e,T):P(e)};if(k)v=p.iterator;else if(E)v=p;else{if(!(g=u(p)))throw new c(r(p)+" is not iterable");if(i(g)){for(m=0,y=o(p);y>m;m++)if((b=I(p[m]))&&s(f,b))return b;return new d(!1)}v=a(p,g)}for(w=k?p.next:v.next;!(S=t(w,v)).done;){try{b=I(S.value)}catch(e){l(v,"throw",e)}if("object"==typeof b&&b&&s(f,b))return b}return new d(!1)}}function _i(){if(ii)return ri;ii=1;var e=_(),t=yt(),n=ue();return ri=function(r,i,o){e?t.f(r,i,n(0,o)):r[i]=o}}var vi,gi,mi,yi,bi,wi,Si,xi,ki,Ei,Ci,Pi,Ti={};function Ii(){if(ki)return xi;ki=1;var e=function(){if(Si)return wi;Si=1;var e=function(){if(ai)return si;ai=1,Dr(),function(){if(oi)return ui;oi=1;var $=Gn(),e=hi(),t=_i();$({target:"Object",stat:!0},{fromEntries:function(n){var r={};return e(n,(function(e,n){t(r,e,n)}),{AS_ENTRIES:!0}),r}})}();var e=Zn();return si=e.Object.fromEntries}();return function(){if(bi)return Ti;bi=1;var e=i(),t=gi?vi:(gi=1,vi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),n=function(){if(yi)return mi;yi=1;var e=st()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return mi=t===Object.prototype?void 0:t}(),r=Dr(),o=bt(),s=Mr(),a=rt()("iterator"),u=r.values,l=function(e,n){if(e){if(e[a]!==u)try{o(e,a,u)}catch(t){e[a]=u}if(s(e,n,!0),t[n])for(var i in r)if(e[i]!==r[i])try{o(e,i,r[i])}catch(t){e[i]=r[i]}}};for(var c in t)l(e[c]&&e[c].prototype,c);l(n,"DOMTokenList")}(),wi=e}();return xi=e}function Fi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);t>n;n++)r[n]=e[n];return r}function Li(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function Ri(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Li(o,r,i,s,a,"next",e)}function a(e){Li(o,r,i,s,a,"throw",e)}s(void 0)}))}}function Mi(e,t,n){return t&&function(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hi(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Fi(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fi(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return e.length>r?{done:!1,value:e[r++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ai(){return Ai=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ai.apply(null,arguments)}function qi(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function $i(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=Object.create((r&&r.prototype instanceof a?r:a).prototype);return Di(u,"_invoke",function(n,r,i){var o,a,u,l=0,c=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,a=0,u=e,f.n=n,s}};function p(n,r){for(a=n,u=r,t=0;!d&&l&&!i&&c.length>t;t++){var i,o=c[t],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=e):p>=o[0]&&((i=2>n&&o[1]>p)?(a=0,f.v=r,f.n=o[1]):h>p&&(i=3>n||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,a=0))}if(i||n>1)return s;throw d=!0,r}return function(i,c,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,h),a=c,u=h;(t=2>a?e:u)||!d;){o||(a?3>a?(a>1&&(f.n=-1),p(a,u)):f.n=u:f.v=u);try{if(l=2,o){if(a||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,2>a&&(a=0)}else 1===a&&(t=o.return)&&t.call(o),2>a&&(u=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=e}else if((t=(d=0>f.n)?u:n.call(r,f))!==s)break}catch(t){o=e,a=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,i,o),!0),u}var s={};function a(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(Di(t={},r,(function(){return this})),t),d=l.prototype=a.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Di(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Di(d,"constructor",l),Di(l,"constructor",u),u.displayName="GeneratorFunction",Di(l,i,"GeneratorFunction"),Di(d),Di(d,i,"Generator"),Di(d,r,(function(){return this})),Di(d,"toString",(function(){return"[object Generator]"})),($i=function(){return{w:o,m:f}})()}function Di(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Di=function(e,t,n,r){function o(t,n){Di(e,t,(function(e){return this._invoke(t,n,e)}))}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},Di(e,t,n,r)}function Ni(e,t){return Ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ni(e,t)}function Hi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}Pi||(Pi=1,function(){if(Ci)return Ei;Ci=1;var e=Ii();Ei=e}());var ji,Ui,Bi,Vi,zi,Wi,Gi,Yi,Qi,Zi,Ki,Xi,Ji={},eo=[],to=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,no=Array.isArray;function ro(e,t){for(var n in t)e[n]=t[n];return e}function io(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function oo(e,t,n){var r,i,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?ji.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return so(e,s,r,i,null)}function so(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++Bi:i,__i:-1,__u:0};return null==i&&null!=Ui.vnode&&Ui.vnode(o),o}function ao(e){return e.children}function uo(e,t){this.props=e,this.context=t}function lo(e,t){if(null==t)return e.__?lo(e.__,e.__i+1):null;for(var n;e.__k.length>t;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?lo(e):null}function co(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;e.__k.length>t;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return co(e)}}function fo(e){(!e.__d&&(e.__d=!0)&&Vi.push(e)&&!$.__r++||zi!=Ui.debounceRendering)&&((zi=Ui.debounceRendering)||Wi)($)}function $(){for(var e,t,n,r,i,o,s,a=1;Vi.length;)Vi.length>a&&Vi.sort(Gi),e=Vi.shift(),a=Vi.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],s=[],t.__P&&((n=ro({},r)).__v=r.__v+1,Ui.vnode&&Ui.vnode(n),yo(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,null==i?lo(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,wo(o,n,s),r.__e=r.__=null,n.__e!=i&&co(n)));$.__r=0}function po(e,t,n,r,i,o,s,a,u,l,c){var d,f,p,h,_,v,g,m=r&&r.__k||eo,y=t.length;for(u=function(e,t,n,r,i){var o,s,a,u,l,c=n.length,d=c,f=0;for(e.__k=new Array(i),o=0;i>o;o++)null!=(s=t[o])&&"boolean"!=typeof s&&"function"!=typeof s?("string"==typeof s||"number"==typeof s||"bigint"==typeof s||s.constructor==String?s=e.__k[o]=so(null,s,null,null,null):no(s)?s=e.__k[o]=so(ao,{children:s},null,null,null):void 0===s.constructor&&s.__b>0?s=e.__k[o]=so(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[o]=s,u=o+f,s.__=e,s.__b=e.__b+1,a=null,-1!=(l=s.__i=_o(s,n,u,d))&&(d--,(a=n[l])&&(a.__u|=2)),null==a||null==a.__v?(-1==l&&(i>c?f--:c>i&&f++),"function"!=typeof s.type&&(s.__u|=4)):l!=u&&(l==u-1?f--:l==u+1?f++:(l>u?f--:f++,s.__u|=4))):e.__k[o]=null;if(d)for(o=0;c>o;o++)null!=(a=n[o])&&0==(2&a.__u)&&(a.__e==r&&(r=lo(a)),Eo(a,a));return r}(n,t,m,u,y),d=0;y>d;d++)null!=(p=n.__k[d])&&(f=-1==p.__i?Ji:m[p.__i]||Ji,p.__i=d,v=yo(e,p,f,i,o,s,a,u,l,c),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&ko(f.ref,null,p),c.push(p.ref,p.__c||h,p)),null==_&&null!=h&&(_=h),(g=!!(4&p.__u))||f.__k===p.__k?u=ho(p,u,e,g):"function"==typeof p.type&&void 0!==v?u=v:h&&(u=h.nextSibling),p.__u&=-7);return n.__e=_,u}function ho(e,t,n,r){var i,o;if("function"==typeof e.type){for(i=e.__k,o=0;i&&i.length>o;o++)i[o]&&(i[o].__=e,t=ho(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=lo(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function _o(e,t,n,r){var i,o,s,a=e.key,u=e.type,l=t[n],c=null!=l&&0==(2&l.__u);if(null===l&&null==a||c&&a==l.key&&u==l.type)return n;if(r>(c?1:0))for(i=n-1,o=n+1;i>=0||t.length>o;)if(null!=(l=t[s=0>i?o++:i--])&&0==(2&l.__u)&&a==l.key&&u==l.type)return s;return-1}function vo(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||to.test(t)?n:n+"px"}function go(e,t,n,r,i){var o,s;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||vo(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||vo(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])o=t!=(t=t.replace(Yi,"$1")),s=t.toLowerCase(),t=s in e||"onFocusOut"==t||"onFocusIn"==t?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Qi,e.addEventListener(t,o?Ki:Zi,o)):e.removeEventListener(t,o?Ki:Zi,o);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function mo(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=Qi++;else if(n.u>t.t)return;return n(Ui.event?Ui.event(t):t)}}}function yo(e,t,n,r,i,o,s,a,u,l){var c,d,f,p,h,_,v,g,m,y,b,$,w,S,x,k,E,C=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),o=[a=t.__e=n.__e]),(c=Ui.__b)&&c(t);e:if("function"==typeof C)try{if(g=t.props,m="prototype"in C&&C.prototype.render,y=(c=C.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:(m?t.__c=d=new C(g,b):(t.__c=d=new uo(g,b),d.constructor=C,d.render=Co),y&&y.sub(d),d.state||(d.state={}),d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),m&&null==d.__s&&(d.__s=d.state),m&&null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=ro({},d.__s)),ro(d.__s,C.getDerivedStateFromProps(g,d.__s))),p=d.props,h=d.state,d.__v=t,f)m&&null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),m&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(m&&null==C.getDerivedStateFromProps&&g!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(g,b),t.__v==n.__v||!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(g,d.__s,b)){for(t.__v!=n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some((function(e){e&&(e.__=t)})),$=0;d._sb.length>$;$++)d.__h.push(d._sb[$]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(g,d.__s,b),m&&null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,h,_)}))}if(d.context=b,d.props=g,d.__P=e,d.__e=!1,w=Ui.__r,S=0,m){for(d.state=d.__s,d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),x=0;d._sb.length>x;x++)d.__h.push(d._sb[x]);d._sb=[]}else do{d.__d=!1,w&&w(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&25>++S);d.state=d.__s,null!=d.getChildContext&&(r=ro(ro({},r),d.getChildContext())),m&&!f&&null!=d.getSnapshotBeforeUpdate&&(_=d.getSnapshotBeforeUpdate(p,h)),k=c,null!=c&&c.type===ao&&null==c.key&&(k=So(c.props.children)),a=po(e,no(k)?k:[k],t,n,r,i,o,s,a,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(e){if(t.__v=null,u||null!=o)if(e.then){for(t.__u|=u?160:128;a&&8==a.nodeType&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,t.__e=a}else{for(E=o.length;E--;)io(o[E]);bo(t)}else t.__e=n.__e,t.__k=n.__k,e.then||bo(t);Ui.__e(e,t,n)}else null==o&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=xo(n.__e,t,n,r,i,o,s,u,l);return(c=Ui.diffed)&&c(t),128&t.__u?void 0:a}function bo(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(bo)}function wo(e,t,n){for(var r=0;n.length>r;r++)ko(n[r],n[++r],n[++r]);Ui.__c&&Ui.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Ui.__e(e,t.__v)}}))}function So(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:no(e)?e.map(So):ro({},e)}function xo(e,t,n,r,i,o,s,a,u){var l,c,d,f,p,h,_,v=n.props||Ji,g=t.props,m=t.type;if("svg"==m?i="http://www.w3.org/2000/svg":"math"==m?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=o)for(l=0;o.length>l;l++)if((p=o[l])&&"setAttribute"in p==!!m&&(m?p.localName==m:3==p.nodeType)){e=p,o[l]=null;break}if(null==e){if(null==m)return document.createTextNode(g);e=document.createElementNS(i,m,g.is&&g),a&&(Ui.__m&&Ui.__m(t,o),a=!1),o=null}if(null==m)v===g||a&&e.data==g||(e.data=g);else{if(o=o&&ji.call(e.childNodes),!a&&null!=o)for(v={},l=0;e.attributes.length>l;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],"children"==l);else if("dangerouslySetInnerHTML"==l)d=p;else if(!(l in g)){if("value"==l&&"defaultValue"in g||"checked"==l&&"defaultChecked"in g)continue;go(e,l,null,p,i)}for(l in g)p=g[l],"children"==l?f=p:"dangerouslySetInnerHTML"==l?c=p:"value"==l?h=p:"checked"==l?_=p:a&&"function"!=typeof p||v[l]===p||go(e,l,p,v[l],i);if(c)a||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),po("template"==t.type?e.content:e,no(f)?f:[f],t,n,r,"foreignObject"==m?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&lo(n,0),a,u),null!=o)for(l=o.length;l--;)io(o[l]);a||(l="value","progress"==m&&null==h?e.removeAttribute("value"):null!=h&&(h!==e[l]||"progress"==m&&!h||"option"==m&&h!=v[l])&&go(e,l,h,v[l],i),l="checked",null!=_&&_!=e[l]&&go(e,l,_,v[l],i))}return e}function ko(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Ui.__e(e,n)}}function Eo(e,t,n){var r,i;if(Ui.unmount&&Ui.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||ko(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Ui.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;r.length>i;i++)r[i]&&Eo(r[i],t,n||"function"!=typeof e.type);n||io(e.__e),e.__c=e.__=e.__e=void 0}function Co(e,t,n){return this.constructor(e,n)}function Po(e,t,n){var r,i,o;t==document&&(t=document.documentElement),Ui.__&&Ui.__(e,t),r=t.__k,i=[],o=[],yo(t,e=t.__k=oo(ao,null,[e]),r||Ji,Ji,t.namespaceURI,r?null:t.firstChild?ji.call(t.childNodes):null,i,r?r.__e:t.firstChild,!1,o),wo(i,e,o)}ji=eo.slice,Ui={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(t){e=t}throw e}},Bi=0,uo.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=ro({},this.state),"function"==typeof e&&(e=e(ro({},n),this.props)),e&&ro(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),fo(this))},uo.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),fo(this))},uo.prototype.render=ao,Vi=[],Wi="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Gi=function(e,t){return e.__v.__b-t.__v.__b},$.__r=0,Yi=/(PointerCapture)$|Capture$/i,Qi=0,Zi=mo(!1),Ki=mo(!0),Xi=0;var To,Io,Fo,Lo,Ro=0,Mo=[],Oo=Ui,Ao=Oo.__b,qo=Oo.__r,$o=Oo.diffed,Do=Oo.__c,No=Oo.unmount,Ho=Oo.__;function jo(e,t){Oo.__h&&Oo.__h(Io,e,Ro||t),Ro=0;var n=Io.__H||(Io.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Uo(e){return Ro=1,function(e,t,n){var r=jo(To++,2);if(r.t=e,!r.__c&&(r.__=[Jo(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Io,!Io.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return!!e.__c}));if(i.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=r.__c.props!==e;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),o&&o.call(this,e,t,n)||s};Io.__f=!0;var o=Io.shouldComponentUpdate,s=Io.componentWillUpdate;Io.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,i(e,t,n),o=r}s&&s.call(this,e,t,n)},Io.shouldComponentUpdate=i}return r.__N||r.__}(Jo,e)}function Bo(e,t){var n=jo(To++,3);!Oo.__s&&Xo(n.__H,t)&&(n.__=e,n.u=t,Io.__H.__h.push(n))}function Vo(e){return Ro=5,zo((function(){return{current:e}}),[])}function zo(e,t){var n=jo(To++,7);return Xo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Wo(e){var t=Io.context[e.__c],n=jo(To++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Io)),t.props.value):e.__}function Go(){for(var e;e=Mo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Zo),e.__H.__h.forEach(Ko),e.__H.__h=[]}catch(t){e.__H.__h=[],Oo.__e(t,e.__v)}}Oo.__b=function(e){Io=null,Ao&&Ao(e)},Oo.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ho&&Ho(e,t)},Oo.__r=function(e){qo&&qo(e),To=0;var t=(Io=e.__c).__H;t&&(Fo===Io?(t.__h=[],Io.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0}))):(t.__h.forEach(Zo),t.__h.forEach(Ko),t.__h=[],To=0)),Fo=Io},Oo.diffed=function(e){$o&&$o(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Mo.push(t)&&Lo===Oo.requestAnimationFrame||((Lo=Oo.requestAnimationFrame)||Qo)(Go)),t.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.u=void 0}))),Fo=Io=null},Oo.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Zo),e.__h=e.__h.filter((function(e){return!e.__||Ko(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Oo.__e(n,e.__v)}})),Do&&Do(e,t)},Oo.unmount=function(e){No&&No(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Zo(e)}catch(e){t=e}})),n.__H=void 0,t&&Oo.__e(t,n.__v))};var Yo="function"==typeof requestAnimationFrame;function Qo(e){var t,n=function(){clearTimeout(r),Yo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Yo&&(t=requestAnimationFrame(n))}function Zo(e){var t=Io,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Io=t}function Ko(e){var t=Io;e.__c=e.__(),Io=t}function Xo(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Jo(e,t){return"function"==typeof t?t(e):t}var es,ts="events",ns="cancelEvents",rs={Tab:"tab",Selector:"selector"},is={TopLeft:"top_left",TopRight:"top_right",TopCenter:"top_center",MiddleLeft:"middle_left",MiddleRight:"middle_right",MiddleCenter:"middle_center",Left:"left",Center:"center",Right:"right",NextToTrigger:"next_to_trigger"},os={Top:"top",Left:"left",Right:"right",Bottom:"bottom"},ss={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},as={Open:"open",MultipleChoice:"multiple_choice",SingleChoice:"single_choice",Rating:"rating",Link:"link"},us={End:"end",ResponseBased:"response_based",SpecificQuestion:"specific_question"},ls="always",cs={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},ds={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_COMPLETED:"$survey_completed",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date",SURVEY_LANGUAGE:"$survey_language"},fs="popover",ps="1.376.1",hs={DEBUG:!1,LIB_VERSION:ps,LIB_NAME:"web",JS_SDK_VERSION:ps},_s=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),vs=function(e){return e.MinLength="min_length",e.MaxLength="max_length",e}({}),gs=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],ms="NativeGzipValidationError",ys=function(e){return e.length>=2&&31===e[0]&&139===e[1]},bs=function(e){return!(!e||"object"!=typeof e)&&"NotReadableError"===("name"in e?String(e.name):"")},ws=function(e){for(var t=function(){if(es)return es;es=[];for(var e=0;256>e;e++){for(var t=e,n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;es[e]=t>>>0}return es}(),n=4294967295,r=0;e.length>r;r++)n=t[255&(n^e[r])]^n>>>8;return(4294967295^n)>>>0},Ss=function(e){var t=new Error("Native gzip produced invalid output: "+e);throw t.name=ms,t},xs=function(){var e=Ri($i().m((function e(t,n){var r,i,o,s,a;return $i().w((function(e){for(;;)switch(e.n){case 0:return 18>t.size&&Ss("too-short"),s=Uint8Array,e.n=1,t.slice(0,10).arrayBuffer();case 1:return r=new s(e.v),ys(r)&&8===r[2]||Ss("invalid-header"),a=DataView,e.n=2,t.slice(t.size-8).arrayBuffer();case 2:(i=new a(e.v)).getUint32(0,!0)!==ws(n)&&Ss("invalid-crc"),o=n.length>>>0,i.getUint32(4,!0)!==o&&Ss("invalid-size");case 3:return e.a(2)}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function ks(e,t,n){return Es.apply(this,arguments)}function Es(){return Es=Ri($i().m((function e(t,n,r){var i,o,s,a,u,l,c;return $i().w((function(e){for(;;)switch(e.p=e.n){case 0:return void 0===n&&(n=!0),e.p=1,i=(new TextEncoder).encode(t),o=new CompressionStream("gzip"),s=o.writable.getWriter(),a=s.write(i).then((function(){return s.close()})).catch(function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,s.abort(t);case 1:e.n=3;break;case 2:e.p=2;case 3:throw t;case 4:return e.a(2)}}),e,null,[[0,2]])})));return function(t){return e.apply(this,arguments)}}()),u=new Response(o.readable).blob(),e.n=2,Promise.all([u,a]);case 2:return l=e.v[0],e.n=3,xs(l,i);case 3:return e.a(2,l);case 4:if(e.p=4,c=e.v,null==r||!r.rethrow){e.n=5;break}throw c;case 5:return n&&console.error("Failed to gzip compress data",c),e.a(2,null)}}),e,null,[[1,4]])}))),Es.apply(this,arguments)}var Cs=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Ps=function(e,t){if(void 0===t&&(t=[]),!e)return!1;var n=e.toLowerCase();return Cs.concat(t).some((function(e){var t=e.toLowerCase();return-1!==n.indexOf(t)}))};function Ts(e,t){return-1!==e.indexOf(t)}var Is=function(e){return e.trim()},Fs=function(e){return e.replace(/^\$/,"")},Ls=Object.prototype,Rs=Ls.hasOwnProperty,Ms=Ls.toString,Os=Array.isArray||function(e){return"[object Array]"===Ms.call(e)},As=function(e){return"function"==typeof e},qs=function(e){return e===Object(e)&&!Os(e)},$s=function(e){if(qs(e)){for(var t in e)if(Rs.call(e,t))return!1;return!0}return!1},Ds=function(e){return void 0===e},Ns=function(e){return"[object String]"==Ms.call(e)},Hs=function(e){return Ns(e)&&0===e.trim().length},js=function(e){return null===e},Us=function(e){return Ds(e)||js(e)},Bs=function(e){return"[object Number]"==Ms.call(e)&&e==e},Vs=function(e){return Bs(e)&&e>0},zs=function(e){return"[object Boolean]"===Ms.call(e)},Ws=function(e){return e instanceof FormData},Gs=function(e){return Ts(gs,e)};function Ys(e){return null===e||"object"!=typeof e}function Qs(e,t){return{}.toString.call(e)==="[object "+t+"]"}function Zs(e){return"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(e,Event)}var Ks=[!0,"true",1,"1","yes"],Xs=function(e){return Ts(Ks,e)},Js=[!1,"false",0,"0","no"];function ea(e,t,n,r,i){return t>n&&(r.warn("min cannot be greater than max."),t=n),Bs(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+i),ea(i||n,t,n,r))}var ta,na,ra,ia,oa=function(){function e(e){this._buckets={},this._onBucketRateLimited=e._onBucketRateLimited,this._bucketSize=ea(e.bucketSize,0,100,e._logger),this._refillRate=ea(e.refillRate,0,this._bucketSize,e._logger),this._refillInterval=ea(e.refillInterval,0,864e5,e._logger)}var t=e.prototype;return t._applyRefill=function(e,t){var n=Math.floor((t-e.lastAccess)/this._refillInterval);n>0&&(e.tokens=Math.min(e.tokens+n*this._refillRate,this._bucketSize),e.lastAccess=e.lastAccess+n*this._refillInterval)},t.consumeRateLimit=function(e){var t,n=Date.now(),r=String(e),i=this._buckets[r];return i?this._applyRefill(i,n):this._buckets[r]=i={tokens:this._bucketSize,lastAccess:n},0===i.tokens||(i.tokens--,0===i.tokens&&(null==(t=this._onBucketRateLimited)||t.call(this,e)),0===i.tokens)},t.stop=function(){this._buckets={}},e}(),sa="Mobile",aa="iOS",ua="Android",la="Tablet",ca=ua+" "+la,da="iPad",fa="Apple",pa=fa+" Watch",ha="Safari",_a="BlackBerry",va="Samsung",ga=va+"Browser",ma=va+" Internet",ya="Chrome",ba=ya+" OS",wa=ya+" "+aa,Sa="Internet Explorer",xa=Sa+" "+sa,ka="Opera",Ea=ka+" Mini",Ca="Edge",Pa="Microsoft "+Ca,Ta="Firefox",Ia=Ta+" "+aa,Fa="Nintendo",La="PlayStation",Ra="Xbox",Ma=ua+" "+sa,Oa=sa+" "+ha,Aa="Windows",qa=Aa+" Phone",$a="Nokia",Da="Ouya",Na="Generic",Ha=Na+" "+sa.toLowerCase(),ja=Na+" "+la.toLowerCase(),Ua="Konqueror",Ba="Oculus Browser",Va="(\\d+(\\.\\d+)?)",za=new RegExp("Version/"+Va),Wa=new RegExp(Ra,"i"),Ga=new RegExp(La+" \\w+","i"),Ya=new RegExp(Fa+" \\w+","i"),Qa=new RegExp(_a+"|PlayBook|BB10","i"),Za={"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"},Ka=function(e,t){return t=t||"",Ts(e," OPR/")&&Ts(e,"Mini")?Ea:Ts(e," OPR/")?ka:Qa.test(e)?_a:Ts(e,"IE"+sa)||Ts(e,"WPDesktop")?xa:Ts(e,"OculusBrowser")?Ba:Ts(e,ga)?ma:Ts(e,Ca)||Ts(e,"Edg/")?Pa:Ts(e,"FBIOS")?"Facebook "+sa:Ts(e,"UCWEB")||Ts(e,"UCBrowser")?"UC Browser":Ts(e,"CriOS")?wa:Ts(e,"CrMo")||Ts(e,ya)?ya:Ts(e,ua)&&Ts(e,ha)?Ma:Ts(e,"FxiOS")?Ia:Ts(e.toLowerCase(),Ua.toLowerCase())?Ua:function(e,t){return t&&Ts(t,fa)||function(e){return Ts(e,ha)&&!Ts(e,ya)&&!Ts(e,ua)}(e)}(e,t)?Ts(e,sa)?Oa:ha:Ts(e,Ta)?Ta:Ts(e,"MSIE")||Ts(e,"Trident/")?Sa:Ts(e,"Gecko")?Ta:""},Xa=((ta={})[xa]=[new RegExp("rv:"+Va)],ta[Pa]=[new RegExp(Ca+"?\\/"+Va)],ta[ya]=[new RegExp("("+ya+"|CrMo)\\/"+Va)],ta[wa]=[new RegExp("CriOS\\/"+Va)],ta["UC Browser"]=[new RegExp("(UCBrowser|UCWEB)\\/"+Va)],ta[ha]=[za],ta[Oa]=[za],ta[ka]=[new RegExp("(Opera|OPR)\\/"+Va)],ta[Ta]=[new RegExp(Ta+"\\/"+Va)],ta[Ia]=[new RegExp("FxiOS\\/"+Va)],ta[Ua]=[new RegExp("Konqueror[:/]?"+Va,"i")],ta[_a]=[new RegExp(_a+" "+Va),za],ta[Ma]=[new RegExp("android\\s"+Va,"i")],ta[ma]=[new RegExp(ga+"\\/"+Va)],ta[Ba]=[new RegExp("OculusBrowser\\/"+Va)],ta[Sa]=[new RegExp("(rv:|MSIE )"+Va)],ta.Mozilla=[new RegExp("rv:"+Va)],ta),Ja=function(e,t){var n=Ka(e,t),r=Xa[n];if(Ds(r))return null;for(var i=0;r.length>i;i++){var o=e.match(r[i]);if(o)return parseFloat(o[o.length-2])}return null},eu=[[new RegExp(Ra+"; "+Ra+" (.*?)[);]","i"),function(e){return[Ra,e&&e[1]||""]}],[new RegExp(Fa,"i"),[Fa,""]],[new RegExp(La,"i"),[La,""]],[Qa,[_a,""]],[new RegExp(Aa,"i"),function(e,t){if(/Phone/.test(t)||/WPDesktop/.test(t))return[qa,""];if(new RegExp(sa).test(t)&&!/IEMobile\b/.test(t))return[Aa+" "+sa,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=Za[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[Aa,r]}return[Aa,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,function(e){return e&&e[3]?[aa,[e[3],e[4],e[5]||"0"].join(".")]:[aa,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,function(e){var t="";return e&&e.length>=3&&(t=Ds(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+ua+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+ua+")","i"),function(e){return e&&e[2]?[ua,[e[2],e[3],e[4]||"0"].join(".")]:[ua,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,function(e){var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[ba,""]],[/Linux|debian/i,["Linux",""]]],tu=function(e){return Ya.test(e)?Fa:Ga.test(e)?La:Wa.test(e)?Ra:new RegExp(Da,"i").test(e)?Da:new RegExp("("+qa+"|WPDesktop)","i").test(e)?qa:/iPad/.test(e)?da:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?pa:Qa.test(e)?_a:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp($a,"i").test(e)?$a:/(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(sa).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)?ua:ca:new RegExp("(pda|"+sa+")","i").test(e)?Ha:new RegExp(la,"i").test(e)&&!new RegExp(la+" pc","i").test(e)?ja:""},nu=function(e,t){var n,r,i,o,s=tu(e);return s===da||s===ca||"Kobo"===s||"Kindle Fire"===s||s===ja?la:s===Fa||s===Ra||s===La||s===Da?"Console":s===pa?"Wearable":s?sa:"Android"===(null==t?void 0:t.userAgentDataPlatform)&&(null!==(n=null==t?void 0:t.maxTouchPoints)&&void 0!==n?n:0)>0?600>Math.min(null!==(r=null==t?void 0:t.screenWidth)&&void 0!==r?r:0,null!==(i=null==t?void 0:t.screenHeight)&&void 0!==i?i:0)/(null!==(o=null==t?void 0:t.devicePixelRatio)&&void 0!==o?o:1)?sa:la:"Desktop"},ru=function(e){return e instanceof Error},iu={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},ou=iu.info;function su(e){if(zs(e))return{boolValue:e};if("number"==typeof e)return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if("string"==typeof e)return{stringValue:e};if(Os(e))return{arrayValue:{values:e.map((function(e){return su(e)}))}};try{return{stringValue:JSON.stringify(e)}}catch(t){return{stringValue:String(e)}}}function au(e){var t=[];for(var n in e){var r=e[n];js(r)||Ds(r)||t.push({key:n,value:su(r)})}return t}function uu(e,t){if(e){var n=e.find((function(e){return e.type===t}));return null==n?void 0:n.value}}function lu(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return ia&&n.length===ra||(ra=n.length,ia=n.reduce((function(n,r){na||(na={});var i=na[r];if(i)n[i[0]]=i[1];else for(var o=e(r),s=o.length-1;s>=0;s--){var a=o[s],u=null==a?void 0:a.filename,l=t[r];if(u&&l){n[u]=l,na[r]=[u,l];break}}return n}),{})),ia}}var cu=function(){function e(e,t,n){void 0===n&&(n=[]),this.coercers=e,this.stackParser=t,this.modifiers=n}var t=e.prototype;return t.buildFromUnknown=function(e,t){void 0===t&&(t={});var n=t&&t.mechanism||{handled:!0,type:"generic"},r=this.buildCoercingContext(n,t,0).apply(e),i=this.buildParsingContext(t),o=this.parseStacktrace(r,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}},t.modifyFrames=function(){var e=Ri($i().m((function e(t){var n,r,i;return $i().w((function(e){for(;;)switch(e.n){case 0:n=Oi(t);case 1:if((r=n()).done){e.n=4;break}if(!((i=r.value).stacktrace&&i.stacktrace.frames&&Os(i.stacktrace.frames))){e.n=3;break}return e.n=2,this.applyModifiers(i.stacktrace.frames);case 2:i.stacktrace.frames=e.v;case 3:e.n=1;break;case 4:return e.a(2,t)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.coerceFallback=function(e){var t;return{type:"Error",value:"Unknown error",stack:null==(t=e.syntheticException)?void 0:t.stack,synthetic:!0}},t.parseStacktrace=function(e,t){var n,r;return null!=e.cause&&(n=this.parseStacktrace(e.cause,t)),""!=e.stack&&null!=e.stack&&(r=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?t.skipFirstLines:0),t.chunkIdMap)),Ai({},e,{cause:n,stack:r})},t.applyChunkIds=function(e,t){return e.map((function(e){return e.filename&&t&&(e.chunk_id=t[e.filename]),e}))},t.applyCoercers=function(e,t){for(var n,r=Oi(this.coercers);!(n=r()).done;){var i=n.value;if(i.match(e))return i.coerce(e,t)}return this.coerceFallback(t)},t.applyModifiers=function(){var e=Ri($i().m((function e(t){var n,r,i,o;return $i().w((function(e){for(;;)switch(e.n){case 0:n=t,r=Oi(this.modifiers);case 1:if((i=r()).done){e.n=4;break}return o=i.value,e.n=2,o(n);case 2:n=e.v;case 3:e.n=1;break;case 4:return e.a(2,n)}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.convertToExceptionList=function(e,t){var n,r,i,o={type:e.type,value:e.value,mechanism:{type:null!==(n=t.type)&&void 0!==n?n:"generic",handled:null===(r=t.handled)||void 0===r||r,synthetic:null!==(i=e.synthetic)&&void 0!==i&&i}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var s=[o];return null!=e.cause&&s.push.apply(s,this.convertToExceptionList(e.cause,Ai({},t,{handled:!0}))),s},t.buildParsingContext=function(e){var t;return{chunkIdMap:lu(this.stackParser),skipFirstLines:null!==(t=e.skipFirstLines)&&void 0!==t?t:1}},t.buildCoercingContext=function(e,t,n){var r=this;void 0===n&&(n=0);var i=function(n,i){if(4>=i){var o=r.buildCoercingContext(e,t,i);return r.applyCoercers(n,o)}};return Ai({},t,{syntheticException:0==n?t.syntheticException:void 0,mechanism:e,apply:function(e){return i(e,n)},next:function(e){return i(e,n+1)}})},e}(),du="?";function fu(e,t,n,r,i){var o={platform:e,filename:t,function:"<anonymous>"===n?du:n,in_app:!0};return Ds(r)||(o.lineno=r),Ds(i)||(o.colno=i),o}var pu=function(e,t){var n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:du,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},hu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_u=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vu=/\((\S*)(?::(\d+))(?::(\d+))\)/,gu=function(e,t){var n=hu.exec(e);if(n)return fu(t,n[1],du,+n[2],+n[3]);var r=_u.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){var i=vu.exec(r[2]);i&&(r[2]=i[1],r[3]=i[2],r[4]=i[3])}var o=pu(r[1]||du,r[2]);return fu(t,o[1],o[0],r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},mu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,yu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bu=function(e,t){var n=mu.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=yu.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var i=n[3],o=n[1]||du,s=pu(o,i);return fu(t,i=s[1],o=s[0],n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},wu=/\(error: (.*)\)/,Su=50;var xu=function(){function e(){}var t=e.prototype;return t.match=function(e){return this.isDOMException(e)||this.isDOMError(e)},t.coerce=function(e,t){var n=Ns(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?t.next(e.cause):void 0,synthetic:!1}},t.getType=function(e){return this.isDOMError(e)?"DOMError":"DOMException"},t.getValue=function(e){var t=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?t+": "+e.message:t},t.isDOMException=function(e){return Qs(e,"DOMException")},t.isDOMError=function(e){return Qs(e,"DOMError")},e}(),ku=function(){function e(){}var t=e.prototype;return t.match=function(e){return function(e){return e instanceof Error}(e)},t.coerce=function(e,t){return{type:this.getType(e),value:this.getMessage(e,t),stack:this.getStack(e),cause:e.cause?t.next(e.cause):void 0,synthetic:!1}},t.getType=function(e){return e.name||e.constructor.name},t.getMessage=function(e,t){var n=e.message;return String(n.error&&"string"==typeof n.error.message?n.error.message:n)},t.getStack=function(e){return e.stacktrace||e.stack||void 0},e}(),Eu=function(){function e(){}var t=e.prototype;return t.match=function(e){return Qs(e,"ErrorEvent")&&null!=e.error},t.coerce=function(e,t){var n;return t.apply(e.error)||{type:"ErrorEvent",value:e.message,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Cu=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,Pu=function(){function e(){}var t=e.prototype;return t.match=function(e){return"string"==typeof e},t.coerce=function(e,t){var n,r=this.getInfos(e),i=r[0],o=r[1];return{type:null!=i?i:"Error",value:null!=o?o:e,stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},t.getInfos=function(e){var t="Error",n=e,r=e.match(Cu);return r&&(t=r[1],n=r[2]),[t,n]},e}(),Tu=["fatal","error","warning","log","info","debug"];function Iu(e,t){void 0===t&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(t>=i.length)return r===n.length?i:i.length>t?i.slice(0,t)+"...":i}return""}var Fu=function(){function e(){}var t=e.prototype;return t.match=function(e){return"object"==typeof e&&null!==e},t.coerce=function(e,t){var n,r=this.getErrorPropertyFromObject(e);return r?t.apply(r):{type:this.getType(e),value:this.getValue(e),stack:null==(n=t.syntheticException)?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}},t.getType=function(e){return Zs(e)?e.constructor.name:"Error"},t.getValue=function(e){if("name"in e&&"string"==typeof e.name){var t="'"+e.name+"' captured as exception";return"message"in e&&"string"==typeof e.message&&(t+=" with message: '"+e.message+"'"),t}if("message"in e&&"string"==typeof e.message)return e.message;var n=this.getObjectClassName(e);return(n&&"Object"!==n?"'"+n+"'":"Object")+" captured as exception with keys: "+Iu(e)},t.isSeverityLevel=function(e){return Ns(e)&&!Hs(e)&&Tu.indexOf(e)>=0},t.getErrorPropertyFromObject=function(e){for(var t in e)if({}.hasOwnProperty.call(e,t)){var n=e[t];if(ru(n))return n}},t.getObjectClassName=function(e){try{var t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){return}},e}(),Lu=function(){function e(){}var t=e.prototype;return t.match=function(e){return Zs(e)},t.coerce=function(e,t){var n,r=e.constructor.name;return{type:r,value:r+" captured as exception with keys: "+Iu(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Ru=function(){function e(){}var t=e.prototype;return t.match=function(e){return Ys(e)},t.coerce=function(e,t){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}},e}(),Mu=function(){function e(){}var t=e.prototype;return t.match=function(e){return Qs(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)},t.isCustomEventWrappingRejection=function(e){if(!Zs(e))return!1;try{var t=e.detail;return null!=t&&"object"==typeof t&&"reason"in t}catch(e){return!1}},t.coerce=function(e,t){var n,r=this.getUnhandledRejectionReason(e);return Ys(r)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(r),stack:null==(n=t.syntheticException)?void 0:n.stack,synthetic:!0}:t.apply(r)},t.getUnhandledRejectionReason=function(e){try{if("reason"in e)return e.reason;if("detail"in e&&null!=e.detail&&"object"==typeof e.detail&&"reason"in e.detail)return e.detail.reason}catch(e){}return e},e}(),Ou="$message",Au="$timestamp",qu=new Set([Ou,Au]),$u={enabled:!0,max_bytes:32768};function Du(e){var t;return e?{enabled:null!==(t=e.enabled)&&void 0!==t?t:$u.enabled,max_bytes:Hu(e.max_bytes,$u.max_bytes)}:Ai({},$u)}var Nu=function(){function e(e){this._entries=[],this._totalBytes=0,this._config=Du(e)}var t=e.prototype;return t.setConfig=function(e){this._config=Du(e),this._trimToMaxBytes()},t.add=function(e){var t=function(e){var t=function(e){var t=new WeakSet;try{return JSON.stringify(e,(function(e,n){if("bigint"==typeof n)return n.toString();if("function"!=typeof n&&"symbol"!=typeof n){if(n instanceof Date)return n.toISOString();if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(n&&"object"==typeof n){if(t.has(n))return"[Circular]";t.add(n)}return n}}))}catch(e){return}}(e);if(t)try{var n=JSON.parse(t);if(!qs(n))return;var r=n,i=r[Ou],o=r[Au];if(!Ns(i)||0===i.trim().length)return;if(!Ns(o)&&!Bs(o))return;return{step:r,json:t}}catch(e){return}}(e);if(t){var n=function(e){if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e).length;for(var t=encodeURIComponent(e),n=0,r=0;t.length>r;r++)"%"===t[r]?(n+=1,r+=2):n+=1;return n}(t.json);n>this._config.max_bytes||(this._entries.push({step:t.step,bytes:n}),this._totalBytes+=n,this._trimToMaxBytes())}},t.getAttachable=function(){return this._entries.map((function(e){return e.step}))},t.clear=function(){this._entries=[],this._totalBytes=0},t.size=function(){return this._entries.length},t._trimToMaxBytes=function(){for(;this._totalBytes>this._config.max_bytes&&this._entries.length>0;){var e=this._entries.shift();e&&(this._totalBytes-=e.bytes)}},e}();function Hu(e,t){if(!Bs(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var ju="undefined"!=typeof window?window:void 0,Uu="undefined"!=typeof globalThis?globalThis:ju;"undefined"==typeof self&&(Uu.self=Uu),"undefined"==typeof File&&(Uu.File=function(){});var Bu=null==Uu?void 0:Uu.navigator,Vu=null==Uu?void 0:Uu.document,zu=null==Uu?void 0:Uu.location,Wu=null==Uu?void 0:Uu.fetch,Gu=null!=Uu&&Uu.XMLHttpRequest&&"withCredentials"in new Uu.XMLHttpRequest?Uu.XMLHttpRequest:void 0,Yu=null==Uu?void 0:Uu.AbortController,Qu=null==Uu?void 0:Uu.CompressionStream,Zu=null==Bu?void 0:Bu.userAgent,Ku=null!=ju?ju:{},Xu=function(e,t){var n=(void 0===t?{}:t).debugEnabled,r={_log:function(t){if(ju&&(hs.DEBUG||Ku.POSTHOG_DEBUG||n)&&!Ds(ju.console)&&ju.console){for(var r=("__rrweb_original__"in ju.console[t]?ju.console[t].__rrweb_original__:ju.console[t]),i=arguments.length,o=new Array(i>1?i-1:0),s=1;i>s;s++)o[s-1]=arguments[s];r.apply(void 0,[e].concat(o))}},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["debug"].concat(t))},info:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;e>n;n++)t[n]=arguments[n];r._log.apply(r,["error"].concat(t))},critical:function(){for(var t,n=arguments.length,r=new Array(n),i=0;n>i;i++)r[i]=arguments[i];(t=console).error.apply(t,[e].concat(r))},uninitializedWarning:function(e){r.error("You must initialize PostHog before calling "+e)},createLogger:function(t,n){return Xu(e+" "+t,n)}};return r},Ju=Xu("[PostHog.js]"),el=Ju.createLogger;function tl(e,t){Os(e)&&e.forEach(t)}function nl(e,t){if(!Us(e))if(Os(e))e.forEach(t);else if(Ws(e))e.forEach((function(e,n){return t(e,n)}));else for(var n in e)Rs.call(e,n)&&t(e[n],n)}var rl=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var i=0,o=n;o.length>i;i++){var s=o[i];for(var a in s)void 0!==s[a]&&(e[a]=s[a])}return e};function il(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var ol=function(e){try{return e()}catch(e){return}},sl=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(e){Ju.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Ju.critical(e)}}},al=function(e){var t={};return nl(e,(function(e,n){(Ns(e)&&e.length>0||Bs(e))&&(t[n]=e)})),t};var ul=["herokuapp.com","vercel.app","netlify.app"];function ll(e){var t=null==e?void 0:e.hostname;if(!Ns(t))return!1;for(var n,r=t.split(".").slice(-2).join("."),i=Oi(ul);!(n=i()).done;)if(r===n.value)return!1;return!0}function cl(e,t,n,r){var i=null!=r?r:{},o=i.capture,s=i.passive;null==e||e.addEventListener(t,n,{capture:void 0!==o&&o,passive:void 0===s||s})}function dl(e){return"ph_toolbar_internal"===e.name}function fl(e){return"$survey_response_"+e}function pl(e,t){if(!t)return null;var n=e[fl(t)];return Os(n)?[].concat(n):n}function hl(e,t){void 0===e&&(e={});var n={};return t.questions.forEach((function(t){if(!Ds(t.originalQuestionIndex)){var r,i=0===(r=t.originalQuestionIndex)?"$survey_response":"$survey_response_"+r,o=pl(e,t.id);Ds(o)||(n[i]=o)}})),Ai({$survey_questions:t.questions.map((function(t){return{id:t.id,question:t.question,response:pl(e,t.id)}}))},e,n)}function _l(e,t){var n="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(n="$survey_"+t+"/"+e.id+"/"+e.current_iteration),n}function vl(e){return"string"==typeof e&&e.trim()?e.trim():null}function gl(e){return e.toLowerCase()}function ml(e,t,n){if(!e||!t)return null;var r=gl(t),i=Object.keys(e).find((function(e){return gl(e)===r}));if(i)return null==n||n.debug("Found exact translation match: "+i),i;if(r.includes("-")){var o=r.split("-")[0],s=Object.keys(e).find((function(e){return gl(e)===o}));if(s)return null==n||n.debug("Found base language translation match: "+s+" (from "+t+")"),s}return null}function yl(e,t,n){var r,i=ml(e.translations,t,n),o=Ai({},e),s=!1;if(i){var a,u=null==(a=e.translations)?void 0:a[i];u&&(null==n||n.info("Applying survey-level translation for language: "+i),Ds(u.name)||(o.name=u.name,s=!0),o.appearance?(o.appearance=Ai({},o.appearance),Ds(u.thankYouMessageHeader)||(o.appearance.thankYouMessageHeader=u.thankYouMessageHeader,s=!0),Ds(u.thankYouMessageDescription)||(o.appearance.thankYouMessageDescription=u.thankYouMessageDescription,s=!0),Ds(u.thankYouMessageCloseButtonText)||(o.appearance.thankYouMessageCloseButtonText=u.thankYouMessageCloseButtonText,s=!0)):function(e){return!Ds(e.thankYouMessageHeader)||!Ds(e.thankYouMessageDescription)||!Ds(e.thankYouMessageCloseButtonText)}(u)&&(s=!0))}var l=e.questions.map((function(e){return function(e,t,n){var r,i=ml(e.translations,t,n);if(!i)return{question:e,matchedKey:null,hasChanges:!1};var o=null==(r=e.translations)?void 0:r[i];if(!o)return{question:e,matchedKey:null,hasChanges:!1};var s=Ai({},e),a=!1;return Ds(o.question)||(s.question=o.question,a=!0),Ds(o.description)||(s.description=o.description,a=!0),Ds(o.buttonText)||(s.buttonText=o.buttonText,a=!0),"link"in s&&!Ds(o.link)&&(s.link=o.link,a=!0),"lowerBoundLabel"in s&&!Ds(o.lowerBoundLabel)&&(s.lowerBoundLabel=o.lowerBoundLabel,a=!0),"upperBoundLabel"in s&&!Ds(o.upperBoundLabel)&&(s.upperBoundLabel=o.upperBoundLabel,a=!0),"choices"in s&&function(e){return Os(e.choices)}(o)&&(s.choices=o.choices,a=!0),{question:a?s:e,matchedKey:a?i:null,hasChanges:a}}(e,t,n)})),c=l.map((function(e){return e.question})),d=l.some((function(e){return e.hasChanges})),f=null;return i||(f=(null==(r=l.find((function(e){return e.matchedKey})))?void 0:r.matchedKey)||null),d&&(o.questions=c,s=!0,null==n||n.info("Applied question-level translations for language: "+t)),{survey:o,matchedKey:s?i||f:null}}var bl=el("[Surveys]");function wl(e){return!(!e.start_date||e.end_date)}function Sl(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)||!t.length)}function xl(e){var t;return!(null==(t=e.conditions)||null==(t=t.actions)||null==(t=t.values)||!t.length)}var kl="seenSurvey_",El="inProgressSurvey_",Cl=function(e,t){var n=""+e+t.id;return t.current_iteration&&t.current_iteration>0&&(n=""+e+t.id+"_"+t.current_iteration),n},Pl=function(e){return Cl(kl,e)},Tl=function(e){try{var t=Pl(e);if(localStorage.getItem(t))return;localStorage.setItem(t,"true")}catch(e){bl.error("Failed to persist survey seen state",e)}},Il=[ss.Popover,ss.Widget,ss.API],Fl={ignoreConditions:!1,ignoreDelay:!1,displayType:fs},Ll="$people_distinct_id",Rl="$device_id",Ml="__alias",Ol="__timers",Al="$autocapture_disabled_server_side",ql="$heatmaps_enabled_server_side",$l="$exception_capture_enabled_server_side",Dl="$error_tracking_suppression_rules",Nl="$error_tracking_capture_extension_exceptions",Hl="$web_vitals_enabled_server_side",jl="$dead_clicks_enabled_server_side",Ul="$product_tours_enabled_server_side",Bl="$web_vitals_allowed_metrics",Vl="$session_recording_remote_config",zl="$replay_override_sampling",Wl="$replay_override_linked_flag",Gl="$replay_override_url_trigger",Yl="$replay_override_event_trigger",Ql="$sesid",Zl="$session_is_sampled",Kl="$enabled_feature_flags",Xl="$active_feature_flags",Jl="$early_access_features",ec="$feature_flag_details",tc="$feature_flag_payloads",nc="$feature_flag_request_id",rc="$override_feature_flags",ic="$override_feature_flag_payloads",oc="$stored_person_properties",sc="$stored_group_properties",ac="$surveys",uc="$surveys_activated",lc="ph_product_tours",cc="$flag_call_reported",dc="$flag_call_reported_session_id",fc="$feature_flag_errors",pc="$feature_flag_evaluated_at",hc="$user_state",_c="$client_session_props",vc="$capture_rate_limit",gc="$initial_campaign_params",mc="$initial_referrer_info",yc="$initial_person_info",bc="$epp",wc="__POSTHOG_TOOLBAR__",Sc="$posthog_cookieless",xc="$sdk_debug_extensions_init_method",kc="$sdk_debug_extensions_init_time_ms",Ec="$sdk_debug_recording_script_not_loaded",Cc="PostHog loadExternalDependency extension not found.",Pc="on_reject",Tc="always",Ic="anonymous",Fc="identified",Lc="identified_only",Rc="visibilitychange",Mc="beforeunload",Oc="$pageview",Ac="$pageleave",qc="$identify",$c="$groupidentify";Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Bs(e)&&isFinite(e)&&Math.floor(e)===e});var Dc=function(){function e(e){if(this.bytes=e,16!==e.length)throw new TypeError("not 128-bit length")}e.fromFieldsV7=function(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||0>t||0>n||0>r||0>i||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var o=new Uint8Array(16);return o[0]=t/Math.pow(2,40),o[1]=t/Math.pow(2,32),o[2]=t/Math.pow(2,24),o[3]=t/Math.pow(2,16),o[4]=t/Math.pow(2,8),o[5]=t,o[6]=112|n>>>8,o[7]=n,o[8]=128|r>>>24,o[9]=r>>>16,o[10]=r>>>8,o[11]=r,o[12]=i>>>24,o[13]=i>>>16,o[14]=i>>>8,o[15]=i,new e(o)};var t=e.prototype;return t.toString=function(){for(var e="",t=0;this.bytes.length>t;t++)e=e+(this.bytes[t]>>>4).toString(16)+(15&this.bytes[t]).toString(16),3!==t&&5!==t&&7!==t&&9!==t||(e+="-");if(36!==e.length)throw new Error("Invalid UUIDv7 was generated");return e},t.clone=function(){return new e(this.bytes.slice(0))},t.equals=function(e){return 0===this.compareTo(e)},t.compareTo=function(e){for(var t=0;16>t;t++){var n=this.bytes[t]-e.bytes[t];if(0!==n)return Math.sign(n)}return 0},e}(),Nc=function(){function e(){this._timestamp=0,this._counter=0,this._random=new Uc}var t=e.prototype;return t.generate=function(){var e=this.generateOrAbort();if(Ds(e)){this._timestamp=0;var t=this.generateOrAbort();if(Ds(t))throw new Error("Could not generate UUID after timestamp reset");return t}return e},t.generateOrAbort=function(){var e=Date.now();if(e>this._timestamp)this._timestamp=e,this._resetCounter();else{if(this._timestamp>=e+1e4)return;this._counter++,this._counter>4398046511103&&(this._timestamp++,this._resetCounter())}return Dc.fromFieldsV7(this._timestamp,Math.trunc(this._counter/Math.pow(2,30)),this._counter&Math.pow(2,30)-1,this._random.nextUint32())},t._resetCounter=function(){this._counter=1024*this._random.nextUint32()+(1023&this._random.nextUint32())},e}(),Hc=function(e){if("undefined"!=typeof UUIDV7_DENY_WEAK_RNG&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};ju&&!Ds(ju.crypto)&&crypto.getRandomValues&&(Hc=function(e){return crypto.getRandomValues(e)});var jc,Uc=function(){function e(){this._buffer=new Uint32Array(8),this._cursor=1/0}return e.prototype.nextUint32=function(){return this._buffer.length>this._cursor||(Hc(this._buffer),this._cursor=0),this._buffer[this._cursor++]},e}(),Bc=function(){return Vc().toString()},Vc=function(){return(jc||(jc=new Nc)).generate()},zc="gzip-js",Wc="base64",Gc=function(e){var t=null==Vu?void 0:Vu.createElement("a");return Ds(t)?null:(t.href=e,t)},Yc=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),i=0;r.length>i;i++){var o=r[i].split("=");if(o[0]===t){n=o;break}}if(!Os(n)||2>n.length)return"";var s=n[1];try{s=decodeURIComponent(s)}catch(e){Ju.error("Skipping decoding for malformed query param: "+s)}return s.replace(/\+/g," ")},Qc=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),i=r[1],o=(r[0]||"").split("?"),s=o[1],a=o[0],u=(s||"").split("&"),l=[],c=0;u.length>c;c++){var d=u[c].split("=");Os(d)&&(t.includes(d[0])?l.push(d[0]+"="+n):l.push(u[c]))}var f=a;return null!=s&&(f+="?"+l.join("&")),null!=i&&(f+="#"+i),f},Zc=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},Kc=Uint8Array,Xc=Uint16Array,Jc=Uint32Array,ed=new Kc([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]),td=new Kc([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]),nd=new Kc([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rd=function(e,t){for(var n=new Xc(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var i=new Jc(n[30]);for(r=1;30>r;++r)for(var o=n[r];n[r+1]>o;++o)i[o]=o-n[r]<<5|r;return[n,i]},id=rd(ed,2),od=id[1];id[0][28]=258,od[258]=28;for(var sd=rd(td,0)[1],ad=new Xc(32768),ud=0;32768>ud;++ud){var ld=(43690&ud)>>>1|(21845&ud)<<1;ad[ud]=((65280&(ld=(61680&(ld=(52428&ld)>>>2|(13107&ld)<<2))>>>4|(3855&ld)<<4))>>>8|(255&ld)<<8)>>>1}var cd=function(e,t,n){for(var r=e.length,i=0,o=new Xc(t);r>i;++i)++o[e[i]-1];var s,a=new Xc(t);for(i=0;t>i;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){s=new Xc(1<<t);var u=15-t;for(i=0;r>i;++i)if(e[i])for(var l=i<<4|e[i],c=t-e[i],d=a[e[i]-1]++<<c,f=d|(1<<c)-1;f>=d;++d)s[ad[d]>>>u]=l}else for(s=new Xc(r),i=0;r>i;++i)s[i]=ad[a[e[i]-1]++]>>>15-e[i];return s},dd=new Kc(288);for(ud=0;144>ud;++ud)dd[ud]=8;for(ud=144;256>ud;++ud)dd[ud]=9;for(ud=256;280>ud;++ud)dd[ud]=7;for(ud=280;288>ud;++ud)dd[ud]=8;var fd=new Kc(32);for(ud=0;32>ud;++ud)fd[ud]=5;var pd=cd(dd,9,0),hd=cd(fd,5,0),_d=function(e){return(e/8>>0)+(7&e&&1)},vd=function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Xc?Xc:e instanceof Jc?Jc:Kc)(n-t);return r.set(e.subarray(t,n)),r},gd=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},md=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},yd=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new Kc(0),0];if(1==i){var s=new Kc(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],u=n[1],l=0,c=1,d=2;for(n[0]={s:-1,f:a.f+u.f,l:a,r:u};c!=i-1;)a=n[n[d].f>n[l].f?l++:d++],u=n[l!=c&&n[d].f>n[l].f?l++:d++],n[c++]={s:-1,f:a.f+u.f,l:a,r:u};var f=o[0].s;for(r=1;i>r;++r)o[r].s>f&&(f=o[r].s);var p=new Xc(f+1),h=bd(n[c-1],p,0);if(h>t){r=0;var _=0,v=h-t,g=1<<v;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));i>r;++r){var m=o[r].s;if(t>=p[m])break;_+=g-(1<<h-p[m]),p[m]=t}for(_>>>=v;_>0;){var y=o[r].s;t>p[y]?_-=1<<t-p[y]++-1:++r}for(;r>=0&&_;--r){var b=o[r].s;p[b]==t&&(--p[b],++_)}h=t}return[new Kc(p),h]},bd=function(e,t,n){return-1==e.s?Math.max(bd(e.l,t,n+1),bd(e.r,t,n+1)):t[e.s]=n},wd=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Xc(++t),r=0,i=e[0],o=1,s=function(e){n[r++]=e},a=1;t>=a;++a)if(e[a]==i&&a!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(i),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(i);o=1,i=e[a]}return[n.subarray(0,r),t]},Sd=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},xd=function(e,t,n){var r=n.length,i=_d(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 o=0;r>o;++o)e[i+o+4]=n[o];return 8*(i+4+r)},kd=function(e,t,n,r,i,o,s,a,u,l,c){gd(t,c++,n),++i[256];for(var d=yd(i,15),f=d[0],p=d[1],h=yd(o,15),_=h[0],v=h[1],g=wd(f),m=g[0],y=g[1],b=wd(_),w=b[0],S=b[1],x=new Xc(19),k=0;m.length>k;++k)x[31&m[k]]++;for(k=0;w.length>k;++k)x[31&w[k]]++;for(var E=yd(x,7),C=E[0],P=E[1],T=19;T>4&&!C[nd[T-1]];--T);var I,F,L,R,M=l+5<<3,O=Sd(i,dd)+Sd(o,fd)+s,A=Sd(i,f)+Sd(o,_)+s+14+3*T+Sd(x,C)+(2*x[16]+3*x[17]+7*x[18]);if(O>=M&&A>=M)return xd(t,c,e.subarray(u,u+l));if(gd(t,c,1+(O>A)),c+=2,O>A){I=cd(f,p,0),F=f,L=cd(_,v,0),R=_;var q=cd(C,P,0);for(gd(t,c,y-257),gd(t,c+5,S-1),gd(t,c+10,T-4),c+=14,k=0;T>k;++k)gd(t,c+3*k,C[nd[k]]);c+=3*T;for(var D=[m,w],N=0;2>N;++N){var H=D[N];for(k=0;H.length>k;++k)gd(t,c,q[j=31&H[k]]),c+=C[j],j>15&&(gd(t,c,H[k]>>>5&127),c+=H[k]>>>12)}}else I=pd,F=dd,L=hd,R=fd;for(k=0;a>k;++k)if(r[k]>255){var j;md(t,c,I[257+(j=r[k]>>>18&31)]),c+=F[j+257],j>7&&(gd(t,c,r[k]>>>23&31),c+=ed[j]);var U=31&r[k];md(t,c,L[U]),c+=R[U],U>3&&(md(t,c,r[k]>>>5&8191),c+=td[U])}else md(t,c,I[r[k]]),c+=F[r[k]];return md(t,c,I[256]),c+F[256]},Ed=new Jc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Cd=function(){for(var e=new Jc(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),Pd=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Td(e,t){void 0===t&&(t={});var n=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;t.length>r;++r)n=Cd[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}}(),r=e.length;n.p(e);var i,o,s,a,u=(i=e,o=t,s=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),a=8,function(e,t,n,r,i,o){var s=e.length,a=new Kc(r+s+5*(1+Math.floor(s/7e3))+i),u=a.subarray(r,a.length-i),l=0;if(!t||8>s)for(var c=0;s>=c;c+=65535){var d=c+65535;s>d?l=xd(u,l,e.subarray(c,d)):(u[c]=!0,l=xd(u,l,e.subarray(c,s)))}else{for(var f=Ed[t-1],p=f>>>13,h=8191&f,_=(1<<n)-1,v=new Xc(32768),g=new Xc(_+1),m=Math.ceil(n/3),y=2*m,b=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&_},w=new Jc(25e3),S=new Xc(288),x=new Xc(32),k=0,E=0,C=(c=0,0),P=0,T=0;s>c;++c){var I=b(c),F=32767&c,L=g[I];if(v[F]=L,g[I]=F,c>=P){var R=s-c;if((k>7e3||C>24576)&&R>423){l=kd(e,u,0,w,S,x,E,C,T,c-T,l),C=k=E=0,T=c;for(var M=0;286>M;++M)S[M]=0;for(M=0;30>M;++M)x[M]=0}var O=2,A=0,q=h,D=F-L&32767;if(R>2&&I==b(c-D))for(var N=Math.min(p,R)-1,H=Math.min(32767,c),j=Math.min(258,R);H>=D&&--q&&F!=L;){if(e[c+O]==e[c+O-D]){for(var U=0;j>U&&e[c+U]==e[c+U-D];++U);if(U>O){if(O=U,A=D,U>N)break;var B=Math.min(D,U-2),V=0;for(M=0;B>M;++M){var z=c-D+M+32768&32767,W=z-v[z]+32768&32767;W>V&&(V=W,L=z)}}}D+=(F=L)-(L=v[F])+32768&32767}if(A){w[C++]=268435456|od[O]<<18|sd[A];var G=31&od[O],Y=31&sd[A];E+=ed[G]+td[Y],++S[257+G],++x[Y],P=c+O,++k}else w[C++]=e[c],++S[e[c]]}}l=kd(e,u,!0,w,S,x,E,C,T,c-T,l)}return vd(a,0,r+_d(l)+i)}(i,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+o.mem,s,a)),l=u.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=2>t.level?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Pd(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;n.length>=r;++r)e[r+10]=n.charCodeAt(r)}}(u,t),Pd(u,l-8,n.d()),Pd(u,l-4,r),u}var Id=!!Gu||!!Wu,Fd="text/plain",Ld=!1,Rd=function(e,t){var n=e.split("#"),r=n[1],i=n[0].split("?"),o=i[0],s=i[1];if(!s)return e;var a=s.split("&").filter((function(e){return e.split("=")[0]!==t})).join("&");return o+(a?"?"+a:"")+(r?"#"+r:"")},Md=function(e,t,n){var r;void 0===n&&(n=!0);var i=e.split("?"),o=i[0],s=i[1],a=Ai({},t),u=null!==(r=null==s?void 0:s.split("&").map((function(e){var t,r=e.split("="),i=r[0],o=n&&null!==(t=a[i])&&void 0!==t?t:r[1];return delete a[i],i+"="+o})))&&void 0!==r?r:[],l=function(e,t){var n,r;void 0===t&&(t="&");var i=[];return nl(e,(function(e,t){Ds(e)||Ds(t)||"undefined"===t||(n=encodeURIComponent(function(e){return e instanceof File}(e)?e.name:e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n)})),i.join(t)}(a);return l&&u.push(l),o+"?"+u.join("&")},Od=function(e,t){return JSON.stringify(e,(function(e,t){return"bigint"==typeof t?t.toString():t}),t)},Ad=function(e){if(e._encodedBody)return e._encodedBody;var t=e.data,n=e.compression;if(t){if(n===zc){var r=Td(function(e,t){var n=e.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new Kc(e.length+(e.length>>>1)),i=0,o=function(e){r[i++]=e},s=0;n>s;++s){if(i+5>r.length){var a=new Kc(i+8+(n-s<<1));a.set(r),r=a}var u=e.charCodeAt(s);128>u?o(u):2048>u?(o(192|u>>>6),o(128|63&u)):u>55295&&57344>u?(o(240|(u=65536+(1047552&u)|1023&e.charCodeAt(++s))>>>18),o(128|u>>>12&63),o(128|u>>>6&63),o(128|63&u)):(o(224|u>>>12),o(128|u>>>6&63),o(128|63&u))}return vd(r,0,i)}(Od(t)),{mtime:0});return{contentType:Fd,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===Wc){var i=function(e){return e?btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode(parseInt(t,16))}))):e}(Od(t)),o=function(e){return"data="+encodeURIComponent("string"==typeof e?e:Od(e))}(i);return{contentType:"application/x-www-form-urlencoded",body:o,estimatedSize:new Blob([o]).size}}var s=Od(t);return{contentType:"application/json",body:s,estimatedSize:new Blob([s]).size}}},qd=function(e){var t,n,r,i=Ad(e);return!i||(n=e.compression,r=Yc(e.url,"compression"),n!==_s.GZipJS&&r!==_s.GZipJS&&"gzip"!==r)||((t=i.body)instanceof ArrayBuffer?ys(new Uint8Array(t)):ArrayBuffer.isView(t)&&ys(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:i}:(Ld=!0,{url:Rd(e.url,"compression"),encodedBody:Ad(Ai({},e,{compression:void 0,_encodedBody:void 0}))})},$d=function(){var e=Ri($i().m((function e(t){var n,r,i;return $i().w((function(e){for(;;)switch(e.n){case 0:return n=Od(t.data),e.n=1,ks(n,hs.DEBUG,{rethrow:!0});case 1:if(r=e.v){e.n=2;break}return e.a(2,t);case 2:return e.n=3,r.arrayBuffer();case 3:return e.a(2,Ai({},t,{_encodedBody:{contentType:Fd,body:i=e.v,estimatedSize:i.byteLength}}))}}),e)})));return function(t){return e.apply(this,arguments)}}(),Dd=function(e,t){return Md(e,{_:(new Date).getTime().toString(),ver:hs.JS_SDK_VERSION,compression:t})},Nd=[];Wu&&Nd.push({transport:"fetch",method:function(e){var t,n=qd(e),r=n.url,i=n.encodedBody,o=null!=i?i:{},s=o.contentType,a=o.body,u=o.estimatedSize,l=new Headers;nl(e.headers,(function(e,t){l.append(t,e)})),s&&l.append("Content-Type",s);var c=null;if(Yu){var d=new Yu;c={signal:d.signal,timeout:setTimeout((function(){return d.abort()}),e.timeout)}}Wu(r,Ai({method:(null==e?void 0:e.method)||"GET",headers:l,keepalive:"POST"===e.method&&52428.8>(u||0),body:a,signal:null==(t=c)?void 0:t.signal},e.fetchOptions)).then((function(t){return t.text().then((function(n){var r={statusCode:t.status,text:n};if(200===t.status)try{r.json=JSON.parse(n)}catch(e){Ju.error(e)}null==e.callback||e.callback(r)}))})).catch((function(t){Ju.error(t),null==e.callback||e.callback({statusCode:0,error:t})})).finally((function(){return c?clearTimeout(c.timeout):null}))}}),Gu&&Nd.push({transport:"XHR",method:function(e){var t=new Gu,n=qd(e),r=n.encodedBody;t.open(e.method||"GET",n.url,!0);var i=null!=r?r:{},o=i.contentType,s=i.body;nl(e.headers,(function(e,n){t.setRequestHeader(n,e)})),o&&t.setRequestHeader("Content-Type",o),e.timeout&&(t.timeout=e.timeout),e.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=function(){if(4===t.readyState){var n={statusCode:t.status,text:t.responseText};if(200===t.status)try{n.json=JSON.parse(t.responseText)}catch(e){}null==e.callback||e.callback(n)}},t.send(s)}}),null!=Bu&&Bu.sendBeacon&&Nd.push({transport:"sendBeacon",method:function(e){try{var t=qd(e),n=t.encodedBody,r=Md(t.url,{beacon:"1"}),i=null!=n?n:{},o=i.body;if(!o)return;var s=o instanceof Blob?o:new Blob([o],{type:i.contentType});Bu.sendBeacon(r,s)}catch(e){}}});var Hd=function(e,t){if(!function(e){try{new RegExp(e)}catch(e){return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch(e){return!1}};function jd(e,t,n){return Od({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var Ud={exact:function(e,t){return t.some((function(t){return e.some((function(e){return t===e}))}))},is_not:function(e,t){return t.every((function(t){return e.every((function(e){return t!==e}))}))},regex:function(e,t){return t.some((function(t){return e.some((function(e){return Hd(t,e)}))}))},not_regex:function(e,t){return t.every((function(t){return e.every((function(e){return!Hd(t,e)}))}))},icontains:function(e,t){return t.map(Bd).some((function(t){return e.map(Bd).some((function(e){return t.includes(e)}))}))},not_icontains:function(e,t){return t.map(Bd).every((function(t){return e.map(Bd).every((function(e){return!t.includes(e)}))}))},gt:function(e,t){return t.some((function(t){var n=parseFloat(t);return!isNaN(n)&&e.some((function(e){return n>parseFloat(e)}))}))},lt:function(e,t){return t.some((function(t){var n=parseFloat(t);return!isNaN(n)&&e.some((function(e){return n<parseFloat(e)}))}))}},Bd=function(e){return e.toLowerCase()};function Vd(e,t){return!e||Object.entries(e).every((function(e){var n=e[1],r=null==t?void 0:t[e[0]];if(Ds(r)||js(r))return!1;var i=[String(r)],o=Ud[n.operator];return!!o&&o(n.values,i)}))}var zd="",Wd=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;var Gd={_is_supported:function(){return!!Vu},_error:function(e){Ju.error("cookieStore error: "+e)},_get:function(e){if(Vu){try{for(var t=e+"=",n=Vu.cookie.split(";").filter((function(e){return e.length})),r=0;n.length>r;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(Gd._get(e))||{}}catch(e){}return t},_set:function(e,t,n,r,i){if(Vu)try{var o="",s="",a=function(e,t){if(t){var n=function(e,t){if(void 0===t&&(t=Vu),zd)return zd;if(!t)return"";if(["localhost","127.0.0.1"].includes(e))return"";for(var n=e.split("."),r=Math.min(n.length,8),i="dmn_chk_"+Bc();!zd&&r--;){var o=n.slice(r).join("."),s=i+"=1;domain=."+o+";path=/";t.cookie=s+";max-age=3",t.cookie.includes(i)&&(t.cookie=s+";max-age=0",zd=o)}return zd}(e);if(!n){var r=function(e){var t=e.match(Wd);return t?t[0]:""}(e);r!==n&&Ju.info("Warning: cookie subdomain discovery mismatch",r,n),n=r}return n?"; domain=."+n:""}return""}(Vu.location.hostname,r);if(n){var u=new Date;u.setTime(u.getTime()+864e5*n),o="; expires="+u.toUTCString()}i&&(s="; secure");var l=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+a+s;return l.length>3686.4&&Ju.warn("cookieStore warning: large cookie, len="+l.length),Vu.cookie=l,l}catch(e){return}},_remove:function(e,t){if(null!=Vu&&Vu.cookie)try{Gd._set(e,"",-1,t)}catch(e){return}}},Yd=null,Qd={_is_supported:function(){if(!js(Yd))return Yd;var e=!0;if(Ds(ju))e=!1;else try{var t="__mplssupport__";Qd._set(t,"xyz"),'"xyz"'!==Qd._get(t)&&(e=!1),Qd._remove(t)}catch(t){e=!1}return e||Ju.error("localStorage unsupported; falling back to cookie store"),Yd=e,e},_error:function(e){Ju.error("localStorage error: "+e)},_get:function(e){try{return null==ju?void 0:ju.localStorage.getItem(e)}catch(e){Qd._error(e)}return null},_parse:function(e){try{return JSON.parse(Qd._get(e))||{}}catch(e){}return null},_set:function(e,t){try{null==ju||ju.localStorage.setItem(e,JSON.stringify(t))}catch(e){Qd._error(e)}},_remove:function(e){try{null==ju||ju.localStorage.removeItem(e)}catch(e){Qd._error(e)}}},Zd=[Rl,"distinct_id",Ql,Zl,bc,yc,hc],Kd={},Xd={_is_supported:function(){return!0},_error:function(e){Ju.error("memoryStorage error: "+e)},_get:function(e){return Kd[e]||null},_parse:function(e){return Kd[e]||null},_set:function(e,t){Kd[e]=t},_remove:function(e){delete Kd[e]}},Jd=null,ef={_is_supported:function(){if(!js(Jd))return Jd;if(Jd=!0,Ds(ju))Jd=!1;else try{var e="__support__";ef._set(e,"xyz"),'"xyz"'!==ef._get(e)&&(Jd=!1),ef._remove(e)}catch(e){Jd=!1}return Jd},_error:function(e){Ju.error("sessionStorage error: ",e)},_get:function(e){try{return null==ju?void 0:ju.sessionStorage.getItem(e)}catch(e){ef._error(e)}return null},_parse:function(e){try{return JSON.parse(ef._get(e))||null}catch(e){}return null},_set:function(e,t){try{null==ju||ju.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){ef._error(e)}},_remove:function(e){try{null==ju||ju.sessionStorage.removeItem(e)}catch(e){ef._error(e)}}},tf=el("[Stylesheet Loader]"),nf=ju,rf=Vu,of="#020617",sf={fontFamily:"inherit",backgroundColor:"#eeeded",submitButtonColor:"black",submitButtonTextColor:"white",ratingButtonColor:"white",ratingButtonActiveColor:"black",borderColor:"#c9c6c6",placeholder:"Start typing...",whiteLabel:!1,displayThankYouMessage:!0,thankYouMessageHeader:"Thank you for your feedback!",position:is.Right,widgetType:rs.Tab,widgetLabel:"Feedback",widgetColor:"black",zIndex:String(2147483645),disabledButtonOpacity:"0.6",maxWidth:"300px",textSubtleColor:"#939393",boxPadding:"20px 24px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",borderRadius:"10px",shuffleQuestions:!1,surveyPopupDelaySeconds:void 0,outlineColor:"rgba(59, 130, 246, 0.8)",inputBackground:"white",inputTextColor:of,scrollbarThumbColor:"var(--ph-survey-border-color)",scrollbarTrackColor:"var(--ph-survey-background-color)"},af=[is.Center,is.Left,is.Right];function uf(e){if(e.startsWith("#")){var t=e.replace(/^#/,"");return/^[0-9A-Fa-f]{3}$/.test(t)&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),/^[0-9A-Fa-f]{6}$/.test(t)?"rgb("+parseInt(t.slice(0,2),16)+","+parseInt(t.slice(2,4),16)+","+parseInt(t.slice(4,6),16)+")":"rgb(255, 255, 255)"}return"rgb(255, 255, 255)"}function lf(e){var t;void 0===e&&(e=sf.backgroundColor),"#"===e[0]&&(t=uf(e)),e.startsWith("rgb")&&(t=e);var n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}[e.toLowerCase()];if(n&&(t=uf(n)),!t)return of;var r=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);if(r){var i=parseInt(r[1]),o=parseInt(r[2]),s=parseInt(r[3]);return Math.sqrt(i*i*.299+o*o*.587+s*s*.114)>127.5?of:"white"}return of}var cf=function(e,t,n){var r=Tf(e),i=rf.querySelector("."+r);if(i&&i.shadowRoot)return{shadow:i.shadowRoot,isNewlyCreated:!1};var o=rf.createElement("div");!function(e,t,n){var r=Ai({},sf,n),i=e.style,o=!af.includes(r.position)||t===ss.Widget&&(null==n?void 0:n.widgetType)===rs.Tab;i.setProperty("--ph-survey-font-family",function(e){if("inherit"===e)return"inherit";var t='BlinkMacSystemFont, "Inter", "Segoe UI", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';return e?e+", "+t:"-apple-system, "+t}(r.fontFamily)),i.setProperty("--ph-survey-box-padding",r.boxPadding),i.setProperty("--ph-survey-max-width",r.maxWidth),i.setProperty("--ph-survey-z-index",r.zIndex),i.setProperty("--ph-survey-border-color",r.borderColor),o?(i.setProperty("--ph-survey-border-radius",r.borderRadius),i.setProperty("--ph-survey-border-bottom","1.5px solid var(--ph-survey-border-color)")):(i.setProperty("--ph-survey-border-bottom","none"),i.setProperty("--ph-survey-border-radius",r.borderRadius+" "+r.borderRadius+" 0 0")),i.setProperty("--ph-survey-background-color",r.backgroundColor),i.setProperty("--ph-survey-box-shadow",r.boxShadow),i.setProperty("--ph-survey-disabled-button-opacity",r.disabledButtonOpacity),i.setProperty("--ph-survey-submit-button-color",r.submitButtonColor),i.setProperty("--ph-survey-submit-button-text-color",(null==n?void 0:n.submitButtonTextColor)||lf(r.submitButtonColor)),i.setProperty("--ph-survey-rating-bg-color",r.ratingButtonColor),i.setProperty("--ph-survey-rating-active-bg-color",r.ratingButtonActiveColor),i.setProperty("--ph-survey-rating-active-text-color",lf(r.ratingButtonActiveColor)),i.setProperty("--ph-survey-text-primary-color",(null==n?void 0:n.textColor)||lf(r.backgroundColor)),i.setProperty("--ph-survey-text-subtle-color",r.textSubtleColor),i.setProperty("--ph-widget-color",r.widgetColor),i.setProperty("--ph-widget-text-color",lf(r.widgetColor)),i.setProperty("--ph-widget-z-index",r.zIndex);var s=(null==n?void 0:n.inputBackground)||(null==n?void 0:n.inputBackgroundColor),a=s||r.inputBackground;s||"white"!==r.backgroundColor||(a="#f8f8f8"),i.setProperty("--ph-survey-input-background",a);var u=(null==n?void 0:n.inputTextColor)||lf(a);i.setProperty("--ph-survey-input-text-color",u),i.setProperty("--ph-survey-rating-text-color",u),i.setProperty("--ph-survey-scrollbar-thumb-color",r.scrollbarThumbColor),i.setProperty("--ph-survey-scrollbar-track-color",r.scrollbarTrackColor),i.setProperty("--ph-survey-outline-color",r.outlineColor)}(o,e.type,e.appearance),o.className=r;var s=o.attachShadow({mode:"open"}),a=function(e){var t=function(e,t,n){var r,i=e.createElement("style");return i.innerText=':host{--ph-survey-font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI","Roboto",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ph-survey-box-padding:20px 24px;--ph-survey-max-width:300px;--ph-survey-z-index:2147483645;--ph-survey-border-color:#dcdcdc;--ph-survey-border-bottom:1.5px solid var(--ph-survey-border-color);--ph-survey-border-radius:10px;--ph-survey-background-color:#eeeded;--ph-survey-box-shadow:0 4px 12px rgba(0,0,0,.15);--ph-survey-submit-button-color:#000;--ph-survey-submit-button-text-color:#fff;--ph-survey-rating-bg-color:#fff;--ph-survey-rating-text-color:#020617;--ph-survey-rating-active-bg-color:#000;--ph-survey-rating-active-text-color:#fff;--ph-survey-text-primary-color:#020617;--ph-survey-text-subtle-color:#939393;--ph-widget-color:#e0a045;--ph-widget-text-color:#fff;--ph-survey-scrollbar-thumb-color:var(--ph-survey-border-color);--ph-survey-scrollbar-track-color:var(--ph-survey-background-color);--ph-survey-outline-color:rgba(59,130,246,.8);--ph-survey-input-background:#fff;--ph-survey-input-text-color:#020617;--ph-survey-disabled-button-opacity:0.6}.ph-survey{bottom:0;height:fit-content;margin:0;max-width:85%;min-width:300px;position:fixed;width:var(--ph-survey-max-width);z-index:var(--ph-survey-z-index)}.ph-survey h3,.ph-survey p{margin:0}.ph-survey *{box-sizing:border-box;color:var(--ph-survey-text-primary-color);font-family:var(--ph-survey-font-family)}.ph-survey .multiple-choice-options label,.ph-survey input[type=text],.ph-survey textarea{background:var(--ph-survey-input-background);border:1.5px solid var(--ph-survey-border-color);border-radius:4px;color:var(--ph-survey-input-text-color);padding:10px;transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input[type=text],.ph-survey textarea{transition:border-color .2s ease-out,box-shadow .2s ease-out,transform .15s ease-out}.ph-survey input{margin:0}.ph-survey .form-submit:focus,.ph-survey .form-submit:focus-visible,.ph-survey input[type=checkbox]:focus,.ph-survey input[type=checkbox]:focus-visible,.ph-survey input[type=radio]:focus,.ph-survey input[type=radio]:focus-visible,.ph-survey input[type=text]:focus,.ph-survey input[type=text]:focus-visible,.ph-survey textarea:focus,.ph-survey textarea:focus-visible{border-color:var(--ph-survey-rating-active-bg-color);outline:1.5px solid var(--ph-survey-outline-color);outline-offset:2px}.ph-survey button:focus:not(:focus-visible),.ph-survey input[type=checkbox]:focus:not(:focus-visible),.ph-survey input[type=radio]:focus:not(:focus-visible),.ph-survey input[type=text]:focus:not(:focus-visible),.ph-survey textarea:focus:not(:focus-visible){outline:none}.ph-survey input[type=text]:hover:not(:focus),.ph-survey textarea:hover:not(:focus){border-color:var(--ph-survey-rating-active-bg-color)}@media (max-width:768px){.ph-survey input[type=text],.ph-survey textarea{font-size:1rem}}.ph-survey .form-cancel,.ph-survey .multiple-choice-options label,.ph-survey .rating-options-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio]{border:1.5px solid var(--ph-survey-border-color)}.ph-survey .footer-branding,.ph-survey .form-cancel,.ph-survey .form-submit,.ph-survey .ratings-emoji,.ph-survey .ratings-number,.ph-survey input[type=checkbox],.ph-survey input[type=radio],.ph-survey label{transition:all .2s ease-out}@media (prefers-reduced-motion:no-preference){.ph-survey button:active,.ph-survey input[type=checkbox]:active,.ph-survey input[type=radio]:active,.ph-survey label:active{transition-duration:.1s}}.ph-survey-widget-tab{background:var(--ph-widget-color);border:none;border-radius:3px 3px 0 0;color:var(--ph-widget-text-color);cursor:pointer;padding:10px 12px;position:fixed;text-align:center;transition:padding .2s ease-out;z-index:var(--ph-survey-z-index)}.ph-survey-widget-tab:hover:not(.widget-tab-top){padding-bottom:16px}.ph-survey-widget-tab.widget-tab-top{border-radius:0 0 3px 3px}.ph-survey-widget-tab.widget-tab-top:hover{padding-top:16px}@keyframes ph-survey-fade-in{0%{opacity:0}to{opacity:1}}.survey-box{gap:16px}.bottom-section,.survey-box{display:flex;flex-direction:column}.bottom-section{gap:8px}.thank-you-message-header~.bottom-section{padding-top:16px}.question-container,.thank-you-message{display:flex;flex-direction:column;gap:8px}.survey-question{font-size:14px;font-weight:500}.survey-question-description{font-size:13px;opacity:.8;padding-top:4px}.survey-question-description,.thank-you-message-body{word-wrap:break-word;overflow-wrap:break-word}:is(.survey-question-description,.thank-you-message-body) embed,:is(.survey-question-description,.thank-you-message-body) iframe,:is(.survey-question-description,.thank-you-message-body) img,:is(.survey-question-description,.thank-you-message-body) object,:is(.survey-question-description,.thank-you-message-body) video{height:auto;max-width:100%}:is(.survey-question-description,.thank-you-message-body) svg{height:auto;max-width:100%}.question-textarea-wrapper{display:flex;flex-direction:column}.survey-form{animation:ph-survey-fade-in .3s ease-out forwards}.survey-form,.thank-you-message{background:var(--ph-survey-background-color);border:1.5px solid var(--ph-survey-border-color);border-bottom:var(--ph-survey-border-bottom);border-radius:var(--ph-survey-border-radius);box-shadow:var(--ph-survey-box-shadow);margin:0;padding:var(--ph-survey-box-padding);position:relative;text-align:left;width:100%;z-index:var(--ph-survey-z-index)}.survey-form input[type=text],.survey-form textarea{min-width:100%}:is(.survey-form textarea):focus,:is(.survey-form textarea):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.08)}:is(.survey-form textarea):focus:not(:focus-visible){box-shadow:none}.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) .multiple-choice-options,.survey-box:has(.survey-question:empty):not(:has(.survey-question-description)) textarea{margin-top:0}.multiple-choice-options{border:none;display:flex;flex-direction:column;font-size:14px;gap:8px;margin:0;padding:1px 0}.multiple-choice-options .response-choice,.multiple-choice-options label{align-items:center;color:inherit;display:flex;gap:8px}.multiple-choice-options label{cursor:pointer;font-size:13px}:is(.multiple-choice-options label):hover:not(:has(input:checked)){border-color:var(--ph-survey-text-subtle-color);box-shadow:0 2px 8px rgba(0,0,0,.08)}:is(.multiple-choice-options label):has(input:checked){border-color:var(--ph-survey-rating-active-bg-color);box-shadow:0 1px 4px rgba(0,0,0,.05)}.choice-option-open:is(.multiple-choice-options label){flex-wrap:wrap}:is(.multiple-choice-options label) span{color:inherit}.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:var(--ph-survey-input-background);border-radius:3px;cursor:pointer;flex-shrink:0;height:1rem;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1),transform .15s ease-out;width:1rem;z-index:1}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):focus{transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):hover{border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1.05)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):active{transform:scale(.95)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked{background:var(--ph-survey-rating-active-bg-color);border-color:var(--ph-survey-rating-active-bg-color);transform:scale(1)}:is(.multiple-choice-options input[type=checkbox],.multiple-choice-options input[type=radio]):checked:hover{transform:scale(1.05)}.multiple-choice-options input[type=checkbox]:checked:after{animation:ph-survey-checkmark-reveal .2s ease-out .1s forwards;border:solid var(--ph-survey-rating-active-text-color);border-width:0 2px 2px 0;height:8px;left:4px;transform:rotate(45deg) scale(0);width:4px}.multiple-choice-options input[type=radio]:checked:after{animation:ph-survey-radio-reveal .15s ease-out .05s forwards;background:var(--ph-survey-rating-active-text-color);border-radius:50%;height:6px;left:5px;top:5px;transform:scale(0);width:6px}.multiple-choice-options input[type=checkbox]:checked:after,.multiple-choice-options input[type=radio]:checked:after{box-sizing:content-box;content:"";position:absolute}.multiple-choice-options input[type=radio]{border-radius:50%}.multiple-choice-options input[type=radio]:checked{border:none}:is(.multiple-choice-options input[type=checkbox]:checked,.multiple-choice-options input[type=radio]:checked)~*{font-weight:700}:is(:is(.multiple-choice-options .choice-option-open) input[type=text])::placeholder{color:var(--ph-survey-text-subtle-color);font-weight:400}.rating-options-emoji{display:flex;justify-content:space-between}.rating-options-emoji-2{justify-content:space-around}.ratings-emoji{background-color:transparent;border:none;font-size:16px;opacity:.5;padding:0}.ratings-emoji:hover{cursor:pointer;opacity:1;transform:scale(1.15)}.ratings-emoji.rating-active{opacity:1}.ratings-emoji svg{fill:var(--ph-survey-text-primary-color);transition:fill .2s ease-out}.rating-options-number{border-radius:6px;display:grid;grid-auto-columns:1fr;grid-auto-flow:column;overflow:hidden}.rating-options-number .ratings-number{border:none;border-right:1px solid var(--ph-survey-border-color);color:var(--ph-survey-rating-text-color);cursor:pointer;font-weight:700;text-align:center}:is(.rating-options-number .ratings-number):last-of-type{border-right:0}.rating-active:is(.rating-options-number .ratings-number){background:var(--ph-survey-rating-active-bg-color);color:var(--ph-survey-rating-active-text-color)}.ratings-number{background-color:var(--ph-survey-rating-bg-color);border:none;padding:8px 0}.ratings-number .rating-active{background-color:var(--ph-survey-rating-active-bg-color)}.ratings-number{cursor:pointer}@media (hover:hover) and (pointer:fine){.ratings-number:hover:not(.rating-active){background-color:color-mix(in srgb,var(--ph-survey-rating-active-bg-color) 14%,var(--ph-survey-rating-bg-color))}}.rating-text{display:flex;flex-direction:row;font-size:11px;justify-content:space-between;opacity:.7}.form-submit{background:var(--ph-survey-submit-button-color);border:none;border-radius:6px;box-shadow:0 2px 0 rgba(0,0,0,.045);color:var(--ph-survey-submit-button-text-color);cursor:pointer;font-weight:700;min-width:100%;padding:12px;text-align:center;user-select:none}.form-submit:not([disabled]):hover{box-shadow:0 4px 8px rgba(0,0,0,.1);transform:scale(1.02)}.form-submit:not([disabled]):active{box-shadow:0 1px 2px rgba(0,0,0,.05);transform:scale(.98)}.form-submit[disabled]{cursor:not-allowed;opacity:var(--ph-survey-disabled-button-opacity)}.validation-hint{font-size:12px;margin-top:4px;opacity:.7}.form-cancel{background:#fff;border-radius:100%;cursor:pointer;line-height:0;padding:12px;position:absolute;right:0;top:0;transform:translate(50%,-50%)}.form-cancel:hover{opacity:.7;transform:translate(50%,-50%) scale(1.1)}.footer-branding{align-items:center;display:flex;font-size:11px;font-weight:500;gap:4px;justify-content:center;opacity:.6;text-decoration:none}.footer-branding:hover{opacity:1}.footer-branding a{text-decoration:none}.thank-you-message{text-align:center}.thank-you-message-header{margin:10px 0 0}.thank-you-message-body{font-size:14px;opacity:.8}.limit-height{max-height:256px;overflow-x:hidden;overflow-y:auto;scrollbar-color:var(--ph-survey-scrollbar-thumb-color) var(--ph-survey-scrollbar-track-color);scrollbar-width:thin}.limit-height::-webkit-scrollbar{width:8px}.limit-height::-webkit-scrollbar-track{background:var(--ph-survey-scrollbar-track-color);border-radius:4px}.limit-height::-webkit-scrollbar-thumb{background-color:var(--ph-survey-scrollbar-thumb-color);border:2px solid var(--ph-survey-scrollbar-track-color);border-radius:4px}:is(.limit-height::-webkit-scrollbar-thumb):hover{background-color:var(--ph-survey-text-subtle-color)}.sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}@media (prefers-reduced-motion:reduce){.ph-survey *{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}@keyframes ph-survey-checkmark-reveal{0%{opacity:0;transform:rotate(45deg) scale(0)}50%{opacity:1;transform:rotate(45deg) scale(1.2)}to{opacity:1;transform:rotate(45deg) scale(1)}}@keyframes ph-survey-radio-reveal{0%{opacity:0;transform:scale(0)}50%{opacity:1;transform:scale(1.3)}to{opacity:1;transform:scale(1)}}',null!=n&&null!=(r=n.config)&&r.prepare_external_dependency_stylesheet&&(i=n.config.prepare_external_dependency_stylesheet(i)),i||(tf.error("prepare_external_dependency_stylesheet returned null"),null)}(rf,0,e);return null==t||t.setAttribute("data-ph-survey-style","true"),t}(t);if(a){var u=s.querySelector("style");u&&s.removeChild(u),s.appendChild(a)}return rf.body.appendChild(o),{shadow:s,isNewlyCreated:!0}},df=function(e){var t,n,r,i=e.responses,o=e.survey,s=e.surveySubmissionId,a=e.posthog,u=e.isSurveyCompleted,l=e.properties,c=e.surveyLanguage;a?(Tl(o),a.capture(cs.SENT,Ai(((t={})[ds.SURVEY_NAME]=o.name,t[ds.SURVEY_ID]=o.id,t[ds.SURVEY_ITERATION]=o.current_iteration,t[ds.SURVEY_ITERATION_START_DATE]=o.current_iteration_start_date,t[ds.SURVEY_SUBMISSION_ID]=s,t[ds.SURVEY_COMPLETED]=u,t),c&&((n={})[ds.SURVEY_LANGUAGE]=c,n),{sessionRecordingUrl:null==a.get_session_replay_url?void 0:a.get_session_replay_url()},hl(i,o),l,{$set:(r={},r[_l(o,"responded")]=!0,r)})),u&&(nf.dispatchEvent(new CustomEvent("PHSurveySent",{detail:{surveyId:o.id}})),Pf(o))):bl.error("[survey sent] event not captured, PostHog instance not found.")},ff=function(e,t,n){var r,i,o,s;return Ai(((r={})[ds.SURVEY_NAME]=e.name,r[ds.SURVEY_ID]=e.id,r[ds.SURVEY_ITERATION]=e.current_iteration,r[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,r[ds.SURVEY_PARTIALLY_COMPLETED]=(void 0===(s=null==t?void 0:t.responses)&&(s={}),Object.values(s).some((function(e){return!Us(e)}))),r),(null==t?void 0:t.surveyLanguage)&&((i={})[ds.SURVEY_LANGUAGE]=t.surveyLanguage,i),((o={sessionRecordingUrl:null==n.get_session_replay_url?void 0:n.get_session_replay_url()})[ds.SURVEY_SUBMISSION_ID]=null==t?void 0:t.surveySubmissionId,o),hl(null==t?void 0:t.responses,e))},pf=function(e,t,n,r){var i,o;if(t){if(!n){var s=Ef(e);t.capture(cs.DISMISSED,Ai({},ff(e,s,t),r&&((i={})[ds.SURVEY_LANGUAGE]=r,i),{$set:(o={},o[_l(e,"dismissed")]=!0,o)})),Pf(e),Tl(e),nf.dispatchEvent(new CustomEvent("PHSurveyClosed",{detail:{surveyId:e.id}}))}}else bl.error("[survey dismissed] event not captured, PostHog instance not found.")},hf=function(e,t){if(t){var n=function(e){return Cl("abandonedSurvey_",e)}(e);try{if("true"===localStorage.getItem(n))return}catch(e){return}var r=Ef(e);if(r){try{localStorage.setItem(n,"true")}catch(e){}t.capture(cs.ABANDONED,ff(e,r,t),{transport:"sendBeacon"})}}else bl.error("[survey abandoned] event not captured, PostHog instance not found.")},_f=function(e){return e.map((function(e){return{sort:Math.floor(10*Math.random()),value:e}})).sort((function(e,t){return e.sort-t.sort})).map((function(e){return e.value}))},vf=function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))?t.reverse():t},gf=function(e){return e.appearance&&e.appearance.shuffleQuestions&&!e.enable_partial_responses?vf(e.questions,_f(e.questions)):e.questions},mf=function(e){var t;return!(null==(t=e.conditions)||null==(t=t.events)||!t.repeatedActivation||!function(e){var t,n;return null!=(null==(t=e.conditions)||null==(t=t.events)||null==(t=t.values)?void 0:t.length)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0}(e))||e.schedule===ls||Cf(e)},yf=function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach((function(e){e.__e=!0,fo(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+Xi++,t.__={isPreviewMode:!1,previewPageIndex:0,onPopupSurveyDismissed:function(){},isPopup:!0,onPreviewSubmit:function(){},surveySubmissionId:"",properties:void 0,surveyLanguage:null},t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}(),bf=function(){return Wo(yf)},wf=function(e){var t=e.children,n=e.style;return function(e,t,n){var r,i,o,s,a=ro({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=void 0===t[o]&&null!=s?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?ji.call(arguments,2):n),so(e.type,a,r||e.key,i||e.ref,null)}(e.component,e.renderAsHtml?{dangerouslySetInnerHTML:{__html:t},style:n}:{children:t,style:n})};function Sf(e){var t,n,r;if(null==(t=e.conditions)||!t.url)return!0;var i=null==nf||null==(n=nf.location)?void 0:n.href;if(!i)return!1;var o=[e.conditions.url],s=function(e){return null!=e?e:"icontains"}(null==(r=e.conditions)?void 0:r.urlMatchType);return Ud[s](o,[i])}var xf=function(e){var t=""+El+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+El+e.id+"_"+e.current_iteration),t},kf=function(e,t){try{localStorage.setItem(xf(e),JSON.stringify(t))}catch(e){bl.error("Error setting in-progress survey state in localStorage",e)}},Ef=function(e){try{var t=localStorage.getItem(xf(e));if(t)return JSON.parse(t)}catch(e){bl.error("Error getting in-progress survey state from localStorage",e)}return null},Cf=function(e){var t=Ef(e);return!Us(null==t?void 0:t.surveySubmissionId)},Pf=function(e){try{localStorage.removeItem(xf(e))}catch(e){bl.error("Error clearing in-progress survey state from localStorage",e)}};function Tf(e,t){void 0===t&&(t=!1);var n="PostHogSurvey-"+e.id;return t?"."+n:n}function If(e,t,n){if(void 0===t&&(t=is.Right),e===ss.ExternalSurvey)return{};switch(t){case is.TopLeft:return{top:"0",left:"0",transform:"translate(30px, 30px)"};case is.TopRight:return{top:"0",right:"0",transform:"translate(-30px, 30px)"};case is.TopCenter:return{top:"0",left:"50%",transform:"translate(-50%, 30px)"};case is.MiddleLeft:return{top:"50%",left:"0",transform:"translate(30px, -50%)"};case is.MiddleRight:return{top:"50%",right:"0",transform:"translate(-30px, -50%)"};case is.MiddleCenter:return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};case is.Left:return{left:"30px"};case is.Center:return{left:"50%",transform:"translateX(-50%)"};default:return{right:e===ss.Widget&&n===rs.Tab?"60px":"30px"}}}var Ff=0;function Lf(e,t,n,r,i,o){t||(t={});var s,a,u=t;if("ref"in u)for(a in u={},t)"ref"==a?s=t[a]:u[a]=t[a];var l={type:e,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ff,__i:-1,__u:0,__source:i,__self:o};if("function"==typeof e&&(s=e.defaultProps))for(a in s)void 0===u[a]&&(u[a]=s[a]);return Ui.vnode&&Ui.vnode(l),l}var Rf=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146 272q66 0 121.5-35.5T682-393h-52q-23 40-63 61.5T480.5-310q-46.5 0-87-21T331-393h-53q26 61 81 96.5T480-261Zm0 181q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Mf=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm20 194h253v-49H354v49ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Of=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M626-533q22.5 0 38.25-15.75T680-587q0-22.5-15.75-38.25T626-641q-22.5 0-38.25 15.75T572-587q0 22.5 15.75 38.25T626-533Zm-292 0q22.5 0 38.25-15.75T388-587q0-22.5-15.75-38.25T334-641q-22.5 0-38.25 15.75T280-587q0 22.5 15.75 38.25T334-533Zm146.174 116Q413-417 358.5-379.5T278-280h53q22-42 62.173-65t87.5-23Q528-368 567.5-344.5T630-280h52q-25-63-79.826-100-54.826-37-122-37ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),Af=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M480-417q-67 0-121.5 37.5T278-280h404q-25-63-80-100t-122-37Zm-183-72 50-45 45 45 31-36-45-45 45-45-31-36-45 45-50-45-31 36 45 45-45 45 31 36Zm272 0 44-45 51 45 31-36-45-45 45-45-31-36-51 45-44-45-31 36 44 45-44 45 31 36ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142 0 241-99t99-241q0-142-99-241t-241-99q-142 0-241 99t-99 241q0 142 99 241t241 99Z"})}),qf=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",children:Lf("path",{d:"M479.504-261Q537-261 585.5-287q48.5-26 78.5-72.4 6-11.6-.75-22.6-6.75-11-20.25-11H316.918Q303-393 296.5-382t-.5 22.6q30 46.4 78.5 72.4 48.5 26 105.004 26ZM347-578l27 27q7.636 8 17.818 8Q402-543 410-551q8-8 8-18t-8-18l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.636-8 17.818Q276-559 284-551q8 8 18 8t18-8l27-27Zm267 0 27 27q7.714 8 18 8t18-8q8-7.636 8-17.818Q685-579 677-587l-42-42q-8.8-9-20.9-9-12.1 0-21.1 9l-42 42q-8 7.714-8 18t8 18q7.636 8 17.818 8Q579-543 587-551l27-27ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 340q142.375 0 241.188-98.812Q820-337.625 820-480t-98.812-241.188Q622.375-820 480-820t-241.188 98.812Q140-622.375 140-480t98.812 241.188Q337.625-140 480-140Z"})}),$f=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Lf("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66-.23-.45-.52-.86-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84C7 18.95 8.05 20 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})}),Df=Lf("svg",{className:"emoji-svg",xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 0 24 24",width:"48",children:Lf("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4H6.55c-.7 0-1.36.37-1.72.97l-2.66 6.15z"})}),Nf=function(e){var t=(void 0===e?{}:e).fill,n=void 0===t?"currentColor":t;return Lf("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:n,xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"close-survey-title-adam",children:[Lf("title",{id:"close-survey-title",className:"adam-testing",children:"Close survey"}),Lf("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.164752 0.164752C0.384422 -0.0549175 0.740578 -0.0549175 0.960248 0.164752L6 5.20451L11.0398 0.164752C11.2594 -0.0549175 11.6156 -0.0549175 11.8352 0.164752C12.0549 0.384422 12.0549 0.740578 11.8352 0.960248L6.79549 6L11.8352 11.0398C12.0549 11.2594 12.0549 11.6156 11.8352 11.8352C11.6156 12.0549 11.2594 12.0549 11.0398 11.8352L6 6.79549L0.960248 11.8352C0.740578 12.0549 0.384422 12.0549 0.164752 11.8352C-0.0549175 11.6156 -0.0549175 11.2594 0.164752 11.0398L5.20451 6L0.164752 0.960248C-0.0549175 0.740578 -0.0549175 0.384422 0.164752 0.164752Z",fill:n})]})},Hf=Lf("svg",{width:"77",height:"14",viewBox:"0 0 77 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Lf("g",{"clip-path":"url(#clip0_2415_6911)",children:[Lf("mask",{id:"mask0_2415_6911",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"77",height:"14",children:Lf("path",{d:"M0.5 0H76.5V14H0.5V0Z",fill:"white"})}),Lf("g",{mask:"url(#mask0_2415_6911)",children:[Lf("path",{d:"M5.77226 8.02931C5.59388 8.37329 5.08474 8.37329 4.90634 8.02931L4.4797 7.20672C4.41155 7.07535 4.41155 6.9207 4.4797 6.78933L4.90634 5.96669C5.08474 5.62276 5.59388 5.62276 5.77226 5.96669L6.19893 6.78933C6.26709 6.9207 6.26709 7.07535 6.19893 7.20672L5.77226 8.02931ZM5.77226 12.6946C5.59388 13.0386 5.08474 13.0386 4.90634 12.6946L4.4797 11.872C4.41155 11.7406 4.41155 11.586 4.4797 11.4546L4.90634 10.632C5.08474 10.288 5.59388 10.288 5.77226 10.632L6.19893 11.4546C6.26709 11.586 6.26709 11.7406 6.19893 11.872L5.77226 12.6946Z",fill:"#1D4AFF"}),Lf("path",{d:"M0.5 10.9238C0.5 10.508 1.02142 10.2998 1.32637 10.5938L3.54508 12.7327C3.85003 13.0267 3.63405 13.5294 3.20279 13.5294H0.984076C0.716728 13.5294 0.5 13.3205 0.5 13.0627V10.9238ZM0.5 8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.19753 13.3927C5.28831 13.4802 5.41144 13.5294 5.53982 13.5294H8.0421C8.47337 13.5294 8.68936 13.0267 8.3844 12.7327L1.32637 5.92856C1.02142 5.63456 0.5 5.84278 0.5 6.25854V8.67083ZM0.5 4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L10.0368 13.3927C10.1276 13.4802 10.2508 13.5294 10.3791 13.5294H12.8814C13.3127 13.5294 13.5287 13.0267 13.2237 12.7327L1.32637 1.26329C1.02142 0.969312 0.5 1.17752 0.5 1.59327V4.00556ZM5.33931 4.00556C5.33931 4.12932 5.39033 4.24802 5.4811 4.33554L14.1916 12.7327C14.4965 13.0267 15.0179 12.8185 15.0179 12.4028V9.99047C15.0179 9.86671 14.9669 9.74799 14.8762 9.66049L6.16568 1.26329C5.86071 0.969307 5.33931 1.17752 5.33931 1.59327V4.00556ZM11.005 1.26329C10.7 0.969307 10.1786 1.17752 10.1786 1.59327V4.00556C10.1786 4.12932 10.2296 4.24802 10.3204 4.33554L14.1916 8.06748C14.4965 8.36148 15.0179 8.15325 15.0179 7.7375V5.3252C15.0179 5.20144 14.9669 5.08272 14.8762 4.99522L11.005 1.26329Z",fill:"#F9BD2B"}),Lf("path",{d:"M21.0852 10.981L16.5288 6.58843C16.2238 6.29443 15.7024 6.50266 15.7024 6.91841V13.0627C15.7024 13.3205 15.9191 13.5294 16.1865 13.5294H23.2446C23.5119 13.5294 23.7287 13.3205 23.7287 13.0627V12.5032C23.7287 12.2455 23.511 12.0396 23.2459 12.0063C22.4323 11.9042 21.6713 11.546 21.0852 10.981ZM18.0252 12.0365C17.5978 12.0365 17.251 11.7021 17.251 11.2901C17.251 10.878 17.5978 10.5436 18.0252 10.5436C18.4527 10.5436 18.7996 10.878 18.7996 11.2901C18.7996 11.7021 18.4527 12.0365 18.0252 12.0365Z",fill:"currentColor"}),Lf("path",{d:"M0.5 13.0627C0.5 13.3205 0.716728 13.5294 0.984076 13.5294H3.20279C3.63405 13.5294 3.85003 13.0267 3.54508 12.7327L1.32637 10.5938C1.02142 10.2998 0.5 10.508 0.5 10.9238V13.0627ZM5.33931 5.13191L1.32637 1.26329C1.02142 0.969306 0.5 1.17752 0.5 1.59327V4.00556C0.5 4.12932 0.551001 4.24802 0.641783 4.33554L5.33931 8.86412V5.13191ZM1.32637 5.92855C1.02142 5.63455 0.5 5.84278 0.5 6.25853V8.67083C0.5 8.79459 0.551001 8.91331 0.641783 9.00081L5.33931 13.5294V9.79717L1.32637 5.92855Z",fill:"#1D4AFF"}),Lf("path",{d:"M10.1787 5.3252C10.1787 5.20144 10.1277 5.08272 10.0369 4.99522L6.16572 1.26329C5.8608 0.969306 5.33936 1.17752 5.33936 1.59327V4.00556C5.33936 4.12932 5.39037 4.24802 5.48114 4.33554L10.1787 8.86412V5.3252ZM5.33936 13.5294H8.04214C8.47341 13.5294 8.6894 13.0267 8.38443 12.7327L5.33936 9.79717V13.5294ZM5.33936 5.13191V8.67083C5.33936 8.79459 5.39037 8.91331 5.48114 9.00081L10.1787 13.5294V9.99047C10.1787 9.86671 10.1277 9.74803 10.0369 9.66049L5.33936 5.13191Z",fill:"#F54E00"}),Lf("path",{d:"M29.375 11.6667H31.3636V8.48772H33.0249C34.8499 8.48772 36.0204 7.4443 36.0204 5.83052C36.0204 4.21681 34.8499 3.17334 33.0249 3.17334H29.375V11.6667ZM31.3636 6.84972V4.81136H32.8236C33.5787 4.81136 34.0318 5.19958 34.0318 5.83052C34.0318 6.4615 33.5787 6.84972 32.8236 6.84972H31.3636ZM39.618 11.7637C41.5563 11.7637 42.9659 10.429 42.9659 8.60905C42.9659 6.78905 41.5563 5.45438 39.618 5.45438C37.6546 5.45438 36.2701 6.78905 36.2701 8.60905C36.2701 10.429 37.6546 11.7637 39.618 11.7637ZM38.1077 8.60905C38.1077 7.63838 38.7118 6.97105 39.618 6.97105C40.5116 6.97105 41.1157 7.63838 41.1157 8.60905C41.1157 9.57972 40.5116 10.2471 39.618 10.2471C38.7118 10.2471 38.1077 9.57972 38.1077 8.60905ZM46.1482 11.7637C47.6333 11.7637 48.6402 10.8658 48.6402 9.81025C48.6402 7.33505 45.2294 8.13585 45.2294 7.16518C45.2294 6.8983 45.5189 6.72843 45.9342 6.72843C46.3622 6.72843 46.8782 6.98318 47.0418 7.54132L48.527 6.94678C48.2375 6.06105 47.1677 5.45438 45.8713 5.45438C44.4743 5.45438 43.6058 6.25518 43.6058 7.21372C43.6058 9.53118 46.9663 8.88812 46.9663 9.84665C46.9663 10.1864 46.6391 10.417 46.1482 10.417C45.4434 10.417 44.9525 9.94376 44.8015 9.3735L43.3164 9.93158C43.6436 10.8537 44.6001 11.7637 46.1482 11.7637ZM53.4241 11.606L53.2982 10.0651C53.0843 10.1743 52.8074 10.2106 52.5808 10.2106C52.1278 10.2106 51.8257 9.89523 51.8257 9.34918V7.03172H53.3612V5.55145H51.8257V3.78001H49.9755V5.55145H48.9687V7.03172H49.9755V9.57972C49.9755 11.06 51.0202 11.7637 52.3921 11.7637C52.7696 11.7637 53.122 11.7031 53.4241 11.606ZM59.8749 3.17334V6.47358H56.376V3.17334H54.3874V11.6667H56.376V8.11158H59.8749V11.6667H61.8761V3.17334H59.8749ZM66.2899 11.7637C68.2281 11.7637 69.6378 10.429 69.6378 8.60905C69.6378 6.78905 68.2281 5.45438 66.2899 5.45438C64.3265 5.45438 62.942 6.78905 62.942 8.60905C62.942 10.429 64.3265 11.7637 66.2899 11.7637ZM64.7796 8.60905C64.7796 7.63838 65.3837 6.97105 66.2899 6.97105C67.1835 6.97105 67.7876 7.63838 67.7876 8.60905C67.7876 9.57972 67.1835 10.2471 66.2899 10.2471C65.3837 10.2471 64.7796 9.57972 64.7796 8.60905ZM73.2088 11.4725C73.901 11.4725 74.5177 11.242 74.845 10.8416V11.424C74.845 12.1034 74.2786 12.5767 73.4102 12.5767C72.7935 12.5767 72.2523 12.2854 72.1642 11.788L70.4776 12.0428C70.7042 13.1955 71.925 13.972 73.4102 13.972C75.361 13.972 76.6574 12.8679 76.6574 11.2298V5.55145H74.8324V6.07318C74.4926 5.69705 73.9136 5.45438 73.171 5.45438C71.409 5.45438 70.3014 6.61918 70.3014 8.46345C70.3014 10.3077 71.409 11.4725 73.2088 11.4725ZM72.1012 8.46345C72.1012 7.55345 72.655 6.97105 73.5109 6.97105C74.3793 6.97105 74.9331 7.55345 74.9331 8.46345C74.9331 9.37345 74.3793 9.95585 73.5109 9.95585C72.655 9.95585 72.1012 9.37345 72.1012 8.46345Z",fill:"currentColor"})]})]}),Lf("defs",{children:Lf("clipPath",{id:"clip0_2415_6911",children:Lf("rect",{width:"76",height:"14",fill:"white",transform:"translate(0.5)"})})})]});function jf(e){var t=e.urlParams,n=t?Object.entries(t).map((function(e){var t=e[1];return encodeURIComponent(e[0])+"="+encodeURIComponent(t)})).join("&"):"";return Lf("a",{href:"https://posthog.com/surveys"+(n?"?"+n:""),target:"_blank",rel:"noopener",className:"footer-branding",children:["Survey by ",Hf]})}function Uf(e){var t=e.text,n=e.submitDisabled,r=e.appearance,i=e.onSubmit,o=e.link,s=e.onPreviewSubmit,a=e.skipSubmitButton,u=Wo(yf).isPreviewMode;return Lf("div",{className:"bottom-section",children:[!a&&Lf("button",{className:"form-submit",disabled:n,"aria-label":"Submit survey",type:"button",onClick:function(){o&&(null==ju||ju.open(o)),u?null==s||s():i()},children:t}),!r.whiteLabel&&Lf(jf,{urlParams:{utm_source:"survey-footer"}})]})}function Bf(e){var t=e.question,n=e.forceDisableHtml;return Lf("div",{class:"question-header",children:[Lf(t.type===as.Open?"label":"h3",{className:"survey-question",htmlFor:e.htmlFor,children:t.question}),t.description&&wf({component:oo("p",{className:"survey-question-description"}),children:t.description,renderAsHtml:!n&&"text"!==t.descriptionContentType})]})}function Vf(e){return Lf("button",{className:"form-cancel",onClick:e.onClick,disabled:Wo(yf).isPreviewMode,"aria-label":"Close survey",type:"button",children:Nf({fill:"black"})})}Lf("svg",{width:"16",height:"12",viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Lf("path",{d:"M5.30769 10.6923L4.77736 11.2226C4.91801 11.3633 5.10878 11.4423 5.30769 11.4423C5.5066 11.4423 5.69737 11.3633 5.83802 11.2226L5.30769 10.6923ZM15.5303 1.53033C15.8232 1.23744 15.8232 0.762563 15.5303 0.46967C15.2374 0.176777 14.7626 0.176777 14.4697 0.46967L15.5303 1.53033ZM1.53033 5.85429C1.23744 5.56139 0.762563 5.56139 0.46967 5.85429C0.176777 6.14718 0.176777 6.62205 0.46967 6.91495L1.53033 5.85429ZM5.83802 11.2226L15.5303 1.53033L14.4697 0.46967L4.77736 10.162L5.83802 11.2226ZM0.46967 6.91495L4.77736 11.2226L5.83802 10.162L1.53033 5.85429L0.46967 6.91495Z",fill:"currentColor"})});var zf=ju;function Wf(e){var t=e.header,n=e.description,r=e.contentType,i=e.forceDisableHtml,o=e.appearance,s=e.onClose,a=Wo(yf).isPopup;return Bo((function(){var e=function(e){"Enter"!==e.key&&"Escape"!==e.key||(e.preventDefault(),s())};return cl(zf,"keydown",e),function(){zf.removeEventListener("keydown",e)}}),[s]),Lf("div",{className:"thank-you-message",role:"status",tabIndex:0,"aria-atomic":"true",children:[a&&!0!==o.hideCancelButton&&Lf(Vf,{onClick:function(){return s()}}),Lf("h3",{className:"thank-you-message-header",children:t}),n&&wf({component:oo("p",{className:"thank-you-message-body"}),children:n,renderAsHtml:!i&&"text"!==r}),a&&Lf(Uf,{text:o.thankYouMessageCloseButtonText||"Close",submitDisabled:!1,appearance:o,onSubmit:function(){return s()}})]})}var Gf=function(e){return Os(e)&&e.every((function(e){return Ns(e)}))};function Yf(e){var t=e.question,n=e.forceDisableHtml,r=e.appearance,i=e.onSubmit,o=e.onPreviewSubmit,s=e.displayQuestionIndex,a=e.initialValue,u=bf().isPreviewMode,l=Vo(null),c=Uo((function(){return Ns(a)?a:""})),d=c[0],f=c[1];Bo((function(){setTimeout((function(){var e;u||null==(e=l.current)||e.focus()}),100)}),[u]);var p="surveyQuestion"+s,h=zo((function(){return function(e,t,n){var r,i,o=e.trim();if(!n&&""===o)return"This field is required";if(""===o)return!1;if(t&&t.length>0)for(var s,a=Oi(t);!(s=a()).done;){var u=s.value;switch(u.type){case vs.MinLength:if(void 0!==u.value&&u.value>o.length)return null!==(r=u.errorMessage)&&void 0!==r?r:"Please enter at least "+u.value+" characters";break;case vs.MaxLength:if(void 0!==u.value&&o.length>u.value)return null!==(i=u.errorMessage)&&void 0!==i?i:"Please enter no more than "+u.value+" characters"}}return!1}(d,t.validation,t.optional)}),[d,t.validation,t.optional]),_=uu(t.validation,vs.MinLength),v=uu(t.validation,vs.MaxLength),g=zo((function(){return function(e,t){var n=1===e?void 0:e;return n&&t?"Enter "+n+"-"+t+" characters":n?"Enter at least "+n+" "+(1===n?"character":"characters"):t?"Maximum "+t+" "+(1===t?"character":"characters"):void 0}(_,v)}),[_,v]),m=function(){h||i(d.trim())},y=function(){h||o(d.trim())};return Lf(ao,{children:[Lf("div",{className:"question-container",children:[Lf(Bf,{question:t,forceDisableHtml:n,htmlFor:p}),Lf("textarea",{ref:l,id:p,rows:4,placeholder:null==r?void 0:r.placeholder,minLength:_,maxLength:v,onInput:function(e){f(e.currentTarget.value),e.stopPropagation()},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key||!e.metaKey&&!e.ctrlKey||h||(e.preventDefault(),u?y():m())},value:d}),g&&Lf("div",{className:"validation-hint",children:g})]}),Lf(Uf,{text:t.buttonText||"Submit",submitDisabled:!!h,appearance:r,onSubmit:m,onPreviewSubmit:y})]})}function Qf(e){var t=e.question,n=e.appearance,r=e.onSubmit,i=e.onPreviewSubmit;return Lf(ao,{children:[Lf("div",{className:"question-container",children:Lf(Bf,{question:t,forceDisableHtml:e.forceDisableHtml})}),Lf(Uf,{text:t.buttonText||"Submit",submitDisabled:!1,link:t.link,appearance:n,onSubmit:function(){return r("link clicked")},onPreviewSubmit:function(){return i("link clicked")}})]})}function Zf(e){var t,n=e.question,r=e.forceDisableHtml,i=e.displayQuestionIndex,o=e.appearance,s=e.onSubmit,a=e.onPreviewSubmit,u=e.initialValue,l=n.scale,c=10===n.scale?0:1,d=Uo((function(){return Bs(u)?u:Os(u)&&u.length>0&&Bs(parseInt(u[0]))?parseInt(u[0]):Ns(u)&&Bs(parseInt(u))?parseInt(u):null})),f=d[0],p=d[1],h="emoji"===n.display&&2===n.scale,_=bf().isPreviewMode,v=function(e){return _?a(e):s(e)};return Lf(ao,{children:[Lf("div",{className:"question-container",children:[Lf(Bf,{question:n,forceDisableHtml:r}),Lf("div",{className:"rating-section",children:[Lf("div",{className:"rating-options",children:["emoji"===n.display&&Lf("div",{className:"rating-options-emoji"+(h?" rating-options-emoji-2":""),children:null==(t=np[n.scale])?void 0:t.map((function(e,t){return Lf("button",{"aria-label":"Rate "+(t+1),className:"ratings-emoji question-"+i+"-rating-"+t+" "+(t+1===f?"rating-active":""),value:t+1,type:"button",onClick:function(){var e=t+1;p(e),n.skipSubmitButton&&v(e)},children:e},t)}))}),"number"===n.display&&Lf("div",{className:"rating-options-number",style:{gridTemplateColumns:"repeat("+(l-c+1)+", minmax(0, 1fr))"},children:rp(n.scale).map((function(e,t){return Lf(Kf,{displayQuestionIndex:i,active:f===e,appearance:o,num:e,setActiveNumber:function(e){p(e),n.skipSubmitButton&&v(e)}},t)}))})]}),!h&&Lf("div",{className:"rating-text",children:[Lf("div",{children:n.lowerBoundLabel}),Lf("div",{children:n.upperBoundLabel})]})]})]}),Lf(Uf,{text:n.buttonText||(null==o?void 0:o.submitButtonText)||"Submit",submitDisabled:js(f)&&!n.optional,appearance:o,onSubmit:function(){return s(f)},onPreviewSubmit:function(){return a(f)},skipSubmitButton:n.skipSubmitButton})]})}function Kf(e){var t=e.num,n=e.setActiveNumber;return Lf("button",{"aria-label":"Rate "+t,className:"ratings-number question-"+e.displayQuestionIndex+"-rating-"+t+" "+(e.active?"rating-active":""),type:"button",onClick:function(){n(t)},children:t})}function Xf(e){var t=e.question,n=e.forceDisableHtml,r=e.displayQuestionIndex,i=e.appearance,o=e.onSubmit,s=e.onPreviewSubmit,a=e.initialValue,u=Vo(null),l=zo((function(){return function(e){if(!e.shuffleOptions)return e.choices;var t=e.choices,n="";e.hasOpenChoice&&(n=t.pop());var r=vf(t,_f(t));return e.hasOpenChoice&&(e.choices.push(n),r.push(n)),r}(t)}),[t]),c=Uo((function(){return function(e,t){return Ns(e)||Gf(e)?e:t===as.SingleChoice?null:[]}(a,t.type)})),d=c[0],f=c[1],p=Uo((function(){return function(e,t){if(Ns(e)&&!t.includes(e))return{isSelected:!0,inputValue:e};if(Gf(e)){var n=e.find((function(e){return!t.includes(e)}));if(n)return{isSelected:!0,inputValue:n}}return{isSelected:!1,inputValue:""}}(a,l)})),h=p[0],_=p[1],v=bf().isPreviewMode,g=t.type===as.SingleChoice,m=t.type===as.MultipleChoice,y=t.skipSubmitButton&&g&&!t.hasOpenChoice,b=function(e,t){if(t){var n=!h.isSelected;return _((function(e){return Ai({},e,{isSelected:n,inputValue:n?e.inputValue:""})})),g&&f(""),void(n&&setTimeout((function(){var e;return null==(e=u.current)?void 0:e.focus()}),75))}if(g)return f(e),_((function(e){return Ai({},e,{isSelected:!1,inputValue:""})})),void(y&&(o(e),v&&s(e)));m&&Os(d)&&(d.includes(e)?f(d.filter((function(t){return t!==e}))):f([].concat(d,[e])))},w=function(e){e.stopPropagation();var t=e.currentTarget.value;_((function(e){return Ai({},e,{inputValue:t})})),g&&f(t)},S=function(e){e.stopPropagation(),"Enter"!==e.key||x()||(e.preventDefault(),k()),"Escape"===e.key&&(e.preventDefault(),_((function(e){return Ai({},e,{isSelected:!1,inputValue:""})})),g&&f(null))},x=function(){return!(t.optional||!js(d)&&(!Os(d)||h.isSelected||0!==d.length)&&(!h.isSelected||""!==h.inputValue.trim()))},k=function(){h.isSelected&&m?Os(d)&&(v?s([].concat(d,[h.inputValue])):o([].concat(d,[h.inputValue]))):v?s(d):o(d)};return Lf(ao,{children:[Lf("div",{className:"question-container",children:[Lf(Bf,{question:t,forceDisableHtml:n}),Lf("fieldset",{className:"multiple-choice-options limit-height",children:[Lf("legend",{className:"sr-only",children:m?" Select all that apply":" Select one"}),l.map((function(e,n){var i=!!t.hasOpenChoice&&n===t.choices.length-1,o="surveyQuestion"+r+"Choice"+n,s=o+"Open",a=i?h.isSelected:g?d===e:Os(d)&&d.includes(e);return Lf("label",{className:i?"choice-option-open":"",children:[Lf("div",{className:"response-choice",children:[Lf("input",{type:g?"radio":"checkbox",name:o,checked:a,onChange:function(){return b(e,i)},id:o,"aria-controls":s}),Lf("span",{children:i?e+":":e})]}),i&&Lf("input",{type:"text",ref:u,id:s,name:"question"+r+"Open",value:h.inputValue,onKeyDown:S,onInput:w,onClick:function(t){h.isSelected||b(e,!0),t.stopPropagation()},"aria-label":e+" - please specify"})]},n)}))]})]}),Lf(Uf,{text:t.buttonText||"Submit",submitDisabled:x(),appearance:i,onSubmit:k,onPreviewSubmit:k,skipSubmitButton:y})]})}var Jf=[1,2,3,4,5],ep=[1,2,3,4,5,6,7],tp=[0,1,2,3,4,5,6,7,8,9,10],np={2:[$f,Df],3:[Of,Mf,Rf],5:[Af,Of,Mf,Rf,qf]};function rp(e){switch(e){case 5:default:return Jf;case 7:return ep;case 10:return tp}}var ip=el("[Surveys]");function op(e,t,n){var r,i=e.questions[t],o=t+1;if(null==(r=i.branching)||!r.type)return t===e.questions.length-1?us.End:o;if(i.branching.type===us.End)return us.End;if(i.branching.type===us.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===us.ResponseBased){if(i.type===as.SingleChoice){var s,a=i.choices.indexOf(""+n);if(-1===a&&i.hasOpenChoice&&(a=i.choices.length-1),null!=(s=i.branching)&&null!=(s=s.responseValues)&&s.hasOwnProperty(a)){var u=i.branching.responseValues[a];return Number.isInteger(u)?u:u===us.End?us.End:o}}else if(i.type===as.Rating){var l;if("number"!=typeof n||!Number.isInteger(n))throw new Error("The response type must be an integer");var c=function(e,t){if(2===t){if(1>e||e>2)throw new Error("The response must be in range 1-2");return 1===e?"positive":"negative"}if(3===t){if(1>e||e>3)throw new Error("The response must be in range 1-3");return 1===e?"negative":2===e?"neutral":"positive"}if(5===t){if(1>e||e>5)throw new Error("The response must be in range 1-5");return e>2?3===e?"neutral":"positive":"negative"}if(7===t){if(1>e||e>7)throw new Error("The response must be in range 1-7");return e>3?4===e?"neutral":"positive":"negative"}if(10===t){if(0>e||e>10)throw new Error("The response must be in range 0-10");return e>6?e>8?"promoters":"passives":"detractors"}throw new Error("The scale must be one of: 2, 3, 5, 7, 10")}(n,i.scale);if(null!=(l=i.branching)&&null!=(l=l.responseValues)&&l.hasOwnProperty(c)){var d=i.branching.responseValues[c];return Number.isInteger(d)?d:d===us.End?us.End:o}}return o}return ip.warn("Falling back to next question index due to unexpected branching type"),o}var sp="https?://(.*)",ap=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],up=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"].concat(ap),lp="<masked>",cp=["li_fat_id"];function dp(e,t,n){if(!Vu)return{};var r,i=t?[].concat(ap,n||[]):[],o=fp(Qc(Vu.URL,i,lp),e),s=(r={},nl(cp,(function(e){var t=Gd._get(e);r[e]=t||null})),r);return rl(s,o)}function fp(e,t){var n=up.concat(t||[]),r={};return nl(n,(function(t){var n=Yc(e,t);r[t]=n||null})),r}function pp(e){var t=function(e){return e?0===e.search(sp+"google.([^/?]*)")?"google":0===e.search(sp+"bing.com")?"bing":0===e.search(sp+"yahoo.com")?"yahoo":0===e.search(sp+"duckduckgo.com")?"duckduckgo":null:null}(e),n="yahoo"!=t?"q":"p",r={};if(!js(t)){r.$search_engine=t;var i=Vu?Yc(Vu.referrer,n):"";i.length&&(r.ph_keyword=i)}return r}function hp(){return navigator.language||navigator.userLanguage}var _p="$direct";function vp(){return(null==Vu?void 0:Vu.referrer)||_p}function gp(e,t){var n=e?[].concat(ap,t||[]):[],r=null==zu?void 0:zu.href.substring(0,1e3);return{r:vp().substring(0,1e3),u:r?Qc(r,n,lp):void 0}}function mp(e){var t,n=e.r,r=e.u,i={$referrer:n,$referring_domain:null==n?void 0:n==_p?_p:null==(t=Gc(n))?void 0:t.host};if(r){i.$current_url=r;var o=Gc(r);i.$host=null==o?void 0:o.host,i.$pathname=null==o?void 0:o.pathname;var s=fp(r);rl(i,s)}if(n){var a=pp(n);rl(i,a)}return i}function yp(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function bp(){try{return(new Date).getTimezoneOffset()}catch(e){return}}var wp=el("[SurveyTranslations]");function Sp(e,t){var n=function(e){return function(e,t){var n=e.storedPersonProperties,r=e.locale,i=vl(e.overrideLanguage);if(i)return null==t||t.info("Using override display language: "+i),i;var o=function(e){return e&&"object"==typeof e&&"language"in e?vl(e.language):null}(n);if(o)return null==t||t.info("Using person property language: "+o),o;var s=vl(r);return s?(null==t||t.info("Using detected locale: "+s),s):(null==t||t.info("No user language detected"),null)}({overrideLanguage:e.config.override_display_language,storedPersonProperties:As(e.get_property)?e.get_property(oc):void 0,locale:hp()},wp)}(t);if(!n)return wp.info("No user language detected"),{survey:e,language:null};var r=yl(e,n,wp);return{survey:r.survey,language:r.matchedKey}}var xp=ju,kp=Vu,Ep="ph:show_survey_widget",Cp="PHWidgetSurveyClickListener";function Pp(e,t){try{var n=e.getBoundingClientRect(),r=xp.innerHeight,i=xp.innerWidth,o=n.left+n.width/2-t/2;o+t>i-20&&(o=i-t-20),20>o&&(o=20);var s=r-n.bottom,a=250>s&&n.top>s;return{position:"fixed",top:a?"auto":n.bottom+12+"px",left:o+"px",right:"auto",bottom:a?r-n.top+12+"px":"auto",zIndex:sf.zIndex}}catch(e){return bl.warn("Failed to calculate trigger position:",e),null}}var Tp=function(){function e(e){var t=this;this._surveyTimeouts=new Map,this._widgetSelectorListeners=new Map,this._prefillHandledSurveys=new Set,this.handlePageUnload=function(){var e=t._posthog.get_property(ac);if(e)for(var n,r=Oi(e);!(n=r()).done;){var i=n.value;Cf(i)&&hf(i,t._posthog)}},this.handlePopoverSurvey=function(e,n){var r,i,o,s,a=t._translateSurveyForRendering(e),u=a.survey,l=a.language,c=null!=n&&n.position||null!=n&&n.selector?Ai({},u,{appearance:Ai({},u.appearance,n.position&&{position:n.position},n.selector&&{widgetSelector:n.selector})}):u;t._clearSurveyTimeout(c.id);var d=null!=n?n:{},f=d.properties,p=d.initialResponses,h=!(!p||0>=Object.keys(p).length)&&t._handleInitialResponses(c,p,f,l);if(!h||null!=(r=c.appearance)&&r.displayThankYouMessage){t._addSurveyToFocus(c);var _={};if((null==(i=c.appearance)?void 0:i.position)===is.NextToTrigger&&null!=(o=c.appearance)&&o.widgetSelector){var v,g=kp.querySelector(c.appearance.widgetSelector);g&&(_=Pp(g,parseInt((null==(v=c.appearance)?void 0:v.maxWidth)||sf.maxWidth))||{})}var m=(null==(s=c.appearance)?void 0:s.surveyPopupDelaySeconds)||0,y=cf(c,t._posthog).shadow,b={posthog:t._posthog,survey:c,removeSurveyFromFocus:t._removeSurveyFromFocus,properties:f,style:_,isSurveyCompleted:h,skipShownEvent:null==n?void 0:n.skipShownEvent,surveyLanguage:l};if(0>=m)return Po(Lf(Rp,Ai({},b)),y);var w=setTimeout((function(){if(t._surveyTimeouts.delete(c.id),!Sf(c))return t._removeSurveyFromFocus(c);Po(Lf(Rp,Ai({},b,{survey:Ai({},c,{appearance:Ai({},c.appearance,{surveyPopupDelaySeconds:0})})})),y)}),1e3*m);t._surveyTimeouts.set(c.id,w)}},this._handleWidget=function(e){var n=t._translateSurveyForRendering(e),r=n.survey,i=n.language,o=cf(r,t._posthog),s=o.shadow;o.isNewlyCreated&&Po(Lf(Op,{posthog:t._posthog,survey:r,surveyLanguage:i},e.id),s)},this._removeWidgetSelectorListener=function(e){t._removeSurveyFromDom(e);var n=t._widgetSelectorListeners.get(e.id);n&&(n.element.removeEventListener("click",n.listener),n.element.removeAttribute(Cp),t._widgetSelectorListeners.delete(e.id),bl.info("Removed click listener for survey "+e.id))},this._manageWidgetSelectorListener=function(e,n){var r=kp.querySelector(n),i=t._widgetSelectorListeners.get(e.id);if(r){if(t._handleWidget(e),i){if(r===i.element)return;bl.info("Selector element changed for survey "+e.id+". Re-attaching listener."),t._removeWidgetSelectorListener(e)}if(!r.hasAttribute(Cp)){var o=function(t){var n,r;t.stopPropagation();var i=(null==(n=e.appearance)?void 0:n.position)===is.NextToTrigger?Pp(t.currentTarget,parseInt((null==(r=e.appearance)?void 0:r.maxWidth)||sf.maxWidth)):{};xp.dispatchEvent(new CustomEvent(Ep,{detail:{surveyId:e.id,position:i}}))};cl(r,"click",o),r.setAttribute(Cp,"true"),t._widgetSelectorListeners.set(e.id,{element:r,listener:o,survey:e}),bl.info("Attached click listener for feedback button survey "+e.id)}}else i&&t._removeWidgetSelectorListener(e)},this.renderPopover=function(e){var n=t._translateSurveyForRendering(e),r=n.survey,i=n.language,o=cf(r,t._posthog).shadow;Po(Lf(Rp,{posthog:t._posthog,survey:r,removeSurveyFromFocus:t._removeSurveyFromFocus,surveyLanguage:i}),o)},this.renderSurvey=function(e,n,r){var i,o=t._translateSurveyForRendering(e),s=o.survey,a=o.language,u=!1;null!=(i=t._posthog.config)&&null!=(i=i.surveys)&&i.prefillFromUrl&&(u=t._handleUrlPrefill(s,a)),Po(Lf(Rp,{posthog:t._posthog,survey:s,removeSurveyFromFocus:t._removeSurveyFromFocus,isPopup:!1,properties:r,isSurveyCompleted:u,surveyLanguage:a}),n)},this.getActiveMatchingSurveys=function(e,n){var r;void 0===n&&(n=!1),null==(r=t._posthog)||null==(r=r.surveys)||r.getSurveys((function(n){var r=n.filter((function(e){return t.checkSurveyEligibility(e).eligible&&t._isSurveyConditionMatched(e)&&t._hasActionOrEventTriggeredSurvey(e)&&t._checkFlags(e)}));e(r)}),n)},this.callSurveysAndEvaluateDisplayLogic=function(e){void 0===e&&(e=!1),t.getActiveMatchingSurveys((function(e){var n=e.filter((function(e){return e.type===ss.Popover||e.type===ss.Widget})),r=t._sortSurveysByAppearanceDelay(n),i=new Set;r.forEach((function(e){if(e.type===ss.Widget){var n,r,o,s;if((null==(n=e.appearance)?void 0:n.widgetType)===rs.Tab)return void t._handleWidget(e);(null==(r=e.appearance)?void 0:r.widgetType)===rs.Selector&&null!=(o=e.appearance)&&o.widgetSelector&&(i.add(e.id),t._manageWidgetSelectorListener(e,null==(s=e.appearance)?void 0:s.widgetSelector))}js(t._surveyInFocus)&&e.type===ss.Popover&&t.handlePopoverSurvey(e)})),t._widgetSelectorListeners.forEach((function(e){var n=e.survey;i.has(n.id)||t._removeWidgetSelectorListener(n)}))}),e)},this._addSurveyToFocus=function(e){js(t._surveyInFocus)||bl.error("Survey "+t._surveyInFocus+" already in focus. Cannot add survey "+e.id+"."),t._surveyInFocus=e.id},this._removeSurveyFromFocus=function(e){t._surveyInFocus!==e.id&&bl.error("Survey "+e.id+" is not in focus. Cannot remove survey "+e.id+"."),t._clearSurveyTimeout(e.id),t._surveyInFocus=null,t._removeSurveyFromDom(e)},this._posthog=e,this._surveyInFocus=null}var t=e.prototype;return t._clearSurveyTimeout=function(e){var t=this._surveyTimeouts.get(e);t&&(clearTimeout(t),this._surveyTimeouts.delete(e))},t.cancelSurvey=function(e){this._surveyTimeouts.has(e)&&(bl.info("Cancelled pending survey "+e),this._clearSurveyTimeout(e),this._surveyInFocus===e&&(this._surveyInFocus=null))},t._sortSurveysByAppearanceDelay=function(e){return e.sort((function(e,t){var n,r,i=Cf(e),o=Cf(t);if(i&&!o)return-1;if(!i&&o)return 1;var s=e.schedule===ls,a=t.schedule===ls;return s&&!a?1:!s&&a?-1:((null==(n=e.appearance)?void 0:n.surveyPopupDelaySeconds)||0)-((null==(r=t.appearance)?void 0:r.surveyPopupDelaySeconds)||0)}))},t._translateSurveyForRendering=function(e){return Sp(e,this._posthog)},t._handleUrlPrefill=function(e,t){if(this._prefillHandledSurveys.has(e.id))return!1;var n=function(e){var t={},n=!1,r=e.replace(/^\?/,"");if(!r)return{params:t,autoSubmit:n};for(var i,o=Oi(r.split("&"));!(i=o()).done;){var s=i.value.split("="),a=s[0],u=s[1];if(a&&!Ds(u)){var l=decodeURIComponent(a),c=decodeURIComponent(u);if("auto_submit"!==l||"true"!==c){var d=l.match(/^q(\d+)$/);if(d){var f=parseInt(d[1],10);t[f]||(t[f]=[]),t[f].push(c)}}else n=!0}}return{params:t,autoSubmit:n}}(xp.location.search),r=n.params;if(0===Object.keys(r).length)return!1;bl.info("[Survey Prefill] Detected URL prefill parameters");var i=this._processPrefillData(e,r,t);if(!i)return!1;var o=i.responses,s=i.submissionId,a=i.isSurveyCompleted,u=i.skippedResponses;return(Object.keys(u).length>0&&e.enable_partial_responses||a)&&df({responses:a?o:u,survey:e,surveySubmissionId:s,posthog:this._posthog,isSurveyCompleted:a,surveyLanguage:t}),this._prefillHandledSurveys.add(e.id),a},t._handleInitialResponses=function(e,t,n,r){for(var i={},o=0,s=Object.entries(t);s.length>o;o++){var a=s[o],u=a[1];i[parseInt(a[0])]=Os(u)?u.map(String):[String(u)]}bl.info("[Survey] Processing initial responses");var l=this._processPrefillData(e,i,r);if(!l)return!1;var c=l.isSurveyCompleted;return df({responses:l.responses,survey:e,surveySubmissionId:l.submissionId,posthog:this._posthog,isSurveyCompleted:c,properties:n,surveyLanguage:r}),c},t._processPrefillData=function(e,t,n){try{var r=function(e,t){var n={};return e.questions.forEach((function(e,r){if(t[r]&&e.id){var i=t[r],o=fl(e.id);try{switch(e.type){case as.SingleChoice:if(!e.choices||0===e.choices.length)return void Ju.warn("[Survey Prefill] Question "+r+" has no choices");var s=parseInt(i[0],10);if(isNaN(s)||0>s||s>=e.choices.length)return void Ju.warn("[Survey Prefill] Invalid choice index for q"+r+": "+i[0]);n[o]=e.choices[s];break;case as.MultipleChoice:if(!e.choices||0===e.choices.length)return void Ju.warn("[Survey Prefill] Question "+r+" has no choices");var a=i.map((function(e){return parseInt(e,10)})).filter((function(t){return!isNaN(t)&&t>=0&&e.choices.length>t}));if(0===a.length)return void Ju.warn("[Survey Prefill] No valid choices for q"+r);var u=[].concat(new Set(a.map((function(t){return e.choices[t]}))));a.length>u.length&&Ju.warn("[Survey Prefill] Removed duplicate choices for q"+r),n[o]=u;break;case as.Rating:var l=parseInt(i[0],10),c=e.scale||10;if(isNaN(l)||0>l||l>c)return void Ju.warn("[Survey Prefill] Invalid rating for q"+r+": "+i[0]+" (scale: 0-"+c+")");n[o]=l;break;default:Ju.info("[Survey Prefill] Question type "+e.type+" does not support prefill")}}catch(e){Ju.error("[Survey Prefill] Error converting q"+r+":",e)}}})),n}(e,t);if(0===Object.keys(r).length)return bl.warn("[Survey Prefill] No valid responses after conversion"),null;var i=Bc(),o=Object.keys(t).map((function(e){return parseInt(e,10)})),s=function(e,t,n){for(var r=0,i={},o=e.questions.length+1;e.questions.length>r&&o>0&&t.includes(r);){var s=e.questions[r];if(!s||!("skipSubmitButton"in s)||!s.skipSubmitButton)break;if(s.id){var a=fl(s.id);Ds(n[a])||(i[a]=n[a])}var u=op(e,r,s.id?n[fl(s.id)]:null);if(u===us.End)return{startQuestionIndex:e.questions.length,skippedResponses:i};r=u}return{startQuestionIndex:r,skippedResponses:i}}(e,o,r),a=s.startQuestionIndex,u=s.skippedResponses,l=a>=e.questions.length;return kf(e,{surveySubmissionId:i,responses:r,lastQuestionIndex:a,surveyLanguage:n}),bl.info("[Survey Prefill] Stored prefilled responses in localStorage"),{responses:r,submissionId:i,startQuestionIndex:a,isSurveyCompleted:l,skippedResponses:u}}catch(e){return bl.error("[Survey Prefill] Error handling prefill:",e),null}},t._isSurveyFeatureFlagEnabled=function(e,t){var n;if(void 0===t&&(t=void 0),!e)return!0;var r,i=!(null==(n=this._posthog.featureFlags)||!n.isFeatureEnabled(e,{send_event:!e.startsWith("survey-targeting-")})),o=!0;return t&&(o=(null==(r=this._posthog.featureFlags)?void 0:r.getFeatureFlag(e,{send_event:!1}))===t||"any"===t),i&&o},t._isSurveyConditionMatched=function(e){return!e.conditions||Sf(e)&&function(e){var t,n;return function(e,t){var n,r,i;if(!e||0===e.length)return!0;if(!Zu)return!1;var o=nu(Zu,{userAgentDataPlatform:null==Bu||null==(n=Bu.userAgentData)?void 0:n.platform,maxTouchPoints:null==Bu?void 0:Bu.maxTouchPoints,screenWidth:null==ju||null==(r=ju.screen)?void 0:r.width,screenHeight:null==ju||null==(i=ju.screen)?void 0:i.height,devicePixelRatio:null==ju?void 0:ju.devicePixelRatio});return Ud[null!=t?t:"icontains"](e,[o])}(null==(t=e.conditions)?void 0:t.deviceTypes,null==(n=e.conditions)?void 0:n.deviceTypesMatchType)}(e)&&function(e){var t;return null==(t=e.conditions)||!t.selector||!(null==rf||!rf.querySelector(e.conditions.selector))}(e)},t._internalFlagCheckSatisfied=function(e){return mf(e)||this._isSurveyFeatureFlagEnabled(e.internal_targeting_flag_key)||Cf(e)},t.checkSurveyEligibility=function(e){var t,n,r={eligible:!0,reason:void 0};if(!wl(e))return r.eligible=!1,r.reason="Survey is not running. It was completed on "+e.end_date,r;if(!Il.includes(e.type))return r.eligible=!1,r.reason="Surveys of type "+e.type+" are never eligible to be shown in the app",r;var i=null==(t=e.conditions)?void 0:t.linkedFlagVariant;return this._isSurveyFeatureFlagEnabled(e.linked_flag_key,i)?this._isSurveyFeatureFlagEnabled(e.targeting_flag_key)?this._internalFlagCheckSatisfied(e)?function(e,t){if(!e||!t)return!0;var n="string"==typeof t?new Date(t):t,r=new Date,i=Math.abs(r.getTime()-n.getTime());return Math.ceil(i/864e5)>e}(null==(n=e.conditions)?void 0:n.seenSurveyWaitPeriodInDays,Qd._get("lastSeenSurveyDate"))?function(e){return!!Qd._get(Pl(e))&&!mf(e)}(e)?(r.eligible=!1,r.reason="Survey has already been seen and it can't be activated again",r):r:(r.eligible=!1,r.reason="Survey wait period has not passed",r):(r.eligible=!1,r.reason="Survey internal targeting flag is not enabled and survey cannot activate repeatedly and survey is not in progress",r):(r.eligible=!1,r.reason="Survey targeting feature flag is not enabled",r):(r.eligible=!1,r.reason=i?"Survey linked feature flag is not enabled for variant "+i:"Survey linked feature flag is not enabled",r)},t._hasActionOrEventTriggeredSurvey=function(e){var t;if(!Sl(e)&&!xl(e))return!0;var n=null==(t=this._posthog.surveys)||null==(t=t._surveyEventReceiver)?void 0:t.getSurveys();return!(null==n||!n.includes(e.id))},t._checkFlags=function(e){var t,n=this;return null==(t=e.feature_flag_keys)||!t.length||e.feature_flag_keys.every((function(e){var t=e.value;return!e.key||!t||n._isSurveyFeatureFlagEnabled(t)}))},t._removeSurveyFromDom=function(e){try{var t=kp.querySelector(Tf(e,!0));null!=t&&t.shadowRoot&&Po(null,t.shadowRoot),null==t||t.remove()}catch(t){bl.warn("Failed to remove survey "+e.id+" from DOM:",t)}},t.getTestAPI=function(){return{addSurveyToFocus:this._addSurveyToFocus,removeSurveyFromFocus:this._removeSurveyFromFocus,surveyInFocus:this._surveyInFocus,surveyTimeouts:this._surveyTimeouts,handleWidget:this._handleWidget,handlePopoverSurvey:this.handlePopoverSurvey,manageWidgetSelectorListener:this._manageWidgetSelectorListener,sortSurveysByAppearanceDelay:this._sortSurveysByAppearanceDelay,checkFlags:this._checkFlags.bind(this),isSurveyFeatureFlagEnabled:this._isSurveyFeatureFlagEnabled.bind(this)}},e}();function Ip(e,t){if(kp&&xp){var n,r=new Tp(e);if(e.config.disable_surveys_automatic_display)return bl.info("Surveys automatic display is disabled. Skipping call surveys and evaluate display logic."),r;if(!1===t)return bl.info("There are no surveys to load or Surveys is disabled in the project settings."),r;r.callSurveysAndEvaluateDisplayLogic(!0);var i=function(){Ds(n)&&(n=setInterval((function(){r.callSurveysAndEvaluateDisplayLogic(!1)}),1e3))};return i(),cl(kp,"visibilitychange",(function(){kp.hidden?Ds(n)||(clearInterval(n),n=void 0):(r.callSurveysAndEvaluateDisplayLogic(!1),i())})),r}}function Fp(e){var t=e.survey,n=e.removeSurveyFromFocus,r=void 0===n?function(){}:n,i=e.setSurveyVisible,o=e.isPreviewMode,s=void 0!==o&&o;Bo((function(){var e;if(!s&&null!=(e=t.conditions)&&e.url){var n=function(){var e,n=t.type===ss.Widget,o=Sf(t),s=(null==(e=t.appearance)?void 0:e.widgetType)===rs.Tab&&n;if(!o)return bl.info("Hiding survey "+t.id+" because URL does not match"),i(!1),r(t);s&&(bl.info("Showing survey "+t.id+" because it is a feedback button tab and URL matches"),i(!0))};cl(xp,"popstate",n),cl(xp,"hashchange",n);var o=xp.history.pushState,a=xp.history.replaceState;return xp.history.pushState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];o.apply(this,t),n()},xp.history.replaceState=function(){for(var e=arguments.length,t=new Array(e),r=0;e>r;r++)t[r]=arguments[r];a.apply(this,t),n()},function(){xp.removeEventListener("popstate",n),xp.removeEventListener("hashchange",n),xp.history.pushState=o,xp.history.replaceState=a}}}),[s,t,r,i])}function Lp(e){switch(void 0===e&&(e=os.Right),e){case os.Top:return{top:"0",left:"50%",transform:"translateX(-50%)"};case os.Left:return{top:"50%",left:"0",transform:"rotate(90deg) translateY(-100%)",transformOrigin:"left top"};case os.Bottom:return{bottom:"0",left:"50%",transform:"translateX(-50%)"};default:return{top:"50%",right:"0",transform:"rotate(-90deg) translateY(-100%)",transformOrigin:"right top"}}}function Rp(e){var t,n,r,i,o,s,a=e.survey,u=e.forceDisableHtml,l=e.posthog,c=e.style,d=void 0===c?{}:c,f=e.previewPageIndex,p=e.removeSurveyFromFocus,h=void 0===p?function(){}:p,_=e.isPopup,v=void 0===_||_,g=e.onPreviewSubmit,m=void 0===g?function(){}:g,y=e.onPopupSurveyDismissed,b=void 0===y?function(){}:y,w=e.onCloseConfirmationMessage,S=void 0===w?function(){}:w,x=e.properties,k=e.isSurveyCompleted,E=e.skipShownEvent,C=e.surveyLanguage,P=Vo(null),T=Number.isInteger(f),I=null!=(t=a.appearance)&&t.surveyPopupDelaySeconds?1e3*a.appearance.surveyPopupDelaySeconds:0,F=function(e,t,n,r,i,o,s,a,u){var l=Uo(r||0===n||e.type===ss.ExternalSurvey),c=l[0],d=l[1],f=Uo(!1),p=f[0],h=f[1],_=function(){var t=function(){o&&i(e),d(!1)};kp.startViewTransition?kp.startViewTransition((function(){var e;null==s||null==(e=s.current)||e.remove()})).finished.then((function(){setTimeout((function(){t()}),100)})):t()},v=function(t){t.detail.surveyId===e.id&&_()};return Bo((function(){if(t){if(!r){var i=function(t){var n,r;if(t.detail.surveyId===e.id){if(null==(n=e.appearance)||!n.displayThankYouMessage)return _();h(!0),null!=(r=e.appearance)&&r.autoDisappear&&setTimeout((function(){_()}),5e3)}},o=function(){var n,r;Sf(e)&&(d(!0),xp.dispatchEvent(new Event("PHSurveyShown")),a||t.capture(cs.SHOWN,Ai(((n={})[ds.SURVEY_NAME]=e.name,n[ds.SURVEY_ID]=e.id,n[ds.SURVEY_ITERATION]=e.current_iteration,n[ds.SURVEY_ITERATION_START_DATE]=e.current_iteration_start_date,n),u&&((r={})[ds.SURVEY_LANGUAGE]=u,r),{sessionRecordingUrl:null==t.get_session_replay_url?void 0:t.get_session_replay_url()})),localStorage.setItem("lastSeenSurveyDate",(new Date).toISOString()))};if(cl(xp,"PHSurveyClosed",v),cl(xp,"PHSurveySent",i),n>0){var s=setTimeout(o,n);return function(){clearTimeout(s),xp.removeEventListener("PHSurveyClosed",v),xp.removeEventListener("PHSurveySent",i)}}return o(),function(){xp.removeEventListener("PHSurveyClosed",v),xp.removeEventListener("PHSurveySent",i)}}}else bl.error("usePopupVisibility hook called without a PostHog instance.")}),[]),Fp({survey:e,removeSurveyFromFocus:i,setSurveyVisible:d,isPreviewMode:r}),{isPopupVisible:c,isSurveySent:p,setIsPopupVisible:d,hidePopupWithViewTransition:_}}(a,l,I,T,h,v,P,E,C),L=F.isPopupVisible,R=F.hidePopupWithViewTransition,M=F.isSurveySent||f===a.questions.length||!0===k,O=zo((function(){var e=Ef(a),t=(null==e?void 0:e.surveySubmissionId)||Bc();return{isPreviewMode:T,previewPageIndex:f,onPopupSurveyDismissed:function(){C?pf(a,l,T,C):pf(a,l,T),b()},isPopup:v||!1,surveySubmissionId:t,onPreviewSubmit:m,posthog:l,properties:x,surveyLanguage:C}}),[T,f,v,l,a,b,m,x,C]);return L?Lf(yf.Provider,{value:O,children:Lf("div",{className:"ph-survey",style:Ai({},If(a.type,null==(n=a.appearance)?void 0:n.position,null==(r=a.appearance)?void 0:r.widgetType),d),ref:P,children:M?Lf(Wf,{header:(null==(i=a.appearance)?void 0:i.thankYouMessageHeader)||"Thank you!",description:(null==(o=a.appearance)?void 0:o.thankYouMessageDescription)||"",forceDisableHtml:!!u,contentType:null==(s=a.appearance)?void 0:s.thankYouMessageDescriptionContentType,appearance:a.appearance||sf,onClose:function(){R(),S()}}):Lf(Mp,{survey:a,forceDisableHtml:!!u,posthog:l})})}):null}function Mp(e){var t,n=e.survey,r=e.forceDisableHtml,i=e.posthog,o=Uo((function(){var e=Ef(n);return null!=e&&e.responses&&bl.info("Survey is already in progress, filling in initial responses"),(null==e?void 0:e.responses)||{}})),s=o[0],a=o[1],u=Wo(yf),l=u.previewPageIndex,c=u.onPopupSurveyDismissed,d=u.isPopup,f=u.onPreviewSubmit,p=u.surveySubmissionId,h=u.isPreviewMode,_=u.properties,v=u.surveyLanguage,g=Uo((function(){var e=Ef(n);return l||(null==e?void 0:e.lastQuestionIndex)||0})),m=g[0],y=g[1],b=zo((function(){return gf(n)}),[n]);Bo((function(){h&&!Ds(l)&&y(l)}),[l,h]);var w=b.at(m);return w?Lf("form",{className:"survey-form",name:"surveyForm",children:[d&&!0!==(null==(t=n.appearance)?void 0:t.hideCancelButton)&&Lf(Vf,{onClick:function(){c()}}),Lf("div",{className:"survey-box","data-question-index":m,children:Ap({question:w,forceDisableHtml:r,displayQuestionIndex:m,appearance:n.appearance||sf,onSubmit:function(e){return function(e){var t,r=e.res,o=e.displayQuestionIndex,u=e.questionId;if(i)if(u){var l=fl(u),c=Ai({},s,((t={})[l]=r,t));a(c);var d=op(n,o,r),f=d===us.End;f||(y(d),kf(n,{surveySubmissionId:p,responses:c,lastQuestionIndex:d,surveyLanguage:v})),(n.enable_partial_responses||f)&&df({responses:c,survey:n,surveySubmissionId:p,isSurveyCompleted:f,posthog:i,properties:_,surveyLanguage:v})}else bl.error("onNextButtonClick called without a questionId.");else bl.error("onNextButtonClick called without a PostHog instance.")}({res:e,displayQuestionIndex:m,questionId:w.id})},onPreviewSubmit:f,initialValue:w.id?s[fl(w.id)]:void 0})})]}):null}function Op(e){var t,n,r,i,o,s,a,u=e.survey,l=e.forceDisableHtml,c=e.posthog,d=e.readOnly,f=e.surveyLanguage,p=Uo(!0),h=p[0],_=p[1],v=Uo(!1),g=v[0],m=v[1],y=Uo({}),b=y[0],w=y[1],S=function(){m(!g)};if(Bo((function(){var e;if(c){if(!d){"tab"===(null==(e=u.appearance)?void 0:e.widgetType)&&w({top:"50%",bottom:"auto"});var t=function(e){var t,n=e;(null==(t=n.detail)?void 0:t.surveyId)===u.id&&(bl.info("Received show event for feedback button survey "+u.id),w(n.detail.position||{}),S())};return cl(xp,Ep,t),function(){xp.removeEventListener(Ep,t)}}}else bl.error("FeedbackWidget called without a PostHog instance.")}),[c,d,u.id,null==(t=u.appearance)?void 0:t.widgetType,null==(n=u.appearance)?void 0:n.widgetSelector,null==(r=u.appearance)?void 0:r.borderColor]),Fp({survey:u,setSurveyVisible:_}),!h)return null;var x=function(){u.schedule!==ls&&_(!1),setTimeout((function(){m(!1)}),200)};return Lf(ao,{children:["tab"===(null==(i=u.appearance)?void 0:i.widgetType)&&Lf("button",{className:"ph-survey-widget-tab "+((null==(o=u.appearance)?void 0:o.tabPosition)===os.Top?"widget-tab-top":""),onClick:S,disabled:d,style:Lp(null==(s=u.appearance)?void 0:s.tabPosition),children:(null==(a=u.appearance)?void 0:a.widgetLabel)||""}),g&&Lf(Rp,{posthog:c,survey:u,forceDisableHtml:l,style:b,onPopupSurveyDismissed:x,onCloseConfirmationMessage:x,surveyLanguage:f})]})}var Ap=function(e){var t=e.question,n=e.onSubmit,r=e.onPreviewSubmit,i={forceDisableHtml:e.forceDisableHtml,appearance:e.appearance,onPreviewSubmit:function(e){r(e)},onSubmit:function(e){n(e)},initialValue:e.initialValue,displayQuestionIndex:e.displayQuestionIndex};switch(t.type){case as.Open:return oo(Yf,Ai({},i,{question:t,key:t.id}));case as.Link:return oo(Qf,Ai({},i,{question:t,key:t.id}));case as.Rating:return oo(Zf,Ai({},i,{question:t,key:t.id}));case as.SingleChoice:case as.MultipleChoice:return oo(Xf,Ai({},i,{question:t,key:t.id}));default:return bl.error("Unsupported question type: "+t.type),null}};Ku.__PosthogExtensions__=Ku.__PosthogExtensions__||{},Ku.__PosthogExtensions__.generateSurveys=Ip,Ku.extendPostHogWithSurveys=Ip;var qp=el("[Error tracking]");function $p(){return new cu([new xu,new Mu,new Eu,new ku,new Lu,new Fu,new Pu,new Ru],function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];return function(t,r){void 0===r&&(r=0);for(var i=[],o=t.split("\n"),s=r;o.length>s;s++){var a=o[s];if(1024>=a.length){var u=wu.test(a)?a.replace(wu,"$1"):a;if(!u.match(/\S*Error: /)){for(var l=0,c=n;c.length>l;l++){var d=(0,c[l])(u,e);if(d){i.push(d);break}}if(i.length>=Su)break}}}return function(e){if(!e.length)return[];var t=Array.from(e);return t.reverse(),t.slice(0,Su).map((function(e){return Ai({},e,{filename:e.filename||(n=t,n[n.length-1]||{}).filename,function:e.function||du});var n}))}(i)}}("web:javascript",gu,bu))}var Dp=function(){function e(e){var t,n;this._suppressionRules=[],this._errorPropertiesBuilder=$p(),this._instance=e,this._suppressionRules=null!==(t=null==(n=this._instance.persistence)?void 0:n.get_property(Dl))&&void 0!==t?t:[],this._exceptionStepsConfig=Du(this._getExceptionStepsConfig()),this._exceptionStepsBuffer=new Nu(this._exceptionStepsConfig)}var t=e.prototype;return t.onConfigChange=function(){this._exceptionStepsConfig=Du(this._getExceptionStepsConfig()),this._exceptionStepsBuffer.setConfig(this._exceptionStepsConfig)},t.onRemoteConfig=function(e){var t,n,r;if("errorTracking"in e){var i,o=null!==(t=null==(n=e.errorTracking)?void 0:n.suppressionRules)&&void 0!==t?t:[],s=null==(r=e.errorTracking)?void 0:r.captureExtensionExceptions;this._suppressionRules=o,this._instance.persistence&&this._instance.persistence.register(((i={})[Dl]=this._suppressionRules,i[Nl]=s,i))}},t.buildProperties=function(e,t){return this._errorPropertiesBuilder.buildFromUnknown(e,{syntheticException:null==t?void 0:t.syntheticException,mechanism:{handled:null==t?void 0:t.handled}})},t.addExceptionStep=function(e,t){if(this._exceptionStepsConfig.enabled)try{var n;if(!Ns(e)||0===e.trim().length)return void qp.warn("Ignoring exception step because message must be a non-empty string");var r=function(e){if(!e)return{sanitizedProperties:{},droppedKeys:[]};var t=[];return{sanitizedProperties:Object.keys(e).reduce((function(n,r){return qu.has(r)?(t.push(r),n):(n[r]=e[r],n)}),{}),droppedKeys:t}}(this._coerceExceptionStepProperties(t)),i=r.sanitizedProperties,o=r.droppedKeys;o.length>0&&qp.warn("Ignoring reserved exception step fields",{droppedKeys:o}),this._exceptionStepsBuffer.add(Ai(((n={})[Ou]=e,n[Au]=(new Date).toISOString(),n),i))}catch(e){qp.error("Failed to add exception step. Ignoring breadcrumb.",e)}},t.sendExceptionEvent=function(e){try{var t=e.$exception_list;if(this._isExceptionList(t)){if(this._matchesSuppressionRule(t))return this._addDroppedExceptionStep("Exception dropped: matched a suppression rule"),void qp.info("Skipping exception capture because a suppression rule matched");if(!this._captureExtensionExceptions&&this._isExtensionException(t))return this._addDroppedExceptionStep("Exception dropped: thrown by a browser extension"),void qp.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this._isPostHogException(t))return this._addDroppedExceptionStep("Exception dropped: thrown by the PostHog SDK"),void qp.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this._exceptionStepsConfig.enabled&&Us(e.$exception_steps)?this._addBufferedExceptionSteps(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",_originatedFromCaptureException:!0});return r&&this._exceptionStepsBuffer.clear(),r}catch(e){return qp.error("Failed to capture exception event. Dropping this exception.",e),void this._exceptionStepsBuffer.clear()}}catch(e){return void qp.error("Failed to process exception event. Ignoring this exception.",e)}},t._addBufferedExceptionSteps=function(e){try{var t=this._exceptionStepsBuffer.getAttachable();return 0===t.length?e:Ai({},e,{$exception_steps:t})}catch(t){return qp.error("Failed to read buffered exception steps. Capturing exception without steps.",t),e}},t._addDroppedExceptionStep=function(e){var t;this._exceptionStepsConfig.enabled&&this._exceptionStepsBuffer.add(((t={})[Ou]=e,t[Au]=(new Date).toISOString(),t))},t._coerceExceptionStepProperties=function(e){return qs(e)?Ai({},e):{}},t._getExceptionStepsConfig=function(){var e,t;return null!==(e=null==(t=this._instance.config.error_tracking)?void 0:t.exception_steps)&&void 0!==e?e:{}},t._matchesSuppressionRule=function(e){if(0===e.length)return!1;var t=e.reduce((function(e,t){var n=t.type,r=t.value;return Ns(n)&&n.length>0&&e.$exception_types.push(n),Ns(r)&&r.length>0&&e.$exception_values.push(r),e}),{$exception_types:[],$exception_values:[]});return this._suppressionRules.some((function(e){var n=e.values.map((function(e){var n,r=Ud[e.operator],i=Os(e.value)?e.value:[e.value],o=null!==(n=t[e.key])&&void 0!==n?n:[];return i.length>0&&r(i,o)}));return"OR"===e.type?n.some(Boolean):n.every(Boolean)}))},t._isExtensionException=function(e){var t=e.flatMap((function(e){var t,n;return null!==(t=null==(n=e.stacktrace)?void 0:n.frames)&&void 0!==t?t:[]}));return t.some((function(e){return e.filename&&e.filename.startsWith("chrome-extension://")}))},t._isPostHogException=function(e){if(e.length>0){var t,n,r,i,o=null!==(t=null==(n=e[0].stacktrace)?void 0:n.frames)&&void 0!==t?t:[],s=o[o.length-1];return null!==(r=null==s||null==(i=s.filename)?void 0:i.includes("posthog.com/static"))&&void 0!==r&&r}return!1},t._isExceptionList=function(e){return!Us(e)&&Os(e)},Mi(e,[{key:"_captureExtensionExceptions",get:function(){var e,t=!!this._instance.get_property(Nl),n=this._instance.config.error_tracking.captureExtensionExceptions;return null!==(e=null!=n?n:t)&&void 0!==e&&e}}])}(),Np=el("[ExceptionAutocapture]"),Hp=$p(),jp={wrapOnError:function(e){var t=ju;t||Np.info("window not available, cannot wrap onerror");var n=t.onerror;return t.onerror=function(){for(var t,r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];var s=Hp.buildFromUnknown(i[4]||i[0],{mechanism:{handled:!1}});return e(s),null!==(t=null==n?void 0:n.apply(void 0,i))&&void 0!==t&&t},t.onerror.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onerror)||delete e.__POSTHOG_INSTRUMENTED__,t.onerror=n}},wrapUnhandledRejection:function(e){var t=ju;t||Np.info("window not available, cannot wrap onUnhandledRejection");var n=t.onunhandledrejection;return t.onunhandledrejection=function(t){var r,i=Hp.buildFromUnknown(t,{mechanism:{handled:!1}});return e(i),null!==(r=null==n?void 0:n(t))&&void 0!==r&&r},t.onunhandledrejection.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.onunhandledrejection)||delete e.__POSTHOG_INSTRUMENTED__,t.onunhandledrejection=n}},wrapConsoleError:function(e){var t=console;t||Np.info("console not available, cannot wrap console.error");var n=t.error;return t.error=function(){for(var t,r=arguments.length,i=new Array(r),o=0;r>o;o++)i[o]=arguments[o];t=1==i.length?i[0]:i.join(" ");var s=i.find((function(e){return e instanceof Error})),a=Hp.buildFromUnknown(s||t,{mechanism:{handled:!1},syntheticException:new Error("PostHog syntheticException"),skipFirstLines:2});return e(a),null==n?void 0:n.apply(void 0,i)},t.error.__POSTHOG_INSTRUMENTED__=!0,function(){var e;null==(e=t.error)||delete e.__POSTHOG_INSTRUMENTED__,t.error=n}}};function Up(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return As(i)&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=i,function(){e[t]=r}}catch(e){return function(){}}}Ku.__PosthogExtensions__=Ku.__PosthogExtensions__||{},Ku.__PosthogExtensions__.errorWrappingFunctions=jp,Ku.posthogErrorWrappingFunctions=jp;var Bp="X-POSTHOG-SESSION-ID",Vp="X-POSTHOG-WINDOW-ID",zp="X-POSTHOG-DISTINCT-ID",Wp=[Bp,Vp,zp],Gp=function(e,t,n,r){var i;try{i=new URL(r.url).hostname}catch(e){return}if(!Os(e)||e.includes(i)){if(n){var o=n.checkAndGetSessionAndWindowId(!0),s=o.windowId;r.headers.set(Bp,o.sessionId),r.headers.set(Vp,s)}t!==Sc&&r.headers.set(zp,t)}};Ku.__PosthogExtensions__=Ku.__PosthogExtensions__||{};var Yp={_patchFetch:function(e,t,n){return Up(ju,"fetch",(function(r){return function(){var i=Ri($i().m((function i(o,s){var a;return $i().w((function(i){for(;;)if(0===i.n)return a=new Request(o,s),Gp(e,t,n,a),i.a(2,r(a))}),i)})));return function(e,t){return i.apply(this,arguments)}}()}))},_patchXHR:function(e,t,n){return Up(ju.XMLHttpRequest.prototype,"open",(function(r){return function(i,o,s,a,u){void 0===s&&(s=!0);var l=this,c=new Request(o);Gp(e,t,n,c);var d=r.call(l,i,c.url,s,a,u);return Wp.forEach((function(e){var t=c.headers.get(e);t&&l.setRequestHeader(e,t)})),d}}))}};Ku.__PosthogExtensions__.tracingHeadersPatchFns=Yp,Ku.postHogTracingHeadersPatchFns=Yp;var Qp=function(){function e(e){this._instance=e}var t=e.prototype;return t.isOptedOut=function(){return this._config.cookieless_mode===Tc||this.isRejected()||-1===this.consent&&this._config.cookieless_mode===Pc},t.isOptedIn=function(){return!this.isOptedOut()},t.isExplicitlyOptedOut=function(){return 0===this.consent},t.isRejected=function(){return 0===this.consent||-1===this.consent&&this._config.opt_out_capturing_by_default},t.optInOut=function(e){this._storage._set(this._storageKey,e?1:0,this._config.cookie_expiration,this._config.cross_subdomain_cookie,this._config.secure_cookie)},t.reset=function(){this._storage._remove(this._storageKey,this._config.cross_subdomain_cookie)},t._getDnt=function(){return!!this._config.respect_dnt&&[null==Bu?void 0:Bu.doNotTrack,null==Bu?void 0:Bu.msDoNotTrack,Ku.doNotTrack].some((function(e){return Xs(e)}))},Mi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"consent",get:function(){return this._getDnt()?0:this._storedConsent}},{key:"_storageKey",get:function(){var e=this._instance.config,t=e.token,n=e.opt_out_capturing_cookie_prefix;return e.consent_persistence_name||(n?n+t:"__ph_opt_in_out_"+t)}},{key:"_storedConsent",get:function(){var e=this._storage._get(this._storageKey);return Xs(e)?1:Ts(Js,e)?0:-1}},{key:"_storage",get:function(){var e=this._config.opt_out_capturing_persistence_type,t="localStorage"===e?Qd:Gd;if(!this._persistentStore||this._persistentStore!==t){this._persistentStore=t;var n="localStorage"===e?Gd:Qd;n._get(this._storageKey)&&(this._persistentStore._get(this._storageKey)||this.optInOut(Xs(n._get(this._storageKey))),n._remove(this._storageKey,this._config.cross_subdomain_cookie))}return this._persistentStore}}])}(),Zp=el("[Dead Clicks]"),Kp=function(){return!0},Xp=function(e){var t,n=!(null==(t=e.instance.persistence)||!t.get_property(jl)),r=e.instance.config.capture_dead_clicks;return zs(r)?r:!!qs(r)||n},Jp=function(){function e(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabledOrStop()}var t=e.prototype;return t.onRemoteConfig=function(e){var t;"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register(((t={})[jl]=e.captureDeadClicks,t)),this.startIfEnabledOrStop())},t.startIfEnabledOrStop=function(){var e=this;this.isEnabled(this)?this._loadScript((function(){e._start()})):this.stop()},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.initDeadClicksAutocapture&&e(),null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(function(t){t?Zp.error("failed to load script",t):e()}))},t._start=function(){var e;if(Vu){if(!this._lazyLoadedDeadClicksAutocapture&&null!=(e=Ku.__PosthogExtensions__)&&e.initDeadClicksAutocapture){var t=qs(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this._lazyLoadedDeadClicksAutocapture=Ku.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this._lazyLoadedDeadClicksAutocapture.start(Vu),Zp.info("starting...")}}else Zp.error("`document` not found. Cannot start.")},t.stop=function(){this._lazyLoadedDeadClicksAutocapture&&(this._lazyLoadedDeadClicksAutocapture.stop(),this._lazyLoadedDeadClicksAutocapture=void 0,Zp.info("stopping..."))},Mi(e,[{key:"lazyLoadedDeadClicksAutocapture",get:function(){return this._lazyLoadedDeadClicksAutocapture}}])}(),eh=el("[SegmentIntegration]");var th="posthog-js";function nh(e,t){var n=void 0===t?{}:t,r=n.organization,i=n.projectId,o=n.prefix,s=n.severityAllowList,a=void 0===s?["error"]:s,u=n.sendExceptionsToPostHog,l=void 0===u||u;return function(t){var n,s,u,c,d;if("*"!==a&&!a.includes(t.level)||!e.__loaded)return t;t.tags||(t.tags={});var f=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());t.tags["PostHog Person URL"]=f,e.sessionRecordingStarted()&&(t.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var p,h=(null==(n=t.exception)?void 0:n.values)||[],_=h.map((function(e){return Ai({},e,{stacktrace:e.stacktrace?Ai({},e.stacktrace,{type:"raw",frames:(e.stacktrace.frames||[]).map((function(e){return Ai({},e,{platform:"web:javascript"})}))}):void 0})})),v={$exception_message:(null==(s=h[0])?void 0:s.value)||t.message,$exception_type:null==(u=h[0])?void 0:u.type,$exception_level:t.level,$exception_list:_,$sentry_event_id:t.event_id,$sentry_exception:t.exception,$sentry_exception_message:(null==(c=h[0])?void 0:c.value)||t.message,$sentry_exception_type:null==(d=h[0])?void 0:d.type,$sentry_tags:t.tags};return r&&i&&(v.$sentry_url=(o||"https://sentry.io/organizations/")+r+"/issues/?project="+i+"&query="+t.event_id),l&&(null==(p=e.exceptions)||p.sendExceptionEvent(v)),t}}var rh,ih,oh=function(e,t,n,r,i,o){this.name=th,this.setupOnce=function(s){s(nh(e,{organization:t,projectId:n,prefix:r,severityAllowList:i,sendExceptionsToPostHog:null==o||o}))}},sh=function(){function e(e){var t=this;this._onSessionIdChange=function(e,n,r){r&&(r.noSessionId||r.activityTimeout||r.sessionPastMaximumLength)&&(Ju.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:e,changeReason:r}),t._currentPageview=void 0,t._instance.scrollManager.resetContext())},this._instance=e,this._setupSessionRotationHandler()}var t=e.prototype;return t._setupSessionRotationHandler=function(){var e;this._unsubscribeSessionId=null==(e=this._instance.sessionManager)?void 0:e.onSessionId(this._onSessionIdChange)},t.destroy=function(){var e;null==(e=this._unsubscribeSessionId)||e.call(this),this._unsubscribeSessionId=void 0},t.doPageView=function(e,t){var n,r=this._previousPageViewProperties(e,t);return this._currentPageview={pathname:null!==(n=null==ju?void 0:ju.location.pathname)&&void 0!==n?n:"",pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),r},t.doPageLeave=function(e){var t;return this._previousPageViewProperties(e,null==(t=this._currentPageview)?void 0:t.pageViewId)},t.doEvent=function(){var e;return{$pageview_id:null==(e=this._currentPageview)?void 0:e.pageViewId}},t._previousPageViewProperties=function(e,t){var n=this._currentPageview;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var o=i.maxScrollHeight,s=i.lastScrollY,a=i.maxScrollY,u=i.maxContentHeight,l=i.lastContentY,c=i.maxContentY;if(!(Ds(o)||Ds(s)||Ds(a)||Ds(u)||Ds(l)||Ds(c))){o=Math.ceil(o),s=Math.ceil(s),a=Math.ceil(a),u=Math.ceil(u),l=Math.ceil(l),c=Math.ceil(c);var d=o>1?ea(s/o,0,1,Ju):1,f=o>1?ea(a/o,0,1,Ju):1,p=u>1?ea(l/u,0,1,Ju):1,h=u>1?ea(c/u,0,1,Ju):1;r=rl(r,{$prev_pageview_last_scroll:s,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:a,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:c,$prev_pageview_max_content_percentage:h})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r},e}(),ah=((rh={})[Ll]={exposure:"hidden"},rh[Ml]={exposure:"hidden"},rh.__cmpns={exposure:"hidden"},rh[Ol]={exposure:"hidden"},rh[Al]={exposure:"event"},rh[ql]={exposure:"hidden"},rh[$l]={exposure:"event"},rh[Dl]={exposure:"hidden"},rh[Nl]={exposure:"event"},rh[Hl]={exposure:"event"},rh[jl]={exposure:"event"},rh[Ul]={exposure:"hidden"},rh[Bl]={exposure:"event"},rh[Vl]={exposure:"hidden"},rh.$session_recording_enabled_server_side={exposure:"hidden"},rh[Ql]={exposure:"hidden"},rh[Zl]={exposure:"event"},rh.$session_past_minimum_duration={exposure:"event"},rh.$session_recording_url_trigger_activated_session={exposure:"event"},rh.$session_recording_event_trigger_activated_session={exposure:"event"},rh.$debug_first_full_snapshot_timestamp={exposure:"event"},rh[Kl]={exposure:"derived",shouldSkipFromEventProperties:function(e,t){return t()},transformToEventProperties:function(e){if(!qs(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},rh[Xl]={exposure:"event"},rh[Jl]={exposure:"hidden"},rh[ec]={exposure:"hidden"},rh[tc]={exposure:"event"},rh[nc]={exposure:"event"},rh[rc]={exposure:"event"},rh[ic]={exposure:"hidden"},rh[oc]={exposure:"hidden"},rh[sc]={exposure:"hidden"},rh[ac]={exposure:"hidden"},rh[uc]={exposure:"event"},rh[lc]={exposure:"hidden"},rh.$product_tours_activated={exposure:"hidden"},rh.$conversations_widget_session_id={exposure:"event"},rh.$conversations_ticket_id={exposure:"event"},rh.$conversations_widget_state={exposure:"event"},rh.$conversations_user_traits={exposure:"event"},rh[cc]={exposure:"hidden"},rh[dc]={exposure:"hidden"},rh[fc]={exposure:"hidden"},rh[pc]={exposure:"hidden"},rh[hc]={exposure:"hidden"},rh[_c]={exposure:"hidden"},rh[vc]={exposure:"hidden"},rh[gc]={exposure:"hidden"},rh[mc]={exposure:"hidden"},rh[yc]={exposure:"hidden"},rh[bc]={exposure:"hidden"},rh[zl]={exposure:"event"},rh[Wl]={exposure:"event"},rh[Gl]={exposure:"event"},rh[Yl]={exposure:"event"},rh[xc]={exposure:"event"},rh[kc]={exposure:"event"},rh[Ec]={exposure:"event"},rh.$sdk_debug_replay_event_trigger_status={exposure:"event"},rh.$sdk_debug_replay_linked_flag_trigger_status={exposure:"event"},rh.$sdk_debug_replay_matched_recording_trigger_groups={exposure:"event"},rh.$sdk_debug_replay_remote_trigger_matching_config={exposure:"event"},rh.$sdk_debug_replay_trigger_groups_count={exposure:"event"},rh.$sdk_debug_replay_url_trigger_status={exposure:"event"},rh.$session_recording_start_reason={exposure:"event"},rh),uh=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],lh=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],ch=function(){function e(e,t){this._config=e,this.props={},this._campaign_params_saved=!1,this._name=function(e){var t="";return e.token&&(t=e.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),e.persistence_name?"ph_"+e.persistence_name:"ph_"+t+"_posthog"}(e),this._storage=this._buildStorage(e),this.load(),e.debug&&Ju.info("Persistence loaded",e.persistence,Ai({},this.props)),this.update_config(e,e,t),this.save()}var t=e.prototype;return t.isDisabled=function(){return!!this._disabled},t._buildStorage=function(e){-1===lh.indexOf(e.persistence.toLowerCase())&&(Ju.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var t=function(e){void 0===e&&(e=[]);var t=[].concat(Zd,e);return Ai({},Qd,{_parse:function(e){try{var t={};try{t=Gd._parse(e)||{}}catch(e){}var n=rl(t,JSON.parse(Qd._get(e)||"{}"));return Qd._set(e,n),n}catch(e){}return null},_set:function(e,n,r,i,o,s){try{Qd._set(e,n,void 0,void 0,s);var a={};t.forEach((function(e){n[e]&&(a[e]=n[e])})),Object.keys(a).length&&Gd._set(e,a,r,i,o,s)}catch(e){Qd._error(e)}},_remove:function(e,t){try{null==ju||ju.localStorage.removeItem(e),Gd._remove(e,t)}catch(e){Qd._error(e)}}})}(e.cookie_persisted_properties||[]),n=e.persistence.toLowerCase();return"localstorage"===n&&Qd._is_supported()?Qd:"localstorage+cookie"===n&&t._is_supported()?t:"sessionstorage"===n&&ef._is_supported()?ef:"memory"===n?Xd:"cookie"===n?Gd:t._is_supported()?t:Gd},t._isFeatureFlagCacheStale=function(e){var t=null!=e?e:this._config.feature_flag_cache_ttl_ms;if(!t||0>=t)return!1;var n=this.props[pc];return!n||"number"!=typeof n||Date.now()-n>t},t.properties=function(){var e=this,t={};return nl(this.props,(function(n,r){var i=function(e){var t=ah[e];if(t)return t;for(var n=0,r=uh;r.length>n;n++){var i=r[n],o=i[1];if(0===e.indexOf(i[0]))return o}}(r);if("derived"===(null==i?void 0:i.exposure)){if(null!=i.shouldSkipFromEventProperties&&i.shouldSkipFromEventProperties(n,r===Kl?function(){return e._isFeatureFlagCacheStale()}:function(){return!1}))return;i.transformToEventProperties&&rl(t,i.transformToEventProperties(n))}else i&&"event"!==i.exposure||(t[r]=n)})),t},t.load=function(){if(!this._disabled){var e=this._storage._parse(this._name);e&&(this.props=rl({},e))}},t.save=function(){this._disabled||this._storage._set(this._name,this.props,this._expire_days,this._cross_subdomain,this._secure,this._config.debug)},t.remove=function(){this._storage._remove(this._name,!1),this._storage._remove(this._name,!0)},t.clear=function(){this.remove(),this.props={}},t.register_once=function(e,t,n){var r=this;if(qs(e)){Ds(t)&&(t="None"),this._expire_days=Ds(n)?this._default_expiry:n;var i=!1;if(nl(e,(function(e,n){r.props.hasOwnProperty(n)&&r.props[n]!==t||(r._setProp(n,e),i=!0)})),i)return this.save(),!0}return!1},t.register=function(e,t){var n=this;if(qs(e)){this._expire_days=Ds(t)?this._default_expiry:t;var r=!1;if(nl(e,(function(t,i){e.hasOwnProperty(i)&&n.props[i]!==t&&(n._setProp(i,t),r=!0)})),r)return this.save(),!0}return!1},t.unregister=function(e){e in this.props&&(this._deleteProp(e),this.save())},t.update_campaign_params=function(){if(!this._campaign_params_saved){var e=dp(this._config.custom_campaign_params,this._config.mask_personal_data_properties,this._config.custom_personal_data_properties);$s(al(e))||this.register(e),this._campaign_params_saved=!0}},t.update_search_keyword=function(){var e;this.register((e=null==Vu?void 0:Vu.referrer)?pp(e):{})},t.update_referrer_info=function(){var e;this.register_once({$referrer:vp(),$referring_domain:null!=Vu&&Vu.referrer&&(null==(e=Gc(Vu.referrer))?void 0:e.host)||_p},void 0)},t.set_initial_person_info=function(){var e;this.props[gc]||this.props[mc]||this.register_once(((e={})[yc]=gp(this._config.mask_personal_data_properties,this._config.custom_personal_data_properties),e),void 0)},t.get_initial_props=function(){var e=this,t={};nl([mc,gc],(function(n){var r=e.props[n];r&&nl(r,(function(e,n){t["$initial_"+Fs(n)]=e}))}));var n,r,i=this.props[yc];if(i){var o=(n=mp(i),r={},nl(n,(function(e,t){r["$initial_"+Fs(t)]=e})),r);rl(t,o)}return t},t.safe_merge=function(e){return nl(this.props,(function(t,n){n in e||(e[n]=t)})),e},t.update_config=function(e,t,n){if(this._default_expiry=this._expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence||!function(e,t){if(e.length!==t.length)return!1;var n=[].concat(e).sort(),r=[].concat(t).sort();return n.every((function(e,t){return e===r[t]}))}(e.cookie_persisted_properties||[],t.cookie_persisted_properties||[])){var r=this._buildStorage(e),i=this.props;this.clear(),this._storage=r,this.props=i,this.save()}},t.set_disabled=function(e){this._disabled=e,this._disabled?this.remove():this.save()},t.set_cross_subdomain=function(e){e!==this._cross_subdomain&&(this._cross_subdomain=e,this.remove(),this.save())},t.set_secure=function(e){e!==this._secure&&(this._secure=e,this.remove(),this.save())},t.set_event_timer=function(e,t){var n=this.props[Ol]||{};n[e]=t,this._setProp(Ol,n),this.save()},t.remove_event_timer=function(e){var t=this.props[Ol]||{},n=t[e];return Ds(n)||(delete t[e],this._setProp(Ol,t),this.save()),n},t.get_property=function(e){return this.props[e]},t.set_property=function(e,t){this._setProp(e,t),this.save()},t._setProp=function(e,t){this.props[e]=t},t._deleteProp=function(e){delete this.props[e]},e}(),dh=el("[RateLimiter]"),fh=function(){function e(e){var t=this;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=function(e){var n=e.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach((function(e){dh.info((e||"events")+" is quota limited."),t.serverLimits[e]=(new Date).getTime()+6e4}))}catch(e){return void dh.warn('could not rate limit - continuing. Error: "'+(null==e?void 0:e.message)+'"',{text:n})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}var t=e.prototype;return t.clientRateLimitContext=function(e){var t,n,r;void 0===e&&(e=!1);var i=this.captureEventsBurstLimit,o=this.captureEventsPerSecond,s=(new Date).getTime(),a=null!==(t=null==(n=this.instance.persistence)?void 0:n.get_property(vc))&&void 0!==t?t:{tokens:i,last:s};a.tokens+=(s-a.last)/1e3*o,a.last=s,a.tokens>i&&(a.tokens=i);var u=1>a.tokens;return u||e||(a.tokens=Math.max(0,a.tokens-1)),!u||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+o+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,null==(r=this.instance.persistence)||r.set_property(vc,a),{isRateLimited:u,remainingTokens:a.tokens}},t.isServerRateLimited=function(e){var t=this.serverLimits[e||"events"]||!1;return!1!==t&&(new Date).getTime()<t},Mi(e,[{key:"captureEventsPerSecond",get:function(){var e;return(null==(e=this.instance.config.rate_limiting)?void 0:e.events_per_second)||10}},{key:"captureEventsBurstLimit",get:function(){var e;return Math.max((null==(e=this.instance.config.rate_limiting)?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}}])}(),ph=el("[RemoteConfig]"),hh=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadRemoteConfigJs=function(e){var t,n,r=this;null!=(t=Ku.__PosthogExtensions__)&&t.loadExternalDependency?null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"remote-config",(function(){return e(r.remoteConfig)})):e()},t._loadRemoteConfigJSON=function(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:function(t){e(t.json)}})},t.load=function(){var e=this;try{if(this.remoteConfig)return ph.info("Using preloaded remote config",this.remoteConfig),this._onRemoteConfig(this.remoteConfig),void this._startRefreshInterval();if(this._instance._shouldDisableFlags())return void ph.warn("Remote config is disabled. Falling back to local config.");this._loadRemoteConfigJs((function(t){if(!t)return ph.info("No config found after loading remote JS config. Falling back to JSON."),void e._loadRemoteConfigJSON((function(t){e._onRemoteConfig(t),e._startRefreshInterval()}));e._onRemoteConfig(t),e._startRefreshInterval()}))}catch(e){ph.error("Error loading remote config",e)}},t.stop=function(){this._refreshInterval&&(clearInterval(this._refreshInterval),this._refreshInterval=void 0)},t.refresh=function(){!this._instance._shouldDisableFlags()&&Vu&&"hidden"!==Vu.visibilityState&&this._instance.reloadFeatureFlags()},t._startRefreshInterval=function(){var e,t=this;if(!this._refreshInterval){var n=null!==(e=this._instance.config.remote_config_refresh_interval_ms)&&void 0!==e?e:3e5;0!==n&&(this._refreshInterval=setInterval((function(){t.refresh()}),n))}},t._onRemoteConfig=function(e){var t;e||ph.error("Failed to fetch remote config from PostHog."),this._instance._onRemoteConfig(null!=e?e:{}),!1!==(null==e?void 0:e.hasFeatureFlags)&&(this._instance.config.advanced_disable_feature_flags_on_first_load||null==(t=this._instance.featureFlags)||t.ensureFlagsLoaded())},Mi(e,[{key:"remoteConfig",get:function(){var e;return null==(e=Ku._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.config}}])}(),_h=3e3,vh=function(){function e(e,t){this._isPaused=!0,this._queue=[],this._flushTimeoutMs=ea((null==t?void 0:t.flush_interval_ms)||_h,250,5e3,Ju.createLogger("flush interval"),_h),this._sendRequest=e}var t=e.prototype;return t.enqueue=function(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()},t.unload=function(){var e=this;this._clearFlushTimeout();var t=this._queue.length>0?this._formatQueue():{},n=Object.values(t),r=[].concat(n.filter((function(e){return 0===e.url.indexOf("/e")})),n.filter((function(e){return 0!==e.url.indexOf("/e")})));r.map((function(t){e._sendRequest(Ai({},t,{transport:"sendBeacon"}))}))},t.enable=function(){this._isPaused=!1,this._setFlushTimeout()},t._setFlushTimeout=function(){var e=this;this._isPaused||(this._flushTimeout=setTimeout((function(){if(e._clearFlushTimeout(),e._queue.length>0){var t=e._formatQueue(),n=function(){var n=t[r],i=(new Date).getTime();n.data&&Os(n.data)&&nl(n.data,(function(e){e.offset=Math.abs(e.timestamp-i),delete e.timestamp})),e._sendRequest(n)};for(var r in t)n()}}),this._flushTimeoutMs))},t._clearFlushTimeout=function(){clearTimeout(this._flushTimeout),this._flushTimeout=void 0},t._formatQueue=function(){var e={};return nl(this._queue,(function(t){var n,r=t,i=(r?r.batchKey:null)||r.url;Ds(e[i])&&(e[i]=Ai({},r,{data:[]})),null==(n=e[i].data)||n.push(r.data)})),this._queue=[],e},e}(),gh=["retriesPerformedSoFar"],mh=function(){function e(e){var t=this;this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._instance=e,this._queue=[],this._areWeOnline=!0,!Ds(ju)&&"onLine"in ju.navigator&&(this._areWeOnline=ju.navigator.onLine,this._onlineListener=function(){t._areWeOnline=!0,t._flush()},this._offlineListener=function(){t._areWeOnline=!1},cl(ju,"online",this._onlineListener),cl(ju,"offline",this._offlineListener))}var t=e.prototype;return t.retriableRequest=function(e){var t=this,n=e.retriesPerformedSoFar,r=qi(e,gh);Vs(n)&&(r.url=Md(r.url,{retry_count:n})),this._instance._send_request(Ai({},r,{callback:function(e){200===e.statusCode||e.statusCode>=400&&500>e.statusCode||(null!=n?n:0)>=10?null==r.callback||r.callback(e):t._enqueue(Ai({retriesPerformedSoFar:n},r))}}))},t._enqueue=function(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*Math.pow(2,e),n=t/2,r=Math.min(18e5,t),i=Math.random()-.5;return Math.ceil(r+i*(r-n))}(t),r=Date.now()+n;this._queue.push({retryAt:r,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),Ju.warn(i),this._isPolling||(this._isPolling=!0,this._poll())},t._poll=function(){var e=this;if(this._poller&&clearTimeout(this._poller),0===this._queue.length)return this._isPolling=!1,void(this._poller=void 0);this._poller=setTimeout((function(){e._areWeOnline&&e._queue.length>0&&e._flush(),e._poll()}),this._pollIntervalMs)},t._flush=function(){var e=Date.now(),t=[],n=this._queue.filter((function(n){return e>n.retryAt||(t.push(n),!1)}));if(this._queue=t,n.length>0)for(var r,i=Oi(n);!(r=i()).done;)this.retriableRequest(r.value.requestOptions)},t.unload=function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._isPolling=!1,Ds(ju)||(this._onlineListener&&(ju.removeEventListener("online",this._onlineListener),this._onlineListener=void 0),this._offlineListener&&(ju.removeEventListener("offline",this._offlineListener),this._offlineListener=void 0));for(var e,t=Oi(this._queue);!(e=t()).done;){var n=e.value.requestOptions;try{this._instance._send_request(Ai({},n,{transport:"sendBeacon"}))}catch(e){Ju.error(e)}}this._queue=[]},Mi(e,[{key:"length",get:function(){return this._queue.length}}])}(),yh=function(){function e(e){var t=this;this._updateScrollData=function(){var e,n,r,i;t._context||(t._context={});var o=t.scrollElement(),s=t.scrollY(),a=o?Math.max(0,o.scrollHeight-o.clientHeight):0,u=s+((null==o?void 0:o.clientHeight)||0),l=(null==o?void 0:o.scrollHeight)||0;t._context.lastScrollY=Math.ceil(s),t._context.maxScrollY=Math.max(s,null!==(e=t._context.maxScrollY)&&void 0!==e?e:0),t._context.maxScrollHeight=Math.max(a,null!==(n=t._context.maxScrollHeight)&&void 0!==n?n:0),t._context.lastContentY=u,t._context.maxContentY=Math.max(u,null!==(r=t._context.maxContentY)&&void 0!==r?r:0),t._context.maxContentHeight=Math.max(l,null!==(i=t._context.maxContentHeight)&&void 0!==i?i:0)},this._instance=e}var t=e.prototype;return t.getContext=function(){return this._context},t.resetContext=function(){var e=this._context;return setTimeout(this._updateScrollData,0),e},t.startMeasuringScrollPosition=function(){cl(ju,"scroll",this._updateScrollData,{capture:!0}),cl(ju,"scrollend",this._updateScrollData,{capture:!0}),cl(ju,"resize",this._updateScrollData)},t.scrollElement=function(){if(!this._scrollRoot)return null==ju?void 0:ju.document.documentElement;for(var e,t=Oi(Os(this._scrollRoot)?this._scrollRoot:[this._scrollRoot]);!(e=t()).done;){var n=null==ju?void 0:ju.document.querySelector(e.value);if(n)return n}},t.scrollY=function(){if(this._scrollRoot){var e=this.scrollElement();return e&&e.scrollTop||0}return ju&&(ju.scrollY||ju.pageYOffset||ju.document.documentElement.scrollTop)||0},t.scrollX=function(){if(this._scrollRoot){var e=this.scrollElement();return e&&e.scrollLeft||0}return ju&&(ju.scrollX||ju.pageXOffset||ju.document.documentElement.scrollLeft)||0},Mi(e,[{key:"_scrollRoot",get:function(){return this._instance.config.scroll_root_selector}}])}(),bh=function(e){return gp(null==e?void 0:e.config.mask_personal_data_properties,null==e?void 0:e.config.custom_personal_data_properties)},wh=function(){function e(e,t,n,r){var i=this;this._onSessionIdCallback=function(e){var t,n=i._getStored();if(!n||n.sessionId!==e){var r={sessionId:e,props:i._sessionSourceParamGenerator(i._instance)};i._persistence.register(((t={})[_c]=r,t))}},this._instance=e,this._sessionIdManager=t,this._persistence=n,this._sessionSourceParamGenerator=r||bh,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}var t=e.prototype;return t._getStored=function(){return this._persistence.props[_c]},t.getSetOnceProps=function(){var e,t=null==(e=this._getStored())?void 0:e.props;return t?"r"in t?mp(t):{$referring_domain:t.referringDomain,$pathname:t.initialPathName,utm_source:t.utm_source,utm_campaign:t.utm_campaign,utm_medium:t.utm_medium,utm_content:t.utm_content,utm_term:t.utm_term}:{}},t.getSessionProps=function(){var e={};return nl(al(this.getSetOnceProps()),(function(t,n){"$current_url"===n&&(n="url"),e["$session_entry_"+Fs(n)]=t})),e},e}(),Sh=function(){function e(){this._events={}}var t=e.prototype;return t.on=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}))}},t.emit=function(e,t){for(var n,r=Oi(this._events[e]||[]);!(n=r()).done;)(0,n.value)(t);for(var i,o=Oi(this._events["*"]||[]);!(i=o()).done;)(0,i.value)(e,t)},e}(),xh=el("[SessionId]"),kh=function(){function e(e,t,n){var r,i=this;if(this._sessionIdChangedHandlers=[],this._beforeUnloadListener=void 0,this._eventEmitter=new Sh,this._sessionHasBeenIdleTooLong=function(e,t){return!(!Vs(e)||!Vs(t))&&Math.abs(e-t)>i.sessionTimeoutMs},!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode===Tc)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this._config=e.config,this._persistence=e.persistence,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=t||Bc,this._windowIdGenerator=n||Bc;var o=this._config.persistence_name||this._config.token;if(this._sessionTimeoutMs=1e3*ea(this._config.session_idle_timeout_seconds||1800,60,36e3,xh.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this._resetIdleTimer(),this._window_id_storage_key="ph_"+o+"_window_id",this._primary_window_exists_storage_key="ph_"+o+"_primary_window_exists",this._canUseSessionStorage()){var s=ef._parse(this._window_id_storage_key),a=ef._parse(this._primary_window_exists_storage_key);s&&!a?this._windowId=s:ef._remove(this._window_id_storage_key),ef._set(this._primary_window_exists_storage_key,!0)}if(null!=(r=this._config.bootstrap)&&r.sessionID)try{var u=function(e){var t=e.replace(/-/g,"");if(32!==t.length)throw new Error("Not a valid UUID");if("7"!==t[12])throw new Error("Not a UUIDv7");return parseInt(t.substring(0,12),16)}(this._config.bootstrap.sessionID);this._setSessionId(this._config.bootstrap.sessionID,(new Date).getTime(),u)}catch(e){xh.error("Invalid sessionID in bootstrap",e)}this._listenToReloadWindow()}var t=e.prototype;return t.on=function(e,t){return this._eventEmitter.on(e,t)},t.onSessionId=function(e){var t=this;return Ds(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}))}},t._canUseSessionStorage=function(){return"memory"!==this._config.persistence&&!this._persistence._disabled&&ef._is_supported()},t._setWindowId=function(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&ef._set(this._window_id_storage_key,e))},t._getWindowId=function(){return this._windowId?this._windowId:this._canUseSessionStorage()?ef._parse(this._window_id_storage_key):null},t._setSessionId=function(e,t,n){var r;e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this._persistence.register(((r={})[Ql]=[t,e,n],r)))},t._getSessionId=function(){var e=this._persistence.props[Ql];return Os(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]},t.resetSessionId=function(){this._setSessionId(null,null,null)},t.destroy=function(){clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=void 0,this._beforeUnloadListener&&ju&&(ju.removeEventListener(Mc,this._beforeUnloadListener,{capture:!1}),this._beforeUnloadListener=void 0),this._sessionIdChangedHandlers=[]},t._listenToReloadWindow=function(){var e=this;this._beforeUnloadListener=function(){e._canUseSessionStorage()&&ef._remove(e._primary_window_exists_storage_key)},cl(ju,Mc,this._beforeUnloadListener,{capture:!1})},t.checkAndGetSessionAndWindowId=function(e,t){if(void 0===e&&(e=!1),void 0===t&&(t=null),this._config.cookieless_mode===Tc)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=t||(new Date).getTime(),r=this._getSessionId(),i=r[0],o=r[1],s=r[2],a=this._getWindowId(),u=Vs(s)&&Math.abs(n-s)>864e5,l=!1,c=!o,d=!c&&!e&&this._sessionHasBeenIdleTooLong(n,i);c||d||u?(o=this._sessionIdGenerator(),a=this._windowIdGenerator(),xh.info("new session ID generated",{sessionId:o,windowId:a,changeReason:{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}}),s=n,l=!0):a||(a=this._windowIdGenerator(),l=!0);var f=Vs(i)&&e&&!u?i:n,p=Vs(s)?s:(new Date).getTime();return this._setWindowId(a),this._setSessionId(o,f,p),e||this._resetIdleTimer(),l&&this._sessionIdChangedHandlers.forEach((function(e){return e(o,a,l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0)})),{sessionId:o,windowId:a,sessionStartTimestamp:p,changeReason:l?{noSessionId:c,activityTimeout:d,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:i}},t._resetIdleTimer=function(){var e=this;clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=setTimeout((function(){var t=e._getSessionId()[0];if(e._sessionHasBeenIdleTooLong((new Date).getTime(),t)){var n=e._sessionId;e.resetSessionId(),e._eventEmitter.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)},Mi(e,[{key:"sessionTimeoutMs",get:function(){return this._sessionTimeoutMs}}])}(),Eh=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&Ps(n,t))return!0;try{var r=null==e?void 0:e.userAgentData;if(null!=r&&r.brands&&r.brands.some((function(e){return Ps(null==e?void 0:e.brand,t)})))return!0}catch(e){}return!!e.webdriver},Ch="custom",Ph="i.posthog.com",Th=/^\/static\//,Ih=function(){function e(e){this._regionCache={},this.instance=e}var t=e.prototype;return t._staticAssetHostOverride=function(e){var t=this.instance.config.__preview_external_dependency_versioned_paths;if("string"==typeof t&&Th.test(e))return t.trim().replace(/\/$/,"")||void 0},t.endpointFor=function(e,t){if(void 0===t&&(t=""),t&&(t="/"===t[0]?t:"/"+t),"ui"===e)return this.uiHost+t;if("flags"===e)return this.flagsApiHost+t;if("assets"===e){var n=this._staticAssetHostOverride(t);if(n)return""+n+t}if(this.region===Ch)return this.apiHost+t;var r=Ph+t;switch(e){case"assets":return"https://"+this.region+"-assets."+r;case"api":return"https://"+this.region+"."+r}},Mi(e,[{key:"apiHost",get:function(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return"https://app.posthog.com"===e?"https://us.i.posthog.com":e}},{key:"flagsApiHost",get:function(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}},{key:"uiHost",get:function(){var e,t=null==(e=this.instance.config.ui_host)?void 0:e.replace(/\/$/,"");return t||(t=this.apiHost.replace("."+Ph,".posthog.com")),"https://app.posthog.com"===t?"https://us.posthog.com":t}},{key:"region",get:function(){return this._regionCache[this.apiHost]||(this._regionCache[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":Ch),this._regionCache[this.apiHost]}}])}(),Fh=el("[PostHog ExternalIntegrations]"),Lh={intercom:"intercom-integration",crispChat:"crisp-chat-integration"},Rh=function(){function e(e){this._instance=e}var t=e.prototype;return t._loadScript=function(e,t){var n;null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,e,(function(e){if(e)return Fh.error("failed to load script",e);t()}))},t.startIfEnabledOrStop=function(){for(var e=this,t=function(){var t,i,o,s=r[n],a=s[0],u=s[1];!u||null!=(t=Ku.__PosthogExtensions__)&&null!=(t=t.integrations)&&t[a]||e._loadScript(Lh[a],(function(){var t;null==(t=Ku.__PosthogExtensions__)||null==(t=t.integrations)||null==(t=t[a])||t.start(e._instance)})),!u&&null!=(i=Ku.__PosthogExtensions__)&&null!=(i=i.integrations)&&i[a]&&(null==(o=Ku.__PosthogExtensions__)||null==(o=o.integrations)||null==(o=o[a])||o.stop())},n=0,r=Object.entries(null!==(i=this._instance.config.integrations)&&void 0!==i?i:{});r.length>n;n++){var i;t()}},e}(),Mh={},Oh=0,Ah=function(){},qh='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',$h="Surveys module not available",Dh="sanitize_properties is deprecated. Use before_send instead",Nh="Invalid value for property_denylist config: ",Hh="posthog",jh=!Id&&-1===(null==Zu?void 0:Zu.indexOf("MSIE"))&&-1===(null==Zu?void 0:Zu.indexOf("Mozilla")),Uh=function(e){var t;return Ai({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ll(null==Vu?void 0:Vu.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Ah,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:null!=e?e:"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:zu&&Ns(null==zu?void 0:zu.search)&&-1!==zu.search.indexOf("__posthog_debug=true")||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:"https:"===(null==ju||null==(t=ju.location)?void 0:t.protocol),ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:function(e){Ju.error("Bad HTTP status: "+e.statusCode+" "+e.text)},get_device_id:function(e){return e},capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Lc,before_send:void 0,request_queue_config:{flush_interval_ms:_h},error_tracking:{},_onCapture:Ah,__preview_eager_load_replay:!1},function(e){return{rageclick:!e||"2025-11-30">e||{content_ignorelist:!0},capture_pageview:!e||"2025-05-24">e||"history_change",session_recording:e&&e>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:e&&e>="2026-01-30"?"head":"body",internal_or_test_user_hostname:e&&e>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}}(e))},Bh=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],Vh=function(e){for(var t={},n=0,r=Bh;r.length>n;n++){var i=r[n],o=i[0],s=i[1];Ds(e[o])||(t[s]=e[o])}var a=rl({},t,e);return Os(e.property_blacklist)&&(Ds(e.property_denylist)?a.property_denylist=e.property_blacklist:Os(e.property_denylist)?a.property_denylist=[].concat(e.property_blacklist,e.property_denylist):Ju.error(Nh+e.property_denylist)),a},zh=function(){return Mi((function(){this.__forceAllowLocalhost=!1}),[{key:"_forceAllowLocalhost",get:function(){return this.__forceAllowLocalhost},set:function(e){Ju.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}])}(),Wh=function(){function e(){var t,n=this;this.webPerformance=new zh,this._personProcessingSetOncePropertiesSent=!1,this.version=hs.LIB_VERSION,this._internalEventEmitter=new Sh,this._extensions=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=Uh(),this.SentryIntegration=oh,this.sentryIntegration=function(e){return function(e,t){var n=nh(e,t);return{name:th,processEvent:function(e){return n(e)}}}(n,e)},this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this._initialPageviewCaptured=!1,this._visibilityStateListener=null,this._initialPersonProfilesConfig=null,this._cachedPersonProperties=null,this.scrollManager=new yh(this),this.pageViewManager=new sh(this),this.rateLimiter=new fh(this),this.requestRouter=new Ih(this),this.consent=new Qp(this),this.externalIntegrations=new Rh(this);var r=null!==(t=e.__defaultExtensionClasses)&&void 0!==t?t:{};this.featureFlags=r.featureFlags&&new r.featureFlags(this),this.toolbar=r.toolbar&&new r.toolbar(this),this.surveys=r.surveys&&new r.surveys(this),this.conversations=r.conversations&&new r.conversations(this),this.logs=r.logs&&new r.logs(this),this.experiments=r.experiments&&new r.experiments(this),this.exceptions=r.exceptions&&new r.exceptions(this),this.people={set:function(e,t,r){var i,o=Ns(e)?((i={})[e]=t,i):e;n.setPersonProperties(o),null==r||r({})},set_once:function(e,t,r){var i,o=Ns(e)?((i={})[e]=t,i):e;n.setPersonProperties(void 0,o),null==r||r({})}},this.on("eventCaptured",(function(e){return Ju.info('send "'+(null==e?void 0:e.event)+'"',e)}))}var t=e.prototype;return t._replaceExtension=function(e,t){if(e){var n=this._extensions.indexOf(e);-1!==n&&this._extensions.splice(n,1)}return this._extensions.push(t),null==t.initialize||t.initialize(),t},t._inCookielessMode=function(){return this.config.cookieless_mode===Tc||this.config.cookieless_mode===Pc&&this.consent.isRejected()},t.init=function(t,n,r){if(r&&r!==Hh){var i,o=null!==(i=Mh[r])&&void 0!==i?i:new e;return o._init(t,n,r),Mh[r]=o,Mh[Hh][r]=o,o}return this._init(t,n,r)},t._init=function(e,t,n){var r,i,o=this;if(void 0===t&&(t={}),Ds(e)||Hs(e))return Ju.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},t.debug=this._checkLocalStorageForDebug(t.debug),this._originalUserConfig=t,this._triggered_notifs=[],t.person_profiles?this._initialPersonProfilesConfig=t.person_profiles:t.process_person&&(this._initialPersonProfilesConfig=t.process_person),this.set_config(rl({},Uh(t.defaults),Vh(t),{name:n,token:e})),this.config.on_xhr_error&&Ju.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=t.disable_compression?void 0:zc;var s=this._is_persistence_disabled();this.persistence=new ch(this.config,s),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ch(Ai({},this.config,{persistence:"sessionStorage"}),s);var a=Ai({},this.persistence.props),u=Ai({},this.sessionPersistence.props);this.register({$initialization_time:(new Date).toISOString()}),this._requestQueue=new vh((function(e){return o._send_retriable_request(e)}),this.config.request_queue_config),this._retryQueue=new mh(this),this.__request_queue=[];var l=this._inCookielessMode();if(l||(this.sessionManager=new kh(this),this.sessionPropsManager=new wh(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Ju.info("Deferring extension initialization to improve startup performance"),setTimeout((function(){o._initExtensions(l)}),0)):(Ju.info("Initializing extensions synchronously"),this._initExtensions(l)),hs.DEBUG=hs.DEBUG||this.config.debug,hs.DEBUG&&Ju.info("Starting in debug mode",{this:this,config:t,thisC:Ai({},this.config),p:a,s:u}),!this.config.identity_distinct_id||null!=(r=t.bootstrap)&&r.distinctID||(t.bootstrap=Ai({},t.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),void 0!==(null==(i=t.bootstrap)?void 0:i.distinctID)){var c=t.bootstrap.distinctID,d=this.get_distinct_id(),f=this.persistence.get_property(hc);if(t.bootstrap.isIdentifiedID&&null!=d&&d!==c&&f===Ic)this.identify(c);else if(t.bootstrap.isIdentifiedID&&null!=d&&d!==c&&f===Fc)Ju.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var p=this.config.get_device_id(Bc()),h=t.bootstrap.isIdentifiedID?p:c;this.persistence.set_property(hc,t.bootstrap.isIdentifiedID?Fc:Ic),this.register({distinct_id:c,$device_id:h})}}if(l)this.register_once({distinct_id:Sc,$device_id:null},"");else if(!this.get_distinct_id()){var _=this.config.get_device_id(Bc());this.register_once({distinct_id:_,$device_id:_},""),this.persistence.set_property(hc,Ic)}return cl(ju,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),t.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()||Bc()};e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(hc,Fc)),t()},i=n.user();"then"in i&&As(i.then)?i.then(r):r(i)}(e,(function(){n.register(function(e){Promise&&Promise.resolve||eh.warn("This browser does not have Promise support, and can not use the segment integration");var t=function(t,n){if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(eh.info("No userId set, resetting PostHog"),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(eh.info("UserId set, identifying with PostHog"),e.identify(t.event.userId));var r=e.calculateEventProperties(n,t.event.properties);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(e){return t(e,e.event.event)},page:function(e){return t(e,Oc)},identify:function(e){return t(e,qc)},screen:function(e){return t(e,"$screen")}}}(e)).then((function(){t()}))}))}(this,(function(){return o._loaded()})):this._loaded(),As(this.config._onCapture)&&this.config._onCapture!==Ah&&(Ju.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(function(e){return o.config._onCapture(e.event,e)}))),this.config.ip&&Ju.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this},t._initExtensions=function(t){var n,r,i,o,s,a,u,l=this,c=performance.now(),d=Ai({},e.__defaultExtensionClasses,this.config.__extensionClasses),f=[];d.featureFlags&&this._extensions.push(this.featureFlags=null!==(n=this.featureFlags)&&void 0!==n?n:new d.featureFlags(this)),d.exceptions&&this._extensions.push(this.exceptions=null!==(r=this.exceptions)&&void 0!==r?r:new d.exceptions(this)),d.historyAutocapture&&this._extensions.push(this.historyAutocapture=new d.historyAutocapture(this)),d.tracingHeaders&&this._extensions.push(new d.tracingHeaders(this)),d.siteApps&&this._extensions.push(this.siteApps=new d.siteApps(this)),d.sessionRecording&&!t&&this._extensions.push(this.sessionRecording=new d.sessionRecording(this)),this.config.disable_scroll_properties||f.push((function(){l.scrollManager.startMeasuringScrollPosition()})),d.autocapture&&this._extensions.push(this.autocapture=new d.autocapture(this)),d.surveys&&this._extensions.push(this.surveys=null!==(i=this.surveys)&&void 0!==i?i:new d.surveys(this)),d.logs&&this._extensions.push(this.logs=null!==(o=this.logs)&&void 0!==o?o:new d.logs(this)),d.conversations&&this._extensions.push(this.conversations=null!==(s=this.conversations)&&void 0!==s?s:new d.conversations(this)),d.productTours&&this._extensions.push(this.productTours=new d.productTours(this)),d.heatmaps&&this._extensions.push(this.heatmaps=new d.heatmaps(this)),d.webVitalsAutocapture&&this._extensions.push(this.webVitalsAutocapture=new d.webVitalsAutocapture(this)),d.exceptionObserver&&this._extensions.push(this.exceptionObserver=new d.exceptionObserver(this)),d.deadClicksAutocapture&&this._extensions.push(this.deadClicksAutocapture=new d.deadClicksAutocapture(this,Xp)),d.toolbar&&this._extensions.push(this.toolbar=null!==(a=this.toolbar)&&void 0!==a?a:new d.toolbar(this)),d.experiments&&this._extensions.push(this.experiments=null!==(u=this.experiments)&&void 0!==u?u:new d.experiments(this)),this._extensions.forEach((function(e){e.initialize&&f.push((function(){null==e.initialize||e.initialize()}))})),f.push((function(){if(l._pendingRemoteConfig){var e=l._pendingRemoteConfig;l._pendingRemoteConfig=void 0,l._onRemoteConfig(e)}})),this._processInitTaskQueue(f,c)},t._processInitTaskQueue=function(e,t){for(var n,r=this;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-t>=30&&e.length>0)return void setTimeout((function(){r._processInitTaskQueue(e,t)}),0);var i=e.shift();if(i)try{i()}catch(e){Ju.error("Error initializing extension:",e)}}var o=Math.round(performance.now()-t);this.register_for_session(((n={})[xc]=this.config.__preview_deferred_init_extensions?"deferred":"synchronous",n[kc]=o,n)),this.config.__preview_deferred_init_extensions&&Ju.info("PostHog extensions initialized ("+o+"ms)")},t._onRemoteConfig=function(e){var t,n=this;if(!Vu||!Vu.body)return Ju.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((function(){n._onRemoteConfig(e)}),500);this.config.__preview_deferred_init_extensions&&(this._pendingRemoteConfig=e),this._lastRemoteConfig=e,this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=Ts(e.supportedCompression,zc)?zc:Ts(e.supportedCompression,Wc)?Wc:void 0),null!=(t=e.analytics)&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this._initialPersonProfilesConfig?this._initialPersonProfilesConfig:Lc}),this._extensions.forEach((function(t){return null==t.onRemoteConfig?void 0:t.onRemoteConfig(e)}))},t._loaded=function(){var e=this;try{this.config.loaded(this)}catch(e){Ju.critical("`loaded` function failed",e)}if(this._start_queue_if_opted_in(),this.config.internal_or_test_user_hostname&&null!=zu&&zu.hostname){var t=zu.hostname,n=this.config.internal_or_test_user_hostname;("string"==typeof n?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((function(){(e.consent.isOptedIn()||e._inCookielessMode())&&e._captureInitialPageview()}),1),this._remoteConfigLoader=new hh(this),this._remoteConfigLoader.load()},t._start_queue_if_opted_in=function(){var e;this.is_capturing()&&this.config.request_batching&&(null==(e=this._requestQueue)||e.enable())},t._dom_loaded=function(){var e=this;this.is_capturing()&&tl(this.__request_queue,(function(t){return e._send_retriable_request(t)})),this.__request_queue=[],this._start_queue_if_opted_in()},t._handle_unload=function(){var e,t,n,r;null==(e=this.surveys)||e.handlePageUnload(),this.config.request_batching?(this._shouldCapturePageleave()&&this.capture(Ac),null==(t=this.logs)||t.flushLogs("sendBeacon"),null==(n=this._requestQueue)||n.unload(),null==(r=this._retryQueue)||r.unload()):this._shouldCapturePageleave()&&this.capture(Ac,null,{transport:"sendBeacon"})},t._send_request=function(e){var t=this;this.__loaded&&(jh?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Md(e.url,{ip:this.config.ip?1:0}),e.headers=Ai({},this.config.request_headers,e.headers),e.compression="best-available"===e.compression?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,function(e){var t,n,r,i=Ai({},e);i.timeout=i.timeout||6e4,i.url=Dd(i.url,i.compression);var o=null!==(t=i.transport)&&void 0!==t?t:"fetch",s=Nd.filter((function(e){return!i.disableTransport||!e.transport||!i.disableTransport.includes(e.transport)})),a=null!==(n=null==(r=function(e,t){for(var n=0;e.length>n;n++)if(t(e[n]))return e[n]}(s,(function(e){return e.transport===o})))?void 0:r.method)&&void 0!==n?n:s[0].method;if(!a)throw new Error("No available transport method");"sendBeacon"!==o&&i.data&&i.compression===zc&&Qu&&!Ld?$d(i).then((function(e){a(e)})).catch((function(t){if(bs(t))return Ld=!0,void a(Ai({},i,{compression:void 0,url:Dd(e.url,void 0)}));(function(e){if(!e||"object"!=typeof e)return!1;var t="name"in e?String(e.name):"";return bs(e)||t===ms})(t)&&(Ld=!0),a(i)})):a(i)}(Ai({},e,{callback:function(n){t.rateLimiter.checkForLimiting(n),400>n.statusCode||null==t.config.on_request_error||t.config.on_request_error(n),null==e.callback||e.callback(n)}}))))},t._send_retriable_request=function(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)},t._execute_array=function(e){var t=this;Oh++;try{var n,r=[],i=[],o=[];tl(e,(function(e){if(e)if(Os(n=e[0]))o.push(e);else if(As(e))try{e.call(t)}catch(t){Ju.error("Error executing queued PostHog call",e,t)}else Os(e)&&"alias"===n?r.push(e):Os(e)&&-1!==n.indexOf("capture")&&As(t[n])?o.push(e):i.push(e)}));var s=function(e,t){tl(e,(function(e){try{if(Os(e[0])){var n=t;nl(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else t[e[0]].apply(t,e.slice(1))}catch(t){Ju.error("Error executing queued PostHog call",e,t)}}))};s(r,this),s(i,this),s(o,this)}finally{Oh--}},t.push=function(t){if(Oh>0&&Os(t)&&Ns(t[0])){var n=e.prototype[t[0]];As(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])},t.capture=function(e,t,n){var r,i,o,s,a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue){if(this.is_capturing())if(!Ds(e)&&Ns(e)){var u=!this.config.opt_out_useragent_filter&&this._is_bot();if(!u||this.config.__preview_capture_bot_pageviews){var l=null!=n&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(null==l||!l.isRateLimited){null!=t&&t.$current_url&&!Ns(null==t?void 0:t.$current_url)&&(Ju.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),null==t||delete t.$current_url),"$exception"!==e||null!=n&&n._originatedFromCaptureException||Ju.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var c=new Date,d=(null==n?void 0:n.timestamp)||c,f=(null==n?void 0:n.uuid)||Bc(),p={uuid:f,event:e,properties:this.calculateEventProperties(e,t||{},d,f)};e===Oc&&this.config.__preview_capture_bot_pageviews&&u&&(p.event="$bot_pageview",p.properties.$browser_type="bot"),l&&(p.properties.$lib_rate_limit_remaining_tokens=l.remainingTokens),(null==n?void 0:n.$set)&&(p.$set=null==n?void 0:n.$set);var h=this._calculate_set_once_properties(null==n?void 0:n.$set_once,e!==$c,e===qc);if(h&&(p.$set_once=h),null!=n&&n._noTruncate||(i=this.config.properties_string_max_length,o=p,s=function(e){return Ns(e)?e.slice(0,i):e},a=new Set,p=function e(t,n){return t!==Object(t)?s?s(t):t:a.has(t)?void 0:(a.add(t),Os(t)?(r=[],tl(t,(function(t){r.push(e(t))}))):(r={},nl(t,(function(t,n){a.has(t)||(r[n]=e(t,n))}))),r);var r}(o)),p.timestamp=d,Ds(null==n?void 0:n.timestamp)||(p.properties.$event_time_override_provided=!0,p.properties.$event_time_override_system_time=c),e===cs.DISMISSED||e===cs.SENT){var _,v=null==t?void 0:t[ds.SURVEY_ID],g=null==t?void 0:t[ds.SURVEY_ITERATION];Tl({id:v,current_iteration:g}),p.$set=Ai({},p.$set,((_={})[_l({id:v,current_iteration:g},e===cs.SENT?"responded":"dismissed")]=!0,_))}else if(e===cs.SHOWN){var m;p.$set=Ai({},p.$set,((m={})[ds.SURVEY_LAST_SEEN_DATE]=(new Date).toISOString(),m))}if("product tour shown"===e){var y,b=null==t?void 0:t.$product_tour_type;b&&(p.$set=Ai({},p.$set,((y={})["$product_tour_last_seen_date/"+b]=(new Date).toISOString(),y)))}var w=Ai({},p.properties.$set,p.$set);if($s(w)||this.setPersonPropertiesForFlags(w),!Us(this.config.before_send)){var S=this._runBeforeSend(p);if(!S)return;p=S}this._internalEventEmitter.emit("eventCaptured",p);var x={method:"POST",url:null!==(r=null==n?void 0:n._url)&&void 0!==r?r:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:p,compression:"best-available",batchKey:null==n?void 0:n._batchKey,transport:null==n?void 0:n.transport};return!this.config.request_batching||n&&(null==n||!n._batchKey)||null!=n&&n.send_instantly?this._send_retriable_request(x):this._requestQueue.enqueue(x),p}Ju.critical("This capture call is ignored due to client rate limiting.")}}else Ju.error("No event name provided to posthog.capture")}else Ju.uninitializedWarning("posthog.capture")},t._addCaptureHook=function(e){return this.on("eventCaptured",(function(t){return e(t.event,t)}))},t.calculateEventProperties=function(e,t,n,r,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return t;var o=i?void 0:this.persistence.remove_event_timer(e),s=Ai({},t);if(s.token=this.config.token,s.$config_defaults=this.config.defaults,this._inCookielessMode()&&(s.$cookieless_mode=!0),"$snapshot"===e){var a=Ai({},this.persistence.properties(),this.sessionPersistence.properties());return s.distinct_id=a.distinct_id,(!Ns(s.distinct_id)&&!Bs(s.distinct_id)||Hs(s.distinct_id))&&Ju.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),s}var u,l=function(e,t){var n,r,i,o;if(!Zu)return{};var s,a=e?[].concat(ap,t||[]):[],u=function(e){for(var t=0;eu.length>t;t++){var n=eu[t],r=n[1],i=n[0].exec(e),o=i&&(As(r)?r(i,e):r);if(o)return o}return["",""]}(Zu);return rl(al({$os:u[0],$os_version:u[1],$browser:Ka(Zu,navigator.vendor),$device:tu(Zu),$device_type:nu(Zu,{userAgentDataPlatform:null==(n=navigator)||null==(n=n.userAgentData)?void 0:n.platform,maxTouchPoints:null==(r=navigator)?void 0:r.maxTouchPoints,screenWidth:null==ju||null==(i=ju.screen)?void 0:i.width,screenHeight:null==ju||null==(o=ju.screen)?void 0:o.height,devicePixelRatio:null==ju?void 0:ju.devicePixelRatio}),$timezone:yp(),$timezone_offset:bp()}),{$current_url:Qc(null==zu?void 0:zu.href,a,lp),$host:null==zu?void 0:zu.host,$pathname:null==zu?void 0:zu.pathname,$raw_user_agent:Zu.length>1e3?Zu.substring(0,997)+"...":Zu,$browser_version:Ja(Zu,navigator.vendor),$browser_language:hp(),$browser_language_prefix:(s=hp(),"string"==typeof s?s.split("-")[0]:void 0),$screen_height:null==ju?void 0:ju.screen.height,$screen_width:null==ju?void 0:ju.screen.width,$viewport_height:null==ju?void 0:ju.innerHeight,$viewport_width:null==ju?void 0:ju.innerWidth,$lib:hs.LIB_NAME,$lib_version:hs.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var c=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime()),d=c.windowId;s.$session_id=c.sessionId,s.$window_id=d}this.sessionPropsManager&&rl(s,this.sessionPropsManager.getSessionProps());try{var f;this.sessionRecording&&rl(s,this.sessionRecording.sdkDebugProperties),s.$sdk_debug_retry_queue_size=null==(f=this._retryQueue)?void 0:f.length}catch(e){s.$sdk_debug_error_capturing_properties=String(e)}if(this.requestRouter.region===Ch&&(s.$lib_custom_api_host=this.config.api_host),u=e!==Oc||i?e!==Ac||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,r),s=rl(s,u),e===Oc&&Vu&&(s.title=Vu.title),!Ds(o)){var p=n.getTime()-o;s.$duration=parseFloat((p/1e3).toFixed(3))}Zu&&this.config.opt_out_useragent_filter&&(s.$browser_type=this._is_bot()?"bot":"browser"),(s=rl({},l,this.persistence.properties(),this.sessionPersistence.properties(),s)).$is_identified=this._isIdentified(),Os(this.config.property_denylist)?nl(this.config.property_denylist,(function(e){delete s[e]})):Ju.error(Nh+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var h=this.config.sanitize_properties;h&&(Ju.error(Dh),s=h(s,e));var _=this._hasPersonProcessing();return s.$process_person_profile=_,_&&!i&&this._requirePersonProcessing("_calculate_event_properties"),s},t._calculate_set_once_properties=function(e,t,n){var r;if(void 0===t&&(t=!0),void 0===n&&(n=!1),!this.persistence||!this._hasPersonProcessing())return e;if(this._personProcessingSetOncePropertiesSent&&!n)return e;var i=this.persistence.get_initial_props(),o=null==(r=this.sessionPropsManager)?void 0:r.getSetOnceProps(),s=rl({},i,o||{},e||{}),a=this.config.sanitize_properties;return a&&(Ju.error(Dh),s=a(s,"$set_once")),t&&(this._personProcessingSetOncePropertiesSent=!0),$s(s)?void 0:s},t.register=function(e,t){var n;null==(n=this.persistence)||n.register(e,t)},t.register_once=function(e,t,n){var r;null==(r=this.persistence)||r.register_once(e,t,n)},t.register_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.register(e)},t.unregister=function(e){var t;null==(t=this.persistence)||t.unregister(e)},t.unregister_for_session=function(e){var t;null==(t=this.sessionPersistence)||t.unregister(e)},t._register_single=function(e,t){var n;this.register(((n={})[e]=t,n))},t.getFeatureFlag=function(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlag(e,t)},t.getFeatureFlagPayload=function(e){var t;return null==(t=this.featureFlags)?void 0:t.getFeatureFlagPayload(e)},t.getFeatureFlagResult=function(e,t){var n;return null==(n=this.featureFlags)?void 0:n.getFeatureFlagResult(e,t)},t.isFeatureEnabled=function(e,t){var n;return null==(n=this.featureFlags)?void 0:n.isFeatureEnabled(e,t)},t.reloadFeatureFlags=function(){var e;null==(e=this.featureFlags)||e.reloadFeatureFlags()},t.updateFlags=function(e,t,n){var r;null==(r=this.featureFlags)||r.updateFlags(e,t,n)},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){var r;null==(r=this.featureFlags)||r.updateEarlyAccessFeatureEnrollment(e,t,n)},t.getEarlyAccessFeatures=function(e,t,n){var r;return void 0===t&&(t=!1),null==(r=this.featureFlags)?void 0:r.getEarlyAccessFeatures(e,t,n)},t.on=function(e,t){return this._internalEventEmitter.on(e,t)},t.onFeatureFlags=function(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),function(){})},t.onSurveysLoaded=function(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:$h}),function(){})},t.onSessionId=function(e){var t,n;return null!==(t=null==(n=this.sessionManager)?void 0:n.onSessionId(e))&&void 0!==t?t:function(){}},t.getSurveys=function(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getSurveys(e,t):e([],{isLoaded:!1,error:$h})},t.getActiveMatchingSurveys=function(e,t){void 0===t&&(t=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,t):e([],{isLoaded:!1,error:$h})},t.renderSurvey=function(e,t){var n;null==(n=this.surveys)||n.renderSurvey(e,t)},t.displaySurvey=function(e,t){var n;void 0===t&&(t=Fl),null==(n=this.surveys)||n.displaySurvey(e,t)},t.cancelPendingSurvey=function(e){var t;null==(t=this.surveys)||t.cancelPendingSurvey(e)},t.canRenderSurvey=function(e){var t,n;return null!==(t=null==(n=this.surveys)?void 0:n.canRenderSurvey(e))&&void 0!==t?t:{visible:!1,disabledReason:$h}},t.canRenderSurveyAsync=function(e,t){var n,r;return void 0===t&&(t=!1),null!==(n=null==(r=this.surveys)?void 0:r.canRenderSurveyAsync(e,t))&&void 0!==n?n:Promise.resolve({visible:!1,disabledReason:$h})},t._validateIdentifyId=function(e){return!e||Hs(e)?(Ju.critical("Unique user id has not been set in posthog.identify"),!1):e===Sc?(Ju.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(e.toLowerCase())&&!["undefined","null"].includes(e.toLowerCase())||(Ju.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)},t.identify=function(e,t,n){if(!this.__loaded||!this.persistence)return Ju.uninitializedWarning("posthog.identify");if(Bs(e)&&(e=e.toString(),Ju.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this._validateIdentifyId(e)&&this._requirePersonProcessing("posthog.identify")){var r=this.get_distinct_id();this.register({$user_id:e}),this.get_property(Rl)||this.register_once({$had_persisted_distinct_id:!0,$device_id:r},""),e!==r&&e!==this.get_property(Ml)&&(this.unregister(Ml),this.register({distinct_id:e}));var i,o=(this.persistence.get_property(hc)||Ic)===Ic;e!==r&&o?(this.persistence.set_property(hc,Fc),this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!1),this.capture(qc,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this._cachedPersonProperties=jd(e,t,n),null==(i=this.featureFlags)||i.setAnonymousDistinctId(r)):(t||n)&&this.setPersonProperties(t,n),e!==r&&(this.reloadFeatureFlags(),this.unregister(cc))}},t.setPersonProperties=function(e,t){if((e||t)&&this._requirePersonProcessing("posthog.setPersonProperties")){var n=jd(this.get_distinct_id(),e,t);this._cachedPersonProperties!==n?(this.setPersonPropertiesForFlags({$set:e||{},$set_once:t||{}},!0),this.capture("$set",{$set:e||{},$set_once:t||{}}),this._cachedPersonProperties=n):Ju.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}},t.group=function(e,t,n){var r;if(e&&t){var i,o=this.getGroups(),s=o[e]!==t;if(s&&this.resetGroupPropertiesForFlags(e),this.register({$groups:Ai({},o,(r={},r[e]=t,r))}),s||n){var a={$group_type:e,$group_key:t};n&&(a.$group_set=n),this.capture($c,a)}n&&this.setGroupPropertiesForFlags(((i={})[e]=n,i)),s&&!n&&this.reloadFeatureFlags()}else Ju.error("posthog.group requires a group type and group key")},t.resetGroups=function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()},t.setPersonPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0),null==(n=this.featureFlags)||n.setPersonPropertiesForFlags(e,t)},t.resetPersonPropertiesForFlags=function(){var e;null==(e=this.featureFlags)||e.resetPersonPropertiesForFlags()},t.setGroupPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0),this._requirePersonProcessing("posthog.setGroupPropertiesForFlags")&&(null==(n=this.featureFlags)||n.setGroupPropertiesForFlags(e,t))},t.resetGroupPropertiesForFlags=function(e){var t;null==(t=this.featureFlags)||t.resetGroupPropertiesForFlags(e)},t.reset=function(e){var t,n,r,i,o,s,a,u;if(Ju.info("reset"),!this.__loaded)return Ju.uninitializedWarning("posthog.reset");var l,c,d=this.get_property(Rl),f=this.get_property(Vl);if(this.consent.reset(),null==(t=this.persistence)||t.clear(),null==(n=this.sessionPersistence)||n.clear(),Ds(f)||null==(l=this.persistence)||l.register(((c={})[Vl]=f,c)),null==(r=this.surveys)||r.reset(),null==(i=this._remoteConfigLoader)||i.stop(),null==(o=this.featureFlags)||o.reset(),null==(s=this.conversations)||s.reset(),null==(a=this.persistence)||a.set_property(hc,Ic),null==(u=this.sessionManager)||u.resetSessionId(),this._cachedPersonProperties=null,this.config.cookieless_mode===Tc)this.register_once({distinct_id:Sc,$device_id:null},"");else{var p=this.config.get_device_id(Bc());this.register_once({distinct_id:p,$device_id:e?p:d},"")}this.register({$last_posthog_reset:(new Date).toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()},t.setIdentity=function(e,t){var n;this.config.identity_distinct_id=e,this.config.identity_hash=t,this.alias(e),null==(n=this.conversations)||n._onIdentityChanged()},t.clearIdentity=function(){var e;delete this.config.identity_distinct_id,delete this.config.identity_hash,null==(e=this.conversations)||e._onIdentityCleared()},t.get_distinct_id=function(){return this.get_property("distinct_id")},t.getGroups=function(){return this.get_property("$groups")||{}},t.get_session_id=function(){var e,t;return null!==(e=null==(t=this.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0).sessionId)&&void 0!==e?e:""},t.get_session_replay_url=function(e){if(!this.sessionManager)return"";var t=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=t.sessionStartTimestamp,r=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+t.sessionId);if(null!=e&&e.withTimestamp&&n){var i,o=null!==(i=e.timestampLookBack)&&void 0!==i?i:10;if(!n)return r;r+="?t="+Math.max(Math.floor(((new Date).getTime()-n)/1e3)-o,0)}return r},t.alias=function(e,t){return e===this.get_property(Ll)?(Ju.critical("Attempting to create alias for existing People user - aborting."),-2):this._requirePersonProcessing("posthog.alias")?(Ds(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(Ml,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(Ju.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0},t.set_config=function(e){var t=Ai({},this.config);if(qs(e)){var n,r,i,o,s,a,u,l,c,d;rl(this.config,Vh(e));var f=this._is_persistence_disabled();null==(n=this.persistence)||n.update_config(this.config,t,f),this.sessionPersistence="sessionStorage"===this.config.persistence||"memory"===this.config.persistence?this.persistence:new ch(Ai({},this.config,{persistence:"sessionStorage"}),f);var p=this._checkLocalStorageForDebug(this.config.debug);zs(p)&&(this.config.debug=p),zs(this.config.debug)&&(this.config.debug?(hs.DEBUG=!0,Qd._is_supported()&&Qd._set("ph_debug",!0),Ju.info("set_config",{config:e,oldConfig:t,newConfig:Ai({},this.config)})):(hs.DEBUG=!1,Qd._is_supported()&&Qd._remove("ph_debug"))),null==(r=this.exceptionObserver)||r.onConfigChange(),null==(i=this.exceptions)||i.onConfigChange(),null==(o=this.sessionRecording)||o.startIfEnabledOrStop(),null==(s=this.autocapture)||s.startIfEnabled(),null==(a=this.heatmaps)||a.startIfEnabled(),null==(u=this.exceptionObserver)||u.startIfEnabledOrStop(),null==(l=this.deadClicksAutocapture)||l.startIfEnabledOrStop(),null==(c=this.surveys)||c.loadIfEnabled(),this._sync_opt_out_with_persistence(),null==(d=this.externalIntegrations)||d.startIfEnabledOrStop()}},t._overrideSDKInfo=function(e,t){hs.LIB_NAME=e,hs.LIB_VERSION=t},t.startSessionRecording=function(e){var t,n,r,i,o,s=!0===e,a={sampling:s||!(null==e||!e.sampling),linked_flag:s||!(null==e||!e.linked_flag),url_trigger:s||!(null==e||!e.url_trigger),event_trigger:s||!(null==e||!e.event_trigger)};Object.values(a).some(Boolean)&&(null==(t=this.sessionManager)||t.checkAndGetSessionAndWindowId(),a.sampling&&(null==(n=this.sessionRecording)||n.overrideSampling()),a.linked_flag&&(null==(r=this.sessionRecording)||r.overrideLinkedFlag()),a.url_trigger&&(null==(i=this.sessionRecording)||i.overrideTrigger("url")),a.event_trigger&&(null==(o=this.sessionRecording)||o.overrideTrigger("event")));this.set_config({disable_session_recording:!1})},t.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},t.sessionRecordingStarted=function(){var e;return!(null==(e=this.sessionRecording)||!e.started)},t.captureException=function(e,t){if(this.exceptions){var n=new Error("PostHog syntheticException"),r=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(Ai({},r,t))}},t.addExceptionStep=function(e,t){var n;null==(n=this.exceptions)||n.addExceptionStep(e,t)},t.captureLog=function(e){var t;null==(t=this.logs)||t.captureLog(e)},t.startExceptionAutocapture=function(e){this.set_config({capture_exceptions:null==e||e})},t.stopExceptionAutocapture=function(){this.set_config({capture_exceptions:!1})},t.loadToolbar=function(e){var t,n;return null!==(t=null==(n=this.toolbar)?void 0:n.loadToolbar(e))&&void 0!==t&&t},t.get_property=function(e){var t;return null==(t=this.persistence)?void 0:t.props[e]},t.getSessionProperty=function(e){var t;return null==(t=this.sessionPersistence)?void 0:t.props[e]},t.toString=function(){var e,t=null!==(e=this.config.name)&&void 0!==e?e:Hh;return t!==Hh&&(t=Hh+"."+t),t},t._isIdentified=function(){var e,t;return(null==(e=this.persistence)?void 0:e.get_property(hc))===Fc||(null==(t=this.sessionPersistence)?void 0:t.get_property(hc))===Fc},t._hasPersonProcessing=function(){var e,t;return!("never"===this.config.person_profiles||this.config.person_profiles===Lc&&!this._isIdentified()&&$s(this.getGroups())&&(null==(e=this.persistence)||null==(e=e.props)||!e[Ml])&&(null==(t=this.persistence)||null==(t=t.props)||!t[bc]))},t._shouldCapturePageleave=function(){return!0===this.config.capture_pageleave||"if_capture_pageview"===this.config.capture_pageleave&&(!0===this.config.capture_pageview||"history_change"===this.config.capture_pageview)},t.createPersonProfile=function(){this._hasPersonProcessing()||this._requirePersonProcessing("posthog.createPersonProfile")&&this.setPersonProperties({},{})},t.setInternalOrTestUser=function(){this._requirePersonProcessing("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})},t._requirePersonProcessing=function(e){return"never"===this.config.person_profiles?(Ju.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this._register_single(bc,!0),!0)},t._is_persistence_disabled=function(){if("always"===this.config.cookieless_mode)return!0;var e=this.consent.isOptedOut();return this.config.disable_persistence||e&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Pc)},t._sync_opt_out_with_persistence=function(){var e,t,n,r,i=this._is_persistence_disabled();return(null==(e=this.persistence)?void 0:e._disabled)!==i&&(null==(n=this.persistence)||n.set_disabled(i)),(null==(t=this.sessionPersistence)?void 0:t._disabled)!==i&&(null==(r=this.sessionPersistence)||r.set_disabled(i)),i},t.opt_in_capturing=function(t){var n;if(this.config.cookieless_mode!==Tc){if(this._inCookielessMode()){var r,i,o,s,a;this.reset(!0),null==(r=this.sessionManager)||r.destroy(),null==(i=this.pageViewManager)||i.destroy(),this.sessionManager=new kh(this),this.pageViewManager=new sh(this),this.persistence&&(this.sessionPropsManager=new wh(this,this.sessionManager,this.persistence));var u,l=null!==(o=null==(s=this.config.__extensionClasses)?void 0:s.sessionRecording)&&void 0!==o?o:null==(a=e.__defaultExtensionClasses)?void 0:a.sessionRecording;l&&(this.sessionRecording=this._replaceExtension(this.sessionRecording,new l(this)),this._lastRemoteConfig&&(null==(u=this.sessionRecording)||null==u.onRemoteConfig||u.onRemoteConfig(this._lastRemoteConfig)))}var c,d;this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),this._start_queue_if_opted_in(),null==(n=this.sessionRecording)||n.startIfEnabledOrStop(),this.config.cookieless_mode==Pc&&(null==(c=this.surveys)||c.loadIfEnabled()),(Ds(null==t?void 0:t.captureEventName)||null!=t&&t.captureEventName)&&this.capture(null!==(d=null==t?void 0:t.captureEventName)&&void 0!==d?d:"$opt_in",null==t?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._captureInitialPageview()}else Ju.warn(qh)},t.opt_out_capturing=function(){var e,t,n;this.config.cookieless_mode!==Tc?(this.config.cookieless_mode===Pc&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this._sync_opt_out_with_persistence(),this.config.cookieless_mode===Pc&&(this.register({distinct_id:Sc,$device_id:null}),null==(e=this.sessionRecording)||e.stopRecording(),this.sessionRecording=void 0,null==(t=this.sessionManager)||t.destroy(),null==(n=this.pageViewManager)||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this._captureInitialPageview())):Ju.warn(qh)},t.has_opted_in_capturing=function(){return this.consent.isOptedIn()},t.has_opted_out_capturing=function(){return this.consent.isOptedOut()},t.get_explicit_consent_status=function(){var e=this.consent.consent;return 1===e?"granted":0===e?"denied":"pending"},t.is_capturing=function(){return this.config.cookieless_mode===Tc||(this.config.cookieless_mode===Pc?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())},t.clear_opt_in_out_capturing=function(){this.consent.reset(),this._sync_opt_out_with_persistence()},t._is_bot=function(){return Bu?Eh(Bu,this.config.custom_blocked_useragents):void 0},t._captureInitialPageview=function(){Vu&&("visible"===Vu.visibilityState?this._initialPageviewCaptured||(this._initialPageviewCaptured=!0,this.capture(Oc,{title:Vu.title},{send_instantly:!0}),this._visibilityStateListener&&(Vu.removeEventListener(Rc,this._visibilityStateListener),this._visibilityStateListener=null)):this._visibilityStateListener||(this._visibilityStateListener=this._captureInitialPageview.bind(this),cl(Vu,Rc,this._visibilityStateListener)))},t.debug=function(e){!1===e?(null==ju||ju.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(null==ju||ju.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))},t._shouldDisableFlags=function(){var e,t,n,r,i,o,s=this._originalUserConfig||{};return"advanced_disable_flags"in s?!!s.advanced_disable_flags:!1!==this.config.advanced_disable_flags?!!this.config.advanced_disable_flags:!0===this.config.advanced_disable_decide?(Ju.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",!1,r=Ju,i=(t="advanced_disable_flags")in(e=s)&&!Us(e[t]),o=n in e&&!Us(e[n]),i?e[t]:!!o&&(r&&r.warn("Config field '"+n+"' is deprecated. Please use '"+t+"' instead. The old field will be removed in a future major version."),e[n]))},t._runBeforeSend=function(e){if(Us(this.config.before_send))return e;for(var t,n=e,r=Oi(Os(this.config.before_send)?this.config.before_send:[this.config.before_send]);!(t=r()).done;){if(n=(0,t.value)(n),Us(n)){var i="Event '"+e.event+"' was rejected in beforeSend function";return Gs(e.event)?Ju.warn(i+". This can cause unexpected behavior."):Ju.info(i),null}n.properties&&!$s(n.properties)||Ju.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return n},t.getPageViewId=function(){var e;return null==(e=this.pageViewManager._currentPageview)?void 0:e.pageViewId},t.captureTraceFeedback=function(e,t){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:t})},t.captureTraceMetric=function(e,t,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:t,$ai_metric_value:String(n)})},t._checkLocalStorageForDebug=function(e){var t=zs(e)&&!e,n=Qd._is_supported()&&"true"===Qd._get("ph_debug");return!t&&(!!n||e)},Mi(e,[{key:"decideEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}},{key:"flagsEndpointWasHit",get:function(){var e,t;return null!==(e=null==(t=this.featureFlags)?void 0:t.hasLoadedFlags)&&void 0!==e&&e}},{key:"logger",get:function(){var t,n;return null!==(t=null==(n=this.logs)?void 0:n.logger)&&void 0!==t?t:e._noopLogger}}])}();Wh.__defaultExtensionClasses={},Wh._noopLogger={trace:ih=function(){},debug:ih,info:ih,warn:ih,error:ih,fatal:ih},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=sl(e.prototype[t[n]])}(Wh,["identify"]);var Gh=1,Yh=3,Qh=11;function Zh(e){return e instanceof Element&&(e.id===wc||!(null==e.closest||!e.closest(".toolbar-global-fade-container")))}function Kh(e){return!!e&&e.nodeType===Gh}function Xh(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Jh(e){return!!e&&e.nodeType===Yh}function e_(e){return!!e&&e.nodeType===Qh&&Kh(e.host)}function t_(e){return e?Is(e).split(/\s+/):[]}function n_(e){var t=null==ju?void 0:ju.location.href;return!!(t&&e&&e.some((function(e){return t.match(e)})))}function r_(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return t_(t)}function i_(e){return Us(e)?null:Is(e).split(/(\s+)/).filter((function(e){return S_(e)})).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function o_(e){var t="";return h_(e)&&!__(e)&&e.childNodes&&e.childNodes.length&&nl(e.childNodes,(function(e){var n;Jh(e)&&e.textContent&&(t+=null!==(n=i_(e.textContent))&&void 0!==n?n:"")})),Is(t)}function s_(e){return Ds(e.target)?e.srcElement||null:null!=(t=e.target)&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var a_=["a","button","form","input","select","textarea","label"];function u_(e,t){if(Ds(t))return!0;for(var n,r,i=function(){var e=r.value;if(t.some((function(t){return e.matches(t)})))return{v:!0}},o=Oi(e);!(r=o()).done;)if(n=i())return n.v;return!1}function l_(e){var t=e.parentNode;return!(!t||!Kh(t))&&t}var c_=["next","previous","prev",">","<"],d_=[".ph-no-rageclick",".ph-no-capture"];var f_=function(e){return!e||Xh(e,"html")||!Kh(e)},p_=function(e,t){if(!ju||f_(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],i=e;i.parentNode&&!Xh(i,"body");)if(e_(i.parentNode))r.push(i.parentNode.host),i=i.parentNode.host;else{var o=l_(i);if(!o)break;if(t||a_.indexOf(o.tagName.toLowerCase())>-1)n=!0;else{var s=ju.getComputedStyle(o);s&&"pointer"===s.getPropertyValue("cursor")&&(n=!0)}r.push(o),i=o}return{parentIsUsefulElement:n,targetElementList:r}};function h_(e){for(var t=e;t.parentNode&&!Xh(t,"body");t=t.parentNode){var n=r_(t);if(Ts(n,"ph-sensitive")||Ts(n,"ph-no-capture"))return!1}if(Ts(r_(e),"ph-include"))return!0;var r=e.type||"";if(Ns(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!Ns(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 __(e){return!!(Xh(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Xh(e,"select")||Xh(e,"textarea")||"true"===e.getAttribute("contenteditable"))}var v_="(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})",g_=new RegExp("^(?:"+v_+")$"),m_=new RegExp(v_),y_="\\d{3}-?\\d{2}-?\\d{4}",b_=new RegExp("^("+y_+")$"),w_=new RegExp("("+y_+")");function S_(e,t){if(void 0===t&&(t=!0),Us(e))return!1;if(Ns(e)){if(e=Is(e),(t?g_:m_).test((e||"").replace(/[- ]/g,"")))return!1;if((t?b_:w_).test(e))return!1}return!0}function x_(e){var t=o_(e);return S_(t=(t+" "+k_(e)).trim())?t:""}function k_(e){var t="";return e&&e.childNodes&&e.childNodes.length&&nl(e.childNodes,(function(e){var n;if(e&&"span"===(null==(n=e.tagName)?void 0:n.toLowerCase()))try{var r=o_(e);t=(t+" "+r).trim(),e.childNodes&&e.childNodes.length&&(t=(t+" "+k_(e)).trim())}catch(e){Ju.error("[AutoCapture]",e)}})),t}function E_(e){return e.replace(/"|\\"/g,'\\"')}function C_(e){var t=e.attr__class;return t?Os(t)?t:t_(t):void 0}var P_=function(){function e(e){this.disabled=!1===e;var t=qs(e)?e:{};this.thresholdPx=t.threshold_px||30,this.timeoutMs=t.timeout_ms||1e3,this.clickCount=t.click_count||3,this.clicks=[]}return e.prototype.isRageClick=function(e,t,n){if(this.disabled)return!1;var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<this.thresholdPx&&this.timeoutMs>n-r.timestamp){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1},e}(),T_="$copy_autocapture",I_=el("[AutoCapture]");function F_(e,t){return t.length>e?t.slice(0,e)+"...":t}function L_(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Kh(t));return t}function R_(e,t){var n,r,i=t.e,o=t.maskAllElementAttributes,s=t.maskAllText,a=t.elementAttributeIgnoreList,u=t.elementsChainAsString;if(!Kh(e))return{props:{}};for(var l=[e],c=e;c.parentNode&&!Xh(c,"body");)if(e_(c.parentNode))l.push(c.parentNode.host),c=c.parentNode.host;else{if(!Kh(c.parentNode))break;l.push(c.parentNode),c=c.parentNode}var d,f,p=[],h={},_=!1,v=!1;if(nl(l,(function(e){var t=h_(e);if(Xh(e,"a")){var n=e.getAttribute("href");_=t&&!!n&&S_(n)&&n}Ts(r_(e),"ph-no-capture")&&(v=!0),p.push(function(e,t,n,r){var i=e.tagName.toLowerCase(),o={tag_name:i};a_.indexOf(i)>-1&&!n&&(o.$el_text="a"===i.toLowerCase()||"button"===i.toLowerCase()?F_(1024,x_(e)):F_(1024,o_(e)));var s=r_(e);s.length>0&&(o.classes=s.filter((function(e){return""!==e}))),nl(e.attributes,(function(n){var i;if((!__(e)||-1!==["name","id","class","aria-label"].indexOf(n.name))&&(null==r||!r.includes(n.name))&&!t&&S_(n.value)&&(!Ns(i=n.name)||"_ngcontent"!==i.substring(0,10)&&"_nghost"!==i.substring(0,7))){var s=n.value;"class"===n.name&&(s=t_(s).join(" ")),o["attr__"+n.name]=F_(1024,s)}}));for(var a=1,u=1,l=e;l=L_(l);)a++,l.tagName===e.tagName&&u++;return o.nth_child=a,o.nth_of_type=u,o}(e,o,s,a));var r=function(e){if(!h_(e))return{};var t={};return nl(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&&S_(r)&&(t[n]=r)}})),t}(e);rl(h,r)})),v)return{props:{},explicitNoCapture:v};if(s||(p[0].$el_text=Xh(e,"a")||Xh(e,"button")?x_(e):o_(e)),_){var g,m;p[0].attr__href=_;var y=null==(g=Gc(_))?void 0:g.host,b=null==ju||null==(m=ju.location)?void 0:m.host;y&&b&&y!==b&&(d=_)}return{props:rl({$event_type:i.type,$ce_version:1},u?{}:{$elements:p},{$elements_chain:(f=p,function(e){return e.map((function(e){var t,n,r="";if(e.tag_name&&(r+=e.tag_name),e.attr_class){e.attr_class.sort();for(var i,o=Oi(e.attr_class);!(i=o()).done;)r+="."+i.value.replace(/"/g,"")}var s=Ai({},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),a={};return il(s).sort((function(e,t){return e[0].localeCompare(t[0])})).forEach((function(e){var t=e[1];return a[E_(e[0].toString())]=E_(t.toString())})),(r+=":")+il(a).map((function(e){return e[0]+'="'+e[1]+'"'})).join("")})).join(";")}(function(e){return e.map((function(e){var t,n,r={text:null==(t=e.$el_text)?void 0:t.slice(0,400),tag_name:e.tag_name,href:null==(n=e.attr__href)?void 0:n.slice(0,2048),attr_class:C_(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return il(e).filter((function(e){return 0===e[0].indexOf("attr__")})).forEach((function(e){return r.attributes[e[0]]=e[1]})),r}))}(f)))},null!=(n=p[0])&&n.$el_text?{$el_text:null==(r=p[0])?void 0:r.$el_text}:{},d&&"click"===i.type?{$external_click_url:d}:{},h)}}var M_=function(){function e(e){this._initialized=!1,this._isDisabledServerSide=null,this._elementsChainAsString=!1,this.instance=e,this.rageclicks=new P_(e.config.rageclick),this._elementSelectors=null}var t=e.prototype;return t.initialize=function(){this.startIfEnabled()},t._addDomEventHandlers=function(){var e=this;if(this.isBrowserSupported()){if(ju&&Vu){var t=function(t){t=t||(null==ju?void 0:ju.event);try{e._captureEvent(t)}catch(e){I_.error("Failed to capture event",e)}};if(cl(Vu,"submit",t,{capture:!0}),cl(Vu,"change",t,{capture:!0}),cl(Vu,"click",t,{capture:!0}),this._config.capture_copied_text){var n=function(t){t=t||(null==ju?void 0:ju.event);try{e._captureEvent(t,T_)}catch(e){I_.error("Failed to capture copy/cut event",e)}};cl(Vu,"copy",n,{capture:!0}),cl(Vu,"cut",n,{capture:!0})}}}else I_.info("Disabling Automatic Event Collection because this browser is not supported")},t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)},t.onRemoteConfig=function(e){var t;e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register(((t={})[Al]=!!e.autocapture_opt_out,t)),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()},t.setElementSelectors=function(e){this._elementSelectors=e},t.getElementSelectors=function(e){var t,n=[];return null==(t=this._elementSelectors)||t.forEach((function(t){var r=null==Vu?void 0:Vu.querySelectorAll(t);null==r||r.forEach((function(r){e===r&&n.push(t)}))})),n},t._captureEvent=function(e,t){if(void 0===t&&(t="$autocapture"),this.isEnabled){var n,r=s_(e);Jh(r)&&(r=r.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent&&this.instance.config.rageclick&&null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||(new Date).getTime())&&function(e,t){if(!ju||f_(e))return!1;var n,r,i;if(zs(t)?(n=!!t&&d_,r=void 0):(n=null!==(i=null==t?void 0:t.css_selector_ignorelist)&&void 0!==i?i:d_,r=null==t?void 0:t.content_ignorelist),!1===n)return!1;var o=p_(e,!1).targetElementList;return!function(e,t){if(!1===e||Ds(e))return!1;var n;if(!0===e)n=c_;else{if(!Os(e))return!1;if(e.length>10)return Ju.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;n=e.map((function(e){return e.toLowerCase()}))}return t.some((function(e){var t=e.safeText,r=e.ariaLabel;return n.some((function(e){return t.includes(e)||r.includes(e)}))}))}(r,o.map((function(e){var t;return{safeText:o_(e).toLowerCase(),ariaLabel:(null==(t=e.getAttribute("aria-label"))?void 0:t.toLowerCase().trim())||""}})))&&!u_(o,n)}(r,this.instance.config.rageclick)&&this._captureEvent(e,"$rageclick");var i=t===T_;if(r&&function(e,t,n,r,i){var o,s,a,u;if(void 0===n&&(n=void 0),!ju||f_(e))return!1;if(null!=(o=n)&&o.url_allowlist&&!n_(n.url_allowlist))return!1;if(null!=(s=n)&&s.url_ignorelist&&n_(n.url_ignorelist))return!1;if(null!=(a=n)&&a.dom_event_allowlist){var l=n.dom_event_allowlist;if(l&&!l.some((function(e){return t.type===e})))return!1}var c=p_(e,r),d=c.parentIsUsefulElement,f=c.targetElementList;if(!function(e,t){var n=null==t?void 0:t.element_allowlist;if(Ds(n))return!0;for(var r,i,o=function(){var e=i.value;if(n.some((function(t){return e.tagName.toLowerCase()===t})))return{v:!0}},s=Oi(e);!(i=s()).done;)if(r=o())return r.v;return!1}(f,n))return!1;if(!u_(f,null==(u=n)?void 0:u.css_selector_allowlist))return!1;var p=ju.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var h=e.tagName.toLowerCase();switch(h){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 d?(i||["click"]).indexOf(t.type)>=0:(i||["click"]).indexOf(t.type)>=0&&(a_.indexOf(h)>-1||"true"===e.getAttribute("contenteditable"))}}(r,e,this._config,i,i?["copy","cut"]:void 0)){var o=R_(r,{e:e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:this._elementsChainAsString}),s=o.props;if(o.explicitNoCapture)return!1;var a=this.getElementSelectors(r);if(a&&a.length>0&&(s.$element_selectors=a),t===T_){var u,l=i_(null==ju||null==(u=ju.getSelection())?void 0:u.toString()),c=e.type||"clipboard";if(!l)return!1;s.$selected_content=l,s.$copy_type=c}return this.instance.capture(t,s),!0}}},t.isBrowserSupported=function(){return As(null==Vu?void 0:Vu.querySelectorAll)},Mi(e,[{key:"_config",get:function(){var e,t,n=qs(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=null==(e=n.url_allowlist)?void 0:e.map((function(e){return new RegExp(e)})),n.url_ignorelist=null==(t=n.url_ignorelist)?void 0:t.map((function(e){return new RegExp(e)})),n}},{key:"isEnabled",get:function(){var e,t,n=null==(e=this.instance.persistence)?void 0:e.props[Al];if(js(this._isDisabledServerSide)&&!zs(n)&&!this.instance._shouldDisableFlags())return!1;var r=null!==(t=this._isDisabledServerSide)&&void 0!==t?t:!!n;return!!this.instance.config.autocapture&&!r}}])}(),O_=el("[ExceptionAutocapture]"),A_=function(){function e(e){var t,n,r,i=this;this._startCapturing=function(){var e;if(ju&&i.isEnabled&&null!=(e=Ku.__PosthogExtensions__)&&e.errorWrappingFunctions){var t=Ku.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,n=Ku.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,r=Ku.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!i._unwrapOnError&&i._config.capture_unhandled_errors&&(i._unwrapOnError=t(i.captureException.bind(i))),!i._unwrapUnhandledRejection&&i._config.capture_unhandled_rejections&&(i._unwrapUnhandledRejection=n(i.captureException.bind(i))),!i._unwrapConsoleError&&i._config.capture_console_errors&&(i._unwrapConsoleError=r(i.captureException.bind(i)))}catch(e){O_.error("failed to start",e),i._stopCapturing()}}},this._instance=e,this._remoteEnabled=!(null==(t=this._instance.persistence)||!t.props[$l]),this._rateLimiter=new oa({refillRate:null!==(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)&&void 0!==n?n:1,bucketSize:null!==(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)&&void 0!==r?r:10,refillInterval:1e4,_logger:O_}),this._config=this._requiredConfig(),this.startIfEnabledOrStop()}var t=e.prototype;return t._requiredConfig=function(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return qs(e)?t=Ai({},t,e):(Ds(e)?this._remoteEnabled:e)&&(t=Ai({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t},t.startIfEnabledOrStop=function(){this.isEnabled?(O_.info("enabled"),this._stopCapturing(),this._loadScript(this._startCapturing)):this._stopCapturing()},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.errorWrappingFunctions&&e(),null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"exception-autocapture",(function(t){if(t)return O_.error("failed to load script",t);e()}))},t._stopCapturing=function(){var e,t,n;null==(e=this._unwrapOnError)||e.call(this),this._unwrapOnError=void 0,null==(t=this._unwrapUnhandledRejection)||t.call(this),this._unwrapUnhandledRejection=void 0,null==(n=this._unwrapConsoleError)||n.call(this),this._unwrapConsoleError=void 0},t.onRemoteConfig=function(e){var t;"autocaptureExceptions"in e&&(this._remoteEnabled=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register(((t={})[$l]=this._remoteEnabled,t)),this._config=this._requiredConfig(),this.startIfEnabledOrStop())},t.onConfigChange=function(){this._config=this._requiredConfig()},t.captureException=function(e){var t,n,r,i=null!==(t=null==e||null==(n=e.$exception_list)||null==(n=n[0])?void 0:n.type)&&void 0!==t?t:"Exception";this._rateLimiter.consumeRateLimit(i)?O_.info("Skipping exception capture because of client rate limiting.",{exception:i}):null==(r=this._instance.exceptions)||r.sendExceptionEvent(e)},Mi(e,[{key:"isEnabled",get:function(){return this._config.capture_console_errors||this._config.capture_unhandled_errors||this._config.capture_unhandled_rejections}}])}(),q_=function(){function e(e){var t;this._instance=e,this._lastPathname=(null==ju||null==(t=ju.location)?void 0:t.pathname)||""}var t=e.prototype;return t.initialize=function(){this.startIfEnabled()},t.startIfEnabled=function(){this.isEnabled&&(Ju.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())},t.stop=function(){this._popstateListener&&this._popstateListener(),this._popstateListener=void 0,Ju.info("History API monitoring stopped")},t.monitorHistoryChanges=function(){var e,t;if(ju&&ju.history){var n=this;null!=(e=ju.history.pushState)&&e.__posthog_wrapped__||Up(ju.history,"pushState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("pushState")}})),null!=(t=ju.history.replaceState)&&t.__posthog_wrapped__||Up(ju.history,"replaceState",(function(e){return function(t,r,i){e.call(this,t,r,i),n._capturePageview("replaceState")}})),this._setupPopstateListener()}},t._capturePageview=function(e){try{var t,n=null==ju||null==(t=ju.location)?void 0:t.pathname;if(!n)return;n!==this._lastPathname&&this.isEnabled&&this._instance.capture(Oc,{navigation_type:e}),this._lastPathname=n}catch(t){Ju.error("Error capturing "+e+" pageview",t)}},t._setupPopstateListener=function(){var e=this;if(!this._popstateListener){var t=function(){e._capturePageview("popstate")};cl(ju,"popstate",t),this._popstateListener=function(){ju&&ju.removeEventListener("popstate",t)}}},Mi(e,[{key:"isEnabled",get:function(){return"history_change"===this._instance.config.capture_pageview}}])}(),$_=el("[TracingHeaders]"),D_=function(){function e(e){var t=this;this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0,this._startCapturing=function(){var e,n,r=t._getConfiguredHostnames()||[];Ds(t._restoreXHRPatch)&&(null==(e=Ku.__PosthogExtensions__)||null==(e=e.tracingHeadersPatchFns)||e._patchXHR(r,t._instance.get_distinct_id(),t._instance.sessionManager)),Ds(t._restoreFetchPatch)&&(null==(n=Ku.__PosthogExtensions__)||null==(n=n.tracingHeadersPatchFns)||n._patchFetch(r,t._instance.get_distinct_id(),t._instance.sessionManager))},this._instance=e}var t=e.prototype;return t.initialize=function(){this.startIfEnabledOrStop()},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.tracingHeadersPatchFns&&e(),null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"tracing-headers",(function(t){if(t)return $_.error("failed to load script",t);e()}))},t._getConfiguredHostnames=function(){var e;return null!==(e=this._instance.config.addTracingHeaders)&&void 0!==e?e:this._instance.config.__add_tracing_headers},t.startIfEnabledOrStop=function(){var e,t;this._getConfiguredHostnames()?this._loadScript(this._startCapturing):(null==(e=this._restoreXHRPatch)||e.call(this),null==(t=this._restoreFetchPatch)||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)},e}(),N_=el("[Web Vitals]"),H_=9e5,j_=function(){function e(e){var t,n=this;this._enabledServerSide=!1,this._initialized=!1,this._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0},this._flushToCapture=function(){clearTimeout(n._delayedFlushTimer),0!==n._buffer.metrics.length&&(n._instance.capture("$web_vitals",n._buffer.metrics.reduce((function(e,t){var n;return Ai({},e,((n={})["$web_vitals_"+t.name+"_event"]=Ai({},t),n["$web_vitals_"+t.name+"_value"]=t.value,n))}),{})),n._buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this._addToBuffer=function(e){var t;n._buffer=n._buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var r=n._currentURL();if(!Ds(r))if(Us(null==e?void 0:e.name)||Us(null==e?void 0:e.value))N_.error("Invalid metric received",e);else if(!n._maxAllowedValue||n._maxAllowedValue>e.value){n._buffer.url!==r&&(n._flushToCapture(),n._delayedFlushTimer=setTimeout(n._flushToCapture,n.flushToCaptureTimeoutMs)),Ds(n._buffer.url)&&(n._buffer.url=r),n._buffer.firstMetricTimestamp=Ds(n._buffer.firstMetricTimestamp)?Date.now():n._buffer.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0);var i=null==(t=n._instance.sessionManager)?void 0:t.checkAndGetSessionAndWindowId(!0),o=Ai({},e,{$current_url:r,timestamp:Date.now()});Ds(i)||(o.$session_id=i.sessionId,o.$window_id=i.windowId),n._buffer.metrics.push(o),n._buffer.metrics.length===n.allowedMetrics.length&&n._flushToCapture()}else N_.error("Ignoring metric with value >= "+n._maxAllowedValue,e)},this._startCapturing=function(){if(!n._initialized){var e,t,r,i,o=Ku.__PosthogExtensions__;if(!Ds(o)&&!Ds(o.postHogWebVitalsCallbacks)){var s=o.postHogWebVitalsCallbacks;e=s.onLCP,t=s.onCLS,r=s.onFCP,i=s.onINP}e&&t&&r&&i?(n.allowedMetrics.indexOf("LCP")>-1&&e(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("CLS")>-1&&t(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("FCP")>-1&&r(n._addToBuffer.bind(n)),n.allowedMetrics.indexOf("INP")>-1&&i(n._addToBuffer.bind(n)),n._initialized=!0):N_.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this._enabledServerSide=!(null==(t=this._instance.persistence)||!t.props[Hl]),this.startIfEnabled()}var t=e.prototype;return t.startIfEnabled=function(){this.isEnabled&&!this._initialized&&(N_.info("enabled, starting..."),this._loadScript(this._startCapturing))},t.onRemoteConfig=function(e){if("capturePerformance"in e){var t,n,r=qs(e.capturePerformance)&&!!e.capturePerformance.web_vitals,i=qs(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register(((t={})[Hl]=r,t)),this._instance.persistence.register(((n={})[Bl]=i,n))),this._enabledServerSide=r,this.startIfEnabled()}},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.postHogWebVitalsCallbacks?e():null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(function(t){t?N_.error("failed to load script",t):e()}))},t._currentURL=function(){var e=ju?ju.location.href:void 0;if(e){var t=this._instance.config.mask_personal_data_properties?[].concat(ap,this._instance.config.custom_personal_data_properties||[]):[];return Qc(e,t,lp)}N_.error("Could not determine current URL")},Mi(e,[{key:"_perfConfig",get:function(){return this._instance.config.capture_performance}},{key:"allowedMetrics",get:function(){var e,t,n=qs(this._perfConfig)?null==(e=this._perfConfig)?void 0:e.web_vitals_allowed_metrics:void 0;return Us(n)?(null==(t=this._instance.persistence)?void 0:t.props[Bl])||["CLS","FCP","INP","LCP"]:n}},{key:"flushToCaptureTimeoutMs",get:function(){return(qs(this._perfConfig)?this._perfConfig.web_vitals_delayed_flush_ms:void 0)||5e3}},{key:"useAttribution",get:function(){var e=qs(this._perfConfig)?this._perfConfig.web_vitals_attribution:void 0;return null!=e&&e}},{key:"_maxAllowedValue",get:function(){var e=qs(this._perfConfig)&&Bs(this._perfConfig.__web_vitals_max_value)?this._perfConfig.__web_vitals_max_value:H_;return e>0&&6e4>=e?H_:e}},{key:"isEnabled",get:function(){var e=null==zu?void 0:zu.protocol;if("http:"!==e&&"https:"!==e)return N_.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=qs(this._perfConfig)?this._perfConfig.web_vitals:zs(this._perfConfig)?this._perfConfig:void 0;return zs(t)?t:this._enabledServerSide}}])}(),U_="disabled",B_="lazy_loading",V_="awaiting_config",z_="missing_config";el("[SessionRecording]"),el("[SessionRecording]");var W_="[SessionRecording]",G_=el(W_),Y_=function(){function e(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._recordingStatus=U_,this._persistFlagsOnSessionListener=void 0,this._instance=e,!this._instance.sessionManager)throw G_.error("started without valid sessionManager"),new Error(W_+" started without valid sessionManager. This is a bug.");if(this._config.cookieless_mode===Tc)throw new Error(W_+' cannot be used with cookieless_mode="always"')}var t=e.prototype;return t.initialize=function(){this.startIfEnabledOrStop()},t.startIfEnabledOrStop=function(e){var t;if(!this._isRecordingEnabled||null==(t=this._lazyLoadedSessionRecording)||!t.isStarted){var n=!Ds(Object.assign)&&!Ds(Array.from);this._isRecordingEnabled&&n?(this._lazyLoadAndStart(e),G_.info("starting")):(this._recordingStatus=U_,this.stopRecording())}},t._lazyLoadAndStart=function(e){var t,n,r,i=this;this._isRecordingEnabled&&(this._recordingStatus!==V_&&this._recordingStatus!==z_&&(this._recordingStatus=B_),null!=Ku&&null!=(t=Ku.__PosthogExtensions__)&&null!=(t=t.rrweb)&&t.record&&null!=(n=Ku.__PosthogExtensions__)&&n.initSessionRecording?this._onScriptLoaded(e):null==(r=Ku.__PosthogExtensions__)||null==r.loadExternalDependency||r.loadExternalDependency(this._instance,this._scriptName,(function(t){if(t)return G_.error("could not load recorder",t);i._onScriptLoaded(e)})))},t.stopRecording=function(){var e,t;null==(e=this._persistFlagsOnSessionListener)||e.call(this),this._persistFlagsOnSessionListener=void 0,null==(t=this._lazyLoadedSessionRecording)||t.stop()},t._discardRecording=function(){var e,t;null==(e=this._persistFlagsOnSessionListener)||e.call(this),this._persistFlagsOnSessionListener=void 0,null==(t=this._lazyLoadedSessionRecording)||t.discard()},t._resetSampling=function(){var e;null==(e=this._persistence)||e.unregister(Zl)},t._validateSampleRate=function(e,t){if(Us(e))return null;var n,r=Bs(e)?e:parseFloat(e);return"number"!=typeof(n=r)||!Number.isFinite(n)||0>n||n>1?(G_.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r},t._persistRemoteConfig=function(e){var t=this;if(this._persistence){var n,r,i=this._persistence,o=function(){var n,r,o=!1===e.sessionRecording?void 0:e.sessionRecording,s=t._validateSampleRate(null==(n=t._config.session_recording)?void 0:n.sampleRate,"session_recording.sampleRate"),a=t._validateSampleRate(null==o?void 0:o.sampleRate,"remote config sampleRate"),u=null!=s?s:a;Us(u)&&t._resetSampling();var l=null==o?void 0:o.minimumDurationMilliseconds;i.register(((r={})[Vl]=Ai({cache_timestamp:Date.now(),enabled:!!o},o,{networkPayloadCapture:Ai({capturePerformance:e.capturePerformance},null==o?void 0:o.networkPayloadCapture),canvasRecording:{enabled:null==o?void 0:o.recordCanvas,fps:null==o?void 0:o.canvasFps,quality:null==o?void 0:o.canvasQuality},sampleRate:u,minimumDurationMilliseconds:Ds(l)?null:l,endpoint:null==o?void 0:o.endpoint,triggerMatchType:null==o?void 0:o.triggerMatchType,masking:null==o?void 0:o.masking,urlTriggers:null==o?void 0:o.urlTriggers,version:null==o?void 0:o.version,triggerGroups:null==o?void 0:o.triggerGroups}),r))};o(),null==(n=this._persistFlagsOnSessionListener)||n.call(this),this._persistFlagsOnSessionListener=null==(r=this._instance.sessionManager)?void 0:r.onSessionId(o)}},t.onRemoteConfig=function(e){return"sessionRecording"in e?!1===e.sessionRecording?(this._persistRemoteConfig(e),void this._discardRecording()):(this._persistRemoteConfig(e),void this.startIfEnabledOrStop()):(this._recordingStatus===V_&&(this._recordingStatus=z_,G_.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())},t.log=function(e,t){var n;void 0===t&&(t="log"),null!=(n=this._lazyLoadedSessionRecording)&&n.log?this._lazyLoadedSessionRecording.log(e,t):G_.warn("log called before recorder was ready")},t._isRemoteConfigFresh=function(){var e,t,n=this._instance.get_property(Vl);if(!n)return!1;try{t="object"==typeof n?n:JSON.parse(n)}catch(e){return G_.warn("persisted remote config for session recording is invalid and will be ignored",e),!1}var r=null!==(e=t.cache_timestamp)&&void 0!==e?e:Date.now();return 36e5>=Date.now()-r},t._onScriptLoaded=function(e){var t,n,r;if(null==(t=Ku.__PosthogExtensions__)||!t.initSessionRecording)return G_.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session((n={},n[Ec]=!0,n));if(this._lazyLoadedSessionRecording||(this._lazyLoadedSessionRecording=null==(r=Ku.__PosthogExtensions__)?void 0:r.initSessionRecording(this._instance),this._lazyLoadedSessionRecording._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this._isRemoteConfigFresh()){if(this._recordingStatus===z_||this._recordingStatus===V_)return;return this._recordingStatus=V_,G_.info("persisted remote config is stale, requesting fresh config before starting"),void new hh(this._instance).load()}this._recordingStatus=B_,this._lazyLoadedSessionRecording.start(e)},t.onRRwebEmit=function(e){var t;null==(t=this._lazyLoadedSessionRecording)||null==t.onRRwebEmit||t.onRRwebEmit(e)},t.overrideLinkedFlag=function(){var e,t,n;this._lazyLoadedSessionRecording||null==(t=this._persistence)||t.register(((n={})[Wl]=!0,n)),null==(e=this._lazyLoadedSessionRecording)||e.overrideLinkedFlag()},t.overrideSampling=function(){var e,t,n;this._lazyLoadedSessionRecording||null==(t=this._persistence)||t.register(((n={})[zl]=!0,n)),null==(e=this._lazyLoadedSessionRecording)||e.overrideSampling()},t.overrideTrigger=function(e){var t,n,r;this._lazyLoadedSessionRecording||null==(n=this._persistence)||n.register(((r={})["url"===e?Gl:Yl]=!0,r)),null==(t=this._lazyLoadedSessionRecording)||t.overrideTrigger(e)},t.tryAddCustomEvent=function(e,t){var n;return!(null==(n=this._lazyLoadedSessionRecording)||!n.tryAddCustomEvent(e,t))},Mi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"_persistence",get:function(){return this._instance.persistence}},{key:"started",get:function(){var e;return!(null==(e=this._lazyLoadedSessionRecording)||!e.isStarted)}},{key:"status",get:function(){var e,t;return this._recordingStatus===V_||this._recordingStatus===z_?this._recordingStatus:null!==(e=null==(t=this._lazyLoadedSessionRecording)?void 0:t.status)&&void 0!==e?e:this._recordingStatus}},{key:"_isRecordingEnabled",get:function(){var e,t=!(null==(e=this._instance.get_property(Vl))||!e.enabled),n=!this._config.disable_session_recording,r=this._config.disable_session_recording||this._instance.consent.isOptedOut();return ju&&t&&n&&!r}},{key:"_scriptName",get:function(){var e,t,n=null==(e=this._instance)||null==(e=e.persistence)?void 0:e.get_property(Vl);return(null==n||null==(t=n.scriptConfig)?void 0:t.script)||"lazy-recorder"}},{key:"sdkDebugProperties",get:function(){var e;return(null==(e=this._lazyLoadedSessionRecording)?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}}])}(),Q_=el("[Heatmaps]");function Z_(e){return qs(e)&&"clientX"in e&&"clientY"in e&&Bs(e.clientX)&&Bs(e.clientY)}var K_=function(){function e(e){var t;this._enabledServerSide=!1,this._initialized=!1,this._flushInterval=null,this.instance=e,this._enabledServerSide=!(null==(t=this.instance.persistence)||!t.props[ql]),this.rageclicks=new P_(e.config.rageclick)}var t=e.prototype;return t.initialize=function(){this.startIfEnabled()},t.startIfEnabled=function(){if(this.isEnabled){if(this._initialized)return;Q_.info("starting..."),this._setupListeners(),this._onVisibilityChange()}else{var e;clearInterval(null!==(e=this._flushInterval)&&void 0!==e?e:void 0),this._removeListeners(),this.getAndClearBuffer()}},t.onRemoteConfig=function(e){if("heatmaps"in e){var t,n=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register(((t={})[ql]=n,t)),this._enabledServerSide=n,this.startIfEnabled()}},t.getAndClearBuffer=function(){var e=this._buffer;return this._buffer=void 0,e},t._onDeadClick=function(e){this._onClick(e.originalEvent,"deadclick")},t._onVisibilityChange=function(){this._flushInterval&&clearInterval(this._flushInterval),this._flushInterval=function(e){return"visible"===(null==e?void 0:e.visibilityState)}(Vu)?setInterval(this._flush.bind(this),this.flushIntervalMilliseconds):null},t._setupListeners=function(){var e=this;ju&&Vu&&(this._flushHandler=this._flush.bind(this),cl(ju,Mc,this._flushHandler),this._onClickHandler=function(t){return e._onClick(t||(null==ju?void 0:ju.event))},cl(Vu,"click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler=function(t){return e._onMouseMove(t||(null==ju?void 0:ju.event))},cl(Vu,"mousemove",this._onMouseMoveHandler,{capture:!0}),this._deadClicksCapture=new Jp(this.instance,Kp,this._onDeadClick.bind(this)),this._deadClicksCapture.startIfEnabledOrStop(),this._onVisibilityChange_handler=this._onVisibilityChange.bind(this),cl(Vu,Rc,this._onVisibilityChange_handler),this._initialized=!0)},t._removeListeners=function(){var e;ju&&Vu&&(this._flushHandler&&ju.removeEventListener(Mc,this._flushHandler),this._onClickHandler&&Vu.removeEventListener("click",this._onClickHandler,{capture:!0}),this._onMouseMoveHandler&&Vu.removeEventListener("mousemove",this._onMouseMoveHandler,{capture:!0}),this._onVisibilityChange_handler&&Vu.removeEventListener(Rc,this._onVisibilityChange_handler),clearTimeout(this._mouseMoveTimeout),null==(e=this._deadClicksCapture)||e.stop(),this._initialized=!1)},t._getProperties=function(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),o=function(e,t,n){for(var r=e;r&&Kh(r)&&!Xh(r,"body");){if(r===n)return!1;if(Ts(t,null==ju?void 0:ju.getComputedStyle(r).position))return!0;r=l_(r)}return!1}(s_(e),["fixed","sticky"],i);return{x:e.clientX+(o?0:r),y:e.clientY+(o?0:n),target_fixed:o,type:t}},t._onClick=function(e,t){var n;if(void 0===t&&(t="click"),!Zh(e.target)&&Z_(e)){var r=this._getProperties(e,t);null!=(n=this.rageclicks)&&n.isRageClick(e.clientX,e.clientY,(new Date).getTime())&&this._capture(Ai({},r,{type:"rageclick"})),this._capture(r)}},t._onMouseMove=function(e){var t=this;!Zh(e.target)&&Z_(e)&&(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout((function(){t._capture(t._getProperties(e,"mousemove"))}),500))},t._capture=function(e){if(ju){var t=ju.location.href,n=this._config.mask_personal_data_properties?[].concat(ap,this._config.custom_personal_data_properties||[]):[],r=Qc(t,n,lp);this._buffer=this._buffer||{},this._buffer[r]||(this._buffer[r]=[]),this._buffer[r].push(e)}},t._flush=function(){this._buffer&&!$s(this._buffer)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})},Mi(e,[{key:"_config",get:function(){return this.instance.config}},{key:"flushIntervalMilliseconds",get:function(){var e=5e3;return qs(this._config.capture_heatmaps)&&this._config.capture_heatmaps.flush_interval_milliseconds&&(e=this._config.capture_heatmaps.flush_interval_milliseconds),e}},{key:"isEnabled",get:function(){return Us(this._config.capture_heatmaps)?Us(this._config.enable_heatmaps)?this._enabledServerSide:this._config.enable_heatmaps:!1!==this._config.capture_heatmaps}}])}(),X_=el("[Product Tours]"),J_=function(){function e(e){this._productTourManager=null,this._cachedTours=null,this._instance=e}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){var t;"productTours"in e&&(this._persistence&&this._persistence.register(((t={})[Ul]=!!e.productTours,t)),this.loadIfEnabled())},t.loadIfEnabled=function(){var e,t,n=this;this._productTourManager||(e=this._instance).config.disable_product_tours||null==(t=e.persistence)||!t.get_property(Ul)||this._loadScript((function(){return n._startProductTours()}))},t._loadScript=function(e){var t,n;null!=(t=Ku.__PosthogExtensions__)&&t.generateProductTours?e():null==(n=Ku.__PosthogExtensions__)||null==n.loadExternalDependency||n.loadExternalDependency(this._instance,"product-tours",(function(t){t?X_.error("Could not load product tours script",t):e()}))},t._startProductTours=function(){var e;!this._productTourManager&&null!=(e=Ku.__PosthogExtensions__)&&e.generateProductTours&&(this._productTourManager=Ku.__PosthogExtensions__.generateProductTours(this._instance,!0))},t.getProductTours=function(e,t){var n=this;if(void 0===t&&(t=!1),!Os(this._cachedTours)||t){var r=this._persistence;if(r){var i=r.props[lc];if(Os(i)&&!t)return this._cachedTours=i,void e(i,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:function(t){var i=t.statusCode;if(200!==i||!t.json){var o="Product Tours API could not be loaded, status: "+i;return X_.error(o),void e([],{isLoaded:!1,error:o})}var s,a=Os(t.json.product_tours)?t.json.product_tours:[];n._cachedTours=a,r&&r.register(((s={})[lc]=a,s)),e(a,{isLoaded:!0})}})}else e(this._cachedTours,{isLoaded:!0})},t.getActiveProductTours=function(e){Us(this._productTourManager)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this._productTourManager.getActiveProductTours(e)},t.showProductTour=function(e){var t;null==(t=this._productTourManager)||t.showTourById(e)},t.previewTour=function(e){var t=this;this._productTourManager?this._productTourManager.previewTour(e):this._loadScript((function(){var n;t._startProductTours(),null==(n=t._productTourManager)||n.previewTour(e)}))},t.dismissProductTour=function(){var e;null==(e=this._productTourManager)||e.dismissTour("user_clicked_skip")},t.nextStep=function(){var e;null==(e=this._productTourManager)||e.nextStep()},t.previousStep=function(){var e;null==(e=this._productTourManager)||e.previousStep()},t.clearCache=function(){var e;this._cachedTours=null,null==(e=this._persistence)||e.unregister(lc)},t.resetTour=function(e){var t;null==(t=this._productTourManager)||t.resetTour(e)},t.resetAllTours=function(){var e;null==(e=this._productTourManager)||e.resetAllTours()},t.cancelPendingTour=function(e){var t;null==(t=this._productTourManager)||t.cancelPendingTour(e)},Mi(e,[{key:"_persistence",get:function(){return this._instance.persistence}}])}(),ev=["$set_once","$set"],tv=el("[SiteApps]"),nv="Error while initializing PostHog app with config id ",rv=function(){function e(e){this._instance=e,this._bufferedInvocations=[],this.apps={}}var t=e.prototype;return t._eventCollector=function(e,t){if(t){var n=this.globalsForEvent(t);this._bufferedInvocations.push(n),this._bufferedInvocations.length>1e3&&(this._bufferedInvocations=this._bufferedInvocations.slice(10))}},t.initialize=function(){var e=this;if(this.isEnabled){var t=this._instance._addCaptureHook(this._eventCollector.bind(this));this._stopBuffering=function(){t(),e._bufferedInvocations=[],e._stopBuffering=void 0}}},t.globalsForEvent=function(e){var t,n,r,i,o,s,a;if(!e)throw new Error("Event payload is required");for(var u={},l=this._instance.get_property("$groups")||[],c=this._instance.get_property("$stored_group_properties")||{},d=0,f=Object.entries(c);f.length>d;d++){var p=f[d],h=p[0];u[h]={id:l[h],type:h,properties:p[1]}}var _=e.$set_once,v=e.$set;return{event:Ai({},qi(e,ev),{properties:Ai({},e.properties,v?{$set:Ai({},null!==(t=null==(n=e.properties)?void 0:n.$set)&&void 0!==t?t:{},v)}:{},_?{$set_once:Ai({},null!==(r=null==(i=e.properties)?void 0:i.$set_once)&&void 0!==r?r:{},_)}:{}),elements_chain:null!==(o=null==(s=e.properties)?void 0:s.$elements_chain)&&void 0!==o?o:"",distinct_id:null==(a=e.properties)?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}},t.setupSiteApp=function(e){var t=this,n=this.apps[e.id],r=function(){!n.errored&&t._bufferedInvocations.length&&(tv.info("Processing "+t._bufferedInvocations.length+" events for site app with id "+e.id),t._bufferedInvocations.forEach((function(e){return null==n.processEvent?void 0:n.processEvent(e)})),n.processedBuffer=!0),Object.values(t.apps).every((function(e){return e.processedBuffer||e.errored}))&&(null==t._stopBuffering||t._stopBuffering())},i=!1,o=function(t){n.errored=!t,n.loaded=!0,tv.info("Site app with id "+e.id+" "+(t?"loaded":"errored")),i&&r()};try{var s=e.init({posthog:this._instance,callback:function(e){o(e)}}).processEvent;s&&(n.processEvent=s),i=!0}catch(t){tv.error(nv+e.id,t),o(!1)}if(i&&n.loaded)try{r()}catch(t){tv.error("Error while processing buffered events PostHog app with config id "+e.id,t),n.errored=!0}},t._setupSiteApps=function(){for(var e,t=this.siteAppLoaders||[],n=Oi(t);!(e=n()).done;){var r=e.value;this.apps[r.id]={id:r.id,loaded:!1,errored:!1,processedBuffer:!1}}for(var i,o=Oi(t);!(i=o()).done;)this.setupSiteApp(i.value)},t._onCapturedEvent=function(e){if(0!==Object.keys(this.apps).length)for(var t=this.globalsForEvent(e),n=0,r=Object.values(this.apps);r.length>n;n++){var i=r[n];try{null==i.processEvent||i.processEvent(t)}catch(t){tv.error("Error while processing event "+e.event+" for site app "+i.id,t)}}},t.onRemoteConfig=function(e){var t,n,r,i=this;if(null!=(t=this.siteAppLoaders)&&t.length)return this.isEnabled?(this._setupSiteApps(),void this._instance.on("eventCaptured",(function(e){return i._onCapturedEvent(e)}))):void tv.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if(null==(n=this._stopBuffering)||n.call(this),null!=(r=e.siteApps)&&r.length)if(this.isEnabled)for(var o,s=function(){var e,t=o.value,n=t.id,r=t.url;Ku["__$$ph_site_app_"+n]=i._instance,null==(e=Ku.__PosthogExtensions__)||null==e.loadSiteApp||e.loadSiteApp(i._instance,r,(function(e){if(e)return tv.error(nv+n,e)}))},a=Oi(e.siteApps);!(o=a()).done;)s();else tv.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')},Mi(e,[{key:"isEnabled",get:function(){return!!this._instance.config.opt_in_site_apps}},{key:"siteAppLoaders",get:function(){var e;return null==(e=Ku._POSTHOG_REMOTE_CONFIG)||null==(e=e[this._instance.config.token])?void 0:e.siteApps}}])}();function iv(e,t,n){if(Us(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch(e){return!1}default:return!1}}var ov,sv,av=function(){function e(e){var t=this;this._debugEventEmitter=new Sh,this._checkStep=function(e,n){return t._checkStepEvent(e,n)&&t._checkStepUrl(e,n)&&t._checkStepElement(e,n)&&t._checkStepProperties(e,n)},this._checkStepEvent=function(e,t){return null==t||!t.event||(null==e?void 0:e.event)===(null==t?void 0:t.event)},this._instance=e,this._actionEvents=new Set,this._actionRegistry=new Set}var t=e.prototype;return t.init=function(){var e,t,n=this;Ds(null==(e=this._instance)?void 0:e._addCaptureHook)||(null==(t=this._instance)||t._addCaptureHook((function(e,t){n.on(e,t)})))},t.register=function(e){var t,n,r=this;if(!Ds(null==(t=this._instance)?void 0:t._addCaptureHook)&&(e.forEach((function(e){var t,n;null==(t=r._actionRegistry)||t.add(e),null==(n=e.steps)||n.forEach((function(e){var t;null==(t=r._actionEvents)||t.add((null==e?void 0:e.event)||"")}))})),null!=(n=this._instance)&&n.autocapture)){var i,o=new Set;e.forEach((function(e){var t;null==(t=e.steps)||t.forEach((function(e){null!=e&&e.selector&&o.add(null==e?void 0:e.selector)}))})),null==(i=this._instance)||i.autocapture.setElementSelectors(o)}},t.on=function(e,t){var n,r=this;null!=t&&0!=e.length&&(this._actionEvents.has(e)||this._actionEvents.has(null==t?void 0:t.event))&&this._actionRegistry&&(null==(n=this._actionRegistry)?void 0:n.size)>0&&this._actionRegistry.forEach((function(e){r._checkAction(t,e)&&r._debugEventEmitter.emit("actionCaptured",e.name)}))},t._addActionHook=function(e){this.onAction("actionCaptured",(function(t){return e(t)}))},t._checkAction=function(e,t){if(null==(null==t?void 0:t.steps))return!1;for(var n,r=Oi(t.steps);!(n=r()).done;)if(this._checkStep(e,n.value))return!0;return!1},t.onAction=function(e,t){return this._debugEventEmitter.on(e,t)},t._checkStepUrl=function(e,t){if(null!=t&&t.url){var n,r=null==e||null==(n=e.properties)?void 0:n.$current_url;if(!r||"string"!=typeof r)return!1;if(!iv(r,t.url,t.url_matching||"contains"))return!1}return!0},t._checkStepElement=function(e,t){return!!this._checkStepHref(e,t)&&!!this._checkStepText(e,t)&&!!this._checkStepSelector(e,t)},t._checkStepHref=function(e,t){var n;if(null==t||!t.href)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return iv(e.href,t.href,t.href_matching||"exact")}));var i,o=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!o&&iv((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",t.href,t.href_matching||"exact")},t._checkStepText=function(e,t){var n;if(null==t||!t.text)return!0;var r=this._getElementsList(e);if(r.length>0)return r.some((function(e){return iv(e.text,t.text,t.text_matching||"exact")||iv(e.$el_text,t.text,t.text_matching||"exact")}));var i,o,s,a=(null==e||null==(n=e.properties)?void 0:n.$elements_chain)||"";return!!a&&(i=function(e){for(var t,n=[],r=/(?::|")text="(.*?)"/g;!Us(t=r.exec(e));)n.includes(t[1])||n.push(t[1]);return n}(a),o=t.text,s=t.text_matching||"exact",i.some((function(e){return iv(e,o,s)})))},t._checkStepSelector=function(e,t){var n,r;if(null==t||!t.selector)return!0;var i=null==e||null==(n=e.properties)?void 0:n.$element_selectors;if(null!=i&&i.includes(t.selector))return!0;var o=(null==e||null==(r=e.properties)?void 0:r.$elements_chain)||"";if(t.selector_regex&&o)try{return new RegExp(t.selector_regex).test(o)}catch(e){return!1}return!1},t._getElementsList=function(e){var t;return null==(null==e||null==(t=e.properties)?void 0:t.$elements)?[]:null==e?void 0:e.properties.$elements},t._checkStepProperties=function(e,t){return null==t||!t.properties||0===t.properties.length||Vd(t.properties.reduce((function(e,t){var n=Os(t.value)?t.value.map(String):null!=t.value?[String(t.value)]:[];return e[t.key]={values:n,operator:t.operator||"exact"},e}),{}),null==e?void 0:e.properties)},e}(),uv=function(){function e(e){this._instance=e,this._eventToItems=new Map,this._cancelEventToItems=new Map,this._actionToItems=new Map}var t=e.prototype;return t._doesEventMatchFilter=function(e,t){return!!e&&Vd(e.propertyFilters,null==t?void 0:t.properties)},t._buildEventToItemMap=function(e,t){var n=new Map;return e.forEach((function(e){var r;null==(r=e.conditions)||null==(r=r[t])||null==(r=r.values)||r.forEach((function(t){if(null!=t&&t.name){var r=n.get(t.name)||[];r.push(e.id),n.set(t.name,r)}}))})),n},t._getMatchingItems=function(e,t,n){var r=this,i=(n===ts?this._eventToItems:this._cancelEventToItems).get(e),o=[];return this._getItems((function(e){o=e.filter((function(e){return null==i?void 0:i.includes(e.id)}))})),o.filter((function(i){var o,s=null==(o=i.conditions)||null==(o=o[n])||null==(o=o.values)?void 0:o.find((function(t){return t.name===e}));return r._doesEventMatchFilter(s,t)}))},t.register=function(e){var t;Ds(null==(t=this._instance)?void 0:t._addCaptureHook)||(this._setupEventBasedItems(e),this._setupActionBasedItems(e))},t._setupActionBasedItems=function(e){var t=this,n=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.actions)&&(null==(n=e.conditions)||null==(n=n.actions)||null==(n=n.values)?void 0:n.length)>0}));0!==n.length&&(null==this._actionMatcher&&(this._actionMatcher=new av(this._instance),this._actionMatcher.init(),this._actionMatcher._addActionHook((function(e){t.onAction(e)}))),n.forEach((function(e){var n,r,i,o,s;e.conditions&&null!=(n=e.conditions)&&n.actions&&null!=(r=e.conditions)&&null!=(r=r.actions)&&r.values&&(null==(i=e.conditions)||null==(i=i.actions)||null==(i=i.values)?void 0:i.length)>0&&(null==(o=t._actionMatcher)||o.register(e.conditions.actions.values),null==(s=e.conditions)||null==(s=s.actions)||null==(s=s.values)||s.forEach((function(n){if(n&&n.name){var r=t._actionToItems.get(n.name);r&&r.push(e.id),t._actionToItems.set(n.name,r||[e.id])}})))})))},t._setupEventBasedItems=function(e){var t,n=this,r=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.events)&&(null==(n=e.conditions)||null==(n=n.events)||null==(n=n.values)?void 0:n.length)>0})),i=e.filter((function(e){var t,n;return(null==(t=e.conditions)?void 0:t.cancelEvents)&&(null==(n=e.conditions)||null==(n=n.cancelEvents)||null==(n=n.values)?void 0:n.length)>0}));0===r.length&&0===i.length||(null==(t=this._instance)||t._addCaptureHook((function(e,t){n.onEvent(e,t)})),this._eventToItems=this._buildEventToItemMap(e,ts),this._cancelEventToItems=this._buildEventToItemMap(e,ns))},t.onEvent=function(e,t){var n,r=this,i=this._getLogger(),o=this._getActivatedKey(),s=this._getShownEventName(),a=(null==(n=this._instance)||null==(n=n.persistence)?void 0:n.props[o])||[];if(s===e&&t&&a.length>0){var u,l;i.info("event matched, removing item from activated items",{event:e,eventPayload:t,existingActivatedItems:a});var c=(null==t||null==(u=t.properties)?void 0:u.$survey_id)||(null==t||null==(l=t.properties)?void 0:l.$product_tour_id);if(c){var d=a.indexOf(c);0>d||(a.splice(d,1),this._updateActivatedItems(a))}}else{if(this._cancelEventToItems.has(e)){var f=this._getMatchingItems(e,t,ns);f.length>0&&(i.info("cancel event matched, cancelling items",{event:e,itemsToCancel:f.map((function(e){return e.id}))}),f.forEach((function(e){var t=a.indexOf(e.id);0>t||a.splice(t,1),r._cancelPendingItem(e.id)})),this._updateActivatedItems(a))}if(this._eventToItems.has(e)){i.info("event name matched",{event:e,eventPayload:t,items:this._eventToItems.get(e)});var p=this._getMatchingItems(e,t,ts);this._updateActivatedItems(a.concat(p.map((function(e){return e.id}))||[]))}}},t.onAction=function(e){var t,n=this._getActivatedKey(),r=(null==(t=this._instance)||null==(t=t.persistence)?void 0:t.props[n])||[];this._actionToItems.has(e)&&this._updateActivatedItems(r.concat(this._actionToItems.get(e)||[]))},t._updateActivatedItems=function(e){var t=this,n=this._getLogger(),r=[].concat(new Set(e)).filter((function(e){return!t._isItemPermanentlyIneligible(e)}));n.info("updating activated items",{activatedItems:r}),this._setActivatedItems(r)},t.getActivatedIds=function(){var e,t=this._getActivatedKey();return(null==(e=this._instance)||null==(e=e.persistence)?void 0:e.props[t])||[]},t.getEventToItemsMap=function(){return this._eventToItems},t._getActionMatcher=function(){return this._actionMatcher},e}(),lv=function(e){function t(t){return e.call(this,t)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ni(e,t)}(t,e);var n=t.prototype;return n._getActivatedKey=function(){return uc},n._getShownEventName=function(){return cs.SHOWN},n._getItems=function(e){var t;null==(t=this._instance)||t.getSurveys(e)},n._cancelPendingItem=function(e){var t;null==(t=this._instance)||t.cancelPendingSurvey(e)},n._getLogger=function(){return bl},n._setActivatedItems=function(e){var t,n;null==(t=this._instance)||null==(t=t.persistence)||t.register(((n={})[uc]=e,n))},n._isItemPermanentlyIneligible=function(){return!1},n.getSurveys=function(){return this.getActivatedIds()},n.getEventToSurveys=function(){return this.getEventToItemsMap()},t}(uv),cv="SDK is not enabled or survey functionality is not yet loaded",dv="Disabled. Not loading surveys.",fv=function(){function e(e){this._isSurveysEnabled=void 0,this._surveyManager=null,this._isInitializingSurveys=!1,this._surveyCallbacks=[],this._getSurveysInFlightPromise=null,this._instance=e,this._surveyEventReceiver=null}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){if(!this._config.disable_surveys){var t=e.surveys;if(Us(t))return bl.warn("Flags not loaded yet. Not loading surveys.");var n=Os(t);this._isSurveysEnabled=n?t.length>0:t,bl.info("flags response received, isSurveysEnabled: "+this._isSurveysEnabled),this.loadIfEnabled()}},t.reset=function(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(null!=n&&n.startsWith(kl)||null!=n&&n.startsWith(El))&&e.push(n)}e.forEach((function(e){return localStorage.removeItem(e)}))},t.loadIfEnabled=function(){var e=this;if(!this._surveyManager)if(this._isInitializingSurveys)bl.info("Already initializing surveys, skipping...");else if(this._config.disable_surveys)bl.info(dv);else if(this._config.cookieless_mode&&this._instance.consent.isOptedOut())bl.info("Not loading surveys in cookieless mode without consent.");else{var t=null==Ku?void 0:Ku.__PosthogExtensions__;if(t){if(!Ds(this._isSurveysEnabled)||this._config.advanced_enable_surveys){var n=this._isSurveysEnabled||this._config.advanced_enable_surveys;this._isInitializingSurveys=!0;try{var r=t.generateSurveys;if(r)return void this._completeSurveyInitialization(r,n);var i=t.loadExternalDependency;if(!i)return void this._handleSurveyLoadError(Cc);i(this._instance,"surveys",(function(r){r||!t.generateSurveys?e._handleSurveyLoadError("Could not load surveys script",r):e._completeSurveyInitialization(t.generateSurveys,n)}))}catch(e){throw this._handleSurveyLoadError("Error initializing surveys",e),e}finally{this._isInitializingSurveys=!1}}}else bl.error("PostHog Extensions not found.")}},t._completeSurveyInitialization=function(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new lv(this._instance),bl.info("Surveys loaded successfully"),this._notifySurveyCallbacks({isLoaded:!0})},t._handleSurveyLoadError=function(e,t){bl.error(e,t),this._notifySurveyCallbacks({isLoaded:!1,error:e})},t.onSurveysLoaded=function(e){var t=this;return this._surveyCallbacks.push(e),this._surveyManager&&this._notifySurveyCallbacks({isLoaded:!0}),function(){t._surveyCallbacks=t._surveyCallbacks.filter((function(t){return t!==e}))}},t.getSurveys=function(e,t){var n=this;if(void 0===t&&(t=!1),this._config.disable_surveys)return bl.info(dv),e([]);var r,i=this._instance.get_property(ac);if(i&&!t)return e(i,{isLoaded:!0});"undefined"!=typeof Promise&&this._getSurveysInFlightPromise?this._getSurveysInFlightPromise.then((function(t){return e(t.surveys,t.context)})):("undefined"!=typeof Promise&&(this._getSurveysInFlightPromise=new Promise((function(e){r=e}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._config.token),method:"GET",timeout:this._config.surveys_request_timeout_ms,callback:function(t){var i,o;n._getSurveysInFlightPromise=null;var s=t.statusCode;if(200!==s||!t.json){var a="Surveys API could not be loaded, status: "+s;bl.error(a);var u={isLoaded:!1,error:a};return e([],u),void(null==r||r({surveys:[],context:u}))}var l,c=t.json.surveys||[],d=c.filter((function(e){return wl(e)&&(Sl(e)||xl(e))}));d.length>0&&(null==(l=n._surveyEventReceiver)||l.register(d)),null==(i=n._instance.persistence)||i.register(((o={})[ac]=c,o));var f={isLoaded:!0};e(c,f),null==r||r({surveys:c,context:f})}}))},t._notifySurveyCallbacks=function(e){for(var t,n=Oi(this._surveyCallbacks);!(t=n()).done;){var r=t.value;try{if(!e.isLoaded)return r([],e);this.getSurveys(r)}catch(e){bl.error("Error in survey callback",e)}}},t.getActiveMatchingSurveys=function(e,t){if(void 0===t&&(t=!1),!Us(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);bl.warn("init was not called")},t._getSurveyById=function(e){var t=null;return this.getSurveys((function(n){var r;t=null!==(r=n.find((function(t){return t.id===e})))&&void 0!==r?r:null})),t},t._checkSurveyEligibility=function(e){if(Us(this._surveyManager))return{eligible:!1,reason:cv};var t="string"==typeof e?this._getSurveyById(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}},t.canRenderSurvey=function(e){if(Us(this._surveyManager))return bl.warn("init was not called"),{visible:!1,disabledReason:cv};var t=this._checkSurveyEligibility(e);return{visible:t.eligible,disabledReason:t.reason}},t.canRenderSurveyAsync=function(e,t){var n=this;return Us(this._surveyManager)?(bl.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:cv})):new Promise((function(r){n.getSurveys((function(t){var i,o=null!==(i=t.find((function(t){return t.id===e})))&&void 0!==i?i:null;if(o){var s=n._checkSurveyEligibility(o);r({visible:s.eligible,disabledReason:s.reason})}else r({visible:!1,disabledReason:"Survey not found"})}),t)}))},t.renderSurvey=function(e,t,n){var r,i=this;if(Us(this._surveyManager))bl.warn("init was not called");else{var o="string"==typeof e?this._getSurveyById(e):e;if(null!=o&&o.id)if(Il.includes(o.type)){var s=null==Vu?void 0:Vu.querySelector(t);if(s)return null!=(r=o.appearance)&&r.surveyPopupDelaySeconds?(bl.info("Rendering survey "+o.id+" with delay of "+o.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((function(){var e,t;bl.info("Rendering survey "+o.id+" with delay of "+(null==(e=o.appearance)?void 0:e.surveyPopupDelaySeconds)+" seconds"),null==(t=i._surveyManager)||t.renderSurvey(o,s,n),bl.info("Survey "+o.id+" rendered")}),1e3*o.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(o,s,n);bl.warn("Survey element not found")}else bl.warn("Surveys of type "+o.type+" cannot be rendered in the app");else bl.warn("Survey not found")}},t.displaySurvey=function(e,t){var n;if(Us(this._surveyManager))bl.warn("init was not called");else{var r=this._getSurveyById(e);if(r){var i=r;if(null!=(n=r.appearance)&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(i=Ai({},r,{appearance:Ai({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==fs&&t.initialResponses&&bl.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),!1===t.ignoreConditions){var o=this.canRenderSurvey(r);if(!o.visible)return void bl.warn("Survey is not eligible to be displayed: ",o.disabledReason)}"inline"!==t.displayType?this._surveyManager.handlePopoverSurvey(i,t):this.renderSurvey(i,t.selector,t.properties)}else bl.warn("Survey not found")}},t.cancelPendingSurvey=function(e){Us(this._surveyManager)?bl.warn("init was not called"):this._surveyManager.cancelSurvey(e)},t.handlePageUnload=function(){var e;null==(e=this._surveyManager)||e.handlePageUnload()},Mi(e,[{key:"_config",get:function(){return this._instance.config}}])}(),pv=null!=ju&&ju.location?Zc(ju.location.hash,"__posthog")||Zc(location.hash,"state"):null,hv="_postHogToolbarParams",_v=el("[Toolbar]"),vv=function(){function e(e){this.instance=e}var t=e.prototype;return t._setToolbarState=function(e){Ku.ph_toolbar_state=e},t._getToolbarState=function(){var e;return null!==(e=Ku.ph_toolbar_state)&&void 0!==e?e:0},t.initialize=function(){return this.maybeLoadToolbar()},t.maybeLoadToolbar=function(e,t,n){if(void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),dl(this.instance.config))return!1;if(!ju||!Vu)return!1;e=null!=e?e:ju.location,n=null!=n?n:ju.history;try{if(!t){try{ju.localStorage.setItem("test","test"),ju.localStorage.removeItem("test")}catch(e){return!1}t=null==ju?void 0:ju.localStorage}var r,i=pv||Zc(e.hash,"__posthog")||Zc(e.hash,"state"),o=i?ol((function(){return JSON.parse(atob(decodeURIComponent(i)))}))||ol((function(){return JSON.parse(decodeURIComponent(i))})):null;return o&&"ph_authorize"===o.action?((r=o).source="url",r&&Object.keys(r).length>0&&(o.desiredHash?e.hash=o.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(hv)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch(e){return!1}},t._callLoadToolbar=function(e){var t=Ku.ph_load_toolbar||Ku.ph_load_editor;!Us(t)&&As(t)?t(e,this.instance):_v.warn("No toolbar load function found")},t.loadToolbar=function(e){var t=this,n=!(null==Vu||!Vu.getElementById(wc));if(!ju||n)return!1;var r="custom"===this.instance.requestRouter.region&&this.instance.config.advanced_disable_toolbar_metrics,i=Ai({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(ju.localStorage.setItem(hv,JSON.stringify(Ai({},i,{source:void 0}))),2===this._getToolbarState())this._callLoadToolbar(i);else if(0===this._getToolbarState()){var o;this._setToolbarState(1),null==(o=Ku.__PosthogExtensions__)||null==o.loadExternalDependency||o.loadExternalDependency(this.instance,"toolbar",(function(e){if(e)return _v.error("[Toolbar] Failed to load",e),void t._setToolbarState(0);t._setToolbarState(2),t._callLoadToolbar(i)})),cl(ju,"turbolinks:load",(function(){t._setToolbarState(0),t.loadToolbar(i)}))}return!0},t._loadEditor=function(e){return this.loadToolbar(e)},t.maybeLoadEditor=function(e,t,n){return void 0===e&&(e=void 0),void 0===t&&(t=void 0),void 0===n&&(n=void 0),this.maybeLoadToolbar(e,t,n)},e}(),gv=el("[FeatureFlags]"),mv=el("[FeatureFlags]",{debugEnabled:!0}),yv="\" failed. Feature flags didn't load in time.",bv=function(e){for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},wv=function(e){for(var t,n={},r=Oi(il(e||{}));!(t=r()).done;){var i=t.value,o=i[1];o&&(n[i[0]]=o)}return n},Sv=function(){function e(e){this._override_warning=!1,this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsLoadedFromRemote=!1,this._hasLoggedDeprecationWarning=!1,this._staleCacheRefreshTriggered=!1,this._instance=e,this.featureFlagEventHandlers=[]}var t=e.prototype;return t._prop=function(e){return this._instance.get_property(e)},t._isCacheStale=function(){var e,t;return null!==(e=null==(t=this._persistence)?void 0:t._isFeatureFlagCacheStale(this._config.feature_flag_cache_ttl_ms))&&void 0!==e&&e},t._checkAndTriggerStaleRefresh=function(){return!!this._isCacheStale()&&(this._staleCacheRefreshTriggered||this._requestInFlight||(this._staleCacheRefreshTriggered=!0,gv.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)},t._getValidEvaluationEnvironments=function(){var e,t=null!==(e=this._config.evaluation_contexts)&&void 0!==e?e:this._config.evaluation_environments;return!this._config.evaluation_environments||this._config.evaluation_contexts||this._hasLoggedDeprecationWarning||(gv.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this._hasLoggedDeprecationWarning=!0),null!=t&&t.length?t.filter((function(e){var t=e&&"string"==typeof e&&e.trim().length>0;return t||gv.error("Invalid evaluation context found:",e,"Expected non-empty string"),t})):[]},t._shouldIncludeEvaluationEnvironments=function(){return this._getValidEvaluationEnvironments().length>0},t._getValidFlagKeys=function(){var e=this._config.flag_keys;if(!Ds(e)){if(Os(e))return e.filter((function(e){var t=e&&"string"==typeof e&&e.trim().length>0;return t||gv.error("Invalid flag key found:",e,"Expected non-empty string"),t}));gv.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}},t.initialize=function(){var e,t,n=this._instance.config,r=null!==(e=null==(t=n.bootstrap)?void 0:t.featureFlags)&&void 0!==e?e:{};if(Object.keys(r).length){var i,o,s=null!==(i=null==(o=n.bootstrap)?void 0:o.featureFlagPayloads)&&void 0!==i?i:{},a=Object.keys(r).filter((function(e){return!!r[e]})).reduce((function(e,t){return e[t]=r[t]||!1,e}),{}),u=Object.keys(s).filter((function(e){return a[e]})).reduce((function(e,t){return s[t]&&(e[t]=s[t]),e}),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:u})}},t.updateFlags=function(e,t,n){for(var r=null!=n&&n.merge?this.getFlagVariants():{},i=null!=n&&n.merge?this.getFlagPayloads():{},o=Ai({},r,e),s=Ai({},i,t),a={},u=0,l=Object.entries(o);l.length>u;u++){var c=l[u],d=c[0],f=c[1],p="string"==typeof f;a[d]={key:d,enabled:!!p||Boolean(f),variant:p?f:void 0,reason:void 0,metadata:Ds(null==s?void 0:s[d])?void 0:{id:0,version:void 0,description:void 0,payload:s[d]}}}this.receivedFeatureFlags({flags:a})},t.getFlags=function(){return Object.keys(this.getFlagVariants())},t.getFlagsWithDetails=function(){var e=this._prop(ec),t=this._prop(rc),n=this._prop(ic);if(!n&&!t)return e||{};for(var r,i=rl({},e||{}),o=Oi([].concat(new Set([].concat(Object.keys(n||{}),Object.keys(t||{})))));!(r=o()).done;){var s,a,u=r.value,l=i[u],c=null==t?void 0:t[u],d=Ds(c)?null!==(s=null==l?void 0:l.enabled)&&void 0!==s&&s:!!c,f=Ds(c)?l.variant:"string"==typeof c?c:void 0,p=null==n?void 0:n[u],h=Ai({},l,{enabled:d,variant:d?null!=f?f:null==l?void 0:l.variant:void 0});d!==(null==l?void 0:l.enabled)&&(h.original_enabled=null==l?void 0:l.enabled),f!==(null==l?void 0:l.variant)&&(h.original_variant=null==l?void 0:l.variant),p&&(h.metadata=Ai({},null==l?void 0:l.metadata,{payload:p,original_payload:null==l||null==(a=l.metadata)?void 0:a.payload})),i[u]=h}return this._override_warning||(gv.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:i}),this._override_warning=!0),i},t.getFlagVariants=function(){var e=this._prop(Kl),t=this._prop(rc);if(!t)return e||{};for(var n=rl({},e),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this._override_warning||(gv.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this._override_warning=!0),n},t.getFlagPayloads=function(){var e=this._prop(tc),t=this._prop(ic);if(!t)return e||{};for(var n=rl({},e||{}),r=Object.keys(t),i=0;r.length>i;i++)n[r[i]]=t[r[i]];return this._override_warning||(gv.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this._override_warning=!0),n},t.reloadFeatureFlags=function(){var e=this;this._reloadingDisabled||this._config.advanced_disable_feature_flags||this._reloadDebouncer||(this._instance._internalEventEmitter.emit("featureFlagsReloading",!0),this._reloadDebouncer=setTimeout((function(){e._callFlagsEndpoint()}),5))},t._clearDebouncer=function(){clearTimeout(this._reloadDebouncer),this._reloadDebouncer=void 0},t.ensureFlagsLoaded=function(){this._hasLoadedFlags||this._requestInFlight||this._reloadDebouncer||this.reloadFeatureFlags()},t.setAnonymousDistinctId=function(e){this.$anon_distinct_id=e},t.setReloadingPaused=function(e){this._reloadingDisabled=e},t._callFlagsEndpoint=function(e){var t,n=this;if(this._clearDebouncer(),!this._instance._shouldDisableFlags())if(this._requestInFlight)this._additionalReloadRequested=!0;else{var r=this._config.token,i=this._prop(Rl),o={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Ai({},(null==(t=this._persistence)?void 0:t.get_initial_props())||{},this._prop(oc)||{}),group_properties:this._prop(sc),timezone:yp()};js(i)||Ds(i)||(o.$device_id=i),(null!=e&&e.disableFlags||this._config.advanced_disable_feature_flags)&&(o.disable_flags=!0),this._shouldIncludeEvaluationEnvironments()&&(o.evaluation_contexts=this._getValidEvaluationEnvironments());var s=this._getValidFlagKeys();Ds(s)||(o.flag_keys=s);var a=!!this._config.advanced_only_evaluate_survey_feature_flags,u=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this._config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this._requestInFlight=!0,this._instance._send_request({method:"POST",url:u,data:o,compression:this._config.disable_compression?void 0:Wc,timeout:this._config.feature_flag_request_timeout_ms,callback:function(e){var t,r,i,s,u=!0;if(200===e.statusCode&&(n._additionalReloadRequested||(n.$anon_distinct_id=void 0),u=!1),n._requestInFlight=!1,!o.disable_flags||n._additionalReloadRequested){n._flagsLoadedFromRemote=!u;var l=[];e.error?e.error instanceof Error?l.push("AbortError"===e.error.name?"timeout":"connection_error"):l.push("unknown_error"):200!==e.statusCode&&l.push("api_error_"+e.statusCode),null!=(t=e.json)&&t.errorsWhileComputingFlags&&l.push("errors_while_computing_flags");var c,d=!(null==(r=e.json)||null==(r=r.quotaLimited)||!r.includes("feature_flags"));if(d&&l.push("quota_limited"),null==(i=n._persistence)||i.register(((s={})[fc]=l,s)),d)gv.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else o.disable_flags||n.receivedFeatureFlags(null!==(c=e.json)&&void 0!==c?c:{},u,{partialResponse:a}),n._additionalReloadRequested&&(n._additionalReloadRequested=!1,n._callFlagsEndpoint())}}})}},t.getFeatureFlag=function(e,t){var n;if(void 0===t&&(t={}),!t.fresh||this._flagsLoadedFromRemote)if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){if(!this._checkAndTriggerStaleRefresh()){var r=this.getFeatureFlagResult(e,t);return null!==(n=null==r?void 0:r.variant)&&void 0!==n?n:null==r?void 0:r.enabled}}else gv.warn('getFeatureFlag for key "'+e+yv)},t.getFeatureFlagDetails=function(e){return this.getFlagsWithDetails()[e]},t.getFeatureFlagPayload=function(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return null==t?void 0:t.payload},t.getFeatureFlagResult=function(e,t){if(void 0===t&&(t={}),!t.fresh||this._flagsLoadedFromRemote)if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){if(!this._checkAndTriggerStaleRefresh()){var n=this.getFlagVariants(),r=e in n,i=n[e],o=this.getFlagPayloads()[e],s=String(i),a=this._prop(nc)||void 0,u=this._prop(pc)||void 0,l=this._prop(cc)||{};if(this._config.advanced_feature_flags_dedup_per_session){var c,d,f=this._instance.get_session_id(),p=this._prop(dc);f&&f!==p&&(l={},null==(c=this._persistence)||c.register(((d={})[cc]=l,d[dc]=f,d)))}if((t.send_event||!("send_event"in t))&&(!(e in l)||!l[e].includes(s))){var h,_,v,g,m,y,b,w,S,x,k;Os(l[e])?l[e].push(s):l[e]=[s],null==(h=this._persistence)||h.register(((_={})[cc]=l,_));var E=this.getFeatureFlagDetails(e),C=[].concat(null!==(v=this._prop(fc))&&void 0!==v?v:[]);Ds(i)&&C.push("flag_missing");var P={$feature_flag:e,$feature_flag_response:i,$feature_flag_payload:o||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:(null==(g=this._config.bootstrap)||null==(g=g.featureFlags)?void 0:g[e])||null,$feature_flag_bootstrapped_payload:(null==(m=this._config.bootstrap)||null==(m=m.featureFlagPayloads)?void 0:m[e])||null,$used_bootstrap_value:!this._flagsLoadedFromRemote};Ds(null==E||null==(y=E.metadata)?void 0:y.version)||(P.$feature_flag_version=E.metadata.version);var T,I=null!==(b=null==E||null==(w=E.reason)?void 0:w.description)&&void 0!==b?b:null==E||null==(S=E.reason)?void 0:S.code;I&&(P.$feature_flag_reason=I),null!=E&&null!=(x=E.metadata)&&x.id&&(P.$feature_flag_id=E.metadata.id),Ds(null==E?void 0:E.original_variant)&&Ds(null==E?void 0:E.original_enabled)||(P.$feature_flag_original_response=Ds(E.original_variant)?E.original_enabled:E.original_variant),null!=E&&null!=(k=E.metadata)&&k.original_payload&&(P.$feature_flag_original_payload=null==E||null==(T=E.metadata)?void 0:T.original_payload),C.length&&(P.$feature_flag_error=C.join(",")),this._instance.capture("$feature_flag_called",P)}if(r){var F=o;if(!Ds(o))try{F=JSON.parse(o)}catch(e){}return{key:e,enabled:!!i,variant:"string"==typeof i?i:void 0,payload:F}}}}else gv.warn('getFeatureFlagResult for key "'+e+yv)},t.getRemoteConfigPayload=function(e,t){var n=this._config.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this._shouldIncludeEvaluationEnvironments()&&(r.evaluation_contexts=this._getValidEvaluationEnvironments());var i=this._getValidFlagKeys();Ds(i)||(r.flag_keys=i),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this._config.disable_compression?void 0:Wc,timeout:this._config.feature_flag_request_timeout_ms,callback:function(n){var r,i=null==(r=n.json)?void 0:r.featureFlagPayloads;t((null==i?void 0:i[e])||void 0)}})},t.isFeatureEnabled=function(e,t){if(void 0===t&&(t={}),!t.fresh||this._flagsLoadedFromRemote){if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return Ds(n)?void 0:!!n}gv.warn('isFeatureEnabled for key "'+e+yv)}},t.addFeatureFlagsHandler=function(e){this.featureFlagEventHandlers.push(e)},t.removeFeatureFlagsHandler=function(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((function(t){return t!==e}))},t.receivedFeatureFlags=function(e,t,n){if(this._persistence){this._hasLoadedFlags=!0;var r=this.getFlagVariants(),i=this.getFlagPayloads(),o=this.getFlagsWithDetails();!function(e,t,n,r,i,o){var s,a,u;void 0===n&&(n={}),void 0===r&&(r={}),void 0===i&&(i={});var l=function(e){var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((function(e){var n;return[e,null!==(n=t[e].variant)&&void 0!==n?n:t[e].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((function(e){return t[e].enabled})).filter((function(e){var n;return null==(n=t[e].metadata)?void 0:n.payload})).map((function(e){var n;return[e,null==(n=t[e].metadata)?void 0:n.payload]})))):gv.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e}(e),c=l.flags,d=l.featureFlags,f=l.featureFlagPayloads;if(d){var p=e.requestId,h=e.evaluatedAt;if(Os(d)){var _;gv.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var v={};if(d)for(var g=0;d.length>g;g++)v[d[g]]=!0;t&&t.register(((_={})[Xl]=d,_[Kl]=v,_))}else{var m=d,y=f,b=c;if(null!=o&&o.partialResponse)m=Ai({},n,m),y=Ai({},r,y),b=Ai({},i,b);else if(e.errorsWhileComputingFlags)if(c){var w=new Set(Object.keys(c).filter((function(e){var t;return!(null!=(t=c[e])&&t.failed)})));m=Ai({},n,Object.fromEntries(Object.entries(m).filter((function(e){return w.has(e[0])})))),y=Ai({},r,Object.fromEntries(Object.entries(y||{}).filter((function(e){return w.has(e[0])})))),b=Ai({},i,Object.fromEntries(Object.entries(b||{}).filter((function(e){return w.has(e[0])}))))}else m=Ai({},n,m),y=Ai({},r,y),b=Ai({},i,b);t&&t.register(Ai(((s={})[Xl]=Object.keys(wv(m)),s[Kl]=m||{},s[tc]=y||{},s[ec]=b||{},s),p?((a={})[nc]=p,a):{},h?((u={})[pc]=h,u):{}))}}}(e,this._persistence,r,i,o,n),t||(this._staleCacheRefreshTriggered=!1),this._fireFeatureFlagsCallbacks(t)}},t.override=function(e,t){void 0===t&&(t=!1),gv.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})},t.overrideFeatureFlags=function(e){if(!this._instance.__loaded||!this._persistence)return gv.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(!1===e)return this._persistence.unregister(rc),this._persistence.unregister(ic),this._fireFeatureFlagsCallbacks(),mv.info("All overrides cleared");if(Os(e)){var t,n=bv(e);return this._persistence.register(((t={})[rc]=n,t)),this._fireFeatureFlagsCallbacks(),mv.info("Flag overrides set",{flags:e})}if(e&&"object"==typeof e&&("flags"in e||"payloads"in e)){var r,i=e;if(this._override_warning=Boolean(null!==(r=i.suppressWarning)&&void 0!==r&&r),"flags"in i)if(!1===i.flags)this._persistence.unregister(rc),mv.info("Flag overrides cleared");else if(i.flags){if(Os(i.flags)){var o,s=bv(i.flags);this._persistence.register(((o={})[rc]=s,o))}else{var a;this._persistence.register(((a={})[rc]=i.flags,a))}mv.info("Flag overrides set",{flags:i.flags})}if("payloads"in i)if(!1===i.payloads)this._persistence.unregister(ic),mv.info("Payload overrides cleared");else if(i.payloads){var u;this._persistence.register(((u={})[ic]=i.payloads,u)),mv.info("Payload overrides set",{payloads:i.payloads})}this._fireFeatureFlagsCallbacks()}else{var l;if(e&&"object"==typeof e)return this._persistence.register(((l={})[rc]=e,l)),this._fireFeatureFlagsCallbacks(),mv.info("Flag overrides set",{flags:e});gv.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}},t.onFeatureFlags=function(e){var t=this;if(this.addFeatureFlagsHandler(e),this._hasLoadedFlags){var n=this._prepareFeatureFlagsForCallbacks();e(n.flags,n.flagVariants)}return function(){return t.removeFeatureFlagsHandler(e)}},t.updateEarlyAccessFeatureEnrollment=function(e,t,n){var r,i,o,s,a=(this._prop(Jl)||[]).find((function(t){return t.flagKey===e})),u=((r={})["$feature_enrollment/"+e]=t,r),l={$feature_flag:e,$feature_enrollment:t,$set:u};a&&(l.$early_access_feature_name=a.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(u,!1);var c=Ai({},this.getFlagVariants(),((i={})[e]=t,i));null==(o=this._persistence)||o.register(((s={})[Xl]=Object.keys(wv(c)),s[Kl]=c,s)),this._fireFeatureFlagsCallbacks()},t.getEarlyAccessFeatures=function(e,t,n){var r=this;void 0===t&&(t=!1);var i=this._prop(Jl),o=n?"&"+n.map((function(e){return"stage="+e})).join("&"):"";if(i&&!t)return e(i);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._config.token+o),method:"GET",callback:function(t){var n,i,o;if(t.json){var s=t.json.earlyAccessFeatures;return null==(n=r._persistence)||n.unregister(Jl),null==(i=r._persistence)||i.register(((o={})[Jl]=s,o)),e(s)}}})},t._prepareFeatureFlagsForCallbacks=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}),{})}},t._fireFeatureFlagsCallbacks=function(e){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach((function(t){return t(n,r,{errorsLoading:e})}))},t.setPersonPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._prop(oc)||{},i=(null==e?void 0:e.$set)||(null!=e&&e.$set_once?{}:e),o=null==e?void 0:e.$set_once,s={};if(o)for(var a in o)({}).hasOwnProperty.call(o,a)&&(a in r||(s[a]=o[a]));this._instance.register(((n={})[oc]=Ai({},r,s,i),n)),t&&this._instance.reloadFeatureFlags()},t.resetPersonPropertiesForFlags=function(){this._instance.unregister(oc)},t.setGroupPropertiesForFlags=function(e,t){var n;void 0===t&&(t=!0);var r=this._prop(sc)||{};0!==Object.keys(r).length&&Object.keys(r).forEach((function(t){r[t]=Ai({},r[t],e[t]),delete e[t]})),this._instance.register(((n={})[sc]=Ai({},r,e),n)),t&&this._instance.reloadFeatureFlags()},t.resetGroupPropertiesForFlags=function(e){if(e){var t,n,r=this._prop(sc)||{};this._instance.register(((n={})[sc]=Ai({},r,((t={})[e]={},t)),n))}else this._instance.unregister(sc)},t.reset=function(){this._hasLoadedFlags=!1,this._requestInFlight=!1,this._reloadingDisabled=!1,this._additionalReloadRequested=!1,this._flagsLoadedFromRemote=!1,this.$anon_distinct_id=void 0,this._clearDebouncer(),this._override_warning=!1},Mi(e,[{key:"_config",get:function(){return this._instance.config}},{key:"_persistence",get:function(){return this._instance.persistence}},{key:"hasLoadedFlags",get:function(){return this._hasLoadedFlags}}])}(),xv="Refusing to render web experiment since the viewer is a likely bot",kv={icontains:function(e,t){return!!ju&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1},not_icontains:function(e,t){return!!ju&&-1===t.href.toLowerCase().indexOf(e.toLowerCase())},regex:function(e,t){return!!ju&&Hd(t.href,e)},not_regex:function(e,t){return!!ju&&!Hd(t.href,e)},exact:function(e,t){return t.href===e},is_not:function(e,t){return t.href!==e}},Ev=function(){function e(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(t){void 0===t&&(t=!1),n.getWebExperiments((function(t){e._logInfo("retrieved web experiments from the server"),n._flagToExperiments=new Map,t.forEach((function(t){if(t.feature_flag_key){var r;n._flagToExperiments&&(e._logInfo("setting flag key ",t.feature_flag_key," to web experiment ",t),null==(r=n._flagToExperiments)||r.set(t.feature_flag_key,t));var i=n._instance.getFeatureFlag(t.feature_flag_key);Ns(i)&&t.variants[i]&&n._applyTransforms(t.name,i,t.variants[i].transforms)}else if(t.variants)for(var o in t.variants){var s=t.variants[o];e._matchesTestVariant(s)&&n._applyTransforms(t.name,o,s.transforms)}}))}),t)},this._instance=t,this._instance.onFeatureFlags((function(e){n.onFeatureFlags(e)}))}var t=e.prototype;return t.initialize=function(){},t.onFeatureFlags=function(t){var n=this;if(this._is_bot())e._logInfo(xv);else if(!this._config.disable_web_experiments){if(Us(this._flagToExperiments))return this._flagToExperiments=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e._logInfo("applying feature flags",t),t.forEach((function(e){var t;if(n._flagToExperiments&&null!=(t=n._flagToExperiments)&&t.has(e)){var r,i=n._instance.getFeatureFlag(e),o=null==(r=n._flagToExperiments)?void 0:r.get(e);i&&null!=o&&o.variants[i]&&n._applyTransforms(o.name,i,o.variants[i].transforms)}}))}},t.previewWebExperiment=function(){var t=this,n=e.getWindowLocation();if(null!=n&&n.search){var r=Yc(null==n?void 0:n.search,"__experiment_id"),i=Yc(null==n?void 0:n.search,"__experiment_variant");r&&i&&(e._logInfo("previewing web experiments "+r+" && "+i),this.getWebExperiments((function(e){t._showPreviewWebExperiment(parseInt(r),i,e)}),!1,!0))}},t.loadIfEnabled=function(){this._config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()},t.getWebExperiments=function(e,t,n){if(this._config.disable_web_experiments&&!n)return e([]);var r=this._instance.get_property("$web_experiments");if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._config.token),method:"GET",callback:function(t){return e(200===t.statusCode&&t.json&&t.json.experiments||[])}})},t._showPreviewWebExperiment=function(t,n,r){var i=r.filter((function(e){return e.id===t}));i&&i.length>0&&(e._logInfo("Previewing web experiment ["+i[0].name+"] with variant ["+n+"]"),this._applyTransforms(i[0].name,n,i[0].variants[n].transforms))},e._matchesTestVariant=function(t){return!Us(t.conditions)&&e._matchUrlConditions(t)&&e._matchUTMConditions(t)},e._matchUrlConditions=function(t){var n;if(Us(t.conditions)||Us(null==(n=t.conditions)?void 0:n.url))return!0;var r,i,o,s=e.getWindowLocation();return!!s&&(null==(r=t.conditions)||!r.url||kv[null!==(i=null==(o=t.conditions)?void 0:o.urlMatchType)&&void 0!==i?i:"icontains"](t.conditions.url,s))},e.getWindowLocation=function(){return null==ju?void 0:ju.location},e._matchUTMConditions=function(e){var t;if(Us(e.conditions)||Us(null==(t=e.conditions)?void 0:t.utm))return!0;var n=dp();if(n.utm_source){var r,i,o,s,a,u,l,c,d=null==(r=e.conditions)||null==(r=r.utm)||!r.utm_campaign||(null==(i=e.conditions)||null==(i=i.utm)?void 0:i.utm_campaign)==n.utm_campaign,f=null==(o=e.conditions)||null==(o=o.utm)||!o.utm_source||(null==(s=e.conditions)||null==(s=s.utm)?void 0:s.utm_source)==n.utm_source,p=null==(a=e.conditions)||null==(a=a.utm)||!a.utm_medium||(null==(u=e.conditions)||null==(u=u.utm)?void 0:u.utm_medium)==n.utm_medium,h=null==(l=e.conditions)||null==(l=l.utm)||!l.utm_term||(null==(c=e.conditions)||null==(c=c.utm)?void 0:c.utm_term)==n.utm_term;return d&&p&&h&&f}return!1},e._logInfo=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];Ju.info("[WebExperiments] "+e,n)},t._applyTransforms=function(t,n,r){this._is_bot()?e._logInfo(xv):"control"!==n?r.forEach((function(r){if(r.selector){var i;e._logInfo("applying transform of variant "+n+" for experiment "+t+" ",r);var o=null==(i=document)?void 0:i.querySelectorAll(r.selector);null==o||o.forEach((function(e){var t=e;r.html&&(t.innerHTML=r.html),r.css&&t.setAttribute("style",r.css)}))}})):e._logInfo("Control variants leave the page unmodified.")},t._is_bot=function(){return Bu&&this._instance?Eh(Bu,this._config.custom_blocked_useragents):void 0},Mi(e,[{key:"_config",get:function(){return this._instance.config}}])}(),Cv=el("[Conversations]"),Pv="Conversations not available yet.",Tv=function(){function e(e){this._isConversationsEnabled=void 0,this._conversationsManager=null,this._isInitializing=!1,this._remoteConfig=null,this._instance=e}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){if(!this._instance.config.disable_conversations){var t=e.conversations;Us(t)||(zs(t)?this._isConversationsEnabled=t:(this._isConversationsEnabled=t.enabled,this._remoteConfig=t),this.loadIfEnabled())}},t.reset=function(){var e;null==(e=this._conversationsManager)||e.reset(),this._conversationsManager=null,this._isConversationsEnabled=void 0,this._remoteConfig=null},t.loadIfEnabled=function(){var e=this;if(!(this._conversationsManager||this._isInitializing||this._instance.config.disable_conversations||dl(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=null==Ku?void 0:Ku.__PosthogExtensions__;if(t&&!Ds(this._isConversationsEnabled)&&this._isConversationsEnabled)if(this._remoteConfig&&this._remoteConfig.token){this._isInitializing=!0;try{var n=t.initConversations;if(n)return this._completeInitialization(n),void(this._isInitializing=!1);var r=t.loadExternalDependency;if(!r)return void this._handleLoadError(Cc);r(this._instance,"conversations",(function(n){n||!t.initConversations?e._handleLoadError("Could not load conversations script",n):e._completeInitialization(t.initConversations),e._isInitializing=!1}))}catch(e){this._handleLoadError("Error initializing conversations",e),this._isInitializing=!1}}else Cv.error("Conversations enabled but missing token in remote config.")}},t._completeInitialization=function(e){if(this._remoteConfig)try{this._conversationsManager=e(this._remoteConfig,this._instance),Cv.info("Conversations loaded successfully")}catch(e){this._handleLoadError("Error completing conversations initialization",e)}else Cv.error("Cannot complete initialization: remote config is null")},t._handleLoadError=function(e,t){Cv.error(e,t),this._conversationsManager=null,this._isInitializing=!1},t.show=function(){this._conversationsManager?this._conversationsManager.show():Cv.warn("Conversations not loaded yet.")},t.hide=function(){this._conversationsManager&&this._conversationsManager.hide()},t.isAvailable=function(){return!0===this._isConversationsEnabled&&!js(this._conversationsManager)},t.isVisible=function(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.isVisible())&&void 0!==e&&e},t.sendMessage=function(){var e=Ri($i().m((function e(t,n,r){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.sendMessage(t,n,r))}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}(),t.getMessages=function(){var e=Ri($i().m((function e(t,n){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.getMessages(t,n))}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),t.markAsRead=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.markAsRead(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.getTickets=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.getTickets(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.requestRestoreLink=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.requestRestoreLink(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.restoreFromToken=function(){var e=Ri($i().m((function e(t){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.restoreFromToken(t))}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),t.restoreFromUrlToken=function(){var e=Ri($i().m((function e(){return $i().w((function(e){for(;;)switch(e.n){case 0:if(this._conversationsManager){e.n=1;break}return Cv.warn(Pv),e.a(2,null);case 1:return e.a(2,this._conversationsManager.restoreFromUrlToken())}}),e,this)})));return function(){return e.apply(this,arguments)}}(),t.getCurrentTicketId=function(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getCurrentTicketId())&&void 0!==e?e:null},t.getWidgetSessionId=function(){var e,t;return null!==(e=null==(t=this._conversationsManager)?void 0:t.getWidgetSessionId())&&void 0!==e?e:null},t._onIdentityChanged=function(){var e;null==(e=this._conversationsManager)||e.setIdentity()},t._onIdentityCleared=function(){var e;null==(e=this._conversationsManager)||e.clearIdentity()},e}(),Iv=function(){function e(e){var t;this._isLogsEnabled=!1,this._isLoaded=!1,this._logger=el("[logs]"),this._logBuffer=[],this._intervalLogCount=0,this._intervalWindowStart=0,this._droppedWarned=!1,this._instance=e,this._instance&&null!=(t=this._instance.config.logs)&&t.captureConsoleLogs&&(this._isLogsEnabled=!0)}var t=e.prototype;return t.initialize=function(){this.loadIfEnabled()},t.onRemoteConfig=function(e){var t,n=null==(t=e.logs)?void 0:t.captureConsoleLogs;!Us(n)&&n&&(this._isLogsEnabled=!0,this.loadIfEnabled())},t.reset=function(){this._logBuffer=[],this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0),this._intervalLogCount=0,this._intervalWindowStart=0,this._droppedWarned=!1},t.loadIfEnabled=function(){var e=this;if(this._isLogsEnabled&&!this._isLoaded){var t=null==Ku?void 0:Ku.__PosthogExtensions__;if(t){var n=t.loadExternalDependency;n?n(this._instance,"logs",(function(n){var r;n||null==(r=t.logs)||!r.initializeLogs?e._logger.error("Could not load logs script",n):(t.logs.initializeLogs(e._instance),e._isLoaded=!0)})):this._logger.error(Cc)}else this._logger.error("PostHog Extensions not found.")}},t.captureLog=function(e){var t,n,r,i,o,s;if(this._instance.is_capturing())if(e&&e.body){var a=null!==(t=null==(n=this._instance.config.logs)?void 0:n.flushIntervalMs)&&void 0!==t?t:3e3,u=null!==(r=null==(i=this._instance.config.logs)?void 0:i.maxLogsPerInterval)&&void 0!==r?r:1e3,l=Date.now();if(a>l-this._intervalWindowStart||(this._intervalWindowStart=l,this._intervalLogCount=0,this._droppedWarned=!1),u>this._intervalLogCount){this._intervalLogCount++;var c=function(e,t){var n=iu[e.level||"info"]||ou,r=n.text,i=n.number,o=String(Date.now())+"000000",s={};t.distinctId&&(s.posthogDistinctId=t.distinctId),t.sessionId&&(s.sessionId=t.sessionId),t.currentUrl&&(s["url.full"]=t.currentUrl),t.screenName&&(s["screen.name"]=t.screenName),t.appState&&(s["app.state"]=t.appState),t.activeFeatureFlags&&t.activeFeatureFlags.length>0&&(s.feature_flags=t.activeFeatureFlags);var a=Ai({},s,e.attributes||{}),u={timeUnixNano:o,observedTimeUnixNano:o,severityNumber:i,severityText:r,body:{stringValue:e.body},attributes:au(a)};return e.trace_id&&(u.traceId=e.trace_id),e.span_id&&(u.spanId=e.span_id),Ds(e.trace_flags)||(u.flags=e.trace_flags),u}(e,this._getSdkContext());this._logBuffer.push({record:c}),(null!==(o=null==(s=this._instance.config.logs)?void 0:s.maxBufferSize)&&void 0!==o?o:100)>this._logBuffer.length?this._scheduleFlush():this.flushLogs()}else this._droppedWarned||(this._logger.warn("captureLog dropping logs: exceeded "+u+" logs per "+a+"ms"),this._droppedWarned=!0)}else this._logger.warn("captureLog requires a body")},t.flushLogs=function(e){if(this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0),0!==this._logBuffer.length){var t=this._logBuffer;this._logBuffer=[];var n=this._instance.config.logs,r=Ai({"service.name":(null==n?void 0:n.serviceName)||"unknown_service"},(null==n?void 0:n.environment)&&{"deployment.environment":n.environment},(null==n?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},null==n?void 0:n.resourceAttributes),i=function(e,t,n,r){return{resourceLogs:[{resource:{attributes:au(t)},scopeLogs:[{scope:{name:n,version:r},logRecords:e}]}]}}(t.map((function(e){return e.record})),r,hs.LIB_NAME,hs.LIB_VERSION),o=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance._send_retriable_request({method:"POST",url:o,data:i,compression:"best-available",batchKey:"logs",transport:e})}},t._scheduleFlush=function(){var e,t,n=this;this._flushTimeout||(this._flushTimeout=setTimeout((function(){n._flushTimeout=void 0,n.flushLogs()}),null!==(e=null==(t=this._instance.config.logs)?void 0:t.flushIntervalMs)&&void 0!==e?e:3e3))},t._getSdkContext=function(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var n=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n.sessionId}if(null!=Ku&&null!=(e=Ku.location)&&e.href&&(t.currentUrl=Ku.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t},Mi(e,[{key:"logger",get:function(){var e=this;return this._logger_instance||(this._logger_instance={trace:function(t,n){return e.captureLog({body:t,level:"trace",attributes:n})},debug:function(t,n){return e.captureLog({body:t,level:"debug",attributes:n})},info:function(t,n){return e.captureLog({body:t,level:"info",attributes:n})},warn:function(t,n){return e.captureLog({body:t,level:"warn",attributes:n})},error:function(t,n){return e.captureLog({body:t,level:"error",attributes:n})},fatal:function(t,n){return e.captureLog({body:t,level:"fatal",attributes:n})}}),this._logger_instance}}])}(),Fv={featureFlags:Sv},Lv={sessionRecording:Y_},Rv={autocapture:M_,historyAutocapture:q_,heatmaps:K_,deadClicksAutocapture:Jp,webVitalsAutocapture:j_},Mv={exceptionObserver:A_,exceptions:Dp},Ov=Ai({productTours:J_},Fv),Av={siteApps:rv},qv={tracingHeaders:D_},$v=Ai({surveys:fv},Fv),Dv={toolbar:vv},Nv=Ai({experiments:Ev},Fv),Hv=Ai({},Fv,Lv,Rv,Mv,Ov,Av,$v,qv,Dv,Nv,{conversations:Tv},{logs:Iv});if(Wh.__defaultExtensionClasses=Ai({},Hv),ov=Mh[Hh]=new Wh,(sv=Ku.posthog)&&nl(sv._i,(function(e){if(e&&Os(e)){var t=ov.init(e[0],e[1],e[2]),n=sv[e[2]]||sv;t&&(t._execute_array.call(t.people,n.people),t._execute_array(n))}})),Ku.posthog=ov,function(){function e(){e.done||(e.done=!0,jh=!1,nl(Mh,(function(e){e._dom_loaded()})))}null!=Vu&&Vu.addEventListener?"complete"===Vu.readyState?e():cl(Vu,"DOMContentLoaded",e,{capture:!1}):ju&&Ju.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),"undefined"==typeof performance||"function"!=typeof performance.now){var jv="undefined"!=typeof performance?performance:{};jv.now=jv.now||function(){return Date.now()},"undefined"==typeof performance&&(window.performance=jv)}}();
|
|
2
2
|
//# sourceMappingURL=array.full.es5.js.map
|